@ioca/react 1.4.80 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (821) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +31 -31
  3. package/lib/cjs/components/affix/affix.js +68 -63
  4. package/lib/cjs/components/affix/affix.js.map +1 -1
  5. package/lib/cjs/components/affix/index.js +9 -5
  6. package/lib/cjs/components/affix/index.js.map +1 -1
  7. package/lib/cjs/components/affix/totop.js +18 -22
  8. package/lib/cjs/components/affix/totop.js.map +1 -1
  9. package/lib/cjs/components/badge/badge.js +18 -21
  10. package/lib/cjs/components/badge/badge.js.map +1 -1
  11. package/lib/cjs/components/badge/index.js +9 -5
  12. package/lib/cjs/components/badge/index.js.map +1 -1
  13. package/lib/cjs/components/button/button.js +68 -60
  14. package/lib/cjs/components/button/button.js.map +1 -1
  15. package/lib/cjs/components/button/confirm.js +51 -53
  16. package/lib/cjs/components/button/confirm.js.map +1 -1
  17. package/lib/cjs/components/button/group.js +26 -23
  18. package/lib/cjs/components/button/group.js.map +1 -1
  19. package/lib/cjs/components/button/index.js +9 -5
  20. package/lib/cjs/components/button/index.js.map +1 -1
  21. package/lib/cjs/components/button/toggle.js +44 -43
  22. package/lib/cjs/components/button/toggle.js.map +1 -1
  23. package/lib/cjs/components/card/card.js +18 -30
  24. package/lib/cjs/components/card/card.js.map +1 -1
  25. package/lib/cjs/components/card/index.js +9 -5
  26. package/lib/cjs/components/card/index.js.map +1 -1
  27. package/lib/cjs/components/checkbox/checkbox.js +44 -63
  28. package/lib/cjs/components/checkbox/checkbox.js.map +1 -1
  29. package/lib/cjs/components/checkbox/index.js +9 -5
  30. package/lib/cjs/components/checkbox/index.js.map +1 -1
  31. package/lib/cjs/components/checkbox/item.js +40 -56
  32. package/lib/cjs/components/checkbox/item.js.map +1 -1
  33. package/lib/cjs/components/collapse/collapse.js +77 -81
  34. package/lib/cjs/components/collapse/collapse.js.map +1 -1
  35. package/lib/cjs/components/collapse/index.js +9 -5
  36. package/lib/cjs/components/collapse/index.js.map +1 -1
  37. package/lib/cjs/components/collapse/item.js +9 -7
  38. package/lib/cjs/components/collapse/item.js.map +1 -1
  39. package/lib/cjs/components/datagrid/cell.js +26 -34
  40. package/lib/cjs/components/datagrid/cell.js.map +1 -1
  41. package/lib/cjs/components/datagrid/datagrid.js +118 -137
  42. package/lib/cjs/components/datagrid/datagrid.js.map +1 -1
  43. package/lib/cjs/components/datagrid/index.js +9 -5
  44. package/lib/cjs/components/datagrid/index.js.map +1 -1
  45. package/lib/cjs/components/datagrid/resize.js +41 -39
  46. package/lib/cjs/components/datagrid/resize.js.map +1 -1
  47. package/lib/cjs/components/datagrid/row.js +35 -62
  48. package/lib/cjs/components/datagrid/row.js.map +1 -1
  49. package/lib/cjs/components/datagrid/sorter.js +18 -25
  50. package/lib/cjs/components/datagrid/sorter.js.map +1 -1
  51. package/lib/cjs/components/description/description.js +33 -40
  52. package/lib/cjs/components/description/description.js.map +1 -1
  53. package/lib/cjs/components/description/index.js +9 -5
  54. package/lib/cjs/components/description/index.js.map +1 -1
  55. package/lib/cjs/components/drawer/drawer.js +71 -81
  56. package/lib/cjs/components/drawer/drawer.js.map +1 -1
  57. package/lib/cjs/components/drawer/index.js +9 -5
  58. package/lib/cjs/components/drawer/index.js.map +1 -1
  59. package/lib/cjs/components/dropdown/dropdown.js +30 -35
  60. package/lib/cjs/components/dropdown/dropdown.js.map +1 -1
  61. package/lib/cjs/components/dropdown/index.js +9 -5
  62. package/lib/cjs/components/dropdown/index.js.map +1 -1
  63. package/lib/cjs/components/dropdown/item.js +19 -33
  64. package/lib/cjs/components/dropdown/item.js.map +1 -1
  65. package/lib/cjs/components/editor/controls.js +84 -78
  66. package/lib/cjs/components/editor/controls.js.map +1 -1
  67. package/lib/cjs/components/editor/editor.js +86 -88
  68. package/lib/cjs/components/editor/editor.js.map +1 -1
  69. package/lib/cjs/components/editor/index.js +9 -5
  70. package/lib/cjs/components/editor/index.js.map +1 -1
  71. package/lib/cjs/components/flex/flex.js +33 -28
  72. package/lib/cjs/components/flex/flex.js.map +1 -1
  73. package/lib/cjs/components/flex/index.js +9 -5
  74. package/lib/cjs/components/flex/index.js.map +1 -1
  75. package/lib/cjs/components/form/context.js +9 -6
  76. package/lib/cjs/components/form/context.js.map +1 -1
  77. package/lib/cjs/components/form/field.js +74 -68
  78. package/lib/cjs/components/form/field.js.map +1 -1
  79. package/lib/cjs/components/form/form.js +65 -61
  80. package/lib/cjs/components/form/form.js.map +1 -1
  81. package/lib/cjs/components/form/index.js +9 -5
  82. package/lib/cjs/components/form/index.js.map +1 -1
  83. package/lib/cjs/components/form/useConfig.js +35 -42
  84. package/lib/cjs/components/form/useConfig.js.map +1 -1
  85. package/lib/cjs/components/form/useForm.js +139 -120
  86. package/lib/cjs/components/form/useForm.js.map +1 -1
  87. package/lib/cjs/components/icon/icon.js +28 -21
  88. package/lib/cjs/components/icon/icon.js.map +1 -1
  89. package/lib/cjs/components/icon/index.js +9 -5
  90. package/lib/cjs/components/icon/index.js.map +1 -1
  91. package/lib/cjs/components/image/image.js +84 -83
  92. package/lib/cjs/components/image/image.js.map +1 -1
  93. package/lib/cjs/components/image/index.js +9 -5
  94. package/lib/cjs/components/image/index.js.map +1 -1
  95. package/lib/cjs/components/image/list.js +44 -46
  96. package/lib/cjs/components/image/list.js.map +1 -1
  97. package/lib/cjs/components/input/container.js +19 -27
  98. package/lib/cjs/components/input/container.js.map +1 -1
  99. package/lib/cjs/components/input/index.js +9 -5
  100. package/lib/cjs/components/input/index.js.map +1 -1
  101. package/lib/cjs/components/input/input.js +80 -110
  102. package/lib/cjs/components/input/input.js.map +1 -1
  103. package/lib/cjs/components/input/number.js +115 -135
  104. package/lib/cjs/components/input/number.js.map +1 -1
  105. package/lib/cjs/components/input/range.js +79 -131
  106. package/lib/cjs/components/input/range.js.map +1 -1
  107. package/lib/cjs/components/input/textarea.js +54 -58
  108. package/lib/cjs/components/input/textarea.js.map +1 -1
  109. package/lib/cjs/components/list/index.js +9 -5
  110. package/lib/cjs/components/list/index.js.map +1 -1
  111. package/lib/cjs/components/list/item.js +20 -27
  112. package/lib/cjs/components/list/item.js.map +1 -1
  113. package/lib/cjs/components/list/list.js +30 -27
  114. package/lib/cjs/components/list/list.js.map +1 -1
  115. package/lib/cjs/components/loading/index.js +9 -5
  116. package/lib/cjs/components/loading/index.js.map +1 -1
  117. package/lib/cjs/components/loading/loading.js +22 -36
  118. package/lib/cjs/components/loading/loading.js.map +1 -1
  119. package/lib/cjs/components/message/index.js +9 -5
  120. package/lib/cjs/components/message/index.js.map +1 -1
  121. package/lib/cjs/components/message/message.js +162 -163
  122. package/lib/cjs/components/message/message.js.map +1 -1
  123. package/lib/cjs/components/modal/content.js +34 -54
  124. package/lib/cjs/components/modal/content.js.map +1 -1
  125. package/lib/cjs/components/modal/context.js +9 -6
  126. package/lib/cjs/components/modal/context.js.map +1 -1
  127. package/lib/cjs/components/modal/hookModal.js +28 -25
  128. package/lib/cjs/components/modal/hookModal.js.map +1 -1
  129. package/lib/cjs/components/modal/index.js +9 -5
  130. package/lib/cjs/components/modal/index.js.map +1 -1
  131. package/lib/cjs/components/modal/modal.js +96 -114
  132. package/lib/cjs/components/modal/modal.js.map +1 -1
  133. package/lib/cjs/components/modal/useModal.js +35 -36
  134. package/lib/cjs/components/modal/useModal.js.map +1 -1
  135. package/lib/cjs/components/pagination/index.js +9 -5
  136. package/lib/cjs/components/pagination/index.js.map +1 -1
  137. package/lib/cjs/components/pagination/page.js +29 -28
  138. package/lib/cjs/components/pagination/page.js.map +1 -1
  139. package/lib/cjs/components/pagination/pagination.js +49 -83
  140. package/lib/cjs/components/pagination/pagination.js.map +1 -1
  141. package/lib/cjs/components/picker/colors/footer.js +33 -58
  142. package/lib/cjs/components/picker/colors/footer.js.map +1 -1
  143. package/lib/cjs/components/picker/colors/handle.js +15 -22
  144. package/lib/cjs/components/picker/colors/handle.js.map +1 -1
  145. package/lib/cjs/components/picker/colors/index.js +64 -78
  146. package/lib/cjs/components/picker/colors/index.js.map +1 -1
  147. package/lib/cjs/components/picker/dates/dates.js +52 -65
  148. package/lib/cjs/components/picker/dates/dates.js.map +1 -1
  149. package/lib/cjs/components/picker/dates/index.js +65 -93
  150. package/lib/cjs/components/picker/dates/index.js.map +1 -1
  151. package/lib/cjs/components/picker/dates/panel.js +75 -146
  152. package/lib/cjs/components/picker/dates/panel.js.map +1 -1
  153. package/lib/cjs/components/picker/time/index.js +46 -69
  154. package/lib/cjs/components/picker/time/index.js.map +1 -1
  155. package/lib/cjs/components/picker/time/item.js +20 -17
  156. package/lib/cjs/components/picker/time/item.js.map +1 -1
  157. package/lib/cjs/components/picker/time/panel.js +99 -139
  158. package/lib/cjs/components/picker/time/panel.js.map +1 -1
  159. package/lib/cjs/components/popconfirm/index.js +9 -5
  160. package/lib/cjs/components/popconfirm/index.js.map +1 -1
  161. package/lib/cjs/components/popconfirm/popconfirm.js +52 -81
  162. package/lib/cjs/components/popconfirm/popconfirm.js.map +1 -1
  163. package/lib/cjs/components/popup/content.js +49 -54
  164. package/lib/cjs/components/popup/content.js.map +1 -1
  165. package/lib/cjs/components/popup/index.js +9 -5
  166. package/lib/cjs/components/popup/index.js.map +1 -1
  167. package/lib/cjs/components/popup/popup.js +502 -422
  168. package/lib/cjs/components/popup/popup.js.map +1 -1
  169. package/lib/cjs/components/progress/circle.js +13 -42
  170. package/lib/cjs/components/progress/circle.js.map +1 -1
  171. package/lib/cjs/components/progress/index.js +9 -5
  172. package/lib/cjs/components/progress/index.js.map +1 -1
  173. package/lib/cjs/components/progress/line.js +19 -24
  174. package/lib/cjs/components/progress/line.js.map +1 -1
  175. package/lib/cjs/components/progress/progress.js +87 -97
  176. package/lib/cjs/components/progress/progress.js.map +1 -1
  177. package/lib/cjs/components/radio/index.js +9 -5
  178. package/lib/cjs/components/radio/index.js.map +1 -1
  179. package/lib/cjs/components/radio/item.js +22 -31
  180. package/lib/cjs/components/radio/item.js.map +1 -1
  181. package/lib/cjs/components/radio/radio.js +37 -59
  182. package/lib/cjs/components/radio/radio.js.map +1 -1
  183. package/lib/cjs/components/resizable/index.js +9 -5
  184. package/lib/cjs/components/resizable/index.js.map +1 -1
  185. package/lib/cjs/components/resizable/resizable.js +65 -78
  186. package/lib/cjs/components/resizable/resizable.js.map +1 -1
  187. package/lib/cjs/components/river/index.js +9 -5
  188. package/lib/cjs/components/river/index.js.map +1 -1
  189. package/lib/cjs/components/river/river.js +111 -113
  190. package/lib/cjs/components/river/river.js.map +1 -1
  191. package/lib/cjs/components/select/index.js +9 -5
  192. package/lib/cjs/components/select/index.js.map +1 -1
  193. package/lib/cjs/components/select/options.js +47 -68
  194. package/lib/cjs/components/select/options.js.map +1 -1
  195. package/lib/cjs/components/select/select.js +100 -152
  196. package/lib/cjs/components/select/select.js.map +1 -1
  197. package/lib/cjs/components/step/divider.js +9 -7
  198. package/lib/cjs/components/step/divider.js.map +1 -1
  199. package/lib/cjs/components/step/index.js +9 -5
  200. package/lib/cjs/components/step/index.js.map +1 -1
  201. package/lib/cjs/components/step/item.js +25 -55
  202. package/lib/cjs/components/step/item.js.map +1 -1
  203. package/lib/cjs/components/step/step.js +41 -39
  204. package/lib/cjs/components/step/step.js.map +1 -1
  205. package/lib/cjs/components/swiper/index.js +9 -5
  206. package/lib/cjs/components/swiper/index.js.map +1 -1
  207. package/lib/cjs/components/swiper/item.js +30 -36
  208. package/lib/cjs/components/swiper/item.js.map +1 -1
  209. package/lib/cjs/components/swiper/swiper.js +238 -259
  210. package/lib/cjs/components/swiper/swiper.js.map +1 -1
  211. package/lib/cjs/components/tabs/index.js +9 -5
  212. package/lib/cjs/components/tabs/index.js.map +1 -1
  213. package/lib/cjs/components/tabs/item.js +9 -7
  214. package/lib/cjs/components/tabs/item.js.map +1 -1
  215. package/lib/cjs/components/tabs/tabs.js +225 -269
  216. package/lib/cjs/components/tabs/tabs.js.map +1 -1
  217. package/lib/cjs/components/tag/index.js +9 -5
  218. package/lib/cjs/components/tag/index.js.map +1 -1
  219. package/lib/cjs/components/tag/tag.js +23 -29
  220. package/lib/cjs/components/tag/tag.js.map +1 -1
  221. package/lib/cjs/components/text/highlight.js +29 -32
  222. package/lib/cjs/components/text/highlight.js.map +1 -1
  223. package/lib/cjs/components/text/index.js +9 -5
  224. package/lib/cjs/components/text/index.js.map +1 -1
  225. package/lib/cjs/components/text/number.js +28 -29
  226. package/lib/cjs/components/text/number.js.map +1 -1
  227. package/lib/cjs/components/text/text.js +39 -36
  228. package/lib/cjs/components/text/text.js.map +1 -1
  229. package/lib/cjs/components/text/time.js +21 -21
  230. package/lib/cjs/components/text/time.js.map +1 -1
  231. package/lib/cjs/components/tree/index.js +9 -5
  232. package/lib/cjs/components/tree/index.js.map +1 -1
  233. package/lib/cjs/components/tree/item.js +73 -129
  234. package/lib/cjs/components/tree/item.js.map +1 -1
  235. package/lib/cjs/components/tree/tree.js +129 -122
  236. package/lib/cjs/components/tree/tree.js.map +1 -1
  237. package/lib/cjs/components/upload/index.js +9 -5
  238. package/lib/cjs/components/upload/index.js.map +1 -1
  239. package/lib/cjs/components/upload/renderFile.js +63 -93
  240. package/lib/cjs/components/upload/renderFile.js.map +1 -1
  241. package/lib/cjs/components/upload/upload.js +123 -162
  242. package/lib/cjs/components/upload/upload.js.map +1 -1
  243. package/lib/cjs/components/utils/empty/index.js +16 -14
  244. package/lib/cjs/components/utils/empty/index.js.map +1 -1
  245. package/lib/cjs/components/utils/helpericon/helpericon.js +29 -21
  246. package/lib/cjs/components/utils/helpericon/helpericon.js.map +1 -1
  247. package/lib/cjs/components/utils/helpericon/index.js +9 -5
  248. package/lib/cjs/components/utils/helpericon/index.js.map +1 -1
  249. package/lib/cjs/components/video/index.js +9 -5
  250. package/lib/cjs/components/video/index.js.map +1 -1
  251. package/lib/cjs/components/video/video.js +178 -234
  252. package/lib/cjs/components/video/video.js.map +1 -1
  253. package/lib/cjs/index.js +88 -83
  254. package/lib/cjs/index.js.map +1 -0
  255. package/lib/cjs/js/hooks.js +212 -231
  256. package/lib/cjs/js/hooks.js.map +1 -1
  257. package/lib/cjs/js/usePreview/content.js +161 -194
  258. package/lib/cjs/js/usePreview/content.js.map +1 -1
  259. package/lib/cjs/js/usePreview/index.js +24 -36
  260. package/lib/cjs/js/usePreview/index.js.map +1 -1
  261. package/lib/cjs/js/usePreview/renderFile.js +21 -25
  262. package/lib/cjs/js/usePreview/renderFile.js.map +1 -1
  263. package/lib/cjs/js/usePreview/type.js +12 -14
  264. package/lib/cjs/js/usePreview/type.js.map +1 -1
  265. package/lib/cjs/js/useRipple/index.js +40 -34
  266. package/lib/cjs/js/useRipple/index.js.map +1 -1
  267. package/lib/cjs/js/useTheme/index.js +152 -27
  268. package/lib/cjs/js/useTheme/index.js.map +1 -1
  269. package/lib/cjs/js/utils.js +257 -239
  270. package/lib/cjs/js/utils.js.map +1 -1
  271. package/lib/css/colors.css +781 -0
  272. package/lib/css/index.css +3 -0
  273. package/lib/css/index.css.map +1 -0
  274. package/lib/css/input.css +192 -0
  275. package/lib/css/reset.css +153 -0
  276. package/lib/css/tokens.css +12 -0
  277. package/lib/css/utilities.css +1974 -0
  278. package/lib/es/components/affix/affix.js +59 -60
  279. package/lib/es/components/affix/affix.js.map +1 -1
  280. package/lib/es/components/affix/index.js +5 -6
  281. package/lib/es/components/affix/index.js.map +1 -1
  282. package/lib/es/components/affix/totop.js +10 -20
  283. package/lib/es/components/affix/totop.js.map +1 -1
  284. package/lib/es/components/badge/badge.js +10 -19
  285. package/lib/es/components/badge/badge.js.map +1 -1
  286. package/lib/es/components/badge/index.js +5 -6
  287. package/lib/es/components/badge/index.js.map +1 -1
  288. package/lib/es/components/button/button.js +57 -55
  289. package/lib/es/components/button/button.js.map +1 -1
  290. package/lib/es/components/button/confirm.js +47 -52
  291. package/lib/es/components/button/confirm.js.map +1 -1
  292. package/lib/es/components/button/group.js +18 -21
  293. package/lib/es/components/button/group.js.map +1 -1
  294. package/lib/es/components/button/index.js +5 -6
  295. package/lib/es/components/button/index.js.map +1 -1
  296. package/lib/es/components/button/toggle.js +36 -41
  297. package/lib/es/components/button/toggle.js.map +1 -1
  298. package/lib/es/components/card/card.js +10 -28
  299. package/lib/es/components/card/card.js.map +1 -1
  300. package/lib/es/components/card/index.js +5 -6
  301. package/lib/es/components/card/index.js.map +1 -1
  302. package/lib/es/components/checkbox/checkbox.js +35 -60
  303. package/lib/es/components/checkbox/checkbox.js.map +1 -1
  304. package/lib/es/components/checkbox/index.js +5 -6
  305. package/lib/es/components/checkbox/index.js.map +1 -1
  306. package/lib/es/components/checkbox/item.js +32 -54
  307. package/lib/es/components/checkbox/item.js.map +1 -1
  308. package/lib/es/components/collapse/collapse.js +68 -78
  309. package/lib/es/components/collapse/collapse.js.map +1 -1
  310. package/lib/es/components/collapse/index.js +5 -6
  311. package/lib/es/components/collapse/index.js.map +1 -1
  312. package/lib/es/components/collapse/item.js +5 -6
  313. package/lib/es/components/collapse/item.js.map +1 -1
  314. package/lib/es/components/datagrid/cell.js +20 -32
  315. package/lib/es/components/datagrid/cell.js.map +1 -1
  316. package/lib/es/components/datagrid/datagrid.js +110 -135
  317. package/lib/es/components/datagrid/datagrid.js.map +1 -1
  318. package/lib/es/components/datagrid/index.js +5 -6
  319. package/lib/es/components/datagrid/index.js.map +1 -1
  320. package/lib/es/components/datagrid/resize.js +37 -38
  321. package/lib/es/components/datagrid/resize.js.map +1 -1
  322. package/lib/es/components/datagrid/row.js +27 -60
  323. package/lib/es/components/datagrid/row.js.map +1 -1
  324. package/lib/es/components/datagrid/sorter.js +10 -23
  325. package/lib/es/components/datagrid/sorter.js.map +1 -1
  326. package/lib/es/components/description/description.js +25 -38
  327. package/lib/es/components/description/description.js.map +1 -1
  328. package/lib/es/components/description/index.js +5 -6
  329. package/lib/es/components/description/index.js.map +1 -1
  330. package/lib/es/components/drawer/drawer.js +63 -79
  331. package/lib/es/components/drawer/drawer.js.map +1 -1
  332. package/lib/es/components/drawer/index.js +5 -6
  333. package/lib/es/components/drawer/index.js.map +1 -1
  334. package/lib/es/components/dropdown/dropdown.js +25 -33
  335. package/lib/es/components/dropdown/dropdown.js.map +1 -1
  336. package/lib/es/components/dropdown/index.js +5 -6
  337. package/lib/es/components/dropdown/index.js.map +1 -1
  338. package/lib/es/components/dropdown/item.js +15 -32
  339. package/lib/es/components/dropdown/item.js.map +1 -1
  340. package/lib/es/components/editor/controls.js +75 -75
  341. package/lib/es/components/editor/controls.js.map +1 -1
  342. package/lib/es/components/editor/editor.js +77 -85
  343. package/lib/es/components/editor/editor.js.map +1 -1
  344. package/lib/es/components/editor/index.js +5 -6
  345. package/lib/es/components/editor/index.js.map +1 -1
  346. package/lib/es/components/flex/flex.js +25 -26
  347. package/lib/es/components/flex/flex.js.map +1 -1
  348. package/lib/es/components/flex/index.js +5 -6
  349. package/lib/es/components/flex/index.js.map +1 -1
  350. package/lib/es/components/form/context.js +4 -5
  351. package/lib/es/components/form/context.js.map +1 -1
  352. package/lib/es/components/form/field.js +66 -66
  353. package/lib/es/components/form/field.js.map +1 -1
  354. package/lib/es/components/form/form.js +53 -55
  355. package/lib/es/components/form/form.js.map +1 -1
  356. package/lib/es/components/form/index.js +5 -6
  357. package/lib/es/components/form/index.js.map +1 -1
  358. package/lib/es/components/form/useConfig.js +31 -41
  359. package/lib/es/components/form/useConfig.js.map +1 -1
  360. package/lib/es/components/form/useForm.js +130 -118
  361. package/lib/es/components/form/useForm.js.map +1 -1
  362. package/lib/es/components/icon/icon.js +20 -19
  363. package/lib/es/components/icon/icon.js.map +1 -1
  364. package/lib/es/components/icon/index.js +5 -6
  365. package/lib/es/components/icon/index.js.map +1 -1
  366. package/lib/es/components/image/image.js +75 -80
  367. package/lib/es/components/image/image.js.map +1 -1
  368. package/lib/es/components/image/index.js +5 -6
  369. package/lib/es/components/image/index.js.map +1 -1
  370. package/lib/es/components/image/list.js +40 -45
  371. package/lib/es/components/image/list.js.map +1 -1
  372. package/lib/es/components/input/container.js +11 -25
  373. package/lib/es/components/input/container.js.map +1 -1
  374. package/lib/es/components/input/index.js +5 -6
  375. package/lib/es/components/input/index.js.map +1 -1
  376. package/lib/es/components/input/input.js +69 -105
  377. package/lib/es/components/input/input.js.map +1 -1
  378. package/lib/es/components/input/number.js +107 -133
  379. package/lib/es/components/input/number.js.map +1 -1
  380. package/lib/es/components/input/range.js +71 -129
  381. package/lib/es/components/input/range.js.map +1 -1
  382. package/lib/es/components/input/textarea.js +46 -56
  383. package/lib/es/components/input/textarea.js.map +1 -1
  384. package/lib/es/components/list/index.js +5 -6
  385. package/lib/es/components/list/index.js.map +1 -1
  386. package/lib/es/components/list/item.js +12 -25
  387. package/lib/es/components/list/item.js.map +1 -1
  388. package/lib/es/components/list/list.js +21 -24
  389. package/lib/es/components/list/list.js.map +1 -1
  390. package/lib/es/components/loading/index.js +5 -6
  391. package/lib/es/components/loading/index.js.map +1 -1
  392. package/lib/es/components/loading/loading.js +14 -34
  393. package/lib/es/components/loading/loading.js.map +1 -1
  394. package/lib/es/components/message/index.js +5 -6
  395. package/lib/es/components/message/index.js.map +1 -1
  396. package/lib/es/components/message/message.js +154 -161
  397. package/lib/es/components/message/message.js.map +1 -1
  398. package/lib/es/components/modal/content.js +30 -53
  399. package/lib/es/components/modal/content.js.map +1 -1
  400. package/lib/es/components/modal/context.js +4 -5
  401. package/lib/es/components/modal/context.js.map +1 -1
  402. package/lib/es/components/modal/hookModal.js +24 -24
  403. package/lib/es/components/modal/hookModal.js.map +1 -1
  404. package/lib/es/components/modal/index.js +5 -6
  405. package/lib/es/components/modal/index.js.map +1 -1
  406. package/lib/es/components/modal/modal.js +87 -111
  407. package/lib/es/components/modal/modal.js.map +1 -1
  408. package/lib/es/components/modal/useModal.js +31 -35
  409. package/lib/es/components/modal/useModal.js.map +1 -1
  410. package/lib/es/components/pagination/index.js +5 -6
  411. package/lib/es/components/pagination/index.js.map +1 -1
  412. package/lib/es/components/pagination/page.js +21 -26
  413. package/lib/es/components/pagination/page.js.map +1 -1
  414. package/lib/es/components/pagination/pagination.js +41 -81
  415. package/lib/es/components/pagination/pagination.js.map +1 -1
  416. package/lib/es/components/picker/colors/footer.js +29 -57
  417. package/lib/es/components/picker/colors/footer.js.map +1 -1
  418. package/lib/es/components/picker/colors/handle.js +7 -20
  419. package/lib/es/components/picker/colors/handle.js.map +1 -1
  420. package/lib/es/components/picker/colors/index.js +56 -76
  421. package/lib/es/components/picker/colors/index.js.map +1 -1
  422. package/lib/es/components/picker/dates/dates.js +43 -62
  423. package/lib/es/components/picker/dates/dates.js.map +1 -1
  424. package/lib/es/components/picker/dates/index.js +54 -88
  425. package/lib/es/components/picker/dates/index.js.map +1 -1
  426. package/lib/es/components/picker/dates/panel.js +66 -143
  427. package/lib/es/components/picker/dates/panel.js.map +1 -1
  428. package/lib/es/components/picker/time/index.js +38 -67
  429. package/lib/es/components/picker/time/index.js.map +1 -1
  430. package/lib/es/components/picker/time/item.js +12 -15
  431. package/lib/es/components/picker/time/item.js.map +1 -1
  432. package/lib/es/components/picker/time/panel.js +95 -138
  433. package/lib/es/components/picker/time/panel.js.map +1 -1
  434. package/lib/es/components/popconfirm/index.js +5 -6
  435. package/lib/es/components/popconfirm/index.js.map +1 -1
  436. package/lib/es/components/popconfirm/popconfirm.js +48 -80
  437. package/lib/es/components/popconfirm/popconfirm.js.map +1 -1
  438. package/lib/es/components/popup/content.js +40 -51
  439. package/lib/es/components/popup/content.js.map +1 -1
  440. package/lib/es/components/popup/index.js +5 -6
  441. package/lib/es/components/popup/index.js.map +1 -1
  442. package/lib/es/components/popup/popup.js +498 -421
  443. package/lib/es/components/popup/popup.js.map +1 -1
  444. package/lib/es/components/progress/circle.js +9 -41
  445. package/lib/es/components/progress/circle.js.map +1 -1
  446. package/lib/es/components/progress/index.js +5 -6
  447. package/lib/es/components/progress/index.js.map +1 -1
  448. package/lib/es/components/progress/line.js +11 -22
  449. package/lib/es/components/progress/line.js.map +1 -1
  450. package/lib/es/components/progress/progress.js +79 -95
  451. package/lib/es/components/progress/progress.js.map +1 -1
  452. package/lib/es/components/radio/index.js +5 -6
  453. package/lib/es/components/radio/index.js.map +1 -1
  454. package/lib/es/components/radio/item.js +14 -29
  455. package/lib/es/components/radio/item.js.map +1 -1
  456. package/lib/es/components/radio/radio.js +28 -56
  457. package/lib/es/components/radio/radio.js.map +1 -1
  458. package/lib/es/components/resizable/index.js +5 -6
  459. package/lib/es/components/resizable/index.js.map +1 -1
  460. package/lib/es/components/resizable/resizable.js +57 -76
  461. package/lib/es/components/resizable/resizable.js.map +1 -1
  462. package/lib/es/components/river/index.js +5 -6
  463. package/lib/es/components/river/index.js.map +1 -1
  464. package/lib/es/components/river/river.js +103 -111
  465. package/lib/es/components/river/river.js.map +1 -1
  466. package/lib/es/components/select/index.js +5 -6
  467. package/lib/es/components/select/index.js.map +1 -1
  468. package/lib/es/components/select/options.js +40 -66
  469. package/lib/es/components/select/options.js.map +1 -1
  470. package/lib/es/components/select/select.js +92 -150
  471. package/lib/es/components/select/select.js.map +1 -1
  472. package/lib/es/components/step/divider.js +5 -6
  473. package/lib/es/components/step/divider.js.map +1 -1
  474. package/lib/es/components/step/index.js +5 -6
  475. package/lib/es/components/step/index.js.map +1 -1
  476. package/lib/es/components/step/item.js +17 -53
  477. package/lib/es/components/step/item.js.map +1 -1
  478. package/lib/es/components/step/step.js +32 -36
  479. package/lib/es/components/step/step.js.map +1 -1
  480. package/lib/es/components/swiper/index.js +5 -6
  481. package/lib/es/components/swiper/index.js.map +1 -1
  482. package/lib/es/components/swiper/item.js +22 -34
  483. package/lib/es/components/swiper/item.js.map +1 -1
  484. package/lib/es/components/swiper/swiper.js +229 -256
  485. package/lib/es/components/swiper/swiper.js.map +1 -1
  486. package/lib/es/components/tabs/index.js +5 -6
  487. package/lib/es/components/tabs/index.js.map +1 -1
  488. package/lib/es/components/tabs/item.js +5 -6
  489. package/lib/es/components/tabs/item.js.map +1 -1
  490. package/lib/es/components/tabs/tabs.js +216 -266
  491. package/lib/es/components/tabs/tabs.js.map +1 -1
  492. package/lib/es/components/tag/index.js +5 -6
  493. package/lib/es/components/tag/index.js.map +1 -1
  494. package/lib/es/components/tag/tag.js +15 -27
  495. package/lib/es/components/tag/tag.js.map +1 -1
  496. package/lib/es/components/text/highlight.js +25 -31
  497. package/lib/es/components/text/highlight.js.map +1 -1
  498. package/lib/es/components/text/index.js +5 -6
  499. package/lib/es/components/text/index.js.map +1 -1
  500. package/lib/es/components/text/number.js +24 -28
  501. package/lib/es/components/text/number.js.map +1 -1
  502. package/lib/es/components/text/text.js +28 -31
  503. package/lib/es/components/text/text.js.map +1 -1
  504. package/lib/es/components/text/time.js +17 -20
  505. package/lib/es/components/text/time.js.map +1 -1
  506. package/lib/es/components/tree/index.js +5 -6
  507. package/lib/es/components/tree/index.js.map +1 -1
  508. package/lib/es/components/tree/item.js +66 -127
  509. package/lib/es/components/tree/item.js.map +1 -1
  510. package/lib/es/components/tree/tree.js +125 -121
  511. package/lib/es/components/tree/tree.js.map +1 -1
  512. package/lib/es/components/upload/index.js +5 -6
  513. package/lib/es/components/upload/index.js.map +1 -1
  514. package/lib/es/components/upload/renderFile.js +55 -91
  515. package/lib/es/components/upload/renderFile.js.map +1 -1
  516. package/lib/es/components/upload/upload.js +115 -160
  517. package/lib/es/components/upload/upload.js.map +1 -1
  518. package/lib/es/components/utils/empty/index.js +8 -12
  519. package/lib/es/components/utils/empty/index.js.map +1 -1
  520. package/lib/es/components/utils/helpericon/helpericon.js +21 -19
  521. package/lib/es/components/utils/helpericon/helpericon.js.map +1 -1
  522. package/lib/es/components/utils/helpericon/index.js +5 -6
  523. package/lib/es/components/utils/helpericon/index.js.map +1 -1
  524. package/lib/es/components/video/index.js +5 -6
  525. package/lib/es/components/video/index.js.map +1 -1
  526. package/lib/es/components/video/video.js +170 -232
  527. package/lib/es/components/video/video.js.map +1 -1
  528. package/lib/es/index.js +42 -42
  529. package/lib/es/index.js.map +1 -0
  530. package/lib/es/js/hooks.js +210 -229
  531. package/lib/es/js/hooks.js.map +1 -1
  532. package/lib/es/js/usePreview/content.js +153 -192
  533. package/lib/es/js/usePreview/content.js.map +1 -1
  534. package/lib/es/js/usePreview/index.js +20 -35
  535. package/lib/es/js/usePreview/index.js.map +1 -1
  536. package/lib/es/js/usePreview/renderFile.js +17 -24
  537. package/lib/es/js/usePreview/renderFile.js.map +1 -1
  538. package/lib/es/js/usePreview/type.js +12 -14
  539. package/lib/es/js/usePreview/type.js.map +1 -1
  540. package/lib/es/js/useRipple/index.js +36 -34
  541. package/lib/es/js/useRipple/index.js.map +1 -1
  542. package/lib/es/js/useTheme/index.js +148 -26
  543. package/lib/es/js/useTheme/index.js.map +1 -1
  544. package/lib/es/js/utils.js +255 -238
  545. package/lib/es/js/utils.js.map +1 -1
  546. package/lib/index.js +5244 -0
  547. package/lib/types/components/affix/affix.d.ts +10 -0
  548. package/lib/types/components/affix/index.d.ts +5 -0
  549. package/lib/types/components/affix/totop.d.ts +6 -0
  550. package/lib/types/components/affix/type.d.ts +13 -0
  551. package/lib/types/components/badge/badge.d.ts +6 -0
  552. package/lib/types/components/badge/index.d.ts +5 -0
  553. package/lib/types/components/badge/type.d.ts +15 -0
  554. package/lib/types/components/button/button.d.ts +5 -0
  555. package/lib/types/components/button/confirm.d.ts +6 -0
  556. package/lib/types/components/button/group.d.ts +6 -0
  557. package/lib/types/components/button/index.d.ts +5 -0
  558. package/lib/types/components/button/toggle.d.ts +6 -0
  559. package/lib/types/components/button/type.d.ts +53 -0
  560. package/lib/types/components/card/card.d.ts +6 -0
  561. package/lib/types/components/card/index.d.ts +5 -0
  562. package/lib/types/components/card/type.d.ts +13 -0
  563. package/lib/types/components/checkbox/checkbox.d.ts +10 -0
  564. package/lib/types/components/checkbox/index.d.ts +5 -0
  565. package/lib/types/components/checkbox/item.d.ts +6 -0
  566. package/lib/types/components/checkbox/type.d.ts +24 -0
  567. package/lib/types/components/collapse/collapse.d.ts +10 -0
  568. package/lib/types/components/collapse/index.d.ts +5 -0
  569. package/lib/types/components/collapse/item.d.ts +6 -0
  570. package/lib/types/components/collapse/type.d.ts +23 -0
  571. package/lib/types/components/datagrid/datagrid.d.ts +6 -0
  572. package/lib/types/components/datagrid/index.d.ts +5 -0
  573. package/lib/types/components/datagrid/type.d.ts +40 -0
  574. package/lib/types/components/description/description.d.ts +6 -0
  575. package/lib/types/components/description/index.d.ts +5 -0
  576. package/lib/types/components/description/type.d.ts +25 -0
  577. package/lib/types/components/drawer/drawer.d.ts +6 -0
  578. package/lib/types/components/drawer/index.d.ts +5 -0
  579. package/lib/types/components/drawer/type.d.ts +16 -0
  580. package/lib/types/components/dropdown/dropdown.d.ts +10 -0
  581. package/lib/types/components/dropdown/index.d.ts +5 -0
  582. package/lib/types/components/dropdown/type.d.ts +14 -0
  583. package/lib/types/components/editor/editor.d.ts +6 -0
  584. package/lib/types/components/editor/index.d.ts +5 -0
  585. package/lib/types/components/editor/type.d.ts +20 -0
  586. package/lib/types/components/flex/flex.d.ts +5 -0
  587. package/lib/types/components/flex/index.d.ts +5 -0
  588. package/lib/types/components/flex/type.d.ts +13 -0
  589. package/lib/types/components/form/field.d.ts +6 -0
  590. package/lib/types/components/form/form.d.ts +14 -0
  591. package/lib/types/components/form/index.d.ts +5 -0
  592. package/lib/types/components/form/type.d.ts +43 -0
  593. package/lib/types/components/form/useConfig.d.ts +10 -0
  594. package/lib/types/components/form/useForm.d.ts +17 -0
  595. package/lib/types/components/icon/icon.d.ts +6 -0
  596. package/lib/types/components/icon/index.d.ts +5 -0
  597. package/lib/types/components/icon/type.d.ts +12 -0
  598. package/lib/types/components/image/image.d.ts +5 -0
  599. package/lib/types/components/image/index.d.ts +5 -0
  600. package/lib/types/components/image/list.d.ts +6 -0
  601. package/lib/types/components/image/type.d.ts +33 -0
  602. package/lib/types/components/input/index.d.ts +5 -0
  603. package/lib/types/components/input/input.d.ts +5 -0
  604. package/lib/types/components/input/number.d.ts +6 -0
  605. package/lib/types/components/input/range.d.ts +6 -0
  606. package/lib/types/components/input/textarea.d.ts +6 -0
  607. package/lib/types/components/input/type.d.ts +53 -0
  608. package/lib/types/components/list/index.d.ts +5 -0
  609. package/lib/types/components/list/list.d.ts +9 -0
  610. package/lib/types/components/list/type.d.ts +16 -0
  611. package/lib/types/components/loading/index.d.ts +5 -0
  612. package/lib/types/components/loading/loading.d.ts +6 -0
  613. package/lib/types/components/loading/type.d.ts +10 -0
  614. package/lib/types/components/message/index.d.ts +5 -0
  615. package/lib/types/components/message/message.d.ts +28 -0
  616. package/lib/types/components/message/type.d.ts +21 -0
  617. package/lib/types/components/modal/index.d.ts +5 -0
  618. package/lib/types/components/modal/modal.d.ts +5 -0
  619. package/lib/types/components/modal/type.d.ts +31 -0
  620. package/lib/types/components/modal/useModal.d.ts +9 -0
  621. package/lib/types/components/pagination/index.d.ts +5 -0
  622. package/lib/types/components/pagination/pagination.d.ts +6 -0
  623. package/lib/types/components/pagination/type.d.ts +18 -0
  624. package/lib/types/components/picker/colors/index.d.ts +6 -0
  625. package/lib/types/components/picker/dates/index.d.ts +6 -0
  626. package/lib/types/components/picker/time/index.d.ts +6 -0
  627. package/lib/types/components/picker/type.d.ts +41 -0
  628. package/lib/types/components/popconfirm/index.d.ts +5 -0
  629. package/lib/types/components/popconfirm/popconfirm.d.ts +6 -0
  630. package/lib/types/components/popconfirm/type.d.ts +14 -0
  631. package/lib/types/components/popup/index.d.ts +5 -0
  632. package/lib/types/components/popup/popup.d.ts +6 -0
  633. package/lib/types/components/popup/type.d.ts +24 -0
  634. package/lib/types/components/progress/index.d.ts +5 -0
  635. package/lib/types/components/progress/progress.d.ts +6 -0
  636. package/lib/types/components/progress/type.d.ts +23 -0
  637. package/lib/types/components/radio/index.d.ts +5 -0
  638. package/lib/types/components/radio/item.d.ts +6 -0
  639. package/lib/types/components/radio/radio.d.ts +10 -0
  640. package/lib/types/components/radio/type.d.ts +20 -0
  641. package/lib/types/components/resizable/index.d.ts +5 -0
  642. package/lib/types/components/resizable/resizable.d.ts +6 -0
  643. package/lib/types/components/resizable/type.d.ts +19 -0
  644. package/lib/types/components/river/index.d.ts +5 -0
  645. package/lib/types/components/river/river.d.ts +6 -0
  646. package/lib/types/components/river/type.d.ts +8 -0
  647. package/lib/types/components/select/index.d.ts +5 -0
  648. package/lib/types/components/select/select.d.ts +6 -0
  649. package/lib/types/components/select/type.d.ts +22 -0
  650. package/lib/types/components/step/index.d.ts +5 -0
  651. package/lib/types/components/step/item.d.ts +6 -0
  652. package/lib/types/components/step/step.d.ts +10 -0
  653. package/lib/types/components/step/type.d.ts +19 -0
  654. package/lib/types/components/swiper/index.d.ts +5 -0
  655. package/lib/types/components/swiper/item.d.ts +6 -0
  656. package/lib/types/components/swiper/swiper.d.ts +5 -0
  657. package/lib/types/components/swiper/type.d.ts +52 -0
  658. package/lib/types/components/tabs/index.d.ts +5 -0
  659. package/lib/types/components/tabs/item.d.ts +6 -0
  660. package/lib/types/components/tabs/tabs.d.ts +5 -0
  661. package/lib/types/components/tabs/type.d.ts +43 -0
  662. package/lib/types/components/tag/index.d.ts +5 -0
  663. package/lib/types/components/tag/tag.d.ts +6 -0
  664. package/lib/types/components/tag/type.d.ts +14 -0
  665. package/lib/types/components/text/highlight.d.ts +6 -0
  666. package/lib/types/components/text/index.d.ts +5 -0
  667. package/lib/types/components/text/number.d.ts +6 -0
  668. package/lib/types/components/text/text.d.ts +5 -0
  669. package/lib/types/components/text/time.d.ts +6 -0
  670. package/lib/types/components/text/type.d.ts +43 -0
  671. package/lib/types/components/tree/index.d.ts +5 -0
  672. package/lib/types/components/tree/tree.d.ts +6 -0
  673. package/lib/types/components/tree/type.d.ts +48 -0
  674. package/lib/types/components/upload/index.d.ts +5 -0
  675. package/lib/types/components/upload/type.d.ts +37 -0
  676. package/lib/types/components/upload/upload.d.ts +6 -0
  677. package/lib/types/components/video/index.d.ts +5 -0
  678. package/lib/types/components/video/type.d.ts +27 -0
  679. package/lib/types/components/video/video.d.ts +6 -0
  680. package/lib/types/index.d.ts +41 -0
  681. package/lib/types/js/usePreview/index.d.ts +5 -0
  682. package/lib/types/js/usePreview/type.d.ts +30 -0
  683. package/lib/types/js/useTheme/index.d.ts +9 -0
  684. package/lib/types/js/useTheme/type.d.ts +7 -0
  685. package/lib/types/type/index.d.ts +28 -0
  686. package/package.json +98 -95
  687. package/lib/cjs/_virtual/_rolldown/runtime.js +0 -23
  688. package/lib/types/components/affix/affix.js +0 -62
  689. package/lib/types/components/affix/index.js +0 -5
  690. package/lib/types/components/affix/totop.js +0 -21
  691. package/lib/types/components/badge/badge.js +0 -20
  692. package/lib/types/components/badge/index.js +0 -5
  693. package/lib/types/components/button/button.js +0 -60
  694. package/lib/types/components/button/confirm.js +0 -57
  695. package/lib/types/components/button/group.js +0 -22
  696. package/lib/types/components/button/index.js +0 -5
  697. package/lib/types/components/button/toggle.js +0 -42
  698. package/lib/types/components/card/card.js +0 -29
  699. package/lib/types/components/card/index.js +0 -5
  700. package/lib/types/components/checkbox/checkbox.js +0 -62
  701. package/lib/types/components/checkbox/index.js +0 -5
  702. package/lib/types/components/checkbox/item.js +0 -55
  703. package/lib/types/components/collapse/collapse.js +0 -80
  704. package/lib/types/components/collapse/index.js +0 -5
  705. package/lib/types/components/collapse/item.js +0 -7
  706. package/lib/types/components/datagrid/cell.js +0 -34
  707. package/lib/types/components/datagrid/datagrid.js +0 -136
  708. package/lib/types/components/datagrid/index.js +0 -5
  709. package/lib/types/components/datagrid/resize.js +0 -39
  710. package/lib/types/components/datagrid/row.js +0 -63
  711. package/lib/types/components/datagrid/sorter.js +0 -24
  712. package/lib/types/components/description/description.js +0 -39
  713. package/lib/types/components/description/index.js +0 -5
  714. package/lib/types/components/drawer/drawer.js +0 -80
  715. package/lib/types/components/drawer/index.js +0 -5
  716. package/lib/types/components/dropdown/dropdown.js +0 -35
  717. package/lib/types/components/dropdown/index.js +0 -5
  718. package/lib/types/components/dropdown/item.js +0 -33
  719. package/lib/types/components/editor/controls.js +0 -83
  720. package/lib/types/components/editor/editor.js +0 -86
  721. package/lib/types/components/editor/index.js +0 -5
  722. package/lib/types/components/flex/flex.js +0 -27
  723. package/lib/types/components/flex/index.js +0 -5
  724. package/lib/types/components/form/context.js +0 -5
  725. package/lib/types/components/form/field.js +0 -67
  726. package/lib/types/components/form/form.js +0 -59
  727. package/lib/types/components/form/index.js +0 -5
  728. package/lib/types/components/form/useConfig.js +0 -42
  729. package/lib/types/components/form/useForm.js +0 -119
  730. package/lib/types/components/icon/icon.js +0 -20
  731. package/lib/types/components/icon/index.js +0 -5
  732. package/lib/types/components/image/image.js +0 -82
  733. package/lib/types/components/image/index.js +0 -5
  734. package/lib/types/components/image/list.js +0 -46
  735. package/lib/types/components/input/container.js +0 -26
  736. package/lib/types/components/input/index.js +0 -5
  737. package/lib/types/components/input/input.js +0 -109
  738. package/lib/types/components/input/number.js +0 -134
  739. package/lib/types/components/input/range.js +0 -130
  740. package/lib/types/components/input/textarea.js +0 -57
  741. package/lib/types/components/list/index.js +0 -5
  742. package/lib/types/components/list/item.js +0 -26
  743. package/lib/types/components/list/list.js +0 -26
  744. package/lib/types/components/loading/index.js +0 -5
  745. package/lib/types/components/loading/loading.js +0 -35
  746. package/lib/types/components/message/index.js +0 -5
  747. package/lib/types/components/message/message.js +0 -193
  748. package/lib/types/components/modal/content.js +0 -54
  749. package/lib/types/components/modal/context.js +0 -5
  750. package/lib/types/components/modal/hookModal.js +0 -25
  751. package/lib/types/components/modal/index.js +0 -5
  752. package/lib/types/components/modal/modal.js +0 -113
  753. package/lib/types/components/modal/useModal.js +0 -36
  754. package/lib/types/components/pagination/index.js +0 -5
  755. package/lib/types/components/pagination/page.js +0 -27
  756. package/lib/types/components/pagination/pagination.js +0 -82
  757. package/lib/types/components/picker/colors/footer.js +0 -60
  758. package/lib/types/components/picker/colors/handle.js +0 -21
  759. package/lib/types/components/picker/colors/index.js +0 -77
  760. package/lib/types/components/picker/dates/dates.js +0 -63
  761. package/lib/types/components/picker/dates/index.js +0 -91
  762. package/lib/types/components/picker/dates/panel.js +0 -146
  763. package/lib/types/components/picker/time/index.js +0 -69
  764. package/lib/types/components/picker/time/item.js +0 -16
  765. package/lib/types/components/picker/time/panel.js +0 -141
  766. package/lib/types/components/popconfirm/index.js +0 -5
  767. package/lib/types/components/popconfirm/popconfirm.js +0 -83
  768. package/lib/types/components/popup/content.js +0 -52
  769. package/lib/types/components/popup/index.js +0 -5
  770. package/lib/types/components/popup/popup.js +0 -422
  771. package/lib/types/components/progress/circle.js +0 -42
  772. package/lib/types/components/progress/index.js +0 -5
  773. package/lib/types/components/progress/line.js +0 -23
  774. package/lib/types/components/progress/progress.js +0 -96
  775. package/lib/types/components/radio/index.js +0 -5
  776. package/lib/types/components/radio/item.js +0 -30
  777. package/lib/types/components/radio/radio.js +0 -58
  778. package/lib/types/components/resizable/index.js +0 -5
  779. package/lib/types/components/resizable/resizable.js +0 -77
  780. package/lib/types/components/river/index.js +0 -5
  781. package/lib/types/components/river/river.js +0 -112
  782. package/lib/types/components/select/index.js +0 -5
  783. package/lib/types/components/select/options.js +0 -71
  784. package/lib/types/components/select/select.js +0 -151
  785. package/lib/types/components/step/divider.js +0 -7
  786. package/lib/types/components/step/index.js +0 -5
  787. package/lib/types/components/step/item.js +0 -56
  788. package/lib/types/components/step/step.js +0 -38
  789. package/lib/types/components/swiper/index.js +0 -5
  790. package/lib/types/components/swiper/item.js +0 -35
  791. package/lib/types/components/swiper/swiper.js +0 -258
  792. package/lib/types/components/tabs/index.js +0 -5
  793. package/lib/types/components/tabs/item.js +0 -7
  794. package/lib/types/components/tabs/tabs.js +0 -268
  795. package/lib/types/components/tag/index.js +0 -5
  796. package/lib/types/components/tag/tag.js +0 -28
  797. package/lib/types/components/text/highlight.js +0 -32
  798. package/lib/types/components/text/index.js +0 -5
  799. package/lib/types/components/text/number.js +0 -29
  800. package/lib/types/components/text/text.js +0 -35
  801. package/lib/types/components/text/time.js +0 -21
  802. package/lib/types/components/tree/index.js +0 -5
  803. package/lib/types/components/tree/item.js +0 -132
  804. package/lib/types/components/tree/tree.js +0 -124
  805. package/lib/types/components/upload/index.js +0 -5
  806. package/lib/types/components/upload/renderFile.js +0 -94
  807. package/lib/types/components/upload/upload.js +0 -161
  808. package/lib/types/components/utils/empty/index.js +0 -13
  809. package/lib/types/components/utils/helpericon/helpericon.js +0 -20
  810. package/lib/types/components/utils/helpericon/index.js +0 -5
  811. package/lib/types/components/video/index.js +0 -5
  812. package/lib/types/components/video/video.js +0 -233
  813. package/lib/types/index.js +0 -42
  814. package/lib/types/js/hooks.js +0 -249
  815. package/lib/types/js/usePreview/content.js +0 -193
  816. package/lib/types/js/usePreview/index.js +0 -36
  817. package/lib/types/js/usePreview/renderFile.js +0 -25
  818. package/lib/types/js/usePreview/type.js +0 -13
  819. package/lib/types/js/useRipple/index.js +0 -43
  820. package/lib/types/js/useTheme/index.js +0 -27
  821. package/lib/types/js/utils.js +0 -267
