@veristone/nuxt-v-app 0.1.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.
Files changed (136) hide show
  1. package/README.md +42 -0
  2. package/app/app.vue +7 -0
  3. package/app/assets/css/v-app.css +313 -0
  4. package/app/components/V/A/Badge.vue +75 -0
  5. package/app/components/V/A/Btn/Add.vue +17 -0
  6. package/app/components/V/A/Btn/Back.vue +25 -0
  7. package/app/components/V/A/Btn/ConfirmDelete.vue +45 -0
  8. package/app/components/V/A/Btn/Edit.vue +35 -0
  9. package/app/components/V/A/Btn/Export.vue +28 -0
  10. package/app/components/V/A/Btn/Refresh.vue +21 -0
  11. package/app/components/V/A/Btn/Submit.vue +45 -0
  12. package/app/components/V/A/Btn/View.vue +23 -0
  13. package/app/components/V/A/Card.legacy.vue +291 -0
  14. package/app/components/V/A/Card.vue +108 -0
  15. package/app/components/V/A/CompanyMenu.vue +83 -0
  16. package/app/components/V/A/Data/KeyValue.vue +98 -0
  17. package/app/components/V/A/Data/StatusBadge.vue +44 -0
  18. package/app/components/V/A/DataField.vue +140 -0
  19. package/app/components/V/A/DataGrid.vue +43 -0
  20. package/app/components/V/A/DataTable.vue +144 -0
  21. package/app/components/V/A/EmptyState.vue +154 -0
  22. package/app/components/V/A/Fmt/Currency.vue +36 -0
  23. package/app/components/V/A/Fmt/DateTime.vue +34 -0
  24. package/app/components/V/A/Fmt/Percent.vue +47 -0
  25. package/app/components/V/A/LoadingState.vue +140 -0
  26. package/app/components/V/A/MetricCard.vue +129 -0
  27. package/app/components/V/A/Modal/Base.vue +195 -0
  28. package/app/components/V/A/Modal/Confirm.vue +92 -0
  29. package/app/components/V/A/Modal/Form.vue +105 -0
  30. package/app/components/V/A/Navigation.vue +110 -0
  31. package/app/components/V/A/QuickActions.vue +169 -0
  32. package/app/components/V/A/Slide.vue +109 -0
  33. package/app/components/V/A/Slideover.vue +259 -0
  34. package/app/components/V/A/State/Empty.vue +20 -0
  35. package/app/components/V/A/State/Error.vue +34 -0
  36. package/app/components/V/A/State/Loading.vue +33 -0
  37. package/app/components/V/A/StatsCard.vue +215 -0
  38. package/app/components/V/A/StatusBadge.vue +215 -0
  39. package/app/components/V/A/Table.vue +674 -0
  40. package/app/components/V/A/UserMenu.vue +127 -0
  41. package/app/components/V/A/WelcomeHeader.vue +96 -0
  42. package/app/components/V/Modal.vue +36 -0
  43. package/app/components/Va/Blocks/VaBlockGridCharts.vue +32 -0
  44. package/app/components/Va/Blocks/VaBlockGridKPI.vue +32 -0
  45. package/app/components/Va/Blocks/VaBlockGridTables.vue +23 -0
  46. package/app/components/Va/Blocks/VaBlockKpiGrid.vue +8 -0
  47. package/app/components/Va/Blocks/VaBlockSessionFilterBar.vue +8 -0
  48. package/app/components/Va/Cards/VaCardDonutChart.vue +59 -0
  49. package/app/components/Va/Cards/VaCardHeader.vue +10 -0
  50. package/app/components/Va/Cards/VaCardKpi.vue +17 -0
  51. package/app/components/Va/Cards/VaCardKpi2.vue +55 -0
  52. package/app/components/Va/Cards/VaCardLatestOrders.vue +82 -0
  53. package/app/components/Va/Cards/VaCardPopularProducts.vue +88 -0
  54. package/app/components/Va/Cards/VaCardRevenueBarChart.vue +49 -0
  55. package/app/components/Va/Cards/VaCardSubtitle.vue +5 -0
  56. package/app/components/Va/Cards/VaCardTitle.vue +5 -0
  57. package/app/components/Va/Cards/VaCardWithActiveUsers.vue +41 -0
  58. package/app/components/Va/Cards/VaCardWithChart.vue +135 -0
  59. package/app/components/Va/Cards/VaCardWithChartBlock.vue +26 -0
  60. package/app/components/Va/Cards/VaCardWithIndicator.vue +39 -0
  61. package/app/components/Va/Cards/VaCardWithProgressCircle.vue +34 -0
  62. package/app/components/Va/Cards/types.ts +11 -0
  63. package/app/components/Va/Charts/VaChartAppPerformanceBar.vue +118 -0
  64. package/app/components/Va/Charts/VaChartAppPerformanceBarChart.vue +118 -0
  65. package/app/components/Va/Charts/VaChartAreaMini.vue +127 -0
  66. package/app/components/Va/Charts/VaChartBarMini.vue +68 -0
  67. package/app/components/Va/Charts/VaChartCardinalMulti.vue +108 -0
  68. package/app/components/Va/Charts/VaChartColorBarChart.vue +78 -0
  69. package/app/components/Va/Charts/VaChartDonutHalf.vue +35 -0
  70. package/app/components/Va/Charts/VaChartDonutMini.vue +77 -0
  71. package/app/components/Va/Charts/VaChartExpensesBar.vue +58 -0
  72. package/app/components/Va/Charts/VaChartFinanceSummary.vue +96 -0
  73. package/app/components/Va/Charts/VaChartGoogleSearchConsole.vue +90 -0
  74. package/app/components/Va/Charts/VaChartIncomeBar.vue +82 -0
  75. package/app/components/Va/Charts/VaChartLegend.vue +25 -0
  76. package/app/components/Va/Charts/VaChartLineMini.vue +205 -0
  77. package/app/components/Va/Charts/VaChartRealtimeTraffic.vue +182 -0
  78. package/app/components/Va/Charts/VaChartRevenue.vue +43 -0
  79. package/app/components/Va/Charts/VaChartRevenueLine.vue +42 -0
  80. package/app/components/Va/Charts/VaChartRevenuevsCost.vue +84 -0
  81. package/app/components/Va/Charts/VaChartSearchIntent.vue +179 -0
  82. package/app/components/Va/Charts/VaChartSpendingTrend.vue +127 -0
  83. package/app/components/Va/Charts/VaChartStackedHorizontal.vue +64 -0
  84. package/app/components/Va/Charts/VaChartStepMinimal.vue +109 -0
  85. package/app/components/Va/Charts/VaChartStockComparisonLine.vue +86 -0
  86. package/app/components/Va/Charts/VaChartStocksPortfolioLine.vue +161 -0
  87. package/app/components/Va/Charts/VaChartStocksSectorLine.vue +223 -0
  88. package/app/components/Va/Charts/VaChartTasksCategories.vue +96 -0
  89. package/app/components/Va/Charts/VaChartTasksProgress.vue +130 -0
  90. package/app/components/Va/Charts/VaChartTrafficOverview.vue +112 -0
  91. package/app/components/Va/Charts/VaChartWebPerformanceLineChart.vue +114 -0
  92. package/app/components/Va/Charts/VaChartWinLostBar.vue +110 -0
  93. package/app/components/Va/Charts/VaChartWinLostDonut.vue +107 -0
  94. package/app/components/Va/Charts/VaChartWinLostLine.vue +111 -0
  95. package/app/components/Va/Charts/types.ts +10 -0
  96. package/app/components/Va/Dashboard/Navigation/types.ts +8 -0
  97. package/app/components/Va/Dashboard/VaDashboardKPICard.vue +31 -0
  98. package/app/components/Va/Dashboard/VaDashboardNavigation.vue +50 -0
  99. package/app/components/Va/Dashboard/VaDashboardPricePlan.vue +102 -0
  100. package/app/components/Va/Dashboard/VaDashboardUsageChart.vue +84 -0
  101. package/app/components/Va/Dashboard/VaDashboardUsageRequestChart.vue +46 -0
  102. package/app/components/Va/Layout/NotificationsSlideover.vue +169 -0
  103. package/app/components/Va/Layout/SideNav/types.ts +5 -0
  104. package/app/components/Va/Layout/SideNav.vue +108 -0
  105. package/app/components/Va/Layout/TeamsMenu.vue +57 -0
  106. package/app/components/Va/Layout/UserMenu.vue +57 -0
  107. package/app/composables/useDashboard.ts +25 -0
  108. package/app/composables/useVAAnimation.ts +324 -0
  109. package/app/composables/useVAUtils.ts +118 -0
  110. package/app/composables/useVCrud.ts +647 -0
  111. package/app/composables/useVFetch.ts +46 -0
  112. package/app/composables/useVFileUpload.ts +45 -0
  113. package/app/composables/useVToast.ts +73 -0
  114. package/app/composables/useXATableColumns.ts +456 -0
  115. package/app/data/BillingStats.ts +65 -0
  116. package/app/data/SearchData.ts +58 -0
  117. package/app/data/TasksData.ts +101 -0
  118. package/app/data/dashboardData.ts +113 -0
  119. package/app/layouts/default.vue +171 -0
  120. package/app/layouts/legacy.vue +61 -0
  121. package/app/pages/playground/base.vue +498 -0
  122. package/app/pages/playground/blocks.vue +108 -0
  123. package/app/pages/playground/buttons.vue +237 -0
  124. package/app/pages/playground/cards.vue +326 -0
  125. package/app/pages/playground/charts.vue +338 -0
  126. package/app/pages/playground/dashboard.vue +315 -0
  127. package/app/pages/playground/formatters.vue +329 -0
  128. package/app/pages/playground/index.vue +109 -0
  129. package/app/pages/playground/layout.vue +159 -0
  130. package/app/pages/playground/modals.vue +606 -0
  131. package/app/pages/playground/states.vue +282 -0
  132. package/app/pages/playground/tables.vue +618 -0
  133. package/app/pages/test-layout.vue +10 -0
  134. package/nuxt.config.ts +12 -0
  135. package/package.json +71 -0
  136. package/tsconfig.json +18 -0
