@chaoswise/ui 3.0.23 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (405) 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 +5 -4
  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 +2 -2
  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 +11 -5
  56. package/lib/Antd5/checkbox/style/index.js +6 -3
  57. package/lib/Antd5/collapse/Collapse.js +2 -1
  58. package/lib/Antd5/collapse/style/index.js +20 -13
  59. package/lib/Antd5/color-picker/ColorPicker.js +120 -78
  60. package/lib/Antd5/color-picker/ColorPickerPanel.js +44 -26
  61. package/lib/Antd5/color-picker/color.js +82 -10
  62. package/lib/Antd5/color-picker/components/ColorAlphaInput.js +2 -2
  63. package/lib/Antd5/color-picker/components/ColorClear.js +2 -2
  64. package/lib/Antd5/color-picker/components/ColorHexInput.js +5 -4
  65. package/lib/Antd5/color-picker/components/ColorInput.js +4 -3
  66. package/lib/Antd5/color-picker/components/ColorPresets.js +1 -1
  67. package/lib/Antd5/color-picker/components/ColorSlider.js +139 -0
  68. package/lib/Antd5/color-picker/components/ColorTrigger.js +52 -26
  69. package/lib/Antd5/color-picker/components/PanelPicker/GradientColorBar.js +130 -0
  70. package/lib/Antd5/color-picker/components/PanelPicker/index.js +194 -0
  71. package/lib/Antd5/color-picker/context.js +1 -5
  72. package/lib/Antd5/color-picker/hooks/useModeColor.js +87 -0
  73. package/lib/Antd5/color-picker/style/color-block.js +3 -2
  74. package/lib/Antd5/color-picker/style/index.js +33 -15
  75. package/lib/Antd5/color-picker/style/input.js +1 -1
  76. package/lib/Antd5/color-picker/style/picker.js +6 -33
  77. package/lib/Antd5/color-picker/style/slider.js +87 -0
  78. package/lib/Antd5/color-picker/util.js +53 -7
  79. package/lib/Antd5/config-provider/context.js +3 -1
  80. package/lib/Antd5/config-provider/cssVariables.js +0 -1
  81. package/lib/Antd5/config-provider/defaultRenderEmpty.js +8 -1
  82. package/lib/Antd5/config-provider/index.js +13 -5
  83. package/lib/Antd5/config-provider/style/index.js +0 -1
  84. package/lib/Antd5/date-picker/PickerButton.js +3 -2
  85. package/lib/Antd5/date-picker/design/behavior-pattern.js +15 -15
  86. package/lib/Antd5/date-picker/generatePicker/constant.js +15 -0
  87. package/lib/Antd5/date-picker/generatePicker/generateRangePicker.js +16 -11
  88. package/lib/Antd5/date-picker/generatePicker/generateSinglePicker.js +19 -15
  89. package/lib/Antd5/date-picker/generatePicker/index.js +2 -2
  90. package/lib/Antd5/date-picker/generatePicker/interface.js +1 -1
  91. package/lib/Antd5/date-picker/index.js +2 -17
  92. package/lib/Antd5/date-picker/locale/ar_EG.js +9 -1
  93. package/lib/Antd5/date-picker/locale/az_AZ.js +9 -1
  94. package/lib/Antd5/date-picker/locale/el_GR.js +9 -1
  95. package/lib/Antd5/date-picker/locale/ja_JP.js +11 -1
  96. package/lib/Antd5/date-picker/locale/kn_IN.js +9 -1
  97. package/lib/Antd5/date-picker/locale/pl_PL.js +9 -1
  98. package/lib/Antd5/date-picker/locale/uk_UA.js +10 -1
  99. package/lib/Antd5/date-picker/style/index.js +13 -10
  100. package/lib/Antd5/date-picker/style/panel.js +36 -32
  101. package/lib/Antd5/date-picker/style/token.js +1 -1
  102. package/lib/Antd5/date-picker/util.js +0 -48
  103. package/lib/Antd5/descriptions/hooks/useItems.js +5 -0
  104. package/lib/Antd5/descriptions/hooks/useRow.js +42 -34
  105. package/lib/Antd5/descriptions/style/index.js +20 -8
  106. package/lib/Antd5/divider/index.js +4 -3
  107. package/lib/Antd5/divider/style/index.js +19 -4
  108. package/lib/Antd5/drawer/DrawerPanel.js +11 -20
  109. package/lib/Antd5/drawer/index.js +39 -42
  110. package/lib/Antd5/drawer/style/index.js +10 -11
  111. package/lib/Antd5/dropdown/dropdown.js +5 -7
  112. package/lib/Antd5/dropdown/style/index.js +27 -11
  113. package/lib/Antd5/empty/empty.js +9 -3
  114. package/lib/Antd5/empty/simple.js +9 -3
  115. package/lib/Antd5/empty/style/index.js +1 -1
  116. package/lib/Antd5/float-button/BackTop.js +3 -2
  117. package/lib/Antd5/float-button/FloatButton.js +16 -5
  118. package/lib/Antd5/float-button/FloatButtonGroup.js +76 -52
  119. package/lib/Antd5/float-button/style/index.js +117 -76
  120. package/lib/Antd5/float-button/style/keyframes.js +118 -0
  121. package/lib/Antd5/form/ErrorList.js +14 -2
  122. package/lib/Antd5/form/Form.js +11 -3
  123. package/lib/Antd5/form/FormItem/ItemHolder.js +8 -4
  124. package/lib/Antd5/form/FormItem/index.js +6 -4
  125. package/lib/Antd5/form/FormItemInput.js +68 -28
  126. package/lib/Antd5/form/FormItemLabel.js +3 -3
  127. package/lib/Antd5/form/hooks/useForm.js +8 -1
  128. package/lib/Antd5/form/hooks/useVariants.js +10 -4
  129. package/lib/Antd5/form/style/explain.js +9 -8
  130. package/lib/Antd5/form/style/index.js +30 -18
  131. package/lib/Antd5/grid/row.js +2 -2
  132. package/lib/Antd5/image/index.js +3 -1
  133. package/lib/Antd5/image/style/index.js +17 -20
  134. package/lib/Antd5/index.js +2 -1
  135. package/lib/Antd5/input/Input.js +18 -38
  136. package/lib/Antd5/input/OTP/OTPInput.js +10 -5
  137. package/lib/Antd5/input/OTP/index.js +12 -4
  138. package/lib/Antd5/input/Password.js +6 -2
  139. package/lib/Antd5/input/Search.js +2 -4
  140. package/lib/Antd5/input/TextArea.js +1 -1
  141. package/lib/Antd5/input/style/index.js +72 -63
  142. package/lib/Antd5/input/style/otp.js +1 -1
  143. package/lib/Antd5/input/style/variants.js +38 -23
  144. package/lib/Antd5/input/utils.js +0 -1
  145. package/lib/Antd5/input-number/index.js +19 -22
  146. package/lib/Antd5/input-number/style/index.js +26 -16
  147. package/lib/Antd5/layout/Sider.js +15 -8
  148. package/lib/Antd5/layout/style/index.js +6 -96
  149. package/lib/Antd5/layout/style/sider.js +115 -0
  150. package/lib/Antd5/list/Item.js +18 -5
  151. package/lib/Antd5/list/index.js +15 -10
  152. package/lib/Antd5/list/style/index.js +40 -41
  153. package/lib/Antd5/locale/ar_EG.js +14 -1
  154. package/lib/Antd5/locale/az_AZ.js +78 -28
  155. package/lib/Antd5/locale/bn_BD.js +0 -1
  156. package/lib/Antd5/locale/by_BY.js +0 -1
  157. package/lib/Antd5/locale/ca_ES.js +0 -1
  158. package/lib/Antd5/locale/cs_CZ.js +0 -1
  159. package/lib/Antd5/locale/de_DE.js +0 -1
  160. package/lib/Antd5/locale/el_GR.js +104 -3
  161. package/lib/Antd5/locale/en_GB.js +0 -1
  162. package/lib/Antd5/locale/en_US.js +4 -2
  163. package/lib/Antd5/locale/es_ES.js +10 -6
  164. package/lib/Antd5/locale/et_EE.js +0 -1
  165. package/lib/Antd5/locale/eu_ES.js +4 -2
  166. package/lib/Antd5/locale/fa_IR.js +0 -1
  167. package/lib/Antd5/locale/fr_BE.js +5 -1
  168. package/lib/Antd5/locale/fr_CA.js +0 -1
  169. package/lib/Antd5/locale/fr_FR.js +5 -6
  170. package/lib/Antd5/locale/ga_IE.js +0 -1
  171. package/lib/Antd5/locale/gl_ES.js +0 -1
  172. package/lib/Antd5/locale/he_IL.js +0 -1
  173. package/lib/Antd5/locale/hi_IN.js +0 -1
  174. package/lib/Antd5/locale/hr_HR.js +0 -1
  175. package/lib/Antd5/locale/id_ID.js +4 -2
  176. package/lib/Antd5/locale/index.js +1 -1
  177. package/lib/Antd5/locale/it_IT.js +0 -1
  178. package/lib/Antd5/locale/ja_JP.js +4 -2
  179. package/lib/Antd5/locale/ka_GE.js +0 -1
  180. package/lib/Antd5/locale/kk_KZ.js +0 -1
  181. package/lib/Antd5/locale/km_KH.js +0 -1
  182. package/lib/Antd5/locale/kn_IN.js +82 -4
  183. package/lib/Antd5/locale/ko_KR.js +4 -2
  184. package/lib/Antd5/locale/lt_LT.js +4 -2
  185. package/lib/Antd5/locale/ml_IN.js +0 -1
  186. package/lib/Antd5/locale/mn_MN.js +86 -2
  187. package/lib/Antd5/locale/ms_MY.js +101 -18
  188. package/lib/Antd5/locale/my_MM.js +0 -1
  189. package/lib/Antd5/locale/nb_NO.js +0 -1
  190. package/lib/Antd5/locale/ne_NP.js +104 -2
  191. package/lib/Antd5/locale/nl_BE.js +5 -1
  192. package/lib/Antd5/locale/nl_NL.js +5 -1
  193. package/lib/Antd5/locale/pl_PL.js +0 -1
  194. package/lib/Antd5/locale/pt_BR.js +0 -1
  195. package/lib/Antd5/locale/pt_PT.js +55 -38
  196. package/lib/Antd5/locale/ro_RO.js +0 -1
  197. package/lib/Antd5/locale/ru_RU.js +9 -2
  198. package/lib/Antd5/locale/si_LK.js +0 -1
  199. package/lib/Antd5/locale/sk_SK.js +0 -1
  200. package/lib/Antd5/locale/sr_RS.js +0 -1
  201. package/lib/Antd5/locale/sv_SE.js +0 -1
  202. package/lib/Antd5/locale/th_TH.js +11 -3
  203. package/lib/Antd5/locale/tk_TK.js +0 -1
  204. package/lib/Antd5/locale/tr_TR.js +2 -1
  205. package/lib/Antd5/locale/uk_UA.js +1 -1
  206. package/lib/Antd5/locale/ur_PK.js +0 -1
  207. package/lib/Antd5/locale/uz_UZ.js +6 -7
  208. package/lib/Antd5/locale/zh_CN.js +4 -2
  209. package/lib/Antd5/locale/zh_HK.js +0 -1
  210. package/lib/Antd5/locale/zh_TW.js +0 -1
  211. package/lib/Antd5/mentions/index.js +4 -4
  212. package/lib/Antd5/menu/MenuItem.js +6 -5
  213. package/lib/Antd5/menu/OverrideContext.js +4 -3
  214. package/lib/Antd5/menu/SubMenu.js +2 -2
  215. package/lib/Antd5/menu/menu.js +2 -2
  216. package/lib/Antd5/menu/style/index.js +58 -40
  217. package/lib/Antd5/menu/style/theme.js +24 -20
  218. package/lib/Antd5/menu/style/vertical.js +10 -7
  219. package/lib/Antd5/message/PurePanel.js +22 -40
  220. package/lib/Antd5/message/style/index.js +8 -47
  221. package/lib/Antd5/message/useMessage.js +3 -15
  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/rate/index.js +8 -2
  248. package/lib/Antd5/result/noFound.js +3 -1
  249. package/lib/Antd5/result/serverError.js +3 -1
  250. package/lib/Antd5/result/unauthorized.js +5 -3
  251. package/lib/Antd5/segmented/index.js +5 -3
  252. package/lib/Antd5/segmented/style/index.js +11 -3
  253. package/lib/Antd5/select/index.js +4 -2
  254. package/lib/Antd5/select/style/dropdown.js +1 -1
  255. package/lib/Antd5/select/style/index.js +21 -8
  256. package/lib/Antd5/select/style/multiple.js +18 -9
  257. package/lib/Antd5/select/style/single.js +8 -10
  258. package/lib/Antd5/select/style/token.js +9 -2
  259. package/lib/Antd5/select/style/variants.js +20 -11
  260. package/lib/Antd5/skeleton/Image.js +6 -4
  261. package/lib/Antd5/skeleton/Node.js +1 -3
  262. package/lib/Antd5/skeleton/Paragraph.js +1 -1
  263. package/lib/Antd5/skeleton/Title.js +9 -6
  264. package/lib/Antd5/skeleton/style/index.js +13 -13
  265. package/lib/Antd5/slider/Context.js +4 -0
  266. package/lib/Antd5/slider/SliderTooltip.js +9 -5
  267. package/lib/Antd5/slider/index.js +32 -31
  268. package/lib/Antd5/slider/style/index.js +60 -44
  269. package/lib/Antd5/space/Compact.js +1 -1
  270. package/lib/Antd5/space/index.js +3 -3
  271. package/lib/Antd5/spin/Indicator/Looper.js +29 -0
  272. package/lib/Antd5/spin/Indicator/Progress.js +78 -0
  273. package/lib/Antd5/spin/Indicator/index.js +21 -0
  274. package/lib/Antd5/spin/index.js +27 -45
  275. package/lib/Antd5/spin/style/index.js +54 -17
  276. package/lib/Antd5/spin/usePercent.js +40 -0
  277. package/lib/Antd5/splitter/Panel.js +36 -0
  278. package/lib/Antd5/splitter/SplitBar.js +124 -0
  279. package/lib/Antd5/splitter/Splitter.js +194 -0
  280. package/lib/Antd5/{_util/transButton.js → splitter/hooks/useItems.js} +28 -54
  281. package/lib/Antd5/splitter/hooks/useResizable.js +43 -0
  282. package/lib/Antd5/splitter/hooks/useResize.js +138 -0
  283. package/lib/Antd5/splitter/hooks/useSizes.js +109 -0
  284. package/lib/Antd5/splitter/index.js +5 -0
  285. package/lib/Antd5/splitter/interface.js +1 -0
  286. package/lib/Antd5/splitter/style/index.js +219 -0
  287. package/lib/Antd5/statistic/style/index.js +1 -1
  288. package/lib/Antd5/steps/style/custom-icon.js +1 -1
  289. package/lib/Antd5/steps/style/index.js +11 -8
  290. package/lib/Antd5/steps/style/inline.js +5 -4
  291. package/lib/Antd5/steps/style/progress-dot.js +2 -2
  292. package/lib/Antd5/steps/style/small.js +3 -3
  293. package/lib/Antd5/steps/style/vertical.js +2 -2
  294. package/lib/Antd5/style/index.js +37 -13
  295. package/lib/Antd5/style/motion/slide.js +6 -5
  296. package/lib/Antd5/style/placementArrow.js +15 -6
  297. package/lib/Antd5/switch/style/index.js +1 -1
  298. package/lib/Antd5/table/Column.js +2 -3
  299. package/lib/Antd5/table/ColumnGroup.js +2 -3
  300. package/lib/Antd5/table/ExpandIcon.js +6 -6
  301. package/lib/Antd5/table/InternalTable.js +6 -6
  302. package/lib/Antd5/table/RcTable/VirtualTable.js +3 -2
  303. package/lib/Antd5/table/RcTable/index.js +3 -2
  304. package/lib/Antd5/table/hooks/useFilter/FilterDropdown.js +82 -61
  305. package/lib/Antd5/table/hooks/useFilter/FilterSearch.js +7 -7
  306. package/lib/Antd5/table/hooks/useFilter/index.js +28 -26
  307. package/lib/Antd5/table/hooks/useLazyKVMap.js +5 -5
  308. package/lib/Antd5/table/hooks/useSelection.js +21 -11
  309. package/lib/Antd5/table/hooks/useSorter.js +66 -42
  310. package/lib/Antd5/table/hooks/useTitleColumns.js +9 -7
  311. package/lib/Antd5/table/interface.js +1 -1
  312. package/lib/Antd5/table/style/bordered.js +5 -3
  313. package/lib/Antd5/table/style/expand.js +44 -38
  314. package/lib/Antd5/table/style/filter.js +1 -1
  315. package/lib/Antd5/table/style/index.js +26 -21
  316. package/lib/Antd5/table/style/selection.js +3 -1
  317. package/lib/Antd5/table/style/sorter.js +3 -1
  318. package/lib/Antd5/table/style/virtual.js +2 -2
  319. package/lib/Antd5/table/util.js +9 -8
  320. package/lib/Antd5/tabs/style/index.js +2 -2
  321. package/lib/Antd5/tag/style/index.js +2 -2
  322. package/lib/Antd5/theme/index.js +12 -5
  323. package/lib/Antd5/theme/interface/cssinjs-utils.js +1 -0
  324. package/lib/Antd5/theme/internal.js +10 -5
  325. package/lib/Antd5/theme/themes/dark/colors.js +3 -0
  326. package/lib/Antd5/theme/themes/dark/index.js +1 -0
  327. package/lib/Antd5/theme/themes/default/colors.js +3 -0
  328. package/lib/Antd5/theme/themes/default/index.js +6 -2
  329. package/lib/Antd5/theme/themes/seed.js +5 -2
  330. package/lib/Antd5/theme/themes/shared/genColorMapToken.js +2 -0
  331. package/lib/Antd5/theme/themes/shared/genFontSizes.js +1 -1
  332. package/lib/Antd5/theme/useToken.js +2 -1
  333. package/lib/Antd5/theme/util/alias.js +1 -1
  334. package/lib/Antd5/theme/util/genStyleUtils.js +61 -0
  335. package/lib/Antd5/time-picker/index.js +15 -2
  336. package/lib/Antd5/time-picker/locale/az_AZ.js +2 -1
  337. package/lib/Antd5/time-picker/locale/it_IT.js +2 -1
  338. package/lib/Antd5/time-picker/locale/uk_UA.js +2 -1
  339. package/lib/Antd5/timeline/TimelineItemList.js +0 -1
  340. package/lib/Antd5/timeline/style/index.js +1 -1
  341. package/lib/Antd5/tooltip/index.js +3 -2
  342. package/lib/Antd5/tooltip/style/index.js +3 -1
  343. package/lib/Antd5/tooltip/util.js +0 -1
  344. package/lib/Antd5/tour/panelRender.js +7 -13
  345. package/lib/Antd5/tour/style/index.js +6 -13
  346. package/lib/Antd5/transfer/ListItem.js +3 -3
  347. package/lib/Antd5/transfer/hooks/useData.js +1 -1
  348. package/lib/Antd5/transfer/hooks/useSelection.js +26 -21
  349. package/lib/Antd5/transfer/style/index.js +12 -22
  350. package/lib/Antd5/tree/Tree.js +2 -0
  351. package/lib/Antd5/tree/style/directory.js +39 -0
  352. package/lib/Antd5/tree/style/index.js +115 -166
  353. package/lib/Antd5/tree/utils/dropIndicator.js +3 -2
  354. package/lib/Antd5/tree/utils/iconUtil.js +5 -1
  355. package/lib/Antd5/tree-select/index.js +47 -43
  356. package/lib/Antd5/typography/Base/CopyBtn.js +17 -17
  357. package/lib/Antd5/typography/Base/Ellipsis.js +48 -40
  358. package/lib/Antd5/typography/Base/index.js +20 -60
  359. package/lib/Antd5/typography/Base/util.js +31 -1
  360. package/lib/Antd5/typography/Editable.js +11 -10
  361. package/lib/Antd5/typography/Title.js +1 -6
  362. package/lib/Antd5/typography/Typography.js +2 -6
  363. package/lib/Antd5/typography/hooks/useCopyClick.js +3 -2
  364. package/lib/Antd5/typography/hooks/usePrevious.js +1 -1
  365. package/lib/Antd5/{message/assets/Close.js → typography/hooks/useTooltipProps.js} +24 -16
  366. package/lib/Antd5/typography/style/mixins.js +3 -9
  367. package/lib/Antd5/upload/Upload.js +55 -83
  368. package/lib/Antd5/upload/UploadList/ListItem.js +15 -9
  369. package/lib/Antd5/upload/UploadList/index.js +33 -47
  370. package/lib/Antd5/upload/style/dragger.js +5 -26
  371. package/lib/Antd5/upload/style/list.js +2 -7
  372. package/lib/Antd5/version/version.js +1 -1
  373. package/lib/Antd5/watermark/context.js +1 -1
  374. package/lib/Antd5/watermark/index.js +35 -18
  375. package/lib/Antd5/watermark/useClips.js +2 -1
  376. package/lib/Antd5/watermark/useRafDebounce.js +1 -1
  377. package/lib/Antd5/watermark/utils.js +1 -1
  378. package/lib/CWSelect/index.js +39 -1
  379. package/lib/CWSelect/index.style.js +39 -0
  380. package/lib/CWTree/index.js +3 -9
  381. package/lib/CWTree/index.style.js +2 -0
  382. package/lib/ConfigProvider/ConfigProvider.js +9 -10
  383. package/lib/ConfigProvider/customTheme.js +6 -0
  384. package/lib/ConfigProvider/theme/common.js +140 -0
  385. package/lib/ConfigProvider/theme/dark.js +2 -0
  386. package/lib/ConfigProvider/theme/default.js +115 -0
  387. package/lib/ConfigProvider/theme/utils.js +49 -0
  388. package/lib/QuickTransfer/index.js +45 -59
  389. package/lib/Splitter/index.js +2 -0
  390. package/package.json +37 -35
  391. package/lib/Antd5/color-picker/components/PanelPicker.js +0 -53
  392. package/lib/Antd5/color-picker/hooks/useColorState.js +0 -53
  393. package/lib/Antd5/layout/style/light.js +0 -24
  394. package/lib/Antd5/style/operationUnit.js +0 -18
  395. package/lib/Antd5/theme/util/calc/CSSCalculator.js +0 -119
  396. package/lib/Antd5/theme/util/calc/NumCalculator.js +0 -81
  397. package/lib/Antd5/theme/util/calc/calculator.js +0 -10
  398. package/lib/Antd5/theme/util/calc/index.js +0 -9
  399. package/lib/Antd5/theme/util/genComponentStyleHook.js +0 -243
  400. package/lib/Antd5/theme/util/maxmin.js +0 -27
  401. package/lib/Antd5/theme/util/statistic.js +0 -74
  402. package/lib/Antd5/typography/hooks/useUpdatedEffect.js +0 -13
  403. package/lib/Antd5/version/token-meta.json +0 -1
  404. package/lib/Antd5/version/token.json +0 -1
  405. package/lib/ConfigProvider/customTheme.json +0 -163
