@chaoswise/ui 3.0.23 → 3.1.1

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 (407) hide show
  1. package/lib/Antd5/_util/ActionButton.js +4 -2
  2. package/lib/Antd5/_util/ContextIsolator.js +27 -0
  3. package/lib/Antd5/_util/easings.js +2 -2
  4. package/lib/Antd5/_util/getScroll.js +9 -8
  5. package/lib/Antd5/_util/hooks/useClosable.js +3 -2
  6. package/lib/Antd5/_util/hooks/useUniqueMemo.js +123 -0
  7. package/lib/Antd5/_util/hooks/useZIndex.js +31 -15
  8. package/lib/Antd5/_util/motion.js +3 -2
  9. package/lib/Antd5/_util/placements.js +2 -2
  10. package/lib/Antd5/_util/scrollTo.js +1 -1
  11. package/lib/Antd5/_util/statusUtils.js +1 -1
  12. package/lib/Antd5/_util/toList.js +5 -0
  13. package/lib/Antd5/_util/warning.js +0 -1
  14. package/lib/Antd5/_util/wave/WaveEffect.js +2 -2
  15. package/lib/Antd5/_util/wave/interface.js +2 -1
  16. package/lib/Antd5/_util/wave/useWave.js +1 -1
  17. package/lib/Antd5/_util/wave/util.js +1 -9
  18. package/lib/Antd5/alert/Alert.js +1 -2
  19. package/lib/Antd5/alert/ErrorBoundary.js +1 -1
  20. package/lib/Antd5/alert/design/behavior-pattern.js +3 -3
  21. package/lib/Antd5/alert/style/index.js +6 -4
  22. package/lib/Antd5/anchor/Anchor.js +8 -7
  23. package/lib/Antd5/anchor/AnchorLink.js +4 -4
  24. package/lib/Antd5/app/index.js +2 -1
  25. package/lib/Antd5/app/style/index.js +4 -2
  26. package/lib/Antd5/auto-complete/index.js +1 -1
  27. package/lib/Antd5/avatar/group.js +35 -17
  28. package/lib/Antd5/avatar/style/index.js +18 -13
  29. package/lib/Antd5/back-top/index.js +3 -2
  30. package/lib/Antd5/badge/ScrollNumber.js +1 -1
  31. package/lib/Antd5/badge/SingleNumber.js +17 -16
  32. package/lib/Antd5/badge/style/index.js +6 -7
  33. package/lib/Antd5/badge/style/ribbon.js +3 -3
  34. package/lib/Antd5/breadcrumb/design/behavior-pattern.js +4 -4
  35. package/lib/Antd5/breadcrumb/style/index.js +1 -1
  36. package/lib/Antd5/button/LoadingIcon.js +5 -10
  37. package/lib/Antd5/button/button-group.js +0 -1
  38. package/lib/Antd5/button/button.js +70 -41
  39. package/lib/Antd5/button/buttonHelpers.js +7 -5
  40. package/lib/Antd5/button/style/{compactCmp.js → compact.js} +20 -27
  41. package/lib/Antd5/button/style/group.js +9 -7
  42. package/lib/Antd5/button/style/index.js +150 -110
  43. package/lib/Antd5/button/style/token.js +8 -1
  44. package/lib/Antd5/calendar/generateCalendar.js +25 -28
  45. package/lib/Antd5/calendar/style/index.js +4 -4
  46. package/lib/Antd5/card/Card.js +3 -3
  47. package/lib/Antd5/card/style/index.js +6 -9
  48. package/lib/Antd5/carousel/index.js +3 -3
  49. package/lib/Antd5/carousel/style/index.js +1 -1
  50. package/lib/Antd5/cascader/Panel.js +7 -2
  51. package/lib/Antd5/cascader/hooks/useBase.js +3 -2
  52. package/lib/Antd5/cascader/hooks/useColumnIcons.js +6 -3
  53. package/lib/Antd5/cascader/index.js +1 -1
  54. package/lib/Antd5/cascader/style/columns.js +6 -4
  55. package/lib/Antd5/checkbox/Checkbox.js +44 -10
  56. package/lib/Antd5/checkbox/Group.js +7 -2
  57. package/lib/Antd5/checkbox/assets/duigou1.js +29 -0
  58. package/lib/Antd5/checkbox/assets/duigou2.js +29 -0
  59. package/lib/Antd5/checkbox/style/index.js +112 -6
  60. package/lib/Antd5/collapse/Collapse.js +2 -1
  61. package/lib/Antd5/collapse/style/index.js +20 -13
  62. package/lib/Antd5/color-picker/ColorPicker.js +120 -78
  63. package/lib/Antd5/color-picker/ColorPickerPanel.js +44 -26
  64. package/lib/Antd5/color-picker/color.js +82 -10
  65. package/lib/Antd5/color-picker/components/ColorAlphaInput.js +2 -2
  66. package/lib/Antd5/color-picker/components/ColorClear.js +2 -2
  67. package/lib/Antd5/color-picker/components/ColorHexInput.js +5 -4
  68. package/lib/Antd5/color-picker/components/ColorInput.js +4 -3
  69. package/lib/Antd5/color-picker/components/ColorPresets.js +1 -1
  70. package/lib/Antd5/color-picker/components/ColorSlider.js +139 -0
  71. package/lib/Antd5/color-picker/components/ColorTrigger.js +52 -26
  72. package/lib/Antd5/color-picker/components/PanelPicker/GradientColorBar.js +130 -0
  73. package/lib/Antd5/color-picker/components/PanelPicker/index.js +194 -0
  74. package/lib/Antd5/color-picker/context.js +1 -5
  75. package/lib/Antd5/color-picker/hooks/useModeColor.js +87 -0
  76. package/lib/Antd5/color-picker/style/color-block.js +3 -2
  77. package/lib/Antd5/color-picker/style/index.js +33 -15
  78. package/lib/Antd5/color-picker/style/input.js +1 -1
  79. package/lib/Antd5/color-picker/style/picker.js +6 -33
  80. package/lib/Antd5/color-picker/style/slider.js +87 -0
  81. package/lib/Antd5/color-picker/util.js +53 -7
  82. package/lib/Antd5/config-provider/context.js +3 -1
  83. package/lib/Antd5/config-provider/cssVariables.js +0 -1
  84. package/lib/Antd5/config-provider/defaultRenderEmpty.js +8 -1
  85. package/lib/Antd5/config-provider/index.js +13 -5
  86. package/lib/Antd5/config-provider/style/index.js +0 -1
  87. package/lib/Antd5/date-picker/PickerButton.js +3 -2
  88. package/lib/Antd5/date-picker/design/behavior-pattern.js +15 -15
  89. package/lib/Antd5/date-picker/generatePicker/constant.js +15 -0
  90. package/lib/Antd5/date-picker/generatePicker/generateRangePicker.js +16 -11
  91. package/lib/Antd5/date-picker/generatePicker/generateSinglePicker.js +19 -15
  92. package/lib/Antd5/date-picker/generatePicker/index.js +2 -2
  93. package/lib/Antd5/date-picker/generatePicker/interface.js +1 -1
  94. package/lib/Antd5/date-picker/index.js +2 -17
  95. package/lib/Antd5/date-picker/locale/ar_EG.js +9 -1
  96. package/lib/Antd5/date-picker/locale/az_AZ.js +9 -1
  97. package/lib/Antd5/date-picker/locale/el_GR.js +9 -1
  98. package/lib/Antd5/date-picker/locale/ja_JP.js +11 -1
  99. package/lib/Antd5/date-picker/locale/kn_IN.js +9 -1
  100. package/lib/Antd5/date-picker/locale/pl_PL.js +9 -1
  101. package/lib/Antd5/date-picker/locale/uk_UA.js +10 -1
  102. package/lib/Antd5/date-picker/style/index.js +13 -10
  103. package/lib/Antd5/date-picker/style/panel.js +36 -32
  104. package/lib/Antd5/date-picker/style/token.js +1 -1
  105. package/lib/Antd5/date-picker/util.js +0 -48
  106. package/lib/Antd5/descriptions/hooks/useItems.js +5 -0
  107. package/lib/Antd5/descriptions/hooks/useRow.js +42 -34
  108. package/lib/Antd5/descriptions/style/index.js +20 -8
  109. package/lib/Antd5/divider/index.js +4 -3
  110. package/lib/Antd5/divider/style/index.js +19 -4
  111. package/lib/Antd5/drawer/DrawerPanel.js +11 -20
  112. package/lib/Antd5/drawer/index.js +39 -42
  113. package/lib/Antd5/drawer/style/index.js +10 -11
  114. package/lib/Antd5/dropdown/dropdown.js +5 -7
  115. package/lib/Antd5/dropdown/style/index.js +27 -11
  116. package/lib/Antd5/empty/empty.js +9 -3
  117. package/lib/Antd5/empty/simple.js +9 -3
  118. package/lib/Antd5/empty/style/index.js +1 -1
  119. package/lib/Antd5/float-button/BackTop.js +3 -2
  120. package/lib/Antd5/float-button/FloatButton.js +16 -5
  121. package/lib/Antd5/float-button/FloatButtonGroup.js +76 -52
  122. package/lib/Antd5/float-button/style/index.js +117 -76
  123. package/lib/Antd5/float-button/style/keyframes.js +118 -0
  124. package/lib/Antd5/form/ErrorList.js +14 -2
  125. package/lib/Antd5/form/Form.js +11 -3
  126. package/lib/Antd5/form/FormItem/ItemHolder.js +8 -4
  127. package/lib/Antd5/form/FormItem/index.js +6 -4
  128. package/lib/Antd5/form/FormItemInput.js +68 -28
  129. package/lib/Antd5/form/FormItemLabel.js +3 -3
  130. package/lib/Antd5/form/hooks/useForm.js +8 -1
  131. package/lib/Antd5/form/hooks/useVariants.js +10 -4
  132. package/lib/Antd5/form/style/explain.js +9 -8
  133. package/lib/Antd5/form/style/index.js +30 -18
  134. package/lib/Antd5/grid/row.js +2 -2
  135. package/lib/Antd5/image/index.js +3 -1
  136. package/lib/Antd5/image/style/index.js +17 -20
  137. package/lib/Antd5/index.js +2 -1
  138. package/lib/Antd5/input/Input.js +18 -38
  139. package/lib/Antd5/input/OTP/OTPInput.js +10 -5
  140. package/lib/Antd5/input/OTP/index.js +12 -4
  141. package/lib/Antd5/input/Password.js +6 -2
  142. package/lib/Antd5/input/Search.js +2 -4
  143. package/lib/Antd5/input/TextArea.js +1 -1
  144. package/lib/Antd5/input/style/index.js +72 -63
  145. package/lib/Antd5/input/style/otp.js +1 -1
  146. package/lib/Antd5/input/style/variants.js +38 -23
  147. package/lib/Antd5/input/utils.js +0 -1
  148. package/lib/Antd5/input-number/index.js +19 -22
  149. package/lib/Antd5/input-number/style/index.js +26 -16
  150. package/lib/Antd5/layout/Sider.js +15 -8
  151. package/lib/Antd5/layout/style/index.js +6 -96
  152. package/lib/Antd5/layout/style/sider.js +115 -0
  153. package/lib/Antd5/list/Item.js +18 -5
  154. package/lib/Antd5/list/index.js +15 -10
  155. package/lib/Antd5/list/style/index.js +40 -41
  156. package/lib/Antd5/locale/ar_EG.js +14 -1
  157. package/lib/Antd5/locale/az_AZ.js +78 -28
  158. package/lib/Antd5/locale/bn_BD.js +0 -1
  159. package/lib/Antd5/locale/by_BY.js +0 -1
  160. package/lib/Antd5/locale/ca_ES.js +0 -1
  161. package/lib/Antd5/locale/cs_CZ.js +0 -1
  162. package/lib/Antd5/locale/de_DE.js +0 -1
  163. package/lib/Antd5/locale/el_GR.js +104 -3
  164. package/lib/Antd5/locale/en_GB.js +0 -1
  165. package/lib/Antd5/locale/en_US.js +4 -2
  166. package/lib/Antd5/locale/es_ES.js +10 -6
  167. package/lib/Antd5/locale/et_EE.js +0 -1
  168. package/lib/Antd5/locale/eu_ES.js +4 -2
  169. package/lib/Antd5/locale/fa_IR.js +0 -1
  170. package/lib/Antd5/locale/fr_BE.js +5 -1
  171. package/lib/Antd5/locale/fr_CA.js +0 -1
  172. package/lib/Antd5/locale/fr_FR.js +5 -6
  173. package/lib/Antd5/locale/ga_IE.js +0 -1
  174. package/lib/Antd5/locale/gl_ES.js +0 -1
  175. package/lib/Antd5/locale/he_IL.js +0 -1
  176. package/lib/Antd5/locale/hi_IN.js +0 -1
  177. package/lib/Antd5/locale/hr_HR.js +0 -1
  178. package/lib/Antd5/locale/id_ID.js +4 -2
  179. package/lib/Antd5/locale/index.js +1 -1
  180. package/lib/Antd5/locale/it_IT.js +0 -1
  181. package/lib/Antd5/locale/ja_JP.js +4 -2
  182. package/lib/Antd5/locale/ka_GE.js +0 -1
  183. package/lib/Antd5/locale/kk_KZ.js +0 -1
  184. package/lib/Antd5/locale/km_KH.js +0 -1
  185. package/lib/Antd5/locale/kn_IN.js +82 -4
  186. package/lib/Antd5/locale/ko_KR.js +4 -2
  187. package/lib/Antd5/locale/lt_LT.js +4 -2
  188. package/lib/Antd5/locale/ml_IN.js +0 -1
  189. package/lib/Antd5/locale/mn_MN.js +86 -2
  190. package/lib/Antd5/locale/ms_MY.js +101 -18
  191. package/lib/Antd5/locale/my_MM.js +0 -1
  192. package/lib/Antd5/locale/nb_NO.js +0 -1
  193. package/lib/Antd5/locale/ne_NP.js +104 -2
  194. package/lib/Antd5/locale/nl_BE.js +5 -1
  195. package/lib/Antd5/locale/nl_NL.js +5 -1
  196. package/lib/Antd5/locale/pl_PL.js +0 -1
  197. package/lib/Antd5/locale/pt_BR.js +0 -1
  198. package/lib/Antd5/locale/pt_PT.js +55 -38
  199. package/lib/Antd5/locale/ro_RO.js +0 -1
  200. package/lib/Antd5/locale/ru_RU.js +9 -2
  201. package/lib/Antd5/locale/si_LK.js +0 -1
  202. package/lib/Antd5/locale/sk_SK.js +0 -1
  203. package/lib/Antd5/locale/sr_RS.js +0 -1
  204. package/lib/Antd5/locale/sv_SE.js +0 -1
  205. package/lib/Antd5/locale/th_TH.js +11 -3
  206. package/lib/Antd5/locale/tk_TK.js +0 -1
  207. package/lib/Antd5/locale/tr_TR.js +2 -1
  208. package/lib/Antd5/locale/uk_UA.js +1 -1
  209. package/lib/Antd5/locale/ur_PK.js +0 -1
  210. package/lib/Antd5/locale/uz_UZ.js +6 -7
  211. package/lib/Antd5/locale/zh_CN.js +4 -2
  212. package/lib/Antd5/locale/zh_HK.js +0 -1
  213. package/lib/Antd5/locale/zh_TW.js +0 -1
  214. package/lib/Antd5/mentions/index.js +4 -4
  215. package/lib/Antd5/menu/MenuItem.js +6 -5
  216. package/lib/Antd5/menu/OverrideContext.js +4 -3
  217. package/lib/Antd5/menu/SubMenu.js +2 -2
  218. package/lib/Antd5/menu/menu.js +2 -2
  219. package/lib/Antd5/menu/style/index.js +58 -40
  220. package/lib/Antd5/menu/style/theme.js +24 -20
  221. package/lib/Antd5/menu/style/vertical.js +10 -7
  222. package/lib/Antd5/modal/Modal.js +50 -38
  223. package/lib/Antd5/modal/PurePanel.js +0 -1
  224. package/lib/Antd5/modal/confirm.js +4 -5
  225. package/lib/Antd5/modal/style/confirm.js +1 -2
  226. package/lib/Antd5/modal/style/index.js +13 -3
  227. package/lib/Antd5/modal/useModal/HookModal.js +4 -3
  228. package/lib/Antd5/modal/useModal/index.js +0 -1
  229. package/lib/Antd5/notification/index.js +6 -3
  230. package/lib/Antd5/notification/style/index.js +35 -3
  231. package/lib/Antd5/notification/useNotification.js +6 -1
  232. package/lib/Antd5/pagination/Pagination.js +10 -5
  233. package/lib/Antd5/pagination/design/behavior-pattern.js +3 -3
  234. package/lib/Antd5/pagination/style/bordered.js +1 -1
  235. package/lib/Antd5/pagination/style/index.js +27 -18
  236. package/lib/Antd5/popconfirm/PurePanel.js +7 -7
  237. package/lib/Antd5/popover/PurePanel.js +16 -6
  238. package/lib/Antd5/popover/index.js +7 -19
  239. package/lib/Antd5/popover/style/index.js +3 -1
  240. package/lib/Antd5/progress/Line.js +27 -19
  241. package/lib/Antd5/progress/design/behavior-pattern.js +3 -3
  242. package/lib/Antd5/progress/progress.js +37 -11
  243. package/lib/Antd5/progress/style/index.js +46 -11
  244. package/lib/Antd5/progress/utils.js +20 -18
  245. package/lib/Antd5/qr-code/QrcodeStatus.js +42 -0
  246. package/lib/Antd5/qr-code/index.js +31 -31
  247. package/lib/Antd5/radio/radio.js +4 -10
  248. package/lib/Antd5/radio/style/index.js +65 -80
  249. package/lib/Antd5/rate/index.js +8 -2
  250. package/lib/Antd5/result/noFound.js +3 -1
  251. package/lib/Antd5/result/serverError.js +3 -1
  252. package/lib/Antd5/result/unauthorized.js +5 -3
  253. package/lib/Antd5/segmented/index.js +5 -3
  254. package/lib/Antd5/segmented/style/index.js +11 -3
  255. package/lib/Antd5/select/index.js +4 -2
  256. package/lib/Antd5/select/style/dropdown.js +1 -1
  257. package/lib/Antd5/select/style/index.js +21 -8
  258. package/lib/Antd5/select/style/multiple.js +18 -9
  259. package/lib/Antd5/select/style/single.js +8 -10
  260. package/lib/Antd5/select/style/token.js +9 -2
  261. package/lib/Antd5/select/style/variants.js +20 -11
  262. package/lib/Antd5/skeleton/Image.js +6 -4
  263. package/lib/Antd5/skeleton/Node.js +1 -3
  264. package/lib/Antd5/skeleton/Paragraph.js +1 -1
  265. package/lib/Antd5/skeleton/Title.js +9 -6
  266. package/lib/Antd5/skeleton/style/index.js +13 -13
  267. package/lib/Antd5/slider/Context.js +4 -0
  268. package/lib/Antd5/slider/SliderTooltip.js +9 -5
  269. package/lib/Antd5/slider/index.js +32 -31
  270. package/lib/Antd5/slider/style/index.js +60 -44
  271. package/lib/Antd5/space/Compact.js +1 -1
  272. package/lib/Antd5/space/index.js +3 -3
  273. package/lib/Antd5/spin/Indicator/Looper.js +29 -0
  274. package/lib/Antd5/spin/Indicator/Progress.js +78 -0
  275. package/lib/Antd5/spin/Indicator/index.js +21 -0
  276. package/lib/Antd5/spin/index.js +27 -45
  277. package/lib/Antd5/spin/style/index.js +54 -17
  278. package/lib/Antd5/spin/usePercent.js +40 -0
  279. package/lib/Antd5/splitter/Panel.js +36 -0
  280. package/lib/Antd5/splitter/SplitBar.js +124 -0
  281. package/lib/Antd5/splitter/Splitter.js +194 -0
  282. package/lib/Antd5/{_util/transButton.js → splitter/hooks/useItems.js} +28 -54
  283. package/lib/Antd5/splitter/hooks/useResizable.js +43 -0
  284. package/lib/Antd5/splitter/hooks/useResize.js +138 -0
  285. package/lib/Antd5/splitter/hooks/useSizes.js +109 -0
  286. package/lib/Antd5/splitter/index.js +5 -0
  287. package/lib/Antd5/splitter/interface.js +1 -0
  288. package/lib/Antd5/splitter/style/index.js +219 -0
  289. package/lib/Antd5/statistic/style/index.js +1 -1
  290. package/lib/Antd5/steps/style/custom-icon.js +1 -1
  291. package/lib/Antd5/steps/style/index.js +11 -8
  292. package/lib/Antd5/steps/style/inline.js +5 -4
  293. package/lib/Antd5/steps/style/progress-dot.js +2 -2
  294. package/lib/Antd5/steps/style/small.js +3 -3
  295. package/lib/Antd5/steps/style/vertical.js +2 -2
  296. package/lib/Antd5/style/index.js +37 -13
  297. package/lib/Antd5/style/motion/slide.js +6 -5
  298. package/lib/Antd5/style/placementArrow.js +15 -6
  299. package/lib/Antd5/switch/style/index.js +1 -1
  300. package/lib/Antd5/table/Column.js +2 -3
  301. package/lib/Antd5/table/ColumnGroup.js +2 -3
  302. package/lib/Antd5/table/ExpandIcon.js +6 -6
  303. package/lib/Antd5/table/InternalTable.js +6 -6
  304. package/lib/Antd5/table/RcTable/VirtualTable.js +3 -2
  305. package/lib/Antd5/table/RcTable/index.js +3 -2
  306. package/lib/Antd5/table/hooks/useFilter/FilterDropdown.js +82 -61
  307. package/lib/Antd5/table/hooks/useFilter/FilterSearch.js +7 -7
  308. package/lib/Antd5/table/hooks/useFilter/index.js +28 -26
  309. package/lib/Antd5/table/hooks/useLazyKVMap.js +5 -5
  310. package/lib/Antd5/table/hooks/useSelection.js +21 -11
  311. package/lib/Antd5/table/hooks/useSorter.js +66 -42
  312. package/lib/Antd5/table/hooks/useTitleColumns.js +9 -7
  313. package/lib/Antd5/table/interface.js +1 -1
  314. package/lib/Antd5/table/style/bordered.js +5 -3
  315. package/lib/Antd5/table/style/expand.js +44 -38
  316. package/lib/Antd5/table/style/filter.js +1 -1
  317. package/lib/Antd5/table/style/index.js +26 -21
  318. package/lib/Antd5/table/style/selection.js +3 -1
  319. package/lib/Antd5/table/style/sorter.js +3 -1
  320. package/lib/Antd5/table/style/virtual.js +2 -2
  321. package/lib/Antd5/table/util.js +9 -8
  322. package/lib/Antd5/tabs/style/index.js +2 -2
  323. package/lib/Antd5/tag/style/index.js +2 -2
  324. package/lib/Antd5/theme/index.js +12 -5
  325. package/lib/Antd5/theme/interface/cssinjs-utils.js +1 -0
  326. package/lib/Antd5/theme/internal.js +10 -5
  327. package/lib/Antd5/theme/themes/dark/colors.js +3 -0
  328. package/lib/Antd5/theme/themes/dark/index.js +1 -0
  329. package/lib/Antd5/theme/themes/default/colors.js +3 -0
  330. package/lib/Antd5/theme/themes/default/index.js +6 -2
  331. package/lib/Antd5/theme/themes/seed.js +5 -2
  332. package/lib/Antd5/theme/themes/shared/genColorMapToken.js +2 -0
  333. package/lib/Antd5/theme/themes/shared/genFontSizes.js +1 -1
  334. package/lib/Antd5/theme/useToken.js +2 -1
  335. package/lib/Antd5/theme/util/alias.js +1 -1
  336. package/lib/Antd5/theme/util/genStyleUtils.js +61 -0
  337. package/lib/Antd5/time-picker/index.js +15 -2
  338. package/lib/Antd5/time-picker/locale/az_AZ.js +2 -1
  339. package/lib/Antd5/time-picker/locale/it_IT.js +2 -1
  340. package/lib/Antd5/time-picker/locale/uk_UA.js +2 -1
  341. package/lib/Antd5/timeline/TimelineItemList.js +0 -1
  342. package/lib/Antd5/timeline/style/index.js +1 -1
  343. package/lib/Antd5/tooltip/index.js +3 -2
  344. package/lib/Antd5/tooltip/style/index.js +3 -1
  345. package/lib/Antd5/tooltip/util.js +0 -1
  346. package/lib/Antd5/tour/panelRender.js +7 -13
  347. package/lib/Antd5/tour/style/index.js +6 -13
  348. package/lib/Antd5/transfer/ListItem.js +3 -3
  349. package/lib/Antd5/transfer/hooks/useData.js +1 -1
  350. package/lib/Antd5/transfer/hooks/useSelection.js +26 -21
  351. package/lib/Antd5/transfer/style/index.js +12 -22
  352. package/lib/Antd5/tree/Tree.js +2 -0
  353. package/lib/Antd5/tree/style/directory.js +39 -0
  354. package/lib/Antd5/tree/style/index.js +115 -166
  355. package/lib/Antd5/tree/utils/dropIndicator.js +3 -2
  356. package/lib/Antd5/tree/utils/iconUtil.js +5 -1
  357. package/lib/Antd5/tree-select/index.js +47 -43
  358. package/lib/Antd5/typography/Base/CopyBtn.js +17 -17
  359. package/lib/Antd5/typography/Base/Ellipsis.js +48 -40
  360. package/lib/Antd5/typography/Base/index.js +20 -60
  361. package/lib/Antd5/typography/Base/util.js +31 -1
  362. package/lib/Antd5/typography/Editable.js +11 -10
  363. package/lib/Antd5/typography/Title.js +1 -6
  364. package/lib/Antd5/typography/Typography.js +2 -6
  365. package/lib/Antd5/typography/hooks/useCopyClick.js +3 -2
  366. package/lib/Antd5/typography/hooks/usePrevious.js +1 -1
  367. package/lib/Antd5/typography/hooks/useTooltipProps.js +30 -0
  368. package/lib/Antd5/typography/style/mixins.js +3 -9
  369. package/lib/Antd5/version/version.js +1 -1
  370. package/lib/Antd5/watermark/context.js +1 -1
  371. package/lib/Antd5/watermark/index.js +35 -18
  372. package/lib/Antd5/watermark/useClips.js +2 -1
  373. package/lib/Antd5/watermark/useRafDebounce.js +1 -1
  374. package/lib/Antd5/watermark/utils.js +1 -1
  375. package/lib/AppHolder/index.js +2 -1
  376. package/lib/CWSelect/index.js +39 -1
  377. package/lib/CWSelect/index.style.js +39 -0
  378. package/lib/CWTree/index.js +3 -9
  379. package/lib/CWTree/index.style.js +2 -0
  380. package/lib/ConfigProvider/ConfigProvider.js +11 -10
  381. package/lib/ConfigProvider/customTheme.js +6 -0
  382. package/lib/ConfigProvider/theme/common.js +140 -0
  383. package/lib/ConfigProvider/theme/dark.js +2 -0
  384. package/lib/ConfigProvider/theme/default.js +122 -0
  385. package/lib/ConfigProvider/theme/utils.js +49 -0
  386. package/lib/Header/UserSetting/TenantTree.js +0 -1
  387. package/lib/Pagination/index.style.js +1 -1
  388. package/lib/QuickTransfer/index.js +45 -59
  389. package/lib/SiderMenu/index.style.js +4 -2
  390. package/lib/Slider/index.style.js +2 -1
  391. package/lib/Splitter/index.js +2 -0
  392. package/package.json +37 -35
  393. package/lib/Antd5/color-picker/components/PanelPicker.js +0 -53
  394. package/lib/Antd5/color-picker/hooks/useColorState.js +0 -53
  395. package/lib/Antd5/layout/style/light.js +0 -24
  396. package/lib/Antd5/style/operationUnit.js +0 -18
  397. package/lib/Antd5/theme/util/calc/CSSCalculator.js +0 -119
  398. package/lib/Antd5/theme/util/calc/NumCalculator.js +0 -81
  399. package/lib/Antd5/theme/util/calc/calculator.js +0 -10
  400. package/lib/Antd5/theme/util/calc/index.js +0 -9
  401. package/lib/Antd5/theme/util/genComponentStyleHook.js +0 -243
  402. package/lib/Antd5/theme/util/maxmin.js +0 -27
  403. package/lib/Antd5/theme/util/statistic.js +0 -74
  404. package/lib/Antd5/typography/hooks/useUpdatedEffect.js +0 -13
  405. package/lib/Antd5/version/token-meta.json +0 -1
  406. package/lib/Antd5/version/token.json +0 -1
  407. package/lib/ConfigProvider/customTheme.json +0 -163
