@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,32 @@
1
+ /*
2
+ * @Author: 焦质晔
3
+ * @Date: 2021-07-23 18:23:59
4
+ * @Last Modified by: 焦质晔
5
+ * @Last Modified time: 2022-01-11 18:01:47
6
+ */
7
+ /* Reset And Font */
8
+ @import './reset';
9
+
10
+ /* Antd */
11
+ @import '../antd/index.less';
12
+
13
+ /* QmDesign */
14
+ @import '../button/style/index.less';
15
+ @import '../space/style/index.less';
16
+ @import '../divider/style/index.less';
17
+ @import '../split/style/index.less';
18
+ @import '../countup/style/index.less';
19
+ @import '../empty/style/index.less';
20
+ @import '../spin/style/index.less';
21
+ @import '../download/style/index.less';
22
+ @import '../anchor/style/index.less';
23
+ @import '../tabs/style/index.less';
24
+ @import '../drawer/style/index.less';
25
+ @import '../modal/style/index.less';
26
+ @import '../form/style/index.less';
27
+ @import '../tinymce/style/index.less';
28
+ @import '../cropper/style/index.less';
29
+ @import '../upload-file/style/index.less';
30
+ @import '../upload-img/style/index.less';
31
+ @import '../table/style/index.less';
32
+ @import '../search-helper/style/index.less';
@@ -0,0 +1,13 @@
1
+ /*
2
+ * @Author: 焦质晔
3
+ * @Date: 2021-07-23 18:58:07
4
+ * @Last Modified by: 焦质晔
5
+ * @Last Modified time: 2021-07-23 18:58:07
6
+ */
7
+ .box(@position: absolute) {
8
+ position: @position;
9
+ top: 0;
10
+ right: 0;
11
+ bottom: 0;
12
+ left: 0;
13
+ }
@@ -0,0 +1,21 @@
1
+ /*
2
+ * @Author: 焦质晔
3
+ * @Date: 2021-07-23 18:58:15
4
+ * @Last Modified by: 焦质晔
5
+ * @Last Modified time: 2021-07-23 18:58:15
6
+ */
7
+ // mixins for clearfix
8
+ // ------------------------
9
+ .clearfix() {
10
+ // https://github.com/ant-design/ant-design/issues/21301#issuecomment-583955229
11
+ &::before {
12
+ display: table;
13
+ content: '';
14
+ }
15
+ &::after {
16
+ // https://github.com/ant-design/ant-design/issues/21864
17
+ display: table;
18
+ clear: both;
19
+ content: '';
20
+ }
21
+ }
@@ -0,0 +1,11 @@
1
+ /*
2
+ * @Author: 焦质晔
3
+ * @Date: 2021-07-23 18:59:22
4
+ * @Last Modified by: 焦质晔
5
+ * @Last Modified time: 2021-07-23 18:59:53
6
+ */
7
+ @import './size';
8
+ @import './clearfix';
9
+ @import './reset';
10
+ @import './operation-unit';
11
+ @import './box';
@@ -0,0 +1,24 @@
1
+ /*
2
+ * @Author: 焦质晔
3
+ * @Date: 2021-07-23 18:58:20
4
+ * @Last Modified by: 焦质晔
5
+ * @Last Modified time: 2021-07-23 18:59:02
6
+ */
7
+ @import '../themes/index';
8
+
9
+ .operation-unit() {
10
+ color: @--link-color;
11
+ text-decoration: none;
12
+ outline: none;
13
+ cursor: pointer;
14
+ transition: color 0.3s;
15
+
16
+ &:focus,
17
+ &:hover {
18
+ color: @--link-hover-color;
19
+ }
20
+
21
+ &:active {
22
+ color: @--link-active-color;
23
+ }
24
+ }
@@ -0,0 +1,35 @@
1
+ /*
2
+ * @Author: 焦质晔
3
+ * @Date: 2021-07-23 18:58:43
4
+ * @Last Modified by: 焦质晔
5
+ * @Last Modified time: 2021-07-23 18:58:43
6
+ */
7
+ @import '../themes/index';
8
+
9
+ .reset-component() {
10
+ box-sizing: border-box;
11
+ margin: 0;
12
+ padding: 0;
13
+ color: @--text-color;
14
+ font-size: @--font-size-base;
15
+ font-variant: @font-variant-base;
16
+ line-height: @--line-height-base;
17
+ list-style: none;
18
+ font-feature-settings: @font-feature-settings-base;
19
+ }
20
+
21
+ .box-sizing-content() {
22
+ box-sizing: border-box;
23
+ }
24
+
25
+ .text-overflow-cut() {
26
+ overflow: hidden;
27
+ text-overflow: ellipsis;
28
+ white-space: nowrap;
29
+ }
30
+
31
+ .user-select-none() {
32
+ -moz-user-select: none;
33
+ -webkit-user-select: none;
34
+ -ms-user-select: none;
35
+ }
@@ -0,0 +1,15 @@
1
+ /*
2
+ * @Author: 焦质晔
3
+ * @Date: 2021-07-23 18:59:08
4
+ * @Last Modified by: 焦质晔
5
+ * @Last Modified time: 2021-07-23 18:59:08
6
+ */
7
+ // Sizing shortcuts
8
+ .size(@width; @height) {
9
+ width: @width;
10
+ height: @height;
11
+ }
12
+
13
+ .square(@size) {
14
+ .size(@size; @size);
15
+ }
@@ -0,0 +1,134 @@
1
+ /* http://meyerweb.com/eric/tools/css/reset/
2
+ v2.0 | 20110126
3
+ License: none (public domain)
4
+ */
5
+ html,
6
+ body,
7
+ div,
8
+ span,
9
+ applet,
10
+ object,
11
+ iframe,
12
+ h1,
13
+ h2,
14
+ h3,
15
+ h4,
16
+ h5,
17
+ h6,
18
+ p,
19
+ blockquote,
20
+ pre,
21
+ a,
22
+ abbr,
23
+ acronym,
24
+ address,
25
+ big,
26
+ cite,
27
+ code,
28
+ del,
29
+ dfn,
30
+ em,
31
+ img,
32
+ ins,
33
+ kbd,
34
+ q,
35
+ s,
36
+ samp,
37
+ small,
38
+ strike,
39
+ strong,
40
+ sub,
41
+ sup,
42
+ tt,
43
+ var,
44
+ b,
45
+ u,
46
+ i,
47
+ center,
48
+ dl,
49
+ dt,
50
+ dd,
51
+ ol,
52
+ ul,
53
+ li,
54
+ fieldset,
55
+ form,
56
+ label,
57
+ legend,
58
+ table,
59
+ caption,
60
+ tbody,
61
+ tfoot,
62
+ thead,
63
+ tr,
64
+ th,
65
+ td,
66
+ article,
67
+ aside,
68
+ canvas,
69
+ details,
70
+ embed,
71
+ figure,
72
+ figcaption,
73
+ footer,
74
+ header,
75
+ hgroup,
76
+ menu,
77
+ nav,
78
+ output,
79
+ ruby,
80
+ section,
81
+ summary,
82
+ time,
83
+ mark,
84
+ audio,
85
+ video {
86
+ margin: 0;
87
+ padding: 0;
88
+ border: 0;
89
+ }
90
+ /* HTML5 display-role reset for older browsers */
91
+ article,
92
+ aside,
93
+ details,
94
+ figcaption,
95
+ figure,
96
+ footer,
97
+ header,
98
+ hgroup,
99
+ menu,
100
+ nav,
101
+ section {
102
+ display: block;
103
+ }
104
+ ol,
105
+ ul {
106
+ list-style: none;
107
+ margin: 0;
108
+ }
109
+ blockquote,
110
+ q {
111
+ quotes: none;
112
+ }
113
+ blockquote:before,
114
+ blockquote:after,
115
+ q:before,
116
+ q:after {
117
+ content: '';
118
+ content: none;
119
+ }
120
+ table {
121
+ border-collapse: collapse;
122
+ border-spacing: 0;
123
+ }
124
+ .svgicon {
125
+ display: inline-block;
126
+ color: inherit;
127
+ font-style: normal;
128
+ line-height: 0;
129
+ text-align: center;
130
+ text-transform: none;
131
+ text-rendering: optimizeLegibility;
132
+ -webkit-font-smoothing: antialiased;
133
+ -moz-osx-font-smoothing: grayscale;
134
+ }
@@ -0,0 +1,113 @@
1
+ /*
2
+ * @Author: 焦质晔
3
+ * @Date: 2021-07-23 18:25:34
4
+ * @Last Modified by: 焦质晔
5
+ * @Last Modified time: 2022-01-02 10:42:49
6
+ */
7
+ // The prefix to use on all css classes from qm.
8
+ @qm-prefix: qm;
9
+
10
+ // An override for the html selector for theme prefixes
11
+ @--html-selector: html;
12
+
13
+ // -------- Colors -----------
14
+ @--primary-color: #1890ff;
15
+
16
+ @--info-color: @--primary-color;
17
+ @--success-color: #52c41a;
18
+ @--error-color: #f5222d;
19
+ @--warning-color: #faad14;
20
+ @--normal-color: #d9d9d9;
21
+ @--white: #fff;
22
+ @--black: #000;
23
+
24
+ // Color used by default to control hover and active backgrounds and for
25
+ // colorPalette from antd/lib/style/color/colorPalette
26
+ @--primary-1: color(~`colorPalette('@{--primary-color}', 1) `);
27
+ @--primary-2: color(~`colorPalette('@{--primary-color}', 2) `);
28
+ @--primary-3: color(~`colorPalette('@{--primary-color}', 3) `);
29
+ @--primary-4: color(~`colorPalette('@{--primary-color}', 4) `);
30
+ @--primary-5: color(~`colorPalette('@{--primary-color}', 5) `);
31
+ @--primary-6: @--primary-color;
32
+ @--primary-7: color(~`colorPalette('@{--primary-color}', 7) `);
33
+ @--primary-8: color(~`colorPalette('@{--primary-color}', 8) `);
34
+ @--primary-9: color(~`colorPalette('@{--primary-color}', 9) `);
35
+ @--primary-10: color(~`colorPalette('@{--primary-color}', 10) `);
36
+
37
+ // Background color for `<body>`
38
+ @--body-background: @--white;
39
+ // Base background color for most components
40
+ @--component-background: @--white;
41
+ // Popover background color
42
+ @--popover-background: @--component-background;
43
+
44
+ // Background-color
45
+ @--background-color: #f2f2f2;
46
+ @--background-color-cecondary: #f5f5f5;
47
+
48
+ // Font-family
49
+ @--font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji',
50
+ 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
51
+ @--font-path: './fonts';
52
+
53
+ // Text color
54
+ @--text-color: fade(@--black, 85%);
55
+ @--text-color-secondary-dark: fade(@--black, 65%);
56
+ @--text-color-secondary: fade(@--black, 45%);
57
+ @--header-color: fade(@--black, 85%);
58
+
59
+ // Iconfont
60
+ @--icon-color: @--text-color-secondary-dark;
61
+
62
+ // Disabled color
63
+ @--disabled-color: fade(@--black, 25%);
64
+ @--disabled-bg: @--background-color;
65
+
66
+ // Font-size
67
+ @--font-size-base: 14px;
68
+ @--font-size-lg: @--font-size-base + 2px;
69
+ @--font-size-sm: 12px;
70
+
71
+ // Line-height
72
+ @--line-height-base: 1.5715;
73
+
74
+ // Border
75
+ @--border-color-base: #d9d9d9;
76
+ @--border-color-secondary: #e8e8e8;
77
+ @--border-width-base: 1px;
78
+ @--border-style-base: solid;
79
+ @--border-radius-base: 2px;
80
+ @--border-radius-sm: @--border-radius-base;
81
+
82
+ // Outline
83
+ @--outline-width: 2px;
84
+ @--outline-color: @--primary-color;
85
+ @--error-color-outline: fade(@--error-color, 20%);
86
+
87
+ // Vertical paddings
88
+ @--padding-lg: 12px;
89
+ @--padding-md: 10px;
90
+ @--padding-sm: 8px;
91
+
92
+ // Vertical margins
93
+ @--margin-lg: 12px;
94
+ @--margin-md: 10px;
95
+ @--margin-sm: 8px;
96
+
97
+ // Height rules
98
+ @--height-lg: 40px;
99
+ @--height-md: 32px;
100
+ @--height-sm: 24px;
101
+
102
+ // LINK
103
+ @--link-color: @--primary-color;
104
+ @--link-hover-color: @--primary-5;
105
+ @--link-active-color: @--primary-7;
106
+
107
+ // Shadow
108
+ @--shadow-color: fade(@--black, 0.15);
109
+ @--shadow-1-up: 0 -2px 8px @--shadow-color;
110
+ @--shadow-1-down: 0 2px 8px @--shadow-color;
111
+ @--shadow-1-left: -2px 0 8px @--shadow-color;
112
+ @--shadow-1-right: 2px 0 8px @--shadow-color;
113
+ @--box-shadow-base: @--shadow-1-down;
@@ -0,0 +1,7 @@
1
+ /*
2
+ * @Author: 焦质晔
3
+ * @Date: 2021-07-23 18:25:16
4
+ * @Last Modified by: 焦质晔
5
+ * @Last Modified time: 2021-07-23 18:25:45
6
+ */
7
+ @import './default';
@@ -0,0 +1,4 @@
1
+ import Table from './src/table';
2
+ export type { QmTableProps } from './src/table';
3
+ export type { IColumn as QmTableColumn } from './src/table/types';
4
+ export default Table;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ declare type IAlertProps = {
3
+ total: number;
4
+ };
5
+ declare const Alert: React.FC<IAlertProps>;
6
+ export default Alert;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import type { IColumn, IRecord, TableBodyRef } from '../table/types';
3
+ declare type IBodyProps = {
4
+ tableData: IRecord[];
5
+ flattenColumns: IColumn[];
6
+ };
7
+ declare const TableBody: React.ForwardRefExoticComponent<IBodyProps & React.RefAttributes<TableBodyRef>>;
8
+ export default TableBody;
@@ -0,0 +1,12 @@
1
+ declare const useValueFormat: () => {
2
+ dateFormat: (val: string) => string;
3
+ datetimeFormat: (val: string) => string;
4
+ dateShortTimeFormat: (val: string) => string;
5
+ percentFormat: (val: number) => string;
6
+ financeFormat: (val: number) => string;
7
+ secretNameFormat: (val: string) => string;
8
+ secretPhoneFormat: (val: string) => string;
9
+ secretIDnumberFormat: (val: string) => string;
10
+ secretBankNumberFormat: (val: string) => string;
11
+ };
12
+ export default useValueFormat;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import type { IColumn } from '../table/types';
3
+ declare type IColumnFilterProps = {
4
+ columns: IColumn[];
5
+ };
6
+ declare const ColumnFilter: React.FC<IColumnFilterProps>;
7
+ export default ColumnFilter;
@@ -0,0 +1,47 @@
1
+ declare const config: {
2
+ defaultColumnWidth: number;
3
+ selectionColumnWidth: number;
4
+ rowHeightMaps: {
5
+ large: number;
6
+ middle: number;
7
+ mini: number;
8
+ };
9
+ sortDirections: string[];
10
+ pagination: {
11
+ current: number;
12
+ pageSize: number;
13
+ pageSizeOptions: number[];
14
+ showSizeChanger: boolean;
15
+ showQuickJumper: boolean;
16
+ };
17
+ groupSummary: {
18
+ total: {
19
+ text: string;
20
+ value: string;
21
+ };
22
+ recordTotalIndex: string;
23
+ summaryFieldName: string;
24
+ groupbyFieldName: string;
25
+ };
26
+ highSearch: {
27
+ showSQL: boolean;
28
+ };
29
+ treeTable: {
30
+ textIndent: number;
31
+ };
32
+ dataKey: string;
33
+ summationKey: string;
34
+ totalKey: string;
35
+ virtualScrollY: number;
36
+ sorterFieldName: string;
37
+ filterFieldName: string;
38
+ currentPageName: string;
39
+ pageSizeName: string;
40
+ showFilterType: boolean;
41
+ printWidth: number;
42
+ operationColumn: string;
43
+ selectionColumn: string;
44
+ expandableColumn: string;
45
+ summaryIgnore: string;
46
+ };
47
+ export default config;
@@ -0,0 +1,74 @@
1
+ /// <reference types="react" />
2
+ import type { TableBodyRef, IColumn, IDerivedRowKey, IFetchParams, IPagination, IRecord, IRowColSpan, IRowKey, IRule, ITableProps } from '../table/types';
3
+ import type { ITableRef } from '../hooks/useTableRef';
4
+ import type { ITableState } from '../hooks/useTableState';
5
+ import type { ComponentSize } from '../../../_utils/types';
6
+ export declare type ITableContext = {
7
+ getRowKey: (row: IRecord, index: number) => IRowKey;
8
+ tableProps: ITableProps;
9
+ tableRef: React.MutableRefObject<ITableRef>;
10
+ tableBodyRef: React.RefObject<TableBodyRef>;
11
+ $size: ComponentSize;
12
+ flattenColumns: IColumn[];
13
+ editableColumns: IColumn[];
14
+ leftFixedColumns: IColumn[];
15
+ rightFixedColumns: IColumn[];
16
+ sorter: ITableState['sorter'];
17
+ filters: ITableState['filters'];
18
+ superFilters: ITableState['superFilters'];
19
+ layout: ITableState['layout'];
20
+ bordered: boolean;
21
+ showFooter: boolean;
22
+ showSummary: boolean;
23
+ summationRows: Record<string, number | string>[];
24
+ scrollX: boolean;
25
+ scrollY: ITableState['scrollY'];
26
+ pagination: IPagination;
27
+ fetchParams: IFetchParams;
28
+ selectionKeys: IRowKey[];
29
+ rowExpandedKeys: ITableState['rowExpandedKeys'];
30
+ highlightKey: IRowKey;
31
+ isFetch: boolean;
32
+ isPingLeft: boolean;
33
+ isPingRight: boolean;
34
+ isFullScreen: boolean;
35
+ isTableEmpty: boolean;
36
+ isHeadGroup: boolean;
37
+ isTreeTable: boolean;
38
+ isGroupSubtotal: boolean;
39
+ isWebPagination: boolean;
40
+ dataChange: () => void;
41
+ tableChange: (backTop?: boolean) => void;
42
+ getTableData: () => Promise<void>;
43
+ setElementStore: (key: string, value: HTMLElement) => void;
44
+ createTableFullData: (records: IRecord[]) => void;
45
+ setSorter: (value: ITableState['sorter']) => void;
46
+ setFilters: (value: ITableState['filters']) => void;
47
+ setSuperFilters: (options: ITableState['superFilters']) => void;
48
+ setSelectionKeys: (rowKeys: IRowKey[]) => void;
49
+ setSelectionRows: (records: IRecord[]) => void;
50
+ setHighlightKey: (rowKey: IRowKey) => void;
51
+ setRowExpandedKeys: (rowKeys: IRowKey[]) => void;
52
+ getSpan: (row: IRecord, column: IColumn, rowIndex: number, columnIndex: number, tableData: IRecord[]) => IRowColSpan;
53
+ getStickyLeft: (rowKey: IRowKey) => number;
54
+ getStickyRight: (rowKey: IRowKey) => number;
55
+ scrollXToColumn: (dataIndex: string, index?: number) => void;
56
+ scrollYToRecord: (rowKey: IRowKey, index?: number) => void;
57
+ setPingLeft: (value: boolean) => void;
58
+ setPingRight: (value: boolean) => void;
59
+ setSpinning: (value: boolean) => void;
60
+ setFullScreen: (value: boolean) => void;
61
+ doFieldValidate: (rules: IRule[], val: unknown, rowKey: IRowKey, columnKey: string) => void;
62
+ createGroupData: (records: IRecord[]) => IRecord[];
63
+ findParentRowKeys: (deriveRowKeys: IDerivedRowKey[], key: IRowKey) => IRowKey[];
64
+ getAllChildRowKeys: (deriveRowKeys: IDerivedRowKey[]) => IRowKey[];
65
+ triggerScrollYEvent: (st: number) => void;
66
+ scrollBottomDebouncer: (event: React.SyntheticEvent<HTMLDivElement>) => void;
67
+ clearTableSorter: () => void;
68
+ clearTableFilter: () => void;
69
+ clearSuperFilters: () => void;
70
+ clearRowSelection: () => void;
71
+ clearRowHighlight: () => void;
72
+ };
73
+ declare const TableContext: import("react").Context<ITableContext | undefined>;
74
+ export default TableContext;
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import type { ComponentSize } from '../../../_utils/types';
3
+ declare type INumberProps = {
4
+ size?: ComponentSize;
5
+ defaultValue?: number | string;
6
+ value?: number | string;
7
+ min?: number;
8
+ max?: number;
9
+ maxLength?: number;
10
+ precision?: number;
11
+ disabled?: boolean;
12
+ onChange?: (value: number | string) => void;
13
+ onBlur?: (value: number | string) => void;
14
+ onEnter?: (value: number | string) => void;
15
+ };
16
+ declare const InputNumber: React.ForwardRefExoticComponent<INumberProps & React.RefAttributes<any>>;
17
+ export default InputNumber;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import type { IColumn, IRecord, IRowKey } from '../table/types';
3
+ declare type ICellEditProps = {
4
+ column: IColumn;
5
+ record: IRecord;
6
+ rowKey: IRowKey;
7
+ columnKey: string;
8
+ clicked: [IRowKey, string] | [];
9
+ text: string | number;
10
+ };
11
+ declare const CellEdit: React.FC<ICellEditProps>;
12
+ export default CellEdit;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const TableEmpty: React.FC;
3
+ export default TableEmpty;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import type { IRecord, IRowKey } from '../table/types';
3
+ declare type IExpandableProps = {
4
+ record: IRecord;
5
+ rowKey: IRowKey;
6
+ };
7
+ declare const Expandable: React.FC<IExpandableProps>;
8
+ export default Expandable;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import type { IColumn } from '../table/types';
3
+ declare type IDefineProps = {
4
+ columns: IColumn[];
5
+ onChange: (columns: IColumn[]) => void;
6
+ };
7
+ declare const Define: React.FC<IDefineProps>;
8
+ export default Define;
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import type { IColumn } from '../table/types';
3
+ export declare type IOptions = {
4
+ fileName: string;
5
+ fileType: 'xlsx' | 'csv';
6
+ sheetName: string;
7
+ exportType: 'all' | 'selected' | 'custom';
8
+ columns: IColumn[];
9
+ startIndex: number;
10
+ endIndex: number;
11
+ footSummation: boolean;
12
+ useStyle: boolean;
13
+ };
14
+ declare type ITableExportProps = {
15
+ tableColumns: IColumn[];
16
+ };
17
+ declare const TableExport: React.FC<ITableExportProps>;
18
+ export default TableExport;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ declare type ISettingProps = {
3
+ defaultValue: any;
4
+ onClose: () => void;
5
+ onOk: (data: any) => void;
6
+ };
7
+ declare const Setting: React.FC<ISettingProps>;
8
+ export default Setting;
@@ -0,0 +1,9 @@
1
+ import type { IColumn, IRecord } from '../table/types';
2
+ import type { IOptions } from './index';
3
+ declare type IParamsFn1 = (columns: IColumn[], tableData: IRecord[]) => Record<string, number>[];
4
+ declare type IParamsFn2 = (row: IRecord, rowIndex: number, column: IColumn, columnIndex: number) => string | number;
5
+ declare const useExport: (calcSummationValues: IParamsFn1, renderCell: IParamsFn2) => {
6
+ exportXLSX: (options: IOptions, dataList: IRecord[]) => Promise<Blob>;
7
+ exportCSV: (options: IOptions, tableHTML: string) => Blob;
8
+ };
9
+ export default useExport;