@para-ui/core 2.2.9 → 3.0.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 (360) hide show
  1. package/AutoBox/index.d.ts +34 -34
  2. package/AutoBox/index.js +203 -15
  3. package/AutoTips/index.d.ts +27 -27
  4. package/AutoTips/index.js +84 -15
  5. package/Breadcrumbs/index.d.ts +39 -39
  6. package/Breadcrumbs/index.js +227 -15
  7. package/Button/SplitButton.d.ts +62 -61
  8. package/Button/index.d.ts +79 -56
  9. package/Button/index.js +387 -14
  10. package/Button/lang/en_US.d.ts +4 -4
  11. package/Button/lang/index.d.ts +9 -9
  12. package/Button/lang/zh_CN.d.ts +4 -4
  13. package/ButtonGroup/index.d.ts +33 -33
  14. package/ButtonGroup/index.js +128 -14
  15. package/Carousel/index.d.ts +38 -30
  16. package/Carousel/index.js +77 -15
  17. package/Cascader/index.d.ts +52 -52
  18. package/Cascader/index.js +166 -15
  19. package/Cascader/lang/en_US.d.ts +4 -4
  20. package/Cascader/lang/index.d.ts +9 -9
  21. package/Cascader/lang/zh_CN.d.ts +4 -4
  22. package/Checkbox/index.d.ts +40 -40
  23. package/Checkbox/index.js +105 -14
  24. package/CheckboxGroup/index.d.ts +46 -46
  25. package/CheckboxGroup/index.js +138 -14
  26. package/Collapse/collapsePanel.d.ts +30 -30
  27. package/Collapse/index.d.ts +57 -57
  28. package/Collapse/index.js +171 -15
  29. package/Collapse/motion.d.ts +5 -5
  30. package/Collapse/util.d.ts +11 -11
  31. package/CollapseBox/index.d.ts +27 -27
  32. package/CollapseBox/index.js +164 -15
  33. package/CollapseBox/util.d.ts +5 -5
  34. package/ColorPicker/index.d.ts +4 -4
  35. package/ColorPicker/index.js +4 -1
  36. package/ComboSelect/index.d.ts +6 -11
  37. package/ComboSelect/index.js +1062 -14
  38. package/ComboSelect/interface.d.ts +145 -143
  39. package/ComboSelect/lang/en_US.d.ts +9 -8
  40. package/ComboSelect/lang/index.d.ts +19 -17
  41. package/ComboSelect/lang/zh_CN.d.ts +9 -8
  42. package/ComboSelect/utils.d.ts +9 -12
  43. package/Container/index.d.ts +77 -77
  44. package/Container/index.js +234 -15
  45. package/DatePicker/PickerButton.d.ts +3 -3
  46. package/DatePicker/PickerTag.d.ts +3 -3
  47. package/DatePicker/generatePicker/generateRangePicker.d.ts +4 -4
  48. package/DatePicker/generatePicker/generateSinglePicker.d.ts +11 -11
  49. package/DatePicker/generatePicker/index.d.ts +84 -77
  50. package/DatePicker/index.d.ts +18 -18
  51. package/DatePicker/index.js +737 -14
  52. package/DatePicker/lang/en_US.d.ts +3 -3
  53. package/DatePicker/lang/index.d.ts +7 -7
  54. package/DatePicker/lang/zh_CN.d.ts +3 -3
  55. package/DatePicker/util.d.ts +20 -20
  56. package/Desktop/index.d.ts +57 -55
  57. package/Desktop/index.js +853 -14
  58. package/Drawer/index.d.ts +11 -11
  59. package/Drawer/index.js +195 -14
  60. package/Drawer/interface.d.ts +83 -83
  61. package/Drawer/lang/en_US.d.ts +5 -5
  62. package/Drawer/lang/index.d.ts +11 -11
  63. package/Drawer/lang/zh_CN.d.ts +5 -5
  64. package/Dropdown/index.d.ts +38 -0
  65. package/Dropdown/index.js +67 -0
  66. package/Empty/images/index.d.ts +3 -2
  67. package/Empty/index.d.ts +30 -30
  68. package/Empty/index.js +644 -14
  69. package/Empty/lang/en_US.d.ts +6 -6
  70. package/Empty/lang/index.d.ts +13 -13
  71. package/Empty/lang/zh_CN.d.ts +6 -6
  72. package/Form/index.d.ts +181 -181
  73. package/Form/index.js +377 -14
  74. package/FormItem/compoments/defaultCompoments/index.d.ts +19 -19
  75. package/FormItem/compoments/formCheckboxGroup/index.d.ts +8 -8
  76. package/FormItem/compoments/formFile/index.d.ts +38 -38
  77. package/FormItem/compoments/formRadioGroup/index.d.ts +8 -8
  78. package/FormItem/compoments/formSelect/index.d.ts +18 -18
  79. package/FormItem/errorTips.d.ts +12 -12
  80. package/FormItem/index.d.ts +152 -152
  81. package/FormItem/index.js +74 -14
  82. package/FormItem/itemType.d.ts +42 -42
  83. package/FormItem/validateFunction.d.ts +15 -15
  84. package/FunctionModal/dialog.d.ts +58 -58
  85. package/FunctionModal/index.d.ts +8 -8
  86. package/FunctionModal/index.js +39 -14
  87. package/FunctionModal/modalContext.d.ts +15 -14
  88. package/GlobalContext/componentsProps.d.ts +21 -19
  89. package/GlobalContext/confirmLocale.d.ts +7 -7
  90. package/GlobalContext/index.d.ts +28 -28
  91. package/GlobalContext/index.js +41 -16
  92. package/GlobalContext/intl.d.ts +34 -34
  93. package/GlobalContext/useFormatMessage.d.ts +3 -3
  94. package/Help/index.d.ts +24 -20
  95. package/Help/index.js +39 -15
  96. package/HelperText/index.d.ts +19 -19
  97. package/HelperText/index.js +29 -15
  98. package/Hooks/useGlobalProps.d.ts +1 -1
  99. package/InputLang/index.d.ts +49 -49
  100. package/InputLang/index.js +270 -14
  101. package/InputNumber/index.d.ts +74 -74
  102. package/InputNumber/index.js +308 -14
  103. package/Label/index.d.ts +35 -35
  104. package/Label/index.js +81 -14
  105. package/Loading/index.d.ts +17 -17
  106. package/Loading/index.js +47 -15
  107. package/Menu/footerExpansion.d.ts +9 -9
  108. package/Menu/index.d.ts +10 -10
  109. package/Menu/index.js +1232 -14
  110. package/Menu/interface.d.ts +139 -139
  111. package/Menu/logo.d.ts +9 -9
  112. package/Menu/verticalMenuList.d.ts +14 -14
  113. package/Message/index.d.ts +73 -73
  114. package/Message/index.js +222 -15
  115. package/Modal/Confirm/index.d.ts +65 -66
  116. package/Modal/index.d.ts +99 -61
  117. package/Modal/index.js +449 -14
  118. package/Modal/lang/en_US.d.ts +5 -5
  119. package/Modal/lang/index.d.ts +11 -11
  120. package/Modal/lang/zh_CN.d.ts +5 -5
  121. package/MultiBox/index.d.ts +54 -54
  122. package/MultiBox/index.js +231 -14
  123. package/Notification/index.d.ts +74 -52
  124. package/Notification/index.js +266 -15
  125. package/OperateBtn/index.d.ts +59 -59
  126. package/OperateBtn/index.js +260 -14
  127. package/OperateBtn/lang/en_US.d.ts +4 -4
  128. package/OperateBtn/lang/index.d.ts +9 -9
  129. package/OperateBtn/lang/zh_CN.d.ts +4 -4
  130. package/PageHeader/horizontalMeun.d.ts +9 -9
  131. package/PageHeader/horizontalMeunRight.d.ts +9 -9
  132. package/PageHeader/index.d.ts +10 -10
  133. package/PageHeader/index.js +1170 -14
  134. package/PageHeader/interface.d.ts +167 -167
  135. package/Pagination/index.d.ts +33 -33
  136. package/Pagination/index.js +469 -14
  137. package/Pagination/lang/en_US.d.ts +8 -8
  138. package/Pagination/lang/index.d.ts +17 -17
  139. package/Pagination/lang/zh_CN.d.ts +8 -8
  140. package/ParauiProvider/index.d.ts +8 -12
  141. package/ParauiProvider/index.js +53 -15
  142. package/PopConfirm/index.d.ts +61 -56
  143. package/PopConfirm/index.js +191 -14
  144. package/PopConfirm/lang/en_US.d.ts +5 -5
  145. package/PopConfirm/lang/index.d.ts +11 -11
  146. package/PopConfirm/lang/zh_CN.d.ts +5 -5
  147. package/Popover/index.d.ts +16 -14
  148. package/Popover/index.js +66 -15
  149. package/Progress/Line.d.ts +47 -47
  150. package/Progress/Steps.d.ts +17 -17
  151. package/Progress/index.d.ts +81 -81
  152. package/Progress/index.js +358 -20
  153. package/Progress/utils.d.ts +6 -6
  154. package/Querying/images/index.d.ts +3 -2
  155. package/Querying/index.d.ts +26 -26
  156. package/Querying/index.js +762 -14
  157. package/Querying/lang/en_US.d.ts +4 -4
  158. package/Querying/lang/index.d.ts +9 -9
  159. package/Querying/lang/zh_CN.d.ts +4 -4
  160. package/README.md +37 -1
  161. package/Radio/index.d.ts +38 -38
  162. package/Radio/index.js +94 -14
  163. package/RadioGroup/index.d.ts +47 -47
  164. package/RadioGroup/index.js +128 -14
  165. package/Search/index.d.ts +56 -56
  166. package/Search/index.js +220 -14
  167. package/Select/index.d.ts +88 -86
  168. package/Select/index.js +1290 -14
  169. package/Select/lang/en_US.d.ts +5 -5
  170. package/Select/lang/index.d.ts +11 -11
  171. package/Select/lang/zh_CN.d.ts +5 -5
  172. package/SelectInput/index.d.ts +11 -11
  173. package/SelectInput/index.js +51 -14
  174. package/Selector/index.d.ts +11 -0
  175. package/Selector/index.js +2123 -0
  176. package/Selector/interface.d.ts +355 -0
  177. package/Selector/lang/en_US.d.ts +8 -0
  178. package/Selector/lang/index.d.ts +17 -0
  179. package/Selector/lang/zh_CN.d.ts +8 -0
  180. package/Selector/selectorData/index.d.ts +10 -0
  181. package/Selector/selectorMain/index.d.ts +10 -0
  182. package/Selector/selectorNode/index.d.ts +10 -0
  183. package/Selector/util.d.ts +15 -0
  184. package/SelectorPicker/index.d.ts +49 -0
  185. package/SelectorPicker/index.js +316 -0
  186. package/SingleBox/index.d.ts +42 -42
  187. package/SingleBox/index.js +194 -14
  188. package/Slider/index.d.ts +14 -14
  189. package/Slider/index.js +125 -15
  190. package/Slider/interface.d.ts +102 -102
  191. package/Split/index.d.ts +7 -7
  192. package/Split/index.js +134 -15
  193. package/Stepper/icons.d.ts +5 -5
  194. package/Stepper/index.d.ts +59 -39
  195. package/Stepper/index.js +98 -15
  196. package/Switch/index.d.ts +78 -78
  197. package/Switch/index.js +73 -14
  198. package/Table/index.d.ts +10 -10
  199. package/Table/index.js +2728 -14
  200. package/Table/interface.d.ts +202 -202
  201. package/Table/lang/en_US.d.ts +6 -6
  202. package/Table/lang/index.d.ts +13 -13
  203. package/Table/lang/zh_CN.d.ts +6 -6
  204. package/Table/tableBody.d.ts +9 -9
  205. package/Table/tableBodyElement/index.d.ts +15 -15
  206. package/Table/tableBodyInterface.d.ts +67 -67
  207. package/Table/tableContainer/index.d.ts +16 -16
  208. package/Table/tableElement/index.d.ts +17 -17
  209. package/Table/tableHead.d.ts +9 -9
  210. package/Table/tableHeadElement/index.d.ts +15 -15
  211. package/Table/tableHeadInterface.d.ts +26 -30
  212. package/Table/tablePagination.d.ts +9 -9
  213. package/Table/tablePaginationInterFace.d.ts +24 -24
  214. package/Table/tdElement/index.d.ts +15 -15
  215. package/Table/thElement/index.d.ts +15 -15
  216. package/Table/trElement/index.d.ts +15 -15
  217. package/Table/util.d.ts +16 -16
  218. package/Tabs/index.d.ts +69 -48
  219. package/Tabs/index.js +218 -14
  220. package/Tabs/lang/en_US.d.ts +4 -0
  221. package/Tabs/lang/index.d.ts +9 -0
  222. package/Tabs/lang/zh_CN.d.ts +4 -0
  223. package/Tag/TagGroup.d.ts +66 -66
  224. package/Tag/index.d.ts +34 -34
  225. package/Tag/index.js +286 -14
  226. package/Test/index.d.ts +3 -2
  227. package/Test/index.js +9 -16
  228. package/TextField/index.d.ts +95 -93
  229. package/TextField/index.js +687 -14
  230. package/TimePicker/index.d.ts +22 -22
  231. package/TimePicker/index.js +78 -14
  232. package/TimePicker/locale/en_US.d.ts +3 -3
  233. package/TimePicker/locale/zh_CN.d.ts +3 -3
  234. package/TimePicker/style/index.d.ts +1 -1
  235. package/Timeline/TimelineItem.d.ts +30 -0
  236. package/Timeline/index.d.ts +32 -22
  237. package/Timeline/index.js +157 -15
  238. package/ToggleButton/ToggleButtonGroup.d.ts +49 -49
  239. package/ToggleButton/index.d.ts +49 -49
  240. package/ToggleButton/index.js +200 -14
  241. package/Tooltip/index.d.ts +11 -14
  242. package/Tooltip/index.js +346 -15
  243. package/Tooltip/interface.d.ts +31 -0
  244. package/Tooltip/utils.d.ts +18 -0
  245. package/Transfer/index.d.ts +18 -17
  246. package/Transfer/index.js +343 -14
  247. package/Transfer/lang/en_US.d.ts +6 -6
  248. package/Transfer/lang/index.d.ts +13 -13
  249. package/Transfer/lang/zh_CN.d.ts +6 -6
  250. package/Tree/OperateBar/index.d.ts +13 -13
  251. package/Tree/Tree.d.ts +4 -4
  252. package/Tree/index.d.ts +5 -5
  253. package/Tree/index.js +35 -14
  254. package/Tree/interface.d.ts +207 -207
  255. package/Tree/lang/en_US.d.ts +8 -8
  256. package/Tree/lang/index.d.ts +17 -17
  257. package/Tree/lang/zh_CN.d.ts +8 -8
  258. package/Tree/utils/tools.d.ts +26 -26
  259. package/Tree/utils/treeUtil.d.ts +15 -15
  260. package/Upload/Dragger/index.d.ts +10 -10
  261. package/Upload/ErroTip/index.d.ts +13 -13
  262. package/Upload/ImageUpload/index.d.ts +14 -14
  263. package/Upload/ImgCrop/EasyCrop.d.ts +17 -17
  264. package/Upload/ImgCrop/constants.d.ts +7 -7
  265. package/Upload/ImgCrop/index.d.ts +6 -6
  266. package/Upload/ImgCrop/interface.d.ts +43 -24
  267. package/Upload/UploadList/index.d.ts +5 -5
  268. package/Upload/index.d.ts +15 -15
  269. package/Upload/index.js +1550 -14
  270. package/Upload/interface.d.ts +134 -134
  271. package/Upload/lang/en_US.d.ts +12 -12
  272. package/Upload/lang/index.d.ts +25 -25
  273. package/Upload/lang/zh_CN.d.ts +12 -12
  274. package/_verture/defineProperty-0590dc61.js +16 -0
  275. package/_verture/index-342379c6.js +391 -0
  276. package/_verture/index-5bb4b5d7.js +1551 -0
  277. package/_verture/index-a369ca3f.js +4 -0
  278. package/_verture/index-abfdd262.js +778 -0
  279. package/_verture/index-e2881a53.js +16 -0
  280. package/_verture/intl-336570e4.js +65 -0
  281. package/_verture/modalContext-59669f93.js +228 -0
  282. package/_verture/slicedToArray-d7722f4b.js +62 -0
  283. package/_verture/style-inject.es-300983ab.js +28 -0
  284. package/_verture/toConsumableArray-f8047a75.js +19 -0
  285. package/_verture/tslib.es6-55ed4bd2.js +38 -0
  286. package/_verture/typeof-498dd2b1.js +11 -0
  287. package/_verture/useFormatMessage-ac9d6acf.js +20 -0
  288. package/_verture/useGlobalProps-af9a2af6.js +12 -0
  289. package/index.d.ts +132 -128
  290. package/index.js +163 -19
  291. package/package.json +59 -23
  292. package/ComboSelect/WithTabsCombo/index.d.ts +0 -11
  293. package/ComboSelect/WithTabsCombo/interface.d.ts +0 -141
  294. package/Popper/index.d.ts +0 -13
  295. package/Popper/index.js +0 -16
  296. package/cdn/AutoBox/index.js +0 -29
  297. package/cdn/AutoTips/index.js +0 -40
  298. package/cdn/Breadcrumbs/index.js +0 -53
  299. package/cdn/Button/index.js +0 -79
  300. package/cdn/ButtonGroup/index.js +0 -79
  301. package/cdn/Carousel/index.js +0 -6
  302. package/cdn/Cascader/index.js +0 -42
  303. package/cdn/Checkbox/index.js +0 -53
  304. package/cdn/CheckboxGroup/index.js +0 -53
  305. package/cdn/Collapse/index.js +0 -27
  306. package/cdn/CollapseBox/index.js +0 -1
  307. package/cdn/ColorPicker/index.js +0 -1
  308. package/cdn/ComboSelect/index.js +0 -438
  309. package/cdn/Container/index.js +0 -1
  310. package/cdn/DatePicker/index.js +0 -185
  311. package/cdn/Desktop/index.js +0 -24
  312. package/cdn/Drawer/index.js +0 -84
  313. package/cdn/Empty/index.js +0 -1
  314. package/cdn/Form/index.js +0 -477
  315. package/cdn/FormItem/index.js +0 -477
  316. package/cdn/FunctionModal/index.js +0 -144
  317. package/cdn/GlobalContext/index.js +0 -1
  318. package/cdn/Help/index.js +0 -53
  319. package/cdn/HelperText/index.js +0 -1
  320. package/cdn/InputLang/index.js +0 -144
  321. package/cdn/InputNumber/index.js +0 -118
  322. package/cdn/Label/index.js +0 -53
  323. package/cdn/Loading/index.js +0 -14
  324. package/cdn/Menu/index.js +0 -40
  325. package/cdn/Message/index.js +0 -53
  326. package/cdn/Modal/index.js +0 -144
  327. package/cdn/MultiBox/index.js +0 -131
  328. package/cdn/Notification/index.js +0 -66
  329. package/cdn/OperateBtn/index.js +0 -92
  330. package/cdn/PageHeader/index.js +0 -92
  331. package/cdn/Pagination/index.js +0 -214
  332. package/cdn/ParauiProvider/index.js +0 -9
  333. package/cdn/PopConfirm/index.js +0 -131
  334. package/cdn/Popover/index.js +0 -16
  335. package/cdn/Popper/index.js +0 -26
  336. package/cdn/Progress/index.js +0 -58
  337. package/cdn/Querying/index.js +0 -1
  338. package/cdn/Radio/index.js +0 -53
  339. package/cdn/RadioGroup/index.js +0 -53
  340. package/cdn/Search/index.js +0 -144
  341. package/cdn/Select/index.js +0 -131
  342. package/cdn/SelectInput/index.js +0 -131
  343. package/cdn/SingleBox/index.js +0 -131
  344. package/cdn/Slider/index.js +0 -16
  345. package/cdn/Split/index.js +0 -1
  346. package/cdn/Stepper/index.js +0 -154
  347. package/cdn/Switch/index.js +0 -71
  348. package/cdn/Table/index.js +0 -292
  349. package/cdn/Tabs/index.js +0 -165
  350. package/cdn/Tag/index.js +0 -27
  351. package/cdn/Test/index.js +0 -1
  352. package/cdn/TextField/index.js +0 -105
  353. package/cdn/TimePicker/index.js +0 -185
  354. package/cdn/Timeline/index.js +0 -16
  355. package/cdn/ToggleButton/index.js +0 -79
  356. package/cdn/Tooltip/index.js +0 -40
  357. package/cdn/Transfer/index.js +0 -170
  358. package/cdn/Tree/index.js +0 -170
  359. package/cdn/Upload/index.js +0 -252
  360. package/style.css +0 -72
