@chaoswise/ui 3.1.6 → 3.1.8

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 (357) hide show
  1. package/lib/Antd5/_util/PurePanel.js +9 -1
  2. package/lib/Antd5/_util/convertToTooltipProps.js +15 -0
  3. package/lib/Antd5/_util/extendsObject.js +14 -23
  4. package/lib/Antd5/_util/hooks/useClosable.js +25 -31
  5. package/lib/Antd5/_util/hooks/useMergeSemantic/index.js +89 -0
  6. package/lib/Antd5/_util/hooks/useMergeSemantic/interface.js +1 -0
  7. package/lib/Antd5/_util/isPrimitive.js +5 -0
  8. package/lib/Antd5/_util/mediaQueryUtil.js +16 -0
  9. package/lib/Antd5/_util/responsiveObserver.js +41 -33
  10. package/lib/Antd5/_util/toList.js +6 -3
  11. package/lib/Antd5/_util/warning.js +0 -1
  12. package/lib/Antd5/_util/wave/WaveEffect.js +29 -16
  13. package/lib/Antd5/_util/wave/index.js +2 -2
  14. package/lib/Antd5/_util/wave/useWave.js +1 -1
  15. package/lib/Antd5/affix/index.js +13 -11
  16. package/lib/Antd5/alert/Alert.js +19 -18
  17. package/lib/Antd5/anchor/Anchor.js +9 -7
  18. package/lib/Antd5/anchor/AnchorLink.js +16 -3
  19. package/lib/Antd5/app/App.js +90 -0
  20. package/lib/Antd5/app/index.js +3 -92
  21. package/lib/Antd5/app/useApp.js +6 -0
  22. package/lib/Antd5/auto-complete/AutoComplete.js +142 -0
  23. package/lib/Antd5/auto-complete/index.js +8 -106
  24. package/lib/Antd5/avatar/{avatar.js → Avatar.js} +25 -29
  25. package/lib/Antd5/avatar/{group.js → AvatarGroup.js} +14 -9
  26. package/lib/Antd5/avatar/index.js +3 -4
  27. package/lib/Antd5/breadcrumb/Breadcrumb.js +1 -0
  28. package/lib/Antd5/breadcrumb/style/index.js +1 -1
  29. package/lib/Antd5/button/{LoadingIcon.js → DefaultLoadingIcon.js} +12 -9
  30. package/lib/Antd5/button/button-group.js +11 -11
  31. package/lib/Antd5/button/button.js +60 -26
  32. package/lib/Antd5/button/buttonHelpers.js +8 -1
  33. package/lib/Antd5/button/style/compact.js +9 -10
  34. package/lib/Antd5/button/style/index.js +127 -41
  35. package/lib/Antd5/button/style/token.js +19 -8
  36. package/lib/Antd5/calendar/Header.js +4 -4
  37. package/lib/Antd5/calendar/generateCalendar.js +17 -12
  38. package/lib/Antd5/calendar/style/index.js +8 -2
  39. package/lib/Antd5/card/Card.js +9 -5
  40. package/lib/Antd5/card/style/index.js +22 -15
  41. package/lib/Antd5/carousel/index.js +21 -11
  42. package/lib/Antd5/carousel/style/index.js +39 -12
  43. package/lib/Antd5/cascader/index.js +54 -18
  44. package/lib/Antd5/cascader/style/columns.js +4 -2
  45. package/lib/Antd5/cascader/style/index.js +2 -1
  46. package/lib/Antd5/collapse/Collapse.js +32 -25
  47. package/lib/Antd5/collapse/style/index.js +14 -10
  48. package/lib/Antd5/color-picker/ColorPicker.js +13 -8
  49. package/lib/Antd5/color-picker/components/ColorAlphaInput.js +8 -13
  50. package/lib/Antd5/color-picker/components/ColorHexInput.js +1 -1
  51. package/lib/Antd5/color-picker/components/ColorHsbInput.js +8 -13
  52. package/lib/Antd5/color-picker/components/ColorInput.js +7 -7
  53. package/lib/Antd5/color-picker/components/ColorPresets.js +15 -12
  54. package/lib/Antd5/color-picker/components/ColorRgbInput.js +8 -13
  55. package/lib/Antd5/color-picker/components/ColorSteppers.js +6 -13
  56. package/lib/Antd5/color-picker/interface.js +3 -6
  57. package/lib/Antd5/color-picker/style/color-block.js +2 -1
  58. package/lib/Antd5/config-provider/MotionWrapper.js +12 -4
  59. package/lib/Antd5/config-provider/UnstableContext.js +29 -0
  60. package/lib/Antd5/config-provider/context.js +32 -2
  61. package/lib/Antd5/config-provider/cssVariables.js +7 -7
  62. package/lib/Antd5/config-provider/hooks/useSize.js +1 -1
  63. package/lib/Antd5/config-provider/index.js +12 -3
  64. package/lib/Antd5/date-picker/generatePicker/generateRangePicker.js +33 -12
  65. package/lib/Antd5/date-picker/generatePicker/generateSinglePicker.js +32 -13
  66. package/lib/Antd5/date-picker/hooks/useMergedPickerSemantic.js +47 -0
  67. package/lib/Antd5/date-picker/index.js +2 -2
  68. package/lib/Antd5/date-picker/locale/ar_EG.js +1 -8
  69. package/lib/Antd5/date-picker/locale/example.json +5 -8
  70. package/lib/Antd5/date-picker/locale/ko_KR.js +11 -1
  71. package/lib/Antd5/date-picker/locale/pl_PL.js +0 -3
  72. package/lib/Antd5/date-picker/locale/pt_PT.js +0 -3
  73. package/lib/Antd5/date-picker/locale/sl_SI.js +1 -3
  74. package/lib/Antd5/date-picker/style/index.js +9 -6
  75. package/lib/Antd5/date-picker/style/panel.js +12 -8
  76. package/lib/Antd5/date-picker/style/token.js +3 -3
  77. package/lib/Antd5/date-picker/style/variants.js +6 -2
  78. package/lib/Antd5/descriptions/Cell.js +14 -8
  79. package/lib/Antd5/descriptions/Item.js +2 -0
  80. package/lib/Antd5/descriptions/Row.js +10 -6
  81. package/lib/Antd5/descriptions/hooks/useRow.js +1 -1
  82. package/lib/Antd5/descriptions/index.js +45 -18
  83. package/lib/Antd5/descriptions/style/index.js +11 -2
  84. package/lib/Antd5/divider/index.js +32 -15
  85. package/lib/Antd5/divider/style/index.js +20 -7
  86. package/lib/Antd5/drawer/DrawerPanel.js +8 -10
  87. package/lib/Antd5/drawer/index.js +20 -17
  88. package/lib/Antd5/dropdown/dropdown-button.js +9 -3
  89. package/lib/Antd5/dropdown/dropdown.js +33 -35
  90. package/lib/Antd5/dropdown/style/index.js +1 -1
  91. package/lib/Antd5/empty/empty.js +2 -2
  92. package/lib/Antd5/empty/index.js +41 -23
  93. package/lib/Antd5/empty/simple.js +4 -4
  94. package/lib/Antd5/flex/style/index.js +2 -0
  95. package/lib/Antd5/float-button/FloatButton.js +12 -15
  96. package/lib/Antd5/float-button/FloatButtonContent.js +13 -7
  97. package/lib/Antd5/float-button/FloatButtonGroup.js +6 -6
  98. package/lib/Antd5/float-button/style/keyframes.js +4 -4
  99. package/lib/Antd5/form/ErrorList.js +1 -3
  100. package/lib/Antd5/form/Form.js +19 -19
  101. package/lib/Antd5/form/FormItem/index.js +1 -1
  102. package/lib/Antd5/form/FormItemLabel.js +12 -14
  103. package/lib/Antd5/form/context.js +3 -4
  104. package/lib/Antd5/form/hooks/useForm.js +16 -5
  105. package/lib/Antd5/form/hooks/useFormInstance.js +3 -3
  106. package/lib/Antd5/form/hooks/useFormItemStatus.js +7 -7
  107. package/lib/Antd5/form/hooks/useFormWarning.js +2 -2
  108. package/lib/Antd5/form/hooks/useFrameState.js +3 -4
  109. package/lib/Antd5/form/hooks/useItemRef.js +3 -2
  110. package/lib/Antd5/form/hooks/useVariants.js +5 -5
  111. package/lib/Antd5/form/style/index.js +22 -15
  112. package/lib/Antd5/grid/hooks/useBreakpoint.js +2 -1
  113. package/lib/Antd5/grid/hooks/useGutter.js +29 -0
  114. package/lib/Antd5/grid/row.js +8 -63
  115. package/lib/Antd5/grid/style/index.js +14 -8
  116. package/lib/Antd5/image/PreviewGroup.js +9 -2
  117. package/lib/Antd5/image/index.js +26 -17
  118. package/lib/Antd5/image/style/index.js +10 -10
  119. package/lib/Antd5/index.js +3 -1
  120. package/lib/Antd5/input/Group.js +5 -3
  121. package/lib/Antd5/input/Input.js +27 -20
  122. package/lib/Antd5/input/OTP/OTPInput.js +36 -19
  123. package/lib/Antd5/input/OTP/index.js +40 -19
  124. package/lib/Antd5/input/Password.js +7 -9
  125. package/lib/Antd5/input/Search.js +16 -9
  126. package/lib/Antd5/input/TextArea.js +90 -33
  127. package/lib/Antd5/input/style/index.js +31 -82
  128. package/lib/Antd5/input/style/otp.js +22 -6
  129. package/lib/Antd5/input/style/textarea.js +80 -0
  130. package/lib/Antd5/input/style/token.js +16 -7
  131. package/lib/Antd5/input/style/variants.js +67 -12
  132. package/lib/Antd5/input-number/index.js +1 -1
  133. package/lib/Antd5/input-number/style/index.js +10 -7
  134. package/lib/Antd5/input-number/style/token.js +6 -4
  135. package/lib/Antd5/layout/Sider.js +58 -68
  136. package/lib/Antd5/layout/layout.js +7 -5
  137. package/lib/Antd5/layout/style/sider.js +33 -42
  138. package/lib/Antd5/list/index.js +45 -45
  139. package/lib/Antd5/locale/ar_EG.js +7 -1
  140. package/lib/Antd5/locale/az_AZ.js +3 -2
  141. package/lib/Antd5/locale/bg_BG.js +8 -0
  142. package/lib/Antd5/locale/bn_BD.js +7 -1
  143. package/lib/Antd5/locale/by_BY.js +8 -2
  144. package/lib/Antd5/locale/ca_ES.js +7 -1
  145. package/lib/Antd5/locale/cs_CZ.js +19 -2
  146. package/lib/Antd5/locale/da_DK.js +8 -0
  147. package/lib/Antd5/locale/de_DE.js +4 -2
  148. package/lib/Antd5/locale/el_GR.js +3 -2
  149. package/lib/Antd5/locale/en_GB.js +8 -2
  150. package/lib/Antd5/locale/en_US.js +3 -2
  151. package/lib/Antd5/locale/es_ES.js +3 -2
  152. package/lib/Antd5/locale/et_EE.js +8 -2
  153. package/lib/Antd5/locale/eu_ES.js +3 -2
  154. package/lib/Antd5/locale/fa_IR.js +17 -7
  155. package/lib/Antd5/locale/fi_FI.js +8 -0
  156. package/lib/Antd5/locale/fr_BE.js +4 -1
  157. package/lib/Antd5/locale/fr_CA.js +9 -1
  158. package/lib/Antd5/locale/fr_FR.js +4 -1
  159. package/lib/Antd5/locale/ga_IE.js +7 -1
  160. package/lib/Antd5/locale/gl_ES.js +7 -1
  161. package/lib/Antd5/locale/he_IL.js +10 -1
  162. package/lib/Antd5/locale/hi_IN.js +7 -1
  163. package/lib/Antd5/locale/hr_HR.js +7 -1
  164. package/lib/Antd5/locale/hu_HU.js +8 -0
  165. package/lib/Antd5/locale/hy_AM.js +8 -3
  166. package/lib/Antd5/locale/id_ID.js +3 -2
  167. package/lib/Antd5/locale/is_IS.js +8 -0
  168. package/lib/Antd5/locale/it_IT.js +3 -2
  169. package/lib/Antd5/locale/ja_JP.js +3 -2
  170. package/lib/Antd5/locale/ka_GE.js +7 -1
  171. package/lib/Antd5/locale/kk_KZ.js +7 -1
  172. package/lib/Antd5/locale/km_KH.js +3 -0
  173. package/lib/Antd5/locale/kmr_IQ.js +8 -0
  174. package/lib/Antd5/locale/kn_IN.js +8 -2
  175. package/lib/Antd5/locale/ko_KR.js +3 -2
  176. package/lib/Antd5/locale/ku_IQ.js +8 -0
  177. package/lib/Antd5/locale/lt_LT.js +3 -2
  178. package/lib/Antd5/locale/lv_LV.js +8 -0
  179. package/lib/Antd5/locale/mk_MK.js +7 -1
  180. package/lib/Antd5/locale/ml_IN.js +7 -1
  181. package/lib/Antd5/locale/mn_MN.js +8 -2
  182. package/lib/Antd5/locale/ms_MY.js +3 -2
  183. package/lib/Antd5/locale/my_MM.js +3 -2
  184. package/lib/Antd5/locale/nb_NO.js +7 -1
  185. package/lib/Antd5/locale/ne_NP.js +3 -2
  186. package/lib/Antd5/locale/nl_BE.js +2 -1
  187. package/lib/Antd5/locale/nl_NL.js +2 -1
  188. package/lib/Antd5/locale/pl_PL.js +3 -2
  189. package/lib/Antd5/locale/pt_BR.js +3 -2
  190. package/lib/Antd5/locale/pt_PT.js +3 -2
  191. package/lib/Antd5/locale/ro_RO.js +7 -1
  192. package/lib/Antd5/locale/ru_RU.js +4 -3
  193. package/lib/Antd5/locale/si_LK.js +8 -2
  194. package/lib/Antd5/locale/sk_SK.js +8 -2
  195. package/lib/Antd5/locale/sl_SI.js +8 -0
  196. package/lib/Antd5/locale/sr_RS.js +7 -1
  197. package/lib/Antd5/locale/sv_SE.js +3 -2
  198. package/lib/Antd5/locale/ta_IN.js +8 -2
  199. package/lib/Antd5/locale/th_TH.js +3 -2
  200. package/lib/Antd5/locale/tk_TK.js +7 -1
  201. package/lib/Antd5/locale/tr_TR.js +8 -2
  202. package/lib/Antd5/locale/uk_UA.js +3 -2
  203. package/lib/Antd5/locale/ur_PK.js +7 -1
  204. package/lib/Antd5/locale/uz_UZ.js +5 -4
  205. package/lib/Antd5/locale/vi_VN.js +3 -2
  206. package/lib/Antd5/locale/zh_CN.js +3 -2
  207. package/lib/Antd5/locale/zh_HK.js +11 -3
  208. package/lib/Antd5/locale/zh_TW.js +11 -3
  209. package/lib/Antd5/mentions/index.js +1 -1
  210. package/lib/Antd5/mentions/style/index.js +12 -7
  211. package/lib/Antd5/menu/MenuItem.js +3 -1
  212. package/lib/Antd5/menu/OverrideContext.js +2 -2
  213. package/lib/Antd5/menu/menu.js +1 -7
  214. package/lib/Antd5/menu/style/index.js +9 -6
  215. package/lib/Antd5/menu/style/theme.js +4 -3
  216. package/lib/Antd5/menu/style/vertical.js +1 -1
  217. package/lib/Antd5/message/style/index.js +4 -3
  218. package/lib/Antd5/modal/ConfirmDialog.js +2 -19
  219. package/lib/Antd5/modal/Modal.js +67 -35
  220. package/lib/Antd5/modal/confirm.js +5 -3
  221. package/lib/Antd5/modal/style/confirm.js +3 -1
  222. package/lib/Antd5/modal/style/index.js +21 -1
  223. package/lib/Antd5/modal/useModal/HookModal.js +2 -1
  224. package/lib/Antd5/notification/PurePanel.js +13 -6
  225. package/lib/Antd5/notification/index.js +3 -4
  226. package/lib/Antd5/notification/style/index.js +4 -3
  227. package/lib/Antd5/notification/style/stack.js +2 -1
  228. package/lib/Antd5/notification/useNotification.js +9 -4
  229. package/lib/Antd5/notification/util.js +9 -0
  230. package/lib/Antd5/pagination/Pagination.js +87 -20
  231. package/lib/Antd5/pagination/style/index.js +2 -10
  232. package/lib/Antd5/pagination/useShowSizeChanger.js +13 -0
  233. package/lib/Antd5/popconfirm/index.js +21 -6
  234. package/lib/Antd5/popover/index.js +21 -8
  235. package/lib/Antd5/progress/Steps.js +6 -2
  236. package/lib/Antd5/progress/progress.js +2 -2
  237. package/lib/Antd5/progress/utils.js +3 -3
  238. package/lib/Antd5/qr-code/style/index.js +2 -2
  239. package/lib/Antd5/segmented/index.js +16 -8
  240. package/lib/Antd5/segmented/style/index.js +14 -6
  241. package/lib/Antd5/select/index.js +45 -16
  242. package/lib/Antd5/select/style/dropdown.js +10 -9
  243. package/lib/Antd5/select/style/index.js +14 -10
  244. package/lib/Antd5/select/style/single.js +6 -3
  245. package/lib/Antd5/select/style/variants.js +55 -1
  246. package/lib/Antd5/skeleton/Paragraph.js +5 -8
  247. package/lib/Antd5/skeleton/Skeleton.js +8 -7
  248. package/lib/Antd5/slider/SliderTooltip.js +3 -2
  249. package/lib/Antd5/slider/index.js +43 -17
  250. package/lib/Antd5/slider/style/index.js +3 -3
  251. package/lib/Antd5/slider/useRafLock.js +1 -1
  252. package/lib/Antd5/space/Compact.js +8 -6
  253. package/lib/Antd5/space/index.js +16 -12
  254. package/lib/Antd5/spin/index.js +11 -9
  255. package/lib/Antd5/spin/style/index.js +1 -3
  256. package/lib/Antd5/spin/usePercent.js +1 -1
  257. package/lib/Antd5/splitter/SplitBar.js +56 -7
  258. package/lib/Antd5/splitter/Splitter.js +27 -17
  259. package/lib/Antd5/splitter/hooks/useResizable.js +3 -3
  260. package/lib/Antd5/splitter/hooks/useResize.js +17 -6
  261. package/lib/Antd5/splitter/style/index.js +32 -6
  262. package/lib/Antd5/statistic/Countdown.js +8 -61
  263. package/lib/Antd5/statistic/Statistic.js +17 -9
  264. package/lib/Antd5/statistic/Timer.js +91 -0
  265. package/lib/Antd5/statistic/index.js +2 -0
  266. package/lib/Antd5/statistic/utils.js +2 -2
  267. package/lib/Antd5/steps/index.js +8 -7
  268. package/lib/Antd5/steps/style/index.js +1 -1
  269. package/lib/Antd5/style/index.js +9 -4
  270. package/lib/Antd5/switch/style/index.js +2 -2
  271. package/lib/Antd5/table/InternalTable.js +6 -5
  272. package/lib/Antd5/table/hooks/useFilter/FilterDropdown.js +15 -11
  273. package/lib/Antd5/table/hooks/useFilter/FilterSearch.js +1 -1
  274. package/lib/Antd5/table/hooks/useFilter/index.js +3 -2
  275. package/lib/Antd5/table/hooks/useSelection.js +11 -3
  276. package/lib/Antd5/table/hooks/useSorter.js +4 -3
  277. package/lib/Antd5/table/style/filter.js +2 -2
  278. package/lib/Antd5/table/style/index.js +9 -9
  279. package/lib/Antd5/table/style/sorter.js +2 -1
  280. package/lib/Antd5/table/style/sticky.js +1 -1
  281. package/lib/Antd5/tabs/hooks/useLegacyItems.js +11 -4
  282. package/lib/Antd5/tabs/index.js +9 -2
  283. package/lib/Antd5/tabs/style/index.js +44 -23
  284. package/lib/Antd5/tag/style/index.js +3 -3
  285. package/lib/Antd5/theme/context.js +1 -3
  286. package/lib/Antd5/theme/getDesignToken.js +2 -2
  287. package/lib/Antd5/theme/themes/dark/colorAlgorithm.js +3 -3
  288. package/lib/Antd5/theme/themes/dark/index.js +13 -3
  289. package/lib/Antd5/theme/themes/default/colorAlgorithm.js +3 -3
  290. package/lib/Antd5/theme/themes/default/index.js +5 -1
  291. package/lib/Antd5/theme/themes/default/theme.js +4 -0
  292. package/lib/Antd5/theme/themes/shared/genColorMapToken.js +3 -3
  293. package/lib/Antd5/theme/themes/shared/genFontSizes.js +3 -1
  294. package/lib/Antd5/theme/util/alias.js +2 -2
  295. package/lib/Antd5/theme/util/genStyleUtils.js +9 -11
  296. package/lib/Antd5/theme/util/getAlphaColor.js +12 -12
  297. package/lib/Antd5/theme/util/useResetIconStyle.js +2 -10
  298. package/lib/Antd5/time-picker/index.js +1 -1
  299. package/lib/Antd5/timeline/TimelineItemList.js +1 -1
  300. package/lib/Antd5/tooltip/index.js +46 -31
  301. package/lib/Antd5/tooltip/style/index.js +13 -4
  302. package/lib/Antd5/tour/index.js +4 -2
  303. package/lib/Antd5/tour/panelRender.js +42 -27
  304. package/lib/Antd5/tour/style/index.js +3 -3
  305. package/lib/Antd5/transfer/ListItem.js +1 -1
  306. package/lib/Antd5/transfer/hooks/useData.js +8 -4
  307. package/lib/Antd5/transfer/hooks/useSelection.js +5 -4
  308. package/lib/Antd5/transfer/index.js +6 -2
  309. package/lib/Antd5/transfer/list.js +32 -13
  310. package/lib/Antd5/transfer/search.js +1 -1
  311. package/lib/Antd5/transfer/style/index.js +3 -1
  312. package/lib/Antd5/tree/DirectoryTree.js +2 -2
  313. package/lib/Antd5/tree/style/index.js +9 -3
  314. package/lib/Antd5/tree-select/index.js +61 -18
  315. package/lib/Antd5/tree-select/style/index.js +1 -1
  316. package/lib/Antd5/typography/Base/Ellipsis.js +3 -3
  317. package/lib/Antd5/typography/Base/index.js +20 -13
  318. package/lib/Antd5/typography/Editable.js +1 -1
  319. package/lib/Antd5/typography/Typography.js +8 -7
  320. package/lib/Antd5/typography/hooks/useCopyClick.js +24 -25
  321. package/lib/Antd5/typography/hooks/usePrevious.js +1 -1
  322. package/lib/Antd5/typography/style/index.js +5 -5
  323. package/lib/Antd5/typography/style/mixins.js +1 -1
  324. package/lib/Antd5/upload/Upload.js +22 -24
  325. package/lib/Antd5/version/index.js +0 -1
  326. package/lib/Antd5/version/token-meta.json +1 -0
  327. package/lib/Antd5/version/token.json +1 -0
  328. package/lib/Antd5/version/version.js +1 -1
  329. package/lib/Antd5/watermark/context.js +1 -1
  330. package/lib/Antd5/watermark/index.js +20 -13
  331. package/lib/Antd5/watermark/useClips.js +18 -16
  332. package/lib/Antd5/watermark/useRafDebounce.js +1 -1
  333. package/lib/Antd5/watermark/useSingletonCache.js +19 -0
  334. package/lib/Antd5/watermark/useWatermark.js +9 -18
  335. package/lib/CWCascader/rc-cascader/OptionList/Column.js +17 -18
  336. package/lib/CWMessage/MessageContent/TabList/index.js +10 -10
  337. package/lib/CWMessage/MessageContent/index.js +26 -28
  338. package/lib/CWMessage/index.js +42 -46
  339. package/lib/CWRangePicker/index.js +15 -15
  340. package/lib/CWRangePicker/utils/generate/dayjs.js +112 -23
  341. package/lib/CWRangePicker/utils/generate/moment.js +109 -21
  342. package/lib/CWSelect/index.js +423 -150
  343. package/lib/CWTable/CWTable.js +11 -11
  344. package/lib/Joyride/index.js +3 -3
  345. package/lib/ModuleFederation/react-dynamic-remote-component/RemoteComponent.js +38 -39
  346. package/lib/ModuleFederation/react-dynamic-remote-component/load-module.js +22 -23
  347. package/lib/QuickTransfer/index.js +13 -13
  348. package/lib/SearchBar/index.js +7 -7
  349. package/lib/SingleSpa/index.js +22 -24
  350. package/lib/TimeRangeSlider/TimeRangeSliderCmp/hooks/useMouse.js +3 -3
  351. package/lib/TimeRangeSlider/index.js +6 -6
  352. package/lib/TimeRangeSlider/utils/generate/dayjs.js +109 -20
  353. package/lib/TimeRangeSlider/utils/generate/moment.js +109 -20
  354. package/lib/TimeZoneSelect/index.js +21 -22
  355. package/package.json +35 -34
  356. package/lib/Antd5/_util/isNumeric.js +0 -4
  357. package/lib/Antd5/pagination/Select.js +0 -24
