@kine-design/core 0.0.1-beta.1

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 (181) hide show
  1. package/dist/components/base/affix/api.d.ts +3 -0
  2. package/dist/components/base/affix/index.d.ts +5 -0
  3. package/dist/components/base/affix/useAffix.d.ts +7 -0
  4. package/dist/components/base/alert/api.d.ts +3 -0
  5. package/dist/components/base/alert/index.d.ts +4 -0
  6. package/dist/components/base/anchor/api.d.ts +4 -0
  7. package/dist/components/base/anchor/index.d.ts +6 -0
  8. package/dist/components/base/anchor/useAnchor.d.ts +7 -0
  9. package/dist/components/base/autoComplete/api.d.ts +3 -0
  10. package/dist/components/base/autoComplete/index.d.ts +6 -0
  11. package/dist/components/base/autoComplete/useAutoComplete.d.ts +13 -0
  12. package/dist/components/base/avatar/api.d.ts +3 -0
  13. package/dist/components/base/avatar/index.d.ts +3 -0
  14. package/dist/components/base/backTop/api.d.ts +3 -0
  15. package/dist/components/base/backTop/index.d.ts +5 -0
  16. package/dist/components/base/backTop/useBackTop.d.ts +5 -0
  17. package/dist/components/base/badge/api.d.ts +3 -0
  18. package/dist/components/base/badge/index.d.ts +4 -0
  19. package/dist/components/base/button/api.d.ts +3 -0
  20. package/dist/components/base/button/index.d.ts +24 -0
  21. package/dist/components/base/button/useButton.d.ts +22 -0
  22. package/dist/components/base/card/api.d.ts +3 -0
  23. package/dist/components/base/card/index.d.ts +4 -0
  24. package/dist/components/base/carousel/api.d.ts +3 -0
  25. package/dist/components/base/carousel/index.d.ts +6 -0
  26. package/dist/components/base/carousel/useCarousel.d.ts +10 -0
  27. package/dist/components/base/cascader/api.d.ts +3 -0
  28. package/dist/components/base/cascader/index.d.ts +7 -0
  29. package/dist/components/base/cascader/useCascader.d.ts +31 -0
  30. package/dist/components/base/checkbox/api.d.ts +4 -0
  31. package/dist/components/base/checkbox/index.d.ts +5 -0
  32. package/dist/components/base/checkbox/useCheckbox.d.ts +9 -0
  33. package/dist/components/base/collapse/api.d.ts +4 -0
  34. package/dist/components/base/collapse/index.d.ts +6 -0
  35. package/dist/components/base/collapse/useCollapse.d.ts +16 -0
  36. package/dist/components/base/datePicker/api.d.ts +3 -0
  37. package/dist/components/base/datePicker/index.d.ts +8 -0
  38. package/dist/components/base/datePicker/useDatePicker.d.ts +52 -0
  39. package/dist/components/base/divider/api.d.ts +3 -0
  40. package/dist/components/base/divider/index.d.ts +4 -0
  41. package/dist/components/base/dropdown/api.d.ts +4 -0
  42. package/dist/components/base/dropdown/index.d.ts +6 -0
  43. package/dist/components/base/dropdown/useDropdown.d.ts +22 -0
  44. package/dist/components/base/empty/api.d.ts +3 -0
  45. package/dist/components/base/empty/index.d.ts +4 -0
  46. package/dist/components/base/image/api.d.ts +3 -0
  47. package/dist/components/base/image/index.d.ts +7 -0
  48. package/dist/components/base/image/useImage.d.ts +19 -0
  49. package/dist/components/base/input/api.d.ts +3 -0
  50. package/dist/components/base/input/index.d.ts +5 -0
  51. package/dist/components/base/input/useInput.d.ts +22 -0
  52. package/dist/components/base/inputNumber/api.d.ts +3 -0
  53. package/dist/components/base/inputNumber/index.d.ts +5 -0
  54. package/dist/components/base/inputNumber/useInputNumber.d.ts +12 -0
  55. package/dist/components/base/li/api.d.ts +3 -0
  56. package/dist/components/base/li/index.d.ts +3 -0
  57. package/dist/components/base/list/api.d.ts +3 -0
  58. package/dist/components/base/list/index.d.ts +5 -0
  59. package/dist/components/base/list/useList.d.ts +12 -0
  60. package/dist/components/base/loading/api.d.ts +3 -0
  61. package/dist/components/base/loading/index.d.ts +4 -0
  62. package/dist/components/base/popover/api.d.ts +3 -0
  63. package/dist/components/base/popover/index.d.ts +5 -0
  64. package/dist/components/base/popover/usePopover.d.ts +45 -0
  65. package/dist/components/base/progress/api.d.ts +3 -0
  66. package/dist/components/base/progress/index.d.ts +5 -0
  67. package/dist/components/base/progress/useProgress.d.ts +4 -0
  68. package/dist/components/base/radio/api.d.ts +3 -0
  69. package/dist/components/base/radio/index.d.ts +14 -0
  70. package/dist/components/base/radio/useRadio.d.ts +10 -0
  71. package/dist/components/base/rate/api.d.ts +3 -0
  72. package/dist/components/base/rate/index.d.ts +5 -0
  73. package/dist/components/base/rate/useRate.d.ts +9 -0
  74. package/dist/components/base/result/api.d.ts +3 -0
  75. package/dist/components/base/result/index.d.ts +4 -0
  76. package/dist/components/base/select/api.d.ts +3 -0
  77. package/dist/components/base/select/index.d.ts +7 -0
  78. package/dist/components/base/select/useSelect.d.ts +31 -0
  79. package/dist/components/base/select/useSelectTools.d.ts +8 -0
  80. package/dist/components/base/skeleton/api.d.ts +3 -0
  81. package/dist/components/base/skeleton/index.d.ts +4 -0
  82. package/dist/components/base/slider/api.d.ts +3 -0
  83. package/dist/components/base/slider/index.d.ts +5 -0
  84. package/dist/components/base/slider/useSlider.d.ts +6 -0
  85. package/dist/components/base/space/api.d.ts +3 -0
  86. package/dist/components/base/space/index.d.ts +4 -0
  87. package/dist/components/base/steps/api.d.ts +10 -0
  88. package/dist/components/base/steps/index.d.ts +11 -0
  89. package/dist/components/base/steps/useSteps.d.ts +44 -0
  90. package/dist/components/base/switch/api.d.ts +3 -0
  91. package/dist/components/base/switch/index.d.ts +7 -0
  92. package/dist/components/base/switch/useSwitch.d.ts +9 -0
  93. package/dist/components/base/tabs/api.d.ts +4 -0
  94. package/dist/components/base/tabs/index.d.ts +7 -0
  95. package/dist/components/base/tabs/useTabs.d.ts +9 -0
  96. package/dist/components/base/tag/api.d.ts +3 -0
  97. package/dist/components/base/tag/index.d.ts +3 -0
  98. package/dist/components/base/timePicker/api.d.ts +3 -0
  99. package/dist/components/base/timePicker/index.d.ts +7 -0
  100. package/dist/components/base/timePicker/useTimePicker.d.ts +21 -0
  101. package/dist/components/base/timeline/api.d.ts +4 -0
  102. package/dist/components/base/timeline/index.d.ts +5 -0
  103. package/dist/components/base/tooltip/api.d.ts +3 -0
  104. package/dist/components/base/tooltip/index.d.ts +6 -0
  105. package/dist/components/base/tooltip/useTooltip.d.ts +15 -0
  106. package/dist/components/base/transfer/api.d.ts +3 -0
  107. package/dist/components/base/transfer/index.d.ts +6 -0
  108. package/dist/components/base/transfer/useTransfer.d.ts +23 -0
  109. package/dist/components/base/tree/api.d.ts +8 -0
  110. package/dist/components/base/tree/index.d.ts +15 -0
  111. package/dist/components/base/tree/tree.d.ts +46 -0
  112. package/dist/components/base/tree/useTree.d.ts +32 -0
  113. package/dist/components/message/confirm/api.d.ts +3 -0
  114. package/dist/components/message/confirm/index.d.ts +4 -0
  115. package/dist/components/message/dialog/api.d.ts +3 -0
  116. package/dist/components/message/dialog/index.d.ts +4 -0
  117. package/dist/components/message/drawer/api.d.ts +3 -0
  118. package/dist/components/message/drawer/index.d.ts +4 -0
  119. package/dist/components/message/message/api.d.ts +10 -0
  120. package/dist/components/message/message/index.d.ts +9 -0
  121. package/dist/components/message/message/useMessage.d.ts +23 -0
  122. package/dist/components/message/notification/api.d.ts +6 -0
  123. package/dist/components/message/notification/index.d.ts +8 -0
  124. package/dist/components/message/notification/useNotification.d.ts +33 -0
  125. package/dist/components/message/popover/MPopover.d.ts +2 -0
  126. package/dist/components/message/popover/api.d.ts +3 -0
  127. package/dist/components/message/popover/index.d.ts +6 -0
  128. package/dist/components/message/popover/usePopover.d.ts +56 -0
  129. package/dist/components/other/darkMode/api.d.ts +3 -0
  130. package/dist/components/other/darkMode/index.d.ts +6 -0
  131. package/dist/components/other/darkMode/useDarkMode.d.ts +11 -0
  132. package/dist/components/template/border/api.d.ts +3 -0
  133. package/dist/components/template/border/index.d.ts +4 -0
  134. package/dist/components/template/breadcrumb/api.d.ts +3 -0
  135. package/dist/components/template/breadcrumb/index.d.ts +4 -0
  136. package/dist/components/template/descriptions/api.d.ts +4 -0
  137. package/dist/components/template/descriptions/index.d.ts +5 -0
  138. package/dist/components/template/form/api.d.ts +4 -0
  139. package/dist/components/template/form/index.d.ts +9 -0
  140. package/dist/components/template/grid/api.d.ts +3 -0
  141. package/dist/components/template/grid/index.d.ts +4 -0
  142. package/dist/components/template/menu/api.d.ts +8 -0
  143. package/dist/components/template/menu/index.d.ts +9 -0
  144. package/dist/components/template/menu/useMenu.d.ts +12 -0
  145. package/dist/components/template/pagination/api.d.ts +3 -0
  146. package/dist/components/template/pagination/index.d.ts +7 -0
  147. package/dist/components/template/pagination/usePagination.d.ts +27 -0
  148. package/dist/components/template/table/api.d.ts +3 -0
  149. package/dist/components/template/table/index.d.ts +7 -0
  150. package/dist/components/template/table/useTable.d.ts +51 -0
  151. package/dist/components/template/tableColumn/api.d.ts +3 -0
  152. package/dist/components/template/tableColumn/index.d.ts +4 -0
  153. package/dist/components/template/virtualList/api.d.ts +3 -0
  154. package/dist/components/template/virtualList/index.d.ts +7 -0
  155. package/dist/components/template/virtualList/useVirtualList.d.ts +15 -0
  156. package/dist/compositions/common/defineCore.d.ts +25 -0
  157. package/dist/compositions/common/useDebounceFn.d.ts +12 -0
  158. package/dist/compositions/common/useDrag.d.ts +28 -0
  159. package/dist/compositions/common/useElementSize.d.ts +5 -0
  160. package/dist/compositions/common/useEventListener.d.ts +19 -0
  161. package/dist/compositions/common/usePopover.d.ts +9 -0
  162. package/dist/compositions/common/useResizeObserver.d.ts +4 -0
  163. package/dist/compositions/common/useTeleport.d.ts +7 -0
  164. package/dist/compositions/input/useBooleanInput.d.ts +9 -0
  165. package/dist/compositions/modal/useModal.d.ts +14 -0
  166. package/dist/compositions/popper/useClickAway.d.ts +9 -0
  167. package/dist/compositions/popper/usePopper.d.ts +19 -0
  168. package/dist/compositions/utils/filters.d.ts +41 -0
  169. package/dist/compositions/virtualList/enums.d.ts +49 -0
  170. package/dist/compositions/virtualList/useContainerObserver.d.ts +9 -0
  171. package/dist/compositions/virtualList/useEntries.d.ts +29 -0
  172. package/dist/compositions/virtualList/useHeightCache.d.ts +26 -0
  173. package/dist/compositions/virtualList/useSentinelObserver.d.ts +14 -0
  174. package/dist/core.js +4270 -0
  175. package/dist/index.d.ts +65 -0
  176. package/dist/runtime/defineHook.d.ts +3 -0
  177. package/dist/tools/empty.d.ts +18 -0
  178. package/dist/tools/index.d.ts +10 -0
  179. package/dist/tools/types.d.ts +9 -0
  180. package/dist/vite.config.build.d.ts +2 -0
  181. package/package.json +32 -0
