@vasakgroup/vue-libvasak 0.3.0 → 0.3.1
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/types/cards/DeviceCard.vue.d.ts +32 -0
- package/dist/types/cards/ListCard.vue.d.ts +24 -0
- package/dist/types/controls/ActionButton.vue.d.ts +35 -0
- package/dist/types/controls/ToggleControl.vue.d.ts +23 -0
- package/dist/types/forms/FormGroup.vue.d.ts +23 -0
- package/dist/types/forms/SliderControl.vue.d.ts +28 -0
- package/dist/types/forms/SwitchToggle.vue.d.ts +21 -0
- package/{src/index.ts → dist/types/index.d.ts} +4 -40
- package/dist/types/layout/ConfigSection.vue.d.ts +21 -0
- package/dist/types/sidebar/SideBar.vue.d.ts +51 -0
- package/dist/types/sidebar/SideButton.vue.d.ts +21 -0
- package/dist/types/sidebar/SideGroup.vue.d.ts +21 -0
- package/dist/types/sidebar/tipos.d.ts +15 -0
- package/dist/types/tray/TrayIconButton.vue.d.ts +37 -0
- package/dist/types/window/TopBar.vue.d.ts +9 -0
- package/dist/types/window/WindowFrame.vue.d.ts +20 -0
- package/package.json +7 -7
- package/src/cards/DeviceCard.vue +0 -82
- package/src/cards/ListCard.vue +0 -40
- package/src/controls/ActionButton.vue +0 -85
- package/src/controls/ToggleControl.vue +0 -55
- package/src/forms/FormGroup.vue +0 -27
- package/src/forms/SliderControl.vue +0 -100
- package/src/forms/SwitchToggle.vue +0 -49
- package/src/layout/ConfigSection.vue +0 -28
- package/src/shims-vue.d.ts +0 -15
- package/src/sidebar/SideBar.vue +0 -183
- package/src/sidebar/SideButton.vue +0 -115
- package/src/sidebar/SideGroup.vue +0 -46
- package/src/sidebar/tipos.ts +0 -16
- package/src/tray/TrayIconButton.vue +0 -80
- package/src/types/vue-libvasak.d.ts +0 -191
- package/src/window/TopBar.vue +0 -46
- package/src/window/WindowFrame.vue +0 -21
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
icon: string;
|
|
3
|
+
title: string;
|
|
4
|
+
subtitle?: string;
|
|
5
|
+
metadata?: string;
|
|
6
|
+
extraInfo?: string[];
|
|
7
|
+
isConnected?: boolean;
|
|
8
|
+
showActionButton?: boolean;
|
|
9
|
+
actionLabel?: string;
|
|
10
|
+
showStatusIndicator?: boolean;
|
|
11
|
+
customClass?: string;
|
|
12
|
+
clickable?: boolean;
|
|
13
|
+
}
|
|
14
|
+
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
|
+
click: () => any;
|
|
16
|
+
action: () => any;
|
|
17
|
+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
18
|
+
onClick?: (() => any) | undefined;
|
|
19
|
+
onAction?: (() => any) | undefined;
|
|
20
|
+
}>, {
|
|
21
|
+
metadata: string;
|
|
22
|
+
subtitle: string;
|
|
23
|
+
customClass: string;
|
|
24
|
+
extraInfo: string[];
|
|
25
|
+
isConnected: boolean;
|
|
26
|
+
showActionButton: boolean;
|
|
27
|
+
actionLabel: string;
|
|
28
|
+
showStatusIndicator: boolean;
|
|
29
|
+
clickable: boolean;
|
|
30
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
31
|
+
declare const _default: typeof __VLS_export;
|
|
32
|
+
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
clickable?: boolean;
|
|
3
|
+
customClass?: string | Record<string, boolean>;
|
|
4
|
+
}
|
|
5
|
+
declare var __VLS_1: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
default?: (props: typeof __VLS_1) => any;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
+
click: () => any;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
12
|
+
onClick?: (() => any) | undefined;
|
|
13
|
+
}>, {
|
|
14
|
+
customClass: string | Record<string, boolean>;
|
|
15
|
+
clickable: boolean;
|
|
16
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
21
|
+
new (): {
|
|
22
|
+
$slots: S;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
label: string;
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
variant?: 'primary' | 'secondary' | 'danger';
|
|
5
|
+
loading?: boolean;
|
|
6
|
+
customClass?: string | Record<string, boolean>;
|
|
7
|
+
size?: 'sm' | 'md' | 'lg';
|
|
8
|
+
fullWidth?: boolean;
|
|
9
|
+
iconSrc?: string;
|
|
10
|
+
iconAlt?: string;
|
|
11
|
+
iconRight?: boolean;
|
|
12
|
+
type?: 'button' | 'submit' | 'reset';
|
|
13
|
+
stopPropagation?: boolean;
|
|
14
|
+
preventDefault?: boolean;
|
|
15
|
+
}
|
|
16
|
+
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
|
+
click: () => any;
|
|
18
|
+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
19
|
+
onClick?: (() => any) | undefined;
|
|
20
|
+
}>, {
|
|
21
|
+
type: "button" | "submit" | "reset";
|
|
22
|
+
disabled: boolean;
|
|
23
|
+
size: "sm" | "md" | "lg";
|
|
24
|
+
variant: "primary" | "secondary" | "danger";
|
|
25
|
+
loading: boolean;
|
|
26
|
+
customClass: string | Record<string, boolean>;
|
|
27
|
+
fullWidth: boolean;
|
|
28
|
+
iconSrc: string;
|
|
29
|
+
iconAlt: string;
|
|
30
|
+
iconRight: boolean;
|
|
31
|
+
stopPropagation: boolean;
|
|
32
|
+
preventDefault: boolean;
|
|
33
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
34
|
+
declare const _default: typeof __VLS_export;
|
|
35
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
icon: string;
|
|
3
|
+
alt?: string;
|
|
4
|
+
tooltip?: string;
|
|
5
|
+
isActive?: boolean;
|
|
6
|
+
isLoading?: boolean;
|
|
7
|
+
iconClass?: Record<string, boolean>;
|
|
8
|
+
customClass?: Record<string, boolean>;
|
|
9
|
+
}
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
+
click: () => any;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
13
|
+
onClick?: (() => any) | undefined;
|
|
14
|
+
}>, {
|
|
15
|
+
alt: string;
|
|
16
|
+
customClass: Record<string, boolean>;
|
|
17
|
+
tooltip: string;
|
|
18
|
+
iconClass: Record<string, boolean>;
|
|
19
|
+
isActive: boolean;
|
|
20
|
+
isLoading: boolean;
|
|
21
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
label: string;
|
|
3
|
+
htmlFor?: string;
|
|
4
|
+
customClass?: string | Record<string, boolean>;
|
|
5
|
+
labelClass?: string | Record<string, boolean>;
|
|
6
|
+
}
|
|
7
|
+
declare var __VLS_1: {};
|
|
8
|
+
type __VLS_Slots = {} & {
|
|
9
|
+
default?: (props: typeof __VLS_1) => any;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
12
|
+
customClass: string | Record<string, boolean>;
|
|
13
|
+
htmlFor: string;
|
|
14
|
+
labelClass: string | Record<string, boolean>;
|
|
15
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
17
|
+
declare const _default: typeof __VLS_export;
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
icon: string;
|
|
3
|
+
alt?: string;
|
|
4
|
+
tooltip?: string;
|
|
5
|
+
modelValue: number;
|
|
6
|
+
min?: number;
|
|
7
|
+
max?: number;
|
|
8
|
+
showButton?: boolean;
|
|
9
|
+
iconClass?: string | Record<string, boolean>;
|
|
10
|
+
getPercentageClass?: (percentage: number) => string;
|
|
11
|
+
}
|
|
12
|
+
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
|
+
"update:modelValue": (value: number) => any;
|
|
14
|
+
buttonClick: () => any;
|
|
15
|
+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
16
|
+
"onUpdate:modelValue"?: ((value: number) => any) | undefined;
|
|
17
|
+
onButtonClick?: (() => any) | undefined;
|
|
18
|
+
}>, {
|
|
19
|
+
alt: string;
|
|
20
|
+
tooltip: string;
|
|
21
|
+
min: number;
|
|
22
|
+
max: number;
|
|
23
|
+
showButton: boolean;
|
|
24
|
+
iconClass: string | Record<string, boolean>;
|
|
25
|
+
getPercentageClass: (percentage: number) => string;
|
|
26
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
declare const _default: typeof __VLS_export;
|
|
28
|
+
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
isOn: boolean;
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
size?: 'small' | 'medium';
|
|
5
|
+
activeClass?: string;
|
|
6
|
+
inactiveClass?: string;
|
|
7
|
+
customClass?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
+
toggle: (value: boolean) => any;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
12
|
+
onToggle?: ((value: boolean) => any) | undefined;
|
|
13
|
+
}>, {
|
|
14
|
+
disabled: boolean;
|
|
15
|
+
size: "small" | "medium";
|
|
16
|
+
customClass: string;
|
|
17
|
+
activeClass: string;
|
|
18
|
+
inactiveClass: string;
|
|
19
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|
|
@@ -12,45 +12,9 @@ import SwitchToggle from "./forms/SwitchToggle.vue";
|
|
|
12
12
|
import ToggleControl from "./controls/ToggleControl.vue";
|
|
13
13
|
import TrayIconButton from "./tray/TrayIconButton.vue";
|
|
14
14
|
import type { App } from "vue";
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
SideBar,
|
|
18
|
-
SideButton,
|
|
19
|
-
SideGroup,
|
|
20
|
-
WindowFrame,
|
|
21
|
-
ActionButton,
|
|
22
|
-
ConfigSection,
|
|
23
|
-
DeviceCard,
|
|
24
|
-
FormGroup,
|
|
25
|
-
ListCard,
|
|
26
|
-
SliderControl,
|
|
27
|
-
SwitchToggle,
|
|
28
|
-
ToggleControl,
|
|
29
|
-
TrayIconButton,
|
|
30
|
-
];
|
|
31
|
-
|
|
32
|
-
export default {
|
|
33
|
-
install(app: App) {
|
|
34
|
-
components.forEach((component) => {
|
|
35
|
-
app.component(component.name as string, component);
|
|
36
|
-
});
|
|
37
|
-
},
|
|
15
|
+
declare const _default: {
|
|
16
|
+
install(app: App): void;
|
|
38
17
|
};
|
|
39
|
-
|
|
40
|
-
export {
|
|
41
|
-
SideBar,
|
|
42
|
-
SideButton,
|
|
43
|
-
SideGroup,
|
|
44
|
-
WindowFrame,
|
|
45
|
-
ActionButton,
|
|
46
|
-
ConfigSection,
|
|
47
|
-
DeviceCard,
|
|
48
|
-
FormGroup,
|
|
49
|
-
ListCard,
|
|
50
|
-
SliderControl,
|
|
51
|
-
SwitchToggle,
|
|
52
|
-
ToggleControl,
|
|
53
|
-
TrayIconButton,
|
|
54
|
-
};
|
|
55
|
-
|
|
18
|
+
export default _default;
|
|
19
|
+
export { SideBar, SideButton, SideGroup, WindowFrame, ActionButton, ConfigSection, DeviceCard, FormGroup, ListCard, SliderControl, SwitchToggle, ToggleControl, TrayIconButton, };
|
|
56
20
|
export type { SidebarCategory, SidebarItem } from "./sidebar/tipos";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
title: string;
|
|
3
|
+
icon?: string;
|
|
4
|
+
customClass?: string | Record<string, boolean>;
|
|
5
|
+
}
|
|
6
|
+
declare var __VLS_1: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
default?: (props: typeof __VLS_1) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
11
|
+
icon: string;
|
|
12
|
+
customClass: string | Record<string, boolean>;
|
|
13
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { SidebarCategory } from './tipos';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** El nombre de la ventana. Sin él y sin `subtitle` no hay área de título. */
|
|
4
|
+
title?: string;
|
|
5
|
+
subtitle?: string;
|
|
6
|
+
categories?: SidebarCategory[];
|
|
7
|
+
/** El identificador del elemento activo. */
|
|
8
|
+
modelValue?: string;
|
|
9
|
+
/** Plegada desde afuera. Sin esto, la barra se maneja sola. */
|
|
10
|
+
collapsed?: boolean;
|
|
11
|
+
/** Lo que oye un lector de pantalla en el botón de plegar. */
|
|
12
|
+
collapseLabel?: string;
|
|
13
|
+
expandLabel?: string;
|
|
14
|
+
};
|
|
15
|
+
declare var __VLS_1: {
|
|
16
|
+
collapsed: false;
|
|
17
|
+
}, __VLS_16: {
|
|
18
|
+
collapsed: boolean;
|
|
19
|
+
};
|
|
20
|
+
type __VLS_Slots = {} & {
|
|
21
|
+
header?: (props: typeof __VLS_1) => any;
|
|
22
|
+
} & {
|
|
23
|
+
default?: (props: typeof __VLS_16) => any;
|
|
24
|
+
};
|
|
25
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
26
|
+
collapsed: import("vue").ComputedRef<boolean>;
|
|
27
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
28
|
+
change: (value: string) => any;
|
|
29
|
+
"update:modelValue": (value: string) => any;
|
|
30
|
+
"update:collapsed": (value: boolean) => any;
|
|
31
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
32
|
+
onChange?: ((value: string) => any) | undefined;
|
|
33
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
34
|
+
"onUpdate:collapsed"?: ((value: boolean) => any) | undefined;
|
|
35
|
+
}>, {
|
|
36
|
+
title: string;
|
|
37
|
+
collapsed: boolean;
|
|
38
|
+
subtitle: string;
|
|
39
|
+
categories: SidebarCategory[];
|
|
40
|
+
modelValue: string;
|
|
41
|
+
collapseLabel: string;
|
|
42
|
+
expandLabel: string;
|
|
43
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
44
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
45
|
+
declare const _default: typeof __VLS_export;
|
|
46
|
+
export default _default;
|
|
47
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
48
|
+
new (): {
|
|
49
|
+
$slots: S;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
label: string;
|
|
3
|
+
icon?: string;
|
|
4
|
+
active?: boolean;
|
|
5
|
+
collapsed?: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
badge?: string | number;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
+
click: () => any;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
|
+
onClick?: (() => any) | undefined;
|
|
13
|
+
}>, {
|
|
14
|
+
collapsed: boolean;
|
|
15
|
+
icon: string;
|
|
16
|
+
active: boolean;
|
|
17
|
+
disabled: boolean;
|
|
18
|
+
badge: string | number;
|
|
19
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
title: string;
|
|
3
|
+
collapsed?: boolean;
|
|
4
|
+
defaultOpen?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare var __VLS_1: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
default?: (props: typeof __VLS_1) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
11
|
+
collapsed: boolean;
|
|
12
|
+
defaultOpen: boolean;
|
|
13
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Un elemento de la barra lateral: un lugar al que se va. */
|
|
2
|
+
export interface SidebarItem {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
/** Un nombre del tema de iconos del escritorio, no una ruta. */
|
|
6
|
+
icon?: string;
|
|
7
|
+
badge?: string | number;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
/** Un grupo de elementos, con su título plegable. */
|
|
11
|
+
export interface SidebarCategory {
|
|
12
|
+
id: string;
|
|
13
|
+
title: string;
|
|
14
|
+
items: SidebarItem[];
|
|
15
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
icon: string;
|
|
3
|
+
alt?: string;
|
|
4
|
+
tooltip?: string;
|
|
5
|
+
badge?: number | null;
|
|
6
|
+
iconClass?: string | Record<string, boolean>;
|
|
7
|
+
customClass?: string | Record<string, boolean>;
|
|
8
|
+
tooltipClass?: string | Record<string, boolean>;
|
|
9
|
+
showCustomTooltip?: boolean;
|
|
10
|
+
customTooltipText?: string;
|
|
11
|
+
}
|
|
12
|
+
declare var __VLS_1: {};
|
|
13
|
+
type __VLS_Slots = {} & {
|
|
14
|
+
default?: (props: typeof __VLS_1) => any;
|
|
15
|
+
};
|
|
16
|
+
declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
|
+
click: () => any;
|
|
18
|
+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
19
|
+
onClick?: (() => any) | undefined;
|
|
20
|
+
}>, {
|
|
21
|
+
badge: number | null;
|
|
22
|
+
alt: string;
|
|
23
|
+
customClass: string | Record<string, boolean>;
|
|
24
|
+
tooltip: string;
|
|
25
|
+
iconClass: string | Record<string, boolean>;
|
|
26
|
+
tooltipClass: string | Record<string, boolean>;
|
|
27
|
+
showCustomTooltip: boolean;
|
|
28
|
+
customTooltipText: string;
|
|
29
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
30
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
31
|
+
declare const _default: typeof __VLS_export;
|
|
32
|
+
export default _default;
|
|
33
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
34
|
+
new (): {
|
|
35
|
+
$slots: S;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
title: StringConstructor;
|
|
3
|
+
image: StringConstructor;
|
|
4
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
5
|
+
title: StringConstructor;
|
|
6
|
+
image: StringConstructor;
|
|
7
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
title?: string;
|
|
3
|
+
image?: string;
|
|
4
|
+
};
|
|
5
|
+
declare var __VLS_6: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
default?: (props: typeof __VLS_6) => any;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
10
|
+
title: string;
|
|
11
|
+
image: string;
|
|
12
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
package/package.json
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vasakgroup/vue-libvasak",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Vue componenets for VSK Applications",
|
|
5
5
|
"main": "./dist/vue-libvasak.umd.js",
|
|
6
6
|
"module": "./dist/vue-libvasak.es.js",
|
|
7
|
-
"types": "
|
|
7
|
+
"types": "./dist/types/index.d.ts",
|
|
8
8
|
"files": [
|
|
9
|
-
"dist"
|
|
10
|
-
"src"
|
|
9
|
+
"dist"
|
|
11
10
|
],
|
|
12
11
|
"exports": {
|
|
13
12
|
".": {
|
|
14
|
-
"types": "./
|
|
13
|
+
"types": "./dist/types/index.d.ts",
|
|
15
14
|
"import": "./dist/vue-libvasak.es.js",
|
|
16
15
|
"require": "./dist/vue-libvasak.umd.js",
|
|
17
16
|
"default": "./dist/vue-libvasak.es.js"
|
|
@@ -65,10 +64,11 @@
|
|
|
65
64
|
"vue-tsc": "^3.3.11"
|
|
66
65
|
},
|
|
67
66
|
"scripts": {
|
|
68
|
-
"build": "
|
|
67
|
+
"build": "bun run typecheck && bunx --bun vite build && bun run tipos",
|
|
69
68
|
"dev": "bunx --bun vite",
|
|
70
69
|
"prepare": "bun run build",
|
|
71
70
|
"typecheck": "bunx vue-tsc --noEmit",
|
|
72
|
-
"test": "bun test"
|
|
71
|
+
"test": "bun test",
|
|
72
|
+
"tipos": "bunx vue-tsc --declaration --emitDeclarationOnly --noEmit false --outDir dist/types"
|
|
73
73
|
}
|
|
74
74
|
}
|
package/src/cards/DeviceCard.vue
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
class="flex items-center justify-between background rounded-vsk px-6 py-3 mb-4"
|
|
4
|
-
:class="[{ 'border-l-4 border-green-500': isConnected }, customClass]"
|
|
5
|
-
@click="handleClick"
|
|
6
|
-
>
|
|
7
|
-
<div class="flex items-center gap-3 flex-1 min-w-0">
|
|
8
|
-
<img :src="icon" :alt="title" class="h-7 w-7 shrink-0" />
|
|
9
|
-
<div class="min-w-0">
|
|
10
|
-
<div class="font-semibold truncate">
|
|
11
|
-
{{ title }}
|
|
12
|
-
</div>
|
|
13
|
-
<div v-if="subtitle" class="text-xs text-gray-400 truncate">
|
|
14
|
-
{{ subtitle }}
|
|
15
|
-
</div>
|
|
16
|
-
<div v-if="metadata" class="text-xs text-gray-400 truncate">
|
|
17
|
-
{{ metadata }}
|
|
18
|
-
</div>
|
|
19
|
-
<div v-if="extraInfo && extraInfo.length > 0" class="text-xs text-gray-400 flex gap-2 mt-1">
|
|
20
|
-
<span v-for="(info, index) in extraInfo" :key="index">
|
|
21
|
-
{{ info }}
|
|
22
|
-
</span>
|
|
23
|
-
</div>
|
|
24
|
-
</div>
|
|
25
|
-
</div>
|
|
26
|
-
|
|
27
|
-
<button
|
|
28
|
-
v-if="showActionButton"
|
|
29
|
-
class="bg-vsk-primary rounded-vsk px-4 py-2 text-sm font-semibold cursor-pointer hover:opacity-70"
|
|
30
|
-
@click.stop="handleAction"
|
|
31
|
-
>
|
|
32
|
-
{{ actionLabel }}
|
|
33
|
-
</button>
|
|
34
|
-
|
|
35
|
-
<!-- Status indicator for connected state -->
|
|
36
|
-
<div
|
|
37
|
-
v-if="showStatusIndicator && isConnected"
|
|
38
|
-
class="w-2 h-2 rounded-full bg-green-500"
|
|
39
|
-
/>
|
|
40
|
-
</div>
|
|
41
|
-
</template>
|
|
42
|
-
|
|
43
|
-
<script setup lang="ts">
|
|
44
|
-
interface Props {
|
|
45
|
-
icon: string;
|
|
46
|
-
title: string;
|
|
47
|
-
subtitle?: string;
|
|
48
|
-
metadata?: string;
|
|
49
|
-
extraInfo?: string[];
|
|
50
|
-
isConnected?: boolean;
|
|
51
|
-
showActionButton?: boolean;
|
|
52
|
-
actionLabel?: string;
|
|
53
|
-
showStatusIndicator?: boolean;
|
|
54
|
-
customClass?: string;
|
|
55
|
-
clickable?: boolean;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
withDefaults(defineProps<Props>(), {
|
|
59
|
-
subtitle: '',
|
|
60
|
-
metadata: '',
|
|
61
|
-
extraInfo: () => [],
|
|
62
|
-
isConnected: false,
|
|
63
|
-
showActionButton: true,
|
|
64
|
-
actionLabel: 'Conectar',
|
|
65
|
-
showStatusIndicator: false,
|
|
66
|
-
customClass: '',
|
|
67
|
-
clickable: false,
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
const emit = defineEmits<{
|
|
71
|
-
action: [];
|
|
72
|
-
click: [];
|
|
73
|
-
}>();
|
|
74
|
-
|
|
75
|
-
const handleAction = () => {
|
|
76
|
-
emit('action');
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
const handleClick = () => {
|
|
80
|
-
emit('click');
|
|
81
|
-
};
|
|
82
|
-
</script>
|
package/src/cards/ListCard.vue
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
interface Props {
|
|
3
|
-
clickable?: boolean;
|
|
4
|
-
customClass?: string | Record<string, boolean>;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
const props = withDefaults(defineProps<Props>(), {
|
|
8
|
-
clickable: false,
|
|
9
|
-
customClass: () => ({}),
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
const emit = defineEmits<{
|
|
13
|
-
click: [];
|
|
14
|
-
}>();
|
|
15
|
-
|
|
16
|
-
const handleClick = () => {
|
|
17
|
-
if (props.clickable) {
|
|
18
|
-
emit('click');
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
</script>
|
|
22
|
-
|
|
23
|
-
<template>
|
|
24
|
-
<div
|
|
25
|
-
:class="[
|
|
26
|
-
'flex items-center justify-between background p-3 rounded-vsk border border-vsk-primary/70 transition-colors duration-200',
|
|
27
|
-
{
|
|
28
|
-
'hover:bg-vsk-primary/5 cursor-pointer': props.clickable,
|
|
29
|
-
},
|
|
30
|
-
customClass,
|
|
31
|
-
]"
|
|
32
|
-
@click="handleClick"
|
|
33
|
-
>
|
|
34
|
-
<slot />
|
|
35
|
-
</div>
|
|
36
|
-
</template>
|
|
37
|
-
|
|
38
|
-
<style scoped>
|
|
39
|
-
/* Ningún estilo adicional requerido */
|
|
40
|
-
</style>
|