@@ -0,0 +1,115 @@
1
+ export var defaultToken = {
2
+ colorPrimary: "#1890ff",
3
+ colorLink: "#1890ff",
4
+ colorInfo: "#1890ff",
5
+ colorError: "#f5222d",
6
+ colorText: "rgba(0, 0, 0, 0.85)",
7
+ colorBorder: "rgba(0, 0, 0, 0.15)",
8
+ colorBorderSecondary: "rgba(0, 0, 0, 0.06)",
9
+ // 一般用于边框分割线颜色
10
+ colorTextPlaceholder: "rgba(0,0,0,0.45)"
11
+ };
12
+ export var defaultComponentToken = {
13
+ Layout: {
14
+ bodyBg: "#F4F5FA",
15
+ headerBg: "#1E324E",
16
+ headerColor: ["colorWhite"]
17
+ },
18
+ Breadcrumb: {
19
+ colorBgTextHover: ["colorWhite"] // token变量 fff
20
+ },
21
+ Tooltip: {
22
+ colorBgSpotlight: ["colorWhite"],
23
+ // token变量 fff
24
+ colorTextLightSolid: ["colorText"] // token变量 colorText
25
+ },
26
+ Pagination: {
27
+ controlItemBgActiveDisabled: ["colorFillTertiary"] // token变量colorFillTertiary
28
+ },
29
+ Form: {
30
+ labelColor: ["colorTextSecondary"]
31
+ },
32
+ Slider: {
33
+ trackBgDisabled: "rgb(217, 217, 217)"
34
+ },
35
+ Select: {
36
+ colorText: ["colorText"] // token变量 colorText
37
+ },
38
+ Tag: {
39
+ colorBorder: "rgba(0,0,0,0.09)"
40
+ },
41
+ Table: {
42
+ headerColor: ["colorTextSecondary"],
43
+ // token变量 colorTextSecondary
44
+ rowHoverBg: "#fafafa",
45
+ // token变量 colorFillQuaternary
46
+ rowSelectedBg: "#fafafa",
47
+ // token变量 colorFillQuaternary
48
+ rowSelectedHoverBg: "#fafafa" // token变量 colorFillQuaternary
49
+ },
50
+ Tree: {
51
+ nodeHoverBg: ["colorPrimaryBg"],
52
+ // token变量,悬停色e6f7ff
53
+ nodeSelectedBg: ["colorPrimaryBg"],
54
+ // token变量,悬停色e6f7ff
55
+ directoryNodeSelectedBg: ["colorPrimaryBg"],
56
+ controlItemBgHover: ["colorPrimaryBg"],
57
+ colorBgContainer: "transparent",
58
+ directoryNodeSelectedColor: ["colorText"],
59
+ colorBgTextHover: "transparent"
60
+ },
61
+ Upload: {
62
+ colorFillAlter: ["colorWhite"]
63
+ },
64
+ Menu: {
65
+ itemHoverBg: "#F6F7F8",
66
+ itemActiveBg: "#F6F7F8",
67
+ itemSelectedBg: "#F6F7F8",
68
+ subMenuItemBg: "transparent",
69
+ itemBg: ["colorWhite"]
70
+ }
71
+ };
72
+
73
+ // 不可删除,因为组件中在使用
74
+ export var undeletableComponentToken = {
75
+ Layout: {
76
+ bodyBg: "#F4F5FA",
77
+ headerBg: "#1E324E",
78
+ headerColor: ["colorWhite"],
79
+ headerHeight: 48,
80
+ headerPadding: 0,
81
+ divisionBg: "rgba(255, 255, 255, 0.3)",
82
+ // 自定义分割线颜色
83
+ topNavMenuBg: "#FAFBFE" // 自定义头部下拉导航背景色
84
+ },
85
+ Notification: {
86
+ zIndexPopup: 950 // 不要删除
87
+ },
88
+ Button: {
89
+ btnMainPadding: "0 23px" // 主操作按钮padding
90
+ },
91
+ AbreastLayout: {
92
+ abreastLayoutContentPadding: "0 20px 0 16px",
93
+ // 左右布局内容区域padding
94
+ siderCollapseBtnBg: ["colorBorderSecondary"] // 左右布局收起按钮背景色
95
+ },
96
+ Tabs: {
97
+ tabsBorderColor: "rgba(0,0,0,0.09)"
98
+ },
99
+ BasicLayout: {
100
+ collapsedBtnBg: "#F6F7F8",
101
+ siderBtnColor: ["colorTextTertiary"],
102
+ versionColor: ["colorTextSecondary"],
103
+ siderBorderColor: "rgba(0, 0, 0, 0.09)"
104
+ },
105
+ Tag: {
106
+ checkableTagBg: "rgba(0, 0, 0, 0.06)",
107
+ checkableTagHoverBg: "rgba(0, 0, 0, 0.09)"
108
+ },
109
+ SearchBar: {
110
+ searchBarExpandIconBg: "#F2F3F5"
111
+ },
112
+ QuickTransfer: {
113
+ quickTransferDivisionBg: "#f5f5f5"
114
+ }
115
+ };
@@ -0,0 +1,49 @@
1
+ import _Theme from "@chaoswise/ui/lib/Theme";
2
+ var _excluded = ["token", "components"];
3
+ 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; }
4
+ 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; }
5
+ 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); }
6
+ import { commonToken, commonComponentToken } from "./common";
7
+ import { defaultToken, defaultComponentToken, undeletableComponentToken } from "./default";
8
+ import { merge } from "lodash-es";
9
+ // 生成组件相匹配的组件token,如果组件token中value是字符串组成的数组则进行主题token的替换
10
+ export var generateComponentToken = function generateComponentToken(token, ComponentToken) {
11
+ var _replaceValues = function replaceValues(obj) {
12
+ for (var key in obj) {
13
+ if (Array.isArray(obj[key])) {
14
+ // 替换数组中的值
15
+ obj[key] = token[obj[key][0]] || obj[key];
16
+ } else if (_typeof(obj[key]) === "object") {
17
+ _replaceValues(obj[key]);
18
+ }
19
+ }
20
+ };
21
+ var newComponentToken = JSON.parse(JSON.stringify(ComponentToken));
22
+
23
+ // 开始替换
24
+ _replaceValues(newComponentToken);
25
+ return newComponentToken;
26
+ };
27
+
28
+ // 生成最终的主题信息,后续传入优先级更高
29
+ export var getFinalTheme = function getFinalTheme(theme) {
30
+ var _ref = theme || {},
31
+ _ref$token = _ref.token,
32
+ token = _ref$token === void 0 ? {} : _ref$token,
33
+ _ref$components = _ref.components,
34
+ components = _ref$components === void 0 ? {} : _ref$components,
35
+ rest = _objectWithoutProperties(_ref, _excluded);
36
+ var mergeToken = merge({}, commonToken, defaultToken, token);
37
+ var globalToken = _Theme.getDesignToken({
38
+ token: mergeToken
39
+ });
40
+ var generateReplaceComponentToken = generateComponentToken(globalToken, defaultComponentToken);
41
+ var generateUndeletableComponentToken = generateComponentToken(globalToken, undeletableComponentToken);
42
+ var mergeComponentToken = merge({}, commonComponentToken, generateReplaceComponentToken, generateUndeletableComponentToken, components);
43
+ var mergeDefaultThemeToken = merge({}, {
44
+ token: mergeToken
45
+ }, {
46
+ components: mergeComponentToken
47
+ }, rest);
48
+ return mergeDefaultThemeToken;
49
+ };
@@ -29,7 +29,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
29
29
  function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