@@ -1,136 +1,80 @@
1
- const require_runtime = require("../../_virtual/_rolldown/runtime.js");
2
- const require_index = require("../icon/index.js");
3
- const require_index$1 = require("../checkbox/index.js");
4
- let classnames = require("classnames");
5
- classnames = require_runtime.__toESM(classnames);
6
- let react = require("react");
7
- let _ricons_material = require("@ricons/material");
8
- let react_jsx_runtime = require("react/jsx-runtime");
9
- //#region packages/components/tree/item.tsx
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('react/jsx-runtime');
4
+ var material = require('@ricons/material');
5
+ var classNames = require('classnames');
6
+ var react = require('react');
7
+ var checkbox = require('../checkbox/checkbox.js');
8
+ var icon = require('../icon/icon.js');
9
+
10
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
11
+
12
+ var classNames__default = /*#__PURE__*/_interopDefaultCompat(classNames);
13
+
10
14
  function TreeList(props) {
11
- const { data = [], depth = 0, round, style, className, parent, nodeProps, ...restProps } = props;
12
- const contents = data.map((item, i) => {
13
- const { type } = item;
14
- const title = item[nodeProps.title];
15
- const itemKey = item[nodeProps.key] || (parent?.key !== void 0 ? `${parent.key}-${i}` : `${i}`);
16
- item.key = itemKey;
17
- item.parent = parent;
18
- if (type === "title") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
19
- className: "i-tree-group-title",
20
- children: title
21
- }, i);
22
- if (type && type !== "item") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
23
- className: `i-tree-type-${type}`,
24
- children: title
25
- }, i);
26
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TreeItem, {
27
- index: i,
28
- item,
29
- depth,
30
- nodeProps,
31
- ...restProps
32
- }, itemKey);
33
- });
34
- if (depth > 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: contents });
35
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
36
- className: (0, classnames.default)("i-tree", className, { "i-tree-round": round }),
37
- style,
38
- children: contents
39
- });
15
+ const { data = [], depth = 0, round, style, className, parent, nodeProps, ...restProps } = props;
16
+ const contents = data.map((item, i) => {
17
+ const { type } = item;
18
+ const title = item[nodeProps.title];
19
+ const itemKey = item[nodeProps.key] ||
20
+ (parent?.key !== undefined ? `${parent.key}-${i}` : `${i}`);
21
+ item.key = itemKey;
22
+ item.parent = parent;
23
+ if (type === "title") {
24
+ return (jsxRuntime.jsx("div", { className: 'i-tree-group-title', children: title }, i));
25
+ }
26
+ if (type && type !== "item") {
27
+ return (jsxRuntime.jsx("div", { className: `i-tree-type-${type}`, children: title }, i));
28
+ }
29
+ return (jsxRuntime.jsx(TreeItem, { index: i, item: item, depth: depth, nodeProps: nodeProps, ...restProps }, itemKey));
30
+ });
31
+ if (depth > 0)
32
+ return jsxRuntime.jsx(jsxRuntime.Fragment, { children: contents });
33
+ return (jsxRuntime.jsx("div", { className: classNames__default("i-tree", className, {
34
+ "i-tree-round": round,
35
+ }), style: style, children: contents }));
40
36
  }
