@kine-design/core 0.0.1-beta.2 → 0.0.1-beta.4

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 (97) hide show
  1. package/components/base/affix/index.ts +4 -2
  2. package/components/base/affix/useAffix.ts +2 -2
  3. package/components/base/anchor/index.ts +4 -2
  4. package/components/base/anchor/useAnchor.ts +2 -2
  5. package/components/base/autoComplete/useAutoComplete.ts +8 -1
  6. package/components/base/avatar/index.ts +5 -4
  7. package/components/base/backTop/index.ts +4 -2
  8. package/components/base/backTop/useBackTop.ts +1 -1
  9. package/components/base/button/button.css +1 -1
  10. package/components/base/button/index.ts +5 -4
  11. package/components/base/button/useButton.ts +3 -3
  12. package/components/base/carousel/useCarousel.ts +3 -5
  13. package/components/base/checkbox/index.ts +6 -5
  14. package/components/base/checkbox/useCheckbox.ts +1 -1
  15. package/components/base/collapse/index.ts +4 -2
  16. package/components/base/collapse/useCollapse.ts +1 -1
  17. package/components/base/dropdown/index.ts +4 -2
  18. package/components/base/dropdown/useDropdown.ts +1 -1
  19. package/components/base/input/index.ts +4 -3
  20. package/components/base/input/useInput.ts +1 -1
  21. package/components/base/inputNumber/api.ts +1 -0
  22. package/components/base/inputNumber/index.ts +4 -2
  23. package/components/base/inputNumber/props.d.ts +7 -1
  24. package/components/base/inputNumber/useInputNumber.ts +1 -1
  25. package/components/base/li/index.ts +3 -1
  26. package/components/base/list/index.ts +4 -2
  27. package/components/base/list/useList.ts +1 -1
  28. package/components/base/popover/index.ts +4 -2
  29. package/components/base/popover/usePopover.ts +8 -4
  30. package/components/base/progress/index.ts +4 -2
  31. package/components/base/progress/useProgress.ts +1 -1
  32. package/components/base/radio/index.ts +1 -1
  33. package/components/base/rate/index.ts +4 -2
  34. package/components/base/rate/useRate.ts +1 -1
  35. package/components/base/slider/index.ts +4 -2
  36. package/components/base/slider/useSlider.ts +1 -1
  37. package/components/base/switch/index.ts +5 -3
  38. package/components/base/switch/useSwitch.tsx +1 -1
  39. package/components/base/tabs/index.ts +2 -2
  40. package/components/base/tabs/useTabs.ts +1 -1
  41. package/components/base/tag/index.ts +3 -1
  42. package/components/base/tooltip/index.ts +2 -2
  43. package/components/base/tooltip/useTooltip.ts +1 -1
  44. package/components/message/drawer/index.ts +1 -1
  45. package/components/message/popover/MPopover.tsx +3 -3
  46. package/components/message/popover/index.ts +2 -2
  47. package/components/message/popover/usePopover.ts +7 -3
  48. package/components/template/menu/index.ts +0 -1
  49. package/components/template/menu/useMenu.ts +1 -1
  50. package/components/template/pagination/index.ts +2 -1
  51. package/components/template/virtualList/index.ts +0 -1
  52. package/compositions/virtualList/useContainerObserver.ts +8 -1
  53. package/dist/components/base/affix/index.d.ts +2 -1
  54. package/dist/components/base/affix/useAffix.d.ts +1 -1
  55. package/dist/components/base/anchor/index.d.ts +2 -1
  56. package/dist/components/base/anchor/useAnchor.d.ts +1 -1
  57. package/dist/components/base/avatar/index.d.ts +1 -0
  58. package/dist/components/base/backTop/index.d.ts +2 -1
  59. package/dist/components/base/backTop/useBackTop.d.ts +1 -1
  60. package/dist/components/base/button/index.d.ts +3 -30
  61. package/dist/components/base/button/useButton.d.ts +2 -8
  62. package/dist/components/base/checkbox/index.d.ts +2 -1
  63. package/dist/components/base/checkbox/useCheckbox.d.ts +1 -1
  64. package/dist/components/base/collapse/index.d.ts +2 -1
  65. package/dist/components/base/collapse/useCollapse.d.ts +1 -1
  66. package/dist/components/base/dropdown/index.d.ts +2 -1
  67. package/dist/components/base/dropdown/useDropdown.d.ts +1 -1
  68. package/dist/components/base/input/index.d.ts +2 -1
  69. package/dist/components/base/input/useInput.d.ts +1 -1
  70. package/dist/components/base/inputNumber/index.d.ts +2 -1
  71. package/dist/components/base/inputNumber/useInputNumber.d.ts +1 -1
  72. package/dist/components/base/li/index.d.ts +1 -0
  73. package/dist/components/base/list/index.d.ts +2 -1
  74. package/dist/components/base/list/useList.d.ts +1 -1
  75. package/dist/components/base/popover/index.d.ts +2 -1
  76. package/dist/components/base/popover/usePopover.d.ts +1 -1
  77. package/dist/components/base/progress/index.d.ts +2 -1
  78. package/dist/components/base/progress/useProgress.d.ts +1 -1
  79. package/dist/components/base/rate/index.d.ts +2 -1
  80. package/dist/components/base/rate/useRate.d.ts +1 -1
  81. package/dist/components/base/slider/index.d.ts +2 -1
  82. package/dist/components/base/slider/useSlider.d.ts +1 -1
  83. package/dist/components/base/switch/index.d.ts +2 -1
  84. package/dist/components/base/switch/useSwitch.d.ts +1 -1
  85. package/dist/components/base/tabs/index.d.ts +1 -1
  86. package/dist/components/base/tabs/useTabs.d.ts +1 -1
  87. package/dist/components/base/tag/index.d.ts +1 -0
  88. package/dist/components/base/tooltip/index.d.ts +1 -1
  89. package/dist/components/base/tooltip/useTooltip.d.ts +1 -1
  90. package/dist/components/message/drawer/index.d.ts +2 -2
  91. package/dist/components/message/popover/index.d.ts +1 -1
  92. package/dist/components/template/menu/index.d.ts +0 -1
  93. package/dist/components/template/menu/useMenu.d.ts +1 -1
  94. package/dist/components/template/pagination/index.d.ts +2 -1
  95. package/dist/components/template/virtualList/index.d.ts +0 -1
  96. package/dist/core.js +52 -34
  97. package/package.json +1 -1
