@dskripchenko/ui 1.8.0 → 1.10.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/components/Checkbox/UidCheckbox.vue.d.ts +2 -2
- package/dist/components/Combobox/UidCombobox.vue.d.ts +1 -1
- package/dist/components/Grid/UidGrid.vue.d.ts +1 -1
- package/dist/components/Heatmap/UidHeatmapMatrix.vue.d.ts +68 -0
- package/dist/components/Heatmap/colorScales.d.ts +8 -0
- package/dist/components/Heatmap/index.d.ts +4 -0
- package/dist/components/Input/UidInput.vue.d.ts +2 -2
- package/dist/components/Mention/UidMention.vue.d.ts +2 -2
- package/dist/components/NumberInput/UidNumberInput.vue.d.ts +1 -1
- package/dist/components/Pagination/UidPageSize.vue.d.ts +1 -1
- package/dist/components/Radio/UidRadio.vue.d.ts +2 -2
- package/dist/components/Slider/UidSlider.vue.d.ts +1 -1
- package/dist/components/Switch/UidSwitch.vue.d.ts +2 -2
- package/dist/components/TagsInput/UidTagsInput.vue.d.ts +1 -1
- package/dist/components/Textarea/UidTextarea.vue.d.ts +2 -2
- package/dist/composables/useControlAttrs.d.ts +16 -0
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.mjs +1280 -844
- package/dist/locales/types.d.ts +2 -0
- package/dist/styles/all.css +1 -1
- package/dist/styles/index.css +1 -1
- package/package.json +1 -1
|
@@ -23,11 +23,11 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
23
23
|
required: boolean;
|
|
24
24
|
disabled: boolean;
|
|
25
25
|
error: string;
|
|
26
|
+
id: string;
|
|
26
27
|
hint: string;
|
|
27
28
|
name: string;
|
|
28
|
-
id: string;
|
|
29
29
|
indeterminate: boolean;
|
|
30
30
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
31
31
|
inputRef: HTMLInputElement;
|
|
32
|
-
},
|
|
32
|
+
}, any>;
|
|
33
33
|
export default _default;
|
|
@@ -22,8 +22,8 @@ declare const __VLS_component: import('vue').DefineComponent<UidGridProps, {}, {
|
|
|
22
22
|
as: string;
|
|
23
23
|
justify: "start" | "center" | "end" | "stretch";
|
|
24
24
|
gap: string;
|
|
25
|
-
align: "start" | "center" | "end" | "stretch";
|
|
26
25
|
cols: number | string;
|
|
26
|
+
align: "start" | "center" | "end" | "stretch";
|
|
27
27
|
rowGap: string;
|
|
28
28
|
colGap: string;
|
|
29
29
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { HeatmapColorScaleName } from './colorScales.js';
|
|
2
|
+
export interface HeatmapMatrixCell {
|
|
3
|
+
row: string;
|
|
4
|
+
col: string;
|
|
5
|
+
rowIndex: number;
|
|
6
|
+
colIndex: number;
|
|
7
|
+
value: number | null;
|
|
8
|
+
}
|
|
9
|
+
export type HeatmapMatrixColLabels = 'auto' | 'horizontal' | 'rotated';
|
|
10
|
+
export interface UidHeatmapMatrixProps {
|
|
11
|
+
rows: string[];
|
|
12
|
+
cols: string[];
|
|
13
|
+
values: ReadonlyArray<ReadonlyArray<number | null | undefined>>;
|
|
14
|
+
colorScale?: HeatmapColorScaleName | (string & {}) | string[];
|
|
15
|
+
min?: number;
|
|
16
|
+
max?: number;
|
|
17
|
+
formatValue?: (value: number) => string;
|
|
18
|
+
cellHeight?: number;
|
|
19
|
+
minCellWidth?: number;
|
|
20
|
+
gap?: number;
|
|
21
|
+
colLabels?: HeatmapMatrixColLabels;
|
|
22
|
+
showLegend?: boolean;
|
|
23
|
+
ariaLabel?: string;
|
|
24
|
+
}
|
|
25
|
+
declare function __VLS_template(): {
|
|
26
|
+
attrs: Partial<{}>;
|
|
27
|
+
slots: Readonly<{
|
|
28
|
+
tooltip?(props: {
|
|
29
|
+
cell: HeatmapMatrixCell;
|
|
30
|
+
formatted: string;
|
|
31
|
+
}): unknown;
|
|
32
|
+
}> & {
|
|
33
|
+
tooltip?(props: {
|
|
34
|
+
cell: HeatmapMatrixCell;
|
|
35
|
+
formatted: string;
|
|
36
|
+
}): unknown;
|
|
37
|
+
};
|
|
38
|
+
refs: {
|
|
39
|
+
rootRef: HTMLDivElement;
|
|
40
|
+
rowHeaderRef: HTMLDivElement;
|
|
41
|
+
tooltipRef: HTMLDivElement;
|
|
42
|
+
};
|
|
43
|
+
rootEl: HTMLDivElement;
|
|
44
|
+
};
|
|
45
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
46
|
+
declare const __VLS_component: import('vue').DefineComponent<UidHeatmapMatrixProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<UidHeatmapMatrixProps> & Readonly<{}>, {
|
|
47
|
+
min: number;
|
|
48
|
+
max: number;
|
|
49
|
+
formatValue: (value: number) => string;
|
|
50
|
+
ariaLabel: string;
|
|
51
|
+
gap: number;
|
|
52
|
+
showLegend: boolean;
|
|
53
|
+
colorScale: HeatmapColorScaleName | (string & {}) | string[];
|
|
54
|
+
cellHeight: number;
|
|
55
|
+
minCellWidth: number;
|
|
56
|
+
colLabels: HeatmapMatrixColLabels;
|
|
57
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
58
|
+
rootRef: HTMLDivElement;
|
|
59
|
+
rowHeaderRef: HTMLDivElement;
|
|
60
|
+
tooltipRef: HTMLDivElement;
|
|
61
|
+
}, HTMLDivElement>;
|
|
62
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
63
|
+
export default _default;
|
|
64
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
65
|
+
new (): {
|
|
66
|
+
$slots: S;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type HeatmapColorScaleName = 'default' | 'viridis' | 'magma' | 'plasma' | 'inferno' | 'blues' | 'greens' | 'reds';
|
|
2
|
+
export declare const HEATMAP_DEFAULT_LOW = "color-mix(in srgb, var(--uid-heatmap-matrix-color) 14%, var(--uid-color-bg))";
|
|
3
|
+
export declare const HEATMAP_DEFAULT_HIGH = "var(--uid-heatmap-matrix-color)";
|
|
4
|
+
export declare const heatmapColorScales: Record<HeatmapColorScaleName, readonly string[]>;
|
|
5
|
+
export declare function isHeatmapColorScaleName(value: string): value is HeatmapColorScaleName;
|
|
6
|
+
export declare function resolveHeatmapStops(scale: string | readonly string[] | undefined): string[];
|
|
7
|
+
export declare function heatmapColorAt(stops: readonly string[], t: number): string;
|
|
8
|
+
export declare function heatmapGradient(stops: readonly string[]): string;
|
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
export { default as UidHeatmap } from './UidHeatmap.vue';
|
|
2
2
|
export type { UidHeatmapProps, HeatmapPoint } from './UidHeatmap.vue';
|
|
3
|
+
export { default as UidHeatmapMatrix } from './UidHeatmapMatrix.vue';
|
|
4
|
+
export type { UidHeatmapMatrixProps, HeatmapMatrixCell, HeatmapMatrixColLabels } from './UidHeatmapMatrix.vue';
|
|
5
|
+
export { heatmapColorScales, resolveHeatmapStops, heatmapColorAt } from './colorScales.js';
|
|
6
|
+
export type { HeatmapColorScaleName } from './colorScales.js';
|
|
@@ -29,7 +29,7 @@ declare function __VLS_template(): {
|
|
|
29
29
|
append?(): unknown;
|
|
30
30
|
};
|
|
31
31
|
refs: {};
|
|
32
|
-
rootEl:
|
|
32
|
+
rootEl: any;
|
|
33
33
|
};
|
|
34
34
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
35
35
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {
|
|
@@ -48,7 +48,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
48
48
|
required: boolean;
|
|
49
49
|
disabled: boolean;
|
|
50
50
|
readonly: boolean;
|
|
51
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {},
|
|
51
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
52
52
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
53
53
|
export default _default;
|
|
54
54
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -25,10 +25,10 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
25
25
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
26
26
|
}>, {
|
|
27
27
|
filter: (option: MentionOption, query: string) => boolean;
|
|
28
|
-
rows: number;
|
|
29
28
|
prefix: string | string[];
|
|
29
|
+
rows: number;
|
|
30
30
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
31
31
|
fieldRef: HTMLTextAreaElement;
|
|
32
32
|
panelRef: HTMLDivElement;
|
|
33
|
-
},
|
|
33
|
+
}, any>;
|
|
34
34
|
export default _default;
|
|
@@ -42,5 +42,5 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
42
42
|
precision: number;
|
|
43
43
|
controls: boolean;
|
|
44
44
|
centered: boolean;
|
|
45
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {},
|
|
45
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
46
46
|
export default _default;
|
|
@@ -13,5 +13,5 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
13
13
|
}>, {
|
|
14
14
|
label: string;
|
|
15
15
|
options: number[];
|
|
16
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {},
|
|
16
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
17
17
|
export default _default;
|
|
@@ -17,7 +17,7 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
17
17
|
}>, {
|
|
18
18
|
label: string;
|
|
19
19
|
disabled: boolean;
|
|
20
|
-
name: string;
|
|
21
20
|
id: string;
|
|
22
|
-
|
|
21
|
+
name: string;
|
|
22
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
23
23
|
export default _default;
|
|
@@ -39,5 +39,5 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
39
39
|
marks: UidSliderMarks;
|
|
40
40
|
ariaLabel: string;
|
|
41
41
|
ariaLabelledby: string;
|
|
42
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {},
|
|
42
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
43
43
|
export default _default;
|
|
@@ -25,8 +25,8 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
25
25
|
required: boolean;
|
|
26
26
|
disabled: boolean;
|
|
27
27
|
error: string;
|
|
28
|
+
id: string;
|
|
28
29
|
hint: string;
|
|
29
30
|
name: string;
|
|
30
|
-
|
|
31
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
31
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
32
32
|
export default _default;
|
|
@@ -35,5 +35,5 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
35
35
|
unique: boolean;
|
|
36
36
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
37
37
|
inputRef: HTMLInputElement;
|
|
38
|
-
},
|
|
38
|
+
}, any>;
|
|
39
39
|
export default _default;
|
|
@@ -37,17 +37,17 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {
|
|
|
37
37
|
required: boolean;
|
|
38
38
|
disabled: boolean;
|
|
39
39
|
error: string;
|
|
40
|
+
id: string;
|
|
40
41
|
placeholder: string;
|
|
41
42
|
readonly: boolean;
|
|
42
43
|
hint: string;
|
|
43
44
|
name: string;
|
|
44
45
|
rules: RuleInput;
|
|
45
|
-
id: string;
|
|
46
46
|
rows: number;
|
|
47
47
|
autoGrow: boolean;
|
|
48
48
|
maxRows: number;
|
|
49
49
|
resize: "none" | "vertical" | "horizontal" | "both";
|
|
50
50
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
51
51
|
textareaRef: HTMLTextAreaElement;
|
|
52
|
-
},
|
|
52
|
+
}, any>;
|
|
53
53
|
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'vue';
|
|
2
|
+
export interface ControlAttrs {
|
|
3
|
+
/** `class` and `style` only: bind to the component root with `v-bind="rootAttrs()"`. */
|
|
4
|
+
rootAttrs: () => Pick<HTMLAttributes, 'class' | 'style'>;
|
|
5
|
+
/** Every other fallthrough attribute and `onXxx` listener: bind to the native control. */
|
|
6
|
+
controlAttrs: () => Record<string, unknown>;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* For components with `inheritAttrs: false`. Splits the fallthrough attributes so
|
|
10
|
+
* that `class`/`style` stay on the root element and everything else (`list`,
|
|
11
|
+
* `maxlength`, `pattern`, `inputmode`, `name`, `data-*`, `aria-*`, listeners ...)
|
|
12
|
+
* reaches the native `<input>`/`<textarea>`/`<select>`.
|
|
13
|
+
*
|
|
14
|
+
* Call the returned functions from the template so they are re-read on every render.
|
|
15
|
+
*/
|
|
16
|
+
export declare function useControlAttrs(): ControlAttrs;
|