@para-ui/core 2.2.5-beta → 2.2.7

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 (353) hide show
  1. package/AutoBox/index.d.ts +6 -12
  2. package/AutoBox/index.js +15 -203
  3. package/AutoTips/index.d.ts +6 -12
  4. package/AutoTips/index.js +15 -84
  5. package/Breadcrumbs/index.d.ts +7 -13
  6. package/Breadcrumbs/index.js +15 -227
  7. package/Button/SplitButton.d.ts +61 -0
  8. package/Button/index.d.ts +11 -92
  9. package/Button/index.js +14 -348
  10. package/Button/lang/en_US.d.ts +4 -0
  11. package/Button/lang/index.d.ts +9 -0
  12. package/Button/lang/zh_CN.d.ts +4 -0
  13. package/ButtonGroup/index.d.ts +9 -21
  14. package/ButtonGroup/index.js +14 -128
  15. package/Carousel/index.d.ts +11 -17
  16. package/Carousel/index.js +15 -74
  17. package/Cascader/index.d.ts +7 -12
  18. package/Cascader/index.js +15 -166
  19. package/Cascader/lang/en_US.d.ts +4 -0
  20. package/Cascader/lang/index.d.ts +9 -0
  21. package/Cascader/lang/zh_CN.d.ts +4 -0
  22. package/Checkbox/index.d.ts +7 -13
  23. package/Checkbox/index.js +14 -105
  24. package/CheckboxGroup/index.d.ts +9 -15
  25. package/CheckboxGroup/index.js +14 -138
  26. package/Collapse/collapsePanel.d.ts +30 -0
  27. package/Collapse/index.d.ts +14 -49
  28. package/Collapse/index.js +15 -171
  29. package/Collapse/motion.d.ts +5 -0
  30. package/Collapse/util.d.ts +11 -0
  31. package/CollapseBox/index.d.ts +5 -11
  32. package/CollapseBox/index.js +15 -164
  33. package/CollapseBox/util.d.ts +5 -0
  34. package/ColorPicker/index.d.ts +4 -4
  35. package/ColorPicker/index.js +1 -4
  36. package/ComboSelect/WithTabsCombo/index.d.ts +11 -0
  37. package/ComboSelect/WithTabsCombo/interface.d.ts +141 -0
  38. package/ComboSelect/index.d.ts +6 -306
  39. package/ComboSelect/index.js +14 -1803
  40. package/ComboSelect/interface.d.ts +143 -0
  41. package/ComboSelect/lang/en_US.d.ts +8 -0
  42. package/ComboSelect/lang/index.d.ts +17 -0
  43. package/ComboSelect/lang/zh_CN.d.ts +8 -0
  44. package/ComboSelect/utils.d.ts +12 -0
  45. package/Container/index.d.ts +8 -13
  46. package/Container/index.js +15 -239
  47. package/DatePicker/PickerButton.d.ts +3 -0
  48. package/DatePicker/PickerTag.d.ts +3 -0
  49. package/DatePicker/generatePicker/generateRangePicker.d.ts +4 -0
  50. package/DatePicker/generatePicker/generateSinglePicker.d.ts +11 -0
  51. package/DatePicker/generatePicker/index.d.ts +77 -0
  52. package/DatePicker/index.d.ts +17 -30
  53. package/DatePicker/index.js +14 -733
  54. package/DatePicker/lang/en_US.d.ts +3 -0
  55. package/DatePicker/lang/index.d.ts +7 -0
  56. package/DatePicker/lang/zh_CN.d.ts +3 -0
  57. package/DatePicker/util.d.ts +20 -0
  58. package/Desktop/index.d.ts +6 -14
  59. package/Desktop/index.js +14 -853
  60. package/Drawer/index.d.ts +6 -92
  61. package/Drawer/index.js +14 -186
  62. package/Drawer/interface.d.ts +83 -0
  63. package/Drawer/lang/en_US.d.ts +5 -0
  64. package/Drawer/lang/index.d.ts +11 -0
  65. package/Drawer/lang/zh_CN.d.ts +5 -0
  66. package/Empty/images/index.d.ts +2 -0
  67. package/Empty/index.d.ts +10 -16
  68. package/Empty/index.js +14 -644
  69. package/Empty/lang/en_US.d.ts +6 -0
  70. package/Empty/lang/index.d.ts +13 -0
  71. package/Empty/lang/zh_CN.d.ts +6 -0
  72. package/Form/index.d.ts +9 -11
  73. package/Form/index.js +14 -384
  74. package/FormItem/compoments/defaultCompoments/index.d.ts +19 -0
  75. package/FormItem/compoments/formCheckboxGroup/index.d.ts +8 -0
  76. package/FormItem/compoments/formFile/index.d.ts +38 -0
  77. package/FormItem/compoments/formRadioGroup/index.d.ts +8 -0
  78. package/FormItem/compoments/formSelect/index.d.ts +18 -0
  79. package/FormItem/errorTips.d.ts +12 -0
  80. package/FormItem/index.d.ts +152 -5
  81. package/FormItem/index.js +14 -81
  82. package/FormItem/itemType.d.ts +42 -0
  83. package/FormItem/validateFunction.d.ts +15 -0
  84. package/FunctionModal/dialog.d.ts +58 -0
  85. package/FunctionModal/index.d.ts +3 -14
  86. package/FunctionModal/index.js +14 -39
  87. package/FunctionModal/modalContext.d.ts +14 -0
  88. package/GlobalContext/componentsProps.d.ts +19 -0
  89. package/GlobalContext/confirmLocale.d.ts +7 -0
  90. package/GlobalContext/index.d.ts +8 -38
  91. package/GlobalContext/index.js +16 -41
  92. package/GlobalContext/intl.d.ts +34 -0
  93. package/GlobalContext/useFormatMessage.d.ts +3 -0
  94. package/Help/index.d.ts +10 -16
  95. package/Help/index.js +15 -39
  96. package/HelperText/index.d.ts +5 -11
  97. package/HelperText/index.js +15 -29
  98. package/Hooks/useGlobalProps.d.ts +1 -0
  99. package/InputLang/index.d.ts +7 -13
  100. package/InputLang/index.js +14 -270
  101. package/InputNumber/index.d.ts +10 -16
  102. package/InputNumber/index.js +14 -308
  103. package/Label/index.d.ts +6 -12
  104. package/Label/index.js +14 -81
  105. package/Loading/index.d.ts +6 -12
  106. package/Loading/index.js +15 -47
  107. package/Menu/footerExpansion.d.ts +9 -0
  108. package/Menu/index.d.ts +5 -123
  109. package/Menu/index.js +14 -1232
  110. package/Menu/interface.d.ts +139 -0
  111. package/Menu/logo.d.ts +9 -0
  112. package/Menu/verticalMenuList.d.ts +14 -0
  113. package/Message/index.d.ts +19 -11
  114. package/Message/index.js +15 -222
  115. package/Modal/Confirm/index.d.ts +66 -0
  116. package/Modal/index.d.ts +40 -142
  117. package/Modal/index.js +14 -443
  118. package/Modal/lang/en_US.d.ts +5 -0
  119. package/Modal/lang/index.d.ts +11 -0
  120. package/Modal/lang/zh_CN.d.ts +5 -0
  121. package/MultiBox/index.d.ts +7 -13
  122. package/MultiBox/index.js +14 -231
  123. package/Notification/index.d.ts +16 -22
  124. package/Notification/index.js +15 -266
  125. package/OperateBtn/index.d.ts +10 -16
  126. package/OperateBtn/index.js +14 -260
  127. package/OperateBtn/lang/en_US.d.ts +4 -0
  128. package/OperateBtn/lang/index.d.ts +9 -0
  129. package/OperateBtn/lang/zh_CN.d.ts +4 -0
  130. package/PageHeader/horizontalMeun.d.ts +9 -0
  131. package/PageHeader/horizontalMeunRight.d.ts +9 -0
  132. package/PageHeader/index.d.ts +5 -178
  133. package/PageHeader/index.js +14 -1171
  134. package/PageHeader/interface.d.ts +167 -0
  135. package/Pagination/index.d.ts +6 -12
  136. package/Pagination/index.js +14 -469
  137. package/Pagination/lang/en_US.d.ts +8 -0
  138. package/Pagination/lang/index.d.ts +17 -0
  139. package/Pagination/lang/zh_CN.d.ts +8 -0
  140. package/ParauiProvider/index.d.ts +8 -9
  141. package/ParauiProvider/index.js +15 -53
  142. package/PopConfirm/index.d.ts +10 -23
  143. package/PopConfirm/index.js +14 -189
  144. package/PopConfirm/lang/en_US.d.ts +5 -0
  145. package/PopConfirm/lang/index.d.ts +11 -0
  146. package/PopConfirm/lang/zh_CN.d.ts +5 -0
  147. package/Popover/index.d.ts +11 -18
  148. package/Popover/index.js +15 -66
  149. package/Popper/index.d.ts +13 -0
  150. package/Popper/index.js +16 -0
  151. package/Progress/Line.d.ts +47 -0
  152. package/Progress/Steps.d.ts +17 -0
  153. package/Progress/index.d.ts +12 -18
  154. package/Progress/index.js +20 -358
  155. package/Progress/utils.d.ts +6 -0
  156. package/Querying/images/index.d.ts +2 -0
  157. package/Querying/index.d.ts +9 -15
  158. package/Querying/index.js +14 -762
  159. package/Querying/lang/en_US.d.ts +4 -0
  160. package/Querying/lang/index.d.ts +9 -0
  161. package/Querying/lang/zh_CN.d.ts +4 -0
  162. package/README.md +506 -0
  163. package/Radio/index.d.ts +7 -13
  164. package/Radio/index.js +14 -94
  165. package/RadioGroup/index.d.ts +9 -15
  166. package/RadioGroup/index.js +14 -128
  167. package/Search/index.d.ts +12 -18
  168. package/Search/index.js +14 -220
  169. package/Select/index.d.ts +7 -13
  170. package/Select/index.js +14 -1288
  171. package/Select/lang/en_US.d.ts +5 -0
  172. package/Select/lang/index.d.ts +11 -0
  173. package/Select/lang/zh_CN.d.ts +5 -0
  174. package/SelectInput/index.d.ts +5 -11
  175. package/SelectInput/index.js +14 -51
  176. package/SingleBox/index.d.ts +7 -13
  177. package/SingleBox/index.js +14 -194
  178. package/Slider/index.d.ts +7 -104
  179. package/Slider/index.js +15 -125
  180. package/Slider/interface.d.ts +102 -0
  181. package/Split/index.d.ts +3 -8
  182. package/Split/index.js +15 -134
  183. package/Stepper/icons.d.ts +5 -0
  184. package/Stepper/index.d.ts +25 -41
  185. package/Stepper/index.js +15 -99
  186. package/Switch/index.d.ts +10 -16
  187. package/Switch/index.js +14 -73
  188. package/Table/index.d.ts +4 -12
  189. package/Table/index.js +14 -2725
  190. package/{_verture/interface-a9b7c716.js → Table/interface.d.ts} +28 -20
  191. package/Table/lang/en_US.d.ts +6 -0
  192. package/Table/lang/index.d.ts +13 -0
  193. package/Table/lang/zh_CN.d.ts +6 -0
  194. package/Table/tableBody.d.ts +9 -0
  195. package/Table/tableBodyElement/index.d.ts +15 -0
  196. package/Table/tableBodyInterface.d.ts +67 -0
  197. package/Table/tableContainer/index.d.ts +16 -0
  198. package/Table/tableElement/index.d.ts +17 -0
  199. package/Table/tableHead.d.ts +9 -0
  200. package/Table/tableHeadElement/index.d.ts +15 -0
  201. package/Table/tableHeadInterface.d.ts +30 -0
  202. package/Table/tablePagination.d.ts +9 -0
  203. package/Table/tablePaginationInterFace.d.ts +24 -0
  204. package/Table/tdElement/index.d.ts +15 -0
  205. package/Table/thElement/index.d.ts +15 -0
  206. package/Table/trElement/index.d.ts +15 -0
  207. package/Table/util.d.ts +16 -0
  208. package/Tabs/index.d.ts +29 -64
  209. package/Tabs/index.js +14 -218
  210. package/Tag/TagGroup.d.ts +66 -0
  211. package/Tag/index.d.ts +12 -78
  212. package/Tag/index.js +14 -286
  213. package/Test/index.d.ts +2 -3
  214. package/Test/index.js +16 -9
  215. package/TextField/index.d.ts +16 -22
  216. package/TextField/index.js +14 -686
  217. package/TimePicker/index.d.ts +10 -20
  218. package/TimePicker/index.js +14 -77
  219. package/TimePicker/locale/en_US.d.ts +3 -0
  220. package/TimePicker/locale/zh_CN.d.ts +3 -0
  221. package/TimePicker/style/index.d.ts +1 -0
  222. package/Timeline/index.d.ts +13 -49
  223. package/Timeline/index.js +15 -150
  224. package/ToggleButton/ToggleButtonGroup.d.ts +49 -0
  225. package/ToggleButton/index.d.ts +10 -61
  226. package/ToggleButton/index.js +14 -200
  227. package/Tooltip/index.d.ts +10 -12
  228. package/Tooltip/index.js +15 -335
  229. package/Transfer/index.d.ts +3 -8
  230. package/Transfer/index.js +14 -343
  231. package/Transfer/lang/en_US.d.ts +6 -0
  232. package/Transfer/lang/index.d.ts +13 -0
  233. package/Transfer/lang/zh_CN.d.ts +6 -0
  234. package/Tree/OperateBar/index.d.ts +13 -0
  235. package/Tree/Tree.d.ts +4 -0
  236. package/Tree/index.d.ts +5 -8
  237. package/Tree/index.js +14 -35
  238. package/{_verture/interface-128abdd3.js → Tree/interface.d.ts} +25 -15
  239. package/Tree/lang/en_US.d.ts +8 -0
  240. package/Tree/lang/index.d.ts +17 -0
  241. package/Tree/lang/zh_CN.d.ts +8 -0
  242. package/Tree/utils/closestPolyfill.d.ts +0 -0
  243. package/Tree/utils/tools.d.ts +26 -0
  244. package/Tree/utils/treeUtil.d.ts +15 -0
  245. package/Upload/Dragger/index.d.ts +10 -0
  246. package/Upload/ErroTip/index.d.ts +13 -0
  247. package/Upload/ImageUpload/index.d.ts +14 -0
  248. package/Upload/ImgCrop/EasyCrop.d.ts +17 -0
  249. package/Upload/ImgCrop/constants.d.ts +7 -0
  250. package/Upload/ImgCrop/index.d.ts +6 -0
  251. package/Upload/ImgCrop/interface.d.ts +24 -0
  252. package/Upload/UploadList/index.d.ts +5 -0
  253. package/Upload/index.d.ts +8 -179
  254. package/Upload/index.js +14 -1542
  255. package/Upload/interface.d.ts +134 -0
  256. package/Upload/lang/en_US.d.ts +12 -0
  257. package/Upload/lang/index.d.ts +25 -0
  258. package/Upload/lang/zh_CN.d.ts +12 -0
  259. package/cdn/AutoBox/index.js +29 -0
  260. package/cdn/AutoTips/index.js +40 -0
  261. package/cdn/Breadcrumbs/index.js +53 -0
  262. package/cdn/Button/index.js +79 -0
  263. package/cdn/ButtonGroup/index.js +79 -0
  264. package/cdn/Carousel/index.js +6 -0
  265. package/cdn/Cascader/index.js +42 -0
  266. package/cdn/Checkbox/index.js +53 -0
  267. package/cdn/CheckboxGroup/index.js +53 -0
  268. package/cdn/Collapse/index.js +27 -0
  269. package/cdn/CollapseBox/index.js +1 -0
  270. package/cdn/ColorPicker/index.js +1 -0
  271. package/cdn/ComboSelect/index.js +438 -0
  272. package/cdn/Container/index.js +1 -0
  273. package/cdn/DatePicker/index.js +185 -0
  274. package/cdn/Desktop/index.js +24 -0
  275. package/cdn/Drawer/index.js +84 -0
  276. package/cdn/Empty/index.js +1 -0
  277. package/cdn/Form/index.js +477 -0
  278. package/cdn/FormItem/index.js +477 -0
  279. package/cdn/FunctionModal/index.js +144 -0
  280. package/cdn/GlobalContext/index.js +1 -0
  281. package/cdn/Help/index.js +53 -0
  282. package/cdn/HelperText/index.js +1 -0
  283. package/cdn/InputLang/index.js +144 -0
  284. package/cdn/InputNumber/index.js +118 -0
  285. package/cdn/Label/index.js +53 -0
  286. package/cdn/Loading/index.js +14 -0
  287. package/cdn/Menu/index.js +40 -0
  288. package/cdn/Message/index.js +53 -0
  289. package/cdn/Modal/index.js +144 -0
  290. package/cdn/MultiBox/index.js +131 -0
  291. package/cdn/Notification/index.js +66 -0
  292. package/cdn/OperateBtn/index.js +92 -0
  293. package/cdn/PageHeader/index.js +92 -0
  294. package/cdn/Pagination/index.js +214 -0
  295. package/cdn/ParauiProvider/index.js +9 -0
  296. package/cdn/PopConfirm/index.js +131 -0
  297. package/cdn/Popover/index.js +16 -0
  298. package/cdn/Popper/index.js +26 -0
  299. package/cdn/Progress/index.js +58 -0
  300. package/cdn/Querying/index.js +1 -0
  301. package/cdn/Radio/index.js +53 -0
  302. package/cdn/RadioGroup/index.js +53 -0
  303. package/cdn/Search/index.js +144 -0
  304. package/cdn/Select/index.js +131 -0
  305. package/cdn/SelectInput/index.js +131 -0
  306. package/cdn/SingleBox/index.js +131 -0
  307. package/cdn/Slider/index.js +16 -0
  308. package/cdn/Split/index.js +1 -0
  309. package/cdn/Stepper/index.js +154 -0
  310. package/cdn/Switch/index.js +71 -0
  311. package/cdn/Table/index.js +292 -0
  312. package/cdn/Tabs/index.js +165 -0
  313. package/cdn/Tag/index.js +27 -0
  314. package/cdn/Test/index.js +1 -0
  315. package/cdn/TextField/index.js +105 -0
  316. package/cdn/TimePicker/index.js +185 -0
  317. package/cdn/Timeline/index.js +16 -0
  318. package/cdn/ToggleButton/index.js +79 -0
  319. package/cdn/Tooltip/index.js +40 -0
  320. package/cdn/Transfer/index.js +170 -0
  321. package/cdn/Tree/index.js +170 -0
  322. package/cdn/Upload/index.js +252 -0
  323. package/index.d.ts +128 -88
  324. package/index.js +19 -160
  325. package/package.json +22 -59
  326. package/style.css +72 -0
  327. package/Dropdown/index.d.ts +0 -29
  328. package/Dropdown/index.js +0 -67
  329. package/_verture/defineProperty-0590dc61.js +0 -16
  330. package/_verture/index-0d8e1d07.js +0 -4
  331. package/_verture/index-14a47097.js +0 -4
  332. package/_verture/index-342379c6.js +0 -391
  333. package/_verture/index-458032d7.js +0 -10
  334. package/_verture/index-46bfb2f0.js +0 -778
  335. package/_verture/index-50401de7.js +0 -4
  336. package/_verture/index-5b08df83.js +0 -4
  337. package/_verture/index-6190b129.js +0 -4
  338. package/_verture/index-7ef1e3b6.js +0 -1553
  339. package/_verture/index-a369ca3f.js +0 -4
  340. package/_verture/index-c60911dc.js +0 -39
  341. package/_verture/index-e2881a53.js +0 -16
  342. package/_verture/index-ff4c2a27.js +0 -200
  343. package/_verture/interface-a77a851e.js +0 -25
  344. package/_verture/intl-336570e4.js +0 -65
  345. package/_verture/modalContext-25890584.js +0 -228
  346. package/_verture/modalContext-639f2787.js +0 -58
  347. package/_verture/slicedToArray-d7722f4b.js +0 -62
  348. package/_verture/style-inject.es-300983ab.js +0 -28
  349. package/_verture/toConsumableArray-f8047a75.js +0 -19
  350. package/_verture/tslib.es6-55ed4bd2.js +0 -38
  351. package/_verture/typeof-498dd2b1.js +0 -11
  352. package/_verture/useFormatMessage-ac9d6acf.js +0 -20
  353. package/_verture/useGlobalProps-af9a2af6.js +0 -12
