@vasakgroup/vue-libvasak 0.7.1 → 0.12.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/dist/types/bar/BarSearch.vue.d.ts +5 -0
- package/dist/types/dialog/Dialog.vue.d.ts +22 -0
- package/dist/types/dialog/DialogContent.vue.d.ts +13 -0
- package/dist/types/dialog/DialogDescription.vue.d.ts +13 -0
- package/dist/types/dialog/DialogFooter.vue.d.ts +13 -0
- package/dist/types/dialog/DialogHeader.vue.d.ts +13 -0
- package/dist/types/dialog/DialogTitle.vue.d.ts +13 -0
- package/dist/types/dialog/tipos.d.ts +28 -0
- package/dist/types/feedback/AlertMessage.vue.d.ts +19 -0
- package/dist/types/feedback/EmptyState.vue.d.ts +24 -0
- package/dist/types/feedback/ToastArea.vue.d.ts +36 -0
- package/dist/types/feedback/tonos.d.ts +21 -0
- package/dist/types/forms/ProgressBar.vue.d.ts +9 -0
- package/dist/types/forms/TextInput.vue.d.ts +38 -0
- package/dist/types/index.d.ts +26 -1
- package/dist/types/internos/iconoDelTema.d.ts +5 -9
- package/dist/types/search/SearchField.vue.d.ts +77 -0
- package/dist/types/search/SearchSelect.vue.d.ts +45 -0
- package/dist/types/search/buscar.d.ts +42 -0
- package/dist/types/search/ids.d.ts +1 -0
- package/dist/types/tooltip/Tooltip.vue.d.ts +22 -0
- package/dist/types/tooltip/TooltipContent.vue.d.ts +22 -0
- package/dist/types/tooltip/TooltipTrigger.vue.d.ts +13 -0
- package/dist/types/tooltip/tipos.d.ts +32 -0
- package/dist/types/window/AppBar.vue.d.ts +0 -3
- package/dist/types/window/WindowControls.vue.d.ts +8 -3
- package/dist/types/window/WindowFrame.vue.d.ts +6 -3
- package/dist/vue-libvasak.es.js +1635 -838
- package/dist/vue-libvasak.umd.js +1 -1
- package/package.json +5 -3
|
@@ -9,6 +9,9 @@ type __VLS_Props = {
|
|
|
9
9
|
* Vertical se pliega siempre: ahí no es una preferencia, es que no entra.
|
|
10
10
|
*/
|
|
11
11
|
collapsed?: boolean;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
/** Ver `SearchField`: en cero, `search` sale sólo con Enter. */
|
|
14
|
+
debounce?: number;
|
|
12
15
|
};
|
|
13
16
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
17
|
search: (valor: string) => any;
|
|
@@ -23,8 +26,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
23
26
|
}>, {
|
|
24
27
|
label: string;
|
|
25
28
|
collapsed: boolean;
|
|
29
|
+
disabled: boolean;
|
|
26
30
|
modelValue: string;
|
|
27
31
|
placeholder: string;
|
|
32
|
+
debounce: number;
|
|
28
33
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
29
34
|
declare const _default: typeof __VLS_export;
|
|
30
35
|
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
open?: boolean;
|
|
3
|
+
};
|
|
4
|
+
declare var __VLS_1: {};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
default?: (props: typeof __VLS_1) => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
"update:open": (abierto: boolean) => any;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
+
"onUpdate:open"?: ((abierto: boolean) => any) | undefined;
|
|
12
|
+
}>, {
|
|
13
|
+
open: boolean;
|
|
14
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare var __VLS_13: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_13) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
10
|
+
new (): {
|
|
11
|
+
$slots: S;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare var __VLS_1: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_1) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
10
|
+
new (): {
|
|
11
|
+
$slots: S;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare var __VLS_1: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_1) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
10
|
+
new (): {
|
|
11
|
+
$slots: S;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare var __VLS_1: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_1) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
10
|
+
new (): {
|
|
11
|
+
$slots: S;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare var __VLS_1: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_1) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
10
|
+
new (): {
|
|
11
|
+
$slots: S;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* El contrato entre las piezas de un diálogo modal.
|
|
3
|
+
*
|
|
4
|
+
* Como el menú y el tooltip, un diálogo es un componente repartido: la raíz
|
|
5
|
+
* sabe si está abierto, el contenido se teletransporta al `body` para que no lo
|
|
6
|
+
* recorte nada, y el título vive dentro del contenido pero tiene que poder
|
|
7
|
+
* nombrarlo desde afuera. Eso último es lo que no se puede pasar por
|
|
8
|
+
* propiedades: el `aria-labelledby` del diálogo apunta al `id` de un título que
|
|
9
|
+
* escribió quien lo usa, y que puede no existir.
|
|
10
|
+
*/
|
|
11
|
+
import { type InjectionKey, type Ref } from 'vue';
|
|
12
|
+
export interface ContextoDelDialogo {
|
|
13
|
+
abierto: Ref<boolean>;
|
|
14
|
+
cerrar: () => void;
|
|
15
|
+
/** El `id` del título, si hay uno, para el `aria-labelledby` del diálogo. */
|
|
16
|
+
idDelTitulo: Ref<string | null>;
|
|
17
|
+
ponerElTitulo: (id: string | null) => void;
|
|
18
|
+
}
|
|
19
|
+
export declare const CLAVE_DEL_DIALOGO: InjectionKey<ContextoDelDialogo>;
|
|
20
|
+
/**
|
|
21
|
+
* El diálogo que envuelve a este componente.
|
|
22
|
+
*
|
|
23
|
+
* Fuera de un `Dialog` devuelve un contexto suelto en vez de reventar: un
|
|
24
|
+
* título o un pie montados solos —en una prueba, en una vista previa— tienen
|
|
25
|
+
* que dibujarse igual.
|
|
26
|
+
*/
|
|
27
|
+
export declare function usarElDialogo(): ContextoDelDialogo;
|
|
28
|
+
export declare function siguienteIdDeTitulo(): string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type TonoDelAviso } from './tonos';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
tone?: TonoDelAviso;
|
|
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<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
10
|
+
tone: TonoDelAviso;
|
|
11
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
15
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
16
|
+
new (): {
|
|
17
|
+
$slots: S;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
title: string;
|
|
3
|
+
/** La segunda línea: qué hacer, o por qué está vacío. */
|
|
4
|
+
note?: string;
|
|
5
|
+
icon?: string;
|
|
6
|
+
/** Con borde punteado para una caja dentro de una sección. */
|
|
7
|
+
bordered?: boolean;
|
|
8
|
+
};
|
|
9
|
+
declare var __VLS_6: {};
|
|
10
|
+
type __VLS_Slots = {} & {
|
|
11
|
+
default?: (props: typeof __VLS_6) => any;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
14
|
+
icon: string;
|
|
15
|
+
bordered: 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,36 @@
|
|
|
1
|
+
import { type TonoDelAviso } from './tonos';
|
|
2
|
+
export interface AvisoTransitorio {
|
|
3
|
+
/** Estable mientras el aviso viva: es la clave de la animación. */
|
|
4
|
+
id: string | number;
|
|
5
|
+
message: string;
|
|
6
|
+
tone?: TonoDelAviso;
|
|
7
|
+
}
|
|
8
|
+
type __VLS_Props = {
|
|
9
|
+
toasts: AvisoTransitorio[];
|
|
10
|
+
/**
|
|
11
|
+
* Dónde se apilan.
|
|
12
|
+
*
|
|
13
|
+
* Abajo a la derecha por omisión, que es la convención del escritorio y
|
|
14
|
+
* lo que ya hacía el gestor de archivos. Abajo al centro es lo que usa
|
|
15
|
+
* la galería, y se conserva como opción: en una ventana de ver fotos, la
|
|
16
|
+
* esquina compite con los controles.
|
|
17
|
+
*/
|
|
18
|
+
position?: 'bottom-right' | 'bottom-center';
|
|
19
|
+
};
|
|
20
|
+
declare var __VLS_13: {
|
|
21
|
+
aviso: AvisoTransitorio;
|
|
22
|
+
};
|
|
23
|
+
type __VLS_Slots = {} & {
|
|
24
|
+
default?: (props: typeof __VLS_13) => any;
|
|
25
|
+
};
|
|
26
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
27
|
+
position: "bottom-right" | "bottom-center";
|
|
28
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
29
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
30
|
+
declare const _default: typeof __VLS_export;
|
|
31
|
+
export default _default;
|
|
32
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
33
|
+
new (): {
|
|
34
|
+
$slots: S;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Los cuatro tonos con los que el sistema avisa algo.
|
|
3
|
+
*
|
|
4
|
+
* Son los mismos para el aviso en línea y para el transitorio: que un error se
|
|
5
|
+
* vea igual esté donde esté es la mitad del punto de tener esto en la librería.
|
|
6
|
+
*
|
|
7
|
+
* `info` no usa un token `status-*` porque no existe —el sistema tiene
|
|
8
|
+
* `status-success`, `status-warning` y `status-error`, y nada más—: va con el
|
|
9
|
+
* borde y la superficie de siempre, que es lo que ya hacía vasak-settings.
|
|
10
|
+
*/
|
|
11
|
+
export type TonoDelAviso = 'info' | 'success' | 'warning' | 'error';
|
|
12
|
+
export declare const CLASES_POR_TONO: Record<TonoDelAviso, string>;
|
|
13
|
+
/**
|
|
14
|
+
* Cómo lo anuncia un lector de pantalla.
|
|
15
|
+
*
|
|
16
|
+
* Un error lleva `alert`, que **interrumpe** lo que se esté leyendo, porque
|
|
17
|
+
* algo salió mal y conviene enterarse ahora. Los demás llevan `status`, que
|
|
18
|
+
* espera su turno para no cortar a la mitad. El criterio es de vasak-gallery,
|
|
19
|
+
* que fue la única de las seis copias que se lo planteó.
|
|
20
|
+
*/
|
|
21
|
+
export declare function rolDelTono(tono: TonoDelAviso): 'alert' | 'status';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** De 0 a 100. `null` para indeterminado. */
|
|
3
|
+
value: number | null;
|
|
4
|
+
/** Qué está progresando. Lo lee un lector de pantalla. */
|
|
5
|
+
label: string;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
modelValue: string;
|
|
3
|
+
type?: 'text' | 'password' | 'search' | 'url' | 'email' | 'number';
|
|
4
|
+
/** La otra mitad del `for` de `FormGroup`: sin esto la etiqueta no ata a nada. */
|
|
5
|
+
id?: string;
|
|
6
|
+
/** El nombre del campo cuando no hay etiqueta visible que se lo dé. */
|
|
7
|
+
ariaLabel?: string;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
readonly?: boolean;
|
|
11
|
+
/** El borde de peligro, para un valor que quien llama juzgó inválido. */
|
|
12
|
+
invalid?: boolean;
|
|
13
|
+
/** Para valores donde la alineación importa: rutas, órdenes, reglas. */
|
|
14
|
+
mono?: boolean;
|
|
15
|
+
required?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Avisa al salir del campo y no en cada tecla.
|
|
18
|
+
*
|
|
19
|
+
* Para lo que cuesta caro validar o guardar. Sin esto, escribir una ruta
|
|
20
|
+
* de treinta letras dispara treinta veces lo que haya del otro lado.
|
|
21
|
+
*/
|
|
22
|
+
lazy?: boolean;
|
|
23
|
+
};
|
|
24
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
25
|
+
"update:modelValue": (valor: string) => any;
|
|
26
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
27
|
+
"onUpdate:modelValue"?: ((valor: string) => any) | undefined;
|
|
28
|
+
}>, {
|
|
29
|
+
type: "text" | "password" | "search" | "url" | "email" | "number";
|
|
30
|
+
lazy: boolean;
|
|
31
|
+
invalid: boolean;
|
|
32
|
+
required: boolean;
|
|
33
|
+
disabled: boolean;
|
|
34
|
+
readonly: boolean;
|
|
35
|
+
mono: boolean;
|
|
36
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
37
|
+
declare const _default: typeof __VLS_export;
|
|
38
|
+
export default _default;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -10,8 +10,21 @@ import TabBar from "./tabs/TabBar.vue";
|
|
|
10
10
|
import TabItem from "./tabs/TabItem.vue";
|
|
11
11
|
import BarSearch from "./bar/BarSearch.vue";
|
|
12
12
|
import ActionButton from "./controls/ActionButton.vue";
|
|
13
|
+
import AlertMessage from "./feedback/AlertMessage.vue";
|
|
14
|
+
import EmptyState from "./feedback/EmptyState.vue";
|
|
15
|
+
import ToastArea from "./feedback/ToastArea.vue";
|
|
16
|
+
import ProgressBar from "./forms/ProgressBar.vue";
|
|
17
|
+
import SearchField from "./search/SearchField.vue";
|
|
18
|
+
import SearchSelect from "./search/SearchSelect.vue";
|
|
19
|
+
import TextInput from "./forms/TextInput.vue";
|
|
13
20
|
import ConfigSection from "./layout/ConfigSection.vue";
|
|
14
21
|
import DeviceCard from "./cards/DeviceCard.vue";
|
|
22
|
+
import Dialog from "./dialog/Dialog.vue";
|
|
23
|
+
import DialogContent from "./dialog/DialogContent.vue";
|
|
24
|
+
import DialogDescription from "./dialog/DialogDescription.vue";
|
|
25
|
+
import DialogFooter from "./dialog/DialogFooter.vue";
|
|
26
|
+
import DialogHeader from "./dialog/DialogHeader.vue";
|
|
27
|
+
import DialogTitle from "./dialog/DialogTitle.vue";
|
|
15
28
|
import DropdownMenu from "./dropdown/DropdownMenu.vue";
|
|
16
29
|
import DropdownMenuContent from "./dropdown/DropdownMenuContent.vue";
|
|
17
30
|
import DropdownMenuItem from "./dropdown/DropdownMenuItem.vue";
|
|
@@ -23,15 +36,27 @@ import ListCard from "./cards/ListCard.vue";
|
|
|
23
36
|
import SliderControl from "./forms/SliderControl.vue";
|
|
24
37
|
import SwitchToggle from "./forms/SwitchToggle.vue";
|
|
25
38
|
import ToggleControl from "./controls/ToggleControl.vue";
|
|
39
|
+
import Tooltip from "./tooltip/Tooltip.vue";
|
|
40
|
+
import TooltipContent from "./tooltip/TooltipContent.vue";
|
|
41
|
+
import TooltipTrigger from "./tooltip/TooltipTrigger.vue";
|
|
26
42
|
import TrayIconButton from "./tray/TrayIconButton.vue";
|
|
27
43
|
import type { App } from "vue";
|
|
28
44
|
declare const _default: {
|
|
29
45
|
install(app: App): void;
|
|
30
46
|
};
|
|
31
47
|
export default _default;
|
|
32
|
-
export { SideBar, SideButton, SideGroup, SelectField, ThemeIcon, WindowFrame, AppBar, WindowControls, TabBar, TabItem, BarSearch, ActionButton, ConfigSection, DeviceCard, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, FormGroup, ListCard, SliderControl, SwitchToggle, ToggleControl, TrayIconButton, };
|
|
48
|
+
export { SideBar, SideButton, SideGroup, SelectField, ThemeIcon, WindowFrame, AppBar, WindowControls, TabBar, TabItem, BarSearch, ActionButton, AlertMessage, EmptyState, ProgressBar, SearchField, SearchSelect, TextInput, ToastArea, ConfigSection, DeviceCard, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, FormGroup, ListCard, SliderControl, SwitchToggle, ToggleControl, Tooltip, TooltipContent, TooltipTrigger, TrayIconButton, };
|
|
49
|
+
export type { AvisoTransitorio } from "./feedback/ToastArea.vue";
|
|
50
|
+
export type { TonoDelAviso } from "./feedback/tonos";
|
|
51
|
+
export { CLASES_POR_TONO, rolDelTono } from "./feedback/tonos";
|
|
33
52
|
export type { ContextoDelMenu, FocoAlAbrir } from "./dropdown/tipos";
|
|
53
|
+
export type { ContextoDelDialogo } from "./dialog/tipos";
|
|
54
|
+
export type { OpcionDeBusqueda } from "./search/buscar";
|
|
55
|
+
export { buscarOpciones } from "./search/buscar";
|
|
56
|
+
export { CLAVE_DEL_DIALOGO, usarElDialogo } from "./dialog/tipos";
|
|
34
57
|
export { CLAVE_DEL_MENU, usarElMenu } from "./dropdown/tipos";
|
|
58
|
+
export type { ContextoDelTooltip } from "./tooltip/tipos";
|
|
59
|
+
export { CLAVE_DEL_TOOLTIP, usarElTooltip } from "./tooltip/tipos";
|
|
35
60
|
export type { SidebarCategory, SidebarItem } from "./sidebar/tipos";
|
|
36
61
|
export type { AccionDePestana, ElementoDePestana } from "./tabs/tipos";
|
|
37
62
|
export type { ContextoDeLaBarra, ControlDeVentana, OrientacionDeLaBarra, PosicionDeLaBarra, } from "./window/tipos";
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import { type Ref } from 'vue';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Deja el módulo como recién cargado.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* cada pedido lleva un testigo y sólo se aplica el último: sin él, la respuesta
|
|
9
|
-
* vieja llega última y deja puesto el icono de antes.
|
|
10
|
-
*
|
|
11
|
-
* Interno a propósito: lo comparten `ThemeIcon` y `SideButton`, y lo que las
|
|
12
|
-
* aplicaciones usan es el componente, no esto.
|
|
5
|
+
* Sólo para las pruebas: el estado vive en el módulo y el módulo se comparte
|
|
6
|
+
* entre archivos de prueba, así que sin esto una prueba ve los suscriptores que
|
|
7
|
+
* dejó otra y cuenta oyentes que ya no existen.
|
|
13
8
|
*/
|
|
9
|
+
export declare function olvidarLosIconosDelTema(): void;
|
|
14
10
|
export declare function useIconoDelTema(nombre: Ref<string>, tipo: Ref<'icon' | 'symbol'>): Ref<string, string>;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
modelValue?: string;
|
|
3
|
+
placeholder?: string;
|
|
4
|
+
/** Lo que oye un lector de pantalla: el campo no lleva etiqueta visible. */
|
|
5
|
+
label?: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* El foco al montar, para la búsqueda que se abre en un menú o un panel.
|
|
9
|
+
*
|
|
10
|
+
* Se hace a mano y no con el atributo `autofocus` del HTML, que el
|
|
11
|
+
* navegador sólo atiende al cargar el documento: un campo que aparece
|
|
12
|
+
* después —dentro de un menú que se abre— no lo recibe nunca. El
|
|
13
|
+
* escritorio lo había descubierto y resuelto con una directiva propia.
|
|
14
|
+
*/
|
|
15
|
+
autofocus?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Cuánto se espera tras la última tecla antes de emitir `search`.
|
|
18
|
+
*
|
|
19
|
+
* En cero —lo normal— `search` sale sólo con Enter. Se sube cuando buscar
|
|
20
|
+
* cuesta caro: cada tecla disparando un recorrido entero hace además que
|
|
21
|
+
* el resultado de la penúltima pueda llegar después que el de la última y
|
|
22
|
+
* pisarla.
|
|
23
|
+
*/
|
|
24
|
+
debounce?: number;
|
|
25
|
+
/** La cruz para vaciarlo, que si no cada aplicación se dibuja la suya. */
|
|
26
|
+
clearable?: boolean;
|
|
27
|
+
/** Cambia la lupa por la ruedita: la búsqueda está trabajando. */
|
|
28
|
+
busy?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* El `id` de la lista que este campo maneja, si maneja una.
|
|
31
|
+
*
|
|
32
|
+
* Con esto el campo pasa a anunciarse como **combobox**, que es el patrón
|
|
33
|
+
* de un campo que conduce una lista de resultados: sirve para el
|
|
34
|
+
* desplegable de acá al lado y para el panel de resultados que arme una
|
|
35
|
+
* aplicación. Sin esto es un campo de búsqueda a secas.
|
|
36
|
+
*/
|
|
37
|
+
listboxId?: string;
|
|
38
|
+
/**
|
|
39
|
+
* El `id` de la opción marcada dentro de esa lista.
|
|
40
|
+
*
|
|
41
|
+
* Es lo que hace que un lector de pantalla diga por cuál opción se está
|
|
42
|
+
* pasando **sin mover el foco del campo**, que es lo que deja seguir
|
|
43
|
+
* escribiendo mientras se recorre con las flechas.
|
|
44
|
+
*/
|
|
45
|
+
activeOptionId?: string;
|
|
46
|
+
/** Si la lista está desplegada. */
|
|
47
|
+
expanded?: boolean;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Para que quien lo usa pueda devolverle el foco sin tocar el DOM.
|
|
51
|
+
*
|
|
52
|
+
* Es además la salida para el caso en que el campo aparezca detrás de una
|
|
53
|
+
* animación y el foco de `autofocus` llegue demasiado pronto.
|
|
54
|
+
*/
|
|
55
|
+
declare function enfocar(): void;
|
|
56
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
57
|
+
enfocar: typeof enfocar;
|
|
58
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
59
|
+
search: (valor: string) => any;
|
|
60
|
+
"update:modelValue": (valor: string) => any;
|
|
61
|
+
clear: () => any;
|
|
62
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
63
|
+
onSearch?: ((valor: string) => any) | undefined;
|
|
64
|
+
"onUpdate:modelValue"?: ((valor: string) => any) | undefined;
|
|
65
|
+
onClear?: (() => any) | undefined;
|
|
66
|
+
}>, {
|
|
67
|
+
label: string;
|
|
68
|
+
disabled: boolean;
|
|
69
|
+
modelValue: string;
|
|
70
|
+
placeholder: string;
|
|
71
|
+
autofocus: boolean;
|
|
72
|
+
debounce: number;
|
|
73
|
+
clearable: boolean;
|
|
74
|
+
busy: boolean;
|
|
75
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
76
|
+
declare const _default: typeof __VLS_export;
|
|
77
|
+
export default _default;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type OpcionDeBusqueda } from './buscar';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
modelValue: string;
|
|
4
|
+
options: OpcionDeBusqueda[];
|
|
5
|
+
/** Lo que oye un lector de pantalla en el botón cerrado. */
|
|
6
|
+
label?: string;
|
|
7
|
+
/** El marcador del campo de búsqueda de adentro. */
|
|
8
|
+
searchPlaceholder?: string;
|
|
9
|
+
/** Lo que se dice cuando no coincide nada. */
|
|
10
|
+
emptyText?: string;
|
|
11
|
+
/** Lo que se muestra cuando no hay nada elegido. */
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Cuántas opciones se dibujan como máximo.
|
|
16
|
+
*
|
|
17
|
+
* Sin recorte, con la búsqueda vacía se dibujan cuatrocientos nodos, y
|
|
18
|
+
* como el cálculo corre en cada tecla, cada letra recrea la lista entera.
|
|
19
|
+
* El recorte es seguro **porque la lista viene ordenada por qué tan bien
|
|
20
|
+
* coincide**: recortar una lista alfabética esconde justo lo que se busca.
|
|
21
|
+
*/
|
|
22
|
+
limit?: number;
|
|
23
|
+
/**
|
|
24
|
+
* Si el menú se abre hacia arriba.
|
|
25
|
+
*
|
|
26
|
+
* Hace falta cuando el control vive al pie de un panel: hacia abajo, el
|
|
27
|
+
* menú se sale de la ventana y no hay forma de llegar al final de la lista.
|
|
28
|
+
*/
|
|
29
|
+
up?: boolean;
|
|
30
|
+
};
|
|
31
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
32
|
+
"update:modelValue": (valor: string) => any;
|
|
33
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
34
|
+
"onUpdate:modelValue"?: ((valor: string) => any) | undefined;
|
|
35
|
+
}>, {
|
|
36
|
+
label: string;
|
|
37
|
+
disabled: boolean;
|
|
38
|
+
placeholder: string;
|
|
39
|
+
searchPlaceholder: string;
|
|
40
|
+
emptyText: string;
|
|
41
|
+
limit: number;
|
|
42
|
+
up: boolean;
|
|
43
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
44
|
+
declare const _default: typeof __VLS_export;
|
|
45
|
+
export default _default;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Búsqueda ordenada para una lista larga.
|
|
3
|
+
*
|
|
4
|
+
* **Éste es el paquete común que esperaban las dos copias.** Vivía igual en
|
|
5
|
+
* `vasak-installer` y en `vasak-calendar` —mismo código, distinto comentario—, y
|
|
6
|
+
* el del calendario terminaba diciendo que el día que hubiera un paquete común
|
|
7
|
+
* de interfaz esto iba ahí y se borraba de los dos. Es hoy. Que el orden viva
|
|
8
|
+
* acá es lo que hace que escribir las mismas tres letras traiga lo mismo en
|
|
9
|
+
* cualquier ventana del sistema, que es de lo que se trata esta librería.
|
|
10
|
+
*
|
|
11
|
+
* La lista se recorta a las primeras coincidencias para que escribir no
|
|
12
|
+
* recalcule cientos de nodos por tecla. Con un filtro que sólo pregunta
|
|
13
|
+
* «¿contiene el texto?» y devuelve en orden alfabético, ese recorte deja afuera
|
|
14
|
+
* justo lo que se estaba buscando.
|
|
15
|
+
*
|
|
16
|
+
* El caso que lo hizo evidente en el instalador: alguien busca el teclado
|
|
17
|
+
* latinoamericano y escribe `la`. `la-latin1` es la respuesta, pero también
|
|
18
|
+
* contienen «la» `be-latin1`, `br-latin1-abnt2`, `cz-lat2`, `de-latin1`,
|
|
19
|
+
* `fr-latin1`… y todos van antes por alfabeto. La entrada correcta aparecía más
|
|
20
|
+
* de treinta lugares abajo. Con las zonas pasa igual: escribir `buenos` tiene
|
|
21
|
+
* que traer Buenos Aires primero y no `America/Argentina/…` de todo el país.
|
|
22
|
+
*
|
|
23
|
+
* La solución no es agrandar el recorte —eso devuelve el problema de
|
|
24
|
+
* rendimiento— sino ordenar por qué tan bien coincide cada una.
|
|
25
|
+
*/
|
|
26
|
+
export interface OpcionDeBusqueda {
|
|
27
|
+
valor: string;
|
|
28
|
+
etiqueta: string;
|
|
29
|
+
/** Segunda línea, para desambiguar («Argentina» debajo de «Buenos Aires»). */
|
|
30
|
+
detalle?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Filtra y ordena las opciones según el texto escrito.
|
|
34
|
+
*
|
|
35
|
+
* Con el texto vacío devuelve la lista tal como vino: sin nada escrito no hay
|
|
36
|
+
* ninguna razón para reordenar, y hacerlo movería las entradas bajo el cursor
|
|
37
|
+
* de alguien que estaba mirando.
|
|
38
|
+
*
|
|
39
|
+
* El orden dentro de cada nivel de coincidencia es el de entrada, que acá es
|
|
40
|
+
* alfabético porque así las devuelve el motor.
|
|
41
|
+
*/
|
|
42
|
+
export declare function buscarOpciones(opciones: OpcionDeBusqueda[], texto: string): OpcionDeBusqueda[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function siguienteIdDeLista(): string;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** Un botón apagado no explica nada: no hay tooltip que mostrar. */
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
/** Cuánto espera antes de aparecer, en milisegundos. */
|
|
5
|
+
delayDuration?: number;
|
|
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<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
12
|
+
disabled: boolean;
|
|
13
|
+
delayDuration: number;
|
|
14
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
side?: 'top' | 'bottom' | 'left' | 'right';
|
|
3
|
+
align?: 'start' | 'center' | 'end';
|
|
4
|
+
sideOffset?: number;
|
|
5
|
+
};
|
|
6
|
+
declare var __VLS_13: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
default?: (props: typeof __VLS_13) => 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
|
+
side: "top" | "bottom" | "left" | "right";
|
|
12
|
+
align: "start" | "center" | "end";
|
|
13
|
+
sideOffset: number;
|
|
14
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare var __VLS_1: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_1) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
10
|
+
new (): {
|
|
11
|
+
$slots: S;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* El contrato entre las tres piezas de un tooltip.
|
|
3
|
+
*
|
|
4
|
+
* Como el menú desplegable, un tooltip es un componente repartido: el
|
|
5
|
+
* disparador está donde lo escribieron y el contenido se teletransporta al
|
|
6
|
+
* `body` para que no lo recorte ningún `overflow`. Nada de eso se coordina por
|
|
7
|
+
* propiedades, así que la raíz lo **provee** y las otras dos lo inyectan.
|
|
8
|
+
*
|
|
9
|
+
* Lo que se coordina es si está abierto y **cuál** es el elemento que lo
|
|
10
|
+
* disparó: el contenido lo necesita para medir dónde ponerse, y no puede ser
|
|
11
|
+
* el `div` envoltorio del disparador sino el hijo de verdad, que es el que
|
|
12
|
+
* tiene el tamaño del botón.
|
|
13
|
+
*/
|
|
14
|
+
import { type InjectionKey, type Ref } from 'vue';
|
|
15
|
+
export interface ContextoDelTooltip {
|
|
16
|
+
abierto: Ref<boolean>;
|
|
17
|
+
/** El elemento que lo disparó, que es contra el que se mide la posición. */
|
|
18
|
+
disparador: Ref<HTMLElement | null>;
|
|
19
|
+
ponerElDisparador: (elemento: HTMLElement | null) => void;
|
|
20
|
+
/** Abre tras el retardo. Sin retardo el tooltip parpadea al pasar de largo. */
|
|
21
|
+
abrir: () => void;
|
|
22
|
+
cerrar: () => void;
|
|
23
|
+
}
|
|
24
|
+
export declare const CLAVE_DEL_TOOLTIP: InjectionKey<ContextoDelTooltip>;
|
|
25
|
+
/**
|
|
26
|
+
* El tooltip que envuelve a este componente.
|
|
27
|
+
*
|
|
28
|
+
* Fuera de un `Tooltip` devuelve un contexto suelto en vez de reventar: un
|
|
29
|
+
* disparador montado solo —en una prueba, en una vista previa— tiene que
|
|
30
|
+
* dibujarse igual aunque no haya nada que abrir.
|
|
31
|
+
*/
|
|
32
|
+
export declare function usarElTooltip(): ContextoDelTooltip;
|
|
@@ -38,9 +38,6 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
38
38
|
}>, {
|
|
39
39
|
title: string;
|
|
40
40
|
controls: ControlDeVentana[];
|
|
41
|
-
minimizeLabel: string;
|
|
42
|
-
maximizeLabel: string;
|
|
43
|
-
closeLabel: string;
|
|
44
41
|
position: PosicionDeLaBarra | null;
|
|
45
42
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
46
43
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|