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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +93 -2
  3. package/dist/favicon.ico +0 -0
  4. package/dist/index.d.ts +0 -0
  5. package/dist/types/_hooks/use-overflow.d.ts +5 -0
  6. package/dist/types/_hooks/use-popup-manager.d.ts +11 -0
  7. package/dist/types/_props/css.d.ts +13 -0
  8. package/dist/types/_props/global.d.ts +1 -0
  9. package/dist/types/_utils/config.d.ts +9 -0
  10. package/dist/types/_utils/convert-case.d.ts +3 -0
  11. package/dist/types/_utils/dom.d.ts +10 -0
  12. package/dist/types/_utils/helpers.d.ts +12 -0
  13. package/dist/types/_utils/icon.d.ts +59 -0
  14. package/dist/types/_utils/is.d.ts +25 -0
  15. package/dist/types/_utils/keyboard.d.ts +24 -0
  16. package/dist/types/_utils/number.d.ts +0 -0
  17. package/dist/types/_utils/vue-eco.d.ts +32 -0
  18. package/dist/types/componets/button/index.vue.d.ts +107 -0
  19. package/dist/types/componets/button/props.d.ts +45 -0
  20. package/dist/types/componets/dialog/index.vue.d.ts +221 -0
  21. package/dist/types/componets/dialog/props.d.ts +83 -0
  22. package/dist/types/componets/dialog/use-props.d.ts +33 -0
  23. package/dist/types/componets/dialog/use.d.ts +3 -0
  24. package/dist/types/componets/dialog/warp.d.ts +2 -0
  25. package/dist/types/componets/message/index.vue.d.ts +116 -0
  26. package/dist/types/componets/message/props.d.ts +31 -0
  27. package/dist/types/componets/message/warp.d.ts +3 -0
  28. package/dist/types/componets/message-box/index.d.ts +3 -0
  29. package/dist/types/componets/message-box/props.d.ts +52 -0
  30. package/dist/types/componets/message-box/warp.d.ts +2 -0
  31. package/dist/types/componets/notification/index.vue.d.ts +160 -0
  32. package/dist/types/componets/notification/props.d.ts +54 -0
  33. package/dist/types/componets/notification/warp.d.ts +3 -0
  34. package/dist/types/componets/space/index.d.ts +42 -0
  35. package/dist/types/componets/tag-cloud/index.d.ts +0 -0
  36. package/dist/types/componets/trend-chart/components/trend-chart-curve.d.ts +114 -0
  37. package/dist/types/componets/trend-chart/components/trend-chart-grid.d.ts +55 -0
  38. package/dist/types/componets/trend-chart/components/trend-chart-labels.d.ts +22 -0
  39. package/dist/types/componets/trend-chart/components/trend-chart.d.ts +270 -0
  40. package/dist/types/componets/trend-chart/helpers/genPath.d.ts +8 -0
  41. package/dist/types/componets/trend-chart/helpers/genPoints.d.ts +3 -0
  42. package/dist/types/componets/trend-chart/helpers/getPadding.d.ts +7 -0
  43. package/dist/types/componets/trend-chart/helpers/validatePadding.d.ts +2 -0
  44. package/dist/types/componets/trend-chart/index.d.ts +2 -0
  45. package/dist/types/componets/trend-chart/props.d.ts +206 -0
  46. package/dist/types/icons/animation/animation-loading.vue.d.ts +55 -0
  47. package/dist/types/icons/default/check-circle-fill.vue.d.ts +55 -0
  48. package/dist/types/icons/default/close-circle-fill.vue.d.ts +55 -0
  49. package/dist/types/icons/default/exclamation-circle-fill.vue.d.ts +55 -0
  50. package/dist/types/icons/default/info-circle-fill.vue.d.ts +55 -0
  51. package/dist/types/icons/default/minus-circle-fill.vue.d.ts +55 -0
  52. package/dist/types/icons/index.d.ts +7 -0
  53. package/dist/types/ui.d.ts +5 -0
  54. package/dist/ui.cjs.js +2 -0
  55. package/dist/ui.es.js +1395 -0
  56. package/dist/ui.umd.js +3 -0
  57. package/package.json +64 -63
  58. package/framework/es/client.io.js +0 -2
  59. package/framework/es/client.io.js.map +0 -1
  60. package/framework/es/exception.d.ts +0 -25
  61. package/framework/es/index.d.ts +0 -2
  62. package/framework/es/types.d.ts +0 -33
  63. package/framework/es/util.d.ts +0 -36
  64. package/framework/es/websocket.d.ts +0 -118
  65. package/framework/umd/client.io.js +0 -2
  66. package/framework/umd/client.io.js.map +0 -1
  67. package/framework/umd/exception.d.ts +0 -25
  68. package/framework/umd/index.d.ts +0 -2
  69. package/framework/umd/types.d.ts +0 -33
  70. package/framework/umd/util.d.ts +0 -36
  71. package/framework/umd/websocket.d.ts +0 -118
  72. package/index.d.ts +0 -159
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2020 Pudon
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2020 Ilia Borovitinov
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,4 +1,95 @@
1
- # x-next
2
- xiaocaiyun.com 前端组件库。
1
+ # Vue 3 Datepicker
3
2
 
