@dskripchenko/ui 1.3.0 → 1.5.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/README.md +1 -1
- package/dist/components/BackTop/UidBackTop.vue.d.ts +1 -1
- package/dist/components/Breadcrumb/UidBreadcrumbItem.vue.d.ts +19 -3
- package/dist/components/Breadcrumb/context.d.ts +6 -0
- package/dist/components/Button/UidButton.vue.d.ts +9 -2
- package/dist/components/Button/index.d.ts +1 -1
- package/dist/components/Cascader/UidCascader.vue.d.ts +8 -0
- package/dist/components/Checkbox/UidCheckboxGroup.vue.d.ts +36 -0
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/Code/UidCode.vue.d.ts +3 -1
- package/dist/components/Code/highlight.d.ts +7 -0
- package/dist/components/Code/index.d.ts +2 -0
- package/dist/components/ColorPicker/UidColorPicker.vue.d.ts +1 -1
- package/dist/components/ColorPicker/colorParse.d.ts +4 -0
- package/dist/components/ColorPicker/index.d.ts +2 -0
- package/dist/components/DateRangePicker/UidDateRangePicker.vue.d.ts +8 -0
- package/dist/components/DateRangePicker/index.d.ts +1 -1
- package/dist/components/Grid/UidGrid.vue.d.ts +1 -1
- package/dist/components/Image/UidImage.vue.d.ts +54 -0
- package/dist/components/Image/index.d.ts +2 -0
- package/dist/components/Menu/UidMenuItem.vue.d.ts +1 -0
- package/dist/components/Menu/UidSubMenu.vue.d.ts +48 -0
- package/dist/components/Menu/context.d.ts +7 -1
- package/dist/components/Menu/index.d.ts +2 -0
- package/dist/components/Select/UidSelect.vue.d.ts +15 -5
- package/dist/components/Select/index.d.ts +1 -1
- package/dist/components/Slider/UidSlider.vue.d.ts +16 -0
- package/dist/components/Slider/index.d.ts +1 -1
- package/dist/components/Stack/UidStack.vue.d.ts +1 -1
- package/dist/components/Table/UidTable.vue.d.ts +13 -2
- package/dist/components/TreeSelect/UidTreeSelect.vue.d.ts +5 -1
- package/dist/components/TreeView/UidTreeView.vue.d.ts +2 -0
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +14 -12
- package/dist/index.mjs +3620 -2498
- package/dist/locales/types.d.ts +6 -0
- package/dist/styles/all.css +2 -2
- package/dist/styles/index.css +1 -1
- package/dist/styles/tokens.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -81,7 +81,7 @@ Switch theme by attribute on `<html>`:
|
|
|
81
81
|
|
|
82
82
|
A short selection — the full catalog is in [Storybook](https://dskripchenko.github.io/ui/).
|
|
83
83
|
|
|
84
|
-
**Forms & input:** Button, Input, Textarea, NumberInput, Checkbox, Radio, Switch, Label, FormField, Select, Combobox, TagsInput, DatePicker, DateRangePicker, TimePicker, ColorPicker, Slider, Rating, FileUpload, Mention, TreeSelect, Cascader
|
|
84
|
+
**Forms & input:** Button, Input, Textarea, NumberInput, Checkbox, CheckboxGroup, Radio, Switch, Label, FormField, Select, Combobox, TagsInput, DatePicker, DateRangePicker, TimePicker, ColorPicker, Slider, Rating, FileUpload, Mention, TreeSelect, Cascader
|
|
85
85
|
|
|
86
86
|
**Feedback:** Spinner, Skeleton, Badge, Alert, Progress, Toast, Tour
|
|
87
87
|
|
|
@@ -21,8 +21,8 @@ declare const __VLS_component: import('vue').DefineComponent<UidBackTopProps, {}
|
|
|
21
21
|
onClick?: (() => any) | undefined;
|
|
22
22
|
}>, {
|
|
23
23
|
target: string | HTMLElement | (() => HTMLElement | null);
|
|
24
|
-
visibleAfter: number;
|
|
25
24
|
smooth: boolean;
|
|
25
|
+
visibleAfter: number;
|
|
26
26
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
27
27
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
28
28
|
export default _default;
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
export interface UidBreadcrumbItemProps {
|
|
2
2
|
href?: string;
|
|
3
|
+
/** Router location. Rendered through the app's globally registered RouterLink; without one it falls back to `href` (or a string `to`). */
|
|
4
|
+
to?: string | Record<string, unknown>;
|
|
5
|
+
/**
|
|
6
|
+
* Marks the crumb as the current page (`aria-current="page"`, current styling, no link).
|
|
7
|
+
* When omitted, only the last crumb of the list is treated as current.
|
|
8
|
+
* Set `false` to keep the last crumb a regular one.
|
|
9
|
+
*/
|
|
3
10
|
current?: boolean;
|
|
4
11
|
}
|
|
5
12
|
declare function __VLS_template(): {
|
|
@@ -9,14 +16,23 @@ declare function __VLS_template(): {
|
|
|
9
16
|
}> & {
|
|
10
17
|
default(): unknown;
|
|
11
18
|
};
|
|
12
|
-
refs: {
|
|
19
|
+
refs: {
|
|
20
|
+
itemRef: HTMLLIElement;
|
|
21
|
+
};
|
|
13
22
|
rootEl: HTMLLIElement;
|
|
14
23
|
};
|
|
15
24
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
16
|
-
declare const __VLS_component: import('vue').DefineComponent<UidBreadcrumbItemProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
25
|
+
declare const __VLS_component: import('vue').DefineComponent<UidBreadcrumbItemProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
26
|
+
click: (event: MouseEvent) => any;
|
|
27
|
+
}, string, import('vue').PublicProps, Readonly<UidBreadcrumbItemProps> & Readonly<{
|
|
28
|
+
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
29
|
+
}>, {
|
|
17
30
|
href: string;
|
|
31
|
+
to: string | Record<string, unknown>;
|
|
18
32
|
current: boolean;
|
|
19
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
33
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
34
|
+
itemRef: HTMLLIElement;
|
|
35
|
+
}, HTMLLIElement>;
|
|
20
36
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
21
37
|
export default _default;
|
|
22
38
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { InjectionKey, Ref } from 'vue';
|
|
2
|
+
export interface BreadcrumbContext {
|
|
3
|
+
/** Bumped after every UidBreadcrumb update so items can re-check whether they are last. */
|
|
4
|
+
tick: Ref<number>;
|
|
5
|
+
}
|
|
6
|
+
export declare const BREADCRUMB_KEY: InjectionKey<BreadcrumbContext>;
|
|
@@ -1,20 +1,25 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
1
2
|
export type UidButtonVariant = 'primary' | 'secondary' | 'ghost' | 'danger';
|
|
2
3
|
export type UidButtonSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
export type UidButtonIconPosition = 'start' | 'end';
|
|
3
5
|
export interface UidButtonProps {
|
|
4
6
|
variant?: UidButtonVariant;
|
|
5
7
|
size?: UidButtonSize;
|
|
6
8
|
disabled?: boolean;
|
|
7
9
|
loading?: boolean;
|
|
8
10
|
type?: 'button' | 'submit' | 'reset';
|
|
11
|
+
/** Icon component (e.g. from lucide-vue-next). Without default slot content the button becomes icon-only. */
|
|
12
|
+
icon?: Component;
|
|
13
|
+
iconPosition?: UidButtonIconPosition;
|
|
9
14
|
}
|
|
10
15
|
declare function __VLS_template(): {
|
|
11
16
|
attrs: Partial<{}>;
|
|
12
17
|
slots: Readonly<{
|
|
13
|
-
default(): unknown;
|
|
18
|
+
default?(): unknown;
|
|
14
19
|
prepend?(): unknown;
|
|
15
20
|
append?(): unknown;
|
|
16
21
|
}> & {
|
|
17
|
-
default(): unknown;
|
|
22
|
+
default?(): unknown;
|
|
18
23
|
prepend?(): unknown;
|
|
19
24
|
append?(): unknown;
|
|
20
25
|
};
|
|
@@ -27,11 +32,13 @@ declare const __VLS_component: import('vue').DefineComponent<UidButtonProps, {},
|
|
|
27
32
|
}, string, import('vue').PublicProps, Readonly<UidButtonProps> & Readonly<{
|
|
28
33
|
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
29
34
|
}>, {
|
|
35
|
+
icon: Component;
|
|
30
36
|
size: UidButtonSize;
|
|
31
37
|
type: "button" | "submit" | "reset";
|
|
32
38
|
variant: UidButtonVariant;
|
|
33
39
|
disabled: boolean;
|
|
34
40
|
loading: boolean;
|
|
41
|
+
iconPosition: UidButtonIconPosition;
|
|
35
42
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>;
|
|
36
43
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
37
44
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as UidButton } from './UidButton.vue';
|
|
2
|
-
export type { UidButtonProps, UidButtonVariant, UidButtonSize } from './UidButton.vue';
|
|
2
|
+
export type { UidButtonProps, UidButtonVariant, UidButtonSize, UidButtonIconPosition } from './UidButton.vue';
|
|
@@ -14,6 +14,9 @@ export interface UidCascaderProps {
|
|
|
14
14
|
label?: string;
|
|
15
15
|
hint?: string;
|
|
16
16
|
expandTrigger?: 'click' | 'hover';
|
|
17
|
+
searchable?: boolean;
|
|
18
|
+
changeOnSelect?: boolean;
|
|
19
|
+
searchPlaceholder?: string;
|
|
17
20
|
}
|
|
18
21
|
type __VLS_Props = UidCascaderProps;
|
|
19
22
|
type __VLS_PublicProps = {
|
|
@@ -28,9 +31,14 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
28
31
|
}>, {
|
|
29
32
|
disabled: boolean;
|
|
30
33
|
separator: string;
|
|
34
|
+
searchable: boolean;
|
|
31
35
|
clearable: boolean;
|
|
32
36
|
expandTrigger: "click" | "hover";
|
|
37
|
+
changeOnSelect: boolean;
|
|
38
|
+
searchPlaceholder: string;
|
|
33
39
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
34
40
|
containerRef: HTMLDivElement;
|
|
41
|
+
triggerRef: HTMLDivElement;
|
|
42
|
+
searchRef: HTMLInputElement;
|
|
35
43
|
}, HTMLDivElement>;
|
|
36
44
|
export default _default;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export type CheckboxGroupValue = string | number;
|
|
2
|
+
export interface CheckboxGroupOption {
|
|
3
|
+
value: CheckboxGroupValue;
|
|
4
|
+
label: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface UidCheckboxGroupProps {
|
|
8
|
+
options: CheckboxGroupOption[];
|
|
9
|
+
name?: string;
|
|
10
|
+
label?: string;
|
|
11
|
+
hint?: string;
|
|
12
|
+
error?: string;
|
|
13
|
+
required?: boolean;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
direction?: 'horizontal' | 'vertical';
|
|
16
|
+
}
|
|
17
|
+
type __VLS_Props = UidCheckboxGroupProps;
|
|
18
|
+
type __VLS_PublicProps = {
|
|
19
|
+
modelValue?: CheckboxGroupValue[];
|
|
20
|
+
} & __VLS_Props;
|
|
21
|
+
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
22
|
+
"update:modelValue": (value: CheckboxGroupValue[]) => any;
|
|
23
|
+
change: (value: CheckboxGroupValue[]) => any;
|
|
24
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
25
|
+
"onUpdate:modelValue"?: ((value: CheckboxGroupValue[]) => any) | undefined;
|
|
26
|
+
onChange?: ((value: CheckboxGroupValue[]) => any) | undefined;
|
|
27
|
+
}>, {
|
|
28
|
+
label: string;
|
|
29
|
+
required: boolean;
|
|
30
|
+
disabled: boolean;
|
|
31
|
+
hint: string;
|
|
32
|
+
error: string;
|
|
33
|
+
name: string;
|
|
34
|
+
direction: "horizontal" | "vertical";
|
|
35
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
36
|
+
export default _default;
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export { default as UidCheckbox } from './UidCheckbox.vue';
|
|
2
2
|
export type { UidCheckboxProps } from './UidCheckbox.vue';
|
|
3
|
+
export { default as UidCheckboxGroup } from './UidCheckboxGroup.vue';
|
|
4
|
+
export type { UidCheckboxGroupProps, CheckboxGroupOption, CheckboxGroupValue, } from './UidCheckboxGroup.vue';
|
|
@@ -6,6 +6,7 @@ export interface UidCodeProps {
|
|
|
6
6
|
copy?: boolean;
|
|
7
7
|
wrap?: boolean;
|
|
8
8
|
maxHeight?: string;
|
|
9
|
+
highlight?: boolean;
|
|
9
10
|
}
|
|
10
11
|
declare function __VLS_template(): {
|
|
11
12
|
attrs: Partial<{}>;
|
|
@@ -22,10 +23,11 @@ declare const __VLS_component: import('vue').DefineComponent<UidCodeProps, {}, {
|
|
|
22
23
|
code: string;
|
|
23
24
|
inline: boolean;
|
|
24
25
|
copy: boolean;
|
|
26
|
+
wrap: boolean;
|
|
25
27
|
language: string;
|
|
26
28
|
lineNumbers: boolean;
|
|
27
|
-
wrap: boolean;
|
|
28
29
|
maxHeight: string;
|
|
30
|
+
highlight: boolean;
|
|
29
31
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
30
32
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
31
33
|
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type UidCodeTokenType = 'plain' | 'comment' | 'string' | 'number' | 'keyword' | 'literal' | 'function' | 'variable' | 'tag' | 'attr' | 'property' | 'punctuation';
|
|
2
|
+
export interface UidCodeToken {
|
|
3
|
+
type: UidCodeTokenType;
|
|
4
|
+
text: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function isHighlightable(language?: string): boolean;
|
|
7
|
+
export declare function tokenize(code: string, language?: string): UidCodeToken[];
|
|
@@ -15,8 +15,8 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
15
15
|
onChange?: ((value: string | null) => any) | undefined;
|
|
16
16
|
}>, {
|
|
17
17
|
disabled: boolean;
|
|
18
|
-
presets: string[];
|
|
19
18
|
alpha: boolean;
|
|
19
|
+
presets: string[];
|
|
20
20
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
21
21
|
containerRef: HTMLDivElement;
|
|
22
22
|
gradientRef: HTMLDivElement;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type RgbaTuple = [r: number, g: number, b: number, a: number];
|
|
2
|
+
export declare function parseColor(input: string | null | undefined): RgbaTuple | null;
|
|
3
|
+
export declare function toHex([r, g, b, a]: RgbaTuple): string;
|
|
4
|
+
export declare function normalizeColor(input: string | null | undefined): string | null;
|
|
@@ -2,6 +2,10 @@ export interface DateRange {
|
|
|
2
2
|
start: string | null;
|
|
3
3
|
end: string | null;
|
|
4
4
|
}
|
|
5
|
+
export interface DateRangePreset {
|
|
6
|
+
label: string;
|
|
7
|
+
range: () => DateRange;
|
|
8
|
+
}
|
|
5
9
|
export interface UidDateRangePickerProps {
|
|
6
10
|
min?: string;
|
|
7
11
|
max?: string;
|
|
@@ -9,6 +13,8 @@ export interface UidDateRangePickerProps {
|
|
|
9
13
|
clearable?: boolean;
|
|
10
14
|
placeholder?: string;
|
|
11
15
|
format?: (date: Date) => string;
|
|
16
|
+
withTime?: boolean;
|
|
17
|
+
presets?: DateRangePreset[] | false;
|
|
12
18
|
}
|
|
13
19
|
type __VLS_Props = UidDateRangePickerProps;
|
|
14
20
|
type __VLS_PublicProps = {
|
|
@@ -26,6 +32,8 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
26
32
|
max: string;
|
|
27
33
|
format: (date: Date) => string;
|
|
28
34
|
clearable: boolean;
|
|
35
|
+
presets: DateRangePreset[] | false;
|
|
36
|
+
withTime: boolean;
|
|
29
37
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
30
38
|
containerRef: HTMLDivElement;
|
|
31
39
|
triggerRef: HTMLDivElement;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as UidDateRangePicker } from './UidDateRangePicker.vue';
|
|
2
|
-
export type { UidDateRangePickerProps, DateRange } from './UidDateRangePicker.vue';
|
|
2
|
+
export type { UidDateRangePickerProps, DateRange, DateRangePreset } from './UidDateRangePicker.vue';
|
|
@@ -20,9 +20,9 @@ declare function __VLS_template(): {
|
|
|
20
20
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
21
21
|
declare const __VLS_component: import('vue').DefineComponent<UidGridProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<UidGridProps> & Readonly<{}>, {
|
|
22
22
|
as: string;
|
|
23
|
+
justify: "start" | "center" | "end" | "stretch";
|
|
23
24
|
gap: string;
|
|
24
25
|
align: "start" | "center" | "end" | "stretch";
|
|
25
|
-
justify: "start" | "center" | "end" | "stretch";
|
|
26
26
|
cols: number | string;
|
|
27
27
|
rowGap: string;
|
|
28
28
|
colGap: string;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export type UidImageFit = 'cover' | 'contain' | 'fill' | 'none' | 'scale-down';
|
|
2
|
+
export interface UidImageProps {
|
|
3
|
+
src: string;
|
|
4
|
+
alt: string;
|
|
5
|
+
width?: number | string;
|
|
6
|
+
height?: number | string;
|
|
7
|
+
fit?: UidImageFit;
|
|
8
|
+
/** Native lazy loading (`loading="lazy"`). */
|
|
9
|
+
lazy?: boolean;
|
|
10
|
+
/** Shown when `src` fails to load. */
|
|
11
|
+
fallbackSrc?: string;
|
|
12
|
+
/** Corner radius: a CSS value or a token name (`sm`, `md`, `lg`, `full`). */
|
|
13
|
+
radius?: string;
|
|
14
|
+
/** Click opens the image in a full-size dialog. */
|
|
15
|
+
preview?: boolean;
|
|
16
|
+
/** Larger image for the preview dialog; defaults to `src`. */
|
|
17
|
+
previewSrc?: string;
|
|
18
|
+
}
|
|
19
|
+
declare function __VLS_template(): {
|
|
20
|
+
attrs: Partial<{}>;
|
|
21
|
+
slots: Readonly<{
|
|
22
|
+
fallback?(): unknown;
|
|
23
|
+
placeholder?(): unknown;
|
|
24
|
+
}> & {
|
|
25
|
+
fallback?(): unknown;
|
|
26
|
+
placeholder?(): unknown;
|
|
27
|
+
};
|
|
28
|
+
refs: {};
|
|
29
|
+
rootEl: HTMLDivElement;
|
|
30
|
+
};
|
|
31
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
32
|
+
declare const __VLS_component: import('vue').DefineComponent<UidImageProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
33
|
+
error: (event: Event) => any;
|
|
34
|
+
load: (event: Event) => any;
|
|
35
|
+
}, string, import('vue').PublicProps, Readonly<UidImageProps> & Readonly<{
|
|
36
|
+
onError?: ((event: Event) => any) | undefined;
|
|
37
|
+
onLoad?: ((event: Event) => any) | undefined;
|
|
38
|
+
}>, {
|
|
39
|
+
width: number | string;
|
|
40
|
+
height: number | string;
|
|
41
|
+
preview: boolean;
|
|
42
|
+
radius: string;
|
|
43
|
+
fit: UidImageFit;
|
|
44
|
+
lazy: boolean;
|
|
45
|
+
fallbackSrc: string;
|
|
46
|
+
previewSrc: string;
|
|
47
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
48
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
49
|
+
export default _default;
|
|
50
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
51
|
+
new (): {
|
|
52
|
+
$slots: S;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
export interface UidSubMenuProps {
|
|
3
|
+
label?: string;
|
|
4
|
+
icon?: Component;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare function show(focusFirst?: boolean): Promise<void>;
|
|
8
|
+
declare function hide(focusTrigger?: boolean): void;
|
|
9
|
+
declare function __VLS_template(): {
|
|
10
|
+
attrs: Partial<{}>;
|
|
11
|
+
slots: Readonly<{
|
|
12
|
+
default(): unknown;
|
|
13
|
+
label?(): unknown;
|
|
14
|
+
}> & {
|
|
15
|
+
default(): unknown;
|
|
16
|
+
label?(): unknown;
|
|
17
|
+
};
|
|
18
|
+
refs: {
|
|
19
|
+
triggerRef: HTMLButtonElement;
|
|
20
|
+
panelRef: HTMLDivElement;
|
|
21
|
+
};
|
|
22
|
+
rootEl: HTMLDivElement;
|
|
23
|
+
};
|
|
24
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
25
|
+
declare const __VLS_component: import('vue').DefineComponent<UidSubMenuProps, {
|
|
26
|
+
open: typeof show;
|
|
27
|
+
close: typeof hide;
|
|
28
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
29
|
+
close: () => any;
|
|
30
|
+
open: () => any;
|
|
31
|
+
}, string, import('vue').PublicProps, Readonly<UidSubMenuProps> & Readonly<{
|
|
32
|
+
onClose?: (() => any) | undefined;
|
|
33
|
+
onOpen?: (() => any) | undefined;
|
|
34
|
+
}>, {
|
|
35
|
+
icon: Component;
|
|
36
|
+
label: string;
|
|
37
|
+
disabled: boolean;
|
|
38
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
39
|
+
triggerRef: HTMLButtonElement;
|
|
40
|
+
panelRef: HTMLDivElement;
|
|
41
|
+
}, HTMLDivElement>;
|
|
42
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
43
|
+
export default _default;
|
|
44
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
45
|
+
new (): {
|
|
46
|
+
$slots: S;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
import { InjectionKey } from 'vue';
|
|
1
|
+
import { InjectionKey, Ref } from 'vue';
|
|
2
2
|
export declare const MENU_CLOSE_KEY: InjectionKey<() => void>;
|
|
3
|
+
export interface MenuLevel {
|
|
4
|
+
activeSubmenu: Ref<string | null>;
|
|
5
|
+
}
|
|
6
|
+
export declare const MENU_LEVEL_KEY: InjectionKey<MenuLevel>;
|
|
7
|
+
export declare function getLevelItems(menu: HTMLElement | null): HTMLElement[];
|
|
8
|
+
export declare function moveFocus(menu: HTMLElement | null, key: string): boolean;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { default as UidMenu } from './UidMenu.vue';
|
|
2
2
|
export { default as UidMenuItem } from './UidMenuItem.vue';
|
|
3
3
|
export { default as UidMenuSeparator } from './UidMenuSeparator.vue';
|
|
4
|
+
export { default as UidSubMenu } from './UidSubMenu.vue';
|
|
4
5
|
export type { UidMenuItemProps } from './UidMenuItem.vue';
|
|
6
|
+
export type { UidSubMenuProps } from './UidSubMenu.vue';
|
|
@@ -4,6 +4,7 @@ export interface SelectOption {
|
|
|
4
4
|
disabled?: boolean;
|
|
5
5
|
group?: string;
|
|
6
6
|
}
|
|
7
|
+
export type SelectValue = string | number;
|
|
7
8
|
export interface UidSelectProps {
|
|
8
9
|
options: SelectOption[];
|
|
9
10
|
placeholder?: string;
|
|
@@ -11,22 +12,31 @@ export interface UidSelectProps {
|
|
|
11
12
|
searchable?: boolean;
|
|
12
13
|
clearable?: boolean;
|
|
13
14
|
size?: 'sm' | 'md' | 'lg';
|
|
15
|
+
/**
|
|
16
|
+
* Multi-value mode: v-model is an array, the selected options are shown as
|
|
17
|
+
* removable chips, and picking an option toggles it without closing the dropdown.
|
|
18
|
+
*/
|
|
19
|
+
multiple?: boolean;
|
|
20
|
+
/** Multiple mode: show at most this many chips and collapse the rest into "+N". */
|
|
21
|
+
maxTagCount?: number;
|
|
14
22
|
}
|
|
15
23
|
type __VLS_Props = UidSelectProps;
|
|
16
24
|
type __VLS_PublicProps = {
|
|
17
|
-
modelValue?:
|
|
25
|
+
modelValue?: SelectValue | SelectValue[] | null;
|
|
18
26
|
} & __VLS_Props;
|
|
19
27
|
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
20
|
-
"update:modelValue": (value:
|
|
21
|
-
change: (value:
|
|
28
|
+
"update:modelValue": (value: SelectValue | SelectValue[] | null) => any;
|
|
29
|
+
change: (value: SelectValue | SelectValue[] | null) => any;
|
|
22
30
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
23
|
-
"onUpdate:modelValue"?: ((value:
|
|
24
|
-
onChange?: ((value:
|
|
31
|
+
"onUpdate:modelValue"?: ((value: SelectValue | SelectValue[] | null) => any) | undefined;
|
|
32
|
+
onChange?: ((value: SelectValue | SelectValue[] | null) => any) | undefined;
|
|
25
33
|
}>, {
|
|
26
34
|
size: "sm" | "md" | "lg";
|
|
27
35
|
disabled: boolean;
|
|
36
|
+
multiple: boolean;
|
|
28
37
|
searchable: boolean;
|
|
29
38
|
clearable: boolean;
|
|
39
|
+
maxTagCount: number;
|
|
30
40
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
31
41
|
containerRef: HTMLDivElement;
|
|
32
42
|
triggerRef: HTMLDivElement;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as UidSelect } from './UidSelect.vue';
|
|
2
|
-
export type { UidSelectProps, SelectOption } from './UidSelect.vue';
|
|
2
|
+
export type { UidSelectProps, SelectOption, SelectValue } from './UidSelect.vue';
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
export interface UidSliderMark {
|
|
2
|
+
value: number;
|
|
3
|
+
label?: string;
|
|
4
|
+
}
|
|
5
|
+
export type UidSliderMarks = number[] | Record<number, string> | UidSliderMark[];
|
|
1
6
|
export interface UidSliderProps {
|
|
2
7
|
min?: number;
|
|
3
8
|
max?: number;
|
|
@@ -6,6 +11,14 @@ export interface UidSliderProps {
|
|
|
6
11
|
label?: string;
|
|
7
12
|
showValue?: boolean;
|
|
8
13
|
formatValue?: (val: number) => string;
|
|
14
|
+
marks?: UidSliderMarks;
|
|
15
|
+
/**
|
|
16
|
+
* Accessible name for the slider handle, independent of the visible `label`
|
|
17
|
+
* (e.g. when the visible caption lives elsewhere or is not descriptive enough).
|
|
18
|
+
*/
|
|
19
|
+
ariaLabel?: string;
|
|
20
|
+
/** Id(s) of the element(s) that label the slider handle. Takes precedence over `ariaLabel`/`label`. */
|
|
21
|
+
ariaLabelledby?: string;
|
|
9
22
|
}
|
|
10
23
|
type __VLS_Props = UidSliderProps;
|
|
11
24
|
type __VLS_PublicProps = {
|
|
@@ -23,5 +36,8 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
23
36
|
showValue: boolean;
|
|
24
37
|
step: number;
|
|
25
38
|
formatValue: (val: number) => string;
|
|
39
|
+
marks: UidSliderMarks;
|
|
40
|
+
ariaLabel: string;
|
|
41
|
+
ariaLabelledby: string;
|
|
26
42
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
27
43
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as UidSlider } from './UidSlider.vue';
|
|
2
|
-
export type { UidSliderProps } from './UidSlider.vue';
|
|
2
|
+
export type { UidSliderProps, UidSliderMark, UidSliderMarks } from './UidSlider.vue';
|
|
@@ -23,9 +23,9 @@ declare const __VLS_component: import('vue').DefineComponent<UidStackProps, {},
|
|
|
23
23
|
direction: "row" | "column" | "row-reverse" | "column-reverse";
|
|
24
24
|
as: string;
|
|
25
25
|
wrap: boolean;
|
|
26
|
+
justify: "start" | "center" | "end" | "between" | "around" | "evenly";
|
|
26
27
|
gap: string;
|
|
27
28
|
align: "start" | "center" | "end" | "stretch" | "baseline";
|
|
28
|
-
justify: "start" | "center" | "end" | "between" | "around" | "evenly";
|
|
29
29
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
30
30
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
31
31
|
export default _default;
|
|
@@ -4,6 +4,11 @@ export interface UidTableColumn {
|
|
|
4
4
|
sortable?: boolean;
|
|
5
5
|
align?: 'left' | 'center' | 'right';
|
|
6
6
|
width?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Pin the column to the left or right edge while the table scrolls horizontally.
|
|
9
|
+
* Put left-fixed columns first and right-fixed columns last.
|
|
10
|
+
*/
|
|
11
|
+
fixed?: 'left' | 'right';
|
|
7
12
|
}
|
|
8
13
|
export type SortDirection = 'asc' | 'desc' | null;
|
|
9
14
|
export interface UidTableProps {
|
|
@@ -29,7 +34,10 @@ declare function __VLS_template(): {
|
|
|
29
34
|
}> & {
|
|
30
35
|
[key: string]: (row?: Record<string, unknown>) => unknown;
|
|
31
36
|
};
|
|
32
|
-
refs: {
|
|
37
|
+
refs: {
|
|
38
|
+
scrollRef: HTMLDivElement;
|
|
39
|
+
headRowRef: HTMLTableRowElement;
|
|
40
|
+
};
|
|
33
41
|
rootEl: HTMLDivElement;
|
|
34
42
|
};
|
|
35
43
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
@@ -53,7 +61,10 @@ declare const __VLS_component: import('vue').DefineComponent<UidTableProps, {},
|
|
|
53
61
|
selectable: boolean;
|
|
54
62
|
selection: Set<string | number>;
|
|
55
63
|
rowKey: string | ((row: Record<string, unknown>) => string | number);
|
|
56
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
64
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
65
|
+
scrollRef: HTMLDivElement;
|
|
66
|
+
headRowRef: HTMLTableRowElement;
|
|
67
|
+
}, HTMLDivElement>;
|
|
57
68
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
58
69
|
export default _default;
|
|
59
70
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -2,6 +2,8 @@ import { TreeNode, TreeKey } from '../TreeView/context.js';
|
|
|
2
2
|
export interface UidTreeSelectProps {
|
|
3
3
|
nodes: TreeNode[];
|
|
4
4
|
multiple?: boolean;
|
|
5
|
+
checkable?: boolean;
|
|
6
|
+
checkStrictly?: boolean;
|
|
5
7
|
placeholder?: string;
|
|
6
8
|
disabled?: boolean;
|
|
7
9
|
clearable?: boolean;
|
|
@@ -31,9 +33,11 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
31
33
|
disabled: boolean;
|
|
32
34
|
multiple: boolean;
|
|
33
35
|
clearable: boolean;
|
|
36
|
+
maxTagCount: number;
|
|
37
|
+
checkable: boolean;
|
|
38
|
+
checkStrictly: boolean;
|
|
34
39
|
defaultExpandAll: boolean;
|
|
35
40
|
showGuides: boolean;
|
|
36
|
-
maxTagCount: number;
|
|
37
41
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
38
42
|
containerRef: HTMLDivElement;
|
|
39
43
|
triggerRef: HTMLDivElement;
|
|
@@ -3,6 +3,7 @@ export interface UidTreeViewProps {
|
|
|
3
3
|
nodes: TreeNode[];
|
|
4
4
|
selectable?: TreeSelectable;
|
|
5
5
|
checkable?: boolean;
|
|
6
|
+
checkStrictly?: boolean;
|
|
6
7
|
disabled?: boolean;
|
|
7
8
|
defaultExpandAll?: boolean;
|
|
8
9
|
showGuides?: boolean;
|
|
@@ -36,6 +37,7 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
36
37
|
disabled: boolean;
|
|
37
38
|
selectable: TreeSelectable;
|
|
38
39
|
checkable: boolean;
|
|
40
|
+
checkStrictly: boolean;
|
|
39
41
|
defaultExpandAll: boolean;
|
|
40
42
|
showGuides: boolean;
|
|
41
43
|
virtualRoot: string | TreeNode | null;
|