@@ -5,7 +5,8 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
5
5
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
6
6
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
7
  import { unit } from '@ant-design/cssinjs';
8
- import { genFocusStyle } from '../../style';
8
+ import { genFocusStyle, resetIcon } from '../../style';
9
+ import { PresetColors } from '../../theme/interface';
9
10
  import { genStyleHooks, mergeToken } from '../../theme/internal';
10
11
  import genGroupStyle from './group';
11
12
  import { prepareComponentToken, prepareToken } from './token';
@@ -13,8 +14,13 @@ import { prepareComponentToken, prepareToken } from './token';
13
14
  var genSharedButtonStyle = function genSharedButtonStyle(token) {
14
15
  var componentCls = token.componentCls,
15
16
  iconCls = token.iconCls,
16
- fontWeight = token.fontWeight;
17
- return _defineProperty({}, componentCls, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
17
+ fontWeight = token.fontWeight,
18
+ opacityLoading = token.opacityLoading,
19
+ motionDurationSlow = token.motionDurationSlow,
20
+ motionEaseInOut = token.motionEaseInOut,
21
+ marginXS = token.marginXS,
22
+ calc = token.calc;
23
+ return _defineProperty({}, componentCls, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
18
24
  outline: 'none',
19
25
  position: 'relative',
20
26
  display: 'inline-flex',
@@ -35,18 +41,55 @@ var genSharedButtonStyle = function genSharedButtonStyle(token) {
35
41
  '&:disabled > *': {
36
42
  pointerEvents: 'none'
37
43
  }
38
- }, "> span, ".concat(componentCls, "-icon"), {
39
- display: 'inline-flex'
40
- }), '> a', {
44
+ }, "".concat(componentCls, "-icon > svg"), resetIcon()), '> a', {
41
45
  color: 'currentColor'
42
- }), '&:not(:disabled)', _objectSpread({}, genFocusStyle(token))), "&".concat(componentCls, "-two-chinese-chars::first-letter"), {
46
+ }), '&:not(:disabled)', genFocusStyle(token)), "&".concat(componentCls, "-two-chinese-chars::first-letter"), {
43
47
  letterSpacing: '0.34em'
44
48
  }), "&".concat(componentCls, "-two-chinese-chars > *:not(").concat(iconCls, ")"), {
45
49
  marginInlineEnd: '-0.34em',
46
50
  letterSpacing: '0.34em'
47
- }), '&-icon-end', {
51
+ }), "&".concat(componentCls, "-icon-only"), _defineProperty(_defineProperty({
52
+ paddingInline: 0
53
+ }, "&".concat(componentCls, "-compact-item"), {
54
+ flex: 'none'
55
+ }), "&".concat(componentCls, "-round"), {
56
+ width: 'auto'
57
+ })), "&".concat(componentCls, "-loading"), {
58
+ opacity: opacityLoading,
59
+ cursor: 'default'
60
+ }), "".concat(componentCls, "-loading-icon"), {
61
+ transition: ['width', 'opacity', 'margin'].map(function (transition) {
62
+ return "".concat(transition, " ").concat(motionDurationSlow, " ").concat(motionEaseInOut);
63
+ }).join(',')
64
+ }), "&:not(".concat(componentCls, "-icon-end)"), _defineProperty({}, "".concat(componentCls, "-loading-icon-motion"), {
65
+ '&-appear-start, &-enter-start': {
66
+ marginInlineEnd: calc(marginXS).mul(-1).equal()
67
+ },
68
+ '&-appear-active, &-enter-active': {
69
+ marginInlineEnd: 0
70
+ },
71
+ '&-leave-start': {
72
+ marginInlineEnd: 0
73
+ },
74
+ '&-leave-active': {
75
+ marginInlineEnd: calc(marginXS).mul(-1).equal()
76
+ }
77
+ })), '&-icon-end', _defineProperty({
48
78
  flexDirection: 'row-reverse'
49
- }));
79
+ }, "".concat(componentCls, "-loading-icon-motion"), {
80
+ '&-appear-start, &-enter-start': {
81
+ marginInlineStart: calc(marginXS).mul(-1).equal()
82
+ },
83
+ '&-appear-active, &-enter-active': {
84
+ marginInlineStart: 0
85
+ },
86
+ '&-leave-start': {
87
+ marginInlineStart: 0
88
+ },
89
+ '&-leave-active': {
90
+ marginInlineStart: calc(marginXS).mul(-1).equal()
91
+ }
92
+ })));
50
93
  };
