@para-ui/core 4.0.0-rc → 4.0.0-rc.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 (250) hide show
  1. package/AutoBox/index.d.ts +1 -1
  2. package/AutoBox/index.js +12 -12
  3. package/AutoTips/autoTipsMultiline/index.d.ts +1 -1
  4. package/AutoTips/index.d.ts +2 -2
  5. package/AutoTips/index.js +12 -12
  6. package/Badge/index.d.ts +23 -0
  7. package/Badge/index.js +54 -0
  8. package/Breadcrumbs/index.js +8 -8
  9. package/Button/SplitButton.d.ts +1 -1
  10. package/Button/index.d.ts +1 -1
  11. package/Button/index.js +3 -3
  12. package/Carousel/index.d.ts +6 -6
  13. package/Carousel/index.js +5 -5
  14. package/Cascader/Cascader.d.ts +10 -10
  15. package/Cascader/OptionList/Column.d.ts +3 -3
  16. package/Cascader/OptionList/index.d.ts +2 -2
  17. package/Cascader/index.d.ts +1 -1
  18. package/Cascader/index.js +4 -2
  19. package/Cascader/lang/en_US.d.ts +5 -0
  20. package/Cascader/lang/index.d.ts +11 -0
  21. package/Cascader/lang/zh_CN.d.ts +5 -0
  22. package/Cascader/utils/treeUtil.d.ts +1 -1
  23. package/Checkbox/index.d.ts +1 -1
  24. package/Checkbox/index.js +4 -4
  25. package/CheckboxGroup/index.d.ts +2 -2
  26. package/CheckboxGroup/index.js +3 -3
  27. package/Collapse/index.js +4 -4
  28. package/CollapseBox/index.js +12 -20
  29. package/CollapseLayout/index.js +20 -20
  30. package/ColorPicker/index.js +2 -2
  31. package/ComboSelect/index.js +43 -52
  32. package/ComboSelect/interface.d.ts +3 -3
  33. package/Container/index.d.ts +3 -3
  34. package/Container/index.js +56 -56
  35. package/CopyText/index.d.ts +2 -2
  36. package/DatePicker/generatePicker/index.d.ts +22 -22
  37. package/DatePicker/index.js +8 -7
  38. package/DatePicker/util.d.ts +1 -1
  39. package/Desktop/index.d.ts +1 -1
  40. package/Desktop/index.js +18 -13
  41. package/DragVerify/index.d.ts +1 -1
  42. package/DragVerify/index.js +13 -13
  43. package/Drawer/index.js +29 -33
  44. package/Drawer/interface.d.ts +2 -2
  45. package/Dropdown/index.d.ts +1 -1
  46. package/DynamicMultiBox/formItem.d.ts +1 -1
  47. package/DynamicMultiBox/index.d.ts +1 -1
  48. package/DynamicMultiBox/index.js +38 -35
  49. package/DynamicMultiBox/interface.d.ts +8 -8
  50. package/DynamicMultiBox/rowForm.d.ts +3 -1
  51. package/Empty/index.d.ts +1 -1
  52. package/Empty/index.js +2 -2
  53. package/Form/index.d.ts +12 -13
  54. package/Form/index.js +10 -8
  55. package/FormItem/compoments/defaultCompoments/index.d.ts +4 -4
  56. package/FormItem/compoments/formCheckboxGroup/index.d.ts +1 -1
  57. package/FormItem/compoments/formFile/index.d.ts +2 -2
  58. package/FormItem/compoments/formRadioGroup/index.d.ts +1 -1
  59. package/FormItem/compoments/formSelect/index.d.ts +7 -7
  60. package/FormItem/errorTips.d.ts +3 -3
  61. package/FormItem/index.d.ts +5 -5
  62. package/FormItem/index.js +3 -2
  63. package/FormItem/lang/en_US.d.ts +10 -0
  64. package/FormItem/lang/index.d.ts +21 -0
  65. package/FormItem/lang/zh_CN.d.ts +10 -0
  66. package/FormItem/validateFunction.d.ts +1 -1
  67. package/FunctionModal/dialog.d.ts +26 -26
  68. package/FunctionModal/index.d.ts +6 -6
  69. package/FunctionModal/index.js +6 -6
  70. package/FunctionModal/modalContext.d.ts +3 -3
  71. package/GlobalContext/componentsProps.d.ts +7 -7
  72. package/GlobalContext/index.d.ts +2 -2
  73. package/GlobalContext/useFormatMessage.d.ts +1 -1
  74. package/Help/index.js +1 -1
  75. package/HelperText/index.js +1 -1
  76. package/InputLang/index.d.ts +2 -2
  77. package/InputLang/index.js +8 -8
  78. package/InputNumber/index.d.ts +2 -2
  79. package/InputNumber/index.js +3 -3
  80. package/Label/index.js +2 -2
  81. package/Loading/index.js +1 -1
  82. package/Menu/index.js +14 -14
  83. package/Menu/interface.d.ts +1 -1
  84. package/Message/index.js +12 -12
  85. package/Modal/Confirm/index.d.ts +3 -3
  86. package/Modal/index.d.ts +1 -1
  87. package/Modal/index.js +5 -5
  88. package/MultiBox/index.d.ts +2 -2
  89. package/MultiBox/index.js +3 -3
  90. package/Notification/index.js +1 -1
  91. package/OperateBtn/index.d.ts +2 -2
  92. package/OperateBtn/index.js +40 -36
  93. package/PageHeader/index.js +30 -30
  94. package/PageHeader/interface.d.ts +1 -1
  95. package/Pagination/index.d.ts +1 -1
  96. package/Pagination/index.js +17 -17
  97. package/PasswordRules/index.js +7 -7
  98. package/PopConfirm/index.js +3 -3
  99. package/Progress/Line.d.ts +10 -10
  100. package/Progress/Steps.d.ts +2 -2
  101. package/Progress/index.d.ts +12 -12
  102. package/Progress/index.js +40 -40
  103. package/Progress/utils.d.ts +4 -4
  104. package/Querying/index.d.ts +1 -1
  105. package/Querying/index.js +2 -2
  106. package/README.md +3 -0
  107. package/Radio/index.d.ts +1 -1
  108. package/Radio/index.js +4 -4
  109. package/RadioGroup/index.d.ts +2 -2
  110. package/RadioGroup/index.js +3 -3
  111. package/Search/index.js +1 -1
  112. package/Select/index.d.ts +3 -3
  113. package/Select/index.js +42 -42
  114. package/SelectInput/index.js +2 -2
  115. package/Selector/index.js +15 -15
  116. package/Selector/interface.d.ts +6 -6
  117. package/SelectorPicker/index.d.ts +4 -4
  118. package/SelectorPicker/index.js +9 -9
  119. package/SingleBox/index.d.ts +2 -2
  120. package/SingleBox/index.js +3 -3
  121. package/Slider/interface.d.ts +1 -1
  122. package/Status/index.d.ts +4 -4
  123. package/Status/index.js +4 -4
  124. package/Stepper/index.d.ts +5 -5
  125. package/Stepper/index.js +23 -23
  126. package/Switch/index.d.ts +7 -7
  127. package/Switch/index.js +23 -5
  128. package/Switch/lang/en_US.d.ts +4 -0
  129. package/Switch/lang/index.d.ts +9 -0
  130. package/Switch/lang/zh_CN.d.ts +4 -0
  131. package/Table/index.js +34 -34
  132. package/Table/interface.d.ts +4 -4
  133. package/Table/tableBodyElement/index.d.ts +1 -1
  134. package/Table/tableBodyInterface.d.ts +2 -2
  135. package/Table/tableContainer/index.d.ts +1 -1
  136. package/Table/tableElement/index.d.ts +1 -1
  137. package/Table/tableHeadElement/index.d.ts +1 -1
  138. package/Table/tableHeadInterface.d.ts +1 -1
  139. package/Table/tablePaginationInterface.d.ts +6 -6
  140. package/Table/tdElement/index.d.ts +1 -1
  141. package/Table/thElement/index.d.ts +2 -2
  142. package/Table/trElement/index.d.ts +1 -1
  143. package/Table/util.d.ts +1 -1
  144. package/Tabs/index.d.ts +1 -1
  145. package/Tabs/index.js +25 -17
  146. package/Tag/TagGroup.d.ts +5 -5
  147. package/Tag/index.d.ts +7 -7
  148. package/Tag/index.js +25 -25
  149. package/TextEditor/index.d.ts +2 -2
  150. package/TextEditor/index.js +45 -27
  151. package/TextEditor/lang/en_US.d.ts +4 -0
  152. package/TextEditor/lang/index.d.ts +9 -0
  153. package/TextEditor/lang/zh_CN.d.ts +4 -0
  154. package/TextField/index.d.ts +1 -1
  155. package/TextField/index.js +13 -13
  156. package/TimePicker/index.d.ts +1 -1
  157. package/TimePicker/index.js +1 -1
  158. package/Timeline/TimelineItem.d.ts +1 -1
  159. package/Timeline/index.d.ts +5 -5
  160. package/Timeline/index.js +14 -14
  161. package/Title/index.d.ts +4 -4
  162. package/Title/index.js +3 -3
  163. package/ToggleButton/ToggleButtonGroup.d.ts +1 -1
  164. package/ToggleButton/index.d.ts +5 -1
  165. package/ToggleButton/index.js +17 -10
  166. package/Transfer/box.d.ts +6 -6
  167. package/Transfer/index.js +21 -21
  168. package/Tree/OperateBar/index.d.ts +4 -4
  169. package/Tree/Tree.d.ts +2 -2
  170. package/Tree/index.js +2 -2
  171. package/Tree/interface.d.ts +4 -4
  172. package/Tree/utils/tools.d.ts +1 -1
  173. package/Upload/Dragger/index.d.ts +2 -2
  174. package/Upload/ErroTip/index.d.ts +1 -1
  175. package/Upload/index.d.ts +2 -2
  176. package/Upload/index.js +7 -7
  177. package/Upload/interface.d.ts +1 -1
  178. package/_verture/{index-8469865e.js → index-0f315bca.js} +2 -2
  179. package/_verture/{index-e1b800aa.js → index-92e406f4.js} +48 -24
  180. package/_verture/{index-47297a40.js → index-bc461491.js} +45 -45
  181. package/_verture/{index-1c8d3e94.js → index-d251967e.js} +101 -47
  182. package/_verture/{modalContext-670eab09.js → modalContext-9299acc9.js} +25 -25
  183. package/index.d.ts +2 -0
  184. package/index.js +8 -7
  185. package/locale/en-US.d.ts +19 -0
  186. package/locale/index.d.ts +38 -0
  187. package/locale/index.js +39 -1
  188. package/locale/zh-CN.d.ts +19 -0
  189. package/package.json +3 -1
  190. package/umd/AutoBox.js +1 -1
  191. package/umd/AutoTips.js +1 -1
  192. package/umd/Badge.js +1 -0
  193. package/umd/Breadcrumbs.js +1 -1
  194. package/umd/Button.js +2 -2
  195. package/umd/ButtonGroup.js +2 -2
  196. package/umd/Cascader.js +5 -5
  197. package/umd/Checkbox.js +1 -1
  198. package/umd/CheckboxGroup.js +1 -1
  199. package/umd/Collapse.js +1 -1
  200. package/umd/CollapseBox.js +1 -1
  201. package/umd/CollapseLayout.js +4 -4
  202. package/umd/ComboSelect.js +4 -4
  203. package/umd/CopyText.js +1 -1
  204. package/umd/DatePicker.js +2 -2
  205. package/umd/Desktop.js +2 -2
  206. package/umd/DragVerify.js +4 -4
  207. package/umd/Drawer.js +2 -2
  208. package/umd/DynamicMultiBox.js +4 -4
  209. package/umd/Form.js +4 -4
  210. package/umd/FormItem.js +4 -4
  211. package/umd/FunctionModal.js +2 -2
  212. package/umd/Help.js +1 -1
  213. package/umd/HelperText.js +1 -1
  214. package/umd/InputLang.js +1 -1
  215. package/umd/InputNumber.js +1 -1
  216. package/umd/Label.js +1 -1
  217. package/umd/Loading.js +1 -1
  218. package/umd/Menu.js +2 -2
  219. package/umd/Message.js +1 -1
  220. package/umd/Modal.js +2 -2
  221. package/umd/MultiBox.js +7 -7
  222. package/umd/Notification.js +1 -1
  223. package/umd/OperateBtn.js +2 -2
  224. package/umd/PageHeader.js +2 -2
  225. package/umd/Pagination.js +4 -4
  226. package/umd/PasswordRules.js +4 -4
  227. package/umd/PopConfirm.js +2 -2
  228. package/umd/Progress.js +1 -1
  229. package/umd/Radio.js +1 -1
  230. package/umd/RadioGroup.js +1 -1
  231. package/umd/Search.js +7 -7
  232. package/umd/Select.js +1 -1
  233. package/umd/SelectInput.js +1 -1
  234. package/umd/Selector.js +1 -1
  235. package/umd/SelectorPicker.js +1 -1
  236. package/umd/SingleBox.js +1 -1
  237. package/umd/Stepper.js +1 -1
  238. package/umd/Switch.js +4 -4
  239. package/umd/Table.js +2 -2
  240. package/umd/Tabs.js +4 -4
  241. package/umd/Tag.js +1 -1
  242. package/umd/TextEditor.js +2 -2
  243. package/umd/TextField.js +7 -7
  244. package/umd/TimePicker.js +2 -2
  245. package/umd/Title.js +1 -1
  246. package/umd/ToggleButton.js +4 -4
  247. package/umd/Transfer.js +2 -2
  248. package/umd/Tree.js +1 -1
  249. package/umd/Upload.js +2 -2
  250. package/umd/locale.js +1 -1
