@webx-ui/core 0.5.0 → 0.7.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 (74) hide show
  1. package/dist/components/Alert/Alert.d.ts +41 -0
  2. package/dist/components/Alert/index.d.ts +2 -0
  3. package/dist/components/Alert/types.d.ts +29 -0
  4. package/dist/components/Aside/Aside.d.ts +25 -0
  5. package/dist/components/Aside/index.d.ts +2 -0
  6. package/dist/components/Aside/types.d.ts +14 -0
  7. package/dist/components/Badge/Badge.d.ts +1 -1
  8. package/dist/components/Breadcrumb/Breadcrumb.d.ts +23 -0
  9. package/dist/components/Breadcrumb/index.d.ts +2 -0
  10. package/dist/components/Breadcrumb/types.d.ts +13 -0
  11. package/dist/components/BreadcrumbItem/BreadcrumbItem.d.ts +28 -0
  12. package/dist/components/BreadcrumbItem/index.d.ts +2 -0
  13. package/dist/components/BreadcrumbItem/types.d.ts +19 -0
  14. package/dist/components/Cascader/Cascader.d.ts +1 -1
  15. package/dist/components/Col/Col.d.ts +27 -0
  16. package/dist/components/Col/index.d.ts +2 -0
  17. package/dist/components/Col/types.d.ts +24 -0
  18. package/dist/components/Container/Container.d.ts +22 -0
  19. package/dist/components/Container/index.d.ts +2 -0
  20. package/dist/components/Container/types.d.ts +13 -0
  21. package/dist/components/Dialog/Dialog.d.ts +105 -0
  22. package/dist/components/Dialog/index.d.ts +2 -0
  23. package/dist/components/Dialog/types.d.ts +60 -0
  24. package/dist/components/Divider/Divider.d.ts +24 -0
  25. package/dist/components/Divider/index.d.ts +2 -0
  26. package/dist/components/Divider/types.d.ts +16 -0
  27. package/dist/components/Drawer/Drawer.d.ts +98 -0
  28. package/dist/components/Drawer/index.d.ts +2 -0
  29. package/dist/components/Drawer/types.d.ts +46 -0
  30. package/dist/components/Footer/Footer.d.ts +23 -0
  31. package/dist/components/Footer/index.d.ts +2 -0
  32. package/dist/components/Footer/types.d.ts +8 -0
  33. package/dist/components/Header/Header.d.ts +24 -0
  34. package/dist/components/Header/index.d.ts +2 -0
  35. package/dist/components/Header/types.d.ts +10 -0
  36. package/dist/components/Icon/icons.d.ts +1 -0
  37. package/dist/components/InputNumber/InputNumber.d.ts +1 -1
  38. package/dist/components/Kanban/Kanban.d.ts +2 -2
  39. package/dist/components/Main/Main.d.ts +22 -0
  40. package/dist/components/Main/index.d.ts +2 -0
  41. package/dist/components/Main/types.d.ts +8 -0
  42. package/dist/components/Menu/Menu.d.ts +39 -0
  43. package/dist/components/Menu/index.d.ts +2 -0
  44. package/dist/components/Menu/types.d.ts +26 -0
  45. package/dist/components/MenuGroup/MenuGroup.d.ts +21 -0
  46. package/dist/components/MenuGroup/index.d.ts +2 -0
  47. package/dist/components/MenuGroup/types.d.ts +4 -0
  48. package/dist/components/MenuItem/MenuItem.d.ts +32 -0
  49. package/dist/components/MenuItem/index.d.ts +2 -0
  50. package/dist/components/MenuItem/types.d.ts +23 -0
  51. package/dist/components/Popover/Popover.d.ts +1 -1
  52. package/dist/components/Row/Row.d.ts +25 -0
  53. package/dist/components/Row/index.d.ts +2 -0
  54. package/dist/components/Row/types.d.ts +17 -0
  55. package/dist/components/Scrollbar/Scrollbar.d.ts +39 -0
  56. package/dist/components/Scrollbar/index.d.ts +2 -0
  57. package/dist/components/Scrollbar/types.d.ts +30 -0
  58. package/dist/components/Space/Space.d.ts +27 -0
  59. package/dist/components/Space/index.d.ts +2 -0
  60. package/dist/components/Space/types.d.ts +23 -0
  61. package/dist/components/Submenu/Submenu.d.ts +31 -0
  62. package/dist/components/Submenu/index.d.ts +2 -0
  63. package/dist/components/Submenu/types.d.ts +15 -0
  64. package/dist/components/Textarea/Textarea.d.ts +1 -1
  65. package/dist/components/index.d.ts +19 -0
  66. package/dist/composables/useBreadcrumb.d.ts +13 -0
  67. package/dist/composables/useMenu.d.ts +49 -0
  68. package/dist/composables/useOverlayPanel.d.ts +22 -0
  69. package/dist/composables/useResponsiveShell.d.ts +59 -0
  70. package/dist/index.d.ts +1 -0
  71. package/dist/index.js +4441 -3020
  72. package/dist/index.js.map +1 -1
  73. package/dist/style.css +1 -1
  74. package/package.json +1 -1