51
94
  var genHoverActiveButtonStyle = function genHoverActiveButtonStyle(btnCls, hoverStyle, activeStyle) {
52
95
  return _defineProperty({}, "&:not(:disabled):not(".concat(btnCls, "-disabled)"), {
@@ -142,27 +185,70 @@ var genTextLinkButtonStyle = function genTextLinkButtonStyle(token, textColor, v
142
185
  }, genVariantButtonStyle(token, hoverStyle, activeStyle, variant)));
143
186
  };
144
187
  // =============================== Color ==============================
188
+ var genPresetColorStyle = function genPresetColorStyle(token) {
189
+ var componentCls = token.componentCls;
190
+ return PresetColors.reduce(function (prev, colorKey) {
191
+ var darkColor = token["".concat(colorKey, "6")];
192
+ var lightColor = token["".concat(colorKey, "1")];
193
+ var hoverColor = token["".concat(colorKey, "5")];
194
+ var lightHoverColor = token["".concat(colorKey, "2")];
195
+ var lightBorderColor = token["".concat(colorKey, "3")];
196
+ var activeColor = token["".concat(colorKey, "7")];
197
+ return _objectSpread(_objectSpread({}, prev), {}, _defineProperty({}, "&".concat(componentCls, "-color-").concat(colorKey), _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
198
+ color: darkColor,
199
+ boxShadow: token["".concat(colorKey, "ShadowColor")]
200
+ }, genSolidButtonStyle(token, token.colorTextLightSolid, darkColor, {
201
+ background: hoverColor
202
+ }, {
203
+ background: activeColor
204
+ })), genOutlinedDashedButtonStyle(token, darkColor, token.colorBgContainer, {
205
+ color: hoverColor,
206
+ borderColor: hoverColor,
207
+ background: token.colorBgContainer
208
+ }, {
209
+ color: activeColor,
210
+ borderColor: activeColor,
211
+ background: token.colorBgContainer
212
+ })), genDashedButtonStyle(token)), genFilledButtonStyle(token, lightColor, {
213
+ background: lightHoverColor
214
+ }, {
215
+ background: lightBorderColor
216
+ })), genTextLinkButtonStyle(token, darkColor, 'link', {
217
+ color: hoverColor
218
+ }, {
219
+ color: activeColor
220
+ })), genTextLinkButtonStyle(token, darkColor, 'text', {
221
+ color: hoverColor,
222
+ background: lightColor
223
+ }, {
224
+ color: activeColor,
225
+ background: lightBorderColor
226
+ }))));
227
+ }, {});
228
+ };
145
229
  var genDefaultButtonStyle = function genDefaultButtonStyle(token) {
146
230
  return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
147
231
  color: token.defaultColor,
148
232
  boxShadow: token.defaultShadow
149
233
  }, genSolidButtonStyle(token, token.solidTextColor, token.colorBgSolid, {
234
+ color: token.solidTextColor,
150
235
  background: token.colorBgSolidHover
151
236
  }, {
237
+ color: token.solidTextColor,
152
238
  background: token.colorBgSolidActive
153
239
  })), genDashedButtonStyle(token)), genFilledButtonStyle(token, token.colorFillTertiary, {
154
240
  background: token.colorFillSecondary
155
241
  }, {
156
242
  background: token.colorFill
157
- })), genTextLinkButtonStyle(token, token.textTextColor, 'link', {
243
+ })), genGhostButtonStyle(token.componentCls, token.ghostBg, token.defaultGhostColor, token.defaultGhostBorderColor, token.colorTextDisabled, token.colorBorder)), genTextLinkButtonStyle(token, token.textTextColor, 'link', {
158
244
  color: token.colorLinkHover,
159
245
  background: token.linkHoverBg
160
246
  }, {
161
247
  color: token.colorLinkActive
162
- })), genGhostButtonStyle(token.componentCls, token.ghostBg, token.defaultGhostColor, token.defaultGhostBorderColor, token.colorTextDisabled, token.colorBorder));
248
+ }));
163
249
  };