@@ -6,8 +6,8 @@
6
6
  *
7
7
  * 江湖的业务千篇一律,复杂的代码好几百行。
8
8
  */
9
- import { props } from './api.ts';
10
- import { usePopover } from './usePopover.ts';
9
+ import { props } from './api';
10
+ import { usePopover } from './usePopover';
11
11
 
12
12
  export const MessagePopoverCore = {
13
13
  props,
@@ -11,7 +11,7 @@ import useClickAway from '../../../compositions/popper/useClickAway';
11
11
  import { Options } from '../../../compositions/common/defineCore';
12
12
  // import MPrinter from '../../other/printer/Printer';
13
13
  import { PopoverProps } from './props';
14
- import { onBeforeMount, onMounted, ref, type Ref, shallowRef } from 'vue';
14
+ import { onBeforeUnmount, onMounted, ref, type Ref, shallowRef } from 'vue';
15
15
 
16
16
 
17
17
  // const error = MPrinter('水墨Popover组件').error;
@@ -96,7 +96,10 @@ export class PopoverImpl {
96
96
  }
97
97
 
98
98
  destroy() {
99
-
99
+ this.popperInstance?.clear?.();
100
+ this.visible = false;
101
+ this.onShow = undefined;
102
+ this.onHide = undefined;
100
103
  }
101
104
  }
102
105
 
@@ -183,11 +186,12 @@ export function usePopover(
183
186
  });
184
187
  });
185
188
 
186
- onBeforeMount(() => {
189
+ onBeforeUnmount(() => {
187
190
  if (clickAwayInstance) {
188
191
  const { onBeforeDestroy } = clickAwayInstance;
189
192
  onBeforeDestroy();
190
193
  }
194
+ instance?.destroy();
191
195
  });
192
196
 
193
197
 
@@ -15,5 +15,4 @@ export const MenuCore = {
15
15
  };
16
16
 
17
17
  export { DEFAULT_MENU_CONFIG };
18
- export { useMenu } from './useMenu';
19
18
  export type { MenuProps, MenuData, MenuNodeData, MenuConfig } from './props';
@@ -50,7 +50,7 @@ function buildNodes(
50
50
  });
51
51
  }