3
+ Documentation: https://icehaunter.github.io/vue3-datepicker/
4
4
 
5
+ This is a basic (at least for now) reimplementation of https://github.com/icehaunter/vuejs-datepicker in Vue 3 and with greatly cleaned up code.
6
+
7
+ All date manipulation and formatting are done via the amazing [`date-fns`](https://date-fns.org/) library, so it's a direct dependency of this picker.
8
+
9
+ ## Installation
10
+
11
+ Package is available on NPM: https://www.npmjs.com/package/vue3-datepicker
12
+
13
+ ```sh
14
+ npm i vue3-datepicker
15
+ ```
16
+
17
+ The component is packaged mainly for use with bundlers, if you require a browser build - post an issue.
18
+
19
+ ## Usage
20
+
21
+ For more examples see https://icehaunter.github.io/vue3-datepicker/examples.html
22
+
23
+ ```vue
24
+ <template>
25
+ <datepicker
26
+ v-model="selected"
27
+ :locale="locale"
28
+ :upperLimit="to"
29
+ :lowerLimit="from"
30
+ :clearable="true"
31
+ />
32
+ </template>
33
+ ```
34
+
35
+ ## Props and attributes
36
+
37
+ Attribute fallthrough is enabled, so any attribute you apply to the component will be passed down to the input.
38
+
39
+ All props which accept formatting strings for dates use [`date-fns` formatting function](https://date-fns.org/docs/format) under the hood, so see that function's documentation for patterns.
40
+
41
+ Main interaction to date selection is done via `v-model` with `Date` as expected type of the value passed.
42
+
43
+ Full props documentation is available at https://icehaunter.github.io/vue3-datepicker/config.html#props
44
+
45
+ | ID | Type | Default | Description |
46
+ | ------------------------ | -------------------------------------------------------- | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
47
+ | `upperLimit` | `Date` | | Upper limit for available dates for picking |
48
+ | `lowerLimit` | `Date` | | Lower limit for available dates for picking |
49
+ | `startingViewDate` | `Date` | `() => new Date()` | Date on which to focus when empty datepicker is opened. Default is "right now" |
50
+ | `disabledDates` | `{ dates: Date[] }` | | Dates not available for picking |
51
+ | `disabledTime` | `{ dates: Date[] }` | | Dates not available for time picking |
52
+ | `startingView` | `'time' \| 'day' \| 'month' \| 'year'` | `'day'` | View on which the date picker should open. Can be either `year`, `month`, or `day` |
53
+ | `minimumView` | `'time' \| 'day' \| 'month' \| 'year'` | `'day'` | If set, lower-level views won't show |
54
+ | `dayPickerHeadingFormat` | `String` | `LLLL yyyy` | `date-fns`-type formatting for a day view heading |
55
+ | `dayFormat` | `String` | `dd` | `date-fns`-type formatting for each day on the day view |
56
+ | `weekdayFormat` | `String` | `EE` | `date-fns`-type formatting for a line of weekdays on day view |
57
+ | `inputFormat` | `String` | `yyyy-MM-dd` | `date-fns`-type format in which the string in the input should be both parsed and displayed |
58
+ | `locale` | [`Locale`](https://date-fns.org/v2.16.1/docs/I18n#usage) | `date-fns/locale/en` | [`date-fns` locale object](https://date-fns.org/v2.16.1/docs/I18n#usage). Used in string formatting (see default `dayPickerHeadingFormat`) |
59
+ | `disabled` | `Boolean` | `false` | Disables datepicker and prevents it's opening |
60
+ | `typeable` | `Boolean` | `false` | Allows user to input date manually |
61
+ | `weekStartsOn` | `Number` | 1 | Day on which the week should start. Number from 0 to 6, where 0 is Sunday and 6 is Saturday. Week starts with a Monday (1) by default |
62
+ | `clearable` | `Boolean` | `false` | Allows clearing the selected date and setting the value to `null` |
63
+ | `allowOutsideInterval` | `Boolean` | `false` | Allows user to click dates outside of current interval |
64
+
65
+ ### Events
66
+
67
+ - `opened`: Emitted every time the popup opens, including on field focus
68
+ - `closed`: Emitted every time the popup closes, including on field blur
69
+ - `decadePageChanged`: Emitted when a page is changed on the year picker view, displaying a different decade. Has a date that is included in the shown decade as an argument.
70
+ - `yearPageChanged`: Emitted when a page is changed on the month picker view, displaying a different year. Has a date that is included in the shown year as an argument.
71
+ - `monthPageChanged`: Emitted when a page is changed on the day picker view, displaying a different month. Has a date that is included in the shown month as an argument.
72
+
73
+ ## Compatibility
74
+
75
+ Package is transpiled and should be usable for everyone with ES6 and above, but the styling of the datepicker itself uses CSS Grid and CSS variables.
76
+
77
+ ## Example
78
+
79
+ ```vue
80
+ <template>
81
+ <datepicker v-model="picked" />
82
+ </template>
83
+
84
+ <script>
85
+ import Datepicker from '../src/datepicker/Datepicker.vue'
86
+ components: {
87
+ Datepicker
88
+ },
89
+ data(): {
90
+ return {
91
+ picked: new Date();
92
+ }
93
+ }
94
+ </script>
95
+ ```
Binary file
File without changes
@@ -0,0 +1,5 @@
1
+ import { type 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 type { 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 type { 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: string]: 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
+ color: string;
55
+ rotate: number;
56
+ size: string | number;
57
+ spin: boolean;
58
+ fillColor: unknown[];
59
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,25 @@
1
+ import type { ComponentPublicInstance, VNodeNormalizedChildren } from 'vue';
2
+ import { Dayjs } from 'dayjs';
3
+ import { VNode } from 'vue';
4
+ export declare function isArray(obj: any): obj is any[];
5
+ export declare function isNull(obj: any): obj is null;
6
+ export declare function isBoolean(obj: unknown): obj is boolean;
7
+ export declare function isObject<T>(obj: T): obj is Extract<T, Record<string, any>>;
8
+ export declare const isPromise: <T>(obj: unknown) => obj is Promise<T>;
9
+ export declare function isString(obj: any): obj is string;
10
+ export declare function isNumber(obj: any): obj is number;
11
+ export declare function isRegExp(obj: any): boolean;
12
+ export declare function isDate(obj: any): boolean;
13
+ export declare function isColor(color: any): boolean;
14
+ export declare function isUndefined(obj: any): obj is undefined;
15
+ export declare function isFunction(obj: any): obj is (...args: any[]) => any;
16
+ export declare function isEmptyObject(obj: any): boolean;
17
+ export declare function isExist(obj: any): boolean;
18
+ export declare function isWindow(el: any): el is Window;
19
+ export declare const isComponentInstance: (value: any) => value is ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, import("vue").ComponentProvideOptions>, {}, {}, "", {}, any>;
20
+ export declare const isArrayChildren: (children: VNodeNormalizedChildren) => children is VNode<import("vue").RendererNode, import("vue").RendererElement, {
21
+ [key: string]: any;
22
+ }>[];
23
+ export declare const isQuarter: (fromat: string) => boolean;
24
+ export declare function isDayjs(time: any): time is Dayjs;
25
+ 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<string | CodeKey, (e: Event) => void>) => (event: KeyboardEvent) => void;
File without changes
@@ -0,0 +1,32 @@
1
+ import type { VNodeTypes, VNode, PropType, Component, 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<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>;
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<import("vue").RendererNode, import("vue").RendererElement, {
24
+ [key: string]: any;
25
+ }>[];
26
+ export declare const isSlotsChildren: (vn: VNode, children: VNode['children']) => children is Readonly<{
27
+ [name: string]: import("vue").Slot<any> | undefined;
28
+ }>;
29
+ export declare const getAllElements: (children: VNode[] | undefined, includeText?: boolean) => VNode<import("vue").RendererNode, import("vue").RendererElement, {
30
+ [key: string]: any;
31
+ }>[];
32
+ export declare const withInstall: <T, E extends Record<string, any>>(main: T, extra?: E | undefined) => SFCWithInstall<T> & E;
@@ -0,0 +1,107 @@
1
+ declare const _sfc_main: 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
+ }, {}, Record<string, import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>>, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
107
+ export default _sfc_main;
@@ -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
+ };