x-next 0.0.0-alpha.1 → 0.0.0-alpha.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. package/README.md +24 -2
  2. package/package.json +50 -63
  3. package/x-next/_hooks/use-overflow.d.ts +5 -0
  4. package/x-next/_hooks/use-popup-manager.d.ts +11 -0
  5. package/x-next/_props/css.d.ts +13 -0
  6. package/x-next/_props/global.d.ts +1 -0
  7. package/x-next/_utils/config.d.ts +9 -0
  8. package/x-next/_utils/convert-case.d.ts +3 -0
  9. package/x-next/_utils/dom.d.ts +10 -0
  10. package/x-next/_utils/helpers.d.ts +12 -0
  11. package/x-next/_utils/icon.d.ts +59 -0
  12. package/{framework/es/util.d.ts → x-next/_utils/is.d.ts} +22 -36
  13. package/x-next/_utils/keyboard.d.ts +24 -0
  14. package/x-next/_utils/number.d.ts +0 -0
  15. package/x-next/_utils/vue-eco.d.ts +28 -0
  16. package/x-next/componets/button/index.vue.d.ts +162 -0
  17. package/x-next/componets/button/props.d.ts +45 -0
  18. package/x-next/componets/dialog/index.vue.d.ts +221 -0
  19. package/x-next/componets/dialog/props.d.ts +83 -0
  20. package/x-next/componets/dialog/use-props.d.ts +33 -0
  21. package/x-next/componets/dialog/use.d.ts +3 -0
  22. package/x-next/componets/dialog/warp.d.ts +2 -0
  23. package/x-next/componets/message/index.vue.d.ts +387 -0
  24. package/x-next/componets/message/props.d.ts +31 -0
  25. package/x-next/componets/message/warp.d.ts +3 -0
  26. package/x-next/componets/message-box/index.d.ts +3 -0
  27. package/x-next/componets/message-box/props.d.ts +52 -0
  28. package/x-next/componets/message-box/warp.d.ts +2 -0
  29. package/x-next/componets/notification/index.vue.d.ts +160 -0
  30. package/x-next/componets/notification/props.d.ts +54 -0
  31. package/x-next/componets/notification/warp.d.ts +3 -0
  32. package/x-next/componets/space/index.d.ts +42 -0
  33. package/x-next/componets/tag-cloud/index.d.ts +0 -0
  34. package/x-next/componets/trend-chart/components/trend-chart-curve.d.ts +114 -0
  35. package/x-next/componets/trend-chart/components/trend-chart-grid.d.ts +55 -0
  36. package/x-next/componets/trend-chart/components/trend-chart-labels.d.ts +22 -0
  37. package/x-next/componets/trend-chart/components/trend-chart.d.ts +270 -0
  38. package/x-next/componets/trend-chart/helpers/genPath.d.ts +8 -0
  39. package/x-next/componets/trend-chart/helpers/genPoints.d.ts +3 -0
  40. package/x-next/componets/trend-chart/helpers/getPadding.d.ts +7 -0
  41. package/x-next/componets/trend-chart/helpers/validatePadding.d.ts +2 -0
  42. package/x-next/componets/trend-chart/index.d.ts +2 -0
  43. package/x-next/componets/trend-chart/props.d.ts +206 -0
  44. package/x-next/icons/animation/animation-loading.vue.d.ts +55 -0
  45. package/x-next/icons/default/check-circle-fill.vue.d.ts +55 -0
  46. package/x-next/icons/default/close-circle-fill.vue.d.ts +55 -0
  47. package/x-next/icons/default/exclamation-circle-fill.vue.d.ts +55 -0
  48. package/x-next/icons/default/info-circle-fill.vue.d.ts +55 -0
  49. package/x-next/icons/default/minus-circle-fill.vue.d.ts +55 -0
  50. package/x-next/icons/index.d.ts +7 -0
  51. package/x-next/style.css +1 -0
  52. package/x-next/ui.d.ts +5 -0
  53. package/x-next/ui.js +1357 -0
  54. package/x-next/ui.umd.cjs +1 -0
  55. package/LICENSE +0 -21
  56. package/framework/es/client.io.js +0 -2
  57. package/framework/es/client.io.js.map +0 -1
  58. package/framework/es/exception.d.ts +0 -25
  59. package/framework/es/index.d.ts +0 -2
  60. package/framework/es/types.d.ts +0 -33
  61. package/framework/es/websocket.d.ts +0 -118
  62. package/framework/umd/client.io.js +0 -2
  63. package/framework/umd/client.io.js.map +0 -1
  64. package/framework/umd/exception.d.ts +0 -25
  65. package/framework/umd/index.d.ts +0 -2
  66. package/framework/umd/types.d.ts +0 -33
  67. package/framework/umd/util.d.ts +0 -36
  68. package/framework/umd/websocket.d.ts +0 -118
  69. package/index.d.ts +0 -159