30
30
  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; }
31
31
  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; }
32
- import React, { useState, useEffect, Fragment, forwardRef, useMemo } from "react";
32
+ import React, { useState, useEffect, Fragment, forwardRef, useMemo, useCallback } from "react";
33
33
  import { filterTreeByName, filterTree, filterTreeByNameTable, filterObj, getNotSelectKeys, getKeysAndTitle, getBottomKey, renderLeafNodetree, renderRelationNode, createTitle } from "./utils";
34
34
  import classnames from "classnames";
35
35
  import Drag from "./Drag";
@@ -256,21 +256,6 @@ var QuickTransfer = /*#__PURE__*/forwardRef(function (props, ref) {
256
256
  return !i.disabled;
257
257
  }));
258
258
  setCheckValue(finalCheckValue);
259
- var newData = [];
260
- var listCheckedKeys_ = [];
261
- dataSource.forEach(function (item, index) {
262
- if (isMath(item.title, saveSearchValueLeft)) {
263
- newData.push(dataSource[index]);
264
- }
265
- });
266
- listCheckedKeys_ = newData.filter(function (item) {
267
- return finalCheckValue.find(function (i) {
268
- return i.key == item.key;
269
- });
270
- }).map(function (item) {
271
- return item.key;
272
- });
273
- setListCheckedStyle(listCheckedKeys_, newData);
274
259
  }
