@rockshin/tao-ui 0.0.41 → 0.0.43

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 (394) hide show
  1. package/README.md +39 -7
  2. package/THIRD_PARTY_NOTICES.md +34 -0
  3. package/component-manifest.json +1352 -24
  4. package/dist/components/affix/affix.css +11 -0
  5. package/dist/components/affix/affix.d.ts +21 -0
  6. package/dist/components/affix/affix.js +140 -0
  7. package/dist/components/alert/alert.css +1 -0
  8. package/dist/components/app/app-modals.d.ts +2 -0
  9. package/dist/components/app/app-modals.js +266 -0
  10. package/dist/components/app/app-notices.d.ts +6 -0
  11. package/dist/components/app/app-notices.js +334 -0
  12. package/dist/components/app/app-types.d.ts +154 -0
  13. package/dist/components/app/app-types.js +0 -0
  14. package/dist/components/app/app.css +221 -0
  15. package/dist/components/app/app.d.ts +7 -0
  16. package/dist/components/app/app.js +69 -0
  17. package/dist/components/auto-complete/auto-complete.css +35 -0
  18. package/dist/components/auto-complete/auto-complete.d.ts +47 -0
  19. package/dist/components/auto-complete/auto-complete.js +106 -0
  20. package/dist/components/avatar/avatar.css +95 -0
  21. package/dist/components/avatar/avatar.d.ts +50 -0
  22. package/dist/components/avatar/avatar.js +159 -0
  23. package/dist/components/badge/badge.css +165 -0
  24. package/dist/components/badge/badge.d.ts +48 -0
  25. package/dist/components/badge/badge.js +412 -0
  26. package/dist/components/border-beam/border-beam.css +35 -0
  27. package/dist/components/border-beam/border-beam.d.ts +27 -0
  28. package/dist/components/border-beam/border-beam.js +215 -0
  29. package/dist/components/button/button.css +7 -0
  30. package/dist/components/calendar/calendar.css +126 -0
  31. package/dist/components/calendar/calendar.d.ts +56 -0
  32. package/dist/components/calendar/calendar.js +178 -0
  33. package/dist/components/card/card-tabs.d.ts +43 -0
  34. package/dist/components/card/card-tabs.js +455 -0
  35. package/dist/components/card/card.css +401 -0
  36. package/dist/components/card/card.d.ts +74 -0
  37. package/dist/components/card/card.js +362 -0
  38. package/dist/components/carousel/carousel.css +232 -0
  39. package/dist/components/carousel/carousel.d.ts +35 -0
  40. package/dist/components/carousel/carousel.js +248 -0
  41. package/dist/components/cascader/cascader.css +123 -0
  42. package/dist/components/cascader/cascader.d.ts +58 -0
  43. package/dist/components/cascader/cascader.js +132 -0
  44. package/dist/components/checkbox/checkbox.css +7 -0
  45. package/dist/components/collapse/collapse-panels.d.ts +4 -0
  46. package/dist/components/collapse/collapse-panels.js +413 -0
  47. package/dist/components/collapse/collapse.css +199 -0
  48. package/dist/components/collapse/collapse.d.ts +77 -0
  49. package/dist/components/{collapsible/collapsible.js → collapse/collapse.js} +26 -10
  50. package/dist/components/color-picker/color-picker-types.d.ts +78 -0
  51. package/dist/components/color-picker/color-picker-types.js +0 -0
  52. package/dist/components/color-picker/color-picker.css +265 -0
  53. package/dist/components/color-picker/color-picker.d.ts +5 -0
  54. package/dist/components/color-picker/color-picker.js +1049 -0
  55. package/dist/components/color-picker/color.d.ts +35 -0
  56. package/dist/components/color-picker/color.js +65 -0
  57. package/dist/components/date-picker/calendar/calendar-grid.js +4 -11
  58. package/dist/components/date-picker/calendar/calendar-header.js +76 -69
  59. package/dist/components/date-picker/calendar/month-grid.js +20 -31
  60. package/dist/components/date-picker/calendar/time-panel.js +46 -41
  61. package/dist/components/date-picker/date-picker.css +22 -56
  62. package/dist/components/date-picker/date-picker.d.ts +2 -0
  63. package/dist/components/date-picker/date-picker.js +14 -9
  64. package/dist/components/date-picker/presets.js +5 -2
  65. package/dist/components/date-picker/range-picker.d.ts +2 -0
  66. package/dist/components/date-picker/range-picker.js +16 -13
  67. package/dist/components/descriptions/descriptions.css +109 -0
  68. package/dist/components/descriptions/descriptions.d.ts +49 -0
  69. package/dist/components/descriptions/descriptions.js +189 -0
  70. package/dist/components/divider/divider.css +71 -0
  71. package/dist/components/divider/divider.d.ts +31 -0
  72. package/dist/components/divider/divider.js +83 -0
  73. package/dist/components/drawer/drawer.js +199 -184
  74. package/dist/components/empty/empty.css +35 -0
  75. package/dist/components/empty/empty.d.ts +25 -0
  76. package/dist/components/empty/empty.js +278 -0
  77. package/dist/components/float-button/float-button.css +146 -0
  78. package/dist/components/float-button/float-button.d.ts +67 -0
  79. package/dist/components/float-button/float-button.js +347 -0
  80. package/dist/components/form/form-item.d.ts +1 -1
  81. package/dist/components/form/form-item.js +1 -0
  82. package/dist/components/form/form.css +15 -0
  83. package/dist/components/form/form.js +4 -1
  84. package/dist/components/form-field/form-field-view.d.ts +3 -1
  85. package/dist/components/form-field/form-field-view.js +109 -84
  86. package/dist/components/image/image-icons.d.ts +16 -0
  87. package/dist/components/image/image-icons.js +63 -0
  88. package/dist/components/image/image.css +253 -0
  89. package/dist/components/image/image.d.ts +75 -0
  90. package/dist/components/image/image.js +818 -0
  91. package/dist/components/input/base-input.d.ts +25 -0
  92. package/dist/components/input/base-input.js +104 -0
  93. package/dist/components/input/input-shared.css +75 -0
  94. package/dist/components/input/input-shared.d.ts +59 -0
  95. package/dist/components/input/input-shared.js +152 -0
  96. package/dist/components/input/input.css +107 -10
  97. package/dist/components/input/input.d.ts +12 -16
  98. package/dist/components/input/input.js +11 -154
  99. package/dist/components/input/otp.d.ts +29 -0
  100. package/dist/components/input/otp.js +335 -0
  101. package/dist/components/input/password.d.ts +12 -0
  102. package/dist/components/input/password.js +117 -0
  103. package/dist/components/input/search.d.ts +16 -0
  104. package/dist/components/input/search.js +99 -0
  105. package/dist/components/input-number/input-number.d.ts +2 -2
  106. package/dist/components/input-number/input-number.js +2 -2
  107. package/dist/components/list/list-pagination.css +127 -0
  108. package/dist/components/list/list-pagination.d.ts +38 -0
  109. package/dist/components/list/list-pagination.js +322 -0
  110. package/dist/components/list/list.css +225 -0
  111. package/dist/components/list/list.d.ts +77 -0
  112. package/dist/components/list/list.js +660 -0
  113. package/dist/components/listy/listy.css +55 -0
  114. package/dist/components/listy/listy.d.ts +20 -0
  115. package/dist/components/listy/listy.js +158 -0
  116. package/dist/components/masonry/masonry.css +13 -0
  117. package/dist/components/masonry/masonry.d.ts +39 -0
  118. package/dist/components/masonry/masonry.js +287 -0
  119. package/dist/components/mentions/mentions.css +179 -0
  120. package/dist/components/mentions/mentions.d.ts +48 -0
  121. package/dist/components/mentions/mentions.js +115 -0
  122. package/dist/components/modal/modal.css +1 -0
  123. package/dist/components/modal/modal.d.ts +30 -4
  124. package/dist/components/modal/modal.js +534 -241
  125. package/dist/components/pagination/pagination.css +10 -0
  126. package/dist/components/progress/progress.css +187 -0
  127. package/dist/components/progress/progress.d.ts +66 -0
  128. package/dist/components/progress/progress.js +567 -0
  129. package/dist/components/qr-code/qr-code.css +39 -0
  130. package/dist/components/qr-code/qr-code.d.ts +43 -0
  131. package/dist/components/qr-code/qr-code.js +286 -0
  132. package/dist/components/radio/radio.css +7 -0
  133. package/dist/components/radio/radio.d.ts +1 -1
  134. package/dist/components/radio/radio.js +78 -73
  135. package/dist/components/rate/rate.css +97 -0
  136. package/dist/components/rate/rate.d.ts +17 -0
  137. package/dist/components/rate/rate.js +172 -0
  138. package/dist/components/result/result.css +69 -0
  139. package/dist/components/result/result.d.ts +33 -0
  140. package/dist/components/result/result.js +320 -0
  141. package/dist/components/segmented/segmented.css +134 -0
  142. package/dist/components/segmented/segmented.d.ts +40 -0
  143. package/dist/components/segmented/segmented.js +169 -0
  144. package/dist/components/select/mobile-select.css +1 -16
  145. package/dist/components/select/mobile-select.d.ts +11 -4
  146. package/dist/components/select/mobile-select.js +172 -59
  147. package/dist/components/select/select-tags.js +178 -130
  148. package/dist/components/select/select-types.d.ts +53 -0
  149. package/dist/components/select/select.css +86 -8
  150. package/dist/components/select/select.js +59 -31
  151. package/dist/components/select/use-select-selection.js +44 -43
  152. package/dist/components/skeleton/skeleton.css +129 -0
  153. package/dist/components/skeleton/skeleton.d.ts +78 -0
  154. package/dist/components/skeleton/skeleton.js +457 -0
  155. package/dist/components/slider/slider.css +191 -0
  156. package/dist/components/slider/slider.d.ts +47 -0
  157. package/dist/components/slider/slider.js +310 -0
  158. package/dist/components/spinner/spinner.css +1 -1
  159. package/dist/components/statistic/statistic.css +34 -0
  160. package/dist/components/statistic/statistic.d.ts +46 -0
  161. package/dist/components/statistic/statistic.js +491 -0
  162. package/dist/components/steps/steps.css +53 -3
  163. package/dist/components/switch/switch-touch.css +20 -0
  164. package/dist/components/switch/switch.css +24 -13
  165. package/dist/components/switch/switch.js +8 -5
  166. package/dist/components/table/table.css +0 -5
  167. package/dist/components/table/table.js +21 -22
  168. package/dist/components/textarea/textarea.css +21 -1
  169. package/dist/components/textarea/textarea.d.ts +12 -6
  170. package/dist/components/textarea/textarea.js +120 -219
  171. package/dist/components/time-picker/time-picker.css +212 -0
  172. package/dist/components/time-picker/time-picker.d.ts +63 -0
  173. package/dist/components/time-picker/time-picker.js +356 -0
  174. package/dist/components/timeline/timeline.css +259 -0
  175. package/dist/components/timeline/timeline.d.ts +50 -0
  176. package/dist/components/timeline/timeline.js +140 -0
  177. package/dist/components/tour/tour.css +151 -0
  178. package/dist/components/tour/tour.d.ts +45 -0
  179. package/dist/components/tour/tour.js +575 -0
  180. package/dist/components/transfer/transfer-list.d.ts +2 -0
  181. package/dist/components/transfer/transfer-list.js +513 -0
  182. package/dist/components/transfer/transfer-parts.d.ts +3 -0
  183. package/dist/components/transfer/transfer-parts.js +163 -0
  184. package/dist/components/transfer/transfer-types.d.ts +163 -0
  185. package/dist/components/transfer/transfer-types.js +0 -0
  186. package/dist/components/transfer/transfer.css +226 -0
  187. package/dist/components/transfer/transfer.d.ts +13 -0
  188. package/dist/components/transfer/transfer.js +204 -0
  189. package/dist/components/tree/tree-check.d.ts +1 -0
  190. package/dist/components/tree/tree-check.js +36 -0
  191. package/dist/components/tree/tree.css +245 -0
  192. package/dist/components/tree/tree.d.ts +46 -0
  193. package/dist/components/tree/tree.js +388 -0
  194. package/dist/components/tree-select/select-engine.css +238 -0
  195. package/dist/components/tree-select/select-engine.d.ts +20 -0
  196. package/dist/components/tree-select/select-engine.js +46 -0
  197. package/dist/components/tree-select/tree-select.css +25 -0
  198. package/dist/components/tree-select/tree-select.d.ts +50 -0
  199. package/dist/components/tree-select/tree-select.js +130 -0
  200. package/dist/components/upload/upload-types.d.ts +135 -0
  201. package/dist/components/upload/upload-types.js +0 -0
  202. package/dist/components/upload/upload.css +166 -0
  203. package/dist/components/upload/upload.d.ts +12 -0
  204. package/dist/components/upload/upload.js +465 -0
  205. package/dist/components/watermark/watermark-context.d.ts +7 -0
  206. package/dist/components/watermark/watermark-context.js +20 -0
  207. package/dist/components/watermark/watermark.css +10 -0
  208. package/dist/components/watermark/watermark.d.ts +38 -0
  209. package/dist/components/watermark/watermark.js +436 -0
  210. package/dist/docs/component-docs.d.ts +35 -29
  211. package/dist/docs/component-docs.js +75 -3
  212. package/dist/docs/components/affix.doc.d.ts +14 -0
  213. package/dist/docs/components/affix.doc.js +22 -0
  214. package/dist/docs/components/app.doc.d.ts +18 -0
  215. package/dist/docs/components/app.doc.js +42 -0
  216. package/dist/docs/components/auto-complete.doc.d.ts +18 -0
  217. package/dist/docs/components/auto-complete.doc.js +49 -0
  218. package/dist/docs/components/avatar.doc.d.ts +17 -0
  219. package/dist/docs/components/avatar.doc.js +36 -0
  220. package/dist/docs/components/badge.doc.d.ts +17 -0
  221. package/dist/docs/components/badge.doc.js +34 -0
  222. package/dist/docs/components/border-beam.doc.d.ts +14 -0
  223. package/dist/docs/components/border-beam.doc.js +22 -0
  224. package/dist/docs/components/{collapsible.doc.d.ts → calendar.doc.d.ts} +1 -1
  225. package/dist/docs/components/calendar.doc.js +45 -0
  226. package/dist/docs/components/card.doc.d.ts +17 -0
  227. package/dist/docs/components/card.doc.js +39 -0
  228. package/dist/docs/components/carousel.doc.d.ts +15 -0
  229. package/dist/docs/components/carousel.doc.js +26 -0
  230. package/dist/docs/components/cascader.doc.d.ts +18 -0
  231. package/dist/docs/components/cascader.doc.js +54 -0
  232. package/dist/docs/components/collapse.doc.d.ts +18 -0
  233. package/dist/docs/components/collapse.doc.js +47 -0
  234. package/dist/docs/components/color-picker.doc.d.ts +18 -0
  235. package/dist/docs/components/color-picker.doc.js +46 -0
  236. package/dist/docs/components/descriptions.doc.d.ts +14 -0
  237. package/dist/docs/components/descriptions.doc.js +26 -0
  238. package/dist/docs/components/divider.doc.d.ts +17 -0
  239. package/dist/docs/components/divider.doc.js +34 -0
  240. package/dist/docs/components/empty.doc.d.ts +18 -0
  241. package/dist/docs/components/empty.doc.js +40 -0
  242. package/dist/docs/components/float-button.doc.d.ts +14 -0
  243. package/dist/docs/components/float-button.doc.js +23 -0
  244. package/dist/docs/components/form.doc.d.ts +1 -1
  245. package/dist/docs/components/image.doc.d.ts +15 -0
  246. package/dist/docs/components/image.doc.js +38 -0
  247. package/dist/docs/components/input.doc.js +11 -4
  248. package/dist/docs/components/list.doc.d.ts +18 -0
  249. package/dist/docs/components/list.doc.js +43 -0
  250. package/dist/docs/components/listy.doc.d.ts +18 -0
  251. package/dist/docs/components/listy.doc.js +40 -0
  252. package/dist/docs/components/masonry.doc.d.ts +14 -0
  253. package/dist/docs/components/masonry.doc.js +22 -0
  254. package/dist/docs/components/mentions.doc.d.ts +18 -0
  255. package/dist/docs/components/mentions.doc.js +43 -0
  256. package/dist/docs/components/modal.doc.js +3 -0
  257. package/dist/docs/components/progress.doc.d.ts +18 -0
  258. package/dist/docs/components/progress.doc.js +41 -0
  259. package/dist/docs/components/qr-code.doc.d.ts +18 -0
  260. package/dist/docs/components/qr-code.doc.js +41 -0
  261. package/dist/docs/components/rate.doc.d.ts +18 -0
  262. package/dist/docs/components/rate.doc.js +38 -0
  263. package/dist/docs/components/result.doc.d.ts +18 -0
  264. package/dist/docs/components/result.doc.js +42 -0
  265. package/dist/docs/components/segmented.doc.d.ts +14 -0
  266. package/dist/docs/components/segmented.doc.js +24 -0
  267. package/dist/docs/components/skeleton.doc.d.ts +18 -0
  268. package/dist/docs/components/skeleton.doc.js +42 -0
  269. package/dist/docs/components/slider.doc.d.ts +18 -0
  270. package/dist/docs/components/slider.doc.js +41 -0
  271. package/dist/docs/components/statistic.doc.d.ts +14 -0
  272. package/dist/docs/components/statistic.doc.js +27 -0
  273. package/dist/docs/components/textarea.doc.js +4 -2
  274. package/dist/docs/components/time-picker.doc.d.ts +18 -0
  275. package/dist/docs/components/time-picker.doc.js +45 -0
  276. package/dist/docs/components/timeline.doc.d.ts +14 -0
  277. package/dist/docs/components/timeline.doc.js +29 -0
  278. package/dist/docs/components/tooltip.doc.d.ts +2 -2
  279. package/dist/docs/components/tour.doc.d.ts +15 -0
  280. package/dist/docs/components/tour.doc.js +36 -0
  281. package/dist/docs/components/transfer.doc.d.ts +18 -0
  282. package/dist/docs/components/transfer.doc.js +48 -0
  283. package/dist/docs/components/tree-select.doc.d.ts +18 -0
  284. package/dist/docs/components/tree-select.doc.js +55 -0
  285. package/dist/docs/components/tree.doc.d.ts +18 -0
  286. package/dist/docs/components/tree.doc.js +46 -0
  287. package/dist/docs/components/upload.doc.d.ts +18 -0
  288. package/dist/docs/components/upload.doc.js +43 -0
  289. package/dist/docs/components/watermark.doc.d.ts +14 -0
  290. package/dist/docs/components/watermark.doc.js +22 -0
  291. package/dist/entries/affix.d.ts +3 -0
  292. package/dist/entries/{collapsible.js → affix.js} +1 -1
  293. package/dist/entries/app.d.ts +3 -0
  294. package/dist/entries/app.js +4 -0
  295. package/dist/entries/auto-complete.d.ts +4 -0
  296. package/dist/entries/auto-complete.js +4 -0
  297. package/dist/entries/avatar.d.ts +3 -0
  298. package/dist/entries/avatar.js +4 -0
  299. package/dist/entries/badge.d.ts +3 -0
  300. package/dist/entries/badge.js +4 -0
  301. package/dist/entries/border-beam.d.ts +3 -0
  302. package/dist/entries/border-beam.js +4 -0
  303. package/dist/entries/calendar.d.ts +3 -0
  304. package/dist/entries/calendar.js +4 -0
  305. package/dist/entries/card.d.ts +3 -0
  306. package/dist/entries/card.js +4 -0
  307. package/dist/entries/carousel.d.ts +3 -0
  308. package/dist/entries/carousel.js +4 -0
  309. package/dist/entries/cascader.d.ts +4 -0
  310. package/dist/entries/cascader.js +4 -0
  311. package/dist/entries/collapse.d.ts +3 -0
  312. package/dist/entries/collapse.js +4 -0
  313. package/dist/entries/color-picker.d.ts +5 -0
  314. package/dist/entries/color-picker.js +4 -0
  315. package/dist/entries/descriptions.d.ts +3 -0
  316. package/dist/entries/descriptions.js +4 -0
  317. package/dist/entries/divider.d.ts +3 -0
  318. package/dist/entries/divider.js +4 -0
  319. package/dist/entries/empty.d.ts +3 -0
  320. package/dist/entries/empty.js +4 -0
  321. package/dist/entries/float-button.d.ts +3 -0
  322. package/dist/entries/float-button.js +4 -0
  323. package/dist/entries/image.d.ts +3 -0
  324. package/dist/entries/image.js +4 -0
  325. package/dist/entries/input.d.ts +1 -1
  326. package/dist/entries/list.d.ts +3 -0
  327. package/dist/entries/list.js +4 -0
  328. package/dist/entries/listy.d.ts +3 -0
  329. package/dist/entries/listy.js +4 -0
  330. package/dist/entries/masonry.d.ts +3 -0
  331. package/dist/entries/masonry.js +4 -0
  332. package/dist/entries/mentions.d.ts +4 -0
  333. package/dist/entries/mentions.js +4 -0
  334. package/dist/entries/progress.d.ts +3 -0
  335. package/dist/entries/progress.js +4 -0
  336. package/dist/entries/provider.d.ts +1 -1
  337. package/dist/entries/provider.js +1 -1
  338. package/dist/entries/qr-code.d.ts +4 -0
  339. package/dist/entries/qr-code.js +4 -0
  340. package/dist/entries/rate.d.ts +3 -0
  341. package/dist/entries/rate.js +4 -0
  342. package/dist/entries/result.d.ts +3 -0
  343. package/dist/entries/result.js +4 -0
  344. package/dist/entries/segmented.d.ts +3 -0
  345. package/dist/entries/segmented.js +4 -0
  346. package/dist/entries/skeleton.d.ts +3 -0
  347. package/dist/entries/skeleton.js +4 -0
  348. package/dist/entries/slider.d.ts +3 -0
  349. package/dist/entries/slider.js +4 -0
  350. package/dist/entries/statistic.d.ts +3 -0
  351. package/dist/entries/statistic.js +4 -0
  352. package/dist/entries/textarea.d.ts +1 -1
  353. package/dist/entries/time-picker.d.ts +3 -0
  354. package/dist/entries/time-picker.js +4 -0
  355. package/dist/entries/timeline.d.ts +3 -0
  356. package/dist/entries/timeline.js +4 -0
  357. package/dist/entries/tour.d.ts +3 -0
  358. package/dist/entries/tour.js +4 -0
  359. package/dist/entries/transfer.d.ts +3 -0
  360. package/dist/entries/transfer.js +4 -0
  361. package/dist/entries/tree-select.d.ts +4 -0
  362. package/dist/entries/tree-select.js +4 -0
  363. package/dist/entries/tree.d.ts +3 -0
  364. package/dist/entries/tree.js +4 -0
  365. package/dist/entries/upload.d.ts +4 -0
  366. package/dist/entries/upload.js +4 -0
  367. package/dist/entries/util.d.ts +1 -0
  368. package/dist/entries/util.js +1 -0
  369. package/dist/entries/watermark.d.ts +3 -0
  370. package/dist/entries/watermark.js +4 -0
  371. package/dist/index.d.ts +51 -6
  372. package/dist/index.js +39 -3
  373. package/dist/provider/locale.d.ts +65 -0
  374. package/dist/provider/locale.js +146 -0
  375. package/dist/provider/tao-provider.d.ts +16 -1
  376. package/dist/provider/tao-provider.js +105 -87
  377. package/dist/theme/control.css +12 -2
  378. package/dist/theme/theme.css +4 -2
  379. package/dist/theme/tokens.d.ts +2 -2
  380. package/dist/theme/tokens.js +1 -0
  381. package/dist/utils/breakpoint.d.ts +2 -2
  382. package/dist/utils/breakpoint.js +3 -1
  383. package/dist/utils/field-label.d.ts +4 -0
  384. package/dist/utils/field-label.js +7 -0
  385. package/dist/utils/interop-default.d.ts +2 -0
  386. package/dist/utils/interop-default.js +4 -0
  387. package/dist/utils/types.d.ts +7 -0
  388. package/dist/utils/types.js +0 -0
  389. package/llms.txt +493 -22
  390. package/package.json +33 -9
  391. package/dist/components/collapsible/collapsible.css +0 -49
  392. package/dist/components/collapsible/collapsible.d.ts +0 -39
  393. package/dist/docs/components/collapsible.doc.js +0 -39
  394. package/dist/entries/collapsible.d.ts +0 -3