52
52
 
53
- export function useMenu(props: MenuProps, emit?: (event: string, ...args: unknown[]) => void) {
53
+ export function useMenu(props: MenuProps, emit?: (...args: any[]) => void) {
54
54
  const config: MenuConfig = { ...DEFAULT_CONFIG, ...props.config };
55
55
  const nodeMap = new Map<string | number, MenuNodeData>();
56
56
  const nodesRef: ShallowRef<MenuNodeData[]> = shallowRef([]);
@@ -15,4 +15,5 @@ export const PaginationCore = {
15
15
  };
16
16
 
17
17
  export type { PaginationProps } from './props';
18
- export { usePagination, type Pager } from './usePagination';
18
+ export { usePagination } from './usePagination';
19
+ export type { Pager } from './usePagination';
@@ -15,4 +15,3 @@ export const VirtualListCore = {
15
15
  };
16
16
 
17
17
  export type { VirtualListProps } from './props';
18
- export { useVirtualList } from './useVirtualList';
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * 管理 IntersectionObserver 的创建、observe/unobserve,配合 ResizeObserver 处理容器尺寸变化
10
10
  */
11
- import { Ref } from 'vue';
11
+ import { onBeforeUnmount, Ref } from 'vue';
12
12
  import { useResizeObserver } from '../common/useResizeObserver';
13
13
 
14
14
  export default function useContainerObserver(options: {
@@ -78,5 +78,12 @@ export default function useContainerObserver(options: {
78
78
  }
79
79
  });
80
80
 
81
+ onBeforeUnmount(() => {
82
+ if (ob) {
83
+ ob.disconnect();
84
+ ob = undefined;
85
+ }
86
+ });
87
+
81
88
  return { reObserve };
82
89
  }
@@ -1,5 +1,6 @@
1
- import { default as useAffix } from './useAffix';
1
+ import { useAffix } from './useAffix';
2
2
  export declare const AffixCore: {
3
3
  props: import('../../types/props').MCOPO<import('./props').AffixProps>;
4
4
  useAffix: typeof useAffix;
5
5
  };
6
+ export type { AffixProps } from './props';
@@ -1,5 +1,5 @@
1
1
  import { AffixProps } from './props';
2
- export default function useAffix(props: Required<AffixProps>, emit: (event: string, ...args: unknown[]) => void): {
2
+ export declare function useAffix(props: Required<AffixProps>, emit: (...args: any[]) => void): {
3
3
  wrapperRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
4
4
  wrapRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
5
5
  affixed: import('vue').Ref<boolean, boolean>;
@@ -1,6 +1,7 @@
1
- import { default as useAnchor } from './useAnchor';
1
+ import { useAnchor } from './useAnchor';
2
2
  export declare const AnchorCore: {
3
3
  props: import('../../types/props').MCOPO<import('./props').AnchorProps>;
4
4
  anchorLinkProps: import('../../types/props').MCOPO<import('./props').AnchorLinkProps>;
5
5
  useAnchor: typeof useAnchor;
6
6
  };
7
+ export type { AnchorProps, AnchorLinkProps } from './props';
@@ -1,5 +1,5 @@
1
1
  import { AnchorProps } from './props';
2
- export default function useAnchor(props: Required<AnchorProps>, emit: (event: string, ...args: unknown[]) => void): {
2
+ export declare function useAnchor(props: Required<AnchorProps>, emit: (...args: any[]) => void): {
3
3
  currentLink: import('vue').Ref<string, string>;
4
4
  registerLink: (href: string) => void;
5
5
  unregisterLink: (href: string) => void;
@@ -1,3 +1,4 @@
1
1
  export declare const AvatarCore: {
2
2
  props: import('../../types/props').MCOPO<import('./props').AvatarProps>;
3
3
  };
4
+ export type { AvatarProps } from './props';
@@ -1,5 +1,6 @@
1
- import { default as useBackTop } from './useBackTop';
1
+ import { useBackTop } from './useBackTop';
2
2
  export declare const BackTopCore: {
3
3
  props: import('../../types/props').MCOPO<import('./props').BackTopProps>;
4
4
  useBackTop: typeof useBackTop;
5
5
  };
6
+ export type { BackTopProps } from './props';
@@ -1,5 +1,5 @@
1
1
  import { BackTopProps } from './props';
2
- export default function useBackTop(props: Required<BackTopProps>): {
2
+ export declare function useBackTop(props: Required<BackTopProps>): {
3
3
  visible: import('vue').Ref<boolean, boolean>;
4
4
  scrollToTop: () => void;
5
5
  };
@@ -1,33 +1,6 @@
1
+ import { useButton } from './useButton';
1
2
  export declare const ButtonCore: {
2
3
  props: import('../../types/props').MCOPO<import('./props').ButtonProps>;
3
- useButton: (props: import('./props').ButtonProps, ctx: {
4
- attrs: import('vue').Attrs;
5
- slots: Readonly<{
6
- [name: string]: import('vue').Slot<any> | undefined;
7
- }>;
8
- emit: (event: string, ...args: any[]) => void;
9
- expose: <Exposed extends Record<string, any> = Record<string, any>>(exposed?: Exposed) => void;
10
- }) => {
11
- domType: string;
12
- slot: string | import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
13
- [key: string]: any;
14
- }>[] | undefined;
15
- domProps: {
16
- class: (string | {
17
- 'm-button-disabled': boolean | undefined;
18
- 'm-button-loading'?: undefined;
19
- 'm-button-plain'?: undefined;
20
- } | {
21
- 'm-button-loading': boolean | undefined;
22
- 'm-button-disabled'?: undefined;
23
- 'm-button-plain'?: undefined;
24
- } | {
25
- 'm-button-plain': boolean | undefined;
26
- 'm-button-disabled'?: undefined;
27
- 'm-button-loading'?: undefined;
28
- })[];
29
- disabled: boolean | undefined;
30
- };
31
- isDisabled: boolean | undefined;
32
- };
4
+ useButton: typeof useButton;
33
5
  };
6
+ export type { ButtonProps } from './props';
@@ -1,12 +1,6 @@
1
+ import { SetupContext } from 'vue';
1
2
  import { ButtonProps } from './props';
2
- export declare const useButton: (props: ButtonProps, ctx: {
3
- attrs: import('vue').Attrs;
4
- slots: Readonly<{
5
- [name: string]: import('vue').Slot<any> | undefined;
6
- }>;
7
- emit: (event: string, ...args: any[]) => void;
8
- expose: <Exposed extends Record<string, any> = Record<string, any>>(exposed?: Exposed) => void;
9
- }) => {
3
+ export declare function useButton(props: ButtonProps, { slots }: SetupContext): {
10
4
  domType: string;
11
5
  slot: string | import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
12
6
  [key: string]: any;
@@ -1,5 +1,6 @@
1
- import { default as useCheckbox } from './useCheckbox';
1
+ import { useCheckbox } from './useCheckbox';
2
2
  export declare const CheckboxCore: {
3
3
  props: import('../../types/props').MCOPO<import('./props').CheckboxProps>;
4
4
  useCheckbox: typeof useCheckbox;
5
5
  };
6
+ export type { CheckboxProps } from './props';
@@ -1,5 +1,5 @@
1
1
  import { CheckboxProps } from './props';
2
- export default function useCheckbox<Props extends Required<CheckboxProps>>(props: Props, ctx: any): {
2
+ export declare function useCheckbox<Props extends Required<CheckboxProps>>(props: Props, ctx: any): {
3
3
  checkboxClass: (string | {
4
4
  'm-disabled': boolean;
5
5
  'm-indeterminate': boolean;
@@ -1,6 +1,7 @@
1
- import { default as useCollapse } from './useCollapse.ts';
1
+ import { useCollapse } from './useCollapse';
2
2
  export declare const CollapseCore: {
3
3
  props: import('../../types/props').MCOPO<import('./props').CollapseProps>;
4
4
  itemProps: import('../../types/props').MCOPO<import('./props').CollapseItemProps>;
5
5
  useCollapse: typeof useCollapse;
6
6
  };
7
+ export type { CollapseProps, CollapseItemProps } from './props';
@@ -1,5 +1,5 @@
1
1
  import { CollapseProps } from './props';
2
- export default function useCollapse(props: Required<CollapseProps>, ctx: any): {
2
+ export declare function useCollapse(props: Required<CollapseProps>, ctx: any): {
3
3
  activeNames: import('vue').ComputedRef<(string | number)[]>;
4
4
  isActive: (name: string | number) => boolean;
5
5
  toggle: (name: string | number, disabled: boolean) => void;
@@ -1,6 +1,7 @@
1
- import { default as useDropdown } from './useDropdown.ts';
1
+ import { useDropdown } from './useDropdown';
2
2
  export declare const DropdownCore: {
3
3
  props: import('../../types/props').MCOPO<import('./props').DropdownProps>;
4
4
  itemProps: import('../../types/props').MCOPO<import('./props').DropdownItemProps>;
5
5
  useDropdown: typeof useDropdown;
6
6
  };
7
+ export type { DropdownProps, DropdownItemProps } from './props';
@@ -1,5 +1,5 @@
1
1
  import { DropdownItemProps, DropdownProps } from './props';
2
- export default function useDropdown(props: Required<DropdownProps>, ctx: any): {
2
+ export declare function useDropdown(props: Required<DropdownProps>, ctx: any): {
3
3
  visible: import('vue').Ref<boolean, boolean>;
4
4
  triggerRef: import('vue').Ref<HTMLElement | undefined, HTMLElement | undefined>;
5
5
  menuRef: import('vue').Ref<HTMLElement | undefined, HTMLElement | undefined>;
@@ -1,5 +1,6 @@
1
- import { default as useInput } from './useInput';
1
+ import { useInput } from './useInput';
2
2
  export declare const InputCore: {
3
3
  props: import('../../types/props').MCOPO<import('./props').InputProps>;
4
4
  useInput: typeof useInput;
5
5
  };
6
+ export type { InputProps } from './props';
@@ -1,5 +1,5 @@
1
1
  import { HTMLElementEvent } from '../../types/template';
2
- export default function useInput<Props extends Record<string, any>>(props: Props, ctx: any): {
2
+ export declare function useInput<Props extends Record<string, any>>(props: Props, ctx: any): {
3
3
  baseProps: {
4
4
  autofocus: any;
5
5
  value: any;
@@ -1,5 +1,6 @@
1
- import { default as useInputNumber } from './useInputNumber.ts';
1
+ import { useInputNumber } from './useInputNumber';
2
2
  export declare const InputNumberCore: {
3
3
  props: import('../../types/props').MCOPO<import('./props').InputNumberProps>;
4
4
  useInputNumber: typeof useInputNumber;
5
5
  };
6
+ export type { InputNumberProps } from './props';
@@ -1,7 +1,7 @@
1
1
  import { InputNumberProps } from './props';
2
2
  import { HTMLElementEvent } from '../../types/template';
3
3
  export type InputNumber = string | number | null;
4
- export default function useInputNumber(props: Required<InputNumberProps>, ctx: any): {
4
+ export declare function useInputNumber(props: Required<InputNumberProps>, ctx: any): {
5
5
  currentValue: import('vue').Ref<string | number, string | number>;
6
6
  handleInputChange: (e: HTMLElementEvent<HTMLInputElement>) => void;
7
7
  handleInputBlur: () => void;
@@ -1,3 +1,4 @@
1
1
  export declare const LiCore: {
2
2
  props: import('../../types/props').MCOPO<import('./props').LiProps>;
3
3
  };
4
+ export type { LiProps } from './props';
@@ -1,5 +1,6 @@
1
- import { default as useList } from './useList';
1
+ import { useList } from './useList';
2
2
  export declare const ListCore: {
3
3
  props: import('../../types/props').MCOPO<import('./props').ListProps>;
4
4
  useList: typeof useList;
5
5
  };
6
+ export type { ListProps } from './props';
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * 江湖的业务千篇一律,复杂的代码好几百行。
8
8
  */
9
- export default function useList<T>(): {
9
+ export declare function useList<T>(): {
10
10
  baseRender: (item: unknown) => string;
11
11
  dataValidate: (data: T[] | undefined) => boolean;
12
12
  };
@@ -1,5 +1,6 @@
1
- import { default as usePopover } from './usePopover.ts';
1
+ import { usePopover } from './usePopover';
2
2
  export declare const PopoverCore: {
3
3
  props: import('../../types/props').MCOPO<import('./props').PopoverProps>;
4
4
  usePopover: typeof usePopover;
5
5
  };
6
+ export type { PopoverProps } from './props';
@@ -32,7 +32,7 @@ export declare class PopoverImpl {
32
32
  toggle(): Promise<void>;
33
33
  destroy(): void;
34
34
  }
35
- export default function usePopover(props: Required<PopoverProps>, ctx: any): {
35
+ export declare function usePopover(props: Required<PopoverProps>, ctx: any): {
36
36
  popoverEnter: () => void;
37
37
  popoverLeave: () => void;
38
38
  popoverRef: Ref<HTMLElement | undefined, HTMLElement | undefined>;
@@ -1,5 +1,6 @@
1
- import { default as useProgress } from './useProgress';
1
+ import { useProgress } from './useProgress';
2
2
  export declare const ProgressCore: {
3
3
  props: import('../../types/props').MCOPO<import('./props').ProgressProps>;
4
4
  useProgress: typeof useProgress;
5
5
  };
6
+ export type { ProgressProps, ProgressStatus } from './props';
@@ -1,4 +1,4 @@
1
1
  import { ProgressProps } from './props';
2
- export default function useProgress(props: Required<ProgressProps>): {
2
+ export declare function useProgress(props: Required<ProgressProps>): {
3
3
  percentage: import('vue').ComputedRef<string | number>;
4
4
  };
@@ -1,5 +1,6 @@
1
- import { default as useRate } from './useRate';
1
+ import { useRate } from './useRate';
2
2
  export declare const RateCore: {
3
3
  props: import('../../types/props').MCOPO<import('./props').RateProps>;
4
4
  useRate: typeof useRate;
5
5
  };
6
+ export type { RateProps } from './props';
@@ -1,5 +1,5 @@
1
1
  import { RateProps } from './props';
2
- export default function useRate(props: Required<RateProps>, emit: (event: string, ...args: unknown[]) => void): {
2
+ export declare function useRate(props: Required<RateProps>, emit: (...args: any[]) => void): {
3
3
  hoverValue: import('vue').Ref<number | null, number | null>;
4
4
  getStarState: (index: number) => "full" | "half" | "empty";
5
5
  onMouseEnter: (e: MouseEvent, index: number) => void;
@@ -1,5 +1,6 @@
1
- import { default as useSlider } from './useSlider.ts';
1
+ import { useSlider } from './useSlider';
2
2
  export declare const SliderCore: {
3
3
  props: import('../../types/props').MCOPO<import('./props').SliderProps>;
4
4
  useSlider: typeof useSlider;
5
5
  };
6
+ export type { SliderProps } from './props';
@@ -1,5 +1,5 @@
1
1
  import { SliderProps } from './props';
2
- export default function useSlider(props: Required<SliderProps>, ctx: any): {
2
+ export declare function useSlider(props: Required<SliderProps>, ctx: any): {
3
3
  btnRef: import('vue').Ref<HTMLElement | null | undefined, HTMLElement | null | undefined>;
4
4
  sliderRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
5
5
  perRef: import('vue').Ref<number, number>;
@@ -1,7 +1,8 @@
1
- import { default as useSwitch } from './useSwitch.tsx';
1
+ import { useSwitch } from './useSwitch';
2
2
  export declare const SwitchCore: {
3
3
  props: import('../../types/props').MCOPO<import('./props').SwitchProps>;
4
4
  switchIsBoolean: (value: import('./props').SwitchProps["modelValue"]) => value is boolean;
5
5
  getIsActive: (value: import('./props').SwitchProps["modelValue"], activeValue: import('./props').SwitchProps["activeValue"]) => boolean;
6
6
  useSwitch: typeof useSwitch;
7
7
  };
8
+ export type { SwitchProps } from './props';
@@ -1,7 +1,7 @@
1
1
  import { SwitchProps } from './props';
2
2
  export declare const switchIsBoolean: (value: SwitchProps["modelValue"]) => value is boolean;
3
3
  export declare const getIsActive: (value: SwitchProps["modelValue"], activeValue: SwitchProps["activeValue"]) => boolean;
4
- export default function useSwitch<Props extends Record<string, any>>(props: Props, ctx: any): {
4
+ export declare function useSwitch<Props extends Record<string, any>>(props: Props, ctx: any): {
5
5
  getInfo: (key: keyof Pick<SwitchProps, "activeInfo" | "inactiveInfo">) => any;
6
6
  changeSwitch: () => void;
7
7
  switchClass: import('vue').ComputedRef<(string | {
@@ -1,4 +1,4 @@
1
- import { default as useTabs } from './useTabs.ts';
1
+ import { useTabs } from './useTabs';
2
2
  export declare const TabsCore: {
3
3
  props: import('../../types/props').MCOPO<import('./props').TabsProps>;
4
4
  tabPaneProps: import('../../types/props').MCOPO<import('./props').TabPaneProps>;
@@ -1,4 +1,4 @@
1
- export default function useTabs<Props extends Record<string, unknown>>(props: Props, ctx: any): {
1
+ export declare function useTabs<Props extends Record<string, unknown>>(props: Props, ctx: any): {
2
2
  activeTab: import('vue').ComputedRef<string | number>;
3
3
  isActive: (name: string | number) => boolean;
4
4
  switchTab: (name: string | number, disabled?: boolean) => void;
@@ -1,3 +1,4 @@
1
1
  export declare const TagCore: {
2
2
  props: import('../../types/props').MCOPO<import('./props').TagProps>;
3
3
  };
4
+ export type { TagProps } from './props';
@@ -1,4 +1,4 @@
1
- import { default as useTooltip } from './useTooltip.ts';
1
+ import { useTooltip } from './useTooltip';
2
2
  export declare const TooltipCore: {
3
3
  props: import('../../types/props').MCOPO<import('./props').TooltipProps>;
4
4
  useTooltip: typeof useTooltip;
@@ -5,7 +5,7 @@ export type TooltipStyle = {
5
5
  top: string;
6
6
  zIndex: string;
7
7
  };
8
- export default function useTooltip(props: Required<TooltipProps>): {
8
+ export declare function useTooltip(props: Required<TooltipProps>): {
9
9
  visible: import('vue').Ref<boolean, boolean>;
10
10
  tooltipStyle: import('vue').Ref<Record<string, never> | {
11
11
  position: string;
@@ -1,4 +1,4 @@
1
1
  export declare const DrawerCore: {
2
- props: import('../../types/props').MCOPO<import('./props.d.ts').DrawerProps>;
2
+ props: import('../../types/props').MCOPO<import('./props').DrawerProps>;
3
3
  };
4
- export type { DrawerProps } from './props.d.ts';
4
+ export type { DrawerProps } from './props';
@@ -1,4 +1,4 @@
1
- import { usePopover } from './usePopover.ts';
1
+ import { usePopover } from './usePopover';
2
2
  export declare const MessagePopoverCore: {
3
3
  props: import('../../types/props').MCOPO<import('./props').PopoverProps>;
4
4
  usePopover: typeof usePopover;
@@ -5,5 +5,4 @@ export declare const MenuCore: {
5
5
  useMenu: typeof useMenu;
6
6
  };
7
7
  export { DEFAULT_MENU_CONFIG };
8
- export { useMenu } from './useMenu';
9
8
  export type { MenuProps, MenuData, MenuNodeData, MenuConfig } from './props';
@@ -1,6 +1,6 @@
1
1
  import { ShallowRef } from 'vue';
2
2
  import { MenuData, MenuNodeData, MenuConfig, MenuProps } from './props';
3
- export declare function useMenu(props: MenuProps, emit?: (event: string, ...args: unknown[]) => void): {
3
+ export declare function useMenu(props: MenuProps, emit?: (...args: any[]) => void): {
4
4
  nodesRef: ShallowRef<MenuNodeData[]>;
5
5
  nodeMap: Map<string | number, MenuNodeData>;
6
6
  initNodes: (data?: MenuData[]) => void;
@@ -4,4 +4,5 @@ export declare const PaginationCore: {
4
4
  usePagination: typeof usePagination;
5
5
  };
6
6
  export type { PaginationProps } from './props';
7
- export { usePagination, type Pager } from './usePagination';
7
+ export { usePagination } from './usePagination';
8
+ export type { Pager } from './usePagination';
@@ -4,4 +4,3 @@ export declare const VirtualListCore: {
4
4
  useVirtualList: typeof useVirtualList;
5
5
  };
6
6
  export type { VirtualListProps } from './props';
7
- export { useVirtualList } from './useVirtualList';