164
250
  var genPrimaryButtonStyle = function genPrimaryButtonStyle(token) {
165
- return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
251
+ return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
166
252
  color: token.colorPrimary,
167
253
  boxShadow: token.primaryShadow
168
254
  }, genOutlinedDashedButtonStyle(token, token.colorPrimary, token.colorBgContainer, {
@@ -177,12 +263,17 @@ var genPrimaryButtonStyle = function genPrimaryButtonStyle(token) {
177
263
  background: token.colorPrimaryBgHover
178
264
  }, {
179
265
  background: token.colorPrimaryBorder
180
- })), genTextLinkButtonStyle(token, token.colorLink, 'text', {
266
+ })), genTextLinkButtonStyle(token, token.colorPrimaryText, 'text', {
181
267
  color: token.colorPrimaryTextHover,
182
268
  background: token.colorPrimaryBg
183
269
  }, {
184
270
  color: token.colorPrimaryTextActive,
185
271
  background: token.colorPrimaryBorder
272
+ })), genTextLinkButtonStyle(token, token.colorPrimaryText, 'link', {
273
+ color: token.colorPrimaryTextHover,
274
+ background: token.linkHoverBg
275
+ }, {
276
+ color: token.colorPrimaryTextActive
186
277
  })), genGhostButtonStyle(token.componentCls, token.ghostBg, token.colorPrimary, token.colorPrimary, token.colorTextDisabled, token.colorBorder, {
187
278
  color: token.colorPrimaryHover,
188
279
  borderColor: token.colorPrimaryHover
@@ -227,9 +318,22 @@ var genDangerousStyle = function genDangerousStyle(token) {
227
318
  borderColor: token.colorErrorActive
228
319
  }));
