nuance-ui 0.2.35 → 0.3.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 +3 -0
- package/dist/module.d.ts +3 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +5 -3
- package/dist/runtime/app-config.d.ts +4 -0
- package/dist/runtime/components/accordion.d.vue.ts +79 -0
- package/dist/runtime/components/accordion.vue +44 -0
- package/dist/runtime/components/accordion.vue.d.ts +79 -0
- package/dist/runtime/components/action-icon/action-icon.d.vue.ts +11 -1
- package/dist/runtime/components/action-icon/action-icon.module.css +1 -1
- package/dist/runtime/components/action-icon/action-icon.vue +20 -5
- package/dist/runtime/components/action-icon/action-icon.vue.d.ts +11 -1
- package/dist/runtime/components/button/button.d.vue.ts +8 -0
- package/dist/runtime/components/button/button.module.css +1 -1
- package/dist/runtime/components/button/button.vue +17 -4
- package/dist/runtime/components/button/button.vue.d.ts +8 -0
- package/dist/runtime/components/collapsible/collapsible-content.d.vue.ts +18 -0
- package/dist/runtime/components/collapsible/collapsible-content.vue +76 -0
- package/dist/runtime/components/collapsible/collapsible-content.vue.d.ts +18 -0
- package/dist/runtime/components/collapsible/collapsible-root.d.vue.ts +42 -0
- package/dist/runtime/components/collapsible/collapsible-root.vue +41 -0
- package/dist/runtime/components/collapsible/collapsible-root.vue.d.ts +42 -0
- package/dist/runtime/components/collapsible/collapsible-trigger.d.vue.ts +13 -0
- package/dist/runtime/components/collapsible/collapsible-trigger.vue +20 -0
- package/dist/runtime/components/collapsible/collapsible-trigger.vue.d.ts +13 -0
- package/dist/runtime/components/collapsible/index.d.ts +3 -0
- package/dist/runtime/components/collapsible/index.js +1 -0
- package/dist/runtime/components/dialog/ui/dialog-close-button.d.vue.ts +2 -2
- package/dist/runtime/components/dialog/ui/dialog-close-button.vue +14 -11
- package/dist/runtime/components/dialog/ui/dialog-close-button.vue.d.ts +2 -2
- package/dist/runtime/components/dialog/ui/dialog-footer.d.vue.ts +2 -2
- package/dist/runtime/components/dialog/ui/dialog-footer.vue +3 -5
- package/dist/runtime/components/dialog/ui/dialog-footer.vue.d.ts +2 -2
- package/dist/runtime/components/dialog/ui/dialog-header.d.vue.ts +2 -2
- package/dist/runtime/components/dialog/ui/dialog-header.vue +3 -5
- package/dist/runtime/components/dialog/ui/dialog-header.vue.d.ts +2 -2
- package/dist/runtime/components/dialog/ui/dialog-root.d.vue.ts +2 -2
- package/dist/runtime/components/dialog/ui/dialog-root.vue +23 -25
- package/dist/runtime/components/dialog/ui/dialog-root.vue.d.ts +2 -2
- package/dist/runtime/components/dialog/ui/dialog-section.d.vue.ts +2 -2
- package/dist/runtime/components/dialog/ui/dialog-section.vue +3 -5
- package/dist/runtime/components/dialog/ui/dialog-section.vue.d.ts +2 -2
- package/dist/runtime/components/dialog/ui/dialog-title.d.vue.ts +2 -2
- package/dist/runtime/components/dialog/ui/dialog-title.vue +3 -5
- package/dist/runtime/components/dialog/ui/dialog-title.vue.d.ts +2 -2
- package/dist/runtime/components/drawer/drawer-close-button.vue +5 -0
- package/dist/runtime/components/files/file-upload-button.vue +4 -0
- package/dist/runtime/components/files/file-upload-icon.vue +5 -0
- package/dist/runtime/components/index.d.ts +2 -0
- package/dist/runtime/components/index.js +1 -0
- package/dist/runtime/components/link/lib.d.ts +2 -2
- package/dist/runtime/components/link/link-button.vue +4 -0
- package/dist/runtime/components/modal/modal-close-button.vue +5 -0
- package/dist/runtime/components/nav-link/nav-icon-link.d.vue.ts +5 -11
- package/dist/runtime/components/nav-link/nav-icon-link.vue +12 -8
- package/dist/runtime/components/nav-link/nav-icon-link.vue.d.ts +5 -11
- package/dist/runtime/components/scroll-area.vue +2 -1
- package/dist/runtime/components/select.d.vue.ts +2 -2
- package/dist/runtime/components/select.vue.d.ts +2 -2
- package/dist/runtime/components/table/ui/table-sortable-header.vue +4 -0
- package/dist/runtime/components/table/ui/table.vue +1 -1
- package/dist/runtime/components/tabs/tabs-root.d.vue.ts +1 -1
- package/dist/runtime/components/tabs/tabs-root.vue.d.ts +1 -1
- package/dist/runtime/components/theme-toggle.vue +5 -0
- package/dist/runtime/components/transition.d.vue.ts +10 -0
- package/dist/runtime/components/transition.vue +14 -3
- package/dist/runtime/components/transition.vue.d.ts +10 -0
- package/dist/runtime/composables/use-config.d.ts +1 -0
- package/dist/runtime/composables/use-config.js +2 -1
- package/dist/runtime/modals/modals-provider.vue +8 -10
- package/dist/runtime/utils/const/active-variants.d.ts +11 -0
- package/dist/runtime/utils/const/active-variants.js +9 -0
- package/dist/runtime/utils/const/index.d.ts +1 -0
- package/dist/runtime/utils/const/index.js +1 -0
- package/package.json +4 -4
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export type * from './accordion.vue';
|
|
1
2
|
export * from './action-icon/index.js';
|
|
2
3
|
export * from './app-shell/index.js';
|
|
3
4
|
export * from './avatar/index.js';
|
|
@@ -10,6 +11,7 @@ export * from './calendar/index.js';
|
|
|
10
11
|
export * from './card/index.js';
|
|
11
12
|
export * from './checkbox/index.js';
|
|
12
13
|
export * from './chip/index.js';
|
|
14
|
+
export * from './collapsible/index.js';
|
|
13
15
|
export * from './combobox/index.js';
|
|
14
16
|
export type * from './container.vue';
|
|
15
17
|
export type * from './date-time-picker.vue';
|
|
@@ -6,6 +6,7 @@ export * from "./calendar/index.js";
|
|
|
6
6
|
export * from "./card/index.js";
|
|
7
7
|
export * from "./checkbox/index.js";
|
|
8
8
|
export * from "./chip/index.js";
|
|
9
|
+
export * from "./collapsible/index.js";
|
|
9
10
|
export * from "./combobox/index.js";
|
|
10
11
|
export * from "./dialog/index.js";
|
|
11
12
|
export * from "./drawer/index.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { NuxtLinkProps } from '#app';
|
|
2
2
|
export declare function pickLinkProps<T extends NuxtLinkProps>(props: T): {
|
|
3
|
-
link: Pick<T, "replace" | "
|
|
4
|
-
rest: Omit<T, "replace" | "
|
|
3
|
+
link: Pick<T, "replace" | "target" | "to" | "external" | "rel" | "noRel" | "prefetch" | "noPrefetch" | "prefetchOn" | "trailingSlash" | "activeClass" | "ariaCurrentValue" | "exactActiveClass" | "prefetchedClass" | "viewTransition">;
|
|
4
|
+
rest: Omit<T, "replace" | "target" | "to" | "external" | "rel" | "noRel" | "prefetch" | "noPrefetch" | "prefetchOn" | "trailingSlash" | "activeClass" | "ariaCurrentValue" | "exactActiveClass" | "prefetchedClass" | "viewTransition">;
|
|
5
5
|
};
|
|
@@ -30,6 +30,10 @@ const props = defineProps({
|
|
|
30
30
|
leftSectionProps: { type: Object, required: false },
|
|
31
31
|
rightSectionProps: { type: Object, required: false },
|
|
32
32
|
variant: { type: String, required: false },
|
|
33
|
+
active: { type: Boolean, required: false },
|
|
34
|
+
activeMode: { type: String, required: false },
|
|
35
|
+
activeVariant: { type: String, required: false },
|
|
36
|
+
activeColor: { type: null, required: false },
|
|
33
37
|
classes: { type: Object, required: false },
|
|
34
38
|
is: { type: null, required: false },
|
|
35
39
|
mod: { type: [Object, Array, null], required: false }
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import DialogCloseButton from "../dialog/ui/dialog-close-button.vue";
|
|
3
3
|
const props = defineProps({
|
|
4
4
|
size: { type: null, required: false },
|
|
5
|
+
iconSize: { type: [Number, String], required: false },
|
|
5
6
|
gradient: { type: Object, required: false },
|
|
6
7
|
color: { type: null, required: false },
|
|
7
8
|
radius: { type: [String, Number, Object], required: false },
|
|
@@ -10,6 +11,10 @@ const props = defineProps({
|
|
|
10
11
|
disabled: { type: Boolean, required: false },
|
|
11
12
|
mod: { type: [Object, Array, null], required: false },
|
|
12
13
|
variant: { type: String, required: false },
|
|
14
|
+
active: { type: Boolean, required: false },
|
|
15
|
+
activeMode: { type: String, required: false },
|
|
16
|
+
activeVariant: { type: String, required: false },
|
|
17
|
+
activeColor: { type: null, required: false },
|
|
13
18
|
classes: { type: Object, required: false }
|
|
14
19
|
});
|
|
15
20
|
</script>
|
|
@@ -1,23 +1,17 @@
|
|
|
1
1
|
import type { ActionIconProps } from '@nui/components';
|
|
2
2
|
import type { NuanceColor } from '@nui/types';
|
|
3
3
|
import type { NuxtLinkProps } from 'nuxt/app';
|
|
4
|
-
export interface NavIconLinkProps extends ActionIconProps, Omit<NuxtLinkProps, 'href' | 'custom'> {
|
|
4
|
+
export interface NavIconLinkProps extends Omit<ActionIconProps, 'active'>, Omit<NuxtLinkProps, 'href' | 'custom'> {
|
|
5
5
|
/** Link target */
|
|
6
6
|
to: NuxtLinkProps['to'];
|
|
7
7
|
/** Color from theme */
|
|
8
8
|
color?: NuanceColor;
|
|
9
9
|
/** Icon name shorthand */
|
|
10
10
|
icon?: string;
|
|
11
|
-
/**
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
active?: ActionIconProps['variant'];
|
|
16
|
-
/**
|
|
17
|
-
* Variant applied in inactive state
|
|
18
|
-
* @default `'default'`
|
|
19
|
-
*/
|
|
20
|
-
notActive?: ActionIconProps['variant'];
|
|
11
|
+
/** Variant applied in inactive state @default 'default' */
|
|
12
|
+
variant?: ActionIconProps['variant'];
|
|
13
|
+
/** Variant applied in active state @default 'filled' */
|
|
14
|
+
activeVariant?: ActionIconProps['variant'];
|
|
21
15
|
}
|
|
22
16
|
declare var __VLS_16: {};
|
|
23
17
|
type __VLS_Slots = {} & {
|
|
@@ -3,23 +3,25 @@ import ActionIcon from "../action-icon/action-icon.vue";
|
|
|
3
3
|
import { pickLinkProps } from "../link";
|
|
4
4
|
defineOptions({ inheritAttrs: false });
|
|
5
5
|
const {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
variant,
|
|
7
|
+
activeVariant,
|
|
8
8
|
mod,
|
|
9
9
|
...etc
|
|
10
10
|
} = defineProps({
|
|
11
11
|
to: { type: null, required: true },
|
|
12
12
|
color: { type: null, required: false },
|
|
13
13
|
icon: { type: String, required: false },
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
variant: { type: String, required: false },
|
|
15
|
+
activeVariant: { type: String, required: false },
|
|
16
16
|
size: { type: null, required: false },
|
|
17
|
+
iconSize: { type: [Number, String], required: false },
|
|
17
18
|
gradient: { type: Object, required: false },
|
|
18
19
|
radius: { type: [String, Number, Object], required: false },
|
|
19
20
|
loading: { type: Boolean, required: false },
|
|
20
21
|
disabled: { type: Boolean, required: false },
|
|
21
22
|
mod: { type: [Object, Array, null], required: false },
|
|
22
|
-
|
|
23
|
+
activeMode: { type: String, required: false },
|
|
24
|
+
activeColor: { type: null, required: false },
|
|
23
25
|
classes: { type: Object, required: false },
|
|
24
26
|
external: { type: Boolean, required: false },
|
|
25
27
|
target: { type: [String, Object, null], required: false },
|
|
@@ -45,9 +47,11 @@ const { link, rest } = pickLinkProps(etc);
|
|
|
45
47
|
is='a'
|
|
46
48
|
v-bind='{ ...rest, ...$attrs }'
|
|
47
49
|
:href
|
|
48
|
-
:variant
|
|
49
|
-
:
|
|
50
|
-
:
|
|
50
|
+
:variant
|
|
51
|
+
:active='isActive'
|
|
52
|
+
:active-variant
|
|
53
|
+
active-mode='current'
|
|
54
|
+
:mod
|
|
51
55
|
:rel='"rel" in linkProps ? linkProps?.rel : void 0'
|
|
52
56
|
:target='"target" in linkProps ? linkProps?.target : void 0'
|
|
53
57
|
@click='navigate'
|
|
@@ -1,23 +1,17 @@
|
|
|
1
1
|
import type { ActionIconProps } from '@nui/components';
|
|
2
2
|
import type { NuanceColor } from '@nui/types';
|
|
3
3
|
import type { NuxtLinkProps } from 'nuxt/app';
|
|
4
|
-
export interface NavIconLinkProps extends ActionIconProps, Omit<NuxtLinkProps, 'href' | 'custom'> {
|
|
4
|
+
export interface NavIconLinkProps extends Omit<ActionIconProps, 'active'>, Omit<NuxtLinkProps, 'href' | 'custom'> {
|
|
5
5
|
/** Link target */
|
|
6
6
|
to: NuxtLinkProps['to'];
|
|
7
7
|
/** Color from theme */
|
|
8
8
|
color?: NuanceColor;
|
|
9
9
|
/** Icon name shorthand */
|
|
10
10
|
icon?: string;
|
|
11
|
-
/**
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
active?: ActionIconProps['variant'];
|
|
16
|
-
/**
|
|
17
|
-
* Variant applied in inactive state
|
|
18
|
-
* @default `'default'`
|
|
19
|
-
*/
|
|
20
|
-
notActive?: ActionIconProps['variant'];
|
|
11
|
+
/** Variant applied in inactive state @default 'default' */
|
|
12
|
+
variant?: ActionIconProps['variant'];
|
|
13
|
+
/** Variant applied in active state @default 'filled' */
|
|
14
|
+
activeVariant?: ActionIconProps['variant'];
|
|
21
15
|
}
|
|
22
16
|
declare var __VLS_16: {};
|
|
23
17
|
type __VLS_Slots = {} & {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
import { useVarsResolver } from "@nui/composables";
|
|
3
|
+
import { getSize } from "@nui/utils";
|
|
2
4
|
import { useResizeObserver } from "@vueuse/core";
|
|
3
|
-
import { getSize, useVarsResolver } from "#imports";
|
|
4
5
|
import { computed, onBeforeUnmount, onMounted, ref, useTemplateRef } from "vue";
|
|
5
6
|
import Box from "./box.vue";
|
|
6
7
|
const {
|
|
@@ -40,8 +40,8 @@ declare const __VLS_export: <Value extends string = string, Ext extends Combobox
|
|
|
40
40
|
onSubmit?: ((args_0: string, args_1: import("./combobox/index.js").ComboboxItem<string, object>) => any) | undefined;
|
|
41
41
|
"onUpdate:modelValue"?: ((value: string | string[] | null) => any) | undefined;
|
|
42
42
|
onOpen?: ((args_0: import("./combobox/index.js").ComboboxDropdownEventSource) => any) | undefined;
|
|
43
|
-
"onUpdate:search"?: ((value: string) => any) | undefined;
|
|
44
43
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
44
|
+
"onUpdate:search"?: ((value: string) => any) | undefined;
|
|
45
45
|
}> & (typeof globalThis extends {
|
|
46
46
|
__VLS_PROPS_FALLBACK: infer P;
|
|
47
47
|
} ? P : {});
|
|
@@ -63,7 +63,7 @@ declare const __VLS_export: <Value extends string = string, Ext extends Combobox
|
|
|
63
63
|
} & {
|
|
64
64
|
rightSection?: (props: {}) => any;
|
|
65
65
|
};
|
|
66
|
-
emit: (((evt: "select", args_0: number) => void) & ((evt: "clear") => void) & ((evt: "close", args_0: import("./combobox/index.js").ComboboxDropdownEventSource) => void) & ((evt: "submit", args_0: string, args_1: import("./combobox/index.js").ComboboxItem<string, object>) => void) & ((evt: "open", args_0: import("./combobox/index.js").ComboboxDropdownEventSource) => void)) & (((event: "update:modelValue", value: string | string[] | null) => void) & ((event: "update:
|
|
66
|
+
emit: (((evt: "select", args_0: number) => void) & ((evt: "clear") => void) & ((evt: "close", args_0: import("./combobox/index.js").ComboboxDropdownEventSource) => void) & ((evt: "submit", args_0: string, args_1: import("./combobox/index.js").ComboboxItem<string, object>) => void) & ((evt: "open", args_0: import("./combobox/index.js").ComboboxDropdownEventSource) => void)) & (((event: "update:modelValue", value: string | string[] | null) => void) & ((event: "update:open", value: boolean) => void) & ((event: "update:search", value: string) => void));
|
|
67
67
|
}>) => import("vue").VNode & {
|
|
68
68
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
69
69
|
};
|
|
@@ -40,8 +40,8 @@ declare const __VLS_export: <Value extends string = string, Ext extends Combobox
|
|
|
40
40
|
onSubmit?: ((args_0: string, args_1: import("./combobox/index.js").ComboboxItem<string, object>) => any) | undefined;
|
|
41
41
|
"onUpdate:modelValue"?: ((value: string | string[] | null) => any) | undefined;
|
|
42
42
|
onOpen?: ((args_0: import("./combobox/index.js").ComboboxDropdownEventSource) => any) | undefined;
|
|
43
|
-
"onUpdate:search"?: ((value: string) => any) | undefined;
|
|
44
43
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
44
|
+
"onUpdate:search"?: ((value: string) => any) | undefined;
|
|
45
45
|
}> & (typeof globalThis extends {
|
|
46
46
|
__VLS_PROPS_FALLBACK: infer P;
|
|
47
47
|
} ? P : {});
|
|
@@ -63,7 +63,7 @@ declare const __VLS_export: <Value extends string = string, Ext extends Combobox
|
|
|
63
63
|
} & {
|
|
64
64
|
rightSection?: (props: {}) => any;
|
|
65
65
|
};
|
|
66
|
-
emit: (((evt: "select", args_0: number) => void) & ((evt: "clear") => void) & ((evt: "close", args_0: import("./combobox/index.js").ComboboxDropdownEventSource) => void) & ((evt: "submit", args_0: string, args_1: import("./combobox/index.js").ComboboxItem<string, object>) => void) & ((evt: "open", args_0: import("./combobox/index.js").ComboboxDropdownEventSource) => void)) & (((event: "update:modelValue", value: string | string[] | null) => void) & ((event: "update:
|
|
66
|
+
emit: (((evt: "select", args_0: number) => void) & ((evt: "clear") => void) & ((evt: "close", args_0: import("./combobox/index.js").ComboboxDropdownEventSource) => void) & ((evt: "submit", args_0: string, args_1: import("./combobox/index.js").ComboboxItem<string, object>) => void) & ((evt: "open", args_0: import("./combobox/index.js").ComboboxDropdownEventSource) => void)) & (((event: "update:modelValue", value: string | string[] | null) => void) & ((event: "update:open", value: boolean) => void) & ((event: "update:search", value: string) => void));
|
|
67
67
|
}>) => import("vue").VNode & {
|
|
68
68
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
69
69
|
};
|
|
@@ -23,6 +23,10 @@ const {
|
|
|
23
23
|
leftSectionProps: { type: Object, required: false },
|
|
24
24
|
rightSectionProps: { type: Object, required: false },
|
|
25
25
|
variant: { type: String, required: false },
|
|
26
|
+
active: { type: Boolean, required: false },
|
|
27
|
+
activeMode: { type: String, required: false },
|
|
28
|
+
activeVariant: { type: String, required: false },
|
|
29
|
+
activeColor: { type: null, required: false },
|
|
26
30
|
classes: { type: Object, required: false },
|
|
27
31
|
is: { type: null, required: false },
|
|
28
32
|
mod: { type: [Object, Array, null], required: false },
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
import { useVarsResolver } from "@nui/composables";
|
|
2
3
|
import { getThemeColor } from "@nui/utils";
|
|
3
4
|
import {
|
|
4
5
|
FlexRender,
|
|
@@ -9,7 +10,6 @@ import {
|
|
|
9
10
|
useVueTable
|
|
10
11
|
} from "@tanstack/vue-table";
|
|
11
12
|
import { reactivePick, unrefElement } from "@vueuse/core";
|
|
12
|
-
import { useVarsResolver } from "#imports";
|
|
13
13
|
import { computed, ref, useTemplateRef, watch } from "vue";
|
|
14
14
|
import Box from "../../box.vue";
|
|
15
15
|
import { createRowHandlers, processColumns, resolveValue, valueUpdater } from "../lib";
|
|
@@ -62,8 +62,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
62
62
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
63
63
|
"onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
|
|
64
64
|
}>, {
|
|
65
|
-
variant: TabsVariant;
|
|
66
65
|
orientation: "vertical" | "horizontal";
|
|
66
|
+
variant: TabsVariant;
|
|
67
67
|
placement: "left" | "right";
|
|
68
68
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
69
69
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -62,8 +62,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
62
62
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
63
63
|
"onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
|
|
64
64
|
}>, {
|
|
65
|
-
variant: TabsVariant;
|
|
66
65
|
orientation: "vertical" | "horizontal";
|
|
66
|
+
variant: TabsVariant;
|
|
67
67
|
placement: "left" | "right";
|
|
68
68
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
69
69
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -3,6 +3,7 @@ import { useConfig, useTheme } from "@nui/composables";
|
|
|
3
3
|
import ActionIcon from "./action-icon/action-icon.vue";
|
|
4
4
|
const props = defineProps({
|
|
5
5
|
size: { type: null, required: false },
|
|
6
|
+
iconSize: { type: [Number, String], required: false },
|
|
6
7
|
gradient: { type: Object, required: false },
|
|
7
8
|
color: { type: null, required: false },
|
|
8
9
|
radius: { type: [String, Number, Object], required: false },
|
|
@@ -11,6 +12,10 @@ const props = defineProps({
|
|
|
11
12
|
disabled: { type: Boolean, required: false },
|
|
12
13
|
mod: { type: [Object, Array, null], required: false },
|
|
13
14
|
variant: { type: String, required: false },
|
|
15
|
+
active: { type: Boolean, required: false },
|
|
16
|
+
activeMode: { type: String, required: false },
|
|
17
|
+
activeVariant: { type: String, required: false },
|
|
18
|
+
activeColor: { type: null, required: false },
|
|
14
19
|
classes: { type: Object, required: false }
|
|
15
20
|
});
|
|
16
21
|
const theme = useTheme();
|
|
@@ -15,6 +15,16 @@ export interface TransitionProps {
|
|
|
15
15
|
* @default `0`
|
|
16
16
|
*/
|
|
17
17
|
delay?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Controls the timing sequence of leaving/entering transitions.
|
|
20
|
+
* Default behavior is simultaneous.
|
|
21
|
+
*/
|
|
22
|
+
mode?: 'in-out' | 'out-in' | 'default';
|
|
23
|
+
/**
|
|
24
|
+
* Whether to apply transition on initial render.
|
|
25
|
+
* Default: false
|
|
26
|
+
*/
|
|
27
|
+
appear?: boolean;
|
|
18
28
|
}
|
|
19
29
|
declare var __VLS_9: {};
|
|
20
30
|
type __VLS_Slots = {} & {
|
|
@@ -3,11 +3,15 @@ import { computed } from "vue";
|
|
|
3
3
|
const {
|
|
4
4
|
name = "pop-bottom-left",
|
|
5
5
|
duration = 250,
|
|
6
|
-
delay
|
|
6
|
+
delay,
|
|
7
|
+
appear,
|
|
8
|
+
mode
|
|
7
9
|
} = defineProps({
|
|
8
10
|
name: { type: String, required: false },
|
|
9
11
|
duration: { type: Number, required: false },
|
|
10
|
-
delay: { type: Number, required: false }
|
|
12
|
+
delay: { type: Number, required: false },
|
|
13
|
+
mode: { type: String, required: false },
|
|
14
|
+
appear: { type: Boolean, required: false }
|
|
11
15
|
});
|
|
12
16
|
const emit = defineEmits(["afterLeave"]);
|
|
13
17
|
const style = computed(() => ({
|
|
@@ -17,7 +21,14 @@ const style = computed(() => ({
|
|
|
17
21
|
</script>
|
|
18
22
|
|
|
19
23
|
<template>
|
|
20
|
-
<Transition
|
|
24
|
+
<Transition
|
|
25
|
+
:class='$style.root'
|
|
26
|
+
:style
|
|
27
|
+
:name
|
|
28
|
+
:mode
|
|
29
|
+
:appear
|
|
30
|
+
@after-leave='() => emit("afterLeave")'
|
|
31
|
+
>
|
|
21
32
|
<slot />
|
|
22
33
|
</Transition>
|
|
23
34
|
</template>
|
|
@@ -15,6 +15,16 @@ export interface TransitionProps {
|
|
|
15
15
|
* @default `0`
|
|
16
16
|
*/
|
|
17
17
|
delay?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Controls the timing sequence of leaving/entering transitions.
|
|
20
|
+
* Default behavior is simultaneous.
|
|
21
|
+
*/
|
|
22
|
+
mode?: 'in-out' | 'out-in' | 'default';
|
|
23
|
+
/**
|
|
24
|
+
* Whether to apply transition on initial render.
|
|
25
|
+
* Default: false
|
|
26
|
+
*/
|
|
27
|
+
appear?: boolean;
|
|
18
28
|
}
|
|
19
29
|
declare var __VLS_9: {};
|
|
20
30
|
type __VLS_Slots = {} & {
|
|
@@ -2,5 +2,6 @@ import type { VariantColorResolverOptions } from '@nui/utils';
|
|
|
2
2
|
/** Returns the configured icon registry merged with module defaults. */
|
|
3
3
|
export declare function useConfig(): {
|
|
4
4
|
icons: any;
|
|
5
|
+
activeVariants: any;
|
|
5
6
|
variantResolver: (options: VariantColorResolverOptions) => import("#imports").VariantColorResolverResult;
|
|
6
7
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { createVariantColorResolver } from "@nui/utils";
|
|
2
2
|
import { useAppConfig } from "#imports";
|
|
3
3
|
export function useConfig() {
|
|
4
|
-
const { icons, gradient } = useAppConfig().nui;
|
|
4
|
+
const { icons, gradient, activeVariants } = useAppConfig().nui;
|
|
5
5
|
return {
|
|
6
6
|
icons,
|
|
7
|
+
activeVariants,
|
|
7
8
|
variantResolver: (options) => createVariantColorResolver({
|
|
8
9
|
...options,
|
|
9
10
|
gradient: options.gradient ?? gradient
|
|
@@ -3,14 +3,12 @@ import { $modals } from "./modal-manager";
|
|
|
3
3
|
</script>
|
|
4
4
|
|
|
5
5
|
<template>
|
|
6
|
-
<
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
</div>
|
|
15
|
-
</ClientOnly>
|
|
6
|
+
<div id='nui-modals-root'>
|
|
7
|
+
<component
|
|
8
|
+
:is='entry.component'
|
|
9
|
+
v-for='[id, entry] in $modals.modals'
|
|
10
|
+
:key='id'
|
|
11
|
+
v-bind='entry.props'
|
|
12
|
+
/>
|
|
13
|
+
</div>
|
|
16
14
|
</template>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Variant an ActionIcon switches to when `active`, keyed by its base variant. */
|
|
2
|
+
export declare const DEFAULT_ACTIVE_VARIANTS: {
|
|
3
|
+
readonly default: "filled";
|
|
4
|
+
readonly light: "filled";
|
|
5
|
+
readonly outline: "filled";
|
|
6
|
+
readonly subtle: "light";
|
|
7
|
+
readonly filled: "filled";
|
|
8
|
+
readonly gradient: "gradient";
|
|
9
|
+
readonly 'gradient-outline': "gradient";
|
|
10
|
+
};
|
|
11
|
+
export type ActiveVariantsMap = Record<keyof typeof DEFAULT_ACTIVE_VARIANTS, string>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuance-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "A modern Nuxt UI library inspired by the best of the React ecosystem.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"dev": "npm run dev:prepare && nuxi dev playground",
|
|
47
47
|
"dev:build": "nuxi build playground",
|
|
48
48
|
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
|
|
49
|
-
"release": "npm run lint && npm run prepack && changelogen --release && git push --follow-tags",
|
|
49
|
+
"release": "npm run lint && npm run prepack && changelogen --release --minor && git push --follow-tags",
|
|
50
50
|
"lint": "eslint ./src",
|
|
51
51
|
"test": "vitest run",
|
|
52
52
|
"test:watch": "vitest watch",
|
|
@@ -77,11 +77,11 @@
|
|
|
77
77
|
}
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
|
-
"@antfu/eslint-config": "^
|
|
81
|
-
"@nuxt/icon": "^2.2.1",
|
|
80
|
+
"@antfu/eslint-config": "^9.1.0",
|
|
82
81
|
"@nuxt/devtools": "^3.1.1",
|
|
83
82
|
"@nuxt/eslint": "1.10.0",
|
|
84
83
|
"@nuxt/eslint-config": "^1.13.0",
|
|
84
|
+
"@nuxt/icon": "^2.2.1",
|
|
85
85
|
"@nuxt/image": "^2.0.0",
|
|
86
86
|
"@nuxt/module-builder": "^1.0.2",
|
|
87
87
|
"@nuxt/schema": "^4.4.2",
|