@@ -1,7 +1,7 @@
1
- var _excluded = ["prefixCls", "className", "rootClassName", "steps", "strokeColor", "percent", "size", "showInfo", "type", "status", "format", "style"];
2
- 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); }
1
+ var _excluded = ["prefixCls", "className", "rootClassName", "steps", "strokeColor", "percent", "size", "showInfo", "type", "status", "format", "style", "percentPosition"];
3
2
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
3
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _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); }
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); }
@@ -19,6 +19,7 @@ import CheckCircleFilled from '@ant-design/icons/CheckCircleFilled';
19
19
  import CheckOutlined from '@ant-design/icons/CheckOutlined';
20
20
  import CloseCircleFilled from '@ant-design/icons/CloseCircleFilled';
21
21
  import CloseOutlined from '@ant-design/icons/CloseOutlined';
22
+ import { TinyColor } from '@ctrl/tinycolor';
22
23
  import classNames from 'classnames';
23
24
  import omit from 'rc-util/lib/omit';
24
25
  import { devUseWarning } from '../_util/warning';
@@ -47,7 +48,22 @@ var Progress = /*#__PURE__*/React.forwardRef(function (props, ref) {
47
48
  status = props.status,
48
49
  format = props.format,
49
50
  style = props.style,
51
+ _props$percentPositio = props.percentPosition,
52
+ percentPosition = _props$percentPositio === void 0 ? {} : _props$percentPositio,
50
53
  restProps = _objectWithoutProperties(props, _excluded);
54
+ var _percentPosition$alig = percentPosition.align,
55
+ infoAlign = _percentPosition$alig === void 0 ? 'end' : _percentPosition$alig,
56
+ _percentPosition$type = percentPosition.type,
57
+ infoPosition = _percentPosition$type === void 0 ? 'outer' : _percentPosition$type;
58
+ var strokeColorNotArray = Array.isArray(strokeColor) ? strokeColor[0] : strokeColor;
59
+ var strokeColorNotGradient = typeof strokeColor === 'string' || Array.isArray(strokeColor) ? strokeColor : undefined;
60
+ var strokeColorIsBright = React.useMemo(function () {
61
+ if (strokeColorNotArray) {
62
+ var color = typeof strokeColorNotArray === 'string' ? strokeColorNotArray : Object.values(strokeColorNotArray)[0];
63
+ return new TinyColor(color).isLight();
64
+ }
65
+ return false;
66
+ }, [strokeColor]);
51
67
  var percentNumber = React.useMemo(function () {
52
68
  var _ref, _ref2;
53
69
  var successPercent = getSuccessPercent(props);
@@ -69,6 +85,8 @@ var Progress = /*#__PURE__*/React.forwardRef(function (props, ref) {
69
85
  wrapCSSVar = _useStyle2[0],
70
86
  hashId = _useStyle2[1],
71
87
  cssVarCls = _useStyle2[2];
88
+ var isLineType = type === 'line';
89
+ var isPureLineType = isLineType && !steps;
72
90
  var progressInfo = React.useMemo(function () {
73
91
  if (!showInfo) {
74
92
  return null;
@@ -78,8 +96,8 @@ var Progress = /*#__PURE__*/React.forwardRef(function (props, ref) {
78
96
  var textFormatter = format || function (number) {
79
97
  return "".concat(number, "%");
80
98
  };
81
- var isLineType = type === 'line';
82
- if (format || progressStatus !== 'exception' && progressStatus !== 'success') {
99
+ var isBrightInnerColor = isLineType && strokeColorIsBright && infoPosition === 'inner';
100
+ if (infoPosition === 'inner' || format || progressStatus !== 'exception' && progressStatus !== 'success') {
83
101
  text = textFormatter(validProgress(percent), validProgress(successPercent));
84
102
  } else if (progressStatus === 'exception') {
85
103
  text = isLineType ? _jsx(CloseCircleFilled, {}) : _jsx(CloseOutlined, {});
@@ -87,7 +105,7 @@ var Progress = /*#__PURE__*/React.forwardRef(function (props, ref) {
87
105
  text = isLineType ? _jsx(CheckCircleFilled, {}) : _jsx(CheckOutlined, {});
88
106
  }
89
107
  return _jsx("span", {
90
- className: "".concat(prefixCls, "-text"),
108
+ className: classNames("".concat(prefixCls, "-text"), _defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-text-bright"), isBrightInnerColor), "".concat(prefixCls, "-text-").concat(infoAlign), isPureLineType), "".concat(prefixCls, "-text-").concat(infoPosition), isPureLineType)),
91
109
  title: typeof text === 'string' ? text : undefined,
92
110
  children: text
93
111
  });
@@ -96,15 +114,17 @@ var Progress = /*#__PURE__*/React.forwardRef(function (props, ref) {
96
114
  var warning = devUseWarning('Progress');
97
115
  warning.deprecated(!('successPercent' in props), 'successPercent', 'success.percent');
98
116
  warning.deprecated(!('width' in props), 'width', 'size');
99
- if ((type === 'circle' || type === 'dashboard') && Array.isArray(size)) {
100
- warning(false, 'usage', 'Type "circle" and "dashboard" do not accept array as `size`, please use number or preset size instead.');
117
+ if (type === 'circle' || type === 'dashboard') {
118
+ if (Array.isArray(size)) {
119
+ warning(false, 'usage', 'Type "circle" and "dashboard" do not accept array as `size`, please use number or preset size instead.');
120
+ } else if (_typeof(size) === 'object') {
121
+ warning(false, 'usage', 'Type "circle" and "dashboard" do not accept object as `size`, please use number or preset size instead.');
122
+ }
101
123
  }
102
124
  if (props.success && 'progress' in props.success) {
103
125
  warning.deprecated(false, 'success.progress', 'success.percent');
104
126
  }
105
127
  }
106
- var strokeColorNotArray = Array.isArray(strokeColor) ? strokeColor[0] : strokeColor;
107
- var strokeColorNotGradient = typeof strokeColor === 'string' || Array.isArray(strokeColor) ? strokeColor : undefined;
108
128
  var progress;
109
129
  // Render progress shape
110
130
  if (type === 'line') {
@@ -117,6 +137,10 @@ var Progress = /*#__PURE__*/React.forwardRef(function (props, ref) {
117
137
  strokeColor: strokeColorNotArray,
118
138
  prefixCls: prefixCls,
119
139
  direction: direction,
140
+ percentPosition: {
141
+ align: infoAlign,
142
+ type: infoPosition
143
+ },
120
144
  children: progressInfo
121
145
  }));
122
146
  } else if (type === 'circle' || type === 'dashboard') {
@@ -127,13 +151,15 @@ var Progress = /*#__PURE__*/React.forwardRef(function (props, ref) {
127
151
  children: progressInfo
128
152
  }));
129
153
  }
130
- var classString = classNames(prefixCls, "".concat(prefixCls, "-status-").concat(progressStatus), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-").concat(type === 'dashboard' && 'circle' || type), type !== 'line'), "".concat(prefixCls, "-inline-circle"), type === 'circle' && getSize(size, 'circle')[0] <= 20), "".concat(prefixCls, "-line"), !steps && type === 'line'), "".concat(prefixCls, "-steps"), steps), "".concat(prefixCls, "-show-info"), showInfo), "".concat(prefixCls, "-").concat(size), typeof size === 'string'), "".concat(prefixCls, "-rtl"), direction === 'rtl'), progressStyle === null || progressStyle === void 0 ? void 0 : progressStyle.className, className, rootClassName, hashId, cssVarCls);
154
+ var classString = classNames(prefixCls, "".concat(prefixCls, "-status-").concat(progressStatus), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-").concat(type === 'dashboard' && 'circle' || type), type !== 'line'), "".concat(prefixCls, "-inline-circle"), type === 'circle' && getSize(size, 'circle')[0] <= 20), "".concat(prefixCls, "-line"), isPureLineType), "".concat(prefixCls, "-line-align-").concat(infoAlign), isPureLineType), "".concat(prefixCls, "-line-position-").concat(infoPosition), isPureLineType), "".concat(prefixCls, "-steps"), steps), "".concat(prefixCls, "-show-info"), showInfo), "".concat(prefixCls, "-").concat(size), typeof size === 'string'), "".concat(prefixCls, "-rtl"), direction === 'rtl'), progressStyle === null || progressStyle === void 0 ? void 0 : progressStyle.className, className, rootClassName, hashId, cssVarCls);
131
155
  return wrapCSSVar(_jsx("div", _objectSpread(_objectSpread({
132
156
  ref: ref,
133
157
  style: _objectSpread(_objectSpread({}, progressStyle === null || progressStyle === void 0 ? void 0 : progressStyle.style), style),
134
158
  className: classString,
135
159
  role: "progressbar",
136
- "aria-valuenow": percentNumber
160
+ "aria-valuenow": percentNumber,
161
+ "aria-valuemin": 0,
162
+ "aria-valuemax": 100
137
163
  }, omit(restProps, ['trailColor', 'strokeWidth', 'width', 'gapDegree', 'gapPosition', 'strokeLinecap', 'success', 'successPercent'])), {}, {
138
164
  children: progress
139
165
  })));
@@ -41,15 +41,14 @@ var genBaseStyle = function genBaseStyle(token) {
41
41
  fontSize: token.fontSize
42
42
  }
43
43
  }, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_objectSpread2, "".concat(progressCls, "-outer"), {
44
- display: 'inline-block',
44
+ display: 'inline-flex',
45
+ alignItems: 'center',
45
46
  width: '100%'
46
- }), "&".concat(progressCls, "-show-info"), _defineProperty({}, "".concat(progressCls, "-outer"), {
47
- marginInlineEnd: "calc(-2em - ".concat(unit(token.marginXS), ")"),
48
- paddingInlineEnd: "calc(2em + ".concat(unit(token.paddingXS), ")")
49
- })), "".concat(progressCls, "-inner"), {
47
+ }), "".concat(progressCls, "-inner"), {
50
48
  position: 'relative',
51
49
  display: 'inline-block',
52
50
  width: '100%',
51
+ flex: 1,
53
52
  overflow: 'hidden',
54
53
  verticalAlign: 'middle',
55
54
  backgroundColor: token.remainingColor,
@@ -61,7 +60,16 @@ var genBaseStyle = function genBaseStyle(token) {
61
60
  background: token.defaultColor,
62
61
  borderRadius: token.lineBorderRadius,
63
62
  transition: "all ".concat(token.motionDurationSlow, " ").concat(token.motionEaseInOutCirc)
64
- }), "".concat(progressCls, "-bg"), {
63
+ }), "".concat(progressCls, "-layout-bottom"), _defineProperty({
64
+ display: 'flex',
65
+ flexDirection: 'column',
66
+ alignItems: 'center',
67
+ justifyContent: 'center'
68
+ }, "".concat(progressCls, "-text"), {
69
+ width: 'max-content',
70
+ marginInlineStart: 0,
71
+ marginTop: token.marginXXS
72
+ })), "".concat(progressCls, "-bg"), _defineProperty({
65
73
  overflow: 'hidden',
66
74
  '&::after': {
67
75
  content: '""',
@@ -73,23 +81,50 @@ var genBaseStyle = function genBaseStyle(token) {
73
81
  width: "calc(1 / var(".concat(Percent, ") * 100%)"),
74
82
  display: 'block'
75
83
  }
76
- }), "".concat(progressCls, "-success-bg"), {
84
+ }, "&".concat(progressCls, "-bg-inner"), _defineProperty({
85
+ minWidth: 'max-content',
86
+ '&::after': {
87
+ content: 'none'
88
+ }
89
+ }, "".concat(progressCls, "-text-inner"), _defineProperty({
90
+ color: token.colorWhite
91
+ }, "&".concat(progressCls, "-text-bright"), {
92
+ color: 'rgba(0, 0, 0, 0.45)'
93
+ })))), "".concat(progressCls, "-success-bg"), {
77
94
  position: 'absolute',
78
95
  insetBlockStart: 0,
79
96
  insetInlineStart: 0,
80
97
  backgroundColor: token.colorSuccess
81
- }), "".concat(progressCls, "-text"), _defineProperty({
98
+ }), "".concat(progressCls, "-text"), _defineProperty(_defineProperty(_defineProperty({
82
99
  display: 'inline-block',
83
- width: '2em',
84
100
  marginInlineStart: token.marginXS,
85
101
  color: token.colorText,
86
102
  lineHeight: 1,
103
+ width: '2em',
87
104
  whiteSpace: 'nowrap',
88
105
  textAlign: 'start',
89
106
  verticalAlign: 'middle',
90
107
  wordBreak: 'normal'
91
108
  }, iconPrefixCls, {
92
109
  fontSize: token.fontSize
110
+ }), "&".concat(progressCls, "-text-outer"), {
111
+ width: 'max-content'
112
+ }), "&".concat(progressCls, "-text-outer").concat(progressCls, "-text-start"), {
113
+ width: 'max-content',
114
+ marginInlineStart: 0,
115
+ marginInlineEnd: token.marginXS
116
+ })), "".concat(progressCls, "-text-inner"), _defineProperty(_defineProperty({
117
+ display: 'flex',
118
+ justifyContent: 'center',
119
+ alignItems: 'center',
120
+ width: '100%',
121
+ height: '100%',
122
+ marginInlineStart: 0,
123
+ padding: "0 ".concat(unit(token.paddingXXS))
124
+ }, "&".concat(progressCls, "-text-start"), {
125
+ justifyContent: 'start'
126
+ }), "&".concat(progressCls, "-text-end"), {
127
+ justifyContent: 'end'
93
128
  })), "&".concat(progressCls, "-status-active"), _defineProperty({}, "".concat(progressCls, "-bg::before"), {
94
129
  position: 'absolute',
95
130
  inset: 0,
@@ -101,9 +136,9 @@ var genBaseStyle = function genBaseStyle(token) {
101
136
  animationTimingFunction: token.motionEaseOutQuint,
102
137
  animationIterationCount: 'infinite',
103
138
  content: '""'
104
- })), "&".concat(progressCls, "-rtl").concat(progressCls, "-status-active"), _defineProperty({}, "".concat(progressCls, "-bg::before"), {
139
+ })), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_objectSpread2, "&".concat(progressCls, "-rtl").concat(progressCls, "-status-active"), _defineProperty({}, "".concat(progressCls, "-bg::before"), {
105
140
  animationName: genAntProgressActive(true)
106
- })), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_objectSpread2, "&".concat(progressCls, "-status-exception"), _defineProperty(_defineProperty({}, "".concat(progressCls, "-bg"), {
141
+ })), "&".concat(progressCls, "-status-exception"), _defineProperty(_defineProperty({}, "".concat(progressCls, "-bg"), {
107
142
  backgroundColor: token.colorError
108
143
  }), "".concat(progressCls, "-text"), {
109
144
  color: token.colorError
@@ -57,11 +57,12 @@ export var getSize = function getSize(size, type, extra) {
57
57
  width = size;
58
58
  height = size;
59
59
  } else {
60
- var _size = _slicedToArray(size, 2);
61
- var _size$ = _size[0];
62
- width = _size$ === void 0 ? 14 : _size$;
63
- var _size$2 = _size[1];
64
- height = _size$2 === void 0 ? 8 : _size$2;
60
+ var _ref4 = Array.isArray(size) ? size : [size.width, size.height];
61
+ var _ref5 = _slicedToArray(_ref4, 2);
62
+ var _ref5$ = _ref5[0];
63
+ width = _ref5$ === void 0 ? 14 : _ref5$;
64
+ var _ref5$2 = _ref5[1];
65
+ height = _ref5$2 === void 0 ? 8 : _ref5$2;
65
66
  }
66
67
  width *= steps;
67
68
  } else if (type === 'line') {
@@ -72,25 +73,26 @@ export var getSize = function getSize(size, type, extra) {
72
73
  width = size;
73
74
  height = size;
74
75
  } else {
75
- var _size2 = _slicedToArray(size, 2);
76
- var _size2$ = _size2[0];
77
- width = _size2$ === void 0 ? -1 : _size2$;
78
- var _size2$2 = _size2[1];
79
- height = _size2$2 === void 0 ? 8 : _size2$2;
76
+ var _ref6 = Array.isArray(size) ? size : [size.width, size.height];
77
+ var _ref7 = _slicedToArray(_ref6, 2);
78
+ var _ref7$ = _ref7[0];
79
+ width = _ref7$ === void 0 ? -1 : _ref7$;
80
+ var _ref7$2 = _ref7[1];
81
+ height = _ref7$2 === void 0 ? 8 : _ref7$2;
80
82
  }
81
83
  } else if (type === 'circle' || type === 'dashboard') {
82
84
  if (typeof size === 'string' || typeof size === 'undefined') {
83
- var _ref4 = size === 'small' ? [60, 60] : [120, 120];
84
- var _ref5 = _slicedToArray(_ref4, 2);
85
- width = _ref5[0];
86
- height = _ref5[1];
85
+ var _ref8 = size === 'small' ? [60, 60] : [120, 120];
86
+ var _ref9 = _slicedToArray(_ref8, 2);
87
+ width = _ref9[0];
88
+ height = _ref9[1];
87
89
  } else if (typeof size === 'number') {
88
90
  width = size;
89
91
  height = size;
90
- } else {
91
- var _ref6, _size$3, _ref7, _size$4;
92
- width = (_ref6 = (_size$3 = size[0]) !== null && _size$3 !== void 0 ? _size$3 : size[1]) !== null && _ref6 !== void 0 ? _ref6 : 120;
93
- height = (_ref7 = (_size$4 = size[0]) !== null && _size$4 !== void 0 ? _size$4 : size[1]) !== null && _ref7 !== void 0 ? _ref7 : 120;
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;
94
96
  }
95
97
  }
96
98
  return [width, height];
@@ -0,0 +1,42 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React from 'react';
3
+ import { ReloadOutlined } from '@ant-design/icons';
4
+ import Button from '../button';
5
+ import Spin from '../spin';
6
+ var defaultSpin = _jsx(Spin, {});
7
+ export default function QRcodeStatus(_ref) {
8
+ var prefixCls = _ref.prefixCls,
9
+ locale = _ref.locale,
10
+ onRefresh = _ref.onRefresh,
11
+ statusRender = _ref.statusRender,
12
+ status = _ref.status;
13
+ var defaultExpiredNode = _jsxs(_Fragment, {
14
+ children: [_jsx("p", {
15
+ className: "".concat(prefixCls, "-expired"),
16
+ children: locale === null || locale === void 0 ? void 0 : locale.expired
17
+ }), onRefresh && _jsx(Button, {
18
+ type: "link",
19
+ icon: _jsx(ReloadOutlined, {}),
20
+ onClick: onRefresh,
21
+ children: locale === null || locale === void 0 ? void 0 : locale.refresh
22
+ })]
23
+ });
24
+ var defaultScannedNode = _jsx("p", {
25
+ className: "".concat(prefixCls, "-scanned"),
26
+ children: locale === null || locale === void 0 ? void 0 : locale.scanned
27
+ });
28
+ var defaultNodes = {
29
+ expired: defaultExpiredNode,
30
+ loading: defaultSpin,
31
+ scanned: defaultScannedNode
32
+ };
33
+ var defaultStatusRender = function defaultStatusRender(info) {
34
+ return defaultNodes[info.status];
35
+ };
36
+ var mergedStatusRender = statusRender !== null && statusRender !== void 0 ? statusRender : defaultStatusRender;
37
+ return mergedStatusRender({
38
+ status: status,
39
+ locale: locale,
40
+ onRefresh: onRefresh
41
+ });
42
+ }
@@ -1,29 +1,32 @@
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", "type", "icon", "size", "iconSize", "color", "errorLevel", "status", "bordered", "onRefresh", "style", "className", "rootClassName", "prefixCls", "bgColor", "statusRender"];
2
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; }
3
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; }
4
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; }
5
6
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
6
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 _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
9
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
7
10
  function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
8
11
  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."); }
9
12
  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; } }
10
13
  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; }
