@dronico/droni-kit 1.15.0 → 1.17.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.
Files changed (31) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/droni-kit.cjs.js +9 -9
  3. package/dist/droni-kit.css +1 -1
  4. package/dist/droni-kit.es.js +734 -466
  5. package/dist/index.d.ts +2 -1
  6. package/dist/stories/Elements/DuiAccordion.stories.d.ts +104 -0
  7. package/dist/stories/Elements/DuiAccordion.vue.d.ts +44 -0
  8. package/dist/stories/Elements/DuiBadge.stories.d.ts +124 -0
  9. package/dist/stories/Elements/DuiBadge.vue.d.ts +41 -0
  10. package/dist/stories/Elements/DuiDropdown.stories.d.ts +131 -0
  11. package/dist/stories/Elements/DuiDropdown.vue.d.ts +51 -0
  12. package/dist/stories/Elements/DuiDropdownItem.vue.d.ts +40 -0
  13. package/dist/stories/Elements/DuiDropdownSeparator.vue.d.ts +2 -0
  14. package/dist/stories/Elements/DuiEmptyState.stories.d.ts +99 -0
  15. package/dist/stories/Elements/DuiEmptyState.vue.d.ts +34 -0
  16. package/dist/stories/Elements/DuiPagination.stories.d.ts +98 -0
  17. package/dist/stories/Elements/DuiPagination.vue.d.ts +35 -0
  18. package/dist/stories/Elements/DuiSkeleton.stories.d.ts +54 -0
  19. package/dist/stories/Elements/DuiSkeleton.vue.d.ts +13 -0
  20. package/dist/stories/Elements/DuiTabs.stories.d.ts +95 -0
  21. package/dist/stories/Elements/DuiTabs.vue.d.ts +43 -0
  22. package/dist/stories/Elements/DuiToast.stories.d.ts +44 -0
  23. package/dist/stories/Elements/DuiToast.vue.d.ts +12 -0
  24. package/dist/stories/Elements/DuiTooltip.stories.d.ts +221 -0
  25. package/dist/stories/Elements/DuiTooltip.vue.d.ts +82 -0
  26. package/dist/stories/Elements/useToast.d.ts +41 -0
  27. package/dist/stories/Forms/DuiRadio.stories.d.ts +70 -0
  28. package/dist/stories/Forms/DuiRadio.vue.d.ts +34 -0
  29. package/dist/stories/Forms/DuiSwitch.stories.d.ts +252 -0
  30. package/dist/stories/Forms/DuiSwitch.vue.d.ts +108 -0
  31. package/package.json +1 -1
