dcp-design-react 1.7.42

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 (318) 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 +75 -0
  5. package/lib/_utils/download.d.ts +7 -0
  6. package/lib/_utils/error.d.ts +2 -0
  7. package/lib/_utils/isDev.d.ts +1 -0
  8. package/lib/_utils/isMobile.d.ts +1 -0
  9. package/lib/_utils/isServer.d.ts +2 -0
  10. package/lib/_utils/prefix.d.ts +1 -0
  11. package/lib/_utils/resize-event.d.ts +10 -0
  12. package/lib/_utils/scrollbar-width.d.ts +1 -0
  13. package/lib/_utils/types.d.ts +39 -0
  14. package/lib/_utils/util.d.ts +27 -0
  15. package/lib/_utils/validators.d.ts +2 -0
  16. package/lib/anchor/index.d.ts +4 -0
  17. package/lib/anchor/src/anchor-item.d.ts +15 -0
  18. package/lib/anchor/src/anchor-nav.d.ts +12 -0
  19. package/lib/anchor/src/anchor.d.ts +61 -0
  20. package/lib/anchor/style/index.less +101 -0
  21. package/lib/antd/Calendar.d.ts +4 -0
  22. package/lib/antd/DatePicker.d.ts +50 -0
  23. package/lib/antd/TimePicker.d.ts +16 -0
  24. package/lib/antd/compact.less +11 -0
  25. package/lib/antd/dayjs.d.ts +1 -0
  26. package/lib/antd/index.d.ts +124 -0
  27. package/lib/antd/index.less +19 -0
  28. package/lib/button/index.d.ts +3 -0
  29. package/lib/button/src/button.d.ts +32 -0
  30. package/lib/button/style/index.less +12 -0
  31. package/lib/collapse/index.d.ts +3 -0
  32. package/lib/collapse/src/Content.d.ts +3 -0
  33. package/lib/collapse/src/_util/motion.less +13 -0
  34. package/lib/collapse/src/_util/motionUtil.d.ts +3 -0
  35. package/lib/collapse/src/collapse.d.ts +18 -0
  36. package/lib/collapse/style/index.less +24 -0
  37. package/lib/config-provider/context.d.ts +10 -0
  38. package/lib/config-provider/index.d.ts +3 -0
  39. package/lib/config-provider/src/config-provider.d.ts +36 -0
  40. package/lib/copy-to-clipboard/index.d.ts +3 -0
  41. package/lib/copy-to-clipboard/src/copy-to-clipboard.d.ts +15 -0
  42. package/lib/copy-to-clipboard/style/index.less +12 -0
  43. package/lib/countup/index.d.ts +3 -0
  44. package/lib/countup/src/countup.d.ts +17 -0
  45. package/lib/countup/style/index.less +22 -0
  46. package/lib/cropper/index.d.ts +3 -0
  47. package/lib/cropper/src/cropper.d.ts +213 -0
  48. package/lib/cropper/style/index.less +13 -0
  49. package/lib/divider/index.d.ts +3 -0
  50. package/lib/divider/src/divider.d.ts +27 -0
  51. package/lib/divider/style/index.less +54 -0
  52. package/lib/download/index.d.ts +3 -0
  53. package/lib/download/src/download.d.ts +54 -0
  54. package/lib/download/style/index.less +12 -0
  55. package/lib/drawer/index.d.ts +3 -0
  56. package/lib/drawer/src/drawer.d.ts +46 -0
  57. package/lib/drawer/style/index.less +82 -0
  58. package/lib/empty/index.d.ts +3 -0
  59. package/lib/empty/src/empty.d.ts +15 -0
  60. package/lib/empty/style/index.less +35 -0
  61. package/lib/form/index.d.ts +4 -0
  62. package/lib/form/src/context.d.ts +9 -0
  63. package/lib/form/src/fields-filter.d.ts +26 -0
  64. package/lib/form/src/form-cascader.d.ts +21 -0
  65. package/lib/form/src/form-checkbox-group.d.ts +19 -0
  66. package/lib/form/src/form-checkbox.d.ts +16 -0
  67. package/lib/form/src/form-city-select.d.ts +10 -0
  68. package/lib/form/src/form-date.d.ts +10 -0
  69. package/lib/form/src/form-divider.d.ts +10 -0
  70. package/lib/form/src/form-immediate.d.ts +20 -0
  71. package/lib/form/src/form-input-number.d.ts +11 -0
  72. package/lib/form/src/form-input.d.ts +11 -0
  73. package/lib/form/src/form-item-view.d.ts +7 -0
  74. package/lib/form/src/form-multiple-search-helper.d.ts +20 -0
  75. package/lib/form/src/form-multiple-tree-table-helper.d.ts +20 -0
  76. package/lib/form/src/form-radio.d.ts +19 -0
  77. package/lib/form/src/form-range-date.d.ts +10 -0
  78. package/lib/form/src/form-range-input-number.d.ts +10 -0
  79. package/lib/form/src/form-range-input.d.ts +10 -0
  80. package/lib/form/src/form-range-search-helper.d.ts +20 -0
  81. package/lib/form/src/form-range-time.d.ts +10 -0
  82. package/lib/form/src/form-rate.d.ts +10 -0
  83. package/lib/form/src/form-region-select.d.ts +10 -0
  84. package/lib/form/src/form-search-helper.d.ts +21 -0
  85. package/lib/form/src/form-select.d.ts +21 -0
  86. package/lib/form/src/form-switch.d.ts +10 -0
  87. package/lib/form/src/form-text-area.d.ts +10 -0
  88. package/lib/form/src/form-time.d.ts +10 -0
  89. package/lib/form/src/form-tinymce.d.ts +10 -0
  90. package/lib/form/src/form-tree-select.d.ts +21 -0
  91. package/lib/form/src/form-tree-table-helper.d.ts +20 -0
  92. package/lib/form/src/form-upload-file.d.ts +10 -0
  93. package/lib/form/src/form-upload-img.d.ts +10 -0
  94. package/lib/form/src/form.d.ts +197 -0
  95. package/lib/form/src/types.d.ts +356 -0
  96. package/lib/form/src/utils.d.ts +57 -0
  97. package/lib/form/style/index.less +352 -0
  98. package/lib/guide-tracker/index.d.ts +3 -0
  99. package/lib/guide-tracker/src/Panel.d.ts +9 -0
  100. package/lib/guide-tracker/src/guideTracker.d.ts +37 -0
  101. package/lib/guide-tracker/src/lib/Highlighter.d.ts +2 -0
  102. package/lib/guide-tracker/src/lib/Overlay.d.ts +36 -0
  103. package/lib/guide-tracker/src/lib/index.d.ts +29 -0
  104. package/lib/guide-tracker/src/lib/utils.d.ts +27 -0
  105. package/lib/guide-tracker/style/index.less +189 -0
  106. package/lib/hoc/outsideClick.d.ts +1 -0
  107. package/lib/hooks/useDebounce.d.ts +3 -0
  108. package/lib/hooks/useEvent.d.ts +2 -0
  109. package/lib/hooks/useForceUpdate.d.ts +1 -0
  110. package/lib/hooks/useLayoutUpdateEffect.d.ts +2 -0
  111. package/lib/hooks/useLocale.d.ts +4 -0
  112. package/lib/hooks/useMergedState.d.ts +8 -0
  113. package/lib/hooks/useOutsideClick.d.ts +2 -0
  114. package/lib/hooks/useResizeObserve.d.ts +5 -0
  115. package/lib/hooks/useSafeState.d.ts +4 -0
  116. package/lib/hooks/useSize.d.ts +9 -0
  117. package/lib/hooks/useUpdateEffect.d.ts +2 -0
  118. package/lib/index.d.ts +127 -0
  119. package/lib/index.esm.js +1 -0
  120. package/lib/index.full.js +1 -0
  121. package/lib/index.js +1 -0
  122. package/lib/locale/index.d.ts +11 -0
  123. package/lib/locale/index.js +44 -0
  124. package/lib/locale/lang/en.d.ts +320 -0
  125. package/lib/locale/lang/en.js +325 -0
  126. package/lib/locale/lang/zh-cn.d.ts +320 -0
  127. package/lib/locale/lang/zh-cn.js +325 -0
  128. package/lib/modal/index.d.ts +3 -0
  129. package/lib/modal/src/modal.d.ts +68 -0
  130. package/lib/modal/style/index.less +95 -0
  131. package/lib/pinyin/core.d.ts +12 -0
  132. package/lib/pinyin/dict.d.ts +31 -0
  133. package/lib/pinyin/index.d.ts +2 -0
  134. package/lib/pinyin/patchers/56l.d.ts +7 -0
  135. package/lib/print/index.d.ts +3 -0
  136. package/lib/print/src/LodopFuncs.d.ts +1 -0
  137. package/lib/print/src/config.d.ts +6 -0
  138. package/lib/print/src/container.d.ts +14 -0
  139. package/lib/print/src/context.d.ts +6 -0
  140. package/lib/print/src/preview.d.ts +61 -0
  141. package/lib/print/src/print.d.ts +37 -0
  142. package/lib/print/src/setting.d.ts +49 -0
  143. package/lib/print/src/utils.d.ts +5 -0
  144. package/lib/print/style/index.less +175 -0
  145. package/lib/qm-design.d.ts +28 -0
  146. package/lib/range-table-helper/index.d.ts +3 -0
  147. package/lib/range-table-helper/src/range-table-helper.d.ts +22 -0
  148. package/lib/range-table-helper/style/index.less +18 -0
  149. package/lib/scrollbar/index.d.ts +3 -0
  150. package/lib/scrollbar/src/context.d.ts +7 -0
  151. package/lib/scrollbar/src/scrollbar.d.ts +28 -0
  152. package/lib/scrollbar/src/thumb.d.ts +15 -0
  153. package/lib/scrollbar/style/index.less +72 -0
  154. package/lib/search-helper/index.d.ts +3 -0
  155. package/lib/search-helper/src/search-helper.d.ts +24 -0
  156. package/lib/search-helper/style/index.less +14 -0
  157. package/lib/search-tree/index.d.ts +3 -0
  158. package/lib/search-tree/src/search-tree.d.ts +57 -0
  159. package/lib/search-tree/style/index.less +34 -0
  160. package/lib/space/index.d.ts +3 -0
  161. package/lib/space/src/space.d.ts +12 -0
  162. package/lib/space/style/index.less +12 -0
  163. package/lib/spin/index.d.ts +3 -0
  164. package/lib/spin/src/spin.d.ts +14 -0
  165. package/lib/spin/style/index.less +16 -0
  166. package/lib/split/index.d.ts +4 -0
  167. package/lib/split/src/context.d.ts +8 -0
  168. package/lib/split/src/resize-bar.d.ts +8 -0
  169. package/lib/split/src/split-pane.d.ts +11 -0
  170. package/lib/split/src/split.d.ts +18 -0
  171. package/lib/split/style/index.less +83 -0
  172. package/lib/style/common.less +8 -0
  173. package/lib/style/compact.css +26706 -0
  174. package/lib/style/compact.less +10 -0
  175. package/lib/style/compact.min.css +1 -0
  176. package/lib/style/index.css +30459 -0
  177. package/lib/style/index.less +39 -0
  178. package/lib/style/index.min.css +1 -0
  179. package/lib/style/mixins/box.less +13 -0
  180. package/lib/style/mixins/clearfix.less +21 -0
  181. package/lib/style/mixins/index.less +11 -0
  182. package/lib/style/mixins/operation-unit.less +24 -0
  183. package/lib/style/mixins/reset.less +34 -0
  184. package/lib/style/mixins/size.less +15 -0
  185. package/lib/style/reset.less +132 -0
  186. package/lib/style/themes/compact.less +19 -0
  187. package/lib/style/themes/default.less +117 -0
  188. package/lib/style/themes/index.less +7 -0
  189. package/lib/style/var.less +9 -0
  190. package/lib/table/index.d.ts +4 -0
  191. package/lib/table/src/alert/index.d.ts +6 -0
  192. package/lib/table/src/body/index.d.ts +8 -0
  193. package/lib/table/src/body/useMergeCell.d.ts +7 -0
  194. package/lib/table/src/body/useValueFormat.d.ts +12 -0
  195. package/lib/table/src/clipboard/index.d.ts +8 -0
  196. package/lib/table/src/clipboard/setting.d.ts +8 -0
  197. package/lib/table/src/column-filter/index.d.ts +7 -0
  198. package/lib/table/src/config/index.d.ts +47 -0
  199. package/lib/table/src/context/index.d.ts +85 -0
  200. package/lib/table/src/edit/InputNumber.d.ts +26 -0
  201. package/lib/table/src/edit/index.d.ts +15 -0
  202. package/lib/table/src/empty/index.d.ts +3 -0
  203. package/lib/table/src/expandable/all.d.ts +6 -0
  204. package/lib/table/src/expandable/index.d.ts +9 -0
  205. package/lib/table/src/export/define.d.ts +8 -0
  206. package/lib/table/src/export/index.d.ts +19 -0
  207. package/lib/table/src/export/setting.d.ts +14 -0
  208. package/lib/table/src/export/useExport.d.ts +13 -0
  209. package/lib/table/src/fast-search/index.d.ts +7 -0
  210. package/lib/table/src/fast-search/setting.d.ts +6 -0
  211. package/lib/table/src/filter/index.d.ts +8 -0
  212. package/lib/table/src/filter-sql/index.d.ts +5 -0
  213. package/lib/table/src/filter-sql/lib/filter_string.d.ts +11 -0
  214. package/lib/table/src/filter-sql/lib/operations.d.ts +8 -0
  215. package/lib/table/src/filter-sql/lib/variables_replacement.d.ts +5 -0
  216. package/lib/table/src/footer/index.d.ts +8 -0
  217. package/lib/table/src/full-screen/index.d.ts +8 -0
  218. package/lib/table/src/group-summary/index.d.ts +7 -0
  219. package/lib/table/src/group-summary/result.d.ts +9 -0
  220. package/lib/table/src/group-summary/setting.d.ts +6 -0
  221. package/lib/table/src/header/index.d.ts +10 -0
  222. package/lib/table/src/hooks/useImperativeMethod.d.ts +49 -0
  223. package/lib/table/src/hooks/useTableCore.d.ts +93 -0
  224. package/lib/table/src/hooks/useTableEffect.d.ts +45 -0
  225. package/lib/table/src/hooks/useTableLayout.d.ts +44 -0
  226. package/lib/table/src/hooks/useTableMemo.d.ts +48 -0
  227. package/lib/table/src/hooks/useTableRef.d.ts +111 -0
  228. package/lib/table/src/hooks/useTableState.d.ts +98 -0
  229. package/lib/table/src/icon/caretdown.d.ts +3 -0
  230. package/lib/table/src/icon/caretup.d.ts +3 -0
  231. package/lib/table/src/icon/filter.d.ts +3 -0
  232. package/lib/table/src/import/SelectFile.d.ts +8 -0
  233. package/lib/table/src/import/index.d.ts +8 -0
  234. package/lib/table/src/import/setting.d.ts +8 -0
  235. package/lib/table/src/manager/index.d.ts +15 -0
  236. package/lib/table/src/pager/index.d.ts +9 -0
  237. package/lib/table/src/print/index.d.ts +8 -0
  238. package/lib/table/src/reload/index.d.ts +7 -0
  239. package/lib/table/src/resizable/index.d.ts +7 -0
  240. package/lib/table/src/select-collection/index.d.ts +8 -0
  241. package/lib/table/src/select-collection/result.d.ts +8 -0
  242. package/lib/table/src/selection/all.d.ts +7 -0
  243. package/lib/table/src/selection/index.d.ts +12 -0
  244. package/lib/table/src/store/index.d.ts +33 -0
  245. package/lib/table/src/super-search/index.d.ts +7 -0
  246. package/lib/table/src/super-search/result.d.ts +6 -0
  247. package/lib/table/src/table/index.d.ts +5 -0
  248. package/lib/table/src/table/props.d.ts +299 -0
  249. package/lib/table/src/table/types.d.ts +444 -0
  250. package/lib/table/src/toolbox/index.d.ts +18 -0
  251. package/lib/table/src/utils/index.d.ts +43 -0
  252. package/lib/table/style/alert.less +34 -0
  253. package/lib/table/style/body.less +77 -0
  254. package/lib/table/style/clipboard.less +29 -0
  255. package/lib/table/style/column-filter.less +94 -0
  256. package/lib/table/style/empty.less +19 -0
  257. package/lib/table/style/expandable.less +64 -0
  258. package/lib/table/style/export.less +26 -0
  259. package/lib/table/style/fast-search.less +110 -0
  260. package/lib/table/style/footer.less +33 -0
  261. package/lib/table/style/full-screen.less +21 -0
  262. package/lib/table/style/group-summary.less +93 -0
  263. package/lib/table/style/header.less +207 -0
  264. package/lib/table/style/import.less +25 -0
  265. package/lib/table/style/index.less +29 -0
  266. package/lib/table/style/pager.less +29 -0
  267. package/lib/table/style/print.less +21 -0
  268. package/lib/table/style/reload.less +21 -0
  269. package/lib/table/style/select-collection.less +21 -0
  270. package/lib/table/style/size.less +88 -0
  271. package/lib/table/style/super-search.less +102 -0
  272. package/lib/table/style/table.less +372 -0
  273. package/lib/table/style/tollbox.less +39 -0
  274. package/lib/table/style/toper.less +31 -0
  275. package/lib/table/style/variable.less +48 -0
  276. package/lib/tabs/index.d.ts +4 -0
  277. package/lib/tabs/src/tab-pane.d.ts +9 -0
  278. package/lib/tabs/src/tabs.d.ts +19 -0
  279. package/lib/tabs/style/index.less +32 -0
  280. package/lib/tinymce/index.d.ts +3 -0
  281. package/lib/tinymce/src/Events.d.ts +85 -0
  282. package/lib/tinymce/src/ScriptLoader.d.ts +13 -0
  283. package/lib/tinymce/src/TinyMCE.d.ts +9 -0
  284. package/lib/tinymce/src/Utils.d.ts +20 -0
  285. package/lib/tinymce/src/components/Editor.d.ts +73 -0
  286. package/lib/tinymce/src/components/EditorPropTypes.d.ts +18 -0
  287. package/lib/tinymce/src/index.d.ts +35 -0
  288. package/lib/tinymce/style/index.less +18 -0
  289. package/lib/tour/index.d.ts +4 -0
  290. package/lib/tour/src/Mask.d.ts +17 -0
  291. package/lib/tour/src/Pause.d.ts +10 -0
  292. package/lib/tour/src/Tour.d.ts +41 -0
  293. package/lib/tour/src/TourStep/DefaultPanel.d.ts +4 -0
  294. package/lib/tour/src/TourStep/index.d.ts +34 -0
  295. package/lib/tour/src/hooks/useTarget.d.ts +14 -0
  296. package/lib/tour/src/placements.d.ts +29 -0
  297. package/lib/tour/src/util.d.ts +5 -0
  298. package/lib/tour/style/index.less +157 -0
  299. package/lib/transition/index.d.ts +3 -0
  300. package/lib/transition/src/tools.d.ts +13 -0
  301. package/lib/transition/src/transition.d.ts +12 -0
  302. package/lib/transition/src/types.d.ts +25 -0
  303. package/lib/transition/src/useTransition.d.ts +2 -0
  304. package/lib/tree-helper/index.d.ts +3 -0
  305. package/lib/tree-helper/src/tree-helper.d.ts +22 -0
  306. package/lib/tree-helper/style/index.less +21 -0
  307. package/lib/tree-table-helper/index.d.ts +3 -0
  308. package/lib/tree-table-helper/src/tree-table-helper.d.ts +31 -0
  309. package/lib/tree-table-helper/style/index.less +24 -0
  310. package/lib/upload-file/index.d.ts +3 -0
  311. package/lib/upload-file/src/upload-file.d.ts +35 -0
  312. package/lib/upload-file/style/index.less +18 -0
  313. package/lib/upload-img/index.d.ts +3 -0
  314. package/lib/upload-img/src/cropper-preview.d.ts +32 -0
  315. package/lib/upload-img/src/upload-img.d.ts +39 -0
  316. package/lib/upload-img/style/index.less +41 -0
  317. package/lib/version/index.d.ts +2 -0
  318. package/package.json +138 -0