41
37
  const Header = (props) => {
42
- const { as: Tag = "a", href, selected, children, ...restProps } = props;
43
- const className = (0, classnames.default)("i-tree-item-header", { "i-tree-item-selected": selected });
44
- if (typeof Tag === "string") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Tag, {
45
- href,
46
- className,
47
- ...restProps,
48
- children
49
- });
50
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Tag, {
51
- to: href || "",
52
- className,
53
- ...restProps,
54
- children
55
- });
38
+ const { as: Tag = "a", href, selected, children, ...restProps } = props;
39
+ const className = classNames__default("i-tree-item-header", {
40
+ "i-tree-item-selected": selected,
41
+ });
42
+ if (typeof Tag === "string") {
43
+ return (jsxRuntime.jsx(Tag, { href: href, className: className, ...restProps, children: children }));
44
+ }
45
+ return (jsxRuntime.jsx(Tag, { to: href || "", className: className, ...restProps, children: children }));
56
46
  };
57
47
  const TreeItem = (props) => {
58
- const { item, depth = 0, index, selected, checked = [], partofs = {}, checkable, nodeProps, renderExtra, onItemClick, onItemSelect, onItemCheck, ...restProps } = props;
59
- const { as, key = "", href, icon, title, expanded, disabled } = item;
60
- const children = item[nodeProps.children];
61
- const [expand, setExpand] = (0, react.useState)(expanded);
62
- const handleExpand = (e, fromToggle) => {
63
- if (fromToggle) {
64
- e.preventDefault();
65
- e.stopPropagation();
66
- }
67
- if (disabled || !children?.length) return;
68
- setExpand((v) => !v);
69
- };
70
- const handleItemClick = (e) => {
71
- if (disabled) {
72
- e.preventDefault();
73
- e.stopPropagation();
74
- return;
75
- }
76
- handleExpand(e);
77
- onItemClick?.(item, e);
78
- onItemSelect?.(key, item);
79
- };
80
- const handleItemCheck = (checked) => onItemCheck?.(item, checked, []);
81
- const itemChecked = checked.includes(key);
82
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
83
- className: (0, classnames.default)("i-tree-item", { "i-tree-expand": expand }),
84
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Header, {
85
- as,
86
- href,
87
- style: { paddingLeft: `${depth * 1.5 + .5}em` },
88
- selected: selected === key,
89
- onClick: handleItemClick,
90
- children: [
91
- checkable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_index$1.default.Item, {
92
- value: itemChecked,
93
- partof: !itemChecked && partofs[key],
94
- className: "i-tree-checkbox",
95
- onChange: handleItemCheck,
96
- onClick: (e) => e.stopPropagation()
97
- }),
98
- icon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
99
- className: "i-tree-item-icon",
100
- children: icon
101
- }),
102
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
103
- className: "i-tree-item-title",
104
- children: title
105
- }),
106
- renderExtra?.(item),
107
- children && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_index.default, {
108
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ricons_material.KeyboardArrowDownRound, {}),
109
- className: "i-tree-toggle",
110
- onClick: (e) => handleExpand(e, true)
111
- })
112
- ]
113
- }), children?.length && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
114
- className: "i-tree-item-content",
115
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TreeList, {
116
- data: children,
117
- depth: depth + 1,
118
- selected,
119
- checkable,
120
- parent: item,
121
- partofs,
122
- checked,
123
- nodeProps,
124
- renderExtra,
125
- onItemClick,
126
- onItemSelect,
127
- onItemCheck,
128
- ...restProps
129
- })
130
- })]
131
- });
48
+ const { item, depth = 0, index, selected, checked = [], partofs = {}, checkable, nodeProps, renderExtra, onItemClick, onItemSelect, onItemCheck, ...restProps } = props;
49
+ const { as, key = "", href, icon: icon$1, title, expanded, disabled } = item;
50
+ const children = item[nodeProps.children];
51
+ const [expand, setExpand] = react.useState(expanded);
52
+ const handleExpand = (e, fromToggle) => {
53
+ if (fromToggle) {
54
+ e.preventDefault();
55
+ e.stopPropagation();
56
+ }
57
+ if (disabled || !children?.length)
58
+ return;
59
+ setExpand((v) => !v);
60
+ };
61
+ const handleItemClick = (e) => {
62
+ if (disabled) {
63
+ e.preventDefault();
64
+ e.stopPropagation();
65
+ return;
66
+ }
67
+ handleExpand(e);
68
+ onItemClick?.(item, e);
69
+ onItemSelect?.(key, item);
70
+ };
71
+ const handleItemCheck = (checked) => onItemCheck?.(item, checked, []);
72
+ const itemChecked = checked.includes(key);
73
+ return (jsxRuntime.jsxs("div", { className: classNames__default("i-tree-item", {
74
+ "i-tree-expand": expand,
75
+ }), children: [jsxRuntime.jsxs(Header, { as: as, href: href, style: { paddingLeft: `${depth * 1.5 + 0.5}em` }, selected: selected === key, onClick: handleItemClick, children: [checkable && (jsxRuntime.jsx(checkbox.default.Item, { value: itemChecked, partof: !itemChecked && partofs[key], className: 'i-tree-checkbox', onChange: handleItemCheck, onClick: (e) => e.stopPropagation() })), icon$1 && jsxRuntime.jsx("span", { className: 'i-tree-item-icon', children: icon$1 }), jsxRuntime.jsx("span", { className: 'i-tree-item-title', children: title }), renderExtra?.(item), children && (jsxRuntime.jsx(icon.default, { icon: jsxRuntime.jsx(material.KeyboardArrowDownRound, {}), className: 'i-tree-toggle', onClick: (e) => handleExpand(e, true) }))] }), children?.length && (jsxRuntime.jsx("div", { className: 'i-tree-item-content', children: jsxRuntime.jsx(TreeList, { data: children, depth: depth + 1, selected: selected, checkable: checkable, parent: item, partofs: partofs, checked: checked, nodeProps: nodeProps, renderExtra: renderExtra, onItemClick: onItemClick, onItemSelect: onItemSelect, onItemCheck: onItemCheck, ...restProps }) }))] }));
132
76
  };