@@ -0,0 +1,618 @@
1
+ <script setup lang="ts">
2
+ definePageMeta({
3
+ title: 'Table Components'
4
+ })
5
+
6
+ // Sample data
7
+ const users = ref([
8
+ { id: 1, name: 'John Doe', email: 'john@example.com', role: 'Admin', status: 'active', department: 'Engineering', salary: 95000 },
9
+ { id: 2, name: 'Jane Smith', email: 'jane@example.com', role: 'Editor', status: 'active', department: 'Marketing', salary: 72000 },
10
+ { id: 3, name: 'Bob Wilson', email: 'bob@example.com', role: 'Viewer', status: 'pending', department: 'Sales', salary: 68000 },
11
+ { id: 4, name: 'Alice Brown', email: 'alice@example.com', role: 'Admin', status: 'active', department: 'Engineering', salary: 105000 },
12
+ { id: 5, name: 'Charlie Davis', email: 'charlie@example.com', role: 'Editor', status: 'inactive', department: 'Design', salary: 78000 },
13
+ { id: 6, name: 'Diana Miller', email: 'diana@example.com', role: 'Viewer', status: 'active', department: 'HR', salary: 62000 },
14
+ { id: 7, name: 'Edward Lee', email: 'edward@example.com', role: 'Admin', status: 'active', department: 'Engineering', salary: 112000 },
15
+ { id: 8, name: 'Fiona Garcia', email: 'fiona@example.com', role: 'Editor', status: 'pending', department: 'Marketing', salary: 75000 },
16
+ { id: 9, name: 'George Martinez', email: 'george@example.com', role: 'Viewer', status: 'active', department: 'Sales', salary: 71000 },
17
+ { id: 10, name: 'Hannah Robinson', email: 'hannah@example.com', role: 'Editor', status: 'active', department: 'Design', salary: 82000 },
18
+ { id: 11, name: 'Ivan Thompson', email: 'ivan@example.com', role: 'Admin', status: 'inactive', department: 'Engineering', salary: 98000 },
19
+ { id: 12, name: 'Julia White', email: 'julia@example.com', role: 'Viewer', status: 'active', department: 'HR', salary: 58000 }
20
+ ])
21
+
22
+ // Basic columns
23
+ const basicColumns = [
24
+ { accessorKey: 'name', header: 'Name' },
25
+ { accessorKey: 'email', header: 'Email' },
26
+ { accessorKey: 'role', header: 'Role' },
27
+ { accessorKey: 'status', header: 'Status' }
28
+ ]
29
+
30
+ // Full columns with more fields
31
+ const fullColumns = [
32
+ { accessorKey: 'name', header: 'Name' },
33
+ { accessorKey: 'email', header: 'Email' },
34
+ { accessorKey: 'role', header: 'Role' },
35
+ { accessorKey: 'department', header: 'Department' },
36
+ { accessorKey: 'salary', header: 'Salary' },
37
+ { accessorKey: 'status', header: 'Status' }
38
+ ]
39
+
40
+ // Columns with custom cells
41
+ const customCellColumns = [
42
+ { accessorKey: 'name', header: 'Name' },
43
+ { accessorKey: 'email', header: 'Email' },
44
+ { accessorKey: 'role', header: 'Role' },
45
+ { accessorKey: 'status', header: 'Status' },
46
+ { accessorKey: 'salary', header: 'Salary' }
47
+ ]
48
+
49
+ // Products data for variety
50
+ const products = ref([
51
+ { id: 1, name: 'MacBook Pro 14"', category: 'Laptops', price: 1999, stock: 45, rating: 4.8 },
52
+ { id: 2, name: 'iPhone 15 Pro', category: 'Phones', price: 999, stock: 120, rating: 4.9 },
53
+ { id: 3, name: 'AirPods Pro', category: 'Audio', price: 249, stock: 200, rating: 4.7 },
54
+ { id: 4, name: 'iPad Air', category: 'Tablets', price: 599, stock: 80, rating: 4.6 },
55
+ { id: 5, name: 'Apple Watch Ultra', category: 'Wearables', price: 799, stock: 35, rating: 4.8 },
56
+ { id: 6, name: 'Mac Mini M2', category: 'Desktops', price: 699, stock: 60, rating: 4.5 }
57
+ ])
58
+
59
+ const productColumns = [
60
+ { accessorKey: 'name', header: 'Product' },
61
+ { accessorKey: 'category', header: 'Category' },
62
+ { accessorKey: 'price', header: 'Price' },
63
+ { accessorKey: 'stock', header: 'Stock' },
64
+ { accessorKey: 'rating', header: 'Rating' }
65
+ ]
66
+
67
+ // Event handlers
68
+ const handleSearch = (query: string) => {
69
+ console.log('Search:', query)
70
+ }
71
+
72
+ const handleSelect = (rows: any[]) => {
73
+ console.log('Selected:', rows)
74
+ }
75
+
76
+ const handleView = (row: any) => {
77
+ console.log('View:', row)
78
+ }
79
+
80
+ const handleEdit = (row: any) => {
81
+ console.log('Edit:', row)
82
+ }
83
+
84
+ const handleDelete = (row: any) => {
85
+ console.log('Delete:', row)
86
+ }
87
+
88
+ const handleExport = (format: string, data: any[]) => {
89
+ console.log(`Exported ${data.length} rows as ${format}`)
90
+ }
91
+
92
+ // Status badge color helper
93
+ const getStatusColor = (status: string) => {
94
+ switch (status) {
95
+ case 'active': return 'green'
96
+ case 'pending': return 'yellow'
97
+ case 'inactive': return 'red'
98
+ default: return 'gray'
99
+ }
100
+ }
101
+
102
+ // VADataTable handlers
103
+ const handleDataTableSelect = (row: any) => {
104
+ console.log('DataTable selected:', row)
105
+ }
106
+
107
+ const handleDataTablePrev = () => {
108
+ console.log('DataTable prev')
109
+ }
110
+
111
+ const handleDataTableNext = () => {
112
+ console.log('DataTable next')
113
+ }
114
+
115
+ const handleDataTableNew = () => {
116
+ console.log('DataTable new')
117
+ }
118
+ </script>
119
+
120
+ <template>
121
+ <UDashboardPanel grow>
122
+ <UContainer>
123
+ <div class="py-8 space-y-12">
124
+ <div>
125
+ <h1 class="text-3xl font-bold mb-4">VATable Components Showcase</h1>
126
+ <p class="text-gray-600 dark:text-gray-400">
127
+ Full-featured data tables with search, sort, filter, export, selection, and pagination capabilities.
128
+ </p>
129
+ </div>
130
+
131
+ <!-- Basic Table -->
132
+ <h2 class="text-2xl font-semibold mb-4 mt-8">Basic Table</h2>
133
+ <p class="text-gray-600 dark:text-gray-400 mb-4">Simple table with minimal configuration.</p>
134
+ <div class="mb-8">
135
+ <UCard>
136
+ <template #header>
137
+ <h3 class="font-semibold">Basic Table Example</h3>
138
+ </template>
139
+ <ClientOnly>
140
+ <VATable
141
+ :data="users.slice(0, 5)"
142
+ :columns="basicColumns"
143
+ :paginated="false"
144
+ card
145
+ />
146
+ </ClientOnly>
147
+ </UCard>
148
+ </div>
149
+
150
+ <!-- Searchable Table -->
151
+ <h2 class="text-2xl font-semibold mb-4 mt-8">Searchable Table</h2>
152
+ <p class="text-gray-600 dark:text-gray-400 mb-4">Table with search functionality to filter rows.</p>
153
+ <div class="mb-8">
154
+ <UCard>
155
+ <template #header>
156
+ <h3 class="font-semibold">Search Example</h3>
157
+ </template>
158
+ <ClientOnly>
159
+ <VATable
160
+ :data="users"
161
+ :columns="basicColumns"
162
+ searchable
163
+ search-placeholder="Search users..."
164
+ card
165
+ name="Users"
166
+ @search="handleSearch"
167
+ />
168
+ </ClientOnly>
169
+ </UCard>
170
+ </div>
171
+
172
+ <!-- Sortable Table -->
173
+ <h2 class="text-2xl font-semibold mb-4 mt-8">Sortable Table</h2>
174
+ <p class="text-gray-600 dark:text-gray-400 mb-4">Click column headers to sort. Click again to reverse, third click to clear.</p>
175
+ <div class="mb-8">
176
+ <UCard>
177
+ <template #header>
178
+ <h3 class="font-semibold">Sort Example</h3>
179
+ </template>
180
+ <ClientOnly>
181
+ <VATable
182
+ :data="products"
183
+ :columns="productColumns"
184
+ sortable
185
+ card
186
+ name="Products"
187
+ />
188
+ </ClientOnly>
189
+ </UCard>
190
+ </div>
191
+
192
+ <!-- Row Selection -->
193
+ <h2 class="text-2xl font-semibold mb-4 mt-8">Row Selection</h2>
194
+ <p class="text-gray-600 dark:text-gray-400 mb-4">Multi-select with checkbox column and select all functionality.</p>
195
+ <div class="mb-8">
196
+ <UCard>
197
+ <template #header>
198
+ <h3 class="font-semibold">Multi-Select Example</h3>
199
+ </template>
200
+ <ClientOnly>
201
+ <VATable
202
+ :data="users.slice(0, 6)"
203
+ :columns="basicColumns"
204
+ selectable="multi"
205
+ card
206
+ name="Select Users"
207
+ @select="handleSelect"
208
+ />
209
+ </ClientOnly>
210
+ </UCard>
211
+ </div>
212
+
213
+ <!-- Single Selection -->
214
+ <h2 class="text-2xl font-semibold mb-4 mt-8">Single Selection</h2>
215
+ <p class="text-gray-600 dark:text-gray-400 mb-4">Single row selection mode - only one row can be selected at a time.</p>
216
+ <div class="mb-8">
217
+ <UCard>
218
+ <template #header>
219
+ <h3 class="font-semibold">Single-Select Example</h3>
220
+ </template>
221
+ <ClientOnly>
222
+ <VATable
223
+ :data="products"
224
+ :columns="productColumns"
225
+ selectable="single"
226
+ card
227
+ name="Select Product"
228
+ :paginated="false"
229
+ @select="handleSelect"
230
+ />
231
+ </ClientOnly>
232
+ </UCard>
233
+ </div>
234
+
235
+ <!-- Row Actions -->
236
+ <h2 class="text-2xl font-semibold mb-4 mt-8">Row Actions</h2>
237
+ <p class="text-gray-600 dark:text-gray-400 mb-4">Table with view, edit, and delete action buttons per row.</p>
238
+ <div class="mb-8">
239
+ <UCard>
240
+ <template #header>
241
+ <h3 class="font-semibold">Actions Example</h3>
242
+ </template>
243
+ <ClientOnly>
244
+ <VATable
245
+ :data="users.slice(0, 5)"
246
+ :columns="basicColumns"
247
+ show-view
248
+ show-edit
249
+ show-delete
250
+ card
251
+ name="Users with Actions"
252
+ :paginated="false"
253
+ @view="handleView"
254
+ @edit="handleEdit"
255
+ @delete="handleDelete"
256
+ />
257
+ </ClientOnly>
258
+ </UCard>
259
+ </div>
260
+
261
+ <!-- Export Functionality -->
262
+ <h2 class="text-2xl font-semibold mb-4 mt-8">Export Functionality</h2>
263
+ <p class="text-gray-600 dark:text-gray-400 mb-4">Export data to CSV or JSON format.</p>
264
+ <div class="mb-8">
265
+ <UCard>
266
+ <template #header>
267
+ <h3 class="font-semibold">Export Example</h3>
268
+ </template>
269
+ <ClientOnly>
270
+ <VATable
271
+ :data="products"
272
+ :columns="productColumns"
273
+ exportable
274
+ :export-formats="['csv', 'json']"
275
+ card
276
+ name="Products Export"
277
+ @export="handleExport"
278
+ />
279
+ </ClientOnly>
280
+ </UCard>
281
+ </div>
282
+
283
+ <!-- Column Toggle -->
284
+ <h2 class="text-2xl font-semibold mb-4 mt-8">Column Toggle</h2>
285
+ <p class="text-gray-600 dark:text-gray-400 mb-4">Show/hide columns using the column toggle dropdown.</p>
286
+ <div class="mb-8">
287
+ <UCard>
288
+ <template #header>
289
+ <h3 class="font-semibold">Column Toggle Example</h3>
290
+ </template>
291
+ <ClientOnly>
292
+ <VATable
293
+ :data="users.slice(0, 6)"
294
+ :columns="fullColumns"
295
+ show-column-toggle
296
+ card
297
+ name="Toggle Columns"
298
+ />
299
+ </ClientOnly>
300
+ </UCard>
301
+ </div>
302
+
303
+ <!-- Custom Cell Rendering -->
304
+ <h2 class="text-2xl font-semibold mb-4 mt-8">Custom Cell Rendering</h2>
305
+ <p class="text-gray-600 dark:text-gray-400 mb-4">Custom cell templates for status badges and formatted currency.</p>
306
+ <div class="mb-8">
307
+ <UCard>
308
+ <template #header>
309
+ <h3 class="font-semibold">Custom Cells Example</h3>
310
+ </template>
311
+ <ClientOnly>
312
+ <VATable
313
+ :data="users.slice(0, 6)"
314
+ :columns="customCellColumns"
315
+ card
316
+ name="Custom Cells"
317
+ :paginated="false"
318
+ >
319
+ <template #status-data="{ value }">
320
+ <UBadge :color="getStatusColor(value)" size="sm" variant="subtle">
321
+ {{ value }}
322
+ </UBadge>
323
+ </template>
324
+ <template #salary-data="{ value }">
325
+ <span class="font-medium text-gray-900 dark:text-white">
326
+ ${{ value.toLocaleString() }}
327
+ </span>
328
+ </template>
329
+ </VATable>
330
+ </ClientOnly>
331
+ </UCard>
332
+ </div>
333
+
334
+ <!-- Striped Table -->
335
+ <h2 class="text-2xl font-semibold mb-4 mt-8">Striped Table</h2>
336
+ <p class="text-gray-600 dark:text-gray-400 mb-4">Alternating row colors for improved readability.</p>
337
+ <div class="mb-8">
338
+ <UCard>
339
+ <template #header>
340
+ <h3 class="font-semibold">Striped Example</h3>
341
+ </template>
342
+ <ClientOnly>
343
+ <VATable
344
+ :data="users.slice(0, 8)"
345
+ :columns="basicColumns"
346
+ striped
347
+ card
348
+ name="Striped Table"
349
+ />
350
+ </ClientOnly>
351
+ </UCard>
352
+ </div>
353
+
354
+ <!-- Compact Table -->
355
+ <h2 class="text-2xl font-semibold mb-4 mt-8">Compact Table</h2>
356
+ <p class="text-gray-600 dark:text-gray-400 mb-4">Reduced padding for denser data display.</p>
357
+ <div class="mb-8">
358
+ <UCard>
359
+ <template #header>
360
+ <h3 class="font-semibold">Compact Example</h3>
361
+ </template>
362
+ <ClientOnly>
363
+ <VATable
364
+ :data="users.slice(0, 8)"
365
+ :columns="basicColumns"
366
+ compact
367
+ card
368
+ name="Compact Table"
369
+ />
370
+ </ClientOnly>
371
+ </UCard>
372
+ </div>
373
+
374
+ <!-- Sticky Header -->
375
+ <h2 class="text-2xl font-semibold mb-4 mt-8">Sticky Header</h2>
376
+ <p class="text-gray-600 dark:text-gray-400 mb-4">Header stays visible when scrolling through large datasets.</p>
377
+ <div class="mb-8">
378
+ <UCard>
379
+ <template #header>
380
+ <h3 class="font-semibold">Sticky Header Example</h3>
381
+ </template>
382
+ <div class="max-h-64 overflow-auto">
383
+ <ClientOnly>
384
+ <VATable
385
+ :data="users"
386
+ :columns="basicColumns"
387
+ sticky-header
388
+ :paginated="false"
389
+ card
390
+ name="Sticky Header"
391
+ />
392
+ </ClientOnly>
393
+ </div>
394
+ </UCard>
395
+ </div>
396
+
397
+ <!-- Full Featured Table -->
398
+ <h2 class="text-2xl font-semibold mb-4 mt-8">Full Featured Table</h2>
399
+ <p class="text-gray-600 dark:text-gray-400 mb-4">All features combined: search, sort, select, export, pagination, and actions.</p>
400
+ <div class="mb-8">
401
+ <UCard>
402
+ <template #header>
403
+ <h3 class="font-semibold">Full Featured Example</h3>
404
+ </template>
405
+ <ClientOnly>
406
+ <VATable
407
+ :data="users"
408
+ :columns="fullColumns"
409
+ searchable
410
+ search-placeholder="Search users..."
411
+ sortable
412
+ selectable="multi"
413
+ show-column-toggle
414
+ exportable
415
+ show-view
416
+ show-edit
417
+ show-delete
418
+ striped
419
+ card
420
+ name="Full Featured Users"
421
+ :page-size="5"
422
+ :page-sizes="[5, 10, 20]"
423
+ @search="handleSearch"
424
+ @select="handleSelect"
425
+ @view="handleView"
426
+ @edit="handleEdit"
427
+ @delete="handleDelete"
428
+ @export="handleExport"
429
+ >
430
+ <template #status-data="{ value }">
431
+ <UBadge :color="getStatusColor(value)" size="sm" variant="subtle">
432
+ {{ value }}
433
+ </UBadge>
434
+ </template>
435
+ <template #salary-data="{ value }">
436
+ <span class="font-medium">${{ value.toLocaleString() }}</span>
437
+ </template>
438
+ </VATable>
439
+ </ClientOnly>
440
+ </UCard>
441
+ </div>
442
+
443
+ <!-- Loading State -->
444
+ <h2 class="text-2xl font-semibold mb-4 mt-8">Loading State</h2>
445
+ <p class="text-gray-600 dark:text-gray-400 mb-4">Skeleton loading state while data is being fetched.</p>
446
+ <div class="mb-8">
447
+ <UCard>
448
+ <template #header>
449
+ <h3 class="font-semibold">Loading Example</h3>
450
+ </template>
451
+ <ClientOnly>
452
+ <VATable
453
+ :data="[]"
454
+ :columns="basicColumns"
455
+ loading
456
+ card
457
+ name="Loading Table"
458
+ />
459
+ </ClientOnly>
460
+ </UCard>
461
+ </div>
462
+
463
+ <!-- Empty State -->
464
+ <h2 class="text-2xl font-semibold mb-4 mt-8">Empty State</h2>
465
+ <p class="text-gray-600 dark:text-gray-400 mb-4">Custom empty state when no data is available.</p>
466
+ <div class="mb-8">
467
+ <UCard>
468
+ <template #header>
469
+ <h3 class="font-semibold">Empty State Example</h3>
470
+ </template>
471
+ <ClientOnly>
472
+ <VATable
473
+ :data="[]"
474
+ :columns="basicColumns"
475
+ empty-title="No users found"
476
+ empty-description="There are no users matching your criteria. Try adjusting your filters or add new users."
477
+ empty-icon="i-lucide-users"
478
+ card
479
+ name="Empty Table"
480
+ />
481
+ </ClientOnly>
482
+ </UCard>
483
+ </div>
484
+
485
+ <!-- Custom Pagination -->
486
+ <h2 class="text-2xl font-semibold mb-4 mt-8">Custom Pagination</h2>
487
+ <p class="text-gray-600 dark:text-gray-400 mb-4">Configurable page sizes and pagination controls.</p>
488
+ <div class="mb-8">
489
+ <UCard>
490
+ <template #header>
491
+ <h3 class="font-semibold">Pagination Example</h3>
492
+ </template>
493
+ <ClientOnly>
494
+ <VATable
495
+ :data="users"
496
+ :columns="basicColumns"
497
+ :page-size="3"
498
+ :page-sizes="[3, 5, 10, 20]"
499
+ show-page-size
500
+ card
501
+ name="Paginated Table"
502
+ />
503
+ </ClientOnly>
504
+ </UCard>
505
+ </div>
506
+
507
+ <!-- VADataTable Section -->
508
+ <h2 class="text-2xl font-semibold mb-4 mt-8">VADataTable</h2>
509
+ <p class="text-gray-600 dark:text-gray-400 mb-4">Simpler table component with basic search, pagination, and loading states. Ideal for list pages with minimal configuration.</p>
510
+
511
+ <!-- Basic DataTable -->
512
+ <div class="mb-8">
513
+ <UCard>
514
+ <template #header>
515
+ <h3 class="font-semibold">Basic DataTable</h3>
516
+ </template>
517
+ <ClientOnly>
518
+ <VADataTable
519
+ title="Users"
520
+ :rows="users.slice(0, 5)"
521
+ :columns="basicColumns"
522
+ :show-search="false"
523
+ :show-pagination="false"
524
+ @select="handleDataTableSelect"
525
+ />
526
+ </ClientOnly>
527
+ </UCard>
528
+ </div>
529
+
530
+ <!-- DataTable with Search -->
531
+ <div class="mb-8">
532
+ <UCard>
533
+ <template #header>
534
+ <h3 class="font-semibold">DataTable with Search</h3>
535
+ </template>
536
+ <ClientOnly>
537
+ <VADataTable
538
+ title="Users"
539
+ :rows="users"
540
+ :columns="basicColumns"
541
+ search-placeholder="Search users..."
542
+ :show-search="true"
543
+ :show-pagination="false"
544
+ @select="handleDataTableSelect"
545
+ />
546
+ </ClientOnly>
547
+ </UCard>
548
+ </div>
549
+
550
+ <!-- DataTable with Pagination -->
551
+ <div class="mb-8">
552
+ <UCard>
553
+ <template #header>
554
+ <h3 class="font-semibold">DataTable with Pagination</h3>
555
+ </template>
556
+ <ClientOnly>
557
+ <VADataTable
558
+ title="Products"
559
+ :rows="products.slice(0, 3)"
560
+ :columns="productColumns"
561
+ :total-count="products.length"
562
+ :has-prev="false"
563
+ :has-next="true"
564
+ :show-search="true"
565
+ :show-pagination="true"
566
+ search-placeholder="Search products..."
567
+ @select="handleDataTableSelect"
568
+ @prev="handleDataTablePrev"
569
+ @next="handleDataTableNext"
570
+ />
571
+ </ClientOnly>
572
+ </UCard>
573
+ </div>
574
+
575
+ <!-- DataTable with New Button -->
576
+ <div class="mb-8">
577
+ <UCard>
578
+ <template #header>
579
+ <h3 class="font-semibold">DataTable with New Button</h3>
580
+ </template>
581
+ <ClientOnly>
582
+ <VADataTable
583
+ title="Users"
584
+ :rows="users.slice(0, 4)"
585
+ :columns="basicColumns"
586
+ :show-search="true"
587
+ :show-pagination="false"
588
+ :show-new-button="true"
589
+ new-button-label="Add User"
590
+ @select="handleDataTableSelect"
591
+ @new="handleDataTableNew"
592
+ />
593
+ </ClientOnly>
594
+ </UCard>
595
+ </div>
596
+
597
+ <!-- DataTable Loading State -->
598
+ <div class="mb-8">
599
+ <UCard>
600
+ <template #header>
601
+ <h3 class="font-semibold">DataTable Loading State</h3>
602
+ </template>
603
+ <ClientOnly>
604
+ <VADataTable
605
+ title="Loading Data"
606
+ :rows="[]"
607
+ :columns="basicColumns"
608
+ :loading="true"
609
+ :show-search="true"
610
+ :show-pagination="false"
611
+ />
612
+ </ClientOnly>
613
+ </UCard>
614
+ </div>
615
+ </div>
616
+ </UContainer>
617
+ </UDashboardPanel>
618
+ </template>
@@ -0,0 +1,10 @@
1
+ <script setup lang="ts">
2
+ definePageMeta({ layout: 'dashboard' })
3
+ </script>
4
+
5
+ <template>
6
+ <div class="p-8">
7
+ <h1 class="text-2xl font-bold">Dashboard Layout Test</h1>
8
+ <p>If you see the sidebar and header, the layout is working!</p>
9
+ </div>
10
+ </template>
package/nuxt.config.ts ADDED
@@ -0,0 +1,12 @@
1
+ import { fileURLToPath } from 'node:url'
2
+ import { dirname, join } from 'node:path'
3
+
4
+ const currentDir = dirname(fileURLToPath(import.meta.url))
5
+
6
+ export default defineNuxtConfig({
7
+ compatibilityDate: '2025-07-15',
8
+ devtools: { enabled: true },
9
+ modules: ['@nuxt/ui', 'nuxt-charts'],
10
+ css: [join(currentDir, 'app/assets/css/v-app.css')],
11
+ ssr: false
12
+ })