@chaoswise/ui 3.0.22 → 3.1.0

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 (411) hide show
  1. package/lib/Alert/index.js +48 -2
  2. package/lib/Alert/index.style.js +36 -0
  3. package/lib/Antd5/_util/ActionButton.js +4 -2
  4. package/lib/Antd5/_util/ContextIsolator.js +27 -0
  5. package/lib/Antd5/_util/easings.js +2 -2
  6. package/lib/Antd5/_util/getScroll.js +9 -8
  7. package/lib/Antd5/_util/hooks/useClosable.js +3 -2
  8. package/lib/Antd5/_util/hooks/useUniqueMemo.js +123 -0
  9. package/lib/Antd5/_util/hooks/useZIndex.js +31 -15
  10. package/lib/Antd5/_util/motion.js +3 -2
  11. package/lib/Antd5/_util/placements.js +2 -2
  12. package/lib/Antd5/_util/scrollTo.js +1 -1
  13. package/lib/Antd5/_util/statusUtils.js +1 -1
  14. package/lib/Antd5/_util/toList.js +5 -0
  15. package/lib/Antd5/_util/warning.js +0 -1
  16. package/lib/Antd5/_util/wave/WaveEffect.js +2 -2
  17. package/lib/Antd5/_util/wave/interface.js +2 -1
  18. package/lib/Antd5/_util/wave/useWave.js +1 -1
  19. package/lib/Antd5/_util/wave/util.js +1 -9
  20. package/lib/Antd5/alert/Alert.js +1 -2
  21. package/lib/Antd5/alert/ErrorBoundary.js +1 -1
  22. package/lib/Antd5/alert/design/behavior-pattern.js +3 -3
  23. package/lib/Antd5/alert/style/index.js +6 -4
  24. package/lib/Antd5/anchor/Anchor.js +8 -7
  25. package/lib/Antd5/anchor/AnchorLink.js +4 -4
  26. package/lib/Antd5/app/index.js +2 -1
  27. package/lib/Antd5/app/style/index.js +5 -4
  28. package/lib/Antd5/auto-complete/index.js +1 -1
  29. package/lib/Antd5/avatar/group.js +35 -17
  30. package/lib/Antd5/avatar/style/index.js +18 -13
  31. package/lib/Antd5/back-top/index.js +3 -2
  32. package/lib/Antd5/badge/ScrollNumber.js +1 -1
  33. package/lib/Antd5/badge/SingleNumber.js +17 -16
  34. package/lib/Antd5/badge/style/index.js +6 -7
  35. package/lib/Antd5/badge/style/ribbon.js +3 -3
  36. package/lib/Antd5/breadcrumb/design/behavior-pattern.js +4 -4
  37. package/lib/Antd5/breadcrumb/style/index.js +2 -2
  38. package/lib/Antd5/button/LoadingIcon.js +5 -10
  39. package/lib/Antd5/button/button-group.js +0 -1
  40. package/lib/Antd5/button/button.js +70 -41
  41. package/lib/Antd5/button/buttonHelpers.js +7 -5
  42. package/lib/Antd5/button/style/{compactCmp.js → compact.js} +20 -27
  43. package/lib/Antd5/button/style/group.js +9 -7
  44. package/lib/Antd5/button/style/index.js +150 -110
  45. package/lib/Antd5/button/style/token.js +8 -1
  46. package/lib/Antd5/calendar/generateCalendar.js +25 -28
  47. package/lib/Antd5/calendar/style/index.js +4 -4
  48. package/lib/Antd5/card/Card.js +3 -3
  49. package/lib/Antd5/card/style/index.js +6 -9
  50. package/lib/Antd5/carousel/index.js +3 -3
  51. package/lib/Antd5/carousel/style/index.js +1 -1
  52. package/lib/Antd5/cascader/Panel.js +7 -2
  53. package/lib/Antd5/cascader/hooks/useBase.js +3 -2
  54. package/lib/Antd5/cascader/hooks/useColumnIcons.js +6 -3
  55. package/lib/Antd5/cascader/index.js +1 -1
  56. package/lib/Antd5/cascader/style/columns.js +6 -4
  57. package/lib/Antd5/checkbox/Checkbox.js +11 -5
  58. package/lib/Antd5/checkbox/style/index.js +6 -3
  59. package/lib/Antd5/collapse/Collapse.js +2 -1
  60. package/lib/Antd5/collapse/style/index.js +20 -13
  61. package/lib/Antd5/color-picker/ColorPicker.js +120 -78
  62. package/lib/Antd5/color-picker/ColorPickerPanel.js +44 -26
  63. package/lib/Antd5/color-picker/color.js +82 -10
  64. package/lib/Antd5/color-picker/components/ColorAlphaInput.js +2 -2
  65. package/lib/Antd5/color-picker/components/ColorClear.js +2 -2
  66. package/lib/Antd5/color-picker/components/ColorHexInput.js +5 -4
  67. package/lib/Antd5/color-picker/components/ColorInput.js +4 -3
  68. package/lib/Antd5/color-picker/components/ColorPresets.js +1 -1
  69. package/lib/Antd5/color-picker/components/ColorSlider.js +139 -0
  70. package/lib/Antd5/color-picker/components/ColorTrigger.js +52 -26
  71. package/lib/Antd5/color-picker/components/PanelPicker/GradientColorBar.js +130 -0
  72. package/lib/Antd5/color-picker/components/PanelPicker/index.js +194 -0
  73. package/lib/Antd5/color-picker/context.js +1 -5
  74. package/lib/Antd5/color-picker/hooks/useModeColor.js +87 -0
  75. package/lib/Antd5/color-picker/style/color-block.js +3 -2
  76. package/lib/Antd5/color-picker/style/index.js +33 -15
  77. package/lib/Antd5/color-picker/style/input.js +1 -1
  78. package/lib/Antd5/color-picker/style/picker.js +6 -33
  79. package/lib/Antd5/color-picker/style/slider.js +87 -0
  80. package/lib/Antd5/color-picker/util.js +53 -7
  81. package/lib/Antd5/config-provider/context.js +3 -1
  82. package/lib/Antd5/config-provider/cssVariables.js +0 -1
  83. package/lib/Antd5/config-provider/defaultRenderEmpty.js +8 -1
  84. package/lib/Antd5/config-provider/index.js +13 -5
  85. package/lib/Antd5/config-provider/style/index.js +0 -1
  86. package/lib/Antd5/date-picker/PickerButton.js +3 -2
  87. package/lib/Antd5/date-picker/design/behavior-pattern.js +15 -15
  88. package/lib/Antd5/date-picker/generatePicker/constant.js +15 -0
  89. package/lib/Antd5/date-picker/generatePicker/generateRangePicker.js +16 -11
  90. package/lib/Antd5/date-picker/generatePicker/generateSinglePicker.js +19 -15
  91. package/lib/Antd5/date-picker/generatePicker/index.js +2 -2
  92. package/lib/Antd5/date-picker/generatePicker/interface.js +1 -1
  93. package/lib/Antd5/date-picker/index.js +2 -17
  94. package/lib/Antd5/date-picker/locale/ar_EG.js +9 -1
  95. package/lib/Antd5/date-picker/locale/az_AZ.js +9 -1
  96. package/lib/Antd5/date-picker/locale/el_GR.js +9 -1
  97. package/lib/Antd5/date-picker/locale/ja_JP.js +11 -1
  98. package/lib/Antd5/date-picker/locale/kn_IN.js +9 -1
  99. package/lib/Antd5/date-picker/locale/pl_PL.js +9 -1
  100. package/lib/Antd5/date-picker/locale/uk_UA.js +10 -1
  101. package/lib/Antd5/date-picker/style/index.js +13 -10
  102. package/lib/Antd5/date-picker/style/panel.js +36 -32
  103. package/lib/Antd5/date-picker/style/token.js +1 -1
  104. package/lib/Antd5/date-picker/util.js +0 -48
  105. package/lib/Antd5/descriptions/hooks/useItems.js +5 -0
  106. package/lib/Antd5/descriptions/hooks/useRow.js +42 -34
  107. package/lib/Antd5/descriptions/style/index.js +20 -8
  108. package/lib/Antd5/divider/index.js +4 -3
  109. package/lib/Antd5/divider/style/index.js +19 -4
  110. package/lib/Antd5/drawer/DrawerPanel.js +11 -20
  111. package/lib/Antd5/drawer/index.js +39 -42
  112. package/lib/Antd5/drawer/style/index.js +10 -11
  113. package/lib/Antd5/dropdown/dropdown.js +5 -7
  114. package/lib/Antd5/dropdown/style/index.js +27 -11
  115. package/lib/Antd5/empty/empty.js +9 -3
  116. package/lib/Antd5/empty/simple.js +9 -3
  117. package/lib/Antd5/empty/style/index.js +1 -1
  118. package/lib/Antd5/float-button/BackTop.js +3 -2
  119. package/lib/Antd5/float-button/FloatButton.js +16 -5
  120. package/lib/Antd5/float-button/FloatButtonGroup.js +76 -52
  121. package/lib/Antd5/float-button/style/index.js +117 -76
  122. package/lib/Antd5/float-button/style/keyframes.js +118 -0
  123. package/lib/Antd5/form/ErrorList.js +14 -2
  124. package/lib/Antd5/form/Form.js +11 -3
  125. package/lib/Antd5/form/FormItem/ItemHolder.js +8 -4
  126. package/lib/Antd5/form/FormItem/index.js +6 -4
  127. package/lib/Antd5/form/FormItemInput.js +68 -28
  128. package/lib/Antd5/form/FormItemLabel.js +3 -3
  129. package/lib/Antd5/form/hooks/useForm.js +8 -1
  130. package/lib/Antd5/form/hooks/useVariants.js +10 -4
  131. package/lib/Antd5/form/style/explain.js +9 -8
  132. package/lib/Antd5/form/style/index.js +30 -18
  133. package/lib/Antd5/grid/row.js +2 -2
  134. package/lib/Antd5/image/index.js +3 -1
  135. package/lib/Antd5/image/style/index.js +17 -20
  136. package/lib/Antd5/index.js +2 -1
  137. package/lib/Antd5/input/Input.js +18 -38
  138. package/lib/Antd5/input/OTP/OTPInput.js +10 -5
  139. package/lib/Antd5/input/OTP/index.js +12 -4
  140. package/lib/Antd5/input/Password.js +6 -2
  141. package/lib/Antd5/input/Search.js +2 -4
  142. package/lib/Antd5/input/TextArea.js +1 -1
  143. package/lib/Antd5/input/style/index.js +72 -63
  144. package/lib/Antd5/input/style/otp.js +1 -1
  145. package/lib/Antd5/input/style/variants.js +38 -23
  146. package/lib/Antd5/input/utils.js +0 -1
  147. package/lib/Antd5/input-number/index.js +19 -22
  148. package/lib/Antd5/input-number/style/index.js +26 -16
  149. package/lib/Antd5/layout/Sider.js +15 -8
  150. package/lib/Antd5/layout/style/index.js +6 -96
  151. package/lib/Antd5/layout/style/sider.js +115 -0
  152. package/lib/Antd5/list/Item.js +18 -5
  153. package/lib/Antd5/list/index.js +15 -10
  154. package/lib/Antd5/list/style/index.js +40 -41
  155. package/lib/Antd5/locale/ar_EG.js +14 -1
  156. package/lib/Antd5/locale/az_AZ.js +78 -28
  157. package/lib/Antd5/locale/bn_BD.js +0 -1
  158. package/lib/Antd5/locale/by_BY.js +0 -1
  159. package/lib/Antd5/locale/ca_ES.js +0 -1
  160. package/lib/Antd5/locale/cs_CZ.js +0 -1
  161. package/lib/Antd5/locale/de_DE.js +0 -1
  162. package/lib/Antd5/locale/el_GR.js +104 -3
  163. package/lib/Antd5/locale/en_GB.js +0 -1
  164. package/lib/Antd5/locale/en_US.js +4 -2
  165. package/lib/Antd5/locale/es_ES.js +10 -6
  166. package/lib/Antd5/locale/et_EE.js +0 -1
  167. package/lib/Antd5/locale/eu_ES.js +4 -2
  168. package/lib/Antd5/locale/fa_IR.js +0 -1
  169. package/lib/Antd5/locale/fr_BE.js +5 -1
  170. package/lib/Antd5/locale/fr_CA.js +0 -1
  171. package/lib/Antd5/locale/fr_FR.js +5 -6
  172. package/lib/Antd5/locale/ga_IE.js +0 -1
  173. package/lib/Antd5/locale/gl_ES.js +0 -1
  174. package/lib/Antd5/locale/he_IL.js +0 -1
  175. package/lib/Antd5/locale/hi_IN.js +0 -1
  176. package/lib/Antd5/locale/hr_HR.js +0 -1
  177. package/lib/Antd5/locale/id_ID.js +4 -2
  178. package/lib/Antd5/locale/index.js +1 -1
  179. package/lib/Antd5/locale/it_IT.js +0 -1
  180. package/lib/Antd5/locale/ja_JP.js +4 -2
  181. package/lib/Antd5/locale/ka_GE.js +0 -1
  182. package/lib/Antd5/locale/kk_KZ.js +0 -1
  183. package/lib/Antd5/locale/km_KH.js +0 -1
  184. package/lib/Antd5/locale/kn_IN.js +82 -4
  185. package/lib/Antd5/locale/ko_KR.js +4 -2
  186. package/lib/Antd5/locale/lt_LT.js +4 -2
  187. package/lib/Antd5/locale/ml_IN.js +0 -1
  188. package/lib/Antd5/locale/mn_MN.js +86 -2
  189. package/lib/Antd5/locale/ms_MY.js +101 -18
  190. package/lib/Antd5/locale/my_MM.js +0 -1
  191. package/lib/Antd5/locale/nb_NO.js +0 -1
  192. package/lib/Antd5/locale/ne_NP.js +104 -2
  193. package/lib/Antd5/locale/nl_BE.js +5 -1
  194. package/lib/Antd5/locale/nl_NL.js +5 -1
  195. package/lib/Antd5/locale/pl_PL.js +0 -1
  196. package/lib/Antd5/locale/pt_BR.js +0 -1
  197. package/lib/Antd5/locale/pt_PT.js +55 -38
  198. package/lib/Antd5/locale/ro_RO.js +0 -1
  199. package/lib/Antd5/locale/ru_RU.js +9 -2
  200. package/lib/Antd5/locale/si_LK.js +0 -1
  201. package/lib/Antd5/locale/sk_SK.js +0 -1
  202. package/lib/Antd5/locale/sr_RS.js +0 -1
  203. package/lib/Antd5/locale/sv_SE.js +0 -1
  204. package/lib/Antd5/locale/th_TH.js +11 -3
  205. package/lib/Antd5/locale/tk_TK.js +0 -1
  206. package/lib/Antd5/locale/tr_TR.js +2 -1
  207. package/lib/Antd5/locale/uk_UA.js +1 -1
  208. package/lib/Antd5/locale/ur_PK.js +0 -1
  209. package/lib/Antd5/locale/uz_UZ.js +6 -7
  210. package/lib/Antd5/locale/zh_CN.js +4 -2
  211. package/lib/Antd5/locale/zh_HK.js +0 -1
  212. package/lib/Antd5/locale/zh_TW.js +0 -1
  213. package/lib/Antd5/mentions/index.js +4 -4
  214. package/lib/Antd5/menu/MenuItem.js +6 -5
  215. package/lib/Antd5/menu/OverrideContext.js +4 -3
  216. package/lib/Antd5/menu/SubMenu.js +2 -2
  217. package/lib/Antd5/menu/menu.js +2 -2
  218. package/lib/Antd5/menu/style/index.js +58 -40
  219. package/lib/Antd5/menu/style/theme.js +24 -20
  220. package/lib/Antd5/menu/style/vertical.js +10 -7
  221. package/lib/Antd5/message/PurePanel.js +22 -40
  222. package/lib/Antd5/message/style/index.js +8 -47
  223. package/lib/Antd5/message/useMessage.js +3 -15
  224. package/lib/Antd5/modal/Modal.js +50 -38
  225. package/lib/Antd5/modal/PurePanel.js +0 -1
  226. package/lib/Antd5/modal/confirm.js +4 -5
  227. package/lib/Antd5/modal/style/confirm.js +1 -2
  228. package/lib/Antd5/modal/style/index.js +13 -3
  229. package/lib/Antd5/modal/useModal/HookModal.js +4 -3
  230. package/lib/Antd5/modal/useModal/index.js +0 -1
  231. package/lib/Antd5/notification/index.js +6 -3
  232. package/lib/Antd5/notification/style/index.js +35 -3
  233. package/lib/Antd5/notification/useNotification.js +6 -1
  234. package/lib/Antd5/pagination/Pagination.js +10 -5
  235. package/lib/Antd5/pagination/design/behavior-pattern.js +3 -3
  236. package/lib/Antd5/pagination/style/bordered.js +1 -1
  237. package/lib/Antd5/pagination/style/index.js +27 -18
  238. package/lib/Antd5/popconfirm/PurePanel.js +7 -7
  239. package/lib/Antd5/popover/PurePanel.js +16 -6
  240. package/lib/Antd5/popover/index.js +7 -19
  241. package/lib/Antd5/popover/style/index.js +3 -1
  242. package/lib/Antd5/progress/Line.js +27 -19
  243. package/lib/Antd5/progress/design/behavior-pattern.js +3 -3
  244. package/lib/Antd5/progress/progress.js +37 -11
  245. package/lib/Antd5/progress/style/index.js +46 -11
  246. package/lib/Antd5/progress/utils.js +20 -18
  247. package/lib/Antd5/qr-code/QrcodeStatus.js +42 -0
  248. package/lib/Antd5/qr-code/index.js +31 -31
  249. package/lib/Antd5/rate/index.js +8 -2
  250. package/lib/Antd5/result/noFound.js +3 -1
  251. package/lib/Antd5/result/serverError.js +3 -1
  252. package/lib/Antd5/result/unauthorized.js +5 -3
  253. package/lib/Antd5/segmented/index.js +5 -3
  254. package/lib/Antd5/segmented/style/index.js +11 -3
  255. package/lib/Antd5/select/index.js +4 -2
  256. package/lib/Antd5/select/style/dropdown.js +1 -1
  257. package/lib/Antd5/select/style/index.js +21 -8
  258. package/lib/Antd5/select/style/multiple.js +18 -9
  259. package/lib/Antd5/select/style/single.js +8 -10
  260. package/lib/Antd5/select/style/token.js +9 -2
  261. package/lib/Antd5/select/style/variants.js +20 -11
  262. package/lib/Antd5/skeleton/Image.js +6 -4
  263. package/lib/Antd5/skeleton/Node.js +1 -3
  264. package/lib/Antd5/skeleton/Paragraph.js +1 -1
  265. package/lib/Antd5/skeleton/Title.js +9 -6
  266. package/lib/Antd5/skeleton/style/index.js +13 -13
  267. package/lib/Antd5/slider/Context.js +4 -0
  268. package/lib/Antd5/slider/SliderTooltip.js +9 -5
  269. package/lib/Antd5/slider/index.js +32 -31
  270. package/lib/Antd5/slider/style/index.js +60 -44
  271. package/lib/Antd5/space/Compact.js +1 -1
  272. package/lib/Antd5/space/index.js +3 -3
  273. package/lib/Antd5/spin/Indicator/Looper.js +29 -0
  274. package/lib/Antd5/spin/Indicator/Progress.js +78 -0
  275. package/lib/Antd5/spin/Indicator/index.js +21 -0
  276. package/lib/Antd5/spin/index.js +27 -45
  277. package/lib/Antd5/spin/style/index.js +54 -17
  278. package/lib/Antd5/spin/usePercent.js +40 -0
  279. package/lib/Antd5/splitter/Panel.js +36 -0
  280. package/lib/Antd5/splitter/SplitBar.js +124 -0
  281. package/lib/Antd5/splitter/Splitter.js +194 -0
  282. package/lib/Antd5/{_util/transButton.js → splitter/hooks/useItems.js} +28 -54
  283. package/lib/Antd5/splitter/hooks/useResizable.js +43 -0
  284. package/lib/Antd5/splitter/hooks/useResize.js +138 -0
  285. package/lib/Antd5/splitter/hooks/useSizes.js +109 -0
  286. package/lib/Antd5/splitter/index.js +5 -0
  287. package/lib/Antd5/splitter/interface.js +1 -0
  288. package/lib/Antd5/splitter/style/index.js +219 -0
  289. package/lib/Antd5/statistic/style/index.js +1 -1
  290. package/lib/Antd5/steps/style/custom-icon.js +1 -1
  291. package/lib/Antd5/steps/style/index.js +11 -8
  292. package/lib/Antd5/steps/style/inline.js +5 -4
  293. package/lib/Antd5/steps/style/progress-dot.js +2 -2
  294. package/lib/Antd5/steps/style/small.js +3 -3
  295. package/lib/Antd5/steps/style/vertical.js +2 -2
  296. package/lib/Antd5/style/index.js +37 -13
  297. package/lib/Antd5/style/motion/slide.js +6 -5
  298. package/lib/Antd5/style/placementArrow.js +15 -6
  299. package/lib/Antd5/switch/style/index.js +1 -1
  300. package/lib/Antd5/table/Column.js +2 -3
  301. package/lib/Antd5/table/ColumnGroup.js +2 -3
  302. package/lib/Antd5/table/ExpandIcon.js +6 -6
  303. package/lib/Antd5/table/InternalTable.js +6 -6
  304. package/lib/Antd5/table/RcTable/VirtualTable.js +3 -2
  305. package/lib/Antd5/table/RcTable/index.js +3 -2
  306. package/lib/Antd5/table/hooks/useFilter/FilterDropdown.js +82 -61
  307. package/lib/Antd5/table/hooks/useFilter/FilterSearch.js +7 -7
  308. package/lib/Antd5/table/hooks/useFilter/index.js +28 -26
  309. package/lib/Antd5/table/hooks/useLazyKVMap.js +5 -5
  310. package/lib/Antd5/table/hooks/useSelection.js +21 -11
  311. package/lib/Antd5/table/hooks/useSorter.js +66 -42
  312. package/lib/Antd5/table/hooks/useTitleColumns.js +9 -7
  313. package/lib/Antd5/table/interface.js +1 -1
  314. package/lib/Antd5/table/style/bordered.js +5 -3
  315. package/lib/Antd5/table/style/expand.js +44 -38
  316. package/lib/Antd5/table/style/filter.js +1 -1
  317. package/lib/Antd5/table/style/index.js +26 -21
  318. package/lib/Antd5/table/style/selection.js +3 -1
  319. package/lib/Antd5/table/style/sorter.js +3 -1
  320. package/lib/Antd5/table/style/virtual.js +2 -2
  321. package/lib/Antd5/table/util.js +9 -8
  322. package/lib/Antd5/tabs/style/index.js +2 -2
  323. package/lib/Antd5/tag/style/index.js +2 -2
  324. package/lib/Antd5/theme/index.js +12 -5
  325. package/lib/Antd5/theme/interface/cssinjs-utils.js +1 -0
  326. package/lib/Antd5/theme/internal.js +10 -5
  327. package/lib/Antd5/theme/themes/dark/colors.js +3 -0
  328. package/lib/Antd5/theme/themes/dark/index.js +1 -0
  329. package/lib/Antd5/theme/themes/default/colors.js +3 -0
  330. package/lib/Antd5/theme/themes/default/index.js +6 -2
  331. package/lib/Antd5/theme/themes/seed.js +5 -2
  332. package/lib/Antd5/theme/themes/shared/genColorMapToken.js +2 -0
  333. package/lib/Antd5/theme/themes/shared/genFontSizes.js +1 -1
  334. package/lib/Antd5/theme/useToken.js +2 -1
  335. package/lib/Antd5/theme/util/alias.js +1 -1
  336. package/lib/Antd5/theme/util/genStyleUtils.js +61 -0
  337. package/lib/Antd5/time-picker/index.js +15 -2
  338. package/lib/Antd5/time-picker/locale/az_AZ.js +2 -1
  339. package/lib/Antd5/time-picker/locale/it_IT.js +2 -1
  340. package/lib/Antd5/time-picker/locale/uk_UA.js +2 -1
  341. package/lib/Antd5/timeline/TimelineItemList.js +0 -1
  342. package/lib/Antd5/timeline/style/index.js +1 -1
  343. package/lib/Antd5/tooltip/index.js +3 -2
  344. package/lib/Antd5/tooltip/style/index.js +3 -1
  345. package/lib/Antd5/tooltip/util.js +0 -1
  346. package/lib/Antd5/tour/panelRender.js +7 -13
  347. package/lib/Antd5/tour/style/index.js +6 -13
  348. package/lib/Antd5/transfer/ListItem.js +3 -3
  349. package/lib/Antd5/transfer/hooks/useData.js +1 -1
  350. package/lib/Antd5/transfer/hooks/useSelection.js +26 -21
  351. package/lib/Antd5/transfer/style/index.js +12 -22
  352. package/lib/Antd5/tree/Tree.js +2 -0
  353. package/lib/Antd5/tree/style/directory.js +39 -0
  354. package/lib/Antd5/tree/style/index.js +115 -166
  355. package/lib/Antd5/tree/utils/dropIndicator.js +3 -2
  356. package/lib/Antd5/tree/utils/iconUtil.js +5 -1
  357. package/lib/Antd5/tree-select/index.js +47 -43
  358. package/lib/Antd5/typography/Base/CopyBtn.js +17 -17
  359. package/lib/Antd5/typography/Base/Ellipsis.js +48 -40
  360. package/lib/Antd5/typography/Base/index.js +20 -60
  361. package/lib/Antd5/typography/Base/util.js +31 -1
  362. package/lib/Antd5/typography/Editable.js +11 -10
  363. package/lib/Antd5/typography/Title.js +1 -6
  364. package/lib/Antd5/typography/Typography.js +2 -6
  365. package/lib/Antd5/typography/hooks/useCopyClick.js +3 -2
  366. package/lib/Antd5/typography/hooks/usePrevious.js +1 -1
  367. package/lib/Antd5/{message/assets/Close.js → typography/hooks/useTooltipProps.js} +24 -16
  368. package/lib/Antd5/typography/style/mixins.js +3 -9
  369. package/lib/Antd5/upload/Upload.js +55 -83
  370. package/lib/Antd5/upload/UploadList/ListItem.js +15 -9
  371. package/lib/Antd5/upload/UploadList/index.js +33 -47
  372. package/lib/Antd5/upload/style/dragger.js +5 -26
  373. package/lib/Antd5/upload/style/list.js +2 -7
  374. package/lib/Antd5/version/version.js +1 -1
  375. package/lib/Antd5/watermark/context.js +1 -1
  376. package/lib/Antd5/watermark/index.js +35 -18
  377. package/lib/Antd5/watermark/useClips.js +2 -1
  378. package/lib/Antd5/watermark/useRafDebounce.js +1 -1
  379. package/lib/Antd5/watermark/utils.js +1 -1
  380. package/lib/Button/index.style.js +1 -3
  381. package/lib/CWSelect/index.js +39 -1
  382. package/lib/CWSelect/index.style.js +39 -0
  383. package/lib/CWTree/index.js +3 -9
  384. package/lib/CWTree/index.style.js +2 -0
  385. package/lib/ConfigProvider/ConfigProvider.js +9 -10
  386. package/lib/ConfigProvider/customTheme.js +9 -2
  387. package/lib/ConfigProvider/theme/common.js +140 -0
  388. package/lib/ConfigProvider/theme/dark.js +2 -0
  389. package/lib/ConfigProvider/theme/default.js +115 -0
  390. package/lib/ConfigProvider/theme/utils.js +49 -0
  391. package/lib/QuickTransfer/index.js +44 -48
  392. package/lib/RangePicker/components/ExtraQuickSelect.js +1 -4
  393. package/lib/RangePicker/index.js +38 -26
  394. package/lib/RangePicker/utils/generate/dayjs.js +1 -1
  395. package/lib/Splitter/index.js +2 -0
  396. package/package.json +37 -35
  397. package/lib/Antd5/color-picker/components/PanelPicker.js +0 -53
  398. package/lib/Antd5/color-picker/hooks/useColorState.js +0 -53
  399. package/lib/Antd5/layout/style/light.js +0 -24
  400. package/lib/Antd5/style/operationUnit.js +0 -18
  401. package/lib/Antd5/theme/util/calc/CSSCalculator.js +0 -119
  402. package/lib/Antd5/theme/util/calc/NumCalculator.js +0 -81
  403. package/lib/Antd5/theme/util/calc/calculator.js +0 -10
  404. package/lib/Antd5/theme/util/calc/index.js +0 -9
  405. package/lib/Antd5/theme/util/genComponentStyleHook.js +0 -243
  406. package/lib/Antd5/theme/util/maxmin.js +0 -27
  407. package/lib/Antd5/theme/util/statistic.js +0 -74
  408. package/lib/Antd5/typography/hooks/useUpdatedEffect.js +0 -13
  409. package/lib/Antd5/version/token-meta.json +0 -1
  410. package/lib/Antd5/version/token.json +0 -1
  411. package/lib/ConfigProvider/customTheme.json +0 -163