229
320
  };
321
+ var genLinkStyle = function genLinkStyle(token) {
322
+ return _objectSpread(_objectSpread({}, genTextLinkButtonStyle(token, token.colorLink, 'link', {
323
+ color: token.colorLinkHover
324
+ }, {
325
+ color: token.colorLinkActive
326
+ })), genGhostButtonStyle(token.componentCls, token.ghostBg, token.colorInfo, token.colorInfo, token.colorTextDisabled, token.colorBorder, {
327
+ color: token.colorInfoHover,
328
+ borderColor: token.colorInfoHover
329
+ }, {
330
+ color: token.colorInfoActive,
331
+ borderColor: token.colorInfoActive
332
+ }));
333
+ };
230
334
  var genColorButtonStyle = function genColorButtonStyle(token) {
231
335
  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));
336
+ return _objectSpread(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, "-color-default"), genDefaultButtonStyle(token)), "".concat(componentCls, "-color-primary"), genPrimaryButtonStyle(token)), "".concat(componentCls, "-color-dangerous"), genDangerousStyle(token)), "".concat(componentCls, "-color-link"), genLinkStyle(token)), genPresetColorStyle(token));
233
337
  };
234
338
  // =========== Compatible with versions earlier than 5.21.0 ===========
235
339
  var genCompatibleButtonStyle = function genCompatibleButtonStyle(token) {
@@ -266,42 +370,26 @@ var genButtonStyle = function genButtonStyle(token) {
266
370
  var componentCls = token.componentCls,
267
371
  controlHeight = token.controlHeight,
268
372
  fontSize = token.fontSize,
269
- lineHeight = token.lineHeight,
270
373
  borderRadius = token.borderRadius,
271
374
  buttonPaddingHorizontal = token.buttonPaddingHorizontal,
272
375
  iconCls = token.iconCls,
273
376
  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({
377
+ buttonIconOnlyFontSize = token.buttonIconOnlyFontSize;
378
+ return [_defineProperty({}, prefixCls, _defineProperty({
279
379
  fontSize: fontSize,
280
- lineHeight: lineHeight,
281
380
  height: controlHeight,
282
381
  padding: "".concat(unit(buttonPaddingVertical), " ").concat(unit(buttonPaddingHorizontal)),
283
382
  borderRadius: borderRadius
284
- }, "&".concat(componentCls, "-icon-only"), _defineProperty(_defineProperty(_defineProperty({
285
- width: controlHeight,
286
- paddingInline: 0
287
- }, "&".concat(componentCls, "-compact-item"), {
288
- flex: 'none'
289
- }), "&".concat(componentCls, "-round"), {
290
- width: 'auto'
291
- }), iconCls, {
383
+ }, "&".concat(componentCls, "-icon-only"), _defineProperty({
384
+ width: controlHeight
385
+ }, iconCls, {
292
386
  fontSize: buttonIconOnlyFontSize
293
- })), "&".concat(componentCls, "-loading"), {
294
- opacity: opacityLoading,
295
- cursor: 'default'
296
- }), "".concat(componentCls, "-loading-icon"), {
297
- transition: "width ".concat(motionDurationSlow, " ").concat(motionEaseInOut, ", opacity ").concat(motionDurationSlow, " ").concat(motionEaseInOut)
298
- })), // Shape - patch prefixCls again to override solid border radius style
387
+ }))), // Shape - patch prefixCls again to override solid border radius style
299
388
  _defineProperty({}, "".concat(componentCls).concat(componentCls, "-circle").concat(prefixCls), genCircleButtonStyle(token)), _defineProperty({}, "".concat(componentCls).concat(componentCls, "-round").concat(prefixCls), genRoundButtonStyle(token))];
300
389
  };
301
390
  var genSizeBaseButtonStyle = function genSizeBaseButtonStyle(token) {
302
391
  var baseToken = mergeToken(token, {
303
- fontSize: token.contentFontSize,
304
- lineHeight: token.contentLineHeight
392
+ fontSize: token.contentFontSize
305
393
  });
306
394
  return genButtonStyle(baseToken, token.componentCls);
307
395
  };
