@vue-interface/btn-dropdown 2.0.0-beta.13 → 2.0.0-beta.14
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/index.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export type BtnDropdownProps = {
|
|
2
|
+
label?: string;
|
|
3
|
+
split?: boolean;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
6
|
+
label: {
|
|
7
|
+
type: import("vue").PropType<string>;
|
|
8
|
+
};
|
|
9
|
+
split: {
|
|
10
|
+
type: import("vue").PropType<boolean>;
|
|
11
|
+
};
|
|
12
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
|
+
click: (e: Event) => void;
|
|
14
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
15
|
+
label: {
|
|
16
|
+
type: import("vue").PropType<string>;
|
|
17
|
+
};
|
|
18
|
+
split: {
|
|
19
|
+
type: import("vue").PropType<boolean>;
|
|
20
|
+
};
|
|
21
|
+
}>> & {
|
|
22
|
+
onClick?: (e: Event) => any;
|
|
23
|
+
}, {}, {}>, {
|
|
24
|
+
icon?(_: {}): any;
|
|
25
|
+
label?(_: {}): any;
|
|
26
|
+
button?(_: any): any;
|
|
27
|
+
split?(_: any): any;
|
|
28
|
+
default?(_: {}): any;
|
|
29
|
+
}>;
|
|
30
|
+
export default _default;
|
|
31
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
32
|
+
new (): {
|
|
33
|
+
$slots: S;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
expanded: {
|
|
3
|
+
type: BooleanConstructor;
|
|
4
|
+
default: boolean;
|
|
5
|
+
};
|
|
6
|
+
id: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
default: any;
|
|
9
|
+
};
|
|
10
|
+
href: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: any;
|
|
13
|
+
};
|
|
14
|
+
to: {
|
|
15
|
+
type: (StringConstructor | ObjectConstructor)[];
|
|
16
|
+
default: any;
|
|
17
|
+
};
|
|
18
|
+
}, unknown, unknown, {
|
|
19
|
+
is(): "router-link" | "a" | "button";
|
|
20
|
+
}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
21
|
+
expanded: {
|
|
22
|
+
type: BooleanConstructor;
|
|
23
|
+
default: boolean;
|
|
24
|
+
};
|
|
25
|
+
id: {
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
default: any;
|
|
28
|
+
};
|
|
29
|
+
href: {
|
|
30
|
+
type: StringConstructor;
|
|
31
|
+
default: any;
|
|
32
|
+
};
|
|
33
|
+
to: {
|
|
34
|
+
type: (StringConstructor | ObjectConstructor)[];
|
|
35
|
+
default: any;
|
|
36
|
+
};
|
|
37
|
+
}>>, {
|
|
38
|
+
expanded: boolean;
|
|
39
|
+
id: string;
|
|
40
|
+
href: string;
|
|
41
|
+
to: string | Record<string, any>;
|
|
42
|
+
}, {}>;
|
|
43
|
+
export default _default;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
2
|
+
active: {
|
|
3
|
+
type: import("vue").PropType<boolean>;
|
|
4
|
+
};
|
|
5
|
+
align: {
|
|
6
|
+
type: import("vue").PropType<"left" | "right">;
|
|
7
|
+
};
|
|
8
|
+
buttonClass: {
|
|
9
|
+
type: import("vue").PropType<string | Record<string, boolean>>;
|
|
10
|
+
};
|
|
11
|
+
dropdown: {
|
|
12
|
+
type: import("vue").PropType<boolean>;
|
|
13
|
+
};
|
|
14
|
+
dropup: {
|
|
15
|
+
type: import("vue").PropType<boolean>;
|
|
16
|
+
};
|
|
17
|
+
dropleft: {
|
|
18
|
+
type: import("vue").PropType<boolean>;
|
|
19
|
+
};
|
|
20
|
+
dropright: {
|
|
21
|
+
type: import("vue").PropType<boolean>;
|
|
22
|
+
};
|
|
23
|
+
label: {
|
|
24
|
+
type: import("vue").PropType<string>;
|
|
25
|
+
};
|
|
26
|
+
offset: {
|
|
27
|
+
type: import("vue").PropType<number>;
|
|
28
|
+
};
|
|
29
|
+
size: {
|
|
30
|
+
type: import("vue").PropType<string>;
|
|
31
|
+
};
|
|
32
|
+
split: {
|
|
33
|
+
type: import("vue").PropType<boolean>;
|
|
34
|
+
};
|
|
35
|
+
variant: {
|
|
36
|
+
type: import("vue").PropType<string>;
|
|
37
|
+
};
|
|
38
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
39
|
+
click: (e: PointerEvent) => void;
|
|
40
|
+
"click-toggle": (e: PointerEvent) => void;
|
|
41
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
42
|
+
active: {
|
|
43
|
+
type: import("vue").PropType<boolean>;
|
|
44
|
+
};
|
|
45
|
+
align: {
|
|
46
|
+
type: import("vue").PropType<"left" | "right">;
|
|
47
|
+
};
|
|
48
|
+
buttonClass: {
|
|
49
|
+
type: import("vue").PropType<string | Record<string, boolean>>;
|
|
50
|
+
};
|
|
51
|
+
dropdown: {
|
|
52
|
+
type: import("vue").PropType<boolean>;
|
|
53
|
+
};
|
|
54
|
+
dropup: {
|
|
55
|
+
type: import("vue").PropType<boolean>;
|
|
56
|
+
};
|
|
57
|
+
dropleft: {
|
|
58
|
+
type: import("vue").PropType<boolean>;
|
|
59
|
+
};
|
|
60
|
+
dropright: {
|
|
61
|
+
type: import("vue").PropType<boolean>;
|
|
62
|
+
};
|
|
63
|
+
label: {
|
|
64
|
+
type: import("vue").PropType<string>;
|
|
65
|
+
};
|
|
66
|
+
offset: {
|
|
67
|
+
type: import("vue").PropType<number>;
|
|
68
|
+
};
|
|
69
|
+
size: {
|
|
70
|
+
type: import("vue").PropType<string>;
|
|
71
|
+
};
|
|
72
|
+
split: {
|
|
73
|
+
type: import("vue").PropType<boolean>;
|
|
74
|
+
};
|
|
75
|
+
variant: {
|
|
76
|
+
type: import("vue").PropType<string>;
|
|
77
|
+
};
|
|
78
|
+
}>> & {
|
|
79
|
+
onClick?: (e: PointerEvent) => any;
|
|
80
|
+
"onClick-toggle"?: (e: PointerEvent) => any;
|
|
81
|
+
}, {}, {}>, {
|
|
82
|
+
button?(_: {
|
|
83
|
+
expanded: boolean;
|
|
84
|
+
target: HTMLElement | import("vue").ComponentPublicInstance;
|
|
85
|
+
toggle: () => void;
|
|
86
|
+
onBlur: (e: any) => void;
|
|
87
|
+
onClickToggle: (e: PointerEvent) => void;
|
|
88
|
+
onClickItem: (e: any) => void;
|
|
89
|
+
onKeydown: (e: KeyboardEvent) => void;
|
|
90
|
+
}): any;
|
|
91
|
+
icon?(_: {}): any;
|
|
92
|
+
label?(_: {}): any;
|
|
93
|
+
default?(_: {}): any;
|
|
94
|
+
}>;
|
|
95
|
+
export default _default;
|
|
96
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
97
|
+
new (): {
|
|
98
|
+
$slots: S;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
2
|
+
active: {
|
|
3
|
+
type: import("vue").PropType<boolean>;
|
|
4
|
+
};
|
|
5
|
+
align: {
|
|
6
|
+
type: import("vue").PropType<"left" | "right">;
|
|
7
|
+
};
|
|
8
|
+
buttonClass: {
|
|
9
|
+
type: import("vue").PropType<string | Record<string, boolean>>;
|
|
10
|
+
};
|
|
11
|
+
dropdown: {
|
|
12
|
+
type: import("vue").PropType<boolean>;
|
|
13
|
+
};
|
|
14
|
+
dropup: {
|
|
15
|
+
type: import("vue").PropType<boolean>;
|
|
16
|
+
};
|
|
17
|
+
dropleft: {
|
|
18
|
+
type: import("vue").PropType<boolean>;
|
|
19
|
+
};
|
|
20
|
+
dropright: {
|
|
21
|
+
type: import("vue").PropType<boolean>;
|
|
22
|
+
};
|
|
23
|
+
label: {
|
|
24
|
+
type: import("vue").PropType<string>;
|
|
25
|
+
};
|
|
26
|
+
offset: {
|
|
27
|
+
type: import("vue").PropType<number>;
|
|
28
|
+
};
|
|
29
|
+
size: {
|
|
30
|
+
type: import("vue").PropType<string>;
|
|
31
|
+
};
|
|
32
|
+
split: {
|
|
33
|
+
type: import("vue").PropType<boolean>;
|
|
34
|
+
};
|
|
35
|
+
variant: {
|
|
36
|
+
type: import("vue").PropType<string>;
|
|
37
|
+
};
|
|
38
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
39
|
+
click: (e: PointerEvent) => void;
|
|
40
|
+
"click-toggle": (e: PointerEvent) => void;
|
|
41
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
42
|
+
active: {
|
|
43
|
+
type: import("vue").PropType<boolean>;
|
|
44
|
+
};
|
|
45
|
+
align: {
|
|
46
|
+
type: import("vue").PropType<"left" | "right">;
|
|
47
|
+
};
|
|
48
|
+
buttonClass: {
|
|
49
|
+
type: import("vue").PropType<string | Record<string, boolean>>;
|
|
50
|
+
};
|
|
51
|
+
dropdown: {
|
|
52
|
+
type: import("vue").PropType<boolean>;
|
|
53
|
+
};
|
|
54
|
+
dropup: {
|
|
55
|
+
type: import("vue").PropType<boolean>;
|
|
56
|
+
};
|
|
57
|
+
dropleft: {
|
|
58
|
+
type: import("vue").PropType<boolean>;
|
|
59
|
+
};
|
|
60
|
+
dropright: {
|
|
61
|
+
type: import("vue").PropType<boolean>;
|
|
62
|
+
};
|
|
63
|
+
label: {
|
|
64
|
+
type: import("vue").PropType<string>;
|
|
65
|
+
};
|
|
66
|
+
offset: {
|
|
67
|
+
type: import("vue").PropType<number>;
|
|
68
|
+
};
|
|
69
|
+
size: {
|
|
70
|
+
type: import("vue").PropType<string>;
|
|
71
|
+
};
|
|
72
|
+
split: {
|
|
73
|
+
type: import("vue").PropType<boolean>;
|
|
74
|
+
};
|
|
75
|
+
variant: {
|
|
76
|
+
type: import("vue").PropType<string>;
|
|
77
|
+
};
|
|
78
|
+
}>> & {
|
|
79
|
+
onClick?: (e: PointerEvent) => any;
|
|
80
|
+
"onClick-toggle"?: (e: PointerEvent) => any;
|
|
81
|
+
}, {}, {}>, {
|
|
82
|
+
button?(_: {
|
|
83
|
+
expanded: boolean;
|
|
84
|
+
onBlur: (e: any) => void;
|
|
85
|
+
onClickToggle: (e: PointerEvent) => void;
|
|
86
|
+
onClickItem: (e: any) => void;
|
|
87
|
+
onKeydown: (e: KeyboardEvent) => void;
|
|
88
|
+
}): any;
|
|
89
|
+
icon?(_: {}): any;
|
|
90
|
+
label?(_: {}): any;
|
|
91
|
+
split?(_: {}): any;
|
|
92
|
+
default?(_: {}): any;
|
|
93
|
+
}>;
|
|
94
|
+
export default _default;
|
|
95
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
96
|
+
new (): {
|
|
97
|
+
$slots: S;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ComponentPublicInstance } from 'vue';
|
|
2
|
+
export type BtnDropdownProps = {
|
|
3
|
+
active?: boolean;
|
|
4
|
+
align?: 'left' | 'right';
|
|
5
|
+
buttonClass?: string | Record<string | undefined, boolean>;
|
|
6
|
+
dropdown?: boolean;
|
|
7
|
+
dropup?: boolean;
|
|
8
|
+
dropleft?: boolean;
|
|
9
|
+
dropright?: boolean;
|
|
10
|
+
label?: string;
|
|
11
|
+
offset?: number;
|
|
12
|
+
size?: string;
|
|
13
|
+
split?: boolean;
|
|
14
|
+
variant?: string;
|
|
15
|
+
};
|
|
16
|
+
export type BtnDropdownEmits = {
|
|
17
|
+
(name: 'click', e: PointerEvent): void;
|
|
18
|
+
(name: 'click-toggle', e: PointerEvent): void;
|
|
19
|
+
};
|
|
20
|
+
export declare function useBtnDropdown<Props extends BtnDropdownProps, Emits extends BtnDropdownEmits>(props: Props, emit: Emits): {
|
|
21
|
+
actionClasses: import("vue").ComputedRef<{
|
|
22
|
+
btn: boolean;
|
|
23
|
+
}>;
|
|
24
|
+
classes: import("vue").ComputedRef<{
|
|
25
|
+
[x: string]: boolean;
|
|
26
|
+
dropdown: boolean;
|
|
27
|
+
dropup: boolean;
|
|
28
|
+
dropright: boolean;
|
|
29
|
+
dropleft: boolean;
|
|
30
|
+
expanded: boolean;
|
|
31
|
+
}>;
|
|
32
|
+
expanded: import("vue").Ref<boolean>;
|
|
33
|
+
menu: import("vue").Ref<HTMLElement | ComponentPublicInstance>;
|
|
34
|
+
target: import("vue").Ref<HTMLElement | ComponentPublicInstance>;
|
|
35
|
+
toggleClasses: import("vue").ComputedRef<{
|
|
36
|
+
btn: boolean;
|
|
37
|
+
active: boolean;
|
|
38
|
+
'dropdown-toggle': boolean;
|
|
39
|
+
'dropdown-toggle-split': boolean;
|
|
40
|
+
}>;
|
|
41
|
+
triggerAnimation: import("vue").Ref<boolean>;
|
|
42
|
+
hide: () => void;
|
|
43
|
+
show: () => void;
|
|
44
|
+
toggle: () => void;
|
|
45
|
+
onBlur: (e: any) => void;
|
|
46
|
+
onClickItem: (e: any) => void;
|
|
47
|
+
onClickToggle: (e: PointerEvent) => void;
|
|
48
|
+
onKeydown: (e: KeyboardEvent) => void;
|
|
49
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue-interface/btn-dropdown",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.14",
|
|
4
4
|
"description": "A Vue button dropdown component.",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"browserslist": "last 2 versions, > 0.5%, ie >= 11",
|
|
21
21
|
"scripts": {
|
|
22
22
|
"dev": "vite",
|
|
23
|
-
"build": "vite build",
|
|
23
|
+
"build": "vite build && vue-tsc",
|
|
24
24
|
"preview": "vite preview"
|
|
25
25
|
},
|
|
26
26
|
"repository": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@popperjs/core": "^2.11.2",
|
|
47
47
|
"@vue-interface/btn": "^3.0.0-beta.19",
|
|
48
|
-
"@vue-interface/btn-group": "^2.0.0-beta.
|
|
48
|
+
"@vue-interface/btn-group": "^2.0.0-beta.8",
|
|
49
49
|
"@vue-interface/dropdown-menu": "^2.0.0-beta.12"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|