@@ -0,0 +1,215 @@
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import { Slot } from "@radix-ui/react-slot";
3
+ import { Fragment as external_react_Fragment, isValidElement, useCallback, useEffect, useRef, useState } from "react";
4
+ import { createPortal } from "react-dom";
5
+ import { cx as semantic_js_cx } from "../../utils/semantic.js";
6
+ import "./border-beam.css";
7
+ function gradient(color) {
8
+ if (!color) return;
9
+ const stops = 'string' == typeof color ? [
10
+ {
11
+ color,
12
+ percent: 0
13
+ },
14
+ {
15
+ color,
16
+ percent: 100
17
+ }
18
+ ] : [
19
+ ...color
20
+ ];
21
+ const last = stops.at(-1);
22
+ if (last && 100 !== last.percent) stops.push({
23
+ ...last,
24
+ percent: 100
25
+ });
26
+ return `linear-gradient(to left, ${stops.map((stop)=>`${stop.color} ${0.7 * Math.min(100, Math.max(0, stop.percent))}%`).join(', ')}, transparent)`;
27
+ }
28
+ function borderPath(width, height, style) {
29
+ const radii = [
30
+ style.borderTopLeftRadius,
31
+ style.borderTopRightRadius,
32
+ style.borderBottomRightRadius,
33
+ style.borderBottomLeftRadius
34
+ ].map((value)=>{
35
+ const [x = '0', y = x] = value.split(' ');
36
+ const length = (part, total)=>Number.parseFloat(part) * (part.endsWith('%') ? total / 100 : 1) || 0;
37
+ return [
38
+ length(x, width),
39
+ length(y, height)
40
+ ];
41
+ });
42
+ const [tl, tr, br, bl] = radii;
43
+ const scale = Math.min(1, width / (tl[0] + tr[0] || 1), width / (bl[0] + br[0] || 1), height / (tl[1] + bl[1] || 1), height / (tr[1] + br[1] || 1));
44
+ radii.forEach((radius)=>{
45
+ radius[0] *= scale;
46
+ radius[1] *= scale;
47
+ });
48
+ const points = [
49
+ {
50
+ x: tl[0],
51
+ y: 0,
52
+ distance: 0
53
+ }
54
+ ];
55
+ const add = (x, y)=>{
56
+ const previous = points[points.length - 1];
57
+ const distance = Math.hypot(x - previous.x, y - previous.y);
58
+ if (distance) points.push({
59
+ x,
60
+ y,
61
+ distance: previous.distance + distance
62
+ });
63
+ };
64
+ [
65
+ tr,
66
+ br,
67
+ bl,
68
+ tl
69
+ ].forEach(([rx, ry], corner)=>{
70
+ const cx = corner < 2 ? width - rx : rx;
71
+ const cy = 0 === corner || 3 === corner ? ry : height - ry;
72
+ for(let step = 0; step <= 16; step++){
73
+ const angle = -Math.PI / 2 + corner * Math.PI / 2 + step / 16 * Math.PI / 2;
74
+ add(cx + rx * Math.cos(angle), cy + ry * Math.sin(angle));
75
+ }
76
+ });
77
+ return points;
78
+ }
79
+ function perimeterPoint(distance, points) {
80
+ const index = Math.max(1, points.findIndex((point)=>point.distance >= distance));
81
+ const from = points[index - 1];
82
+ const to = points[index] ?? from;
83
+ const portion = (distance - from.distance) / (to.distance - from.distance || 1);
84
+ return [
85
+ from.x + (to.x - from.x) * portion,
86
+ from.y + (to.y - from.y) * portion,
87
+ 180 * Math.atan2(to.y - from.y, to.x - from.x) / Math.PI
88
+ ];
89
+ }
90
+ function BeamEffect({ host, item, duration, phase, prefixCls, className, style, classNames, styles }) {
91
+ const root = useRef(null);
92
+ const beam = useRef(null);
93
+ const border = getComputedStyle(host);
94
+ const inset = void 0 === item.outset ? [
95
+ border.borderTopWidth,
96
+ border.borderRightWidth,
97
+ border.borderBottomWidth,
98
+ border.borderLeftWidth
99
+ ].map((value)=>`calc(-1 * ${value || '0px'})`).join(' ') : 'number' == typeof item.outset ? -item.outset : `calc(-1 * ${item.outset})`;
100
+ useEffect(()=>{
101
+ const overlay = root.current;
102
+ const light = beam.current;
103
+ const motion = matchMedia('(prefers-reduced-motion: reduce)');
104
+ let width = 0;
105
+ let height = 0;
106
+ let path = [];
107
+ let beamWidth = 0;
108
+ let beamHeight = 0;
109
+ let frame = 0;
110
+ let start;
111
+ const measure = ()=>{
112
+ width = overlay.clientWidth;
113
+ height = overlay.clientHeight;
114
+ path = borderPath(width, height, getComputedStyle(overlay));
115
+ beamWidth = light.offsetWidth;
116
+ beamHeight = light.offsetHeight;
117
+ };
118
+ const tick = (now)=>{
119
+ start ??= now;
120
+ const perimeter = path[path.length - 1].distance;
121
+ const distance = ((now - start) / (1000 * duration) + phase) % 1 * perimeter;
122
+ const [x, y, angle] = perimeterPoint(distance, path);
123
+ light.style.transform = `translate(${x - 0.9 * beamWidth}px, ${y - beamHeight / 2}px) rotate(${angle}deg)`;
124
+ frame = requestAnimationFrame(tick);
125
+ };
126
+ const updateMotion = ()=>{
127
+ cancelAnimationFrame(frame);
128
+ if (!motion.matches) frame = requestAnimationFrame(tick);
129
+ };
130
+ const observer = new ResizeObserver(measure);
131
+ observer.observe(overlay);
132
+ observer.observe(light);
133
+ measure();
134
+ updateMotion();
135
+ motion.addEventListener('change', updateMotion);
136
+ return ()=>{
137
+ observer.disconnect();
138
+ cancelAnimationFrame(frame);
139
+ motion.removeEventListener('change', updateMotion);
140
+ };
141
+ }, [
142
+ duration,
143
+ phase
144
+ ]);
145
+ return /*#__PURE__*/ createPortal(/*#__PURE__*/ jsx("div", {
146
+ ref: root,
147
+ "aria-hidden": "true",
148
+ "data-tao-border-beam": "",
149
+ className: semantic_js_cx(prefixCls, classNames?.root, className),
150
+ style: {
151
+ inset,
152
+ padding: item.lineWidth ?? 1,
153
+ ...styles?.root,
154
+ ...style
155
+ },
156
+ children: /*#__PURE__*/ jsx("span", {
157
+ ref: beam,
158
+ "data-tao-border-beam-light": "",
159
+ className: classNames?.beam,
160
+ style: {
161
+ width: item.size ?? 100,
162
+ backgroundImage: gradient(item.color),
163
+ ...styles?.beam
164
+ }
165
+ })
166
+ }), host);
167
+ }
168
+ function BorderBeam({ prefixCls, className, style, children, color, count, duration, items, lineWidth, outset, size, classNames, styles }) {
169
+ const [host, setHost] = useState(null);
170
+ const assignHost = useCallback((node)=>setHost(node instanceof HTMLElement ? node : node?.nativeElement ?? null), []);
171
+ useEffect(()=>{
172
+ if (!host || 'static' !== getComputedStyle(host).position) return;
173
+ const original = host.style.position;
174
+ host.style.position = 'relative';
175
+ return ()=>{
176
+ if ('relative' === host.style.position) host.style.position = original;
177
+ };
178
+ }, [
179
+ host
180
+ ]);
181
+ const total = items?.length ?? (void 0 !== count && Number.isFinite(count) && count >= 1 ? Math.floor(count) : 1);
182
+ const seconds = void 0 !== duration && duration > 0 ? duration : 6;
183
+ const child = /*#__PURE__*/ isValidElement(children) && children.type !== external_react_Fragment ? /*#__PURE__*/ jsx(Slot, {
184
+ ref: assignHost,
185
+ children: children
186
+ }) : children;
187
+ return /*#__PURE__*/ jsxs(Fragment, {
188
+ children: [
189
+ child,
190
+ host && Array.from({
191
+ length: total
192
+ }, (_, index)=>({
193
+ phase: index / total,
194
+ item: items?.[index]
195
+ })).map(({ phase, item })=>/*#__PURE__*/ jsx(BeamEffect, {
196
+ host: host,
197
+ item: {
198
+ color,
199
+ lineWidth,
200
+ outset,
201
+ size,
202
+ ...item
203
+ },
204
+ phase: phase,
205
+ duration: seconds,
206
+ prefixCls: prefixCls,
207
+ className: className,
208
+ style: style,
209
+ classNames: classNames,
210
+ styles: styles
211
+ }, `${total}-${phase}`))
212
+ ]
213
+ });
214
+ }
215
+ export { BorderBeam };
@@ -173,3 +173,10 @@
173
173
  }
