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,2 @@
1
+ declare const MessageComponent: any;
2
+ export default MessageComponent;
@@ -0,0 +1,86 @@
1
+ 'use client';
2
+
3
+ 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); }
4
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
5
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
6
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
7
+ import { addStaticMethods, createNewInstance, Message } from "./MessageBase";
8
+
9
+ // React 16/17 渲染器
10
+ var react16Renderer = {
11
+ render: function () {
12
+ var _render = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(element, container) {
13
+ var ReactDOM;
14
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
15
+ while (1) switch (_context.prev = _context.next) {
16
+ case 0:
17
+ _context.prev = 0;
18
+ // 尝试使用 require
19
+ ReactDOM = require('react-dom');
20
+ _context.next = 9;
21
+ break;
22
+ case 4:
23
+ _context.prev = 4;
24
+ _context.t0 = _context["catch"](0);
25
+ _context.next = 8;
26
+ return import('react-dom');
27
+ case 8:
28
+ ReactDOM = _context.sent;
29
+ case 9:
30
+ ReactDOM.render(element, container);
31
+ case 10:
32
+ case "end":
33
+ return _context.stop();
34
+ }
35
+ }, _callee, null, [[0, 4]]);
36
+ }));
37
+ function render(_x, _x2) {
38
+ return _render.apply(this, arguments);
39
+ }
40
+ return render;
41
+ }(),
42
+ unmount: function () {
43
+ var _unmount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(container) {
44
+ var ReactDOM;
45
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
46
+ while (1) switch (_context2.prev = _context2.next) {
47
+ case 0:
48
+ _context2.prev = 0;
49
+ // 尝试使用 require
50
+ ReactDOM = require('react-dom');
51
+ _context2.next = 9;
52
+ break;
53
+ case 4:
54
+ _context2.prev = 4;
55
+ _context2.t0 = _context2["catch"](0);
56
+ _context2.next = 8;
57
+ return import('react-dom');
58
+ case 8:
59
+ ReactDOM = _context2.sent;
60
+ case 9:
61
+ ReactDOM.unmountComponentAtNode(container);
62
+ case 10:
63
+ case "end":
64
+ return _context2.stop();
65
+ }
66
+ }, _callee2, null, [[0, 4]]);
67
+ }));
68
+ function unmount(_x3) {
69
+ return _unmount.apply(this, arguments);
70
+ }
71
+ return unmount;
72
+ }()
73
+ };
74
+
75
+ // 创建 newInstance 函数
76
+ var newInstance = createNewInstance(react16Renderer);
77
+
78
+ // 创建 Message 组件
79
+ var MessageComponent = Message;
80
+
81
+ // 添加 newInstance 方法
82
+ MessageComponent.newInstance = newInstance;
83
+
84
+ // 添加静态方法
85
+ addStaticMethods(MessageComponent);
86
+ export default MessageComponent;
@@ -0,0 +1,2 @@
1
+ declare const MessageComponent: any;
2
+ export default MessageComponent;
@@ -0,0 +1,98 @@
1
+ 'use client';
2
+
3
+ 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); }
4
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
5
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
6
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
7
+ import { addStaticMethods, createNewInstance, Message } from "./MessageBase";
8
+
9
+ // 存储 root 实例的 Map
10
+ var rootMap = new WeakMap();
11
+
12
+ // React 18+ 渲染器(兼容 React 16)
13
+ var react18Renderer = {
14
+ render: function () {
15
+ var _render = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(element, container) {
16
+ var _yield$import, createRoot, root, ReactDOM, tempDiv;
17
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
18
+ while (1) switch (_context.prev = _context.next) {
19
+ case 0:
20
+ _context.prev = 0;
21
+ _context.next = 3;
22
+ return import('react-dom/client');
23
+ case 3:
24
+ _yield$import = _context.sent;
25
+ createRoot = _yield$import.createRoot;
26
+ // 检查容器是否已经有 root 实例
27
+ root = rootMap.get(container);
28
+ if (!root) {
29
+ root = createRoot(container);
30
+ rootMap.set(container, root);
31
+ }
32
+ root.render(element);
33
+ return _context.abrupt("return", root);
34
+ case 11:
35
+ _context.prev = 11;
36
+ _context.t0 = _context["catch"](0);
37
+ _context.prev = 13;
38
+ _context.next = 16;
39
+ return import('react-dom');
40
+ case 16:
41
+ ReactDOM = _context.sent;
42
+ ReactDOM.render(element, container);
43
+ return _context.abrupt("return", null);
44
+ case 21:
45
+ _context.prev = 21;
46
+ _context.t1 = _context["catch"](13);
47
+ // 如果连 react-dom 都不可用,直接渲染到容器
48
+ container.innerHTML = '';
49
+ tempDiv = document.createElement('div');
50
+ tempDiv.appendChild(element);
51
+ container.appendChild(tempDiv);
52
+ return _context.abrupt("return", null);
53
+ case 28:
54
+ case "end":
55
+ return _context.stop();
56
+ }
57
+ }, _callee, null, [[0, 11], [13, 21]]);
58
+ }));
59
+ function render(_x, _x2) {
60
+ return _render.apply(this, arguments);
61
+ }
62
+ return render;
63
+ }(),
64
+ unmount: function unmount(container) {
65
+ var root = rootMap.get(container);
66
+ if (root) {
67
+ // React 18+ 方式
68
+ root.unmount();
69
+ rootMap.delete(container);
70
+ } else {
71
+ // React 16/17 方式
72
+ try {
73
+ // 使用动态 import 而不是 require
74
+ import('react-dom').then(function (ReactDOM) {
75
+ ReactDOM.unmountComponentAtNode(container);
76
+ }).catch(function () {
77
+ // 如果失败,清空容器
78
+ container.innerHTML = '';
79
+ });
80
+ } catch (error) {
81
+ // 忽略错误
82
+ }
83
+ }
84
+ }
85
+ };
86
+
87
+ // 创建 newInstance 函数
88
+ var newInstance = createNewInstance(react18Renderer);
89
+
90
+ // 创建 Message 组件
91
+ var MessageComponent = Message;
92
+
93
+ // 添加 newInstance 方法
94
+ MessageComponent.newInstance = newInstance;
95
+
96
+ // 添加静态方法
97
+ addStaticMethods(MessageComponent);
98
+ export default MessageComponent;
@@ -0,0 +1,3 @@
1
+ export { default as MessageReact16 } from './MessageReact16';
2
+ export { default as Message } from './MessageReact18';
3
+ export type { MessageIntent, MessageProps, odnMessageState, } from './MessageBase';
@@ -0,0 +1,7 @@
1
+ // 导出 React 16 版本
2
+ export { default as MessageReact16 } from "./MessageReact16";
3
+
4
+ // 导出默认的 Message 组件(React 18+)
5
+ export { default as Message } from "./MessageReact18";
6
+
7
+ // 重新导出类型定义
@@ -0,0 +1,133 @@
1
+ html {
2
+ --odn-message-top: 0;
3
+ --odn-message-gap: 14px;
4
+ --odn-message-height: 54px;
5
+ --odn-message-width: 356px;
6
+ --odn-message-padding-inline: 16px;
7
+ --odn-message-font-size: 13px;
8
+ --odn-message-border-radius: 8px;
9
+ --odn-message-success-color: #000;
10
+ --odn-message-success-bg: #f6fff2;
11
+ --odn-message-success-border-color: #d9fac8;
12
+ --odn-message-success-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
13
+ --odn-message-success-prefix-color: var(--odn-color-green-6);
14
+ --odn-message-info-color: #000;
15
+ --odn-message-info-bg: hsl(208deg, 100%, 97%);
16
+ --odn-message-info-border-color: hsl(221deg, 91%, 93%);
17
+ --odn-message-info-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
18
+ --odn-message-info-prefix-color: var(--odn-color-blue-6);
19
+ --odn-message-warning-color: #000;
20
+ --odn-message-warning-bg: hsl(49deg, 100%, 97%);
21
+ --odn-message-warning-border-color: hsl(49deg, 91%, 84%);
22
+ --odn-message-warning-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
23
+ --odn-message-warning-prefix-color: var(--odn-color-orange-6);
24
+ --odn-message-danger-color: #000;
25
+ --odn-message-danger-bg: hsl(359deg, 100%, 97%);
26
+ --odn-message-danger-border-color: hsl(359deg, 100%, 94%);
27
+ --odn-message-danger-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
28
+ --odn-message-danger-prefix-color: var(--odn-color-red-6);
29
+ }
30
+
31
+ [data-odn-message-container] {
32
+ position: fixed;
33
+ top: var(--odn-message-top);
34
+ left: 0;
35
+ z-index: var(--odn-z-index-message);
36
+ width: 100vw;
37
+ opacity: 0;
38
+ transform: translate3d(0, -68px, 0);
39
+ transition: 0.25s cubic-bezier(0, 0, 0.2, 1) all;
40
+ }
41
+
42
+ [data-odn-message] {
43
+ position: absolute;
44
+ top: 16px;
45
+ left: 50%;
46
+ transform: translate3d(-50%, 0, 0);
47
+ display: flex;
48
+ align-items: center;
49
+ justify-content: center;
50
+ padding: 0 var(--odn-message-padding-inline);
51
+ height: var(--odn-message-height);
52
+ min-width: var(--odn-message-width);
53
+ border: 1px solid transparent;
54
+ border-radius: var(--odn-message-border-radius);
55
+ transition: inherit;
56
+ }
57
+
58
+ [data-odn-message]::after {
59
+ content: "";
60
+ position: absolute;
61
+ left: 0;
62
+ height: calc(var(--odn-message-gap) + 1px);
63
+ bottom: 100%;
64
+ width: 100%;
65
+ }
66
+
67
+ [data-odn-message-prefix-icon] {
68
+ width: 16px;
69
+ height: 16px;
70
+ }
71
+
72
+ [data-odn-message-content] {
73
+ flex: 1;
74
+ margin-left: 8px;
75
+ font-size: var(--odn-message-font-size);
76
+ }
77
+
78
+ [data-odn-message-close-icon] {
79
+ width: 18px;
80
+ height: 18px;
81
+ fill: hsl(220, 3%, 59%);
82
+ cursor: pointer;
83
+ }
84
+
85
+ [data-odn-message-close-icon]:hover {
86
+ fill: hsl(220, 3%, 45%);
87
+ }
88
+
89
+ [data-odn-message][data-odn-message-intent=success] {
90
+ color: var(--odn-message-success-color);
91
+ background: var(--odn-message-success-bg);
92
+ border-color: var(--odn-message-success-border-color);
93
+ box-shadow: var(--odn-message-success-box-shadow);
94
+ }
95
+
96
+ [data-odn-message][data-odn-message-intent=success] [data-odn-message-prefix-icon] {
97
+ color: var(--odn-message-success-prefix-color);
98
+ }
99
+
100
+ [data-odn-message][data-odn-message-intent=info] {
101
+ color: var(--odn-message-info-color);
102
+ background: var(--odn-message-info-bg);
103
+ border-color: var(--odn-message-info-border-color);
104
+ box-shadow: var(--odn-message-info-box-shadow);
105
+ }
106
+
107
+ [data-odn-message][data-odn-message-intent=info] [data-odn-message-prefix-icon] {
108
+ color: var(--odn-message-info-prefix-color);
109
+ }
110
+
111
+ [data-odn-message][data-odn-message-intent=warning] {
112
+ color: var(--odn-message-warning-color);
113
+ background: var(--odn-message-warning-bg);
114
+ border-color: var(--odn-message-warning-border-color);
115
+ box-shadow: var(--odn-message-warning-box-shadow);
116
+ }
117
+
118
+ [data-odn-message][data-odn-message-intent=warning] [data-odn-message-prefix-icon] {
119
+ color: var(--odn-message-warning-prefix-color);
120
+ }
121
+
122
+ [data-odn-message][data-odn-message-intent=danger],
123
+ [data-odn-message][data-odn-message-intent=error] {
124
+ color: var(--odn-message-danger-color);
125
+ background: var(--odn-message-danger-bg);
126
+ border-color: var(--odn-message-danger-border-color);
127
+ box-shadow: var(--odn-message-danger-box-shadow);
128
+ }
129
+
130
+ [data-odn-message][data-odn-message-intent=danger] [data-odn-message-prefix-icon],
131
+ [data-odn-message][data-odn-message-intent=error] [data-odn-message-prefix-icon] {
132
+ color: var(--odn-message-danger-prefix-color);
133
+ }
@@ -0,0 +1,2 @@
1
+ import '../../style';
2
+ import './index.scss';
@@ -0,0 +1,2 @@
1
+ import "../../style";
2
+ import "./index.css";
@@ -0,0 +1,14 @@
1
+ export type GapMode = 'padding' | 'margin';
2
+ export interface GapOffset {
3
+ left: number;
4
+ top: number;
5
+ right: number;
6
+ gap: number;
7
+ }
8
+ export declare const zeroGap: {
9
+ left: number;
10
+ top: number;
11
+ right: number;
12
+ gap: number;
13
+ };
14
+ export declare const getGapWidth: (gapMode?: GapMode) => GapOffset;
@@ -0,0 +1,31 @@
1
+ export var zeroGap = {
2
+ left: 0,
3
+ top: 0,
4
+ right: 0,
5
+ gap: 0
6
+ };
7
+ var parse = function parse(x) {
8
+ return parseInt(x || '', 10) || 0;
9
+ };
10
+ var getOffset = function getOffset(gapMode) {
11
+ var cs = window.getComputedStyle(document.body);
12
+ var left = cs[gapMode === 'padding' ? 'paddingLeft' : 'marginLeft'];
13
+ var top = cs[gapMode === 'padding' ? 'paddingTop' : 'marginTop'];
14
+ var right = cs[gapMode === 'padding' ? 'paddingRight' : 'marginRight'];
15
+ return [parse(left), parse(top), parse(right)];
16
+ };
17
+ export var getGapWidth = function getGapWidth() {
18
+ var gapMode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'margin';
19
+ if (typeof window === 'undefined') {
20
+ return zeroGap;
21
+ }
22
+ var offsets = getOffset(gapMode);
23
+ var documentWidth = document.documentElement.clientWidth;
24
+ var windowWidth = window.innerWidth;
25
+ return {
26
+ left: offsets[0],
27
+ top: offsets[1],
28
+ right: offsets[2],
29
+ gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0])
30
+ };
31
+ };
@@ -0,0 +1,26 @@
1
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
2
+ import React from 'react';
3
+ export interface ModalBaseProps {
4
+ children?: React.ReactNode;
5
+ /**
6
+ * @description 是否显示
7
+ */
8
+ open?: boolean;
9
+ /**
10
+ * @description 显示状态变化回调
11
+ */
12
+ onOpenChange?: (open: boolean) => void;
13
+ }
14
+ declare const ModalRoot: React.ForwardRefExoticComponent<DialogPrimitive.DialogProps & React.RefAttributes<never>>;
15
+ declare const ModalTrigger: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
16
+ declare const ModalPortal: React.ForwardRefExoticComponent<DialogPrimitive.DialogPortalProps & React.RefAttributes<never>>;
17
+ declare const ModalOverlay: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
18
+ visible?: boolean | undefined;
19
+ } & React.RefAttributes<HTMLDivElement>>;
20
+ declare const ModalContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
21
+ declare const ModalClose: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
22
+ declare const ModalTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
23
+ declare const ModalDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
24
+ declare const ModalHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
25
+ declare const ModalFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
26
+ export { ModalClose, ModalContent, ModalDescription, ModalFooter, ModalHeader, ModalOverlay, ModalPortal, ModalRoot, ModalTitle, ModalTrigger, };
@@ -0,0 +1,110 @@
1
+ 'use client';
2
+
3
+ var _excluded = ["visible"];
4
+ 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; }
5
+ 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; }
6
+ 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); }
7
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
8
+ import React, { useEffect, useRef } from 'react';
9
+ import { getGapWidth } from "./gap";
10
+ // Modal Root - 完全无头,只传递 props
11
+ var ModalRoot = /*#__PURE__*/React.forwardRef(function ModalRoot(props, ref) {
12
+ // 20250909 修复 radix 会向 body 增加 pointer-events: none; 导致无法点击其他元素的问题
13
+ // 抽象,还是个 open issue https://github.com/radix-ui/primitives/issues/3480 资本主义靠不住
14
+ useEffect(function () {
15
+ if (props.open) {
16
+ setTimeout(function () {
17
+ document.body.style.pointerEvents = '';
18
+ }, 0);
19
+ }
20
+ }, [props.open]);
21
+ // 20251014 关闭 modal 属性,真是不踩坑不知道 https://github.com/radix-ui/primitives/issues/3119#issuecomment-2491781800
22
+ // 开启 modal 后,dialog 会禁止所有外部事件,但 Cascader Select 这样的 Portal 组件就会受影响
23
+ // 关闭 modal 后,DialogPrimitive.Overlay 也会被顺带移除,因此我们需要在下面自定义
24
+ return /*#__PURE__*/React.createElement(DialogPrimitive.Root, _extends({
25
+ modal: false
26
+ }, props));
27
+ });
28
+
29
+ // Modal Trigger - 完全无头
30
+ var ModalTrigger = /*#__PURE__*/React.forwardRef(function ModalTrigger(props, ref) {
31
+ return /*#__PURE__*/React.createElement(DialogPrimitive.Trigger, _extends({
32
+ ref: ref
33
+ }, props));
34
+ });
35
+
36
+ // Modal Portal - 完全无头
37
+ var ModalPortal = /*#__PURE__*/React.forwardRef(function ModalPortal(props, ref) {
38
+ return /*#__PURE__*/React.createElement(DialogPrimitive.Portal, props);
39
+ });
40
+
41
+ // Modal Overlay - 自定义 overlay,支持 visible 状态
42
+ // 没有用 DialogPrimitive.Overlay 的原因参见上方
43
+ var ModalOverlay = /*#__PURE__*/React.forwardRef(function ModalOverlay(_ref, ref) {
44
+ var visible = _ref.visible,
45
+ props = _objectWithoutProperties(_ref, _excluded);
46
+ var bodyTimer = useRef();
47
+ useEffect(function () {
48
+ if (visible) {
49
+ window.clearTimeout(bodyTimer.current);
50
+ var _getGapWidth = getGapWidth(),
51
+ gap = _getGapWidth.gap;
52
+ document.body.dataset.scrollLocked = 'true';
53
+ document.body.style.setProperty('--removed-body-scroll-bar-size', "".concat(gap, "px"));
54
+ } else {
55
+ bodyTimer.current = window.setTimeout(function () {
56
+ if (document.body) {
57
+ delete document.body.dataset.scrollLocked;
58
+ document.body.style.removeProperty('--removed-body-scroll-bar-size');
59
+ }
60
+ }, 200);
61
+ }
62
+ }, [visible]);
63
+ return /*#__PURE__*/React.createElement("div", _extends({
64
+ ref: ref,
65
+ "data-state": visible ? 'open' : 'closed'
66
+ }, props));
67
+ });
68
+
69
+ // Modal Content - 完全无头
70
+ var ModalContent = /*#__PURE__*/React.forwardRef(function ModalContent(props, ref) {
71
+ return /*#__PURE__*/React.createElement(DialogPrimitive.Content, _extends({
72
+ ref: ref
73
+ }, props));
74
+ });
75
+
76
+ // Modal Close - 完全无头
77
+ var ModalClose = /*#__PURE__*/React.forwardRef(function ModalClose(props, ref) {
78
+ return /*#__PURE__*/React.createElement(DialogPrimitive.Close, _extends({
79
+ ref: ref
80
+ }, props));
81
+ });
82
+
83
+ // Modal Title - 完全无头
84
+ var ModalTitle = /*#__PURE__*/React.forwardRef(function ModalTitle(props, ref) {
85
+ return /*#__PURE__*/React.createElement(DialogPrimitive.Title, _extends({
86
+ ref: ref
87
+ }, props));
88
+ });
89
+
90
+ // Modal Description - 完全无头
91
+ var ModalDescription = /*#__PURE__*/React.forwardRef(function ModalDescription(props, ref) {
92
+ return /*#__PURE__*/React.createElement(DialogPrimitive.Description, _extends({
93
+ ref: ref
94
+ }, props));
95
+ });
96
+
97
+ // Modal Header - 完全无头
98
+ var ModalHeader = /*#__PURE__*/React.forwardRef(function ModalHeader(props, ref) {
99
+ return /*#__PURE__*/React.createElement("div", _extends({
100
+ ref: ref
101
+ }, props));
102
+ });
103
+
104
+ // Modal Footer - 完全无头
105
+ var ModalFooter = /*#__PURE__*/React.forwardRef(function ModalFooter(props, ref) {
106
+ return /*#__PURE__*/React.createElement("div", _extends({
107
+ ref: ref
108
+ }, props));
109
+ });
110
+ export { ModalClose, ModalContent, ModalDescription, ModalFooter, ModalHeader, ModalOverlay, ModalPortal, ModalRoot, ModalTitle, ModalTrigger };
@@ -0,0 +1,13 @@
1
+ import { NumberFlowElement, NumberFlowGroup, continuous, type NumberFlowProps as BaseNumberFlowProps, type Format } from '@number-flow/react';
2
+ import React from 'react';
3
+ import './style';
4
+ export interface NumberFlowProps extends BaseNumberFlowProps {
5
+ }
6
+ export interface NumberFlowComponent extends React.FC<NumberFlowProps> {
7
+ continuous: typeof continuous;
8
+ NumberFlowGroup: typeof NumberFlowGroup;
9
+ NumberFlowElement: typeof NumberFlowElement;
10
+ }
11
+ declare const NumberFlow: NumberFlowComponent;
12
+ export type { Format };
13
+ export default NumberFlow;
@@ -0,0 +1,25 @@
1
+ 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); }
2
+ import NumberFlowReact, { NumberFlowElement, NumberFlowGroup, continuous } from '@number-flow/react';
3
+ import React from 'react';
4
+ import "./style";
5
+
6
+ // 明确定义组件的 Props 类型,避免依赖外部库的内部类型路径
7
+
8
+ // 明确定义组件类型,包含静态方法
9
+
10
+ var NumberFlow = function NumberFlow(props) {
11
+ return /*#__PURE__*/React.createElement(NumberFlowReact, _extends({
12
+ spinTiming: {
13
+ duration: 700,
14
+ easing: 'cubic-bezier(0.32, 0.72, 0, 1)'
15
+ },
16
+ transformTiming: {
17
+ duration: 700,
18
+ easing: 'cubic-bezier(0.32, 0.72, 0, 1)'
19
+ }
20
+ }, props));
21
+ };
22
+ NumberFlow.continuous = continuous;
23
+ NumberFlow.NumberFlowGroup = NumberFlowGroup;
24
+ NumberFlow.NumberFlowElement = NumberFlowElement;
25
+ export default NumberFlow;
File without changes
@@ -0,0 +1,2 @@
1
+ import '../../style';
2
+ import './index.scss';
@@ -0,0 +1,2 @@
1
+ import "../../style";
2
+ import "./index.css";