@webx-ui/core 0.6.0 → 0.8.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 (70) 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 +23 -0
  19. package/dist/components/Container/index.d.ts +2 -0
  20. package/dist/components/Container/types.d.ts +23 -0
  21. package/dist/components/Dialog/Dialog.d.ts +1 -1
  22. package/dist/components/Divider/Divider.d.ts +24 -0
  23. package/dist/components/Divider/index.d.ts +2 -0
  24. package/dist/components/Divider/types.d.ts +16 -0
  25. package/dist/components/Footer/Footer.d.ts +23 -0
  26. package/dist/components/Footer/index.d.ts +2 -0
  27. package/dist/components/Footer/types.d.ts +8 -0
  28. package/dist/components/Header/Header.d.ts +24 -0
  29. package/dist/components/Header/index.d.ts +2 -0
  30. package/dist/components/Header/types.d.ts +10 -0
  31. package/dist/components/Icon/icons.d.ts +1 -0
  32. package/dist/components/ListDetail/ListDetail.d.ts +73 -0
  33. package/dist/components/ListDetail/index.d.ts +2 -0
  34. package/dist/components/ListDetail/types.d.ts +19 -0
  35. package/dist/components/Main/Main.d.ts +22 -0
  36. package/dist/components/Main/index.d.ts +2 -0
  37. package/dist/components/Main/types.d.ts +8 -0
  38. package/dist/components/Menu/Menu.d.ts +45 -0
  39. package/dist/components/Menu/index.d.ts +2 -0
  40. package/dist/components/Menu/nodes.d.ts +30 -0
  41. package/dist/components/Menu/types.d.ts +36 -0
  42. package/dist/components/MenuGroup/MenuGroup.d.ts +21 -0
  43. package/dist/components/MenuGroup/index.d.ts +2 -0
  44. package/dist/components/MenuGroup/types.d.ts +4 -0
  45. package/dist/components/MenuItem/MenuItem.d.ts +32 -0
  46. package/dist/components/MenuItem/index.d.ts +2 -0
  47. package/dist/components/MenuItem/types.d.ts +23 -0
  48. package/dist/components/Row/Row.d.ts +25 -0
  49. package/dist/components/Row/index.d.ts +2 -0
  50. package/dist/components/Row/types.d.ts +17 -0
  51. package/dist/components/Scrollbar/Scrollbar.d.ts +39 -0
  52. package/dist/components/Scrollbar/index.d.ts +2 -0
  53. package/dist/components/Scrollbar/types.d.ts +30 -0
  54. package/dist/components/Space/Space.d.ts +27 -0
  55. package/dist/components/Space/index.d.ts +2 -0
  56. package/dist/components/Space/types.d.ts +23 -0
  57. package/dist/components/Submenu/Submenu.d.ts +31 -0
  58. package/dist/components/Submenu/index.d.ts +2 -0
  59. package/dist/components/Submenu/types.d.ts +15 -0
  60. package/dist/components/index.d.ts +18 -0
  61. package/dist/composables/useBreadcrumb.d.ts +13 -0
  62. package/dist/composables/useControlAttrs.d.ts +35 -0
  63. package/dist/composables/useElementWidth.d.ts +17 -0
  64. package/dist/composables/useMenu.d.ts +49 -0
  65. package/dist/composables/useResponsiveShell.d.ts +59 -0
  66. package/dist/index.d.ts +3 -0
  67. package/dist/index.js +4595 -3439
  68. package/dist/index.js.map +1 -1
  69. package/dist/style.css +1 -1
  70. package/package.json +2 -2