@@ -14,10 +14,13 @@ var genSharedButtonStyle = function genSharedButtonStyle(token) {
14
14
  var componentCls = token.componentCls,
15
15
  iconCls = token.iconCls,
16
16
  fontWeight = token.fontWeight;
17
- return _defineProperty({}, componentCls, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
17
+ return _defineProperty({}, componentCls, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
18
18
  outline: 'none',
19
19
  position: 'relative',
20
- display: 'inline-block',
20
+ display: 'inline-flex',
21
+ gap: token.marginXS,
22
+ alignItems: 'center',
23
+ justifyContent: 'center',
21
24
  fontWeight: fontWeight,
22
25
  whiteSpace: 'nowrap',
23
26
  textAlign: 'center',
@@ -31,29 +34,18 @@ var genSharedButtonStyle = function genSharedButtonStyle(token) {
31
34
  color: token.colorText,
32
35
  '&:disabled > *': {
33
36
  pointerEvents: 'none'
34
- },
35
- '> span': {
36
- display: 'inline-block'
37
37
  }
38
- }, "".concat(componentCls, "-icon"), _defineProperty({
39
- lineHeight: 0
40
- }, "&-end", {
41
- marginInlineStart: token.marginXS
42
- })), "> ".concat(iconCls, " + span, > span + ").concat(iconCls), {
43
- marginInlineStart: token.marginXS
44
- }), "&:not(".concat(componentCls, "-icon-only) > ").concat(componentCls, "-icon"), _defineProperty(_defineProperty({}, "&".concat(componentCls, "-loading-icon, &:not(:last-child)"), {
45
- marginInlineEnd: token.marginXS
46
- }), "&".concat(componentCls, "-loading-icon-end"), {
47
- marginInlineStart: token.marginXS
48
- })), '> a', {
38
+ }, "> span, ".concat(componentCls, "-icon"), {
39
+ display: 'inline-flex'
40
+ }), '> a', {
49
41
  color: 'currentColor'
50
42
  }), '&:not(:disabled)', _objectSpread({}, genFocusStyle(token))), "&".concat(componentCls, "-two-chinese-chars::first-letter"), {
51
43
  letterSpacing: '0.34em'
52
44
  }), "&".concat(componentCls, "-two-chinese-chars > *:not(").concat(iconCls, ")"), {
53
45
  marginInlineEnd: '-0.34em',
54
46
  letterSpacing: '0.34em'
55
- }), "&-icon-only".concat(componentCls, "-compact-item"), {
56
- flex: 'none'
47
+ }), '&-icon-end', {
48
+ flexDirection: 'row-reverse'
57
49
  }));
