@para-ui/core 2.2.18 → 3.0.2-beta

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