275
260
  //回显table
276
261
  if (type === "table") {
@@ -286,19 +271,51 @@ var QuickTransfer = /*#__PURE__*/forwardRef(function (props, ref) {
286
271
  }
287
272
  }
288
273
  }
289
- }, [targetKeys, dataSource, saveSearchValueLeft]);
290
- //触发前端自定义搜索
274
+ }, [targetKeys, dataSource]);
291
275
  useEffect(function () {
292
- if (searchValueLeft !== undefined) {
293
- handleSearch(searchValueLeft);
276
+ // 左侧受控值绑定
277
+ if (searchValueLeft !== undefined && searchValueLeft !== saveSearchValueLeft) {
294
278
  // 初始化搜索结果
295
279
  setSaveSearchValueLeft(searchValueLeft);
296
280
  }
297
- if (searchValueRight !== undefined) {
281
+ }, [searchValueLeft, saveSearchValueLeft]);
282
+ useEffect(function () {
283
+ // 右侧受控值绑定
284
+ if (searchValueRight !== undefined && searchValueRight !== saveSearchValueRight) {
298
285
  // 初始化搜索结果
299
286
  setSaveSearchValueRight(searchValueRight);
300
287
  }
301
- }, [searchValueLeft, searchValueRight]);
288
+ }, [searchValueRight, saveSearchValueRight]);
289
+
290
+ // 左侧搜索框输入触发
291
+ var handleSearch = useCallback(function (searchValue) {
292
+ var newData = [];
293
+ var listCheckedKeys_ = [];
294
+ if (type === "list") {
295
+ dataSource.forEach(function (item, index) {
296
+ if (isMath(item.title, searchValue)) {
297
+ newData.push(dataSource[index]);
298
+ }
299
+ });
300
+ listCheckedKeys_ = newData.filter(function (item) {
301
+ return checkValue.find(function (i) {
302
+ return i.key == item.key;
303
+ });
304
+ }).map(function (item) {
305
+ return item.key;
306
+ });
307
+ setData(newData);
308
+ setListCheckedStyle(listCheckedKeys_, newData);
309
+ }
310
+ if (type === "table") {
311
+ newData = filterTreeByNameTable(dataSource, searchValue, searchColumns ? searchColumns : newSearchColumns);
312
+ setData(newData);
313
+ }
314
+ }, [dataSource, checkValue]);
315
+ useEffect(function () {
316
+ handleSearch(saveSearchValueLeft);
317
+ }, [handleSearch, saveSearchValueLeft]);
318
+
302
319
  //获取左侧列表选中的key