58
50
  };
59
51
  var genHoverActiveButtonStyle = function genHoverActiveButtonStyle(btnCls, hoverStyle, activeStyle) {
@@ -78,7 +70,6 @@ var genRoundButtonStyle = function genRoundButtonStyle(token) {
78
70
  paddingInlineEnd: token.calc(token.controlHeight).div(2).equal()
79
71
  };
80
72
  };
81
- // =============================== Type ===============================
82
73
  var genDisabledStyle = function genDisabledStyle(token) {
83
74
  return {
84
75
  cursor: 'not-allowed',
@@ -109,119 +100,165 @@ var genGhostButtonStyle = function genGhostButtonStyle(btnCls, background, textC
109
100
  var genSolidDisabledButtonStyle = function genSolidDisabledButtonStyle(token) {
110
101
  return _defineProperty({}, "&:disabled, &".concat(token.componentCls, "-disabled"), _objectSpread({}, genDisabledStyle(token)));
111
102
  };
112
- var genSolidButtonStyle = function genSolidButtonStyle(token) {
113
- return _objectSpread({}, genSolidDisabledButtonStyle(token));
114
- };
115
103
  var genPureDisabledButtonStyle = function genPureDisabledButtonStyle(token) {
116
104
  return _defineProperty({}, "&:disabled, &".concat(token.componentCls, "-disabled"), {
117
105
  cursor: 'not-allowed',
118
106
  color: token.colorTextDisabled
119
107
  });
120
108
  };
121
- // Type: Default
109
+ // ============================== Variant =============================
110
+ var genVariantButtonStyle = function genVariantButtonStyle(token, hoverStyle, activeStyle, variant) {
111
+ var isPureDisabled = variant && ['link', 'text'].includes(variant);
112
+ var genDisabledButtonStyle = isPureDisabled ? genPureDisabledButtonStyle : genSolidDisabledButtonStyle;
113
+ return _objectSpread(_objectSpread({}, genDisabledButtonStyle(token)), genHoverActiveButtonStyle(token.componentCls, hoverStyle, activeStyle));
114
+ };
115
+ var genSolidButtonStyle = function genSolidButtonStyle(token, textColor, background, hoverStyle, activeStyle) {
116
+ return _defineProperty({}, "&".concat(token.componentCls, "-variant-solid"), _objectSpread({
117
+ color: textColor,
118
+ background: background
119
+ }, genVariantButtonStyle(token, hoverStyle, activeStyle)));
120
+ };
121
+ var genOutlinedDashedButtonStyle = function genOutlinedDashedButtonStyle(token, borderColor, background, hoverStyle, activeStyle) {
122
+ return _defineProperty({}, "&".concat(token.componentCls, "-variant-outlined, &").concat(token.componentCls, "-variant-dashed"), _objectSpread({
123
+ borderColor: borderColor,
124
+ background: background
125
+ }, genVariantButtonStyle(token, hoverStyle, activeStyle)));
126
+ };
127
+ var genDashedButtonStyle = function genDashedButtonStyle(token) {
128
+ return _defineProperty({}, "&".concat(token.componentCls, "-variant-dashed"), {
129
+ borderStyle: 'dashed'
130
+ });
131
+ };
132
+ var genFilledButtonStyle = function genFilledButtonStyle(token, background, hoverStyle, activeStyle) {
133
+ return _defineProperty({}, "&".concat(token.componentCls, "-variant-filled"), _objectSpread({
134
+ boxShadow: 'none',
135
+ background: background
136
+ }, genVariantButtonStyle(token, hoverStyle, activeStyle)));
137
+ };
138
+ var genTextLinkButtonStyle = function genTextLinkButtonStyle(token, textColor, variant, hoverStyle, activeStyle) {
139
+ return _defineProperty({}, "&".concat(token.componentCls, "-variant-").concat(variant), _objectSpread({
140
+ color: textColor,
141
+ boxShadow: 'none'
142
+ }, genVariantButtonStyle(token, hoverStyle, activeStyle, variant)));
143
+ };
144
+ // =============================== Color ==============================
122
145
  var genDefaultButtonStyle = function genDefaultButtonStyle(token) {
123
- return _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, genSolidButtonStyle(token)), {}, {
124
- background: token.defaultBg,
125
- borderColor: token.defaultBorderColor,
146
+ return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
126
147
  color: token.defaultColor,
127
148
  boxShadow: token.defaultShadow
128
- }, genHoverActiveButtonStyle(token.componentCls, {
129
- color: token.defaultHoverColor,
130
- borderColor: token.defaultHoverBorderColor,
131
- background: token.defaultHoverBg
149
+ }, genSolidButtonStyle(token, token.solidTextColor, token.colorBgSolid, {
150
+ background: token.colorBgSolidHover
132
151
  }, {
133
- color: token.defaultActiveColor,
134
- borderColor: token.defaultActiveBorderColor,
135
- background: token.defaultActiveBg
136
- })), genGhostButtonStyle(token.componentCls, token.ghostBg, token.defaultGhostColor, token.defaultGhostBorderColor, token.colorTextDisabled, token.colorBorder)), {}, _defineProperty({}, "&".concat(token.componentCls, "-dangerous"), _objectSpread(_objectSpread(_objectSpread({
137
- color: token.colorError,
138
- borderColor: token.colorError
139
- }, genHoverActiveButtonStyle(token.componentCls, {
140
- color: token.colorErrorHover,
141
- borderColor: token.colorErrorBorderHover
152
+ background: token.colorBgSolidActive
153
+ })), genDashedButtonStyle(token)), genFilledButtonStyle(token, token.colorFillTertiary, {
154
+ background: token.colorFillSecondary
142
155
  }, {
143
- color: token.colorErrorActive,
144
- borderColor: token.colorErrorActive
145
- })), genGhostButtonStyle(token.componentCls, token.ghostBg, token.colorError, token.colorError, token.colorTextDisabled, token.colorBorder)), genSolidDisabledButtonStyle(token))));
156
+ background: token.colorFill
157
+ })), genTextLinkButtonStyle(token, token.textTextColor, 'link', {
158
+ color: token.colorLinkHover,
159
+ background: token.linkHoverBg
160
+ }, {
161
+ color: token.colorLinkActive
162
+ })), genGhostButtonStyle(token.componentCls, token.ghostBg, token.defaultGhostColor, token.defaultGhostBorderColor, token.colorTextDisabled, token.colorBorder));
146
163
  };