@@ -309,10 +397,9 @@ var genSizeSmallButtonStyle = function genSizeSmallButtonStyle(token) {
309
397
  var smallToken = mergeToken(token, {
310
398
  controlHeight: token.controlHeightSM,
311
399
  fontSize: token.contentFontSizeSM,
312
- lineHeight: token.contentLineHeightSM,
313
400
  padding: token.paddingXS,
314
401
  buttonPaddingHorizontal: token.paddingInlineSM,
315
- buttonPaddingVertical: token.paddingBlockSM,
402
+ buttonPaddingVertical: 0,
316
403
  borderRadius: token.borderRadiusSM,
317
404
  buttonIconOnlyFontSize: token.onlyIconSizeSM
318
405
  });
@@ -322,9 +409,8 @@ var genSizeLargeButtonStyle = function genSizeLargeButtonStyle(token) {
322
409
  var largeToken = mergeToken(token, {
323
410
  controlHeight: token.controlHeightLG,
324
411
  fontSize: token.contentFontSizeLG,
325
- lineHeight: token.contentLineHeightLG,
326
412
  buttonPaddingHorizontal: token.paddingInlineLG,
327
- buttonPaddingVertical: token.paddingBlockLG,
413
+ buttonPaddingVertical: 0,
328
414
  borderRadius: token.borderRadiusLG,
329
415
  buttonIconOnlyFontSize: token.onlyIconSizeLG
330
416
  });
@@ -1,13 +1,21 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ import { unit } from '@ant-design/cssinjs';
1
8
  import { AggregationColor } from '../../color-picker/color';
2
9
  import { isBright } from '../../color-picker/components/ColorPresets';
3
10
  import { getLineHeight, mergeToken } from '../../theme/internal';
11
+ import { PresetColors } from '../../theme/interface';
12
+ import getAlphaColor from '../../theme/util/getAlphaColor';
4
13
  export var prepareToken = function prepareToken(token) {
5
14
  var paddingInline = token.paddingInline,
6
- onlyIconSize = token.onlyIconSize,
7
- paddingBlock = token.paddingBlock;
15
+ onlyIconSize = token.onlyIconSize;
8
16
  var buttonToken = mergeToken(token, {
9
17
  buttonPaddingHorizontal: paddingInline,
10
- buttonPaddingVertical: paddingBlock,
18
+ buttonPaddingVertical: 0,
11
19
  buttonIconOnlyFontSize: onlyIconSize
12
20
  });
13
21
  return buttonToken;
@@ -21,7 +29,10 @@ export var prepareComponentToken = function prepareComponentToken(token) {
21
29
  var contentLineHeightSM = (_token$contentLineHei2 = token.contentLineHeightSM) !== null && _token$contentLineHei2 !== void 0 ? _token$contentLineHei2 : getLineHeight(contentFontSizeSM);
22
30
  var contentLineHeightLG = (_token$contentLineHei3 = token.contentLineHeightLG) !== null && _token$contentLineHei3 !== void 0 ? _token$contentLineHei3 : getLineHeight(contentFontSizeLG);
23
31
  var solidTextColor = isBright(new AggregationColor(token.colorBgSolid), '#fff') ? '#000' : '#fff';
24
- return {
32
+ var shadowColorTokens = PresetColors.reduce(function (prev, colorKey) {
33
+ return _objectSpread(_objectSpread({}, prev), {}, _defineProperty({}, "".concat(colorKey, "ShadowColor"), "0 ".concat(unit(token.controlOutlineWidth), " 0 ").concat(getAlphaColor(token["".concat(colorKey, "1")], token.colorBgContainer))));
34
+ }, {});
35
+ return _objectSpread(_objectSpread({}, shadowColorTokens), {}, {
25
36
  fontWeight: 400,
26
37
  defaultShadow: "0 ".concat(token.controlOutlineWidth, "px 0 ").concat(token.controlTmpOutline),
27
38
  primaryShadow: "0 ".concat(token.controlOutlineWidth, "px 0 ").concat(token.controlOutline),
@@ -35,9 +46,9 @@ export var prepareComponentToken = function prepareComponentToken(token) {
35
46
  paddingInline: token.paddingContentHorizontal - token.lineWidth,
36
47
  paddingInlineLG: token.paddingContentHorizontal - token.lineWidth,
37
48
  paddingInlineSM: 8 - token.lineWidth,
38
- onlyIconSize: token.fontSizeLG,
39
- onlyIconSizeSM: token.fontSizeLG - 2,
40
- onlyIconSizeLG: token.fontSizeLG + 2,
49
+ onlyIconSize: 'inherit',
50
+ onlyIconSizeSM: 'inherit',
51
+ onlyIconSizeLG: 'inherit',
41
52
  groupBorderColor: token.colorPrimaryHover,
42
53
  linkHoverBg: 'transparent',
43
54
  textTextColor: token.colorText,
@@ -64,5 +75,5 @@ export var prepareComponentToken = function prepareComponentToken(token) {
64
75
  paddingBlock: Math.max((token.controlHeight - contentFontSize * contentLineHeight) / 2 - token.lineWidth, 0),
65
76
  paddingBlockSM: Math.max((token.controlHeightSM - contentFontSizeSM * contentLineHeightSM) / 2 - token.lineWidth, 0),
66
77
  paddingBlockLG: Math.max((token.controlHeightLG - contentFontSizeLG * contentLineHeightLG) / 2 - token.lineWidth, 0)
67
- };
78
+ });
68
79
  };
@@ -16,8 +16,8 @@ import { useContext, useMemo } from 'react';
16
16
  import { FormItemInputContext } from '../form/context';
17
17
  import { Button, Group } from '../radio';
18
18
  import Select from '../select';
19
- var YearSelectOffset = 10;
20
- var YearSelectTotal = 20;
19
+ var YEAR_SELECT_OFFSET = 10;
20
+ var YEAR_SELECT_TOTAL = 20;
21
21
  function YearSelect(props) {
22
22
  var fullscreen = props.fullscreen,
23
23
  validRange = props.validRange,
@@ -28,8 +28,8 @@ function YearSelect(props) {
28
28
  _onChange = props.onChange,
29
29
  divRef = props.divRef;
30
30
  var year = generateConfig.getYear(value || generateConfig.getNow());
31
- var start = year - YearSelectOffset;
32
- var end = start + YearSelectTotal;
31
+ var start = year - YEAR_SELECT_OFFSET;
32
+ var end = start + YEAR_SELECT_TOTAL;
33
33
  if (validRange) {
34
34
  start = generateConfig.getYear(validRange[0]);
35
35
  end = generateConfig.getYear(validRange[1]) + 1;
@@ -16,7 +16,7 @@ import classNames from 'classnames';
16
16
  import { PickerPanel as RCPickerPanel } from 'rc-picker';
17
17
  import useMergedState from 'rc-util/lib/hooks/useMergedState';
18
18
  import { devUseWarning } from '../_util/warning';
19
- import { ConfigContext } from '../config-provider';
19
+ import { useComponentConfig } from '../config-provider/context';
20
20
  import { useLocale } from '../locale';
21
21
  import CalendarHeader from './Header';
22
22
  import enUS from './locale/en_US';
@@ -53,13 +53,15 @@ var generateCalendar = function generateCalendar(generateConfig) {
53
53
  validRange = props.validRange,
54
54
  _props$fullscreen = props.fullscreen,
55
55
  fullscreen = _props$fullscreen === void 0 ? true : _props$fullscreen,
56
+ showWeek = props.showWeek,
56
57
  onChange = props.onChange,
57
58
  onPanelChange = props.onPanelChange,
58
59
  onSelect = props.onSelect;
59
- var _React$useContext = React.useContext(ConfigContext),
60
- getPrefixCls = _React$useContext.getPrefixCls,
61
- direction = _React$useContext.direction,
62
- calendar = _React$useContext.calendar;
60
+ var _useComponentConfig = useComponentConfig('calendar'),
61
+ getPrefixCls = _useComponentConfig.getPrefixCls,
62
+ direction = _useComponentConfig.direction,
63
+ contextClassName = _useComponentConfig.className,
64
+ contextStyle = _useComponentConfig.style;
63
65
  var prefixCls = getPrefixCls('picker', customizePrefixCls);
64
66
  var calendarPrefixCls = "".concat(prefixCls, "-calendar");
65
67
  var _useStyle = useStyle(prefixCls, calendarPrefixCls),
@@ -71,10 +73,12 @@ var generateCalendar = function generateCalendar(generateConfig) {
71
73
  // ====================== Warning =======================
72
74
  if (process.env.NODE_ENV !== 'production') {
73
75
  var warning = devUseWarning('Calendar');
74
- warning.deprecated(!dateFullCellRender, 'dateFullCellRender', 'fullCellRender');
75
- warning.deprecated(!dateCellRender, 'dateCellRender', 'cellRender');
76
- warning.deprecated(!monthFullCellRender, 'monthFullCellRender', 'fullCellRender');
77
- warning.deprecated(!monthCellRender, 'monthCellRender', 'cellRender');
76
+ [['dateFullCellRender', 'fullCellRender'], ['dateCellRender', 'cellRender'], ['monthFullCellRender', 'fullCellRender'], ['monthCellRender', 'cellRender']].forEach(function (_ref) {
77
+ var _ref2 = _slicedToArray(_ref, 2),
78
+ deprecatedName = _ref2[0],
79
+ newName = _ref2[1];
80
+ warning.deprecated(!(deprecatedName in props), deprecatedName, newName);
81
+ });
78
82
  }
79
83
  // ====================== State =======================
80
84
  // Value
@@ -179,8 +183,8 @@ var generateCalendar = function generateCalendar(generateConfig) {
179
183
  }
180
184
  };
181
185
  return wrapCSSVar(_jsxs("div", {
182
- className: classNames(calendarPrefixCls, _defineProperty(_defineProperty(_defineProperty({}, "".concat(calendarPrefixCls, "-full"), fullscreen), "".concat(calendarPrefixCls, "-mini"), !fullscreen), "".concat(calendarPrefixCls, "-rtl"), direction === 'rtl'), calendar === null || calendar === void 0 ? void 0 : calendar.className, className, rootClassName, hashId, cssVarCls),
183
- style: _objectSpread(_objectSpread({}, calendar === null || calendar === void 0 ? void 0 : calendar.style), style),
186
+ className: classNames(calendarPrefixCls, _defineProperty(_defineProperty(_defineProperty({}, "".concat(calendarPrefixCls, "-full"), fullscreen), "".concat(calendarPrefixCls, "-mini"), !fullscreen), "".concat(calendarPrefixCls, "-rtl"), direction === 'rtl'), contextClassName, className, rootClassName, hashId, cssVarCls),
187
+ style: _objectSpread(_objectSpread({}, contextStyle), style),
184
188
  children: [headerRender ? headerRender({
185
189
  value: mergedValue,
186
190
  type: mergedMode,
@@ -210,7 +214,8 @@ var generateCalendar = function generateCalendar(generateConfig) {
210
214
  mode: panelMode,
211
215
  picker: panelMode,
212
216
  disabledDate: mergedDisabledDate,
213
- hideHeader: true
217
+ hideHeader: true,
218
+ showWeek: showWeek
214
219
  })]
215
220
  }));
216
221
  };
@@ -57,7 +57,7 @@ export var genCalendarStyles = function genCalendarStyles(token) {
57
57
  }
58
58
  }), "".concat(componentCls, "-cell::before"), {
59
59
  pointerEvents: 'none'
60
- })), "".concat(calendarCls).concat(calendarCls, "-full"), _defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, "-panel"), _defineProperty({
60
+ })), "".concat(calendarCls).concat(calendarCls, "-full"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, "-panel"), _defineProperty({
61
61
  display: 'block',
62
62
  width: '100%',
63
63
  textAlign: 'end',
@@ -73,7 +73,13 @@ export var genCalendarStyles = function genCalendarStyles(token) {
73
73
  paddingBottom: token.paddingXXS,
74
74
  lineHeight: unit(token.weekHeight)
75
75
  }
76
- })), "".concat(componentCls, "-cell"), _defineProperty(_defineProperty(_defineProperty({
76
+ })), "".concat(componentCls, "-cell-week ").concat(componentCls, "-cell-inner"), {
77
+ display: 'block',
78
+ borderRadius: 0,
79
+ borderTop: "".concat(unit(token.lineWidthBold), " ").concat(token.lineType, " ").concat(token.colorSplit),
80
+ width: '100%',
81
+ height: token.calc(token.dateValueHeight).add(token.dateContentHeight).add(token.calc(token.paddingXS).div(2)).add(token.lineWidthBold).equal()
82
+ }), "".concat(componentCls, "-cell"), _defineProperty(_defineProperty(_defineProperty({
77
83
  '&::before': {
78
84
  display: 'none'
79
85
  },
@@ -1,5 +1,5 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["prefixCls", "className", "rootClassName", "style", "extra", "headStyle", "bodyStyle", "title", "loading", "bordered", "size", "type", "cover", "actions", "tabList", "children", "activeTabKey", "defaultActiveTabKey", "tabBarExtraContent", "hoverable", "tabProps", "classNames", "styles"],
2
+ var _excluded = ["prefixCls", "className", "rootClassName", "style", "extra", "headStyle", "bodyStyle", "title", "loading", "bordered", "variant", "size", "type", "cover", "actions", "tabList", "children", "activeTabKey", "defaultActiveTabKey", "tabBarExtraContent", "hoverable", "tabProps", "classNames", "styles"],
3
3
  _excluded2 = ["tab"];
4
4
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
5
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -25,6 +25,7 @@ import Skeleton from '../skeleton';
25
25
  import Tabs from '../tabs';
26
26
  import Grid from './Grid';
27
27
  import useStyle from './style';
28
+ import useVariant from '../form/hooks/useVariants';
28
29
  var ActionNode = function ActionNode(props) {
29
30
  var actionClasses = props.actionClasses,
30
31
  _props$actions = props.actions,
@@ -61,8 +62,8 @@ var Card = /*#__PURE__*/React.forwardRef(function (props, ref) {
61
62
  bodyStyle = _props$bodyStyle === void 0 ? {} : _props$bodyStyle,
62
63
  title = props.title,
63
64
  loading = props.loading,
64
- _props$bordered = props.bordered,
65
- bordered = _props$bordered === void 0 ? true : _props$bordered,
65
+ bordered = props.bordered,
66
+ customVariant = props.variant,
66
67
  customizeSize = props.size,
67
68
  type = props.type,
68
69
  cover = props.cover,
@@ -82,10 +83,13 @@ var Card = /*#__PURE__*/React.forwardRef(function (props, ref) {
82
83
  getPrefixCls = _React$useContext.getPrefixCls,
83
84
  direction = _React$useContext.direction,
84
85
  card = _React$useContext.card;
86
+ var _useVariant = useVariant('card', customVariant, bordered),
87
+ _useVariant2 = _slicedToArray(_useVariant, 1),
88
+ variant = _useVariant2[0];
85
89
  // =================Warning===================
86
90
  if (process.env.NODE_ENV !== 'production') {
87
91
  var warning = devUseWarning('Card');
88
- [['headStyle', 'styles.header'], ['bodyStyle', 'styles.body']].forEach(function (_ref) {
92
+ [['headStyle', 'styles.header'], ['bodyStyle', 'styles.body'], ['bordered', 'variant']].forEach(function (_ref) {
89
93
  var _ref2 = _slicedToArray(_ref, 2),
90
94
  deprecatedName = _ref2[0],
91
95
  newName = _ref2[1];
@@ -188,7 +192,7 @@ var Card = /*#__PURE__*/React.forwardRef(function (props, ref) {
188
192
  actions: actions
189
193
  }) : null;
190
194
  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 === 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);
195
+ 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"), variant !== 'borderless'), "".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
196
  var mergedStyle = _objectSpread(_objectSpread({}, card === null || card === void 0 ? void 0 : card.style), style);
193
197
  return wrapCSSVar(_jsxs("div", _objectSpread(_objectSpread({
194
198
  ref: ref
@@ -13,7 +13,7 @@ var genCardHeadStyle = function genCardHeadStyle(token) {
13
13
  var antCls = token.antCls,
14
14
  componentCls = token.componentCls,
15
15
  headerHeight = token.headerHeight,
16
- cardPaddingBase = token.cardPaddingBase,
16
+ headerPadding = token.headerPadding,
17
17
  tabsMarginBottom = token.tabsMarginBottom;
18
18
  return _objectSpread(_objectSpread({
19
19
  display: 'flex',
@@ -22,7 +22,7 @@ var genCardHeadStyle = function genCardHeadStyle(token) {
22
22
  minHeight: headerHeight,
23
23
  marginBottom: -1,
24
24
  // Fix card grid overflow bug: https://gw.alipayobjects.com/zos/rmsportal/XonYxBikwpgbqIQBeuhk.png
25
- padding: "0 ".concat(unit(cardPaddingBase)),
25
+ padding: "0 ".concat(unit(headerPadding)),
26
26
  color: token.colorTextHeading,
27
27
  fontWeight: token.fontWeightStrong,
28
28
  fontSize: token.headerFontSize,
@@ -109,7 +109,7 @@ var genCardActionsStyle = function genCardActionsStyle(token) {
109
109
  }, "a:not(".concat(componentCls, "-btn), > ").concat(iconCls), {
110
110
  display: 'inline-block',
111
111
  width: '100%',
112
- color: token.colorTextDescription,
112
+ color: token.colorIcon,
113
113
  lineHeight: unit(token.fontHeight),
114
114
  transition: "color ".concat(token.motionDurationMid),
115
115
  '&:hover': {
@@ -154,16 +154,17 @@ var genCardMetaStyle = function genCardMetaStyle(token) {
154
154
  // ============================== Inner ==============================
155
155
  var genCardTypeInnerStyle = function genCardTypeInnerStyle(token) {
156
156
  var componentCls = token.componentCls,
157
- cardPaddingBase = token.cardPaddingBase,
158
- colorFillAlter = token.colorFillAlter;
157
+ colorFillAlter = token.colorFillAlter,
158
+ headerPadding = token.headerPadding,
159
+ bodyPadding = token.bodyPadding;
159
160
  return _defineProperty(_defineProperty({}, "".concat(componentCls, "-head"), {
160
- padding: "0 ".concat(unit(cardPaddingBase)),
161
+ padding: "0 ".concat(unit(headerPadding)),
161
162
  background: colorFillAlter,
162
163
  '&-title': {
163
164
  fontSize: token.fontSize
164
165
  }
165
166
  }), "".concat(componentCls, "-body"), {
166
- padding: "".concat(unit(token.padding), " ").concat(unit(cardPaddingBase))
167
+ padding: "".concat(unit(token.padding), " ").concat(unit(bodyPadding))
167
168
  });
168
169
  };
169
170
  // ============================== Loading ==============================
@@ -182,7 +183,7 @@ var genCardStyle = function genCardStyle(token) {
182
183
  cardHeadPadding = token.cardHeadPadding,
183
184
  colorBorderSecondary = token.colorBorderSecondary,
184
185
  boxShadowTertiary = token.boxShadowTertiary,
185
- cardPaddingBase = token.cardPaddingBase,
186
+ bodyPadding = token.bodyPadding,
186
187
  extraColor = token.extraColor;
187
188
  return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, componentCls, _objectSpread(_objectSpread({}, resetComponent(token)), {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
188
189
  position: 'relative',
@@ -197,7 +198,7 @@ var genCardStyle = function genCardStyle(token) {
197
198
  fontWeight: 'normal',
198
199
  fontSize: token.fontSize
199
200
  }), "".concat(componentCls, "-body"), _objectSpread({
200
- padding: cardPaddingBase,
201
+ padding: bodyPadding,
201
202
  borderRadius: "0 0 ".concat(unit(token.borderRadiusLG), " ").concat(unit(token.borderRadiusLG))
202
203
  }, clearFix())), "".concat(componentCls, "-grid"), genCardGridStyle(token)), "".concat(componentCls, "-cover"), {
203
204
  '> *': {
@@ -238,17 +239,18 @@ var genCardStyle = function genCardStyle(token) {
238
239
  // ============================== Size ==============================
239
240
  var genCardSizeStyle = function genCardSizeStyle(token) {
240
241
  var componentCls = token.componentCls,
241
- cardPaddingSM = token.cardPaddingSM,
242
+ bodyPaddingSM = token.bodyPaddingSM,
243
+ headerPaddingSM = token.headerPaddingSM,
242
244
  headerHeightSM = token.headerHeightSM,
243
245
  headerFontSizeSM = token.headerFontSizeSM;
244
246
  return _defineProperty(_defineProperty({}, "".concat(componentCls, "-small"), _defineProperty(_defineProperty({}, "> ".concat(componentCls, "-head"), _defineProperty({
245
247
  minHeight: headerHeightSM,
246
- padding: "0 ".concat(unit(cardPaddingSM)),
248
+ padding: "0 ".concat(unit(headerPaddingSM)),
247
249
  fontSize: headerFontSizeSM
248
250
  }, "> ".concat(componentCls, "-head-wrapper"), _defineProperty({}, "> ".concat(componentCls, "-extra"), {
249
251
  fontSize: token.fontSize
250
252
  }))), "> ".concat(componentCls, "-body"), {
251
- padding: cardPaddingSM
253
+ padding: bodyPaddingSM
252
254
  })), "".concat(componentCls, "-small").concat(componentCls, "-contain-tabs"), _defineProperty({}, "> ".concat(componentCls, "-head"), _defineProperty({}, "".concat(componentCls, "-head-title, ").concat(componentCls, "-extra"), {
253
255
  paddingTop: 0,
254
256
  display: 'flex',
@@ -256,6 +258,7 @@ var genCardSizeStyle = function genCardSizeStyle(token) {
256
258
  })));
257
259
  };
258
260
  export var prepareComponentToken = function prepareComponentToken(token) {
261
+ var _token$bodyPadding, _token$headerPadding;
259
262
  return {
260
263
  headerBg: 'transparent',
261
264
  headerFontSize: token.fontSizeLG,
@@ -265,7 +268,12 @@ export var prepareComponentToken = function prepareComponentToken(token) {
265
268
  actionsBg: token.colorBgContainer,
266
269
  actionsLiMargin: "".concat(token.paddingSM, "px 0"),
267
270
  tabsMarginBottom: -token.padding - token.lineWidth,
268
- extraColor: token.colorText
271
+ extraColor: token.colorText,
272
+ bodyPaddingSM: 12,
273
+ // Fixed padding.
274
+ headerPaddingSM: 12,
275
+ bodyPadding: (_token$bodyPadding = token.bodyPadding) !== null && _token$bodyPadding !== void 0 ? _token$bodyPadding : token.paddingLG,
276
+ headerPadding: (_token$headerPadding = token.headerPadding) !== null && _token$headerPadding !== void 0 ? _token$headerPadding : token.paddingLG
269
277
  };
270
278
  };
271
279
  // ============================== Export ==============================
@@ -274,8 +282,7 @@ export default genStyleHooks('Card', function (token) {
274
282
  cardShadow: token.boxShadowCard,
275
283
  cardHeadPadding: token.padding,
276
284
  cardPaddingBase: token.paddingLG,
277
- cardActionsIconSize: token.fontSize,
278
- cardPaddingSM: 12 // Fixed padding.
285
+ cardActionsIconSize: token.fontSize
279
286
  });
280
287
  return [
281
288
  // Style