@@ -10,7 +10,7 @@ styleInject(css_248z);
10
10
  var Container = function Container() {
11
11
  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
12
12
  var _props$className = props.className,
13
- className = _props$className === void 0 ? "" : _props$className,
13
+ className = _props$className === void 0 ? '' : _props$className,
14
14
  top = props.top,
15
15
  _props$topStyle = props.topStyle,
16
16
  topStyle = _props$topStyle === void 0 ? {} : _props$topStyle,
@@ -24,58 +24,58 @@ var Container = function Container() {
24
24
  _props$bottomStyle = props.bottomStyle,
25
25
  bottomStyle = _props$bottomStyle === void 0 ? {} : _props$bottomStyle,
26
26
  _props$type = props.type,
27
- type = _props$type === void 0 ? "tlr" : _props$type;
27
+ type = _props$type === void 0 ? 'tlr' : _props$type;
28
28
  var topSty, leftSty, rightSty, bottomSty, bodySty;
29
29
  var position = React__default.useMemo(function () {
30
30
  switch (type) {
31
- case "tlr":
31
+ case 'tlr':
32
32
  // 上 左右
33
33
  topSty = Object.assign({
34
- height: top ? "50px" : '0',
35
- width: "100%"
34
+ height: top ? '50px' : '0',
35
+ width: '100%'
36
36
  }, topStyle);
37
37
  leftSty = Object.assign({
38
- height: "100%",
39
- width: "auto"
38
+ height: '100%',
39
+ width: 'auto'
40
40
  }, leftStyle);
41
41
  bottomSty = Object.assign({
42
- height: bottom ? "20px" : "0",
43
- width: "100%"
42
+ height: bottom ? '20px' : '0',
43
+ width: '100%'
44
44
  }, bottomStyle);
45
45
  rightSty = Object.assign({
46
46
  height: "calc(100% - ".concat(bottomSty.height, ")"),
47
- width: "auto"
47
+ width: 'auto'
48
48
  }, rightStyle);
49
49
  bodySty = {
50
- width: "100%",
50
+ width: '100%',
51
51
  height: "calc(100% - ".concat(topSty.height, ")")
52
52
  };
53
53
  return jsxs("div", Object.assign({
54
54
  className: "".concat($prefixCls, "-container ").concat($prefixCls, "-tlr ").concat(className)
55
55
  }, {
56
56
  children: [jsx("div", Object.assign({
57
- className: "container-top",
57
+ className: 'container-top',
58
58
  style: topSty
59
59
  }, {
60
60
  children: top
61
61
  })), jsxs("div", Object.assign({
62
- className: "container-body",
62
+ className: 'container-body',
63
63
  style: bodySty
64
64
  }, {
65
65
  children: [jsx("div", Object.assign({
66
- className: "container-left",
66
+ className: 'container-left',
67
67
  style: leftSty
68
68
  }, {
69
69
  children: left
70
70
  })), jsx("div", Object.assign({
71
- className: "container-body-right",
71
+ className: 'container-body-right',
72
72
  style: {
73
- width: "auto",
74
- height: "100%"
73
+ width: 'auto',
74
+ height: '100%'
75
75
  }
76
76
  }, {
77
77
  children: jsx("div", Object.assign({
78
- className: "container-right",
78
+ className: 'container-right',
79
79
  style: rightSty
80
80
  }, {
81
81
  children: right
@@ -83,139 +83,139 @@ var Container = function Container() {
83
83
  }))]
84
84
  }))]
85
85
  }));
86
- case "tlrb":
86
+ case 'tlrb':
87
87
  // 上 左右 下
88
88
  topSty = Object.assign({
89
- height: top ? "50px" : '0',
90
- width: "100%"
89
+ height: top ? '50px' : '0',
90
+ width: '100%'
91
91
  }, topStyle);
92
92
  leftSty = Object.assign({
93
- height: "100%",
94
- width: "auto"
93
+ height: '100%',
94
+ width: 'auto'
95
95
  }, leftStyle);
96
96
  rightSty = Object.assign({
97
- height: "100%",
98
- width: "auto"
97
+ height: '100%',
98
+ width: 'auto'
99
99
  }, rightStyle);
100
100
  bottomSty = Object.assign({
101
- height: bottom ? "20px" : "0px",
102
- width: "100%"
101
+ height: bottom ? '20px' : '0px',
102
+ width: '100%'
103
103
  }, bottomStyle);
104
104
  bodySty = {
105
- width: "100%",
105
+ width: '100%',
106
106
  height: "calc(100% - ".concat(topSty.height, " - ").concat(bottomSty.height, ")")
107
107
  };
108
108
  return jsxs("div", Object.assign({
109
109
  className: "".concat($prefixCls, "-container ").concat($prefixCls, "-tlrb ").concat(className)
110
110
  }, {
111
111
  children: [jsx("div", Object.assign({
112
- className: "container-top",
112
+ className: 'container-top',
113
113
  style: topSty
114
114
  }, {
115
115
  children: top
116
116
  })), jsxs("div", Object.assign({
117
- className: "container-body",
117
+ className: 'container-body',
118
118
  style: bodySty
119
119
  }, {
120
120
  children: [jsx("div", Object.assign({
121
- className: "container-left",
121
+ className: 'container-left',
122
122
  style: leftSty
123
123
  }, {
124
124
  children: left
125
125
  })), jsx("div", Object.assign({
126
- className: "container-right",
126
+ className: 'container-right',
127
127
  style: rightSty
128
128
  }, {
129
129
  children: right
130
130
  }))]
131
131
  })), jsx("div", Object.assign({
132
- className: "container-bottom",
132
+ className: 'container-bottom',
133
133
  style: bottomSty
134
134
  }, {
135
135
  children: bottom
136
136
  }))]
137
137
  }));
138
- case "ltrb":
138
+ case 'ltrb':
139
139
  // 左 上右下
140
140
  leftSty = Object.assign({
141
- height: "100%",
142
- width: "auto"
141
+ height: '100%',
142
+ width: 'auto'
143
143
  }, leftStyle);
144
144
  topSty = Object.assign({
145
- height: top ? "50px" : '0',
146
- width: "100%"
145
+ height: top ? '50px' : '0',
146
+ width: '100%'
147
147
  }, topStyle);
148
148
  bottomSty = Object.assign({
149
- height: bottom ? "30px" : "0px",
150
- width: "100%"
149
+ height: bottom ? '30px' : '0px',
150
+ width: '100%'
151
151
  }, bottomStyle);
152
152
  rightSty = Object.assign({
153
153
  height: "calc(100% - ".concat(topSty.height, "px - ").concat(bottomSty.height, ")"),
154
- width: "100%"
154
+ width: '100%'
155
155
  }, rightStyle);
156
156
  bodySty = {
157
- width: "auto",
157
+ width: 'auto',
158
158
  height: "100%"
159
159
  };
160
160
  return jsxs("div", Object.assign({
161
161
  className: "".concat($prefixCls, "-container ").concat($prefixCls, "-ltrb ").concat(className)
162
162
  }, {
163
163
  children: [jsx("div", Object.assign({
164
- className: "container-left",
164
+ className: 'container-left',
165
165
  style: leftSty
166
166
  }, {
167
167
  children: left
168
168
  })), jsxs("div", Object.assign({
169
- className: "container-body",
169
+ className: 'container-body',
170
170
  style: bodySty
171
171
  }, {
172
172
  children: [jsx("div", Object.assign({
173
- className: "container-top",
173
+ className: 'container-top',
174
174
  style: topSty
175
175
  }, {
176
176
  children: top
177
177
  })), jsx("div", Object.assign({
178
- className: "container-right",
178
+ className: 'container-right',
179
179
  style: rightSty
180
180
  }, {
181
181
  children: right
182
182
  })), jsx("div", Object.assign({
183
- className: "container-bottom",
183
+ className: 'container-bottom',
184
184
  style: bottomSty
185
185
  }, {
186
186
  children: bottom
187
187
  }))]
188
188
  }))]
189
189
  }));
190
- case "trb":
190
+ case 'trb':
191
191
  // 上 中 下
192
192
  topSty = Object.assign({
193
- height: top ? "50px" : '0',
194
- width: "100%"
193
+ height: top ? '50px' : '0',
194
+ width: '100%'
195
195
  }, topStyle);
196
196
  bottomSty = Object.assign({
197
- height: bottom ? "30px" : "0px",
198
- width: "100%"
197
+ height: bottom ? '30px' : '0px',
198
+ width: '100%'
199
199
  }, bottomStyle);
200
200
  rightSty = Object.assign({
201
201
  height: "calc(100% - ".concat(topSty.height, "px - ").concat(bottomSty.height, ")"),
202
- width: "100%"
202
+ width: '100%'
203
203
  }, rightStyle);
204
204
  return jsxs("div", Object.assign({
205
205
  className: "".concat($prefixCls, "-container ").concat($prefixCls, "-trb ").concat(className)
206
206
  }, {
207
207
  children: [jsx("div", Object.assign({
208
- className: "container-top",
208
+ className: 'container-top',
209
209
  style: topSty
210
210
  }, {
211
211
  children: top
212
212
  })), jsx("div", Object.assign({
213
- className: "container-right",
213
+ className: 'container-right',
214
214
  style: rightSty
215
215
  }, {
216
216
  children: right
217
217
  })), jsx("div", Object.assign({
218
- className: "container-bottom",
218
+ className: 'container-bottom',
219
219
  style: bottomSty
220
220
  }, {
221
221
  children: bottom
@@ -4,7 +4,7 @@
4
4
  * @description 复制文本
5
5
  */
6
6
  import { FunctionComponent, ReactNode } from 'react';
7
- import { TextFieldProps } from "../TextField";
7
+ import { TextFieldProps } from '../TextField';
8
8
  import './index.scss';
9
9
  export interface CopyTextProps {
10
10
  className?: string;
@@ -27,7 +27,7 @@ export interface CopyTextProps {
27
27
  /** 延时 */
28
28
  timeout?: number;
29
29
  /** 复制事件 */
30
- onCopy?: () => (Promise<string | void> | string | void);
30
+ onCopy?: () => Promise<string | void> | string | void;
31
31
  }
32
32
  declare const CopyText: FunctionComponent<CopyTextProps>;
33
33
  export default CopyText;
@@ -1,18 +1,18 @@
1
- import React, { ReactNode } from "react";
2
- import { GenerateConfig } from "rc-picker/lib/generate/index";
3
- import { PickerBaseProps as RCPickerBaseProps, PickerDateProps as RCPickerDateProps, PickerTimeProps as RCPickerTimeProps } from "rc-picker/lib/Picker";
4
- import { RangePickerBaseProps as RCRangePickerBaseProps, RangePickerDateProps as RCRangePickerDateProps, RangePickerTimeProps as RCRangePickerTimeProps } from "rc-picker/lib/RangePicker";
5
- import { Locale as RcPickerLocale } from "rc-picker/lib/interface";
6
- import PickerButton from "../PickerButton";
7
- import PickerTag from "../PickerTag";
8
- import { Dayjs } from "dayjs";
9
- import { LabelTooltipProps } from "../../Label";
10
- import { TooltipProps } from "../../Tooltip";
1
+ import React, { ReactNode } from 'react';
2
+ import { GenerateConfig } from 'rc-picker/lib/generate/index';
3
+ import { PickerBaseProps as RCPickerBaseProps, PickerDateProps as RCPickerDateProps, PickerTimeProps as RCPickerTimeProps } from 'rc-picker/lib/Picker';
4
+ import { RangePickerBaseProps as RCRangePickerBaseProps, RangePickerDateProps as RCRangePickerDateProps, RangePickerTimeProps as RCRangePickerTimeProps } from 'rc-picker/lib/RangePicker';
5
+ import { Locale as RcPickerLocale } from 'rc-picker/lib/interface';
6
+ import PickerButton from '../PickerButton';
7
+ import PickerTag from '../PickerTag';
8
+ import { Dayjs } from 'dayjs';
9
+ import { LabelTooltipProps } from '../../Label';
10
+ import { TooltipProps } from '../../Tooltip';
11
11
  export type ShortcutType = {
12
12
  text: string;
13
13
  value: Dayjs[] | (() => Dayjs[]);
14
14
  };
15
- type SizeType = "small" | "medium" | "large" | undefined;
15
+ type SizeType = 'small' | 'medium' | 'large' | undefined;
16
16
  export interface TimePickerLocale {
17
17
  placeholder?: string;
18
18
  rangePlaceholder?: [string, string];
@@ -24,9 +24,9 @@ export declare const Components: {
24
24
  button: typeof PickerButton;
25
25
  rangeItem: typeof PickerTag;
26
26
  };
27
- type InjectDefaultProps<Props, Type> = Omit<Props, "locale" | "generateConfig" | "prevIcon" | "nextIcon" | "superPrevIcon" | "superNextIcon" | "hideHeader" | "components" | "value" | "defaultValue"> & {
27
+ type InjectDefaultProps<Props, Type> = Omit<Props, 'locale' | 'generateConfig' | 'prevIcon' | 'nextIcon' | 'superPrevIcon' | 'superNextIcon' | 'hideHeader' | 'components' | 'value' | 'defaultValue'> & {
28
28
  /** 国际化 */
29
- locale?: "zh" | "en";
29
+ locale?: 'zh' | 'en';
30
30
  /** 大小 */
31
31
  size?: SizeType;
32
32
  /** 显示边框 */
@@ -36,9 +36,9 @@ type InjectDefaultProps<Props, Type> = Omit<Props, "locale" | "generateConfig" |
36
36
  /** 帮助文本 */
37
37
  helperText?: ReactNode;
38
38
  /** value */
39
- value?: Type extends "range" ? RangeValue<Dayjs> : NullableDateType<Dayjs>;
39
+ value?: Type extends 'range' ? RangeValue<Dayjs> : NullableDateType<Dayjs>;
40
40
  /** 默认值 */
41
- defaultValue?: Type extends "range" ? RangeValue<Dayjs> : NullableDateType<Dayjs>;
41
+ defaultValue?: Type extends 'range' ? RangeValue<Dayjs> : NullableDateType<Dayjs>;
42
42
  /** 标题 */
43
43
  label?: ReactNode;
44
44
  /** 帮助提示信息 */
@@ -76,19 +76,19 @@ export type AdditionalPickerLocaleLangProps = {
76
76
  rangeWeekPlaceholder?: [string, string];
77
77
  rangePlaceholder?: [string, string];
78
78
  };
79
- export type PickerBaseProps<DateType> = InjectDefaultProps<RCPickerBaseProps<DateType>, "">;
80
- export type PickerDateProps<DateType> = InjectDefaultProps<RCPickerDateProps<DateType>, "">;
81
- export type PickerTimeProps<DateType> = InjectDefaultProps<RCPickerTimeProps<DateType>, "">;
79
+ export type PickerBaseProps<DateType> = InjectDefaultProps<RCPickerBaseProps<DateType>, ''>;
80
+ export type PickerDateProps<DateType> = InjectDefaultProps<RCPickerDateProps<DateType>, ''>;
81
+ export type PickerTimeProps<DateType> = InjectDefaultProps<RCPickerTimeProps<DateType>, ''>;
82
82
  export type PickerProps<DateType> = PickerBaseProps<DateType> | PickerDateProps<DateType> | PickerTimeProps<DateType>;
83
- export type RangePickerBaseProps<DateType> = InjectDefaultProps<RCRangePickerBaseProps<DateType>, "range">;
84
- export type RangePickerDateProps<DateType> = InjectDefaultProps<RCRangePickerDateProps<DateType>, "range">;
85
- export type RangePickerTimeProps<DateType> = InjectDefaultProps<RCRangePickerTimeProps<DateType>, "range">;
83
+ export type RangePickerBaseProps<DateType> = InjectDefaultProps<RCRangePickerBaseProps<DateType>, 'range'>;
84
+ export type RangePickerDateProps<DateType> = InjectDefaultProps<RCRangePickerDateProps<DateType>, 'range'>;
85
+ export type RangePickerTimeProps<DateType> = InjectDefaultProps<RCRangePickerTimeProps<DateType>, 'range'>;
86
86
  export type RangePickerProps<DateType> = (RangePickerBaseProps<DateType> | RangePickerDateProps<DateType> | RangePickerTimeProps<DateType>) & {
87
87
  /** 预设时间范围快捷选择 */
88
88
  /** @deprecated Please use `presets` instead */
89
89
  shortcuts?: ShortcutType[];
90
90
  /** 预设范围选择面板位置 */
91
- shortcutsPlacement?: "left" | "right";
91
+ shortcutsPlacement?: 'left' | 'right';
92
92
  };
93
93
  declare function generatePicker<DateType>(generateConfig: GenerateConfig<DateType>): import("./interface").PickerComponentClass<PickerProps<DateType>, unknown> & {
94
94
  WeekPicker: import("./interface").PickerComponentClass<Omit<PickerProps<DateType>, "picker">, unknown>;
@@ -117,8 +117,9 @@ var ELocale = {
117
117
  };
118
118
 
119
119
  function generatePicker$1(generateConfig) {
120
- //
120
+ //
121
121
  function getPicker(picker, displayName) {
122
+ // const consumerName = displayName === 'TimePicker' ? 'timePicker' : 'datePicker';
122
123
  var Picker = /*#__PURE__*/forwardRef(function (props, ref) {
123
124
  var className = props.className;
124
125
  props.size;
@@ -454,7 +455,7 @@ function generateRangePicker(generateConfig) {
454
455
  ref: innerRef,
455
456
  placeholder: getRangePlaceholder(picker, newLocale, placeholder),
456
457
  suffixIcon: picker === 'time' ? jsx(TimeIcon, {}) : jsx(DateIcon, {
457
- className: 'picker-icon'
458
+ className: "picker-icon"
458
459
  }),
459
460
  clearIcon: jsx(CloseCircleF, {}),
460
461
  allowClear: true,
@@ -512,11 +513,11 @@ var Components = {
512
513
  };
513
514
  //format map
514
515
  var pickerFormatMap = {
515
- year: "YYYY",
516
- quarter: "YYYY-QQ",
517
- month: "YYYY-MM",
518
- week: "YYYY-WW",
519
- time: "HH:mm:ss"
516
+ year: 'YYYY',
517
+ quarter: 'YYYY-QQ',
518
+ month: 'YYYY-MM',
519
+ week: 'YYYY-WW',
520
+ time: 'HH:mm:ss'
520
521
  };
521
522
  //picker 生成器
522
523
  function generatePicker(generateConfig) {
@@ -1,6 +1,6 @@
1
1
  import { PickerMode } from 'rc-picker/lib/interface';
2
2
  import { PickerLocale } from './generatePicker';
3
- import { SharedTimeProps } from "rc-picker/lib/panels/TimePanel";
3
+ import { SharedTimeProps } from 'rc-picker/lib/panels/TimePanel';
4
4
  export declare function getPlaceholder(picker: PickerMode | undefined, locale: PickerLocale, customizePlaceholder?: string): string;
5
5
  export declare function getRangePlaceholder(picker: PickerMode | undefined, locale: PickerLocale, customizePlaceholder?: [string, string]): [string, string] | undefined;
6
6
  export declare function getTimeProps<DateType, DisabledTime>(props: {
@@ -4,7 +4,7 @@
4
4
  * @description 桌面移动
5
5
  */
6
6
  import React, { FunctionComponent } from 'react';
7
- import { TooltipProps } from "../Tooltip";
7
+ import { TooltipProps } from '../Tooltip';
8
8
  import './index.scss';
9
9
  export interface DesktopDataItem {
10
10
  key: string;
package/Desktop/index.js CHANGED
@@ -260,8 +260,8 @@ var Desktop = function Desktop(props) {
260
260
  map[index] = getItemData(item, index, type);
261
261
  item = map[index];
262
262
  var style = {
263
- left: map[index].point.x + 'px',
264
- top: map[index].point.y + 'px',
263
+ left: "".concat(map[index].point.x, "px"),
264
+ top: "".concat(map[index].point.y, "px"),
265
265
  width: defaultMatrix.width,
266
266
  height: defaultMatrix.height
267
267
  };
@@ -438,6 +438,7 @@ var Desktop = function Desktop(props) {
438
438
  // 计算光标碰撞
439
439
  //const list = Object.keys(map);
440
440
  var dragRect = {
441
+ // 矩阵
441
442
  x: x,
442
443
  y: y,
443
444
  w: dragData.point.x + dragData.point.width,
@@ -446,6 +447,7 @@ var Desktop = function Desktop(props) {
446
447
  height: dragData.point.height
447
448
  };
448
449
  var dragCentre = {
450
+ // 拖拽矩形中心点
449
451
  x: dragRect.x + dragRect.width / 2,
450
452
  y: dragRect.y + dragRect.height / 2
451
453
  };
@@ -454,11 +456,12 @@ var Desktop = function Desktop(props) {
454
456
  if (!item || String(item.key) === String(dragData.key)) continue;
455
457
  if (item.parent && dir !== item.parent) continue;
456
458
  /*
457
- * x,y_____
458
- * | |
459
- * |_____w,h
460
- */
459
+ * x,y_____
460
+ * | |
461
+ * |_____w,h
462
+ */
461
463
  var rect = {
464
+ // 矩阵
462
465
  x: item.point.x,
463
466
  y: item.point.y,
464
467
  w: item.point.x + item.point.width,
@@ -484,6 +487,7 @@ var Desktop = function Desktop(props) {
484
487
  }
485
488
  // 计算碰撞位置,左,中,右
486
489
  var _dragCentre = {
490
+ // 拖拽矩形中心点
487
491
  x: dragRect.x + dragRect.width / 2,
488
492
  y: dragRect.y + dragRect.height / 2
489
493
  };
@@ -606,7 +610,7 @@ var Desktop = function Desktop(props) {
606
610
  */
607
611
  var newDir = function newDir(item, dragMapData, t) {
608
612
  if (t === 'R') item.index--;
609
- var key = 'dir_' + item.key + (Math.random() * 1000000 | 0);
613
+ var key = "dir_".concat(item.key).concat(Math.random() * 1000000 | 0);
610
614
  map[item.index] = Object.assign(Object.assign({}, item), {
611
615
  key: key,
612
616
  point: getPoint(item.index),
@@ -651,6 +655,7 @@ var Desktop = function Desktop(props) {
651
655
  * @param point 位置
652
656
  */
653
657
  var setNewPoint = function setNewPoint(item, next, point) {
658
+ // item 当前节点,下一个节点索引
654
659
  if (!item) return;
655
660
  if (!point) point = getPoint(next);
656
661
  var dom = getItemByKey(item.key);
@@ -668,7 +673,7 @@ var Desktop = function Desktop(props) {
668
673
  var reset = function reset(type) {
669
674
  var _a, _b, _c;
670
675
  switch (type) {
671
- case "impact":
676
+ case 'impact':
672
677
  var impactDom = document.querySelector('[impact="true"]');
673
678
  if (!impactDom) return;
674
679
  if (dragData && dragData.impact) {
@@ -677,7 +682,7 @@ var Desktop = function Desktop(props) {
677
682
  }
678
683
  impactDom === null || impactDom === void 0 ? void 0 : impactDom.removeAttribute('impact');
679
684
  break;
680
- case "end":
685
+ case 'end':
681
686
  dragData = null;
682
687
  (_a = document.querySelector('[impact="true"]')) === null || _a === void 0 ? void 0 : _a.removeAttribute('impact');
683
688
  (_b = document.querySelector('[drag-item="true"]')) === null || _b === void 0 ? void 0 : _b.removeAttribute('drag-item');
@@ -700,8 +705,8 @@ var Desktop = function Desktop(props) {
700
705
  */
701
706
  var setPoint = function setPoint(dom, x, y) {
702
707
  if (!dom) return;
703
- if (x !== undefined || x !== null) dom.style.left = x + 'px';
704
- if (y !== undefined || y !== null) dom.style.top = y + 'px';
708
+ if (x !== undefined || x !== null) dom.style.left = "".concat(x, "px");
709
+ if (y !== undefined || y !== null) dom.style.top = "".concat(y, "px");
705
710
  };
706
711
  /** 排序 */
707
712
  var onSort = function onSort() {
@@ -823,8 +828,8 @@ var Desktop = function Desktop(props) {
823
828
  * @return {string}
824
829
  */
825
830
  var handClass = function handClass() {
826
- var str = $prefixCls + '-desktop';
827
- if (props.className) str += ' ' + props.className;
831
+ var str = "".concat($prefixCls, "-desktop");
832
+ if (props.className) str += " ".concat(props.className);
828
833
  return str;
829
834
  };
830
835
  return jsxs("div", Object.assign({
@@ -25,7 +25,7 @@ export interface DragVerifyProps {
25
25
  /** 刷新 */
26
26
  refresh?: any;
27
27
  /** 获取图片接口 */
28
- getImgInfo: () => (Promise<DragVerifyImgProps> | DragVerifyImgProps);
28
+ getImgInfo: () => Promise<DragVerifyImgProps> | DragVerifyImgProps;
29
29
  /** 提交校验接口 xPos: x轴坐标,imgInfo:图片信息
30
30
  * true 通过
31
31
  * false 不通过
@@ -57,7 +57,7 @@ var DragVerify = function DragVerify(props) {
57
57
  getImgInfo: getImgInfo,
58
58
  verify: verify
59
59
  });
60
- var prefixCls = $prefixCls + '-drag-verify';
60
+ var prefixCls = "".concat($prefixCls, "-drag-verify");
61
61
  constData.current.getImgInfo = getImgInfo;
62
62
  constData.current.verify = verify;
63
63
  useEffect(function () {
@@ -147,7 +147,7 @@ var DragVerify = function DragVerify(props) {
147
147
  imgMove.style.display = 'inline-block'; // 必须先显示图片,要不然ie10获取不到图片
148
148
  refreshEle.style.display = 'inline-block';
149
149
  imgMove.width = imgMove.width / constData.current.imgScale;
150
- imgMove.style.top = ((_a = constData.current.imgInfo) === null || _a === void 0 ? void 0 : _a.y) / constData.current.imgScale + 'px';
150
+ imgMove.style.top = "".concat(((_a = constData.current.imgInfo) === null || _a === void 0 ? void 0 : _a.y) / constData.current.imgScale, "px");
151
151
  setLoading(false);
152
152
  };
153
153
  };
@@ -167,32 +167,32 @@ var DragVerify = function DragVerify(props) {
167
167
  var moveSliderWidth = moveSliderRect.width; // 进度条的宽
168
168
  moveDom.onmousedown = function (e) {
169
169
  if (constData.current.padding) return;
170
- sliderBox.classList.add(prefixCls + '-move');
170
+ sliderBox.classList.add("".concat(prefixCls, "-move"));
171
171
  document.onmousemove = function (event) {
172
172
  var moveW = event.pageX - e.pageX; // 鼠标移动的距离
173
173
  if (moveW < 0) moveW = 0;
174
174
  if (moveW + moveDomWidth > imgBg.width) moveW = imgBg.width - moveDomWidth;
175
- moveDom.style.left = moveW - 1 + 'px';
175
+ moveDom.style.left = "".concat(moveW - 1, "px");
176
176
  // 加一防止滑块与进度条之间有间隙
177
- moveProgress.style.width = (moveW < 2 ? 2 : moveW) + 'px';
177
+ moveProgress.style.width = "".concat(moveW < 2 ? 2 : moveW, "px");
178
178
  // 进度条走过的比例
179
179
  var ratio = moveW / (moveSliderWidth - moveDomWidth);
180
180
  var imgMoveWidth = (imgBg.width - imgMove.width) * ratio;
181
- imgMove.style.left = imgMoveWidth + 'px';
181
+ imgMove.style.left = "".concat(imgMoveWidth, "px");
182
182
  sliderText.innerHTML = '';
183
183
  };
184
184
  // 鼠标抬起
185
185
  document.onmouseup = function () {
186
186
  document.onmousemove = null;
187
187
  document.onmouseup = null;
188
- sliderBox.classList.remove(prefixCls + '-move');
188
+ sliderBox.classList.remove("".concat(prefixCls, "-move"));
189
189
  constData.current.padding = true;
190
190
  var X = parseFloat(imgMove.style.left);
191
191
  var handX = X * constData.current.imgScale;
192
192
  sliderPosiCheck(handX, function (result) {
193
193
  if (!result) {
194
194
  // 错误
195
- sliderBox.classList.add(prefixCls + '-error');
195
+ sliderBox.classList.add("".concat(prefixCls, "-error"));
196
196
  constData.current.timerError = setTimeout(function () {
197
197
  constData.current.padding = false;
198
198
  reset();
@@ -203,7 +203,7 @@ var DragVerify = function DragVerify(props) {
203
203
  }, 1000);
204
204
  return;
205
205
  }
206
- sliderBox.classList.add(prefixCls + '-success');
206
+ sliderBox.classList.add("".concat(prefixCls, "-success"));
207
207
  /*constData.current.timerSuccess = setTimeout(() => {
208
208
  //constData.current.padding = false;
209
209
  //sliderBox.classList.remove(prefixCls + '-success');
@@ -216,8 +216,8 @@ var DragVerify = function DragVerify(props) {
216
216
  var reset = function reset() {
217
217
  var sliderBox = refDom.current;
218
218
  if (!sliderBox) return;
219
- sliderBox.classList.remove(prefixCls + '-success');
220
- sliderBox.classList.remove(prefixCls + '-error');
219
+ sliderBox.classList.remove("".concat(prefixCls, "-success"));
220
+ sliderBox.classList.remove("".concat(prefixCls, "-error"));
221
221
  var moveDom = sliderBox.querySelector('.slider-move-box'); // 滑块
222
222
  var moveProgress = sliderBox.querySelector('.slider-move-mask'); // 滑动距离元素
223
223
  var sliderText = sliderBox.querySelector('.slider-move-text'); // 互动轨道显示的文字
@@ -237,12 +237,12 @@ var DragVerify = function DragVerify(props) {
237
237
  var obj = {};
238
238
  if (width) {
239
239
  var widthHand = width;
240
- if (typeof width === 'number') widthHand = width + 'px';
240
+ if (typeof width === 'number') widthHand = "".concat(width, "px");
241
241
  obj.width = widthHand;
242
242
  }
243
243
  if (height) {
244
244
  var heightHand = height;
245
- if (typeof height === 'number') heightHand = height + 'px';
245
+ if (typeof height === 'number') heightHand = "".concat(height, "px");
246
246
  obj.height = heightHand;
247
247
  }
248
248
  return obj;