147
- // Type: Primary
148
164
  var genPrimaryButtonStyle = function genPrimaryButtonStyle(token) {
149
- return _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, genSolidButtonStyle(token)), {}, {
150
- color: token.primaryColor,
151
- background: token.colorPrimary,
165
+ return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
166
+ color: token.colorPrimary,
152
167
  boxShadow: token.primaryShadow
153
- }, genHoverActiveButtonStyle(token.componentCls, {
154
- color: token.colorTextLightSolid,
155
- background: token.colorPrimaryHover
168
+ }, genOutlinedDashedButtonStyle(token, token.colorPrimary, token.colorBgContainer, {
169
+ color: token.colorPrimaryTextHover,
170
+ borderColor: token.colorPrimaryHover,
171
+ background: token.colorBgContainer
172
+ }, {
173
+ color: token.colorPrimaryTextActive,
174
+ borderColor: token.colorPrimaryActive,
175
+ background: token.colorBgContainer
176
+ })), genDashedButtonStyle(token)), genFilledButtonStyle(token, token.colorPrimaryBg, {
177
+ background: token.colorPrimaryBgHover
156
178
  }, {
157
- color: token.colorTextLightSolid,
158
- background: token.colorPrimaryActive
179
+ background: token.colorPrimaryBorder
180
+ })), genTextLinkButtonStyle(token, token.colorLink, 'text', {
181
+ color: token.colorPrimaryTextHover,
182
+ background: token.colorPrimaryBg
183
+ }, {
184
+ color: token.colorPrimaryTextActive,
185
+ background: token.colorPrimaryBorder
159
186
  })), genGhostButtonStyle(token.componentCls, token.ghostBg, token.colorPrimary, token.colorPrimary, token.colorTextDisabled, token.colorBorder, {
160
187
  color: token.colorPrimaryHover,
161
188
  borderColor: token.colorPrimaryHover
162
189
  }, {
163
190
  color: token.colorPrimaryActive,
164
191
  borderColor: token.colorPrimaryActive
165
- })), {}, _defineProperty({}, "&".concat(token.componentCls, "-dangerous"), _objectSpread(_objectSpread(_objectSpread({
166
- background: token.colorError,
167
- boxShadow: token.dangerShadow,
168
- color: token.dangerColor
169
- }, genHoverActiveButtonStyle(token.componentCls, {
192
+ }));
193
+ };
194
+ var genDangerousStyle = function genDangerousStyle(token) {
195
+ return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
196
+ color: token.colorError,
197
+ boxShadow: token.dangerShadow
198
+ }, genSolidButtonStyle(token, token.dangerColor, token.colorError, {
170
199
  background: token.colorErrorHover
171
200
  }, {
172
201
  background: token.colorErrorActive
173
- })), genGhostButtonStyle(token.componentCls, token.ghostBg, token.colorError, token.colorError, token.colorTextDisabled, token.colorBorder, {
202
+ })), genOutlinedDashedButtonStyle(token, token.colorError, token.colorBgContainer, {
174
203
  color: token.colorErrorHover,
175
- borderColor: token.colorErrorHover
204
+ borderColor: token.colorErrorBorderHover
176
205
  }, {
177
206
  color: token.colorErrorActive,
178
207
  borderColor: token.colorErrorActive
179
- })), genSolidDisabledButtonStyle(token))));
180
- };
181
- // Type: Dashed
182
- var genDashedButtonStyle = function genDashedButtonStyle(token) {
183
- return _objectSpread(_objectSpread({}, genDefaultButtonStyle(token)), {}, {
184
- borderStyle: 'dashed'
185
- });
186
- };
187
- // Type: Link
188
- var genLinkButtonStyle = function genLinkButtonStyle(token) {
189
- return _objectSpread(_objectSpread(_objectSpread({
190
- color: token.colorLink
191
- }, genHoverActiveButtonStyle(token.componentCls, {
192
- color: token.colorLinkHover,
193
- background: token.linkHoverBg
208
+ })), genDashedButtonStyle(token)), genFilledButtonStyle(token, token.colorErrorBg, {
209
+ background: token.colorErrorBgFilledHover
194
210
  }, {
195
- color: token.colorLinkActive
196
- })), genPureDisabledButtonStyle(token)), {}, _defineProperty({}, "&".concat(token.componentCls, "-dangerous"), _objectSpread(_objectSpread({
197
- color: token.colorError
198
- }, genHoverActiveButtonStyle(token.componentCls, {
211
+ background: token.colorErrorBgActive
212
+ })), genTextLinkButtonStyle(token, token.colorError, 'text', {
213
+ color: token.colorErrorHover,
214
+ background: token.colorErrorBg
215
+ }, {
216
+ color: token.colorErrorHover,
217
+ background: token.colorErrorBgActive
218
+ })), genTextLinkButtonStyle(token, token.colorError, 'link', {
199
219
  color: token.colorErrorHover
200
220
  }, {
201
221
  color: token.colorErrorActive
202
- })), genPureDisabledButtonStyle(token))));
222
+ })), genGhostButtonStyle(token.componentCls, token.ghostBg, token.colorError, token.colorError, token.colorTextDisabled, token.colorBorder, {
223
+ color: token.colorErrorHover,
224
+ borderColor: token.colorErrorHover
225
+ }, {
226
+ color: token.colorErrorActive,
227
+ borderColor: token.colorErrorActive
228
+ }));
203
229
  };
