@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.
Files changed (99) hide show
  1. package/README.md +21 -3
  2. package/dist/components/Affix/Affix.d.ts +37 -0
  3. package/dist/components/Affix/index.d.ts +2 -0
  4. package/dist/components/Affix/types.d.ts +14 -0
  5. package/dist/components/Avatar/Avatar.d.ts +31 -0
  6. package/dist/components/Avatar/index.d.ts +2 -0
  7. package/dist/components/Avatar/types.d.ts +30 -0
  8. package/dist/components/AvatarGroup/AvatarGroup.d.ts +8 -0
  9. package/dist/components/AvatarGroup/index.d.ts +2 -0
  10. package/dist/components/AvatarGroup/types.d.ts +12 -0
  11. package/dist/components/Backtop/Backtop.d.ts +31 -0
  12. package/dist/components/Backtop/index.d.ts +2 -0
  13. package/dist/components/Backtop/types.d.ts +19 -0
  14. package/dist/components/Cascader/Cascader.d.ts +1 -1
  15. package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +1 -1
  16. package/dist/components/Descriptions/Descriptions.d.ts +33 -0
  17. package/dist/components/Descriptions/context.d.ts +5 -0
  18. package/dist/components/Descriptions/index.d.ts +2 -0
  19. package/dist/components/Descriptions/types.d.ts +30 -0
  20. package/dist/components/DescriptionsItem/DescriptionsItem.d.ts +25 -0
  21. package/dist/components/DescriptionsItem/index.d.ts +1 -0
  22. package/dist/components/Empty/Empty.d.ts +38 -0
  23. package/dist/components/Empty/index.d.ts +2 -0
  24. package/dist/components/Empty/types.d.ts +20 -0
  25. package/dist/components/EntityCard/EntityCard.d.ts +1 -1
  26. package/dist/components/Form/Form.d.ts +1 -1
  27. package/dist/components/Image/Image.d.ts +43 -0
  28. package/dist/components/Image/index.d.ts +2 -0
  29. package/dist/components/Image/types.d.ts +26 -0
  30. package/dist/components/Indicator/Indicator.d.ts +1 -1
  31. package/dist/components/InputNumber/InputNumber.d.ts +2 -2
  32. package/dist/components/Loading/Loading.d.ts +34 -0
  33. package/dist/components/Loading/index.d.ts +2 -0
  34. package/dist/components/Loading/types.d.ts +25 -0
  35. package/dist/components/Popconfirm/Popconfirm.d.ts +69 -0
  36. package/dist/components/Popconfirm/index.d.ts +2 -0
  37. package/dist/components/Popconfirm/types.d.ts +33 -0
  38. package/dist/components/Progress/Progress.d.ts +41 -0
  39. package/dist/components/Progress/index.d.ts +2 -0
  40. package/dist/components/Progress/types.d.ts +26 -0
  41. package/dist/components/Rate/Rate.d.ts +1 -1
  42. package/dist/components/Result/Result.d.ts +38 -0
  43. package/dist/components/Result/index.d.ts +2 -0
  44. package/dist/components/Result/types.d.ts +15 -0
  45. package/dist/components/Segmented/Segmented.d.ts +44 -0
  46. package/dist/components/Segmented/index.d.ts +2 -0
  47. package/dist/components/Segmented/types.d.ts +23 -0
  48. package/dist/components/SelectionArea/SelectionArea.d.ts +48 -0
  49. package/dist/components/SelectionArea/directive.d.ts +19 -0
  50. package/dist/components/SelectionArea/index.d.ts +3 -0
  51. package/dist/components/SelectionArea/types.d.ts +26 -0
  52. package/dist/components/Skeleton/Skeleton.d.ts +33 -0
  53. package/dist/components/Skeleton/index.d.ts +2 -0
  54. package/dist/components/Skeleton/types.d.ts +31 -0
  55. package/dist/components/SkeletonItem/SkeletonItem.d.ts +8 -0
  56. package/dist/components/SkeletonItem/index.d.ts +1 -0
  57. package/dist/components/Slider/Slider.d.ts +1 -1
  58. package/dist/components/SortableList/SortableList.d.ts +53 -0
  59. package/dist/components/SortableList/index.d.ts +2 -0
  60. package/dist/components/SortableList/types.d.ts +38 -0
  61. package/dist/components/Step/Step.d.ts +38 -0
  62. package/dist/components/Step/index.d.ts +1 -0
  63. package/dist/components/Steps/Steps.d.ts +31 -0
  64. package/dist/components/Steps/context.d.ts +5 -0
  65. package/dist/components/Steps/index.d.ts +2 -0
  66. package/dist/components/Steps/types.d.ts +44 -0
  67. package/dist/components/Table/Table.d.ts +3 -2
  68. package/dist/components/Table/types.d.ts +61 -3
  69. package/dist/components/Textarea/Textarea.d.ts +1 -1
  70. package/dist/components/Toaster/Toaster.d.ts +9 -0
  71. package/dist/components/Toaster/index.d.ts +2 -0
  72. package/dist/components/Toaster/types.d.ts +16 -0
  73. package/dist/components/Tooltip/Tooltip.d.ts +44 -0
  74. package/dist/components/Tooltip/index.d.ts +2 -0
  75. package/dist/components/Tooltip/types.d.ts +25 -0
  76. package/dist/components/Transfer/Transfer.d.ts +57 -0
  77. package/dist/components/Transfer/index.d.ts +2 -0
  78. package/dist/components/Transfer/types.d.ts +40 -0
  79. package/dist/components/Tree/Tree.d.ts +79 -0
  80. package/dist/components/Tree/index.d.ts +2 -0
  81. package/dist/components/Tree/types.d.ts +99 -0
  82. package/dist/components/TreeSelect/TreeSelect.d.ts +47 -0
  83. package/dist/components/TreeSelect/index.d.ts +2 -0
  84. package/dist/components/TreeSelect/types.d.ts +76 -0
  85. package/dist/components/Upload/Upload.d.ts +74 -0
  86. package/dist/components/Upload/index.d.ts +2 -0
  87. package/dist/components/Upload/types.d.ts +54 -0
  88. package/dist/components/index.d.ts +25 -0
  89. package/dist/composables/confirm.d.ts +23 -0
  90. package/dist/composables/useModal.d.ts +68 -0
  91. package/dist/composables/useToast.d.ts +66 -0
  92. package/dist/composables/useTreeNodes.d.ts +96 -0
  93. package/dist/index.d.ts +3 -0
  94. package/dist/index.js +7297 -4056
  95. package/dist/index.js.map +1 -1
  96. package/dist/internal/ConfirmDialog.d.ts +18 -0
  97. package/dist/{components/Menu → internal}/nodes.d.ts +6 -6
  98. package/dist/style.css +1 -1
  99. package/package.json +1 -1
