@para-ui/core 5.0.0-beta.12 → 5.0.0-beta.14

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 (565) hide show
  1. package/AGENTS.md +315 -0
  2. package/AlignBox/component.json +89 -0
  3. package/Anchor/component.json +130 -0
  4. package/Argv/component.json +216 -0
  5. package/AutoBox/component.json +133 -0
  6. package/AutoButton/component.json +109 -0
  7. package/AutoTips/component.json +121 -0
  8. package/Badge/component.json +92 -0
  9. package/Breadcrumbs/component.json +142 -0
  10. package/Button/component.json +168 -0
  11. package/ButtonGroup/component.json +132 -0
  12. package/Card/component.json +162 -0
  13. package/Carousel/component.json +142 -0
  14. package/Cascader/component.json +196 -0
  15. package/Checkbox/component.json +138 -0
  16. package/CheckboxGroup/component.json +152 -0
  17. package/CodeEditor/component.json +189 -0
  18. package/Collapse/component.json +166 -0
  19. package/CollapseBox/component.json +84 -0
  20. package/CollapseLayout/component.json +155 -0
  21. package/ColorPicker/component.json +142 -0
  22. package/ComboSelect/component.json +181 -0
  23. package/Container/component.json +111 -0
  24. package/ContentBox/component.json +81 -0
  25. package/CopyText/component.json +118 -0
  26. package/CycleSelector/component.json +98 -0
  27. package/DatePicker/component.json +192 -0
  28. package/Descriptions/component.json +142 -0
  29. package/Desktop/component.json +171 -0
  30. package/DragVerify/component.json +114 -0
  31. package/Drawer/component.json +200 -0
  32. package/Dropdown/component.json +147 -0
  33. package/DynamicMultiBox/component.json +278 -0
  34. package/Empty/component.json +123 -0
  35. package/FieldForm/component.json +196 -0
  36. package/Form/component.json +161 -0
  37. package/FormItem/component.json +171 -0
  38. package/FunctionModal/component.json +197 -0
  39. package/Help/component.json +118 -0
  40. package/HelperText/component.json +126 -0
  41. package/Image/component.json +165 -0
  42. package/InputCode/component.json +191 -0
  43. package/InputLang/component.json +205 -0
  44. package/InputNumber/component.json +162 -0
  45. package/Label/component.json +126 -0
  46. package/Loading/component.json +91 -0
  47. package/Menu/component.json +180 -0
  48. package/Message/component.json +246 -0
  49. package/Modal/component.json +277 -0
  50. package/MultiBox/component.json +216 -0
  51. package/Notification/component.json +184 -0
  52. package/OperateBtn/component.json +134 -0
  53. package/PageHeader/component.json +112 -0
  54. package/Pagination/component.json +181 -0
  55. package/PasswordRules/component.json +105 -0
  56. package/PopConfirm/component.json +227 -0
  57. package/PopMenu/component.json +131 -0
  58. package/Popover/component.json +165 -0
  59. package/Progress/component.json +161 -0
  60. package/Prompt/component.json +144 -0
  61. package/Querying/component.json +96 -0
  62. package/QuickReply/component.json +129 -0
  63. package/Radio/component.json +136 -0
  64. package/RadioGroup/component.json +149 -0
  65. package/RangeInput/component.json +198 -0
  66. package/Result/component.json +104 -0
  67. package/ScrollBar/component.json +115 -0
  68. package/Search/component.json +177 -0
  69. package/Select/component.json +244 -0
  70. package/SelectInput/component.json +184 -0
  71. package/Selector/component.json +203 -0
  72. package/SelectorPicker/component.json +179 -0
  73. package/SingleBox/component.json +151 -0
  74. package/Slider/component.json +181 -0
  75. package/SortBox/component.json +108 -0
  76. package/Status/component.json +104 -0
  77. package/Stepper/component.json +129 -0
  78. package/Switch/component.json +207 -0
  79. package/Table/component.json +547 -0
  80. package/Tabs/component.json +227 -0
  81. package/Tag/component.json +221 -0
  82. package/TextEditor/component.json +186 -0
  83. package/TextField/component.json +290 -0
  84. package/TimePicker/component.json +176 -0
  85. package/Timeline/component.json +110 -0
  86. package/Title/component.json +156 -0
  87. package/ToggleButton/component.json +153 -0
  88. package/Tooltip/component.json +176 -0
  89. package/Transfer/component.json +157 -0
  90. package/Tree/component.json +512 -0
  91. package/Upload/component.json +450 -0
  92. package/ai-workflows/01-crud-list-multi-drawer.md +278 -0
  93. package/ai-workflows/02-rbac-operation-buttons.md +290 -0
  94. package/ai-workflows/03-complex-form-async-cascade.md +350 -0
  95. package/ai-workflows/04-array-field-form.md +281 -0
  96. package/ai-workflows/05-popconfirm-async-message-queue.md +333 -0
  97. package/ai-workflows/06-modal-drawer-form-workflow.md +385 -0
  98. package/ai-workflows/07-search-filter-table-trio.md +387 -0
  99. package/ai-workflows/08-table-advanced-features.md +365 -0
  100. package/ai-workflows/09-batch-operation-export-progress.md +367 -0
  101. package/ai-workflows/10-cross-component-state-coordination.md +412 -0
  102. package/codemods/modal-onCancel-to-onDismiss.js +69 -0
  103. package/es/AlignBox/component.json +89 -0
  104. package/es/AlignBox/index.css +1 -1
  105. package/es/AlignBox/index.d.ts +6 -2
  106. package/es/AlignBox/index.js +1 -1
  107. package/es/AlignBox/style/index.css +1 -1
  108. package/es/Anchor/anchorMenu/index.d.ts +2 -1
  109. package/es/Anchor/anchorMenu/index.js +36 -33
  110. package/es/Anchor/component.json +130 -0
  111. package/es/Anchor/index.js +50 -47
  112. package/es/Anchor/type.d.ts +8 -4
  113. package/es/Argv/component.json +216 -0
  114. package/es/Argv/index.d.ts +5 -6
  115. package/es/AutoBox/component.json +133 -0
  116. package/es/AutoBox/index.d.ts +3 -3
  117. package/es/AutoBox/index.js +1 -1
  118. package/es/AutoBox/protal.d.ts +2 -2
  119. package/es/AutoBox/protal.js +32 -29
  120. package/es/AutoButton/component.json +109 -0
  121. package/es/AutoButton/index.js +1 -1
  122. package/es/AutoTips/autoTipsMultiline/index.d.ts +1 -1
  123. package/es/AutoTips/autoTipsMultiline/index.js +1 -1
  124. package/es/AutoTips/component.json +121 -0
  125. package/es/Badge/component.json +92 -0
  126. package/es/Breadcrumbs/component.json +142 -0
  127. package/es/Breadcrumbs/index.js +1 -1
  128. package/es/Button/SplitButton.d.ts +2 -2
  129. package/es/Button/component.json +168 -0
  130. package/es/Button/index.js +44 -44
  131. package/es/ButtonGroup/component.json +132 -0
  132. package/es/ButtonGroup/index.d.ts +1 -1
  133. package/es/Card/component.json +162 -0
  134. package/es/Card/index.d.ts +2 -2
  135. package/es/Card/index.js +2 -2
  136. package/es/Carousel/component.json +142 -0
  137. package/es/Carousel/index.d.ts +1 -1
  138. package/es/Cascader/Cascader.js +188 -180
  139. package/es/Cascader/component.json +196 -0
  140. package/es/Cascader/hooks/useEntities.js +7 -7
  141. package/es/Cascader/interface.d.ts +1 -0
  142. package/es/Cascader/utils/commonUtil.d.ts +1 -1
  143. package/es/Cascader/utils/commonUtil.js +16 -16
  144. package/es/Cascader/utils/treeUtil.d.ts +14 -5
  145. package/es/Cascader/utils/treeUtil.js +1 -1
  146. package/es/Checkbox/component.json +138 -0
  147. package/es/CheckboxGroup/component.json +152 -0
  148. package/es/CodeEditor/component.json +189 -0
  149. package/es/CodeEditor/index.d.ts +10 -9
  150. package/es/Collapse/component.json +166 -0
  151. package/es/Collapse/index.d.ts +1 -1
  152. package/es/Collapse/index.js +41 -33
  153. package/es/CollapseBox/component.json +84 -0
  154. package/es/CollapseLayout/component.json +155 -0
  155. package/es/ColorPicker/component.json +142 -0
  156. package/es/ComboSelect/component.json +181 -0
  157. package/es/ComboSelect/index.js +299 -287
  158. package/es/ComboSelect/interface.d.ts +6 -3
  159. package/es/ComboSelect/utils.d.ts +3 -3
  160. package/es/ComboSelect/utils.js +1 -1
  161. package/es/Container/component.json +111 -0
  162. package/es/ContentBox/component.json +81 -0
  163. package/es/CopyText/component.json +118 -0
  164. package/es/CycleSelector/component.json +98 -0
  165. package/es/CycleSelector/index.js +14 -13
  166. package/es/DatePicker/component.json +192 -0
  167. package/es/DatePicker/generatePicker/generateRangePicker.d.ts +0 -8
  168. package/es/DatePicker/generatePicker/generateRangePicker.js +73 -65
  169. package/es/DatePicker/generatePicker/generateSinglePicker.js +1 -1
  170. package/es/DatePicker/generatePicker/index.d.ts +11 -4
  171. package/es/Descriptions/component.json +142 -0
  172. package/es/Descriptions/index.d.ts +1 -1
  173. package/es/Desktop/component.json +171 -0
  174. package/es/DragVerify/component.json +114 -0
  175. package/es/DragVerify/index.js +19 -19
  176. package/es/Drawer/component.json +200 -0
  177. package/es/Drawer/index.js +86 -86
  178. package/es/Drawer/interface.d.ts +1 -1
  179. package/es/Drawer/util.d.ts +1 -6
  180. package/es/Drawer/util.js +9 -6
  181. package/es/Dropdown/component.json +147 -0
  182. package/es/DynamicMultiBox/component.json +278 -0
  183. package/es/DynamicMultiBox/formItem.d.ts +1 -1
  184. package/es/DynamicMultiBox/rowForm.d.ts +2 -2
  185. package/es/Empty/component.json +123 -0
  186. package/es/Empty/index.css +1 -1
  187. package/es/Empty/index.d.ts +2 -2
  188. package/es/Empty/index.js +27 -26
  189. package/es/Empty/style/index.css +1 -1
  190. package/es/FieldForm/FieldFormItem/MemoInput.d.ts +2 -2
  191. package/es/FieldForm/FieldFormItem/index.d.ts +6 -6
  192. package/es/FieldForm/Form.d.ts +2 -2
  193. package/es/FieldForm/FormList.d.ts +2 -2
  194. package/es/FieldForm/component.json +196 -0
  195. package/es/FieldForm/context.d.ts +5 -1
  196. package/es/FieldForm/context.js +2 -2
  197. package/es/FieldForm/hooks/useForm.d.ts +4 -3
  198. package/es/FieldForm/hooks/useFormInstance.d.ts +1 -1
  199. package/es/FieldForm/hooks/useFormItemStatus.d.ts +9 -5
  200. package/es/FieldForm/hooks/useFormItemStatus.js +2 -2
  201. package/es/FieldForm/hooks/useItemRef.d.ts +1 -1
  202. package/es/FieldForm/hooks/useItemRef.js +6 -6
  203. package/es/Form/component.json +161 -0
  204. package/es/Form/index.d.ts +52 -49
  205. package/es/FormItem/compoments/defaultCompoments/index.d.ts +5 -5
  206. package/es/FormItem/compoments/defaultCompoments/index.js +12 -11
  207. package/es/FormItem/compoments/formCheckboxGroup/index.d.ts +2 -2
  208. package/es/FormItem/compoments/formFile/index.js +8 -8
  209. package/es/FormItem/compoments/formRadioGroup/index.d.ts +1 -1
  210. package/es/FormItem/compoments/formSelect/index.d.ts +1 -1
  211. package/es/FormItem/component.json +171 -0
  212. package/es/FormItem/index.d.ts +5 -5
  213. package/es/FormItem/index.js +23 -23
  214. package/es/FormItem/itemType.js +1 -1
  215. package/es/FunctionModal/component.json +197 -0
  216. package/es/FunctionModal/dialog.d.ts +1 -1
  217. package/es/FunctionModal/modalContext.d.ts +4 -1
  218. package/es/Help/component.json +118 -0
  219. package/es/HelperText/component.json +126 -0
  220. package/es/Image/component.json +165 -0
  221. package/es/InputCode/component.json +191 -0
  222. package/es/InputCode/index.d.ts +2 -2
  223. package/es/InputLang/component.json +205 -0
  224. package/es/InputLang/index.js +1 -1
  225. package/es/InputNumber/component.json +162 -0
  226. package/es/Label/component.json +126 -0
  227. package/es/Label/index.d.ts +2 -2
  228. package/es/Loading/component.json +91 -0
  229. package/es/Menu/component.json +180 -0
  230. package/es/Message/component.json +246 -0
  231. package/es/Message/index.d.ts +2 -2
  232. package/es/Message/index.js +2 -2
  233. package/es/Modal/Confirm/index.d.ts +1 -1
  234. package/es/Modal/Confirm/index.js +81 -75
  235. package/es/Modal/component.json +277 -0
  236. package/es/Modal/index.d.ts +97 -6
  237. package/es/Modal/index.js +174 -122
  238. package/es/Modal/interface.d.ts +1 -0
  239. package/es/MultiBox/component.json +216 -0
  240. package/es/MultiBox/index.js +19 -14
  241. package/es/Notification/component.json +184 -0
  242. package/es/OperateBtn/component.json +134 -0
  243. package/es/OperateBtn/index.d.ts +3 -3
  244. package/es/PageHeader/component.json +112 -0
  245. package/es/Pagination/component.json +181 -0
  246. package/es/Pagination/index.js +15 -15
  247. package/es/PasswordRules/component.json +105 -0
  248. package/es/PasswordRules/index.d.ts +4 -4
  249. package/es/PopConfirm/component.json +227 -0
  250. package/es/PopConfirm/index.d.ts +1 -1
  251. package/es/PopConfirm/index.js +1 -1
  252. package/es/PopMenu/component.json +131 -0
  253. package/es/PopMenu/hooks.d.ts +1 -1
  254. package/es/PopMenu/index.js +8 -8
  255. package/es/Popover/component.json +165 -0
  256. package/es/Popover/index.js +1 -1
  257. package/es/Progress/component.json +161 -0
  258. package/es/Prompt/component.json +144 -0
  259. package/es/Querying/component.json +96 -0
  260. package/es/Querying/index.css +1 -1
  261. package/es/Querying/index.d.ts +2 -2
  262. package/es/Querying/index.js +20 -19
  263. package/es/Querying/style/index.css +1 -1
  264. package/es/QuickReply/component.json +129 -0
  265. package/es/QuickReply/index.d.ts +1 -1
  266. package/es/Radio/component.json +136 -0
  267. package/es/RadioGroup/component.json +149 -0
  268. package/es/RangeInput/component.json +198 -0
  269. package/es/RangeInput/index.js +1 -1
  270. package/es/Result/component.json +104 -0
  271. package/es/ScrollBar/component.json +115 -0
  272. package/es/Search/component.json +177 -0
  273. package/es/Search/index.d.ts +1 -1
  274. package/es/Select/component.json +244 -0
  275. package/es/Select/index.js +113 -113
  276. package/es/SelectInput/component.json +184 -0
  277. package/es/Selector/component.json +203 -0
  278. package/es/Selector/index.js +28 -27
  279. package/es/Selector/interface.d.ts +1 -1
  280. package/es/Selector/selectorMain/index.js +2 -2
  281. package/es/Selector/selectorNode/index.js +1 -1
  282. package/es/Selector/util.d.ts +2 -2
  283. package/es/SelectorPicker/component.json +179 -0
  284. package/es/SelectorPicker/index.d.ts +5 -5
  285. package/es/SelectorPicker/index.js +15 -15
  286. package/es/SingleBox/component.json +151 -0
  287. package/es/SingleBox/index.d.ts +2 -2
  288. package/es/Slider/component.json +181 -0
  289. package/es/SortBox/component.json +108 -0
  290. package/es/Status/component.json +104 -0
  291. package/es/Stepper/component.json +129 -0
  292. package/es/Stepper/index.d.ts +2 -2
  293. package/es/Switch/component.json +207 -0
  294. package/es/Switch/index.css +1 -1
  295. package/es/Switch/index.d.ts +3 -2
  296. package/es/Switch/index.js +60 -59
  297. package/es/Switch/style/index.css +1 -1
  298. package/es/Table/component.json +547 -0
  299. package/es/Table/index.d.ts +2 -2
  300. package/es/Table/index.js +414 -414
  301. package/es/Table/interface.d.ts +6 -0
  302. package/es/Tabs/component.json +227 -0
  303. package/es/Tag/component.json +221 -0
  304. package/es/Tag/index.css +1 -1
  305. package/es/Tag/index.d.ts +1 -1
  306. package/es/Tag/index.js +20 -20
  307. package/es/Tag/style/index.css +1 -1
  308. package/es/TextEditor/component.json +186 -0
  309. package/es/TextEditor/index.d.ts +5 -5
  310. package/es/TextField/component.json +290 -0
  311. package/es/TextField/index.d.ts +2 -2
  312. package/es/TimePicker/component.json +176 -0
  313. package/es/Timeline/component.json +110 -0
  314. package/es/Title/component.json +156 -0
  315. package/es/ToggleButton/component.json +153 -0
  316. package/es/Tooltip/component.json +176 -0
  317. package/es/Tooltip/index.js +74 -63
  318. package/es/Tooltip/interface.d.ts +14 -1
  319. package/es/Tooltip/utils.js +6 -6
  320. package/es/Transfer/component.json +157 -0
  321. package/es/Tree/component.json +512 -0
  322. package/es/Upload/component.json +450 -0
  323. package/es/Utils/type.d.ts +0 -2
  324. package/es/index.d.ts +2 -0
  325. package/es/index.js +1 -1
  326. package/es/locale/en_US.d.ts +361 -0
  327. package/es/locale/en_US.js +364 -0
  328. package/es/locale/index.d.ts +1 -723
  329. package/es/locale/index2.js +10 -0
  330. package/es/locale/zh_CN.d.ts +361 -0
  331. package/es/locale/zh_CN.js +364 -0
  332. package/lib/AlignBox/component.json +89 -0
  333. package/lib/AlignBox/index.css +1 -1
  334. package/lib/AlignBox/index.d.ts +6 -2
  335. package/lib/AlignBox/index.js +1 -1
  336. package/lib/AlignBox/style/index.css +1 -1
  337. package/lib/Anchor/anchorMenu/index.d.ts +2 -1
  338. package/lib/Anchor/anchorMenu/index.js +1 -1
  339. package/lib/Anchor/component.json +130 -0
  340. package/lib/Anchor/index.js +1 -1
  341. package/lib/Anchor/type.d.ts +8 -4
  342. package/lib/Argv/component.json +216 -0
  343. package/lib/Argv/index.d.ts +5 -6
  344. package/lib/AutoBox/component.json +133 -0
  345. package/lib/AutoBox/index.d.ts +3 -3
  346. package/lib/AutoBox/index.js +1 -1
  347. package/lib/AutoBox/protal.d.ts +2 -2
  348. package/lib/AutoBox/protal.js +1 -1
  349. package/lib/AutoButton/component.json +109 -0
  350. package/lib/AutoButton/index.js +1 -1
  351. package/lib/AutoTips/autoTipsMultiline/index.d.ts +1 -1
  352. package/lib/AutoTips/autoTipsMultiline/index.js +1 -1
  353. package/lib/AutoTips/component.json +121 -0
  354. package/lib/Badge/component.json +92 -0
  355. package/lib/Breadcrumbs/component.json +142 -0
  356. package/lib/Breadcrumbs/index.js +1 -1
  357. package/lib/Button/SplitButton.d.ts +2 -2
  358. package/lib/Button/component.json +168 -0
  359. package/lib/Button/index.js +1 -1
  360. package/lib/ButtonGroup/component.json +132 -0
  361. package/lib/ButtonGroup/index.d.ts +1 -1
  362. package/lib/Card/component.json +162 -0
  363. package/lib/Card/index.d.ts +2 -2
  364. package/lib/Card/index.js +1 -1
  365. package/lib/Carousel/component.json +142 -0
  366. package/lib/Carousel/index.d.ts +1 -1
  367. package/lib/Cascader/Cascader.js +1 -1
  368. package/lib/Cascader/component.json +196 -0
  369. package/lib/Cascader/hooks/useEntities.js +1 -1
  370. package/lib/Cascader/interface.d.ts +1 -0
  371. package/lib/Cascader/utils/commonUtil.d.ts +1 -1
  372. package/lib/Cascader/utils/commonUtil.js +1 -1
  373. package/lib/Cascader/utils/treeUtil.d.ts +14 -5
  374. package/lib/Cascader/utils/treeUtil.js +1 -1
  375. package/lib/Checkbox/component.json +138 -0
  376. package/lib/CheckboxGroup/component.json +152 -0
  377. package/lib/CodeEditor/component.json +189 -0
  378. package/lib/CodeEditor/index.d.ts +10 -9
  379. package/lib/Collapse/component.json +166 -0
  380. package/lib/Collapse/index.d.ts +1 -1
  381. package/lib/Collapse/index.js +1 -1
  382. package/lib/CollapseBox/component.json +84 -0
  383. package/lib/CollapseLayout/component.json +155 -0
  384. package/lib/ColorPicker/component.json +142 -0
  385. package/lib/ComboSelect/component.json +181 -0
  386. package/lib/ComboSelect/index.js +1 -1
  387. package/lib/ComboSelect/interface.d.ts +6 -3
  388. package/lib/ComboSelect/utils.d.ts +3 -3
  389. package/lib/ComboSelect/utils.js +1 -1
  390. package/lib/Container/component.json +111 -0
  391. package/lib/ContentBox/component.json +81 -0
  392. package/lib/CopyText/component.json +118 -0
  393. package/lib/CycleSelector/component.json +98 -0
  394. package/lib/CycleSelector/index.js +1 -1
  395. package/lib/DatePicker/component.json +192 -0
  396. package/lib/DatePicker/generatePicker/generateRangePicker.d.ts +0 -8
  397. package/lib/DatePicker/generatePicker/generateRangePicker.js +1 -1
  398. package/lib/DatePicker/generatePicker/generateSinglePicker.js +1 -1
  399. package/lib/DatePicker/generatePicker/index.d.ts +11 -4
  400. package/lib/Descriptions/component.json +142 -0
  401. package/lib/Descriptions/index.d.ts +1 -1
  402. package/lib/Desktop/component.json +171 -0
  403. package/lib/DragVerify/component.json +114 -0
  404. package/lib/DragVerify/index.js +1 -1
  405. package/lib/Drawer/component.json +200 -0
  406. package/lib/Drawer/index.js +1 -1
  407. package/lib/Drawer/interface.d.ts +1 -1
  408. package/lib/Drawer/util.d.ts +1 -6
  409. package/lib/Drawer/util.js +1 -1
  410. package/lib/Dropdown/component.json +147 -0
  411. package/lib/DynamicMultiBox/component.json +278 -0
  412. package/lib/DynamicMultiBox/formItem.d.ts +1 -1
  413. package/lib/DynamicMultiBox/rowForm.d.ts +2 -2
  414. package/lib/Empty/component.json +123 -0
  415. package/lib/Empty/index.css +1 -1
  416. package/lib/Empty/index.d.ts +2 -2
  417. package/lib/Empty/index.js +1 -1
  418. package/lib/Empty/style/index.css +1 -1
  419. package/lib/FieldForm/FieldFormItem/MemoInput.d.ts +2 -2
  420. package/lib/FieldForm/FieldFormItem/index.d.ts +6 -6
  421. package/lib/FieldForm/Form.d.ts +2 -2
  422. package/lib/FieldForm/FormList.d.ts +2 -2
  423. package/lib/FieldForm/component.json +196 -0
  424. package/lib/FieldForm/context.d.ts +5 -1
  425. package/lib/FieldForm/context.js +1 -1
  426. package/lib/FieldForm/hooks/useForm.d.ts +4 -3
  427. package/lib/FieldForm/hooks/useFormInstance.d.ts +1 -1
  428. package/lib/FieldForm/hooks/useFormItemStatus.d.ts +9 -5
  429. package/lib/FieldForm/hooks/useFormItemStatus.js +1 -1
  430. package/lib/FieldForm/hooks/useItemRef.d.ts +1 -1
  431. package/lib/FieldForm/hooks/useItemRef.js +1 -1
  432. package/lib/Form/component.json +161 -0
  433. package/lib/Form/index.d.ts +52 -49
  434. package/lib/FormItem/compoments/defaultCompoments/index.d.ts +5 -5
  435. package/lib/FormItem/compoments/defaultCompoments/index.js +1 -1
  436. package/lib/FormItem/compoments/formCheckboxGroup/index.d.ts +2 -2
  437. package/lib/FormItem/compoments/formFile/index.js +1 -1
  438. package/lib/FormItem/compoments/formRadioGroup/index.d.ts +1 -1
  439. package/lib/FormItem/compoments/formSelect/index.d.ts +1 -1
  440. package/lib/FormItem/component.json +171 -0
  441. package/lib/FormItem/index.d.ts +5 -5
  442. package/lib/FormItem/index.js +1 -1
  443. package/lib/FormItem/itemType.js +1 -1
  444. package/lib/FunctionModal/component.json +197 -0
  445. package/lib/FunctionModal/dialog.d.ts +1 -1
  446. package/lib/FunctionModal/modalContext.d.ts +4 -1
  447. package/lib/Help/component.json +118 -0
  448. package/lib/HelperText/component.json +126 -0
  449. package/lib/Image/component.json +165 -0
  450. package/lib/InputCode/component.json +191 -0
  451. package/lib/InputCode/index.d.ts +2 -2
  452. package/lib/InputLang/component.json +205 -0
  453. package/lib/InputLang/index.js +1 -1
  454. package/lib/InputNumber/component.json +162 -0
  455. package/lib/Label/component.json +126 -0
  456. package/lib/Label/index.d.ts +2 -2
  457. package/lib/Loading/component.json +91 -0
  458. package/lib/Menu/component.json +180 -0
  459. package/lib/Message/component.json +246 -0
  460. package/lib/Message/index.d.ts +2 -2
  461. package/lib/Message/index.js +1 -1
  462. package/lib/Modal/Confirm/index.d.ts +1 -1
  463. package/lib/Modal/Confirm/index.js +1 -1
  464. package/lib/Modal/component.json +277 -0
  465. package/lib/Modal/index.d.ts +97 -6
  466. package/lib/Modal/index.js +1 -1
  467. package/lib/Modal/interface.d.ts +1 -0
  468. package/lib/MultiBox/component.json +216 -0
  469. package/lib/MultiBox/index.js +1 -1
  470. package/lib/Notification/component.json +184 -0
  471. package/lib/OperateBtn/component.json +134 -0
  472. package/lib/OperateBtn/index.d.ts +3 -3
  473. package/lib/PageHeader/component.json +112 -0
  474. package/lib/Pagination/component.json +181 -0
  475. package/lib/Pagination/index.js +1 -1
  476. package/lib/PasswordRules/component.json +105 -0
  477. package/lib/PasswordRules/index.d.ts +4 -4
  478. package/lib/PopConfirm/component.json +227 -0
  479. package/lib/PopConfirm/index.d.ts +1 -1
  480. package/lib/PopConfirm/index.js +1 -1
  481. package/lib/PopMenu/component.json +131 -0
  482. package/lib/PopMenu/hooks.d.ts +1 -1
  483. package/lib/PopMenu/index.js +1 -1
  484. package/lib/Popover/component.json +165 -0
  485. package/lib/Popover/index.js +1 -1
  486. package/lib/Progress/component.json +161 -0
  487. package/lib/Prompt/component.json +144 -0
  488. package/lib/Querying/component.json +96 -0
  489. package/lib/Querying/index.css +1 -1
  490. package/lib/Querying/index.d.ts +2 -2
  491. package/lib/Querying/index.js +1 -1
  492. package/lib/Querying/style/index.css +1 -1
  493. package/lib/QuickReply/component.json +129 -0
  494. package/lib/QuickReply/index.d.ts +1 -1
  495. package/lib/Radio/component.json +136 -0
  496. package/lib/RadioGroup/component.json +149 -0
  497. package/lib/RangeInput/component.json +198 -0
  498. package/lib/RangeInput/index.js +1 -1
  499. package/lib/Result/component.json +104 -0
  500. package/lib/ScrollBar/component.json +115 -0
  501. package/lib/Search/component.json +177 -0
  502. package/lib/Search/index.d.ts +1 -1
  503. package/lib/Select/component.json +244 -0
  504. package/lib/Select/index.js +1 -1
  505. package/lib/SelectInput/component.json +184 -0
  506. package/lib/Selector/component.json +203 -0
  507. package/lib/Selector/index.js +1 -1
  508. package/lib/Selector/interface.d.ts +1 -1
  509. package/lib/Selector/selectorMain/index.js +1 -1
  510. package/lib/Selector/selectorNode/index.js +1 -1
  511. package/lib/Selector/util.d.ts +2 -2
  512. package/lib/SelectorPicker/component.json +179 -0
  513. package/lib/SelectorPicker/index.d.ts +5 -5
  514. package/lib/SelectorPicker/index.js +1 -1
  515. package/lib/SingleBox/component.json +151 -0
  516. package/lib/SingleBox/index.d.ts +2 -2
  517. package/lib/Slider/component.json +181 -0
  518. package/lib/SortBox/component.json +108 -0
  519. package/lib/Status/component.json +104 -0
  520. package/lib/Stepper/component.json +129 -0
  521. package/lib/Stepper/index.d.ts +2 -2
  522. package/lib/Switch/component.json +207 -0
  523. package/lib/Switch/index.css +1 -1
  524. package/lib/Switch/index.d.ts +3 -2
  525. package/lib/Switch/index.js +1 -1
  526. package/lib/Switch/style/index.css +1 -1
  527. package/lib/Table/component.json +547 -0
  528. package/lib/Table/index.d.ts +2 -2
  529. package/lib/Table/index.js +1 -1
  530. package/lib/Table/interface.d.ts +6 -0
  531. package/lib/Tabs/component.json +227 -0
  532. package/lib/Tag/component.json +221 -0
  533. package/lib/Tag/index.css +1 -1
  534. package/lib/Tag/index.d.ts +1 -1
  535. package/lib/Tag/index.js +1 -1
  536. package/lib/Tag/style/index.css +1 -1
  537. package/lib/TextEditor/component.json +186 -0
  538. package/lib/TextEditor/index.d.ts +5 -5
  539. package/lib/TextField/component.json +290 -0
  540. package/lib/TextField/index.d.ts +2 -2
  541. package/lib/TimePicker/component.json +176 -0
  542. package/lib/Timeline/component.json +110 -0
  543. package/lib/Title/component.json +156 -0
  544. package/lib/ToggleButton/component.json +153 -0
  545. package/lib/Tooltip/component.json +176 -0
  546. package/lib/Tooltip/index.js +1 -1
  547. package/lib/Tooltip/interface.d.ts +14 -1
  548. package/lib/Tooltip/utils.js +1 -1
  549. package/lib/Transfer/component.json +157 -0
  550. package/lib/Tree/component.json +512 -0
  551. package/lib/Upload/component.json +450 -0
  552. package/lib/Utils/type.d.ts +0 -2
  553. package/lib/index.d.ts +2 -0
  554. package/lib/index.js +1 -1
  555. package/lib/locale/en_US.d.ts +361 -0
  556. package/lib/locale/en_US.js +2 -0
  557. package/lib/locale/index.d.ts +1 -723
  558. package/lib/locale/index2.js +2 -0
  559. package/lib/locale/zh_CN.d.ts +361 -0
  560. package/lib/locale/zh_CN.js +2 -0
  561. package/package.json +10 -3
  562. /package/es/{Utils/Hooks → Hooks}/useResizeObserver.d.ts +0 -0
  563. /package/es/{Utils/Hooks → Hooks}/useResizeObserver.js +0 -0
  564. /package/lib/{Utils/Hooks → Hooks}/useResizeObserver.d.ts +0 -0
  565. /package/lib/{Utils/Hooks → Hooks}/useResizeObserver.js +0 -0