@@ -0,0 +1,41 @@
1
+ import { AlertProps } from './types';
2
+ import { IconName } from '../Icon/types';
3
+ type __VLS_Props = AlertProps;
4
+ type __VLS_PublicProps = {
5
+ 'visible'?: boolean;
6
+ } & __VLS_Props;
7
+ declare function __VLS_template(): {
8
+ attrs: Partial<{}>;
9
+ slots: {
10
+ icon?(_: {}): any;
11
+ title?(_: {}): any;
12
+ default?(_: {}): any;
13
+ actions?(_: {}): any;
14
+ };
15
+ refs: {};
16
+ rootEl: any;
17
+ };
18
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
19
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
20
+ close: (event: MouseEvent) => any;
21
+ "update:visible": (value: boolean) => any;
22
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
23
+ onClose?: ((event: MouseEvent) => any) | undefined;
24
+ "onUpdate:visible"?: ((value: boolean) => any) | undefined;
25
+ }>, {
26
+ variant: import('./types').AlertVariant;
27
+ type: import('./types').AlertType;
28
+ title: string;
29
+ icon: IconName | false;
30
+ description: string;
31
+ closable: boolean;
32
+ closeLabel: string;
33
+ live: boolean;
34
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
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 WxAlert } from './Alert';
2
+ export type * from './types';
@@ -0,0 +1,29 @@
1
+ import { IconName } from '../Icon/types';
2
+ export type AlertType = 'info' | 'success' | 'warning' | 'danger';
3
+ export type AlertVariant = 'soft' | 'solid' | 'outline';
4
+ export interface AlertProps {
5
+ /** Semantic role of the message. */
6
+ type?: AlertType;
7
+ /** Visual weight. `soft` is the tinted panel an admin page usually wants. */
8
+ variant?: AlertVariant;
9
+ /** Headline above the body. Without it the body carries the message alone. */
10
+ title?: string;
11
+ /** The message, when a slot would be overkill. */
12
+ description?: string;
13
+ /**
14
+ * The leading icon. A name overrides the one implied by `type`; `false` drops it.
15
+ */
16
+ icon?: IconName | false;
17
+ /** Adds a × that closes the alert. */
18
+ closable?: boolean;
19
+ /** Accessible name of the close button. */
20
+ closeLabel?: string;
21
+ /**
22
+ * Announces the alert when it appears. Leave it off for a message that is part of
23
+ * the page from the start — a screen reader would read it out of nowhere.
24
+ */
25
+ live?: boolean;
26
+ }
27
+ export interface AlertEmits {
28
+ close: [event: MouseEvent];
29
+ }
@@ -0,0 +1,25 @@
1
+ import { AsideProps } from './types';
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: {
5
+ default?(_: {}): any;
6
+ };
7
+ refs: {};
8
+ rootEl: HTMLElement;
9
+ };
10
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
+ declare const __VLS_component: import('vue').DefineComponent<AsideProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<AsideProps> & Readonly<{}>, {
12
+ bordered: boolean;
13
+ side: "start" | "end";
14
+ collapsed: boolean;
15
+ width: number | string;
16
+ collapsedWidth: number | string;
17
+ scroll: boolean;
18
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLElement>;
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,2 @@
1
+ export { default as WxAside } from './Aside';
2
+ export type * from './types';
@@ -0,0 +1,14 @@
1
+ export interface AsideProps {
2
+ /** Width of the column: pixels as a number, or any CSS length. */
3
+ width?: number | string;
4
+ /** Width once `collapsed` is on — the icon rail of a sidebar. */
5
+ collapsedWidth?: number | string;
6
+ /** Narrows the column to `collapsedWidth`. Pair it with a collapsed `WxMenu`. */
7
+ collapsed?: boolean;
8
+ /** Which edge carries the rule: the sidebar's own side of the page. */
9
+ side?: 'start' | 'end';
10
+ /** Rule between the column and the page. */
11
+ bordered?: boolean;
12
+ /** Scrolls the column on its own, independently of the page. */
13
+ scroll?: boolean;
14
+ }
@@ -18,9 +18,9 @@ declare const __VLS_component: import('vue').DefineComponent<BadgeProps, {}, {},
18
18
  size: import('./types').BadgeSize;
19
19
  type: import('./types').BadgeType;
20
20
  round: boolean;
21
- dot: boolean;
22
21
  closable: boolean;
23
22
  closeLabel: string;
23
+ dot: boolean;
24
24
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSpanElement>;
25
25
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
26
26
  export default _default;
@@ -0,0 +1,23 @@
1
+ import { BreadcrumbProps } from './types';
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: {
5
+ default?(_: {}): any;
6
+ };
7
+ refs: {};
8
+ rootEl: HTMLElement;
9
+ };
10
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
+ declare const __VLS_component: import('vue').DefineComponent<BreadcrumbProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<BreadcrumbProps> & Readonly<{}>, {
12
+ size: import('./types').BreadcrumbSize;
13
+ label: string;
14
+ separator: string;
15
+ separatorIcon: import('..').IconName;
16
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLElement>;
17
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
18
+ export default _default;
19
+ type __VLS_WithTemplateSlots<T, S> = T & {
20
+ new (): {
21
+ $slots: S;
22
+ };
23
+ };
@@ -0,0 +1,2 @@
1
+ export { default as WxBreadcrumb } from './Breadcrumb';
2
+ export type * from './types';
@@ -0,0 +1,13 @@
1
+ import { IconName } from '../Icon/types';
2
+ import { BreadcrumbSize } from '../../composables/useBreadcrumb';
3
+ export type { BreadcrumbSize };
4
+ export interface BreadcrumbProps {
5
+ /** Character drawn between items. */
6
+ separator?: string;
7
+ /** Icon drawn between items instead of the character — `chevron-right`, usually. */
8
+ separatorIcon?: IconName;
9
+ /** Text size of the trail. */
10
+ size?: BreadcrumbSize;
11
+ /** Accessible name of the navigation landmark. */
12
+ label?: string;
13
+ }
@@ -0,0 +1,28 @@
1
+ import { BreadcrumbItemProps } from './types';
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: {
5
+ default?(_: {}): any;
6
+ };
7
+ refs: {};
8
+ rootEl: any;
9
+ };
10
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
+ declare const __VLS_component: import('vue').DefineComponent<BreadcrumbItemProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
12
+ click: (event: MouseEvent) => any;
13
+ }, string, import('vue').PublicProps, Readonly<BreadcrumbItemProps> & Readonly<{
14
+ onClick?: ((event: MouseEvent) => any) | undefined;
15
+ }>, {
16
+ as: string | import('vue').Component;
17
+ target: string;
18
+ icon: import('..').IconName;
19
+ href: string;
20
+ current: boolean;
21
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
22
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
23
+ export default _default;
24
+ type __VLS_WithTemplateSlots<T, S> = T & {
25
+ new (): {
26
+ $slots: S;
27
+ };
28
+ };
@@ -0,0 +1,2 @@
1
+ export { default as WxBreadcrumbItem } from './BreadcrumbItem';
2
+ export type * from './types';
@@ -0,0 +1,19 @@
1
+ import { Component } from 'vue';
2
+ import { IconName } from '../Icon/types';
3
+ export interface BreadcrumbItemProps {
4
+ /** Where the crumb points. Without it the crumb is plain text. */
5
+ href?: string;
6
+ target?: string;
7
+ /** Renders through another component — `RouterLink`, say, with `to` in the attrs. */
8
+ as?: string | Component;
9
+ /** Icon before the label. */
10
+ icon?: IconName;
11
+ /**
12
+ * Marks the crumb as the page you are on. Left alone, a crumb that links nowhere
13
+ * counts as the current page, which is how the last crumb is normally written.
14
+ */
15
+ current?: boolean;
16
+ }
17
+ export interface BreadcrumbItemEmits {
18
+ click: [event: MouseEvent];
19
+ }
@@ -43,11 +43,11 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
43
43
  clearable: boolean;
44
44
  status: import('../..').ControlStatus;
45
45
  id: string;
46
+ separator: string;
46
47
  expandTrigger: "click" | "hover";
47
48
  checkStrictly: boolean;
48
49
  emitPath: boolean;
49
50
  showAllLevels: boolean;
50
- separator: string;
51
51
  lazy: boolean;
52
52
  load: import('./types').CascaderLoader;
53
53
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
@@ -0,0 +1,27 @@
1
+ import { ColBreakpoint, ColProps } from './types';
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: {
5
+ default?(_: {}): any;
6
+ };
7
+ refs: {};
8
+ rootEl: any;
9
+ };
10
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
+ declare const __VLS_component: import('vue').DefineComponent<ColProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ColProps> & Readonly<{}>, {
12
+ sm: ColBreakpoint;
13
+ md: ColBreakpoint;
14
+ as: string | import('vue').Component;
15
+ span: number;
16
+ lg: ColBreakpoint;
17
+ offset: number;
18
+ xl: ColBreakpoint;
19
+ order: number;
20
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
21
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
22
+ export default _default;
23
+ type __VLS_WithTemplateSlots<T, S> = T & {
24
+ new (): {
25
+ $slots: S;
26
+ };
27
+ };
@@ -0,0 +1,2 @@
1
+ export { default as WxCol } from './Col';
2
+ export type * from './types';
@@ -0,0 +1,24 @@
1
+ import { Component } from 'vue';
2
+ /** A width at one breakpoint: the span alone, or the span with an offset. */
3
+ export type ColBreakpoint = number | {
4
+ span?: number;
5
+ offset?: number;
6
+ };
7
+ export interface ColProps {
8
+ /** Columns out of 24 the cell takes. This is the base — it holds at every width. */
9
+ span?: number;
10
+ /** Empty columns before the cell, out of 24. */
11
+ offset?: number;
12
+ /** From 640px up. */
13
+ sm?: ColBreakpoint;
14
+ /** From 768px up. */
15
+ md?: ColBreakpoint;
16
+ /** From 1024px up. */
17
+ lg?: ColBreakpoint;
18
+ /** From 1280px up. */
19
+ xl?: ColBreakpoint;
20
+ /** Visual order within the row, without touching the source order. */
21
+ order?: number;
22
+ /** The element to render. */
23
+ as?: string | Component;
24
+ }
@@ -0,0 +1,22 @@
1
+ import { ContainerProps } from './types';
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: {
5
+ default?(_: {}): any;
6
+ };
7
+ refs: {};
8
+ rootEl: any;
9
+ };
10
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
+ declare const __VLS_component: import('vue').DefineComponent<ContainerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ContainerProps> & Readonly<{}>, {
12
+ as: string | import('vue').Component;
13
+ direction: import('./types').ContainerDirection;
14
+ fullHeight: boolean;
15
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
17
+ export default _default;
18
+ type __VLS_WithTemplateSlots<T, S> = T & {
19
+ new (): {
20
+ $slots: S;
21
+ };
22
+ };
@@ -0,0 +1,2 @@
1
+ export { default as WxContainer } from './Container';
2
+ export type * from './types';
@@ -0,0 +1,13 @@
1
+ import { Component } from 'vue';
2
+ export type ContainerDirection = 'vertical' | 'horizontal';
3
+ export interface ContainerProps {
4
+ /**
5
+ * How the children stack. A page is `vertical` — header, body, footer; the body
6
+ * itself is `horizontal` — sidebar beside the main column.
7
+ */
8
+ direction?: ContainerDirection;
9
+ /** Makes the container at least as tall as the viewport. For the outermost one. */
10
+ fullHeight?: boolean;
11
+ /** The element to render. */
12
+ as?: string | Component;
13
+ }
@@ -0,0 +1,105 @@
1
+ import { DialogLayout, DialogProps } from './types';
2
+ type __VLS_Props = DialogProps;
3
+ declare function close(): void;
4
+ /** Back to the declared size, in the middle of the screen, and forgotten. */
5
+ declare function reset(): void;
6
+ type __VLS_PublicProps = {
7
+ 'open'?: boolean;
8
+ } & __VLS_Props;
9
+ declare function __VLS_template(): {
10
+ attrs: Partial<{}>;
11
+ slots: Readonly<{
12
+ /** The control that opens the panel. Exactly one element. */
13
+ trigger?: (props: {
14
+ open: boolean;
15
+ }) => unknown;
16
+ /** The body. */
17
+ default?: (props: {
18
+ close: () => void;
19
+ }) => unknown;
20
+ /** Replaces `title`. */
21
+ title?: () => unknown;
22
+ /** Next to the heading — badges, or actions that belong to the whole panel. */
23
+ extra?: (props: {
24
+ close: () => void;
25
+ }) => unknown;
26
+ /** A column beside the body. Its presence is what splits the body in two. */
27
+ sidebar?: (props: {
28
+ close: () => void;
29
+ }) => unknown;
30
+ /** A row under the body — where the Save and Cancel go. */
31
+ footer?: (props: {
32
+ close: () => void;
33
+ }) => unknown;
34
+ }> & {
35
+ /** The control that opens the panel. Exactly one element. */
36
+ trigger?: (props: {
37
+ open: boolean;
38
+ }) => unknown;
39
+ /** The body. */
40
+ default?: (props: {
41
+ close: () => void;
42
+ }) => unknown;
43
+ /** Replaces `title`. */
44
+ title?: () => unknown;
45
+ /** Next to the heading — badges, or actions that belong to the whole panel. */
46
+ extra?: (props: {
47
+ close: () => void;
48
+ }) => unknown;
49
+ /** A column beside the body. Its presence is what splits the body in two. */
50
+ sidebar?: (props: {
51
+ close: () => void;
52
+ }) => unknown;
53
+ /** A row under the body — where the Save and Cancel go. */
54
+ footer?: (props: {
55
+ close: () => void;
56
+ }) => unknown;
57
+ };
58
+ refs: {
59
+ panel: HTMLDivElement;
60
+ };
61
+ rootEl: any;
62
+ };
63
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
64
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {
65
+ close: typeof close;
66
+ reset: typeof reset;
67
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
68
+ close: () => any;
69
+ open: () => any;
70
+ "update:open": (value: boolean) => any;
71
+ layout: (layout: DialogLayout) => any;
72
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
73
+ onClose?: (() => any) | undefined;
74
+ onOpen?: (() => any) | undefined;
75
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
76
+ onLayout?: ((layout: DialogLayout) => any) | undefined;
77
+ }>, {
78
+ title: string;
79
+ modal: boolean;
80
+ ariaLabel: string;
81
+ closable: boolean;
82
+ closeLabel: string;
83
+ width: number | string;
84
+ scroll: import('./types').DialogScroll;
85
+ height: number | string;
86
+ stickyFooter: boolean;
87
+ minWidth: number;
88
+ minHeight: number;
89
+ sidebarWidth: number | string;
90
+ closeOnOverlay: boolean;
91
+ closeOnEscape: boolean;
92
+ overlay: boolean;
93
+ draggable: boolean;
94
+ resizable: boolean;
95
+ persist: string;
96
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
97
+ panel: HTMLDivElement;
98
+ }, any>;
99
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
100
+ export default _default;
101
+ type __VLS_WithTemplateSlots<T, S> = T & {
102
+ new (): {
103
+ $slots: S;
104
+ };
105
+ };
@@ -0,0 +1,2 @@
1
+ export { default as WxDialog } from './Dialog';
2
+ export type * from './types';
@@ -0,0 +1,60 @@
1
+ /**
2
+ * What scrolls when the content is longer than the screen: the body inside a panel that
3
+ * stops at the edge of the screen, or the whole panel inside the screen itself.
4
+ */
5
+ export type DialogScroll = 'body' | 'panel';
6
+ /** Where the panel was left: pixels, and the offset from the middle of the screen. */
7
+ export interface DialogLayout {
8
+ width?: number;
9
+ height?: number;
10
+ x?: number;
11
+ y?: number;
12
+ }
13
+ export interface DialogProps {
14
+ /** Heading of the panel. The `title` slot replaces it. */
15
+ title?: string;
16
+ /** Width of the panel: a number in pixels, or any CSS length — `520`, `'60%'`. */
17
+ width?: number | string;
18
+ /** Height of the panel. Without it the panel grows with its content, up to the screen. */
19
+ height?: number | string;
20
+ /**
21
+ * Where a long panel scrolls. `body` keeps the panel within the screen and scrolls what
22
+ * is between the heading and the footer. `panel` lets the panel grow past the screen and
23
+ * scrolls the whole of it — the heading goes with it, and dragging and resizing are off.
24
+ */
25
+ scroll?: DialogScroll;
26
+ /** In `scroll="panel"`, keep the footer against the bottom of the screen. */
27
+ stickyFooter?: boolean;
28
+ /** Smallest width a resize may reach, in pixels. */
29
+ minWidth?: number;
30
+ /** Smallest height a resize may reach, in pixels. */
31
+ minHeight?: number;
32
+ /** Width of the `sidebar` column: a number in pixels, or any CSS length. */
33
+ sidebarWidth?: number | string;
34
+ /** Adds a × to the heading. */
35
+ closable?: boolean;
36
+ /** Label of that ×, for screen readers. */
37
+ closeLabel?: string;
38
+ /** A click outside the panel closes it. */
39
+ closeOnOverlay?: boolean;
40
+ /** Escape closes it. */
41
+ closeOnEscape?: boolean;
42
+ /** Dim the page behind the panel. */
43
+ overlay?: boolean;
44
+ /** Block the page behind the panel, trap focus inside it and lock the page's scroll. */
45
+ modal?: boolean;
46
+ /** The panel can be dragged by its heading. */
47
+ draggable?: boolean;
48
+ /** The panel can be resized by the grip in its bottom-right corner. */
49
+ resizable?: boolean;
50
+ /** Remember size and position under this key, in `localStorage`. */
51
+ persist?: string;
52
+ /** Accessible name for the panel when it has no visible heading. */
53
+ ariaLabel?: string;
54
+ }
55
+ export interface DialogEmits {
56
+ open: [];
57
+ close: [];
58
+ /** The panel was dragged or resized. Carries what `persist` would store. */
59
+ layout: [layout: DialogLayout];
60
+ }
@@ -0,0 +1,24 @@
1
+ import { DividerProps } from './types';
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: {
5
+ default?(_: {}): any;
6
+ };
7
+ refs: {};
8
+ rootEl: HTMLDivElement;
9
+ };
10
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
+ declare const __VLS_component: import('vue').DefineComponent<DividerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<DividerProps> & Readonly<{}>, {
12
+ variant: import('./types').DividerVariant;
13
+ label: string;
14
+ align: import('./types').DividerAlign;
15
+ direction: import('./types').DividerDirection;
16
+ spacing: import('./types').DividerSpacing;
17
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
18
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
19
+ export default _default;
20
+ type __VLS_WithTemplateSlots<T, S> = T & {
21
+ new (): {
22
+ $slots: S;
23
+ };
24
+ };
@@ -0,0 +1,2 @@
1
+ export { default as WxDivider } from './Divider';
2
+ export type * from './types';
@@ -0,0 +1,16 @@
1
+ export type DividerDirection = 'horizontal' | 'vertical';
2
+ export type DividerVariant = 'solid' | 'dashed' | 'dotted';
3
+ export type DividerAlign = 'start' | 'center' | 'end';
4
+ export type DividerSpacing = 'none' | 'sm' | 'md' | 'lg';
5
+ export interface DividerProps {
6
+ /** A rule across the flow, or a hairline between two things on one line. */
7
+ direction?: DividerDirection;
8
+ /** Line style. */
9
+ variant?: DividerVariant;
10
+ /** Where the label sits on the line. Ignored without a label. */
11
+ align?: DividerAlign;
12
+ /** Margin around the rule. */
13
+ spacing?: DividerSpacing;
14
+ /** Label on the line, when a slot would be overkill. */
15
+ label?: string;
16
+ }
@@ -0,0 +1,98 @@
1
+ import { DrawerLayout, DrawerProps } from './types';
2
+ type __VLS_Props = DrawerProps;
3
+ declare function close(): void;
4
+ /** Back to the declared size, and forgotten. */
5
+ declare function reset(): void;
6
+ type __VLS_PublicProps = {
7
+ 'open'?: boolean;
8
+ } & __VLS_Props;
9
+ declare function __VLS_template(): {
10
+ attrs: Partial<{}>;
11
+ slots: Readonly<{
12
+ /** The control that opens the panel. Exactly one element. */
13
+ trigger?: (props: {
14
+ open: boolean;
15
+ }) => unknown;
16
+ /** The body. The one part of the panel that scrolls. */
17
+ default?: (props: {
18
+ close: () => void;
19
+ }) => unknown;
20
+ /** Replaces `title`. */
21
+ title?: () => unknown;
22
+ /** Next to the heading — badges, or actions that belong to the whole panel. */
23
+ extra?: (props: {
24
+ close: () => void;
25
+ }) => unknown;
26
+ /** A column beside the body. Its presence is what splits the body in two. */
27
+ sidebar?: (props: {
28
+ close: () => void;
29
+ }) => unknown;
30
+ /** A row under the body — where the Save and Cancel go. */
31
+ footer?: (props: {
32
+ close: () => void;
33
+ }) => unknown;
34
+ }> & {
35
+ /** The control that opens the panel. Exactly one element. */
36
+ trigger?: (props: {
37
+ open: boolean;
38
+ }) => unknown;
39
+ /** The body. The one part of the panel that scrolls. */
40
+ default?: (props: {
41
+ close: () => void;
42
+ }) => unknown;
43
+ /** Replaces `title`. */
44
+ title?: () => unknown;
45
+ /** Next to the heading — badges, or actions that belong to the whole panel. */
46
+ extra?: (props: {
47
+ close: () => void;
48
+ }) => unknown;
49
+ /** A column beside the body. Its presence is what splits the body in two. */
50
+ sidebar?: (props: {
51
+ close: () => void;
52
+ }) => unknown;
53
+ /** A row under the body — where the Save and Cancel go. */
54
+ footer?: (props: {
55
+ close: () => void;
56
+ }) => unknown;
57
+ };
58
+ refs: {};
59
+ rootEl: any;
60
+ };
61
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
62
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {
63
+ close: typeof close;
64
+ reset: typeof reset;
65
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
66
+ close: () => any;
67
+ open: () => any;
68
+ "update:open": (value: boolean) => any;
69
+ layout: (layout: DrawerLayout) => any;
70
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
71
+ onClose?: (() => any) | undefined;
72
+ onOpen?: (() => any) | undefined;
73
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
74
+ onLayout?: ((layout: DrawerLayout) => any) | undefined;
75
+ }>, {
76
+ size: number | string;
77
+ title: string;
78
+ side: import('./types').DrawerSide;
79
+ modal: boolean;
80
+ ariaLabel: string;
81
+ closable: boolean;
82
+ closeLabel: string;
83
+ sidebarWidth: number | string;
84
+ closeOnOverlay: boolean;
85
+ closeOnEscape: boolean;
86
+ overlay: boolean;
87
+ resizable: boolean;
88
+ persist: string;
89
+ minSize: number;
90
+ resizeLabel: string;
91
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
92
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
93
+ export default _default;
94
+ type __VLS_WithTemplateSlots<T, S> = T & {
95
+ new (): {
96
+ $slots: S;
97
+ };
98
+ };
@@ -0,0 +1,2 @@
1
+ export { default as WxDrawer } from './Drawer';
2
+ export type * from './types';