174
174
  }
175
175
 
176
+ @media (pointer: coarse) {
177
+ button[data-tao-button] {
178
+ min-width: 44px;
179
+ min-height: 44px;
180
+ }
181
+ }
182
+
@@ -0,0 +1,126 @@
1
+ @layer components {
2
+ [data-tao-calendar] {
3
+ width: 100%;
4
+ min-width: 0;
5
+ color: var(--tao-color-text);
6
+ background: var(--tao-color-bg-container);
7
+ border-radius: var(--tao-radius);
8
+ font: var(--tao-font-size) / var(--tao-line-height) var(--tao-font-family);
9
+ }
10
+
11
+ [data-tao-calendar-toolbar] {
12
+ justify-content: flex-end;
13
+ align-items: center;
14
+ gap: var(--tao-margin-xs);
15
+ padding: var(--tao-padding-sm);
16
+ flex-wrap: wrap;
17
+ display: flex;
18
+ }
19
+
20
+ [data-tao-calendar] button:not([data-tao-select]):focus-visible {
21
+ outline: 2px solid var(--tao-color-primary);
22
+ outline-offset: 2px;
23
+ }
24
+
25
+ [data-tao-calendar] table {
26
+ table-layout: fixed;
27
+ border-collapse: collapse;
28
+ width: 100%;
29
+ }
30
+
31
+ [data-tao-calendar] th {
32
+ padding: var(--tao-padding-xs);
33
+ color: var(--tao-color-text-secondary);
34
+ text-align: end;
35
+ font-weight: 500;
36
+ }
37
+
38
+ [data-tao-calendar] td {
39
+ color: var(--tao-color-text-disabled);
40
+ vertical-align: top;
41
+ cursor: pointer;
42
+ padding: 3px;
43
+ }
44
+
45
+ [data-tao-calendar] td[class*="-cell-in-view"] {
46
+ color: var(--tao-color-text);
47
+ }
48
+
49
+ [data-tao-calendar-item] {
50
+ min-width: 0;
51
+ min-height: 100px;
52
+ padding: var(--tao-padding-xs);
53
+ border-top: 2px solid var(--tao-color-border-secondary);
54
+ transition: background-color var(--tao-motion-duration-fast);
55
+ }
56
+
57
+ [data-tao-calendar-value] {
58
+ text-align: end;
59
+ display: block;
60
+ }
61
+
62
+ [data-tao-calendar-events] {
63
+ overflow-wrap: anywhere;
64
+ min-width: 0;
65
+ }
66
+
67
+ [data-tao-calendar] td:not([class*="-cell-disabled"]):hover [data-tao-calendar-item] {
68
+ background: var(--tao-color-bg-text-hover);
69
+ }
70
+
71
+ [data-tao-calendar] td[class*="-cell-selected"] [data-tao-calendar-item] {
72
+ background: var(--tao-primary-bg);
73
+ color: var(--tao-color-primary);
74
+ }
75
+
76
+ [data-tao-calendar-item][data-today] {
77
+ border-top-color: var(--tao-color-primary);
78
+ }
79
+
80
+ [data-tao-calendar] td[class*="-cell-disabled"] {
81
+ color: var(--tao-color-text-disabled);
82
+ cursor: not-allowed;
83
+ background: var(--tao-color-fill-tertiary);
84
+ }
85
+
86
+ [data-tao-calendar][data-fullscreen="false"] {
87
+ border: 1px solid var(--tao-color-border-secondary);
88
+ }
89
+
90
+ [data-tao-calendar][data-fullscreen="false"] th {
91
+ text-align: center;
92
+ }
93
+
94
+ [data-tao-calendar][data-fullscreen="false"] [data-tao-calendar-item] {
95
+ border-radius: var(--tao-radius-sm);
96
+ border-top: 0;
97
+ min-height: 32px;
98
+ padding: 5px;
99
+ }
100
+
101
+ [data-tao-calendar][data-fullscreen="false"] [data-tao-calendar-value] {
102
+ text-align: center;
103
+ }
104
+
105
+ [data-tao-calendar][data-fullscreen="false"] [data-today] {
106
+ box-shadow: inset 0 0 0 1px var(--tao-color-primary);
107
+ }
108
+
109
+ @media (width <= 575px) {
110
+ [data-tao-calendar-item] {
111
+ min-height: 64px;
112
+ padding: 4px;
113
+ }
114
+
115
+ [data-tao-calendar-toolbar] {
116
+ justify-content: center;
117
+ }
118
+ }
119
+
120
+ @media (prefers-reduced-motion: reduce) {
121
+ [data-tao-calendar-item] {
122
+ transition: none;
123
+ }
124
+ }
125
+ }
126
+
@@ -0,0 +1,56 @@
1
+ import type { CellRenderInfo, Locale } from '@rc-component/picker/interface';
2
+ import { type Dayjs } from 'dayjs';
3
+ import 'dayjs/locale/zh-cn';
4
+ import { type CSSProperties, type ReactNode } from 'react';
5
+ import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic.js';
6
+ import './calendar.css';
7
+ export type CalendarMode = 'year' | 'month';
8
+ export type CalendarSemanticPart = 'root' | 'header' | 'body' | 'content' | 'item' | 'itemContent';
9
+ export interface CalendarSelectInfo {
10
+ source: 'year' | 'month' | 'date' | 'customize';
11
+ }
12
+ export type HeaderRender<DateType> = (config: {
13
+ value: DateType;
14
+ type: CalendarMode;
15
+ onChange: (date: DateType) => void;
16
+ onTypeChange: (type: CalendarMode) => void;
17
+ }) => ReactNode;
18
+ type SemanticValue<Value, Props> = Value | ((info: {
19
+ props: Props;
20
+ }) => Value);
21
+ export interface CalendarProps<DateType = Dayjs> {
22
+ prefixCls?: string;
23
+ className?: string;
24
+ rootClassName?: string;
25
+ style?: CSSProperties;
26
+ classNames?: SemanticValue<SemanticClassNames<CalendarSemanticPart>, CalendarProps<DateType>>;
27
+ styles?: SemanticValue<SemanticStyles<CalendarSemanticPart>, CalendarProps<DateType>>;
28
+ locale?: {
29
+ lang: Partial<Locale>;
30
+ timePickerLocale?: {
31
+ placeholder?: string;
32
+ };
33
+ };
34
+ validRange?: [DateType, DateType];
35
+ disabledDate?: (date: DateType) => boolean;
36
+ dateFullCellRender?: (date: DateType) => ReactNode;
37
+ dateCellRender?: (date: DateType) => ReactNode;
38
+ monthFullCellRender?: (date: DateType) => ReactNode;
39
+ monthCellRender?: (date: DateType) => ReactNode;
40
+ cellRender?: (date: DateType, info: CellRenderInfo<DateType>) => ReactNode;
41
+ fullCellRender?: (date: DateType, info: CellRenderInfo<DateType>) => ReactNode;
42
+ headerRender?: HeaderRender<DateType>;
43
+ value?: DateType;
44
+ defaultValue?: DateType;
45
+ mode?: CalendarMode;
46
+ fullscreen?: boolean;
47
+ showWeek?: boolean;
48
+ onChange?: (date: DateType) => void;
49
+ onPanelChange?: (date: DateType, mode: CalendarMode) => void;
50
+ onSelect?: (date: DateType, info: CalendarSelectInfo) => void;
51
+ }
52
+ export interface CalendarRef {
53
+ nativeElement: HTMLDivElement;
54
+ }
55
+ export declare const Calendar: import("react").ForwardRefExoticComponent<CalendarProps<Dayjs> & import("react").RefAttributes<CalendarRef>>;
56
+ export {};
@@ -0,0 +1,178 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { PickerPanel } from "@rc-component/picker";
3
+ import dayjs from "@rc-component/picker/generate/dayjs";
4
+ import en_US from "@rc-component/picker/locale/en_US";
5
+ import zh_CN from "@rc-component/picker/locale/zh_CN";
6
+ import dayjs_0 from "dayjs";
7
+ import "dayjs/locale/zh-cn";
8
+ import { forwardRef, useImperativeHandle, useRef, useState } from "react";
9
+ import { useTaoConfig } from "../../provider/tao-provider.js";
10
+ import { Segmented } from "../segmented/segmented.js";
11
+ import { Select } from "../select/select.js";
12
+ import { cx } from "../../utils/semantic.js";
13
+ import "./calendar.css";
14
+ const Calendar = /*#__PURE__*/ forwardRef((props, ref)=>{
15
+ const config = useTaoConfig();
16
+ const root = useRef(null);
17
+ useImperativeHandle(ref, ()=>({
18
+ get nativeElement () {
19
+ return root.current;
20
+ }
21
+ }));
22
+ const [innerValue, setValue] = useState(()=>props.defaultValue ?? dayjs_0());
23
+ const [innerMode, setMode] = useState('month');
24
+ const value = props.value ?? innerValue;
25
+ const mode = props.mode ?? innerMode;
26
+ const { fullscreen = true, validRange } = props;
27
+ const names = 'function' == typeof props.classNames ? props.classNames({
28
+ props
29
+ }) : props.classNames;
30
+ const styles = 'function' == typeof props.styles ? props.styles({
31
+ props
32
+ }) : props.styles;
33
+ const chinese = 'zh_CN' === config.locale.locale;
34
+ const locale = {
35
+ ...chinese ? zh_CN : en_US,
36
+ ...props.locale?.lang
37
+ };
38
+ const months = locale.shortMonths ?? dayjs.locale.getShortMonths?.(locale.locale) ?? [];
39
+ const disabled = (date)=>!!(validRange && (date.isBefore(validRange[0], 'day') || date.isAfter(validRange[1], 'day'))) || !!props.disabledDate?.(date);
40
+ const select = (date_0, source)=>{
41
+ if (void 0 === props.value) setValue(date_0);
42
+ if (!date_0.isSame(value, 'day')) {
43
+ if (!date_0.isSame(value, 'month' === mode ? 'month' : 'year')) props.onPanelChange?.(date_0, mode);
44
+ props.onChange?.(date_0);
45
+ }
46
+ props.onSelect?.(date_0, {
47
+ source
48
+ });
49
+ };
50
+ const changeMode = (next)=>{
51
+ if (void 0 === props.mode) setMode(next);
52
+ props.onPanelChange?.(value, next);
53
+ };
54
+ const clamp = (date_1)=>validRange ? date_1.isBefore(validRange[0], 'day') ? validRange[0] : date_1.isAfter(validRange[1], 'day') ? validRange[1] : date_1 : date_1;
55
+ const firstYear = validRange?.[0].year() ?? value.year() - 10;
56
+ const lastYear = validRange?.[1].year() ?? value.year() + 10;
57
+ const minMonth = validRange && value.year() === validRange[0].year() ? validRange[0].month() : 0;
58
+ const maxMonth = validRange && value.year() === validRange[1].year() ? validRange[1].month() : 11;
59
+ const renderCell = (date_2, info)=>{
60
+ if (props.fullCellRender) return props.fullCellRender(date_2, info);
61
+ const legacyFull = 'month' === info.type ? props.monthFullCellRender : props.dateFullCellRender;
62
+ if (legacyFull) return legacyFull(date_2);
63
+ const extra = props.cellRender ? props.cellRender(date_2, info) : 'month' === info.type ? props.monthCellRender?.(date_2) : props.dateCellRender?.(date_2);
64
+ return /*#__PURE__*/ jsxs("div", {
65
+ "data-tao-calendar-item": "",
66
+ "data-today": date_2.isSame(dayjs_0(), 'month' === info.type ? 'month' : 'day') || void 0,
67
+ children: [
68
+ /*#__PURE__*/ jsx("span", {
69
+ "data-tao-calendar-value": "",
70
+ children: 'month' === info.type ? months[date_2.month()] : String(date_2.date()).padStart(2, '0')
71
+ }),
72
+ /*#__PURE__*/ jsx("div", {
73
+ "data-tao-calendar-events": "",
74
+ className: names?.itemContent,
75
+ style: styles?.itemContent,
76
+ children: extra
77
+ })
78
+ ]
79
+ });
80
+ };
81
+ return /*#__PURE__*/ jsxs("div", {
82
+ ref: root,
83
+ "data-tao-calendar": "",
84
+ "data-fullscreen": fullscreen,
85
+ className: cx(names?.root, props.className, props.rootClassName),
86
+ style: {
87
+ ...styles?.root,
88
+ ...props.style
89
+ },
90
+ children: [
91
+ props.headerRender ? props.headerRender({
92
+ value,
93
+ type: mode,
94
+ onChange: (date_3)=>select(date_3, 'customize'),
95
+ onTypeChange: changeMode
96
+ }) : /*#__PURE__*/ jsxs("div", {
97
+ "data-tao-calendar-toolbar": "",
98
+ className: names?.header,
99
+ style: styles?.header,
100
+ children: [
101
+ /*#__PURE__*/ jsx(Select, {
102
+ "aria-label": chinese ? '年' : 'Year',
103
+ mobileTitle: chinese ? '年' : 'Year',
104
+ size: "medium",
105
+ style: {
106
+ width: 'auto',
107
+ minWidth: '6em'
108
+ },
109
+ value: String(value.year()),
110
+ onChange: (year)=>select(clamp(value.year(Number(year))), 'year'),
111
+ options: Array.from({
112
+ length: lastYear - firstYear + 1
113
+ }, (_, index)=>({
114
+ value: String(firstYear + index),
115
+ label: `${firstYear + index}${chinese ? '年' : ''}`
116
+ }))
117
+ }),
118
+ 'month' === mode && /*#__PURE__*/ jsx(Select, {
119
+ "aria-label": chinese ? '月' : 'Month',
120
+ mobileTitle: chinese ? '月' : 'Month',
121
+ size: "medium",
122
+ style: {
123
+ width: 'auto',
124
+ minWidth: '6em'
125
+ },
126
+ value: String(value.month()),
127
+ onChange: (month)=>select(value.month(Number(month)), 'month'),
128
+ options: months.map((month_0, index_0)=>({
129
+ label: month_0,
130
+ value: String(index_0)
131
+ })).slice(minMonth, maxMonth + 1)
132
+ }),
133
+ /*#__PURE__*/ jsx(Segmented, {
134
+ "aria-label": chinese ? '日历视图' : 'Calendar view',
135
+ size: "medium",
136
+ value: mode,
137
+ onChange: changeMode,
138
+ options: [
139
+ {
140
+ value: 'month',
141
+ label: chinese ? '月' : 'Month'
142
+ },
143
+ {
144
+ value: 'year',
145
+ label: chinese ? '年' : 'Year'
146
+ }
147
+ ]
148
+ })
149
+ ]
150
+ }),
151
+ /*#__PURE__*/ jsx(PickerPanel, {
152
+ prefixCls: props.prefixCls ?? 'tao-calendar-panel',
153
+ generateConfig: dayjs,
154
+ locale: locale,
155
+ value: value,
156
+ mode: 'year' === mode ? 'month' : 'date',
157
+ picker: 'year' === mode ? 'month' : 'date',
158
+ hideHeader: true,
159
+ showWeek: props.showWeek,
160
+ disabledDate: disabled,
161
+ onSelect: (date_4)=>select(date_4, 'year' === mode ? 'month' : 'date'),
162
+ cellRender: (date_5, info_0)=>renderCell(date_5, info_0),
163
+ classNames: {
164
+ body: names?.body,
165
+ content: names?.content,
166
+ item: names?.item
167
+ },
168
+ styles: {
169
+ body: styles?.body,
170
+ content: styles?.content,
171
+ item: styles?.item
172
+ }
173
+ })
174
+ ]
175
+ });
176
+ });
177
+ Calendar.displayName = 'Calendar';
178
+ export { Calendar };
@@ -0,0 +1,43 @@
1
+ import { type GetIndicatorSize, type MoreProps, type TabsProps as RcTabsProps, type Tab } from '@rc-component/tabs';
2
+ import type { CSSProperties, KeyboardEvent, MouseEvent, ReactNode } from 'react';
3
+ type TabPart = 'root' | 'item' | 'remove' | 'indicator' | 'body' | 'content' | 'header';
4
+ type TabClassNames = Partial<Record<TabPart, string>> & {
5
+ popup?: {
6
+ root?: string;
7
+ };
8
+ };
9
+ type TabStyles = Partial<Record<TabPart, CSSProperties>> & {
10
+ popup?: {
11
+ root?: CSSProperties;
12
+ };
13
+ };
14
+ export interface CardTabsProps extends Omit<RcTabsProps, 'classNames' | 'styles' | 'items' | 'editable' | 'more'> {
15
+ type?: 'line' | 'card' | 'editable-card';
16
+ size?: 'small' | 'medium' | 'middle' | 'large';
17
+ hideAdd?: boolean;
18
+ centered?: boolean;
19
+ rootClassName?: string;
20
+ classNames?: TabClassNames | ((info: {
21
+ props: CardTabsProps;
22
+ }) => TabClassNames);
23
+ styles?: TabStyles | ((info: {
24
+ props: CardTabsProps;
25
+ }) => TabStyles);
26
+ tabPlacement?: 'top' | 'bottom' | 'start' | 'end';
27
+ onEdit?: (event: MouseEvent | KeyboardEvent | string, action: 'add' | 'remove') => void;
28
+ children?: ReactNode;
29
+ indicatorSize?: GetIndicatorSize;
30
+ items?: (Tab & {
31
+ destroyInactiveTabPane?: boolean;
32
+ })[];
33
+ destroyInactiveTabPane?: boolean;
34
+ addIcon?: ReactNode;
35
+ moreIcon?: ReactNode;
36
+ removeIcon?: ReactNode;
37
+ more?: MoreProps & {
38
+ visible?: boolean;
39
+ onVisibleChange?: (open: boolean) => void;
40
+ };
41
+ }
42
+ export declare function CardTabs(props: CardTabsProps): import("react").JSX.Element;
43
+ export {};