@webx-ui/core 0.7.0 → 0.9.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/Affix/Affix.d.ts +37 -0
- package/dist/components/Affix/index.d.ts +2 -0
- package/dist/components/Affix/types.d.ts +14 -0
- package/dist/components/Avatar/Avatar.d.ts +31 -0
- package/dist/components/Avatar/index.d.ts +2 -0
- package/dist/components/Avatar/types.d.ts +30 -0
- package/dist/components/AvatarGroup/AvatarGroup.d.ts +8 -0
- package/dist/components/AvatarGroup/index.d.ts +2 -0
- package/dist/components/AvatarGroup/types.d.ts +12 -0
- package/dist/components/Backtop/Backtop.d.ts +31 -0
- package/dist/components/Backtop/index.d.ts +2 -0
- package/dist/components/Backtop/types.d.ts +19 -0
- package/dist/components/Cascader/Cascader.d.ts +1 -1
- package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +1 -1
- package/dist/components/Container/Container.d.ts +1 -0
- package/dist/components/Container/types.d.ts +10 -0
- package/dist/components/Descriptions/Descriptions.d.ts +33 -0
- package/dist/components/Descriptions/context.d.ts +5 -0
- package/dist/components/Descriptions/index.d.ts +2 -0
- package/dist/components/Descriptions/types.d.ts +30 -0
- package/dist/components/DescriptionsItem/DescriptionsItem.d.ts +25 -0
- package/dist/components/DescriptionsItem/index.d.ts +1 -0
- package/dist/components/Empty/Empty.d.ts +38 -0
- package/dist/components/Empty/index.d.ts +2 -0
- package/dist/components/Empty/types.d.ts +20 -0
- package/dist/components/EntityCard/EntityCard.d.ts +1 -1
- package/dist/components/Form/Form.d.ts +1 -1
- package/dist/components/Image/Image.d.ts +43 -0
- package/dist/components/Image/index.d.ts +2 -0
- package/dist/components/Image/types.d.ts +26 -0
- package/dist/components/Indicator/Indicator.d.ts +1 -1
- package/dist/components/InputNumber/InputNumber.d.ts +2 -2
- package/dist/components/ListDetail/ListDetail.d.ts +73 -0
- package/dist/components/ListDetail/index.d.ts +2 -0
- package/dist/components/ListDetail/types.d.ts +19 -0
- package/dist/components/Loading/Loading.d.ts +34 -0
- package/dist/components/Loading/index.d.ts +2 -0
- package/dist/components/Loading/types.d.ts +25 -0
- package/dist/components/Menu/Menu.d.ts +8 -2
- package/dist/components/Menu/types.d.ts +10 -0
- package/dist/components/Popconfirm/Popconfirm.d.ts +69 -0
- package/dist/components/Popconfirm/index.d.ts +2 -0
- package/dist/components/Popconfirm/types.d.ts +33 -0
- package/dist/components/Progress/Progress.d.ts +41 -0
- package/dist/components/Progress/index.d.ts +2 -0
- package/dist/components/Progress/types.d.ts +26 -0
- package/dist/components/Rate/Rate.d.ts +1 -1
- package/dist/components/Result/Result.d.ts +38 -0
- package/dist/components/Result/index.d.ts +2 -0
- package/dist/components/Result/types.d.ts +15 -0
- package/dist/components/Segmented/Segmented.d.ts +44 -0
- package/dist/components/Segmented/index.d.ts +2 -0
- package/dist/components/Segmented/types.d.ts +23 -0
- package/dist/components/SelectionArea/SelectionArea.d.ts +48 -0
- package/dist/components/SelectionArea/directive.d.ts +19 -0
- package/dist/components/SelectionArea/index.d.ts +3 -0
- package/dist/components/SelectionArea/types.d.ts +26 -0
- package/dist/components/Skeleton/Skeleton.d.ts +33 -0
- package/dist/components/Skeleton/index.d.ts +2 -0
- package/dist/components/Skeleton/types.d.ts +31 -0
- package/dist/components/SkeletonItem/SkeletonItem.d.ts +8 -0
- package/dist/components/SkeletonItem/index.d.ts +1 -0
- package/dist/components/Slider/Slider.d.ts +1 -1
- package/dist/components/SortableList/SortableList.d.ts +53 -0
- package/dist/components/SortableList/index.d.ts +2 -0
- package/dist/components/SortableList/types.d.ts +38 -0
- package/dist/components/Step/Step.d.ts +38 -0
- package/dist/components/Step/index.d.ts +1 -0
- package/dist/components/Steps/Steps.d.ts +31 -0
- package/dist/components/Steps/context.d.ts +5 -0
- package/dist/components/Steps/index.d.ts +2 -0
- package/dist/components/Steps/types.d.ts +44 -0
- package/dist/components/Table/types.d.ts +4 -3
- package/dist/components/Textarea/Textarea.d.ts +1 -1
- package/dist/components/Toaster/Toaster.d.ts +9 -0
- package/dist/components/Toaster/index.d.ts +2 -0
- package/dist/components/Toaster/types.d.ts +16 -0
- package/dist/components/Tooltip/Tooltip.d.ts +44 -0
- package/dist/components/Tooltip/index.d.ts +2 -0
- package/dist/components/Tooltip/types.d.ts +25 -0
- package/dist/components/Upload/Upload.d.ts +74 -0
- package/dist/components/Upload/index.d.ts +2 -0
- package/dist/components/Upload/types.d.ts +54 -0
- package/dist/components/index.d.ts +23 -0
- package/dist/composables/confirm.d.ts +23 -0
- package/dist/composables/useControlAttrs.d.ts +35 -0
- package/dist/composables/useElementWidth.d.ts +17 -0
- package/dist/composables/useModal.d.ts +68 -0
- package/dist/composables/useToast.d.ts +66 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +6154 -3775
- package/dist/index.js.map +1 -1
- package/dist/internal/ConfirmDialog.d.ts +18 -0
- package/dist/internal/nodes.d.ts +30 -0
- package/dist/style.css +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface ListDetailProps {
|
|
2
|
+
/**
|
|
3
|
+
* Width of the column that narrows the list: saved views, filters, folders.
|
|
4
|
+
* The column is only rendered when the `filters` slot is used.
|
|
5
|
+
*/
|
|
6
|
+
filtersWidth?: number | string;
|
|
7
|
+
/** Width of the list of records. */
|
|
8
|
+
listWidth?: number | string;
|
|
9
|
+
/**
|
|
10
|
+
* The narrowest the detail pane may be. It is what the two thresholds are made
|
|
11
|
+
* of: the filters column folds away when it would push the pane under this, and
|
|
12
|
+
* the pane stops standing beside the list when it no longer fits either.
|
|
13
|
+
*/
|
|
14
|
+
detailMin?: number;
|
|
15
|
+
/** Heading of the panel the filters move into once the column does not fit. */
|
|
16
|
+
filtersTitle?: string;
|
|
17
|
+
/** Accessible name of the panel the detail opens in on a narrow screen. */
|
|
18
|
+
detailLabel?: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { LoadingProps } from './types';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: Readonly<{
|
|
5
|
+
/** What is being covered. Left out for a spinner on its own. */
|
|
6
|
+
default?: () => unknown;
|
|
7
|
+
/** Replaces the spinner. */
|
|
8
|
+
spinner?: () => unknown;
|
|
9
|
+
}> & {
|
|
10
|
+
/** What is being covered. Left out for a spinner on its own. */
|
|
11
|
+
default?: () => unknown;
|
|
12
|
+
/** Replaces the spinner. */
|
|
13
|
+
spinner?: () => unknown;
|
|
14
|
+
};
|
|
15
|
+
refs: {};
|
|
16
|
+
rootEl: HTMLDivElement;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
19
|
+
declare const __VLS_component: import('vue').DefineComponent<LoadingProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<LoadingProps> & Readonly<{}>, {
|
|
20
|
+
size: import('./types').LoadingSize;
|
|
21
|
+
text: string;
|
|
22
|
+
ariaLabel: string;
|
|
23
|
+
loading: boolean;
|
|
24
|
+
blur: boolean;
|
|
25
|
+
delay: number;
|
|
26
|
+
fullscreen: boolean;
|
|
27
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
28
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
29
|
+
export default _default;
|
|
30
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
31
|
+
new (): {
|
|
32
|
+
$slots: S;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type LoadingSize = 'sm' | 'md' | 'lg';
|
|
2
|
+
export interface LoadingProps {
|
|
3
|
+
/** Whether the veil is up. */
|
|
4
|
+
loading?: boolean;
|
|
5
|
+
/** What is being waited for. Shown under the spinner. */
|
|
6
|
+
text?: string;
|
|
7
|
+
size?: LoadingSize;
|
|
8
|
+
/**
|
|
9
|
+
* Covers the whole window rather than the box it sits in. For a route change,
|
|
10
|
+
* not for a panel refreshing.
|
|
11
|
+
*/
|
|
12
|
+
fullscreen?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* How long the work may take before the veil appears, in milliseconds. Anything
|
|
15
|
+
* that answers quickly should not flash a spinner on the way.
|
|
16
|
+
*/
|
|
17
|
+
delay?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Blurs what is underneath instead of only fading it. Reads as "this is on its
|
|
20
|
+
* way out" rather than "this is broken".
|
|
21
|
+
*/
|
|
22
|
+
blur?: boolean;
|
|
23
|
+
/** Accessible description of the wait. */
|
|
24
|
+
ariaLabel?: string;
|
|
25
|
+
}
|
|
@@ -10,7 +10,9 @@ declare function __VLS_template(): {
|
|
|
10
10
|
slots: {
|
|
11
11
|
default?(_: {}): any;
|
|
12
12
|
};
|
|
13
|
-
refs: {
|
|
13
|
+
refs: {
|
|
14
|
+
list: HTMLUListElement;
|
|
15
|
+
};
|
|
14
16
|
rootEl: HTMLUListElement;
|
|
15
17
|
};
|
|
16
18
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
@@ -27,9 +29,13 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
27
29
|
label: string;
|
|
28
30
|
collapsed: boolean;
|
|
29
31
|
mode: import('./types').MenuMode;
|
|
32
|
+
overflow: import('./types').MenuOverflow;
|
|
33
|
+
overflowTitle: string;
|
|
30
34
|
accordion: boolean;
|
|
31
35
|
autoExpand: boolean;
|
|
32
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
36
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
37
|
+
list: HTMLUListElement;
|
|
38
|
+
}, HTMLUListElement>;
|
|
33
39
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
34
40
|
export default _default;
|
|
35
41
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import { MenuMode, MenuSize, MenuValue } from '../../composables/useMenu';
|
|
2
2
|
export type { MenuMode, MenuSize, MenuValue };
|
|
3
|
+
/**
|
|
4
|
+
* What a bar does with entries it has no room for: move them into a branch at the
|
|
5
|
+
* end of it, or let the bar scroll sideways. Vertical menus ignore this — a column
|
|
6
|
+
* has as much room as it needs.
|
|
7
|
+
*/
|
|
8
|
+
export type MenuOverflow = 'menu' | 'scroll';
|
|
3
9
|
export interface MenuProps {
|
|
4
10
|
/** A sidebar down the page, or a bar across the top of it. */
|
|
5
11
|
mode?: MenuMode;
|
|
6
12
|
/** Row height and text size. */
|
|
7
13
|
size?: MenuSize;
|
|
14
|
+
/** What a bar does with the entries that do not fit across it. */
|
|
15
|
+
overflow?: MenuOverflow;
|
|
16
|
+
/** Title of the branch those entries move into. */
|
|
17
|
+
overflowTitle?: string;
|
|
8
18
|
/**
|
|
9
19
|
* The icon rail: labels are hidden and submenus open as flyouts beside the rail.
|
|
10
20
|
* Vertical menus only — there is nothing to collapse in a bar.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { PopconfirmProps } from './types';
|
|
2
|
+
type __VLS_Props = PopconfirmProps;
|
|
3
|
+
declare function cancel(): void;
|
|
4
|
+
type __VLS_PublicProps = {
|
|
5
|
+
'open'?: boolean;
|
|
6
|
+
} & __VLS_Props;
|
|
7
|
+
declare function __VLS_template(): {
|
|
8
|
+
attrs: Partial<{}>;
|
|
9
|
+
slots: Readonly<{
|
|
10
|
+
/** The control that asks. Exactly one element. */
|
|
11
|
+
trigger?: (props: {
|
|
12
|
+
open: boolean;
|
|
13
|
+
}) => unknown;
|
|
14
|
+
/** Replaces the question and its explanation. */
|
|
15
|
+
default?: () => unknown;
|
|
16
|
+
/** Replaces the two buttons. */
|
|
17
|
+
actions?: (props: {
|
|
18
|
+
confirm: () => void;
|
|
19
|
+
cancel: () => void;
|
|
20
|
+
}) => unknown;
|
|
21
|
+
}> & {
|
|
22
|
+
/** The control that asks. Exactly one element. */
|
|
23
|
+
trigger?: (props: {
|
|
24
|
+
open: boolean;
|
|
25
|
+
}) => unknown;
|
|
26
|
+
/** Replaces the question and its explanation. */
|
|
27
|
+
default?: () => unknown;
|
|
28
|
+
/** Replaces the two buttons. */
|
|
29
|
+
actions?: (props: {
|
|
30
|
+
confirm: () => void;
|
|
31
|
+
cancel: () => void;
|
|
32
|
+
}) => unknown;
|
|
33
|
+
};
|
|
34
|
+
refs: {};
|
|
35
|
+
rootEl: any;
|
|
36
|
+
};
|
|
37
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
38
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {
|
|
39
|
+
close: typeof cancel;
|
|
40
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
41
|
+
"update:open": (value: boolean) => any;
|
|
42
|
+
cancel: () => any;
|
|
43
|
+
confirm: () => any;
|
|
44
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
45
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
46
|
+
onCancel?: (() => any) | undefined;
|
|
47
|
+
onConfirm?: (() => any) | undefined;
|
|
48
|
+
}>, {
|
|
49
|
+
disabled: boolean;
|
|
50
|
+
title: string;
|
|
51
|
+
icon: import('..').IconName | false;
|
|
52
|
+
side: import('..').PopoverSide;
|
|
53
|
+
align: import('..').PopoverAlign;
|
|
54
|
+
offset: number;
|
|
55
|
+
description: string;
|
|
56
|
+
width: number | string;
|
|
57
|
+
loading: boolean;
|
|
58
|
+
confirmText: string;
|
|
59
|
+
cancelText: string;
|
|
60
|
+
confirmType: import('..').ButtonType;
|
|
61
|
+
arrow: boolean;
|
|
62
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
63
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
64
|
+
export default _default;
|
|
65
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
66
|
+
new (): {
|
|
67
|
+
$slots: S;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ButtonType } from '../Button/types';
|
|
2
|
+
import { IconName } from '../Icon/types';
|
|
3
|
+
import { PopoverAlign, PopoverSide } from '../Popover/types';
|
|
4
|
+
export interface PopconfirmProps {
|
|
5
|
+
/** The question. Keep it about what will happen, not about the button. */
|
|
6
|
+
title?: string;
|
|
7
|
+
/** What else the reader should know before answering. */
|
|
8
|
+
description?: string;
|
|
9
|
+
/** Label of the button that goes ahead. */
|
|
10
|
+
confirmText?: string;
|
|
11
|
+
/** Label of the button that does not. */
|
|
12
|
+
cancelText?: string;
|
|
13
|
+
/** Colour of the confirming button — `danger` for anything that destroys. */
|
|
14
|
+
confirmType?: ButtonType;
|
|
15
|
+
/** The glyph beside the question. `false` drops it. */
|
|
16
|
+
icon?: IconName | false;
|
|
17
|
+
side?: PopoverSide;
|
|
18
|
+
align?: PopoverAlign;
|
|
19
|
+
/** Distance from the trigger, in pixels. */
|
|
20
|
+
offset?: number;
|
|
21
|
+
/** Draws the little pointer at the trigger. */
|
|
22
|
+
arrow?: boolean;
|
|
23
|
+
/** Width of the panel: a number in pixels, or any CSS length. */
|
|
24
|
+
width?: number | string;
|
|
25
|
+
/** The trigger stops asking anything. */
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
/** Keeps the panel open and the confirming button busy — for an async answer. */
|
|
28
|
+
loading?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export interface PopconfirmEmits {
|
|
31
|
+
confirm: [];
|
|
32
|
+
cancel: [];
|
|
33
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ProgressProps } from './types';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: Readonly<{
|
|
5
|
+
/** Replaces the figure — a count, a size, a time remaining. */
|
|
6
|
+
default?: (props: {
|
|
7
|
+
value: number;
|
|
8
|
+
max: number;
|
|
9
|
+
percent: number;
|
|
10
|
+
}) => unknown;
|
|
11
|
+
}> & {
|
|
12
|
+
/** Replaces the figure — a count, a size, a time remaining. */
|
|
13
|
+
default?: (props: {
|
|
14
|
+
value: number;
|
|
15
|
+
max: number;
|
|
16
|
+
percent: number;
|
|
17
|
+
}) => unknown;
|
|
18
|
+
};
|
|
19
|
+
refs: {};
|
|
20
|
+
rootEl: HTMLDivElement;
|
|
21
|
+
};
|
|
22
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
23
|
+
declare const __VLS_component: import('vue').DefineComponent<ProgressProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ProgressProps> & Readonly<{}>, {
|
|
24
|
+
size: import('./types').ProgressSize;
|
|
25
|
+
type: import('./types').ProgressType;
|
|
26
|
+
value: number;
|
|
27
|
+
ariaLabel: string;
|
|
28
|
+
status: import('./types').ProgressStatus;
|
|
29
|
+
max: number;
|
|
30
|
+
indeterminate: boolean;
|
|
31
|
+
formatter: (value: number, max: number) => string;
|
|
32
|
+
thickness: number;
|
|
33
|
+
showValue: boolean;
|
|
34
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
35
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
36
|
+
export default _default;
|
|
37
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
38
|
+
new (): {
|
|
39
|
+
$slots: S;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type ProgressType = 'line' | 'circle';
|
|
2
|
+
export type ProgressStatus = 'default' | 'success' | 'warning' | 'danger';
|
|
3
|
+
export type ProgressSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
export interface ProgressProps {
|
|
5
|
+
/** How far along, from `0` to `max`. */
|
|
6
|
+
value?: number;
|
|
7
|
+
/** What finished looks like. */
|
|
8
|
+
max?: number;
|
|
9
|
+
type?: ProgressType;
|
|
10
|
+
/** Colour of the bar. `success` and `danger` are outcomes, not decorations. */
|
|
11
|
+
status?: ProgressStatus;
|
|
12
|
+
size?: ProgressSize;
|
|
13
|
+
/** Thickness of the track. Overrides what `size` would give it. */
|
|
14
|
+
thickness?: number;
|
|
15
|
+
/** Shows the figure beside the bar, or inside the ring. */
|
|
16
|
+
showValue?: boolean;
|
|
17
|
+
/** Turns the figure into whatever the reader should see: `3 of 8`, `1.2 MB`. */
|
|
18
|
+
formatter?: (value: number, max: number) => string;
|
|
19
|
+
/**
|
|
20
|
+
* Work with no end in sight: the bar travels rather than fills, and reports
|
|
21
|
+
* nothing to a screen reader beyond the fact that it is busy.
|
|
22
|
+
*/
|
|
23
|
+
indeterminate?: boolean;
|
|
24
|
+
/** Accessible name. Give one whenever there is no visible label beside it. */
|
|
25
|
+
ariaLabel?: string;
|
|
26
|
+
}
|
|
@@ -18,7 +18,7 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
18
18
|
id: string;
|
|
19
19
|
max: number;
|
|
20
20
|
readonly: boolean;
|
|
21
|
-
allowHalf: boolean;
|
|
22
21
|
showValue: boolean;
|
|
22
|
+
allowHalf: boolean;
|
|
23
23
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
24
24
|
export default _default;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { IconName } from '../Icon/types';
|
|
2
|
+
import { ResultProps, ResultStatus } from './types';
|
|
3
|
+
declare function __VLS_template(): {
|
|
4
|
+
attrs: Partial<{}>;
|
|
5
|
+
slots: Readonly<{
|
|
6
|
+
icon?: () => unknown;
|
|
7
|
+
title?: () => unknown;
|
|
8
|
+
subtitle?: () => unknown;
|
|
9
|
+
/** The way out: back to the list, try again, contact somebody. */
|
|
10
|
+
actions?: () => unknown;
|
|
11
|
+
/** Anything under the actions — a stack trace behind a disclosure, a reference. */
|
|
12
|
+
default?: () => unknown;
|
|
13
|
+
}> & {
|
|
14
|
+
icon?: () => unknown;
|
|
15
|
+
title?: () => unknown;
|
|
16
|
+
subtitle?: () => unknown;
|
|
17
|
+
/** The way out: back to the list, try again, contact somebody. */
|
|
18
|
+
actions?: () => unknown;
|
|
19
|
+
/** Anything under the actions — a stack trace behind a disclosure, a reference. */
|
|
20
|
+
default?: () => unknown;
|
|
21
|
+
};
|
|
22
|
+
refs: {};
|
|
23
|
+
rootEl: HTMLDivElement;
|
|
24
|
+
};
|
|
25
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
26
|
+
declare const __VLS_component: import('vue').DefineComponent<ResultProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ResultProps> & Readonly<{}>, {
|
|
27
|
+
title: string;
|
|
28
|
+
subtitle: string;
|
|
29
|
+
icon: IconName;
|
|
30
|
+
status: ResultStatus;
|
|
31
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
32
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
33
|
+
export default _default;
|
|
34
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
35
|
+
new (): {
|
|
36
|
+
$slots: S;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IconName } from '../Icon/types';
|
|
2
|
+
/**
|
|
3
|
+
* What happened. The three numbers are the HTTP replies an admin panel actually
|
|
4
|
+
* shows a page for; the rest are outcomes of something the user just did.
|
|
5
|
+
*/
|
|
6
|
+
export type ResultStatus = 'success' | 'warning' | 'danger' | 'info' | '403' | '404' | '500';
|
|
7
|
+
export interface ResultProps {
|
|
8
|
+
status?: ResultStatus;
|
|
9
|
+
/** The outcome in a few words: `Order placed`, `Page not found`. */
|
|
10
|
+
title?: string;
|
|
11
|
+
/** What it means, or what to do next. */
|
|
12
|
+
subtitle?: string;
|
|
13
|
+
/** Icon to draw instead of the one the status picks. */
|
|
14
|
+
icon?: IconName;
|
|
15
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { SegmentedOption, SegmentedProps, SegmentedValue } from './types';
|
|
2
|
+
type __VLS_Props = SegmentedProps;
|
|
3
|
+
type __VLS_PublicProps = {
|
|
4
|
+
modelValue?: SegmentedValue | undefined;
|
|
5
|
+
} & __VLS_Props;
|
|
6
|
+
declare function __VLS_template(): {
|
|
7
|
+
attrs: Partial<{}>;
|
|
8
|
+
slots: Readonly<{
|
|
9
|
+
/** A segment's contents, when a label and an icon are not enough. */
|
|
10
|
+
option?: (props: {
|
|
11
|
+
option: SegmentedOption;
|
|
12
|
+
selected: boolean;
|
|
13
|
+
}) => unknown;
|
|
14
|
+
}> & {
|
|
15
|
+
/** A segment's contents, when a label and an icon are not enough. */
|
|
16
|
+
option?: (props: {
|
|
17
|
+
option: SegmentedOption;
|
|
18
|
+
selected: boolean;
|
|
19
|
+
}) => unknown;
|
|
20
|
+
};
|
|
21
|
+
refs: {};
|
|
22
|
+
rootEl: HTMLDivElement;
|
|
23
|
+
};
|
|
24
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
25
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
26
|
+
change: (value: SegmentedValue) => any;
|
|
27
|
+
"update:modelValue": (value: SegmentedValue | undefined) => any;
|
|
28
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
29
|
+
onChange?: ((value: SegmentedValue) => any) | undefined;
|
|
30
|
+
"onUpdate:modelValue"?: ((value: SegmentedValue | undefined) => any) | undefined;
|
|
31
|
+
}>, {
|
|
32
|
+
size: import('../..').ControlSize;
|
|
33
|
+
disabled: boolean;
|
|
34
|
+
ariaLabel: string;
|
|
35
|
+
options: SegmentedOption[];
|
|
36
|
+
block: boolean;
|
|
37
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
38
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
39
|
+
export default _default;
|
|
40
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
41
|
+
new (): {
|
|
42
|
+
$slots: S;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ControlSize } from '../../composables/useFormField';
|
|
2
|
+
import { IconName } from '../Icon/types';
|
|
3
|
+
export type SegmentedValue = string | number;
|
|
4
|
+
export interface SegmentedOption {
|
|
5
|
+
label?: string;
|
|
6
|
+
value: SegmentedValue;
|
|
7
|
+
icon?: IconName;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
/** Accessible name when the segment shows only an icon. */
|
|
10
|
+
ariaLabel?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface SegmentedProps {
|
|
13
|
+
options?: SegmentedOption[];
|
|
14
|
+
size?: ControlSize;
|
|
15
|
+
/** Stretches to the width it is given, the segments sharing it equally. */
|
|
16
|
+
block?: boolean;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
/** Accessible name for the group. */
|
|
19
|
+
ariaLabel?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface SegmentedEmits {
|
|
22
|
+
change: [value: SegmentedValue];
|
|
23
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { SelectionAreaProps, SelectionAreaSlotProps, SelectionValue } from './types';
|
|
2
|
+
type __VLS_Props = SelectionAreaProps;
|
|
3
|
+
declare function selectAll(): void;
|
|
4
|
+
declare function clear(): void;
|
|
5
|
+
type __VLS_PublicProps = {
|
|
6
|
+
modelValue?: SelectionValue[];
|
|
7
|
+
} & __VLS_Props;
|
|
8
|
+
declare function __VLS_template(): {
|
|
9
|
+
attrs: Partial<{}>;
|
|
10
|
+
slots: Readonly<{
|
|
11
|
+
default?: (props: SelectionAreaSlotProps) => unknown;
|
|
12
|
+
}> & {
|
|
13
|
+
default?: (props: SelectionAreaSlotProps) => unknown;
|
|
14
|
+
};
|
|
15
|
+
refs: {
|
|
16
|
+
root: HTMLDivElement;
|
|
17
|
+
};
|
|
18
|
+
rootEl: HTMLDivElement;
|
|
19
|
+
};
|
|
20
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
21
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {
|
|
22
|
+
selectAll: typeof selectAll;
|
|
23
|
+
clear: typeof clear;
|
|
24
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
25
|
+
start: () => any;
|
|
26
|
+
end: (value: SelectionValue[]) => any;
|
|
27
|
+
"update:modelValue": (value: SelectionValue[]) => any;
|
|
28
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
29
|
+
onStart?: (() => any) | undefined;
|
|
30
|
+
onEnd?: ((value: SelectionValue[]) => any) | undefined;
|
|
31
|
+
"onUpdate:modelValue"?: ((value: SelectionValue[]) => any) | undefined;
|
|
32
|
+
}>, {
|
|
33
|
+
disabled: boolean;
|
|
34
|
+
match: import('./types').SelectionMatch;
|
|
35
|
+
threshold: number;
|
|
36
|
+
touch: boolean;
|
|
37
|
+
clickSelect: boolean;
|
|
38
|
+
edgeScroll: number;
|
|
39
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
40
|
+
root: 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
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ObjectDirective } from 'vue';
|
|
2
|
+
import { SelectionValue } from './types';
|
|
3
|
+
/** Marks an element as something a selection box can catch. */
|
|
4
|
+
export declare const SELECTABLE = "data-wx-selectable";
|
|
5
|
+
/**
|
|
6
|
+
* The value of a selectable element. Falls back to the attribute, so markup that is not
|
|
7
|
+
* written in Vue can say `data-wx-selectable="42"` and be caught the same way — as the
|
|
8
|
+
* string `'42'`, since that is all an attribute can hold.
|
|
9
|
+
*/
|
|
10
|
+
export declare function valueOf(el: Element): SelectionValue | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* `v-wx-select="item.id"` hands an element to the selection area around it.
|
|
13
|
+
*
|
|
14
|
+
* A directive rather than a component, because the element is already there — a card, a
|
|
15
|
+
* row, a list item — and wrapping every one of them in a box of ours would break the grid
|
|
16
|
+
* or table it sits in. It also keeps the value's type: an attribute could only carry the
|
|
17
|
+
* string `'42'`, and the selection would stop matching the numbers the model holds.
|
|
18
|
+
*/
|
|
19
|
+
export declare const vWxSelect: ObjectDirective<HTMLElement, SelectionValue>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type SelectionValue = string | number;
|
|
2
|
+
export type SelectionMatch = 'intersect' | 'contain';
|
|
3
|
+
export interface SelectionAreaProps {
|
|
4
|
+
/** Whether the box has to cover an item or merely touch it. */
|
|
5
|
+
match?: SelectionMatch;
|
|
6
|
+
/** How far the pointer travels before it is a drag rather than a click, in pixels. */
|
|
7
|
+
threshold?: number;
|
|
8
|
+
/** A click picks one item; a click on the background clears the selection. */
|
|
9
|
+
clickSelect?: boolean;
|
|
10
|
+
/** Drag with a finger too. Off, because on a touch screen a drag scrolls. */
|
|
11
|
+
touch?: boolean;
|
|
12
|
+
/** How near the scroller's edge the pointer scrolls it, in pixels. `0` never does. */
|
|
13
|
+
edgeScroll?: number;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface SelectionAreaEmits {
|
|
17
|
+
/** The pointer has moved past the threshold and a box is being drawn. */
|
|
18
|
+
start: [];
|
|
19
|
+
/** The drag is over. Carries the selection it ended with. */
|
|
20
|
+
end: [value: SelectionValue[]];
|
|
21
|
+
}
|
|
22
|
+
export interface SelectionAreaSlotProps {
|
|
23
|
+
selected: Set<SelectionValue>;
|
|
24
|
+
isSelected: (value: SelectionValue) => boolean;
|
|
25
|
+
selecting: boolean;
|
|
26
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { SkeletonProps } from './types';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: Readonly<{
|
|
5
|
+
/** The real thing, once it has arrived. */
|
|
6
|
+
default?: () => unknown;
|
|
7
|
+
/** A placeholder shaped like the real thing, instead of the rows. */
|
|
8
|
+
template?: () => unknown;
|
|
9
|
+
}> & {
|
|
10
|
+
/** The real thing, once it has arrived. */
|
|
11
|
+
default?: () => unknown;
|
|
12
|
+
/** A placeholder shaped like the real thing, instead of the rows. */
|
|
13
|
+
template?: () => unknown;
|
|
14
|
+
};
|
|
15
|
+
refs: {};
|
|
16
|
+
rootEl: any;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
19
|
+
declare const __VLS_component: import('vue').DefineComponent<SkeletonProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<SkeletonProps> & Readonly<{}>, {
|
|
20
|
+
title: boolean;
|
|
21
|
+
loading: boolean;
|
|
22
|
+
delay: number;
|
|
23
|
+
rows: number;
|
|
24
|
+
animated: boolean;
|
|
25
|
+
avatar: boolean;
|
|
26
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
28
|
+
export default _default;
|
|
29
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
30
|
+
new (): {
|
|
31
|
+
$slots: S;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** What shape the placeholder stands in for. */
|
|
2
|
+
export type SkeletonVariant = 'text' | 'title' | 'circle' | 'square' | 'image' | 'button';
|
|
3
|
+
export interface SkeletonProps {
|
|
4
|
+
/**
|
|
5
|
+
* Whether the placeholder is showing. Once it is off, the default slot is what
|
|
6
|
+
* renders — so the same markup covers both states and the caller writes one `v-if`
|
|
7
|
+
* fewer.
|
|
8
|
+
*/
|
|
9
|
+
loading?: boolean;
|
|
10
|
+
/** How many lines of text to stand in for. The last one is drawn short. */
|
|
11
|
+
rows?: number;
|
|
12
|
+
/** Adds a circle beside the lines, for a row that begins with a face. */
|
|
13
|
+
avatar?: boolean;
|
|
14
|
+
/** Draws the first line heavier, as a heading. */
|
|
15
|
+
title?: boolean;
|
|
16
|
+
/** The shimmer. Off for anything that will be on screen for a long time. */
|
|
17
|
+
animated?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* How long the content may take before the placeholder appears, in milliseconds.
|
|
20
|
+
* A request that answers in 80ms should not flash a skeleton on the way.
|
|
21
|
+
*/
|
|
22
|
+
delay?: number;
|
|
23
|
+
}
|
|
24
|
+
export interface SkeletonItemProps {
|
|
25
|
+
variant?: SkeletonVariant;
|
|
26
|
+
/** Any CSS length, or pixels as a number. */
|
|
27
|
+
width?: string | number;
|
|
28
|
+
height?: string | number;
|
|
29
|
+
/** Follows the enclosing `WxSkeleton` unless set here. */
|
|
30
|
+
animated?: boolean;
|
|
31
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SkeletonItemProps } from '../Skeleton/types';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<SkeletonItemProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<SkeletonItemProps> & Readonly<{}>, {
|
|
3
|
+
variant: import('..').SkeletonVariant;
|
|
4
|
+
width: string | number;
|
|
5
|
+
height: string | number;
|
|
6
|
+
animated: boolean;
|
|
7
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSpanElement>;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as WxSkeletonItem } from './SkeletonItem';
|
|
@@ -15,9 +15,9 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
15
15
|
disabled: boolean;
|
|
16
16
|
ariaLabel: string;
|
|
17
17
|
id: string;
|
|
18
|
+
max: number;
|
|
18
19
|
range: boolean;
|
|
19
20
|
min: number;
|
|
20
|
-
max: number;
|
|
21
21
|
step: number;
|
|
22
22
|
showValue: boolean;
|
|
23
23
|
marks: Record<number, string>;
|