@@ -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
+ };
@@ -0,0 +1,41 @@
1
+ export type ToastColor = 'neutral' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
2
+ export type ToastPosition = 'top-right' | 'top-left' | 'top-center' | 'bottom-right' | 'bottom-left' | 'bottom-center';
3
+ export interface ToastItem {
4
+ id: string;
5
+ title?: string;
6
+ message: string;
7
+ color: ToastColor;
8
+ duration: number;
9
+ closable: boolean;
10
+ icon?: string;
11
+ }
12
+ export interface ToastOptions {
13
+ title?: string;
14
+ message: string;
15
+ color?: ToastColor;
16
+ duration?: number;
17
+ closable?: boolean;
18
+ icon?: string;
19
+ }
20
+ declare function add(options: ToastOptions): string;
21
+ declare function remove(id: string): void;
22
+ declare function clear(): void;
23
+ export declare function useToast(): {
24
+ toasts: readonly {
25
+ readonly id: string;
26
+ readonly title?: string | undefined;
27
+ readonly message: string;
28
+ readonly color: ToastColor;
29
+ readonly duration: number;
30
+ readonly closable: boolean;
31
+ readonly icon?: string | undefined;
32
+ }[];
33
+ add: typeof add;
34
+ remove: typeof remove;
35
+ clear: typeof clear;
36
+ success: (message: string, options?: Omit<ToastOptions, "message" | "color">) => string;
37
+ error: (message: string, options?: Omit<ToastOptions, "message" | "color">) => string;
38
+ warning: (message: string, options?: Omit<ToastOptions, "message" | "color">) => string;
39
+ info: (message: string, options?: Omit<ToastOptions, "message" | "color">) => string;
40
+ };
41
+ export {};
@@ -0,0 +1,70 @@
1
+ import { StoryObj } from '@storybook/vue3-vite';
2
+ declare const meta: {
3
+ title: string;
4
+ component: import('vue').DefineComponent<import('./DuiRadio.vue').DuiRadioProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
5
+ "update:modelValue": (value: string) => any;
6
+ change: (value: string) => any;
7
+ }, string, import('vue').PublicProps, Readonly<import('./DuiRadio.vue').DuiRadioProps> & Readonly<{
8
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
9
+ onChange?: ((value: string) => any) | undefined;
10
+ }>, {
11
+ name: string;
12
+ color: "neutral" | "primary" | "secondary" | "success" | "warning" | "danger";
13
+ size: "sm" | "md" | "lg";
14
+ disabled: boolean;
15
+ block: boolean;
16
+ modelValue: string;
17
+ groupLabel: string;
18
+ orientation: "vertical" | "horizontal";
19
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
20
+ tags: string[];
21
+ argTypes: {
22
+ color: {
23
+ control: {
24
+ type: "select";
25
+ };
26
+ options: string[];
27
+ description: string;
28
+ };
29
+ size: {
30
+ control: {
31
+ type: "select";
32
+ };
33
+ options: string[];
34
+ description: string;
35
+ };
36
+ orientation: {
37
+ control: {
38
+ type: "select";
39
+ };
40
+ options: string[];
41
+ description: string;
42
+ };
43
+ block: {
44
+ control: {
45
+ type: "boolean";
46
+ };
47
+ description: string;
48
+ };
49
+ disabled: {
50
+ control: {
51
+ type: "boolean";
52
+ };
53
+ description: string;
54
+ };
55
+ };
56
+ parameters: {
57
+ docs: {
58
+ description: {
59
+ component: string;
60
+ };
61
+ };
62
+ };
63
+ };
64
+ export default meta;
65
+ type Story = StoryObj<typeof meta>;
66
+ export declare const Default: Story;
67
+ export declare const Horizontal: Story;
68
+ export declare const Colors: Story;
69
+ export declare const WithDescriptions: Story;
70
+ export declare const Disabled: Story;
@@ -0,0 +1,34 @@
1
+ export interface DuiRadioOption {
2
+ label: string;
3
+ value: string;
4
+ description?: string;
5
+ disabled?: boolean;
6
+ }
7
+ export interface DuiRadioProps {
8
+ modelValue?: string;
9
+ options: DuiRadioOption[];
10
+ name?: string;
11
+ groupLabel?: string;
12
+ color?: 'neutral' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
13
+ size?: 'sm' | 'md' | 'lg';
14
+ orientation?: 'vertical' | 'horizontal';
15
+ block?: boolean;
16
+ disabled?: boolean;
17
+ }
18
+ declare const _default: import('vue').DefineComponent<DuiRadioProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
19
+ "update:modelValue": (value: string) => any;
20
+ change: (value: string) => any;
21
+ }, string, import('vue').PublicProps, Readonly<DuiRadioProps> & Readonly<{
22
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
23
+ onChange?: ((value: string) => any) | undefined;
24
+ }>, {
25
+ name: string;
26
+ color: "neutral" | "primary" | "secondary" | "success" | "warning" | "danger";
27
+ size: "sm" | "md" | "lg";
28
+ disabled: boolean;
29
+ block: boolean;
30
+ modelValue: string;
31
+ groupLabel: string;
32
+ orientation: "vertical" | "horizontal";
33
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
34
+ export default _default;
@@ -0,0 +1,252 @@
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('vue').ExtractPropTypes<{
6
+ modelValue: {
7
+ type: BooleanConstructor;
8
+ default: boolean;
9
+ };
10
+ label: {
11
+ type: StringConstructor;
12
+ default: string;
13
+ };
14
+ description: {
15
+ type: StringConstructor;
16
+ default: string;
17
+ };
18
+ labelPosition: {
19
+ type: () => "left" | "right";
20
+ default: string;
21
+ };
22
+ color: {
23
+ type: () => "neutral" | "primary" | "secondary" | "success" | "warning" | "danger";
24
+ default: string;
25
+ };
26
+ size: {
27
+ type: () => "sm" | "md" | "lg";
28
+ default: string;
29
+ };
30
+ block: {
31
+ type: BooleanConstructor;
32
+ default: boolean;
33
+ };
34
+ disabled: {
35
+ type: BooleanConstructor;
36
+ default: boolean;
37
+ };
38
+ showIcons: {
39
+ type: BooleanConstructor;
40
+ default: boolean;
41
+ };
42
+ }>> & Readonly<{
43
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
44
+ onChange?: ((value: boolean) => any) | undefined;
45
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
46
+ "update:modelValue": (value: boolean) => any;
47
+ change: (value: boolean) => any;
48
+ }, import('vue').PublicProps, {
49
+ color: "neutral" | "primary" | "secondary" | "success" | "warning" | "danger";
50
+ size: "sm" | "md" | "lg";
51
+ disabled: boolean;
52
+ block: boolean;
53
+ label: string;
54
+ modelValue: boolean;
55
+ labelPosition: "left" | "right";
56
+ description: string;
57
+ showIcons: boolean;
58
+ }, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
59
+ P: {};
60
+ B: {};
61
+ D: {};
62
+ C: {};
63
+ M: {};
64
+ Defaults: {};
65
+ }, Readonly<import('vue').ExtractPropTypes<{
66
+ modelValue: {
67
+ type: BooleanConstructor;
68
+ default: boolean;
69
+ };
70
+ label: {
71
+ type: StringConstructor;
72
+ default: string;
73
+ };
74
+ description: {
75
+ type: StringConstructor;
76
+ default: string;
77
+ };
78
+ labelPosition: {
79
+ type: () => "left" | "right";
80
+ default: string;
81
+ };
82
+ color: {
83
+ type: () => "neutral" | "primary" | "secondary" | "success" | "warning" | "danger";
84
+ default: string;
85
+ };
86
+ size: {
87
+ type: () => "sm" | "md" | "lg";
88
+ default: string;
89
+ };
90
+ block: {
91
+ type: BooleanConstructor;
92
+ default: boolean;
93
+ };
94
+ disabled: {
95
+ type: BooleanConstructor;
96
+ default: boolean;
97
+ };
98
+ showIcons: {
99
+ type: BooleanConstructor;
100
+ default: boolean;
101
+ };
102
+ }>> & Readonly<{
103
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
104
+ onChange?: ((value: boolean) => any) | undefined;
105
+ }>, {}, {}, {}, {}, {
106
+ color: "neutral" | "primary" | "secondary" | "success" | "warning" | "danger";
107
+ size: "sm" | "md" | "lg";
108
+ disabled: boolean;
109
+ block: boolean;
110
+ label: string;
111
+ modelValue: boolean;
112
+ labelPosition: "left" | "right";
113
+ description: string;
114
+ showIcons: boolean;
115
+ }>;
116
+ __isFragment?: never;
117
+ __isTeleport?: never;
118
+ __isSuspense?: never;
119
+ } & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
120
+ modelValue: {
121
+ type: BooleanConstructor;
122
+ default: boolean;
123
+ };
124
+ label: {
125
+ type: StringConstructor;
126
+ default: string;
127
+ };
128
+ description: {
129
+ type: StringConstructor;
130
+ default: string;
131
+ };
132
+ labelPosition: {
133
+ type: () => "left" | "right";
134
+ default: string;
135
+ };
136
+ color: {
137
+ type: () => "neutral" | "primary" | "secondary" | "success" | "warning" | "danger";
138
+ default: string;
139
+ };
140
+ size: {
141
+ type: () => "sm" | "md" | "lg";
142
+ default: string;
143
+ };
144
+ block: {
145
+ type: BooleanConstructor;
146
+ default: boolean;
147
+ };
148
+ disabled: {
149
+ type: BooleanConstructor;
150
+ default: boolean;
151
+ };
152
+ showIcons: {
153
+ type: BooleanConstructor;
154
+ default: boolean;
155
+ };
156
+ }>> & Readonly<{
157
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
158
+ onChange?: ((value: boolean) => any) | undefined;
159
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
160
+ "update:modelValue": (value: boolean) => any;
161
+ change: (value: boolean) => any;
162
+ }, string, {
163
+ color: "neutral" | "primary" | "secondary" | "success" | "warning" | "danger";
164
+ size: "sm" | "md" | "lg";
165
+ disabled: boolean;
166
+ block: boolean;
167
+ label: string;
168
+ modelValue: boolean;
169
+ labelPosition: "left" | "right";
170
+ description: string;
171
+ showIcons: boolean;
172
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
173
+ $slots: {
174
+ default?(_: {}): any;
175
+ default?(_: {}): any;
176
+ };
177
+ });
178
+ tags: string[];
179
+ argTypes: {
180
+ modelValue: {
181
+ control: {
182
+ type: "boolean";
183
+ };
184
+ description: string;
185
+ };
186
+ label: {
187
+ control: {
188
+ type: "text";
189
+ };
190
+ description: string;
191
+ };
192
+ description: {
193
+ control: {
194
+ type: "text";
195
+ };
196
+ description: string;
197
+ };
198
+ labelPosition: {
199
+ control: {
200
+ type: "select";
201
+ };
202
+ options: string[];
203
+ description: string;
204
+ };
205
+ color: {
206
+ control: {
207
+ type: "select";
208
+ };
209
+ options: string[];
210
+ description: string;
211
+ };
212
+ size: {
213
+ control: {
214
+ type: "select";
215
+ };
216
+ options: string[];
217
+ description: string;
218
+ };
219
+ block: {
220
+ control: {
221
+ type: "boolean";
222
+ };
223
+ description: string;
224
+ };
225
+ disabled: {
226
+ control: {
227
+ type: "boolean";
228
+ };
229
+ description: string;
230
+ };
231
+ showIcons: {
232
+ control: {
233
+ type: "boolean";
234
+ };
235
+ description: string;
236
+ };
237
+ };
238
+ parameters: {
239
+ docs: {
240
+ description: {
241
+ component: string;
242
+ };
243
+ };
244
+ };
245
+ };
246
+ export default meta;
247
+ type Story = StoryObj<typeof meta>;
248
+ export declare const Default: Story;
249
+ export declare const Colors: Story;
250
+ export declare const Sizes: Story;
251
+ export declare const WithIcons: Story;
252
+ export declare const SettingsList: Story;
@@ -0,0 +1,108 @@
1
+ declare function __VLS_template(): {
2
+ attrs: Partial<{}>;
3
+ slots: {
4
+ default?(_: {}): any;
5
+ default?(_: {}): any;
6
+ };
7
+ refs: {};
8
+ rootEl: any;
9
+ };
10
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
+ declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
12
+ modelValue: {
13
+ type: BooleanConstructor;
14
+ default: boolean;
15
+ };
16
+ label: {
17
+ type: StringConstructor;
18
+ default: string;
19
+ };
20
+ description: {
21
+ type: StringConstructor;
22
+ default: string;
23
+ };
24
+ labelPosition: {
25
+ type: () => "left" | "right";
26
+ default: string;
27
+ };
28
+ color: {
29
+ type: () => "neutral" | "primary" | "secondary" | "success" | "warning" | "danger";
30
+ default: string;
31
+ };
32
+ size: {
33
+ type: () => "sm" | "md" | "lg";
34
+ default: string;
35
+ };
36
+ block: {
37
+ type: BooleanConstructor;
38
+ default: boolean;
39
+ };
40
+ disabled: {
41
+ type: BooleanConstructor;
42
+ default: boolean;
43
+ };
44
+ showIcons: {
45
+ type: BooleanConstructor;
46
+ default: boolean;
47
+ };
48
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
49
+ "update:modelValue": (value: boolean) => any;
50
+ change: (value: boolean) => any;
51
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
52
+ modelValue: {
53
+ type: BooleanConstructor;
54
+ default: boolean;
55
+ };
56
+ label: {
57
+ type: StringConstructor;
58
+ default: string;
59
+ };
60
+ description: {
61
+ type: StringConstructor;
62
+ default: string;
63
+ };
64
+ labelPosition: {
65
+ type: () => "left" | "right";
66
+ default: string;
67
+ };
68
+ color: {
69
+ type: () => "neutral" | "primary" | "secondary" | "success" | "warning" | "danger";
70
+ default: string;
71
+ };
72
+ size: {
73
+ type: () => "sm" | "md" | "lg";
74
+ default: string;
75
+ };
76
+ block: {
77
+ type: BooleanConstructor;
78
+ default: boolean;
79
+ };
80
+ disabled: {
81
+ type: BooleanConstructor;
82
+ default: boolean;
83
+ };
84
+ showIcons: {
85
+ type: BooleanConstructor;
86
+ default: boolean;
87
+ };
88
+ }>> & Readonly<{
89
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
90
+ onChange?: ((value: boolean) => any) | undefined;
91
+ }>, {
92
+ color: "neutral" | "primary" | "secondary" | "success" | "warning" | "danger";
93
+ size: "sm" | "md" | "lg";
94
+ disabled: boolean;
95
+ block: boolean;
96
+ label: string;
97
+ modelValue: boolean;
98
+ labelPosition: "left" | "right";
99
+ description: string;
100
+ showIcons: boolean;
101
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
102
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
103
+ export default _default;
104
+ type __VLS_WithTemplateSlots<T, S> = T & {
105
+ new (): {
106
+ $slots: S;
107
+ };
108
+ };
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.15.0",
4
+ "version": "1.17.0",
5
5
  "private": false,
6
6
  "access": "public",
7
7
  "publishConfig": {