@@ -0,0 +1,45 @@
1
+ import { MenuValue } from '../../composables/useMenu';
2
+ import { MenuProps } from './types';
3
+ type __VLS_Props = MenuProps;
4
+ type __VLS_PublicProps = {
5
+ modelValue?: MenuValue | undefined;
6
+ 'open'?: MenuValue[];
7
+ } & __VLS_Props;
8
+ declare function __VLS_template(): {
9
+ attrs: Partial<{}>;
10
+ slots: {
11
+ default?(_: {}): any;
12
+ };
13
+ refs: {
14
+ list: HTMLUListElement;
15
+ };
16
+ rootEl: HTMLUListElement;
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
+ "update:modelValue": (value: MenuValue | undefined) => any;
21
+ select: (value: MenuValue, event: MouseEvent) => any;
22
+ "update:open": (value: MenuValue[]) => any;
23
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
24
+ "onUpdate:modelValue"?: ((value: MenuValue | undefined) => any) | undefined;
25
+ onSelect?: ((value: MenuValue, event: MouseEvent) => any) | undefined;
26
+ "onUpdate:open"?: ((value: MenuValue[]) => any) | undefined;
27
+ }>, {
28
+ size: import('./types').MenuSize;
29
+ label: string;
30
+ collapsed: boolean;
31
+ mode: import('./types').MenuMode;
32
+ overflow: import('./types').MenuOverflow;
33
+ overflowTitle: string;
34
+ accordion: boolean;
35
+ autoExpand: boolean;
36
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
37
+ list: HTMLUListElement;
38
+ }, HTMLUListElement>;
39
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
40
+ export default _default;
41
+ type __VLS_WithTemplateSlots<T, S> = T & {
42
+ new (): {
43
+ $slots: S;
44
+ };
45
+ };
@@ -0,0 +1,2 @@
1
+ export { default as WxMenu } from './Menu';
2
+ export type * from './types';
@@ -0,0 +1,30 @@
1
+ import { PropType, VNode } from 'vue';
2
+ /**
3
+ * The entries of a menu as a flat list, so they can be counted and split between the
4
+ * bar and the branch that holds what did not fit.
5
+ *
6
+ * A `v-for` arrives as one fragment holding many entries, and a `v-if` that is false
7
+ * arrives as a comment. Both have to go: the list is lined up index for index against
8
+ * the `<li>` elements the browser actually laid out, and a comment is not one.
9
+ */
10
+ export declare function flattenEntries(nodes: VNode[]): VNode[];
11
+ /**
12
+ * Renders vnodes that have already been created — the two halves of a split menu.
13
+ *
14
+ * It exists because a template can render a slot but not a slice of one, and the
15
+ * entries must be rendered *once*: an entry that appeared in both halves would
16
+ * register itself twice and report the wrong branch to the menu above it.
17
+ */
18
+ export declare const WxMenuNodes: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
19
+ nodes: {
20
+ type: PropType<VNode[]>;
21
+ required: true;
22
+ };
23
+ }>, () => VNode<import('vue').RendererNode, import('vue').RendererElement, {
24
+ [key: string]: any;
25
+ }>[], {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
26
+ nodes: {
27
+ type: PropType<VNode[]>;
28
+ required: true;
29
+ };
30
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,36 @@
1
+ import { MenuMode, MenuSize, MenuValue } from '../../composables/useMenu';
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';
9
+ export interface MenuProps {
10
+ /** A sidebar down the page, or a bar across the top of it. */
11
+ mode?: MenuMode;
12
+ /** Row height and text size. */
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;
18
+ /**
19
+ * The icon rail: labels are hidden and submenus open as flyouts beside the rail.
20
+ * Vertical menus only — there is nothing to collapse in a bar.
21
+ */
22
+ collapsed?: boolean;
23
+ /** Only one submenu stays open at a time. */
24
+ accordion?: boolean;
25
+ /**
26
+ * Opens the branch the active entry sits in. On by default: a sidebar rendered on
27
+ * a nested route should show where you are without being told.
28
+ */
29
+ autoExpand?: boolean;
30
+ /** Accessible name of the menu, e.g. `Main navigation`. */
31
+ label?: string;
32
+ }
33
+ export interface MenuEmits {
34
+ /** An entry was chosen. */
35
+ select: [value: MenuValue, event: MouseEvent];
36
+ }
@@ -0,0 +1,21 @@
1
+ import { MenuGroupProps } from './types';
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: {
5
+ title?(_: {}): any;
6
+ default?(_: {}): any;
7
+ };
8
+ refs: {};
9
+ rootEl: HTMLLIElement;
10
+ };
11
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
12
+ declare const __VLS_component: import('vue').DefineComponent<MenuGroupProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<MenuGroupProps> & Readonly<{}>, {
13
+ title: string;
14
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLLIElement>;
15
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
16
+ export default _default;
17
+ type __VLS_WithTemplateSlots<T, S> = T & {
18
+ new (): {
19
+ $slots: S;
20
+ };
21
+ };
@@ -0,0 +1,2 @@
1
+ export { default as WxMenuGroup } from './MenuGroup';
2
+ export type * from './types';
@@ -0,0 +1,4 @@
1
+ export interface MenuGroupProps {
2
+ /** Heading above the entries. On a collapsed rail it becomes a plain rule. */
3
+ title?: string;
4
+ }
@@ -0,0 +1,32 @@
1
+ import { MenuItemProps } from './types';
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: {
5
+ icon?(_: {}): any;
6
+ default?(_: {}): any;
7
+ trailing?(_: {}): any;
8
+ };
9
+ refs: {};
10
+ rootEl: any;
11
+ };
12
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
13
+ declare const __VLS_component: import('vue').DefineComponent<MenuItemProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
14
+ click: (event: MouseEvent) => any;
15
+ }, string, import('vue').PublicProps, Readonly<MenuItemProps> & Readonly<{
16
+ onClick?: ((event: MouseEvent) => any) | undefined;
17
+ }>, {
18
+ disabled: boolean;
19
+ as: string | import('vue').Component;
20
+ label: string;
21
+ target: string;
22
+ value: import('..').MenuValue;
23
+ icon: import('..').IconName;
24
+ href: string;
25
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
26
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
27
+ export default _default;
28
+ type __VLS_WithTemplateSlots<T, S> = T & {
29
+ new (): {
30
+ $slots: S;
31
+ };
32
+ };
@@ -0,0 +1,2 @@
1
+ export { default as WxMenuItem } from './MenuItem';
2
+ export type * from './types';
@@ -0,0 +1,23 @@
1
+ import { Component } from 'vue';
2
+ import { IconName } from '../Icon/types';
3
+ import { MenuValue } from '../../composables/useMenu';
4
+ export interface MenuItemProps {
5
+ /** What identifies the entry — the value the menu reports as selected. */
6
+ value?: MenuValue;
7
+ /** Icon before the label. The only thing left of the entry on a collapsed rail. */
8
+ icon?: IconName;
9
+ /**
10
+ * The label, when a slot would be overkill. It is also what a collapsed rail shows
11
+ * as the entry's title on hover.
12
+ */
13
+ label?: string;
14
+ /** Where the entry points. Without it the entry is a button. */
15
+ href?: string;
16
+ target?: string;
17
+ /** Renders through another component — `RouterLink`, say, with `to` in the attrs. */
18
+ as?: string | Component;
19
+ disabled?: boolean;
20
+ }
21
+ export interface MenuItemEmits {
22
+ click: [event: MouseEvent];
23
+ }
@@ -0,0 +1,25 @@
1
+ import { RowProps } 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<RowProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<RowProps> & Readonly<{}>, {
12
+ as: string | import('vue').Component;
13
+ align: import('./types').RowAlign;
14
+ justify: import('./types').RowJustify;
15
+ gutter: number | string;
16
+ gutterY: number | string;
17
+ wrap: boolean;
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,2 @@
1
+ export { default as WxRow } from './Row';
2
+ export type * from './types';
@@ -0,0 +1,17 @@
1
+ import { Component } from 'vue';
2
+ export type RowJustify = 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly';
3
+ export type RowAlign = 'start' | 'center' | 'end' | 'stretch' | 'baseline';
4
+ export interface RowProps {
5
+ /** Gap between columns: pixels as a number, or any CSS length. */
6
+ gutter?: number | string;
7
+ /** Gap between rows once the columns wrap. Defaults to `gutter`. */
8
+ gutterY?: number | string;
9
+ /** Distribution along the row. */
10
+ justify?: RowJustify;
11
+ /** Alignment across it. */
12
+ align?: RowAlign;
13
+ /** Lets columns wrap onto the next line. */
14
+ wrap?: boolean;
15
+ /** The element to render. */
16
+ as?: string | Component;
17
+ }
@@ -0,0 +1,39 @@
1
+ import { ScrollbarProps, ScrollMotion, ScrollTarget } from './types';
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: {
5
+ default?(_: {}): any;
6
+ };
7
+ refs: {
8
+ viewport: HTMLDivElement;
9
+ };
10
+ rootEl: HTMLDivElement;
11
+ };
12
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
13
+ declare const __VLS_component: import('vue').DefineComponent<ScrollbarProps, {
14
+ /** The scrolling element. */
15
+ el: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
16
+ scrollTo: (options: ScrollTarget) => void | undefined;
17
+ scrollToTop: (behavior?: ScrollMotion) => void | undefined;
18
+ scrollToBottom: (behavior?: ScrollMotion) => void | undefined;
19
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
20
+ scroll: (event: Event) => any;
21
+ }, string, import('vue').PublicProps, Readonly<ScrollbarProps> & Readonly<{
22
+ onScroll?: ((event: Event) => any) | undefined;
23
+ }>, {
24
+ size: import('./types').ScrollbarSize;
25
+ always: boolean;
26
+ height: number | string;
27
+ maxHeight: number | string;
28
+ axis: import('./types').ScrollbarAxis;
29
+ chainScroll: boolean;
30
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
31
+ viewport: HTMLDivElement;
32
+ }, HTMLDivElement>;
33
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
34
+ export default _default;
35
+ type __VLS_WithTemplateSlots<T, S> = T & {
36
+ new (): {
37
+ $slots: S;
38
+ };
39
+ };
@@ -0,0 +1,2 @@
1
+ export { default as WxScrollbar } from './Scrollbar';
2
+ export type * from './types';
@@ -0,0 +1,30 @@
1
+ export type ScrollbarAxis = 'y' | 'x' | 'both';
2
+ export type ScrollbarSize = 'sm' | 'md';
3
+ export interface ScrollbarProps {
4
+ /** Fixed height: pixels as a number, or any CSS length. */
5
+ height?: number | string;
6
+ /** Height the box grows to before it starts scrolling. */
7
+ maxHeight?: number | string;
8
+ /** Which way the content scrolls. */
9
+ axis?: ScrollbarAxis;
10
+ /** Thickness of the bar. */
11
+ size?: ScrollbarSize;
12
+ /** Keeps the bar visible instead of fading it in on hover. */
13
+ always?: boolean;
14
+ /**
15
+ * Lets a scroll that reaches the end carry on to the page behind it. Off by
16
+ * default: a panel inside a dialog should not scroll the page under it.
17
+ */
18
+ chainScroll?: boolean;
19
+ }
20
+ export interface ScrollbarEmits {
21
+ scroll: [event: Event];
22
+ }
23
+ /** How a programmatic scroll moves — the native `ScrollBehavior` values. */
24
+ export type ScrollMotion = 'auto' | 'smooth' | 'instant';
25
+ /** Where to scroll to, in the shape the native `scrollTo` takes. */
26
+ export interface ScrollTarget {
27
+ top?: number;
28
+ left?: number;
29
+ behavior?: ScrollMotion;
30
+ }
@@ -0,0 +1,27 @@
1
+ import { SpaceProps } 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<SpaceProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<SpaceProps> & Readonly<{}>, {
12
+ fill: boolean;
13
+ size: import('./types').SpaceSize | number | string;
14
+ as: string | import('vue').Component;
15
+ align: import('./types').SpaceAlign;
16
+ inline: boolean;
17
+ direction: import('./types').SpaceDirection;
18
+ justify: import('./types').SpaceJustify;
19
+ wrap: boolean;
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 WxSpace } from './Space';
2
+ export type * from './types';
@@ -0,0 +1,23 @@
1
+ import { Component } from 'vue';
2
+ export type SpaceDirection = 'horizontal' | 'vertical';
3
+ export type SpaceSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
4
+ export type SpaceAlign = 'start' | 'center' | 'end' | 'baseline' | 'stretch';
5
+ export type SpaceJustify = 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly';
6
+ export interface SpaceProps {
7
+ /** Along the line or down the page. */
8
+ direction?: SpaceDirection;
9
+ /** Gap between children: a keyword from the spacing scale, pixels, or any CSS length. */
10
+ size?: SpaceSize | number | string;
11
+ /** Cross-axis alignment. */
12
+ align?: SpaceAlign;
13
+ /** Main-axis distribution. */
14
+ justify?: SpaceJustify;
15
+ /** Lets a horizontal row wrap onto the next line. */
16
+ wrap?: boolean;
17
+ /** Children stretch to fill the row — equal-width buttons in a toolbar. */
18
+ fill?: boolean;
19
+ /** Renders as `inline-flex`, so the group sits inside a line of text. */
20
+ inline?: boolean;
21
+ /** The element to render. */
22
+ as?: string | Component;
23
+ }
@@ -0,0 +1,31 @@
1
+ import { SubmenuProps } from './types';
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: {
5
+ icon?(_: {}): any;
6
+ icon?(_: {}): any;
7
+ title?(_: {}): any;
8
+ title?(_: {}): any;
9
+ default?(_: {}): any;
10
+ default?(_: {}): any;
11
+ };
12
+ refs: {};
13
+ rootEl: HTMLLIElement;
14
+ };
15
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
16
+ declare const __VLS_component: import('vue').DefineComponent<SubmenuProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
17
+ toggle: (open: boolean) => any;
18
+ }, string, import('vue').PublicProps, Readonly<SubmenuProps> & Readonly<{
19
+ onToggle?: ((open: boolean) => any) | undefined;
20
+ }>, {
21
+ disabled: boolean;
22
+ title: string;
23
+ icon: import('..').IconName;
24
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLLIElement>;
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,2 @@
1
+ export { default as WxSubmenu } from './Submenu';
2
+ export type * from './types';
@@ -0,0 +1,15 @@
1
+ import { IconName } from '../Icon/types';
2
+ import { MenuValue } from '../../composables/useMenu';
3
+ export interface SubmenuProps {
4
+ /** What identifies the branch — the key the menu opens and closes it by. */
5
+ value: MenuValue;
6
+ /** Icon before the title. */
7
+ icon?: IconName;
8
+ /** The title, when a slot would be overkill. */
9
+ title?: string;
10
+ disabled?: boolean;
11
+ }
12
+ export interface SubmenuEmits {
13
+ /** The branch was opened or closed. */
14
+ toggle: [open: boolean];
15
+ }
@@ -2,26 +2,35 @@ export * from './Accordion';
2
2
  export * from './AccordionItem';
3
3
  export * from './Action';
4
4
  export * from './Actions';
5
+ export * from './Alert';
6
+ export * from './Aside';
5
7
  export * from './Autocomplete';
6
8
  export * from './Badge';
9
+ export * from './Breadcrumb';
10
+ export * from './BreadcrumbItem';
7
11
  export * from './Button';
8
12
  export * from './ButtonGroup';
9
13
  export * from './Card';
10
14
  export * from './Cascader';
11
15
  export * from './Checkbox';
12
16
  export * from './CheckboxGroup';
17
+ export * from './Col';
13
18
  export * from './ColorPicker';
19
+ export * from './Container';
14
20
  export * from './Countdown';
15
21
  export * from './DatePicker';
16
22
  export * from './DateRangePicker';
17
23
  export * from './DateTimePicker';
18
24
  export * from './Dialog';
25
+ export * from './Divider';
19
26
  export * from './Drawer';
20
27
  export * from './Dropdown';
21
28
  export * from './DropdownItem';
22
29
  export * from './EntityCard';
30
+ export * from './Footer';
23
31
  export * from './Form';
24
32
  export * from './FormItem';
33
+ export * from './Header';
25
34
  export * from './Heading';
26
35
  export * from './Icon';
27
36
  export * from './Indicator';
@@ -29,6 +38,11 @@ export * from './Input';
29
38
  export * from './InputNumber';
30
39
  export * from './Kanban';
31
40
  export * from './Link';
41
+ export * from './ListDetail';
42
+ export * from './Main';
43
+ export * from './Menu';
44
+ export * from './MenuGroup';
45
+ export * from './MenuItem';
32
46
  export * from './Pagination';
33
47
  export * from './Popover';
34
48
  export * from './Prose';
@@ -36,9 +50,13 @@ export * from './Radio';
36
50
  export * from './RadioGroup';
37
51
  export * from './Rate';
38
52
  export * from './RichText';
53
+ export * from './Row';
54
+ export * from './Scrollbar';
39
55
  export * from './Select';
40
56
  export * from './Slider';
57
+ export * from './Space';
41
58
  export * from './Statistic';
59
+ export * from './Submenu';
42
60
  export * from './Switch';
43
61
  export * from './Tab';
44
62
  export * from './Table';
@@ -0,0 +1,13 @@
1
+ import { ComputedRef, InjectionKey } from 'vue';
2
+ import { IconName } from '../components/Icon/types';
3
+ export type BreadcrumbSize = 'sm' | 'md';
4
+ /** What `WxBreadcrumb` hands down to the items inside it. */
5
+ export interface BreadcrumbContext {
6
+ /** The character drawn between items. */
7
+ separator: ComputedRef<string>;
8
+ /** An icon drawn instead of that character. */
9
+ separatorIcon: ComputedRef<IconName | undefined>;
10
+ size: ComputedRef<BreadcrumbSize>;
11
+ }
12
+ export declare const breadcrumbKey: InjectionKey<BreadcrumbContext>;
13
+ export declare function useBreadcrumb(): BreadcrumbContext | null;
@@ -0,0 +1,35 @@
1
+ import { ComputedRef } from 'vue';
2
+ /**
3
+ * Splits what the caller wrote on a control between its two halves.
4
+ *
5
+ * Every control here sets `inheritAttrs: false` and hands `$attrs` to the element
6
+ * inside it, so that `placeholder`, `autocomplete`, `data-*` and the ARIA attributes
7
+ * reach the real `<input>` rather than the wrapper around it. Taken literally that
8
+ * sends `class` and `style` there too, and both are then in the wrong place:
9
+ *
10
+ * - The caller means the control, not its input. `class="w-60"` on a `<wx-select>` is
11
+ * asking for a narrower select, and the select is the wrapper.
12
+ * - A parent's scoped CSS cannot reach it. Scoped styles carry an attribute that is
13
+ * stamped on a child component's *root*, so a class that lands three elements deep
14
+ * matches nothing — silently.
15
+ * - And where `$attrs` is bound to an element that is only sometimes rendered — the
16
+ * search field of a filterable `WxSelect` — the class disappears altogether.
17
+ *
18
+ * So `class` and `style` go on the root, and everything else goes on the control.
19
+ *
20
+ * ```ts
21
+ * const { rootAttrs, controlAttrs } = useControlAttrs()
22
+ * ```
23
+ * ```vue
24
+ * <div :class="classes" v-bind="rootAttrs">
25
+ * <input v-bind="controlAttrs" />
26
+ * </div>
27
+ * ```
28
+ */
29
+ export interface ControlAttrs {
30
+ /** `class` and `style` — for the wrapper the caller can see. */
31
+ rootAttrs: ComputedRef<Record<string, unknown>>;
32
+ /** Everything else — for the element the browser focuses and reads out. */
33
+ controlAttrs: ComputedRef<Record<string, unknown>>;
34
+ }
35
+ export declare function useControlAttrs(): ControlAttrs;
@@ -0,0 +1,17 @@
1
+ import { Ref } from 'vue';
2
+ /**
3
+ * The width of an element, kept up to date — the measurement every layout that
4
+ * answers to its own box rather than to the window is built on.
5
+ *
6
+ * `0` means nothing has been measured yet: on the server, and until the element is
7
+ * mounted. Treat it as "assume the roomy case" rather than as zero width, the way
8
+ * `useResponsiveShell` does — the real number arrives before paint.
9
+ *
10
+ * ```ts
11
+ * const el = ref<HTMLElement | null>(null)
12
+ * const width = useElementWidth(el)
13
+ * ```
14
+ *
15
+ * Pass nothing to measure the page itself.
16
+ */
17
+ export declare function useElementWidth(target?: Ref<HTMLElement | null | undefined>): Ref<number>;
@@ -0,0 +1,49 @@
1
+ import { ComputedRef, InjectionKey } from 'vue';
2
+ export type MenuMode = 'vertical' | 'horizontal';
3
+ export type MenuSize = 'sm' | 'md';
4
+ /** What identifies an entry: whatever you would put in a route table. */
5
+ export type MenuValue = string | number;
6
+ /** What `WxMenu` hands down to everything inside it. */
7
+ export interface MenuContext {
8
+ mode: ComputedRef<MenuMode>;
9
+ size: ComputedRef<MenuSize>;
10
+ /** The icon rail: labels hidden, submenus opening as flyouts. */
11
+ collapsed: ComputedRef<boolean>;
12
+ /** The entry that is currently selected. */
13
+ active: ComputedRef<MenuValue | undefined>;
14
+ /** The submenus the active entry sits in, outermost first. */
15
+ trail: ComputedRef<MenuValue[]>;
16
+ select: (value: MenuValue, event: MouseEvent) => void;
17
+ isOpen: (value: MenuValue) => boolean;
18
+ setOpen: (value: MenuValue, open: boolean, ancestors: MenuValue[]) => void;
19
+ /**
20
+ * Bumped when every open flyout should close — an entry inside one was chosen.
21
+ * A panel cannot close on any click of its own: the branches inside it are opened
22
+ * by clicking too, and that would shut the panel before they could unfold.
23
+ */
24
+ closeSignal: ComputedRef<number>;
25
+ closeFlyouts: () => void;
26
+ /**
27
+ * An entry says where it sits so a submenu can tell it holds the active one —
28
+ * the highlight on a collapsed branch, and what `autoExpand` follows.
29
+ */
30
+ register: (value: MenuValue, ancestors: MenuValue[]) => void;
31
+ unregister: (value: MenuValue) => void;
32
+ }
33
+ /** What a `WxSubmenu` hands down to the entries it holds. */
34
+ export interface SubmenuContext {
35
+ /** The submenus above this one, outermost first, including itself. */
36
+ ancestors: MenuValue[];
37
+ /** How deep the entries below sit — what the indent is counted from. */
38
+ depth: number;
39
+ /**
40
+ * Whether these entries are already inside a flyout panel. A panel is a fresh
41
+ * surface: the depth restarts at its edge, and the branches in it open inline
42
+ * rather than throwing a second panel beside the first.
43
+ */
44
+ inFlyout: boolean;
45
+ }
46
+ export declare const menuKey: InjectionKey<MenuContext>;
47
+ export declare const submenuKey: InjectionKey<SubmenuContext>;
48
+ export declare function useMenu(): MenuContext | null;
49
+ export declare function useSubmenu(): SubmenuContext;