package/Progress/index.js CHANGED
@@ -1,358 +1,20 @@
1
- import { _ as __rest } from '../_verture/tslib.es6-55ed4bd2.js';
2
- import { jsx, jsxs } from 'react/jsx-runtime';
3
- import { Circle } from 'rc-progress';
4
- import SuccessOutlined from '@para-ui/icons/CheckCircleF';
5
- import ErrorOutlined from '@para-ui/icons/CloseCircleF';
6
- import Check from '@para-ui/icons/Check';
7
- import CloseIcon from '@para-ui/icons/Close';
8
- import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
9
-
10
- var Steps = function Steps(props) {
11
- var steps = props.steps,
12
- _props$percent = props.percent,
13
- percent = _props$percent === void 0 ? 0 : _props$percent,
14
- _props$strokeWidth = props.strokeWidth,
15
- strokeWidth = _props$strokeWidth === void 0 ? 8 : _props$strokeWidth,
16
- strokeColor = props.strokeColor,
17
- trailColor = props.trailColor,
18
- children = props.children;
19
- /** 计算出应该高亮多少步 **/
20
-
21
- var current = typeof percent === "number" ? Math.round(steps * (percent / 100)) : 1;
22
- var styledSteps = [];
23
-
24
- for (var i = 0; i < steps; i += 1) {
25
- styledSteps.push(jsx("div", {
26
- className: i <= current - 1 ? "steps-item steps-item-active" : "steps-item",
27
- style: {
28
- backgroundColor: i <= current - 1 ? strokeColor : trailColor,
29
- width: 14,
30
- height: strokeWidth
31
- }
32
- }, i));
33
- }
34
-
35
- return jsxs("div", Object.assign({
36
- className: "steps-outer"
37
- }, {
38
- children: [styledSteps, children]
39
- }));
40
- };
41
-
42
- /**
43
- * 判断进度条传的百分比参数是否规范
44
- * @param {number | undefined} progress 方法入参说明
45
- * @return {numner} 百分比值
46
- */
47
- function validProgress(progress) {
48
- if (!progress || progress < 0) {
49
- return 0;
50
- }
51
-
52
- if (progress > 100) {
53
- return 100;
54
- }
55
-
56
- return progress;
57
- }
58
-
59
- /**
60
- * 转换 百分比 到 样式格式
61
- * {
62
- * "0%": "#afc163",
63
- * "75%": "#009900",
64
- * "50%": "green", // ====> '#afc163 0%, #66FF00 25%, #00CC00 50%, #009900 75%, #ffffff 100%'
65
- * "25%": "#66FF00",
66
- * "100%": "#ffffff"
67
- * }
68
- * @param gradients 渐变的参数
69
- * @return {string} 样式值
70
- */
71
-
72
- var sortGradient = function sortGradient(gradients) {
73
- var tempArr = [];
74
- Object.keys(gradients).forEach(function (key) {
75
- // 拿到百分比的数字
76
- var formattedKey = parseFloat(key.replace(/%/g, "")); // 进行序列化
77
-
78
- if (!isNaN(formattedKey)) {
79
- tempArr.push({
80
- key: formattedKey,
81
- value: gradients[key]
82
- });
83
- }
84
- }); // 排序 从小到大
85
-
86
- tempArr = tempArr.sort(function (a, b) {
87
- return a.key - b.key;
88
- });
89
- return tempArr.map(function (_ref) {
90
- var key = _ref.key,
91
- value = _ref.value;
92
- return "".concat(value, " ").concat(key, "%");
93
- }).join(", ");
94
- };
95
- /**
96
- * 转换传进来 渐变的参数 为css样式
97
- * {
98
- * "0%": "#afc163",
99
- * "25%": "#66FF00",
100
- * "50%": "#00CC00", // ====> linear-gradient(to right, #afc163 0%, #66FF00 25%,
101
- * "75%": "#009900", // #00CC00 50%, #009900 75%, #ffffff 100%)
102
- * "100%": "#ffffff"
103
- * }
104
- *
105
- * {
106
- * "from": "#afc163",
107
- * "to": "#66FF00",// ====> linear-gradient(to right, #afc163, #66FF00)
108
- * }
109
- *
110
- * @param {string} strokeColor 颜色值
111
- * @return 返回 backgroundImage 的样式值
112
- */
113
-
114
- var handleGradient = function handleGradient(strokeColor, directionConfig) {
115
- var _strokeColor$from = strokeColor.from,
116
- from = _strokeColor$from === void 0 ? "#3D66F8" : _strokeColor$from,
117
- _strokeColor$to = strokeColor.to,
118
- to = _strokeColor$to === void 0 ? "#4F93F0" : _strokeColor$to,
119
- _strokeColor$directio = strokeColor.direction,
120
- direction = _strokeColor$directio === void 0 ? directionConfig === "rtl" ? "to left" : "to right" : _strokeColor$directio,
121
- rest = __rest(strokeColor, ["from", "to", "direction"]); // 剩余参数有值说明除了from to direction 还传了 另外的参数
122
-
123
-
124
- if (Object.keys(rest).length !== 0) {
125
- var sortedGradients = sortGradient(rest);
126
- return {
127
- backgroundImage: "linear-gradient(".concat(direction, ", ").concat(sortedGradients, ")")
128
- };
129
- }
130
-
131
- return {
132
- backgroundImage: "linear-gradient(".concat(direction, ", ").concat(from, ", ").concat(to, ")")
133
- };
134
- };
135
-
136
- var Line = function Line(props) {
137
- var directionConfig = props.direction,
138
- percent = props.percent,
139
- strokeWidth = props.strokeWidth,
140
- strokeColor = props.strokeColor,
141
- strokeLinecap = props.strokeLinecap,
142
- trailColor = props.trailColor;
143
- /** 进度条高亮部分的颜色样式 **/
144
-
145
- var backgroundProps = strokeColor && typeof strokeColor !== "string" ? handleGradient(strokeColor, directionConfig) : {
146
- background: strokeColor
147
- };
148
- /** 进度条轨道部分的颜色样式 **/
149
-
150
- var trailStyle = trailColor ? {
151
- backgroundColor: trailColor
152
- } : undefined;
153
- /** 进度条百分比的样式 **/
154
-
155
- var percentStyle = Object.assign({
156
- width: "".concat(validProgress(percent), "%"),
157
- height: strokeWidth || 10,
158
- borderRadius: strokeLinecap === "square" ? 0 : ""
159
- }, backgroundProps);
160
- return jsx("div", Object.assign({
161
- className: "trail-bar",
162
- style: trailStyle
163
- }, {
164
- children: jsx("div", {
165
- className: "active-bar",
166
- style: percentStyle
167
- })
168
- }));
169
- };
170
-
171
- var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-progress-line .progress-outer {\n display: flex;\n margin-right: 8px;\n margin-bottom: 8px;\n}\n.paraui-progress-line .progress-outer .progress-inner {\n width: 100%;\n}\n.paraui-progress-line .progress-outer .progress-inner .rc-progress-line {\n height: 10px;\n width: 100%;\n}\n.paraui-progress-line .progress-outer .progress-inner .steps-outer {\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n.paraui-progress-line .progress-outer .progress-inner .steps-outer .steps-item {\n flex-shrink: 0;\n min-width: 2px;\n margin-right: 2px;\n background: #f3f3f3;\n transition: all 0.3s;\n}\n.paraui-progress-line .progress-outer .progress-inner .steps-outer .steps-item-active {\n background-color: #2DB7F5;\n}\n.paraui-progress-line .progress-outer .progress-inner .trail-bar {\n position: relative;\n display: inline-block;\n width: 100%;\n overflow: hidden;\n vertical-align: middle;\n background-color: rgba(0, 0, 0, 0.0392156863);\n border-radius: 100px;\n}\n.paraui-progress-line .progress-outer .progress-inner .trail-bar .active-bar {\n position: relative;\n background-color: var(--ant-primary-color);\n border-radius: 100px;\n transition: all 0.4s cubic-bezier(0.08, 0.82, 0.17, 1) 0s;\n}\n.paraui-progress-line .progress-outer .progress-text {\n font-size: 12px;\n font-weight: 700;\n text-align: left;\n color: #3d66f8;\n display: inline-block;\n margin-left: 20px;\n white-space: nowrap;\n text-align: left;\n vertical-align: middle;\n word-break: normal;\n display: flex;\n align-items: center;\n}\n.paraui-progress-line .progress-outer .progress-text svg {\n width: 14px;\n height: 14px;\n position: relative;\n top: 2px;\n}\n.paraui-progress-line .progress-outer .progress-text svg.success {\n color: #41D658 !important;\n}\n.paraui-progress-line .progress-outer .progress-text svg.error {\n color: #F46B53 !important;\n}\n.paraui-progress-circle, .paraui-progress-dashboard {\n display: inline-block;\n position: relative;\n margin: 0 5px;\n}\n.paraui-progress-circle .progress-outer .progress-text, .paraui-progress-dashboard .progress-outer .progress-text {\n position: absolute;\n top: 50%;\n left: 50%;\n width: 100%;\n margin: 0;\n padding: 0;\n color: rgba(0, 0, 0, 0.8509803922);\n font-size: 1em;\n line-height: 1;\n white-space: normal;\n text-align: center;\n transform: translate(-50%, -50%);\n}\n.paraui-progress-circle .progress-outer .progress-text svg, .paraui-progress-dashboard .progress-outer .progress-text svg {\n width: 2em;\n height: 2em;\n}\n.paraui-progress-circle .progress-outer .progress-text svg.success, .paraui-progress-dashboard .progress-outer .progress-text svg.success {\n color: #52C41A !important;\n}\n.paraui-progress-circle .progress-outer .progress-text svg.error, .paraui-progress-dashboard .progress-outer .progress-text svg.error {\n color: #FF4D4F !important;\n}\n.paraui-progress-success-status .progress-text {\n color: #52c41a !important;\n}\n.paraui-progress-exception-status .progress-text {\n color: #ff4d4f !important;\n}\n.paraui-progress-active-status .active-bar:before {\n position: absolute;\n inset: 0;\n background: #fff;\n border-radius: 10px;\n opacity: 0;\n -webkit-animation: progress-active 2.4s cubic-bezier(0.23, 1, 0.32, 1) infinite;\n animation: progress-active 2.4s cubic-bezier(0.23, 1, 0.32, 1) infinite;\n content: \"\";\n}\n\n@keyframes progress-active {\n 0% {\n transform: translateX(-100%) scaleX(0);\n opacity: 0.1;\n }\n 20% {\n transform: translateX(-100%) scaleX(0);\n opacity: 0.5;\n }\n 100% {\n transform: translateX(0) scaleX(1);\n opacity: 0;\n }\n}";
172
- styleInject(css_248z);
173
-
174
- /** 进度条类型 **/
175
-
176
- var ProgressTypes;
177
-
178
- (function (ProgressTypes) {
179
- ProgressTypes[ProgressTypes["line"] = 0] = "line";
180
- ProgressTypes[ProgressTypes["circle"] = 1] = "circle";
181
- ProgressTypes[ProgressTypes["dashboard"] = 2] = "dashboard";
182
- })(ProgressTypes || (ProgressTypes = {}));
183
- /** 进度条状态 **/
184
-
185
-
186
- var ProgressStatuses;
187
-
188
- (function (ProgressStatuses) {
189
- ProgressStatuses[ProgressStatuses["normal"] = 0] = "normal";
190
- ProgressStatuses[ProgressStatuses["exception"] = 1] = "exception";
191
- ProgressStatuses[ProgressStatuses["active"] = 2] = "active";
192
- ProgressStatuses[ProgressStatuses["success"] = 3] = "success";
193
- })(ProgressStatuses || (ProgressStatuses = {}));
194
- /** 每个类型对应的进度条默认颜色 **/
195
-
196
-
197
- var strokeColorMap = {
198
- success: "#41D658",
199
- exception: "#F46B53",
200
- normal: "#3D66F8",
201
- active: "#3D66F8"
202
- };
203
- var Progress = function Progress(props) {
204
- var _props$type = props.type,
205
- type = _props$type === void 0 ? "line" : _props$type,
206
- className = props.className;
207
- props.children;
208
- var status = props.status,
209
- _props$width = props.width,
210
- width = _props$width === void 0 ? 132 : _props$width,
211
- _props$showInfo = props.showInfo,
212
- showInfo = _props$showInfo === void 0 ? true : _props$showInfo,
213
- format = props.format,
214
- success = props.success,
215
- _props$percent = props.percent,
216
- percent = _props$percent === void 0 ? 0 : _props$percent,
217
- steps = props.steps,
218
- direction = props.direction,
219
- strokeColor = props.strokeColor,
220
- _props$gapDegree = props.gapDegree,
221
- gapDegree = _props$gapDegree === void 0 ? 75 : _props$gapDegree,
222
- otherProps = __rest(props, ["type", "className", "children", "status", "width", "showInfo", "format", "success", "percent", "steps", "direction", "strokeColor", "gapDegree"]);
223
- /**
224
- * 处理class
225
- * @return {string}
226
- */
227
-
228
-
229
- var classString = function classString() {
230
- var str = "paraui-progress paraui-progress-".concat(type || "default"); // 添加成功状态的class
231
-
232
- if (isSuccessStatus) str += " paraui-progress-success-status"; // 添加错误状态下的class
233
-
234
- if (status === "exception") str += " paraui-progress-exception-status"; // 添加active状态下的class
235
-
236
- if (status === "active") str += " paraui-progress-active-status";
237
- if (className) str += " " + className;
238
- return str;
239
- };
240
- /**
241
- * 处理进度条颜色
242
- * @return {string}
243
- */
244
-
245
-
246
- var strokeColorVal = function strokeColorVal() {
247
- // 如果传了成功进度条的配置
248
- if (strokeColor) return strokeColor;
249
-
250
- if (success && success.percent < percent) {
251
- return [success.strokeColor || strokeColorMap["success"], strokeColorMap["normal"]];
252
- }
253
-
254
- return isSuccessStatus ? strokeColorMap["success"] : strokeColorMap[status || "normal"];
255
- };
256
- /**
257
- * 处理进度条的值
258
- * @return {string}
259
- */
260
-
261
-
262
- var renderPercent = function renderPercent() {
263
- if (success && success.percent < percent && typeof percent === "number") {
264
- return [success.percent, percent - success.percent];
265
- }
266
-
267
- return percent;
268
- };
269
- /** 标记是不是成功状态 **/
270
-
271
-
272
- var isSuccessStatus = percent && percent === 100 && !status || status === "success";
273
- /** style值 **/
274
-
275
- var renderStyle = type === "circle" || type === "dashboard" ? {
276
- width: width,
277
- height: width
278
- } : {};
279
- /**
280
- * 处理描述信息
281
- * @return {string | ReactNode}
282
- */
283
-
284
- var renderLabel = function renderLabel() {
285
- if (format) return format(percent);
286
- if (isSuccessStatus) return type === "circle" ? jsx(Check, {
287
- className: "success"
288
- }) : jsx(SuccessOutlined, {
289
- className: "success"
290
- });
291
- if (status === "exception") return type === "circle" ? jsx(CloseIcon, {
292
- className: "error"
293
- }) : jsx(ErrorOutlined, {
294
- className: "error"
295
- });
296
- return validProgress(percent) + "%";
297
- };
298
- /** 默认进度条 **/
299
-
300
-
301
- var renderLineProgress = steps ? jsx(Steps, Object.assign({
302
- steps: steps,
303
- strokeColor: strokeColorVal(),
304
- percent: renderPercent()
305
- }, otherProps, {
306
- children: showInfo && jsx("div", Object.assign({
307
- className: "progress-text"
308
- }, {
309
- children: renderLabel()
310
- }))
311
- })) : jsx(Line, Object.assign({
312
- strokeColor: strokeColorVal(),
313
- percent: renderPercent(),
314
- direction: direction
315
- }, otherProps, {
316
- children: " "
317
- }));
318
- /** 圆形进度条 **/
319
-
320
- var renderCircleProgress = jsx(Circle, Object.assign({
321
- strokeWidth: 6,
322
- trailWidth: 6,
323
- strokeColor: strokeColorVal(),
324
- percent: renderPercent()
325
- }, otherProps));
326
- /** 仪表盘 **/
327
-
328
-
329
- var renderDashboardProgress = jsx(Circle, Object.assign({
330
- strokeWidth: 6,
331
- trailWidth: 6,
332
- gapPosition: "bottom",
333
- gapDegree: gapDegree,
334
- strokeColor: strokeColorVal(),
335
- percent: renderPercent()
336
- }, otherProps));
337
-
338
- return jsx("div", Object.assign({
339
- className: classString()
340
- }, {
341
- children: jsxs("div", Object.assign({
342
- className: "progress-outer"
343
- }, {
344
- children: [jsx("div", Object.assign({
345
- className: "progress-inner",
346
- style: renderStyle
347
- }, {
348
- children: type === "dashboard" ? renderDashboardProgress : type === "circle" ? renderCircleProgress : renderLineProgress
349
- })), showInfo && !steps && jsx("div", Object.assign({
350
- className: "progress-text"
351
- }, {
352
- children: renderLabel()
353
- }))]
354
- }))
355
- }));
356
- };
357
-
358
- export { Progress, Progress as default };
1
+ !function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react"),require("@para-ui/icons/CheckCircleF"),require("@para-ui/icons/CloseCircleF"),require("@para-ui/icons/Check"),require("@para-ui/icons/Close")):"function"==typeof define&&define.amd?define(["react","@para-ui/icons/CheckCircleF","@para-ui/icons/CloseCircleF","@para-ui/icons/Check","@para-ui/icons/Close"],r):"object"==typeof exports?exports.ParaUI=r(require("react"),require("@para-ui/icons/CheckCircleF"),require("@para-ui/icons/CloseCircleF"),require("@para-ui/icons/Check"),require("@para-ui/icons/Close")):e.ParaUI=r(e.react,e["@para-ui/icons/CheckCircleF"],e["@para-ui/icons/CloseCircleF"],e["@para-ui/icons/Check"],e["@para-ui/icons/Close"])}(self,(function(e,r,t,o,n){return function(){var s={4184:function(e,r){var t;
2
+ /*!
3
+ Copyright (c) 2018 Jed Watson.
4
+ Licensed under the MIT License (MIT), see
5
+ http://jedwatson.github.io/classnames
6
+ */!function(){"use strict";var o={}.hasOwnProperty;function n(){for(var e=[],r=0;r<arguments.length;r++){var t=arguments[r];if(t){var s=typeof t;if("string"===s||"number"===s)e.push(t);else if(Array.isArray(t)){if(t.length){var i=n.apply(null,t);i&&e.push(i)}}else if("object"===s)if(t.toString===Object.prototype.toString)for(var a in t)o.call(t,a)&&t[a]&&e.push(a);else e.push(t.toString())}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):void 0===(t=function(){return n}.apply(r,[]))||(e.exports=t)}()},1442:function(e,r,t){(r=t(3645)(!1)).push([e.id,'.paraui-progress-line .progress-outer{display:flex;margin-right:8px;margin-bottom:8px}.paraui-progress-line .progress-outer .progress-inner{width:100%}.paraui-progress-line .progress-outer .progress-inner .rc-progress-line{height:10px;width:100%}.paraui-progress-line .progress-outer .progress-inner .steps-outer{display:flex;flex-direction:row;align-items:center}.paraui-progress-line .progress-outer .progress-inner .steps-outer .steps-item{flex-shrink:0;min-width:2px;margin-right:2px;background:#f3f3f3;transition:all .3s}.paraui-progress-line .progress-outer .progress-inner .steps-outer .steps-item-active{background-color:#2db7f5}.paraui-progress-line .progress-outer .progress-inner .trail-bar{position:relative;display:inline-block;width:100%;overflow:hidden;vertical-align:middle;background-color:rgba(0,0,0,.0392156863);border-radius:100px}.paraui-progress-line .progress-outer .progress-inner .trail-bar .active-bar{position:relative;background-color:var(--ant-primary-color);border-radius:100px;transition:all .4s cubic-bezier(0.08, 0.82, 0.17, 1) 0s}.paraui-progress-line .progress-outer .progress-text{font-size:12px;font-weight:700;text-align:left;color:#3d66f8;display:inline-block;margin-left:20px;white-space:nowrap;text-align:left;vertical-align:middle;word-break:normal;display:flex;align-items:center}.paraui-progress-line .progress-outer .progress-text svg{width:14px;height:14px;position:relative;top:2px}.paraui-progress-line .progress-outer .progress-text svg.success{color:#41d658 !important}.paraui-progress-line .progress-outer .progress-text svg.error{color:#f46b53 !important}.paraui-progress-circle,.paraui-progress-dashboard{display:inline-block;position:relative;margin:0 5px}.paraui-progress-circle .progress-outer .progress-text,.paraui-progress-dashboard .progress-outer .progress-text{position:absolute;top:50%;left:50%;width:100%;margin:0;padding:0;color:rgba(0,0,0,.8509803922);font-size:1em;line-height:1;white-space:normal;text-align:center;transform:translate(-50%, -50%)}.paraui-progress-circle .progress-outer .progress-text svg,.paraui-progress-dashboard .progress-outer .progress-text svg{width:2em;height:2em}.paraui-progress-circle .progress-outer .progress-text svg.success,.paraui-progress-dashboard .progress-outer .progress-text svg.success{color:#52c41a !important}.paraui-progress-circle .progress-outer .progress-text svg.error,.paraui-progress-dashboard .progress-outer .progress-text svg.error{color:#ff4d4f !important}.paraui-progress-success-status .progress-text{color:#52c41a !important}.paraui-progress-exception-status .progress-text{color:#ff4d4f !important}.paraui-progress-active-status .active-bar:before{position:absolute;inset:0;background:#fff;border-radius:10px;opacity:0;-webkit-animation:progress-active 2.4s cubic-bezier(0.23, 1, 0.32, 1) infinite;animation:progress-active 2.4s cubic-bezier(0.23, 1, 0.32, 1) infinite;content:""}@keyframes progress-active{0%{transform:translateX(-100%) scaleX(0);opacity:.1}20%{transform:translateX(-100%) scaleX(0);opacity:.5}100%{transform:translateX(0) scaleX(1);opacity:0}}',""]),e.exports=r},3645:function(e){"use strict";e.exports=function(e){var r=[];return r.toString=function(){return this.map((function(r){var t=function(e,r){var t=e[1]||"",o=e[3];if(!o)return t;if(r&&"function"==typeof btoa){var n=(i=o,a=btoa(unescape(encodeURIComponent(JSON.stringify(i)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(a),"/*# ".concat(c," */")),s=o.sources.map((function(e){return"/*# sourceURL=".concat(o.sourceRoot||"").concat(e," */")}));return[t].concat(s).concat([n]).join("\n")}var i,a,c;return[t].join("\n")}(r,e);return r[2]?"@media ".concat(r[2]," {").concat(t,"}"):t})).join("")},r.i=function(e,t,o){"string"==typeof e&&(e=[[null,e,""]]);var n={};if(o)for(var s=0;s<this.length;s++){var i=this[s][0];null!=i&&(n[i]=!0)}for(var a=0;a<e.length;a++){var c=[].concat(e[a]);o&&n[c[0]]||(t&&(c[2]?c[2]="".concat(t," and ").concat(c[2]):c[2]=t),r.push(c))}},r}},7418:function(e){"use strict";
7
+ /*
8
+ object-assign
9
+ (c) Sindre Sorhus
10
+ @license MIT
11
+ */var r=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function n(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(r).map((function(e){return r[e]})).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(e){o[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(e,s){for(var i,a,c=n(e),l=1;l<arguments.length;l++){for(var u in i=Object(arguments[l]))t.call(i,u)&&(c[u]=i[u]);if(r){a=r(i);for(var p=0;p<a.length;p++)o.call(i,a[p])&&(c[a[p]]=i[a[p]])}}return c}},5251:function(e,r,t){"use strict";
12
+ /** @license React v17.0.2
13
+ * react-jsx-runtime.production.min.js
14
+ *
15
+ * Copyright (c) Facebook, Inc. and its affiliates.
16
+ *
17
+ * This source code is licensed under the MIT license found in the
18
+ * LICENSE file in the root directory of this source tree.
19
+ */
20
+ t(7418);var o=t(8156),n=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var s=Symbol.for;n=s("react.element"),s("react.fragment")}var i=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a=Object.prototype.hasOwnProperty,c={key:!0,ref:!0,__self:!0,__source:!0};function l(e,r,t){var o,s={},l=null,u=null;for(o in void 0!==t&&(l=""+t),void 0!==r.key&&(l=""+r.key),void 0!==r.ref&&(u=r.ref),r)a.call(r,o)&&!c.hasOwnProperty(o)&&(s[o]=r[o]);if(e&&e.defaultProps)for(o in r=e.defaultProps)void 0===s[o]&&(s[o]=r[o]);return{$$typeof:n,type:e,key:l,ref:u,props:s,_owner:i.current}}r.jsx=l,r.jsxs=l},5893:function(e,r,t){"use strict";e.exports=t(5251)},2738:function(e,r,t){var o=t(3379),n=t(1442);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[e.id,n,""]]);var s={insert:("body","body"),singleton:!1};o(n,s);e.exports=n.locals||{}},3379:function(e,r,t){"use strict";var o,n=function(){return void 0===o&&(o=Boolean(window&&document&&document.all&&!window.atob)),o},s=function(){var e={};return function(r){if(void 0===e[r]){var t=document.querySelector(r);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(e){t=null}e[r]=t}return e[r]}}(),i=[];function a(e){for(var r=-1,t=0;t<i.length;t++)if(i[t].identifier===e){r=t;break}return r}function c(e,r){for(var t={},o=[],n=0;n<e.length;n++){var s=e[n],c=r.base?s[0]+r.base:s[0],l=t[c]||0,u="".concat(c," ").concat(l);t[c]=l+1;var p=a(u),f={css:s[1],media:s[2],sourceMap:s[3]};-1!==p?(i[p].references++,i[p].updater(f)):i.push({identifier:u,updater:h(f,r),references:1}),o.push(u)}return o}function l(e){var r=document.createElement("style"),o=e.attributes||{};if(void 0===o.nonce){var n=t.nc;n&&(o.nonce=n)}if(Object.keys(o).forEach((function(e){r.setAttribute(e,o[e])})),"function"==typeof e.insert)e.insert(r);else{var i=s(e.insert||"head");if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(r)}return r}var u,p=(u=[],function(e,r){return u[e]=r,u.filter(Boolean).join("\n")});function f(e,r,t,o){var n=t?"":o.media?"@media ".concat(o.media," {").concat(o.css,"}"):o.css;if(e.styleSheet)e.styleSheet.cssText=p(r,n);else{var s=document.createTextNode(n),i=e.childNodes;i[r]&&e.removeChild(i[r]),i.length?e.insertBefore(s,i[r]):e.appendChild(s)}}function d(e,r,t){var o=t.css,n=t.media,s=t.sourceMap;if(n?e.setAttribute("media",n):e.removeAttribute("media"),s&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),e.styleSheet)e.styleSheet.cssText=o;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(o))}}var g=null,y=0;function h(e,r){var t,o,n;if(r.singleton){var s=y++;t=g||(g=l(r)),o=f.bind(null,t,s,!1),n=f.bind(null,t,s,!0)}else t=l(r),o=d.bind(null,t,r),n=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)};return o(e),function(r){if(r){if(r.css===e.css&&r.media===e.media&&r.sourceMap===e.sourceMap)return;o(e=r)}else n()}}e.exports=function(e,r){(r=r||{}).singleton||"boolean"==typeof r.singleton||(r.singleton=n());var t=c(e=e||[],r);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var o=0;o<t.length;o++){var n=a(t[o]);i[n].references--}for(var s=c(e,r),l=0;l<t.length;l++){var u=a(t[l]);0===i[u].references&&(i[u].updater(),i.splice(u,1))}t=s}}}},2004:function(e){"use strict";e.exports=o},1014:function(e){"use strict";e.exports=r},5927:function(e){"use strict";e.exports=n},6649:function(e){"use strict";e.exports=t},8156:function(r){"use strict";r.exports=e}},i={};function a(e){var r=i[e];if(void 0!==r)return r.exports;var t=i[e]={id:e,exports:{}};return s[e](t,t.exports,a),t.exports}a.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(r,{a:r}),r},a.d=function(e,r){for(var t in r)a.o(r,t)&&!a.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},a.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nc=void 0;var c={};return function(){"use strict";a.r(c),a.d(c,{Progress:function(){return $},default:function(){return H}});var e=a(5893);function r(){return r=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},r.apply(this,arguments)}function t(e,r){if(null==e)return{};var t,o,n=function(e,r){if(null==e)return{};var t,o,n={},s=Object.keys(e);for(o=0;o<s.length;o++)t=s[o],r.indexOf(t)>=0||(n[t]=e[t]);return n}(e,r);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)t=s[o],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}var o=a(8156),n=a(4184),s=a.n(n),i={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},l=function(){var e=(0,o.useRef)([]),r=(0,o.useRef)(null);return(0,o.useEffect)((function(){var t=Date.now(),o=!1;e.current.forEach((function(e){if(e){o=!0;var n=e.style;n.transitionDuration=".3s, .3s, .3s, .06s",r.current&&t-r.current<100&&(n.transitionDuration="0s, 0s")}})),o&&(r.current=Date.now())})),e.current},u=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],p=function(e){var n=e.className,i=e.percent,a=e.prefixCls,c=e.strokeColor,p=e.strokeLinecap,f=e.strokeWidth,d=e.style,g=e.trailColor,y=e.trailWidth,h=e.transition,v=t(e,u);delete v.gapPosition;var m=Array.isArray(i)?i:[i],b=Array.isArray(c)?c:[c],x=l(),k=f/2,j=100-f/2,O="M ".concat("round"===p?k:0,",").concat(k,"\n L ").concat("round"===p?j:100,",").concat(k),w="0 0 100 ".concat(f),C=0;return o.createElement("svg",r({className:s()("".concat(a,"-line"),n),viewBox:w,preserveAspectRatio:"none",style:d},v),o.createElement("path",{className:"".concat(a,"-line-trail"),d:O,strokeLinecap:p,stroke:g,strokeWidth:y||f,fillOpacity:"0"}),m.map((function(e,r){var t=1;switch(p){case"round":t=1-f/100;break;case"square":t=1-f/2/100;break;default:t=1}var n={strokeDasharray:"".concat(e*t,"px, 100px"),strokeDashoffset:"-".concat(C,"px"),transition:h||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},s=b[r]||b[b.length-1];return C+=e,o.createElement("path",{key:r,className:"".concat(a,"-line-path"),d:O,strokeLinecap:p,stroke:s,strokeWidth:f,fillOpacity:"0",ref:function(e){x[r]=e},style:n})})))};p.defaultProps=i,p.displayName="Line";function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function d(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,o=new Array(r);t<r;t++)o[t]=e[t];return o}function g(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var o,n,s=[],i=!0,a=!1;try{for(t=t.call(e);!(i=(o=t.next()).done)&&(s.push(o.value),!r||s.length!==r);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==t.return||t.return()}finally{if(a)throw n}}return s}}(e,r)||function(e,r){if(e){if("string"==typeof e)return d(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?d(e,r):void 0}}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var y=0,h=!("undefined"==typeof window||!window.document||!window.document.createElement);var v=function(e){var r=g(o.useState(),2),t=r[0],n=r[1];return o.useEffect((function(){var e;n("rc_progress_".concat((h?(e=y,y+=1):e="TEST_OR_SSR",e)))}),[]),e||t},m=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function b(e){return+e.replace("%","")}function x(e){var r=null!=e?e:[];return Array.isArray(r)?r:[r]}var k=100,j=function(e,r,t,o,n,s,i,a,c,l){var u=arguments.length>10&&void 0!==arguments[10]?arguments[10]:0,p=t/100*360*((360-s)/360),f=0===s?0:{bottom:0,top:180,left:90,right:-90}[i],d=(100-o)/100*r;return"round"===c&&100!==o&&(d+=l/2)>=r&&(d=r-.01),{stroke:"string"==typeof a?a:void 0,strokeDasharray:"".concat(r,"px ").concat(e),strokeDashoffset:d+u,transform:"rotate(".concat(n+p+f,"deg)"),transformOrigin:"50% 50%",transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},O=function(e){var n,i,a,c=e.id,u=e.prefixCls,p=e.steps,d=e.strokeWidth,g=e.trailWidth,y=e.gapDegree,h=void 0===y?0:y,O=e.gapPosition,w=e.trailColor,C=e.strokeLinecap,S=e.style,N=e.className,P=e.strokeColor,E=e.percent,_=t(e,m),D=v(c),W="".concat(D,"-gradient"),A=50-d/2,I=2*Math.PI*A,L=h>0?90+h/2:-90,F=I*((360-h)/360),M="object"===f(p)?p:{count:p,space:2},R=M.count,T=M.space,q=j(I,F,0,100,L,h,O,w,C,d),U=x(E),B=x(P),X=B.find((function(e){return e&&"object"===f(e)})),z=l();return o.createElement("svg",r({className:s()("".concat(u,"-circle"),N),viewBox:"0 0 ".concat(k," ").concat(k),style:S,id:c},_),X&&o.createElement("defs",null,o.createElement("linearGradient",{id:W,x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(X).sort((function(e,r){return b(e)-b(r)})).map((function(e,r){return o.createElement("stop",{key:r,offset:e,stopColor:X[e]})})))),!R&&o.createElement("circle",{className:"".concat(u,"-circle-trail"),r:A,cx:50,cy:50,stroke:w,strokeLinecap:C,strokeWidth:g||d,style:q}),R?(n=Math.round(R*(U[0]/100)),i=100/R,a=0,new Array(R).fill(null).map((function(e,r){var t=r<=n-1?B[0]:w,s=t&&"object"===f(t)?"url(#".concat(W,")"):void 0,c=j(I,F,a,i,L,h,O,t,"butt",d,T);return a+=100*(F-c.strokeDashoffset+T)/F,o.createElement("circle",{key:r,className:"".concat(u,"-circle-path"),r:A,cx:50,cy:50,stroke:s,strokeWidth:d,opacity:1,style:c,ref:function(e){z[r]=e}})}))):function(){var e=0;return U.map((function(r,t){var n=B[t]||B[B.length-1],s=n&&"object"===f(n)?"url(#".concat(W,")"):void 0,i=j(I,F,e,r,L,h,O,n,C,d);return e+=r,o.createElement("circle",{key:t,className:"".concat(u,"-circle-path"),r:A,cx:50,cy:50,stroke:s,strokeLinecap:C,strokeWidth:d,opacity:0===r?0:1,style:i,ref:function(e){z[t]=e}})})).reverse()}())};O.defaultProps=i,O.displayName="Circle";var w=O,C=a(1014),S=a.n(C),N=a(6649),P=a.n(N),E=a(2004),_=a.n(E),D=a(5927),W=a.n(D),A=function(){return A=Object.assign||function(e){for(var r,t=1,o=arguments.length;t<o;t++)for(var n in r=arguments[t])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e},A.apply(this,arguments)},I=function(r){for(var t=r.steps,o=r.percent,n=void 0===o?0:o,s=r.strokeWidth,i=void 0===s?8:s,a=r.strokeColor,c=r.trailColor,l=r.children,u="number"==typeof n?Math.round(t*(n/100)):1,p=[],f=0;f<t;f+=1)p.push((0,e.jsx)("div",{className:f<=u-1?"steps-item steps-item-active":"steps-item",style:{backgroundColor:f<=u-1?a:c,width:14,height:i}},f));return(0,e.jsxs)("div",A({className:"steps-outer"},{children:[p,l]}))};function L(e){return!e||e<0?0:e>100?100:e}var F,M,R=function(){return R=Object.assign||function(e){for(var r,t=1,o=arguments.length;t<o;t++)for(var n in r=arguments[t])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e},R.apply(this,arguments)},T=function(e,r){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&r.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)r.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(t[o[n]]=e[o[n]])}return t},q=function(e,r){var t,o,n=e.from,s=void 0===n?"#3D66F8":n,i=e.to,a=void 0===i?"#4F93F0":i,c=e.direction,l=void 0===c?"rtl"===r?"to left":"to right":c,u=T(e,["from","to","direction"]);if(0!==Object.keys(u).length){var p=(t=u,o=[],Object.keys(t).forEach((function(e){var r=parseFloat(e.replace(/%/g,""));isNaN(r)||o.push({key:r,value:t[e]})})),(o=o.sort((function(e,r){return e.key-r.key}))).map((function(e){var r=e.key,t=e.value;return"".concat(t," ").concat(r,"%")})).join(", "));return{backgroundImage:"linear-gradient(".concat(l,", ").concat(p,")")}}return{backgroundImage:"linear-gradient(".concat(l,", ").concat(s,", ").concat(a,")")}},U=function(r){var t=r.direction,o=r.percent,n=r.strokeWidth,s=r.strokeColor,i=r.strokeLinecap,a=r.trailColor,c=s&&"string"!=typeof s?q(s,t):{background:s},l=a?{backgroundColor:a}:void 0,u=R({width:"".concat(L(o),"%"),height:n||10,borderRadius:"square"===i?0:""},c);return(0,e.jsx)("div",R({className:"trail-bar",style:l},{children:(0,e.jsx)("div",{className:"active-bar",style:u})}))},B=(a(2738),function(){return B=Object.assign||function(e){for(var r,t=1,o=arguments.length;t<o;t++)for(var n in r=arguments[t])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e},B.apply(this,arguments)}),X=function(e,r){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&r.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)r.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(t[o[n]]=e[o[n]])}return t};!function(e){e[e.line=0]="line",e[e.circle=1]="circle",e[e.dashboard=2]="dashboard"}(F||(F={})),function(e){e[e.normal=0]="normal",e[e.exception=1]="exception",e[e.active=2]="active",e[e.success=3]="success"}(M||(M={}));var z={success:"#41D658",exception:"#F46B53",normal:"#3D66F8",active:"#3D66F8"},$=function(r){var t,o=r.type,n=void 0===o?"line":o,s=r.className,i=(r.children,r.status),a=r.width,c=void 0===a?132:a,l=r.showInfo,u=void 0===l||l,p=r.format,f=r.success,d=r.percent,g=void 0===d?0:d,y=r.steps,h=r.direction,v=r.strokeColor,m=r.gapDegree,b=void 0===m?75:m,x=X(r,["type","className","children","status","width","showInfo","format","success","percent","steps","direction","strokeColor","gapDegree"]),k=function(){return v||(f&&f.percent<g?[f.strokeColor||z.success,z.normal]:O?z.success:z[i||"normal"])},j=function(){return f&&f.percent<g&&"number"==typeof g?[f.percent,g-f.percent]:g},O=g&&100===g&&!i||"success"===i,C="circle"===n||"dashboard"===n?{width:c,height:c}:{},N=function(){return p?p(g):O?"circle"===n?(0,e.jsx)(_(),{className:"success"}):(0,e.jsx)(S(),{className:"success"}):"exception"===i?"circle"===n?(0,e.jsx)(W(),{className:"error"}):(0,e.jsx)(P(),{className:"error"}):L(g)+"%"},E=y?(0,e.jsx)(I,B({steps:y,strokeColor:k(),percent:j()},x,{children:u&&(0,e.jsx)("div",B({className:"progress-text"},{children:N()}))})):(0,e.jsx)(U,B({strokeColor:k(),percent:j(),direction:h},x,{children:" "})),D=(0,e.jsx)(w,B({strokeWidth:6,trailWidth:6,strokeColor:k(),percent:j()},x)),A=(0,e.jsx)(w,B({strokeWidth:6,trailWidth:6,gapPosition:"bottom",gapDegree:b,strokeColor:k(),percent:j()},x));return(0,e.jsx)("div",B({className:(t="paraui-progress paraui-progress-".concat(n||"default"),O&&(t+=" paraui-progress-success-status"),"exception"===i&&(t+=" paraui-progress-exception-status"),"active"===i&&(t+=" paraui-progress-active-status"),s&&(t+=" "+s),t)},{children:(0,e.jsxs)("div",B({className:"progress-outer"},{children:[(0,e.jsx)("div",B({className:"progress-inner",style:C},{children:"dashboard"===n?A:"circle"===n?D:E})),u&&!y&&(0,e.jsx)("div",B({className:"progress-text"},{children:N()}))]}))}))},H=$}(),c}()}));
@@ -0,0 +1,6 @@
1
+ /**
2
+ * 判断进度条传的百分比参数是否规范
3
+ * @param {number | undefined} progress 方法入参说明
4
+ * @return {numner} 百分比值
5
+ */
6
+ export declare function validProgress(progress: number | number[] | undefined): number | number[];
@@ -0,0 +1,2 @@
1
+ export declare const LargeSearch: () => JSX.Element;
2
+ export declare const SmallSearch: () => JSX.Element;
@@ -1,32 +1,26 @@
1
- import React__default, { FC } from 'react';
2
- import styleInject from './node_modules/style-inject/dist/style-inject.es.js';
3
-
4
- var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2022/4/2 上午10:55\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-querying {\n display: inline-flex;\n flex-direction: column;\n align-items: center;\n}\n.paraui-querying-image img {\n width: 100%;\n}\n.paraui-querying-description {\n line-height: 17px;\n font-size: 14px;\n font-weight: 400;\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-querying > .paraui-querying-image {\n line-height: 0;\n}\n.paraui-querying-large .paraui-querying-description {\n margin-top: 24px;\n}\n.paraui-querying-small .paraui-querying-description {\n margin-top: 12px;\n font-size: 12px;\n}";
5
- styleInject(css_248z);
6
-
7
1
  /**
8
2
  * @author Hanz
9
3
  * @date 2022/4/2 上午10:45
10
4
  * @description
11
5
  */
12
-
13
- interface QueryingProps {
6
+ import React, { FC } from "react";
7
+ import './index.scss';
8
+ export interface QueryingProps {
14
9
  /** cls */
15
10
  className?: string;
16
11
  /** style */
17
- style?: React__default.CSSProperties;
12
+ style?: React.CSSProperties;
18
13
  /** 尺寸 */
19
14
  size?: 'large' | 'small';
20
15
  /** 图片样式 */
21
- imageStyle?: React__default.CSSProperties;
16
+ imageStyle?: React.CSSProperties;
22
17
  /** 图片 */
23
- image?: React__default.ReactNode;
18
+ image?: React.ReactNode;
24
19
  /** 描述 */
25
- description?: React__default.ReactNode;
20
+ description?: React.ReactNode;
26
21
  /** 自定义节点 */
27
- customQuerying?: React__default.ReactNode;
22
+ customQuerying?: React.ReactNode;
28
23
  [name: string]: any;
29
24
  }
30
25
  declare const Querying: FC<QueryingProps>;
31
-
32
- export { QueryingProps, Querying as default };
26
+ export default Querying;