@una-ui/nuxt 0.51.2 → 0.51.3
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/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -210,6 +210,13 @@ function getHeaderColumnFiltersCount(headers: Header<unknown, unknown>[]): numbe
|
|
|
210
210
|
return count
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
+
function getRowAttrs(data?: TData) {
|
|
214
|
+
if (typeof props._tableRow === 'function') {
|
|
215
|
+
return props._tableRow(data)
|
|
216
|
+
}
|
|
217
|
+
return props._tableRow
|
|
218
|
+
}
|
|
219
|
+
|
|
213
220
|
defineExpose({
|
|
214
221
|
...table,
|
|
215
222
|
})
|
|
@@ -242,7 +249,7 @@ defineExpose({
|
|
|
242
249
|
v-for="headerGroup in table.getHeaderGroups()"
|
|
243
250
|
:key="headerGroup.id"
|
|
244
251
|
:una
|
|
245
|
-
v-bind="
|
|
252
|
+
v-bind="getRowAttrs()"
|
|
246
253
|
>
|
|
247
254
|
<!-- headers -->
|
|
248
255
|
<TableHead
|
|
@@ -301,7 +308,7 @@ defineExpose({
|
|
|
301
308
|
v-if="getHeaderColumnFiltersCount(headerGroup.headers) > 0 || enableColumnFilters"
|
|
302
309
|
data-filter="true"
|
|
303
310
|
:una
|
|
304
|
-
v-bind="
|
|
311
|
+
v-bind="getRowAttrs()"
|
|
305
312
|
>
|
|
306
313
|
<TableHead
|
|
307
314
|
v-for="header in headerGroup.headers"
|
|
@@ -352,7 +359,7 @@ defineExpose({
|
|
|
352
359
|
<TableRow
|
|
353
360
|
:data-state="row.getIsSelected() && 'selected'"
|
|
354
361
|
:una
|
|
355
|
-
v-bind="
|
|
362
|
+
v-bind="getRowAttrs(row.original)"
|
|
356
363
|
@click="emit('row', $event, row.original)"
|
|
357
364
|
>
|
|
358
365
|
<slot
|
|
@@ -384,7 +391,7 @@ defineExpose({
|
|
|
384
391
|
<TableRow
|
|
385
392
|
v-if="row.getIsExpanded() && $slots.expanded"
|
|
386
393
|
:una
|
|
387
|
-
v-bind="
|
|
394
|
+
v-bind="getRowAttrs(row.original)"
|
|
388
395
|
>
|
|
389
396
|
<TableCell
|
|
390
397
|
:colspan="row.getAllCells().length"
|
|
@@ -422,7 +429,7 @@ defineExpose({
|
|
|
422
429
|
<TableRow
|
|
423
430
|
v-if="footerGroup.headers.length > 0"
|
|
424
431
|
:una
|
|
425
|
-
v-bind="
|
|
432
|
+
v-bind="getRowAttrs()"
|
|
426
433
|
>
|
|
427
434
|
<template
|
|
428
435
|
v-for="header in footerGroup.headers"
|
|
@@ -13,6 +13,7 @@ const rootProps = reactiveOmit(props, ['una', 'class'])
|
|
|
13
13
|
|
|
14
14
|
<template>
|
|
15
15
|
<Primitive
|
|
16
|
+
role="row"
|
|
16
17
|
:class="cn(
|
|
17
18
|
'table-row',
|
|
18
19
|
props.una?.tableRow,
|
|
@@ -23,3 +24,7 @@ const rootProps = reactiveOmit(props, ['una', 'class'])
|
|
|
23
24
|
<slot />
|
|
24
25
|
</Primitive>
|
|
25
26
|
</template>
|
|
27
|
+
|
|
28
|
+
<style>
|
|
29
|
+
.table-row{display:table-row}
|
|
30
|
+
</style>
|
|
@@ -110,7 +110,7 @@ export interface NTableProps<TData, TValue> extends Omit<CoreOptions<TData>, 'da
|
|
|
110
110
|
_tableFooter?: NTableFooterProps;
|
|
111
111
|
_tableBody?: NTableBodyProps;
|
|
112
112
|
_tableCaption?: NTableCaptionProps;
|
|
113
|
-
_tableRow?: NTableRowProps;
|
|
113
|
+
_tableRow?: NTableRowProps | ((row?: TData) => NTableRowProps);
|
|
114
114
|
_tableCell?: NTableCellProps;
|
|
115
115
|
_tableEmpty?: NTableEmptyProps;
|
|
116
116
|
_tableLoading?: NTableLoadingProps;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@una-ui/nuxt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.51.
|
|
4
|
+
"version": "0.51.3",
|
|
5
5
|
"description": "Nuxt module for @una-ui",
|
|
6
6
|
"author": "Phojie Rengel <phojrengel@gmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@headlessui/vue": "^1.7.23",
|
|
41
41
|
"@iconify/utils": "^2.3.0",
|
|
42
|
-
"@nuxt/kit": "^3.16.
|
|
42
|
+
"@nuxt/kit": "^3.16.2",
|
|
43
43
|
"@nuxtjs/color-mode": "^3.5.2",
|
|
44
44
|
"@tanstack/vue-table": "^8.21.2",
|
|
45
45
|
"@unocss/core": "^66.0.0",
|
|
@@ -59,16 +59,16 @@
|
|
|
59
59
|
"typescript": "5.6.3",
|
|
60
60
|
"unocss": "^66.0.0",
|
|
61
61
|
"unocss-preset-animations": "^1.1.1",
|
|
62
|
-
"@una-ui/
|
|
63
|
-
"@una-ui/
|
|
62
|
+
"@una-ui/extractor-vue-script": "^0.51.3",
|
|
63
|
+
"@una-ui/preset": "^0.51.3"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@iconify-json/lucide": "^1.2.
|
|
66
|
+
"@iconify-json/lucide": "^1.2.35",
|
|
67
67
|
"@iconify-json/radix-icons": "^1.2.2",
|
|
68
68
|
"@iconify-json/tabler": "^1.2.17",
|
|
69
69
|
"@nuxt/module-builder": "^0.8.4",
|
|
70
|
-
"@nuxt/schema": "^3.16.
|
|
71
|
-
"nuxt": "^3.16.
|
|
70
|
+
"@nuxt/schema": "^3.16.2",
|
|
71
|
+
"nuxt": "^3.16.2",
|
|
72
72
|
"zod": "^3.24.2"
|
|
73
73
|
},
|
|
74
74
|
"publishConfig": {
|