@una-ui/nuxt 1.0.0-alpha.5 → 1.0.0-alpha.7
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/combobox/Combobox.vue +1 -2
- package/dist/runtime/components/combobox/Combobox.vue.d.ts +8 -8
- package/dist/runtime/components/forms/radio-group/RadioGroup.vue +1 -2
- package/dist/runtime/components/forms/radio-group/RadioGroup.vue.d.ts +5 -5
- package/dist/runtime/components/forms/radio-group/RadioGroupItem.vue +1 -1
- package/dist/runtime/components/forms/radio-group/RadioGroupItem.vue.d.ts +2 -1
- package/dist/runtime/components/forms/select/Select.vue +4 -6
- package/dist/runtime/components/forms/select/Select.vue.d.ts +13 -15
- package/dist/runtime/types/combobox.d.ts +3 -2
- package/dist/runtime/types/radio-group.d.ts +5 -3
- package/dist/runtime/types/select.d.ts +6 -3
- package/package.json +3 -3
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -25,6 +25,7 @@ const props = defineProps({
|
|
|
25
25
|
groupSeparator: { type: Boolean, required: false },
|
|
26
26
|
textEmpty: { type: String, required: false, default: "No items found." },
|
|
27
27
|
label: { type: String, required: false },
|
|
28
|
+
multiple: { type: null, required: false },
|
|
28
29
|
_comboboxAnchor: { type: Object, required: false },
|
|
29
30
|
_comboboxEmpty: { type: Object, required: false },
|
|
30
31
|
_comboboxGroup: { type: Object, required: false },
|
|
@@ -46,7 +47,6 @@ const props = defineProps({
|
|
|
46
47
|
resetSearchTermOnSelect: { type: Boolean, required: false },
|
|
47
48
|
ignoreFilter: { type: Boolean, required: false },
|
|
48
49
|
defaultValue: { type: null, required: false },
|
|
49
|
-
multiple: { type: Boolean, required: false },
|
|
50
50
|
dir: { type: String, required: false },
|
|
51
51
|
disabled: { type: Boolean, required: false },
|
|
52
52
|
highlightOnHover: { type: Boolean, required: false },
|
|
@@ -139,7 +139,6 @@ function isItemSelected(item) {
|
|
|
139
139
|
|
|
140
140
|
<template>
|
|
141
141
|
<ComboboxRoot
|
|
142
|
-
v-slot="{ modelValue, open }"
|
|
143
142
|
data-slot="combobox"
|
|
144
143
|
:class="cn(
|
|
145
144
|
'combobox',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AcceptableValue } from 'reka-ui';
|
|
2
2
|
import type { ExtractItemType, NComboboxGroupProps, NComboboxProps } from '../../types/index.js';
|
|
3
|
-
declare const _default: <T extends AcceptableValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
declare const _default: <T extends AcceptableValue, M extends boolean = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
4
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
5
5
|
readonly "onUpdate:modelValue"?: ((value: ExtractItemType<T>) => any) | undefined;
|
|
6
6
|
readonly onHighlight?: ((payload: {
|
|
@@ -8,7 +8,7 @@ declare const _default: <T extends AcceptableValue>(__VLS_props: NonNullable<Awa
|
|
|
8
8
|
value: ExtractItemType<T>;
|
|
9
9
|
} | undefined) => any) | undefined;
|
|
10
10
|
readonly "onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
11
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue" | "onHighlight" | "onUpdate:open"> & NComboboxProps<T> & Partial<{}>> & import("vue").PublicProps;
|
|
11
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue" | "onHighlight" | "onUpdate:open"> & NComboboxProps<T, M> & Partial<{}>> & import("vue").PublicProps;
|
|
12
12
|
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
13
13
|
attrs: any;
|
|
14
14
|
slots: {
|
|
@@ -19,20 +19,20 @@ declare const _default: <T extends AcceptableValue>(__VLS_props: NonNullable<Awa
|
|
|
19
19
|
'trigger-wrapper'?: (props: {}) => any;
|
|
20
20
|
} & {
|
|
21
21
|
trigger?: (props: {
|
|
22
|
-
modelValue:
|
|
23
|
-
open:
|
|
22
|
+
modelValue: (M extends true ? ExtractItemType<T>[] : ExtractItemType<T>) | null | undefined;
|
|
23
|
+
open: boolean | undefined;
|
|
24
24
|
}) => any;
|
|
25
25
|
} & {
|
|
26
26
|
'input-wrapper'?: (props: {
|
|
27
|
-
modelValue:
|
|
28
|
-
open:
|
|
27
|
+
modelValue: (M extends true ? ExtractItemType<T>[] : ExtractItemType<T>) | null | undefined;
|
|
28
|
+
open: boolean | undefined;
|
|
29
29
|
}) => any;
|
|
30
30
|
} & {
|
|
31
31
|
list?: (props: {}) => any;
|
|
32
32
|
} & {
|
|
33
33
|
'input-wrapper'?: (props: {
|
|
34
|
-
modelValue:
|
|
35
|
-
open:
|
|
34
|
+
modelValue: (M extends true ? ExtractItemType<T>[] : ExtractItemType<T>) | null | undefined;
|
|
35
|
+
open: boolean | undefined;
|
|
36
36
|
}) => any;
|
|
37
37
|
} & {
|
|
38
38
|
header?: (props: {}) => any;
|
|
@@ -8,6 +8,7 @@ import { RadioGroupRoot, useForwardPropsEmits } from "reka-ui";
|
|
|
8
8
|
import { cn } from "../../../utils";
|
|
9
9
|
import RadioGroupItem from "./RadioGroupItem.vue";
|
|
10
10
|
const props = defineProps({
|
|
11
|
+
modelValue: { type: null, required: true },
|
|
11
12
|
items: { type: Array, required: false },
|
|
12
13
|
labelKey: { type: null, required: false },
|
|
13
14
|
valueKey: { type: null, required: false },
|
|
@@ -20,7 +21,6 @@ const props = defineProps({
|
|
|
20
21
|
square: { type: null, required: false, default: "1em" },
|
|
21
22
|
rounded: { type: null, required: false },
|
|
22
23
|
icon: { type: null, required: false },
|
|
23
|
-
modelValue: { type: null, required: false },
|
|
24
24
|
defaultValue: { type: null, required: false },
|
|
25
25
|
disabled: { type: Boolean, required: false },
|
|
26
26
|
orientation: { type: String, required: false },
|
|
@@ -71,7 +71,6 @@ function getItemDescription(item) {
|
|
|
71
71
|
|
|
72
72
|
<template>
|
|
73
73
|
<RadioGroupRoot
|
|
74
|
-
v-slot="{ modelValue }"
|
|
75
74
|
:class="cn(
|
|
76
75
|
'radio-group',
|
|
77
76
|
orientation === 'horizontal' ? 'radio-group-orientation-horizontal' : 'radio-group-orientation-vertical',
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import type { AcceptableValue } from 'reka-ui';
|
|
2
2
|
import type { NRadioGroupItemProps, NRadioGroupProps } from '../../../types/index.js';
|
|
3
|
-
declare const _default: <T extends AcceptableValue
|
|
3
|
+
declare const _default: <T extends AcceptableValue, Item extends T | NRadioGroupItemProps<T>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
4
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
5
5
|
readonly "onUpdate:modelValue"?: ((payload: string) => any) | undefined;
|
|
6
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue"> & NRadioGroupProps<T> & Partial<{}>> & import("vue").PublicProps;
|
|
6
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue"> & NRadioGroupProps<T, Item> & Partial<{}>> & import("vue").PublicProps;
|
|
7
7
|
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
8
8
|
attrs: any;
|
|
9
9
|
slots: {
|
|
10
10
|
default?: (props: {
|
|
11
|
-
modelValue:
|
|
11
|
+
modelValue: T;
|
|
12
12
|
}) => any;
|
|
13
13
|
} & {
|
|
14
14
|
label?: (props: {
|
|
15
|
-
item:
|
|
15
|
+
item: Item;
|
|
16
16
|
}) => any;
|
|
17
17
|
} & {
|
|
18
18
|
description?: (props: {
|
|
19
|
-
item:
|
|
19
|
+
item: Item;
|
|
20
20
|
}) => any;
|
|
21
21
|
};
|
|
22
22
|
emit: (evt: "update:modelValue", payload: string) => void;
|
|
@@ -12,6 +12,7 @@ defineOptions({
|
|
|
12
12
|
inheritAttrs: false
|
|
13
13
|
});
|
|
14
14
|
const props = defineProps({
|
|
15
|
+
value: { type: null, required: true },
|
|
15
16
|
label: { type: String, required: false },
|
|
16
17
|
radioGroup: { type: null, required: false, default: "primary" },
|
|
17
18
|
description: { type: String, required: false },
|
|
@@ -22,7 +23,6 @@ const props = defineProps({
|
|
|
22
23
|
rounded: { type: null, required: false },
|
|
23
24
|
icon: { type: null, required: false, default: "radio-group-indicator-icon" },
|
|
24
25
|
id: { type: String, required: false },
|
|
25
|
-
value: { type: null, required: false },
|
|
26
26
|
disabled: { type: Boolean, required: false },
|
|
27
27
|
asChild: { type: Boolean, required: false },
|
|
28
28
|
as: { type: null, required: false },
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { NRadioGroupItemProps } from '../../../types/index.js';
|
|
2
|
+
type __VLS_Props = NRadioGroupItemProps;
|
|
2
3
|
declare var __VLS_9: {}, __VLS_17: {}, __VLS_19: {};
|
|
3
4
|
type __VLS_Slots = {} & {
|
|
4
5
|
icon?: (props: typeof __VLS_9) => any;
|
|
@@ -7,7 +8,7 @@ type __VLS_Slots = {} & {
|
|
|
7
8
|
} & {
|
|
8
9
|
description?: (props: typeof __VLS_19) => any;
|
|
9
10
|
};
|
|
10
|
-
declare const __VLS_component: import("vue").DefineComponent<
|
|
11
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
11
12
|
icon: import("vue").HTMLAttributes["class"];
|
|
12
13
|
size: import("vue").HTMLAttributes["class"];
|
|
13
14
|
square: import("vue").HTMLAttributes["class"];
|
|
@@ -13,11 +13,14 @@ import SelectSeparator from "./SelectSeparator.vue";
|
|
|
13
13
|
import SelectTrigger from "./SelectTrigger.vue";
|
|
14
14
|
import SelectValue from "./SelectValue.vue";
|
|
15
15
|
const props = defineProps({
|
|
16
|
-
items: { type:
|
|
16
|
+
items: { type: null, required: true },
|
|
17
17
|
itemKey: { type: null, required: false },
|
|
18
18
|
valueKey: { type: null, required: false },
|
|
19
19
|
label: { type: String, required: false },
|
|
20
20
|
groupSeparator: { type: Boolean, required: false },
|
|
21
|
+
defaultValue: { type: null, required: false },
|
|
22
|
+
modelValue: { type: null, required: false },
|
|
23
|
+
multiple: { type: null, required: false },
|
|
21
24
|
_selectScrollUpButton: { type: Object, required: false },
|
|
22
25
|
_selectItemText: { type: Object, required: false },
|
|
23
26
|
_selectScrollDownButton: { type: Object, required: false },
|
|
@@ -31,11 +34,8 @@ const props = defineProps({
|
|
|
31
34
|
una: { type: Object, required: false },
|
|
32
35
|
open: { type: Boolean, required: false },
|
|
33
36
|
defaultOpen: { type: Boolean, required: false },
|
|
34
|
-
defaultValue: { type: null, required: false },
|
|
35
|
-
modelValue: { type: null, required: false },
|
|
36
37
|
by: { type: [String, Function], required: false },
|
|
37
38
|
dir: { type: String, required: false },
|
|
38
|
-
multiple: { type: Boolean, required: false },
|
|
39
39
|
autocomplete: { type: String, required: false },
|
|
40
40
|
disabled: { type: Boolean, required: false },
|
|
41
41
|
name: { type: String, required: false },
|
|
@@ -87,7 +87,6 @@ function isItemSelected(item, modelValue) {
|
|
|
87
87
|
|
|
88
88
|
<template>
|
|
89
89
|
<SelectRoot
|
|
90
|
-
v-slot="{ modelValue, open }"
|
|
91
90
|
:class="cn(
|
|
92
91
|
props.una?.select,
|
|
93
92
|
props.class
|
|
@@ -211,7 +210,6 @@ function isItemSelected(item, modelValue) {
|
|
|
211
210
|
</slot>
|
|
212
211
|
</SelectGroup>
|
|
213
212
|
</template>
|
|
214
|
-
<slot />
|
|
215
213
|
</slot>
|
|
216
214
|
</SelectContent>
|
|
217
215
|
</slot>
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import type { AcceptableValue } from 'reka-ui';
|
|
2
2
|
import type { NSelectProps, SelectGroup as SelectGroupType } from '../../../types/index.js';
|
|
3
|
-
declare const _default: <T extends AcceptableValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
declare const _default: <T extends AcceptableValue, I extends Array<T | SelectGroupType<T>>, M extends boolean = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
4
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
5
5
|
readonly "onUpdate:modelValue"?: ((value: T) => any) | undefined;
|
|
6
6
|
readonly "onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
7
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue" | "onUpdate:open"> & NSelectProps<T> & Partial<{}>> & import("vue").PublicProps;
|
|
7
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue" | "onUpdate:open"> & NSelectProps<T, I, M> & Partial<{}>> & import("vue").PublicProps;
|
|
8
8
|
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
9
9
|
attrs: any;
|
|
10
10
|
slots: {
|
|
11
11
|
default?: (props: {
|
|
12
|
-
modelValue:
|
|
13
|
-
open:
|
|
12
|
+
modelValue: (M extends true ? T[] : T) | undefined;
|
|
13
|
+
open: boolean | undefined;
|
|
14
14
|
}) => any;
|
|
15
15
|
} & {
|
|
16
16
|
'trigger-wrapper'?: (props: {
|
|
17
|
-
modelValue:
|
|
18
|
-
open:
|
|
17
|
+
modelValue: (M extends true ? T[] : T) | undefined;
|
|
18
|
+
open: boolean | undefined;
|
|
19
19
|
}) => any;
|
|
20
20
|
} & {
|
|
21
21
|
trigger?: (props: {
|
|
22
|
-
modelValue:
|
|
23
|
-
open:
|
|
22
|
+
modelValue: (M extends true ? T[] : T) | undefined;
|
|
23
|
+
open: boolean | undefined;
|
|
24
24
|
}) => any;
|
|
25
25
|
} & {
|
|
26
26
|
value?: (props: {
|
|
27
|
-
modelValue:
|
|
28
|
-
open:
|
|
27
|
+
modelValue: (M extends true ? T[] : T) | undefined;
|
|
28
|
+
open: boolean | undefined;
|
|
29
29
|
}) => any;
|
|
30
30
|
} & {
|
|
31
31
|
content?: (props: {
|
|
32
|
-
items:
|
|
32
|
+
items: I;
|
|
33
33
|
}) => any;
|
|
34
34
|
} & {
|
|
35
35
|
label?: (props: {
|
|
@@ -37,11 +37,11 @@ declare const _default: <T extends AcceptableValue>(__VLS_props: NonNullable<Awa
|
|
|
37
37
|
}) => any;
|
|
38
38
|
} & {
|
|
39
39
|
item?: (props: {
|
|
40
|
-
item:
|
|
40
|
+
item: I extends number ? number : I extends string ? string : I extends any[] ? I[number] : I extends Iterable<infer T1> ? T1 : any;
|
|
41
41
|
}) => any;
|
|
42
42
|
} & {
|
|
43
43
|
indicator?: (props: {
|
|
44
|
-
item:
|
|
44
|
+
item: I extends number ? number : I extends string ? string : I extends any[] ? I[number] : I extends Iterable<infer T1> ? T1 : any;
|
|
45
45
|
}) => any;
|
|
46
46
|
} & {
|
|
47
47
|
group?: (props: {
|
|
@@ -59,8 +59,6 @@ declare const _default: <T extends AcceptableValue>(__VLS_props: NonNullable<Awa
|
|
|
59
59
|
indicator?: (props: {
|
|
60
60
|
item: T;
|
|
61
61
|
}) => any;
|
|
62
|
-
} & {
|
|
63
|
-
default?: (props: {}) => any;
|
|
64
62
|
};
|
|
65
63
|
emit: ((evt: "update:modelValue", value: T) => void) & ((evt: "update:open", value: boolean) => void);
|
|
66
64
|
}>) => import("vue").VNode & {
|
|
@@ -10,12 +10,12 @@ interface BaseExtensions {
|
|
|
10
10
|
export type ExtractItemType<T> = T extends {
|
|
11
11
|
items: infer I extends AcceptableValue[];
|
|
12
12
|
} ? I[number] : T;
|
|
13
|
-
export interface NComboboxProps<T extends AcceptableValue> extends Omit<ComboboxRootProps<ExtractItemType<T>>, 'modelValue'>, Pick<NComboboxInputProps, 'status' | 'id'>, BaseExtensions {
|
|
13
|
+
export interface NComboboxProps<T extends AcceptableValue, M extends boolean> extends Omit<ComboboxRootProps<ExtractItemType<T>>, 'modelValue'>, Pick<NComboboxInputProps, 'status' | 'id'>, BaseExtensions {
|
|
14
14
|
/**
|
|
15
15
|
* The model value for the combobox.
|
|
16
16
|
* When using grouped items, this will be the item type from within the groups.
|
|
17
17
|
*/
|
|
18
|
-
modelValue?: ExtractItemType<T>
|
|
18
|
+
modelValue?: (M extends true ? ExtractItemType<T>[] : ExtractItemType<T>) | null;
|
|
19
19
|
/**
|
|
20
20
|
* The items to display in the combobox.
|
|
21
21
|
*
|
|
@@ -52,6 +52,7 @@ export interface NComboboxProps<T extends AcceptableValue> extends Omit<Combobox
|
|
|
52
52
|
* @default ''
|
|
53
53
|
*/
|
|
54
54
|
label?: string;
|
|
55
|
+
multiple?: M;
|
|
55
56
|
/**
|
|
56
57
|
* Sub-component configurations
|
|
57
58
|
*/
|
|
@@ -22,11 +22,12 @@ interface BaseProps {
|
|
|
22
22
|
*/
|
|
23
23
|
icon?: HTMLAttributes['class'];
|
|
24
24
|
}
|
|
25
|
-
export interface NRadioGroupProps<T extends AcceptableValue
|
|
25
|
+
export interface NRadioGroupProps<T extends AcceptableValue, Item extends T | NRadioGroupItemProps<T>> extends BaseProps, RadioGroupRootProps {
|
|
26
|
+
modelValue: T;
|
|
26
27
|
/**
|
|
27
28
|
* The items to display in the radio group.
|
|
28
29
|
*/
|
|
29
|
-
items?:
|
|
30
|
+
items?: Item[];
|
|
30
31
|
/**
|
|
31
32
|
* The key name to use to display in the radio items.
|
|
32
33
|
*/
|
|
@@ -61,7 +62,8 @@ export interface NRadioGroupProps<T extends AcceptableValue> extends BaseProps,
|
|
|
61
62
|
*/
|
|
62
63
|
una?: NRadioGroupUnaProps;
|
|
63
64
|
}
|
|
64
|
-
export interface NRadioGroupItemProps extends BaseProps, RadioGroupItemProps {
|
|
65
|
+
export interface NRadioGroupItemProps<T extends AcceptableValue = any> extends BaseProps, RadioGroupItemProps {
|
|
66
|
+
value: T;
|
|
65
67
|
/**
|
|
66
68
|
* The label to display in the radio item.
|
|
67
69
|
*/
|
|
@@ -15,18 +15,18 @@ type ItemTextExtensions = SelectItemTextProps & BaseExtensions;
|
|
|
15
15
|
type GroupExtensions = SelectGroupProps & BaseExtensions;
|
|
16
16
|
type LabelExtensions = SelectLabelProps & BaseExtensions;
|
|
17
17
|
type SeparatorExtensions = SelectSeparatorProps & BaseExtensions;
|
|
18
|
-
type SelectExtensions = SelectRootProps & BaseExtensions & Pick<NSelectValueProps, 'placeholder'> & Pick<NSelectItemProps, 'selectItem'> & Pick<NSelectTriggerProps, 'status' | 'select' | 'id'>;
|
|
18
|
+
type SelectExtensions<T extends AcceptableValue> = SelectRootProps<T> & BaseExtensions & Pick<NSelectValueProps, 'placeholder'> & Pick<NSelectItemProps, 'selectItem'> & Pick<NSelectTriggerProps, 'status' | 'select' | 'id'>;
|
|
19
19
|
export interface SelectGroup<T extends AcceptableValue> {
|
|
20
20
|
label?: string;
|
|
21
21
|
items: T[];
|
|
22
22
|
_selectLabel?: Partial<NSelectLabelProps>;
|
|
23
23
|
_selectItem?: Partial<NSelectItemProps>;
|
|
24
24
|
}
|
|
25
|
-
export interface NSelectProps<T extends AcceptableValue> extends SelectExtensions {
|
|
25
|
+
export interface NSelectProps<T extends AcceptableValue, Items extends Array<T | SelectGroup<T>>, M extends boolean = false> extends SelectExtensions<T> {
|
|
26
26
|
/**
|
|
27
27
|
* The items to display in the select.
|
|
28
28
|
*/
|
|
29
|
-
items:
|
|
29
|
+
items: Items;
|
|
30
30
|
/**
|
|
31
31
|
* The key name to use to display in the select items.
|
|
32
32
|
*/
|
|
@@ -45,6 +45,9 @@ export interface NSelectProps<T extends AcceptableValue> extends SelectExtension
|
|
|
45
45
|
* @default false
|
|
46
46
|
*/
|
|
47
47
|
groupSeparator?: boolean;
|
|
48
|
+
defaultValue?: M extends true ? T[] : T;
|
|
49
|
+
modelValue?: M extends true ? T[] : T;
|
|
50
|
+
multiple?: M;
|
|
48
51
|
/**
|
|
49
52
|
* Sub-component configurations
|
|
50
53
|
*/
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@una-ui/nuxt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.0-alpha.
|
|
4
|
+
"version": "1.0.0-alpha.7",
|
|
5
5
|
"description": "Nuxt module for @una-ui",
|
|
6
6
|
"author": "Phojie Rengel <phojrengel@gmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"unocss": "^66.2.0",
|
|
59
59
|
"unocss-preset-animations": "^1.2.1",
|
|
60
60
|
"vaul-vue": "^0.4.1",
|
|
61
|
-
"@una-ui/preset": "^1.0.0-alpha.
|
|
62
|
-
"@una-ui/extractor-vue-script": "^1.0.0-alpha.
|
|
61
|
+
"@una-ui/preset": "^1.0.0-alpha.7",
|
|
62
|
+
"@una-ui/extractor-vue-script": "^1.0.0-alpha.7"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@iconify-json/lucide": "^1.2.57",
|