@@ -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,2 @@
1
+ export { default as WxPopconfirm } from './Popconfirm';
2
+ export type * from './types';
@@ -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,2 @@
1
+ export { default as WxProgress } from './Progress';
2
+ export type * from './types';
@@ -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,2 @@
1
+ export { default as WxResult } from './Result';
2
+ export type * from './types';
@@ -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,2 @@
1
+ export { default as WxSegmented } from './Segmented';
2
+ export type * from './types';
@@ -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,3 @@
1
+ export { default as WxSelectionArea } from './SelectionArea';
2
+ export { vWxSelect, SELECTABLE } from './directive';
3
+ export type * from './types';
@@ -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,2 @@
1
+ export { default as WxSkeleton } from './Skeleton';
2
+ export type * from './types';
@@ -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>;
@@ -0,0 +1,53 @@
1
+ import { SortableListProps } from './types';
2
+ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
4
+ readonly "onUpdate:modelValue"?: ((value: T[]) => any) | undefined;
5
+ readonly onMove?: ((move: import('./types').SortableMove<T>) => any) | undefined;
6
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:modelValue" | "onMove"> & ({
7
+ modelValue?: T[];
8
+ } & SortableListProps<T>) & Partial<{}>> & import('vue').PublicProps;
9
+ expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
10
+ attrs: any;
11
+ slots: Readonly<{
12
+ /** Replaces the title. */
13
+ header?: () => unknown;
14
+ /** The end of the heading — a search button, a menu, whatever the list can do. */
15
+ extra?: () => unknown;
16
+ /** One row. */
17
+ default?: (props: {
18
+ item: T;
19
+ index: number;
20
+ }) => unknown;
21
+ /** The end of a row, where the buttons that act on it go. */
22
+ actions?: (props: {
23
+ item: T;
24
+ index: number;
25
+ }) => unknown;
26
+ /** Shown in place of an empty list. */
27
+ empty?: () => unknown;
28
+ }> & {
29
+ /** Replaces the title. */
30
+ header?: () => unknown;
31
+ /** The end of the heading — a search button, a menu, whatever the list can do. */
32
+ extra?: () => unknown;
33
+ /** One row. */
34
+ default?: (props: {
35
+ item: T;
36
+ index: number;
37
+ }) => unknown;
38
+ /** The end of a row, where the buttons that act on it go. */
39
+ actions?: (props: {
40
+ item: T;
41
+ index: number;
42
+ }) => unknown;
43
+ /** Shown in place of an empty list. */
44
+ empty?: () => unknown;
45
+ };
46
+ emit: ((evt: "move", move: import('./types').SortableMove<T>) => void) & ((evt: "update:modelValue", value: T[]) => void);
47
+ }>) => import('vue').VNode & {
48
+ __ctx?: Awaited<typeof __VLS_setup>;
49
+ };
50
+ export default _default;
51
+ type __VLS_PrettifyLocal<T> = {
52
+ [K in keyof T]: T[K];
53
+ } & {};
@@ -0,0 +1,2 @@
1
+ export { default as WxSortableList } from './SortableList';
2
+ export type * from './types';
@@ -0,0 +1,38 @@
1
+ export type SortableListSize = 'sm' | 'md';
2
+ /** How something was moved — worth knowing when you animate or undo. */
3
+ export type SortableVia = 'pointer' | 'keyboard';
4
+ /** Where a row came from and where it went. */
5
+ export interface SortableMove<T = unknown> {
6
+ item: T;
7
+ from: number;
8
+ to: number;
9
+ via: SortableVia;
10
+ }
11
+ export interface SortableListProps<T = unknown> {
12
+ /** Heading above the list. */
13
+ title?: string;
14
+ /**
15
+ * What a drag starts from: the grip at the start of every row (`grip`), anywhere on
16
+ * the row (`row`), or a CSS selector for a handle of your own.
17
+ */
18
+ handle?: 'grip' | 'row' | string;
19
+ /** Field to key a row by, or a function. Falls back to the position. */
20
+ itemKey?: string | ((item: T, index: number) => string | number);
21
+ /** Lists that share a name pass rows between them. */
22
+ group?: string;
23
+ /** Nothing can be moved. */
24
+ disabled?: boolean;
25
+ size?: SortableListSize;
26
+ /** Drops the frame, for a list that already sits in a card. */
27
+ plain?: boolean;
28
+ /** Shown when there is nothing in the list. */
29
+ emptyText?: string;
30
+ /** What the grip is called, before the name of the row it holds. */
31
+ dragLabel?: string;
32
+ /** Accessible name for the list. */
33
+ ariaLabel?: string;
34
+ }
35
+ export interface SortableListEmits<T = unknown> {
36
+ /** A row changed position. The list has already been reordered. */
37
+ move: [move: SortableMove<T>];
38
+ }
@@ -0,0 +1,38 @@
1
+ import { StepProps } from '../Steps/types';
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: Readonly<{
5
+ title?: () => unknown;
6
+ /** The explanation. Overrides `description`. */
7
+ default?: () => unknown;
8
+ /** Replaces the marker — a number by default, a tick once it is done. */
9
+ marker?: (props: {
10
+ index: number;
11
+ state: string;
12
+ }) => unknown;
13
+ }> & {
14
+ title?: () => unknown;
15
+ /** The explanation. Overrides `description`. */
16
+ default?: () => unknown;
17
+ /** Replaces the marker — a number by default, a tick once it is done. */
18
+ marker?: (props: {
19
+ index: number;
20
+ state: string;
21
+ }) => unknown;
22
+ };
23
+ refs: {};
24
+ rootEl: HTMLLIElement;
25
+ };
26
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
27
+ declare const __VLS_component: import('vue').DefineComponent<StepProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<StepProps> & Readonly<{}>, {
28
+ title: string;
29
+ icon: import('..').IconName;
30
+ description: string;
31
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLLIElement>;
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
+ };