204
- // Type: Text
205
- var genTextButtonStyle = function genTextButtonStyle(token) {
206
- return _objectSpread(_objectSpread(_objectSpread({}, genHoverActiveButtonStyle(token.componentCls, {
207
- color: token.colorText,
230
+ var genColorButtonStyle = function genColorButtonStyle(token) {
231
+ var componentCls = token.componentCls;
232
+ return _defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, "-color-default"), genDefaultButtonStyle(token)), "".concat(componentCls, "-color-primary"), genPrimaryButtonStyle(token)), "".concat(componentCls, "-color-dangerous"), genDangerousStyle(token));
233
+ };
234
+ // =========== Compatible with versions earlier than 5.21.0 ===========
235
+ var genCompatibleButtonStyle = function genCompatibleButtonStyle(token) {
236
+ return _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, genOutlinedDashedButtonStyle(token, token.defaultBorderColor, token.defaultBg, {
237
+ color: token.defaultHoverColor,
238
+ borderColor: token.defaultHoverBorderColor,
239
+ background: token.defaultHoverBg
240
+ }, {
241
+ color: token.defaultActiveColor,
242
+ borderColor: token.defaultActiveBorderColor,
243
+ background: token.defaultActiveBg
244
+ })), genTextLinkButtonStyle(token, token.textTextColor, 'text', {
245
+ color: token.textTextHoverColor,
208
246
  background: token.textHoverBg
209
247
  }, {
210
- color: token.colorText,
248
+ color: token.textTextActiveColor,
211
249
  background: token.colorBgTextActive
212
- })), genPureDisabledButtonStyle(token)), {}, _defineProperty({}, "&".concat(token.componentCls, "-dangerous"), _objectSpread(_objectSpread({
213
- color: token.colorError
214
- }, genPureDisabledButtonStyle(token)), genHoverActiveButtonStyle(token.componentCls, {
215
- color: token.colorErrorHover,
216
- background: token.colorErrorBg
250
+ })), genSolidButtonStyle(token, token.primaryColor, token.colorPrimary, {
251
+ background: token.colorPrimaryHover,
252
+ color: token.primaryColor
217
253
  }, {
218
- color: token.colorErrorHover,
219
- background: token.colorErrorBgActive
220
- }))));
221
- };
222
- var genTypeButtonStyle = function genTypeButtonStyle(token) {
223
- var componentCls = token.componentCls;
224
- return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, "-default"), genDefaultButtonStyle(token)), "".concat(componentCls, "-primary"), genPrimaryButtonStyle(token)), "".concat(componentCls, "-dashed"), genDashedButtonStyle(token)), "".concat(componentCls, "-link"), genLinkButtonStyle(token)), "".concat(componentCls, "-text"), genTextButtonStyle(token)), "".concat(componentCls, "-ghost"), genGhostButtonStyle(token.componentCls, token.ghostBg, token.colorBgContainer, token.colorBgContainer, token.colorTextDisabled, token.colorBorder));
254
+ background: token.colorPrimaryActive,
255
+ color: token.primaryColor
256
+ })), genTextLinkButtonStyle(token, token.colorLink, 'link', {
257
+ color: token.colorLinkHover,
258
+ background: token.linkHoverBg
259
+ }, {
260
+ color: token.colorLinkActive
261
+ }));
225
262
  };
