one-design-next 0.0.4-alpha.57

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 (459) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +32 -0
  3. package/dist/_util/color.d.ts +103 -0
  4. package/dist/_util/color.js +250 -0
  5. package/dist/_util/date.d.ts +53 -0
  6. package/dist/_util/date.js +656 -0
  7. package/dist/_util/focusManager.d.ts +12 -0
  8. package/dist/_util/focusManager.js +56 -0
  9. package/dist/_util/queueMtPolyfill.d.ts +5 -0
  10. package/dist/_util/queueMtPolyfill.js +19 -0
  11. package/dist/_util/time.d.ts +44 -0
  12. package/dist/_util/time.js +150 -0
  13. package/dist/_util/useActive.d.ts +6 -0
  14. package/dist/_util/useActive.js +25 -0
  15. package/dist/alert/index.d.ts +63 -0
  16. package/dist/alert/index.js +137 -0
  17. package/dist/alert/style/index.css +199 -0
  18. package/dist/alert/style/index.d.ts +2 -0
  19. package/dist/alert/style/index.js +2 -0
  20. package/dist/auto-complete/index.d.ts +51 -0
  21. package/dist/auto-complete/index.js +104 -0
  22. package/dist/avatar/index.d.ts +68 -0
  23. package/dist/avatar/index.js +177 -0
  24. package/dist/avatar/primitive.d.ts +6 -0
  25. package/dist/avatar/primitive.js +23 -0
  26. package/dist/avatar/style/index.css +79 -0
  27. package/dist/avatar/style/index.d.ts +2 -0
  28. package/dist/avatar/style/index.js +2 -0
  29. package/dist/button/index.d.ts +15 -0
  30. package/dist/button/index.js +64 -0
  31. package/dist/button/style/index.css +347 -0
  32. package/dist/button/style/index.d.ts +2 -0
  33. package/dist/button/style/index.js +2 -0
  34. package/dist/calendar/index.d.ts +25 -0
  35. package/dist/calendar/index.js +379 -0
  36. package/dist/calendar/style/index.css +3 -0
  37. package/dist/calendar/style/index.d.ts +2 -0
  38. package/dist/calendar/style/index.js +2 -0
  39. package/dist/cascader/CascaderOptionContent.d.ts +20 -0
  40. package/dist/cascader/CascaderOptionContent.js +75 -0
  41. package/dist/cascader/Panel.d.ts +53 -0
  42. package/dist/cascader/Panel.js +116 -0
  43. package/dist/cascader/index.d.ts +54 -0
  44. package/dist/cascader/index.js +314 -0
  45. package/dist/cascader/style/index.css +458 -0
  46. package/dist/cascader/style/index.d.ts +2 -0
  47. package/dist/cascader/style/index.js +2 -0
  48. package/dist/cascader/utils.d.ts +12 -0
  49. package/dist/cascader/utils.js +85 -0
  50. package/dist/chart/index.d.ts +14 -0
  51. package/dist/chart/index.js +11 -0
  52. package/dist/chart/style/index.css +0 -0
  53. package/dist/chart/style/index.d.ts +2 -0
  54. package/dist/chart/style/index.js +2 -0
  55. package/dist/checkbox/Checkbox.d.ts +69 -0
  56. package/dist/checkbox/Checkbox.js +148 -0
  57. package/dist/checkbox/Context.d.ts +21 -0
  58. package/dist/checkbox/Context.js +2 -0
  59. package/dist/checkbox/Group.d.ts +49 -0
  60. package/dist/checkbox/Group.js +125 -0
  61. package/dist/checkbox/index.d.ts +5 -0
  62. package/dist/checkbox/index.js +3 -0
  63. package/dist/checkbox/style/index.css +306 -0
  64. package/dist/checkbox/style/index.d.ts +2 -0
  65. package/dist/checkbox/style/index.js +2 -0
  66. package/dist/collapse/index.d.ts +43 -0
  67. package/dist/collapse/index.js +111 -0
  68. package/dist/collapse/primitive.d.ts +21 -0
  69. package/dist/collapse/primitive.js +107 -0
  70. package/dist/collapse/style/index.css +63 -0
  71. package/dist/collapse/style/index.d.ts +2 -0
  72. package/dist/collapse/style/index.js +2 -0
  73. package/dist/color-picker/index.d.ts +55 -0
  74. package/dist/color-picker/index.js +588 -0
  75. package/dist/color-picker/style/index.css +153 -0
  76. package/dist/color-picker/style/index.d.ts +2 -0
  77. package/dist/color-picker/style/index.js +2 -0
  78. package/dist/config-provider/index.d.ts +46 -0
  79. package/dist/config-provider/index.js +37 -0
  80. package/dist/date-picker/MonthPicker.d.ts +15 -0
  81. package/dist/date-picker/MonthPicker.js +134 -0
  82. package/dist/date-picker/QuarterPicker.d.ts +15 -0
  83. package/dist/date-picker/QuarterPicker.js +135 -0
  84. package/dist/date-picker/YearPicker.d.ts +13 -0
  85. package/dist/date-picker/YearPicker.js +81 -0
  86. package/dist/date-picker/index.d.ts +172 -0
  87. package/dist/date-picker/index.js +1138 -0
  88. package/dist/date-picker/style/index.css +548 -0
  89. package/dist/date-picker/style/index.d.ts +2 -0
  90. package/dist/date-picker/style/index.js +2 -0
  91. package/dist/date-range-picker/index.d.ts +46 -0
  92. package/dist/date-range-picker/index.js +1034 -0
  93. package/dist/dialog/index.d.ts +132 -0
  94. package/dist/dialog/index.js +282 -0
  95. package/dist/dialog/style/index.css +252 -0
  96. package/dist/dialog/style/index.d.ts +2 -0
  97. package/dist/dialog/style/index.js +2 -0
  98. package/dist/dialog/useModalPosition.d.ts +6 -0
  99. package/dist/dialog/useModalPosition.js +34 -0
  100. package/dist/drawer/index.d.ts +76 -0
  101. package/dist/drawer/index.js +186 -0
  102. package/dist/drawer/style/index.css +235 -0
  103. package/dist/drawer/style/index.d.ts +2 -0
  104. package/dist/drawer/style/index.js +2 -0
  105. package/dist/dropdown/index.d.ts +86 -0
  106. package/dist/dropdown/index.js +836 -0
  107. package/dist/dropdown/style/index.css +236 -0
  108. package/dist/dropdown/style/index.d.ts +2 -0
  109. package/dist/dropdown/style/index.js +2 -0
  110. package/dist/hover-fill/index.d.ts +43 -0
  111. package/dist/hover-fill/index.js +222 -0
  112. package/dist/hover-fill/style/index.css +38 -0
  113. package/dist/hover-fill/style/index.d.ts +2 -0
  114. package/dist/hover-fill/style/index.js +2 -0
  115. package/dist/icon/index.d.ts +11 -0
  116. package/dist/icon/index.js +95 -0
  117. package/dist/icon/style/index.css +15 -0
  118. package/dist/icon/style/index.d.ts +2 -0
  119. package/dist/icon/style/index.js +2 -0
  120. package/dist/icon/svg/alert/alert-circle-filled.svg +1 -0
  121. package/dist/icon/svg/alert/alert-circle.svg +1 -0
  122. package/dist/icon/svg/alert/help-circle-filled.svg +1 -0
  123. package/dist/icon/svg/alert/help-circle.svg +1 -0
  124. package/dist/icon/svg/alert/info-circle-filled.svg +1 -0
  125. package/dist/icon/svg/alert/info-circle.svg +1 -0
  126. package/dist/icon/svg/alert/stop.svg +1 -0
  127. package/dist/icon/svg/alert/warning-filled.svg +1 -0
  128. package/dist/icon/svg/alert/warning.svg +1 -0
  129. package/dist/icon/svg/content/QRcode.svg +1 -0
  130. package/dist/icon/svg/content/bell-filled.svg +1 -0
  131. package/dist/icon/svg/content/bell.svg +1 -0
  132. package/dist/icon/svg/content/bidding.svg +1 -0
  133. package/dist/icon/svg/content/calendar.svg +1 -0
  134. package/dist/icon/svg/content/code.svg +1 -0
  135. package/dist/icon/svg/content/customColumn.svg +1 -0
  136. package/dist/icon/svg/content/data.svg +1 -0
  137. package/dist/icon/svg/content/dataReport-filled.svg +1 -0
  138. package/dist/icon/svg/content/dataReport.svg +1 -0
  139. package/dist/icon/svg/content/download-1.svg +1 -0
  140. package/dist/icon/svg/content/download-filled.svg +1 -0
  141. package/dist/icon/svg/content/download.svg +1 -0
  142. package/dist/icon/svg/content/exchange.svg +1 -0
  143. package/dist/icon/svg/content/filter-filled.svg +1 -0
  144. package/dist/icon/svg/content/filter.svg +1 -0
  145. package/dist/icon/svg/content/hot-filled.svg +1 -0
  146. package/dist/icon/svg/content/hot.svg +1 -0
  147. package/dist/icon/svg/content/link.svg +1 -0
  148. package/dist/icon/svg/content/location.svg +1 -0
  149. package/dist/icon/svg/content/maxSize.svg +1 -0
  150. package/dist/icon/svg/content/mobile-filled.svg +1 -0
  151. package/dist/icon/svg/content/mobile.svg +1 -0
  152. package/dist/icon/svg/content/mute.svg +1 -0
  153. package/dist/icon/svg/content/mutiImage-filled.svg +1 -0
  154. package/dist/icon/svg/content/mutiImage.svg +1 -0
  155. package/dist/icon/svg/content/refresh.svg +1 -0
  156. package/dist/icon/svg/content/report.svg +1 -0
  157. package/dist/icon/svg/content/save.svg +1 -0
  158. package/dist/icon/svg/content/search-bold.svg +1 -0
  159. package/dist/icon/svg/content/search-filled.svg +1 -0
  160. package/dist/icon/svg/content/search.svg +1 -0
  161. package/dist/icon/svg/content/setting.svg +1 -0
  162. package/dist/icon/svg/content/share.svg +1 -0
  163. package/dist/icon/svg/content/sort.svg +1 -0
  164. package/dist/icon/svg/content/sound.svg +1 -0
  165. package/dist/icon/svg/content/sticker-filled.svg +1 -0
  166. package/dist/icon/svg/content/sticker.svg +1 -0
  167. package/dist/icon/svg/content/tag-filled.svg +1 -0
  168. package/dist/icon/svg/content/tag.svg +1 -0
  169. package/dist/icon/svg/content/thumbDown-filled.svg +1 -0
  170. package/dist/icon/svg/content/thumbDown.svg +1 -0
  171. package/dist/icon/svg/content/thumbUp-filled.svg +1 -0
  172. package/dist/icon/svg/content/thumbUp.svg +1 -0
  173. package/dist/icon/svg/content/time-bold.svg +1 -0
  174. package/dist/icon/svg/content/time.svg +1 -0
  175. package/dist/icon/svg/content/verify.svg +1 -0
  176. package/dist/icon/svg/content/video.svg +1 -0
  177. package/dist/icon/svg/content/videoScreenshot.svg +1 -0
  178. package/dist/icon/svg/content/zoomIn.svg +1 -0
  179. package/dist/icon/svg/content/zoomOut.svg +1 -0
  180. package/dist/icon/svg/data/compare.svg +1 -0
  181. package/dist/icon/svg/data/histogram.svg +1 -0
  182. package/dist/icon/svg/editor/cancel-circle-filled.svg +1 -0
  183. package/dist/icon/svg/editor/cancel-circle.svg +1 -0
  184. package/dist/icon/svg/editor/cancel.svg +1 -0
  185. package/dist/icon/svg/editor/check-circle-filled.svg +1 -0
  186. package/dist/icon/svg/editor/check-circle.svg +1 -0
  187. package/dist/icon/svg/editor/check.svg +1 -0
  188. package/dist/icon/svg/editor/copy.svg +1 -0
  189. package/dist/icon/svg/editor/custom-filled.svg +1 -0
  190. package/dist/icon/svg/editor/custom.svg +1 -0
  191. package/dist/icon/svg/editor/delete.svg +1 -0
  192. package/dist/icon/svg/editor/deleteAD-filled.svg +1 -0
  193. package/dist/icon/svg/editor/draggable.svg +1 -0
  194. package/dist/icon/svg/editor/edit.svg +1 -0
  195. package/dist/icon/svg/editor/import.svg +1 -0
  196. package/dist/icon/svg/editor/minus-circle-filled.svg +1 -0
  197. package/dist/icon/svg/editor/minus-circle.svg +1 -0
  198. package/dist/icon/svg/editor/minus.svg +1 -0
  199. package/dist/icon/svg/editor/modify-bold.svg +1 -0
  200. package/dist/icon/svg/editor/modify.svg +1 -0
  201. package/dist/icon/svg/editor/multiCreate.svg +1 -0
  202. package/dist/icon/svg/editor/mutiSelect-filled.svg +1 -0
  203. package/dist/icon/svg/editor/mutiSelect.svg +1 -0
  204. package/dist/icon/svg/editor/pause-filled.svg +1 -0
  205. package/dist/icon/svg/editor/play-filled.svg +1 -0
  206. package/dist/icon/svg/editor/plus-circle-filled.svg +1 -0
  207. package/dist/icon/svg/editor/plus-circle.svg +1 -0
  208. package/dist/icon/svg/editor/plus.svg +1 -0
  209. package/dist/icon/svg/editor/send.svg +1 -0
  210. package/dist/icon/svg/editor/subdivide.svg +1 -0
  211. package/dist/icon/svg/navigation/arrowDown-filled.svg +1 -0
  212. package/dist/icon/svg/navigation/arrowDown.svg +1 -0
  213. package/dist/icon/svg/navigation/arrowLeft-filled.svg +1 -0
  214. package/dist/icon/svg/navigation/arrowLeft.svg +1 -0
  215. package/dist/icon/svg/navigation/arrowRight-filled.svg +1 -0
  216. package/dist/icon/svg/navigation/arrowRight.svg +1 -0
  217. package/dist/icon/svg/navigation/arrowUp-filled.svg +1 -0
  218. package/dist/icon/svg/navigation/arrowUp.svg +1 -0
  219. package/dist/icon/svg/navigation/bottom-filled.svg +1 -0
  220. package/dist/icon/svg/navigation/bottom.svg +1 -0
  221. package/dist/icon/svg/navigation/doubleLeft-filled.svg +1 -0
  222. package/dist/icon/svg/navigation/doubleLeft.svg +1 -0
  223. package/dist/icon/svg/navigation/doubleRight-filled.svg +1 -0
  224. package/dist/icon/svg/navigation/doubleRight.svg +1 -0
  225. package/dist/icon/svg/navigation/down-bold.svg +1 -0
  226. package/dist/icon/svg/navigation/down-filled.svg +1 -0
  227. package/dist/icon/svg/navigation/down.svg +1 -0
  228. package/dist/icon/svg/navigation/fall-filled.svg +1 -0
  229. package/dist/icon/svg/navigation/fold.svg +1 -0
  230. package/dist/icon/svg/navigation/fullScreen.svg +1 -0
  231. package/dist/icon/svg/navigation/left-bold.svg +1 -0
  232. package/dist/icon/svg/navigation/left-filled.svg +1 -0
  233. package/dist/icon/svg/navigation/left.svg +1 -0
  234. package/dist/icon/svg/navigation/leftFirst-filled.svg +1 -0
  235. package/dist/icon/svg/navigation/leftFirst.svg +1 -0
  236. package/dist/icon/svg/navigation/logout.svg +1 -0
  237. package/dist/icon/svg/navigation/menu.svg +1 -0
  238. package/dist/icon/svg/navigation/menuLeft-bold.svg +1 -0
  239. package/dist/icon/svg/navigation/menuLeft.svg +1 -0
  240. package/dist/icon/svg/navigation/menuRight-bold.svg +1 -0
  241. package/dist/icon/svg/navigation/menuRight.svg +1 -0
  242. package/dist/icon/svg/navigation/more-vertical.svg +1 -0
  243. package/dist/icon/svg/navigation/more.svg +1 -0
  244. package/dist/icon/svg/navigation/pointerLeft-filled.svg +1 -0
  245. package/dist/icon/svg/navigation/pointerRight-filled.svg +1 -0
  246. package/dist/icon/svg/navigation/right-bold.svg +1 -0
  247. package/dist/icon/svg/navigation/right-filled.svg +1 -0
  248. package/dist/icon/svg/navigation/right.svg +1 -0
  249. package/dist/icon/svg/navigation/rightLast-filled.svg +1 -0
  250. package/dist/icon/svg/navigation/rightLast.svg +1 -0
  251. package/dist/icon/svg/navigation/rise-filled.svg +1 -0
  252. package/dist/icon/svg/navigation/top-filled.svg +1 -0
  253. package/dist/icon/svg/navigation/top.svg +1 -0
  254. package/dist/icon/svg/navigation/unfold-filled.svg +1 -0
  255. package/dist/icon/svg/navigation/unfold.svg +1 -0
  256. package/dist/icon/svg/navigation/up-bold.svg +1 -0
  257. package/dist/icon/svg/navigation/up-filled.svg +1 -0
  258. package/dist/icon/svg/navigation/up.svg +1 -0
  259. package/dist/icon/svg/product/AIFile.svg +1 -0
  260. package/dist/icon/svg/product/LandingPage.svg +1 -0
  261. package/dist/icon/svg/product/addressBook.svg +1 -0
  262. package/dist/icon/svg/product/alarmClock.svg +1 -0
  263. package/dist/icon/svg/product/asset-square.svg +1 -0
  264. package/dist/icon/svg/product/assetProtecting.svg +1 -0
  265. package/dist/icon/svg/product/autoAD-square-filled.svg +1 -0
  266. package/dist/icon/svg/product/channels-square-filled.svg +1 -0
  267. package/dist/icon/svg/product/channels.svg +1 -0
  268. package/dist/icon/svg/product/chatBubble-filled.svg +1 -0
  269. package/dist/icon/svg/product/checkBadge.svg +1 -0
  270. package/dist/icon/svg/product/comments.svg +1 -0
  271. package/dist/icon/svg/product/container.svg +1 -0
  272. package/dist/icon/svg/product/dataAuth.svg +1 -0
  273. package/dist/icon/svg/product/dataBoard.svg +1 -0
  274. package/dist/icon/svg/product/dataBox.svg +1 -0
  275. package/dist/icon/svg/product/dataFolder.svg +1 -0
  276. package/dist/icon/svg/product/dataRising.svg +1 -0
  277. package/dist/icon/svg/product/detect.svg +1 -0
  278. package/dist/icon/svg/product/exposure-filled.svg +1 -0
  279. package/dist/icon/svg/product/extendedConfig.svg +1 -0
  280. package/dist/icon/svg/product/file-filled.svg +1 -0
  281. package/dist/icon/svg/product/flag.svg +1 -0
  282. package/dist/icon/svg/product/folderZip.svg +1 -0
  283. package/dist/icon/svg/product/folderzip-bold.svg +1 -0
  284. package/dist/icon/svg/product/guideBook.svg +1 -0
  285. package/dist/icon/svg/product/hosting.svg +1 -0
  286. package/dist/icon/svg/product/icon-outlined.svg +1 -0
  287. package/dist/icon/svg/product/idea-bold.svg +1 -0
  288. package/dist/icon/svg/product/idea.svg +1 -0
  289. package/dist/icon/svg/product/image-bold.svg +1 -0
  290. package/dist/icon/svg/product/image-filled.svg +1 -0
  291. package/dist/icon/svg/product/image.svg +1 -0
  292. package/dist/icon/svg/product/images.svg +1 -0
  293. package/dist/icon/svg/product/keyword.svg +1 -0
  294. package/dist/icon/svg/product/linkSquare.svg +1 -0
  295. package/dist/icon/svg/product/lock.svg +1 -0
  296. package/dist/icon/svg/product/magic-filled.svg +1 -0
  297. package/dist/icon/svg/product/magic.svg +1 -0
  298. package/dist/icon/svg/product/miniProgram.svg +1 -0
  299. package/dist/icon/svg/product/minigame-filled.svg +1 -0
  300. package/dist/icon/svg/product/mobilePage.svg +1 -0
  301. package/dist/icon/svg/product/moments-filled.svg +1 -0
  302. package/dist/icon/svg/product/notepad-bold.svg +1 -0
  303. package/dist/icon/svg/product/notepad.svg +1 -0
  304. package/dist/icon/svg/product/offiaccount-filled.svg +1 -0
  305. package/dist/icon/svg/product/playing.svg +1 -0
  306. package/dist/icon/svg/product/qualification.svg +1 -0
  307. package/dist/icon/svg/product/quickFile.svg +1 -0
  308. package/dist/icon/svg/product/ringStruckture.svg +1 -0
  309. package/dist/icon/svg/product/searchAD-filled.svg +1 -0
  310. package/dist/icon/svg/product/searchAD.svg +1 -0
  311. package/dist/icon/svg/product/shield-filled.svg +1 -0
  312. package/dist/icon/svg/product/shield.svg +1 -0
  313. package/dist/icon/svg/product/shop.svg +1 -0
  314. package/dist/icon/svg/product/shopping.svg +1 -0
  315. package/dist/icon/svg/product/star-filled.svg +1 -0
  316. package/dist/icon/svg/product/star.svg +1 -0
  317. package/dist/icon/svg/product/support-bold.svg +1 -0
  318. package/dist/icon/svg/product/target.svg +1 -0
  319. package/dist/icon/svg/product/targeting.svg +1 -0
  320. package/dist/icon/svg/product/task-filled.svg +1 -0
  321. package/dist/icon/svg/product/task.svg +1 -0
  322. package/dist/icon/svg/product/template.svg +1 -0
  323. package/dist/icon/svg/product/templateBag.svg +1 -0
  324. package/dist/icon/svg/product/text.svg +1 -0
  325. package/dist/icon/svg/product/treeStructure.svg +1 -0
  326. package/dist/icon/svg/product/user-circle.svg +1 -0
  327. package/dist/icon/svg/product/userList.svg +1 -0
  328. package/dist/icon/svg/product/userPack.svg +1 -0
  329. package/dist/icon/svg/product/users-bold.svg +1 -0
  330. package/dist/icon/svg/product/users.svg +1 -0
  331. package/dist/icon/svg/product/videoBag-filled.svg +1 -0
  332. package/dist/icon/svg/product/viewMask.svg +1 -0
  333. package/dist/icon/svg/product/wallet.svg +1 -0
  334. package/dist/icon/svg/product/wechatBubble-filled.svg +1 -0
  335. package/dist/icon/svg/product/wechatBubble.svg +1 -0
  336. package/dist/icon/svg/product/wechatSearch.svg +1 -0
  337. package/dist/icon/svg/product/writing.svg +1 -0
  338. package/dist/icon/svg-data.d.ts +221 -0
  339. package/dist/icon/svg-data.js +224 -0
  340. package/dist/icon/test-icons.html +122 -0
  341. package/dist/icon/types.d.ts +3 -0
  342. package/dist/icon/types.js +10 -0
  343. package/dist/index.d.ts +43 -0
  344. package/dist/index.js +46 -0
  345. package/dist/input/index.d.ts +80 -0
  346. package/dist/input/index.js +437 -0
  347. package/dist/input/style/index.css +256 -0
  348. package/dist/input/style/index.d.ts +2 -0
  349. package/dist/input/style/index.js +2 -0
  350. package/dist/input-number/index.d.ts +36 -0
  351. package/dist/input-number/index.js +429 -0
  352. package/dist/input-number/style/index.css +70 -0
  353. package/dist/input-number/style/index.d.ts +2 -0
  354. package/dist/input-number/style/index.js +2 -0
  355. package/dist/input-otp/index.d.ts +71 -0
  356. package/dist/input-otp/index.js +87 -0
  357. package/dist/input-otp/style/index.css +114 -0
  358. package/dist/input-otp/style/index.d.ts +2 -0
  359. package/dist/input-otp/style/index.js +2 -0
  360. package/dist/message/MessageBase.d.ts +86 -0
  361. package/dist/message/MessageBase.js +395 -0
  362. package/dist/message/MessageReact16.d.ts +2 -0
  363. package/dist/message/MessageReact16.js +86 -0
  364. package/dist/message/MessageReact18.d.ts +2 -0
  365. package/dist/message/MessageReact18.js +98 -0
  366. package/dist/message/index.d.ts +3 -0
  367. package/dist/message/index.js +7 -0
  368. package/dist/message/style/index.css +133 -0
  369. package/dist/message/style/index.d.ts +2 -0
  370. package/dist/message/style/index.js +2 -0
  371. package/dist/modal-base/gap.d.ts +14 -0
  372. package/dist/modal-base/gap.js +31 -0
  373. package/dist/modal-base/index.d.ts +26 -0
  374. package/dist/modal-base/index.js +110 -0
  375. package/dist/number-flow/index.d.ts +13 -0
  376. package/dist/number-flow/index.js +25 -0
  377. package/dist/number-flow/style/index.css +0 -0
  378. package/dist/number-flow/style/index.d.ts +2 -0
  379. package/dist/number-flow/style/index.js +2 -0
  380. package/dist/pagination/index.d.ts +38 -0
  381. package/dist/pagination/index.js +349 -0
  382. package/dist/pagination/style/index.css +128 -0
  383. package/dist/pagination/style/index.d.ts +2 -0
  384. package/dist/pagination/style/index.js +2 -0
  385. package/dist/pop-base/index.d.ts +123 -0
  386. package/dist/pop-base/index.js +349 -0
  387. package/dist/pop-base/mergeProps.d.ts +37 -0
  388. package/dist/pop-base/mergeProps.js +144 -0
  389. package/dist/pop-base/style/index.css +150 -0
  390. package/dist/pop-base/style/index.d.ts +2 -0
  391. package/dist/pop-base/style/index.js +2 -0
  392. package/dist/pop-base/useForkRef.d.ts +5 -0
  393. package/dist/pop-base/useForkRef.js +52 -0
  394. package/dist/popover/index.d.ts +4 -0
  395. package/dist/popover/index.js +9 -0
  396. package/dist/radio/index.d.ts +21 -0
  397. package/dist/radio/index.js +45 -0
  398. package/dist/radio/primitive.d.ts +5 -0
  399. package/dist/radio/primitive.js +28 -0
  400. package/dist/radio/style/index.css +219 -0
  401. package/dist/radio/style/index.d.ts +2 -0
  402. package/dist/radio/style/index.js +2 -0
  403. package/dist/scroll-area/index.d.ts +24 -0
  404. package/dist/scroll-area/index.js +96 -0
  405. package/dist/scroll-area/style/index.css +77 -0
  406. package/dist/scroll-area/style/index.d.ts +2 -0
  407. package/dist/scroll-area/style/index.js +2 -0
  408. package/dist/select/index.d.ts +85 -0
  409. package/dist/select/index.js +262 -0
  410. package/dist/select/style/index.css +1736 -0
  411. package/dist/select/style/index.d.ts +2 -0
  412. package/dist/select/style/index.js +2 -0
  413. package/dist/select/useIcons.d.ts +25 -0
  414. package/dist/select/useIcons.js +80 -0
  415. package/dist/slider/index.d.ts +69 -0
  416. package/dist/slider/index.js +264 -0
  417. package/dist/slider/style/index.css +237 -0
  418. package/dist/slider/style/index.d.ts +2 -0
  419. package/dist/slider/style/index.js +2 -0
  420. package/dist/style/base.css +298 -0
  421. package/dist/style/index.d.ts +6 -0
  422. package/dist/style/index.js +17 -0
  423. package/dist/switch/index.d.ts +12 -0
  424. package/dist/switch/index.js +55 -0
  425. package/dist/switch/style/index.css +152 -0
  426. package/dist/switch/style/index.d.ts +2 -0
  427. package/dist/switch/style/index.js +2 -0
  428. package/dist/table/TableCellContent.d.ts +20 -0
  429. package/dist/table/TableCellContent.js +77 -0
  430. package/dist/table/index.d.ts +97 -0
  431. package/dist/table/index.js +791 -0
  432. package/dist/table/style/index.css +320 -0
  433. package/dist/table/style/index.d.ts +2 -0
  434. package/dist/table/style/index.js +2 -0
  435. package/dist/table/useSelection.d.ts +13 -0
  436. package/dist/table/useSelection.js +259 -0
  437. package/dist/tabs/index.d.ts +51 -0
  438. package/dist/tabs/index.js +617 -0
  439. package/dist/tabs/style/index.css +369 -0
  440. package/dist/tabs/style/index.d.ts +2 -0
  441. package/dist/tabs/style/index.js +2 -0
  442. package/dist/text-swap/index.d.ts +58 -0
  443. package/dist/text-swap/index.js +280 -0
  444. package/dist/text-swap/style/index.css +32 -0
  445. package/dist/text-swap/style/index.d.ts +2 -0
  446. package/dist/text-swap/style/index.js +2 -0
  447. package/dist/time-picker/index.d.ts +67 -0
  448. package/dist/time-picker/index.js +945 -0
  449. package/dist/time-picker/style/index.css +166 -0
  450. package/dist/time-picker/style/index.d.ts +2 -0
  451. package/dist/time-picker/style/index.js +2 -0
  452. package/dist/tooltip/index.d.ts +10 -0
  453. package/dist/tooltip/index.js +178 -0
  454. package/dist/tree-select/index.d.ts +25 -0
  455. package/dist/tree-select/index.js +140 -0
  456. package/dist/tree-select/style/index.css +204 -0
  457. package/dist/tree-select/style/index.d.ts +1 -0
  458. package/dist/tree-select/style/index.js +1 -0
  459. package/package.json +124 -0