133
- //#endregion
134
- exports.TreeList = TreeList;
135
77
 
136
- //# sourceMappingURL=item.js.map
78
+ exports.TreeItem = TreeItem;
79
+ exports.TreeList = TreeList;
80
+ //# sourceMappingURL=item.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"item.js","names":["Checkbox","Icon","KeyboardArrowDownRound"],"sources":["../../../../packages/components/tree/item.tsx"],"sourcesContent":["import { KeyboardArrowDownRound } from \"@ricons/material\";\nimport classNames from \"classnames\";\nimport { MouseEvent, useState } from \"react\";\nimport Checkbox from \"../checkbox\";\nimport Icon from \"../icon\";\nimport { ITree, ITreeHeader, PropsTreeItem } from \"./type\";\n\ninterface ITreeList extends Omit<ITree, \"nodeProps\"> {\n\tnodeProps: {\n\t\tkey: string;\n\t\ttitle: string;\n\t\tchildren: string;\n\t};\n}\n\nexport function TreeList(props: ITreeList) {\n\tconst {\n\t\tdata = [],\n\t\tdepth = 0,\n\t\tround,\n\t\tstyle,\n\t\tclassName,\n\t\tparent,\n\t\tnodeProps,\n\t\t...restProps\n\t} = props;\n\n\tconst contents = data.map((item, i) => {\n\t\tconst { type } = item;\n\t\tconst title = item[nodeProps.title];\n\t\tconst itemKey =\n\t\t\titem[nodeProps.key] ||\n\t\t\t(parent?.key !== undefined ? `${parent.key}-${i}` : `${i}`);\n\n\t\titem.key = itemKey;\n\t\titem.parent = parent;\n\n\t\tif (type === \"title\") {\n\t\t\treturn (\n\t\t\t\t<div key={i} className='i-tree-group-title'>\n\t\t\t\t\t{title}\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\n\t\tif (type && type !== \"item\") {\n\t\t\treturn (\n\t\t\t\t<div key={i} className={`i-tree-type-${type}`}>\n\t\t\t\t\t{title}\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<TreeItem\n\t\t\t\tkey={itemKey}\n\t\t\t\tindex={i}\n\t\t\t\titem={item}\n\t\t\t\tdepth={depth}\n\t\t\t\tnodeProps={nodeProps}\n\t\t\t\t{...restProps}\n\t\t\t/>\n\t\t);\n\t});\n\n\tif (depth > 0) return <>{contents}</>;\n\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames(\"i-tree\", className, {\n\t\t\t\t\"i-tree-round\": round,\n\t\t\t})}\n\t\t\tstyle={style}\n\t\t>\n\t\t\t{contents}\n\t\t</div>\n\t);\n}\n\nconst Header = (props: ITreeHeader) => {\n\tconst { as: Tag = \"a\", href, selected, children, ...restProps } = props;\n\n\tconst className = classNames(\"i-tree-item-header\", {\n\t\t\"i-tree-item-selected\": selected,\n\t});\n\n\tif (typeof Tag === \"string\") {\n\t\treturn (\n\t\t\t<Tag href={href} className={className} {...restProps}>\n\t\t\t\t{children}\n\t\t\t</Tag>\n\t\t);\n\t}\n\n\treturn (\n\t\t<Tag to={href || \"\"} className={className} {...restProps}>\n\t\t\t{children}\n\t\t</Tag>\n\t);\n};\n\nexport const TreeItem = (props: PropsTreeItem) => {\n\tconst {\n\t\titem,\n\t\tdepth = 0,\n\t\tindex,\n\t\tselected,\n\t\tchecked = [],\n\t\tpartofs = {},\n\t\tcheckable,\n\t\tnodeProps,\n\t\trenderExtra,\n\t\tonItemClick,\n\t\tonItemSelect,\n\t\tonItemCheck,\n\t\t...restProps\n\t} = props;\n\n\tconst { as, key = \"\", href, icon, title, expanded, disabled } = item;\n\tconst children = item[nodeProps.children];\n\n\tconst [expand, setExpand] = useState(expanded);\n\n\tconst handleExpand = (e: MouseEvent<HTMLElement>, fromToggle?: boolean) => {\n\t\tif (fromToggle) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t}\n\n\t\tif (disabled || !children?.length) return;\n\n\t\tsetExpand((v) => !v);\n\t};\n\n\tconst handleItemClick = (e: MouseEvent<HTMLElement>) => {\n\t\tif (disabled) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\treturn;\n\t\t}\n\n\t\thandleExpand(e);\n\t\tonItemClick?.(item, e);\n\t\tonItemSelect?.(key, item);\n\t};\n\n\tconst handleItemCheck = (checked) => onItemCheck?.(item, checked, []);\n\tconst itemChecked = checked.includes(key);\n\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames(\"i-tree-item\", {\n\t\t\t\t\"i-tree-expand\": expand,\n\t\t\t})}\n\t\t>\n\t\t\t<Header\n\t\t\t\tas={as}\n\t\t\t\thref={href}\n\t\t\t\tstyle={{ paddingLeft: `${depth * 1.5 + 0.5}em` }}\n\t\t\t\tselected={selected === key}\n\t\t\t\tonClick={handleItemClick}\n\t\t\t>\n\t\t\t\t{checkable && (\n\t\t\t\t\t<Checkbox.Item\n\t\t\t\t\t\tvalue={itemChecked}\n\t\t\t\t\t\tpartof={!itemChecked && partofs[key]}\n\t\t\t\t\t\tclassName='i-tree-checkbox'\n\t\t\t\t\t\tonChange={handleItemCheck}\n\t\t\t\t\t\tonClick={(e) => e.stopPropagation()}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\n\t\t\t\t{icon && <span className='i-tree-item-icon'>{icon}</span>}\n\n\t\t\t\t<span className='i-tree-item-title'>{title}</span>\n\n\t\t\t\t{renderExtra?.(item)}\n\n\t\t\t\t{children && (\n\t\t\t\t\t<Icon\n\t\t\t\t\t\ticon={<KeyboardArrowDownRound />}\n\t\t\t\t\t\tclassName='i-tree-toggle'\n\t\t\t\t\t\tonClick={(e) => handleExpand(e, true)}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</Header>\n\n\t\t\t{children?.length && (\n\t\t\t\t<div className='i-tree-item-content'>\n\t\t\t\t\t<TreeList\n\t\t\t\t\t\tdata={children}\n\t\t\t\t\t\tdepth={depth + 1}\n\t\t\t\t\t\tselected={selected}\n\t\t\t\t\t\tcheckable={checkable}\n\t\t\t\t\t\tparent={item}\n\t\t\t\t\t\tpartofs={partofs}\n\t\t\t\t\t\tchecked={checked}\n\t\t\t\t\t\tnodeProps={nodeProps}\n\t\t\t\t\t\trenderExtra={renderExtra}\n\t\t\t\t\t\tonItemClick={onItemClick}\n\t\t\t\t\t\tonItemSelect={onItemSelect}\n\t\t\t\t\t\tonItemCheck={onItemCheck}\n\t\t\t\t\t\t{...restProps}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n"],"mappings":";;;;;;;;;AAeA,SAAgB,SAAS,OAAkB;CAC1C,MAAM,EACL,OAAO,EAAE,EACT,QAAQ,GACR,OACA,OACA,WACA,QACA,WACA,GAAG,cACA;CAEJ,MAAM,WAAW,KAAK,KAAK,MAAM,MAAM;EACtC,MAAM,EAAE,SAAS;EACjB,MAAM,QAAQ,KAAK,UAAU;EAC7B,MAAM,UACL,KAAK,UAAU,SACd,QAAQ,QAAQ,KAAA,IAAY,GAAG,OAAO,IAAI,GAAG,MAAM,GAAG;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,GAAA,kBAAA,KAAC,OAAD;GAAK,WAAU;aACd,iBAAA,GAAA,kBAAA,KAAC,UAAD;IACC,MAAM;IACN,OAAO,QAAQ;IACL;IACC;IACX,QAAQ;IACC;IACA;IACE;IACE;IACA;IACC;IACD;IACb,GAAI;IACH,CAAA;GACG,CAAA,CAEF"}
1
+ {"version":3,"file":"item.js","sources":["../../../../packages/components/tree/item.tsx"],"sourcesContent":["import { KeyboardArrowDownRound } from \"@ricons/material\";\r\nimport classNames from \"classnames\";\r\nimport { MouseEvent, useState } from \"react\";\r\nimport Checkbox from \"../checkbox\";\r\nimport Icon from \"../icon\";\r\nimport { ITree, ITreeHeader, PropsTreeItem } from \"./type\";\r\n\r\ninterface ITreeList extends Omit<ITree, \"nodeProps\"> {\r\n\tnodeProps: {\r\n\t\tkey: string;\r\n\t\ttitle: string;\r\n\t\tchildren: string;\r\n\t};\r\n}\r\n\r\nexport function TreeList(props: ITreeList) {\r\n\tconst {\r\n\t\tdata = [],\r\n\t\tdepth = 0,\r\n\t\tround,\r\n\t\tstyle,\r\n\t\tclassName,\r\n\t\tparent,\r\n\t\tnodeProps,\r\n\t\t...restProps\r\n\t} = props;\r\n\r\n\tconst contents = data.map((item, i) => {\r\n\t\tconst { type } = item;\r\n\t\tconst title = item[nodeProps.title];\r\n\t\tconst itemKey =\r\n\t\t\titem[nodeProps.key] ||\r\n\t\t\t(parent?.key !== undefined ? `${parent.key}-${i}` : `${i}`);\r\n\r\n\t\titem.key = itemKey;\r\n\t\titem.parent = parent;\r\n\r\n\t\tif (type === \"title\") {\r\n\t\t\treturn (\r\n\t\t\t\t<div key={i} className='i-tree-group-title'>\r\n\t\t\t\t\t{title}\r\n\t\t\t\t</div>\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\tif (type && type !== \"item\") {\r\n\t\t\treturn (\r\n\t\t\t\t<div key={i} className={`i-tree-type-${type}`}>\r\n\t\t\t\t\t{title}\r\n\t\t\t\t</div>\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\treturn (\r\n\t\t\t<TreeItem\r\n\t\t\t\tkey={itemKey}\r\n\t\t\t\tindex={i}\r\n\t\t\t\titem={item}\r\n\t\t\t\tdepth={depth}\r\n\t\t\t\tnodeProps={nodeProps}\r\n\t\t\t\t{...restProps}\r\n\t\t\t/>\r\n\t\t);\r\n\t});\r\n\r\n\tif (depth > 0) return <>{contents}</>;\r\n\r\n\treturn (\r\n\t\t<div\r\n\t\t\tclassName={classNames(\"i-tree\", className, {\r\n\t\t\t\t\"i-tree-round\": round,\r\n\t\t\t})}\r\n\t\t\tstyle={style}\r\n\t\t>\r\n\t\t\t{contents}\r\n\t\t</div>\r\n\t);\r\n}\r\n\r\nconst Header = (props: ITreeHeader) => {\r\n\tconst { as: Tag = \"a\", href, selected, children, ...restProps } = props;\r\n\r\n\tconst className = classNames(\"i-tree-item-header\", {\r\n\t\t\"i-tree-item-selected\": selected,\r\n\t});\r\n\r\n\tif (typeof Tag === \"string\") {\r\n\t\treturn (\r\n\t\t\t<Tag href={href} className={className} {...restProps}>\r\n\t\t\t\t{children}\r\n\t\t\t</Tag>\r\n\t\t);\r\n\t}\r\n\r\n\treturn (\r\n\t\t<Tag to={href || \"\"} className={className} {...restProps}>\r\n\t\t\t{children}\r\n\t\t</Tag>\r\n\t);\r\n};\r\n\r\nexport const TreeItem = (props: PropsTreeItem) => {\r\n\tconst {\r\n\t\titem,\r\n\t\tdepth = 0,\r\n\t\tindex,\r\n\t\tselected,\r\n\t\tchecked = [],\r\n\t\tpartofs = {},\r\n\t\tcheckable,\r\n\t\tnodeProps,\r\n\t\trenderExtra,\r\n\t\tonItemClick,\r\n\t\tonItemSelect,\r\n\t\tonItemCheck,\r\n\t\t...restProps\r\n\t} = props;\r\n\r\n\tconst { as, key = \"\", href, icon, title, expanded, disabled } = item;\r\n\tconst children = item[nodeProps.children];\r\n\r\n\tconst [expand, setExpand] = useState(expanded);\r\n\r\n\tconst handleExpand = (e: MouseEvent<HTMLElement>, fromToggle?: boolean) => {\r\n\t\tif (fromToggle) {\r\n\t\t\te.preventDefault();\r\n\t\t\te.stopPropagation();\r\n\t\t}\r\n\r\n\t\tif (disabled || !children?.length) return;\r\n\r\n\t\tsetExpand((v) => !v);\r\n\t};\r\n\r\n\tconst handleItemClick = (e: MouseEvent<HTMLElement>) => {\r\n\t\tif (disabled) {\r\n\t\t\te.preventDefault();\r\n\t\t\te.stopPropagation();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\thandleExpand(e);\r\n\t\tonItemClick?.(item, e);\r\n\t\tonItemSelect?.(key, item);\r\n\t};\r\n\r\n\tconst handleItemCheck = (checked) => onItemCheck?.(item, checked, []);\r\n\tconst itemChecked = checked.includes(key);\r\n\r\n\treturn (\r\n\t\t<div\r\n\t\t\tclassName={classNames(\"i-tree-item\", {\r\n\t\t\t\t\"i-tree-expand\": expand,\r\n\t\t\t})}\r\n\t\t>\r\n\t\t\t<Header\r\n\t\t\t\tas={as}\r\n\t\t\t\thref={href}\r\n\t\t\t\tstyle={{ paddingLeft: `${depth * 1.5 + 0.5}em` }}\r\n\t\t\t\tselected={selected === key}\r\n\t\t\t\tonClick={handleItemClick}\r\n\t\t\t>\r\n\t\t\t\t{checkable && (\r\n\t\t\t\t\t<Checkbox.Item\r\n\t\t\t\t\t\tvalue={itemChecked}\r\n\t\t\t\t\t\tpartof={!itemChecked && partofs[key]}\r\n\t\t\t\t\t\tclassName='i-tree-checkbox'\r\n\t\t\t\t\t\tonChange={handleItemCheck}\r\n\t\t\t\t\t\tonClick={(e) => e.stopPropagation()}\r\n\t\t\t\t\t/>\r\n\t\t\t\t)}\r\n\r\n\t\t\t\t{icon && <span className='i-tree-item-icon'>{icon}</span>}\r\n\r\n\t\t\t\t<span className='i-tree-item-title'>{title}</span>\r\n\r\n\t\t\t\t{renderExtra?.(item)}\r\n\r\n\t\t\t\t{children && (\r\n\t\t\t\t\t<Icon\r\n\t\t\t\t\t\ticon={<KeyboardArrowDownRound />}\r\n\t\t\t\t\t\tclassName='i-tree-toggle'\r\n\t\t\t\t\t\tonClick={(e) => handleExpand(e, true)}\r\n\t\t\t\t\t/>\r\n\t\t\t\t)}\r\n\t\t\t</Header>\r\n\r\n\t\t\t{children?.length && (\r\n\t\t\t\t<div className='i-tree-item-content'>\r\n\t\t\t\t\t<TreeList\r\n\t\t\t\t\t\tdata={children}\r\n\t\t\t\t\t\tdepth={depth + 1}\r\n\t\t\t\t\t\tselected={selected}\r\n\t\t\t\t\t\tcheckable={checkable}\r\n\t\t\t\t\t\tparent={item}\r\n\t\t\t\t\t\tpartofs={partofs}\r\n\t\t\t\t\t\tchecked={checked}\r\n\t\t\t\t\t\tnodeProps={nodeProps}\r\n\t\t\t\t\t\trenderExtra={renderExtra}\r\n\t\t\t\t\t\tonItemClick={onItemClick}\r\n\t\t\t\t\t\tonItemSelect={onItemSelect}\r\n\t\t\t\t\t\tonItemCheck={onItemCheck}\r\n\t\t\t\t\t\t{...restProps}\r\n\t\t\t\t\t/>\r\n\t\t\t\t</div>\r\n\t\t\t)}\r\n\t\t</div>\r\n\t);\r\n};\r\n"],"names":["_jsx","_Fragment","classNames","icon","useState","_jsxs","Checkbox","Icon","KeyboardArrowDownRound"],"mappings":";;;;;;;;;;;;;AAeM,SAAU,QAAQ,CAAC,KAAgB,EAAA;IACxC,MAAM,EACL,IAAI,GAAG,EAAE,EACT,KAAK,GAAG,CAAC,EACT,KAAK,EACL,KAAK,EACL,SAAS,EACT,MAAM,EACN,SAAS,EACT,GAAG,SAAS,EACZ,GAAG,KAAK;IAET,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,KAAI;AACrC,QAAA,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI;QACrB,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;AACnC,QAAA,MAAM,OAAO,GACZ,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC;aAClB,MAAM,EAAE,GAAG,KAAK,SAA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AAA,EAAA,EAAM,SAAS,EAAC,mBAAmB,EAAA,QAAA,EAAE,KAAK,GAAQ,EAEjD,WAAW,GAAG,IAAI,CAAC,EAEnB,QAAQ,KACRA,cAAA,CAACO,YAAI,IACJ,IAAI,EAAEP,cAAA,CAACQ,+BAAsB,EAAA,EAAA,CAAG,EAChC,SAAS,EAAC,eAAe,EACzB,OAAO,EAAE,CAAC,CAAC,KAAK,YAAY,CAAC,CAAC,EAAE,IAAI,CAAC,EAAA,CACpC,CACF,IACO,EAER,QAAQ,EAAE,MAAM,KAChBR,wBAAK,SAAS,EAAC,qBAAqB,EAAA,QAAA,EACnCA,cAAA,CAAC,QAAQ,EAAA,EACR,IAAI,EAAE,QAAQ,EACd,KAAK,EAAE,KAAK,GAAG,CAAC,EAChB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,IAAI,EACZ,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,WAAW,EACxB,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,WAAW,EAAA,GACpB,SAAS,GACZ,EAAA,CACG,CACN,CAAA,EAAA,CACI;AAER;;;;;"}
@@ -1,127 +1,134 @@
1
- require("../../_virtual/_rolldown/runtime.js");
2
- const require_item = require("./item.js");
3
- let react = require("react");
4
- let react_jsx_runtime = require("react/jsx-runtime");
5
- //#region packages/components/tree/tree.tsx
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+ var react = require('react');
7
+ var item = require('./item.js');
8
+
6
9
  const defaultNodeProps = {
7
- key: "key",
8
- title: "title",
9
- children: "children"
10
+ key: "key",
11
+ title: "title",
12
+ children: "children",
10
13
  };
