@dronico/droni-kit 1.14.0 → 1.16.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/CHANGELOG.md +14 -0
- package/dist/droni-kit.cjs.js +9 -9
- package/dist/droni-kit.css +1 -1
- package/dist/droni-kit.es.js +877 -418
- package/dist/index.d.ts +3 -1
- package/dist/stories/Elements/DuiModal.stories.d.ts +205 -0
- package/dist/stories/Elements/DuiModal.vue.d.ts +64 -0
- package/dist/stories/Elements/DuiTooltip.stories.d.ts +221 -0
- package/dist/stories/Elements/DuiTooltip.vue.d.ts +82 -0
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -8,5 +8,7 @@ import { default as DuiAlert } from './stories/Elements/DuiAlert.vue';
|
|
|
8
8
|
import { default as DuiTable } from './stories/Elements/DuiTable.vue';
|
|
9
9
|
import { default as DuiAction } from './stories/Elements/DuiAction.vue';
|
|
10
10
|
import { default as DuiCard } from './stories/Elements/DuiCard.vue';
|
|
11
|
+
import { default as DuiModal } from './stories/Elements/DuiModal.vue';
|
|
12
|
+
import { default as DuiTooltip } from './stories/Elements/DuiTooltip.vue';
|
|
11
13
|
import { default as DuiNavbar } from './stories/Widgets/DuiNavbar.vue';
|
|
12
|
-
export { DuiButton, DuiInput, DuiTextarea, DuiAction, DuiCard, DuiSelect, DuiLabel, DuiCheckbox, DuiAlert, DuiTable, DuiNavbar };
|
|
14
|
+
export { DuiButton, DuiInput, DuiTextarea, DuiAction, DuiCard, DuiSelect, DuiLabel, DuiCheckbox, DuiAlert, DuiTable, DuiModal, DuiTooltip, DuiNavbar };
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/vue3-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: {
|
|
5
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./DuiModal.vue').DuiModalProps> & Readonly<{
|
|
6
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
7
|
+
onOpen?: (() => any) | undefined;
|
|
8
|
+
onClose?: ((source: "button" | "backdrop" | "escape") => any) | undefined;
|
|
9
|
+
onBackdrop?: (() => any) | undefined;
|
|
10
|
+
onEscape?: (() => any) | undefined;
|
|
11
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
12
|
+
"update:modelValue": (value: boolean) => any;
|
|
13
|
+
open: () => any;
|
|
14
|
+
close: (source: "button" | "backdrop" | "escape") => any;
|
|
15
|
+
backdrop: () => any;
|
|
16
|
+
escape: () => any;
|
|
17
|
+
}, import('vue').PublicProps, {
|
|
18
|
+
variant: "solid" | "outline" | "ghost";
|
|
19
|
+
color: "neutral" | "primary" | "secondary" | "success" | "warning" | "danger";
|
|
20
|
+
size: "xs" | "sm" | "md" | "lg" | "xl" | "full";
|
|
21
|
+
title: string;
|
|
22
|
+
rounded: "all" | "top" | "bottom" | "left" | "right" | "none";
|
|
23
|
+
modelValue: boolean;
|
|
24
|
+
description: string;
|
|
25
|
+
showClose: boolean;
|
|
26
|
+
closeOnBackdrop: boolean;
|
|
27
|
+
closeOnEsc: boolean;
|
|
28
|
+
persistent: boolean;
|
|
29
|
+
centered: boolean;
|
|
30
|
+
scrollable: boolean;
|
|
31
|
+
blurBackdrop: boolean;
|
|
32
|
+
zIndex: number;
|
|
33
|
+
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
34
|
+
P: {};
|
|
35
|
+
B: {};
|
|
36
|
+
D: {};
|
|
37
|
+
C: {};
|
|
38
|
+
M: {};
|
|
39
|
+
Defaults: {};
|
|
40
|
+
}, Readonly<import('./DuiModal.vue').DuiModalProps> & Readonly<{
|
|
41
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
42
|
+
onOpen?: (() => any) | undefined;
|
|
43
|
+
onClose?: ((source: "button" | "backdrop" | "escape") => any) | undefined;
|
|
44
|
+
onBackdrop?: (() => any) | undefined;
|
|
45
|
+
onEscape?: (() => any) | undefined;
|
|
46
|
+
}>, {}, {}, {}, {}, {
|
|
47
|
+
variant: "solid" | "outline" | "ghost";
|
|
48
|
+
color: "neutral" | "primary" | "secondary" | "success" | "warning" | "danger";
|
|
49
|
+
size: "xs" | "sm" | "md" | "lg" | "xl" | "full";
|
|
50
|
+
title: string;
|
|
51
|
+
rounded: "all" | "top" | "bottom" | "left" | "right" | "none";
|
|
52
|
+
modelValue: boolean;
|
|
53
|
+
description: string;
|
|
54
|
+
showClose: boolean;
|
|
55
|
+
closeOnBackdrop: boolean;
|
|
56
|
+
closeOnEsc: boolean;
|
|
57
|
+
persistent: boolean;
|
|
58
|
+
centered: boolean;
|
|
59
|
+
scrollable: boolean;
|
|
60
|
+
blurBackdrop: boolean;
|
|
61
|
+
zIndex: number;
|
|
62
|
+
}>;
|
|
63
|
+
__isFragment?: never;
|
|
64
|
+
__isTeleport?: never;
|
|
65
|
+
__isSuspense?: never;
|
|
66
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('./DuiModal.vue').DuiModalProps> & Readonly<{
|
|
67
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
68
|
+
onOpen?: (() => any) | undefined;
|
|
69
|
+
onClose?: ((source: "button" | "backdrop" | "escape") => any) | undefined;
|
|
70
|
+
onBackdrop?: (() => any) | undefined;
|
|
71
|
+
onEscape?: (() => any) | undefined;
|
|
72
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
73
|
+
"update:modelValue": (value: boolean) => any;
|
|
74
|
+
open: () => any;
|
|
75
|
+
close: (source: "button" | "backdrop" | "escape") => any;
|
|
76
|
+
backdrop: () => any;
|
|
77
|
+
escape: () => any;
|
|
78
|
+
}, string, {
|
|
79
|
+
variant: "solid" | "outline" | "ghost";
|
|
80
|
+
color: "neutral" | "primary" | "secondary" | "success" | "warning" | "danger";
|
|
81
|
+
size: "xs" | "sm" | "md" | "lg" | "xl" | "full";
|
|
82
|
+
title: string;
|
|
83
|
+
rounded: "all" | "top" | "bottom" | "left" | "right" | "none";
|
|
84
|
+
modelValue: boolean;
|
|
85
|
+
description: string;
|
|
86
|
+
showClose: boolean;
|
|
87
|
+
closeOnBackdrop: boolean;
|
|
88
|
+
closeOnEsc: boolean;
|
|
89
|
+
persistent: boolean;
|
|
90
|
+
centered: boolean;
|
|
91
|
+
scrollable: boolean;
|
|
92
|
+
blurBackdrop: boolean;
|
|
93
|
+
zIndex: number;
|
|
94
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
95
|
+
$slots: {
|
|
96
|
+
header?(_: {}): any;
|
|
97
|
+
default?(_: {}): any;
|
|
98
|
+
footer?(_: {}): any;
|
|
99
|
+
};
|
|
100
|
+
});
|
|
101
|
+
tags: string[];
|
|
102
|
+
argTypes: {
|
|
103
|
+
modelValue: {
|
|
104
|
+
control: {
|
|
105
|
+
type: "boolean";
|
|
106
|
+
};
|
|
107
|
+
defaultValue: boolean;
|
|
108
|
+
};
|
|
109
|
+
title: {
|
|
110
|
+
control: {
|
|
111
|
+
type: "text";
|
|
112
|
+
};
|
|
113
|
+
defaultValue: string;
|
|
114
|
+
};
|
|
115
|
+
description: {
|
|
116
|
+
control: {
|
|
117
|
+
type: "text";
|
|
118
|
+
};
|
|
119
|
+
defaultValue: string;
|
|
120
|
+
};
|
|
121
|
+
size: {
|
|
122
|
+
control: {
|
|
123
|
+
type: "select";
|
|
124
|
+
};
|
|
125
|
+
options: string[];
|
|
126
|
+
defaultValue: string;
|
|
127
|
+
};
|
|
128
|
+
variant: {
|
|
129
|
+
control: {
|
|
130
|
+
type: "select";
|
|
131
|
+
};
|
|
132
|
+
options: string[];
|
|
133
|
+
defaultValue: string;
|
|
134
|
+
};
|
|
135
|
+
color: {
|
|
136
|
+
control: {
|
|
137
|
+
type: "select";
|
|
138
|
+
};
|
|
139
|
+
options: string[];
|
|
140
|
+
defaultValue: string;
|
|
141
|
+
};
|
|
142
|
+
rounded: {
|
|
143
|
+
control: {
|
|
144
|
+
type: "select";
|
|
145
|
+
};
|
|
146
|
+
options: string[];
|
|
147
|
+
defaultValue: string;
|
|
148
|
+
};
|
|
149
|
+
showClose: {
|
|
150
|
+
control: {
|
|
151
|
+
type: "boolean";
|
|
152
|
+
};
|
|
153
|
+
defaultValue: boolean;
|
|
154
|
+
};
|
|
155
|
+
closeOnBackdrop: {
|
|
156
|
+
control: {
|
|
157
|
+
type: "boolean";
|
|
158
|
+
};
|
|
159
|
+
defaultValue: boolean;
|
|
160
|
+
};
|
|
161
|
+
closeOnEsc: {
|
|
162
|
+
control: {
|
|
163
|
+
type: "boolean";
|
|
164
|
+
};
|
|
165
|
+
defaultValue: boolean;
|
|
166
|
+
};
|
|
167
|
+
persistent: {
|
|
168
|
+
control: {
|
|
169
|
+
type: "boolean";
|
|
170
|
+
};
|
|
171
|
+
defaultValue: boolean;
|
|
172
|
+
};
|
|
173
|
+
centered: {
|
|
174
|
+
control: {
|
|
175
|
+
type: "boolean";
|
|
176
|
+
};
|
|
177
|
+
defaultValue: boolean;
|
|
178
|
+
};
|
|
179
|
+
scrollable: {
|
|
180
|
+
control: {
|
|
181
|
+
type: "boolean";
|
|
182
|
+
};
|
|
183
|
+
defaultValue: boolean;
|
|
184
|
+
};
|
|
185
|
+
blurBackdrop: {
|
|
186
|
+
control: {
|
|
187
|
+
type: "boolean";
|
|
188
|
+
};
|
|
189
|
+
defaultValue: boolean;
|
|
190
|
+
};
|
|
191
|
+
zIndex: {
|
|
192
|
+
control: {
|
|
193
|
+
type: "number";
|
|
194
|
+
};
|
|
195
|
+
defaultValue: number;
|
|
196
|
+
};
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
export default meta;
|
|
200
|
+
type Story = StoryObj<typeof meta>;
|
|
201
|
+
export declare const Default: Story;
|
|
202
|
+
export declare const Persistent: Story;
|
|
203
|
+
export declare const LargeScrollable: Story;
|
|
204
|
+
export declare const Variants: Story;
|
|
205
|
+
export declare const EscapeClose: Story;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export interface DuiModalProps {
|
|
2
|
+
modelValue?: boolean;
|
|
3
|
+
title?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
6
|
+
variant?: 'solid' | 'outline' | 'ghost';
|
|
7
|
+
color?: 'neutral' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
|
|
8
|
+
rounded?: 'all' | 'top' | 'bottom' | 'left' | 'right' | 'none';
|
|
9
|
+
showClose?: boolean;
|
|
10
|
+
closeOnBackdrop?: boolean;
|
|
11
|
+
closeOnEsc?: boolean;
|
|
12
|
+
persistent?: boolean;
|
|
13
|
+
centered?: boolean;
|
|
14
|
+
scrollable?: boolean;
|
|
15
|
+
blurBackdrop?: boolean;
|
|
16
|
+
zIndex?: number;
|
|
17
|
+
}
|
|
18
|
+
declare function __VLS_template(): {
|
|
19
|
+
attrs: Partial<{}>;
|
|
20
|
+
slots: {
|
|
21
|
+
header?(_: {}): any;
|
|
22
|
+
default?(_: {}): any;
|
|
23
|
+
footer?(_: {}): any;
|
|
24
|
+
};
|
|
25
|
+
refs: {};
|
|
26
|
+
rootEl: any;
|
|
27
|
+
};
|
|
28
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
29
|
+
declare const __VLS_component: import('vue').DefineComponent<DuiModalProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
30
|
+
"update:modelValue": (value: boolean) => any;
|
|
31
|
+
open: () => any;
|
|
32
|
+
close: (source: "button" | "backdrop" | "escape") => any;
|
|
33
|
+
backdrop: () => any;
|
|
34
|
+
escape: () => any;
|
|
35
|
+
}, string, import('vue').PublicProps, Readonly<DuiModalProps> & Readonly<{
|
|
36
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
37
|
+
onOpen?: (() => any) | undefined;
|
|
38
|
+
onClose?: ((source: "button" | "backdrop" | "escape") => any) | undefined;
|
|
39
|
+
onBackdrop?: (() => any) | undefined;
|
|
40
|
+
onEscape?: (() => any) | undefined;
|
|
41
|
+
}>, {
|
|
42
|
+
variant: "solid" | "outline" | "ghost";
|
|
43
|
+
color: "neutral" | "primary" | "secondary" | "success" | "warning" | "danger";
|
|
44
|
+
size: "xs" | "sm" | "md" | "lg" | "xl" | "full";
|
|
45
|
+
title: string;
|
|
46
|
+
rounded: "all" | "top" | "bottom" | "left" | "right" | "none";
|
|
47
|
+
modelValue: boolean;
|
|
48
|
+
description: string;
|
|
49
|
+
showClose: boolean;
|
|
50
|
+
closeOnBackdrop: boolean;
|
|
51
|
+
closeOnEsc: boolean;
|
|
52
|
+
persistent: boolean;
|
|
53
|
+
centered: boolean;
|
|
54
|
+
scrollable: boolean;
|
|
55
|
+
blurBackdrop: boolean;
|
|
56
|
+
zIndex: number;
|
|
57
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
58
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
59
|
+
export default _default;
|
|
60
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
61
|
+
new (): {
|
|
62
|
+
$slots: S;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/vue3-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: {
|
|
5
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./DuiTooltip.vue').DuiTooltipProps> & Readonly<{
|
|
6
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
7
|
+
onOpen?: ((source: "click" | "focus" | "hover" | "manual") => any) | undefined;
|
|
8
|
+
onClose?: ((source: "click" | "focus" | "hover" | "manual" | "outside") => any) | undefined;
|
|
9
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
10
|
+
"update:modelValue": (value: boolean) => any;
|
|
11
|
+
open: (source: "click" | "focus" | "hover" | "manual") => any;
|
|
12
|
+
close: (source: "click" | "focus" | "hover" | "manual" | "outside") => any;
|
|
13
|
+
}, import('vue').PublicProps, {
|
|
14
|
+
variant: import('./DuiTooltip.vue').TooltipVariant;
|
|
15
|
+
color: import('./DuiTooltip.vue').TooltipColor;
|
|
16
|
+
size: import('./DuiTooltip.vue').TooltipSize;
|
|
17
|
+
disabled: boolean;
|
|
18
|
+
rounded: import('./DuiTooltip.vue').TooltipRounded;
|
|
19
|
+
text: string;
|
|
20
|
+
modelValue: boolean;
|
|
21
|
+
zIndex: number;
|
|
22
|
+
fallbackTriggerText: string;
|
|
23
|
+
trigger: import('./DuiTooltip.vue').TooltipTrigger;
|
|
24
|
+
placement: import('./DuiTooltip.vue').TooltipPlacement;
|
|
25
|
+
interactive: boolean;
|
|
26
|
+
arrow: boolean;
|
|
27
|
+
showDelay: number;
|
|
28
|
+
hideDelay: number;
|
|
29
|
+
offset: number;
|
|
30
|
+
flip: boolean;
|
|
31
|
+
viewportPadding: number;
|
|
32
|
+
maxWidth: "xs" | "sm" | "md" | "lg" | "full" | number | string;
|
|
33
|
+
teleportTo: string;
|
|
34
|
+
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
35
|
+
triggerRef: HTMLSpanElement;
|
|
36
|
+
tooltipRef: HTMLDivElement;
|
|
37
|
+
}, any, import('vue').ComponentProvideOptions, {
|
|
38
|
+
P: {};
|
|
39
|
+
B: {};
|
|
40
|
+
D: {};
|
|
41
|
+
C: {};
|
|
42
|
+
M: {};
|
|
43
|
+
Defaults: {};
|
|
44
|
+
}, Readonly<import('./DuiTooltip.vue').DuiTooltipProps> & Readonly<{
|
|
45
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
46
|
+
onOpen?: ((source: "click" | "focus" | "hover" | "manual") => any) | undefined;
|
|
47
|
+
onClose?: ((source: "click" | "focus" | "hover" | "manual" | "outside") => any) | undefined;
|
|
48
|
+
}>, {}, {}, {}, {}, {
|
|
49
|
+
variant: import('./DuiTooltip.vue').TooltipVariant;
|
|
50
|
+
color: import('./DuiTooltip.vue').TooltipColor;
|
|
51
|
+
size: import('./DuiTooltip.vue').TooltipSize;
|
|
52
|
+
disabled: boolean;
|
|
53
|
+
rounded: import('./DuiTooltip.vue').TooltipRounded;
|
|
54
|
+
text: string;
|
|
55
|
+
modelValue: boolean;
|
|
56
|
+
zIndex: number;
|
|
57
|
+
fallbackTriggerText: string;
|
|
58
|
+
trigger: import('./DuiTooltip.vue').TooltipTrigger;
|
|
59
|
+
placement: import('./DuiTooltip.vue').TooltipPlacement;
|
|
60
|
+
interactive: boolean;
|
|
61
|
+
arrow: boolean;
|
|
62
|
+
showDelay: number;
|
|
63
|
+
hideDelay: number;
|
|
64
|
+
offset: number;
|
|
65
|
+
flip: boolean;
|
|
66
|
+
viewportPadding: number;
|
|
67
|
+
maxWidth: "xs" | "sm" | "md" | "lg" | "full" | number | string;
|
|
68
|
+
teleportTo: string;
|
|
69
|
+
}>;
|
|
70
|
+
__isFragment?: never;
|
|
71
|
+
__isTeleport?: never;
|
|
72
|
+
__isSuspense?: never;
|
|
73
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('./DuiTooltip.vue').DuiTooltipProps> & Readonly<{
|
|
74
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
75
|
+
onOpen?: ((source: "click" | "focus" | "hover" | "manual") => any) | undefined;
|
|
76
|
+
onClose?: ((source: "click" | "focus" | "hover" | "manual" | "outside") => any) | undefined;
|
|
77
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
78
|
+
"update:modelValue": (value: boolean) => any;
|
|
79
|
+
open: (source: "click" | "focus" | "hover" | "manual") => any;
|
|
80
|
+
close: (source: "click" | "focus" | "hover" | "manual" | "outside") => any;
|
|
81
|
+
}, string, {
|
|
82
|
+
variant: import('./DuiTooltip.vue').TooltipVariant;
|
|
83
|
+
color: import('./DuiTooltip.vue').TooltipColor;
|
|
84
|
+
size: import('./DuiTooltip.vue').TooltipSize;
|
|
85
|
+
disabled: boolean;
|
|
86
|
+
rounded: import('./DuiTooltip.vue').TooltipRounded;
|
|
87
|
+
text: string;
|
|
88
|
+
modelValue: boolean;
|
|
89
|
+
zIndex: number;
|
|
90
|
+
fallbackTriggerText: string;
|
|
91
|
+
trigger: import('./DuiTooltip.vue').TooltipTrigger;
|
|
92
|
+
placement: import('./DuiTooltip.vue').TooltipPlacement;
|
|
93
|
+
interactive: boolean;
|
|
94
|
+
arrow: boolean;
|
|
95
|
+
showDelay: number;
|
|
96
|
+
hideDelay: number;
|
|
97
|
+
offset: number;
|
|
98
|
+
flip: boolean;
|
|
99
|
+
viewportPadding: number;
|
|
100
|
+
maxWidth: "xs" | "sm" | "md" | "lg" | "full" | number | string;
|
|
101
|
+
teleportTo: string;
|
|
102
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
103
|
+
$slots: {
|
|
104
|
+
trigger?(_: {}): any;
|
|
105
|
+
default?(_: {}): any;
|
|
106
|
+
content?(_: {}): any;
|
|
107
|
+
};
|
|
108
|
+
});
|
|
109
|
+
tags: string[];
|
|
110
|
+
argTypes: {
|
|
111
|
+
text: {
|
|
112
|
+
control: {
|
|
113
|
+
type: "text";
|
|
114
|
+
};
|
|
115
|
+
defaultValue: string;
|
|
116
|
+
};
|
|
117
|
+
trigger: {
|
|
118
|
+
control: {
|
|
119
|
+
type: "select";
|
|
120
|
+
};
|
|
121
|
+
options: string[];
|
|
122
|
+
defaultValue: string;
|
|
123
|
+
};
|
|
124
|
+
placement: {
|
|
125
|
+
control: {
|
|
126
|
+
type: "select";
|
|
127
|
+
};
|
|
128
|
+
options: string[];
|
|
129
|
+
defaultValue: string;
|
|
130
|
+
};
|
|
131
|
+
variant: {
|
|
132
|
+
control: {
|
|
133
|
+
type: "select";
|
|
134
|
+
};
|
|
135
|
+
options: string[];
|
|
136
|
+
defaultValue: string;
|
|
137
|
+
};
|
|
138
|
+
color: {
|
|
139
|
+
control: {
|
|
140
|
+
type: "select";
|
|
141
|
+
};
|
|
142
|
+
options: string[];
|
|
143
|
+
defaultValue: string;
|
|
144
|
+
};
|
|
145
|
+
size: {
|
|
146
|
+
control: {
|
|
147
|
+
type: "select";
|
|
148
|
+
};
|
|
149
|
+
options: string[];
|
|
150
|
+
defaultValue: string;
|
|
151
|
+
};
|
|
152
|
+
rounded: {
|
|
153
|
+
control: {
|
|
154
|
+
type: "select";
|
|
155
|
+
};
|
|
156
|
+
options: string[];
|
|
157
|
+
defaultValue: string;
|
|
158
|
+
};
|
|
159
|
+
showDelay: {
|
|
160
|
+
control: {
|
|
161
|
+
type: "number";
|
|
162
|
+
};
|
|
163
|
+
defaultValue: number;
|
|
164
|
+
};
|
|
165
|
+
hideDelay: {
|
|
166
|
+
control: {
|
|
167
|
+
type: "number";
|
|
168
|
+
};
|
|
169
|
+
defaultValue: number;
|
|
170
|
+
};
|
|
171
|
+
offset: {
|
|
172
|
+
control: {
|
|
173
|
+
type: "number";
|
|
174
|
+
};
|
|
175
|
+
defaultValue: number;
|
|
176
|
+
};
|
|
177
|
+
maxWidth: {
|
|
178
|
+
control: {
|
|
179
|
+
type: "select";
|
|
180
|
+
};
|
|
181
|
+
options: string[];
|
|
182
|
+
defaultValue: string;
|
|
183
|
+
};
|
|
184
|
+
interactive: {
|
|
185
|
+
control: {
|
|
186
|
+
type: "boolean";
|
|
187
|
+
};
|
|
188
|
+
defaultValue: boolean;
|
|
189
|
+
};
|
|
190
|
+
arrow: {
|
|
191
|
+
control: {
|
|
192
|
+
type: "boolean";
|
|
193
|
+
};
|
|
194
|
+
defaultValue: boolean;
|
|
195
|
+
};
|
|
196
|
+
disabled: {
|
|
197
|
+
control: {
|
|
198
|
+
type: "boolean";
|
|
199
|
+
};
|
|
200
|
+
defaultValue: boolean;
|
|
201
|
+
};
|
|
202
|
+
flip: {
|
|
203
|
+
control: {
|
|
204
|
+
type: "boolean";
|
|
205
|
+
};
|
|
206
|
+
defaultValue: boolean;
|
|
207
|
+
};
|
|
208
|
+
zIndex: {
|
|
209
|
+
control: {
|
|
210
|
+
type: "number";
|
|
211
|
+
};
|
|
212
|
+
defaultValue: number;
|
|
213
|
+
};
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
export default meta;
|
|
217
|
+
type Story = StoryObj<typeof meta>;
|
|
218
|
+
export declare const Default: Story;
|
|
219
|
+
export declare const RichContent: Story;
|
|
220
|
+
export declare const Placements: Story;
|
|
221
|
+
export declare const ManualControl: Story;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
export type TooltipVariant = 'solid' | 'outline';
|
|
2
|
+
export type TooltipColor = 'neutral' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
|
|
3
|
+
export type TooltipSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
export type TooltipRounded = 'all' | 'top' | 'bottom' | 'left' | 'right' | 'none';
|
|
5
|
+
export type TooltipTrigger = 'hover' | 'click' | 'focus' | 'manual';
|
|
6
|
+
export type TooltipPlacement = 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end';
|
|
7
|
+
export interface DuiTooltipProps {
|
|
8
|
+
modelValue?: boolean;
|
|
9
|
+
text?: string;
|
|
10
|
+
fallbackTriggerText?: string;
|
|
11
|
+
trigger?: TooltipTrigger;
|
|
12
|
+
placement?: TooltipPlacement;
|
|
13
|
+
variant?: TooltipVariant;
|
|
14
|
+
color?: TooltipColor;
|
|
15
|
+
size?: TooltipSize;
|
|
16
|
+
rounded?: TooltipRounded;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
interactive?: boolean;
|
|
19
|
+
arrow?: boolean;
|
|
20
|
+
showDelay?: number;
|
|
21
|
+
hideDelay?: number;
|
|
22
|
+
offset?: number;
|
|
23
|
+
zIndex?: number;
|
|
24
|
+
flip?: boolean;
|
|
25
|
+
viewportPadding?: number;
|
|
26
|
+
maxWidth?: 'xs' | 'sm' | 'md' | 'lg' | 'full' | number | string;
|
|
27
|
+
teleportTo?: string;
|
|
28
|
+
}
|
|
29
|
+
declare function __VLS_template(): {
|
|
30
|
+
attrs: Partial<{}>;
|
|
31
|
+
slots: {
|
|
32
|
+
trigger?(_: {}): any;
|
|
33
|
+
default?(_: {}): any;
|
|
34
|
+
content?(_: {}): any;
|
|
35
|
+
};
|
|
36
|
+
refs: {
|
|
37
|
+
triggerRef: HTMLSpanElement;
|
|
38
|
+
tooltipRef: HTMLDivElement;
|
|
39
|
+
};
|
|
40
|
+
rootEl: any;
|
|
41
|
+
};
|
|
42
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
43
|
+
declare const __VLS_component: import('vue').DefineComponent<DuiTooltipProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
44
|
+
"update:modelValue": (value: boolean) => any;
|
|
45
|
+
open: (source: "click" | "focus" | "hover" | "manual") => any;
|
|
46
|
+
close: (source: "click" | "focus" | "hover" | "manual" | "outside") => any;
|
|
47
|
+
}, string, import('vue').PublicProps, Readonly<DuiTooltipProps> & Readonly<{
|
|
48
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
49
|
+
onOpen?: ((source: "click" | "focus" | "hover" | "manual") => any) | undefined;
|
|
50
|
+
onClose?: ((source: "click" | "focus" | "hover" | "manual" | "outside") => any) | undefined;
|
|
51
|
+
}>, {
|
|
52
|
+
variant: TooltipVariant;
|
|
53
|
+
color: TooltipColor;
|
|
54
|
+
size: TooltipSize;
|
|
55
|
+
disabled: boolean;
|
|
56
|
+
rounded: TooltipRounded;
|
|
57
|
+
text: string;
|
|
58
|
+
modelValue: boolean;
|
|
59
|
+
zIndex: number;
|
|
60
|
+
fallbackTriggerText: string;
|
|
61
|
+
trigger: TooltipTrigger;
|
|
62
|
+
placement: TooltipPlacement;
|
|
63
|
+
interactive: boolean;
|
|
64
|
+
arrow: boolean;
|
|
65
|
+
showDelay: number;
|
|
66
|
+
hideDelay: number;
|
|
67
|
+
offset: number;
|
|
68
|
+
flip: boolean;
|
|
69
|
+
viewportPadding: number;
|
|
70
|
+
maxWidth: "xs" | "sm" | "md" | "lg" | "full" | number | string;
|
|
71
|
+
teleportTo: string;
|
|
72
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
73
|
+
triggerRef: HTMLSpanElement;
|
|
74
|
+
tooltipRef: HTMLDivElement;
|
|
75
|
+
}, any>;
|
|
76
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
77
|
+
export default _default;
|
|
78
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
79
|
+
new (): {
|
|
80
|
+
$slots: S;
|
|
81
|
+
};
|
|
82
|
+
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dronico/droni-kit",
|
|
3
3
|
"author": "Gustavo Barragan <dev@droni.co>",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.16.0",
|
|
5
5
|
"private": false,
|
|
6
6
|
"access": "public",
|
|
7
7
|
"publishConfig": {
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"@semantic-release/git": "^10.0.1",
|
|
45
45
|
"@semantic-release/github": "^11.0.1",
|
|
46
46
|
"@semantic-release/npm": "^12.0.1",
|
|
47
|
+
"@storybook/addon-a11y": "^10.3.5",
|
|
47
48
|
"@storybook/addon-docs": "^10.3.5",
|
|
48
49
|
"@storybook/addon-onboarding": "^10.3.5",
|
|
49
50
|
"@storybook/addon-themes": "^10.3.5",
|