@una-ui/nuxt 0.44.2 → 0.46.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.
- package/dist/module.d.mts +1 -0
- package/dist/module.d.ts +1 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +18 -155
- package/dist/runtime/components/data/table/Table.vue +2 -2
- package/dist/runtime/components/elements/Toggle.vue +3 -1
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuItem.vue +3 -1
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuSubTrigger.vue +3 -1
- package/dist/runtime/components/elements/pagination/PaginationListItem.vue +3 -1
- package/dist/runtime/components/overlays/Toaster.vue +3 -1
- package/dist/runtime/components/overlays/toast/ToastAction.vue +3 -1
- package/package.json +18 -7
package/dist/module.d.mts
CHANGED
package/dist/module.d.ts
CHANGED
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineNuxtModule, createResolver,
|
|
1
|
+
import { defineNuxtModule, createResolver, installModule, addComponentsDir, addImportsDir, addPlugin } from '@nuxt/kit';
|
|
2
2
|
import extendUnocssOptions from './una.config.mjs';
|
|
3
3
|
import '@iconify/utils/lib/loader/external-pkg';
|
|
4
4
|
import '@una-ui/extractor-vue-script';
|
|
@@ -8,7 +8,7 @@ import 'unocss';
|
|
|
8
8
|
import 'unocss-preset-animations';
|
|
9
9
|
|
|
10
10
|
const name = "@una-ui/nuxt";
|
|
11
|
-
const version = "0.
|
|
11
|
+
const version = "0.46.0";
|
|
12
12
|
|
|
13
13
|
const module = defineNuxtModule({
|
|
14
14
|
meta: {
|
|
@@ -28,6 +28,7 @@ const module = defineNuxtModule({
|
|
|
28
28
|
async setup(options, nuxt) {
|
|
29
29
|
const { resolve } = createResolver(import.meta.url);
|
|
30
30
|
nuxt.options.css.unshift("@una-ui/preset/una.css");
|
|
31
|
+
nuxt.options.alias["#una"] = resolve("./runtime");
|
|
31
32
|
nuxt.options.appConfig.una = {
|
|
32
33
|
...{
|
|
33
34
|
primary: "yellow",
|
|
@@ -37,164 +38,15 @@ const module = defineNuxtModule({
|
|
|
37
38
|
},
|
|
38
39
|
...nuxt.options.appConfig.una || {}
|
|
39
40
|
};
|
|
41
|
+
nuxt.options.app.rootAttrs = nuxt.options.app.rootAttrs || {};
|
|
42
|
+
nuxt.options.app.rootAttrs.class = [nuxt.options.app.rootAttrs.class, "isolate"].filter(Boolean).join(" ");
|
|
40
43
|
const runtimeDir = resolve("./runtime");
|
|
41
44
|
nuxt.options.build.transpile.push(runtimeDir);
|
|
42
45
|
nuxt.options.build.transpile.push("@headlessui/vue");
|
|
43
|
-
addComponentsDir({
|
|
44
|
-
path: resolve(runtimeDir, "components", "elements"),
|
|
45
|
-
prefix: options.prefix,
|
|
46
|
-
global: options.global,
|
|
47
|
-
watch: options.dev,
|
|
48
|
-
priority: 10
|
|
49
|
-
});
|
|
50
|
-
addComponentsDir({
|
|
51
|
-
path: resolve(runtimeDir, "components/elements", "tabs"),
|
|
52
|
-
prefix: options.prefix,
|
|
53
|
-
global: options.global,
|
|
54
|
-
watch: options.dev,
|
|
55
|
-
priority: 10
|
|
56
|
-
});
|
|
57
|
-
addComponentsDir({
|
|
58
|
-
path: resolve(runtimeDir, "components/elements", "card"),
|
|
59
|
-
prefix: options.prefix,
|
|
60
|
-
global: options.global,
|
|
61
|
-
watch: options.dev,
|
|
62
|
-
priority: 10
|
|
63
|
-
});
|
|
64
|
-
addComponentsDir({
|
|
65
|
-
path: resolve(runtimeDir, "components/elements", "dropdown-menu"),
|
|
66
|
-
prefix: options.prefix,
|
|
67
|
-
global: options.global,
|
|
68
|
-
watch: options.dev,
|
|
69
|
-
priority: 10
|
|
70
|
-
});
|
|
71
|
-
addComponentsDir({
|
|
72
|
-
path: resolve(runtimeDir, "components/elements", "popover"),
|
|
73
|
-
prefix: options.prefix,
|
|
74
|
-
global: options.global,
|
|
75
|
-
watch: options.dev,
|
|
76
|
-
priority: 10
|
|
77
|
-
});
|
|
78
|
-
addComponentsDir({
|
|
79
|
-
path: resolve(runtimeDir, "components/elements", "collapsible"),
|
|
80
|
-
prefix: options.prefix,
|
|
81
|
-
global: options.global,
|
|
82
|
-
watch: options.dev,
|
|
83
|
-
priority: 10
|
|
84
|
-
});
|
|
85
|
-
addComponentsDir({
|
|
86
|
-
path: resolve(runtimeDir, "components/elements", "tooltip"),
|
|
87
|
-
prefix: options.prefix,
|
|
88
|
-
global: options.global,
|
|
89
|
-
watch: options.dev,
|
|
90
|
-
priority: 10
|
|
91
|
-
});
|
|
92
|
-
addComponentsDir({
|
|
93
|
-
path: resolve(runtimeDir, "components/elements", "pagination"),
|
|
94
|
-
prefix: options.prefix,
|
|
95
|
-
global: options.global,
|
|
96
|
-
watch: options.dev,
|
|
97
|
-
priority: 10
|
|
98
|
-
});
|
|
99
|
-
addComponentsDir({
|
|
100
|
-
path: resolve(runtimeDir, "components/elements", "dialog"),
|
|
101
|
-
prefix: options.prefix,
|
|
102
|
-
global: options.global,
|
|
103
|
-
watch: options.dev,
|
|
104
|
-
priority: 10
|
|
105
|
-
});
|
|
106
|
-
addComponentsDir({
|
|
107
|
-
path: resolve(runtimeDir, "components", "forms"),
|
|
108
|
-
prefix: options.prefix,
|
|
109
|
-
global: options.global,
|
|
110
|
-
watch: options.dev,
|
|
111
|
-
priority: 10
|
|
112
|
-
});
|
|
113
|
-
addComponentsDir({
|
|
114
|
-
path: resolve(runtimeDir, "components/forms", "select"),
|
|
115
|
-
prefix: options.prefix,
|
|
116
|
-
global: options.global,
|
|
117
|
-
watch: options.dev,
|
|
118
|
-
priority: 10
|
|
119
|
-
});
|
|
120
|
-
addComponentsDir({
|
|
121
|
-
path: resolve(runtimeDir, "components/forms", "radio-group"),
|
|
122
|
-
prefix: options.prefix,
|
|
123
|
-
global: options.global,
|
|
124
|
-
watch: options.dev,
|
|
125
|
-
priority: 10
|
|
126
|
-
});
|
|
127
|
-
addComponentsDir({
|
|
128
|
-
path: resolve(runtimeDir, "components", "misc"),
|
|
129
|
-
prefix: options.prefix,
|
|
130
|
-
global: options.global,
|
|
131
|
-
watch: options.dev,
|
|
132
|
-
priority: 10
|
|
133
|
-
});
|
|
134
|
-
addComponentsDir({
|
|
135
|
-
path: resolve(runtimeDir, "components", "navigation"),
|
|
136
|
-
prefix: options.prefix,
|
|
137
|
-
global: options.global,
|
|
138
|
-
watch: options.dev,
|
|
139
|
-
priority: 10
|
|
140
|
-
});
|
|
141
|
-
addComponentsDir({
|
|
142
|
-
path: resolve(runtimeDir, "components/data", "table"),
|
|
143
|
-
prefix: options.prefix,
|
|
144
|
-
global: options.global,
|
|
145
|
-
watch: options.dev,
|
|
146
|
-
priority: 10
|
|
147
|
-
});
|
|
148
|
-
addComponentsDir({
|
|
149
|
-
path: resolve(runtimeDir, "components/navigation", "breadcrumb"),
|
|
150
|
-
prefix: options.prefix,
|
|
151
|
-
global: options.global,
|
|
152
|
-
watch: options.dev,
|
|
153
|
-
priority: 10
|
|
154
|
-
});
|
|
155
|
-
addComponentsDir({
|
|
156
|
-
path: resolve(runtimeDir, "components", "overlays"),
|
|
157
|
-
prefix: options.prefix,
|
|
158
|
-
global: options.global,
|
|
159
|
-
watch: options.dev,
|
|
160
|
-
priority: 10
|
|
161
|
-
});
|
|
162
|
-
addComponentsDir({
|
|
163
|
-
path: resolve(runtimeDir, "components/overlays", "toast"),
|
|
164
|
-
prefix: options.prefix,
|
|
165
|
-
global: options.global,
|
|
166
|
-
watch: options.dev,
|
|
167
|
-
priority: 10
|
|
168
|
-
});
|
|
169
|
-
addComponentsDir({
|
|
170
|
-
path: resolve(runtimeDir, "components", "sheet"),
|
|
171
|
-
prefix: options.prefix,
|
|
172
|
-
global: options.global,
|
|
173
|
-
watch: options.dev,
|
|
174
|
-
priority: 10
|
|
175
|
-
});
|
|
176
|
-
addComponentsDir({
|
|
177
|
-
path: resolve(runtimeDir, "components", "sidebar"),
|
|
178
|
-
prefix: options.prefix,
|
|
179
|
-
global: options.global,
|
|
180
|
-
watch: options.dev,
|
|
181
|
-
priority: 10
|
|
182
|
-
});
|
|
183
|
-
addComponentsDir({
|
|
184
|
-
path: resolve(runtimeDir, "components", "scroll-area"),
|
|
185
|
-
prefix: options.prefix,
|
|
186
|
-
global: options.global,
|
|
187
|
-
watch: options.dev,
|
|
188
|
-
priority: 10
|
|
189
|
-
});
|
|
190
|
-
if (options.themeable) {
|
|
191
|
-
addPlugin(resolve(runtimeDir, "plugins", "theme.client"));
|
|
192
|
-
addPlugin(resolve(runtimeDir, "plugins", "theme.server"));
|
|
193
|
-
}
|
|
194
|
-
addImportsDir(resolve(runtimeDir, "utils", "cn"));
|
|
195
46
|
await installModule("@unocss/nuxt", extendUnocssOptions(nuxt.options.unocss));
|
|
196
47
|
await installModule("@nuxtjs/color-mode", {
|
|
197
|
-
classSuffix: ""
|
|
48
|
+
classSuffix: "",
|
|
49
|
+
disableTransition: true
|
|
198
50
|
});
|
|
199
51
|
await installModule("@vueuse/nuxt");
|
|
200
52
|
await installModule("reka-ui/nuxt", {
|
|
@@ -208,7 +60,18 @@ const module = defineNuxtModule({
|
|
|
208
60
|
ErrorMessage: `${options.prefix}FormErrorMessage`
|
|
209
61
|
}
|
|
210
62
|
});
|
|
63
|
+
addComponentsDir({
|
|
64
|
+
path: resolve("./runtime/components"),
|
|
65
|
+
prefix: options.prefix,
|
|
66
|
+
pathPrefix: false,
|
|
67
|
+
priority: 10
|
|
68
|
+
});
|
|
211
69
|
addImportsDir(resolve(runtimeDir, "composables"));
|
|
70
|
+
if (options.themeable) {
|
|
71
|
+
addPlugin(resolve(runtimeDir, "plugins", "theme.client"));
|
|
72
|
+
addPlugin(resolve(runtimeDir, "plugins", "theme.server"));
|
|
73
|
+
}
|
|
74
|
+
addImportsDir(resolve(runtimeDir, "utils", "cn"));
|
|
212
75
|
}
|
|
213
76
|
});
|
|
214
77
|
|
|
@@ -7,6 +7,7 @@ import type {
|
|
|
7
7
|
GroupingState,
|
|
8
8
|
Header,
|
|
9
9
|
PaginationState,
|
|
10
|
+
RowSelectionState,
|
|
10
11
|
SortingState,
|
|
11
12
|
VisibilityState,
|
|
12
13
|
} from '@tanstack/vue-table'
|
|
@@ -47,7 +48,7 @@ const emit = defineEmits(['select', 'selectAll', 'expand'])
|
|
|
47
48
|
|
|
48
49
|
const slots = defineSlots()
|
|
49
50
|
|
|
50
|
-
const rowSelection = defineModel<
|
|
51
|
+
const rowSelection = defineModel<RowSelectionState>('rowSelection')
|
|
51
52
|
const sorting = defineModel<SortingState>('sorting')
|
|
52
53
|
const columnVisibility = defineModel<VisibilityState>('columnVisibility')
|
|
53
54
|
const columnFilters = defineModel<ColumnFiltersState>('columnFilters')
|
|
@@ -90,7 +91,6 @@ const columnsWithMisc = computed(() => {
|
|
|
90
91
|
'areaLabel': 'Select row',
|
|
91
92
|
}),
|
|
92
93
|
enableSorting: false,
|
|
93
|
-
enableHiding: false,
|
|
94
94
|
},
|
|
95
95
|
...props.columns,
|
|
96
96
|
]
|
|
@@ -35,6 +35,8 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|
|
35
35
|
:toggle-on
|
|
36
36
|
:as="Button"
|
|
37
37
|
>
|
|
38
|
-
<
|
|
38
|
+
<template v-for="(_, name) in $slots" #[name]="slotData">
|
|
39
|
+
<slot :name="name" v-bind="slotData" />
|
|
40
|
+
</template>
|
|
39
41
|
</Toggle>
|
|
40
42
|
</template>
|
|
@@ -43,7 +43,9 @@ const forwardedProps = useForwardProps(delegatedProps)
|
|
|
43
43
|
...forwardedProps.una,
|
|
44
44
|
}"
|
|
45
45
|
>
|
|
46
|
-
<
|
|
46
|
+
<template v-for="(_, name) in $slots" #[name]="slotData">
|
|
47
|
+
<slot :name="name" v-bind="slotData" />
|
|
48
|
+
</template>
|
|
47
49
|
|
|
48
50
|
<template
|
|
49
51
|
v-if="forwardedProps.shortcut"
|
|
@@ -41,7 +41,9 @@ const forwardedProps = useForwardProps(delegatedProps)
|
|
|
41
41
|
}"
|
|
42
42
|
trailing="dropdown-menu-sub-trigger-trailing-icon"
|
|
43
43
|
>
|
|
44
|
-
<
|
|
44
|
+
<template v-for="(_, name) in $slots" #[name]="slotData">
|
|
45
|
+
<slot :name="name" v-bind="slotData" />
|
|
46
|
+
</template>
|
|
45
47
|
</Button>
|
|
46
48
|
</dropdownmenusubtrigger>
|
|
47
49
|
</template>
|
|
@@ -38,7 +38,9 @@ const forwardedProps = useForwardProps(delegatedProps)
|
|
|
38
38
|
props.class,
|
|
39
39
|
)"
|
|
40
40
|
>
|
|
41
|
-
<
|
|
41
|
+
<template v-for="(_, name) in $slots" #[name]="slotData">
|
|
42
|
+
<slot :name="name" v-bind="slotData" />
|
|
43
|
+
</template>
|
|
42
44
|
</Button>
|
|
43
45
|
</PaginationListItem>
|
|
44
46
|
</template>
|
|
@@ -26,7 +26,9 @@ const { toasts } = useToast()
|
|
|
26
26
|
:key="t.id"
|
|
27
27
|
v-bind="{ ..._toast, ...$attrs, ...t }"
|
|
28
28
|
>
|
|
29
|
-
<
|
|
29
|
+
<template v-for="(_, name) in $slots" #[name]="slotData">
|
|
30
|
+
<slot :name="name" v-bind="slotData" />
|
|
31
|
+
</template>
|
|
30
32
|
</Toast>
|
|
31
33
|
|
|
32
34
|
<ToastViewport v-bind="_toastViewport" />
|
|
@@ -31,7 +31,9 @@ const delegatedProps = computed(() => {
|
|
|
31
31
|
:id="randomId('toast-action')"
|
|
32
32
|
:class="cn('toast-action', props.class)"
|
|
33
33
|
>
|
|
34
|
-
<
|
|
34
|
+
<template v-for="(_, name) in $slots" #[name]="slotData">
|
|
35
|
+
<slot :name="name" v-bind="slotData" />
|
|
36
|
+
</template>
|
|
35
37
|
</Button>
|
|
36
38
|
</ToastAction>
|
|
37
39
|
</template>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@una-ui/nuxt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.46.0",
|
|
5
5
|
"description": "Nuxt module for @una-ui",
|
|
6
6
|
"author": "Phojie Rengel <phojrengel@gmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -13,13 +13,24 @@
|
|
|
13
13
|
},
|
|
14
14
|
"exports": {
|
|
15
15
|
".": {
|
|
16
|
+
"types": "./dist/types.d.ts",
|
|
16
17
|
"import": "./dist/module.mjs",
|
|
17
18
|
"require": "./dist/module.cjs"
|
|
18
19
|
},
|
|
19
20
|
"./una.config": {
|
|
20
21
|
"import": "./dist/una.config.mjs"
|
|
22
|
+
},
|
|
23
|
+
"./runtime/*": "./dist/runtime/*",
|
|
24
|
+
"./components/*": "./dist/runtime/components/*",
|
|
25
|
+
"./composables/*": "./dist/runtime/composables/*",
|
|
26
|
+
"./utils/*": {
|
|
27
|
+
"types": "./dist/runtime/utils/*.d.ts",
|
|
28
|
+
"import": "./dist/runtime/utils/*.js"
|
|
21
29
|
}
|
|
22
30
|
},
|
|
31
|
+
"imports": {
|
|
32
|
+
"#build/una/*": "./.nuxt/una/*.ts"
|
|
33
|
+
},
|
|
23
34
|
"main": "./dist/module.cjs",
|
|
24
35
|
"types": "./dist/types.d.ts",
|
|
25
36
|
"files": [
|
|
@@ -28,7 +39,7 @@
|
|
|
28
39
|
"dependencies": {
|
|
29
40
|
"@headlessui/vue": "^1.7.23",
|
|
30
41
|
"@iconify/utils": "^2.3.0",
|
|
31
|
-
"@nuxt/kit": "^3.16.
|
|
42
|
+
"@nuxt/kit": "^3.16.1",
|
|
32
43
|
"@nuxtjs/color-mode": "^3.5.2",
|
|
33
44
|
"@tanstack/vue-table": "^8.21.2",
|
|
34
45
|
"@unocss/core": "^66.0.0",
|
|
@@ -43,21 +54,21 @@
|
|
|
43
54
|
"class-variance-authority": "^0.7.1",
|
|
44
55
|
"clsx": "^2.1.1",
|
|
45
56
|
"ohash": "^1.1.6",
|
|
46
|
-
"reka-ui": "^2.1.
|
|
57
|
+
"reka-ui": "^2.1.1",
|
|
47
58
|
"tailwind-merge": "^3.0.2",
|
|
48
59
|
"typescript": "5.6.3",
|
|
49
60
|
"unocss": "^66.0.0",
|
|
50
61
|
"unocss-preset-animations": "^1.1.1",
|
|
51
|
-
"@una-ui/extractor-vue-script": "^0.
|
|
52
|
-
"@una-ui/preset": "^0.
|
|
62
|
+
"@una-ui/extractor-vue-script": "^0.46.0",
|
|
63
|
+
"@una-ui/preset": "^0.46.0"
|
|
53
64
|
},
|
|
54
65
|
"devDependencies": {
|
|
55
66
|
"@iconify-json/lucide": "^1.2.32",
|
|
56
67
|
"@iconify-json/radix-icons": "^1.2.2",
|
|
57
68
|
"@iconify-json/tabler": "^1.2.17",
|
|
58
69
|
"@nuxt/module-builder": "^0.8.4",
|
|
59
|
-
"@nuxt/schema": "^3.16.
|
|
60
|
-
"nuxt": "^3.16.
|
|
70
|
+
"@nuxt/schema": "^3.16.1",
|
|
71
|
+
"nuxt": "^3.16.1",
|
|
61
72
|
"zod": "^3.24.2"
|
|
62
73
|
},
|
|
63
74
|
"publishConfig": {
|