@milaboratories/uikit 1.2.11 → 1.2.12
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 +6 -0
- package/dist/pl-uikit.js +1734 -1724
- package/dist/pl-uikit.umd.cjs +4 -4
- package/dist/src/components/DropdownListItem.vue.d.ts +3 -3
- package/dist/src/components/PlDropdownLine/PlDropdownLine.vue.d.ts +2 -2
- package/dist/src/components/TabItem.vue.d.ts +3 -3
- package/dist/src/composition/useFilteredList.d.ts +2 -2
- package/dist/src/helpers/utils.d.ts +4 -0
- package/dist/src/types.d.ts +9 -0
- package/dist/style.css +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/components/DropdownListItem.vue +3 -3
- package/src/components/PlDropdown/PlDropdown.vue +17 -14
- package/src/components/PlDropdownLine/PlDropdownLine.vue +6 -5
- package/src/components/PlDropdownMulti/PlDropdownMulti.vue +10 -7
- package/src/components/PlDropdownMulti/pl-dropdown-multi.scss +1 -1
- package/src/components/TabItem.vue +5 -3
- package/src/composition/useFilteredList.ts +7 -5
- package/src/helpers/utils.ts +7 -0
- package/src/types.ts +14 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ListOptionNormalized } from '../types';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<{
|
|
3
|
-
option:
|
|
3
|
+
option: ListOptionNormalized;
|
|
4
4
|
isSelected: boolean;
|
|
5
5
|
size: "small" | "medium";
|
|
6
6
|
isHovered: boolean;
|
|
7
7
|
useCheckbox?: boolean;
|
|
8
8
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
9
|
-
option:
|
|
9
|
+
option: ListOptionNormalized;
|
|
10
10
|
isSelected: boolean;
|
|
11
11
|
size: "small" | "medium";
|
|
12
12
|
isHovered: boolean;
|
|
@@ -4,14 +4,14 @@ import type { ListOption } from '../../types';
|
|
|
4
4
|
declare function __VLS_template(): {
|
|
5
5
|
slots: {
|
|
6
6
|
item?(_: {
|
|
7
|
-
item:
|
|
7
|
+
item: import("../../types").ListOptionNormalized<unknown>;
|
|
8
8
|
textItem: string;
|
|
9
9
|
isSelected: boolean;
|
|
10
10
|
isHovered: boolean;
|
|
11
11
|
onClick: any;
|
|
12
12
|
}): any;
|
|
13
13
|
item?(_: {
|
|
14
|
-
item:
|
|
14
|
+
item: import("../../types").ListOptionNormalized<unknown>;
|
|
15
15
|
isSelected: boolean;
|
|
16
16
|
isHovered: boolean;
|
|
17
17
|
onClick: any;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ListOptionNormalized } from '../types';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<{
|
|
3
|
-
|
|
3
|
+
option: ListOptionNormalized;
|
|
4
4
|
isSelected: boolean;
|
|
5
5
|
isHovered: boolean;
|
|
6
6
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
7
|
-
|
|
7
|
+
option: ListOptionNormalized;
|
|
8
8
|
isSelected: boolean;
|
|
9
9
|
isHovered: boolean;
|
|
10
10
|
}> & Readonly<{}>, {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ComputedRef, Ref } from 'vue';
|
|
2
|
-
import type { ListOption } from '../types';
|
|
3
|
-
export declare function useFilteredList(
|
|
2
|
+
import type { ListOption, ListOptionNormalized } from '../types';
|
|
3
|
+
export declare function useFilteredList<V = unknown>(optionsRef: Ref<ListOption<V>[]>, searchPhrase: Ref<string>): ComputedRef<ListOptionNormalized<V>[]>;
|
|
@@ -22,4 +22,8 @@ type AnyFunction = (...args: any[]) => any;
|
|
|
22
22
|
export declare function debounce<F extends AnyFunction>(func: F, delay: number): (...args: Parameters<F>) => void;
|
|
23
23
|
export declare function throttle<F extends AnyFunction>(callback: F, ms: number, trailing?: boolean): (...args: Parameters<F>) => void;
|
|
24
24
|
export declare function listToOptions<T>(list: T[] | readonly T[]): ListOption<T>[];
|
|
25
|
+
export declare function normalizeListOptions<V = unknown>(options: Readonly<ListOption<V>[]>): {
|
|
26
|
+
label: string;
|
|
27
|
+
value: V;
|
|
28
|
+
}[];
|
|
25
29
|
export {};
|
package/dist/src/types.d.ts
CHANGED
|
@@ -22,6 +22,15 @@ export type ListOption<T = unknown> = {
|
|
|
22
22
|
text: string;
|
|
23
23
|
description?: string;
|
|
24
24
|
value: T;
|
|
25
|
+
} | {
|
|
26
|
+
label: string;
|
|
27
|
+
description?: string;
|
|
28
|
+
value: T;
|
|
29
|
+
};
|
|
30
|
+
export type ListOptionNormalized<T = unknown> = {
|
|
31
|
+
label: string;
|
|
32
|
+
description?: string;
|
|
33
|
+
value: T;
|
|
25
34
|
};
|
|
26
35
|
export declare const maskIcons16: readonly ["checkmark", "import", "clear", "chevron-right", "add", "play", "loading", "arrow-right", "clipboard", "link", "comp", "close", "restart", "stop"];
|
|
27
36
|
export type MaskIconName16 = (typeof maskIcons16)[number];
|