@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,17 +1,17 @@
1
1
  var _excluded = ["prefixCls", "preview", "className", "rootClassName", "style"],
2
- _excluded2 = ["getContainer", "closeIcon", "rootClassName"];
2
+ _excluded2 = ["getContainer", "closeIcon", "rootClassName", "destroyOnClose", "destroyOnHidden"];
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; }
6
6
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
7
7
  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); }
8
- 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); }
9
8
  function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
10
9
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
11
10
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
12
11
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
13
12
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
14
13
  function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
14
+ 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); }
15
15
  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; }
16
16
  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; }
17
17
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -21,28 +21,34 @@ import classNames from 'classnames';
21
21
  import RcImage from 'rc-image';
22
22
  import { useZIndex } from '../_util/hooks/useZIndex';
23
23
  import { getTransitionName } from '../_util/motion';
24
- import { ConfigContext } from '../config-provider';
24
+ import { devUseWarning } from '../_util/warning';
25
+ import { useComponentConfig } from '../config-provider/context';
25
26
  import useCSSVarCls from '../config-provider/hooks/useCSSVarCls';
26
- import defaultLocale from '../locale/en_US';
27
+ import { useLocale } from '../locale';
27
28
  import PreviewGroup, { icons } from './PreviewGroup';
28
29
  import useStyle from './style';
