@veristone/nuxt-v-app 0.1.1 → 0.2.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.
- package/app/components/V/A/Crud/Create.vue +149 -0
- package/app/components/V/A/Crud/Delete.vue +147 -0
- package/app/components/V/A/Crud/Update.vue +171 -0
- package/app/components/V/A/Modal/Base.vue +64 -167
- package/app/components/V/A/Modal/Form.vue +47 -21
- package/app/components/V/A/Slide.vue +17 -19
- package/app/components/V/Modal.vue +51 -18
- package/app/composables/useVToast.ts +10 -10
- package/app/layouts/default.vue +80 -70
- package/app/pages/playground/crud.vue +936 -0
- package/app/pages/playground/index.vue +6 -0
- package/app/pages/playground/modals.vue +794 -557
- package/app/pages/test-api-auth.vue +140 -93
- package/package.json +1 -1
package/app/layouts/default.vue
CHANGED
|
@@ -1,107 +1,112 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { NavigationMenuItem } from
|
|
2
|
+
import type { NavigationMenuItem } from "@nuxt/ui";
|
|
3
3
|
|
|
4
|
-
const route = useRoute()
|
|
4
|
+
const route = useRoute();
|
|
5
5
|
|
|
6
6
|
const links = ref<NavigationMenuItem[][]>([
|
|
7
7
|
[
|
|
8
8
|
{
|
|
9
|
-
to:
|
|
10
|
-
icon:
|
|
11
|
-
label:
|
|
9
|
+
to: "/",
|
|
10
|
+
icon: "i-lucide-home",
|
|
11
|
+
label: "Overview",
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
|
-
to:
|
|
15
|
-
icon:
|
|
16
|
-
label:
|
|
14
|
+
to: "/playground",
|
|
15
|
+
icon: "i-lucide-blocks",
|
|
16
|
+
label: "Playground",
|
|
17
17
|
open: true,
|
|
18
18
|
children: [
|
|
19
19
|
{
|
|
20
|
-
to:
|
|
21
|
-
icon:
|
|
22
|
-
label:
|
|
20
|
+
to: "/playground",
|
|
21
|
+
icon: "i-lucide-layout-grid",
|
|
22
|
+
label: "Components",
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
|
-
to:
|
|
26
|
-
icon:
|
|
27
|
-
label:
|
|
25
|
+
to: "/playground/cards",
|
|
26
|
+
icon: "i-lucide-credit-card",
|
|
27
|
+
label: "Cards",
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
|
-
to:
|
|
31
|
-
icon:
|
|
32
|
-
label:
|
|
30
|
+
to: "/playground/charts",
|
|
31
|
+
icon: "i-lucide-bar-chart-3",
|
|
32
|
+
label: "Charts",
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
|
-
to:
|
|
36
|
-
icon:
|
|
37
|
-
label:
|
|
35
|
+
to: "/playground/blocks",
|
|
36
|
+
icon: "i-lucide-layout-template",
|
|
37
|
+
label: "Blocks",
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
|
-
to:
|
|
41
|
-
icon:
|
|
42
|
-
label:
|
|
40
|
+
to: "/playground/dashboard",
|
|
41
|
+
icon: "i-lucide-layout-dashboard",
|
|
42
|
+
label: "Dashboard",
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
|
-
to:
|
|
46
|
-
icon:
|
|
47
|
-
label:
|
|
45
|
+
to: "/playground/tables",
|
|
46
|
+
icon: "i-lucide-table-2",
|
|
47
|
+
label: "Tables",
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
|
-
to:
|
|
51
|
-
icon:
|
|
52
|
-
label:
|
|
50
|
+
to: "/playground/base",
|
|
51
|
+
icon: "i-lucide-box",
|
|
52
|
+
label: "Base Components",
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
|
-
to:
|
|
56
|
-
icon:
|
|
57
|
-
label:
|
|
55
|
+
to: "/playground/buttons",
|
|
56
|
+
icon: "i-lucide-mouse-pointer-click",
|
|
57
|
+
label: "Buttons",
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
|
-
to:
|
|
61
|
-
icon:
|
|
62
|
-
label:
|
|
60
|
+
to: "/playground/formatters",
|
|
61
|
+
icon: "i-lucide-text-cursor-input",
|
|
62
|
+
label: "Formatters",
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
|
-
to:
|
|
66
|
-
icon:
|
|
67
|
-
label:
|
|
65
|
+
to: "/playground/states",
|
|
66
|
+
icon: "i-lucide-loader",
|
|
67
|
+
label: "States",
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
|
-
to:
|
|
71
|
-
icon:
|
|
72
|
-
label:
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
70
|
+
to: "/playground/modals",
|
|
71
|
+
icon: "i-lucide-panel-right",
|
|
72
|
+
label: "Modals",
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
to: "/playground/crud",
|
|
76
|
+
icon: "i-lucide-database",
|
|
77
|
+
label: "CRUD",
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
},
|
|
81
|
+
],
|
|
82
|
+
]);
|
|
78
83
|
|
|
79
84
|
const groups = computed(() => [
|
|
80
85
|
{
|
|
81
|
-
id:
|
|
82
|
-
label:
|
|
83
|
-
items: links.value.flat()
|
|
86
|
+
id: "links",
|
|
87
|
+
label: "Go to",
|
|
88
|
+
items: links.value.flat(),
|
|
84
89
|
},
|
|
85
90
|
{
|
|
86
|
-
id:
|
|
87
|
-
label:
|
|
91
|
+
id: "code",
|
|
92
|
+
label: "Code",
|
|
88
93
|
items: [
|
|
89
94
|
{
|
|
90
|
-
id:
|
|
91
|
-
label:
|
|
92
|
-
icon:
|
|
95
|
+
id: "source",
|
|
96
|
+
label: "View page source",
|
|
97
|
+
icon: "i-simple-icons-github",
|
|
93
98
|
to: `https://github.com/nuxt-ui-templates/dashboard/blob/main/app/pages${
|
|
94
|
-
route.path ===
|
|
99
|
+
route.path === "/" ? "/index" : route.path
|
|
95
100
|
}.vue`,
|
|
96
|
-
target:
|
|
97
|
-
}
|
|
98
|
-
]
|
|
99
|
-
}
|
|
100
|
-
])
|
|
101
|
+
target: "_blank",
|
|
102
|
+
},
|
|
103
|
+
],
|
|
104
|
+
},
|
|
105
|
+
]);
|
|
101
106
|
</script>
|
|
102
107
|
|
|
103
108
|
<template>
|
|
104
|
-
<UDashboardGroup unit="rem">
|
|
109
|
+
<UDashboardGroup unit="rem" class="h-full overflow-hidden">
|
|
105
110
|
<UDashboardSidebar
|
|
106
111
|
resizable
|
|
107
112
|
collapsible
|
|
@@ -114,18 +119,22 @@ const groups = computed(() => [
|
|
|
114
119
|
class="flex items-center gap-2 px-3 py-2"
|
|
115
120
|
:class="collapsed ? 'justify-center' : ''"
|
|
116
121
|
>
|
|
117
|
-
<div
|
|
118
|
-
|
|
122
|
+
<div
|
|
123
|
+
class="size-8 rounded-lg bg-primary-500/10 flex items-center justify-center shrink-0"
|
|
124
|
+
>
|
|
125
|
+
<UIcon
|
|
126
|
+
name="i-lucide-layout-dashboard"
|
|
127
|
+
class="size-5 text-primary-500"
|
|
128
|
+
/>
|
|
119
129
|
</div>
|
|
120
|
-
<span v-if="!collapsed" class="font-semibold text-lg truncate"
|
|
130
|
+
<span v-if="!collapsed" class="font-semibold text-lg truncate"
|
|
131
|
+
>VA Playground</span
|
|
132
|
+
>
|
|
121
133
|
</div>
|
|
122
134
|
</template>
|
|
123
135
|
|
|
124
136
|
<template #default="{ collapsed }">
|
|
125
|
-
<VaLayoutSideNav
|
|
126
|
-
:items="links[0]!"
|
|
127
|
-
:collapsed="collapsed"
|
|
128
|
-
/>
|
|
137
|
+
<VaLayoutSideNav :items="links[0]!" :collapsed="collapsed" />
|
|
129
138
|
|
|
130
139
|
<!-- Accounts section commented out - requires /analytics.svg asset
|
|
131
140
|
<div class="space-y-1 mt-4">
|
|
@@ -155,7 +164,6 @@ const groups = computed(() => [
|
|
|
155
164
|
</div>
|
|
156
165
|
</div>
|
|
157
166
|
-->
|
|
158
|
-
|
|
159
167
|
</template>
|
|
160
168
|
|
|
161
169
|
<template #footer="{ collapsed }">
|
|
@@ -165,7 +173,9 @@ const groups = computed(() => [
|
|
|
165
173
|
|
|
166
174
|
<UDashboardSearch :groups="groups" />
|
|
167
175
|
|
|
168
|
-
<
|
|
176
|
+
<div class="flex-1 overflow-y-auto">
|
|
177
|
+
<slot />
|
|
178
|
+
</div>
|
|
169
179
|
<VaLayoutNotificationsSlideover />
|
|
170
180
|
</UDashboardGroup>
|
|
171
181
|
</template>
|