@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
@@ -0,0 +1,28 @@
1
+ /*
2
+ * @Author: 焦质晔
3
+ * @Date: 2021-02-09 11:26:35
4
+ * @Last Modified by: 焦质晔
5
+ * @Last Modified time: 2021-10-15 09:36:56
6
+ */
7
+ declare module '*.svg' {
8
+ import * as React from 'react';
9
+ export const ReactComponent: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
10
+ const src: string;
11
+ export default src;
12
+ }
13
+
14
+ declare module '*.css' {
15
+ const resource: { [key: string]: string };
16
+ export default resource;
17
+ }
18
+
19
+ declare module '*.less' {
20
+ const resource: { [key: string]: string };
21
+ export default resource;
22
+ }
23
+
24
+ declare module '*.json' {
25
+ const value: any;
26
+ export const version: string;
27
+ export default value;
28
+ }
@@ -0,0 +1,3 @@
1
+ import SearchHelper from './src/search-helper';
2
+ export type { QmSearchHelperProps } from './src/search-helper';
3
+ export default SearchHelper;
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import type { IFormItem, IFormData } from '../../form/src/types';
3
+ import type { IFetch, IColumn, IRowKey, IRecord } from '../../table/src/table/types';
4
+ import type { ComponentSize } from '../../_utils/types';
5
+ declare type IProps = {
6
+ size?: ComponentSize;
7
+ uniqueKey?: string;
8
+ initialValue?: IFormData;
9
+ filters?: IFormItem[];
10
+ table?: {
11
+ fetch?: IFetch;
12
+ columns?: IColumn[];
13
+ rowKey?: ((row: IRecord, index: number) => IRowKey) | IRowKey;
14
+ webPagination?: boolean;
15
+ };
16
+ onClose: (data: IRecord | null) => void;
17
+ };
18
+ export declare type QmSearchHelperProps = IProps;
19
+ declare const SearchHelper: React.FC<IProps>;
20
+ export default SearchHelper;
@@ -0,0 +1,13 @@
1
+ /*
2
+ * @Author: 焦质晔
3
+ * @Date: 2022-01-11 18:01:20
4
+ * @Last Modified by: 焦质晔
5
+ * @Last Modified time: 2022-01-11 18:43:06
6
+ */
7
+ @import '../../style/common';
8
+
9
+ @prefix-helper: ~'@{qm-prefix}-search-helper';
10
+
11
+ .@{prefix-helper}--wrapper {
12
+ .reset-component();
13
+ }
@@ -0,0 +1,3 @@
1
+ import Space from './src/space';
2
+ export type { QmSpaceProps } from './src/space';
3
+ export default Space;
@@ -0,0 +1,12 @@
1
+ import React, { Component } from 'react';
2
+ import { ComponentSize } from '../../_utils/types';
3
+ import type { SpaceProps } from '../../antd';
4
+ declare type IProps = Omit<SpaceProps, 'size'> & {
5
+ size?: ComponentSize | number;
6
+ };
7
+ export declare type QmSpaceProps = IProps;
8
+ declare class QmSpace extends Component<IProps> {
9
+ static contextType: React.Context<import("../../config-provider/context").IConfig | undefined>;
10
+ render(): React.ReactElement;
11
+ }
12
+ export default QmSpace;
@@ -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:37:33
6
+ */
7
+ @import '../../style/common';
8
+
9
+ @prefix-space: ~'@{qm-prefix}-space';
10
+
11
+ .@{prefix-space} {
12
+ }
@@ -0,0 +1,3 @@
1
+ import Spin from './src/spin';
2
+ export type { QmSpinProps } from './src/spin';
3
+ export default Spin;
@@ -0,0 +1,11 @@
1
+ import React, { Component } from 'react';
2
+ import type { SpinProps } from '../../antd';
3
+ declare type IProps = SpinProps;
4
+ export declare type QmSpinProps = IProps;
5
+ declare class QmSpin extends Component<IProps> {
6
+ static defaultProps: {
7
+ tip: string;
8
+ };
9
+ render(): React.ReactElement;
10
+ }
11
+ export default QmSpin;
@@ -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-spin: ~'@{qm-prefix}-spin';
10
+
11
+ .@{prefix-spin} {
12
+ }
@@ -0,0 +1,4 @@
1
+ import Split from './src/split';
2
+ export type { QmSplitProps } from './src/split';
3
+ export type { QmSplitPaneProps } from './src/split-pane';
4
+ export default Split;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ export declare type ISplitContext = {
3
+ splitRef: React.RefObject<HTMLDivElement>;
4
+ direction: 'horizontal' | 'vertical';
5
+ dragging: boolean;
6
+ };
7
+ declare const SplitContext: React.Context<ISplitContext | undefined>;
8
+ export default SplitContext;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ declare type IProps = {
3
+ minValues: number[];
4
+ onDragChange: (value: boolean) => void;
5
+ onDragging: (value: string) => void;
6
+ };
7
+ declare const ResizeBar: React.FC<IProps>;
8
+ export default ResizeBar;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ declare type IProps = {
3
+ min: number | string;
4
+ };
5
+ export declare type QmSplitPaneProps = IProps;
6
+ declare const QmSplitPane: React.FC<IProps & {
7
+ offset?: string;
8
+ }>;
9
+ export default QmSplitPane;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import type { QmSplitPaneProps } from './split-pane';
3
+ declare type IProps = {
4
+ direction?: 'horizontal' | 'vertical';
5
+ defaultValue?: number | string;
6
+ uniqueKey?: string;
7
+ onChange?: (offset: string) => void;
8
+ children?: React.ReactElement;
9
+ };
10
+ export declare type QmSplitProps = IProps;
11
+ declare const QmSplit: React.FC<IProps> & {
12
+ Pane: React.FunctionComponent<QmSplitPaneProps>;
13
+ };
14
+ export default QmSplit;
@@ -0,0 +1,86 @@
1
+ /*
2
+ * @Author: 焦质晔
3
+ * @Date: 2021-02-09 09:27:46
4
+ * @Last Modified by: 焦质晔
5
+ * @Last Modified time: 2021-11-05 13:33:02
6
+ */
7
+ @import '../../style/common';
8
+
9
+ @prefix-split: ~'@{qm-prefix}-split';
10
+ @prefix-split-pane: ~'@{qm-prefix}-split-pane';
11
+
12
+ .@{prefix-split} {
13
+ .reset-component();
14
+ display: flex;
15
+ width: 100%;
16
+ height: 100%;
17
+ &.vertical {
18
+ flex-direction: column;
19
+ }
20
+ &__resize-bar {
21
+ position: relative;
22
+ background-color: transparent;
23
+ border-radius: @--border-radius-base - 1px;
24
+ transition: all 0.4s ease;
25
+ user-select: none;
26
+ box-sizing: border-box;
27
+ z-index: 1;
28
+ &.horizontal {
29
+ width: 11px;
30
+ margin: 0 -5px;
31
+ cursor: col-resize;
32
+ &::after {
33
+ content: ' ';
34
+ position: absolute;
35
+ top: 0;
36
+ bottom: 0;
37
+ left: 50%;
38
+ width: 0;
39
+ pointer-events: none;
40
+ border-left: 1px solid @--border-color-base;
41
+ }
42
+ }
43
+ &.vertical {
44
+ height: 11px;
45
+ margin: -5px 0;
46
+ cursor: row-resize;
47
+ &::after {
48
+ content: ' ';
49
+ position: absolute;
50
+ left: 0;
51
+ right: 0;
52
+ top: 50%;
53
+ height: 0;
54
+ pointer-events: none;
55
+ border-top: 1px solid @--border-color-base;
56
+ }
57
+ }
58
+ &:hover,
59
+ &:active {
60
+ background-color: @--background-color;
61
+ }
62
+ }
63
+ .@{prefix-split-pane} {
64
+ overflow: auto;
65
+ box-sizing: border-box;
66
+ &.horizontal {
67
+ &:nth-child(1) {
68
+ padding-right: 5px;
69
+ }
70
+ &:nth-child(3) {
71
+ padding-left: 5px;
72
+ }
73
+ }
74
+ &.vertical {
75
+ &:nth-of-type(1) {
76
+ padding-bottom: 5px;
77
+ }
78
+ &:nth-of-type(3) {
79
+ padding-top: 5px;
80
+ }
81
+ }
82
+ &.isLocked {
83
+ pointer-events: none;
84
+ }
85
+ }
86
+ }
@@ -0,0 +1,8 @@
1
+ /*
2
+ * @Author: 焦质晔
3
+ * @Date: 2021-02-09 15:40:02
4
+ * @Last Modified by: 焦质晔
5
+ * @Last Modified time: 2021-07-23 19:04:46
6
+ */
7
+ @import './themes/index';
8
+ @import './mixins/index';