29
30
  var Image = function Image(props) {
30
- var _image$preview2;
31
31
  var customizePrefixCls = props.prefixCls,
32
32
  preview = props.preview,
33
33
  className = props.className,
34
34
  rootClassName = props.rootClassName,
35
35
  style = props.style,
36
36
  otherProps = _objectWithoutProperties(props, _excluded);
37
- var _React$useContext = React.useContext(ConfigContext),
38
- getPrefixCls = _React$useContext.getPrefixCls,
39
- _React$useContext$loc = _React$useContext.locale,
40
- contextLocale = _React$useContext$loc === void 0 ? defaultLocale : _React$useContext$loc,
41
- getContextPopupContainer = _React$useContext.getPopupContainer,
42
- image = _React$useContext.image;
37
+ if (process.env.NODE_ENV !== 'production') {
38
+ var warning = devUseWarning('Image');
39
+ warning.deprecated(!(preview && _typeof(preview) === 'object' && 'destroyOnClose' in preview), 'destroyOnClose', 'destroyOnHidden');
40
+ }
41
+ var _useComponentConfig = useComponentConfig('image'),
42
+ getPrefixCls = _useComponentConfig.getPrefixCls,
43
+ getContextPopupContainer = _useComponentConfig.getPopupContainer,
44
+ contextClassName = _useComponentConfig.className,
45
+ contextStyle = _useComponentConfig.style,
46
+ contextPreview = _useComponentConfig.preview;
47
+ var _useLocale = useLocale('Image'),
48
+ _useLocale2 = _slicedToArray(_useLocale, 1),
49
+ imageLocale = _useLocale2[0];
43
50
  var prefixCls = getPrefixCls('image', customizePrefixCls);
44
51
  var rootPrefixCls = getPrefixCls();
45
- var imageLocale = contextLocale.Image || defaultLocale.Image;
46
52
  // Style
47
53
  var rootCls = useCSSVarCls(prefixCls);
48
54
  var _useStyle = useStyle(prefixCls, rootCls),
@@ -51,12 +57,11 @@ var Image = function Image(props) {
51
57
  hashId = _useStyle2[1],
52
58
  cssVarCls = _useStyle2[2];
53
59
  var mergedRootClassName = classNames(rootClassName, hashId, cssVarCls, rootCls);
54
- var mergedClassName = classNames(className, hashId, image === null || image === void 0 ? void 0 : image.className);
60
+ var mergedClassName = classNames(className, hashId, contextClassName);
55
61
  var _useZIndex = useZIndex('ImagePreview', _typeof(preview) === 'object' ? preview.zIndex : undefined),
56
62
  _useZIndex2 = _slicedToArray(_useZIndex, 1),
57
63
  zIndex = _useZIndex2[0];
58
64
  var mergedPreview = React.useMemo(function () {
59
- var _image$preview;
60
65
  if (preview === false) {
61
66
  return preview;
62
67
  }
@@ -64,6 +69,8 @@ var Image = function Image(props) {
64
69
  var getContainer = _preview.getContainer,
65
70
  closeIcon = _preview.closeIcon,
66
71
  rootClassName = _preview.rootClassName,
72
+ destroyOnClose = _preview.destroyOnClose,
73
+ destroyOnHidden = _preview.destroyOnHidden,
67
74
  restPreviewProps = _objectWithoutProperties(_preview, _excluded2);
68
75
  return _objectSpread(_objectSpread({
69
76
  mask: _jsxs("div", {
@@ -72,15 +79,17 @@ var Image = function Image(props) {
72
79
  }),
73
80
  icons: icons
74
81
  }, restPreviewProps), {}, {
82
+ // TODO: In the future, destroyOnClose in rc-image needs to be upgrade to destroyOnHidden
83
+ destroyOnClose: destroyOnHidden !== null && destroyOnHidden !== void 0 ? destroyOnHidden : destroyOnClose,
75
84
  rootClassName: classNames(mergedRootClassName, rootClassName),
76
85
  getContainer: getContainer !== null && getContainer !== void 0 ? getContainer : getContextPopupContainer,
77
86
  transitionName: getTransitionName(rootPrefixCls, 'zoom', _preview.transitionName),
78
87
  maskTransitionName: getTransitionName(rootPrefixCls, 'fade', _preview.maskTransitionName),
79
88
  zIndex: zIndex,
80
- closeIcon: closeIcon !== null && closeIcon !== void 0 ? closeIcon : image === null || image === void 0 || (_image$preview = image.preview) === null || _image$preview === void 0 ? void 0 : _image$preview.closeIcon
89
+ closeIcon: closeIcon !== null && closeIcon !== void 0 ? closeIcon : contextPreview === null || contextPreview === void 0 ? void 0 : contextPreview.closeIcon
81
90
  });
82
- }, [preview, imageLocale, image === null || image === void 0 || (_image$preview2 = image.preview) === null || _image$preview2 === void 0 ? void 0 : _image$preview2.closeIcon]);
83
- var mergedStyle = _objectSpread(_objectSpread({}, image === null || image === void 0 ? void 0 : image.style), style);
91
+ }, [preview, imageLocale, contextPreview === null || contextPreview === void 0 ? void 0 : contextPreview.closeIcon]);
92
+ var mergedStyle = _objectSpread(_objectSpread({}, contextStyle), style);
84
93
  return wrapCSSVar(_jsx(RcImage, _objectSpread({
85
94
  prefixCls: prefixCls,
86
95
  preview: mergedPreview,
@@ -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 { genModalMaskStyle } from '../../modal/style';
10
10
  import { textEllipsis } from '../../style';
11
11
  import { initFadeMotion, initZoomMotion } from '../../style/motion';
@@ -30,7 +30,7 @@ export var genImageMaskStyle = function genImageMaskStyle(token) {
30
30
  alignItems: 'center',
31
31
  justifyContent: 'center',
32
32
  color: colorTextLightSolid,
33
- background: new TinyColor('#000').setAlpha(0.5).toRgbString(),
33
+ background: new FastColor('#000').setA(0.5).toRgbString(),
34
34
  cursor: 'pointer',
35
35
  opacity: 0,
36
36
  transition: "opacity ".concat(motionDurationSlow)
@@ -55,8 +55,8 @@ export var genPreviewOperationsStyle = function genPreviewOperationsStyle(token)
55
55
  motionDurationSlow = token.motionDurationSlow,
56
56
  iconCls = token.iconCls,
57
57
  colorTextLightSolid = token.colorTextLightSolid;
58
- var operationBg = new TinyColor(modalMaskBg).setAlpha(0.1);
59
- var operationBgHover = operationBg.clone().setAlpha(0.2);
58
+ var operationBg = new FastColor(modalMaskBg).setA(0.1);
59
+ var operationBgHover = operationBg.clone().setA(0.2);
60
60
  return _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(previewCls, "-footer"), {
61
61
  position: 'fixed',
62
62
  bottom: marginXL,
@@ -123,8 +123,8 @@ export var genPreviewSwitchStyle = function genPreviewSwitchStyle(token) {
123
123
  previewCls = token.previewCls,
124
124
  zIndexPopup = token.zIndexPopup,
125
125
  motionDurationSlow = token.motionDurationSlow;
126
- var operationBg = new TinyColor(modalMaskBg).setAlpha(0.1);
127
- var operationBgHover = operationBg.clone().setAlpha(0.2);
126
+ var operationBg = new FastColor(modalMaskBg).setA(0.1);
127
+ var operationBgHover = operationBg.clone().setA(0.2);
128
128
  return _defineProperty(_defineProperty(_defineProperty({}, "".concat(previewCls, "-switch-left, ").concat(previewCls, "-switch-right"), _defineProperty({
129
129
  position: 'fixed',
130
130
  insetBlockStart: '50%',
@@ -241,9 +241,9 @@ var genPreviewMotion = function genPreviewMotion(token) {
241
241
  export var prepareComponentToken = function prepareComponentToken(token) {
242
242
  return {
243
243
  zIndexPopup: token.zIndexPopupBase + 80,
244
- previewOperationColor: new TinyColor(token.colorTextLightSolid).setAlpha(0.65).toRgbString(),
245
- previewOperationHoverColor: new TinyColor(token.colorTextLightSolid).setAlpha(0.85).toRgbString(),
246
- previewOperationColorDisabled: new TinyColor(token.colorTextLightSolid).setAlpha(0.25).toRgbString(),
244
+ previewOperationColor: new FastColor(token.colorTextLightSolid).setA(0.65).toRgbString(),
245
+ previewOperationHoverColor: new FastColor(token.colorTextLightSolid).setA(0.85).toRgbString(),
246
+ previewOperationColorDisabled: new FastColor(token.colorTextLightSolid).setA(0.25).toRgbString(),
247
247
  previewOperationSize: token.fontSizeIcon * 1.5 // FIXME: fontSizeIconLG
248
248
  };
249
249
  };
@@ -251,7 +251,7 @@ export default genStyleHooks('Image', function (token) {
251
251
  var previewCls = "".concat(token.componentCls, "-preview");
252
252
  var imageToken = mergeToken(token, {
253
253
  previewCls: previewCls,
254
- modalMaskBg: new TinyColor('#000').setAlpha(0.45).toRgbString(),
254
+ modalMaskBg: new FastColor('#000').setA(0.45).toRgbString(),
255
255
  // FIXME: Shared Token
256
256
  imagePreviewSwitchSize: token.controlHeightLG
257
257
  });
@@ -70,4 +70,6 @@ export { default as Typography } from './typography';
70
70
  export { default as Upload } from './upload';
71
71
  export { default as version } from './version';
72
72
  export { default as Watermark } from './watermark';
73
- export { default as Splitter } from './splitter';
73
+ export { default as Splitter } from './splitter';
74
+ // TODO: Remove in v6
75
+ export { unstableSetRender } from './config-provider/UnstableContext';
@@ -18,6 +18,7 @@ import { devUseWarning } from '../_util/warning';
18
18
  import { ConfigContext } from '../config-provider';
19
19
  import { FormItemInputContext } from '../form/context';
20
20
  import useStyle from './style';
21
+ /** @deprecated Please use `Space.Compact` */
21
22
  var Group = function Group(props) {
22
23
  var _useContext = useContext(ConfigContext),
23
24
  getPrefixCls = _useContext.getPrefixCls,
@@ -27,10 +28,11 @@ var Group = function Group(props) {
27
28
  var prefixCls = getPrefixCls('input-group', customizePrefixCls);
28
29
  var inputPrefixCls = getPrefixCls('input');
29
30
  var _useStyle = useStyle(inputPrefixCls),
30
- _useStyle2 = _slicedToArray(_useStyle, 2),
31
+ _useStyle2 = _slicedToArray(_useStyle, 3),
31
32
  wrapCSSVar = _useStyle2[0],
32
- hashId = _useStyle2[1];
33
- var cls = classNames(prefixCls, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-lg"), props.size === 'large'), "".concat(prefixCls, "-sm"), props.size === 'small'), "".concat(prefixCls, "-compact"), props.compact), "".concat(prefixCls, "-rtl"), direction === 'rtl'), hashId, className);
33
+ hashId = _useStyle2[1],
34
+ cssVarCls = _useStyle2[2];
35
+ var cls = classNames(prefixCls, cssVarCls, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-lg"), props.size === 'large'), "".concat(prefixCls, "-sm"), props.size === 'small'), "".concat(prefixCls, "-compact"), props.compact), "".concat(prefixCls, "-rtl"), direction === 'rtl'), hashId, className);
34
36
  var formItemContext = useContext(FormItemInputContext);
35
37
  var groupFormItemContext = useMemo(function () {
36
38
  return _objectSpread(_objectSpread({}, formItemContext), {}, {
@@ -23,7 +23,7 @@ import ContextIsolator from '../_util/ContextIsolator';
23
23
  import getAllowClear from '../_util/getAllowClear';
24
24
  import { getMergedStatus, getStatusClassNames } from '../_util/statusUtils';
25
25
  import { devUseWarning } from '../_util/warning';
26
- import { ConfigContext } from '../config-provider';
26
+ import { useComponentConfig } from '../config-provider/context';
27
27
  import DisabledContext from '../config-provider/DisabledContext';
28
28
  import useCSSVarCls from '../config-provider/hooks/useCSSVarCls';
29
29
  import useSize from '../config-provider/hooks/useSize';
@@ -31,11 +31,10 @@ import { FormItemInputContext } from '../form/context';
31
31
  import useVariant from '../form/hooks/useVariants';
32
32
  import { useCompactItemContext } from '../space/Compact';
33
33
  import useRemovePasswordTimeout from './hooks/useRemovePasswordTimeout';
34
- import useStyle from './style';
34
+ import useStyle, { useSharedStyle } from './style';
35
35
  import { hasPrefixSuffix } from './utils';
36
36
  export { triggerFocus };
37
37
  var Input = /*#__PURE__*/forwardRef(function (props, ref) {
38
- var _input$classNames;
39
38
  var customizePrefixCls = props.prefixCls,
40
39
  _props$bordered = props.bordered,
41
40
  bordered = _props$bordered === void 0 ? true : _props$bordered,
@@ -61,19 +60,27 @@ var Input = /*#__PURE__*/forwardRef(function (props, ref) {
61
60
  deprecated = _devUseWarning.deprecated;
62
61
  deprecated(!('bordered' in props), 'bordered', 'variant');
63
62
  }
64
- var _React$useContext = React.useContext(ConfigContext),
65
- getPrefixCls = _React$useContext.getPrefixCls,
66
- direction = _React$useContext.direction,
67
- input = _React$useContext.input;
63
+ var _useComponentConfig = useComponentConfig('input'),
64
+ getPrefixCls = _useComponentConfig.getPrefixCls,
65
+ direction = _useComponentConfig.direction,
66
+ contextAllowClear = _useComponentConfig.allowClear,
67
+ contextAutoComplete = _useComponentConfig.autoComplete,
68
+ contextClassName = _useComponentConfig.className,
69
+ contextStyle = _useComponentConfig.style,
70
+ contextClassNames = _useComponentConfig.classNames,
71
+ contextStyles = _useComponentConfig.styles;
68
72
  var prefixCls = getPrefixCls('input', customizePrefixCls);
69
73
  var inputRef = useRef(null);
70
74
  // Style
71
75
  var rootCls = useCSSVarCls(prefixCls);
76
+ var _useSharedStyle = useSharedStyle(prefixCls, rootClassName),
77
+ _useSharedStyle2 = _slicedToArray(_useSharedStyle, 3),
78
+ wrapSharedCSSVar = _useSharedStyle2[0],
79
+ hashId = _useSharedStyle2[1],
80
+ cssVarCls = _useSharedStyle2[2];
72
81
  var _useStyle = useStyle(prefixCls, rootCls),
73
- _useStyle2 = _slicedToArray(_useStyle, 3),
74
- wrapCSSVar = _useStyle2[0],
75
- hashId = _useStyle2[1],
76
- cssVarCls = _useStyle2[2];
82
+ _useStyle2 = _slicedToArray(_useStyle, 1),
83
+ wrapCSSVar = _useStyle2[0];
77
84
  // ===================== Compact Item =====================
78
85
  var _useCompactItemContex = useCompactItemContext(prefixCls, direction),
79
86
  compactSize = _useCompactItemContex.compactSize,
@@ -124,24 +131,24 @@ var Input = /*#__PURE__*/forwardRef(function (props, ref) {
124
131
  var suffixNode = (hasFeedback || suffix) && _jsxs(_Fragment, {
125
132
  children: [suffix, hasFeedback && feedbackIcon]
126
133
  });
127
- var mergedAllowClear = getAllowClear(allowClear !== null && allowClear !== void 0 ? allowClear : input === null || input === void 0 ? void 0 : input.allowClear);
134
+ var mergedAllowClear = getAllowClear(allowClear !== null && allowClear !== void 0 ? allowClear : contextAllowClear);
128
135
  var _useVariant = useVariant('input', customVariant, bordered),
129
136
  _useVariant2 = _slicedToArray(_useVariant, 2),
130
137
  variant = _useVariant2[0],
131
138
  enableVariantCls = _useVariant2[1];
132
- return wrapCSSVar(_jsx(RcInput, _objectSpread(_objectSpread({
139
+ return wrapSharedCSSVar(wrapCSSVar(_jsx(RcInput, _objectSpread(_objectSpread({
133
140
  ref: composeRef(ref, inputRef),
134
141
  prefixCls: prefixCls,
135
- autoComplete: input === null || input === void 0 ? void 0 : input.autoComplete
142
+ autoComplete: contextAutoComplete
136
143
  }, rest), {}, {
137
144
  disabled: mergedDisabled,
138
145
  onBlur: handleBlur,
139
146
  onFocus: handleFocus,
140
- style: _objectSpread(_objectSpread({}, input === null || input === void 0 ? void 0 : input.style), style),
141
- styles: _objectSpread(_objectSpread({}, input === null || input === void 0 ? void 0 : input.styles), styles),
147
+ style: _objectSpread(_objectSpread({}, contextStyle), style),
148
+ styles: _objectSpread(_objectSpread({}, contextStyles), styles),
142
149
  suffix: suffixNode,
143
150
  allowClear: mergedAllowClear,
144
- className: classNames(className, rootClassName, cssVarCls, rootCls, compactItemClassnames, input === null || input === void 0 ? void 0 : input.className),
151
+ className: classNames(className, rootClassName, cssVarCls, rootCls, compactItemClassnames, contextClassName),
145
152
  onChange: handleChange,
146
153
  addonBefore: addonBefore && _jsx(ContextIsolator, {
147
154
  form: true,
@@ -153,14 +160,14 @@ var Input = /*#__PURE__*/forwardRef(function (props, ref) {
153
160
  space: true,
154
161
  children: addonAfter
155
162
  }),
156
- classNames: _objectSpread(_objectSpread(_objectSpread({}, classes), input === null || input === void 0 ? void 0 : input.classNames), {}, {
157
- input: classNames(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-sm"), mergedSize === 'small'), "".concat(prefixCls, "-lg"), mergedSize === 'large'), "".concat(prefixCls, "-rtl"), direction === 'rtl'), classes === null || classes === void 0 ? void 0 : classes.input, input === null || input === void 0 || (_input$classNames = input.classNames) === null || _input$classNames === void 0 ? void 0 : _input$classNames.input, hashId),
163
+ classNames: _objectSpread(_objectSpread(_objectSpread({}, classes), contextClassNames), {}, {
164
+ input: classNames(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-sm"), mergedSize === 'small'), "".concat(prefixCls, "-lg"), mergedSize === 'large'), "".concat(prefixCls, "-rtl"), direction === 'rtl'), classes === null || classes === void 0 ? void 0 : classes.input, contextClassNames.input, hashId),
158
165
  variant: classNames(_defineProperty({}, "".concat(prefixCls, "-").concat(variant), enableVariantCls), getStatusClassNames(prefixCls, mergedStatus)),
159
166
  affixWrapper: classNames(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-affix-wrapper-sm"), mergedSize === 'small'), "".concat(prefixCls, "-affix-wrapper-lg"), mergedSize === 'large'), "".concat(prefixCls, "-affix-wrapper-rtl"), direction === 'rtl'), hashId),
160
167
  wrapper: classNames(_defineProperty({}, "".concat(prefixCls, "-group-rtl"), direction === 'rtl'), hashId),
161
168
  groupWrapper: classNames(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-group-wrapper-sm"), mergedSize === 'small'), "".concat(prefixCls, "-group-wrapper-lg"), mergedSize === 'large'), "".concat(prefixCls, "-group-wrapper-rtl"), direction === 'rtl'), "".concat(prefixCls, "-group-wrapper-").concat(variant), enableVariantCls), getStatusClassNames("".concat(prefixCls, "-group-wrapper"), mergedStatus, hasFeedback), hashId)
162
169
  })
163
- })));
170
+ }))));
164
171
  });
165
172
  if (process.env.NODE_ENV !== 'production') {
166
173
  Input.displayName = 'Input';
@@ -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 = ["value", "onChange", "onActiveChange", "index", "mask"];
2
+ var _excluded = ["className", "value", "onChange", "onActiveChange", "index", "mask"];
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; }
@@ -7,26 +7,33 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
7
7
  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); }
8
8
  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; }
9
9
  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; }
10
- import { jsx as _jsx } from "react/jsx-runtime";
10
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
11
  import * as React from 'react';
12
+ import classNames from 'classnames';
12
13
  import raf from 'rc-util/lib/raf';
14
+ import { ConfigContext } from '../../config-provider';
13
15
  import Input from '../Input';
14
16
  var OTPInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
15
- var value = props.value,
17
+ var className = props.className,
18
+ value = props.value,
16
19
  onChange = props.onChange,
17
20
  onActiveChange = props.onActiveChange,
18
21
  index = props.index,
19
22
  mask = props.mask,
20
23
  restProps = _objectWithoutProperties(props, _excluded);
21
- var internalValue = value && typeof mask === 'string' ? mask : value;
22
- var onInternalChange = function onInternalChange(e) {
23
- onChange(index, e.target.value);
24
- };
24
+ var _React$useContext = React.useContext(ConfigContext),
25
+ getPrefixCls = _React$useContext.getPrefixCls;
26
+ var prefixCls = getPrefixCls('otp');
27
+ var maskValue = typeof mask === 'string' ? mask : value;
25
28
  // ========================== Ref ===========================
26
29
  var inputRef = React.useRef(null);
27
30
  React.useImperativeHandle(ref, function () {
28
31
  return inputRef.current;
29
32
  });
33
+ // ========================= Input ==========================
34
+ var onInternalChange = function onInternalChange(e) {
35
+ onChange(index, e.target.value);
36
+ };
30
37
  // ========================= Focus ==========================
31
38
  var syncSelection = function syncSelection() {
32
39
  raf(function () {
@@ -58,17 +65,27 @@ var OTPInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
58
65
  syncSelection();
59
66
  };
60
67
  // ========================= Render =========================
61
- return _jsx(Input, _objectSpread(_objectSpread({
62
- type: mask === true ? 'password' : 'text'
63
- }, restProps), {}, {
64
- ref: inputRef,
65
- value: internalValue,
66
- onInput: onInternalChange,
67
- onFocus: syncSelection,
68
- onKeyDown: onInternalKeyDown,
69
- onKeyUp: onInternalKeyUp,
70
- onMouseDown: syncSelection,
71
- onMouseUp: syncSelection
72
- }));
68
+ return _jsxs("span", {
69
+ className: "".concat(prefixCls, "-input-wrapper"),
70
+ role: "presentation",
71
+ children: [mask && value !== '' && value !== undefined && _jsx("span", {
72
+ className: "".concat(prefixCls, "-mask-icon"),
73
+ "aria-hidden": "true",
74
+ children: maskValue
75
+ }), _jsx(Input, _objectSpread(_objectSpread({
76
+ "aria-label": "OTP Input ".concat(index + 1),
77
+ type: mask === true ? 'password' : 'text'
78
+ }, restProps), {}, {
79
+ ref: inputRef,
80
+ value: value,
81
+ onInput: onInternalChange,
82
+ onFocus: syncSelection,
83
+ onKeyDown: onInternalKeyDown,
84
+ onKeyUp: onInternalKeyUp,
85
+ onMouseDown: syncSelection,
86
+ onMouseUp: syncSelection,
87
+ className: classNames(className, _defineProperty({}, "".concat(prefixCls, "-mask-input"), mask))
88
+ }))]
89
+ });
73
90
  });
74
91
  export default OTPInput;
@@ -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", "length", "size", "defaultValue", "value", "onChange", "formatter", "variant", "disabled", "status", "autoFocus", "mask", "type", "onInput", "inputMode"];
2
+ var _excluded = ["prefixCls", "length", "size", "defaultValue", "value", "onChange", "formatter", "separator", "variant", "disabled", "status", "autoFocus", "mask", "type", "onInput", "inputMode"];
3
3
  function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
4
4
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
5
5
  function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
@@ -17,7 +17,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
17
17
  function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
18
18
  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; }
19
19
  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; }
20
- import { jsx as _jsx } from "react/jsx-runtime";
20
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
21
21
  import * as React from 'react';
22
22
  import classNames from 'classnames';
23
23
  import useEvent from 'rc-util/lib/hooks/useEvent';
@@ -25,7 +25,6 @@ import pickAttrs from 'rc-util/lib/pickAttrs';
25
25
  import { getMergedStatus } from '../../_util/statusUtils';
26
26
  import { devUseWarning } from '../../_util/warning';
27
27
  import { ConfigContext } from '../../config-provider';
28
- import useCSSVarCls from '../../config-provider/hooks/useCSSVarCls';
29
28
  import useSize from '../../config-provider/hooks/useSize';
30
29
  import { FormItemInputContext } from '../../form/context';
31
30
  import useStyle from '../style/otp';
@@ -33,6 +32,19 @@ import OTPInput from './OTPInput';
33
32
  function strToArr(str) {
34
33
  return (str || '').split('');
35
34
  }
35
+ var Separator = function Separator(props) {
36
+ var index = props.index,
37
+ prefixCls = props.prefixCls,
38
+ separator = props.separator;
39
+ var separatorNode = typeof separator === 'function' ? separator(index) : separator;
40
+ if (!separatorNode) {
41
+ return null;
42
+ }
43
+ return _jsx("span", {
44
+ className: "".concat(prefixCls, "-separator"),
45
+ children: separatorNode
46
+ });
47
+ };
36
48
  var OTP = /*#__PURE__*/React.forwardRef(function (props, ref) {
37
49
  var customizePrefixCls = props.prefixCls,
38
50
  _props$length = props.length,
@@ -42,6 +54,7 @@ var OTP = /*#__PURE__*/React.forwardRef(function (props, ref) {
42
54
  value = props.value,
43
55
  onChange = props.onChange,
44
56
  formatter = props.formatter,
57
+ separator = props.separator,
45
58
  variant = props.variant,
46
59
  disabled = props.disabled,
47
60
  customStatus = props.status,
@@ -66,8 +79,7 @@ var OTP = /*#__PURE__*/React.forwardRef(function (props, ref) {
66
79
  });
67
80
  // ========================= Root =========================
68
81
  // Style
69
- var rootCls = useCSSVarCls(prefixCls);
70
- var _useStyle = useStyle(prefixCls, rootCls),
82
+ var _useStyle = useStyle(prefixCls),
71
83
  _useStyle2 = _slicedToArray(_useStyle, 3),
72
84
  wrapCSSVar = _useStyle2[0],
73
85
  hashId = _useStyle2[1],
@@ -109,7 +121,9 @@ var OTP = /*#__PURE__*/React.forwardRef(function (props, ref) {
109
121
  return formatter ? formatter(txt) : txt;
110
122
  };
111
123
  // ======================== Values ========================
112
- var _React$useState = React.useState(strToArr(internalFormatter(defaultValue || ''))),
124
+ var _React$useState = React.useState(function () {
125
+ return strToArr(internalFormatter(defaultValue || ''));
126
+ }),
113
127
  _React$useState2 = _slicedToArray(_React$useState, 2),
114
128
  valueCells = _React$useState2[0],
115
129
  setValueCells = _React$useState2[1];
@@ -191,6 +205,7 @@ var OTP = /*#__PURE__*/React.forwardRef(function (props, ref) {
191
205
  return wrapCSSVar(_jsx("div", _objectSpread(_objectSpread({}, domAttrs), {}, {
192
206
  ref: containerRef,
193
207
  className: classNames(prefixCls, _defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-sm"), mergedSize === 'small'), "".concat(prefixCls, "-lg"), mergedSize === 'large'), "".concat(prefixCls, "-rtl"), direction === 'rtl'), cssVarCls, hashId),
208
+ role: "group",
194
209
  children: _jsx(FormItemInputContext.Provider, {
195
210
  value: proxyFormContext,
196
211
  children: Array.from({
@@ -198,19 +213,25 @@ var OTP = /*#__PURE__*/React.forwardRef(function (props, ref) {
198
213
  }).map(function (_, index) {
199
214
  var key = "otp-".concat(index);
200
215
  var singleValue = valueCells[index] || '';
201
- return _jsx(OTPInput, _objectSpread({
202
- ref: function ref(inputEle) {
203
- refs.current[index] = inputEle;
204
- },
205
- index: index,
206
- size: mergedSize,
207
- htmlSize: 1,
208
- className: "".concat(prefixCls, "-input"),
209
- onChange: onInputChange,
210
- value: singleValue,
211
- onActiveChange: onInputActiveChange,
212
- autoFocus: index === 0 && autoFocus
213
- }, inputSharedProps), key);
216
+ return _jsxs(React.Fragment, {
217
+ children: [_jsx(OTPInput, _objectSpread({
218
+ ref: function ref(inputEle) {
219
+ refs.current[index] = inputEle;
220
+ },
221
+ index: index,
222
+ size: mergedSize,
223
+ htmlSize: 1,
224
+ className: "".concat(prefixCls, "-input"),
225
+ onChange: onInputChange,
226
+ value: singleValue,
227
+ onActiveChange: onInputActiveChange,
228
+ autoFocus: index === 0 && autoFocus
229
+ }, inputSharedProps)), index < length - 1 && _jsx(Separator, {
230
+ separator: separator,
231
+ index: index,
232
+ prefixCls: prefixCls
233
+ })]
234
+ }, key);
214
235
  })
215
236
  })
216
237
  })));
@@ -22,9 +22,9 @@ import classNames from 'classnames';
22
22
  import omit from 'rc-util/lib/omit';
23
23
  import { composeRef } from 'rc-util/lib/ref';
24
24
  import { ConfigContext } from '../config-provider';
25
+ import DisabledContext from '../config-provider/DisabledContext';
25
26
  import useRemovePasswordTimeout from './hooks/useRemovePasswordTimeout';
26
27
  import Input from './Input';
27
- import DisabledContext from '../config-provider/DisabledContext';
28
28
  var defaultIconRender = function defaultIconRender(visible) {
29
29
  return visible ? _jsx(EyeOutlined, {}) : _jsx(EyeInvisibleOutlined, {});
30
30
  };
@@ -65,14 +65,12 @@ var Password = /*#__PURE__*/React.forwardRef(function (props, ref) {
65
65
  if (visible) {
66
66
  removePasswordTimeout();
67
67
  }
68
- setVisible(function (prevState) {
69
- var newState = !prevState;
70
- if (_typeof(visibilityToggle) === 'object') {
71
- var _visibilityToggle$onV;
72
- (_visibilityToggle$onV = visibilityToggle.onVisibleChange) === null || _visibilityToggle$onV === void 0 || _visibilityToggle$onV.call(visibilityToggle, newState);
73
- }
74
- return newState;
75
- });
68
+ var nextVisible = !visible;
69
+ setVisible(nextVisible);
70
+ if (_typeof(visibilityToggle) === 'object') {
71
+ var _visibilityToggle$onV;
72
+ (_visibilityToggle$onV = visibilityToggle.onVisibleChange) === null || _visibilityToggle$onV === void 0 || _visibilityToggle$onV.call(visibilityToggle, nextVisible);
73
+ }
76
74
  };
77
75
  var getIcon = function getIcon(prefixCls) {
78
76
  var iconTrigger = actionMap[action] || '';
@@ -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", "inputPrefixCls", "className", "size", "suffix", "enterButton", "addonAfter", "loading", "disabled", "onSearch", "onChange", "onCompositionStart", "onCompositionEnd"];
2
+ var _excluded = ["prefixCls", "inputPrefixCls", "className", "size", "suffix", "enterButton", "addonAfter", "loading", "disabled", "onSearch", "onChange", "onCompositionStart", "onCompositionEnd", "variant", "onPressEnter"];
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; }
@@ -33,6 +33,8 @@ var Search = /*#__PURE__*/React.forwardRef(function (props, ref) {
33
33
  customOnChange = props.onChange,
34
34
  onCompositionStart = props.onCompositionStart,
35
35
  onCompositionEnd = props.onCompositionEnd,
36
+ variant = props.variant,
37
+ customOnPressEnter = props.onPressEnter,
36
38
  restProps = _objectWithoutProperties(props, _excluded);
37
39
  var _React$useContext = React.useContext(ConfigContext),
38
40
  getPrefixCls = _React$useContext.getPrefixCls,
@@ -73,6 +75,7 @@ var Search = /*#__PURE__*/React.forwardRef(function (props, ref) {
73
75
  if (composedRef.current || loading) {
74
76
  return;
75
77
  }
78
+ customOnPressEnter === null || customOnPressEnter === void 0 || customOnPressEnter(e);
76
79
  onSearch(e);
77
80
  };
78
81
  var searchIcon = typeof enterButton === 'boolean' ? _jsx(SearchOutlined, {}) : null;
@@ -96,13 +99,14 @@ var Search = /*#__PURE__*/React.forwardRef(function (props, ref) {
96
99
  } else {
97
100
  button = _jsx(Button, {
98
101
  className: btnClassName,
99
- type: enterButton ? 'primary' : undefined,
102
+ color: enterButton ? 'primary' : 'default',
100
103
  size: size,
101
104
  disabled: disabled,
102
105
  onMouseDown: onMouseDown,
103
106
  onClick: onSearch,
104
107
  loading: loading,
105
108
  icon: searchIcon,
109
+ variant: variant === 'borderless' || variant === 'filled' || variant === 'underlined' ? 'text' : enterButton ? 'solid' : undefined,
106
110
  children: enterButton
107
111
  }, "enterButton");
108
112
  }
@@ -120,20 +124,23 @@ var Search = /*#__PURE__*/React.forwardRef(function (props, ref) {
120
124
  composedRef.current = false;
121
125
  onCompositionEnd === null || onCompositionEnd === void 0 || onCompositionEnd(e);
122
126
  };
123
- return _jsx(Input, _objectSpread(_objectSpread({
124
- ref: composeRef(inputRef, ref),
125
- onPressEnter: onPressEnter
126
- }, restProps), {}, {
127
+ var inputProps = _objectSpread(_objectSpread({}, restProps), {}, {
128
+ className: cls,
129
+ prefixCls: inputPrefixCls,
130
+ type: 'search',
127
131
  size: size,
132
+ variant: variant,
133
+ onPressEnter: onPressEnter,
128
134
  onCompositionStart: handleOnCompositionStart,
129
135
  onCompositionEnd: handleOnCompositionEnd,
130
- prefixCls: inputPrefixCls,
131
136
  addonAfter: button,
132
137
  suffix: suffix,
133
138
  onChange: onChange,
134
- className: cls,
135
139
  disabled: disabled
136
- }));
140
+ });
141
+ return _jsx(Input, _objectSpread({
142
+ ref: composeRef(inputRef, ref)
143
+ }, inputProps));
137
144
  });
138
145
  if (process.env.NODE_ENV !== 'production') {
139
146
  Search.displayName = 'Search';