package/README.md CHANGED
@@ -1,4 +1,26 @@
1
- # x-next
2
- xiaocaiyun.com 前端组件库。
1
+ # 简介
3
2
 
3
+ X-Next是Ringing Tech的基础UI库。
4
4
 
5
+ # 安装
6
+
7
+ ### 运行
8
+
9
+ ```
10
+ pnpm i x-next
11
+ ```
12
+
13
+ ### 引入
14
+
15
+ ```
16
+ // main.ts
17
+ import { createApp } from 'vue'
18
+ import XNext from 'x-next'
19
+ import "x-next/packages/style.css"; //引入组件样式
20
+ import App from './App.vue'
21
+
22
+ const app = createApp(App)
23
+
24
+ app.use(XNext)
25
+ app.mount('#app')
26
+ ```
package/package.json CHANGED
@@ -1,65 +1,52 @@
1
1
  {
2
- "name": "x-next",
3
- "version": "0.0.0-alpha.1",
4
- "description": "X-Component.",
5
- "main": "framework/umd/client.io.js",
6
- "module": "framework/es/client.io.js",
7
- "typings": "framework/es/index.d.ts",
8
- "repository": {
9
- "type": "git",
10
- "url": "https://github.com/ztes/client.io.git"
11
- },
12
- "bugs": {
13
- "url": "https://github.com/ztes/client.io/issues"
14
- },
15
- "author": "ztes.com <xy@ztes.com>",
16
- "blog": "https://ztes.com",
17
- "keywords": [
18
- "realtime",
19
- "websocket",
20
- "io",
21
- "sse"
22
- ],
23
- "license": "MIT",
24
- "scripts": {
25
- "build:pkg": "rollup --config rollup.config.js",
26
- "create": "tsc",
27
- "dev": "set NODE_ENV=developemnt&& rollup -c rollup.config.js -w",
28
- "build": "rollup -c rollup.config.js",
29
- "eslint:fix": "./node_modules/.bin/eslint --fix ./",
30
- "publish": "npm publish --access=public"
31
- },
32
- "devDependencies": {
33
- "@babel/core": "^7.18.10",
34
- "@babel/preset-env": "^7.18.10",
35
- "@rollup/plugin-babel": "^6.0.4",
36
- "@rollup/plugin-json": "^6.0.0",
37
- "@rollup/plugin-typescript": "^11.1.6",
38
- "@types/node": "^18.7.6",
39
- "@types/qs": "^6.9.7",
40
- "@types/webpack-env": "^1.17.0",
41
- "@typescript-eslint/eslint-plugin": "^5.59.2",
42
- "@typescript-eslint/parser": "^5.0.0",
43
- "core-js": "3",
44
- "eslint": "^8.17.0",
45
- "eslint-config-prettier": "^8.5.0",
46
- "eslint-define-config": "^1.5.0",
47
- "eslint-plugin-prettier": "^4.0.0",
48
- "prettier": "^2.8.8",
49
- "rollup": "^2.79.1",
50
- "rollup-plugin-commonjs": "^10.1.0",
51
- "rollup-plugin-dts": "^4.2.2",
52
- "rollup-plugin-eslint": "^7.0.0",
53
- "rollup-plugin-node-resolve": "^5.2.0",
54
- "rollup-plugin-typescript": "^1.0.1",
55
- "rollup-plugin-typescript2": "^0.31.1",
56
- "rollup-plugin-uglify": "^6.0.4",
57
- "tslib": "^2.6.3",
58
- "typescript": "^4.4.4"
59
- },
60
- "files": [
61
- "/framework",
62
- "README.md",
63
- "index.d.ts"
64
- ]
2
+ "name": "x-next",
3
+ "private": false,
4
+ "version": "0.0.0-alpha.3",
5
+ "description": "An amazing Vue3 UI library.",
6
+ "type": "module",
7
+ "main": "x-next/ui.umd.js",
8
+ "module": "x-next/ui.js",
9
+ "types": "x-next/types/ui.d.ts",
10
+ "scripts": {
11
+ "dev": "vite",
12
+ "build": "vue-tsc && vite build",
13
+ "preview": "vite preview",
14
+ "publish": "npm publish --access=public"
15
+ },
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git+https://github.com/ztes/x-next.git"
19
+ },
20
+ "bugs": {
21
+ "url": "https://github.com/ztes/x-next/issues"
22
+ },
23
+ "dependencies": {
24
+ "dayjs": "^1.11.11",
25
+ "vue": "^3.5.12"
26
+ },
27
+ "devDependencies": {
28
+ "@types/node": "^20.12.7",
29
+ "@vitejs/plugin-vue": "^5.0.4",
30
+ "sass": "^1.80.3",
31
+ "typescript": "^5.2.2",
32
+ "vite": "^5.2.0",
33
+ "vite-plugin-dts": "^4.3.0",
34
+ "vue-tsc": "^2.0.6"
35
+ },
36
+ "publishConfig": {
37
+ "access": "public"
38
+ },
39
+ "keywords": [
40
+ "vue",
41
+ "vue 3",
42
+ "component"
43
+ ],
44
+ "author": {
45
+ "email": "xy@ztes.com",
46
+ "name": "XuYu"
47
+ },
48
+ "license": "MIT",
49
+ "files": [
50
+ "x-next"
51
+ ]
65
52
  }