11
14
  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; } }
12
15
  function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
13
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
16
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
17
  import React, { useContext } from 'react';
15
- import ReloadOutlined from '@ant-design/icons/ReloadOutlined';
18
+ import { QRCodeCanvas, QRCodeSVG } from '@rc-component/qrcode';
16
19
  import classNames from 'classnames';
17
- import { QRCodeCanvas, QRCodeSVG } from 'qrcode.react';
20
+ import omit from 'rc-util/lib/omit';
21
+ import pickAttrs from 'rc-util/lib/pickAttrs';
18
22
  import { devUseWarning } from '../_util/warning';
19
- import Button from '../button';
20
23
  import { ConfigContext } from '../config-provider';
21
24
  import { useLocale } from '../locale';
22
- import Spin from '../spin';
23
25
  import { useToken } from '../theme/internal';
26
+ import QRcodeStatus from './QrcodeStatus';
24
27
  import useStyle from './style/index';
25
28
  var QRCode = function QRCode(props) {
26
- var _style$width, _style$height;
29
+ var _iconSize$height, _iconSize$width, _style$width, _style$height;
27
30
  var _useToken = useToken(),
28
31
  _useToken2 = _slicedToArray(_useToken, 2),
29
32
  token = _useToken2[1];
@@ -34,8 +37,7 @@ var QRCode = function QRCode(props) {
34
37
  icon = _props$icon === void 0 ? '' : _props$icon,
35
38
  _props$size = props.size,
36
39
  size = _props$size === void 0 ? 160 : _props$size,
37
- _props$iconSize = props.iconSize,
38
- iconSize = _props$iconSize === void 0 ? 40 : _props$iconSize,
40
+ iconSize = props.iconSize,
39
41
  _props$color = props.color,
40
42
  color = _props$color === void 0 ? token.colorText : _props$color,
41
43
  _props$errorLevel = props.errorLevel,
@@ -50,7 +52,9 @@ var QRCode = function QRCode(props) {
50
52
  rootClassName = props.rootClassName,
51
53
  customizePrefixCls = props.prefixCls,
52
54
  _props$bgColor = props.bgColor,
53
- bgColor = _props$bgColor === void 0 ? 'transparent' : _props$bgColor;
55
+ bgColor = _props$bgColor === void 0 ? 'transparent' : _props$bgColor,
56
+ statusRender = props.statusRender,
57
+ rest = _objectWithoutProperties(props, _excluded);
54
58
  var _useContext = useContext(ConfigContext),
55
59
  getPrefixCls = _useContext.getPrefixCls;
56
60
  var prefixCls = getPrefixCls('qrcode', customizePrefixCls);
@@ -63,11 +67,14 @@ var QRCode = function QRCode(props) {
63
67
  src: icon,
64
68
  x: undefined,
65
69
  y: undefined,
66
- height: iconSize,
67
- width: iconSize,
68
- excavate: true
70
+ height: typeof iconSize === 'number' ? iconSize : (_iconSize$height = iconSize === null || iconSize === void 0 ? void 0 : iconSize.height) !== null && _iconSize$height !== void 0 ? _iconSize$height : 40,
71
+ width: typeof iconSize === 'number' ? iconSize : (_iconSize$width = iconSize === null || iconSize === void 0 ? void 0 : iconSize.width) !== null && _iconSize$width !== void 0 ? _iconSize$width : 40,
72
+ excavate: true,
73
+ crossOrigin: 'anonymous'
69
74
  };
70
- var qrCodeProps = {
75
+ var a11yProps = pickAttrs(rest, true);
76
+ var restProps = omit(rest, Object.keys(a11yProps));
77
+ var qrCodeProps = _objectSpread({
71
78
  value: value,
72
79
  size: size,
73
80
  level: errorLevel,
@@ -78,7 +85,7 @@ var QRCode = function QRCode(props) {
78
85
  height: style === null || style === void 0 ? void 0 : style.height
79
86
  },
80
87
  imageSettings: icon ? imageSettings : undefined
81
- };
88
+ }, a11yProps);
82
89
  var _useLocale = useLocale('QRCode'),
83
90
  _useLocale2 = _slicedToArray(_useLocale, 1),
84
91
  locale = _useLocale2[0];
@@ -97,27 +104,20 @@ var QRCode = function QRCode(props) {
97
104
  width: (_style$width = style === null || style === void 0 ? void 0 : style.width) !== null && _style$width !== void 0 ? _style$width : size,
98
105
  height: (_style$height = style === null || style === void 0 ? void 0 : style.height) !== null && _style$height !== void 0 ? _style$height : size
99
106
  });
100
- return wrapCSSVar(_jsxs("div", {
107
+ return wrapCSSVar(_jsxs("div", _objectSpread(_objectSpread({}, restProps), {}, {
101
108
  className: mergedCls,
102
109
  style: mergedStyle,
103
- children: [status !== 'active' && _jsxs("div", {
110
+ children: [status !== 'active' && _jsx("div", {
104
111
  className: "".concat(prefixCls, "-mask"),
105
- children: [status === 'loading' && _jsx(Spin, {}), status === 'expired' && _jsxs(_Fragment, {
106
- children: [_jsx("p", {
107
- className: "".concat(prefixCls, "-expired"),
108
- children: locale === null || locale === void 0 ? void 0 : locale.expired
109
- }), onRefresh && _jsx(Button, {
110
- type: "link",
111
- icon: _jsx(ReloadOutlined, {}),
112
- onClick: onRefresh,
113
- children: locale === null || locale === void 0 ? void 0 : locale.refresh
114
- })]
115
- }), status === 'scanned' && _jsx("p", {
116
- className: "".concat(prefixCls, "-scanned"),
117
- children: locale === null || locale === void 0 ? void 0 : locale.scanned
118
- })]
112
+ children: _jsx(QRcodeStatus, {
113
+ prefixCls: prefixCls,
114
+ locale: locale,
115
+ status: status,
116
+ onRefresh: onRefresh,
117
+ statusRender: statusRender
118
+ })
119
119
  }), type === 'canvas' ? _jsx(QRCodeCanvas, _objectSpread({}, qrCodeProps)) : _jsx(QRCodeSVG, _objectSpread({}, qrCodeProps))]
120
- }));
120
+ })));
121
121
  };
122
122
  if (process.env.NODE_ENV !== 'production') {
123
123
  QRCode.displayName = 'QRCode';
@@ -97,11 +97,7 @@ var InternalRadio = function InternalRadio(props, ref) {
97
97
  ref: mergedRef
98
98
  })), newTypeExist ? render ? render(option) : _jsxs(_Fragment, {
99
99
  children: [(option === null || option === void 0 ? void 0 : option.icon) && _jsx("div", {
100
- className: classNames({
101
- "cw-radio-icon-wrapper": true,
102
- "cw-radio-icon-unchecked-disabled": radioProps.disabled && !radioProps.checked,
103
- "cw-radio-icon-checked-disabled": radioProps.disabled && radioProps.checked
104
- }),
100
+ className: classNames("".concat(prefixCls, "-icon-wrapper"), _defineProperty(_defineProperty({}, "".concat(prefixCls, "-icon-unchecked-disabled"), radioProps.disabled && !radioProps.checked), "".concat(prefixCls, "-icon-checked-disabled"), radioProps.disabled && radioProps.checked)),
105
101
  style: {
106
102
  background: option !== null && option !== void 0 && option.iconBackGround ? typeof (option === null || option === void 0 ? void 0 : option.iconBackGround) === "function" ? option === null || option === void 0 ? void 0 : option.iconBackGround({
107
103
  disabled: radioProps.disabled,
@@ -113,14 +109,12 @@ var InternalRadio = function InternalRadio(props, ref) {
113
109
  checked: radioProps.checked
114
110
  }) : option === null || option === void 0 ? void 0 : option.icon
115
111
  }), _jsxs("div", {
116
- className: classNames("cw-radio-content"),
112
+ className: "".concat(prefixCls, "-content"),
117
113
  children: [children && _jsx("p", {
118
- className: classNames("cw-radio-content-title"),
114
+ className: "".concat(prefixCls, "-content-title"),
119
115
  children: children
120
116
  }), (option === null || option === void 0 ? void 0 : option.describe) && _jsx("div", {
121
- className: classNames("cw-radio-content-description", {
122
- "cw-radio-content-description_": !children
123
- }),
117
+ className: classNames("".concat(prefixCls, "-content-description"), _defineProperty({}, "".concat(prefixCls, "-content-description_"), !children)),
124
118
  children: option === null || option === void 0 ? void 0 : option.describe
125
119
  })]
126
120
  })]