11
14
  const Tree = (props) => {
12
- const { data = [], ref, selected, checked = [], disabledRelated, nodeProps, onItemSelect, onItemCheck, ...restProps } = props;
13
- const [selectedKey, setSelectedKey] = (0, react.useState)(selected);
14
- const [checkedKeys, setCheckedKeys] = (0, react.useState)(checked);
15
- const [partofs, setPartofs] = (0, react.useState)({});
16
- const nodeMapsRef = (0, react.useRef)(/* @__PURE__ */ new Map());
17
- const oNodeProps = Object.assign({}, defaultNodeProps, nodeProps);
18
- const isChecked = (key) => checkedKeys.includes(key || "");
19
- const checkItem = (item, checked, direction) => {
20
- const { key = "", parent, children } = item;
21
- const shouldChanged = { [key]: checked };
22
- const partofs = { [key]: false };
23
- if (disabledRelated) return [shouldChanged];
24
- if (checked) {
25
- if (parent && direction !== "leaf") {
26
- const hasUnchecked = parent.children?.some((o) => o.key !== key && !isChecked(o.key));
27
- const [changes, parts] = checkItem(parent, true, "root");
28
- if (!hasUnchecked) Object.assign(shouldChanged, changes);
29
- Object.assign(partofs, hasUnchecked ? parts : {}, { [parent.key]: true });
30
- }
31
- if (children?.length && direction !== "root") children.map((o) => {
32
- if (isChecked(o.key)) return;
33
- const [changes] = checkItem(o, true, "leaf");
34
- Object.assign(shouldChanged, changes);
35
- partofs[o.key] = false;
36
- });
37
- return [shouldChanged, partofs];
38
- }
39
- if (parent && direction !== "leaf") {
40
- const [changes, parts] = checkItem(parent, false, "root");
41
- Object.assign(shouldChanged, changes);
42
- const hasChecked = parent.children?.some((o) => isChecked(o.key) && o.key !== key);
43
- Object.assign(partofs, hasChecked ? {} : parts, {
44
- [parent.key]: hasChecked,
45
- [key]: false
46
- });
47
- }
48
- if (children?.length && direction !== "root") children.map((o) => {
49
- const [changes] = checkItem(o, false, "leaf");
50
- if (!isChecked(o.key)) return;
51
- Object.assign(shouldChanged, changes);
52
- partofs[o.key] = false;
53
- });
54
- return [shouldChanged, partofs];
55
- };
56
- const handleCheck = (item, checked) => {
57
- const [shouldChanged, partofs] = checkItem(item, checked);
58
- const changedKeys = Object.keys(shouldChanged);
59
- const nextChecked = checked ? Array.from(new Set([...checkedKeys, ...changedKeys])) : checkedKeys.filter((k) => !changedKeys.includes(k));
60
- setCheckedKeys(nextChecked);
61
- setPartofs((p) => ({
62
- ...p,
63
- ...partofs
64
- }));
65
- onItemCheck?.(item, checked, nextChecked);
66
- };
67
- const handleSelect = (key, item) => {
68
- if (!props.selectable) return;
69
- setSelectedKey(key);
70
- onItemSelect?.(key, item);
71
- };
72
- (0, react.useEffect)(() => {
73
- if (selected === void 0) return;
74
- setSelectedKey(selected);
75
- }, [selected]);
76
- (0, react.useEffect)(() => {
77
- nodeMapsRef.current.clear();
78
- const { key, children } = oNodeProps;
79
- const recursive = (nodes) => {
80
- nodes.map((o) => {
81
- nodeMapsRef.current.set(o[key], o);
82
- o[children]?.length > 0 && recursive(o[children]);
83
- });
84
- };
85
- recursive(data);
86
- }, [data]);
87
- (0, react.useImperativeHandle)(ref, () => {
88
- return {
89
- getChecked: () => {
90
- const items = [];
91
- checkedKeys.map((k) => {
92
- const item = nodeMapsRef.current.get(k);
93
- items.push(item);
94
- });
95
- return [checkedKeys, items];
96
- },
97
- getSelected: () => {
98
- return [selectedKey, nodeMapsRef.current.get(selectedKey)];
99
- },
100
- getPartofs: () => {
101
- const items = [];
102
- return [Object.keys(partofs).filter((k) => {
103
- const indeterminate = partofs[k];
104
- if (indeterminate) {
105
- const item = nodeMapsRef.current.get(k);
106
- items.push(item);
107
- }
108
- return indeterminate;
109
- }), items];
110
- }
111
- };
112
- });
113
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_item.TreeList, {
114
- data,
115
- selected: selectedKey,
116
- checked: checkedKeys,
117
- partofs,
118
- nodeProps: oNodeProps,
119
- onItemCheck: handleCheck,
120
- onItemSelect: handleSelect,
121
- ...restProps
122
- });
15
+ const { data = [], ref, selected, checked = [], disabledRelated, nodeProps, onItemSelect, onItemCheck, ...restProps } = props;
16
+ const [selectedKey, setSelectedKey] = react.useState(selected);
17
+ const [checkedKeys, setCheckedKeys] = react.useState(checked);
18
+ const [partofs, setPartofs] = react.useState({});
19
+ const nodeMapsRef = react.useRef(new Map());
20
+ const oNodeProps = Object.assign({}, defaultNodeProps, nodeProps);
21
+ const isChecked = (key) => checkedKeys.includes(key || "");
22
+ const checkItem = (item, checked, direction) => {
23
+ const { key = "", parent, children } = item;
24
+ const shouldChanged = { [key]: checked };
25
+ const partofs = { [key]: false };
26
+ if (disabledRelated)
27
+ return [shouldChanged];
28
+ if (checked) {
29
+ if (parent && direction !== "leaf") {
30
+ const hasUnchecked = parent.children?.some((o) => o.key !== key && !isChecked(o.key));
31
+ const [changes, parts] = checkItem(parent, true, "root");
32
+ if (!hasUnchecked) {
33
+ Object.assign(shouldChanged, changes);
34
+ }
35
+ Object.assign(partofs, hasUnchecked ? parts : {}, {
36
+ [parent.key]: true,
37
+ });
38
+ }
39
+ if (children?.length && direction !== "root") {
40
+ children.map((o) => {
41
+ if (isChecked(o.key))
42
+ return;
43
+ const [changes] = checkItem(o, true, "leaf");
44
+ Object.assign(shouldChanged, changes);
45
+ partofs[o.key] = false;
46
+ });
47
+ }
48
+ return [shouldChanged, partofs];
49
+ }
50
+ if (parent && direction !== "leaf") {
51
+ const [changes, parts] = checkItem(parent, false, "root");
52
+ Object.assign(shouldChanged, changes);
53
+ const hasChecked = parent.children?.some((o) => isChecked(o.key) && o.key !== key);
54
+ Object.assign(partofs, hasChecked ? {} : parts, {
55
+ [parent.key]: hasChecked,
56
+ [key]: false,
57
+ });
58
+ }
59
+ if (children?.length && direction !== "root") {
60
+ children.map((o) => {
61
+ const [changes] = checkItem(o, false, "leaf");
62
+ if (!isChecked(o.key))
63
+ return;
64
+ Object.assign(shouldChanged, changes);
65
+ partofs[o.key] = false;
66
+ });
67
+ }
68
+ return [shouldChanged, partofs];
69
+ };
70
+ const handleCheck = (item, checked) => {
71
+ const [shouldChanged, partofs] = checkItem(item, checked);
72
+ const changedKeys = Object.keys(shouldChanged);
73
+ const nextChecked = checked
74
+ ? Array.from(new Set([...checkedKeys, ...changedKeys]))
75
+ : checkedKeys.filter((k) => !changedKeys.includes(k));
76
+ setCheckedKeys(nextChecked);
77
+ setPartofs((p) => ({ ...p, ...partofs }));
78
+ onItemCheck?.(item, checked, nextChecked);
79
+ };
80
+ const handleSelect = (key, item) => {
81
+ if (!props.selectable)
82
+ return;
83
+ setSelectedKey(key);
84
+ onItemSelect?.(key, item);
85
+ };
86
+ react.useEffect(() => {
87
+ if (selected === undefined)
88
+ return;
89
+ setSelectedKey(selected);
90
+ }, [selected]);
91
+ react.useEffect(() => {
92
+ nodeMapsRef.current.clear();
93
+ const { key, children } = oNodeProps;
94
+ const recursive = (nodes) => {
95
+ nodes.map((o) => {
96
+ nodeMapsRef.current.set(o[key], o);
97
+ o[children]?.length > 0 && recursive(o[children]);
98
+ });
99
+ };
100
+ recursive(data);
101
+ }, [data]);
102
+ react.useImperativeHandle(ref, () => {
103
+ return {
104
+ getChecked: () => {
105
+ const items = [];
106
+ checkedKeys.map((k) => {
107
+ const item = nodeMapsRef.current.get(k);
108
+ items.push(item);
109
+ });
110
+ return [checkedKeys, items];
111
+ },
112
+ getSelected: () => {
113
+ const item = nodeMapsRef.current.get(selectedKey);
114
+ return [selectedKey, item];
115
+ },
116
+ getPartofs: () => {
117
+ const items = [];
118
+ const keys = Object.keys(partofs).filter((k) => {
119
+ const indeterminate = partofs[k];
120
+ if (indeterminate) {
121
+ const item = nodeMapsRef.current.get(k);
122
+ items.push(item);
123
+ }
124
+ return indeterminate;
125
+ });
126
+ return [keys, items];
127
+ },
128
+ };
129
+ });
130
+ return (jsxRuntime.jsx(item.TreeList, { data: data, selected: selectedKey, checked: checkedKeys, partofs: partofs, nodeProps: oNodeProps, onItemCheck: handleCheck, onItemSelect: handleSelect, ...restProps }));
123
131
  };