@@ -0,0 +1,5 @@
1
+ import { Ref } from 'vue';
2
+ export declare const useOverflow: (containerRef: Ref<HTMLElement | undefined>, targetRef?: Ref<HTMLElement | undefined>) => {
3
+ setOverflowHidden: () => void;
4
+ resetOverflow: () => void;
5
+ };
@@ -0,0 +1,11 @@
1
+ import { Ref } from 'vue';
2
+ export type PopupType = 'popup' | 'dialog' | 'message';
3
+ export default function usePopupManager(type: PopupType, { visible, runOnMounted, }?: {
4
+ visible?: Ref<boolean>;
5
+ runOnMounted?: boolean;
6
+ }): {
7
+ zIndex: Readonly<Ref<number, number>>;
8
+ open: () => void;
9
+ close: () => void;
10
+ isLastDialog: () => boolean;
11
+ };
@@ -0,0 +1,13 @@
1
+ type NamedColor = 'aliceblue' | 'antiquewhite' | 'aqua' | 'aquamarine' | 'azure' | 'beige' | 'bisque' | 'black' | 'blanchedalmond' | 'blue' | 'blueviolet' | 'brown' | 'burlywood' | 'cadetblue' | 'chartreuse' | 'chocolate' | 'coral' | 'cornflowerblue' | 'cornsilk' | 'crimson' | 'cyan' | 'darkblue' | 'darkcyan' | 'darkgoldenrod' | 'darkgray' | 'darkgreen' | 'darkgrey' | 'darkkhaki' | 'darkmagenta' | 'darkolivegreen' | 'darkorange' | 'darkorchid' | 'darkred' | 'darksalmon' | 'darkseagreen' | 'darkslateblue' | 'darkslategray' | 'darkslategrey' | 'darkturquoise' | 'darkviolet' | 'deeppink' | 'deepskyblue' | 'dimgray' | 'dimgrey' | 'dodgerblue' | 'firebrick' | 'floralwhite' | 'forestgreen' | 'fuchsia' | 'gainsboro' | 'ghostwhite' | 'gold' | 'goldenrod' | 'gray' | 'green' | 'greenyellow' | 'grey' | 'honeydew' | 'hotpink' | 'indianred' | 'indigo' | 'ivory' | 'khaki' | 'lavender' | 'lavenderblush' | 'lawngreen' | 'lemonchiffon' | 'lightblue' | 'lightcoral' | 'lightcyan' | 'lightgoldenrodyellow' | 'lightgray' | 'lightgreen' | 'lightgrey' | 'lightpink' | 'lightsalmon' | 'lightseagreen' | 'lightskyblue' | 'lightslategray' | 'lightslategrey' | 'lightsteelblue' | 'lightyellow' | 'lime' | 'limegreen' | 'linen' | 'magenta' | 'maroon' | 'mediumaquamarine' | 'mediumblue' | 'mediumorchid' | 'mediumpurple' | 'mediumseagreen' | 'mediumslateblue' | 'mediumspringgreen' | 'mediumturquoise' | 'mediumvioletred' | 'midnightblue' | 'mintcream' | 'mistyrose' | 'moccasin' | 'navajowhite' | 'navy' | 'oldlace' | 'olive' | 'olivedrab' | 'orange' | 'orangered' | 'orchid' | 'palegoldenrod' | 'palegreen' | 'paleturquoise' | 'palevioletred' | 'papayawhip' | 'peachpuff' | 'peru' | 'pink' | 'plum' | 'powderblue' | 'purple' | 'red' | 'rosybrown' | 'royalblue' | 'saddlebrown' | 'salmon' | 'sandybrown' | 'seagreen' | 'seashell' | 'sienna' | 'silver' | 'skyblue' | 'slateblue' | 'slategray' | 'slategrey' | 'snow' | 'springgreen' | 'steelblue' | 'tan' | 'teal' | 'thistle' | 'tomato' | 'turquoise' | 'violet' | 'wheat' | 'white' | 'whitesmoke' | 'yellow' | 'yellowgreen';
2
+ type HexColor = `#${string}`;
3
+ type RgbColor = `rgb(${number}, ${number}, ${number})`;
4
+ type RgbaColor = `rgba(${number}, ${number}, ${number}, ${number})`;
5
+ type HslColor = `hsl(${number}, ${number}%, ${number}%)`;
6
+ type HslaColor = `hsla(${number}, ${number}%, ${number}%, ${number})`;
7
+ export type CSSColor = NamedColor | HexColor | RgbColor | RgbaColor | HslColor | HslaColor;
8
+ type CSSUnit = 'px' | 'em' | 'rem' | 'vw' | 'vh' | 'vmin' | 'vmax' | '%' | 'pt' | 'cm' | 'mm' | 'in' | 'pc' | 'ex' | 'ch';
9
+ export type LengthValue = `${number}${CSSUnit}`;
10
+ type GlobalValues = 'auto' | 'inherit' | 'initial' | 'unset';
11
+ type PaddingMarginValue = LengthValue | `${number}` | GlobalValues;
12
+ export type PaddingMargin = PaddingMarginValue | [PaddingMarginValue, PaddingMarginValue] | [PaddingMarginValue, PaddingMarginValue, PaddingMarginValue] | [PaddingMarginValue, PaddingMarginValue, PaddingMarginValue, PaddingMarginValue];
13
+ export {};
@@ -0,0 +1 @@
1
+ export type ComponentSize = 'mini' | 'small' | 'medium' | 'large';
@@ -0,0 +1,9 @@
1
+ export declare const COMPONENT_INSTALLED_KEY: unique symbol;
2
+ export declare const getClassPrefix: (name?: string) => string;
3
+ export declare const getComponentPrefix: (name: string) => string;
4
+ export declare const getClassNameMixin: (name: string) => {
5
+ block: string;
6
+ element: (className: string) => string;
7
+ modifier: (className: string) => string;
8
+ is: (className: string) => string;
9
+ };
@@ -0,0 +1,3 @@
1
+ export declare const toKebabCase: (string: string) => string;
2
+ export declare const toPascalCase: (string: string) => string;
3
+ export declare const toCamelCase: (string: string) => string;
@@ -0,0 +1,10 @@
1
+ import { CSSProperties } from 'vue';
2
+ export declare const NOOP: () => void;
3
+ export declare const querySelector: (selectors: string, container?: Document | HTMLElement) => HTMLElement | undefined;
4
+ export declare const getScrollBarWidth: (element: HTMLElement) => number;
5
+ export declare const isScroll: (element: HTMLElement) => boolean;
6
+ export declare const getStyle: (element: HTMLElement, styleName: keyof CSSProperties) => string;
7
+ export declare const setStyle: (element: HTMLElement, styleName: CSSProperties | keyof CSSProperties, value?: string | number) => void;
8
+ export declare const getElement: (target: string | HTMLElement | undefined, container?: Document | HTMLElement) => HTMLElement | undefined;
9
+ export declare const on: <K extends keyof HTMLElementEventMap>(element: HTMLElement | Window, event: K, handler: (ev: HTMLElementEventMap[K]) => void, options?: boolean | AddEventListenerOptions) => void;
10
+ export declare const off: <K extends keyof HTMLElementEventMap>(element: HTMLElement | Window, type: K, handler: (ev: HTMLElementEventMap[K]) => void, options?: boolean | EventListenerOptions) => void;
@@ -0,0 +1,12 @@
1
+ export declare const getProp: (target: any, path: any, defVal?: any) => any;
2
+ export declare const setProp: (target: any, path: any, value: any) => any;
3
+ export declare const deepClone: (obj: any, set?: any) => any;
4
+ export declare const NOOP: () => void;
5
+ export declare const addUnit: (value: string | number | undefined, unit?: string) => string;
6
+ export declare const upperFirstChar: (text: string) => string | undefined;
7
+ export declare const compose: <T>(...fns: ((...v: T[]) => T)[]) => (...v: T[]) => T;
8
+ export declare const pipe: <T>(...fns: ((...v: T[]) => T)[]) => (...v: T[]) => T;
9
+ export declare const findLastIndex: (arr: never[] | undefined, callback: (item: any, i: number, origin: any[]) => boolean) => number;
10
+ export declare const getUniqueId: (size?: number) => string;
11
+ export declare const genMatrix: (list: any[], row: number) => any[];
12
+ export declare const sleep: (delay?: number) => Promise<unknown>;
@@ -0,0 +1,59 @@
1
+ /**
2
+ * 首字母大写及-符号仅跟的字母大写
3
+ * @param str
4
+ */
5
+ export declare const toPascalCase: (str: string) => string;
6
+ export declare function createIconComponent(name: string): import('vue').DefineComponent<import('vue').ExtractPropTypes<{
7
+ size: {
8
+ type: (StringConstructor | NumberConstructor)[];
9
+ default: undefined;
10
+ };
11
+ rotate: {
12
+ type: NumberConstructor;
13
+ default: undefined;
14
+ };
15
+ spin: {
16
+ type: BooleanConstructor;
17
+ default: boolean;
18
+ };
19
+ color: {
20
+ type: StringConstructor;
21
+ default: undefined;
22
+ };
23
+ fillColor: {
24
+ type: ArrayConstructor;
25
+ default: undefined;
26
+ };
27
+ }>, {
28
+ cls: import('vue').ComputedRef<(string | {
29
+ "x-icon-loading": boolean;
30
+ })[]>;
31
+ styles: import('vue').ComputedRef<import('vue').CSSProperties>;
32
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
33
+ size: {
34
+ type: (StringConstructor | NumberConstructor)[];
35
+ default: undefined;
36
+ };
37
+ rotate: {
38
+ type: NumberConstructor;
39
+ default: undefined;
40
+ };
41
+ spin: {
42
+ type: BooleanConstructor;
43
+ default: boolean;
44
+ };
45
+ color: {
46
+ type: StringConstructor;
47
+ default: undefined;
48
+ };
49
+ fillColor: {
50
+ type: ArrayConstructor;
51
+ default: undefined;
52
+ };
53
+ }>> & Readonly<{}>, {
54
+ size: string | number;
55
+ color: string;
56
+ rotate: number;
57
+ spin: boolean;
58
+ fillColor: unknown[];
59
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -1,36 +1,22 @@
1
- export declare function isArray(obj: any): obj is any[];
2
- export declare function isNull(obj: any): obj is null;
3
- export declare function isBoolean(obj: unknown): obj is boolean;
4
- export declare function isObject(obj: any): obj is Record<string, unknown>;
5
- export declare const isPromise: <T>(obj: unknown) => obj is Promise<T>;
6
- export declare function isString(obj: any): obj is string;
7
- export declare function isNumber(obj: any): obj is number;
8
- export declare function isRegExp(obj: any): boolean;
9
- export declare function isDate(obj: any): boolean;
10
- export declare function isColor(color: any): boolean;
11
- export declare function isUndefined(obj: any): obj is undefined;
12
- export declare function isFunction(obj: any): obj is (...args: any[]) => any;
13
- export declare function isClass(value: unknown): boolean;
14
- export declare function isEmptyObject(obj: any): boolean;
15
- export declare function isEmpty(obj: any): boolean;
16
- export declare function isExist(obj: any): boolean;
17
- export declare function isWindow(el: any): el is Window;
18
- /**
19
- * 控制台消息打印
20
- * @param name
21
- * @param message
22
- * @param color
23
- * @param bgColor
24
- */
25
- export declare function consoleLog(name: string, message: string, color: string, bgColor: string): void;
26
- /**
27
- * 当前时间
28
- * @description 用于控制台打印使用
29
- */
30
- export declare function now(): string;
31
- /**
32
- * jsonStringify2Parse
33
- * @param value
34
- * @description 将JSON字符串转换为JSON对象
35
- */
36
- export declare function jsonStringify2Parse(value: unknown): any;
1
+ import { ComponentPublicInstance, VNodeNormalizedChildren, VNode } from 'vue';
2
+ import { Dayjs } from 'dayjs';
3
+ export declare function isArray(obj: any): obj is any[];
4
+ export declare function isNull(obj: any): obj is null;
5
+ export declare function isBoolean(obj: unknown): obj is boolean;
6
+ export declare function isObject<T>(obj: T): obj is Extract<T, Record<string, any>>;
7
+ export declare const isPromise: <T>(obj: unknown) => obj is Promise<T>;
8
+ export declare function isString(obj: any): obj is string;
9
+ export declare function isNumber(obj: any): obj is number;
10
+ export declare function isRegExp(obj: any): boolean;
11
+ export declare function isDate(obj: any): boolean;
12
+ export declare function isColor(color: any): boolean;
13
+ export declare function isUndefined(obj: any): obj is undefined;
14
+ export declare function isFunction(obj: any): obj is (...args: any[]) => any;
15
+ export declare function isEmptyObject(obj: any): boolean;
16
+ export declare function isExist(obj: any): boolean;
17
+ export declare function isWindow(el: any): el is Window;
18
+ export declare const isComponentInstance: (value: any) => value is ComponentPublicInstance;
19
+ export declare const isArrayChildren: (children: VNodeNormalizedChildren) => children is VNode[];
20
+ export declare const isQuarter: (fromat: string) => boolean;
21
+ export declare function isDayjs(time: any): time is Dayjs;
22
+ export declare function isClient(): boolean;
@@ -0,0 +1,24 @@
1
+ export declare const KEYBOARD_KEY: {
2
+ ENTER: string;
3
+ ESC: string;
4
+ BACKSPACE: string;
5
+ TAB: string;
6
+ SPACE: string;
7
+ ARROW_UP: string;
8
+ ARROW_DOWN: string;
9
+ ARROW_LEFT: string;
10
+ ARROW_RIGHT: string;
11
+ };
12
+ export interface CodeKey {
13
+ /** Keyboard key */
14
+ key: string;
15
+ /** Ctrl / ⌃ */
16
+ ctrl?: boolean;
17
+ /** Shift key */
18
+ shift?: boolean;
19
+ /** Alt / ⌥ */
20
+ alt?: boolean;
21
+ /** meta ⌘ / ⊞ */
22
+ meta?: boolean;
23
+ }
24
+ export declare const getKeyDownHandler: (codeKeyMap: Map<CodeKey | string, (e: Event) => void>) => (event: KeyboardEvent) => void;
File without changes
@@ -0,0 +1,28 @@
1
+ import { VNodeTypes, VNode, PropType, Component, Slots, Plugin } from 'vue';
2
+ export type SFCWithInstall<T> = T & Plugin;
3
+ /**
4
+ * @description Vue生态操作封装
5
+ */
6
+ export declare const definePropType: <T>(val: unknown) => PropType<T>;
7
+ export declare enum ShapeFlags {
8
+ ELEMENT = 1,
9
+ FUNCTIONAL_COMPONENT = 2,
10
+ STATEFUL_COMPONENT = 4,
11
+ COMPONENT = 6,
12
+ TEXT_CHILDREN = 8,
13
+ ARRAY_CHILDREN = 16,
14
+ SLOTS_CHILDREN = 32,
15
+ TELEPORT = 64,
16
+ SUSPENSE = 128,
17
+ COMPONENT_SHOULD_KEEP_ALIVE = 256,
18
+ COMPONENT_KEPT_ALIVE = 512
19
+ }
20
+ export declare const isElement: (vn: VNode) => boolean;
21
+ export declare const isComponent: (vn: VNode, type?: VNodeTypes) => type is Component;
22
+ export declare const isTextChildren: (child: VNode, children: VNode["children"]) => children is string;
23
+ export declare const isArrayChildren: (vn: VNode, children: VNode["children"]) => children is VNode[];
24
+ export declare const isSlotsChildren: (vn: VNode, children: VNode["children"]) => children is Slots;
25
+ export declare const getAllElements: (children: VNode[] | undefined, includeText?: boolean) => VNode<import('vue').RendererNode, import('vue').RendererElement, {
26
+ [key: string]: any;
27
+ }>[];
28
+ export declare const withInstall: <T, E extends Record<string, any>>(main: T, extra?: E) => SFCWithInstall<T> & E;
@@ -0,0 +1,162 @@
1
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
+ disabled: BooleanConstructor;
3
+ block: BooleanConstructor;
4
+ loading: BooleanConstructor;
5
+ loadingFill: {
6
+ type: BooleanConstructor;
7
+ default: boolean;
8
+ };
9
+ debounce: {
10
+ type: NumberConstructor;
11
+ default: number;
12
+ };
13
+ shape: {
14
+ type: import('vue').PropType<import('./props').ButtonShape>;
15
+ default: undefined;
16
+ };
17
+ link: {
18
+ type: BooleanConstructor;
19
+ default: boolean;
20
+ };
21
+ type: {
22
+ type: import('vue').PropType<import('./props').ButtonType>;
23
+ default: undefined;
24
+ };
25
+ status: {
26
+ type: import('vue').PropType<import('./props').ButtonStatus>;
27
+ default: undefined;
28
+ };
29
+ plain: {
30
+ type: BooleanConstructor;
31
+ default: boolean;
32
+ };
33
+ size: {
34
+ type: import('vue').PropType<import('./props').ButtonSize>;
35
+ default: string;
36
+ };
37
+ border: {
38
+ type: BooleanConstructor;
39
+ default: boolean;
40
+ };
41
+ }>, {
42
+ cn: {
43
+ block: string;
44
+ element: (className: string) => string;
45
+ modifier: (className: string) => string;
46
+ is: (className: string) => string;
47
+ };
48
+ cls: import('vue').ComputedRef<(string | false | undefined)[]>;
49
+ handleClick: (event: MouseEvent) => Promise<void>;
50
+ isLoading: import('vue').ComputedRef<boolean>;
51
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "click"[], "click", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
52
+ disabled: BooleanConstructor;
53
+ block: BooleanConstructor;
54
+ loading: BooleanConstructor;
55
+ loadingFill: {
56
+ type: BooleanConstructor;
57
+ default: boolean;
58
+ };
59
+ debounce: {
60
+ type: NumberConstructor;
61
+ default: number;
62
+ };
63
+ shape: {
64
+ type: import('vue').PropType<import('./props').ButtonShape>;
65
+ default: undefined;
66
+ };
67
+ link: {
68
+ type: BooleanConstructor;
69
+ default: boolean;
70
+ };
71
+ type: {
72
+ type: import('vue').PropType<import('./props').ButtonType>;
73
+ default: undefined;
74
+ };
75
+ status: {
76
+ type: import('vue').PropType<import('./props').ButtonStatus>;
77
+ default: undefined;
78
+ };
79
+ plain: {
80
+ type: BooleanConstructor;
81
+ default: boolean;
82
+ };
83
+ size: {
84
+ type: import('vue').PropType<import('./props').ButtonSize>;
85
+ default: string;
86
+ };
87
+ border: {
88
+ type: BooleanConstructor;
89
+ default: boolean;
90
+ };
91
+ }>> & Readonly<{
92
+ onClick?: ((...args: any[]) => any) | undefined;
93
+ }>, {
94
+ size: import('./props').ButtonSize;
95
+ border: boolean;
96
+ link: boolean;
97
+ block: boolean;
98
+ disabled: boolean;
99
+ type: import('./props').ButtonType;
100
+ loading: boolean;
101
+ loadingFill: boolean;
102
+ debounce: number;
103
+ shape: import('./props').ButtonShape;
104
+ status: import('./props').ButtonStatus;
105
+ plain: boolean;
106
+ }, {}, {
107
+ AnimationLoading: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
108
+ size: {
109
+ type: (StringConstructor | NumberConstructor)[];
110
+ default: undefined;
111
+ };
112
+ rotate: {
113
+ type: NumberConstructor;
114
+ default: undefined;
115
+ };
116
+ spin: {
117
+ type: BooleanConstructor;
118
+ default: boolean;
119
+ };
120
+ color: {
121
+ type: StringConstructor;
122
+ default: undefined;
123
+ };
124
+ fillColor: {
125
+ type: ArrayConstructor;
126
+ default: undefined;
127
+ };
128
+ }>, {
129
+ cls: import('vue').ComputedRef<(string | {
130
+ "x-icon-loading": boolean;
131
+ })[]>;
132
+ styles: import('vue').ComputedRef<import('vue').CSSProperties>;
133
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
134
+ size: {
135
+ type: (StringConstructor | NumberConstructor)[];
136
+ default: undefined;
137
+ };
138
+ rotate: {
139
+ type: NumberConstructor;
140
+ default: undefined;
141
+ };
142
+ spin: {
143
+ type: BooleanConstructor;
144
+ default: boolean;
145
+ };
146
+ color: {
147
+ type: StringConstructor;
148
+ default: undefined;
149
+ };
150
+ fillColor: {
151
+ type: ArrayConstructor;
152
+ default: undefined;
153
+ };
154
+ }>> & Readonly<{}>, {
155
+ size: string | number;
156
+ color: string;
157
+ rotate: number;
158
+ spin: boolean;
159
+ fillColor: unknown[];
160
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
161
+ }, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
162
+ export default _default;
@@ -0,0 +1,45 @@
1
+ export type ButtonSize = 'mini' | 'small' | 'medium' | 'large' | 'huge';
2
+ export type ButtonStatus = 'success' | 'warning' | 'strong' | 'danger' | 'info';
3
+ export type ButtonType = 'primary' | 'secondary' | 'dashed' | 'outline' | 'text';
4
+ export type ButtonShape = 'round' | 'circle' | 'square';
5
+ export declare const buttonProps: {
6
+ disabled: BooleanConstructor;
7
+ block: BooleanConstructor;
8
+ loading: BooleanConstructor;
9
+ loadingFill: {
10
+ type: BooleanConstructor;
11
+ default: boolean;
12
+ };
13
+ debounce: {
14
+ type: NumberConstructor;
15
+ default: number;
16
+ };
17
+ shape: {
18
+ type: import('vue').PropType<ButtonShape>;
19
+ default: undefined;
20
+ };
21
+ link: {
22
+ type: BooleanConstructor;
23
+ default: boolean;
24
+ };
25
+ type: {
26
+ type: import('vue').PropType<ButtonType>;
27
+ default: undefined;
28
+ };
29
+ status: {
30
+ type: import('vue').PropType<ButtonStatus>;
31
+ default: undefined;
32
+ };
33
+ plain: {
34
+ type: BooleanConstructor;
35
+ default: boolean;
36
+ };
37
+ size: {
38
+ type: import('vue').PropType<ButtonSize>;
39
+ default: string;
40
+ };
41
+ border: {
42
+ type: BooleanConstructor;
43
+ default: boolean;
44
+ };
45
+ };