@@ -0,0 +1,3 @@
1
+ import { MCOPO } from '../../types/props';
2
+ import { AffixProps } from './props';
3
+ export declare const props: MCOPO<AffixProps>;
@@ -0,0 +1,5 @@
1
+ import { default as useAffix } from './useAffix';
2
+ export declare const AffixCore: {
3
+ props: import('../../types/props').MCOPO<import('./props').AffixProps>;
4
+ useAffix: typeof useAffix;
5
+ };
@@ -0,0 +1,7 @@
1
+ import { AffixProps } from './props';
2
+ export default function useAffix(props: Required<AffixProps>, emit: (event: string, ...args: unknown[]) => void): {
3
+ wrapRef: any;
4
+ affixed: any;
5
+ affixStyle: any;
6
+ placeholderHeight: any;
7
+ };
@@ -0,0 +1,3 @@
1
+ import { MCOPO } from '../../types/props';
2
+ import { AlertProps } from './props';
3
+ export declare const props: MCOPO<AlertProps>;
@@ -0,0 +1,4 @@
1
+ export declare const AlertCore: {
2
+ props: import('../../types/props').MCOPO<import('./props').AlertProps>;
3
+ };
4
+ export type { AlertProps, AlertEvents } from './props';
@@ -0,0 +1,4 @@
1
+ import { MCOPO } from '../../types/props';
2
+ import { AnchorProps, AnchorLinkProps } from './props';
3
+ export declare const props: MCOPO<AnchorProps>;
4
+ export declare const anchorLinkProps: MCOPO<AnchorLinkProps>;
@@ -0,0 +1,6 @@
1
+ import { default as useAnchor } from './useAnchor';
2
+ export declare const AnchorCore: {
3
+ props: import('../../types/props').MCOPO<import('./props').AnchorProps>;
4
+ anchorLinkProps: import('../../types/props').MCOPO<import('./props').AnchorLinkProps>;
5
+ useAnchor: typeof useAnchor;
6
+ };
@@ -0,0 +1,7 @@
1
+ import { AnchorProps } from './props';
2
+ export default function useAnchor(props: Required<AnchorProps>, emit: (event: string, ...args: unknown[]) => void): {
3
+ currentLink: any;
4
+ registerLink: (href: string) => void;
5
+ unregisterLink: (href: string) => void;
6
+ handleClick: (href: string) => void;
7
+ };
@@ -0,0 +1,3 @@
1
+ import { MCOPO } from '../../types/props';
2
+ import { AutoCompleteProps } from './props';
3
+ export declare const props: MCOPO<AutoCompleteProps>;
@@ -0,0 +1,6 @@
1
+ import { useAutoComplete } from './useAutoComplete';
2
+ export declare const AutoCompleteCore: {
3
+ props: import('../../types/props').MCOPO<import('./props').AutoCompleteProps>;
4
+ useAutoComplete: typeof useAutoComplete;
5
+ };
6
+ export type { AutoCompleteProps, AutoCompleteOption } from './props';
@@ -0,0 +1,13 @@
1
+ import { AutoCompleteProps, AutoCompleteOption } from './props';
2
+ export declare function useAutoComplete(props: AutoCompleteProps, ctx: any): {
3
+ inputValue: any;
4
+ isOpen: any;
5
+ loading: any;
6
+ suggestions: any;
7
+ onInput: (e: Event) => void;
8
+ onFocus: (e: FocusEvent) => void;
9
+ onBlur: (e: FocusEvent) => void;
10
+ onSelect: (item: AutoCompleteOption) => void;
11
+ onClear: () => void;
12
+ close: () => void;
13
+ };
@@ -0,0 +1,3 @@
1
+ import { MCOPO } from '../../types/props';
2
+ import { AvatarProps } from './props';
3
+ export declare const props: MCOPO<AvatarProps>;
@@ -0,0 +1,3 @@
1
+ export declare const AvatarCore: {
2
+ props: import('../../types/props').MCOPO<import('./props').AvatarProps>;
3
+ };
@@ -0,0 +1,3 @@
1
+ import { MCOPO } from '../../types/props';
2
+ import { BackTopProps } from './props';
3
+ export declare const props: MCOPO<BackTopProps>;
@@ -0,0 +1,5 @@
1
+ import { default as useBackTop } from './useBackTop';
2
+ export declare const BackTopCore: {
3
+ props: import('../../types/props').MCOPO<import('./props').BackTopProps>;
4
+ useBackTop: typeof useBackTop;
5
+ };
@@ -0,0 +1,5 @@
1
+ import { BackTopProps } from './props';
2
+ export default function useBackTop(props: Required<BackTopProps>): {
3
+ visible: any;
4
+ scrollToTop: () => void;
5
+ };
@@ -0,0 +1,3 @@
1
+ import { MCOPO } from '../../types/props';
2
+ import { BadgeProps } from './props';
3
+ export declare const props: MCOPO<BadgeProps>;
@@ -0,0 +1,4 @@
1
+ export declare const BadgeCore: {
2
+ props: import('../../types/props').MCOPO<import('./props').BadgeProps>;
3
+ };
4
+ export type { BadgeProps } from './props';
@@ -0,0 +1,3 @@
1
+ import { MCOPO } from '../../types/props';
2
+ import { ButtonProps } from './props';
3
+ export declare const props: MCOPO<ButtonProps>;
@@ -0,0 +1,24 @@
1
+ export declare const ButtonCore: {
2
+ props: import('../../types/props').MCOPO<import('./props').ButtonProps>;
3
+ useButton: (props: import('./props').ButtonProps, ctx: SetupContext<E, S>) => {
4
+ domType: string;
5
+ slot: any;
6
+ domProps: {
7
+ class: (string | {
8
+ 'm-button-disabled': boolean | undefined;
9
+ 'm-button-loading'?: undefined;
10
+ 'm-button-plain'?: undefined;
11
+ } | {
12
+ 'm-button-loading': boolean | undefined;
13
+ 'm-button-disabled'?: undefined;
14
+ 'm-button-plain'?: undefined;
15
+ } | {
16
+ 'm-button-plain': boolean | undefined;
17
+ 'm-button-disabled'?: undefined;
18
+ 'm-button-loading'?: undefined;
19
+ })[];
20
+ disabled: boolean | undefined;
21
+ };
22
+ isDisabled: boolean | undefined;
23
+ };
24
+ };
@@ -0,0 +1,22 @@
1
+ import { ButtonProps } from './props';
2
+ export declare const useButton: (props: ButtonProps, ctx: SetupContext<E, S>) => {
3
+ domType: string;
4
+ slot: any;
5
+ domProps: {
6
+ class: (string | {
7
+ 'm-button-disabled': boolean | undefined;
8
+ 'm-button-loading'?: undefined;
9
+ 'm-button-plain'?: undefined;
10
+ } | {
11
+ 'm-button-loading': boolean | undefined;
12
+ 'm-button-disabled'?: undefined;
13
+ 'm-button-plain'?: undefined;
14
+ } | {
15
+ 'm-button-plain': boolean | undefined;
16
+ 'm-button-disabled'?: undefined;
17
+ 'm-button-loading'?: undefined;
18
+ })[];
19
+ disabled: boolean | undefined;
20
+ };
21
+ isDisabled: boolean | undefined;
22
+ };
@@ -0,0 +1,3 @@
1
+ import { MCOPO } from '../../types/props';
2
+ import { CardProps } from './props';
3
+ export declare const props: MCOPO<CardProps>;
@@ -0,0 +1,4 @@
1
+ export declare const CardCore: {
2
+ props: import('../../types/props').MCOPO<import('./props').CardProps>;
3
+ };
4
+ export type { CardProps } from './props';
@@ -0,0 +1,3 @@
1
+ import { MCOPO } from '../../types/props';
2
+ import { CarouselProps } from './props';
3
+ export declare const props: MCOPO<CarouselProps>;
@@ -0,0 +1,6 @@
1
+ import { useCarousel } from './useCarousel';
2
+ export declare const CarouselCore: {
3
+ props: import('../../types/props').MCOPO<import('./props').CarouselProps>;
4
+ useCarousel: typeof useCarousel;
5
+ };
6
+ export type { CarouselProps, CarouselEvents } from './props';
@@ -0,0 +1,10 @@
1
+ import { CarouselProps } from './props';
2
+ export declare function useCarousel(props: Required<CarouselProps>, emit: (event: 'change', index: number) => void, count: () => number): {
3
+ activeIndex: any;
4
+ prev: () => void;
5
+ next: () => void;
6
+ setActive: (index: number) => void;
7
+ startAutoplay: () => void;
8
+ stopAutoplay: () => void;
9
+ arrowsClass: any;
10
+ };
@@ -0,0 +1,3 @@
1
+ import { MCOPO } from '../../types/props';
2
+ import { CascaderProps } from './props';
3
+ export declare const props: MCOPO<CascaderProps>;
@@ -0,0 +1,7 @@
1
+ import { useCascader } from './useCascader';
2
+ export declare const CascaderCore: {
3
+ props: import('../../types/props').MCOPO<import('./props').CascaderProps>;
4
+ useCascader: typeof useCascader;
5
+ };
6
+ export type { CascaderProps, CascaderOption } from './props';
7
+ export type { FlatCascaderOption } from './useCascader';
@@ -0,0 +1,31 @@
1
+ import { CascaderOption, CascaderProps } from './props';
2
+ /** 扁平化后的叶子路径,用于搜索 */
3
+ export interface FlatCascaderOption {
4
+ /** 从根到当前节点的完整路径节点列表 */
5
+ path: CascaderOption[];
6
+ /** 路径标签拼接(用于搜索匹配) */
7
+ pathLabel: string;
8
+ }
9
+ export declare function useCascader(props: CascaderProps, ctx: any): {
10
+ isOpen: any;
11
+ searchQuery: any;
12
+ activePath: any;
13
+ columns: any;
14
+ filteredOptions: any;
15
+ isSearching: any;
16
+ selectedPath: any;
17
+ selectedPaths: any;
18
+ displayLabel: any;
19
+ selectedTags: any;
20
+ open: () => void;
21
+ close: () => void;
22
+ onTriggerClick: () => void;
23
+ onOptionEnter: (option: CascaderOption, colIndex: number) => void;
24
+ onOptionClick: (option: CascaderOption, colIndex: number) => void;
25
+ onFlatOptionClick: (item: FlatCascaderOption) => void;
26
+ onDeleteTag: (tagIndex: number) => void;
27
+ onClear: (e: MouseEvent) => void;
28
+ isActiveOption: (option: CascaderOption, colIndex: number) => boolean;
29
+ isSelectedOption: (option: CascaderOption, colIndex: number) => any;
30
+ isFlatOptionSelected: (item: FlatCascaderOption) => boolean;
31
+ };
@@ -0,0 +1,4 @@
1
+ import { MCOPO } from '../../types/props';
2
+ import { CheckboxGroupProps, CheckboxProps } from './props';
3
+ export declare const props: MCOPO<CheckboxProps>;
4
+ export declare const checkboxGroupProps: MCOPO<CheckboxGroupProps>;
@@ -0,0 +1,5 @@
1
+ import { default as useCheckbox } from './useCheckbox';
2
+ export declare const CheckboxCore: {
3
+ props: import('../../types/props').MCOPO<import('./props').CheckboxProps>;
4
+ useCheckbox: typeof useCheckbox;
5
+ };
@@ -0,0 +1,9 @@
1
+ import { EmitsOptions, SlotsType } from '@vue/runtime-core';
2
+ import { CheckboxProps } from './props';
3
+ export default function useCheckbox<Props extends Required<CheckboxProps>, E extends EmitsOptions = {}, EE extends string = string, S extends SlotsType = {}>(props: Props, ctx: any): {
4
+ checkboxClass: (string | {
5
+ 'm-disabled': boolean;
6
+ })[];
7
+ checked: any;
8
+ onClick: (e: MouseEvent) => void;
9
+ };
@@ -0,0 +1,4 @@
1
+ import { MCOPO } from '../../types/props';
2
+ import { CollapseItemProps, CollapseProps } from './props';
3
+ export declare const props: MCOPO<CollapseProps>;
4
+ export declare const itemProps: MCOPO<CollapseItemProps>;
@@ -0,0 +1,6 @@
1
+ import { default as useCollapse } from './useCollapse.ts';
2
+ export declare const CollapseCore: {
3
+ props: import('../../types/props').MCOPO<import('./props').CollapseProps>;
4
+ itemProps: import('../../types/props').MCOPO<import('./props').CollapseItemProps>;
5
+ useCollapse: typeof useCollapse;
6
+ };
@@ -0,0 +1,16 @@
1
+ import { CollapseProps } from './props';
2
+ export default function useCollapse(props: Required<CollapseProps>, ctx: any): {
3
+ activeNames: any;
4
+ isActive: (name: string | number) => boolean;
5
+ toggle: (name: string | number, disabled: boolean) => void;
6
+ collapseClass: any;
7
+ getItemClass: (name: string | number, disabled: boolean) => (string | {
8
+ 'm-collapse-item-active': boolean;
9
+ 'm-collapse-item-disabled'?: undefined;
10
+ } | {
11
+ 'm-collapse-item-disabled': boolean;
12
+ 'm-collapse-item-active'?: undefined;
13
+ })[];
14
+ headerClass: string[];
15
+ contentClass: string[];
16
+ };
@@ -0,0 +1,3 @@
1
+ import { MCOPO } from '../../types/props';
2
+ import { DatePickerProps } from './props';
3
+ export declare const props: MCOPO<DatePickerProps>;
@@ -0,0 +1,8 @@
1
+ import { useDatePicker } from './useDatePicker';
2
+ export declare const DatePickerCore: {
3
+ props: import('../../types/props').MCOPO<import('./props').DatePickerProps>;
4
+ useDatePicker: typeof useDatePicker;
5
+ };
6
+ export type { DatePickerProps, CalendarType, DateRefType, CalendarItem } from './props';
7
+ export { useDatePicker, toDayjs, BASE_WEEK_NAME, BASE_MONTH_NAME, generateTimeColumn } from './useDatePicker';
8
+ export type { TimeRefType } from './useDatePicker';
@@ -0,0 +1,52 @@
1
+ import { default as dayjs } from 'dayjs';
2
+ import { Ref } from 'vue';
3
+ import { DatePickerProps, DateRefType, CalendarItem } from './props';
4
+ /** 时间部分的内部状态 */
5
+ export type TimeRefType = {
6
+ hours: number;
7
+ minutes: number;
8
+ seconds: number;
9
+ };
10
+ /** 基础星期头(汉字显示) */
11
+ export declare const BASE_WEEK_NAME: Array<{
12
+ day: string;
13
+ isCurrentMonth: boolean;
14
+ }>;
15
+ /** 月份名称 */
16
+ export declare const BASE_MONTH_NAME: string[];
17
+ /**
18
+ * 将 string | Date 转换为 dayjs 对象。
19
+ * headless 组件需要用此函数更新 currentRef。
20
+ */
21
+ export declare const toDayjs: (value: string | Date | undefined) => dayjs.Dayjs;
22
+ /**
23
+ * 生成 0..max-1(step 步进)的数字数组,用于时间列渲染。
24
+ * @param max 最大值(不含),如 24、60
25
+ * @param step 步长
26
+ */
27
+ export declare const generateTimeColumn: (max: number, step: number) => number[];
28
+ export declare function useDatePicker(props: DatePickerProps): {
29
+ dateRef: any;
30
+ displayValue: any;
31
+ spanClass: any;
32
+ currentRef: any;
33
+ calendarTypeRef: any;
34
+ yearsRef: any;
35
+ timeRef: any;
36
+ updateDateRef: (value: string | Date | undefined) => void;
37
+ getCalendar: (MDateRefValue: Ref<DateRefType>) => CalendarItem[][];
38
+ toPrevMonth: () => void;
39
+ toNextMonth: () => void;
40
+ toPrevYear: () => void;
41
+ toNextYear: () => void;
42
+ getValue: (item: CalendarItem) => string;
43
+ getDateTimeValue: () => string;
44
+ clickCurrentYear: (year: number) => void;
45
+ clickYearItem: (year: number) => void;
46
+ clickCurrentMonth: (_month: number) => void;
47
+ clickMonthItem: (month: number) => void;
48
+ selectHour: (hour: number) => void;
49
+ selectMinute: (minute: number) => void;
50
+ selectSecond: (second: number) => void;
51
+ toDayjs: (value: string | Date | undefined) => dayjs.Dayjs;
52
+ };
@@ -0,0 +1,3 @@
1
+ import { MCOPO } from '../../types/props';
2
+ import { DividerProps } from './props';
3
+ export declare const props: MCOPO<DividerProps>;
@@ -0,0 +1,4 @@
1
+ export declare const DividerCore: {
2
+ props: import('../../types/props').MCOPO<import('./props').DividerProps>;
3
+ };
4
+ export type { DividerProps } from './props';
@@ -0,0 +1,4 @@
1
+ import { MCOPO } from '../../types/props';
2
+ import { DropdownItemProps, DropdownProps } from './props';
3
+ export declare const props: MCOPO<DropdownProps>;
4
+ export declare const itemProps: MCOPO<DropdownItemProps>;
@@ -0,0 +1,6 @@
1
+ import { default as useDropdown } from './useDropdown.ts';
2
+ export declare const DropdownCore: {
3
+ props: import('../../types/props').MCOPO<import('./props').DropdownProps>;
4
+ itemProps: import('../../types/props').MCOPO<import('./props').DropdownItemProps>;
5
+ useDropdown: typeof useDropdown;
6
+ };
@@ -0,0 +1,22 @@
1
+ import { DropdownItemProps, DropdownProps } from './props';
2
+ export default function useDropdown(props: Required<DropdownProps>, ctx: any): {
3
+ visible: any;
4
+ triggerRef: any;
5
+ menuRef: any;
6
+ open: () => void;
7
+ close: () => void;
8
+ toggle: () => void;
9
+ handleTriggerClick: () => void;
10
+ handleMouseenter: () => void;
11
+ handleMouseleave: () => void;
12
+ handleItemClick: (item: DropdownItemProps) => void;
13
+ dropdownClass: any;
14
+ menuClass: any;
15
+ getItemClass: (item: DropdownItemProps) => (string | {
16
+ 'm-dropdown-item-disabled': boolean | undefined;
17
+ 'm-dropdown-item-divided'?: undefined;
18
+ } | {
19
+ 'm-dropdown-item-divided': boolean | undefined;
20
+ 'm-dropdown-item-disabled'?: undefined;
21
+ })[];
22
+ };
@@ -0,0 +1,3 @@
1
+ import { MCOPO } from '../../types/props';
2
+ import { EmptyProps } from './props';
3
+ export declare const props: MCOPO<EmptyProps>;
@@ -0,0 +1,4 @@
1
+ export declare const EmptyCore: {
2
+ props: import('../../types/props').MCOPO<import('./props').EmptyProps>;
3
+ };
4
+ export type { EmptyProps } from './props';
@@ -0,0 +1,3 @@
1
+ import { MCOPO } from '../../types/props';
2
+ import { ImageProps } from './props';
3
+ export declare const props: MCOPO<ImageProps>;
@@ -0,0 +1,7 @@
1
+ import { useImage } from './useImage';
2
+ export declare const ImageCore: {
3
+ props: import('../../types/props').MCOPO<import('./props').ImageProps>;
4
+ useImage: typeof useImage;
5
+ };
6
+ export type { ImageProps, ImageEvents } from './props';
7
+ export type { ImageLoadStatus } from './useImage';
@@ -0,0 +1,19 @@
1
+ import { ImageProps } from './props';
2
+ /** 图片加载状态 */
3
+ export type ImageLoadStatus = 'loading' | 'loaded' | 'error';
4
+ export declare function useImage(props: Required<ImageProps>, emit: (event: 'load' | 'error' | 'switch', payload: Event | number) => void): {
5
+ status: any;
6
+ previewVisible: any;
7
+ previewIndex: any;
8
+ previewScale: any;
9
+ previewRotate: any;
10
+ handleLoad: (e: Event) => void;
11
+ handleError: (e: Event) => void;
12
+ openPreview: () => void;
13
+ closePreview: () => void;
14
+ previewPrev: () => void;
15
+ previewNext: () => void;
16
+ zoomIn: () => void;
17
+ zoomOut: () => void;
18
+ rotate: () => void;
19
+ };
@@ -0,0 +1,3 @@
1
+ import { MCOPO } from '../../types/props';
2
+ import { InputProps } from './props';
3
+ export declare const props: MCOPO<InputProps>;
@@ -0,0 +1,5 @@
1
+ import { default as useInput } from './useInput';
2
+ export declare const InputCore: {
3
+ props: import('../../types/props').MCOPO<import('./props').InputProps>;
4
+ useInput: typeof useInput;
5
+ };
@@ -0,0 +1,22 @@
1
+ import { HTMLElementEvent } from '../../types/template';
2
+ import { EmitsOptions, SlotsType } from '@vue/runtime-core';
3
+ export default function useInput<Props extends Record<string, any>, E extends EmitsOptions = {}, EE extends string = string, S extends SlotsType = {}>(props: Props, ctx: any): {
4
+ baseProps: {
5
+ autofocus: any;
6
+ value: any;
7
+ placeholder: any;
8
+ disabled: any;
9
+ type: any;
10
+ readOnly: any;
11
+ };
12
+ inputType: string;
13
+ inputClass: string;
14
+ rowInfo: {
15
+ rows?: undefined;
16
+ } | {
17
+ rows: number;
18
+ };
19
+ onInput: (e: HTMLElementEvent<HTMLInputElement>) => void;
20
+ onFocus: (e: FocusEvent) => void;
21
+ onBlur: (e: FocusEvent) => void;
22
+ };
@@ -0,0 +1,3 @@
1
+ import { MCOPO } from '../../types/props';
2
+ import { InputNumberProps } from './props';
3
+ export declare const props: MCOPO<InputNumberProps>;
@@ -0,0 +1,5 @@
1
+ import { default as useInputNumber } from './useInputNumber.ts';
2
+ export declare const InputNumberCore: {
3
+ props: import('../../types/props').MCOPO<import('./props').InputNumberProps>;
4
+ useInputNumber: typeof useInputNumber;
5
+ };
@@ -0,0 +1,12 @@
1
+ import { InputNumberProps } from './props';
2
+ import { HTMLElementEvent } from '../../types/template';
3
+ export type InputNumber = string | number;
4
+ export default function useInputNumber(props: Required<InputNumberProps>, ctx: any): {
5
+ currentValue: any;
6
+ handleInputChange: (e: HTMLElementEvent<HTMLInputElement>) => void;
7
+ handleInputBlur: () => void;
8
+ handleKeydown: (e: KeyboardEvent) => void;
9
+ increment: () => void;
10
+ decrement: () => void;
11
+ validate: (value: InputNumber, e?: HTMLElementEvent<HTMLInputElement>) => void;
12
+ };
@@ -0,0 +1,3 @@
1
+ import { MCOPO } from '../../types/props';
2
+ import { LiProps } from './props';
3
+ export declare const props: MCOPO<LiProps>;
@@ -0,0 +1,3 @@
1
+ export declare const LiCore: {
2
+ props: import('../../types/props').MCOPO<import('./props').LiProps>;
3
+ };
@@ -0,0 +1,3 @@
1
+ import { MCOPO } from '../../types/props';
2
+ import { ListProps } from './props';
3
+ export declare const props: MCOPO<ListProps>;
@@ -0,0 +1,5 @@
1
+ import { default as useList } from './useList';
2
+ export declare const ListCore: {
3
+ props: import('../../types/props').MCOPO<import('./props').ListProps>;
4
+ useList: typeof useList;
5
+ };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @description list hook
3
+ * @author 阿怪
4
+ * @date 2025/02/25 00:00
5
+ * @version v1.0.0
6
+ *
7
+ * 江湖的业务千篇一律,复杂的代码好几百行。
8
+ */
9
+ export default function useList<T>(): {
10
+ baseRender: (item: unknown) => string;
11
+ dataValidate: (data: T[] | undefined) => boolean;
12
+ };
@@ -0,0 +1,3 @@
1
+ import { MCOPO } from '../../types/props';
2
+ import { LoadingProps } from './props';
3
+ export declare const props: MCOPO<LoadingProps>;
@@ -0,0 +1,4 @@
1
+ export declare const LoadingCore: {
2
+ props: import('../../types/props').MCOPO<import('./props').LoadingProps>;
3
+ };
4
+ export type { LoadingProps } from './props';
@@ -0,0 +1,3 @@
1
+ import { PopoverProps } from './props';
2
+ import { MCOPO } from '../../types/props';
3
+ export declare const props: MCOPO<PopoverProps>;
@@ -0,0 +1,5 @@
1
+ import { default as usePopover } from './usePopover.ts';
2
+ export declare const PopoverCore: {
3
+ props: import('../../types/props').MCOPO<import('./props').PopoverProps>;
4
+ usePopover: typeof usePopover;
5
+ };