nuance-ui 0.1.56 → 0.1.57
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 -5
- package/dist/runtime/components/combobox/combobox-root.d.vue.ts +2 -2
- package/dist/runtime/components/combobox/combobox-root.vue.d.ts +2 -2
- package/dist/runtime/components/modals/modals-provider.vue +2 -5
- package/dist/runtime/components/select/select.d.vue.ts +2 -2
- package/dist/runtime/components/select/select.vue.d.ts +2 -2
- package/dist/runtime/composals/use-modal.d.ts +3 -3
- package/dist/runtime/composals/use-modal.js +5 -6
- package/dist/runtime/plugins/modals/index.d.ts +2 -1
- package/dist/runtime/plugins/modals/index.js +3 -1
- package/package.json +1 -1
- package/dist/runtime/plugins/modals/plugin.client.d.ts +0 -8
- package/dist/runtime/plugins/modals/plugin.client.js +0 -10
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineNuxtModule, createResolver, addComponentsDir, addImportsDir
|
|
1
|
+
import { defineNuxtModule, createResolver, addComponentsDir, addImportsDir } from '@nuxt/kit';
|
|
2
2
|
import { defu } from 'defu';
|
|
3
3
|
|
|
4
4
|
const defaultConfig = {
|
|
@@ -70,10 +70,6 @@ const module$1 = defineNuxtModule({
|
|
|
70
70
|
addImportsDir(resolve("./runtime/composals"));
|
|
71
71
|
addImportsDir(resolve("./runtime/helpers"));
|
|
72
72
|
}
|
|
73
|
-
addPlugin({
|
|
74
|
-
src: resolve("./runtime/plugins/modals/plugin.client"),
|
|
75
|
-
mode: "client"
|
|
76
|
-
});
|
|
77
73
|
nuxt.options.css.push(resolve("./runtime/styles/global.css"));
|
|
78
74
|
}
|
|
79
75
|
});
|
|
@@ -25,15 +25,15 @@ type __VLS_Slots = {} & {
|
|
|
25
25
|
default?: (props: typeof __VLS_8) => any;
|
|
26
26
|
};
|
|
27
27
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
28
|
-
select: (args_0: number) => any;
|
|
29
28
|
clear: () => any;
|
|
29
|
+
select: (args_0: number) => any;
|
|
30
30
|
close: (args_0: import("./types/index.js").ComboboxDropdownEventSource) => any;
|
|
31
31
|
submit: (args_0: string, args_1: import("./types/index.js").ComboboxItem) => any;
|
|
32
32
|
open: (args_0: import("./types/index.js").ComboboxDropdownEventSource) => any;
|
|
33
33
|
"update:open": (value: boolean) => any;
|
|
34
34
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
35
|
-
onSelect?: ((args_0: number) => any) | undefined;
|
|
36
35
|
onClear?: (() => any) | undefined;
|
|
36
|
+
onSelect?: ((args_0: number) => any) | undefined;
|
|
37
37
|
onClose?: ((args_0: import("./types/index.js").ComboboxDropdownEventSource) => any) | undefined;
|
|
38
38
|
onSubmit?: ((args_0: string, args_1: import("./types/index.js").ComboboxItem) => any) | undefined;
|
|
39
39
|
onOpen?: ((args_0: import("./types/index.js").ComboboxDropdownEventSource) => any) | undefined;
|
|
@@ -25,15 +25,15 @@ type __VLS_Slots = {} & {
|
|
|
25
25
|
default?: (props: typeof __VLS_8) => any;
|
|
26
26
|
};
|
|
27
27
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
28
|
-
select: (args_0: number) => any;
|
|
29
28
|
clear: () => any;
|
|
29
|
+
select: (args_0: number) => any;
|
|
30
30
|
close: (args_0: import("./types/index.js").ComboboxDropdownEventSource) => any;
|
|
31
31
|
submit: (args_0: string, args_1: import("./types/index.js").ComboboxItem) => any;
|
|
32
32
|
open: (args_0: import("./types/index.js").ComboboxDropdownEventSource) => any;
|
|
33
33
|
"update:open": (value: boolean) => any;
|
|
34
34
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
35
|
-
onSelect?: ((args_0: number) => any) | undefined;
|
|
36
35
|
onClear?: (() => any) | undefined;
|
|
36
|
+
onSelect?: ((args_0: number) => any) | undefined;
|
|
37
37
|
onClose?: ((args_0: import("./types/index.js").ComboboxDropdownEventSource) => any) | undefined;
|
|
38
38
|
onSubmit?: ((args_0: string, args_1: import("./types/index.js").ComboboxItem) => any) | undefined;
|
|
39
39
|
onOpen?: ((args_0: import("./types/index.js").ComboboxDropdownEventSource) => any) | undefined;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import {
|
|
3
|
-
import { ClientOnly } from "#components";
|
|
4
|
-
import { computed } from "vue";
|
|
5
|
-
const modals = computed(() => useNuxtApp().$modals?.modals ?? []);
|
|
2
|
+
import { $modals } from "../../plugins/modals";
|
|
6
3
|
</script>
|
|
7
4
|
|
|
8
5
|
<template>
|
|
@@ -10,7 +7,7 @@ const modals = computed(() => useNuxtApp().$modals?.modals ?? []);
|
|
|
10
7
|
<div id='nui-modals-root'>
|
|
11
8
|
<component
|
|
12
9
|
:is='entry.component'
|
|
13
|
-
v-for='[id, entry] in modals'
|
|
10
|
+
v-for='[id, entry] in $modals.modals'
|
|
14
11
|
:key='id'
|
|
15
12
|
v-bind='entry.props'
|
|
16
13
|
/>
|
|
@@ -24,8 +24,8 @@ declare const __VLS_export: <Value extends string = string, Ext extends Combobox
|
|
|
24
24
|
modelValue?: ComboboxItem<Value, Ext> | null;
|
|
25
25
|
search?: string;
|
|
26
26
|
}) & {
|
|
27
|
-
onSelect?: ((args_0: number) => any) | undefined;
|
|
28
27
|
onClear?: (() => any) | undefined;
|
|
28
|
+
onSelect?: ((args_0: number) => any) | undefined;
|
|
29
29
|
onClose?: ((args_0: import("..").ComboboxDropdownEventSource) => any) | undefined;
|
|
30
30
|
onSubmit?: ((args_0: string, args_1: ComboboxItem) => any) | undefined;
|
|
31
31
|
"onUpdate:modelValue"?: ((value: ComboboxItem<Value, Ext> | null) => any) | undefined;
|
|
@@ -48,7 +48,7 @@ declare const __VLS_export: <Value extends string = string, Ext extends Combobox
|
|
|
48
48
|
} & {
|
|
49
49
|
rightSection?: (props: {}) => any;
|
|
50
50
|
};
|
|
51
|
-
emit: (((evt: "
|
|
51
|
+
emit: (((evt: "clear") => void) & ((evt: "select", args_0: number) => void) & ((evt: "close", args_0: import("..").ComboboxDropdownEventSource) => void) & ((evt: "submit", args_0: string, args_1: ComboboxItem) => void) & ((evt: "open", args_0: import("..").ComboboxDropdownEventSource) => void)) & (((event: "update:modelValue", value: ComboboxItem<Value, Ext> | null) => void) & ((event: "update:search", value: string) => void) & ((event: "update:open", value: boolean) => void));
|
|
52
52
|
}>) => import("vue").VNode & {
|
|
53
53
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
54
54
|
};
|
|
@@ -24,8 +24,8 @@ declare const __VLS_export: <Value extends string = string, Ext extends Combobox
|
|
|
24
24
|
modelValue?: ComboboxItem<Value, Ext> | null;
|
|
25
25
|
search?: string;
|
|
26
26
|
}) & {
|
|
27
|
-
onSelect?: ((args_0: number) => any) | undefined;
|
|
28
27
|
onClear?: (() => any) | undefined;
|
|
28
|
+
onSelect?: ((args_0: number) => any) | undefined;
|
|
29
29
|
onClose?: ((args_0: import("..").ComboboxDropdownEventSource) => any) | undefined;
|
|
30
30
|
onSubmit?: ((args_0: string, args_1: ComboboxItem) => any) | undefined;
|
|
31
31
|
"onUpdate:modelValue"?: ((value: ComboboxItem<Value, Ext> | null) => any) | undefined;
|
|
@@ -48,7 +48,7 @@ declare const __VLS_export: <Value extends string = string, Ext extends Combobox
|
|
|
48
48
|
} & {
|
|
49
49
|
rightSection?: (props: {}) => any;
|
|
50
50
|
};
|
|
51
|
-
emit: (((evt: "
|
|
51
|
+
emit: (((evt: "clear") => void) & ((evt: "select", args_0: number) => void) & ((evt: "close", args_0: import("..").ComboboxDropdownEventSource) => void) & ((evt: "submit", args_0: string, args_1: ComboboxItem) => void) & ((evt: "open", args_0: import("..").ComboboxDropdownEventSource) => void)) & (((event: "update:modelValue", value: ComboboxItem<Value, Ext> | null) => void) & ((event: "update:search", value: string) => void) & ((event: "update:open", value: boolean) => void));
|
|
52
52
|
}>) => import("vue").VNode & {
|
|
53
53
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
54
54
|
};
|
|
@@ -21,8 +21,8 @@ id: string): {
|
|
|
21
21
|
*
|
|
22
22
|
* Setting to `true` reopens the modal, setting to `false` calls `reject`
|
|
23
23
|
*/
|
|
24
|
-
opened: import("vue").WritableComputedRef<
|
|
24
|
+
opened: import("vue").WritableComputedRef<boolean, boolean>;
|
|
25
25
|
/** closes the modal and resolves the promise */
|
|
26
|
-
resolve: (reason: Resolve) =>
|
|
27
|
-
reject: () =>
|
|
26
|
+
resolve: (reason: Resolve) => void;
|
|
27
|
+
reject: () => void;
|
|
28
28
|
};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { useNuxtApp } from "#app";
|
|
2
1
|
import { computed } from "vue";
|
|
2
|
+
import { $modals } from "../plugins/modals/index.js";
|
|
3
3
|
export function useModal(id) {
|
|
4
|
-
const
|
|
5
|
-
const state = computed(() => manager.state(id));
|
|
4
|
+
const state = computed(() => $modals.state(id));
|
|
6
5
|
const opened = computed({
|
|
7
6
|
get: () => state.value?.opened,
|
|
8
|
-
set: (opened2) => opened2 ?
|
|
7
|
+
set: (opened2) => opened2 ? $modals.show(id, state.value.props) : $modals.reject(id, "cancel")
|
|
9
8
|
});
|
|
10
9
|
if (!state)
|
|
11
10
|
throw new Error(`Modal ${id} is not exist`);
|
|
@@ -17,7 +16,7 @@ export function useModal(id) {
|
|
|
17
16
|
*/
|
|
18
17
|
opened,
|
|
19
18
|
/** closes the modal and resolves the promise */
|
|
20
|
-
resolve: (reason) =>
|
|
21
|
-
reject: () =>
|
|
19
|
+
resolve: (reason) => $modals.resolve(id, reason),
|
|
20
|
+
reject: () => $modals.reject(id)
|
|
22
21
|
};
|
|
23
22
|
}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { ModalManager } from './modal-manager.js';
|
|
2
|
+
export declare const $modals: import("vue").Raw<ModalManager>;
|
package/package.json
CHANGED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ModalManager } from './modal-manager.js';
|
|
2
|
-
export declare const $modals: import("vue").Raw<ModalManager>;
|
|
3
|
-
declare const _default: import("#app").Plugin<{
|
|
4
|
-
modals: import("vue").Raw<ModalManager>;
|
|
5
|
-
}> & import("#app").ObjectPlugin<{
|
|
6
|
-
modals: import("vue").Raw<ModalManager>;
|
|
7
|
-
}>;
|
|
8
|
-
export default _default;
|