226
263
  // =============================== Size ===============================
227
264
  var genButtonStyle = function genButtonStyle(token) {
@@ -233,30 +270,31 @@ var genButtonStyle = function genButtonStyle(token) {
233
270
  borderRadius = token.borderRadius,
234
271
  buttonPaddingHorizontal = token.buttonPaddingHorizontal,
235
272
  iconCls = token.iconCls,
236
- buttonPaddingVertical = token.buttonPaddingVertical;
237
- var iconOnlyCls = "".concat(componentCls, "-icon-only");
238
- return [_defineProperty({}, "".concat(prefixCls), _defineProperty(_defineProperty(_defineProperty({
273
+ buttonPaddingVertical = token.buttonPaddingVertical,
274
+ motionDurationSlow = token.motionDurationSlow,
275
+ motionEaseInOut = token.motionEaseInOut,
276
+ buttonIconOnlyFontSize = token.buttonIconOnlyFontSize,
277
+ opacityLoading = token.opacityLoading;
278
+ return [_defineProperty({}, prefixCls, _defineProperty(_defineProperty(_defineProperty({
239
279
  fontSize: fontSize,
240
280
  lineHeight: lineHeight,
241
281
  height: controlHeight,
242
282
  padding: "".concat(unit(buttonPaddingVertical), " ").concat(unit(buttonPaddingHorizontal)),
243
283
  borderRadius: borderRadius
244
- }, "&".concat(iconOnlyCls), _defineProperty(_defineProperty({
245
- display: 'inline-flex',
246
- alignItems: 'center',
247
- justifyContent: 'center',
284
+ }, "&".concat(componentCls, "-icon-only"), _defineProperty(_defineProperty(_defineProperty({
248
285
  width: controlHeight,
249
- paddingInlineStart: 0,
250
- paddingInlineEnd: 0
251
- }, "&".concat(componentCls, "-round"), {
286
+ paddingInline: 0
287
+ }, "&".concat(componentCls, "-compact-item"), {
288
+ flex: 'none'
289
+ }), "&".concat(componentCls, "-round"), {
252
290
  width: 'auto'
253
291
  }), iconCls, {
254
- fontSize: token.buttonIconOnlyFontSize
292
+ fontSize: buttonIconOnlyFontSize
255
293
  })), "&".concat(componentCls, "-loading"), {
256
- opacity: token.opacityLoading,
294
+ opacity: opacityLoading,
257
295
  cursor: 'default'
258
296
  }), "".concat(componentCls, "-loading-icon"), {
259
- transition: "width ".concat(token.motionDurationSlow, " ").concat(token.motionEaseInOut, ", opacity ").concat(token.motionDurationSlow, " ").concat(token.motionEaseInOut)
297
+ transition: "width ".concat(motionDurationSlow, " ").concat(motionEaseInOut, ", opacity ").concat(motionDurationSlow, " ").concat(motionEaseInOut)
260
298
  })), // Shape - patch prefixCls again to override solid border radius style
261
299
  _defineProperty({}, "".concat(componentCls).concat(componentCls, "-circle").concat(prefixCls), genCircleButtonStyle(token)), _defineProperty({}, "".concat(componentCls).concat(componentCls, "-round").concat(prefixCls), genRoundButtonStyle(token))];
262
300
  };
@@ -308,8 +346,10 @@ export default genStyleHooks('Button', function (token) {
308
346
  genSizeBaseButtonStyle(buttonToken), genSizeSmallButtonStyle(buttonToken), genSizeLargeButtonStyle(buttonToken),
309
347
  // Block
310
348
  genBlockButtonStyle(buttonToken),
311
- // Group (type, ghost, danger, loading)
312
- genTypeButtonStyle(buttonToken),
349
+ // Color
350
+ genColorButtonStyle(buttonToken),
351
+ // https://github.com/ant-design/ant-design/issues/50969
352
+ genCompatibleButtonStyle(buttonToken),
313
353
  // Button Group
314
354
  genGroupStyle(buttonToken)];
315
355
  }, prepareComponentToken, {
@@ -1,3 +1,5 @@
1
+ import { AggregationColor } from '../../color-picker/color';
2
+ import { isBright } from '../../color-picker/components/ColorPresets';
1
3
  import { getLineHeight, mergeToken } from '../../theme/internal';
2
4
  export var prepareToken = function prepareToken(token) {
3
5
  var paddingInline = token.paddingInline,
@@ -18,6 +20,7 @@ export var prepareComponentToken = function prepareComponentToken(token) {
18
20
  var contentLineHeight = (_token$contentLineHei = token.contentLineHeight) !== null && _token$contentLineHei !== void 0 ? _token$contentLineHei : getLineHeight(contentFontSize);
19
21
  var contentLineHeightSM = (_token$contentLineHei2 = token.contentLineHeightSM) !== null && _token$contentLineHei2 !== void 0 ? _token$contentLineHei2 : getLineHeight(contentFontSizeSM);
20
22
  var contentLineHeightLG = (_token$contentLineHei3 = token.contentLineHeightLG) !== null && _token$contentLineHei3 !== void 0 ? _token$contentLineHei3 : getLineHeight(contentFontSizeLG);
23
+ var solidTextColor = isBright(new AggregationColor(token.colorBgSolid), '#fff') ? '#000' : '#fff';
21
24
  return {
22
25
  fontWeight: 400,
23
26
  defaultShadow: "0 ".concat(token.controlOutlineWidth, "px 0 ").concat(token.controlTmpOutline),
@@ -37,7 +40,10 @@ export var prepareComponentToken = function prepareComponentToken(token) {
37
40
  onlyIconSizeLG: token.fontSizeLG + 2,
38
41
  groupBorderColor: token.colorPrimaryHover,
39
42
  linkHoverBg: 'transparent',
40
- textHoverBg: token.colorBgTextHover,
43
+ textTextColor: token.colorText,
44
+ textTextHoverColor: token.colorText,
45
+ textTextActiveColor: token.colorText,
46
+ textHoverBg: token.colorFillTertiary,
41
47
  defaultColor: token.colorText,
42
48
  defaultBg: token.colorBgContainer,
43
49
  defaultBorderColor: token.colorBorder,
@@ -48,6 +54,7 @@ export var prepareComponentToken = function prepareComponentToken(token) {
48
54
  defaultActiveBg: token.colorBgContainer,
49
55
  defaultActiveColor: token.colorPrimaryActive,
50
56
  defaultActiveBorderColor: token.colorPrimaryActive,
57
+ solidTextColor: solidTextColor,
51
58
  contentFontSize: contentFontSize,
52
59
  contentFontSizeSM: contentFontSizeSM,
53
60
  contentFontSizeLG: contentFontSizeLG,
@@ -21,16 +21,19 @@ import { useLocale } from '../locale';
21
21
  import CalendarHeader from './Header';
22
22
  import enUS from './locale/en_US';
23
23
  import useStyle from './style';
24
- function generateCalendar(generateConfig) {
25
- function isSameYear(date1, date2) {
26
- return date1 && date2 && generateConfig.getYear(date1) === generateConfig.getYear(date2);
27
- }
28
- function isSameMonth(date1, date2) {
29
- return isSameYear(date1, date2) && generateConfig.getMonth(date1) === generateConfig.getMonth(date2);
30
- }
31
- function isSameDate(date1, date2) {
32
- return isSameMonth(date1, date2) && generateConfig.getDate(date1) === generateConfig.getDate(date2);
33
- }
24
+ var isSameYear = function isSameYear(date1, date2, config) {
25
+ var getYear = config.getYear;
26
+ return date1 && date2 && getYear(date1) === getYear(date2);
27
+ };
28
+ var isSameMonth = function isSameMonth(date1, date2, config) {
29
+ var getMonth = config.getMonth;
30
+ return isSameYear(date1, date2, config) && getMonth(date1) === getMonth(date2);
31
+ };
32
+ var isSameDate = function isSameDate(date1, date2, config) {
33
+ var getDate = config.getDate;
34
+ return isSameMonth(date1, date2, config) && getDate(date1) === getDate(date2);
35
+ };
36
+ var generateCalendar = function generateCalendar(generateConfig) {
34
37
  var Calendar = function Calendar(props) {
35
38
  var customizePrefixCls = props.prefixCls,
36
39
  className = props.className,
@@ -105,9 +108,9 @@ function generateCalendar(generateConfig) {
105
108
  };
106
109
  var triggerChange = function triggerChange(date) {
107
110
  setMergedValue(date);
108
- if (!isSameDate(date, mergedValue)) {
111
+ if (!isSameDate(date, mergedValue, generateConfig)) {
109
112
  // Trigger when month panel switch month
110
- if (panelMode === 'date' && !isSameMonth(date, mergedValue) || panelMode === 'month' && !isSameYear(date, mergedValue)) {
113
+ if (panelMode === 'date' && !isSameMonth(date, mergedValue, generateConfig) || panelMode === 'month' && !isSameYear(date, mergedValue, generateConfig)) {
111
114
  triggerPanelChange(date, mergedMode);
112
115
  }
113
116
  onChange === null || onChange === void 0 || onChange(date);
@@ -123,13 +126,6 @@ function generateCalendar(generateConfig) {
123
126
  source: source
124
127
  });
125
128
  };
126
- // ====================== Locale ======================
127
- var getDefaultLocale = function getDefaultLocale() {
128
- var locale = props.locale;
129
- var result = _objectSpread(_objectSpread({}, enUS), locale);
130
- result.lang = _objectSpread(_objectSpread({}, result.lang), (locale || {}).lang);
131
- return result;
132
- };
133
129
  // ====================== Render ======================
134
130
  var dateRender = React.useCallback(function (date, info) {
135
131
  if (fullCellRender) {
@@ -139,13 +135,13 @@ function generateCalendar(generateConfig) {
139
135
  return dateFullCellRender(date);
140
136
  }
141
137
  return _jsxs("div", {
142
- className: classNames("".concat(prefixCls, "-cell-inner"), "".concat(calendarPrefixCls, "-date"), _defineProperty({}, "".concat(calendarPrefixCls, "-date-today"), isSameDate(today, date))),
138
+ className: classNames("".concat(prefixCls, "-cell-inner"), "".concat(calendarPrefixCls, "-date"), _defineProperty({}, "".concat(calendarPrefixCls, "-date-today"), isSameDate(today, date, generateConfig))),
143
139
  children: [_jsx("div", {
144
140
  className: "".concat(calendarPrefixCls, "-date-value"),
145
141
  children: String(generateConfig.getDate(date)).padStart(2, '0')
146
142
  }), _jsx("div", {
147
143
  className: "".concat(calendarPrefixCls, "-date-content"),
148
- children: cellRender ? cellRender(date, info) : dateCellRender && dateCellRender(date)
144
+ children: cellRender ? cellRender(date, info) : dateCellRender === null || dateCellRender === void 0 ? void 0 : dateCellRender(date)
149
145
  })]
150
146
  });
151
147
  }, [dateFullCellRender, dateCellRender, cellRender, fullCellRender]);
@@ -158,26 +154,27 @@ function generateCalendar(generateConfig) {
158
154
  }
159
155
  var months = info.locale.shortMonths || generateConfig.locale.getShortMonths(info.locale.locale);
160
156
  return _jsxs("div", {
161
- className: classNames("".concat(prefixCls, "-cell-inner"), "".concat(calendarPrefixCls, "-date"), _defineProperty({}, "".concat(calendarPrefixCls, "-date-today"), isSameMonth(today, date))),
157
+ className: classNames("".concat(prefixCls, "-cell-inner"), "".concat(calendarPrefixCls, "-date"), _defineProperty({}, "".concat(calendarPrefixCls, "-date-today"), isSameMonth(today, date, generateConfig))),
162
158
  children: [_jsx("div", {
163
159
  className: "".concat(calendarPrefixCls, "-date-value"),
164
160
  children: months[generateConfig.getMonth(date)]
165
161
  }), _jsx("div", {
166
162
  className: "".concat(calendarPrefixCls, "-date-content"),
167
- children: cellRender ? cellRender(date, info) : monthCellRender && monthCellRender(date)
163
+ children: cellRender ? cellRender(date, info) : monthCellRender === null || monthCellRender === void 0 ? void 0 : monthCellRender(date)
168
164
  })]
169
165
  });
170
166
  }, [monthFullCellRender, monthCellRender, cellRender, fullCellRender]);
171
- var _useLocale = useLocale('Calendar', getDefaultLocale),
167
+ var _useLocale = useLocale('Calendar', enUS),
172
168
  _useLocale2 = _slicedToArray(_useLocale, 1),
173
169
  contextLocale = _useLocale2[0];
170
+ var locale = _objectSpread(_objectSpread({}, contextLocale), props.locale);
174
171
  var mergedCellRender = function mergedCellRender(current, info) {
175
172
  if (info.type === 'date') {
176
173
  return dateRender(current, info);
177
174
  }
178
175
  if (info.type === 'month') {
179
176
  return monthRender(current, _objectSpread(_objectSpread({}, info), {}, {
180
- locale: contextLocale === null || contextLocale === void 0 ? void 0 : contextLocale.lang
177
+ locale: locale === null || locale === void 0 ? void 0 : locale.lang
181
178
  }));
182
179
  }
183
180
  };
@@ -197,14 +194,14 @@ function generateCalendar(generateConfig) {
197
194
  generateConfig: generateConfig,
198
195
  mode: mergedMode,
199
196
  fullscreen: fullscreen,
200
- locale: contextLocale === null || contextLocale === void 0 ? void 0 : contextLocale.lang,
197
+ locale: locale === null || locale === void 0 ? void 0 : locale.lang,
201
198
  validRange: validRange,
202
199
  onChange: onInternalSelect,
203
200
  onModeChange: triggerModeChange
204
201
  }), _jsx(RCPickerPanel, {
205
202
  value: mergedValue,
206
203
  prefixCls: prefixCls,
207
- locale: contextLocale === null || contextLocale === void 0 ? void 0 : contextLocale.lang,
204
+ locale: locale === null || locale === void 0 ? void 0 : locale.lang,
208
205
  generateConfig: generateConfig,
209
206
  cellRender: mergedCellRender,
210
207
  onSelect: function onSelect(nextDate) {
@@ -221,5 +218,5 @@ function generateCalendar(generateConfig) {
221
218
  Calendar.displayName = 'Calendar';
222
219
  }
223
220
  return Calendar;
224
- }
221
+ };
225
222
  export default generateCalendar;
@@ -53,7 +53,7 @@ export var genCalendarStyles = function genCalendarStyles(token) {
53
53
  th: {
54
54
  height: 'auto',
55
55
  padding: 0,
56
- lineHeight: "".concat(unit(token.weekHeight))
56
+ lineHeight: unit(token.weekHeight)
57
57
  }
58
58
  }), "".concat(componentCls, "-cell::before"), {
59
59
  pointerEvents: 'none'
@@ -71,7 +71,7 @@ export var genCalendarStyles = function genCalendarStyles(token) {
71
71
  height: 'auto',
72
72
  paddingInlineEnd: token.paddingSM,
73
73
  paddingBottom: token.paddingXXS,
74
- lineHeight: "".concat(unit(token.weekHeight))
74
+ lineHeight: unit(token.weekHeight)
75
75
  }
76
76
  })), "".concat(componentCls, "-cell"), _defineProperty(_defineProperty(_defineProperty({
77
77
  '&::before': {
@@ -97,7 +97,7 @@ export var genCalendarStyles = function genCalendarStyles(token) {
97
97
  borderRadius: 0,
98
98
  transition: "background ".concat(token.motionDurationSlow),
99
99
  '&-value': {
100
- lineHeight: "".concat(unit(token.dateValueHeight)),
100
+ lineHeight: unit(token.dateValueHeight),
101
101
  transition: "color ".concat(token.motionDurationSlow)
102
102
  },
103
103
  '&-content': {
@@ -114,7 +114,7 @@ export var genCalendarStyles = function genCalendarStyles(token) {
114
114
  }, "".concat(calendarCls, "-date-value"), {
115
115
  color: token.colorText
116
116
  })
117
- })), "@media only screen and (max-width: ".concat(unit(token.screenXS), ") "), _defineProperty({}, "".concat(calendarCls), _defineProperty({}, "".concat(calendarCls, "-header"), _defineProperty(_defineProperty(_defineProperty({
117
+ })), "@media only screen and (max-width: ".concat(unit(token.screenXS), ") "), _defineProperty({}, calendarCls, _defineProperty({}, "".concat(calendarCls, "-header"), _defineProperty(_defineProperty(_defineProperty({
118
118
  display: 'block'
119
119
  }, "".concat(calendarCls, "-year-select"), {
120
120
  width: '50%'
@@ -107,7 +107,7 @@ var Card = /*#__PURE__*/React.forwardRef(function (props, ref) {
107
107
  var isContainGrid = React.useMemo(function () {
108
108
  var containGrid = false;
109
109
  React.Children.forEach(children, function (element) {
110
- if (element && element.type && element.type === Grid) {
110
+ if ((element === null || element === void 0 ? void 0 : element.type) === Grid) {
111
111
  containGrid = true;
112
112
  }
113
113
  });
@@ -182,13 +182,13 @@ var Card = /*#__PURE__*/React.forwardRef(function (props, ref) {
182
182
  children: loading ? loadingBlock : children
183
183
  });
184
184
  var actionClasses = classNames("".concat(prefixCls, "-actions"), moduleClass('actions'));
185
- var actionDom = actions && actions.length ? _jsx(ActionNode, {
185
+ var actionDom = actions !== null && actions !== void 0 && actions.length ? _jsx(ActionNode, {
186
186
  actionClasses: actionClasses,
187
187
  actionStyle: moduleStyle('actions'),
188
188
  actions: actions
189
189
  }) : null;
190
190
  var divProps = omit(others, ['onTabChange']);
191
- var classString = classNames(prefixCls, card === null || card === void 0 ? void 0 : card.className, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-loading"), loading), "".concat(prefixCls, "-bordered"), bordered), "".concat(prefixCls, "-hoverable"), hoverable), "".concat(prefixCls, "-contain-grid"), isContainGrid), "".concat(prefixCls, "-contain-tabs"), tabList && tabList.length), "".concat(prefixCls, "-").concat(mergedSize), mergedSize), "".concat(prefixCls, "-type-").concat(type), !!type), "".concat(prefixCls, "-rtl"), direction === 'rtl'), className, rootClassName, hashId, cssVarCls);
191
+ var classString = classNames(prefixCls, card === null || card === void 0 ? void 0 : card.className, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-loading"), loading), "".concat(prefixCls, "-bordered"), bordered), "".concat(prefixCls, "-hoverable"), hoverable), "".concat(prefixCls, "-contain-grid"), isContainGrid), "".concat(prefixCls, "-contain-tabs"), tabList === null || tabList === void 0 ? void 0 : tabList.length), "".concat(prefixCls, "-").concat(mergedSize), mergedSize), "".concat(prefixCls, "-type-").concat(type), !!type), "".concat(prefixCls, "-rtl"), direction === 'rtl'), className, rootClassName, hashId, cssVarCls);
192
192
  var mergedStyle = _objectSpread(_objectSpread({}, card === null || card === void 0 ? void 0 : card.style), style);
193
193
  return wrapCSSVar(_jsxs("div", _objectSpread(_objectSpread({
194
194
  ref: ref
@@ -177,8 +177,7 @@ var genCardLoadingStyle = function genCardLoadingStyle(token) {
177
177
  };
178
178
  // ============================== Basic ==============================
179
179
  var genCardStyle = function genCardStyle(token) {
180
- var antCls = token.antCls,
181
- componentCls = token.componentCls,
180
+ var componentCls = token.componentCls,
182
181
  cardShadow = token.cardShadow,
183
182
  cardHeadPadding = token.cardHeadPadding,
184
183
  colorBorderSecondary = token.colorBorderSecondary,
@@ -190,8 +189,7 @@ var genCardStyle = function genCardStyle(token) {
190
189
  background: token.colorBgContainer,
191
190
  borderRadius: token.borderRadiusLG
192
191
  }, "&:not(".concat(componentCls, "-bordered)"), {
193
- // boxShadow: boxShadowTertiary,
194
- boxShadow: "none"
192
+ boxShadow: boxShadowTertiary
195
193
  }), "".concat(componentCls, "-head"), genCardHeadStyle(token)), "".concat(componentCls, "-extra"), {
196
194
  // https://stackoverflow.com/a/22429853/3040605
197
195
  marginInlineStart: 'auto',
@@ -201,14 +199,13 @@ var genCardStyle = function genCardStyle(token) {
201
199
  }), "".concat(componentCls, "-body"), _objectSpread({
202
200
  padding: cardPaddingBase,
203
201
  borderRadius: "0 0 ".concat(unit(token.borderRadiusLG), " ").concat(unit(token.borderRadiusLG))
204
- }, clearFix())), "".concat(componentCls, "-grid"), genCardGridStyle(token)), "".concat(componentCls, "-cover"), _defineProperty({
202
+ }, clearFix())), "".concat(componentCls, "-grid"), genCardGridStyle(token)), "".concat(componentCls, "-cover"), {
205
203
  '> *': {
206
204
  display: 'block',
207
- width: '100%'
205
+ width: '100%',
206
+ borderRadius: "".concat(unit(token.borderRadiusLG), " ").concat(unit(token.borderRadiusLG), " 0 0")
208
207
  }
209
- }, "img, img + ".concat(antCls, "-image-mask"), {
210
- borderRadius: "".concat(unit(token.borderRadiusLG), " ").concat(unit(token.borderRadiusLG), " 0 0")
211
- })), "".concat(componentCls, "-actions"), genCardActionsStyle(token)), "".concat(componentCls, "-meta"), genCardMetaStyle(token)))), "".concat(componentCls, "-bordered"), _defineProperty({
208
+ }), "".concat(componentCls, "-actions"), genCardActionsStyle(token)), "".concat(componentCls, "-meta"), genCardMetaStyle(token)))), "".concat(componentCls, "-bordered"), _defineProperty({
212
209
  border: "".concat(unit(token.lineWidth), " ").concat(token.lineType, " ").concat(colorBorderSecondary)
213
210
  }, "".concat(componentCls, "-cover"), {
214
211
  marginTop: -1,