@@ -18,7 +18,7 @@ export type { TableProps, TreeProps };
18
18
  export type SelectOpt = {
19
19
  disabled?: boolean;
20
20
  closable?: boolean;
21
- [key: string]: any;
21
+ [key: string]: unknown;
22
22
  };
23
23
  export type SelectedOptions = Array<SelectOpt>;
24
24
  export type { TreeNodeProps };
@@ -30,7 +30,10 @@ export interface ComboSelectProps extends HelperTextDetailProps {
30
30
  /**search 占位符*/
31
31
  searchPlaceholder?: string;
32
32
  /**最大显示数*/
33
- /** @deprecated This attribute has been deprecated */
33
+ /**
34
+ * @deprecated v5.x dead field — 该字段历史遗留,代码内仅解构未引用,runtime 完全不生效。v5.0.0-beta.14 起 dev 模式抛 warn,v6.0 移除字段。
35
+ * 迁移:从 props 中移除 maxCount;tag 换行行为请用 `overLine` 控制。
36
+ */
34
37
  maxCount?: number;
35
38
  /** 超出换行 */
36
39
  overLine?: boolean;
@@ -107,7 +110,7 @@ export interface ComboSelectProps extends HelperTextDetailProps {
107
110
  realTimeSearch?: boolean;
108
111
  /**参数处理回调*/
109
112
  paramsCallback?: (params: {
110
- [name: string]: any;
113
+ [name: string]: unknown;
111
114
  }) => any;
112
115
  /**路径字段*/
113
116
  fullPathKey?: string;
@@ -1,8 +1,8 @@
1
- export declare const getReplaceField: (mode: string, repl: Record<string, unknown>, tableP?: Record<string, any>, treeP?: Record<string, any>) => any;
1
+ export declare const getReplaceField: (mode: string, repl: Record<string, unknown>, tableP?: Record<string, unknown>, treeP?: Record<string, unknown>) => Record<string, unknown>;
2
2
  export declare const toArray: (list: unknown) => unknown[];
3
3
  export declare const isRemoteLoad: (mode: string, props?: {
4
- data?: any;
5
- treeData?: any;
4
+ data?: unknown;
5
+ treeData?: unknown;
6
6
  }) => boolean;
7
7
  export declare const getOverlaySize: (mode: string, isRemoteLoad?: boolean, maxHeight?: number, height?: number) => {
8
8
  height: string;
@@ -1,6 +1,6 @@
1
1
  const f = (t, r, e, n) => {
2
2
  let l = {};
3
- return t === "tree" ? l = n?.replaceFields : l = e?.replaceFields, { ...r, ...l };
3
+ return t === "tree" ? l = n?.replaceFields ?? {} : l = e?.replaceFields ?? {}, { ...r, ...l };
4
4
  }, y = (t) => t ? Array.isArray(t) ? t : JSON.stringify(t) === "{}" ? [] : [t] : [], h = (t, r) => t === "table" ? !(r && Array.isArray(r.data)) : !(r && Array.isArray(r.treeData)), g = (t, r = !1, e, n) => {
5
5
  const s = `${e || 254}px`, i = `${e || 232}px`, a = `${e || 338}px`, o = `${e || 304}px`, u = document.documentElement.clientHeight, c = n !== void 0 ? "height" : "maxHeight";
6
6
  return t === "tree" ? u <= 720 ? r ? { height: s } : { [c]: s } : r ? { height: a } : { [c]: a } : t === "list" ? u <= 720 ? r ? { [c]: i } : { [c]: i } : r ? { [c]: o } : { [c]: o } : { height: `${e ?? n ?? 380}px` };
@@ -0,0 +1,111 @@
1
+ {
2
+ "name": "Container",
3
+ "category": "Layout",
4
+ "description": "容器布局,支持上下左右四区域布局",
5
+ "semantic": {
6
+ "intent": [
7
+ "页面布局",
8
+ "分区容器"
9
+ ],
10
+ "useCases": [
11
+ "经典布局",
12
+ "管理后台",
13
+ "工作台"
14
+ ],
15
+ "riskLevel": "low"
16
+ },
17
+ "variants": {
18
+ "tlr": {
19
+ "meaning": "上左右布局"
20
+ },
21
+ "tlrb": {
22
+ "meaning": "上左右下布局"
23
+ },
24
+ "ltrb": {
25
+ "meaning": "左上右下布局"
26
+ },
27
+ "trb": {
28
+ "meaning": "上右下布局"
29
+ }
30
+ },
31
+ "states": [
32
+ "default"
33
+ ],
34
+ "idealProps": {
35
+ "type": {
36
+ "type": "enum",
37
+ "values": [
38
+ "tlrb",
39
+ "ltrb",
40
+ "trb",
41
+ "tlr"
42
+ ],
43
+ "default": "tlr",
44
+ "description": "布局类型;tlr=上左右、tlrb=上左右下、ltrb=左+上右下(左侧贯通顶部到底部)、trb=上右下(无左侧)"
45
+ },
46
+ "top": {
47
+ "type": "JSX.Element",
48
+ "description": "顶部容器内容;不传则顶部区域高度自动收缩为 0(src/Container/index.tsx:100 `height: top ? '50px' : '0'`)。注:类型是 JSX.Element 而非 ReactNode,传 string / null / number 会被 TS2322 阻断,需用 <div>{node}</div> 包裹"
49
+ },
50
+ "topStyle": {
51
+ "type": "React.CSSProperties",
52
+ "description": "顶部容器样式(背景色/高度等)"
53
+ },
54
+ "left": {
55
+ "type": "JSX.Element",
56
+ "description": "左侧容器内容;不传则左侧区域宽度自动收缩为 0。类型同 top"
57
+ },
58
+ "leftStyle": {
59
+ "type": "React.CSSProperties",
60
+ "description": "左侧容器样式(背景色/宽度等)"
61
+ },
62
+ "right": {
63
+ "type": "JSX.Element",
64
+ "description": "右侧/主体容器内容(在所有 type 下都是主显示区);类型同 top"
65
+ },
66
+ "rightStyle": {
67
+ "type": "React.CSSProperties",
68
+ "description": "右侧/主体容器样式"
69
+ },
70
+ "bottom": {
71
+ "type": "JSX.Element",
72
+ "description": "底部容器内容;不传则底部区域高度自动收缩为 0。类型同 top"
73
+ },
74
+ "bottomStyle": {
75
+ "type": "React.CSSProperties",
76
+ "description": "底部容器样式(背景色/高度等)"
77
+ }
78
+ },
79
+ "do": [
80
+ "用于快速搭建经典管理后台布局(tlr=顶部导航+左侧菜单+主区域,tlrb=四区域,trb=无侧边栏)",
81
+ "配合 CollapseLayout 实现可折叠侧边栏:leftStyle={{ width: 200 }} + 内嵌 CollapseLayout",
82
+ "顶部/左侧/底部区域的高宽默认值(如 top 默认 50px)可通过 topStyle/leftStyle 等覆盖"
83
+ ],
84
+ "dont": [
85
+ "嵌套过深的 Container(布局嵌套超过 2 层时改用 Flex/Grid 自实现,Container 本身不支持响应式断点)",
86
+ "复杂自适应布局硬用 Container——Container 是固定区域布局,响应式场景改用 Grid/Flex",
87
+ "把 string / null / number 直接传给 top/left/right/bottom——类型是 JSX.Element,需 <div> 包裹"
88
+ ],
89
+ "events": {},
90
+ "typescriptPitfalls": [
91
+ {
92
+ "issue": "top/left/right/bottom 的类型是 JSX.Element,不接受 string 或 ReactNode",
93
+ "wrong": "top={'首页标题'} // TS 报错:string 不是 JSX.Element",
94
+ "right": "top={<div>首页标题</div>} // 必须是 JSX 元素"
95
+ },
96
+ {
97
+ "issue": "type='trb' 时没有 left 区域,传 left/leftStyle 无效",
98
+ "wrong": "<Container type='trb' left={<Sidebar />} /> // trb 布局无 left 区域,Sidebar 不渲染",
99
+ "right": "<Container type='tlr' left={<Sidebar />} right={<Main />} /> // 需要侧边栏用 tlr/tlrb/ltrb"
100
+ },
101
+ {
102
+ "issue": "topStyle/leftStyle 等 Style prop 覆盖默认尺寸,需显式传 width/height",
103
+ "wrong": "leftStyle={{ background: '#f0f0f0' }} // 背景色覆盖但宽度未设置,左侧宽度可能不符合预期",
104
+ "right": "leftStyle={{ background: '#f0f0f0', width: 200 }} // 显式指定宽度"
105
+ }
106
+ ],
107
+ "mapping": {
108
+ "realComponent": "Container",
109
+ "adapter": null
110
+ }
111
+ }
@@ -0,0 +1,81 @@
1
+ {
2
+ "name": "ContentBox",
3
+ "category": "Layout",
4
+ "description": "内容容器,支持 Loading 和 Empty 状态",
5
+ "semantic": {
6
+ "intent": [
7
+ "状态容器",
8
+ "内容包装"
9
+ ],
10
+ "useCases": [
11
+ "数据列表",
12
+ "详情页",
13
+ "异步内容"
14
+ ],
15
+ "riskLevel": "low"
16
+ },
17
+ "variants": {
18
+ "default": {
19
+ "meaning": "默认样式"
20
+ }
21
+ },
22
+ "states": [
23
+ "loading",
24
+ "empty",
25
+ "default"
26
+ ],
27
+ "idealProps": {
28
+ "loading": {
29
+ "type": "boolean",
30
+ "description": "是否正在加载"
31
+ },
32
+ "empty": {
33
+ "type": "boolean",
34
+ "description": "是否为空"
35
+ },
36
+ "scroll": {
37
+ "type": "boolean",
38
+ "description": "是否支持滚动"
39
+ },
40
+ "loadingOverlay": {
41
+ "type": "boolean",
42
+ "description": "loading 是否覆盖内容"
43
+ },
44
+ "children": {
45
+ "type": "ReactNode",
46
+ "description": "子组件"
47
+ }
48
+ },
49
+ "do": [
50
+ "统一处理异步数据的三种状态(loading/empty/正常内容)——避免在每个页面重复写 if-else 状态判断",
51
+ "loadingOverlay=true(默认)时 loading 覆盖在内容之上;loadingOverlay=false 时隐藏内容只显示 Loading——根据业务场景选择",
52
+ "需要自定义 Loading/Empty 样式:传 loadingComponent 或 emptyComponent 覆盖默认组件"
53
+ ],
54
+ "dont": [
55
+ "在简单静态内容中使用 ContentBox——无异步状态的场景无需 ContentBox,直接渲染内容性能更好",
56
+ "empty=true 时仍期望 children 渲染——empty 状态下 children 被 Empty 组件替换(src/ContentBox/index.tsx:78-86 实证)",
57
+ "loading 和 empty 同时为 true——src 优先处理 loading,empty 判断有 !loading 前置条件,两者同时为 true 时只显示 Loading"
58
+ ],
59
+ "events": {},
60
+ "typescriptPitfalls": [
61
+ {
62
+ "issue": "emptyProps 只对默认 Empty 组件生效,传了 emptyComponent 后 emptyProps 被忽略",
63
+ "wrong": "// emptyComponent 和 emptyProps 同时传,期望 emptyProps 能影响自定义 emptyComponent\n<ContentBox empty emptyComponent={<MyEmpty />} emptyProps={{ description: '暂无数据' }} />",
64
+ "right": "// 自定义组件时 emptyProps 无效,直接在 emptyComponent 内传 props\n<ContentBox empty emptyComponent={<MyEmpty description='暂无数据' />} />"
65
+ },
66
+ {
67
+ "issue": "loadingComponent 不接受 null/undefined,传 null 时 tsc 报类型错误",
68
+ "wrong": "loadingComponent={null} // ReactNode 可以是 null,但 ContentBox 内部 if(loadingComponent) 判断",
69
+ "right": "// 不传 loadingComponent 或传自定义 JSX 元素(不传时使用默认 Loading 组件)"
70
+ },
71
+ {
72
+ "issue": "ContentBox 使用 forwardRef,ref 类型是 HTMLDivElement",
73
+ "wrong": "const ref = useRef<HTMLElement>(null); <ContentBox ref={ref} /> // 类型不匹配",
74
+ "right": "const ref = useRef<HTMLDivElement>(null); <ContentBox ref={ref} />"
75
+ }
76
+ ],
77
+ "mapping": {
78
+ "realComponent": "ContentBox",
79
+ "adapter": null
80
+ }
81
+ }
@@ -0,0 +1,118 @@
1
+ {
2
+ "name": "CopyText",
3
+ "category": "Data Display",
4
+ "description": "复制文本,点击图标复制内容",
5
+ "semantic": {
6
+ "intent": [
7
+ "一键复制",
8
+ "信息展示"
9
+ ],
10
+ "useCases": [
11
+ "密钥展示",
12
+ "链接分享",
13
+ "代码片段"
14
+ ],
15
+ "riskLevel": "low"
16
+ },
17
+ "variants": {
18
+ "input": {
19
+ "meaning": "输入框模式"
20
+ },
21
+ "text": {
22
+ "meaning": "纯文本模式"
23
+ }
24
+ },
25
+ "states": [
26
+ "default",
27
+ "copied"
28
+ ],
29
+ "idealProps": {
30
+ "type": {
31
+ "type": "enum",
32
+ "values": [
33
+ "input",
34
+ "text"
35
+ ],
36
+ "default": "text",
37
+ "description": "类型('text' 纯文本展示 + 复制图标 / 'input' 输入框模式 + 复制图标 — 配合 textFieldProps 透传 TextField 配置)"
38
+ },
39
+ "value": {
40
+ "type": "ReactNode",
41
+ "description": "显示值;text 模式既是显示内容又是复制源(.toString() 兜底);input 模式必须 string(api.ts 类型 ReactNode 但 src:57 .toString() 兜底);**复制源优先级**:copyValue > valueCom(input 模式用户键入值) > value?.toString()"
42
+ },
43
+ "copyValue": {
44
+ "type": "string",
45
+ "description": "**显式指定写入剪贴板的内容,优先级最高**;适合'显示 ABC 但复制 ABC-with-prefix'或'显示掩码但复制真值'场景;不传则用 value/valueCom 兜底"
46
+ },
47
+ "textFieldProps": {
48
+ "type": "Omit<TextFieldProps, 'label'>",
49
+ "description": "**仅 type='input' 模式生效**;透传给内部 TextField — 可设 placeholder / readOnly / 自定义 onChange 等;text 模式下此 prop 被忽略"
50
+ },
51
+ "label": {
52
+ "type": "ReactNode",
53
+ "description": "组件标题(显示在 value 前)"
54
+ },
55
+ "copyIcon": {
56
+ "type": "ReactNode",
57
+ "description": "复制图标(默认 @para-ui/icons/Copy);复制成功后短暂切换为 CheckS,timeout 后切回"
58
+ },
59
+ "timeout": {
60
+ "type": "number",
61
+ "default": "800",
62
+ "description": "复制成功后图标切回原图的延时(ms);**仅控制状态指示视觉,不影响实际复制行为**(execCommand 已同步完成)"
63
+ },
64
+ "onCopy": {
65
+ "type": "function",
66
+ "description": "**复制前 hook**(点击时立即触发,await 后再 execCommand — src/CopyText/index.tsx:64-72);**不是复制成功回调**;**返回值语义**:返回 string 覆盖默认复制值,返回 undefined/void 用默认值;**组件已自动写剪贴板,不要在此调 navigator.clipboard.writeText**(会重复)"
67
+ }
68
+ },
69
+ "do": [
70
+ "在需要用户复制内容的场景使用——密钥/Token 展示、链接分享、代码片段等",
71
+ "提供复制成功反馈(copyIcon 切换为 CheckS,timeout 毫秒后切回)",
72
+ "显示内容与复制内容不同时(如掩码显示、真值复制):传 copyValue 指定真实复制内容",
73
+ "input 模式下用户可编辑内容并复制:type='input' + textFieldProps 配置输入框属性"
74
+ ],
75
+ "dont": [
76
+ "复制敏感信息(密码/私钥)时不做视觉遮罩——显示 value 但复制内容不同时用 copyValue 隔离",
77
+ "在 onCopy 内调 navigator.clipboard.writeText——组件已自动 execCommand 写剪贴板,会重复写入",
78
+ "把 onCopy 当作复制成功后的回调——onCopy 是复制前 hook(在 execCommand 前 await),若需成功后 toast 在 onCopy 返回前自行触发",
79
+ "text 模式下传 textFieldProps 期待 placeholder 生效——textFieldProps 仅 type='input' 模式有效"
80
+ ],
81
+ "events": {
82
+ "onCopy": {
83
+ "signature": "() => Promise<string | void> | string | void",
84
+ "asyncSupported": true,
85
+ "examples": [
86
+ "动态获取复制值:onCopy={async () => { const token = await fetchToken(); return token; }}(返回 string 覆盖默认复制值)",
87
+ "仅做副作用(不改变复制值):onCopy={() => { analytics.track('copy'); }}(返回 void 时用默认 value)",
88
+ "显示成功 toast:onCopy={async () => { const val = await getVal(); message.success('已复制'); return val; }}"
89
+ ],
90
+ "commonMistakes": [
91
+ "把 onCopy 当复制成功回调——onCopy 在 execCommand 之前触发(复制前 hook),不是复制成功后",
92
+ "在 onCopy 内调 navigator.clipboard.writeText——组件已自动写剪贴板(execCommand),调用后会重复写入",
93
+ "onCopy 返回 undefined 以为会阻止复制——返回 undefined 时组件用默认 value 复制,无法阻止复制行为"
94
+ ]
95
+ }
96
+ },
97
+ "typescriptPitfalls": [
98
+ {
99
+ "issue": "type='input' 时 value 必须是 string 类型(src 内部 .toString() 兜底但 TS 类型声明为 ReactNode)",
100
+ "wrong": "type='input' value={<span>复杂内容</span>} // input 模式内部 setValueCom(value?.toString()) 导致 [object Object]",
101
+ "right": "type='input' value='plain string' // input 模式只传 string"
102
+ },
103
+ {
104
+ "issue": "textFieldProps 类型是 Omit<TextFieldProps, 'label'>,label 已被剔除,不能在此传 label",
105
+ "wrong": "textFieldProps={{ label: '字段名', placeholder: '请输入' }} // TS 报错:label 已被 Omit 剔除",
106
+ "right": "// label 通过 CopyText.label prop 传,textFieldProps 只传 TextField 其他属性\n<CopyText label='字段名' textFieldProps={{ placeholder: '请输入' }} />"
107
+ },
108
+ {
109
+ "issue": "copyValue 优先级最高,传了 copyValue 后 value 仅用于显示,不参与复制",
110
+ "wrong": "// 期望 copyValue 只在某些情况覆盖,平时还用 value:\n<CopyText value={displayText} copyValue={undefined} /> // copyValue=undefined 时自动 fallback 到 value,OK",
111
+ "right": "// 需要按条件切换:\ncopyValue={shouldOverride ? realValue : undefined} // undefined 时组件用 value,string 时用 copyValue"
112
+ }
113
+ ],
114
+ "mapping": {
115
+ "realComponent": "CopyText",
116
+ "adapter": null
117
+ }
118
+ }
@@ -0,0 +1,98 @@
1
+ {
2
+ "name": "CycleSelector",
3
+ "category": "Data Entry",
4
+ "description": "周期选择器,用于选择周期性时间",
5
+ "semantic": {
6
+ "intent": [
7
+ "周期选择",
8
+ "定时任务"
9
+ ],
10
+ "useCases": [
11
+ "定时任务",
12
+ "数据备份",
13
+ "报表生成"
14
+ ],
15
+ "riskLevel": "normal"
16
+ },
17
+ "variants": {
18
+ "default": {
19
+ "meaning": "默认样式"
20
+ }
21
+ },
22
+ "states": [
23
+ "default",
24
+ "disabled",
25
+ "error"
26
+ ],
27
+ "idealProps": {
28
+ "value": {
29
+ "type": "CycleSelectorValueProps",
30
+ "description": "周期配置对象 · cron-like 调度(不是简单 cycle 切换器 · 不要传 string 如 'month')。**完整 9 字段**:`startTime`(开始时间 · string | number)· `cycleType`(周期类型 number · 0=不重复 / 1=每天 / 2=每周 / 3=每月 / 4=每年 / 5=自定义)· `frequency`(周期频率 number)· `frequencyUnit`(频率单位 string · 'day' / 'week' / 'month' / 'year')· `monthCycleType`(月维度 string · 'day' / 'week' · 仅 cycleType=3 时)· `executionDay`(执行周几列表 string · '0,1,2,3,4,5,6' 逗号分隔 · 0=周日)· `endType`(结束方式 number · 0=无限重复 / 1=截至时间 / 2=限定次数)· `limitNum`(限定次数 number · endType=2 时)· `endTime`(结束日期 string | number · endType=1 时)。**示例** 每周三五重复:`{ startTime: '2026-05-15 09:00', cycleType: 2, frequency: 1, frequencyUnit: 'week', executionDay: '3,5', endType: 0 }`。完整 interface 见 `dist/es/CycleSelector/index.d.ts`(发布产物)"
31
+ },
32
+ "onChange": {
33
+ "type": "function",
34
+ "signature": "(val: CycleSelectorValueProps) => void",
35
+ "description": "值变化回调 · 接收完整 CycleSelectorValueProps 对象"
36
+ },
37
+ "timeType": {
38
+ "type": "enum",
39
+ "values": [
40
+ "undefined",
41
+ "zone",
42
+ "stamp"
43
+ ],
44
+ "default": "undefined",
45
+ "description": "时间格式:undefined=YYYY-MM-DD HH:mm:ss · zone=YYYY-MM-DD[T]HH:mm:ss[Z] · stamp=时间戳"
46
+ },
47
+ "disabled": {
48
+ "type": "boolean",
49
+ "description": "是否禁用"
50
+ }
51
+ },
52
+ "do": [
53
+ "用于 Cron 表达式或周期性任务配置场景——startTime 是触发时间,cycleType 决定重复方式",
54
+ "提供直观的周期选择界面(日/周/月/年/自定义),onChange 返回完整 CycleSelectorValueProps 对象",
55
+ "通过 cRef.current.getTipText() 获取周期摘要文本(用于展示当前配置的自然语言描述)"
56
+ ],
57
+ "dont": [
58
+ "在简单日期选择中使用——单纯时间选择用 DatePicker,CycleSelector 专用于周期性重复场景",
59
+ "忽略时区处理——默认出参格式为 'YYYY-MM-DD HH:mm:ss';需要 ISO 时区格式传 timeType='zone',需要时间戳传 timeType='stamp'"
60
+ ],
61
+ "events": {
62
+ "onChange": {
63
+ "signature": "(val: CycleSelectorValueProps) => void",
64
+ "asyncSupported": false,
65
+ "examples": [
66
+ "基本用法:<CycleSelector value={cycleValue} onChange={(val) => setCycleValue(val)} />",
67
+ "onChange 返回完整 CycleSelectorValueProps 对象,字段按 cycleType 不同动态增减(非自定义时删除 frequency/frequencyUnit 等字段)",
68
+ "cycleType=0(不重复)时 val 只含 startTime + cycleType,其余字段被删除"
69
+ ],
70
+ "commonMistakes": [
71
+ "假设 onChange 每次都返回完整的 9 个字段——实际按 cycleType 动态清除无关字段(如 cycleType=0 时删除 frequency 等)",
72
+ "在 onChange 外部直接修改 val 对象后回传——CycleSelectorValueProps 是内部 state 引用,应拷贝后修改:{ ...val, extraField: value }",
73
+ "value 传 null/undefined——value 是必填 prop(src/CycleSelector/index.tsx:60 无问号),传空会导致运行时错误"
74
+ ]
75
+ }
76
+ },
77
+ "typescriptPitfalls": [
78
+ {
79
+ "issue": "value prop 是必填(无问号),不能传 null/undefined",
80
+ "wrong": "const [cycle, setCycle] = useState<CycleSelectorValueProps | null>(null);\n<CycleSelector value={cycle} /> // null 导致运行时错误",
81
+ "right": "const [cycle, setCycle] = useState<CycleSelectorValueProps>({});\n<CycleSelector value={cycle} onChange={setCycle} />"
82
+ },
83
+ {
84
+ "issue": "onChange 是必填(无问号),不传会导致 TS 类型错误",
85
+ "wrong": "<CycleSelector value={cycleValue} /> // 缺少 onChange,TS 报错",
86
+ "right": "<CycleSelector value={cycleValue} onChange={(val) => setCycleValue(val)} />"
87
+ },
88
+ {
89
+ "issue": "cRef 需要 useRef<CycleSelectorRefProps> 类型,直接 useRef() 推断为 unknown",
90
+ "wrong": "const cRef = useRef(null); cRef.current.getTipText(); // current 可能为 null",
91
+ "right": "import { CycleSelectorRefProps } from '@para-ui/core';\nconst cRef = useRef<CycleSelectorRefProps>({} as CycleSelectorRefProps);\n<CycleSelector cRef={cRef} ... />"
92
+ }
93
+ ],
94
+ "mapping": {
95
+ "realComponent": "CycleSelector",
96
+ "adapter": null
97
+ }
98
+ }
@@ -29,7 +29,7 @@ const rt = (B) => {
29
29
  disabledTime: S,
30
30
  timeType: E,
31
31
  tipRender: U,
32
- showPopover: f,
32
+ showPopover: v,
33
33
  cRef: G,
34
34
  onChange: J,
35
35
  disabledCustom: L = !1
@@ -85,8 +85,8 @@ const rt = (B) => {
85
85
  const e = p ? { ...p } : {};
86
86
  e.startTime || (e.cycleType = 0), e.startTime && (e.startTime = b(e.startTime, "YYYY-MM-DD HH:mm")), e.endTime && (e.endTime = b(e.endTime, "YYYY-MM-DD")), u(e), t.current.valueCom = e, ce();
87
87
  }, [p, R, L]), $(() => {
88
- f !== void 0 && f && g();
89
- }, [f]), we(G, () => ({
88
+ v !== void 0 && v && g();
89
+ }, [v]), we(G, () => ({
90
90
  getTipText: (e) => O(e, !0)
91
91
  }));
92
92
  const F = (e) => e ? E === "zone" ? new Date(e).toISOString() : E === "stamp" ? new Date(e).getTime() : e : "", b = (e, l) => e ? q(e).format(l) : "", ce = () => {
@@ -127,7 +127,7 @@ const rt = (B) => {
127
127
  value: 5
128
128
  }
129
129
  ];
130
- L && (o = o.filter((v) => v.value !== 5)), H(o), ae([
130
+ L && (o = o.filter((f) => f.value !== 5)), H(o), ae([
131
131
  {
132
132
  label: n(`day${l}`),
133
133
  value: "day"
@@ -173,11 +173,11 @@ const rt = (B) => {
173
173
  if (U) return U();
174
174
  if (i.frequencyUnit === "week") {
175
175
  const o = [];
176
- let v;
176
+ let f;
177
177
  i.executionDay?.split(",").forEach((be) => {
178
178
  let j = Number(be) - 1;
179
- j === 0 ? (j = 7, v = n(`week${j}`)) : o.push(n(`week${j}`));
180
- }), v && o.push(v), c.push(
179
+ j === 0 ? (j = 7, f = n(`week${j}`)) : o.push(n(`week${j}`));
180
+ }), f && o.push(f), c.push(
181
181
  n("text1", {
182
182
  every: s + o.join("、"),
183
183
  time: m
@@ -223,12 +223,13 @@ const rt = (B) => {
223
223
  }, ye = (e, l) => {
224
224
  a.endTime = l, u({ ...a });
225
225
  }, pe = (e) => {
226
- e.target.value !== "" && parseInt(e.target.value.toString()), a.limitNum = e.target.value, u({ ...a });
227
- }, fe = (e) => {
226
+ const l = e.target.value !== "" ? parseInt(e.target.value.toString()) : 0;
227
+ a.limitNum = l, u({ ...a });
228
+ }, ve = (e) => {
228
229
  (e.target.value !== "" ? parseInt(e.target.value.toString()) : 0) <= 0 && (a.limitNum = 1, u({ ...a }));
229
230
  }, x = (e) => (l) => {
230
231
  a[e] = l, u({ ...a });
231
- }, k = (e) => (e += 1, e === 8 && (e = 1), e), ve = (e) => () => {
232
+ }, k = (e) => (e += 1, e === 8 && (e = 1), e), fe = (e) => () => {
232
233
  if (t.current.timeDetail?.weekDay === e) {
233
234
  V(!0), clearTimeout(t.current.timerTip), t.current.timerTip = setTimeout(() => {
234
235
  V(!1);
@@ -283,7 +284,7 @@ const rt = (B) => {
283
284
  "div",
284
285
  {
285
286
  className: m ? "select-item" : "",
286
- onClick: ve(l + 1),
287
+ onClick: fe(l + 1),
287
288
  children: n(i[l + 1])
288
289
  },
289
290
  l
@@ -340,7 +341,7 @@ const rt = (B) => {
340
341
  placeholder: n("placeholder"),
341
342
  value: a.limitNum,
342
343
  onChange: pe,
343
- onBlur: fe,
344
+ onBlur: ve,
344
345
  rightIcon: n("next")
345
346
  }
346
347
  )
@@ -370,7 +371,7 @@ const rt = (B) => {
370
371
  ] })
371
372
  ] }), je = () => M || ((e) => e && e < q((/* @__PURE__ */ new Date()).getTime() - 1440 * 60 * 1e3)), De = () => {
372
373
  if (S) return S;
373
- }, Ne = () => f !== void 0 ? f : Q;
374
+ }, Ne = () => v !== void 0 ? v : Q;
374
375
  return /* @__PURE__ */ r.jsxs(
375
376
  "div",
376
377
  {