@jiaozhiye/qm-design-react 1.0.0-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 (222) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +4 -0
  3. package/lib/_utils/cloneElement.d.ts +2 -0
  4. package/lib/_utils/dom.d.ts +68 -0
  5. package/lib/_utils/download.d.ts +7 -0
  6. package/lib/_utils/error.d.ts +2 -0
  7. package/lib/_utils/isServer.d.ts +2 -0
  8. package/lib/_utils/prefix.d.ts +1 -0
  9. package/lib/_utils/resize-event.d.ts +10 -0
  10. package/lib/_utils/scrollbar-width.d.ts +1 -0
  11. package/lib/_utils/types.d.ts +33 -0
  12. package/lib/_utils/util.d.ts +23 -0
  13. package/lib/_utils/validators.d.ts +2 -0
  14. package/lib/anchor/index.d.ts +4 -0
  15. package/lib/anchor/src/anchor-item.d.ts +13 -0
  16. package/lib/anchor/src/anchor-nav.d.ts +12 -0
  17. package/lib/anchor/src/anchor.d.ts +52 -0
  18. package/lib/anchor/style/index.less +60 -0
  19. package/lib/antd/Calendar.d.ts +4 -0
  20. package/lib/antd/DatePicker.d.ts +11 -0
  21. package/lib/antd/TimePicker.d.ts +14 -0
  22. package/lib/antd/index.d.ts +123 -0
  23. package/lib/antd/index.less +7 -0
  24. package/lib/button/index.d.ts +3 -0
  25. package/lib/button/src/button.d.ts +30 -0
  26. package/lib/button/style/index.less +12 -0
  27. package/lib/config-provider/context.d.ts +9 -0
  28. package/lib/config-provider/index.d.ts +3 -0
  29. package/lib/config-provider/src/config-provider.d.ts +34 -0
  30. package/lib/countup/index.d.ts +3 -0
  31. package/lib/countup/src/countup.d.ts +17 -0
  32. package/lib/countup/style/index.less +22 -0
  33. package/lib/cropper/index.d.ts +3 -0
  34. package/lib/cropper/src/cropper.d.ts +213 -0
  35. package/lib/cropper/style/index.less +13 -0
  36. package/lib/divider/index.d.ts +3 -0
  37. package/lib/divider/src/divider.d.ts +25 -0
  38. package/lib/divider/style/index.less +54 -0
  39. package/lib/download/index.d.ts +3 -0
  40. package/lib/download/src/download.d.ts +51 -0
  41. package/lib/download/style/index.less +12 -0
  42. package/lib/drawer/index.d.ts +3 -0
  43. package/lib/drawer/src/drawer.d.ts +33 -0
  44. package/lib/drawer/style/index.less +77 -0
  45. package/lib/empty/index.d.ts +3 -0
  46. package/lib/empty/src/empty.d.ts +15 -0
  47. package/lib/empty/style/index.less +35 -0
  48. package/lib/form/index.d.ts +4 -0
  49. package/lib/form/src/china-data.d.ts +4577 -0
  50. package/lib/form/src/context.d.ts +6 -0
  51. package/lib/form/src/fields-filter.d.ts +26 -0
  52. package/lib/form/src/form-cascader.d.ts +21 -0
  53. package/lib/form/src/form-checkbox-group.d.ts +18 -0
  54. package/lib/form/src/form-checkbox.d.ts +10 -0
  55. package/lib/form/src/form-city-select.d.ts +10 -0
  56. package/lib/form/src/form-date.d.ts +10 -0
  57. package/lib/form/src/form-divider.d.ts +10 -0
  58. package/lib/form/src/form-immediate.d.ts +10 -0
  59. package/lib/form/src/form-input-number.d.ts +10 -0
  60. package/lib/form/src/form-input.d.ts +10 -0
  61. package/lib/form/src/form-radio.d.ts +18 -0
  62. package/lib/form/src/form-range-date.d.ts +10 -0
  63. package/lib/form/src/form-range-input-number.d.ts +10 -0
  64. package/lib/form/src/form-range-input.d.ts +10 -0
  65. package/lib/form/src/form-range-time.d.ts +10 -0
  66. package/lib/form/src/form-region-select.d.ts +10 -0
  67. package/lib/form/src/form-search-helper.d.ts +10 -0
  68. package/lib/form/src/form-select.d.ts +21 -0
  69. package/lib/form/src/form-switch.d.ts +10 -0
  70. package/lib/form/src/form-text-area.d.ts +10 -0
  71. package/lib/form/src/form-time.d.ts +10 -0
  72. package/lib/form/src/form-tinymce.d.ts +10 -0
  73. package/lib/form/src/form-tree-select.d.ts +23 -0
  74. package/lib/form/src/form-upload-file.d.ts +18 -0
  75. package/lib/form/src/form-upload-img.d.ts +18 -0
  76. package/lib/form/src/form.d.ts +169 -0
  77. package/lib/form/src/types.d.ts +251 -0
  78. package/lib/form/src/utils.d.ts +7 -0
  79. package/lib/form/style/index.less +243 -0
  80. package/lib/hooks/useForceUpdate.d.ts +1 -0
  81. package/lib/hooks/useOutsideClick.d.ts +2 -0
  82. package/lib/hooks/useResizeObserve.d.ts +5 -0
  83. package/lib/hooks/useUpdateEffect.d.ts +2 -0
  84. package/lib/index.d.ts +42 -0
  85. package/lib/index.esm.js +16 -0
  86. package/lib/index.full.js +1 -0
  87. package/lib/index.js +16 -0
  88. package/lib/locale/index.d.ts +11 -0
  89. package/lib/locale/index.js +51 -0
  90. package/lib/locale/lang/en.d.ts +243 -0
  91. package/lib/locale/lang/en.js +248 -0
  92. package/lib/locale/lang/zh-cn.d.ts +243 -0
  93. package/lib/locale/lang/zh-cn.js +248 -0
  94. package/lib/modal/index.d.ts +3 -0
  95. package/lib/modal/src/modal.d.ts +38 -0
  96. package/lib/modal/style/index.less +89 -0
  97. package/lib/pinyin/core.d.ts +12 -0
  98. package/lib/pinyin/dict.d.ts +31 -0
  99. package/lib/pinyin/index.d.ts +2 -0
  100. package/lib/pinyin/patchers/56l.d.ts +7 -0
  101. package/lib/qm-design.d.ts +28 -0
  102. package/lib/search-helper/index.d.ts +3 -0
  103. package/lib/search-helper/src/search-helper.d.ts +20 -0
  104. package/lib/search-helper/style/index.less +13 -0
  105. package/lib/space/index.d.ts +3 -0
  106. package/lib/space/src/space.d.ts +12 -0
  107. package/lib/space/style/index.less +12 -0
  108. package/lib/spin/index.d.ts +3 -0
  109. package/lib/spin/src/spin.d.ts +11 -0
  110. package/lib/spin/style/index.less +12 -0
  111. package/lib/split/index.d.ts +4 -0
  112. package/lib/split/src/context.d.ts +8 -0
  113. package/lib/split/src/resize-bar.d.ts +8 -0
  114. package/lib/split/src/split-pane.d.ts +9 -0
  115. package/lib/split/src/split.d.ts +14 -0
  116. package/lib/split/style/index.less +86 -0
  117. package/lib/style/common.less +8 -0
  118. package/lib/style/index.css +1 -0
  119. package/lib/style/index.less +32 -0
  120. package/lib/style/mixins/box.less +13 -0
  121. package/lib/style/mixins/clearfix.less +21 -0
  122. package/lib/style/mixins/index.less +11 -0
  123. package/lib/style/mixins/operation-unit.less +24 -0
  124. package/lib/style/mixins/reset.less +35 -0
  125. package/lib/style/mixins/size.less +15 -0
  126. package/lib/style/reset.less +134 -0
  127. package/lib/style/themes/default.less +113 -0
  128. package/lib/style/themes/index.less +7 -0
  129. package/lib/table/index.d.ts +4 -0
  130. package/lib/table/src/alert/index.d.ts +6 -0
  131. package/lib/table/src/body/index.d.ts +8 -0
  132. package/lib/table/src/body/useValueFormat.d.ts +12 -0
  133. package/lib/table/src/column-filter/index.d.ts +7 -0
  134. package/lib/table/src/config/index.d.ts +47 -0
  135. package/lib/table/src/context/index.d.ts +74 -0
  136. package/lib/table/src/edit/InputNumber.d.ts +17 -0
  137. package/lib/table/src/edit/index.d.ts +12 -0
  138. package/lib/table/src/empty/index.d.ts +3 -0
  139. package/lib/table/src/expandable/index.d.ts +8 -0
  140. package/lib/table/src/export/define.d.ts +8 -0
  141. package/lib/table/src/export/index.d.ts +18 -0
  142. package/lib/table/src/export/setting.d.ts +8 -0
  143. package/lib/table/src/export/useExport.d.ts +9 -0
  144. package/lib/table/src/filter/index.d.ts +8 -0
  145. package/lib/table/src/filter-sql/index.d.ts +5 -0
  146. package/lib/table/src/filter-sql/lib/filter_string.d.ts +11 -0
  147. package/lib/table/src/filter-sql/lib/operations.d.ts +8 -0
  148. package/lib/table/src/filter-sql/lib/variables_replacement.d.ts +5 -0
  149. package/lib/table/src/footer/index.d.ts +8 -0
  150. package/lib/table/src/full-screen/index.d.ts +6 -0
  151. package/lib/table/src/group-summary/index.d.ts +3 -0
  152. package/lib/table/src/group-summary/result.d.ts +9 -0
  153. package/lib/table/src/group-summary/setting.d.ts +6 -0
  154. package/lib/table/src/header/index.d.ts +10 -0
  155. package/lib/table/src/hooks/useImperativeMethod.d.ts +36 -0
  156. package/lib/table/src/hooks/useTableCore.d.ts +86 -0
  157. package/lib/table/src/hooks/useTableEffect.d.ts +35 -0
  158. package/lib/table/src/hooks/useTableLayout.d.ts +39 -0
  159. package/lib/table/src/hooks/useTableMemo.d.ts +43 -0
  160. package/lib/table/src/hooks/useTableRef.d.ts +89 -0
  161. package/lib/table/src/hooks/useTableState.d.ts +94 -0
  162. package/lib/table/src/icon/caretdown.d.ts +3 -0
  163. package/lib/table/src/icon/caretup.d.ts +3 -0
  164. package/lib/table/src/icon/filter.d.ts +3 -0
  165. package/lib/table/src/manager/index.d.ts +15 -0
  166. package/lib/table/src/pager/index.d.ts +11 -0
  167. package/lib/table/src/print/index.d.ts +7 -0
  168. package/lib/table/src/reload/index.d.ts +3 -0
  169. package/lib/table/src/resizable/index.d.ts +7 -0
  170. package/lib/table/src/select-collection/index.d.ts +7 -0
  171. package/lib/table/src/select-collection/result.d.ts +8 -0
  172. package/lib/table/src/selection/all.d.ts +7 -0
  173. package/lib/table/src/selection/index.d.ts +12 -0
  174. package/lib/table/src/store/index.d.ts +29 -0
  175. package/lib/table/src/super-search/index.d.ts +3 -0
  176. package/lib/table/src/super-search/result.d.ts +6 -0
  177. package/lib/table/src/table/index.d.ts +5 -0
  178. package/lib/table/src/table/props.d.ts +243 -0
  179. package/lib/table/src/table/types.d.ts +335 -0
  180. package/lib/table/src/utils/index.d.ts +37 -0
  181. package/lib/table/style/alert.less +34 -0
  182. package/lib/table/style/body.less +42 -0
  183. package/lib/table/style/column-filter.less +88 -0
  184. package/lib/table/style/empty.less +16 -0
  185. package/lib/table/style/expandable.less +55 -0
  186. package/lib/table/style/export.less +30 -0
  187. package/lib/table/style/footer.less +28 -0
  188. package/lib/table/style/full-screen.less +21 -0
  189. package/lib/table/style/group-summary.less +93 -0
  190. package/lib/table/style/header.less +178 -0
  191. package/lib/table/style/index.less +25 -0
  192. package/lib/table/style/pager.less +12 -0
  193. package/lib/table/style/print.less +21 -0
  194. package/lib/table/style/reload.less +21 -0
  195. package/lib/table/style/select-collection.less +21 -0
  196. package/lib/table/style/size.less +69 -0
  197. package/lib/table/style/super-search.less +102 -0
  198. package/lib/table/style/table.less +328 -0
  199. package/lib/table/style/toper.less +28 -0
  200. package/lib/table/style/variable.less +48 -0
  201. package/lib/tabs/index.d.ts +4 -0
  202. package/lib/tabs/src/tab-pane.d.ts +8 -0
  203. package/lib/tabs/src/tabs.d.ts +16 -0
  204. package/lib/tabs/style/index.less +22 -0
  205. package/lib/tinymce/index.d.ts +3 -0
  206. package/lib/tinymce/src/Events.d.ts +78 -0
  207. package/lib/tinymce/src/ScriptLoader.d.ts +13 -0
  208. package/lib/tinymce/src/TinyMCE.d.ts +2 -0
  209. package/lib/tinymce/src/Utils.d.ts +19 -0
  210. package/lib/tinymce/src/components/Editor.d.ts +66 -0
  211. package/lib/tinymce/src/components/EditorPropTypes.d.ts +18 -0
  212. package/lib/tinymce/src/index.d.ts +29 -0
  213. package/lib/tinymce/style/index.less +18 -0
  214. package/lib/upload-file/index.d.ts +3 -0
  215. package/lib/upload-file/src/upload-file.d.ts +16 -0
  216. package/lib/upload-file/style/index.less +12 -0
  217. package/lib/upload-img/index.d.ts +3 -0
  218. package/lib/upload-img/src/cropper-preview.d.ts +30 -0
  219. package/lib/upload-img/src/upload-img.d.ts +27 -0
  220. package/lib/upload-img/style/index.less +36 -0
  221. package/lib/version/index.d.ts +2 -0
  222. package/package.json +136 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 QM-Design
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 ADDED
@@ -0,0 +1,4 @@
1
+ ## QmDesign - A React UI library
2
+
3
+ - 💪 React 17.0.2
4
+ - 🔥 TypeScript
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const cloneElement: (element: React.ReactNode, ...restArgs: any[]) => {} | null | undefined;
@@ -0,0 +1,68 @@
1
+ import { CSSProperties, Nullable } from './types';
2
+ export declare const on: (element: Element | HTMLElement | Document | Window, event: string, handler: EventListenerOrEventListenerObject) => void;
3
+ export declare const off: (element: Element | HTMLElement | Document | Window, event: string, handler: EventListenerOrEventListenerObject) => void;
4
+ export declare const once: (el: HTMLElement, event: string, fn: EventListener) => void;
5
+ export declare const stop: (ev: Event) => void;
6
+ export declare const prevent: (ev: Event) => void;
7
+ /**
8
+ * @description 获取元素样式
9
+ * @param {HTMLNode} element 元素节点
10
+ * @param {string} styleName css 属性名称
11
+ * @returns css 样式的值
12
+ */
13
+ export declare const getStyle: (element: HTMLElement, styleName: string) => Nullable<string>;
14
+ /**
15
+ * @description 设置元素样式
16
+ * @param {HTMLNode} element 元素节点
17
+ * @param {string} styleName css 属性名称
18
+ * @param {string} value css 属性的值
19
+ * @returns
20
+ */
21
+ export declare const setStyle: (element: HTMLElement, styleName: CSSProperties | string, value?: string | undefined) => void;
22
+ /**
23
+ * @description 移除元素样式
24
+ * @param {HTMLNode} element 元素节点
25
+ * @param {string} styleName css 属性名称
26
+ * @returns
27
+ */
28
+ export declare const removeStyle: (element: HTMLElement, styleName: CSSProperties | string) => void;
29
+ /**
30
+ * @description 判断目标元素在坐标上,是否在参考节点里边
31
+ * @param {HTMLNode} el 目标节点
32
+ * @param {HTMLNode} container 参考节点
33
+ * @returns boolean
34
+ */
35
+ export declare const isInContainer: (el: HTMLElement, container: HTMLElement) => boolean;
36
+ /**
37
+ * @description 获取元素距离窗口顶部的上边距
38
+ * @param {HTMLNode} el 元素节点
39
+ * @returns 上边距的值
40
+ */
41
+ export declare const getOffsetTop: (el: HTMLElement) => number;
42
+ /**
43
+ * @description 获取目标元素距离参考节点的上边距
44
+ * @param {HTMLNode} el 目标节点
45
+ * @param {HTMLNode} container 参考节点
46
+ * @returns 上边距的值
47
+ */
48
+ export declare const getOffsetTopDistance: (el: HTMLElement, container: HTMLElement) => number;
49
+ /**
50
+ * @description 获取元素距离窗口的横纵坐标
51
+ * @param {HTMLNode} el 目标节点
52
+ * @returns 横纵坐标的值
53
+ */
54
+ export declare const getPosition: (el: HTMLElement) => Record<'x' | 'y', number>;
55
+ /**
56
+ * @description 获取满足条件的祖先元素
57
+ * @param {HTMLNode} el 参考节点
58
+ * @param {string} selector 目标节点 classname
59
+ * @returns 满足条件的祖先元素
60
+ */
61
+ export declare const getParentNode: (el: HTMLElement, selector: string) => Nullable<HTMLElement>;
62
+ /**
63
+ * @description 判断目标元素是否为参考节点的后代
64
+ * @param {HTMLNode} el 目标元素
65
+ * @param {HTMLNode} container 目标节点
66
+ * @returns boolean
67
+ */
68
+ export declare const contains: (el: HTMLElement, container: HTMLElement) => boolean;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @description 文件下载
3
+ * @param {Blob} blob 对象
4
+ * @param {string} fileName 文件名
5
+ * @returns
6
+ */
7
+ export declare const download: (blob: Blob, fileName: string) => void;
@@ -0,0 +1,2 @@
1
+ export declare function throwError(scope: string, m: string): void;
2
+ export declare function warn(scope: string, m: string): void;
@@ -0,0 +1,2 @@
1
+ declare const _default: boolean;
2
+ export default _default;
@@ -0,0 +1 @@
1
+ export declare const getPrefixCls: (suffixCls: string) => string;
@@ -0,0 +1,10 @@
1
+ import ResizeObserver from 'resize-observer-polyfill';
2
+ import type { CustomHTMLElement } from './types';
3
+ declare type IResizeListener = (option: ResizeObserverEntry) => void;
4
+ export declare type ResizableElement = CustomHTMLElement<{
5
+ __resizeListeners__?: Array<IResizeListener>;
6
+ __ro__?: ResizeObserver;
7
+ }>;
8
+ export declare const addResizeListener: (element: ResizableElement, fn: IResizeListener) => void;
9
+ export declare const removeResizeListener: (element: ResizableElement, fn: IResizeListener) => void;
10
+ export {};
@@ -0,0 +1 @@
1
+ export declare const getScrollBarWidth: () => number;
@@ -0,0 +1,33 @@
1
+ import type React from 'react';
2
+ export declare type Nullable<T> = T | null;
3
+ export declare type ValueOf<T> = T[keyof T];
4
+ export declare type DeepPartial<T> = {
5
+ [P in keyof T]?: T[P] extends Record<string, unknown> ? DeepPartial<T[P]> : T[P];
6
+ };
7
+ export declare type JSXElement = React.ReactNode | JSX.Element;
8
+ export declare type AnyObject<T> = {
9
+ [key: string]: T;
10
+ };
11
+ export declare type AnyFunction<T> = (...args: any[]) => T;
12
+ export declare type CustomHTMLElement<T> = HTMLElement & T;
13
+ export declare type CSSProperties = React.CSSProperties;
14
+ export declare type TimeoutHandle = ReturnType<typeof setTimeout>;
15
+ export declare type IntervalHandle = ReturnType<typeof setInterval>;
16
+ export declare type AjaxResponse<T = any> = {
17
+ code: number;
18
+ data: T;
19
+ msg: string;
20
+ };
21
+ export declare enum SizeHeight {
22
+ large = 40,
23
+ middle = 32,
24
+ small = 24
25
+ }
26
+ export declare type ComponentSize = 'small' | 'middle' | 'large';
27
+ export declare type Locale = 'zh-cn' | 'en';
28
+ export declare type IDict = {
29
+ text: string;
30
+ value: string;
31
+ disabled?: boolean;
32
+ children?: Array<IDict> | Nullable<undefined>;
33
+ };
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+ import { isNumber, isString, isUndefined, isFunction, isArray, isPlainObject as isObject, debounce, throttle, get } from 'lodash-es';
3
+ import { AnyFunction, AnyObject } from './types';
4
+ export { isNumber, isString, isArray, isUndefined, isFunction, isObject, debounce, throttle, get };
5
+ export declare const isIE: () => boolean;
6
+ export declare const isEdge: () => boolean;
7
+ export declare const isChrome: () => boolean;
8
+ export declare const isFirefox: () => boolean;
9
+ export declare const isSimpleValue: (x: unknown) => boolean;
10
+ export declare const isValidElement: (c: React.ReactNode) => boolean;
11
+ export declare const isFragment: (c: React.ReactNode) => boolean;
12
+ export declare const noop: () => void;
13
+ export declare const trueNoop: () => boolean;
14
+ export declare const hasOwn: <T extends AnyObject<unknown>>(obj: T, key: string) => boolean;
15
+ export declare const sleep: (delay: number) => Promise<unknown>;
16
+ export declare const nextTick: (cb: AnyFunction<void>) => void;
17
+ export declare const errorCapture: (asyncFn: AnyFunction<any>, ...params: any[]) => Promise<any[]>;
18
+ export declare const camelize: (input: string) => string;
19
+ export declare const isEmpty: (val: any) => boolean;
20
+ export declare const isValid: (val: string) => boolean;
21
+ export declare const getValueByPath: (obj: AnyObject<any>, paths?: string) => unknown;
22
+ export declare const getParserWidth: (val: number | string) => string;
23
+ export declare const flatJson: <T extends Record<string, any>>(jsonObject: T) => T;
@@ -0,0 +1,2 @@
1
+ export declare const isValidWidthUnit: (val: string | number) => boolean;
2
+ export declare const isValidComponentSize: (val: string) => boolean;
@@ -0,0 +1,4 @@
1
+ import Anchor from './src/anchor';
2
+ export type { QmAnchorProps } from './src/anchor';
3
+ export type { QmAnchorItemProps } from './src/anchor-item';
4
+ export default Anchor;
@@ -0,0 +1,13 @@
1
+ import React, { Component } from 'react';
2
+ import { CSSProperties } from '../../_utils/types';
3
+ declare type IProps = {
4
+ label: string;
5
+ showDivider?: boolean;
6
+ style?: CSSProperties;
7
+ className?: string;
8
+ };
9
+ export declare type QmAnchorItemProps = IProps;
10
+ declare class QmAnchorItem extends Component<IProps> {
11
+ render(): React.ReactElement;
12
+ }
13
+ export default QmAnchorItem;
@@ -0,0 +1,12 @@
1
+ import React, { Component } from 'react';
2
+ import { AnyFunction } from '../../_utils/types';
3
+ declare type IProps = {
4
+ activeKey: number;
5
+ labels: string[];
6
+ onTabClick: AnyFunction<void>;
7
+ };
8
+ declare class AnchorNav extends Component<IProps> {
9
+ renderLabel(prefixCls: string): React.ReactNode[];
10
+ render(): React.ReactElement;
11
+ }
12
+ export default AnchorNav;
@@ -0,0 +1,52 @@
1
+ import React, { Component } from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import { ComponentSize, CSSProperties } from '../../_utils/types';
4
+ declare type ILabelItem = {
5
+ id: string;
6
+ label: string;
7
+ };
8
+ declare type IProps = {
9
+ size?: ComponentSize;
10
+ labelWidth?: number | string;
11
+ labelList?: Array<ILabelItem>;
12
+ className?: string;
13
+ style?: CSSProperties;
14
+ };
15
+ declare type IState = {
16
+ activeKey: number;
17
+ };
18
+ export declare type QmAnchorProps = IProps;
19
+ declare class QmAnchor extends Component<IProps, IState> {
20
+ static Item: React.ClassicComponentClass<{
21
+ label: string;
22
+ showDivider?: boolean | undefined;
23
+ style?: React.CSSProperties | undefined;
24
+ className?: string | undefined;
25
+ }>;
26
+ static propTypes: {
27
+ size: (props: any, propName: any, componentName: any) => void;
28
+ labelWidth: (props: any, propName: any, componentName: any) => void;
29
+ labelList: PropTypes.Requireable<(PropTypes.InferProps<{
30
+ id: PropTypes.Requireable<string>;
31
+ label: PropTypes.Requireable<string>;
32
+ }> | null | undefined)[]>;
33
+ };
34
+ static defaultProps: {
35
+ labelWidth: number;
36
+ };
37
+ static contextType: React.Context<import("../../config-provider/context").IConfig | undefined>;
38
+ private currentState;
39
+ private timer;
40
+ private scrollEvent;
41
+ private scrollRef;
42
+ private get __is_conf();
43
+ state: IState;
44
+ componentDidMount(): void;
45
+ componentWillUnmount(): void;
46
+ createDistances(): number[];
47
+ findCurrentIndex(t: number): number;
48
+ onScrollHandle: (ev: MouseEvent) => void;
49
+ onTabClickHandle: (index: number, ev: MouseEvent) => void;
50
+ render(): React.ReactElement;
51
+ }
52
+ export default QmAnchor;
@@ -0,0 +1,60 @@
1
+ /*
2
+ * @Author: 焦质晔
3
+ * @Date: 2021-07-23 19:05:57
4
+ * @Last Modified by: 焦质晔
5
+ * @Last Modified time: 2021-07-31 22:38:07
6
+ */
7
+ @import '../../style/common';
8
+
9
+ @prefix-anchor: ~'@{qm-prefix}-anchor';
10
+
11
+ .@{prefix-anchor} {
12
+ .reset-component;
13
+ display: flex;
14
+ flex-direction: row;
15
+ &__label {
16
+ width: 90px;
17
+ }
18
+ &-nav {
19
+ height: 100%;
20
+ margin-right: @--margin-md;
21
+ border-right: 1px solid @--border-color-base;
22
+ &__item {
23
+ display: flex;
24
+ align-items: center;
25
+ justify-content: flex-end;
26
+ height: @--height-md;
27
+ padding-right: @--padding-md;
28
+ position: relative;
29
+ cursor: pointer;
30
+ &.actived {
31
+ color: @--primary-color;
32
+ &::after {
33
+ content: '';
34
+ position: absolute;
35
+ right: -2px;
36
+ top: 0;
37
+ width: 2px;
38
+ height: 100%;
39
+ background-color: @--primary-color;
40
+ }
41
+ }
42
+ span {
43
+ .text-overflow-cut();
44
+ display: block;
45
+ text-align: right;
46
+ }
47
+ }
48
+ }
49
+ &__container {
50
+ flex: 1;
51
+ overflow-x: hidden !important;
52
+ overflow-y: auto;
53
+ }
54
+ // ------ size ------
55
+ // 40 32 24
56
+ &--lg {
57
+ }
58
+ &--sm {
59
+ }
60
+ }
@@ -0,0 +1,4 @@
1
+ import { Dayjs } from 'dayjs';
2
+ import 'antd/es/calendar/style';
3
+ declare const Calendar: (props: import("antd/es/calendar/generateCalendar").CalendarProps<Dayjs>) => JSX.Element;
4
+ export default Calendar;
@@ -0,0 +1,11 @@
1
+ import { Dayjs } from 'dayjs';
2
+ import 'antd/es/date-picker/style/index';
3
+ declare const DatePicker: import("antd/es/date-picker/generatePicker/interface").PickerComponentClass<import("antd/es/date-picker/generatePicker").PickerProps<Dayjs>, unknown> & {
4
+ WeekPicker: import("antd/es/date-picker/generatePicker/interface").PickerComponentClass<Omit<import("antd/es/date-picker/generatePicker").PickerDateProps<Dayjs>, "picker">, unknown>;
5
+ MonthPicker: import("antd/es/date-picker/generatePicker/interface").PickerComponentClass<Omit<import("antd/es/date-picker/generatePicker").PickerDateProps<Dayjs>, "picker">, unknown>;
6
+ YearPicker: import("antd/es/date-picker/generatePicker/interface").PickerComponentClass<Omit<import("antd/es/date-picker/generatePicker").PickerDateProps<Dayjs>, "picker">, unknown>;
7
+ RangePicker: import("antd/es/date-picker/generatePicker/interface").PickerComponentClass<import("antd/es/date-picker/generatePicker").RangePickerProps<Dayjs>, unknown>;
8
+ TimePicker: import("antd/es/date-picker/generatePicker/interface").PickerComponentClass<Omit<import("antd/es/date-picker/generatePicker").PickerTimeProps<Dayjs>, "picker">, unknown>;
9
+ QuarterPicker: import("antd/es/date-picker/generatePicker/interface").PickerComponentClass<Omit<import("antd/es/date-picker/generatePicker").PickerTimeProps<Dayjs>, "picker">, unknown>;
10
+ };
11
+ export default DatePicker;
@@ -0,0 +1,14 @@
1
+ import { Dayjs } from 'dayjs';
2
+ import * as React from 'react';
3
+ import { PickerTimeProps, RangePickerTimeProps } from 'antd/es/date-picker/generatePicker';
4
+ export interface TimePickerProps extends Omit<PickerTimeProps<Dayjs>, 'picker'> {
5
+ }
6
+ export interface TimeRangePickerProps extends Omit<RangePickerTimeProps<Dayjs>, 'picker'> {
7
+ }
8
+ declare const TimePicker: React.ForwardRefExoticComponent<TimePickerProps & React.RefAttributes<any>>;
9
+ declare const RangePicker: React.ForwardRefExoticComponent<TimeRangePickerProps & React.RefAttributes<any>>;
10
+ declare type MergedTimePicker = typeof TimePicker & {
11
+ RangePicker: typeof RangePicker;
12
+ };
13
+ declare const _default: MergedTimePicker;
14
+ export default _default;
@@ -0,0 +1,123 @@
1
+ export type { AffixProps } from 'antd';
2
+ export { Affix } from 'antd';
3
+ export type { AnchorProps, AnchorLinkProps } from 'antd';
4
+ export { Anchor } from 'antd';
5
+ export type { AutoCompleteProps } from 'antd';
6
+ export { AutoComplete } from 'antd';
7
+ export type { AlertProps } from 'antd';
8
+ export { Alert } from 'antd';
9
+ export type { AvatarProps } from 'antd';
10
+ export { Avatar } from 'antd';
11
+ export type { BackTopProps } from 'antd';
12
+ export { BackTop } from 'antd';
13
+ export type { BadgeProps } from 'antd';
14
+ export { Badge } from 'antd';
15
+ export type { BreadcrumbProps, BreadcrumbItemProps } from 'antd';
16
+ export { Breadcrumb } from 'antd';
17
+ export type { ButtonProps } from 'antd';
18
+ export { Button } from 'antd';
19
+ export type { CalendarProps } from 'antd';
20
+ export { default as Calendar } from './Calendar';
21
+ export type { CardProps } from 'antd';
22
+ export { Card } from 'antd';
23
+ export type { CollapseProps, CollapsePanelProps } from 'antd';
24
+ export { Collapse } from 'antd';
25
+ export type { CarouselProps } from 'antd';
26
+ export { Carousel } from 'antd';
27
+ export type { CascaderProps } from 'antd';
28
+ export { Cascader } from 'antd';
29
+ export type { CheckboxProps, CheckboxOptionType } from 'antd';
30
+ export { Checkbox } from 'antd';
31
+ export type { ColProps } from 'antd';
32
+ export { Col } from 'antd';
33
+ export type { CommentProps } from 'antd';
34
+ export { Comment } from 'antd';
35
+ export { ConfigProvider } from 'antd';
36
+ export type { DatePickerProps } from 'antd';
37
+ export { default as DatePicker } from './DatePicker';
38
+ export type { DescriptionsProps } from 'antd';
39
+ export { Descriptions } from 'antd';
40
+ export type { DividerProps } from 'antd';
41
+ export { Divider } from 'antd';
42
+ export type { DropDownProps } from 'antd';
43
+ export { Dropdown } from 'antd';
44
+ export type { DrawerProps } from 'antd';
45
+ export { Drawer } from 'antd';
46
+ export type { EmptyProps } from 'antd';
47
+ export { Empty } from 'antd';
48
+ export type { FormInstance, FormProps, FormItemProps } from 'antd';
49
+ export { Form } from 'antd';
50
+ export { Grid } from 'antd';
51
+ export type { InputProps } from 'antd';
52
+ export { Input } from 'antd';
53
+ export type { ImageProps } from 'antd';
54
+ export { Image } from 'antd';
55
+ export type { InputNumberProps } from 'antd';
56
+ export { InputNumber } from 'antd';
57
+ export type { LayoutProps } from 'antd';
58
+ export { Layout } from 'antd';
59
+ export type { ListProps } from 'antd';
60
+ export { List } from 'antd';
61
+ export type { MessageArgsProps } from 'antd';
62
+ export { message } from 'antd';
63
+ export type { MenuProps, MenuTheme, SubMenuProps, MenuItemProps } from 'antd';
64
+ export { Menu } from 'antd';
65
+ export type { MentionProps } from 'antd';
66
+ export { Mentions } from 'antd';
67
+ export type { ModalProps, ModalFuncProps } from 'antd';
68
+ export { Modal } from 'antd';
69
+ export type { StatisticProps } from 'antd';
70
+ export { Statistic } from 'antd';
71
+ export { notification } from 'antd';
72
+ export type { PageHeaderProps } from 'antd';
73
+ export { PageHeader } from 'antd';
74
+ export type { PaginationProps } from 'antd';
75
+ export { Pagination } from 'antd';
76
+ export type { PopconfirmProps } from 'antd';
77
+ export { Popconfirm } from 'antd';
78
+ export type { PopoverProps } from 'antd';
79
+ export { Popover } from 'antd';
80
+ export type { ProgressProps } from 'antd';
81
+ export { Progress } from 'antd';
82
+ export type { RadioProps, RadioChangeEvent, RadioGroupProps } from 'antd';
83
+ export { Radio } from 'antd';
84
+ export type { RateProps } from 'antd';
85
+ export { Rate } from 'antd';
86
+ export type { ResultProps } from 'antd';
87
+ export { Result } from 'antd';
88
+ export type { RowProps } from 'antd';
89
+ export { Row } from 'antd';
90
+ export type { SelectProps } from 'antd';
91
+ export { Select } from 'antd';
92
+ export type { SkeletonProps } from 'antd';
93
+ export { Skeleton } from 'antd';
94
+ export type { SliderSingleProps } from 'antd';
95
+ export { Slider } from 'antd';
96
+ export type { SpaceProps } from 'antd';
97
+ export { Space } from 'antd';
98
+ export type { SpinProps } from 'antd';
99
+ export { Spin } from 'antd';
100
+ export type { StepProps, StepsProps } from 'antd';
101
+ export { Steps } from 'antd';
102
+ export type { SwitchProps } from 'antd';
103
+ export { Switch } from 'antd';
104
+ export type { TransferProps } from 'antd';
105
+ export { Transfer } from 'antd';
106
+ export type { TreeProps, TreeNodeProps, TreeDataNode } from 'antd';
107
+ export { Tree } from 'antd';
108
+ export type { TreeSelectProps } from 'antd';
109
+ export { TreeSelect } from 'antd';
110
+ export type { TabsProps, TabPaneProps } from 'antd';
111
+ export { Tabs } from 'antd';
112
+ export type { TagProps, TagType } from 'antd';
113
+ export { Tag } from 'antd';
114
+ export type { TimePickerProps, TimeRangePickerProps } from 'antd';
115
+ export { default as TimePicker } from './TimePicker';
116
+ export type { TimelineProps, TimelineItemProps } from 'antd';
117
+ export { Timeline } from 'antd';
118
+ export type { TooltipProps } from 'antd';
119
+ export { Tooltip } from 'antd';
120
+ export type { TypographyProps } from 'antd';
121
+ export { Typography } from 'antd';
122
+ export type { UploadProps } from 'antd';
123
+ export { Upload } from 'antd';
@@ -0,0 +1,7 @@
1
+ /*
2
+ * @Author: 焦质晔
3
+ * @Date: 2021-07-23 19:41:37
4
+ * @Last Modified by: 焦质晔
5
+ * @Last Modified time: 2021-07-30 10:47:18
6
+ */
7
+ @import 'antd/dist/antd.less';
@@ -0,0 +1,3 @@
1
+ import Button from './src/button';
2
+ export type { QmButtonProps } from './src/button';
3
+ export default Button;
@@ -0,0 +1,30 @@
1
+ import React, { Component } from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import type { ButtonProps } from '../../antd';
4
+ declare type IProps = ButtonProps & {
5
+ click?: () => Promise<void>;
6
+ confirm?: {
7
+ title?: string;
8
+ onConfirm?: () => void;
9
+ onCancel?: (ev: any) => void;
10
+ };
11
+ };
12
+ declare type IState = {
13
+ isLoading: boolean;
14
+ };
15
+ export declare type QmButtonProps = IProps;
16
+ declare class QmButton extends Component<IProps, IState> {
17
+ static propTypes: {
18
+ click: PropTypes.Requireable<(...args: any[]) => any>;
19
+ confirm: PropTypes.Requireable<PropTypes.InferProps<{
20
+ title: PropTypes.Requireable<string>;
21
+ onConfirm: PropTypes.Requireable<(...args: any[]) => any>;
22
+ onCancel: PropTypes.Requireable<(...args: any[]) => any>;
23
+ }>>;
24
+ };
25
+ static contextType: React.Context<import("../../config-provider/context").IConfig | undefined>;
26
+ state: IState;
27
+ clickHandle: () => Promise<void>;
28
+ render(): React.ReactElement;
29
+ }
30
+ export default QmButton;
@@ -0,0 +1,12 @@
1
+ /*
2
+ * @Author: 焦质晔
3
+ * @Date: 2021-07-23 19:05:57
4
+ * @Last Modified by: 焦质晔
5
+ * @Last Modified time: 2021-07-31 22:38:07
6
+ */
7
+ @import '../../style/common';
8
+
9
+ @prefix-button: ~'@{qm-prefix}-button';
10
+
11
+ .@{prefix-button} {
12
+ }
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { Locale, ComponentSize } from '../_utils/types';
3
+ export declare type IConfig = {
4
+ locale: Locale;
5
+ size: ComponentSize;
6
+ global: Record<string, any>;
7
+ };
8
+ declare const ConfigContext: import("react").Context<IConfig | undefined>;
9
+ export default ConfigContext;
@@ -0,0 +1,3 @@
1
+ import ConfigProvider from './src/config-provider';
2
+ export type { QmConfigProviderProps } from './src/config-provider';
3
+ export default ConfigProvider;
@@ -0,0 +1,34 @@
1
+ import React, { Component } from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import type { IConfig } from '../context';
4
+ declare type IProps = {
5
+ locale: IConfig['locale'];
6
+ size: IConfig['size'];
7
+ theme?: string;
8
+ global?: IConfig['global'];
9
+ };
10
+ declare type IState = {
11
+ value: IConfig;
12
+ };
13
+ export declare type QmConfigProviderProps = IProps;
14
+ declare class QmConfigProvider extends Component<IProps, IState> {
15
+ static propTypes: {
16
+ locale: PropTypes.Requireable<string>;
17
+ size: (props: any, propName: any, componentName: any) => void;
18
+ theme: PropTypes.Requireable<string>;
19
+ global: PropTypes.Requireable<object>;
20
+ };
21
+ static defaultProps: {
22
+ locale: string;
23
+ size: string;
24
+ };
25
+ constructor(props: IProps);
26
+ static getDerivedStateFromProps(nextProps: IProps, prevState: IState): {
27
+ value: IConfig & {
28
+ locale: import("../../_utils/types").Locale;
29
+ size: import("../../_utils/types").ComponentSize;
30
+ };
31
+ } | null;
32
+ render(): React.ReactElement;
33
+ }
34
+ export default QmConfigProvider;
@@ -0,0 +1,3 @@
1
+ import Countup from './src/countup';
2
+ export type { QmCountupProps } from './src/countup';
3
+ export default Countup;
@@ -0,0 +1,17 @@
1
+ import React, { Component } from 'react';
2
+ import { CountUpProps } from 'react-countup/build/CountUp';
3
+ import { ComponentSize, CSSProperties } from '../../_utils/types';
4
+ declare type IProps = CountUpProps & {
5
+ size?: ComponentSize;
6
+ className?: string;
7
+ style?: CSSProperties;
8
+ };
9
+ export declare type QmCountupProps = IProps;
10
+ declare class QmCountup extends Component<IProps> {
11
+ static defaultProps: {
12
+ duration: number;
13
+ };
14
+ static contextType: React.Context<import("../../config-provider/context").IConfig | undefined>;
15
+ render(): React.ReactElement;
16
+ }
17
+ export default QmCountup;
@@ -0,0 +1,22 @@
1
+ /*
2
+ * @Author: 焦质晔
3
+ * @Date: 2021-07-23 19:05:57
4
+ * @Last Modified by: 焦质晔
5
+ * @Last Modified time: 2021-08-01 21:58:46
6
+ */
7
+ @import '../../style/common';
8
+
9
+ @prefix-countup: ~'@{qm-prefix}-countup';
10
+
11
+ .@{prefix-countup} {
12
+ .reset-component;
13
+ font-size: @--font-size-base;
14
+ // ------ size ------
15
+ // 40 32 24
16
+ &--lg {
17
+ font-size: @--font-size-base;
18
+ }
19
+ &--sm {
20
+ font-size: @--font-size-sm;
21
+ }
22
+ }