@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
@@ -1,4 +1,4 @@
1
- var _excluded = ["message", "description", "icon", "type", "btn", "className", "style", "role", "closeIcon", "closable"];
1
+ var _excluded = ["message", "description", "icon", "type", "btn", "actions", "className", "style", "role", "closeIcon", "closable"];
2
2
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
3
3
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
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; }
@@ -23,7 +23,7 @@ import useCSSVarCls from '../config-provider/hooks/useCSSVarCls';
23
23
  import { useToken } from '../theme/internal';
24
24
  import { getCloseIcon, PureContent } from './PurePanel';
25
25
  import useStyle from './style';
26
- import { getMotion, getPlacementStyle } from './util';
26
+ import { getMotion, getPlacementStyle, getCloseIconConfig } from './util';
27
27
  var DEFAULT_OFFSET = 24;
28
28
  var DEFAULT_DURATION = 4.5;
29
29
  var DEFAULT_PLACEMENT = 'topRight';
@@ -145,6 +145,7 @@ export function useInternalNotification(notificationConfig) {
145
145
  icon = config.icon,
146
146
  type = config.type,
147
147
  btn = config.btn,
148
+ actions = config.actions,
148
149
  className = config.className,
149
150
  style = config.style,
150
151
  _config$role = config.role,
@@ -152,7 +153,11 @@ export function useInternalNotification(notificationConfig) {
152
153
  closeIcon = config.closeIcon,
153
154
  closable = config.closable,
154
155
  restConfig = _objectWithoutProperties(config, _excluded);
155
- var realCloseIcon = getCloseIcon(noticePrefixCls, typeof closeIcon !== 'undefined' ? closeIcon : notification === null || notification === void 0 ? void 0 : notification.closeIcon);
156
+ if (process.env.NODE_ENV !== 'production') {
157
+ warning.deprecated(!btn, 'btn', 'actions');
158
+ }
159
+ var mergedActions = actions !== null && actions !== void 0 ? actions : btn;
160
+ var realCloseIcon = getCloseIcon(noticePrefixCls, getCloseIconConfig(closeIcon, notificationConfig, notification));
156
161
  return originOpen(_objectSpread(_objectSpread({
157
162
  // use placement from props instead of hard-coding "topRight"
158
163
  placement: (_notificationConfig$p = notificationConfig === null || notificationConfig === void 0 ? void 0 : notificationConfig.placement) !== null && _notificationConfig$p !== void 0 ? _notificationConfig$p : DEFAULT_PLACEMENT
@@ -163,7 +168,7 @@ export function useInternalNotification(notificationConfig) {
163
168
  type: type,
164
169
  message: message,
165
170
  description: description,
166
- btn: btn,
171
+ actions: mergedActions,
167
172
  role: role
168
173
  }),
169
174
  className: classNames(type && "".concat(noticePrefixCls, "-").concat(type), className, notification === null || notification === void 0 ? void 0 : notification.className),
@@ -54,4 +54,13 @@ export function getMotion(prefixCls) {
54
54
  return {
55
55
  motionName: "".concat(prefixCls, "-fade")
56
56
  };
57
+ }
58
+ export function getCloseIconConfig(closeIcon, notificationConfig, notification) {
59
+ if (typeof closeIcon !== 'undefined') {
60
+ return closeIcon;
61
+ }
62
+ if (typeof (notificationConfig === null || notificationConfig === void 0 ? void 0 : notificationConfig.closeIcon) !== 'undefined') {
63
+ return notificationConfig.closeIcon;
64
+ }
65
+ return notification === null || notification === void 0 ? void 0 : notification.closeIcon;
57
66
  }
@@ -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 = ["align", "prefixCls", "selectPrefixCls", "className", "rootClassName", "style", "size", "locale", "selectComponentClass", "responsive", "showSizeChanger"];
2
+ var _excluded = ["align", "prefixCls", "selectPrefixCls", "className", "rootClassName", "style", "size", "locale", "responsive", "showSizeChanger", "selectComponentClass", "pageSizeOptions"];
3
3
  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; }
4
4
  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; }
5
5
  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; }
@@ -22,14 +22,16 @@ import RightOutlined from '@ant-design/icons/RightOutlined';
22
22
  import classNames from 'classnames';
23
23
  import RcPagination from 'rc-pagination';
24
24
  import enUS from 'rc-pagination/lib/locale/en_US';
25
- import { ConfigContext } from '../config-provider';
25
+ import { devUseWarning } from '../_util/warning';
26
+ import { useComponentConfig } from '../config-provider/context';
26
27
  import useSize from '../config-provider/hooks/useSize';
27
28
  import useBreakpoint from '../grid/hooks/useBreakpoint';
28
29
  import { useLocale } from '../locale';
30
+ import Select from '../select';
29
31
  import { useToken } from '../theme/internal';
30
- import { MiddleSelect, MiniSelect } from './Select';
31
32
  import useStyle from './style';
32
33
  import BorderedStyle from './style/bordered';
34
+ import useShowSizeChanger from './useShowSizeChanger';
33
35
  var Pagination = function Pagination(props) {
34
36
  var align = props.align,
35
37
  customizePrefixCls = props.prefixCls,
@@ -39,20 +41,22 @@ var Pagination = function Pagination(props) {
39
41
  style = props.style,
40
42
  customizeSize = props.size,
41
43
  customLocale = props.locale,
42
- selectComponentClass = props.selectComponentClass,
43
44
  responsive = props.responsive,
44
45
  showSizeChanger = props.showSizeChanger,
46
+ selectComponentClass = props.selectComponentClass,
47
+ pageSizeOptions = props.pageSizeOptions,
45
48
  restProps = _objectWithoutProperties(props, _excluded);
46
49
  var _useBreakpoint = useBreakpoint(responsive),
47
50
  xs = _useBreakpoint.xs;
48
51
  var _useToken = useToken(),
49
52
  _useToken2 = _slicedToArray(_useToken, 2),
50
53
  token = _useToken2[1];
51
- var _React$useContext = React.useContext(ConfigContext),
52
- getPrefixCls = _React$useContext.getPrefixCls,
53
- direction = _React$useContext.direction,
54
- _React$useContext$pag = _React$useContext.pagination,
55
- pagination = _React$useContext$pag === void 0 ? {} : _React$useContext$pag;
54
+ var _useComponentConfig = useComponentConfig('pagination'),
55
+ getPrefixCls = _useComponentConfig.getPrefixCls,
56
+ direction = _useComponentConfig.direction,
57
+ contextShowSizeChangerConfig = _useComponentConfig.showSizeChanger,
58
+ contextClassName = _useComponentConfig.className,
59
+ contextStyle = _useComponentConfig.style;
56
60
  var prefixCls = getPrefixCls('pagination', customizePrefixCls);
57
61
  // Style
58
62
  var _useStyle = useStyle(prefixCls),
@@ -60,7 +64,75 @@ var Pagination = function Pagination(props) {
60
64
  wrapCSSVar = _useStyle2[0],
61
65
  hashId = _useStyle2[1],
62
66
  cssVarCls = _useStyle2[2];
63
- var mergedShowSizeChanger = showSizeChanger !== null && showSizeChanger !== void 0 ? showSizeChanger : pagination.showSizeChanger;
67
+ // ============================== Size ==============================
68
+ var mergedSize = useSize(customizeSize);
69
+ var isSmall = mergedSize === 'small' || !!(xs && !mergedSize && responsive);
70
+ // ============================= Locale =============================
71
+ var _useLocale = useLocale('Pagination', enUS),
72
+ _useLocale2 = _slicedToArray(_useLocale, 1),
73
+ contextLocale = _useLocale2[0];
74
+ var locale = _objectSpread(_objectSpread({}, contextLocale), customLocale);
75
+ // ========================== Size Changer ==========================
76
+ // Merge the props showSizeChanger
77
+ var _useShowSizeChanger = useShowSizeChanger(showSizeChanger),
78
+ _useShowSizeChanger2 = _slicedToArray(_useShowSizeChanger, 2),
79
+ propShowSizeChanger = _useShowSizeChanger2[0],
80
+ propSizeChangerSelectProps = _useShowSizeChanger2[1];
81
+ var _useShowSizeChanger3 = useShowSizeChanger(contextShowSizeChangerConfig),
82
+ _useShowSizeChanger4 = _slicedToArray(_useShowSizeChanger3, 2),
83
+ contextShowSizeChanger = _useShowSizeChanger4[0],
84
+ contextSizeChangerSelectProps = _useShowSizeChanger4[1];
85
+ var mergedShowSizeChanger = propShowSizeChanger !== null && propShowSizeChanger !== void 0 ? propShowSizeChanger : contextShowSizeChanger;
86
+ var mergedShowSizeChangerSelectProps = propSizeChangerSelectProps !== null && propSizeChangerSelectProps !== void 0 ? propSizeChangerSelectProps : contextSizeChangerSelectProps;
87
+ var SizeChanger = selectComponentClass || Select;
88
+ // Generate options
89
+ var mergedPageSizeOptions = React.useMemo(function () {
90
+ return pageSizeOptions ? pageSizeOptions.map(function (option) {
91
+ return Number(option);
92
+ }) : undefined;
93
+ }, [pageSizeOptions]);
94
+ // Render size changer
95
+ var sizeChangerRender = function sizeChangerRender(info) {
96
+ var _options$find;
97
+ var disabled = info.disabled,
98
+ pageSize = info.size,
99
+ onSizeChange = info.onSizeChange,
100
+ ariaLabel = info['aria-label'],
101
+ sizeChangerClassName = info.className,
102
+ options = info.options;
103
+ var _ref = mergedShowSizeChangerSelectProps || {},
104
+ propSizeChangerClassName = _ref.className,
105
+ propSizeChangerOnChange = _ref.onChange;
106
+ // Origin Select is using Select.Option,
107
+ // So it make the option value must be string
108
+ // Just for compatible
109
+ var selectedValue = (_options$find = options.find(function (option) {
110
+ return String(option.value) === String(pageSize);
111
+ })) === null || _options$find === void 0 ? void 0 : _options$find.value;
112
+ return _jsx(SizeChanger, _objectSpread(_objectSpread({
113
+ disabled: disabled,
114
+ showSearch: true,
115
+ popupMatchSelectWidth: false,
116
+ getPopupContainer: function getPopupContainer(triggerNode) {
117
+ return triggerNode.parentNode;
118
+ },
119
+ "aria-label": ariaLabel,
120
+ options: options
121
+ }, mergedShowSizeChangerSelectProps), {}, {
122
+ value: selectedValue,
123
+ onChange: function onChange(nextSize, option) {
124
+ onSizeChange === null || onSizeChange === void 0 || onSizeChange(nextSize);
125
+ propSizeChangerOnChange === null || propSizeChangerOnChange === void 0 || propSizeChangerOnChange(nextSize, option);
126
+ },
127
+ size: isSmall ? 'small' : 'middle',
128
+ className: classNames(sizeChangerClassName, propSizeChangerClassName)
129
+ }));
130
+ };
131
+ if (process.env.NODE_ENV !== 'production') {
132
+ var warning = devUseWarning('Pagination');
133
+ warning(!selectComponentClass, 'usage', '`selectComponentClass` is not official api which will be removed.');
134
+ }
135
+ // ============================= Render =============================
64
136
  var iconsProps = React.useMemo(function () {
65
137
  var ellipsis = _jsx("span", {
66
138
  className: "".concat(prefixCls, "-item-ellipsis"),
@@ -111,15 +183,9 @@ var Pagination = function Pagination(props) {
111
183
  jumpNextIcon: jumpNextIcon
112
184
  };
113
185
  }, [direction, prefixCls]);
114
- var _useLocale = useLocale('Pagination', enUS),
115
- _useLocale2 = _slicedToArray(_useLocale, 1),
116
- contextLocale = _useLocale2[0];
117
- var locale = _objectSpread(_objectSpread({}, contextLocale), customLocale);
118
- var mergedSize = useSize(customizeSize);
119
- var isSmall = mergedSize === 'small' || !!(xs && !mergedSize && responsive);
120
186
  var selectPrefixCls = getPrefixCls('select', customizeSelectPrefixCls);
121
- var extendedClassName = classNames(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-").concat(align), !!align), "".concat(prefixCls, "-mini"), isSmall), "".concat(prefixCls, "-rtl"), direction === 'rtl'), "".concat(prefixCls, "-bordered"), token.wireframe), pagination === null || pagination === void 0 ? void 0 : pagination.className, className, rootClassName, hashId, cssVarCls);
122
- var mergedStyle = _objectSpread(_objectSpread({}, pagination === null || pagination === void 0 ? void 0 : pagination.style), style);
187
+ var extendedClassName = classNames(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-").concat(align), !!align), "".concat(prefixCls, "-mini"), isSmall), "".concat(prefixCls, "-rtl"), direction === 'rtl'), "".concat(prefixCls, "-bordered"), token.wireframe), contextClassName, className, rootClassName, hashId, cssVarCls);
188
+ var mergedStyle = _objectSpread(_objectSpread({}, contextStyle), style);
123
189
  return wrapCSSVar(_jsxs(_Fragment, {
124
190
  children: [token.wireframe && _jsx(BorderedStyle, {
125
191
  prefixCls: prefixCls
@@ -128,9 +194,10 @@ var Pagination = function Pagination(props) {
128
194
  prefixCls: prefixCls,
129
195
  selectPrefixCls: selectPrefixCls,
130
196
  className: extendedClassName,
131
- selectComponentClass: selectComponentClass || (isSmall ? MiniSelect : MiddleSelect),
132
197
  locale: locale,
133
- showSizeChanger: mergedShowSizeChanger
198
+ pageSizeOptions: mergedPageSizeOptions,
199
+ showSizeChanger: mergedShowSizeChanger,
200
+ sizeChangerRender: sizeChangerRender
134
201
  }))]
135
202
  }));
136
203
  };
@@ -28,6 +28,7 @@ var genPaginationDisabledStyle = function genPaginationDisabledStyle(token) {
28
28
  cursor: 'not-allowed'
29
29
  }, "".concat(componentCls, "-item"), {
30
30
  cursor: 'not-allowed',
31
+ backgroundColor: 'transparent',
31
32
  '&:hover, &:active': {
32
33
  backgroundColor: 'transparent'
33
34
  },
@@ -72,7 +73,7 @@ var genPaginationDisabledStyle = function genPaginationDisabledStyle(token) {
72
73
  };
73
74
  var genPaginationMiniStyle = function genPaginationMiniStyle(token) {
74
75
  var componentCls = token.componentCls;
75
- return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "&".concat(componentCls, "-mini ").concat(componentCls, "-total-text, &").concat(componentCls, "-mini ").concat(componentCls, "-simple-pager"), {
76
+ return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "&".concat(componentCls, "-mini ").concat(componentCls, "-total-text, &").concat(componentCls, "-mini ").concat(componentCls, "-simple-pager"), {
76
77
  height: token.itemSizeSM,
77
78
  lineHeight: unit(token.itemSizeSM)
78
79
  }), "&".concat(componentCls, "-mini ").concat(componentCls, "-item"), {
@@ -80,15 +81,6 @@ var genPaginationMiniStyle = function genPaginationMiniStyle(token) {
80
81
  height: token.itemSizeSM,
81
82
  margin: 0,
82
83
  lineHeight: unit(token.calc(token.itemSizeSM).sub(2).equal())
83
- }), "&".concat(componentCls, "-mini:not(").concat(componentCls, "-disabled) ").concat(componentCls, "-item:not(").concat(componentCls, "-item-active)"), {
84
- backgroundColor: 'transparent',
85
- borderColor: 'transparent',
86
- '&:hover': {
87
- backgroundColor: token.colorBgTextHover
88
- },
89
- '&:active': {
90
- backgroundColor: token.colorBgTextActive
91
- }
92
84
  }), "&".concat(componentCls, "-mini ").concat(componentCls, "-prev, &").concat(componentCls, "-mini ").concat(componentCls, "-next"), {
93
85
  minWidth: token.itemSizeSM,
94
86
  height: token.itemSizeSM,
@@ -0,0 +1,13 @@
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
+ import { useMemo } from 'react';
3
+ export default function useShowSizeChanger(showSizeChanger) {
4
+ return useMemo(function () {
5
+ if (typeof showSizeChanger === 'boolean') {
6
+ return [showSizeChanger, {}];
7
+ }
8
+ if (showSizeChanger && _typeof(showSizeChanger) === 'object') {
9
+ return [true, showSizeChanger];
10
+ }
11
+ return [undefined, undefined];
12
+ }, [showSizeChanger]);
13
+ }
@@ -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", "placement", "trigger", "okType", "icon", "children", "overlayClassName", "onOpenChange", "onVisibleChange"];
2
+ var _excluded = ["prefixCls", "placement", "trigger", "okType", "icon", "children", "overlayClassName", "onOpenChange", "onVisibleChange", "overlayStyle", "styles", "classNames"];
3
3
  var _this = this;
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; }
@@ -20,7 +20,7 @@ import ExclamationCircleFilled from '@ant-design/icons/ExclamationCircleFilled';
20
20
  import classNames from 'classnames';
21
21
  import useMergedState from 'rc-util/lib/hooks/useMergedState';
22
22
  import omit from 'rc-util/lib/omit';
23
- import { ConfigContext } from '../config-provider';
23
+ import { useComponentConfig } from '../config-provider/context';
24
24
  import Popover from '../popover';
25
25
  import PurePanel, { Overlay } from './PurePanel';
26
26
  import useStyle from './style';
@@ -39,9 +39,16 @@ var InternalPopconfirm = /*#__PURE__*/React.forwardRef(function (props, ref) {
39
39
  overlayClassName = props.overlayClassName,
40
40
  onOpenChange = props.onOpenChange,
41
41
  onVisibleChange = props.onVisibleChange,
42
+ overlayStyle = props.overlayStyle,
43
+ styles = props.styles,
44
+ popconfirmClassNames = props.classNames,
42
45
  restProps = _objectWithoutProperties(props, _excluded);
43
- var _React$useContext = React.useContext(ConfigContext),
44
- getPrefixCls = _React$useContext.getPrefixCls;
46
+ var _useComponentConfig = useComponentConfig('popconfirm'),
47
+ getPrefixCls = _useComponentConfig.getPrefixCls,
48
+ contextClassName = _useComponentConfig.className,
49
+ contextStyle = _useComponentConfig.style,
50
+ contextClassNames = _useComponentConfig.classNames,
51
+ contextStyles = _useComponentConfig.styles;
45
52
  var _useMergedState = useMergedState(false, {
46
53
  value: (_props$open = props.open) !== null && _props$open !== void 0 ? _props$open : props.visible,
47
54
  defaultValue: (_props$defaultOpen = props.defaultOpen) !== null && _props$defaultOpen !== void 0 ? _props$defaultOpen : props.defaultVisible
@@ -75,7 +82,8 @@ var InternalPopconfirm = /*#__PURE__*/React.forwardRef(function (props, ref) {
75
82
  settingOpen(value, e);
76
83
  };
77
84
  var prefixCls = getPrefixCls('popconfirm', customizePrefixCls);
78
- var overlayClassNames = classNames(prefixCls, overlayClassName);
85
+ var rootClassNames = classNames(prefixCls, contextClassName, overlayClassName, contextClassNames.root, popconfirmClassNames === null || popconfirmClassNames === void 0 ? void 0 : popconfirmClassNames.root);
86
+ var bodyClassNames = classNames(contextClassNames.body, popconfirmClassNames === null || popconfirmClassNames === void 0 ? void 0 : popconfirmClassNames.body);
79
87
  var _useStyle = useStyle(prefixCls),
80
88
  _useStyle2 = _slicedToArray(_useStyle, 1),
81
89
  wrapCSSVar = _useStyle2[0];
@@ -85,7 +93,14 @@ var InternalPopconfirm = /*#__PURE__*/React.forwardRef(function (props, ref) {
85
93
  onOpenChange: onInternalOpenChange,
86
94
  open: open,
87
95
  ref: ref,
88
- overlayClassName: overlayClassNames,
96
+ classNames: {
97
+ root: rootClassNames,
98
+ body: bodyClassNames
99
+ },
100
+ styles: {
101
+ root: _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, contextStyles.root), contextStyle), overlayStyle), styles === null || styles === void 0 ? void 0 : styles.root),
102
+ body: _objectSpread(_objectSpread({}, contextStyles.body), styles === null || styles === void 0 ? void 0 : styles.body)
103
+ },
89
104
  content: _jsx(Overlay, _objectSpread(_objectSpread({
90
105
  okType: okType,
91
106
  icon: icon
@@ -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", "title", "content", "overlayClassName", "placement", "trigger", "children", "mouseEnterDelay", "mouseLeaveDelay", "onOpenChange", "overlayStyle"];
2
+ var _excluded = ["prefixCls", "title", "content", "overlayClassName", "placement", "trigger", "children", "mouseEnterDelay", "mouseLeaveDelay", "onOpenChange", "overlayStyle", "styles", "classNames"];
3
3
  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; }
4
4
  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; }
5
5
  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; }
@@ -21,9 +21,9 @@ import KeyCode from 'rc-util/lib/KeyCode';
21
21
  import { getRenderPropValue } from '../_util/getRenderPropValue';
22
22
  import { getTransitionName } from '../_util/motion';
23
23
  import { cloneElement } from '../_util/reactNode';
24
- import { ConfigContext } from '../config-provider';
25
24
  import Tooltip from '../tooltip';
26
25
  import PurePanel, { Overlay } from './PurePanel';
26
+ import { useComponentConfig } from '../config-provider/context';
27
27
  // CSSINJS
28
28
  import useStyle from './style';
29
29
  var InternalPopover = /*#__PURE__*/React.forwardRef(function (props, ref) {
@@ -44,9 +44,15 @@ var InternalPopover = /*#__PURE__*/React.forwardRef(function (props, ref) {
44
44
  onOpenChange = props.onOpenChange,
45
45
  _props$overlayStyle = props.overlayStyle,
46
46
  overlayStyle = _props$overlayStyle === void 0 ? {} : _props$overlayStyle,
47
+ styles = props.styles,
48
+ popoverClassNames = props.classNames,
47
49
  otherProps = _objectWithoutProperties(props, _excluded);
48
- var _React$useContext = React.useContext(ConfigContext),
49
- getPrefixCls = _React$useContext.getPrefixCls;
50
+ var _useComponentConfig = useComponentConfig('popover'),
51
+ getPrefixCls = _useComponentConfig.getPrefixCls,
52
+ contextClassName = _useComponentConfig.className,
53
+ contextStyle = _useComponentConfig.style,
54
+ contextClassNames = _useComponentConfig.classNames,
55
+ contextStyles = _useComponentConfig.styles;
50
56
  var prefixCls = getPrefixCls('popover', customizePrefixCls);
51
57
  var _useStyle = useStyle(prefixCls),
52
58
  _useStyle2 = _slicedToArray(_useStyle, 3),
@@ -54,7 +60,8 @@ var InternalPopover = /*#__PURE__*/React.forwardRef(function (props, ref) {
54
60
  hashId = _useStyle2[1],
55
61
  cssVarCls = _useStyle2[2];
56
62
  var rootPrefixCls = getPrefixCls();
57
- var overlayCls = classNames(overlayClassName, hashId, cssVarCls);
63
+ var rootClassNames = classNames(overlayClassName, hashId, cssVarCls, contextClassName, contextClassNames.root, popoverClassNames === null || popoverClassNames === void 0 ? void 0 : popoverClassNames.root);
64
+ var bodyClassNames = classNames(contextClassNames.body, popoverClassNames === null || popoverClassNames === void 0 ? void 0 : popoverClassNames.body);
58
65
  var _useMergedState = useMergedState(false, {
59
66
  value: (_props$open = props.open) !== null && _props$open !== void 0 ? _props$open : props.visible,
60
67
  defaultValue: (_props$defaultOpen = props.defaultOpen) !== null && _props$defaultOpen !== void 0 ? _props$defaultOpen : props.defaultVisible
@@ -80,11 +87,17 @@ var InternalPopover = /*#__PURE__*/React.forwardRef(function (props, ref) {
80
87
  placement: placement,
81
88
  trigger: trigger,
82
89
  mouseEnterDelay: mouseEnterDelay,
83
- mouseLeaveDelay: mouseLeaveDelay,
84
- overlayStyle: overlayStyle
90
+ mouseLeaveDelay: mouseLeaveDelay
85
91
  }, otherProps), {}, {
86
92
  prefixCls: prefixCls,
87
- overlayClassName: overlayCls,
93
+ classNames: {
94
+ root: rootClassNames,
95
+ body: bodyClassNames
96
+ },
97
+ styles: {
98
+ root: _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, contextStyles.root), contextStyle), overlayStyle), styles === null || styles === void 0 ? void 0 : styles.root),
99
+ body: _objectSpread(_objectSpread({}, contextStyles.body), styles === null || styles === void 0 ? void 0 : styles.body)
100
+ },
88
101
  ref: ref,
89
102
  open: open,
90
103
  onOpenChange: onInternalOpenChange,
@@ -15,6 +15,8 @@ import { getSize } from './utils';
15
15
  var Steps = function Steps(props) {
16
16
  var size = props.size,
17
17
  steps = props.steps,
18
+ _props$rounding = props.rounding,
19
+ customRounding = _props$rounding === void 0 ? Math.round : _props$rounding,
18
20
  _props$percent = props.percent,
19
21
  percent = _props$percent === void 0 ? 0 : _props$percent,
20
22
  _props$strokeWidth = props.strokeWidth,
@@ -24,7 +26,7 @@ var Steps = function Steps(props) {
24
26
  trailColor = _props$trailColor === void 0 ? null : _props$trailColor,
25
27
  prefixCls = props.prefixCls,
26
28
  children = props.children;
27
- var current = Math.round(steps * (percent / 100));
29
+ var current = customRounding(steps * (percent / 100));
28
30
  var stepWidth = size === 'small' ? 2 : 14;
29
31
  var mergedSize = size !== null && size !== void 0 ? size : [stepWidth, strokeWidth];
30
32
  var _getSize = getSize(mergedSize, 'step', {
@@ -35,7 +37,9 @@ var Steps = function Steps(props) {
35
37
  width = _getSize2[0],
36
38
  height = _getSize2[1];
37
39
  var unitWidth = width / steps;
38
- var styledSteps = new Array(steps);
40
+ var styledSteps = Array.from({
41
+ length: steps
42
+ });
39
43
  for (var i = 0; i < steps; i++) {
40
44
  var color = Array.isArray(strokeColor) ? strokeColor[i] : strokeColor;
41
45
  styledSteps[i] = _jsx("div", {
@@ -15,11 +15,11 @@ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i
15
15
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
16
16
  import { jsx as _jsx } from "react/jsx-runtime";
17
17
  import * as React from 'react';
18
+ import { FastColor } from '@ant-design/fast-color';
18
19
  import CheckCircleFilled from '@ant-design/icons/CheckCircleFilled';
19
20
  import CheckOutlined from '@ant-design/icons/CheckOutlined';
20
21
  import CloseCircleFilled from '@ant-design/icons/CloseCircleFilled';
21
22
  import CloseOutlined from '@ant-design/icons/CloseOutlined';
22
- import { TinyColor } from '@ctrl/tinycolor';
23
23
  import classNames from 'classnames';
24
24
  import omit from 'rc-util/lib/omit';
25
25
  import { devUseWarning } from '../_util/warning';
@@ -60,7 +60,7 @@ var Progress = /*#__PURE__*/React.forwardRef(function (props, ref) {
60
60
  var strokeColorIsBright = React.useMemo(function () {
61
61
  if (strokeColorNotArray) {
62
62
  var color = typeof strokeColorNotArray === 'string' ? strokeColorNotArray : Object.values(strokeColorNotArray)[0];
63
- return new TinyColor(color).isLight();
63
+ return new FastColor(color).isLight();
64
64
  }
65
65
  return false;
66
66
  }, [strokeColor]);
@@ -90,9 +90,9 @@ export var getSize = function getSize(size, type, extra) {
90
90
  width = size;
91
91
  height = size;
92
92
  } else if (Array.isArray(size)) {
93
- var _ref10, _size$, _ref11, _size$2;
94
- width = (_ref10 = (_size$ = size[0]) !== null && _size$ !== void 0 ? _size$ : size[1]) !== null && _ref10 !== void 0 ? _ref10 : 120;
95
- height = (_ref11 = (_size$2 = size[0]) !== null && _size$2 !== void 0 ? _size$2 : size[1]) !== null && _ref11 !== void 0 ? _ref11 : 120;
93
+ var _ref0, _size$, _ref1, _size$2;
94
+ width = (_ref0 = (_size$ = size[0]) !== null && _size$ !== void 0 ? _size$ : size[1]) !== null && _ref0 !== void 0 ? _ref0 : 120;
95
+ height = (_ref1 = (_size$2 = size[0]) !== null && _size$2 !== void 0 ? _size$2 : size[1]) !== null && _ref1 !== void 0 ? _ref1 : 120;
96
96
  }
97
97
  }
98
98
  return [width, height];
@@ -5,7 +5,7 @@ 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 { TinyColor } from '@ctrl/tinycolor';
8
+ import { FastColor } from '@ant-design/fast-color';
9
9
  import { resetComponent } from '../../style';
10
10
  import { genStyleHooks, mergeToken } from '../../theme/internal';
11
11
  var genQRCodeStyle = function genQRCodeStyle(token) {
@@ -55,7 +55,7 @@ var genQRCodeStyle = function genQRCodeStyle(token) {
55
55
  };
56
56
  export var prepareComponentToken = function prepareComponentToken(token) {
57
57
  return {
58
- QRCodeMaskBackgroundColor: new TinyColor(token.colorBgContainer).setAlpha(0.96).toRgbString()
58
+ QRCodeMaskBackgroundColor: new FastColor(token.colorBgContainer).setA(0.96).toRgbString()
59
59
  };
60
60
  };
61
61
  export default genStyleHooks('QRCode', function (token) {
@@ -1,4 +1,4 @@
1
- var _excluded = ["prefixCls", "className", "rootClassName", "block", "options", "size", "style", "vertical"],
1
+ var _excluded = ["prefixCls", "className", "rootClassName", "block", "options", "size", "style", "vertical", "shape", "name"],
2
2
  _excluded2 = ["icon", "label"];
3
3
  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; }
4
4
  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; }
@@ -18,13 +18,15 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
18
18
  import * as React from 'react';
19
19
  import classNames from 'classnames';
20
20
  import RcSegmented from 'rc-segmented';
21
- import { ConfigContext } from '../config-provider';
21
+ import useId from 'rc-util/lib/hooks/useId';
22
+ import { useComponentConfig } from '../config-provider/context';
22
23
  import useSize from '../config-provider/hooks/useSize';
23
24
  import useStyle from './style';
24
25
  function isSegmentedLabeledOptionWithIcon(option) {
25
26
  return _typeof(option) === 'object' && !!(option !== null && option !== void 0 && option.icon);
26
27
  }
27
28
  var InternalSegmented = /*#__PURE__*/React.forwardRef(function (props, ref) {
29
+ var defaultName = useId();
28
30
  var customizePrefixCls = props.prefixCls,
29
31
  className = props.className,
30
32
  rootClassName = props.rootClassName,
@@ -35,11 +37,16 @@ var InternalSegmented = /*#__PURE__*/React.forwardRef(function (props, ref) {
35
37
  customSize = _props$size === void 0 ? 'middle' : _props$size,
36
38
  style = props.style,
37
39
  vertical = props.vertical,
40
+ _props$shape = props.shape,
41
+ shape = _props$shape === void 0 ? 'default' : _props$shape,
42
+ _props$name = props.name,
43
+ name = _props$name === void 0 ? defaultName : _props$name,
38
44
  restProps = _objectWithoutProperties(props, _excluded);
39
- var _React$useContext = React.useContext(ConfigContext),
40
- getPrefixCls = _React$useContext.getPrefixCls,
41
- direction = _React$useContext.direction,
42
- segmented = _React$useContext.segmented;
45
+ var _useComponentConfig = useComponentConfig('segmented'),
46
+ getPrefixCls = _useComponentConfig.getPrefixCls,
47
+ direction = _useComponentConfig.direction,
48
+ contextClassName = _useComponentConfig.className,
49
+ contextStyle = _useComponentConfig.style;
43
50
  var prefixCls = getPrefixCls('segmented', customizePrefixCls);
44
51
  // Style
45
52
  var _useStyle = useStyle(prefixCls),
@@ -70,9 +77,10 @@ var InternalSegmented = /*#__PURE__*/React.forwardRef(function (props, ref) {
70
77
  return option;
71
78
  });
72
79
  }, [options, prefixCls]);
73
- var cls = classNames(className, rootClassName, segmented === null || segmented === void 0 ? void 0 : segmented.className, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-block"), block), "".concat(prefixCls, "-sm"), mergedSize === 'small'), "".concat(prefixCls, "-lg"), mergedSize === 'large'), "".concat(prefixCls, "-vertical"), vertical), hashId, cssVarCls);
74
- var mergedStyle = _objectSpread(_objectSpread({}, segmented === null || segmented === void 0 ? void 0 : segmented.style), style);
80
+ var cls = classNames(className, rootClassName, contextClassName, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-block"), block), "".concat(prefixCls, "-sm"), mergedSize === 'small'), "".concat(prefixCls, "-lg"), mergedSize === 'large'), "".concat(prefixCls, "-vertical"), vertical), "".concat(prefixCls, "-shape-").concat(shape), shape === 'round'), hashId, cssVarCls);
81
+ var mergedStyle = _objectSpread(_objectSpread({}, contextStyle), style);
75
82
  return wrapCSSVar(_jsx(RcSegmented, _objectSpread(_objectSpread({}, restProps), {}, {
83
+ name: name,
76
84
  className: cls,
77
85
  style: mergedStyle,
78
86
  options: extendedOptions,
@@ -5,7 +5,7 @@ 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 { resetComponent, textEllipsis } from '../../style';
8
+ import { genFocusOutline, genFocusStyle, resetComponent, textEllipsis } from '../../style';
9
9
  import { genStyleHooks, mergeToken } from '../../theme/internal';
10
10
  // ============================== Mixins ==============================
11
11
  function getItemDisabledStyle(cls, token) {
@@ -29,14 +29,14 @@ var genSegmentedStyle = function genSegmentedStyle(token) {
29
29
  var labelHeight = token.calc(token.controlHeight).sub(token.calc(token.trackPadding).mul(2)).equal();
30
30
  var labelHeightLG = token.calc(token.controlHeightLG).sub(token.calc(token.trackPadding).mul(2)).equal();
31
31
  var labelHeightSM = token.calc(token.controlHeightSM).sub(token.calc(token.trackPadding).mul(2)).equal();
32
- return _defineProperty({}, componentCls, _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, resetComponent(token)), {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
32
+ return _defineProperty({}, componentCls, _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, resetComponent(token)), {}, {
33
33
  display: 'inline-block',
34
34
  padding: token.trackPadding,
35
35
  color: token.itemColor,
36
36
  background: token.trackBg,
37
37
  borderRadius: token.borderRadius,
38
38
  transition: "all ".concat(token.motionDurationMid, " ").concat(token.motionEaseInOut)
39
- }, "".concat(componentCls, "-group"), {
39
+ }, genFocusStyle(token)), {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, "-group"), {
40
40
  position: 'relative',
41
41
  display: 'flex',
42
42
  alignItems: 'stretch',
@@ -68,6 +68,7 @@ var genSegmentedStyle = function genSegmentedStyle(token) {
68
68
  '&-selected': _objectSpread(_objectSpread({}, getItemSelectedStyle(token)), {}, {
69
69
  color: token.itemSelectedColor
70
70
  }),
71
+ '&-focused': _objectSpread({}, genFocusOutline(token)),
71
72
  '&::after': {
72
73
  content: '""',
73
74
  position: 'absolute',
@@ -77,7 +78,8 @@ var genSegmentedStyle = function genSegmentedStyle(token) {
77
78
  top: 0,
78
79
  insetInlineStart: 0,
79
80
  borderRadius: 'inherit',
80
- transition: "background-color ".concat(token.motionDurationMid),
81
+ opacity: 0,
82
+ transition: "opacity ".concat(token.motionDurationMid),
81
83
  // This is mandatory to make it not clickable or hoverable
82
84
  // Ref: https://github.com/ant-design/ant-design/issues/40888
83
85
  pointerEvents: 'none'
@@ -85,11 +87,13 @@ var genSegmentedStyle = function genSegmentedStyle(token) {
85
87
  }, "&:hover:not(".concat(componentCls, "-item-selected):not(").concat(componentCls, "-item-disabled)"), {
86
88
  color: token.itemHoverColor,
87
89
  '&::after': {
90
+ opacity: 1,
88
91
  backgroundColor: token.itemHoverBg
89
92
  }
90
93
  }), "&:active:not(".concat(componentCls, "-item-selected):not(").concat(componentCls, "-item-disabled)"), {
91
94
  color: token.itemHoverColor,
92
95
  '&::after': {
96
+ opacity: 1,
93
97
  backgroundColor: token.itemActiveBg
94
98
  }
95
99
  }), '&-label', _objectSpread({
@@ -134,10 +138,14 @@ var genSegmentedStyle = function genSegmentedStyle(token) {
134
138
  padding: "0 ".concat(unit(token.segmentedPaddingHorizontalSM))
135
139
  }), "".concat(componentCls, "-item, ").concat(componentCls, "-thumb"), {
136
140
  borderRadius: token.borderRadiusXS
137
- })), getItemDisabledStyle("&-disabled ".concat(componentCls, "-item"), token)), getItemDisabledStyle("".concat(componentCls, "-item-disabled"), token)), {}, _defineProperty({}, "".concat(componentCls, "-thumb-motion-appear-active"), {
141
+ })), getItemDisabledStyle("&-disabled ".concat(componentCls, "-item"), token)), getItemDisabledStyle("".concat(componentCls, "-item-disabled"), token)), {}, _defineProperty(_defineProperty({}, "".concat(componentCls, "-thumb-motion-appear-active"), {
138
142
  transition: "transform ".concat(token.motionDurationSlow, " ").concat(token.motionEaseInOut, ", width ").concat(token.motionDurationSlow, " ").concat(token.motionEaseInOut),
139
143
  willChange: 'transform, width'
140
- })));
144
+ }), "&".concat(componentCls, "-shape-round"), _defineProperty({
145
+ borderRadius: 9999
146
+ }, "".concat(componentCls, "-item, ").concat(componentCls, "-thumb"), {
147
+ borderRadius: 9999
148
+ }))));
141
149
  };
142
150
  // ============================== Export ==============================
143
151
  export var prepareComponentToken = function prepareComponentToken(token) {