@@ -0,0 +1,791 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ var _excluded = ["dataSource", "columns", "bordered", "striped", "loading", "rowExpansion", "rowSelection", "sortBgVisible", "getCellProps", "getHeaderCellProps", "popoverIcon", "className", "style", "emptyText"],
3
+ _excluded2 = ["onSort", "title", "popover", "popoverProps", "popoverIcon"],
4
+ _excluded3 = ["onSort", "filters", "filteredValue", "filterMultiple", "onFilter", "onFilterChange", "title", "popover", "popoverProps", "popoverIcon", "ellipsisPopoverProps", "render"];
5
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
6
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
7
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
8
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
9
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
10
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
11
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
12
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
13
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
14
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
15
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
16
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
17
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
18
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
19
+ import RcTable from 'rc-table';
20
+ import React, { useState } from 'react';
21
+ import Button from "../button";
22
+ import Checkbox from "../checkbox";
23
+ import Icon from "../icon";
24
+ import Popover from "../popover";
25
+ import Radio from "../radio";
26
+ import "./style";
27
+ import TableCellContent from "./TableCellContent";
28
+ import { useSelection } from "./useSelection";
29
+
30
+ // 过滤器组件
31
+
32
+ var FilterComponent = function FilterComponent(_ref) {
33
+ var filters = _ref.filters,
34
+ filteredValue = _ref.filteredValue,
35
+ filterMultiple = _ref.filterMultiple,
36
+ onFilterChange = _ref.onFilterChange,
37
+ onVisibleChange = _ref.onVisibleChange;
38
+ // 内部临时状态
39
+ var _useState = useState(filteredValue || []),
40
+ _useState2 = _slicedToArray(_useState, 2),
41
+ tempFilteredValue = _useState2[0],
42
+ setTempFilteredValue = _useState2[1];
43
+
44
+ // 重置到当前外部状态
45
+ React.useEffect(function () {
46
+ setTempFilteredValue(filteredValue || []);
47
+ }, [filteredValue]);
48
+ var handleConfirm = function handleConfirm() {
49
+ onFilterChange(tempFilteredValue);
50
+ onVisibleChange(false);
51
+ };
52
+ var handleReset = function handleReset() {
53
+ setTempFilteredValue([]);
54
+ onFilterChange([]);
55
+ onVisibleChange(false);
56
+ };
57
+ return /*#__PURE__*/React.createElement("div", {
58
+ "data-odn-table-filter-dropdown": true
59
+ }, /*#__PURE__*/React.createElement("div", {
60
+ "data-odn-table-filter-menu": true
61
+ }, filterMultiple ? /*#__PURE__*/React.createElement(Checkbox.Group, {
62
+ vertical: true,
63
+ value: tempFilteredValue.map(function (v) {
64
+ return String(v);
65
+ }),
66
+ onChange: function onChange(checkedValues) {
67
+ var actualValues = checkedValues.map(function (v) {
68
+ var originalFilter = filters.find(function (f) {
69
+ return String(f.value) === v;
70
+ });
71
+ return originalFilter === null || originalFilter === void 0 ? void 0 : originalFilter.value;
72
+ }).filter(function (v) {
73
+ return v !== undefined;
74
+ });
75
+ setTempFilteredValue(actualValues);
76
+ },
77
+ options: filters.map(function (filter) {
78
+ return {
79
+ label: String(filter.text),
80
+ value: String(filter.value)
81
+ };
82
+ })
83
+ }) : /*#__PURE__*/React.createElement(Radio.Group, {
84
+ vertical: true,
85
+ value: tempFilteredValue.length > 0 ? String(tempFilteredValue[0]) : '',
86
+ onChange: function onChange(value) {
87
+ if (value) {
88
+ var _filters$find;
89
+ var originalValue = (_filters$find = filters.find(function (f) {
90
+ return String(f.value) === value;
91
+ })) === null || _filters$find === void 0 ? void 0 : _filters$find.value;
92
+ setTempFilteredValue(originalValue !== undefined ? [originalValue] : []);
93
+ } else {
94
+ setTempFilteredValue([]);
95
+ }
96
+ },
97
+ options: filters.map(function (filter) {
98
+ return {
99
+ label: String(filter.text),
100
+ value: String(filter.value)
101
+ };
102
+ })
103
+ })), /*#__PURE__*/React.createElement("div", {
104
+ "data-odn-table-filter-footer": true
105
+ }, /*#__PURE__*/React.createElement(Button, {
106
+ onClick: handleReset,
107
+ "data-odn-table-filter-reset": true,
108
+ light: true
109
+ }, "\u91CD\u7F6E"), /*#__PURE__*/React.createElement(Button, {
110
+ onClick: handleConfirm,
111
+ "data-odn-table-filter-confirm": true,
112
+ intent: "primary"
113
+ }, "\u786E\u5B9A")));
114
+ };
115
+ var Table = function Table(_ref2) {
116
+ var dataSource = _ref2.dataSource,
117
+ columns = _ref2.columns,
118
+ _ref2$bordered = _ref2.bordered,
119
+ bordered = _ref2$bordered === void 0 ? false : _ref2$bordered,
120
+ _ref2$striped = _ref2.striped,
121
+ striped = _ref2$striped === void 0 ? false : _ref2$striped,
122
+ _ref2$loading = _ref2.loading,
123
+ loading = _ref2$loading === void 0 ? false : _ref2$loading,
124
+ rowExpansion = _ref2.rowExpansion,
125
+ rowSelection = _ref2.rowSelection,
126
+ _ref2$sortBgVisible = _ref2.sortBgVisible,
127
+ sortBgVisible = _ref2$sortBgVisible === void 0 ? true : _ref2$sortBgVisible,
128
+ getCellProps = _ref2.getCellProps,
129
+ getHeaderCellProps = _ref2.getHeaderCellProps,
130
+ globalPopoverIcon = _ref2.popoverIcon,
131
+ className = _ref2.className,
132
+ style = _ref2.style,
133
+ emptyText = _ref2.emptyText,
134
+ props = _objectWithoutProperties(_ref2, _excluded);
135
+ // 渲染带 popover 的标题
136
+ var renderTitleWithPopover = function renderTitleWithPopover(titleContent, popover, popoverProps, popoverIcon) {
137
+ if (!popover) {
138
+ return titleContent;
139
+ }
140
+
141
+ // 优先使用列级别的 popoverIcon,如果没有则使用全局的 popoverIcon
142
+ var effectivePopoverIcon = popoverIcon || globalPopoverIcon;
143
+ if (effectivePopoverIcon) {
144
+ // 独立图标模式
145
+ return /*#__PURE__*/React.createElement(React.Fragment, null, titleContent, /*#__PURE__*/React.createElement(Popover, _extends({
146
+ popup: popover
147
+ }, popoverProps), /*#__PURE__*/React.createElement(Icon, {
148
+ name: effectivePopoverIcon,
149
+ "data-odn-table-popover-icon": true
150
+ })));
151
+ } else {
152
+ // 下划线模式
153
+ return /*#__PURE__*/React.createElement(Popover, _extends({
154
+ popup: popover
155
+ }, popoverProps), /*#__PURE__*/React.createElement("span", {
156
+ "data-odn-table-popover-text": true
157
+ }, titleContent));
158
+ }
159
+ };
160
+
161
+ // 处理自定义 render 函数,将结构化参数转换为 rc-table 期望的格式
162
+ var processColumns = function processColumns(cols) {
163
+ return cols.map(function (col, colIndex) {
164
+ if ('children' in col) {
165
+ // 列分组:递归处理子列
166
+ var onSort = col.onSort,
167
+ title = col.title,
168
+ popover = col.popover,
169
+ popoverProps = col.popoverProps,
170
+ popoverIcon = col.popoverIcon,
171
+ restCol = _objectWithoutProperties(col, _excluded2);
172
+ return _objectSpread(_objectSpread({}, restCol), {}, {
173
+ title: renderTitleWithPopover(title, popover, popoverProps, popoverIcon),
174
+ children: processColumns(col.children)
175
+ });
176
+ } else {
177
+ // 普通列:转换 render 函数和排序属性
178
+ var _onSort = col.onSort,
179
+ filters = col.filters,
180
+ _filteredValue = col.filteredValue,
181
+ _col$filterMultiple = col.filterMultiple,
182
+ filterMultiple = _col$filterMultiple === void 0 ? true : _col$filterMultiple,
183
+ onFilter = col.onFilter,
184
+ onFilterChange = col.onFilterChange,
185
+ _title = col.title,
186
+ _popover = col.popover,
187
+ _popoverProps = col.popoverProps,
188
+ _popoverIcon = col.popoverIcon,
189
+ ellipsisPopoverProps = col.ellipsisPopoverProps,
190
+ render = col.render,
191
+ _restCol = _objectWithoutProperties(col, _excluded3);
192
+
193
+ // 计算排序背景样式
194
+ var getSortBackgroundStyle = function getSortBackgroundStyle(rowIndex) {
195
+ var isHeader = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
196
+ if (!sortBgVisible || !col.sortOrder) return {};
197
+ var totalCells = dataSource.length + 1; // +1 for header
198
+ var cellIndex = isHeader ? 0 : rowIndex + 1;
199
+
200
+ // 根据排序方向调整渐变
201
+ var isAscend = col.sortOrder === 'ascend';
202
+
203
+ // 计算当前单元格在整体渐变中的位置范围 (0-1)
204
+ var cellStartPosition = cellIndex / totalCells;
205
+ var cellEndPosition = (cellIndex + 1) / totalCells;
206
+
207
+ // 计算当前单元格开始和结束位置对应的透明度
208
+ var getOpacityAtPosition = function getOpacityAtPosition(position) {
209
+ if (isAscend) {
210
+ // 升序:从 0 到 0.05
211
+ return position * 0.05;
212
+ } else {
213
+ // 降序:从 0.05 到 0
214
+ return (1 - position) * 0.05;
215
+ }
216
+ };
217
+ var startOpacity = getOpacityAtPosition(cellStartPosition);
218
+ var endOpacity = getOpacityAtPosition(cellEndPosition);
219
+
220
+ // 使用 color-mix 生成颜色
221
+ var startColor = "color-mix(in srgb, var(--odn-color-primary) ".concat(startOpacity * 100, "%, transparent)");
222
+ var endColor = "color-mix(in srgb, var(--odn-color-primary) ".concat(endOpacity * 100, "%, transparent)");
223
+ return {
224
+ background: "linear-gradient(180deg, ".concat(startColor, " 0%, ").concat(endColor, " 100%)")
225
+ };
226
+ };
227
+ return _objectSpread(_objectSpread({}, _restCol), {}, {
228
+ onCell: function onCell(row, index) {
229
+ var _col$getCellProps;
230
+ var rowIndex = index || 0;
231
+ var cellProps = getCellProps === null || getCellProps === void 0 ? void 0 : getCellProps({
232
+ row: row,
233
+ rowIndex: rowIndex,
234
+ col: col,
235
+ colIndex: colIndex
236
+ });
237
+ var colCellProps = (_col$getCellProps = col.getCellProps) === null || _col$getCellProps === void 0 ? void 0 : _col$getCellProps.call(col, {
238
+ row: row,
239
+ rowIndex: rowIndex
240
+ });
241
+ var sortBgStyle = getSortBackgroundStyle(rowIndex, false);
242
+ return _objectSpread(_objectSpread(_objectSpread({}, cellProps), colCellProps), {}, {
243
+ style: _objectSpread(_objectSpread(_objectSpread({}, cellProps === null || cellProps === void 0 ? void 0 : cellProps.style), colCellProps === null || colCellProps === void 0 ? void 0 : colCellProps.style), sortBgStyle)
244
+ });
245
+ },
246
+ onHeaderCell: function onHeaderCell() {
247
+ var _col$getHeaderCellPro;
248
+ var headerProps = getHeaderCellProps === null || getHeaderCellProps === void 0 ? void 0 : getHeaderCellProps({
249
+ col: col,
250
+ colIndex: colIndex
251
+ });
252
+ var colHeaderProps = (_col$getHeaderCellPro = col.getHeaderCellProps) === null || _col$getHeaderCellPro === void 0 ? void 0 : _col$getHeaderCellPro.call(col);
253
+ var sortBgStyle = getSortBackgroundStyle(0, true);
254
+ return _objectSpread(_objectSpread(_objectSpread({}, headerProps), colHeaderProps), {}, {
255
+ style: _objectSpread(_objectSpread(_objectSpread({}, headerProps === null || headerProps === void 0 ? void 0 : headerProps.style), colHeaderProps === null || colHeaderProps === void 0 ? void 0 : colHeaderProps.style), sortBgStyle)
256
+ });
257
+ },
258
+ render: col.render ? function (value, row, rowIndex) {
259
+ var renderedContent = col.render({
260
+ row: row,
261
+ col: col,
262
+ rowIndex: rowIndex,
263
+ colIndex: colIndex
264
+ });
265
+
266
+ // 如果启用了 ellipsis 且渲染的内容是字符串,使用 TableCellContent 包装
267
+ if (col.ellipsis && typeof renderedContent === 'string') {
268
+ return /*#__PURE__*/React.createElement(TableCellContent, {
269
+ content: renderedContent,
270
+ ellipsis: !!col.ellipsis,
271
+ popoverProps: ellipsisPopoverProps
272
+ });
273
+ }
274
+ return renderedContent;
275
+ } : col.ellipsis ? function (value) {
276
+ // 如果启用了 ellipsis 且值是字符串,使用 TableCellContent 包装
277
+ if (typeof value === 'string') {
278
+ return /*#__PURE__*/React.createElement(TableCellContent, {
279
+ content: value,
280
+ ellipsis: !!col.ellipsis,
281
+ popoverProps: ellipsisPopoverProps
282
+ });
283
+ }
284
+ return value;
285
+ } : undefined,
286
+ // 处理排序
287
+ sorter: _onSort ? true : undefined,
288
+ sortOrder: col.sortOrder,
289
+ title: function () {
290
+ // 创建过滤器组件
291
+ var FilterPopover = filters && filters.length > 0 ? function () {
292
+ var _useState3 = useState(false),
293
+ _useState4 = _slicedToArray(_useState3, 2),
294
+ visible = _useState4[0],
295
+ setVisible = _useState4[1];
296
+ return /*#__PURE__*/React.createElement(Popover, {
297
+ trigger: "click",
298
+ arrowed: false,
299
+ placement: "bottom",
300
+ popupStyle: {
301
+ padding: 0
302
+ },
303
+ visible: visible,
304
+ onVisibleChange: function onVisibleChange(vis) {
305
+ if (!vis) {
306
+ // 点击外层关闭时,执行确定操作
307
+ setVisible(false);
308
+ } else {
309
+ setVisible(true);
310
+ }
311
+ },
312
+ popup: /*#__PURE__*/React.createElement(FilterComponent, {
313
+ filters: filters,
314
+ filteredValue: _filteredValue,
315
+ filterMultiple: filterMultiple,
316
+ onFilterChange: onFilterChange,
317
+ onVisibleChange: setVisible
318
+ })
319
+ }, /*#__PURE__*/React.createElement("span", {
320
+ "data-odn-table-column-filter": true,
321
+ "data-odn-table-column-filter-active": _filteredValue && _filteredValue.length > 0
322
+ }, /*#__PURE__*/React.createElement(Icon, {
323
+ name: "filter-filled"
324
+ })));
325
+ }() : null;
326
+
327
+ // 渲染标题内容
328
+ if (_onSort && FilterPopover) {
329
+ // 既有排序又有过滤
330
+ return /*#__PURE__*/React.createElement("div", {
331
+ "data-odn-table-column-header": true
332
+ }, /*#__PURE__*/React.createElement("div", {
333
+ "data-odn-table-column-sorter": true,
334
+ "data-odn-table-column-sorter-order": col.sortOrder,
335
+ onClick: function onClick() {
336
+ // 切换排序状态:null → descend → ascend → null
337
+ var newSortOrder;
338
+ if (col.sortOrder === null || col.sortOrder === undefined) {
339
+ newSortOrder = 'descend';
340
+ } else if (col.sortOrder === 'descend') {
341
+ newSortOrder = 'ascend';
342
+ } else {
343
+ newSortOrder = null;
344
+ }
345
+ _onSort(newSortOrder);
346
+ }
347
+ }, /*#__PURE__*/React.createElement("div", {
348
+ "data-odn-table-column-sorter-title": true
349
+ }, renderTitleWithPopover(_title, _popover, _popoverProps, _popoverIcon)), /*#__PURE__*/React.createElement("span", {
350
+ "data-odn-table-column-sorter-inner": true,
351
+ "aria-hidden": "true"
352
+ }, /*#__PURE__*/React.createElement("svg", {
353
+ "data-odn-table-column-sorter-up": true,
354
+ viewBox: "0 0 16 16"
355
+ }, /*#__PURE__*/React.createElement("path", {
356
+ d: "M7.41437 2.73204C7.71461 2.35674 8.28543 2.35674 8.58567 2.73204L11.0252 5.78145C11.4181 6.27253 11.0684 6.99998 10.4396 6.99998L5.56049 6.99998C4.93161 6.99998 4.58198 6.27253 4.97484 5.78145L7.41437 2.73204Z"
357
+ })), /*#__PURE__*/React.createElement("svg", {
358
+ "data-odn-table-column-sorter-down": true,
359
+ viewBox: "0 0 16 16"
360
+ }, /*#__PURE__*/React.createElement("path", {
361
+ d: "M8.58567 13.2679C8.28543 13.6432 7.71461 13.6432 7.41437 13.2679L4.97484 10.2185C4.58198 9.72743 4.93161 8.99998 5.56049 8.99998H10.4396C11.0684 8.99998 11.4181 9.72743 11.0252 10.2185L8.58567 13.2679Z"
362
+ })))), FilterPopover);
363
+ } else if (_onSort) {
364
+ // 只有排序
365
+ return /*#__PURE__*/React.createElement("div", {
366
+ "data-odn-table-column-sorter": true,
367
+ "data-odn-table-column-sorter-order": col.sortOrder,
368
+ onClick: function onClick() {
369
+ // 切换排序状态:null → descend → ascend → null
370
+ var newSortOrder;
371
+ if (col.sortOrder === null || col.sortOrder === undefined) {
372
+ newSortOrder = 'descend';
373
+ } else if (col.sortOrder === 'descend') {
374
+ newSortOrder = 'ascend';
375
+ } else {
376
+ newSortOrder = null;
377
+ }
378
+ _onSort(newSortOrder);
379
+ }
380
+ }, /*#__PURE__*/React.createElement("div", {
381
+ "data-odn-table-column-sorter-title": true
382
+ }, renderTitleWithPopover(_title, _popover, _popoverProps, _popoverIcon)), /*#__PURE__*/React.createElement("span", {
383
+ "data-odn-table-column-sorter-inner": true,
384
+ "aria-hidden": "true"
385
+ }, /*#__PURE__*/React.createElement("svg", {
386
+ "data-odn-table-column-sorter-up": true,
387
+ viewBox: "0 0 16 16"
388
+ }, /*#__PURE__*/React.createElement("path", {
389
+ d: "M7.41437 2.73204C7.71461 2.35674 8.28543 2.35674 8.58567 2.73204L11.0252 5.78145C11.4181 6.27253 11.0684 6.99998 10.4396 6.99998L5.56049 6.99998C4.93161 6.99998 4.58198 6.27253 4.97484 5.78145L7.41437 2.73204Z"
390
+ })), /*#__PURE__*/React.createElement("svg", {
391
+ "data-odn-table-column-sorter-down": true,
392
+ viewBox: "0 0 16 16"
393
+ }, /*#__PURE__*/React.createElement("path", {
394
+ d: "M8.58567 13.2679C8.28543 13.6432 7.71461 13.6432 7.41437 13.2679L4.97484 10.2185C4.58198 9.72743 4.93161 8.99998 5.56049 8.99998H10.4396C11.0684 8.99998 11.4181 9.72743 11.0252 10.2185L8.58567 13.2679Z"
395
+ }))));
396
+ } else if (FilterPopover) {
397
+ // 只有过滤
398
+ return /*#__PURE__*/React.createElement("div", {
399
+ "data-odn-table-column-header": true
400
+ }, renderTitleWithPopover(_title, _popover, _popoverProps, _popoverIcon), FilterPopover);
401
+ } else {
402
+ // 既没有排序也没有过滤
403
+ return renderTitleWithPopover(_title, _popover, _popoverProps, _popoverIcon);
404
+ }
405
+ }()
406
+ });
407
+ }
408
+ });
409
+ };
410
+ var rcColumns = processColumns(columns);
411
+
412
+ // 使用 useSelection hook 处理行选择逻辑
413
+ var _useSelection = useSelection({
414
+ dataSource: dataSource,
415
+ rowSelection: rowSelection,
416
+ columns: rcColumns
417
+ }),
418
+ finalColumns = _useSelection.columns,
419
+ onSelectionRowClick = _useSelection.onRowClick;
420
+
421
+ // 是否支持行的操作,以下情况:
422
+ // 1. 行选择
423
+ // 2. 行展开
424
+ var trClickable = (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selectOnRowClick) || (rowExpansion === null || rowExpansion === void 0 ? void 0 : rowExpansion.expandOnRowClick);
425
+ return /*#__PURE__*/React.createElement("div", {
426
+ "data-odn-table": true,
427
+ "data-odn-table-bordered": bordered,
428
+ "data-odn-table-striped": striped,
429
+ "data-odn-table-tr-clickable": trClickable,
430
+ "data-odn-table-loading": loading,
431
+ className: className,
432
+ style: style
433
+ }, /*#__PURE__*/React.createElement(RcTable, _extends({
434
+ prefixCls: "odn-table",
435
+ data: dataSource,
436
+ columns: finalColumns,
437
+ rowKey: "key",
438
+ onRow: function onRow(row) {
439
+ return {
440
+ onClick: function onClick(e) {
441
+ onSelectionRowClick === null || onSelectionRowClick === void 0 || onSelectionRowClick(row, e);
442
+ }
443
+ };
444
+ },
445
+ expandable: rowExpansion ? _objectSpread(_objectSpread({
446
+ expandIcon: function expandIcon(params) {
447
+ var expanded = params.expanded,
448
+ onExpand = params.onExpand,
449
+ row = params.record;
450
+ var icon = expanded ? 'down' : 'right';
451
+ return /*#__PURE__*/React.createElement("div", {
452
+ onClick: function onClick(e) {
453
+ return onExpand(row, e);
454
+ }
455
+ }, /*#__PURE__*/React.createElement(Icon, {
456
+ name: icon,
457
+ "data-odn-table-expand-icon": true
458
+ }));
459
+ }
460
+ }, rowExpansion), {}, {
461
+ expandRowByClick: rowExpansion.expandOnRowClick,
462
+ expandedRowKeys: rowExpansion.expandedRowKeys,
463
+ onExpandedRowsChange: rowExpansion.onExpandedRowsChange ? function (keys) {
464
+ rowExpansion.onExpandedRowsChange(keys.map(String));
465
+ } : undefined
466
+ }) : undefined,
467
+ emptyText: emptyText || /*#__PURE__*/React.createElement("div", {
468
+ "data-odn-table-empty": true
469
+ }, /*#__PURE__*/React.createElement("svg", {
470
+ width: "66",
471
+ height: "68",
472
+ viewBox: "0 0 66 68",
473
+ fill: "none"
474
+ }, /*#__PURE__*/React.createElement("g", {
475
+ filter: "url(#filter0_d_946_245875)"
476
+ }, /*#__PURE__*/React.createElement("path", {
477
+ fillRule: "evenodd",
478
+ clipRule: "evenodd",
479
+ d: "M6 21C6 18.7909 7.79086 17 10 17H47C49.2091 17 51 18.7909 51 21V49C51 51.2091 49.2091 53 47 53H10C7.79086 53 6 51.2091 6 49V21Z",
480
+ fill: "url(#paint0_linear_946_245875)"
481
+ })), /*#__PURE__*/React.createElement("g", {
482
+ filter: "url(#filter1_d_946_245875)"
483
+ }, /*#__PURE__*/React.createElement("path", {
484
+ fillRule: "evenodd",
485
+ clipRule: "evenodd",
486
+ d: "M15 8.25C15 6.04086 16.7909 4.25 19 4.25H56C58.2091 4.25 60 6.04086 60 8.25V55.75C60 57.9591 58.2091 59.75 56 59.75H19C16.7909 59.75 15 57.9591 15 55.75V8.25Z",
487
+ fill: "url(#paint1_linear_946_245875)"
488
+ })), /*#__PURE__*/React.createElement("g", {
489
+ filter: "url(#filter2_d_946_245875)"
490
+ }, /*#__PURE__*/React.createElement("rect", {
491
+ x: "21.75",
492
+ y: "32.75",
493
+ width: "4.5",
494
+ height: "18.75",
495
+ rx: "2",
496
+ fill: "url(#paint2_linear_946_245875)"
497
+ })), /*#__PURE__*/React.createElement("g", {
498
+ filter: "url(#filter3_d_946_245875)"
499
+ }, /*#__PURE__*/React.createElement("rect", {
500
+ x: "30.75",
501
+ y: "27.5",
502
+ width: "4.5",
503
+ height: "24",
504
+ rx: "2",
505
+ fill: "url(#paint3_linear_946_245875)"
506
+ })), /*#__PURE__*/React.createElement("g", {
507
+ filter: "url(#filter4_d_946_245875)"
508
+ }, /*#__PURE__*/React.createElement("rect", {
509
+ x: "39.75",
510
+ y: "37.25",
511
+ width: "4.5",
512
+ height: "14.25",
513
+ rx: "2",
514
+ fill: "url(#paint4_linear_946_245875)"
515
+ })), /*#__PURE__*/React.createElement("g", {
516
+ filter: "url(#filter5_d_946_245875)"
517
+ }, /*#__PURE__*/React.createElement("rect", {
518
+ x: "48.75",
519
+ y: "35",
520
+ width: "4.5",
521
+ height: "16.5",
522
+ rx: "2",
523
+ fill: "url(#paint5_linear_946_245875)"
524
+ })), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("filter", {
525
+ id: "filter0_d_946_245875",
526
+ x: "0",
527
+ y: "13",
528
+ width: "57",
529
+ height: "48",
530
+ filterUnits: "userSpaceOnUse",
531
+ colorInterpolationFilters: "sRGB"
532
+ }, /*#__PURE__*/React.createElement("feFlood", {
533
+ floodOpacity: "0",
534
+ result: "BackgroundImageFix"
535
+ }), /*#__PURE__*/React.createElement("feColorMatrix", {
536
+ in: "SourceAlpha",
537
+ type: "matrix",
538
+ values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",
539
+ result: "hardAlpha"
540
+ }), /*#__PURE__*/React.createElement("feOffset", {
541
+ dy: "2"
542
+ }), /*#__PURE__*/React.createElement("feGaussianBlur", {
543
+ stdDeviation: "3"
544
+ }), /*#__PURE__*/React.createElement("feColorMatrix", {
545
+ type: "matrix",
546
+ values: "0 0 0 0 0.768627 0 0 0 0 0.780392 0 0 0 0 0.8 0 0 0 0.1 0"
547
+ }), /*#__PURE__*/React.createElement("feBlend", {
548
+ mode: "normal",
549
+ in2: "BackgroundImageFix",
550
+ result: "effect1_dropShadow_946_245875"
551
+ }), /*#__PURE__*/React.createElement("feBlend", {
552
+ mode: "normal",
553
+ in: "SourceGraphic",
554
+ in2: "effect1_dropShadow_946_245875",
555
+ result: "shape"
556
+ })), /*#__PURE__*/React.createElement("filter", {
557
+ id: "filter1_d_946_245875",
558
+ x: "9",
559
+ y: "0.25",
560
+ width: "57",
561
+ height: "67.5",
562
+ filterUnits: "userSpaceOnUse",
563
+ colorInterpolationFilters: "sRGB"
564
+ }, /*#__PURE__*/React.createElement("feFlood", {
565
+ floodOpacity: "0",
566
+ result: "BackgroundImageFix"
567
+ }), /*#__PURE__*/React.createElement("feColorMatrix", {
568
+ in: "SourceAlpha",
569
+ type: "matrix",
570
+ values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",
571
+ result: "hardAlpha"
572
+ }), /*#__PURE__*/React.createElement("feOffset", {
573
+ dy: "2"
574
+ }), /*#__PURE__*/React.createElement("feGaussianBlur", {
575
+ stdDeviation: "3"
576
+ }), /*#__PURE__*/React.createElement("feColorMatrix", {
577
+ type: "matrix",
578
+ values: "0 0 0 0 0.768627 0 0 0 0 0.780392 0 0 0 0 0.8 0 0 0 0.1 0"
579
+ }), /*#__PURE__*/React.createElement("feBlend", {
580
+ mode: "normal",
581
+ in2: "BackgroundImageFix",
582
+ result: "effect1_dropShadow_946_245875"
583
+ }), /*#__PURE__*/React.createElement("feBlend", {
584
+ mode: "normal",
585
+ in: "SourceGraphic",
586
+ in2: "effect1_dropShadow_946_245875",
587
+ result: "shape"
588
+ })), /*#__PURE__*/React.createElement("filter", {
589
+ id: "filter2_d_946_245875",
590
+ x: "15.75",
591
+ y: "28.75",
592
+ width: "16.5",
593
+ height: "30.75",
594
+ filterUnits: "userSpaceOnUse",
595
+ colorInterpolationFilters: "sRGB"
596
+ }, /*#__PURE__*/React.createElement("feFlood", {
597
+ floodOpacity: "0",
598
+ result: "BackgroundImageFix"
599
+ }), /*#__PURE__*/React.createElement("feColorMatrix", {
600
+ in: "SourceAlpha",
601
+ type: "matrix",
602
+ values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",
603
+ result: "hardAlpha"
604
+ }), /*#__PURE__*/React.createElement("feOffset", {
605
+ dy: "2"
606
+ }), /*#__PURE__*/React.createElement("feGaussianBlur", {
607
+ stdDeviation: "3"
608
+ }), /*#__PURE__*/React.createElement("feColorMatrix", {
609
+ type: "matrix",
610
+ values: "0 0 0 0 0.768627 0 0 0 0 0.780392 0 0 0 0 0.8 0 0 0 0.1 0"
611
+ }), /*#__PURE__*/React.createElement("feBlend", {
612
+ mode: "normal",
613
+ in2: "BackgroundImageFix",
614
+ result: "effect1_dropShadow_946_245875"
615
+ }), /*#__PURE__*/React.createElement("feBlend", {
616
+ mode: "normal",
617
+ in: "SourceGraphic",
618
+ in2: "effect1_dropShadow_946_245875",
619
+ result: "shape"
620
+ })), /*#__PURE__*/React.createElement("filter", {
621
+ id: "filter3_d_946_245875",
622
+ x: "24.75",
623
+ y: "23.5",
624
+ width: "16.5",
625
+ height: "36",
626
+ filterUnits: "userSpaceOnUse",
627
+ colorInterpolationFilters: "sRGB"
628
+ }, /*#__PURE__*/React.createElement("feFlood", {
629
+ floodOpacity: "0",
630
+ result: "BackgroundImageFix"
631
+ }), /*#__PURE__*/React.createElement("feColorMatrix", {
632
+ in: "SourceAlpha",
633
+ type: "matrix",
634
+ values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",
635
+ result: "hardAlpha"
636
+ }), /*#__PURE__*/React.createElement("feOffset", {
637
+ dy: "2"
638
+ }), /*#__PURE__*/React.createElement("feGaussianBlur", {
639
+ stdDeviation: "3"
640
+ }), /*#__PURE__*/React.createElement("feColorMatrix", {
641
+ type: "matrix",
642
+ values: "0 0 0 0 0.768627 0 0 0 0 0.780392 0 0 0 0 0.8 0 0 0 0.1 0"
643
+ }), /*#__PURE__*/React.createElement("feBlend", {
644
+ mode: "normal",
645
+ in2: "BackgroundImageFix",
646
+ result: "effect1_dropShadow_946_245875"
647
+ }), /*#__PURE__*/React.createElement("feBlend", {
648
+ mode: "normal",
649
+ in: "SourceGraphic",
650
+ in2: "effect1_dropShadow_946_245875",
651
+ result: "shape"
652
+ })), /*#__PURE__*/React.createElement("filter", {
653
+ id: "filter4_d_946_245875",
654
+ x: "33.75",
655
+ y: "33.25",
656
+ width: "16.5",
657
+ height: "26.25",
658
+ filterUnits: "userSpaceOnUse",
659
+ colorInterpolationFilters: "sRGB"
660
+ }, /*#__PURE__*/React.createElement("feFlood", {
661
+ floodOpacity: "0",
662
+ result: "BackgroundImageFix"
663
+ }), /*#__PURE__*/React.createElement("feColorMatrix", {
664
+ in: "SourceAlpha",
665
+ type: "matrix",
666
+ values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",
667
+ result: "hardAlpha"
668
+ }), /*#__PURE__*/React.createElement("feOffset", {
669
+ dy: "2"
670
+ }), /*#__PURE__*/React.createElement("feGaussianBlur", {
671
+ stdDeviation: "3"
672
+ }), /*#__PURE__*/React.createElement("feColorMatrix", {
673
+ type: "matrix",
674
+ values: "0 0 0 0 0.768627 0 0 0 0 0.780392 0 0 0 0 0.8 0 0 0 0.1 0"
675
+ }), /*#__PURE__*/React.createElement("feBlend", {
676
+ mode: "normal",
677
+ in2: "BackgroundImageFix",
678
+ result: "effect1_dropShadow_946_245875"
679
+ }), /*#__PURE__*/React.createElement("feBlend", {
680
+ mode: "normal",
681
+ in: "SourceGraphic",
682
+ in2: "effect1_dropShadow_946_245875",
683
+ result: "shape"
684
+ })), /*#__PURE__*/React.createElement("filter", {
685
+ id: "filter5_d_946_245875",
686
+ x: "42.75",
687
+ y: "31",
688
+ width: "16.5",
689
+ height: "28.5",
690
+ filterUnits: "userSpaceOnUse",
691
+ colorInterpolationFilters: "sRGB"
692
+ }, /*#__PURE__*/React.createElement("feFlood", {
693
+ floodOpacity: "0",
694
+ result: "BackgroundImageFix"
695
+ }), /*#__PURE__*/React.createElement("feColorMatrix", {
696
+ in: "SourceAlpha",
697
+ type: "matrix",
698
+ values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",
699
+ result: "hardAlpha"
700
+ }), /*#__PURE__*/React.createElement("feOffset", {
701
+ dy: "2"
702
+ }), /*#__PURE__*/React.createElement("feGaussianBlur", {
703
+ stdDeviation: "3"
704
+ }), /*#__PURE__*/React.createElement("feColorMatrix", {
705
+ type: "matrix",
706
+ values: "0 0 0 0 0.768627 0 0 0 0 0.780392 0 0 0 0 0.8 0 0 0 0.1 0"
707
+ }), /*#__PURE__*/React.createElement("feBlend", {
708
+ mode: "normal",
709
+ in2: "BackgroundImageFix",
710
+ result: "effect1_dropShadow_946_245875"
711
+ }), /*#__PURE__*/React.createElement("feBlend", {
712
+ mode: "normal",
713
+ in: "SourceGraphic",
714
+ in2: "effect1_dropShadow_946_245875",
715
+ result: "shape"
716
+ })), /*#__PURE__*/React.createElement("linearGradient", {
717
+ id: "paint0_linear_946_245875",
718
+ x1: "50.9543",
719
+ y1: "52.9268",
720
+ x2: "50.9543",
721
+ y2: "17",
722
+ gradientUnits: "userSpaceOnUse"
723
+ }, /*#__PURE__*/React.createElement("stop", {
724
+ stopColor: "#EDEFF2"
725
+ }), /*#__PURE__*/React.createElement("stop", {
726
+ offset: "1",
727
+ stopColor: "#DFE1E6"
728
+ })), /*#__PURE__*/React.createElement("linearGradient", {
729
+ id: "paint1_linear_946_245875",
730
+ x1: "15.0802",
731
+ y1: "4.25",
732
+ x2: "15.0802",
733
+ y2: "59.5522",
734
+ gradientUnits: "userSpaceOnUse"
735
+ }, /*#__PURE__*/React.createElement("stop", {
736
+ stopColor: "#E6E8ED"
737
+ }), /*#__PURE__*/React.createElement("stop", {
738
+ offset: "1",
739
+ stopColor: "#F2F4F7"
740
+ })), /*#__PURE__*/React.createElement("linearGradient", {
741
+ id: "paint2_linear_946_245875",
742
+ x1: "26.2454",
743
+ y1: "51.4619",
744
+ x2: "26.2454",
745
+ y2: "32.75",
746
+ gradientUnits: "userSpaceOnUse"
747
+ }, /*#__PURE__*/React.createElement("stop", {
748
+ stopColor: "#DFE1E6"
749
+ }), /*#__PURE__*/React.createElement("stop", {
750
+ offset: "1",
751
+ stopColor: "#C4C7CC"
752
+ })), /*#__PURE__*/React.createElement("linearGradient", {
753
+ id: "paint3_linear_946_245875",
754
+ x1: "35.2454",
755
+ y1: "51.4512",
756
+ x2: "35.2454",
757
+ y2: "27.5",
758
+ gradientUnits: "userSpaceOnUse"
759
+ }, /*#__PURE__*/React.createElement("stop", {
760
+ stopColor: "#DFE1E6"
761
+ }), /*#__PURE__*/React.createElement("stop", {
762
+ offset: "1",
763
+ stopColor: "#C4C7CC"
764
+ })), /*#__PURE__*/React.createElement("linearGradient", {
765
+ id: "paint4_linear_946_245875",
766
+ x1: "44.2454",
767
+ y1: "51.471",
768
+ x2: "44.2454",
769
+ y2: "37.25",
770
+ gradientUnits: "userSpaceOnUse"
771
+ }, /*#__PURE__*/React.createElement("stop", {
772
+ stopColor: "#DFE1E6"
773
+ }), /*#__PURE__*/React.createElement("stop", {
774
+ offset: "1",
775
+ stopColor: "#C4C7CC"
776
+ })), /*#__PURE__*/React.createElement("linearGradient", {
777
+ id: "paint5_linear_946_245875",
778
+ x1: "53.2454",
779
+ y1: "51.4665",
780
+ x2: "53.2454",
781
+ y2: "35",
782
+ gradientUnits: "userSpaceOnUse"
783
+ }, /*#__PURE__*/React.createElement("stop", {
784
+ stopColor: "#DFE1E6"
785
+ }), /*#__PURE__*/React.createElement("stop", {
786
+ offset: "1",
787
+ stopColor: "#C4C7CC"
788
+ })))), "\u6570\u636E\u4E3A\u7A7A")
789
+ }, props)));
790
+ };
791
+ export default Table;