@una-ui/nuxt 0.55.0 → 0.55.2
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/drawer/Drawer.vue +42 -49
- package/dist/runtime/components/drawer/DrawerDescription.vue +5 -1
- package/dist/runtime/components/drawer/DrawerFooter.vue +5 -1
- package/dist/runtime/components/drawer/DrawerHeader.vue +5 -1
- package/dist/runtime/components/drawer/DrawerOverlay.vue +5 -1
- package/dist/runtime/components/drawer/DrawerTitle.vue +5 -1
- package/dist/runtime/components/elements/Link.vue +11 -0
- package/dist/runtime/types/drawer.d.ts +0 -1
- package/dist/runtime/types/link.d.ts +6 -0
- package/package.json +6 -6
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { reactivePick } from "@vueuse/core";
|
|
|
3
3
|
import { useForwardPropsEmits, VisuallyHidden } from "reka-ui";
|
|
4
4
|
import { DrawerRoot } from "vaul-vue";
|
|
5
5
|
import { computed } from "vue";
|
|
6
|
-
import {
|
|
6
|
+
import { randomId } from "../../utils";
|
|
7
7
|
import DrawerClose from "./DrawerClose.vue";
|
|
8
8
|
import DrawerContent from "./DrawerContent.vue";
|
|
9
9
|
import DrawerDescription from "./DrawerDescription.vue";
|
|
@@ -102,58 +102,51 @@ const forwarded = useForwardPropsEmits(rootProps, emits);
|
|
|
102
102
|
</VisuallyHidden>
|
|
103
103
|
|
|
104
104
|
<slot name="content">
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
105
|
+
<!-- Header -->
|
|
106
|
+
<DrawerHeader
|
|
107
|
+
v-if="!!$slots.header || (title !== DEFAULT_TITLE || !!$slots.title) || (description !== DEFAULT_DESCRIPTION || !!$slots.description)"
|
|
108
|
+
v-bind="_drawerHeader"
|
|
109
|
+
:una
|
|
110
110
|
>
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
:una
|
|
122
|
-
>
|
|
123
|
-
<slot name="title">
|
|
124
|
-
{{ title }}
|
|
125
|
-
</slot>
|
|
126
|
-
</DrawerTitle>
|
|
111
|
+
<slot name="header">
|
|
112
|
+
<DrawerTitle
|
|
113
|
+
v-if="title !== DEFAULT_TITLE || !!$slots.title"
|
|
114
|
+
v-bind="_drawerTitle"
|
|
115
|
+
:una
|
|
116
|
+
>
|
|
117
|
+
<slot name="title">
|
|
118
|
+
{{ title }}
|
|
119
|
+
</slot>
|
|
120
|
+
</DrawerTitle>
|
|
127
121
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
122
|
+
<DrawerDescription
|
|
123
|
+
v-if="description !== DEFAULT_DESCRIPTION || !!$slots.description"
|
|
124
|
+
v-bind="_drawerDescription"
|
|
125
|
+
:una
|
|
126
|
+
>
|
|
127
|
+
<slot name="description">
|
|
128
|
+
{{ description }}
|
|
129
|
+
</slot>
|
|
130
|
+
</DrawerDescription>
|
|
131
|
+
</slot>
|
|
132
|
+
</DrawerHeader>
|
|
139
133
|
|
|
140
|
-
|
|
141
|
-
|
|
134
|
+
<!-- Body -->
|
|
135
|
+
<slot name="body" />
|
|
142
136
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
</div>
|
|
137
|
+
<!-- Footer -->
|
|
138
|
+
<DrawerFooter
|
|
139
|
+
v-bind="_drawerFooter"
|
|
140
|
+
:una
|
|
141
|
+
>
|
|
142
|
+
<slot name="footer">
|
|
143
|
+
<DrawerClose
|
|
144
|
+
v-bind="_drawerClose"
|
|
145
|
+
>
|
|
146
|
+
<slot name="close" />
|
|
147
|
+
</DrawerClose>
|
|
148
|
+
</slot>
|
|
149
|
+
</DrawerFooter>
|
|
157
150
|
</slot>
|
|
158
151
|
</DrawerContent>
|
|
159
152
|
</slot>
|
|
@@ -18,7 +18,11 @@ const delegatedProps = computed(() => {
|
|
|
18
18
|
<DrawerDescription
|
|
19
19
|
data-slot="drawer-description"
|
|
20
20
|
v-bind="delegatedProps"
|
|
21
|
-
:class="cn(
|
|
21
|
+
:class="cn(
|
|
22
|
+
'drawer-description',
|
|
23
|
+
props.una?.drawerDescription,
|
|
24
|
+
props.class
|
|
25
|
+
)"
|
|
22
26
|
>
|
|
23
27
|
<slot />
|
|
24
28
|
</DrawerDescription>
|
|
@@ -19,6 +19,10 @@ const delegatedProps = computed(() => {
|
|
|
19
19
|
<DrawerOverlay
|
|
20
20
|
data-slot="drawer-overlay"
|
|
21
21
|
v-bind="delegatedProps"
|
|
22
|
-
:class="cn(
|
|
22
|
+
:class="cn(
|
|
23
|
+
'drawer-overlay',
|
|
24
|
+
props.una?.drawerOverlay,
|
|
25
|
+
props.class
|
|
26
|
+
)"
|
|
23
27
|
/>
|
|
24
28
|
</template>
|
|
@@ -18,7 +18,11 @@ const delegatedProps = computed(() => {
|
|
|
18
18
|
<DrawerTitle
|
|
19
19
|
data-slot="drawer-title"
|
|
20
20
|
v-bind="delegatedProps"
|
|
21
|
-
:class="cn(
|
|
21
|
+
:class="cn(
|
|
22
|
+
'drawer-title',
|
|
23
|
+
props.una?.drawerTitle,
|
|
24
|
+
props.class
|
|
25
|
+
)"
|
|
22
26
|
>
|
|
23
27
|
<slot />
|
|
24
28
|
</DrawerTitle>
|
|
@@ -12,6 +12,11 @@ export default defineComponent({
|
|
|
12
12
|
type: String,
|
|
13
13
|
default: void 0
|
|
14
14
|
},
|
|
15
|
+
/** Force the link to be active independent of the current route. */
|
|
16
|
+
active: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: void 0
|
|
19
|
+
},
|
|
15
20
|
exact: {
|
|
16
21
|
type: Boolean,
|
|
17
22
|
default: false
|
|
@@ -46,6 +51,12 @@ export default defineComponent({
|
|
|
46
51
|
setup(props) {
|
|
47
52
|
const route = useRoute();
|
|
48
53
|
function resolveLinkClass(route2, $route, { isActive, isExactActive }) {
|
|
54
|
+
if (props.active === true) {
|
|
55
|
+
return props.activeClass;
|
|
56
|
+
}
|
|
57
|
+
if (props.active === false) {
|
|
58
|
+
return props.inactiveClass;
|
|
59
|
+
}
|
|
49
60
|
if (props.exactQuery && !isEqual(route2.query, $route.query))
|
|
50
61
|
return props.inactiveClass;
|
|
51
62
|
if (props.exactHash && !isEqual(route2.hash, $route.hash))
|
|
@@ -80,7 +80,6 @@ export interface NDrawerUnaProps {
|
|
|
80
80
|
drawerDescription?: HTMLAttributes['class'];
|
|
81
81
|
drawerOverlay?: HTMLAttributes['class'];
|
|
82
82
|
drawerContent?: HTMLAttributes['class'];
|
|
83
|
-
drawerContentWrapper?: HTMLAttributes['class'];
|
|
84
83
|
drawerHandle?: HTMLAttributes['class'];
|
|
85
84
|
drawerHeader?: HTMLAttributes['class'];
|
|
86
85
|
drawerFooter?: HTMLAttributes['class'];
|
|
@@ -28,6 +28,12 @@ export interface NLinkProps extends NuxtLinkProps {
|
|
|
28
28
|
* @default false
|
|
29
29
|
*/
|
|
30
30
|
disabled?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Force the link to be active independent of the current route.
|
|
33
|
+
*
|
|
34
|
+
* @default false
|
|
35
|
+
*/
|
|
36
|
+
active?: boolean;
|
|
31
37
|
/**
|
|
32
38
|
* Active classes to apply when the link is inactive
|
|
33
39
|
*
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@una-ui/nuxt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.55.
|
|
4
|
+
"version": "0.55.2",
|
|
5
5
|
"description": "Nuxt module for @una-ui",
|
|
6
6
|
"author": "Phojie Rengel <phojrengel@gmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -58,17 +58,17 @@
|
|
|
58
58
|
"unocss": "^66.0.0",
|
|
59
59
|
"unocss-preset-animations": "^1.2.1",
|
|
60
60
|
"vaul-vue": "^0.4.1",
|
|
61
|
-
"@una-ui/extractor-vue-script": "^0.55.
|
|
62
|
-
"@una-ui/preset": "^0.55.
|
|
61
|
+
"@una-ui/extractor-vue-script": "^0.55.2",
|
|
62
|
+
"@una-ui/preset": "^0.55.2"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@iconify-json/lucide": "^1.2.
|
|
65
|
+
"@iconify-json/lucide": "^1.2.44",
|
|
66
66
|
"@iconify-json/radix-icons": "^1.2.2",
|
|
67
|
-
"@iconify-json/tabler": "^1.2.
|
|
67
|
+
"@iconify-json/tabler": "^1.2.18",
|
|
68
68
|
"@nuxt/module-builder": "^1.0.1",
|
|
69
69
|
"@nuxt/schema": "^3.17.3",
|
|
70
70
|
"nuxt": "^3.17.3",
|
|
71
|
-
"zod": "^3.
|
|
71
|
+
"zod": "^3.25.7"
|
|
72
72
|
},
|
|
73
73
|
"publishConfig": {
|
|
74
74
|
"access": "public"
|