@@ -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,34 @@
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-container() {
10
+ box-sizing: border-box;
11
+ margin: 0;
12
+ padding: 0;
13
+ color: @--text-color;
14
+ font-variant: @font-variant-base;
15
+ line-height: @--line-height-base;
16
+ list-style: none;
17
+ font-feature-settings: @font-feature-settings-base;
18
+ }
19
+
20
+ .box-sizing-content() {
21
+ box-sizing: border-box;
22
+ }
23
+
24
+ .text-overflow-cut() {
25
+ overflow: hidden;
26
+ text-overflow: ellipsis;
27
+ white-space: nowrap;
28
+ }
29
+
30
+ .user-select-none() {
31
+ -moz-user-select: none;
32
+ -webkit-user-select: none;
33
+ -ms-user-select: none;
34
+ }
@@ -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,132 @@
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
+ }
89
+ /* HTML5 display-role reset for older browsers */
90
+ article,
91
+ aside,
92
+ details,
93
+ figcaption,
94
+ figure,
95
+ footer,
96
+ header,
97
+ hgroup,
98
+ menu,
99
+ nav,
100
+ section {
101
+ display: block;
102
+ }
103
+ ol,
104
+ ul {
105
+ list-style: none;
106
+ }
107
+ blockquote,
108
+ q {
109
+ quotes: none;
110
+ }
111
+ blockquote:before,
112
+ blockquote:after,
113
+ q:before,
114
+ q:after {
115
+ content: '';
116
+ content: none;
117
+ }
118
+ table {
119
+ border-collapse: collapse;
120
+ border-spacing: 0;
121
+ }
122
+ .svgicon {
123
+ display: inline-block;
124
+ color: inherit;
125
+ font-style: normal;
126
+ line-height: 0;
127
+ text-align: center;
128
+ text-transform: none;
129
+ text-rendering: optimizeLegibility;
130
+ -webkit-font-smoothing: antialiased;
131
+ -moz-osx-font-smoothing: grayscale;
132
+ }
@@ -0,0 +1,19 @@
1
+ /*
2
+ * @Author: 焦质晔
3
+ * @Date: 2022-11-26 18:06:56
4
+ * @Last Modified by: 焦质晔
5
+ * @Last Modified time: 2023-01-07 14:06:12
6
+ */
7
+ // height rules
8
+ @height-base: 32px;
9
+ @height-lg: 40px;
10
+ @height-sm: 24px;
11
+
12
+ // Dropdown
13
+ @dropdown-line-height: 18px;
14
+
15
+ // Menu
16
+ @menu-item-font-size: 13px;
17
+
18
+ // Form
19
+ @form-item-label-colon-margin-right: 4px;
@@ -0,0 +1,117 @@
1
+ /*
2
+ * @Author: 焦质晔
3
+ * @Date: 2021-07-23 18:25:34
4
+ * @Last Modified by: 焦质晔
5
+ * @Last Modified time: 2023-03-28 11:42:59
6
+ */
7
+ // The prefix to use on all css classes.
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;
114
+
115
+ // antd
116
+ @blue-base: @--primary-color;
117
+ @input-disabled-color: @--text-color-secondary-dark;
@@ -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,9 @@
1
+ /*
2
+ * @Author: 焦质晔
3
+ * @Date: 2022-04-12 10:32:21
4
+ * @Last Modified by: 焦质晔
5
+ * @Last Modified time: 2022-04-12 10:32:21
6
+ */
7
+ html {
8
+ --qm-primary-color: @--primary-color;
9
+ }
@@ -0,0 +1,4 @@
1
+ import Table from './src/table';
2
+ export type { TableProps } from './src/table';
3
+ export type { TableRef, IColumn as TableColumn } from './src/table/types';
4
+ export default Table;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ 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
+ 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,7 @@
1
+ import React from 'react';
2
+ declare const useMergeCell: () => {
3
+ dragStart: (ev: any) => void;
4
+ renderDragPanel: () => React.JSX.Element;
5
+ closeDragPanel: () => void;
6
+ };
7
+ export default useMergeCell;
@@ -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 | number;
6
+ financeFormat: (val: number | string) => 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,8 @@
1
+ import React from 'react';
2
+ import type { IColumn, ToolMethodRef } from '../table/types';
3
+ type ITableClipboardProps = {
4
+ flattenColumns: IColumn[];
5
+ open?: boolean;
6
+ };
7
+ declare const TableClipboard: React.ForwardRefExoticComponent<ITableClipboardProps & React.RefAttributes<ToolMethodRef>>;
8
+ export default TableClipboard;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import type { IColumn } from '../table/types';
3
+ type ISettingProps = {
4
+ columns: IColumn[];
5
+ onClose: () => void;
6
+ };
7
+ declare const Setting: React.FC<ISettingProps>;
8
+ export default Setting;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import type { IColumn } from '../table/types';
3
+ 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
+ small: 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,85 @@
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 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
+ treeExpandIndex: string;
17
+ sorter: ITableState['sorter'];
18
+ filters: ITableState['filters'];
19
+ superFilters: ITableState['superFilters'];
20
+ layout: ITableState['layout'];
21
+ bordered: boolean;
22
+ showFooter: boolean;
23
+ showSummary: boolean;
24
+ summationRows: Record<string, number | string>[];
25
+ scrollX: ITableState['scrollX'];
26
+ scrollY: ITableState['scrollY'];
27
+ pagination: IPagination;
28
+ fetchParams: IFetchParams;
29
+ selectionKeys: IRowKey[];
30
+ rowExpandedKeys: ITableState['rowExpandedKeys'];
31
+ highlightKey: IRowKey;
32
+ isFetch: boolean;
33
+ isPingLeft: boolean;
34
+ isPingRight: boolean;
35
+ isHeadSorter: boolean;
36
+ isHeadFilter: boolean;
37
+ isFullScreen: boolean;
38
+ isTableEmpty: boolean;
39
+ isHeadGroup: boolean;
40
+ isTreeTable: boolean;
41
+ isGroupSubtotal: boolean;
42
+ isWebPagination: boolean;
43
+ isDragMergeCell: boolean;
44
+ dataChange: () => void;
45
+ tableChange: () => void;
46
+ getTableData: () => Promise<void>;
47
+ setElementStore: (key: string, value: HTMLElement) => void;
48
+ createTableFullData: (records: IRecord[]) => void;
49
+ updateTableData: () => void;
50
+ setSorter: (value: ITableState['sorter']) => void;
51
+ setFilters: (value: ITableState['filters']) => void;
52
+ setSuperFilters: (options: ITableState['superFilters']) => void;
53
+ setHighlightKey: (rowKey: IRowKey) => void;
54
+ setRowExpandedKeys: (rowKeys: IRowKey[]) => void;
55
+ setSelectionRows: (records: IRecord[]) => void;
56
+ setSelectionKeysEffect: (rowKeys: IRowKey[]) => void;
57
+ setInvalidRowKeys: (rowKeys: IRowKey[]) => void;
58
+ getSpan: (row: IRecord, column: IColumn, rowIndex: number, columnIndex: number, tableData: IRecord[]) => IRowColSpan;
59
+ getStickyLeft: (dataIndex: string) => number;
60
+ getStickyRight: (dataIndex: string) => number;
61
+ scrollXToColumn: (dataIndex: string, index?: number) => void;
62
+ scrollYToRecord: (rowKey: IRowKey, index?: number) => void;
63
+ rowInViewport: (index: number) => boolean;
64
+ setPagination: (pagination: IPagination) => void;
65
+ setPingLeft: (value: boolean) => void;
66
+ setPingRight: (value: boolean) => void;
67
+ setSpinning: (value: boolean) => void;
68
+ setFullScreen: (value: boolean) => void;
69
+ setShouldToTop: (value: boolean) => void;
70
+ doFieldValidate: (rules: IRule[], val: unknown, rowKey: IRowKey, columnKey: string) => void;
71
+ createTableData: (list: IRecord[]) => void;
72
+ createGroupData: (records: IRecord[]) => IRecord[];
73
+ findParentRowKeys: (deriveRowKeys: IDerivedRowKey[], key: IRowKey) => IRowKey[];
74
+ getAllChildRowKeys: (deriveRowKeys: IDerivedRowKey[]) => IRowKey[];
75
+ triggerScrollYEvent: (st: number) => void;
76
+ scrollBottomDebouncer: (event: React.MouseEvent<HTMLDivElement>) => void;
77
+ resetTableScroll: () => void;
78
+ clearTableSorter: () => void;
79
+ clearTableFilter: () => void;
80
+ clearSuperFilters: () => void;
81
+ clearRowSelection: () => void;
82
+ clearRowHighlight: () => void;
83
+ };
84
+ declare const TableContext: import("react").Context<ITableContext | undefined>;
85
+ export default TableContext;
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ import type { ComponentSize } from '../../../_utils/types';
3
+ type INumberProps = {
4
+ size?: ComponentSize;
5
+ defaultValue?: number | string;
6
+ value?: number | string;
7
+ min?: number;
8
+ max?: number;
9
+ prefix?: React.ReactNode;
10
+ suffix?: React.ReactNode;
11
+ placeholder?: string;
12
+ maxLength?: number;
13
+ precision?: number;
14
+ stringMode?: boolean;
15
+ allowClear?: boolean;
16
+ readOnly?: boolean;
17
+ disabled?: boolean;
18
+ formatter?: (value: number | string) => string;
19
+ parser?: (value: string) => string;
20
+ onChange?: (value: number | string) => void;
21
+ onFocus?: () => void;
22
+ onBlur?: (value: string, beforeFormatValue: string) => void;
23
+ onEnter?: (value: string, beforeFormatValue: string) => void;
24
+ };
25
+ declare const InputNumber: React.ForwardRefExoticComponent<INumberProps & React.RefAttributes<any>>;
26
+ export default InputNumber;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import type { IColumn, IRecord, IRowKey } from '../table/types';
3
+ type ICellEditProps = {
4
+ column: IColumn;
5
+ record: IRecord;
6
+ rowKey: IRowKey;
7
+ columnKey: string;
8
+ clicked: [IRowKey, string] | [];
9
+ text: string | number;
10
+ };
11
+ type CellEditRef = {
12
+ focus: () => void;
13
+ };
14
+ declare const CellEdit: React.ForwardRefExoticComponent<ICellEditProps & React.RefAttributes<CellEditRef>>;
15
+ 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,6 @@
1
+ import React from 'react';
2
+ type IAllExpandableProps = {
3
+ style?: React.CSSProperties;
4
+ };
5
+ declare const AllExpandable: React.FC<IAllExpandableProps>;
6
+ export default AllExpandable;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { IRecord, IRowKey } from '../table/types';
3
+ type IExpandableProps = {
4
+ record: IRecord;
5
+ rowKey: IRowKey;
6
+ style?: React.CSSProperties;
7
+ };
8
+ declare const Expandable: React.FC<IExpandableProps>;
9
+ export default Expandable;