@una-ui/nuxt-edge 1.0.0-alpha.3-29202234.4db332b → 1.0.0-alpha.3-29213868.0dd728a
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 +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/components/alert-dialog/AlertDialogContent.vue +0 -1
- package/dist/runtime/components/data/table/Table.vue +5 -1
- package/dist/runtime/components/data/table/TableEmpty.vue +17 -9
- package/dist/runtime/components/data/table/TableEmpty.vue.d.ts +4 -0
- package/dist/runtime/components/drawer/DrawerContent.vue +0 -1
- package/dist/runtime/components/elements/dialog/DialogContent.vue +0 -1
- package/dist/runtime/components/elements/dialog/DialogScrollContent.vue +0 -1
- package/dist/runtime/components/sheet/SheetContent.vue +0 -1
- package/dist/runtime/types/table.d.ts +16 -3
- package/package.json +9 -9
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -19,7 +19,6 @@ const props = defineProps({
|
|
|
19
19
|
_alertDialogOverlay: { type: Object, required: false },
|
|
20
20
|
una: { type: Object, required: false },
|
|
21
21
|
forceMount: { type: Boolean, required: false },
|
|
22
|
-
trapFocus: { type: Boolean, required: false },
|
|
23
22
|
disableOutsidePointerEvents: { type: Boolean, required: false },
|
|
24
23
|
asChild: { type: Boolean, required: false },
|
|
25
24
|
as: { type: null, required: false },
|
|
@@ -73,7 +73,9 @@ const props = defineProps({
|
|
|
73
73
|
getSubRows: { type: Function, required: false },
|
|
74
74
|
initialState: { type: Object, required: false },
|
|
75
75
|
mergeOptions: { type: Function, required: false },
|
|
76
|
-
meta: { type: Object, required: false }
|
|
76
|
+
meta: { type: Object, required: false },
|
|
77
|
+
emptyText: { type: String, required: false },
|
|
78
|
+
emptyIcon: { type: String, required: false }
|
|
77
79
|
});
|
|
78
80
|
const emit = defineEmits(["select", "selectAll", "expand", "row"]);
|
|
79
81
|
const slots = defineSlots();
|
|
@@ -429,6 +431,8 @@ defineExpose({
|
|
|
429
431
|
v-else
|
|
430
432
|
:colspan="table.getAllLeafColumns().length"
|
|
431
433
|
:una
|
|
434
|
+
:empty-text="props.emptyText"
|
|
435
|
+
:empty-icon="props.emptyIcon"
|
|
432
436
|
v-bind="props._tableEmpty"
|
|
433
437
|
>
|
|
434
438
|
<slot name="empty" />
|
|
@@ -6,6 +6,8 @@ import TableRow from "./TableRow.vue";
|
|
|
6
6
|
const props = defineProps({
|
|
7
7
|
class: { type: null, required: false },
|
|
8
8
|
colspan: { type: Number, required: false, default: 1 },
|
|
9
|
+
emptyText: { type: String, required: false, default: "No results." },
|
|
10
|
+
emptyIcon: { type: String, required: false, default: "table-empty-icon-name" },
|
|
9
11
|
_tableCell: { type: Object, required: false },
|
|
10
12
|
_tableRow: { type: Object, required: false },
|
|
11
13
|
una: { type: Object, required: false }
|
|
@@ -40,16 +42,22 @@ const delegatedProps = reactiveOmit(props, ["class"]);
|
|
|
40
42
|
v-bind="omitProps(delegatedProps, ['_tableRow', '_tableCell', 'colspan'])"
|
|
41
43
|
>
|
|
42
44
|
<slot>
|
|
43
|
-
<
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
<NIcon
|
|
46
|
+
:name="props.emptyIcon"
|
|
47
|
+
:class="cn(
|
|
48
|
+
'table-empty-icon',
|
|
49
|
+
props.una?.tableEmptyIcon
|
|
50
|
+
)"
|
|
51
|
+
/>
|
|
48
52
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
+
<span
|
|
54
|
+
:class="cn(
|
|
55
|
+
'table-empty-text',
|
|
56
|
+
props.una?.tableEmptyText
|
|
57
|
+
)"
|
|
58
|
+
>
|
|
59
|
+
{{ props.emptyText }}
|
|
60
|
+
</span>
|
|
53
61
|
</slot>
|
|
54
62
|
</div>
|
|
55
63
|
</TableCell>
|
|
@@ -5,8 +5,12 @@ type __VLS_Slots = {} & {
|
|
|
5
5
|
};
|
|
6
6
|
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<NTableEmptyProps>, {
|
|
7
7
|
colspan: number;
|
|
8
|
+
emptyText: string;
|
|
9
|
+
emptyIcon: string;
|
|
8
10
|
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<NTableEmptyProps>, {
|
|
9
11
|
colspan: number;
|
|
12
|
+
emptyText: string;
|
|
13
|
+
emptyIcon: string;
|
|
10
14
|
}>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
15
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
12
16
|
export default _default;
|
|
@@ -14,7 +14,6 @@ const props = defineProps({
|
|
|
14
14
|
_drawerOverlay: { type: Object, required: false },
|
|
15
15
|
una: { type: Object, required: false },
|
|
16
16
|
forceMount: { type: Boolean, required: false },
|
|
17
|
-
trapFocus: { type: Boolean, required: false },
|
|
18
17
|
disableOutsidePointerEvents: { type: Boolean, required: false },
|
|
19
18
|
asChild: { type: Boolean, required: false },
|
|
20
19
|
as: { type: null, required: false },
|
|
@@ -20,7 +20,6 @@ const props = defineProps({
|
|
|
20
20
|
_dialogOverlay: { type: Object, required: false },
|
|
21
21
|
una: { type: Object, required: false },
|
|
22
22
|
forceMount: { type: Boolean, required: false },
|
|
23
|
-
trapFocus: { type: Boolean, required: false },
|
|
24
23
|
disableOutsidePointerEvents: { type: Boolean, required: false },
|
|
25
24
|
asChild: { type: Boolean, required: false },
|
|
26
25
|
as: { type: null, required: false },
|
|
@@ -20,7 +20,6 @@ const props = defineProps({
|
|
|
20
20
|
_dialogOverlay: { type: Object, required: false },
|
|
21
21
|
una: { type: Object, required: false },
|
|
22
22
|
forceMount: { type: Boolean, required: false },
|
|
23
|
-
trapFocus: { type: Boolean, required: false },
|
|
24
23
|
disableOutsidePointerEvents: { type: Boolean, required: false },
|
|
25
24
|
asChild: { type: Boolean, required: false },
|
|
26
25
|
as: { type: null, required: false },
|
|
@@ -19,7 +19,6 @@ const props = defineProps({
|
|
|
19
19
|
_sheetPortal: { type: Object, required: false },
|
|
20
20
|
una: { type: Object, required: false },
|
|
21
21
|
forceMount: { type: Boolean, required: false },
|
|
22
|
-
trapFocus: { type: Boolean, required: false },
|
|
23
22
|
disableOutsidePointerEvents: { type: Boolean, required: false },
|
|
24
23
|
asChild: { type: Boolean, required: false },
|
|
25
24
|
as: { type: null, required: false }
|
|
@@ -3,7 +3,7 @@ import type { PrimitiveProps } from 'reka-ui';
|
|
|
3
3
|
import type { HTMLAttributes } from 'vue';
|
|
4
4
|
import type { NProgressProps } from './progress.js';
|
|
5
5
|
import type { NScrollAreaProps, NScrollAreaUnaProps } from './scroll-area.js';
|
|
6
|
-
export interface NTableProps<TData, TValue> extends Omit<CoreOptions<TData>, 'data' | 'columns' | 'getCoreRowModel' | 'state' | 'onStateChange' | 'renderFallbackValue'> {
|
|
6
|
+
export interface NTableProps<TData, TValue> extends Omit<CoreOptions<TData>, 'data' | 'columns' | 'getCoreRowModel' | 'state' | 'onStateChange' | 'renderFallbackValue'>, Pick<NTableEmptyProps, 'emptyText' | 'emptyIcon'> {
|
|
7
7
|
class?: HTMLAttributes['class'];
|
|
8
8
|
/**
|
|
9
9
|
* @see https://tanstack.com/table/latest/docs/api/core/table#state
|
|
@@ -115,6 +115,9 @@ export interface NTableProps<TData, TValue> extends Omit<CoreOptions<TData>, 'da
|
|
|
115
115
|
_tableEmpty?: NTableEmptyProps;
|
|
116
116
|
_tableLoading?: NTableLoadingProps;
|
|
117
117
|
_scrollArea?: NScrollAreaProps;
|
|
118
|
+
/**
|
|
119
|
+
* Whether the table is loading.
|
|
120
|
+
*/
|
|
118
121
|
loading?: boolean;
|
|
119
122
|
/**
|
|
120
123
|
* `UnaUI` preset configuration
|
|
@@ -159,9 +162,17 @@ export interface NTableEmptyProps {
|
|
|
159
162
|
[key: string]: any;
|
|
160
163
|
class?: HTMLAttributes['class'];
|
|
161
164
|
colspan?: number;
|
|
165
|
+
/**
|
|
166
|
+
* The text to display when the table is empty.
|
|
167
|
+
*/
|
|
168
|
+
emptyText?: string;
|
|
169
|
+
/**
|
|
170
|
+
* The icon to display when the table is empty.
|
|
171
|
+
*/
|
|
172
|
+
emptyIcon?: string;
|
|
162
173
|
_tableCell?: NTableCellProps;
|
|
163
174
|
_tableRow?: NTableRowProps;
|
|
164
|
-
una?: Pick<NTableUnaProps, 'tableEmpty' | 'tableRow' | 'tableCell'>;
|
|
175
|
+
una?: Pick<NTableUnaProps, 'tableEmpty' | 'tableRow' | 'tableCell' | 'tableEmptyText' | 'tableEmptyIcon'>;
|
|
165
176
|
}
|
|
166
177
|
export interface NTableLoadingProps {
|
|
167
178
|
[key: string]: any;
|
|
@@ -189,9 +200,11 @@ interface NTableUnaProps {
|
|
|
189
200
|
tableRow?: HTMLAttributes['class'];
|
|
190
201
|
tableCell?: HTMLAttributes['class'];
|
|
191
202
|
tableCaption?: HTMLAttributes['class'];
|
|
192
|
-
tableEmpty?: HTMLAttributes['class'];
|
|
193
203
|
tableLoading?: HTMLAttributes['class'];
|
|
194
204
|
tableLoadingRow?: HTMLAttributes['class'];
|
|
195
205
|
tableLoadingCell?: HTMLAttributes['class'];
|
|
206
|
+
tableEmpty?: HTMLAttributes['class'];
|
|
207
|
+
tableEmptyText?: HTMLAttributes['class'];
|
|
208
|
+
tableEmptyIcon?: HTMLAttributes['class'];
|
|
196
209
|
}
|
|
197
210
|
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@una-ui/nuxt-edge",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.0-alpha.3-
|
|
4
|
+
"version": "1.0.0-alpha.3-29213868.0dd728a",
|
|
5
5
|
"description": "Nuxt module for @una-ui",
|
|
6
6
|
"author": "Phojie Rengel <phojrengel@gmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@headlessui/vue": "^1.7.23",
|
|
40
40
|
"@iconify/utils": "^2.3.0",
|
|
41
|
-
"@nuxt/kit": "^3.17.
|
|
41
|
+
"@nuxt/kit": "^3.17.7",
|
|
42
42
|
"@nuxtjs/color-mode": "^3.5.2",
|
|
43
43
|
"@tanstack/vue-table": "^8.21.3",
|
|
44
|
-
"@una-ui/extractor-vue-script": "npm:@una-ui/extractor-vue-script-edge@1.0.0-alpha.3-
|
|
45
|
-
"@una-ui/preset": "npm:@una-ui/preset-edge@1.0.0-alpha.3-
|
|
44
|
+
"@una-ui/extractor-vue-script": "npm:@una-ui/extractor-vue-script-edge@1.0.0-alpha.3-29213868.0dd728a",
|
|
45
|
+
"@una-ui/preset": "npm:@una-ui/preset-edge@1.0.0-alpha.3-29213868.0dd728a",
|
|
46
46
|
"@unocss/core": "^66.2.0",
|
|
47
47
|
"@unocss/nuxt": "^66.2.0",
|
|
48
48
|
"@unocss/preset-attributify": "^66.2.0",
|
|
@@ -55,20 +55,20 @@
|
|
|
55
55
|
"class-variance-authority": "^0.7.1",
|
|
56
56
|
"clsx": "^2.1.1",
|
|
57
57
|
"ohash": "^1.1.6",
|
|
58
|
-
"reka-ui": "^2.3.
|
|
58
|
+
"reka-ui": "^2.3.2",
|
|
59
59
|
"tailwind-merge": "^3.3.1",
|
|
60
60
|
"unocss": "^66.2.0",
|
|
61
61
|
"unocss-preset-animations": "^1.2.1",
|
|
62
62
|
"vaul-vue": "^0.4.1"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@iconify-json/lucide": "^1.2.
|
|
65
|
+
"@iconify-json/lucide": "^1.2.57",
|
|
66
66
|
"@iconify-json/radix-icons": "^1.2.2",
|
|
67
67
|
"@iconify-json/tabler": "^1.2.19",
|
|
68
68
|
"@nuxt/module-builder": "^1.0.1",
|
|
69
|
-
"@nuxt/schema": "^3.17.
|
|
70
|
-
"nuxt": "^3.17.
|
|
71
|
-
"zod": "^3.25.
|
|
69
|
+
"@nuxt/schema": "^3.17.7",
|
|
70
|
+
"nuxt": "^3.17.7",
|
|
71
|
+
"zod": "^3.25.76"
|
|
72
72
|
},
|
|
73
73
|
"publishConfig": {
|
|
74
74
|
"access": "public"
|