124
- //#endregion
125
- exports.default = Tree;
126
132
 
127
- //# sourceMappingURL=tree.js.map
133
+ exports.default = Tree;
134
+ //# sourceMappingURL=tree.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tree.js","names":[],"sources":["../../../../packages/components/tree/tree.tsx"],"sourcesContent":["import { useEffect, useImperativeHandle, useRef, useState } from \"react\";\nimport \"./index.css\";\nimport { TreeList } from \"./item\";\nimport { ITree, ITreeItem } from \"./type\";\n\nconst defaultNodeProps = {\n\tkey: \"key\",\n\ttitle: \"title\",\n\tchildren: \"children\",\n};\n\nconst Tree = (props: ITree) => {\n\tconst {\n\t\tdata = [],\n\t\tref,\n\t\tselected,\n\t\tchecked = [],\n\t\tdisabledRelated,\n\t\tnodeProps,\n\t\tonItemSelect,\n\t\tonItemCheck,\n\t\t...restProps\n\t} = props;\n\tconst [selectedKey, setSelectedKey] = useState(selected);\n\tconst [checkedKeys, setCheckedKeys] = useState(checked);\n\tconst [partofs, setPartofs] = useState<Record<string, boolean>>({});\n\tconst nodeMapsRef = useRef<Map<any, any>>(new Map());\n\tconst oNodeProps = Object.assign({}, defaultNodeProps, nodeProps);\n\n\tconst isChecked = (key?: string) => checkedKeys.includes(key || \"\");\n\n\tconst checkItem = (\n\t\titem: ITreeItem,\n\t\tchecked: boolean,\n\t\tdirection?: \"root\" | \"leaf\"\n\t) => {\n\t\tconst { key = \"\", parent, children } = item;\n\t\tconst shouldChanged = { [key]: checked };\n\t\tconst partofs = { [key]: false };\n\n\t\tif (disabledRelated) return [shouldChanged];\n\n\t\tif (checked) {\n\t\t\tif (parent && direction !== \"leaf\") {\n\t\t\t\tconst hasUnchecked = parent.children?.some(\n\t\t\t\t\t(o) => o.key !== key && !isChecked(o.key)\n\t\t\t\t);\n\n\t\t\t\tconst [changes, parts] = checkItem(parent, true, \"root\");\n\n\t\t\t\tif (!hasUnchecked) {\n\t\t\t\t\tObject.assign(shouldChanged, changes);\n\t\t\t\t}\n\n\t\t\t\tObject.assign(partofs, hasUnchecked ? parts : {}, {\n\t\t\t\t\t[parent.key as string]: true,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (children?.length && direction !== \"root\") {\n\t\t\t\tchildren.map((o) => {\n\t\t\t\t\tif (isChecked(o.key)) return;\n\n\t\t\t\t\tconst [changes] = checkItem(o, true, \"leaf\");\n\n\t\t\t\t\tObject.assign(shouldChanged, changes);\n\t\t\t\t\tpartofs[o.key as string] = false;\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn [shouldChanged, partofs];\n\t\t}\n\n\t\tif (parent && direction !== \"leaf\") {\n\t\t\tconst [changes, parts] = checkItem(parent, false, \"root\");\n\n\t\t\tObject.assign(shouldChanged, changes);\n\n\t\t\tconst hasChecked = parent.children?.some(\n\t\t\t\t(o) => isChecked(o.key) && o.key !== key\n\t\t\t);\n\n\t\t\tObject.assign(partofs, hasChecked ? {} : parts, {\n\t\t\t\t[parent.key as string]: hasChecked,\n\t\t\t\t[key]: false,\n\t\t\t});\n\t\t}\n\t\tif (children?.length && direction !== \"root\") {\n\t\t\tchildren.map((o) => {\n\t\t\t\tconst [changes] = checkItem(o, false, \"leaf\");\n\n\t\t\t\tif (!isChecked(o.key)) return;\n\n\t\t\t\tObject.assign(shouldChanged, changes);\n\t\t\t\tpartofs[o.key as string] = false;\n\t\t\t});\n\t\t}\n\n\t\treturn [shouldChanged, partofs];\n\t};\n\n\tconst handleCheck = (item: ITreeItem, checked: boolean) => {\n\t\tconst [shouldChanged, partofs] = checkItem(item, checked);\n\t\tconst changedKeys = Object.keys(shouldChanged);\n\n\t\tconst nextChecked = checked\n\t\t\t? Array.from(new Set([...checkedKeys, ...changedKeys]))\n\t\t\t: checkedKeys.filter((k) => !changedKeys.includes(k));\n\n\t\tsetCheckedKeys(nextChecked);\n\t\tsetPartofs((p) => ({ ...p, ...partofs }));\n\t\tonItemCheck?.(item, checked, nextChecked);\n\t};\n\n\tconst handleSelect = (key: string, item: ITreeItem) => {\n\t\tif (!props.selectable) return;\n\n\t\tsetSelectedKey(key);\n\t\tonItemSelect?.(key, item);\n\t};\n\n\tuseEffect(() => {\n\t\tif (selected === undefined) return;\n\n\t\tsetSelectedKey(selected);\n\t}, [selected]);\n\n\tuseEffect(() => {\n\t\tnodeMapsRef.current.clear();\n\n\t\tconst { key, children } = oNodeProps;\n\t\tconst recursive = (nodes) => {\n\t\t\tnodes.map((o) => {\n\t\t\t\tnodeMapsRef.current.set(o[key], o);\n\n\t\t\t\to[children]?.length > 0 && recursive(o[children]);\n\t\t\t});\n\t\t};\n\n\t\trecursive(data);\n\t}, [data]);\n\n\tuseImperativeHandle(ref, () => {\n\t\treturn {\n\t\t\tgetChecked: () => {\n\t\t\t\tconst items: ITreeItem[] = [];\n\t\t\t\tcheckedKeys.map((k) => {\n\t\t\t\t\tconst item = nodeMapsRef.current.get(k);\n\t\t\t\t\titems.push(item);\n\t\t\t\t});\n\t\t\t\treturn [checkedKeys, items];\n\t\t\t},\n\t\t\tgetSelected: () => {\n\t\t\t\tconst item = nodeMapsRef.current.get(selectedKey);\n\t\t\t\treturn [selectedKey, item];\n\t\t\t},\n\t\t\tgetPartofs: () => {\n\t\t\t\tconst items: ITreeItem[] = [];\n\t\t\t\tconst keys = Object.keys(partofs).filter((k) => {\n\t\t\t\t\tconst indeterminate = partofs[k];\n\n\t\t\t\t\tif (indeterminate) {\n\t\t\t\t\t\tconst item = nodeMapsRef.current.get(k);\n\t\t\t\t\t\titems.push(item);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn indeterminate;\n\t\t\t\t});\n\n\t\t\t\treturn [keys, items];\n\t\t\t},\n\t\t};\n\t});\n\n\treturn (\n\t\t<TreeList\n\t\t\tdata={data}\n\t\t\tselected={selectedKey}\n\t\t\tchecked={checkedKeys}\n\t\t\tpartofs={partofs}\n\t\t\tnodeProps={oNodeProps}\n\t\t\tonItemCheck={handleCheck}\n\t\t\tonItemSelect={handleSelect}\n\t\t\t{...restProps}\n\t\t/>\n\t);\n};\n\nexport default Tree;\n"],"mappings":""}
1
+ {"version":3,"file":"tree.js","sources":["../../../../packages/components/tree/tree.tsx"],"sourcesContent":["import { useEffect, useImperativeHandle, useRef, useState } from \"react\";\r\nimport \"./index.css\";\r\nimport { TreeList } from \"./item\";\r\nimport { ITree, ITreeItem } from \"./type\";\r\n\r\nconst defaultNodeProps = {\r\n\tkey: \"key\",\r\n\ttitle: \"title\",\r\n\tchildren: \"children\",\r\n};\r\n\r\nconst Tree = (props: ITree) => {\r\n\tconst {\r\n\t\tdata = [],\r\n\t\tref,\r\n\t\tselected,\r\n\t\tchecked = [],\r\n\t\tdisabledRelated,\r\n\t\tnodeProps,\r\n\t\tonItemSelect,\r\n\t\tonItemCheck,\r\n\t\t...restProps\r\n\t} = props;\r\n\tconst [selectedKey, setSelectedKey] = useState(selected);\r\n\tconst [checkedKeys, setCheckedKeys] = useState(checked);\r\n\tconst [partofs, setPartofs] = useState<Record<string, boolean>>({});\r\n\tconst nodeMapsRef = useRef<Map<any, any>>(new Map());\r\n\tconst oNodeProps = Object.assign({}, defaultNodeProps, nodeProps);\r\n\r\n\tconst isChecked = (key?: string) => checkedKeys.includes(key || \"\");\r\n\r\n\tconst checkItem = (\r\n\t\titem: ITreeItem,\r\n\t\tchecked: boolean,\r\n\t\tdirection?: \"root\" | \"leaf\"\r\n\t) => {\r\n\t\tconst { key = \"\", parent, children } = item;\r\n\t\tconst shouldChanged = { [key]: checked };\r\n\t\tconst partofs = { [key]: false };\r\n\r\n\t\tif (disabledRelated) return [shouldChanged];\r\n\r\n\t\tif (checked) {\r\n\t\t\tif (parent && direction !== \"leaf\") {\r\n\t\t\t\tconst hasUnchecked = parent.children?.some(\r\n\t\t\t\t\t(o) => o.key !== key && !isChecked(o.key)\r\n\t\t\t\t);\r\n\r\n\t\t\t\tconst [changes, parts] = checkItem(parent, true, \"root\");\r\n\r\n\t\t\t\tif (!hasUnchecked) {\r\n\t\t\t\t\tObject.assign(shouldChanged, changes);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tObject.assign(partofs, hasUnchecked ? parts : {}, {\r\n\t\t\t\t\t[parent.key as string]: true,\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (children?.length && direction !== \"root\") {\r\n\t\t\t\tchildren.map((o) => {\r\n\t\t\t\t\tif (isChecked(o.key)) return;\r\n\r\n\t\t\t\t\tconst [changes] = checkItem(o, true, \"leaf\");\r\n\r\n\t\t\t\t\tObject.assign(shouldChanged, changes);\r\n\t\t\t\t\tpartofs[o.key as string] = false;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\treturn [shouldChanged, partofs];\r\n\t\t}\r\n\r\n\t\tif (parent && direction !== \"leaf\") {\r\n\t\t\tconst [changes, parts] = checkItem(parent, false, \"root\");\r\n\r\n\t\t\tObject.assign(shouldChanged, changes);\r\n\r\n\t\t\tconst hasChecked = parent.children?.some(\r\n\t\t\t\t(o) => isChecked(o.key) && o.key !== key\r\n\t\t\t);\r\n\r\n\t\t\tObject.assign(partofs, hasChecked ? {} : parts, {\r\n\t\t\t\t[parent.key as string]: hasChecked,\r\n\t\t\t\t[key]: false,\r\n\t\t\t});\r\n\t\t}\r\n\t\tif (children?.length && direction !== \"root\") {\r\n\t\t\tchildren.map((o) => {\r\n\t\t\t\tconst [changes] = checkItem(o, false, \"leaf\");\r\n\r\n\t\t\t\tif (!isChecked(o.key)) return;\r\n\r\n\t\t\t\tObject.assign(shouldChanged, changes);\r\n\t\t\t\tpartofs[o.key as string] = false;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn [shouldChanged, partofs];\r\n\t};\r\n\r\n\tconst handleCheck = (item: ITreeItem, checked: boolean) => {\r\n\t\tconst [shouldChanged, partofs] = checkItem(item, checked);\r\n\t\tconst changedKeys = Object.keys(shouldChanged);\r\n\r\n\t\tconst nextChecked = checked\r\n\t\t\t? Array.from(new Set([...checkedKeys, ...changedKeys]))\r\n\t\t\t: checkedKeys.filter((k) => !changedKeys.includes(k));\r\n\r\n\t\tsetCheckedKeys(nextChecked);\r\n\t\tsetPartofs((p) => ({ ...p, ...partofs }));\r\n\t\tonItemCheck?.(item, checked, nextChecked);\r\n\t};\r\n\r\n\tconst handleSelect = (key: string, item: ITreeItem) => {\r\n\t\tif (!props.selectable) return;\r\n\r\n\t\tsetSelectedKey(key);\r\n\t\tonItemSelect?.(key, item);\r\n\t};\r\n\r\n\tuseEffect(() => {\r\n\t\tif (selected === undefined) return;\r\n\r\n\t\tsetSelectedKey(selected);\r\n\t}, [selected]);\r\n\r\n\tuseEffect(() => {\r\n\t\tnodeMapsRef.current.clear();\r\n\r\n\t\tconst { key, children } = oNodeProps;\r\n\t\tconst recursive = (nodes) => {\r\n\t\t\tnodes.map((o) => {\r\n\t\t\t\tnodeMapsRef.current.set(o[key], o);\r\n\r\n\t\t\t\to[children]?.length > 0 && recursive(o[children]);\r\n\t\t\t});\r\n\t\t};\r\n\r\n\t\trecursive(data);\r\n\t}, [data]);\r\n\r\n\tuseImperativeHandle(ref, () => {\r\n\t\treturn {\r\n\t\t\tgetChecked: () => {\r\n\t\t\t\tconst items: ITreeItem[] = [];\r\n\t\t\t\tcheckedKeys.map((k) => {\r\n\t\t\t\t\tconst item = nodeMapsRef.current.get(k);\r\n\t\t\t\t\titems.push(item);\r\n\t\t\t\t});\r\n\t\t\t\treturn [checkedKeys, items];\r\n\t\t\t},\r\n\t\t\tgetSelected: () => {\r\n\t\t\t\tconst item = nodeMapsRef.current.get(selectedKey);\r\n\t\t\t\treturn [selectedKey, item];\r\n\t\t\t},\r\n\t\t\tgetPartofs: () => {\r\n\t\t\t\tconst items: ITreeItem[] = [];\r\n\t\t\t\tconst keys = Object.keys(partofs).filter((k) => {\r\n\t\t\t\t\tconst indeterminate = partofs[k];\r\n\r\n\t\t\t\t\tif (indeterminate) {\r\n\t\t\t\t\t\tconst item = nodeMapsRef.current.get(k);\r\n\t\t\t\t\t\titems.push(item);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn indeterminate;\r\n\t\t\t\t});\r\n\r\n\t\t\t\treturn [keys, items];\r\n\t\t\t},\r\n\t\t};\r\n\t});\r\n\r\n\treturn (\r\n\t\t<TreeList\r\n\t\t\tdata={data}\r\n\t\t\tselected={selectedKey}\r\n\t\t\tchecked={checkedKeys}\r\n\t\t\tpartofs={partofs}\r\n\t\t\tnodeProps={oNodeProps}\r\n\t\t\tonItemCheck={handleCheck}\r\n\t\t\tonItemSelect={handleSelect}\r\n\t\t\t{...restProps}\r\n\t\t/>\r\n\t);\r\n};\r\n\r\nexport default Tree;\r\n"],"names":["useState","useRef","useEffect","useImperativeHandle","_jsx","TreeList"],"mappings":";;;;;;;;AAKA,MAAM,gBAAgB,GAAG;AACxB,IAAA,GAAG,EAAE,KAAK;AACV,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,QAAQ,EAAE,UAAU;CACpB;AAED,MAAM,IAAI,GAAG,CAAC,KAAY,KAAI;IAC7B,MAAM,EACL,IAAI,GAAG,EAAE,EACT,GAAG,EACH,QAAQ,EACR,OAAO,GAAG,EAAE,EACZ,eAAe,EACf,SAAS,EACT,YAAY,EACZ,WAAW,EACX,GAAG,SAAS,EACZ,GAAG,KAAK;IACT,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAGA,cAAQ,CAAC,QAAQ,CAAC;IACxD,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAGA,cAAQ,CAAC,OAAO,CAAC;IACvD,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAGA,cAAQ,CAA0B,EAAE,CAAC;IACnE,MAAM,WAAW,GAAGC,YAAM,CAAgB,IAAI,GAAG,EAAE,CAAC;AACpD,IAAA,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,gBAAgB,EAAE,SAAS,CAAC;AAEjE,IAAA,MAAM,SAAS,GAAG,CAAC,GAAY,KAAK,WAAW,CAAC,QAAQ,CAAC,GAAG,IAAI,EAAE,CAAC;IAEnE,MAAM,SAAS,GAAG,CACjB,IAAe,EACf,OAAgB,EAChB,SAA2B,KACxB;QACH,MAAM,EAAE,GAAG,GAAG,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI;QAC3C,MAAM,aAAa,GAAG,EAAE,CAAC,GAAG,GAAG,OAAO,EAAE;QACxC,MAAM,OAAO,G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AW,EACrB,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,UAAU,EACrB,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,YAAY,EAAA,GACtB,SAAS,EAAA,CACZ;AAEJ;;;;"}
@@ -1,6 +1,10 @@
1
- //#region packages/components/upload/index.tsx
2
- var upload_default = require("./upload.js").default;
3
- //#endregion
4
- exports.default = upload_default;
1
+ 'use strict';
5
2
 
6
- //# sourceMappingURL=index.js.map
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var upload = require('./upload.js');
6
+
7
+
8
+
9
+ exports.default = upload.default;
10
+ //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["Upload"],"sources":["../../../../packages/components/upload/index.tsx"],"sourcesContent":["import Upload from \"./upload\";\n\nexport default Upload;\n"],"mappings":";AAEA,IAAA,wCAAeA"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}