@webx-ui/core 0.8.0 → 0.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/README.md +21 -3
- 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/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/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/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/Table.d.ts +3 -2
- package/dist/components/Table/types.d.ts +61 -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/Transfer/Transfer.d.ts +57 -0
- package/dist/components/Transfer/index.d.ts +2 -0
- package/dist/components/Transfer/types.d.ts +40 -0
- package/dist/components/Tree/Tree.d.ts +79 -0
- package/dist/components/Tree/index.d.ts +2 -0
- package/dist/components/Tree/types.d.ts +99 -0
- package/dist/components/TreeSelect/TreeSelect.d.ts +47 -0
- package/dist/components/TreeSelect/index.d.ts +2 -0
- package/dist/components/TreeSelect/types.d.ts +76 -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 +25 -0
- package/dist/composables/confirm.d.ts +23 -0
- package/dist/composables/useModal.d.ts +68 -0
- package/dist/composables/useToast.d.ts +66 -0
- package/dist/composables/useTreeNodes.d.ts +96 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +7297 -4056
- package/dist/index.js.map +1 -1
- package/dist/internal/ConfirmDialog.d.ts +18 -0
- package/dist/{components/Menu → internal}/nodes.d.ts +6 -6
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -46,10 +46,28 @@ const title = ref('')
|
|
|
46
46
|
`@webx-ui/core/style.css` already includes the token variables, so importing
|
|
47
47
|
`@webx-ui/tokens/tokens.css` separately is optional.
|
|
48
48
|
|
|
49
|
-
##
|
|
49
|
+
## What is in it
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
91 components — the form controls, the layout, the overlays, the data ones (`WxTable` takes
|
|
52
|
+
Laravel's `paginate()` payload as it comes), and the ones an admin panel needs that Element Plus
|
|
53
|
+
has no name for: `WxListDetail`, `WxKanban`, `WxEntityCard`, `WxSelectionArea`,
|
|
54
|
+
`WxSortableList`. The [roadmap](https://webx-ui.github.io/webx-ui/guide/roadmap.html) lists every
|
|
55
|
+
one of them and what is still open.
|
|
56
|
+
|
|
57
|
+
Not everything is a component:
|
|
58
|
+
|
|
59
|
+
```ts
|
|
60
|
+
import { toast, confirm, openModal, createModal } from '@webx-ui/core'
|
|
61
|
+
|
|
62
|
+
toast.success('Saved')
|
|
63
|
+
if (await confirm('Delete this product?')) await api.delete(product)
|
|
64
|
+
|
|
65
|
+
/* Any component, mounted from code and awaited for its answer. */
|
|
66
|
+
const product = await createModal<Product>(ProductBrowser, { resolveOn: 'select' })()
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
One directive ships with the library, `v-wx-select`, which hands an item to the selection area
|
|
70
|
+
around it. `app.use(WebxUI)` registers it along with the components.
|
|
53
71
|
|
|
54
72
|
## Conventions
|
|
55
73
|
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { AffixProps } from './types';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: Readonly<{
|
|
5
|
+
default?: (props: {
|
|
6
|
+
stuck: boolean;
|
|
7
|
+
}) => unknown;
|
|
8
|
+
}> & {
|
|
9
|
+
default?: (props: {
|
|
10
|
+
stuck: boolean;
|
|
11
|
+
}) => unknown;
|
|
12
|
+
};
|
|
13
|
+
refs: {
|
|
14
|
+
sentinel: HTMLDivElement;
|
|
15
|
+
};
|
|
16
|
+
rootEl: HTMLDivElement;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
19
|
+
declare const __VLS_component: import('vue').DefineComponent<AffixProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
20
|
+
change: (stuck: boolean) => any;
|
|
21
|
+
}, string, import('vue').PublicProps, Readonly<AffixProps> & Readonly<{
|
|
22
|
+
onChange?: ((stuck: boolean) => any) | undefined;
|
|
23
|
+
}>, {
|
|
24
|
+
disabled: boolean;
|
|
25
|
+
offset: number;
|
|
26
|
+
position: "top" | "bottom";
|
|
27
|
+
zIndex: number;
|
|
28
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
29
|
+
sentinel: HTMLDivElement;
|
|
30
|
+
}, HTMLDivElement>;
|
|
31
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
32
|
+
export default _default;
|
|
33
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
34
|
+
new (): {
|
|
35
|
+
$slots: S;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface AffixProps {
|
|
2
|
+
/** How far from the edge it comes to rest, in pixels. */
|
|
3
|
+
offset?: number;
|
|
4
|
+
/** Which edge it sticks to. */
|
|
5
|
+
position?: 'top' | 'bottom';
|
|
6
|
+
/** Puts the element back in the flow, whatever the scroll is doing. */
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
/** Layer it sits on once it is stuck. */
|
|
9
|
+
zIndex?: number;
|
|
10
|
+
}
|
|
11
|
+
export interface AffixEmits {
|
|
12
|
+
/** Fires when it sticks, and again when it lets go. */
|
|
13
|
+
change: [stuck: boolean];
|
|
14
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { AvatarProps, AvatarTone } from './types';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: {
|
|
5
|
+
default?(_: {}): any;
|
|
6
|
+
};
|
|
7
|
+
refs: {};
|
|
8
|
+
rootEl: HTMLSpanElement;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
11
|
+
declare const __VLS_component: import('vue').DefineComponent<AvatarProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
12
|
+
error: (event: Event) => any;
|
|
13
|
+
}, string, import('vue').PublicProps, Readonly<AvatarProps> & Readonly<{
|
|
14
|
+
onError?: ((event: Event) => any) | undefined;
|
|
15
|
+
}>, {
|
|
16
|
+
name: string;
|
|
17
|
+
size: import('./types').AvatarSize;
|
|
18
|
+
icon: import('..').IconName;
|
|
19
|
+
tone: AvatarTone;
|
|
20
|
+
src: string;
|
|
21
|
+
alt: string;
|
|
22
|
+
shape: import('./types').AvatarShape;
|
|
23
|
+
fit: "cover" | "contain" | "fill" | "none" | "scale-down";
|
|
24
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSpanElement>;
|
|
25
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
26
|
+
export default _default;
|
|
27
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
28
|
+
new (): {
|
|
29
|
+
$slots: S;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { IconName } from '../Icon/types';
|
|
2
|
+
export type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
3
|
+
export type AvatarShape = 'circle' | 'square';
|
|
4
|
+
/**
|
|
5
|
+
* Colour of the fallback. `auto` picks a tint from the name, so the same person is
|
|
6
|
+
* the same colour on every screen and a list of them is readable at a glance.
|
|
7
|
+
*/
|
|
8
|
+
export type AvatarTone = 'auto' | 'neutral' | 'primary' | 'success' | 'warning' | 'danger' | 'info';
|
|
9
|
+
export interface AvatarProps {
|
|
10
|
+
/** Picture to show. Anything that fails to load falls through to the initials. */
|
|
11
|
+
src?: string;
|
|
12
|
+
/** Alternative text for the picture. Defaults to `name`. */
|
|
13
|
+
alt?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Who this is. It supplies the initials, the tooltip-less title, and — with
|
|
16
|
+
* `tone="auto"` — the colour.
|
|
17
|
+
*/
|
|
18
|
+
name?: string;
|
|
19
|
+
/** Shown instead of initials when there is no name. */
|
|
20
|
+
icon?: IconName;
|
|
21
|
+
size?: AvatarSize;
|
|
22
|
+
shape?: AvatarShape;
|
|
23
|
+
tone?: AvatarTone;
|
|
24
|
+
/** How the picture fills its box. */
|
|
25
|
+
fit?: 'cover' | 'contain' | 'fill' | 'none' | 'scale-down';
|
|
26
|
+
}
|
|
27
|
+
export interface AvatarEmits {
|
|
28
|
+
/** The picture could not be loaded, so the fallback is showing. */
|
|
29
|
+
error: [event: Event];
|
|
30
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AvatarGroupProps } from './types';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<AvatarGroupProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<AvatarGroupProps> & Readonly<{}>, {
|
|
3
|
+
size: import('..').AvatarSize;
|
|
4
|
+
shape: import('..').AvatarShape;
|
|
5
|
+
max: number;
|
|
6
|
+
overlap: number;
|
|
7
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AvatarShape, AvatarSize } from '../Avatar/types';
|
|
2
|
+
export interface AvatarGroupProps {
|
|
3
|
+
/**
|
|
4
|
+
* How many to show before the rest become a count. `0` shows every one of them.
|
|
5
|
+
*/
|
|
6
|
+
max?: number;
|
|
7
|
+
/** Size for every avatar in the group; each one may still set its own. */
|
|
8
|
+
size?: AvatarSize;
|
|
9
|
+
shape?: AvatarShape;
|
|
10
|
+
/** How far each avatar slides over the one before it, as a share of its width. */
|
|
11
|
+
overlap?: number;
|
|
12
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { BacktopProps } from './types';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: Readonly<{
|
|
5
|
+
default?: () => unknown;
|
|
6
|
+
}> & {
|
|
7
|
+
default?: () => unknown;
|
|
8
|
+
};
|
|
9
|
+
refs: {};
|
|
10
|
+
rootEl: any;
|
|
11
|
+
};
|
|
12
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
13
|
+
declare const __VLS_component: import('vue').DefineComponent<BacktopProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
14
|
+
click: (event: MouseEvent) => any;
|
|
15
|
+
}, string, import('vue').PublicProps, Readonly<BacktopProps> & Readonly<{
|
|
16
|
+
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
17
|
+
}>, {
|
|
18
|
+
target: string | HTMLElement | null;
|
|
19
|
+
right: number;
|
|
20
|
+
bottom: number;
|
|
21
|
+
ariaLabel: string;
|
|
22
|
+
visibilityHeight: number;
|
|
23
|
+
smooth: boolean;
|
|
24
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
25
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
26
|
+
export default _default;
|
|
27
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
28
|
+
new (): {
|
|
29
|
+
$slots: S;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface BacktopProps {
|
|
2
|
+
/**
|
|
3
|
+
* What scrolls. A CSS selector, an element, or nothing for the window.
|
|
4
|
+
*
|
|
5
|
+
* Name it in an admin: the page there rarely scrolls — the main column does — and
|
|
6
|
+
* a button watching the window would appear when nothing has happened.
|
|
7
|
+
*/
|
|
8
|
+
target?: string | HTMLElement | null;
|
|
9
|
+
/** How far down before the button appears, in pixels. */
|
|
10
|
+
visibilityHeight?: number;
|
|
11
|
+
/** Distance from the trailing edge, in pixels. */
|
|
12
|
+
right?: number;
|
|
13
|
+
/** Distance from the bottom, in pixels. */
|
|
14
|
+
bottom?: number;
|
|
15
|
+
/** Glides back up rather than jumping. */
|
|
16
|
+
smooth?: boolean;
|
|
17
|
+
/** Accessible name of the button. */
|
|
18
|
+
ariaLabel?: string;
|
|
19
|
+
}
|
|
@@ -43,13 +43,13 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
43
43
|
clearable: boolean;
|
|
44
44
|
status: import('../..').ControlStatus;
|
|
45
45
|
id: string;
|
|
46
|
+
load: import('./types').CascaderLoader;
|
|
46
47
|
separator: string;
|
|
47
48
|
expandTrigger: "click" | "hover";
|
|
48
49
|
checkStrictly: boolean;
|
|
49
50
|
emitPath: boolean;
|
|
50
51
|
showAllLevels: boolean;
|
|
51
52
|
lazy: boolean;
|
|
52
|
-
load: import('./types').CascaderLoader;
|
|
53
53
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
54
54
|
panel: HTMLDivElement;
|
|
55
55
|
}, any>;
|
|
@@ -25,8 +25,8 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
25
25
|
disabled: boolean;
|
|
26
26
|
options: import('./types').CheckboxOption[];
|
|
27
27
|
inline: boolean;
|
|
28
|
-
min: number;
|
|
29
28
|
max: number;
|
|
29
|
+
min: number;
|
|
30
30
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
31
31
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
32
32
|
export default _default;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { DescriptionsProps } from './types';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: Readonly<{
|
|
5
|
+
title?: () => unknown;
|
|
6
|
+
/** Beside the heading: an edit button, a status. */
|
|
7
|
+
extra?: () => unknown;
|
|
8
|
+
default?: () => unknown;
|
|
9
|
+
}> & {
|
|
10
|
+
title?: () => unknown;
|
|
11
|
+
/** Beside the heading: an edit button, a status. */
|
|
12
|
+
extra?: () => unknown;
|
|
13
|
+
default?: () => unknown;
|
|
14
|
+
};
|
|
15
|
+
refs: {};
|
|
16
|
+
rootEl: HTMLDivElement;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
19
|
+
declare const __VLS_component: import('vue').DefineComponent<DescriptionsProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<DescriptionsProps> & Readonly<{}>, {
|
|
20
|
+
bordered: boolean;
|
|
21
|
+
size: import('../..').ControlSize;
|
|
22
|
+
title: string;
|
|
23
|
+
columns: number;
|
|
24
|
+
layout: import('./types').DescriptionsLayout;
|
|
25
|
+
labelWidth: string;
|
|
26
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
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,5 @@
|
|
|
1
|
+
import { InjectionKey } from 'vue';
|
|
2
|
+
import { DescriptionsContext } from './types';
|
|
3
|
+
export declare const descriptionsKey: InjectionKey<DescriptionsContext>;
|
|
4
|
+
/** A pair on its own, outside any list, still has to render something sensible. */
|
|
5
|
+
export declare function useDescriptions(): DescriptionsContext;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ControlSize } from '../../composables/useFormField';
|
|
2
|
+
/** Where the label sits: beside its value, or above it. */
|
|
3
|
+
export type DescriptionsLayout = 'horizontal' | 'vertical';
|
|
4
|
+
export interface DescriptionsProps {
|
|
5
|
+
/** Heading above the list. */
|
|
6
|
+
title?: string;
|
|
7
|
+
/**
|
|
8
|
+
* How many label-and-value pairs stand side by side. The list drops to one column
|
|
9
|
+
* on its own when the room runs out, so this is the most it will ever show.
|
|
10
|
+
*/
|
|
11
|
+
columns?: number;
|
|
12
|
+
/** Rules around every cell, which is what turns a list into a table of facts. */
|
|
13
|
+
bordered?: boolean;
|
|
14
|
+
size?: ControlSize;
|
|
15
|
+
layout?: DescriptionsLayout;
|
|
16
|
+
/** Width of the label column when the layout is `horizontal`, e.g. `"140px"`. */
|
|
17
|
+
labelWidth?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface DescriptionsItemProps {
|
|
20
|
+
/** The name of the fact. Use the `label` slot for anything richer than text. */
|
|
21
|
+
label?: string;
|
|
22
|
+
/** How many columns the pair takes up. */
|
|
23
|
+
span?: number;
|
|
24
|
+
}
|
|
25
|
+
/** What `WxDescriptions` hands down to the pairs inside it. */
|
|
26
|
+
export interface DescriptionsContext {
|
|
27
|
+
bordered: boolean;
|
|
28
|
+
layout: DescriptionsLayout;
|
|
29
|
+
labelWidth: string | undefined;
|
|
30
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { DescriptionsItemProps } from '../Descriptions/types';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: Readonly<{
|
|
5
|
+
label?: () => unknown;
|
|
6
|
+
default?: () => unknown;
|
|
7
|
+
}> & {
|
|
8
|
+
label?: () => unknown;
|
|
9
|
+
default?: () => unknown;
|
|
10
|
+
};
|
|
11
|
+
refs: {};
|
|
12
|
+
rootEl: any;
|
|
13
|
+
};
|
|
14
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
15
|
+
declare const __VLS_component: import('vue').DefineComponent<DescriptionsItemProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<DescriptionsItemProps> & Readonly<{}>, {
|
|
16
|
+
label: string;
|
|
17
|
+
span: number;
|
|
18
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as WxDescriptionsItem } from './DescriptionsItem';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { EmptyProps } from './types';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: Readonly<{
|
|
5
|
+
/** Replaces the glyph — an illustration, a logo, whatever says it better. */
|
|
6
|
+
icon?: () => unknown;
|
|
7
|
+
title?: () => unknown;
|
|
8
|
+
/** The explanation. Overrides `description`. */
|
|
9
|
+
default?: () => unknown;
|
|
10
|
+
/** What to do about it: a button that clears the filter, one that adds a record. */
|
|
11
|
+
actions?: () => unknown;
|
|
12
|
+
}> & {
|
|
13
|
+
/** Replaces the glyph — an illustration, a logo, whatever says it better. */
|
|
14
|
+
icon?: () => unknown;
|
|
15
|
+
title?: () => unknown;
|
|
16
|
+
/** The explanation. Overrides `description`. */
|
|
17
|
+
default?: () => unknown;
|
|
18
|
+
/** What to do about it: a button that clears the filter, one that adds a record. */
|
|
19
|
+
actions?: () => unknown;
|
|
20
|
+
};
|
|
21
|
+
refs: {};
|
|
22
|
+
rootEl: HTMLDivElement;
|
|
23
|
+
};
|
|
24
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
25
|
+
declare const __VLS_component: import('vue').DefineComponent<EmptyProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<EmptyProps> & Readonly<{}>, {
|
|
26
|
+
plain: boolean;
|
|
27
|
+
size: import('./types').EmptySize;
|
|
28
|
+
title: string;
|
|
29
|
+
icon: import('..').IconName;
|
|
30
|
+
description: string;
|
|
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,20 @@
|
|
|
1
|
+
import { IconName } from '../Icon/types';
|
|
2
|
+
export type EmptySize = 'sm' | 'md' | 'lg';
|
|
3
|
+
export interface EmptyProps {
|
|
4
|
+
/**
|
|
5
|
+
* The glyph above the message. Pick one that says what is missing — `search` for
|
|
6
|
+
* a filter that matched nothing, `inbox` for a list nobody has written to yet.
|
|
7
|
+
*/
|
|
8
|
+
icon?: IconName;
|
|
9
|
+
/** What is missing, in a few words. */
|
|
10
|
+
title?: string;
|
|
11
|
+
/** Why, or what to do about it. */
|
|
12
|
+
description?: string;
|
|
13
|
+
/**
|
|
14
|
+
* How much room to take. `sm` is a panel inside a screen; `lg` is a whole page
|
|
15
|
+
* with nothing on it.
|
|
16
|
+
*/
|
|
17
|
+
size?: EmptySize;
|
|
18
|
+
/** Drops the icon, for a message that stands on its own. */
|
|
19
|
+
plain?: boolean;
|
|
20
|
+
}
|
|
@@ -26,8 +26,8 @@ declare const __VLS_component: import('vue').DefineComponent<EntityCardProps, {}
|
|
|
26
26
|
title: string;
|
|
27
27
|
subtitle: string;
|
|
28
28
|
href: string;
|
|
29
|
-
imageAlt: string;
|
|
30
29
|
shape: import('./types').EntityCardShape;
|
|
30
|
+
imageAlt: string;
|
|
31
31
|
imageSize: number | string;
|
|
32
32
|
selected: boolean;
|
|
33
33
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
@@ -18,9 +18,9 @@ declare const __VLS_component: import('vue').DefineComponent<FormProps, {}, {},
|
|
|
18
18
|
}>, {
|
|
19
19
|
size: import('../..').ControlSize;
|
|
20
20
|
disabled: boolean;
|
|
21
|
+
labelWidth: string;
|
|
21
22
|
errors: ValidationErrors;
|
|
22
23
|
labelPosition: "top" | "left";
|
|
23
|
-
labelWidth: string;
|
|
24
24
|
gap: "sm" | "md" | "lg";
|
|
25
25
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLFormElement>;
|
|
26
26
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ImageProps } from './types';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: Readonly<{
|
|
5
|
+
/** Shown while the picture is on its way. */
|
|
6
|
+
placeholder?: () => unknown;
|
|
7
|
+
/** Shown instead of a picture that will not load. */
|
|
8
|
+
error?: () => unknown;
|
|
9
|
+
}> & {
|
|
10
|
+
/** Shown while the picture is on its way. */
|
|
11
|
+
placeholder?: () => unknown;
|
|
12
|
+
/** Shown instead of a picture that will not load. */
|
|
13
|
+
error?: () => unknown;
|
|
14
|
+
};
|
|
15
|
+
refs: {};
|
|
16
|
+
rootEl: HTMLDivElement;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
19
|
+
declare const __VLS_component: import('vue').DefineComponent<ImageProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
20
|
+
error: (event: Event) => any;
|
|
21
|
+
load: (event: Event) => any;
|
|
22
|
+
}, string, import('vue').PublicProps, Readonly<ImageProps> & Readonly<{
|
|
23
|
+
onError?: ((event: Event) => any) | undefined;
|
|
24
|
+
onLoad?: ((event: Event) => any) | undefined;
|
|
25
|
+
}>, {
|
|
26
|
+
placeholder: string;
|
|
27
|
+
width: number | string;
|
|
28
|
+
src: string;
|
|
29
|
+
alt: string;
|
|
30
|
+
fit: import('./types').ImageFit;
|
|
31
|
+
lazy: boolean;
|
|
32
|
+
preview: boolean;
|
|
33
|
+
height: number | string;
|
|
34
|
+
radius: number | string;
|
|
35
|
+
previewLabel: string;
|
|
36
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
37
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
38
|
+
export default _default;
|
|
39
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
40
|
+
new (): {
|
|
41
|
+
$slots: S;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type ImageFit = 'cover' | 'contain' | 'fill' | 'none' | 'scale-down';
|
|
2
|
+
export interface ImageProps {
|
|
3
|
+
src?: string;
|
|
4
|
+
alt?: string;
|
|
5
|
+
/** How the picture fills its box. */
|
|
6
|
+
fit?: ImageFit;
|
|
7
|
+
width?: number | string;
|
|
8
|
+
height?: number | string;
|
|
9
|
+
/** Shape of the box: any CSS length, or a keyword from the radius scale. */
|
|
10
|
+
radius?: number | string;
|
|
11
|
+
/**
|
|
12
|
+
* Waits until the picture is near the screen before fetching it. On by default:
|
|
13
|
+
* a media library is a hundred pictures and a reader looks at four.
|
|
14
|
+
*/
|
|
15
|
+
lazy?: boolean;
|
|
16
|
+
/** A tiny picture — or a colour — shown while the real one arrives. */
|
|
17
|
+
placeholder?: string;
|
|
18
|
+
/** Opens the picture full size when it is clicked. */
|
|
19
|
+
preview?: boolean;
|
|
20
|
+
/** Accessible name of the button that opens the preview. */
|
|
21
|
+
previewLabel?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface ImageEmits {
|
|
24
|
+
load: [event: Event];
|
|
25
|
+
error: [event: Event];
|
|
26
|
+
}
|
|
@@ -15,8 +15,8 @@ declare const __VLS_component: import('vue').DefineComponent<IndicatorProps, {},
|
|
|
15
15
|
value: number | string;
|
|
16
16
|
hidden: boolean;
|
|
17
17
|
offset: [number, number];
|
|
18
|
-
dot: boolean;
|
|
19
18
|
max: number;
|
|
19
|
+
dot: boolean;
|
|
20
20
|
showZero: boolean;
|
|
21
21
|
placement: import('./types').IndicatorPlacement;
|
|
22
22
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSpanElement>;
|
|
@@ -27,12 +27,12 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {
|
|
|
27
27
|
ariaLabel: string;
|
|
28
28
|
status: import('../..').ControlStatus;
|
|
29
29
|
id: string;
|
|
30
|
-
min: number;
|
|
31
30
|
max: number;
|
|
31
|
+
wheel: boolean;
|
|
32
|
+
min: number;
|
|
32
33
|
readonly: boolean;
|
|
33
34
|
step: number;
|
|
34
35
|
precision: number;
|
|
35
|
-
wheel: boolean;
|
|
36
36
|
controls: boolean;
|
|
37
37
|
controlsPosition: "sides" | "right";
|
|
38
38
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
@@ -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
|
+
}
|