@una-ui/nuxt 0.54.4 → 0.55.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.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@una-ui/nuxt",
3
3
  "configKey": "una",
4
- "version": "0.54.4",
4
+ "version": "0.55.0",
5
5
  "compatibility": {
6
6
  "nuxt": ">=3.0.0"
7
7
  },
package/dist/module.mjs CHANGED
@@ -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.54.4";
11
+ const version = "0.55.0";
12
12
 
13
13
  const module = defineNuxtModule({
14
14
  meta: {
@@ -0,0 +1,161 @@
1
+ <script setup>
2
+ import { reactivePick } from "@vueuse/core";
3
+ import { useForwardPropsEmits, VisuallyHidden } from "reka-ui";
4
+ import { DrawerRoot } from "vaul-vue";
5
+ import { computed } from "vue";
6
+ import { cn, randomId } from "../../utils";
7
+ import DrawerClose from "./DrawerClose.vue";
8
+ import DrawerContent from "./DrawerContent.vue";
9
+ import DrawerDescription from "./DrawerDescription.vue";
10
+ import DrawerFooter from "./DrawerFooter.vue";
11
+ import DrawerHeader from "./DrawerHeader.vue";
12
+ import DrawerTitle from "./DrawerTitle.vue";
13
+ import DrawerTrigger from "./DrawerTrigger.vue";
14
+ defineOptions({
15
+ inheritAttrs: false
16
+ });
17
+ const props = defineProps({
18
+ title: { type: String, required: false },
19
+ description: { type: String, required: false },
20
+ _drawerTitle: { type: Object, required: false },
21
+ _drawerDescription: { type: Object, required: false },
22
+ _drawerContent: { type: Object, required: false },
23
+ _drawerTrigger: { type: Object, required: false },
24
+ _drawerHeader: { type: Object, required: false },
25
+ _drawerFooter: { type: Object, required: false },
26
+ fadeFromIndex: { type: Number, required: false },
27
+ una: { type: Object, required: false },
28
+ activeSnapPoint: { type: [Number, String, null], required: false },
29
+ closeThreshold: { type: Number, required: false },
30
+ shouldScaleBackground: { type: Boolean, required: false, default: true },
31
+ setBackgroundColorOnScale: { type: Boolean, required: false },
32
+ scrollLockTimeout: { type: Number, required: false },
33
+ fixed: { type: Boolean, required: false },
34
+ dismissible: { type: Boolean, required: false },
35
+ modal: { type: Boolean, required: false },
36
+ open: { type: Boolean, required: false },
37
+ defaultOpen: { type: Boolean, required: false },
38
+ nested: { type: Boolean, required: false },
39
+ direction: { type: String, required: false },
40
+ noBodyStyles: { type: Boolean, required: false },
41
+ handleOnly: { type: Boolean, required: false },
42
+ preventScrollRestoration: { type: Boolean, required: false },
43
+ snapPoints: { type: Array, required: false },
44
+ showClose: { type: Boolean, required: false },
45
+ overlay: { type: Boolean, required: false },
46
+ _drawerClose: { type: Object, required: false },
47
+ _drawerOverlay: { type: Object, required: false }
48
+ });
49
+ const emits = defineEmits(["drag", "release", "close", "update:open", "update:activeSnapPoint", "animationEnd"]);
50
+ const DEFAULT_TITLE = randomId("drawer-title");
51
+ const DEFAULT_DESCRIPTION = randomId("drawer-description");
52
+ const title = computed(() => props.title ?? DEFAULT_TITLE);
53
+ const description = computed(() => props.description ?? DEFAULT_DESCRIPTION);
54
+ const rootProps = reactivePick(props, [
55
+ "activeSnapPoint",
56
+ "closeThreshold",
57
+ "shouldScaleBackground",
58
+ "setBackgroundColorOnScale",
59
+ "scrollLockTimeout",
60
+ "fixed",
61
+ "dismissible",
62
+ "modal",
63
+ "open",
64
+ "defaultOpen",
65
+ "nested",
66
+ "direction",
67
+ "noBodyStyles",
68
+ "handleOnly",
69
+ "preventScrollRestoration",
70
+ "snapPoints"
71
+ ]);
72
+ const forwarded = useForwardPropsEmits(rootProps, emits);
73
+ </script>
74
+
75
+ <template>
76
+ <DrawerRoot
77
+ v-slot="{ open }"
78
+ data-slot="drawer"
79
+ v-bind="forwarded"
80
+ >
81
+ <slot>
82
+ <DrawerTrigger
83
+ v-bind="_drawerTrigger"
84
+ as-child
85
+ >
86
+ <slot name="trigger" :open />
87
+ </DrawerTrigger>
88
+
89
+ <DrawerContent
90
+ v-bind="_drawerContent"
91
+ :_drawer-overlay
92
+ :una
93
+ >
94
+ <VisuallyHidden v-if="title === DEFAULT_TITLE || !!$slots.title || (description === DEFAULT_DESCRIPTION || !!$slots.description)">
95
+ <DrawerTitle v-if="title === DEFAULT_TITLE || !!$slots.title">
96
+ {{ title }}
97
+ </DrawerTitle>
98
+
99
+ <DrawerDescription v-if="description === DEFAULT_DESCRIPTION || !!$slots.description">
100
+ {{ description }}
101
+ </DrawerDescription>
102
+ </VisuallyHidden>
103
+
104
+ <slot name="content">
105
+ <div
106
+ :class="cn(
107
+ 'content-wrapper',
108
+ una?.drawerContentWrapper
109
+ )"
110
+ >
111
+ <!-- Header -->
112
+ <DrawerHeader
113
+ v-if="!!$slots.header || (title !== DEFAULT_TITLE || !!$slots.title) || (description !== DEFAULT_DESCRIPTION || !!$slots.description)"
114
+ v-bind="_drawerHeader"
115
+ :una
116
+ >
117
+ <slot name="header">
118
+ <DrawerTitle
119
+ v-if="title !== DEFAULT_TITLE || !!$slots.title"
120
+ v-bind="_drawerTitle"
121
+ :una
122
+ >
123
+ <slot name="title">
124
+ {{ title }}
125
+ </slot>
126
+ </DrawerTitle>
127
+
128
+ <DrawerDescription
129
+ v-if="description !== DEFAULT_DESCRIPTION || !!$slots.description"
130
+ v-bind="_drawerDescription"
131
+ :una
132
+ >
133
+ <slot name="description">
134
+ {{ description }}
135
+ </slot>
136
+ </DrawerDescription>
137
+ </slot>
138
+ </DrawerHeader>
139
+
140
+ <!-- Body -->
141
+ <slot name="body" />
142
+
143
+ <!-- Footer -->
144
+ <DrawerFooter
145
+ v-bind="_drawerFooter"
146
+ :una
147
+ >
148
+ <slot name="footer">
149
+ <DrawerClose
150
+ v-bind="_drawerClose"
151
+ >
152
+ <slot name="close" />
153
+ </DrawerClose>
154
+ </slot>
155
+ </DrawerFooter>
156
+ </div>
157
+ </slot>
158
+ </DrawerContent>
159
+ </slot>
160
+ </DrawerRoot>
161
+ </template>
@@ -0,0 +1,47 @@
1
+ import type { NDrawerProps } from '../../types/index.js';
2
+ declare var __VLS_6: {}, __VLS_11: {
3
+ open: boolean;
4
+ }, __VLS_26: {}, __VLS_31: {}, __VLS_36: {}, __VLS_41: {}, __VLS_43: {}, __VLS_48: {}, __VLS_53: {};
5
+ type __VLS_Slots = {} & {
6
+ default?: (props: typeof __VLS_6) => any;
7
+ } & {
8
+ trigger?: (props: typeof __VLS_11) => any;
9
+ } & {
10
+ content?: (props: typeof __VLS_26) => any;
11
+ } & {
12
+ header?: (props: typeof __VLS_31) => any;
13
+ } & {
14
+ title?: (props: typeof __VLS_36) => any;
15
+ } & {
16
+ description?: (props: typeof __VLS_41) => any;
17
+ } & {
18
+ body?: (props: typeof __VLS_43) => any;
19
+ } & {
20
+ footer?: (props: typeof __VLS_48) => any;
21
+ } & {
22
+ close?: (props: typeof __VLS_53) => any;
23
+ };
24
+ declare const __VLS_component: import("vue").DefineComponent<NDrawerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
25
+ close: () => any;
26
+ drag: (percentageDragged: number) => any;
27
+ "update:open": (open: boolean) => any;
28
+ animationEnd: (open: boolean) => any;
29
+ release: (open: boolean) => any;
30
+ "update:activeSnapPoint": (val: string | number) => any;
31
+ }, string, import("vue").PublicProps, Readonly<NDrawerProps> & Readonly<{
32
+ onClose?: (() => any) | undefined;
33
+ onDrag?: ((percentageDragged: number) => any) | undefined;
34
+ "onUpdate:open"?: ((open: boolean) => any) | undefined;
35
+ onAnimationEnd?: ((open: boolean) => any) | undefined;
36
+ onRelease?: ((open: boolean) => any) | undefined;
37
+ "onUpdate:activeSnapPoint"?: ((val: string | number) => any) | undefined;
38
+ }>, {
39
+ shouldScaleBackground: boolean;
40
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
41
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
42
+ export default _default;
43
+ type __VLS_WithSlots<T, S> = T & {
44
+ new (): {
45
+ $slots: S;
46
+ };
47
+ };
@@ -0,0 +1,43 @@
1
+ <script setup>
2
+ import { DrawerClose } from "vaul-vue";
3
+ const props = defineProps({
4
+ asChild: { type: Boolean, required: false },
5
+ as: { type: null, required: false },
6
+ type: { type: String, required: false },
7
+ loadingPlacement: { type: String, required: false },
8
+ icon: { type: Boolean, required: false },
9
+ disabled: { type: Boolean, required: false },
10
+ reverse: { type: Boolean, required: false },
11
+ loading: { type: Boolean, required: false },
12
+ block: { type: Boolean, required: false },
13
+ to: { type: null, required: false },
14
+ label: { type: String, required: false },
15
+ btn: { type: String, required: false },
16
+ leading: { type: String, required: false },
17
+ trailing: { type: String, required: false },
18
+ size: { type: String, required: false },
19
+ una: { type: Object, required: false },
20
+ square: { type: null, required: false },
21
+ rounded: { type: null, required: false },
22
+ class: { type: null, required: false },
23
+ breadcrumbActive: { type: String, required: false },
24
+ breadcrumbInactive: { type: String, required: false },
25
+ paginationSelected: { type: String, required: false },
26
+ paginationUnselected: { type: String, required: false },
27
+ dropdownMenu: { type: String, required: false },
28
+ toggleOn: { type: String, required: false },
29
+ toggleOff: { type: String, required: false },
30
+ navigationMenu: { type: String, required: false },
31
+ navigationMenuLink: { type: String, required: false },
32
+ ariaLabel: { type: String, required: false }
33
+ });
34
+ </script>
35
+
36
+ <template>
37
+ <DrawerClose
38
+ data-slot="drawer-close"
39
+ v-bind="props"
40
+ >
41
+ <slot />
42
+ </DrawerClose>
43
+ </template>
@@ -0,0 +1,13 @@
1
+ import type { NDrawerCloseProps } from '../../types/index.js';
2
+ declare var __VLS_6: {};
3
+ type __VLS_Slots = {} & {
4
+ default?: (props: typeof __VLS_6) => any;
5
+ };
6
+ declare const __VLS_component: import("vue").DefineComponent<NDrawerCloseProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NDrawerCloseProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
8
+ export default _default;
9
+ type __VLS_WithSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };
@@ -0,0 +1,58 @@
1
+ <script setup>
2
+ import { reactiveOmit } from "@vueuse/core";
3
+ import { useForwardPropsEmits } from "reka-ui";
4
+ import { DrawerContent, DrawerPortal } from "vaul-vue";
5
+ import { cn } from "../../utils";
6
+ import DrawerOverlay from "./DrawerOverlay.vue";
7
+ defineOptions({
8
+ inheritAttrs: false
9
+ });
10
+ const props = defineProps({
11
+ showClose: { type: Boolean, required: false },
12
+ overlay: { type: Boolean, required: false, default: true },
13
+ _drawerClose: { type: Object, required: false },
14
+ _drawerOverlay: { type: Object, required: false },
15
+ una: { type: Object, required: false },
16
+ forceMount: { type: Boolean, required: false },
17
+ trapFocus: { type: Boolean, required: false },
18
+ disableOutsidePointerEvents: { type: Boolean, required: false },
19
+ asChild: { type: Boolean, required: false },
20
+ as: { type: null, required: false },
21
+ class: { type: null, required: false }
22
+ });
23
+ const emits = defineEmits(["escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside", "openAutoFocus", "closeAutoFocus"]);
24
+ const delegatedProps = reactiveOmit(props, ["class", "una", "_drawerOverlay", "_drawerClose"]);
25
+ const forwarded = useForwardPropsEmits(delegatedProps, emits);
26
+ </script>
27
+
28
+ <template>
29
+ <DrawerPortal>
30
+ <DrawerOverlay
31
+ v-if="overlay"
32
+ v-bind="_drawerOverlay"
33
+ :una
34
+ />
35
+ <DrawerContent
36
+ data-slot="drawer-content"
37
+ v-bind="{ ...forwarded, ...$attrs }"
38
+ :class="cn(
39
+ 'drawer-content',
40
+ 'drawer-content-top',
41
+ 'drawer-content-bottom',
42
+ 'drawer-content-right',
43
+ 'drawer-content-left',
44
+ 'group',
45
+ props.una?.drawerContent,
46
+ props.class
47
+ )"
48
+ >
49
+ <div
50
+ :class="cn(
51
+ 'drawer-handle',
52
+ props.una?.drawerHandle
53
+ )"
54
+ />
55
+ <slot />
56
+ </DrawerContent>
57
+ </DrawerPortal>
58
+ </template>
@@ -0,0 +1,45 @@
1
+ import type { NDrawerContentProps } from '../../types/index.js';
2
+ declare var __VLS_13: {};
3
+ type __VLS_Slots = {} & {
4
+ default?: (props: typeof __VLS_13) => any;
5
+ };
6
+ declare const __VLS_component: import("vue").DefineComponent<NDrawerContentProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
+ escapeKeyDown: (event: KeyboardEvent) => any;
8
+ pointerDownOutside: (event: CustomEvent<{
9
+ originalEvent: PointerEvent;
10
+ }>) => any;
11
+ focusOutside: (event: CustomEvent<{
12
+ originalEvent: FocusEvent;
13
+ }>) => any;
14
+ interactOutside: (event: CustomEvent<{
15
+ originalEvent: PointerEvent;
16
+ }> | CustomEvent<{
17
+ originalEvent: FocusEvent;
18
+ }>) => any;
19
+ openAutoFocus: (event: Event) => any;
20
+ closeAutoFocus: (event: Event) => any;
21
+ }, string, import("vue").PublicProps, Readonly<NDrawerContentProps> & Readonly<{
22
+ onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
23
+ onPointerDownOutside?: ((event: CustomEvent<{
24
+ originalEvent: PointerEvent;
25
+ }>) => any) | undefined;
26
+ onFocusOutside?: ((event: CustomEvent<{
27
+ originalEvent: FocusEvent;
28
+ }>) => any) | undefined;
29
+ onInteractOutside?: ((event: CustomEvent<{
30
+ originalEvent: PointerEvent;
31
+ }> | CustomEvent<{
32
+ originalEvent: FocusEvent;
33
+ }>) => any) | undefined;
34
+ onOpenAutoFocus?: ((event: Event) => any) | undefined;
35
+ onCloseAutoFocus?: ((event: Event) => any) | undefined;
36
+ }>, {
37
+ overlay: boolean;
38
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
39
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
40
+ export default _default;
41
+ type __VLS_WithSlots<T, S> = T & {
42
+ new (): {
43
+ $slots: S;
44
+ };
45
+ };
@@ -0,0 +1,25 @@
1
+ <script setup>
2
+ import { DrawerDescription } from "vaul-vue";
3
+ import { computed } from "vue";
4
+ import { cn } from "../../utils";
5
+ const props = defineProps({
6
+ una: { type: Object, required: false },
7
+ asChild: { type: Boolean, required: false },
8
+ as: { type: null, required: false },
9
+ class: { type: null, required: false }
10
+ });
11
+ const delegatedProps = computed(() => {
12
+ const { class: _, ...delegated } = props;
13
+ return delegated;
14
+ });
15
+ </script>
16
+
17
+ <template>
18
+ <DrawerDescription
19
+ data-slot="drawer-description"
20
+ v-bind="delegatedProps"
21
+ :class="cn('drawer-description', props.class)"
22
+ >
23
+ <slot />
24
+ </DrawerDescription>
25
+ </template>
@@ -0,0 +1,13 @@
1
+ import type { NDrawerDescriptionProps } from '../../types/index.js';
2
+ declare var __VLS_6: {};
3
+ type __VLS_Slots = {} & {
4
+ default?: (props: typeof __VLS_6) => any;
5
+ };
6
+ declare const __VLS_component: import("vue").DefineComponent<NDrawerDescriptionProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NDrawerDescriptionProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
8
+ export default _default;
9
+ type __VLS_WithSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };
@@ -0,0 +1,16 @@
1
+ <script setup>
2
+ import { cn } from "../../utils";
3
+ const props = defineProps({
4
+ una: { type: Object, required: false },
5
+ class: { type: null, required: false }
6
+ });
7
+ </script>
8
+
9
+ <template>
10
+ <div
11
+ data-slot="drawer-footer"
12
+ :class="cn('drawer-footer', props.class)"
13
+ >
14
+ <slot />
15
+ </div>
16
+ </template>
@@ -0,0 +1,13 @@
1
+ import type { NDrawerFooterProps } from '../../types/index.js';
2
+ declare var __VLS_1: {};
3
+ type __VLS_Slots = {} & {
4
+ default?: (props: typeof __VLS_1) => any;
5
+ };
6
+ declare const __VLS_component: import("vue").DefineComponent<NDrawerFooterProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NDrawerFooterProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
8
+ export default _default;
9
+ type __VLS_WithSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };
@@ -0,0 +1,16 @@
1
+ <script setup>
2
+ import { cn } from "../../utils";
3
+ const props = defineProps({
4
+ una: { type: Object, required: false },
5
+ class: { type: null, required: false }
6
+ });
7
+ </script>
8
+
9
+ <template>
10
+ <div
11
+ data-slot="drawer-header"
12
+ :class="cn('drawer-header', props.class)"
13
+ >
14
+ <slot />
15
+ </div>
16
+ </template>
@@ -0,0 +1,13 @@
1
+ import type { NDrawerHeaderProps } from '../../types/index.js';
2
+ declare var __VLS_1: {};
3
+ type __VLS_Slots = {} & {
4
+ default?: (props: typeof __VLS_1) => any;
5
+ };
6
+ declare const __VLS_component: import("vue").DefineComponent<NDrawerHeaderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NDrawerHeaderProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
8
+ export default _default;
9
+ type __VLS_WithSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };
@@ -0,0 +1,24 @@
1
+ <script setup>
2
+ import { DrawerOverlay } from "vaul-vue";
3
+ import { computed } from "vue";
4
+ import { cn } from "../../utils";
5
+ const props = defineProps({
6
+ una: { type: Object, required: false },
7
+ class: { type: null, required: false },
8
+ forceMount: { type: Boolean, required: false },
9
+ asChild: { type: Boolean, required: false },
10
+ as: { type: null, required: false }
11
+ });
12
+ const delegatedProps = computed(() => {
13
+ const { class: _, ...delegated } = props;
14
+ return delegated;
15
+ });
16
+ </script>
17
+
18
+ <template>
19
+ <DrawerOverlay
20
+ data-slot="drawer-overlay"
21
+ v-bind="delegatedProps"
22
+ :class="cn('drawer-overlay', props.class)"
23
+ />
24
+ </template>
@@ -0,0 +1,3 @@
1
+ import type { NDrawerOverlayProps } from '../../types/index.js';
2
+ declare const _default: import("vue").DefineComponent<NDrawerOverlayProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NDrawerOverlayProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
3
+ export default _default;
@@ -0,0 +1,25 @@
1
+ <script setup>
2
+ import { DrawerTitle } from "vaul-vue";
3
+ import { computed } from "vue";
4
+ import { cn } from "../../utils";
5
+ const props = defineProps({
6
+ una: { type: Object, required: false },
7
+ asChild: { type: Boolean, required: false },
8
+ as: { type: null, required: false },
9
+ class: { type: null, required: false }
10
+ });
11
+ const delegatedProps = computed(() => {
12
+ const { class: _, ...delegated } = props;
13
+ return delegated;
14
+ });
15
+ </script>
16
+
17
+ <template>
18
+ <DrawerTitle
19
+ data-slot="drawer-title"
20
+ v-bind="delegatedProps"
21
+ :class="cn('drawer-title', props.class)"
22
+ >
23
+ <slot />
24
+ </DrawerTitle>
25
+ </template>
@@ -0,0 +1,13 @@
1
+ import type { NDrawerTitleProps } from '../../types/index.js';
2
+ declare var __VLS_6: {};
3
+ type __VLS_Slots = {} & {
4
+ default?: (props: typeof __VLS_6) => any;
5
+ };
6
+ declare const __VLS_component: import("vue").DefineComponent<NDrawerTitleProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NDrawerTitleProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
8
+ export default _default;
9
+ type __VLS_WithSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };
@@ -0,0 +1,16 @@
1
+ <script setup>
2
+ import { DrawerTrigger } from "vaul-vue";
3
+ const props = defineProps({
4
+ asChild: { type: Boolean, required: false },
5
+ as: { type: null, required: false }
6
+ });
7
+ </script>
8
+
9
+ <template>
10
+ <DrawerTrigger
11
+ data-slot="drawer-trigger"
12
+ v-bind="props"
13
+ >
14
+ <slot />
15
+ </DrawerTrigger>
16
+ </template>
@@ -0,0 +1,13 @@
1
+ import type { NDrawerTriggerProps } from '../../types/index.js';
2
+ declare var __VLS_6: {};
3
+ type __VLS_Slots = {} & {
4
+ default?: (props: typeof __VLS_6) => any;
5
+ };
6
+ declare const __VLS_component: import("vue").DefineComponent<NDrawerTriggerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NDrawerTriggerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
8
+ export default _default;
9
+ type __VLS_WithSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };
@@ -0,0 +1,91 @@
1
+ import type { DialogContentProps, DialogOverlayProps } from 'reka-ui';
2
+ import type { DrawerCloseProps, DrawerDescriptionProps, DrawerRootProps, DrawerTitleProps, DrawerTriggerProps } from 'vaul-vue';
3
+ import type { HTMLAttributes } from 'vue';
4
+ import type { NButtonProps } from './button.js';
5
+ export interface NDrawerProps extends Omit<DrawerRootProps, 'fadeFromIndex'>, Pick<NDrawerContentProps, 'showClose' | 'overlay' | '_drawerClose' | '_drawerOverlay'> {
6
+ /**
7
+ * The title of the dialog.
8
+ */
9
+ title?: string;
10
+ /**
11
+ * The description of the dialog.
12
+ */
13
+ description?: string;
14
+ _drawerTitle?: NDrawerTitleProps;
15
+ _drawerDescription?: NDrawerDescriptionProps;
16
+ _drawerContent?: NDrawerContentProps;
17
+ _drawerTrigger?: NDrawerTriggerProps;
18
+ _drawerHeader?: NDrawerHeaderProps;
19
+ _drawerFooter?: NDrawerFooterProps;
20
+ /**
21
+ * The index of the fade from the drawer.
22
+ */
23
+ fadeFromIndex?: number;
24
+ /**
25
+ * `UnaUI` preset configuration
26
+ *
27
+ * @see https://github.com/una-ui/una-ui/blob/main/packages/preset/src/_shortcuts/drawer.ts
28
+ */
29
+ una?: NDrawerUnaProps;
30
+ }
31
+ export interface NDrawerTitleProps extends DrawerTitleProps, BaseExtensions {
32
+ una?: Pick<NDrawerUnaProps, 'drawerTitle'>;
33
+ }
34
+ export interface NDrawerDescriptionProps extends DrawerDescriptionProps, BaseExtensions {
35
+ una?: Pick<NDrawerUnaProps, 'drawerDescription'>;
36
+ }
37
+ export interface NDrawerContentProps extends DialogContentProps, BaseExtensions {
38
+ /**
39
+ * Show close button.
40
+ *
41
+ * @default true
42
+ */
43
+ showClose?: boolean;
44
+ /**
45
+ * Show overlay.
46
+ *
47
+ * @default true
48
+ */
49
+ overlay?: boolean;
50
+ /**
51
+ * The close button props.
52
+ */
53
+ _drawerClose?: NDrawerCloseProps;
54
+ /**
55
+ * The overlay props.
56
+ */
57
+ _drawerOverlay?: NDrawerOverlayProps;
58
+ /**
59
+ * `UnaUI` preset configuration
60
+ *
61
+ * @see https://github.com/una-ui/una-ui/blob/main/packages/preset/src/_shortcuts/drawer.ts
62
+ */
63
+ una?: Pick<NDrawerUnaProps, 'drawerContent' | 'drawerOverlay' | 'drawerHandle'>;
64
+ }
65
+ export interface NDrawerCloseProps extends DrawerCloseProps, NButtonProps {
66
+ }
67
+ export interface NDrawerOverlayProps extends BaseExtensions, DialogOverlayProps {
68
+ una?: Pick<NDrawerUnaProps, 'drawerOverlay'>;
69
+ }
70
+ export interface NDrawerTriggerProps extends DrawerTriggerProps {
71
+ }
72
+ export interface NDrawerHeaderProps extends BaseExtensions {
73
+ una?: Pick<NDrawerUnaProps, 'drawerHeader'>;
74
+ }
75
+ export interface NDrawerFooterProps extends BaseExtensions {
76
+ una?: Pick<NDrawerUnaProps, 'drawerFooter'>;
77
+ }
78
+ export interface NDrawerUnaProps {
79
+ drawerTitle?: HTMLAttributes['class'];
80
+ drawerDescription?: HTMLAttributes['class'];
81
+ drawerOverlay?: HTMLAttributes['class'];
82
+ drawerContent?: HTMLAttributes['class'];
83
+ drawerContentWrapper?: HTMLAttributes['class'];
84
+ drawerHandle?: HTMLAttributes['class'];
85
+ drawerHeader?: HTMLAttributes['class'];
86
+ drawerFooter?: HTMLAttributes['class'];
87
+ }
88
+ interface BaseExtensions {
89
+ class?: HTMLAttributes['class'];
90
+ }
91
+ export {};
File without changes
@@ -12,6 +12,7 @@ export * from './checkbox.js';
12
12
  export * from './collapsible.js';