303
320
  useEffect(function () {
304
321
  if (getTargetKeys) {
@@ -346,35 +363,6 @@ var QuickTransfer = /*#__PURE__*/forwardRef(function (props, ref) {
346
363
  setIndeterminate(!!listCheckedKeys.length && listCheckedKeys.length < dataSource.length);
347
364
  setCheckAll(listCheckedKeys.length === dataSource.length);
348
365
  };
349
- // 左侧搜索框输入触发
350
- var handleSearch = function handleSearch(searchValue) {
351
- var newData = [];
352
- var listCheckedKeys_ = [];
353
- if (type === "list") {
354
- dataSource.forEach(function (item, index) {
355
- if (isMath(item.title, searchValue)) {
356
- newData.push(dataSource[index]);
357
- }
358
- });
359
- listCheckedKeys_ = newData.filter(function (item) {
360
- return checkValue.find(function (i) {
361
- return i.key == item.key;
362
- });
363
- }).map(function (item) {
364
- return item.key;
365
- });
366
- setData(newData);
367
- setListCheckedStyle(listCheckedKeys_, newData);
368
- }
369
- // if (type === "tree") {
370
- // newData = filterTree(dataSource, searchValue);
371
- // setData(newData);
372
- // }
373
- if (type === "table") {
374
- newData = filterTreeByNameTable(dataSource, searchValue, searchColumns ? searchColumns : newSearchColumns);
375
- setData(newData);
376
- }
377
- };
378
366
 
379
367
  //type为list 左侧列表选中触发的事件
380
368
  var onChangeChecked = function onChangeChecked(e, value) {
@@ -595,17 +583,15 @@ var QuickTransfer = /*#__PURE__*/forwardRef(function (props, ref) {
595
583
  var showSearchChange = function showSearchChange(e) {
596
584
  onSearchChange && onSearchChange(e);
597
585
  onLeftSearchChange && onLeftSearchChange(e);
598
- // 保存搜索结果
599
- if (searchValueLeft === undefined) {
600
- handleSearch(e.target.value);
601
- setSaveSearchValueLeft(e.target.value);
602
- }
586
+ // 保存搜索结果,实时保存不然受控模式中文会有问题
587
+ // if (searchValueLeft === undefined) {
588
+ setSaveSearchValueLeft(e.target.value);
589
+ // handleSearch(e.target.value);
590
+ // }
603
591
  };
604
592
  var showSearchChangeRight = function showSearchChangeRight(e) {
605
593
  onRightSearchChange(e);
606
- if (searchValueRight === undefined) {
607
- setSaveSearchValueRight(e.target.value);
608
- }
594
+ setSaveSearchValueRight(e.target.value);
609
595
  };
610
596
  // 全选状态改变触发
611
597
  var onCheckAllChange = function onCheckAllChange(e) {
@@ -0,0 +1,2 @@
1
+ import Splitter from '../Antd5/splitter';
2
+ export default Splitter;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@chaoswise/ui",
3
3
  "packageName": "chaoswiseUI",
4
- "version": "3.0.23",
4
+ "version": "3.1.0",
5
5
  "description": "公共UI库",
6
6
  "keywords": [
7
7
  "ui",
@@ -19,15 +19,16 @@
19
19
  "build": "gulp es --gulpfile ./scripts/gulpfile.js"
20
20
  },
21
21
  "dependencies": {
22
- "@ant-design/colors": "^7.0.2",
22
+ "@ant-design/colors": "^7.1.0",
23
23
  "@ant-design/create-react-context": "^0.2.6",
24
- "@ant-design/cssinjs": "^1.19.1",
25
- "@ant-design/icons": "^5.3.7",
24
+ "@ant-design/cssinjs": "^1.21.1",
25
+ "@ant-design/cssinjs-utils": "^1.1.1",
26
+ "@ant-design/icons": "^5.5.1",
26
27
  "@ant-design/react-slick": "~1.1.2",
27
28
  "@antv/g6": "^4.8.24",
28
- "@babel/runtime": "^7.18.3",
29
+ "@babel/runtime": "^7.25.7",
29
30
  "@chaoswise/ace": "^1.4.13",
30
- "@chaoswise/cssinjs": "^1.0.5",
31
+ "@chaoswise/cssinjs": "^1.0.6",
31
32
  "@chaoswise/icons-svg": "^1.0.1",
32
33
  "@chaoswise/utils": "^0.0.35",
33
34
  "@ctrl/tinycolor": "^3.6.1",
@@ -37,53 +38,54 @@
37
38
  "@emotion/server": "^11.11.0",
38
39
  "@emotion/styled": "^11.11.0",
39
40
  "@icon-park/react": "^1.4.2",
40
- "@rc-component/color-picker": "~1.5.1",
41
+ "@rc-component/color-picker": "~2.0.1",
41
42
  "@rc-component/mutate-observer": "^1.1.0",
42
- "@rc-component/tour": "~1.12.2",
43
- "@rc-component/trigger": "^1.18.2",
43
+ "@rc-component/qrcode": "~1.0.0",
44
+ "@rc-component/tour": "~1.15.1",
45
+ "@rc-component/trigger": "^2.2.5",
44
46
  "classnames": "^2.5.1",
45
47
  "copy-to-clipboard": "^3.3.3",
46
- "dayjs": "^1.11.10",
48
+ "dayjs": "^1.11.11",
47
49
  "echarts": "^5.4.3",
48
50
  "echarts-for-react": "^3.0.2",
49
51
  "highlight.js": "^9.18.5",
50
52
  "moment-timezone": "^0.5.46",
51
53
  "omit.js": "^2.0.2",
52
54
  "qrcode.react": "^3.1.0",
53
- "rc-cascader": "~3.27.0",
55
+ "rc-cascader": "~3.30.0",
54
56
  "rc-checkbox": "~3.3.0",
55
- "rc-collapse": "~3.7.3",
56
- "rc-dialog": "~9.5.2",
57
+ "rc-collapse": "~3.9.0",
58
+ "rc-dialog": "~9.6.0",
57
59
  "rc-drawer": "~7.2.0",
58
60
  "rc-dropdown": "~4.2.0",
59
- "rc-field-form": "~2.4.0",
61
+ "rc-field-form": "~2.5.1",
60
62
  "rc-form": "^2.4.12",
61
- "rc-image": "~7.9.0",
63
+ "rc-image": "~7.11.0",
62
64
  "rc-input": "~1.6.3",
63
- "rc-input-number": "~9.2.0",
64
- "rc-mentions": "~2.15.0",
65
- "rc-menu": "~9.14.1",
66
- "rc-motion": "^2.9.2",
67
- "rc-notification": "~5.6.0",
68
- "rc-pagination": "~4.2.0",
69
- "rc-picker": "~4.6.13",
65
+ "rc-input-number": "~9.3.0",
66
+ "rc-mentions": "~2.17.0",
67
+ "rc-menu": "~9.16.0",
68
+ "rc-motion": "^2.9.3",
69
+ "rc-notification": "~5.6.2",
70
+ "rc-pagination": "~4.3.0",
71
+ "rc-picker": "~4.8.1",
70
72
  "rc-progress": "~4.0.0",
71
73
  "rc-rate": "~2.13.0",
72
74
  "rc-resize-observer": "^1.4.0",
73
- "rc-segmented": "~2.3.0",
74
- "rc-select": "~14.15.1",
75
+ "rc-segmented": "~2.5.0",
76
+ "rc-select": "~14.16.3",
75
77
  "rc-select-cascader": "npm:rc-select@^14.3.0",
76
- "rc-slider": "~11.1.5",
78
+ "rc-slider": "~11.1.7",
77
79
  "rc-steps": "~6.0.1",
78
80
  "rc-switch": "~4.1.0",
79
- "rc-table": "~7.45.7",
80
- "rc-tabs": "~15.1.1",
81
- "rc-textarea": "~1.8.1",
82
- "rc-tooltip": "~6.2.0",
83
- "rc-tree": "~5.8.8",
81
+ "rc-table": "~7.48.1",
82
+ "rc-tabs": "~15.4.0",
83
+ "rc-textarea": "~1.8.2",
84
+ "rc-tooltip": "~6.2.1",
85
+ "rc-tree": "~5.10.1",
84
86
  "rc-tree-cascader": "npm:rc-tree@^5.7.12",
85
- "rc-tree-select": "~5.22.1",
86
- "rc-upload": "~4.7.0",
87
+ "rc-tree-select": "~5.24.4",
88
+ "rc-upload": "~4.8.1",
87
89
  "rc-util": "^5.43.0",
88
90
  "re-resizable": "^6.9.11",
89
91
  "react-custom-scrollbars": "^4.2.1",
@@ -127,9 +129,9 @@
127
129
  "gulp": "^4.0.2",
128
130
  "gulp-babel": "^8.0.0",
129
131
  "gulp-typescript": "^5.0.1",
130
- "react": "^18.0.0",
131
- "react-dom": "^18.0.0",
132
- "react-router-dom": "^5.3.4",
132
+ "react": "^18.3.1",
133
+ "react-dom": "^18.3.1",
134
+ "react-router-dom": "^5.2.0",
133
135
  "storybook": "^7.5.3",
134
136
  "typescript": "^5.0.2",
135
137
  "webpack": "^5.89.0",
@@ -1,53 +0,0 @@
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", "allowClear", "value", "disabledAlpha", "onChange", "onClear", "onChangeComplete"];
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
- 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
- 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
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
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; }
10
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
11
- import React, { useContext } from 'react';
12
- import RcColorPicker from '@rc-component/color-picker';
13
- import { PanelPickerContext } from '../context';
14
- import { generateColor } from '../util';
15
- import ColorClear from './ColorClear';
16
- import ColorInput from './ColorInput';
17
- var PanelPicker = function PanelPicker() {
18
- var _useContext = useContext(PanelPickerContext),
19
- prefixCls = _useContext.prefixCls,
20
- allowClear = _useContext.allowClear,
21
- value = _useContext.value,
22
- disabledAlpha = _useContext.disabledAlpha,
23
- _onChange = _useContext.onChange,
24
- onClear = _useContext.onClear,
25
- _onChangeComplete = _useContext.onChangeComplete,
26
- injectProps = _objectWithoutProperties(_useContext, _excluded);
27
- return _jsxs(_Fragment, {
28
- children: [allowClear && _jsx(ColorClear, _objectSpread({
29
- prefixCls: prefixCls,
30
- value: value,
31
- onChange: function onChange(clearColor) {
32
- _onChange === null || _onChange === void 0 || _onChange(clearColor);
33
- onClear === null || onClear === void 0 || onClear();
34
- }
35
- }, injectProps)), _jsx(RcColorPicker, {
36
- prefixCls: prefixCls,
37
- value: value === null || value === void 0 ? void 0 : value.toHsb(),
38
- disabledAlpha: disabledAlpha,
39
- onChange: function onChange(colorValue, type) {
40
- _onChange === null || _onChange === void 0 || _onChange(generateColor(colorValue), type, true);
41
- },
42
- onChangeComplete: function onChangeComplete(colorValue) {
43
- _onChangeComplete === null || _onChangeComplete === void 0 || _onChangeComplete(generateColor(colorValue));
44
- }
45
- }), _jsx(ColorInput, _objectSpread({
46
- value: value,
47
- onChange: _onChange,
48
- prefixCls: prefixCls,
49
- disabledAlpha: disabledAlpha
50
- }, injectProps))]
51
- });
52
- };
53
- export default PanelPicker;
@@ -1,53 +0,0 @@
1
- function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
2
- 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."); }
3
- 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; } }
4
- 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; }
5
- 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; } }
6
- function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
7
- import { useEffect, useRef, useState } from 'react';
8
- import { generateColor } from '../util';
9
- var INIT_COLOR_REF = {};
10
- function hasValue(value) {
11
- return value !== undefined;
12
- }
13
- var useColorState = function useColorState(defaultStateValue, option) {
14
- var defaultValue = option.defaultValue,
15
- value = option.value;
16
- var prevColor = useRef(generateColor(''));
17
- var _useState = useState(function () {
18
- var mergedState;
19
- if (hasValue(value)) {
20
- mergedState = value;
21
- } else if (hasValue(defaultValue)) {
22
- mergedState = defaultValue;
23
- } else {
24
- mergedState = defaultStateValue;
25
- }
26
- var color = generateColor(mergedState || '');
27
- prevColor.current = color;
28
- return color;
29
- }),
30
- _useState2 = _slicedToArray(_useState, 2),
31
- colorValue = _useState2[0],
32
- _setColorValue = _useState2[1];
33
- var setColorValue = function setColorValue(color) {
34
- _setColorValue(color);
35
- prevColor.current = color;
36
- };
37
- var prevValue = useRef(INIT_COLOR_REF);
38
- useEffect(function () {
39
- // `useEffect` will be executed twice in strict mode even if the deps are the same
40
- // So we compare the value manually to avoid unnecessary update
41
- if (prevValue.current === value) {
42
- return;
43
- }
44
- prevValue.current = value;
45
- var newColor = generateColor(hasValue(value) ? value || '' : prevColor.current);
46
- if (prevColor.current.cleared === true) {
47
- newColor.cleared = 'controlled';
48
- }
49
- setColorValue(newColor);
50
- }, [value]);
51
- return [colorValue, setColorValue, prevColor];
52
- };
53
- export default useColorState;
@@ -1,24 +0,0 @@
1
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- function _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; }
3
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
4
- 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); }
5
- var genLayoutLightStyle = function genLayoutLightStyle(token) {
6
- var componentCls = token.componentCls,
7
- bodyBg = token.bodyBg,
8
- lightSiderBg = token.lightSiderBg,
9
- lightTriggerBg = token.lightTriggerBg,
10
- lightTriggerColor = token.lightTriggerColor;
11
- return _defineProperty({}, "".concat(componentCls, "-sider-light"), _defineProperty(_defineProperty({
12
- background: lightSiderBg
13
- }, "".concat(componentCls, "-sider-trigger"), {
14
- color: lightTriggerColor,
15
- background: lightTriggerBg
16
- }), "".concat(componentCls, "-sider-zero-width-trigger"), {
17
- color: lightTriggerColor,
18
- background: lightTriggerBg,
19
- border: "1px solid ".concat(bodyBg),
20
- // Safe to modify to any other color
21
- borderInlineStart: 0
22
- }));
23
- };
24
- export default genLayoutLightStyle;
@@ -1,18 +0,0 @@
1
- // eslint-disable-next-line import/prefer-default-export
2
- export var operationUnit = function operationUnit(token) {
3
- return {
4
- // FIXME: This use link but is a operation unit. Seems should be a colorPrimary.
5
- // And Typography use this to generate link style which should not do this.
6
- color: token.colorLink,
7
- textDecoration: 'none',
8
- outline: 'none',
9
- cursor: 'pointer',
10
- transition: "color ".concat(token.motionDurationSlow),
11
- '&:focus, &:hover': {
12
- color: token.colorLinkHover
13
- },
14
- '&:active': {
15
- color: token.colorLinkActive
16
- }
17
- };
18
- };