nuxt-ui-elements 0.2.0 → 0.3.1
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/runtime/components/DialogAlert.d.vue.ts +3 -0
- package/dist/runtime/components/DialogAlert.vue +7 -2
- package/dist/runtime/components/DialogAlert.vue.d.ts +3 -0
- package/dist/runtime/components/DialogConfirm.d.vue.ts +3 -0
- package/dist/runtime/components/DialogConfirm.vue +7 -2
- package/dist/runtime/components/DialogConfirm.vue.d.ts +3 -0
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -3,6 +3,7 @@ import theme from "#build/ui-elements/dialog-alert";
|
|
|
3
3
|
import type { ComponentConfig } from "../types/index.js";
|
|
4
4
|
type DialogAlert = ComponentConfig<typeof theme, AppConfig, "dialogAlert">;
|
|
5
5
|
export interface DialogAlertProps {
|
|
6
|
+
open?: boolean;
|
|
6
7
|
title?: string;
|
|
7
8
|
description?: string;
|
|
8
9
|
icon?: string;
|
|
@@ -17,7 +18,9 @@ export default _default;
|
|
|
17
18
|
declare const __VLS_export: import("vue").DefineComponent<DialogAlertProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
18
19
|
close: (value?: any) => any;
|
|
19
20
|
"update:open": (value: boolean) => any;
|
|
21
|
+
"after:leave": () => any;
|
|
20
22
|
}, string, import("vue").PublicProps, Readonly<DialogAlertProps> & Readonly<{
|
|
21
23
|
onClose?: ((value?: any) => any) | undefined;
|
|
22
24
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
25
|
+
"onAfter:leave"?: (() => any) | undefined;
|
|
23
26
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -7,6 +7,7 @@ import { tv } from "../utils/tv";
|
|
|
7
7
|
|
|
8
8
|
<script setup>
|
|
9
9
|
const {
|
|
10
|
+
open = false,
|
|
10
11
|
title = "",
|
|
11
12
|
description = "",
|
|
12
13
|
icon = void 0,
|
|
@@ -17,6 +18,7 @@ const {
|
|
|
17
18
|
},
|
|
18
19
|
ui: uiProps = {}
|
|
19
20
|
} = defineProps({
|
|
21
|
+
open: { type: Boolean, required: false },
|
|
20
22
|
title: { type: String, required: false },
|
|
21
23
|
description: { type: String, required: false },
|
|
22
24
|
icon: { type: String, required: false },
|
|
@@ -26,7 +28,7 @@ const {
|
|
|
26
28
|
onDismiss: { type: Function, required: false },
|
|
27
29
|
ui: { type: null, required: false }
|
|
28
30
|
});
|
|
29
|
-
const emits = defineEmits(["update:open", "close"]);
|
|
31
|
+
const emits = defineEmits(["update:open", "close", "after:leave"]);
|
|
30
32
|
const ui = computed(
|
|
31
33
|
() => tv({
|
|
32
34
|
extend: tv(theme)
|
|
@@ -44,6 +46,7 @@ const dismissHandler = () => {
|
|
|
44
46
|
|
|
45
47
|
<template>
|
|
46
48
|
<UModal
|
|
49
|
+
:open="open"
|
|
47
50
|
:dismissible="false"
|
|
48
51
|
:close="false"
|
|
49
52
|
:ui="{
|
|
@@ -51,7 +54,9 @@ const dismissHandler = () => {
|
|
|
51
54
|
header: ui.header({ class: uiProps?.header }),
|
|
52
55
|
body: ui.body({ class: uiProps?.body }),
|
|
53
56
|
footer: ui.footer({ class: uiProps?.footer })
|
|
54
|
-
}"
|
|
57
|
+
}"
|
|
58
|
+
@update:open="emits('update:open', $event)"
|
|
59
|
+
@after:leave="emits('after:leave')">
|
|
55
60
|
<template #header>
|
|
56
61
|
<div class="relative w-full flex flex-col items-center text-center gap-3">
|
|
57
62
|
<UIcon v-if="icon" :name="icon" data-slot="icon" :class="ui.icon({ class: uiProps?.icon })" />
|
|
@@ -3,6 +3,7 @@ import theme from "#build/ui-elements/dialog-alert";
|
|
|
3
3
|
import type { ComponentConfig } from "../types/index.js";
|
|
4
4
|
type DialogAlert = ComponentConfig<typeof theme, AppConfig, "dialogAlert">;
|
|
5
5
|
export interface DialogAlertProps {
|
|
6
|
+
open?: boolean;
|
|
6
7
|
title?: string;
|
|
7
8
|
description?: string;
|
|
8
9
|
icon?: string;
|
|
@@ -17,7 +18,9 @@ export default _default;
|
|
|
17
18
|
declare const __VLS_export: import("vue").DefineComponent<DialogAlertProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
18
19
|
close: (value?: any) => any;
|
|
19
20
|
"update:open": (value: boolean) => any;
|
|
21
|
+
"after:leave": () => any;
|
|
20
22
|
}, string, import("vue").PublicProps, Readonly<DialogAlertProps> & Readonly<{
|
|
21
23
|
onClose?: ((value?: any) => any) | undefined;
|
|
22
24
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
25
|
+
"onAfter:leave"?: (() => any) | undefined;
|
|
23
26
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -3,6 +3,7 @@ import theme from "#build/ui-elements/dialog-confirm";
|
|
|
3
3
|
import type { ComponentConfig } from "../types/index.js";
|
|
4
4
|
type DialogConfirm = ComponentConfig<typeof theme, AppConfig, "dialogConfirm">;
|
|
5
5
|
export interface DialogConfirmProps {
|
|
6
|
+
open?: boolean;
|
|
6
7
|
title?: string;
|
|
7
8
|
description?: string;
|
|
8
9
|
icon?: boolean;
|
|
@@ -20,7 +21,9 @@ export default _default;
|
|
|
20
21
|
declare const __VLS_export: import("vue").DefineComponent<DialogConfirmProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
21
22
|
close: (value?: any) => any;
|
|
22
23
|
"update:open": (value: boolean) => any;
|
|
24
|
+
"after:leave": () => any;
|
|
23
25
|
}, string, import("vue").PublicProps, Readonly<DialogConfirmProps> & Readonly<{
|
|
24
26
|
onClose?: ((value?: any) => any) | undefined;
|
|
25
27
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
28
|
+
"onAfter:leave"?: (() => any) | undefined;
|
|
26
29
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -7,6 +7,7 @@ import { tv } from "../utils/tv";
|
|
|
7
7
|
|
|
8
8
|
<script setup>
|
|
9
9
|
const {
|
|
10
|
+
open = false,
|
|
10
11
|
title = "",
|
|
11
12
|
description = "",
|
|
12
13
|
icon = true,
|
|
@@ -21,6 +22,7 @@ const {
|
|
|
21
22
|
},
|
|
22
23
|
ui: uiProps = {}
|
|
23
24
|
} = defineProps({
|
|
25
|
+
open: { type: Boolean, required: false },
|
|
24
26
|
title: { type: String, required: false },
|
|
25
27
|
description: { type: String, required: false },
|
|
26
28
|
icon: { type: Boolean, required: false },
|
|
@@ -33,7 +35,7 @@ const {
|
|
|
33
35
|
onDismiss: { type: Function, required: false },
|
|
34
36
|
ui: { type: null, required: false }
|
|
35
37
|
});
|
|
36
|
-
const emits = defineEmits(["update:open", "close"]);
|
|
38
|
+
const emits = defineEmits(["update:open", "close", "after:leave"]);
|
|
37
39
|
const isLoading = ref(false);
|
|
38
40
|
const isComplete = ref(false);
|
|
39
41
|
const isError = ref(false);
|
|
@@ -102,6 +104,7 @@ const handleClose = () => {
|
|
|
102
104
|
|
|
103
105
|
<template>
|
|
104
106
|
<UModal
|
|
107
|
+
:open="open"
|
|
105
108
|
:dismissible="false"
|
|
106
109
|
:close="false"
|
|
107
110
|
:ui="{
|
|
@@ -109,7 +112,9 @@ const handleClose = () => {
|
|
|
109
112
|
header: ui.header({ class: uiProps?.header }),
|
|
110
113
|
body: ui.body({ class: uiProps?.body }),
|
|
111
114
|
footer: ui.footer({ class: uiProps?.footer })
|
|
112
|
-
}"
|
|
115
|
+
}"
|
|
116
|
+
@update:open="emits('update:open', $event)"
|
|
117
|
+
@after:leave="emits('after:leave')">
|
|
113
118
|
<template #header>
|
|
114
119
|
<div class="relative w-full flex items-start gap-3">
|
|
115
120
|
<UIcon v-if="dialogIcon" :name="dialogIcon" data-slot="icon" :class="ui.icon({ class: uiProps?.icon })" />
|
|
@@ -3,6 +3,7 @@ import theme from "#build/ui-elements/dialog-confirm";
|
|
|
3
3
|
import type { ComponentConfig } from "../types/index.js";
|
|
4
4
|
type DialogConfirm = ComponentConfig<typeof theme, AppConfig, "dialogConfirm">;
|
|
5
5
|
export interface DialogConfirmProps {
|
|
6
|
+
open?: boolean;
|
|
6
7
|
title?: string;
|
|
7
8
|
description?: string;
|
|
8
9
|
icon?: boolean;
|
|
@@ -20,7 +21,9 @@ export default _default;
|
|
|
20
21
|
declare const __VLS_export: import("vue").DefineComponent<DialogConfirmProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
21
22
|
close: (value?: any) => any;
|
|
22
23
|
"update:open": (value: boolean) => any;
|
|
24
|
+
"after:leave": () => any;
|
|
23
25
|
}, string, import("vue").PublicProps, Readonly<DialogConfirmProps> & Readonly<{
|
|
24
26
|
onClose?: ((value?: any) => any) | undefined;
|
|
25
27
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
28
|
+
"onAfter:leave"?: (() => any) | undefined;
|
|
26
29
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
package/package.json
CHANGED