13
13
  export * from './combobox.js';
14
14
  export * from './dialog.js';
15
+ export * from './drawer.js';
15
16
  export * from './dropdown-menu.js';
16
17
  export * from './form.js';
17
18
  export * from './form-group.js';
@@ -12,6 +12,7 @@ export * from "./checkbox.js";
12
12
  export * from "./collapsible.js";
13
13
  export * from "./combobox.js";
14
14
  export * from "./dialog.js";
15
+ export * from "./drawer.js";
15
16
  export * from "./dropdown-menu.js";
16
17
  export * from "./form.js";
17
18
  export * from "./form-group.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@una-ui/nuxt",
3
3
  "type": "module",
4
- "version": "0.54.4",
4
+ "version": "0.55.0",
5
5
  "description": "Nuxt module for @una-ui",
6
6
  "author": "Phojie Rengel <phojrengel@gmail.com>",
7
7
  "license": "MIT",
@@ -11,6 +11,9 @@
11
11
  "type": "git",
12
12
  "url": "git+https://github.com/una-ui/una-ui.git"
13
13
  },
14
+ "imports": {
15
+ "#build/una/*": "./.nuxt/una/*.ts"
16
+ },
14
17
  "exports": {
15
18
  ".": {
16
19
  "types": "./dist/types.d.mts",
@@ -27,9 +30,6 @@
27
30
  "import": "./dist/runtime/utils/*.js"
28
31
  }
29
32
  },
30
- "imports": {
31
- "#build/una/*": "./.nuxt/una/*.ts"
32
- },
33
33
  "module": "./dist/module.mjs",
34
34
  "types": "./dist/types.d.mts",
35
35
  "files": [
@@ -54,11 +54,12 @@
54
54
  "clsx": "^2.1.1",
55
55
  "ohash": "^1.1.6",
56
56
  "reka-ui": "^2.2.1",
57
- "tailwind-merge": "^3.2.0",
57
+ "tailwind-merge": "^3.3.0",
58
58
  "unocss": "^66.0.0",
59
59
  "unocss-preset-animations": "^1.2.1",
60
- "@una-ui/extractor-vue-script": "^0.54.4",
61
- "@una-ui/preset": "^0.54.4"
60
+ "vaul-vue": "^0.4.1",
61
+ "@una-ui/extractor-vue-script": "^0.55.0",
62
+ "@una-ui/preset": "^0.55.0"
62
63
  },
63
64
  "devDependencies": {
64
65
  "@iconify-json/lucide": "^1.2.42",