@@ -1,14 +1,687 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("@material-ui/core"),require("clsx"),require("@para-ui/icons/Help"),require("@paraview/lib"),require("@para-ui/icons/PreviewClose"),require("@para-ui/icons/PreviewOpen"),require("@para-ui/icons/CloseCircle"),require("@para-ui/icons/LoadingF"),require("@para-ui/core/GlobalContext")):"function"==typeof define&&define.amd?define(["react","@material-ui/core","clsx","@para-ui/icons/Help","@paraview/lib","@para-ui/icons/PreviewClose","@para-ui/icons/PreviewOpen","@para-ui/icons/CloseCircle","@para-ui/icons/LoadingF","@para-ui/core/GlobalContext"],t):"object"==typeof exports?exports.ParaUI=t(require("react"),require("@material-ui/core"),require("clsx"),require("@para-ui/icons/Help"),require("@paraview/lib"),require("@para-ui/icons/PreviewClose"),require("@para-ui/icons/PreviewOpen"),require("@para-ui/icons/CloseCircle"),require("@para-ui/icons/LoadingF"),require("@para-ui/core/GlobalContext")):e.ParaUI=t(e.react,e["@material-ui/core"],e.clsx,e["@para-ui/icons/Help"],e["@paraview/lib"],e["@para-ui/icons/PreviewClose"],e["@para-ui/icons/PreviewOpen"],e["@para-ui/icons/CloseCircle"],e["@para-ui/icons/LoadingF"],e["@para-ui/core/GlobalContext"])}(self,(function(e,t,i,n,o,r,l,a,c,d){return function(){var s={2565:function(e,t,i){(t=i(3645)(!1)).push([e.id,".paraui-auto-tips{max-width:100%;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.paraui-auto-tips>.auto-tips-content{display:inline;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.paraui-auto-tips-tooltip>div{max-height:calc(100vh - 25px);overflow:auto}",""]),e.exports=t},7381:function(e,t,i){(t=i(3645)(!1)).push([e.id,".paraui-help{display:inline-block;font-size:16px;color:rgba(46,55,67,.7)}.paraui-help:hover{color:#3666d6}.paraui-help .paraui-icon{font-size:inherit;color:inherit}",""]),e.exports=t},9916:function(e,t,i){(t=i(3645)(!1)).push([e.id,".paraui-helper-text{font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif;font-size:12px;font-weight:400;padding-left:12px;line-height:20px;color:rgba(46,55,67,.7)}.paraui-helper-text.paraui-helper-text-error{color:#eb6054}",""]),e.exports=t},4928:function(e,t,i){(t=i(3645)(!1)).push([e.id,".paraui-label{font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif;font-size:14px;font-weight:400;color:rgba(46,55,67,.7);margin-bottom:8px;display:inline-block;line-height:1.43;word-break:break-all}.paraui-label>.paraui-label-required{margin-left:2px;color:#eb6054}.paraui-label>.paraui-help{vertical-align:top;margin-left:4px}.paraui-label>.paraui-help svg{color:rgba(46,55,67,.4);vertical-align:top;position:relative;top:2px}.paraui-label.paraui-label-line.paraui-label-tooltip{border-bottom:1px dashed rgba(46,55,67,.4);padding-bottom:2px}",""]),e.exports=t},5714:function(e,t,i){(t=i(3645)(!1)).push([e.id,"@keyframes rotateLoading{0%{transformOrigin:50% 50%}100%{transform:rotate(360deg)}}.paraui-loading{position:absolute;left:0;top:0;width:100%;height:100%}.paraui-loading .paraui-loading-mask{position:absolute;width:100%;height:100%;background-color:#fff;z-index:1}.paraui-loading .paraui-loading-box{position:absolute;width:100%;height:100%;display:flex;justify-content:center;align-items:center;z-index:2}.paraui-loading .paraui-loading-box>svg{transition:all .3s ease-in-out;animation:rotateLoading 1s infinite linear;font-size:20px}",""]),e.exports=t},3637:function(e,t,i){(t=i(3645)(!1)).push([e.id,".paraui-text-field{font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif;font-size:14px;font-weight:400;display:inline-block;width:100%}.paraui-text-field>.text-field-content{border:1px solid;border-radius:4px;border-color:rgba(171,176,185,.4);display:flex;width:100%;position:relative;background-color:#fff}.paraui-text-field>.text-field-content:hover{border-color:#3666d6}.paraui-text-field>.text-field-content>.text-field-content-before{color:#2e3743;padding:0 12px;border-right:1px solid rgba(171,176,185,.4);background-color:rgba(171,176,185,.12);border-bottom-left-radius:4px;border-top-left-radius:4px;white-space:nowrap;display:flex;align-items:center}.paraui-text-field>.text-field-content>.text-field-content-before svg{font-size:20px}.paraui-text-field>.text-field-content>.text-field-content-within{position:relative;display:flex;flex-grow:1}.paraui-text-field>.text-field-content>.text-field-content-within>.clean-up-icon{display:flex;height:100%;align-items:center;margin-right:12px;cursor:pointer}.paraui-text-field>.text-field-content>.text-field-content-within>.clean-up-icon svg{color:rgba(46,55,67,.7);font-size:16px}.paraui-text-field>.text-field-content>.text-field-content-within>.clean-up-icon:hover svg{color:rgba(54,102,214,.8)}.paraui-text-field>.text-field-content>.text-field-content-within>.right-icon{display:flex;height:100%;align-items:center;margin-right:12px;cursor:pointer;color:rgba(46,55,67,.7);position:relative;z-index:1}.paraui-text-field>.text-field-content>.text-field-content-within>.right-icon.right-icon-password:hover svg{color:rgba(54,102,214,.8)}.paraui-text-field>.text-field-content>.text-field-content-within>.right-icon svg{color:rgba(46,55,67,.7);font-size:20px}.paraui-text-field>.text-field-content>.text-field-content-within>.length-limit{display:flex;height:100%;align-items:center;margin-right:12px;color:rgba(46,55,67,.7)}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input{width:100%;line-height:0;position:relative}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input input::-webkit-outer-spin-button,.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input input::-webkit-inner-spin-button{-webkit-appearance:none}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input input[type=number]{-moz-appearance:textfield}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>input{width:100%;height:100%}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>textarea{width:100% !important;padding:12px;resize:none}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>input,.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>textarea{font-size:14px;color:#2e3743;border:0;border-radius:4px;background:rgba(0,0,0,0)}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>input::-ms-clear,.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>textarea::-ms-clear{display:none}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>input::-ms-reveal,.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>textarea::-ms-reveal{display:none}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>input:disabled,.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>textarea:disabled{background-color:rgba(0,0,0,0)}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>.text-field-label-placeholder{width:100%;position:absolute;left:0;top:0;height:100%;padding:0 12px;color:rgba(46,55,67,.4);cursor:text;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>.text-field-label-placeholder>.text-field-required{margin-left:2px;color:#eb6054}.paraui-text-field>.text-field-content>.text-field-content-after{color:#2e3743;padding:0 12px;border-left:1px solid rgba(171,176,185,.4);background-color:rgba(171,176,185,.12);border-bottom-right-radius:4px;border-top-right-radius:4px;white-space:nowrap;display:flex;align-items:center}.paraui-text-field>.text-field-content>.text-field-content-after svg{font-size:20px}.paraui-text-field.text-field-multiline>.text-field-content .text-field-content-within>.clean-up-icon{display:none}.paraui-text-field.text-field-multiline>.text-field-content .text-field-content-within>.length-limit{position:absolute;height:22px;bottom:0;border-radius:4px;width:calc(100% - 12px);background:#fff;justify-content:flex-end;padding-bottom:8px;margin-right:0}.paraui-text-field.text-field-multiline>.text-field-content .text-field-content-within>.text-field-content-within-input>.text-field-label-placeholder{padding-top:12px;line-height:1;height:calc(100% - 24px)}.paraui-text-field.text-field-disabled>.text-field-content{background-color:rgba(171,176,185,.12)}.paraui-text-field.text-field-disabled>.text-field-content:hover{border-color:rgba(171,176,185,.4)}.paraui-text-field.text-field-disabled>.text-field-content>.text-field-content-before{background-color:rgba(0,0,0,0)}.paraui-text-field.text-field-disabled>.text-field-content>.text-field-content-within>.text-field-content-within-input>.text-field-label-placeholder{cursor:not-allowed}.paraui-text-field.text-field-disabled>.text-field-content>.text-field-content-within>.text-field-content-within-input>input,.paraui-text-field.text-field-disabled>.text-field-content>.text-field-content-within>.text-field-content-within-input>textarea{cursor:not-allowed}.paraui-text-field.text-field-disabled>.text-field-content>.text-field-content-after{background-color:rgba(0,0,0,0)}.paraui-text-field.text-field-disabled.text-field-multiline>.text-field-content .text-field-content-within>.length-limit{background-color:rgba(0,0,0,0)}.paraui-text-field.text-field-error>.text-field-content{border-color:#eb6054 !important}.paraui-text-field.text-field-error>.text-field-content:hover{border-color:#eb6054}.paraui-text-field.text-field-limit>.text-field-content{border-color:#eb6054 !important}.paraui-text-field.text-field-limit>.text-field-content:hover{border-color:#eb6054 !important}.paraui-text-field.text-field-limit-length>.text-field-content>.text-field-content-within>.text-field-content-within-input>textarea{padding-bottom:25px}.paraui-text-field.text-field-focus>.text-field-content{border-color:#3666d6}.paraui-text-field.text-field-small>.text-field-content{height:28px}.paraui-text-field.text-field-small>.text-field-content>.text-field-content-before{line-height:26px}.paraui-text-field.text-field-small>.text-field-content>.text-field-content-within>.text-field-content-within-input{height:26px}.paraui-text-field.text-field-small>.text-field-content>.text-field-content-within>.text-field-content-within-input>input{padding:6px 12px}.paraui-text-field.text-field-small>.text-field-content>.text-field-content-within>.text-field-content-within-input>.text-field-label-placeholder{line-height:26px}.paraui-text-field.text-field-small>.text-field-content .text-field-content-after{line-height:26px}.paraui-text-field.text-field-medium>.text-field-content{height:32px}.paraui-text-field.text-field-medium>.text-field-content>.text-field-content-before{line-height:30px}.paraui-text-field.text-field-medium>.text-field-content>.text-field-content-within>.text-field-content-within-input{height:30px}.paraui-text-field.text-field-medium>.text-field-content>.text-field-content-within>.text-field-content-within-input>input{padding:8px 12px}.paraui-text-field.text-field-medium>.text-field-content>.text-field-content-within>.text-field-content-within-input>.text-field-label-placeholder{line-height:30px}.paraui-text-field.text-field-medium>.text-field-content .text-field-content-after{line-height:30px}.paraui-text-field.text-field-large>.text-field-content{height:36px}.paraui-text-field.text-field-large>.text-field-content>.text-field-content-before{line-height:34px}.paraui-text-field.text-field-large>.text-field-content>.text-field-content-within>.text-field-content-within-input{height:34px}.paraui-text-field.text-field-large>.text-field-content>.text-field-content-within>.text-field-content-within-input>input{padding:10px 12px}.paraui-text-field.text-field-large>.text-field-content>.text-field-content-within>.text-field-content-within-input>.text-field-label-placeholder{line-height:34px}.paraui-text-field.text-field-large>.text-field-content .text-field-content-after{line-height:34px}.paraui-text-field.text-field-resize>.text-field-content>.text-field-content-within>.text-field-content-within-input>textarea{resize:both}.paraui-text-field-select.paraui-tooltip>div{max-width:none;padding:0;background-color:#fff;box-shadow:0px 2px 8px 0px rgba(171,176,185,.4);border-radius:4px;font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif;font-size:14px;font-weight:400}.paraui-text-field-select.paraui-tooltip>div>span{color:#fff}.paraui-text-field-select.paraui-tooltip>div .text-field-select-content{max-height:300px;overflow:auto}.paraui-text-field-select.paraui-tooltip>div .text-field-select-content>.text-field-select-content-item{display:flex;cursor:pointer;color:#2e3743;padding:0 12px}.paraui-text-field-select.paraui-tooltip>div .text-field-select-content>.text-field-select-content-item:hover{background-color:rgba(171,176,185,.12);color:#3666d6}.paraui-text-field-select.paraui-tooltip>div .text-field-select-content>.text-field-select-content-item.text-field-select-content-item-keydown{background-color:rgba(171,176,185,.12);color:#3666d6}.paraui-text-field-select.paraui-tooltip>div .text-field-select-content.text-field-select-content-loading{height:100px;position:relative;overflow:hidden}.paraui-text-field-select.paraui-tooltip.paraui-text-field-select-small>div .text-field-select-content>.text-field-select-content-item{line-height:28px}.paraui-text-field-select.paraui-tooltip.paraui-text-field-select-medium>div .text-field-select-content>.text-field-select-content-item{line-height:32px}.paraui-text-field-select.paraui-tooltip.paraui-text-field-select-large>div .text-field-select-content>.text-field-select-content-item{line-height:36px}.paraui-text-field-select.paraui-text-field-select-data.paraui-tooltip{padding:8px 0}",""]),e.exports=t},9929:function(e,t,i){(t=i(3645)(!1)).push([e.id,".paraui-tooltip>div{padding-left:12px;padding-right:12px;font-size:14px;font-weight:400;color:#fff;background-color:rgba(46,55,67,.7)}.paraui-tooltip-left-right>div{margin:0 8px}.paraui-tooltip-top-bottom>div{margin:8px 0}",""]),e.exports=t},3645:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i=function(e,t){var i=e[1]||"",n=e[3];if(!n)return i;if(t&&"function"==typeof btoa){var o=(l=n,a=btoa(unescape(encodeURIComponent(JSON.stringify(l)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(a),"/*# ".concat(c," */")),r=n.sources.map((function(e){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(e," */")}));return[i].concat(r).concat([o]).join("\n")}var l,a,c;return[i].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(i,"}"):i})).join("")},t.i=function(e,i,n){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(n)for(var r=0;r<this.length;r++){var l=this[r][0];null!=l&&(o[l]=!0)}for(var a=0;a<e.length;a++){var c=[].concat(e[a]);n&&o[c[0]]||(i&&(c[2]?c[2]="".concat(i," and ").concat(c[2]):c[2]=i),t.push(c))}},t}},7418:function(e){"use strict";
2
- /*
3
- object-assign
4
- (c) Sindre Sorhus
5
- @license MIT
6
- */var t=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function o(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 t={},i=0;i<10;i++)t["_"+String.fromCharCode(i)]=i;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,r){for(var l,a,c=o(e),d=1;d<arguments.length;d++){for(var s in l=Object(arguments[d]))i.call(l,s)&&(c[s]=l[s]);if(t){a=t(l);for(var u=0;u<a.length;u++)n.call(l,a[u])&&(c[a[u]]=l[a[u]])}}return c}},5251:function(e,t,i){"use strict";
7
- /** @license React v17.0.2
8
- * react-jsx-runtime.production.min.js
9
- *
10
- * Copyright (c) Facebook, Inc. and its affiliates.
11
- *
12
- * This source code is licensed under the MIT license found in the
13
- * LICENSE file in the root directory of this source tree.
14
- */i(7418);var n=i(8156),o=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var r=Symbol.for;o=r("react.element"),t.Fragment=r("react.fragment")}var l=n.__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 d(e,t,i){var n,r={},d=null,s=null;for(n in void 0!==i&&(d=""+i),void 0!==t.key&&(d=""+t.key),void 0!==t.ref&&(s=t.ref),t)a.call(t,n)&&!c.hasOwnProperty(n)&&(r[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===r[n]&&(r[n]=t[n]);return{$$typeof:o,type:e,key:d,ref:s,props:r,_owner:l.current}}t.jsx=d,t.jsxs=d},5893:function(e,t,i){"use strict";e.exports=i(5251)},9271:function(e,t,i){var n=i(3379),o=i(2565);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);e.exports=o.locals||{}},2113:function(e,t,i){var n=i(3379),o=i(7381);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);e.exports=o.locals||{}},3936:function(e,t,i){var n=i(3379),o=i(9916);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);e.exports=o.locals||{}},9663:function(e,t,i){var n=i(3379),o=i(4928);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);e.exports=o.locals||{}},3492:function(e,t,i){var n=i(3379),o=i(5714);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);e.exports=o.locals||{}},6202:function(e,t,i){var n=i(3379),o=i(3637);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);e.exports=o.locals||{}},2310:function(e,t,i){var n=i(3379),o=i(9929);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);e.exports=o.locals||{}},3379:function(e,t,i){"use strict";var n,o=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},r=function(){var e={};return function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}e[t]=i}return e[t]}}(),l=[];function a(e){for(var t=-1,i=0;i<l.length;i++)if(l[i].identifier===e){t=i;break}return t}function c(e,t){for(var i={},n=[],o=0;o<e.length;o++){var r=e[o],c=t.base?r[0]+t.base:r[0],d=i[c]||0,s="".concat(c," ").concat(d);i[c]=d+1;var u=a(s),f={css:r[1],media:r[2],sourceMap:r[3]};-1!==u?(l[u].references++,l[u].updater(f)):l.push({identifier:s,updater:g(f,t),references:1}),n.push(s)}return n}function d(e){var t=document.createElement("style"),n=e.attributes||{};if(void 0===n.nonce){var o=i.nc;o&&(n.nonce=o)}if(Object.keys(n).forEach((function(e){t.setAttribute(e,n[e])})),"function"==typeof e.insert)e.insert(t);else{var l=r(e.insert||"head");if(!l)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");l.appendChild(t)}return t}var s,u=(s=[],function(e,t){return s[e]=t,s.filter(Boolean).join("\n")});function f(e,t,i,n){var o=i?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=u(t,o);else{var r=document.createTextNode(o),l=e.childNodes;l[t]&&e.removeChild(l[t]),l.length?e.insertBefore(r,l[t]):e.appendChild(r)}}function p(e,t,i){var n=i.css,o=i.media,r=i.sourceMap;if(o?e.setAttribute("media",o):e.removeAttribute("media"),r&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var x=null,h=0;function g(e,t){var i,n,o;if(t.singleton){var r=h++;i=x||(x=d(t)),n=f.bind(null,i,r,!1),o=f.bind(null,i,r,!0)}else i=d(t),n=p.bind(null,i,t),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(i)};return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else o()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=o());var i=c(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var n=0;n<i.length;n++){var o=a(i[n]);l[o].references--}for(var r=c(e,t),d=0;d<i.length;d++){var s=a(i[d]);0===l[s].references&&(l[s].updater(),l.splice(s,1))}i=r}}}},7839:function(e,t,i){"use strict";var n=i(5893),o=i(8156),r=i(7371),l=(i(9271),function(){return l=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l.apply(this,arguments)});t.default=function(e){var t=e.children,i=e.arrow,a=void 0!==i&&i,c=e.placement,d=void 0===c?"bottom-start":c,s=e.tips,u=void 0===s?"":s,f=e.className,p=void 0===f?"":f,x=e.beyondText,h=void 0===x||x,g=e.interactive,v=void 0===g||g,b=e.style,m=(0,o.useRef)(),w=(0,o.useState)(""),y=w[0],j=w[1];(0,o.useEffect)((function(){j(u)}),[u]);var O;return(0,n.jsx)("div",l({ref:m,className:(O="paraui-auto-tips",p&&(O+=" "+p),O),onMouseOver:function(){var e="";m.current&&m.current.scrollWidth>m.current.offsetWidth&&(e=u||(h?m.current.innerText:t)),j(e)},style:b},{children:(0,n.jsx)(r.default,l({arrow:a,title:y,placement:d,interactive:v,boundariesElement:"viewport",className:"paraui-auto-tips-tooltip"},{children:(0,n.jsx)("div",l({className:"auto-tips-content"},{children:t}))}))}))}},3566:function(e,t,i){"use strict";var n=i(5893),o=i(7371),r=i(8076),l=i.n(r),a=i(5744),c=i.n(a),d=(i(2113),function(){return d=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},d.apply(this,arguments)}),s=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]])}return i};t.default=function(e){var t=e.title,i=void 0===t?"":t,r=e.children,a=e.arrow,u=void 0===a||a,f=e.interactive,p=void 0===f||f,x=e.className,h=e.placement,g=void 0===h?"top-start":h,v=s(e,["title","children","arrow","interactive","className","placement"]);return(0,n.jsx)(o.default,d({title:i,arrow:u,interactive:p,placement:g},v,{children:(0,n.jsx)("span",d({className:c()("paraui-help",x)},{children:r||(0,n.jsx)(l(),{})}))}))}},4254:function(e,t,i){"use strict";var n=i(5893),o=(i(3936),function(){return o=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)});t.default=function(e){var t,i=e.className,r=e.style,l=e.error,a=void 0!==l&&l,c=e.helperText;return(0,n.jsx)("p",o({className:(t="paraui-helper-text",i&&(t+=" "+i),a&&(t+=" paraui-helper-text-error"),t),style:r},{children:c}))}},6010:function(e,t,i){"use strict";i.d(t,{Z:function(){return c}});var n=i(8156),o=i.n(n),r=i(5395),l=i.n(r),a=function(){return a=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)};function c(e,t){var i=o().useContext(l()).componentsProps,n=i&&i[t];return a(a({},n),e)}},8767:function(e,t,i){"use strict";var n=i(5893),o=i(3566),r=(i(9663),function(){return r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)});t.default=function(e){var t=e.className,i=e.style,l=e.label,a=e.labelSign,c=e.required,d=void 0!==c&&c,s=e.tooltip,u=e.tooltipType,f=void 0===u?"icon":u,p=e.placement,x=e.arrow,h=e.tooltipIcon,g=function(){var e="paraui-label";return f&&(e+=" paraui-label-"+f),s&&(e+=" paraui-label-tooltip"),t&&(e+=" "+t),e};return(0,n.jsxs)(n.Fragment,{children:["icon"===f&&(0,n.jsxs)("label",r({className:g(),style:i},{children:[(0,n.jsx)(n.Fragment,{children:l}),d&&(0,n.jsx)("span",r({className:"paraui-label-required"},{children:"*"})),a&&(0,n.jsx)("span",{children:a}),s&&(0,n.jsx)(o.default,r({title:s,placement:p,arrow:x},{children:h}))]})),"line"===f&&(0,n.jsx)(o.default,r({title:s||"",placement:p,arrow:x},{children:(0,n.jsxs)("label",r({className:g(),style:i},{children:[(0,n.jsx)(n.Fragment,{children:l}),d&&(0,n.jsx)("span",r({className:"paraui-label-required"},{children:"*"})),a&&(0,n.jsx)("span",{children:a})]}))}))]})}},7502:function(e,t,i){"use strict";var n=i(5893),o=i(8156),r=i(2788),l=i.n(r),a=(i(3492),function(){return a=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)});t.default=function(e){var t=e.className,i=e.style,r=e.opacity,c=void 0===r?.7:r,d=(0,o.useRef)(null);(0,o.useEffect)((function(){d&&d.current&&d.current.parentNode&&(d.current.parentNode.style.position||(d.current.parentNode.style.position="relative"))}),[]);var s;return(0,n.jsxs)("div",a({className:(s="paraui-loading",t&&(s+=" "+t),s),style:i,ref:d},{children:[(0,n.jsx)("div",a({className:"paraui-loading-box"},{children:(0,n.jsx)(l(),{})})),(0,n.jsx)("div",{className:"paraui-loading-mask",style:{opacity:c}})]}))}},7371:function(e,t,i){"use strict";var n=i(5893),o=i(670),r=i(5744),l=i.n(r),a=(i(2310),function(){return a=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)}),c=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]])}return i};t.default=function(e){var t,i=e.placement,r=void 0===i?"top-start":i,d=e.className,s=e.arrow,u=void 0===s||s,f=e.PopperProps,p=e.boundariesElement,x=void 0===p?"scrollParent":p,h=c(e,["placement","className","arrow","PopperProps","boundariesElement"]),g=a(a({},e.classes),{popper:l()("paraui-tooltip",d,null===(t=e.classes)||void 0===t?void 0:t.popper,{"paraui-tooltip-left-right":(null==r?void 0:r.includes("left"))||(null==r?void 0:r.includes("right")),"paraui-tooltip-top-bottom":(null==r?void 0:r.includes("top"))||(null==r?void 0:r.includes("bottom"))})});return(0,n.jsx)(o.Tooltip,a({},h,{enterTouchDelay:0,arrow:u,placement:r,classes:g,PopperProps:a(a({},f),{modifiers:{preventOverflow:{boundariesElement:x}}})}))}},670:function(e){"use strict";e.exports=t},5395:function(e){"use strict";e.exports=d},6788:function(e){"use strict";e.exports=a},8076:function(e){"use strict";e.exports=n},2788:function(e){"use strict";e.exports=c},5428:function(e){"use strict";e.exports=r},9979:function(e){"use strict";e.exports=l},8543:function(e){"use strict";e.exports=o},5744:function(e){"use strict";e.exports=i},8156:function(t){"use strict";t.exports=e}},u={};function f(e){var t=u[e];if(void 0!==t)return t.exports;var i=u[e]={id:e,exports:{}};return s[e](i,i.exports,f),i.exports}f.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(t,{a:t}),t},f.d=function(e,t){for(var i in t)f.o(t,i)&&!f.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},f.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.nc=void 0;var p={};return function(){"use strict";f.r(p),f.d(p,{TextField:function(){return w}});var e=f(5893),t=f(8156),i=f(8767),n=f(8543),o=f(5428),r=f.n(o),l=f(9979),a=f.n(l),c=f(6788),d=f.n(c),s=f(7839),u=f(7502),x=f(7371),h=f(4254),g=f(6010),v=(f(6202),function(){return v=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},v.apply(this,arguments)}),b=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]])}return i},m=function(e){return"number"==typeof e&&!isNaN(e)},w=function(o){var l=(0,g.Z)(o,"TextField"),c=l.className,f=l.style,p=l.size,w=void 0===p?"large":p,y=l.labelMode,j=void 0===y?"outside":y,O=l.placeholder,S=void 0===O?"":O,C=l.label,N=void 0===C?"":C,k=l.labelTooltip,P=l.disabled,M=void 0!==P&&P,q=l.multiline,E=void 0!==q&&q,_=l.required,F=void 0!==_&&_,L=l.labelSign,T=l.rows,z=void 0===T?2:T,H=l.error,I=void 0!==H&&H,B=l.helperText,R=void 0===B?"":B,U=l.addonBefore,D=void 0===U?"":U,A=l.addonAfter,K=void 0===A?"":A,Y=(l.defaultValue,l.value),J=l.autoFocus,W=void 0!==J&&J,G=l.type,Q=void 0===G?"text":G,V=l.onClickIcon,Z=l.rightIcon,$=l.showRightIcon,X=void 0===$||$,ee=l.allowClear,te=void 0!==ee&&ee,ie=l.limitLength,ne=l.fetchSuggestions,oe=l.selectPopoverClass,re=l.renderSelectItem,le=l.showSelectName,ae=void 0===le?"value":le,ce=l.resize,de=void 0===ce||ce,se=l.onBlur,ue=l.onFocus,fe=l.onChange,pe=l.onKeydown,xe=l.onKeyUp,he=l.onEnter,ge=l.onClickAddonBefore,ve=l.onClickAddonAfter,be=l.onSelect,me=l.onClear,we=b(l,["className","style","size","labelMode","placeholder","label","labelTooltip","disabled","multiline","required","labelSign","rows","error","helperText","addonBefore","addonAfter","defaultValue","value","autoFocus","type","onClickIcon","rightIcon","showRightIcon","allowClear","limitLength","fetchSuggestions","selectPopoverClass","renderSelectItem","showSelectName","resize","onBlur","onFocus","onChange","onKeydown","onKeyUp","onEnter","onClickAddonBefore","onClickAddonAfter","onSelect","onClear"]),ye=(0,t.useState)("text-field-select-content-"+(0,n.UUID)())[0],je=(0,t.useState)(!0),Oe=je[0],Se=je[1],Ce=(0,t.useState)(""),Ne=Ce[0],ke=Ce[1],Pe=(0,t.useState)(!1),Me=Pe[0],qe=Pe[1],Ee=(0,t.useState)("text"),_e=Ee[0],Fe=Ee[1],Le=(0,t.useState)(!1),Te=Le[0],ze=Le[1],He=(0,t.useState)(!1),Ie=He[0],Be=He[1],Re=(0,t.useState)([]),Ue=Re[0],De=Re[1],Ae=(0,t.useRef)(null),Ke=(0,t.useRef)(null);(0,t.useEffect)((function(){void 0!==o.defaultValue&&ke(o.defaultValue)}),[]),(0,t.useEffect)((function(){Q!==_e&&Fe(Q)}),[Q]),(0,t.useEffect)((function(){void 0!==Y&&ke(Y)}),[Y]),(0,t.useEffect)((function(){Se(""===Ne||void 0===Ne)}),[Ne]),(0,t.useEffect)((function(){ne&&ze(Me)}),[Me,ne]),(0,t.useEffect)((function(){return Te?window.addEventListener("keydown",Ve):window.removeEventListener("keydown",Ve),function(){window.removeEventListener("keydown",Ve)}}),[Te]),(0,t.useEffect)((function(){if(!Me&&Ne){var e=Je(Ne);if(e!==Ne){var t={};t.target=Ae.current,t.target.value=e,void 0===o.value&&ke(e),o.onChange&&o.onChange(t)}}}),[Ne,Me]);var Ye,Je=function(e){var t=e;return m(o.limitLength)&&e.toString().length>Number(o.limitLength)&&(t=t.toString().substr(0,o.limitLength)),t},We=function(){M||(Se(!1),(Ae&&Ae.current).focus())},Ge=function(e){var t=e.selectDom,i=e.keyCode,n=e.currentDom,o="nextSibling",r=".text-field-select-content-item";38===i&&(o="previousSibling",r=".text-field-select-content-item:last-child"),n?(n=n[o])||(n=t.querySelector(r)):n=t.querySelector(".text-field-select-content-item"),n&&(n.classList.add("text-field-select-content-item-keydown"),Qe(n,t))},Qe=function(e,t){var i=t.clientHeight,n=e.offsetTop+e.clientHeight-i;t.scrollTop=n>0?n:0},Ve=function(e){var t=document.querySelector("."+ye),i=null,n=t.querySelector(".text-field-select-content-item-keydown");if(13===e.keyCode&&n){var o=n.dataset.val;lt(JSON.parse(o))(e),(Ae&&Ae.current).blur()}n&&(i=n,n.classList.remove("text-field-select-content-item-keydown")),40===e.keyCode&&Ge({selectDom:t,keyCode:e.keyCode,currentDom:i}),38===e.keyCode&&Ge({selectDom:t,keyCode:e.keyCode,currentDom:i})},Ze=function(e){qe(!1),""===e.target.value&&Se(!0),se&&se(e)},$e=function(e){ne&&(Be(!0),ne(e,(function(e){De(e||[]),Be(!1)})))},Xe=function(e){qe(!0),ue&&ue(e),$e(e.target.value)},et=function(e){var t=e.target.value;t&&Se(!1),void 0===o.value&&ke(t),fe&&fe(e),$e(e.target.value)},tt=function(e){13===e.keyCode&&he&&he(e),pe&&pe(e)},it=function(e){xe&&xe(e)},nt=function(e){"password"===Q&&("text"===_e&&Fe("password"),"password"===_e&&Fe("text")),V&&V(e)},ot=function(){return void 0===o.value?Ne:Y},rt=function(){ze(!1)},lt=function(e){return function(t){be&&be(e)}},at=(0,t.useMemo)((function(){return(0,e.jsx)(e.Fragment,{children:m(ie)&&(0,e.jsx)("span",v({className:"length-limit"},{children:(Ne?Ne.toString().length:0)+"/"+ie}))})}),[ie,Ne]),ct=(0,t.useMemo)((function(){var t=Z||("password"===Q?"password"===_e?(0,e.jsx)(r(),{}):(0,e.jsx)(a(),{}):null);return(0,e.jsx)(e.Fragment,{children:X&&t&&(0,e.jsx)("span",v({className:"password"===Q?"right-icon right-icon-password":"right-icon",onClick:nt},{children:t}))})}),[X,Z,Q,_e,V]),dt=function(){var e=Ae.current;e.value="",void 0===o.value&&ke(""),fe&&fe({target:e}),$e(""),me&&me()},st=function(){if(ot()&&!M&&te)return(0,e.jsx)("span",v({className:"clean-up-icon",onClick:dt},{children:(0,e.jsx)(d(),{})}))},ut=(0,t.useMemo)((function(){return(0,e.jsxs)("div",v({className:"text-field-content-within",ref:Ke},{children:[(0,e.jsxs)("div",v({className:"text-field-content-within-input"},{children:[E?(0,e.jsx)("textarea",v({ref:Ae,rows:z,value:ot(),onBlur:Ze,onFocus:Xe,onChange:et,onKeyDown:tt,onKeyUp:it,disabled:M},we)):(0,e.jsx)("input",v({ref:Ae,type:_e,value:ot(),onBlur:Ze,onFocus:Xe,onChange:et,onKeyDown:tt,onKeyUp:it,disabled:M},we)),Oe&&!Me&&(0,e.jsx)("span",v({className:"text-field-label-placeholder",onClick:We},{children:"outside"===j?S:(0,e.jsxs)(e.Fragment,{children:[N||S,F&&(0,e.jsx)("span",v({className:"text-field-required"},{children:"*"})),L&&(0,e.jsx)("span",{children:L})]})}))]})),st(),at,ct]}))}),[Oe,Me,W,_e,Ne,at,ct,j,S,N,M,E,z,we,fe,ne,V,te,me]),ft=(0,t.useMemo)((function(){var t,i=function(e){return"object"==typeof e&&null!==e?e[ae]:e};return(0,e.jsxs)("div",v({className:(t="text-field-select-content",Ie&&(t+=" text-field-select-content-loading"),ye&&(t+=" "+ye),t),style:{width:(Ke&&Ke.current?Ke.current.offsetWidth:0)+"px"}},{children:[Ue&&Ue.map((function(t,n){return(0,e.jsx)("div",v({className:"text-field-select-content-item",onMouseDown:lt(t),"data-val":JSON.stringify(t)},{children:re?re(t):(0,e.jsx)(s.default,{children:i(t)})}),n)})),Ie&&(0,e.jsx)(u.default,{})]}))}),[Ke,Te,Ue,re,ae,be,Ie,ye]),pt=(0,t.useMemo)((function(){return(0,e.jsx)(x.default,v({open:Te,title:ft,onClose:rt,arrow:!1,interactive:!0,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,placement:"bottom-start",classes:{popper:(t="paraui-text-field-select paraui-scrollbar-small",w&&(t+=" paraui-text-field-select-"+w),oe&&(t+=" "+oe),Ue.length>0&&(t+=" paraui-text-field-select-data"),t)}},{children:ut}));var t}),[Oe,Me,W,_e,Ne,at,ct,j,S,N,M,E,z,we,fe,ne,be,Ke,Te,oe,w,V,Ue,te,me]),xt=(0,t.useMemo)((function(){var t,n=Boolean(F||L||N);if("outside"===j&&n){return(0,e.jsx)(i.default,v({label:N,required:F,labelSign:L},k,{className:(t="text-field-label",k&&k.className&&(t+=" "+k.className),t)}))}return null}),[j,N,L,F,k]);return(0,e.jsxs)("div",v({className:(Ye="paraui-text-field",Ye+=" text-field",w&&!E&&(Ye+=" text-field-"+w),c&&(Ye+=" "+c),I&&(Ye+=" text-field-error"),Me&&(Ye+=" text-field-focus"),M&&(Ye+=" text-field-disabled"),E&&(Ye+=" text-field-multiline"),m(o.limitLength)&&(Ye+=" text-field-limit-length"),m(o.limitLength)&&Ne&&Ne.toString().length>Number(o.limitLength)&&(Ye+=" text-field-limit"),de&&(Ye+=" text-field-resize"),ot()&&(Ye+=" text-field-value"),te&&(Ye+=" text-field-allow-clear"),Ye),style:f},{children:[xt,(0,e.jsxs)("div",v({className:"text-field-content"},{children:[D&&(0,e.jsx)("div",v({className:"text-field-content-before",onClick:function(e){ge&&ge(e)}},{children:D})),ne?pt:ut,K&&(0,e.jsx)("div",v({className:"text-field-content-after",onClick:function(e){ve&&ve(e)}},{children:K}))]})),(0,e.jsx)(h.default,{className:"text-field-error-text",error:I,helperText:R})]}))};p.default=w}(),p}()}));
1
+ import { _ as _typeof } from '../_verture/typeof-498dd2b1.js';
2
+ import { _ as _slicedToArray } from '../_verture/slicedToArray-d7722f4b.js';
3
+ import { _ as __rest } from '../_verture/tslib.es6-55ed4bd2.js';
4
+ import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
5
+ import { useState, useRef, useEffect, useMemo } from 'react';
6
+ import Label from '../Label/index.js';
7
+ import { UUID } from '@paraview/lib';
8
+ import VisibilityOff from '@para-ui/icons/PreviewClose';
9
+ import Visibility from '@para-ui/icons/PreviewOpen';
10
+ import CloseCircle from '@para-ui/icons/CloseCircle';
11
+ import AutoTips from '../AutoTips/index.js';
12
+ import { Loading } from '../Loading/index.js';
13
+ import HelperText from '../HelperText/index.js';
14
+ import { u as useGlobalProps } from '../_verture/useGlobalProps-af9a2af6.js';
15
+ import { Dropdown } from '../Dropdown/index.js';
16
+ import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
17
+ import '../Help/index.js';
18
+ import '../Tooltip/index.js';
19
+ import 'rc-tooltip';
20
+ import 'rc-tooltip/lib/placements';
21
+ import 'clsx';
22
+ import '@para-ui/icons/Help';
23
+ import '@para-ui/icons/LoadingF';
24
+ import '@para-ui/core/GlobalContext';
25
+ import 'rc-dropdown';
26
+
27
+ var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-text-field {\n font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif;\n font-size: 14px;\n font-weight: 400;\n display: inline-block;\n width: 100%;\n}\n.paraui-text-field > .text-field-content {\n border: 1px solid;\n border-radius: 4px;\n border-color: rgba(171, 176, 185, 0.4);\n display: flex;\n width: 100%;\n position: relative;\n background-color: rgb(255, 255, 255);\n}\n.paraui-text-field > .text-field-content:hover {\n border-color: rgb(54, 102, 214);\n}\n.paraui-text-field > .text-field-content > .text-field-content-before {\n color: rgb(46, 55, 67);\n padding: 0 12px;\n border-right: 1px solid rgba(171, 176, 185, 0.4);\n background-color: rgba(171, 176, 185, 0.12);\n border-bottom-left-radius: 4px;\n border-top-left-radius: 4px;\n white-space: nowrap;\n display: flex;\n align-items: center;\n}\n.paraui-text-field > .text-field-content > .text-field-content-before svg {\n font-size: 20px;\n}\n.paraui-text-field > .text-field-content > .text-field-content-within {\n position: relative;\n display: flex;\n flex-grow: 1;\n}\n.paraui-text-field > .text-field-content > .text-field-content-within > .clean-up-icon {\n display: flex;\n height: 100%;\n align-items: center;\n margin-right: 12px;\n cursor: pointer;\n}\n.paraui-text-field > .text-field-content > .text-field-content-within > .clean-up-icon svg {\n color: rgba(46, 55, 67, 0.7);\n font-size: 16px;\n}\n.paraui-text-field > .text-field-content > .text-field-content-within > .clean-up-icon:hover svg {\n color: rgba(54, 102, 214, 0.8);\n}\n.paraui-text-field > .text-field-content > .text-field-content-within > .right-icon {\n display: flex;\n height: 100%;\n align-items: center;\n margin-right: 12px;\n cursor: pointer;\n color: rgba(46, 55, 67, 0.7);\n position: relative;\n z-index: 1;\n}\n.paraui-text-field > .text-field-content > .text-field-content-within > .right-icon.right-icon-password:hover svg {\n color: rgba(54, 102, 214, 0.8);\n}\n.paraui-text-field > .text-field-content > .text-field-content-within > .right-icon svg {\n color: rgba(46, 55, 67, 0.7);\n font-size: 20px;\n}\n.paraui-text-field > .text-field-content > .text-field-content-within > .length-limit {\n display: flex;\n height: 100%;\n align-items: center;\n margin-right: 12px;\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-text-field > .text-field-content > .text-field-content-within > .text-field-content-within-input {\n width: 100%;\n line-height: 0;\n position: relative;\n}\n.paraui-text-field > .text-field-content > .text-field-content-within > .text-field-content-within-input input::-webkit-outer-spin-button,\n.paraui-text-field > .text-field-content > .text-field-content-within > .text-field-content-within-input input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n}\n.paraui-text-field > .text-field-content > .text-field-content-within > .text-field-content-within-input input[type=number] {\n -moz-appearance: textfield;\n}\n.paraui-text-field > .text-field-content > .text-field-content-within > .text-field-content-within-input > input {\n width: 100%;\n height: 100%;\n}\n.paraui-text-field > .text-field-content > .text-field-content-within > .text-field-content-within-input > textarea {\n width: 100% !important;\n padding: 12px;\n resize: none;\n}\n.paraui-text-field > .text-field-content > .text-field-content-within > .text-field-content-within-input > input, .paraui-text-field > .text-field-content > .text-field-content-within > .text-field-content-within-input > textarea {\n font-size: 14px;\n color: rgb(46, 55, 67);\n border: 0;\n border-radius: 4px;\n background: transparent;\n}\n.paraui-text-field > .text-field-content > .text-field-content-within > .text-field-content-within-input > input::-ms-clear, .paraui-text-field > .text-field-content > .text-field-content-within > .text-field-content-within-input > textarea::-ms-clear {\n display: none;\n}\n.paraui-text-field > .text-field-content > .text-field-content-within > .text-field-content-within-input > input::-ms-reveal, .paraui-text-field > .text-field-content > .text-field-content-within > .text-field-content-within-input > textarea::-ms-reveal {\n display: none;\n}\n.paraui-text-field > .text-field-content > .text-field-content-within > .text-field-content-within-input > input:disabled, .paraui-text-field > .text-field-content > .text-field-content-within > .text-field-content-within-input > textarea:disabled {\n background-color: transparent;\n}\n.paraui-text-field > .text-field-content > .text-field-content-within > .text-field-content-within-input > .text-field-label-placeholder {\n width: 100%;\n position: absolute;\n left: 0;\n top: 0;\n height: 100%;\n padding: 0 12px;\n color: rgba(46, 55, 67, 0.4);\n cursor: text;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.paraui-text-field > .text-field-content > .text-field-content-within > .text-field-content-within-input > .text-field-label-placeholder > .text-field-required {\n margin-left: 2px;\n color: rgb(235, 96, 84);\n}\n.paraui-text-field > .text-field-content > .text-field-content-after {\n color: rgb(46, 55, 67);\n padding: 0 12px;\n border-left: 1px solid rgba(171, 176, 185, 0.4);\n background-color: rgba(171, 176, 185, 0.12);\n border-bottom-right-radius: 4px;\n border-top-right-radius: 4px;\n white-space: nowrap;\n display: flex;\n align-items: center;\n}\n.paraui-text-field > .text-field-content > .text-field-content-after svg {\n font-size: 20px;\n}\n.paraui-text-field.text-field-multiline > .text-field-content .text-field-content-within > .clean-up-icon {\n display: none;\n}\n.paraui-text-field.text-field-multiline > .text-field-content .text-field-content-within > .length-limit {\n position: absolute;\n height: 22px;\n bottom: 0;\n border-radius: 4px;\n width: calc(100% - 12px);\n background: white;\n justify-content: flex-end;\n padding-bottom: 8px;\n margin-right: 0;\n}\n.paraui-text-field.text-field-multiline > .text-field-content .text-field-content-within > .text-field-content-within-input > .text-field-label-placeholder {\n padding-top: 12px;\n line-height: 1;\n height: calc(100% - 24px);\n}\n.paraui-text-field.text-field-disabled > .text-field-content {\n background-color: rgba(171, 176, 185, 0.12);\n}\n.paraui-text-field.text-field-disabled > .text-field-content:hover {\n border-color: rgba(171, 176, 185, 0.4);\n}\n.paraui-text-field.text-field-disabled > .text-field-content > .text-field-content-before {\n background-color: transparent;\n}\n.paraui-text-field.text-field-disabled > .text-field-content > .text-field-content-within > .text-field-content-within-input > .text-field-label-placeholder {\n cursor: not-allowed;\n}\n.paraui-text-field.text-field-disabled > .text-field-content > .text-field-content-within > .text-field-content-within-input > input, .paraui-text-field.text-field-disabled > .text-field-content > .text-field-content-within > .text-field-content-within-input > textarea {\n cursor: not-allowed;\n}\n.paraui-text-field.text-field-disabled > .text-field-content > .text-field-content-after {\n background-color: transparent;\n}\n.paraui-text-field.text-field-disabled.text-field-multiline > .text-field-content .text-field-content-within > .length-limit {\n background-color: transparent;\n}\n.paraui-text-field.text-field-error > .text-field-content {\n border-color: rgb(235, 96, 84) !important;\n}\n.paraui-text-field.text-field-error > .text-field-content:hover {\n border-color: rgb(235, 96, 84);\n}\n.paraui-text-field.text-field-limit > .text-field-content {\n border-color: rgb(235, 96, 84) !important;\n}\n.paraui-text-field.text-field-limit > .text-field-content:hover {\n border-color: rgb(235, 96, 84) !important;\n}\n.paraui-text-field.text-field-limit-length > .text-field-content > .text-field-content-within > .text-field-content-within-input > textarea {\n padding-bottom: 25px;\n}\n.paraui-text-field.text-field-focus > .text-field-content {\n border-color: rgb(54, 102, 214);\n}\n.paraui-text-field.text-field-small > .text-field-content {\n height: 28px;\n}\n.paraui-text-field.text-field-small > .text-field-content > .text-field-content-before {\n line-height: 26px;\n}\n.paraui-text-field.text-field-small > .text-field-content > .text-field-content-within > .text-field-content-within-input {\n height: 26px;\n}\n.paraui-text-field.text-field-small > .text-field-content > .text-field-content-within > .text-field-content-within-input > input {\n padding: 6px 12px;\n}\n.paraui-text-field.text-field-small > .text-field-content > .text-field-content-within > .text-field-content-within-input > .text-field-label-placeholder {\n line-height: 26px;\n}\n.paraui-text-field.text-field-small > .text-field-content .text-field-content-after {\n line-height: 26px;\n}\n.paraui-text-field.text-field-medium > .text-field-content {\n height: 32px;\n}\n.paraui-text-field.text-field-medium > .text-field-content > .text-field-content-before {\n line-height: 30px;\n}\n.paraui-text-field.text-field-medium > .text-field-content > .text-field-content-within > .text-field-content-within-input {\n height: 30px;\n}\n.paraui-text-field.text-field-medium > .text-field-content > .text-field-content-within > .text-field-content-within-input > input {\n padding: 8px 12px;\n}\n.paraui-text-field.text-field-medium > .text-field-content > .text-field-content-within > .text-field-content-within-input > .text-field-label-placeholder {\n line-height: 30px;\n}\n.paraui-text-field.text-field-medium > .text-field-content .text-field-content-after {\n line-height: 30px;\n}\n.paraui-text-field.text-field-large > .text-field-content {\n height: 36px;\n}\n.paraui-text-field.text-field-large > .text-field-content > .text-field-content-before {\n line-height: 34px;\n}\n.paraui-text-field.text-field-large > .text-field-content > .text-field-content-within > .text-field-content-within-input {\n height: 34px;\n}\n.paraui-text-field.text-field-large > .text-field-content > .text-field-content-within > .text-field-content-within-input > input {\n padding: 10px 12px;\n}\n.paraui-text-field.text-field-large > .text-field-content > .text-field-content-within > .text-field-content-within-input > .text-field-label-placeholder {\n line-height: 34px;\n}\n.paraui-text-field.text-field-large > .text-field-content .text-field-content-after {\n line-height: 34px;\n}\n.paraui-text-field.text-field-resize > .text-field-content > .text-field-content-within > .text-field-content-within-input > textarea {\n resize: both;\n}\n\n.paraui-text-field-select.paraui-dropdown > .text-field-select-content {\n max-height: 300px;\n overflow: auto;\n}\n.paraui-text-field-select.paraui-dropdown > .text-field-select-content > .text-field-select-content-item {\n display: flex;\n cursor: pointer;\n color: rgb(46, 55, 67);\n padding: 0 12px;\n}\n.paraui-text-field-select.paraui-dropdown > .text-field-select-content > .text-field-select-content-item:hover {\n background-color: rgba(171, 176, 185, 0.12);\n color: rgb(54, 102, 214);\n}\n.paraui-text-field-select.paraui-dropdown > .text-field-select-content > .text-field-select-content-item.text-field-select-content-item-keydown {\n background-color: rgba(171, 176, 185, 0.12);\n color: rgb(54, 102, 214);\n}\n.paraui-text-field-select.paraui-dropdown > .text-field-select-content.text-field-select-content-loading {\n height: 100px;\n position: relative;\n overflow: hidden;\n}\n.paraui-text-field-select.paraui-dropdown.paraui-text-field-select-small > .text-field-select-content > .text-field-select-content-item {\n line-height: 28px;\n}\n.paraui-text-field-select.paraui-dropdown.paraui-text-field-select-medium > .text-field-select-content > .text-field-select-content-item {\n line-height: 32px;\n}\n.paraui-text-field-select.paraui-dropdown.paraui-text-field-select-large > .text-field-select-content > .text-field-select-content-item {\n line-height: 36px;\n}\n.paraui-text-field-select.paraui-text-field-select-data.paraui-tooltip {\n padding: 8px 0;\n}";
28
+ styleInject(css_248z);
29
+
30
+ var IsNaN = function IsNaN(value) {
31
+ return typeof value === 'number' && !isNaN(value);
32
+ };
33
+
34
+ var TextField = function TextField(props) {
35
+ var _a = useGlobalProps(props, 'TextField'),
36
+ className = _a.className,
37
+ style = _a.style,
38
+ _a$size = _a.size,
39
+ size = _a$size === void 0 ? 'large' : _a$size,
40
+ _a$labelMode = _a.labelMode,
41
+ labelMode = _a$labelMode === void 0 ? 'outside' : _a$labelMode,
42
+ _a$placeholder = _a.placeholder,
43
+ placeholder = _a$placeholder === void 0 ? '' : _a$placeholder,
44
+ _a$label = _a.label,
45
+ label = _a$label === void 0 ? '' : _a$label,
46
+ labelTooltip = _a.labelTooltip,
47
+ _a$disabled = _a.disabled,
48
+ disabled = _a$disabled === void 0 ? false : _a$disabled,
49
+ _a$multiline = _a.multiline,
50
+ multiline = _a$multiline === void 0 ? false : _a$multiline,
51
+ _a$required = _a.required,
52
+ required = _a$required === void 0 ? false : _a$required,
53
+ labelSign = _a.labelSign,
54
+ _a$rows = _a.rows,
55
+ rows = _a$rows === void 0 ? 2 : _a$rows,
56
+ _a$error = _a.error,
57
+ error = _a$error === void 0 ? false : _a$error,
58
+ _a$helperText = _a.helperText,
59
+ helperText = _a$helperText === void 0 ? '' : _a$helperText,
60
+ _a$addonBefore = _a.addonBefore,
61
+ addonBefore = _a$addonBefore === void 0 ? '' : _a$addonBefore,
62
+ _a$addonAfter = _a.addonAfter,
63
+ addonAfter = _a$addonAfter === void 0 ? '' : _a$addonAfter;
64
+ _a.defaultValue;
65
+ var value = _a.value,
66
+ _a$autoFocus = _a.autoFocus,
67
+ autoFocus = _a$autoFocus === void 0 ? false : _a$autoFocus,
68
+ _a$type = _a.type,
69
+ type = _a$type === void 0 ? 'text' : _a$type,
70
+ onClickIcon = _a.onClickIcon,
71
+ rightIcon = _a.rightIcon,
72
+ _a$showRightIcon = _a.showRightIcon,
73
+ showRightIcon = _a$showRightIcon === void 0 ? true : _a$showRightIcon,
74
+ _a$allowClear = _a.allowClear,
75
+ allowClear = _a$allowClear === void 0 ? false : _a$allowClear,
76
+ limitLength = _a.limitLength,
77
+ fetchSuggestions = _a.fetchSuggestions,
78
+ selectPopoverClass = _a.selectPopoverClass,
79
+ renderSelectItem = _a.renderSelectItem,
80
+ _a$showSelectName = _a.showSelectName,
81
+ showSelectName = _a$showSelectName === void 0 ? 'value' : _a$showSelectName,
82
+ _a$resize = _a.resize,
83
+ resize = _a$resize === void 0 ? true : _a$resize,
84
+ searchEmpty = _a.searchEmpty,
85
+ onBlur = _a.onBlur,
86
+ onFocus = _a.onFocus,
87
+ onChange = _a.onChange,
88
+ onKeydown = _a.onKeydown,
89
+ onKeyUp = _a.onKeyUp,
90
+ onEnter = _a.onEnter,
91
+ onClickAddonBefore = _a.onClickAddonBefore,
92
+ onClickAddonAfter = _a.onClickAddonAfter,
93
+ onSelect = _a.onSelect,
94
+ onClear = _a.onClear,
95
+ otherProps = __rest(_a, ["className", "style", "size", "labelMode", "placeholder", "label", "labelTooltip", "disabled", "multiline", "required", "labelSign", "rows", "error", "helperText", "addonBefore", "addonAfter", "defaultValue", "value", "autoFocus", "type", "onClickIcon", "rightIcon", "showRightIcon", "allowClear", "limitLength", "fetchSuggestions", "selectPopoverClass", "renderSelectItem", "showSelectName", "resize", "searchEmpty", "onBlur", "onFocus", "onChange", "onKeydown", "onKeyUp", "onEnter", "onClickAddonBefore", "onClickAddonAfter", "onSelect", "onClear"]);
96
+
97
+ var _useState = useState('text-field-select-content-' + UUID()),
98
+ _useState2 = _slicedToArray(_useState, 1),
99
+ classSearchOne = _useState2[0]; // 唯一class
100
+
101
+
102
+ var _useState3 = useState(true),
103
+ _useState4 = _slicedToArray(_useState3, 2),
104
+ showText = _useState4[0],
105
+ setShowText = _useState4[1]; // 是否显示输入框lable,placeholder true显示
106
+
107
+
108
+ var _useState5 = useState(''),
109
+ _useState6 = _slicedToArray(_useState5, 2),
110
+ valueCom = _useState6[0],
111
+ setValueCom = _useState6[1]; // 组件值
112
+
113
+
114
+ var _useState7 = useState(false),
115
+ _useState8 = _slicedToArray(_useState7, 2),
116
+ isFocus = _useState8[0],
117
+ setIsFocus = _useState8[1]; // 是否得到焦点
118
+
119
+
120
+ var _useState9 = useState('text'),
121
+ _useState10 = _slicedToArray(_useState9, 2),
122
+ typeCom = _useState10[0],
123
+ setTypeCom = _useState10[1];
124
+
125
+ var _useState11 = useState(false),
126
+ _useState12 = _slicedToArray(_useState11, 2),
127
+ open = _useState12[0],
128
+ setOpen = _useState12[1]; // 是否打开下拉框
129
+
130
+
131
+ var _useState13 = useState(false),
132
+ _useState14 = _slicedToArray(_useState13, 2),
133
+ selectLoading = _useState14[0],
134
+ setSelectLoading = _useState14[1]; // 下拉loading
135
+
136
+
137
+ var _useState15 = useState([]),
138
+ _useState16 = _slicedToArray(_useState15, 2),
139
+ selectData = _useState16[0],
140
+ setSelectData = _useState16[1]; //const [constData] = useState<ConstDataProps>({});
141
+
142
+
143
+ var inputDom = useRef(null);
144
+ var selectPosDom = useRef(null); // 下拉框定位元素
145
+
146
+ useEffect(function () {
147
+ if (props.defaultValue !== undefined) {
148
+ setValueCom(props.defaultValue);
149
+ }
150
+ }, []); // 组件类型
151
+
152
+ useEffect(function () {
153
+ if (type !== typeCom) setTypeCom(type);
154
+ }, [type]); // 监听value
155
+
156
+ useEffect(function () {
157
+ if (value !== undefined) {
158
+ setValueCom(value);
159
+ }
160
+ }, [value]); // 监听组件值,判断是否显示placehold,label
161
+
162
+ useEffect(function () {
163
+ if (valueCom !== '' && valueCom !== undefined) setShowText(false);else setShowText(true);
164
+ }, [valueCom]); // 判断是否显示下拉
165
+
166
+ useEffect(function () {
167
+ if (!fetchSuggestions) return;
168
+ setOpen(isFocus);
169
+ }, [isFocus, fetchSuggestions]);
170
+ useEffect(function () {
171
+ if (open) {
172
+ window.addEventListener("keydown", keydownCom);
173
+ } else {
174
+ window.removeEventListener("keydown", keydownCom);
175
+ }
176
+
177
+ return function () {
178
+ window.removeEventListener("keydown", keydownCom);
179
+ };
180
+ }, [open]);
181
+ useEffect(function () {
182
+ // 失去焦点
183
+ if (!isFocus && valueCom) {
184
+ var val = handValueLimit(valueCom);
185
+
186
+ if (val !== valueCom) {
187
+ var e = {};
188
+ e.target = inputDom.current;
189
+ e.target.value = val;
190
+
191
+ if (props.value === undefined) {
192
+ setValueCom(val);
193
+ }
194
+
195
+ props.onChange && props.onChange(e);
196
+ }
197
+ }
198
+ }, [valueCom, isFocus]);
199
+ /**
200
+ * 处理value值
201
+ * 超出字符长度限制,截取符合长度内容,并且触发onchange事件
202
+ * */
203
+
204
+ var handValueLimit = function handValueLimit(val) {
205
+ var valHand = val;
206
+
207
+ if (IsNaN(props.limitLength) && val.toString().length > Number(props.limitLength)) {
208
+ valHand = valHand.toString().substr(0, props.limitLength);
209
+ }
210
+
211
+ return valHand;
212
+ }; // 点击内标题 / placeholder
213
+
214
+
215
+ var clickPlaceholder = function clickPlaceholder() {
216
+ if (disabled) return;
217
+ setShowText(false);
218
+ var dom = inputDom && inputDom.current;
219
+ dom.focus();
220
+ };
221
+ /**
222
+ * 处理键盘事件 上/下
223
+ * @param config
224
+ * 例:
225
+ * {
226
+ * selectDom: 外容器
227
+ * keyCode: 键盘code
228
+ * currentDom: 当前元素
229
+ * }
230
+ */
231
+
232
+
233
+ var handKeydown = function handKeydown(config) {
234
+ var selectDom = config.selectDom,
235
+ keyCode = config.keyCode,
236
+ currentDom = config.currentDom;
237
+ var brotherDom = currentDom;
238
+ var type = 'nextSibling';
239
+ var classSelectStr = '.text-field-select-content-item';
240
+
241
+ if (keyCode === 38) {
242
+ // 上
243
+ type = 'previousSibling';
244
+ classSelectStr = '.text-field-select-content-item:last-child';
245
+ }
246
+
247
+ if (brotherDom) {
248
+ // 存在键盘上下的元素
249
+ brotherDom = brotherDom[type]; // 没有兄弟节点,去最后跟第一的节点
250
+
251
+ if (!brotherDom) brotherDom = selectDom.querySelector(classSelectStr);
252
+ } else {
253
+ // 不存在,默认情况
254
+ brotherDom = selectDom.querySelector('.text-field-select-content-item');
255
+ }
256
+
257
+ if (brotherDom) {
258
+ brotherDom.classList.add("text-field-select-content-item-keydown");
259
+ domClientTop(brotherDom, selectDom);
260
+ }
261
+ };
262
+ /**
263
+ * 设置当前上下选中的元素是否在当前可见页面里面
264
+ * @param currentDom 当前元素
265
+ * @param selectDom 外容器
266
+ */
267
+
268
+
269
+ var domClientTop = function domClientTop(currentDom, selectDom) {
270
+ var clientHeight = selectDom.clientHeight; // 可见区域的高度
271
+
272
+ var top = currentDom.offsetTop + currentDom.clientHeight;
273
+ var difference = top - clientHeight;
274
+
275
+ if (difference > 0) {
276
+ selectDom.scrollTop = difference;
277
+ } else {
278
+ selectDom.scrollTop = 0;
279
+ }
280
+ };
281
+ /**
282
+ * 键盘事件
283
+ * @param e 键盘信息
284
+ */
285
+
286
+
287
+ var keydownCom = function keydownCom(e) {
288
+ var selectDom = document.querySelector('.' + classSearchOne);
289
+ var currentDom = null;
290
+ var keydownDom = selectDom.querySelector('.text-field-select-content-item-keydown'); // 回车
291
+
292
+ if (e.keyCode === 13) {
293
+ if (keydownDom) {
294
+ var val = keydownDom.dataset.val;
295
+ clickSelectItem(JSON.parse(val))(e);
296
+ var dom = inputDom && inputDom.current;
297
+ dom.blur();
298
+ }
299
+ }
300
+
301
+ if (keydownDom) {
302
+ currentDom = keydownDom;
303
+ keydownDom.classList.remove("text-field-select-content-item-keydown");
304
+ } // 下
305
+
306
+
307
+ if (e.keyCode === 40) {
308
+ handKeydown({
309
+ selectDom: selectDom,
310
+ keyCode: e.keyCode,
311
+ currentDom: currentDom
312
+ });
313
+ } // 上
314
+
315
+
316
+ if (e.keyCode === 38) {
317
+ handKeydown({
318
+ selectDom: selectDom,
319
+ keyCode: e.keyCode,
320
+ currentDom: currentDom
321
+ });
322
+ }
323
+ };
324
+ /**
325
+ * 失去焦点
326
+ * @param event 失去焦点元素对象
327
+ */
328
+
329
+
330
+ var onBlurCom = function onBlurCom(event) {
331
+ setIsFocus(false);
332
+ if (event.target.value === '') setShowText(true);
333
+ onBlur && onBlur(event);
334
+ };
335
+ /**
336
+ * 下拉搜索
337
+ * @param val 搜索值
338
+ */
339
+
340
+
341
+ var fetchSuggestionsCom = function fetchSuggestionsCom(val) {
342
+ if (fetchSuggestions) {
343
+ setSelectLoading(true);
344
+ fetchSuggestions(val, function (data) {
345
+ setSelectData(data || []);
346
+ setSelectLoading(false);
347
+ });
348
+ }
349
+ };
350
+ /**
351
+ * 得到焦点
352
+ * @param event 得到焦点元素
353
+ */
354
+
355
+
356
+ var onFocusCom = function onFocusCom(event) {
357
+ setIsFocus(true);
358
+ onFocus && onFocus(event);
359
+ fetchSuggestionsCom(event.target.value);
360
+ };
361
+ /**
362
+ * 改变输入框
363
+ * @param event 输入框元素
364
+ */
365
+
366
+
367
+ var onChangeCom = function onChangeCom(event) {
368
+ var val = event.target.value;
369
+ if (val) setShowText(false); // 有值不显示placehold,防止浏览器默认填充
370
+
371
+ /*if (limitLength && val !== undefined && val !== '' && val.toString().length > limitLength) {
372
+ return;
373
+ }*/
374
+
375
+ if (props.value === undefined) {
376
+ setValueCom(val);
377
+ }
378
+
379
+ onChange && onChange(event);
380
+ fetchSuggestionsCom(event.target.value);
381
+ };
382
+ /**
383
+ * 键盘按下事件
384
+ * @param event 输入框元素
385
+ */
386
+
387
+
388
+ var onKeyDownCom = function onKeyDownCom(event) {
389
+ if (event.keyCode === 13) onEnter && onEnter(event);
390
+ onKeydown && onKeydown(event);
391
+ };
392
+ /**
393
+ * 键盘抬起事件
394
+ * @param event 输入框元素
395
+ */
396
+
397
+
398
+ var onKeyUpCom = function onKeyUpCom(event) {
399
+ onKeyUp && onKeyUp(event);
400
+ };
401
+ /**
402
+ * 点击图标
403
+ * @param event 图标元素
404
+ */
405
+
406
+
407
+ var onClickRightIcon = function onClickRightIcon(event) {
408
+ if (type === 'password') {
409
+ if (typeCom === 'text') {
410
+ setTypeCom('password');
411
+ }
412
+
413
+ if (typeCom === 'password') {
414
+ setTypeCom('text');
415
+ }
416
+ }
417
+
418
+ onClickIcon && onClickIcon(event);
419
+ };
420
+
421
+ var handValue = function handValue() {
422
+ if (props.value === undefined) return valueCom;
423
+ return value;
424
+ }; // 处理下拉框样式
425
+
426
+
427
+ var handleClassPopover = function handleClassPopover() {
428
+ var str = 'paraui-text-field-select paraui-scrollbar-small';
429
+ if (size) str += ' paraui-text-field-select-' + size;
430
+ if (selectPopoverClass) str += ' ' + selectPopoverClass;
431
+ if (selectData.length > 0) str += ' paraui-text-field-select-data';
432
+ return str;
433
+ }; // 点击下拉
434
+
435
+
436
+ var clickSelectItem = function clickSelectItem(item) {
437
+ return function (e) {
438
+ onSelect && onSelect(item);
439
+ };
440
+ }; // 限制长度
441
+
442
+
443
+ var limitMemo = useMemo(function () {
444
+ return jsx(Fragment, {
445
+ children: IsNaN(limitLength) && jsx("span", Object.assign({
446
+ className: "length-limit"
447
+ }, {
448
+ children: (valueCom ? valueCom.toString().length : 0) + '/' + limitLength
449
+ }))
450
+ });
451
+ }, [limitLength, valueCom]); // 图标
452
+
453
+ var rightIconMemo = useMemo(function () {
454
+ var rightIconFunc = function rightIconFunc() {
455
+ return rightIcon ? rightIcon : // 只有密码模式有默认图标
456
+ type === 'password' ? typeCom === 'password' ? jsx(VisibilityOff, {}) : jsx(Visibility, {}) : null;
457
+ };
458
+
459
+ var rightIconContent = rightIconFunc();
460
+ return jsx(Fragment, {
461
+ children: showRightIcon && rightIconContent && jsx("span", Object.assign({
462
+ className: type === 'password' ? 'right-icon right-icon-password' : 'right-icon',
463
+ onClick: onClickRightIcon
464
+ }, {
465
+ children: rightIconContent
466
+ }))
467
+ });
468
+ }, [showRightIcon, rightIcon, type, typeCom, onClickIcon]); // 输入框
469
+
470
+ var renderInputDom = function renderInputDom() {
471
+ if (multiline) {
472
+ return jsx("textarea", Object.assign({
473
+ ref: inputDom,
474
+ rows: rows,
475
+ value: handValue(),
476
+ onBlur: onBlurCom,
477
+ onFocus: onFocusCom,
478
+ onChange: onChangeCom,
479
+ onKeyDown: onKeyDownCom,
480
+ onKeyUp: onKeyUpCom,
481
+ disabled: disabled
482
+ }, otherProps));
483
+ }
484
+
485
+ return jsx("input", Object.assign({
486
+ ref: inputDom,
487
+ type: typeCom,
488
+ value: handValue(),
489
+ onBlur: onBlurCom,
490
+ onFocus: onFocusCom,
491
+ onChange: onChangeCom,
492
+ onKeyDown: onKeyDownCom,
493
+ onKeyUp: onKeyUpCom,
494
+ disabled: disabled
495
+ }, otherProps));
496
+ }; // 点击清楚按钮
497
+
498
+
499
+ var clickClean = function clickClean() {
500
+ var target = inputDom.current;
501
+ target.value = '';
502
+
503
+ if (props.value === undefined) {
504
+ setValueCom('');
505
+ }
506
+
507
+ onChange && onChange({
508
+ target: target
509
+ });
510
+ fetchSuggestionsCom('');
511
+ onClear && onClear();
512
+ }; // 清空内容
513
+
514
+
515
+ var clearRender = function clearRender() {
516
+ if (handValue() && !disabled && allowClear) {
517
+ return jsx("span", Object.assign({
518
+ className: "clean-up-icon",
519
+ onClick: clickClean
520
+ }, {
521
+ children: jsx(CloseCircle, {})
522
+ }));
523
+ }
524
+ }; // 中间主体
525
+
526
+
527
+ var contentMemo = useMemo(function () {
528
+ var handPlaceholderCon = function handPlaceholderCon() {
529
+ if (labelMode === 'outside') return placeholder;
530
+ return jsxs(Fragment, {
531
+ children: [label || placeholder, required && jsx("span", Object.assign({
532
+ className: "text-field-required"
533
+ }, {
534
+ children: "*"
535
+ })), labelSign && jsx("span", {
536
+ children: labelSign
537
+ })]
538
+ });
539
+ };
540
+
541
+ return jsxs("div", Object.assign({
542
+ className: "text-field-content-within",
543
+ ref: selectPosDom
544
+ }, {
545
+ children: [jsxs("div", Object.assign({
546
+ className: "text-field-content-within-input"
547
+ }, {
548
+ children: [renderInputDom(), showText && !isFocus && jsx("span", Object.assign({
549
+ className: "text-field-label-placeholder",
550
+ onClick: clickPlaceholder
551
+ }, {
552
+ children: handPlaceholderCon()
553
+ }))]
554
+ })), clearRender(), limitMemo, rightIconMemo]
555
+ }));
556
+ }, [showText, isFocus, autoFocus, typeCom, valueCom, limitMemo, rightIconMemo, labelMode, placeholder, label, disabled, multiline, rows, otherProps, onChange, fetchSuggestions, onClickIcon, allowClear, onClear]); // 搜索下拉内容
557
+
558
+ var selectContentMemo = useMemo(function () {
559
+ var handSelectContentClass = function handSelectContentClass() {
560
+ var str = 'text-field-select-content';
561
+ if (selectLoading) str += ' text-field-select-content-loading';
562
+ if (classSearchOne) str += ' ' + classSearchOne;
563
+ return str;
564
+ };
565
+
566
+ var handText = function handText(item) {
567
+ if (_typeof(item) === 'object' && item !== null) {
568
+ return item[showSelectName];
569
+ }
570
+
571
+ return item;
572
+ };
573
+
574
+ return jsxs("div", Object.assign({
575
+ className: handSelectContentClass(),
576
+ style: {
577
+ width: (selectPosDom && selectPosDom.current ? selectPosDom.current.offsetWidth : 0) + 'px'
578
+ }
579
+ }, {
580
+ children: [selectData && selectData.map(function (item, index) {
581
+ return jsx("div", Object.assign({
582
+ className: "text-field-select-content-item",
583
+ onMouseDown: clickSelectItem(item),
584
+ "data-val": JSON.stringify(item)
585
+ }, {
586
+ children: renderSelectItem ? renderSelectItem(item) : jsx(AutoTips, {
587
+ children: handText(item)
588
+ })
589
+ }), index);
590
+ }), selectData.length === 0 && searchEmpty, selectLoading && jsx(Loading, {})]
591
+ }));
592
+ }, [selectPosDom, open, selectData, renderSelectItem, showSelectName, onSelect, selectLoading, classSearchOne, searchEmpty]); // 带有搜索的中间主体
593
+
594
+ var searchContentMemo = useMemo(function () {
595
+ return jsx(Dropdown, Object.assign({
596
+ visible: open,
597
+ placement: 'bottomLeft',
598
+ trigger: ['click'],
599
+ overlay: jsx(Fragment, {
600
+ children: selectContentMemo
601
+ }),
602
+ overlayClassName: handleClassPopover()
603
+ }, {
604
+ children: contentMemo
605
+ }));
606
+ }, [showText, isFocus, autoFocus, typeCom, valueCom, limitMemo, rightIconMemo, labelMode, placeholder, label, disabled, multiline, rows, otherProps, onChange, fetchSuggestions, onSelect, selectPosDom, open, selectPopoverClass, size, onClickIcon, selectData, allowClear, onClear]); // 外标题
607
+
608
+ var outSideMemo = useMemo(function () {
609
+ var showTag = Boolean(required || labelSign || label);
610
+
611
+ if (labelMode === 'outside' && showTag) {
612
+ var handLabelClass = function handLabelClass() {
613
+ var str = 'text-field-label';
614
+
615
+ if (labelTooltip && labelTooltip.className) {
616
+ str += ' ' + labelTooltip.className;
617
+ }
618
+
619
+ return str;
620
+ };
621
+
622
+ return jsx(Label, Object.assign({
623
+ label: label,
624
+ required: required,
625
+ labelSign: labelSign
626
+ }, labelTooltip, {
627
+ className: handLabelClass()
628
+ }));
629
+ }
630
+
631
+ return null;
632
+ }, [labelMode, label, labelSign, required, labelTooltip]); // 处理class
633
+
634
+ var handClass = function handClass() {
635
+ var str = 'paraui-text-field';
636
+ str += ' text-field';
637
+ if (size && !multiline) str += ' text-field-' + size;
638
+ if (className) str += ' ' + className;
639
+ if (error) str += ' text-field-error';
640
+ if (isFocus) str += ' text-field-focus';
641
+ if (disabled) str += ' text-field-disabled';
642
+ if (multiline) str += ' text-field-multiline';
643
+ if (IsNaN(props.limitLength)) str += ' text-field-limit-length';
644
+ if (IsNaN(props.limitLength) && valueCom && valueCom.toString().length > Number(props.limitLength)) str += ' text-field-limit';
645
+ if (resize) str += ' text-field-resize';
646
+ if (handValue()) str += ' text-field-value';
647
+ if (allowClear) str += ' text-field-allow-clear';
648
+ return str;
649
+ }; // 点击前缀
650
+
651
+
652
+ var clickBefore = function clickBefore(event) {
653
+ onClickAddonBefore && onClickAddonBefore(event);
654
+ }; // 点击后缀
655
+
656
+
657
+ var clickAfter = function clickAfter(event) {
658
+ onClickAddonAfter && onClickAddonAfter(event);
659
+ };
660
+
661
+ return jsxs("div", Object.assign({
662
+ className: handClass(),
663
+ style: style
664
+ }, {
665
+ children: [outSideMemo, jsxs("div", Object.assign({
666
+ className: "text-field-content"
667
+ }, {
668
+ children: [addonBefore && jsx("div", Object.assign({
669
+ className: "text-field-content-before",
670
+ onClick: clickBefore
671
+ }, {
672
+ children: addonBefore
673
+ })), fetchSuggestions ? searchContentMemo : contentMemo, addonAfter && jsx("div", Object.assign({
674
+ className: "text-field-content-after",
675
+ onClick: clickAfter
676
+ }, {
677
+ children: addonAfter
678
+ }))]
679
+ })), jsx(HelperText, {
680
+ className: "text-field-error-text",
681
+ error: error,
682
+ helperText: helperText
683
+ })]
684
+ }));
685
+ };
686
+
687
+ export { TextField, TextField as default };