@ant-design/pro-components 3.1.3-1 → 3.1.5-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 (338) hide show
  1. package/dist/pro-components.min.js +1 -1
  2. package/es/card/ProCard.js +15 -7
  3. package/es/card/components/Actions/index.js +1 -4
  4. package/es/card/components/Card/index.js +60 -28
  5. package/es/card/components/Card/style.js +46 -9
  6. package/es/card/components/CheckCard/Group.js +1 -3
  7. package/es/card/components/CheckCard/index.js +0 -1
  8. package/es/card/components/Divider/index.d.ts +1 -1
  9. package/es/card/components/Divider/index.js +2 -2
  10. package/es/card/components/Divider/style.d.ts +4 -1
  11. package/es/card/components/Divider/style.js +6 -39
  12. package/es/card/components/Statistic/index.js +3 -3
  13. package/es/card/components/StatisticCard/index.js +1 -1
  14. package/es/card/typing.d.ts +29 -14
  15. package/es/descriptions/index.d.ts +3 -5
  16. package/es/descriptions/index.js +6 -6
  17. package/es/descriptions/useFetchData.js +0 -1
  18. package/es/field/AllProField.d.ts +2 -0
  19. package/es/field/AllProField.js +3 -4
  20. package/es/field/PureProField.d.ts +2 -0
  21. package/es/field/PureProField.js +2 -5
  22. package/es/field/components/Cascader/index.js +8 -1
  23. package/es/field/components/Checkbox/index.js +7 -6
  24. package/es/field/components/DatePicker/index.d.ts +1 -1
  25. package/es/field/components/DatePicker/index.js +13 -1
  26. package/es/field/components/Digit/index.js +20 -3
  27. package/es/field/components/DigitRange/index.js +1 -0
  28. package/es/field/components/Money/index.js +51 -3
  29. package/es/field/components/Options/index.js +0 -3
  30. package/es/field/components/Password/index.js +12 -11
  31. package/es/field/components/Percent/util.d.ts +1 -1
  32. package/es/field/components/Radio/index.js +5 -1
  33. package/es/field/components/RangePicker/index.d.ts +1 -1
  34. package/es/field/components/Segmented/index.js +2 -1
  35. package/es/field/components/Select/SearchSelect/index.js +0 -1
  36. package/es/field/components/Select/index.d.ts +1 -1
  37. package/es/field/components/Select/index.js +1 -1
  38. package/es/field/components/Switch/index.js +10 -3
  39. package/es/field/components/Text/index.js +11 -2
  40. package/es/field/components/TextArea/index.js +6 -3
  41. package/es/field/components/TimePicker/index.js +10 -1
  42. package/es/field/components/TreeSelect/index.d.ts +2 -12
  43. package/es/field/components/TreeSelect/index.js +31 -17
  44. package/es/form/BaseForm/BaseForm.js +4 -6
  45. package/es/form/BaseForm/LightWrapper/index.d.ts +2 -1
  46. package/es/form/BaseForm/Submitter/index.d.ts +1 -1
  47. package/es/form/components/Captcha/index.js +0 -3
  48. package/es/form/components/Checkbox/index.js +5 -1
  49. package/es/form/components/DatePicker/index.js +0 -2
  50. package/es/form/components/Digit/DigitRange.js +5 -2
  51. package/es/form/components/Digit/index.js +7 -2
  52. package/es/form/components/FieldSet/index.js +16 -6
  53. package/es/form/components/FormItem/FormItemRender/index.d.ts +1 -1
  54. package/es/form/components/FormItem/FormItemRender/index.js +10 -2
  55. package/es/form/components/FormItem/Group/index.js +1 -1
  56. package/es/form/components/FormItem/index.js +9 -7
  57. package/es/form/components/FormItem/warpField.js +3 -15
  58. package/es/form/components/List/ListContainer.js +2 -1
  59. package/es/form/components/List/index.d.ts +1 -1
  60. package/es/form/components/List/index.js +0 -2
  61. package/es/form/components/Radio/index.js +5 -4
  62. package/es/form/components/SchemaForm/index.js +0 -1
  63. package/es/form/components/SchemaForm/layoutType/StepsForm.js +0 -1
  64. package/es/form/components/Select/index.js +11 -2
  65. package/es/form/components/Text/index.js +0 -3
  66. package/es/form/components/UploadButton/index.js +4 -2
  67. package/es/form/components/UploadDragger/index.js +0 -1
  68. package/es/form/helpers/grid.js +1 -5
  69. package/es/form/layouts/DrawerForm/index.d.ts +4 -4
  70. package/es/form/layouts/DrawerForm/index.js +2 -6
  71. package/es/form/layouts/LightFilter/index.js +5 -6
  72. package/es/form/layouts/LoginForm/index.js +8 -8
  73. package/es/form/layouts/LoginFormPage/index.js +15 -15
  74. package/es/form/layouts/ModalForm/index.d.ts +2 -2
  75. package/es/form/layouts/ModalForm/index.js +1 -4
  76. package/es/form/layouts/QueryFilter/Actions.js +2 -1
  77. package/es/form/layouts/QueryFilter/index.js +40 -24
  78. package/es/form/layouts/StepsForm/StepForm.js +0 -1
  79. package/es/form/layouts/StepsForm/index.js +5 -14
  80. package/es/layout/ProLayout.d.ts +1 -1
  81. package/es/layout/ProLayout.js +2 -7
  82. package/es/layout/components/AppsLogoComponents/DefaultContent.js +6 -5
  83. package/es/layout/components/AppsLogoComponents/SimpleContent.js +6 -5
  84. package/es/layout/components/AppsLogoComponents/style/index.js +4 -0
  85. package/es/layout/components/FooterToolbar/index.d.ts +1 -1
  86. package/es/layout/components/FooterToolbar/index.js +2 -5
  87. package/es/layout/components/GlobalFooter/index.js +3 -3
  88. package/es/layout/components/GlobalHeader/ActionsContent.js +6 -7
  89. package/es/layout/components/GlobalHeader/index.js +1 -1
  90. package/es/layout/components/GridContent/index.js +1 -1
  91. package/es/layout/components/Header/index.js +1 -3
  92. package/es/layout/components/Help/ProHelpPanel.js +11 -10
  93. package/es/layout/components/PageContainer/index.js +9 -10
  94. package/es/layout/components/PageContainer/style/index.js +4 -0
  95. package/es/layout/components/PageHeader/index.js +10 -10
  96. package/es/layout/components/SettingDrawer/BlockCheckbox.js +2 -3
  97. package/es/layout/components/SettingDrawer/LayoutChange.js +3 -2
  98. package/es/layout/components/SettingDrawer/RegionalChange.js +3 -2
  99. package/es/layout/components/SettingDrawer/ThemeColor.js +3 -2
  100. package/es/layout/components/SettingDrawer/index.js +5 -5
  101. package/es/layout/components/SettingDrawer/style/index.js +4 -0
  102. package/es/layout/components/SiderMenu/BaseMenu.js +5 -9
  103. package/es/layout/components/SiderMenu/SiderMenu.js +6 -8
  104. package/es/layout/components/SiderMenu/index.js +0 -1
  105. package/es/layout/components/TopNavHeader/index.js +4 -5
  106. package/es/layout/style/index.js +4 -0
  107. package/es/layout/utils/getBreadcrumbProps.js +1 -1
  108. package/es/layout/utils/getMenuData.js +0 -1
  109. package/es/list/Item.d.ts +4 -7
  110. package/es/list/Item.js +82 -104
  111. package/es/list/ListView.d.ts +6 -4
  112. package/es/list/ListView.js +42 -55
  113. package/es/list/ProListBase.d.ts +74 -0
  114. package/es/list/ProListBase.js +358 -0
  115. package/es/list/constants.d.ts +2 -2
  116. package/es/list/constants.js +2 -5
  117. package/es/list/index.d.ts +23 -13
  118. package/es/list/index.js +78 -41
  119. package/es/list/style/index.d.ts +0 -1
  120. package/es/list/style/index.js +228 -86
  121. package/es/provider/index.d.ts +2 -2
  122. package/es/provider/index.js +0 -3
  123. package/es/provider/useStyle/index.d.ts +1 -21
  124. package/es/provider/useStyle/index.js +6 -3
  125. package/es/skeleton/components/Descriptions/index.js +1 -4
  126. package/es/skeleton/components/List/index.js +1 -4
  127. package/es/table/Store/Provide.js +0 -2
  128. package/es/table/Table.js +17 -17
  129. package/es/table/components/Alert/index.js +6 -5
  130. package/es/table/components/ColumnSetting/index.js +9 -10
  131. package/es/table/components/DragSortTable/index.js +8 -4
  132. package/es/table/components/EditableTable/index.d.ts +1 -1
  133. package/es/table/components/EditableTable/index.js +6 -8
  134. package/es/table/components/ListToolBar/HeaderMenu.d.ts +1 -0
  135. package/es/table/components/ListToolBar/HeaderMenu.js +4 -3
  136. package/es/table/components/ListToolBar/index.d.ts +1 -1
  137. package/es/table/components/ListToolBar/index.js +18 -21
  138. package/es/table/components/ListToolBar/style.js +3 -3
  139. package/es/table/components/ToolBar/index.d.ts +1 -1
  140. package/es/table/style/index.js +4 -0
  141. package/es/table/typing.d.ts +10 -5
  142. package/es/table/useFetchData.js +4 -4
  143. package/es/table/utils/cellRenderToFromItem.js +2 -4
  144. package/es/table/utils/index.js +0 -1
  145. package/es/table/utils/useDragSort.js +1 -1
  146. package/es/utils/components/DropdownFooter/index.d.ts +1 -1
  147. package/es/utils/components/FieldLabel/index.js +1 -1
  148. package/es/utils/components/FilterDropdown/index.d.ts +1 -1
  149. package/es/utils/components/FilterDropdown/index.js +1 -1
  150. package/es/utils/components/InlineErrorFormItem/index.js +5 -4
  151. package/es/utils/components/LabelIconTip/index.d.ts +3 -4
  152. package/es/utils/components/LabelIconTip/index.js +2 -2
  153. package/es/utils/genCopyable/index.d.ts +6 -0
  154. package/es/utils/genCopyable/index.js +28 -8
  155. package/es/utils/hooks/useDebounceValue/index.js +1 -3
  156. package/es/utils/hooks/useDeepCompareEffect/index.js +0 -2
  157. package/es/utils/hooks/useFetchData/index.js +0 -2
  158. package/es/utils/index.d.ts +2 -1
  159. package/es/utils/isDeepEqualReact/index.js +0 -8
  160. package/es/utils/isUrl/index.js +1 -1
  161. package/es/utils/merge/index.js +0 -3
  162. package/es/utils/nanoid/index.d.ts +1 -3
  163. package/es/utils/nanoid/index.js +2 -10
  164. package/es/utils/proFieldParsingText/index.d.ts +2 -2
  165. package/es/utils/proFieldParsingText/index.js +3 -5
  166. package/es/utils/typing.d.ts +2 -1
  167. package/es/utils/useEditableArray/index.js +1 -1
  168. package/es/utils/useEditableMap/index.js +1 -1
  169. package/guidelines/components/pro-card.md +5 -4
  170. package/guidelines/overview-components.md +1 -1
  171. package/lib/card/ProCard.js +15 -7
  172. package/lib/card/components/Actions/index.js +1 -4
  173. package/lib/card/components/Card/index.js +60 -28
  174. package/lib/card/components/Card/style.js +46 -9
  175. package/lib/card/components/CheckCard/Group.js +1 -3
  176. package/lib/card/components/CheckCard/index.js +0 -1
  177. package/lib/card/components/Divider/index.d.ts +1 -1
  178. package/lib/card/components/Divider/index.js +2 -2
  179. package/lib/card/components/Divider/style.d.ts +4 -1
  180. package/lib/card/components/Divider/style.js +5 -39
  181. package/lib/card/components/Statistic/index.js +3 -3
  182. package/lib/card/components/StatisticCard/index.js +1 -1
  183. package/lib/card/typing.d.ts +29 -14
  184. package/lib/descriptions/index.d.ts +3 -5
  185. package/lib/descriptions/index.js +6 -6
  186. package/lib/descriptions/useFetchData.js +0 -1
  187. package/lib/field/AllProField.d.ts +2 -0
  188. package/lib/field/AllProField.js +3 -4
  189. package/lib/field/PureProField.d.ts +2 -0
  190. package/lib/field/PureProField.js +2 -5
  191. package/lib/field/components/Cascader/index.js +8 -1
  192. package/lib/field/components/Checkbox/index.js +7 -6
  193. package/lib/field/components/DatePicker/index.d.ts +1 -1
  194. package/lib/field/components/DatePicker/index.js +13 -1
  195. package/lib/field/components/Digit/index.js +20 -3
  196. package/lib/field/components/DigitRange/index.js +1 -0
  197. package/lib/field/components/Money/index.js +50 -2
  198. package/lib/field/components/Options/index.js +0 -3
  199. package/lib/field/components/Password/index.js +11 -10
  200. package/lib/field/components/Percent/util.d.ts +1 -1
  201. package/lib/field/components/Radio/index.js +5 -1
  202. package/lib/field/components/RangePicker/index.d.ts +1 -1
  203. package/lib/field/components/Segmented/index.js +2 -1
  204. package/lib/field/components/Select/SearchSelect/index.js +0 -1
  205. package/lib/field/components/Select/index.d.ts +1 -1
  206. package/lib/field/components/Select/index.js +1 -1
  207. package/lib/field/components/Switch/index.js +10 -3
  208. package/lib/field/components/Text/index.js +11 -2
  209. package/lib/field/components/TextArea/index.js +6 -3
  210. package/lib/field/components/TimePicker/index.js +10 -1
  211. package/lib/field/components/TreeSelect/index.d.ts +2 -12
  212. package/lib/field/components/TreeSelect/index.js +30 -16
  213. package/lib/form/BaseForm/BaseForm.js +4 -7
  214. package/lib/form/BaseForm/LightWrapper/index.d.ts +2 -1
  215. package/lib/form/BaseForm/Submitter/index.d.ts +1 -1
  216. package/lib/form/components/Captcha/index.js +0 -3
  217. package/lib/form/components/Checkbox/index.js +5 -1
  218. package/lib/form/components/DatePicker/index.js +0 -2
  219. package/lib/form/components/Digit/DigitRange.js +5 -2
  220. package/lib/form/components/Digit/index.js +7 -2
  221. package/lib/form/components/FieldSet/index.js +16 -6
  222. package/lib/form/components/FormItem/FormItemRender/index.d.ts +1 -1
  223. package/lib/form/components/FormItem/FormItemRender/index.js +10 -2
  224. package/lib/form/components/FormItem/Group/index.js +1 -1
  225. package/lib/form/components/FormItem/index.js +9 -7
  226. package/lib/form/components/FormItem/warpField.js +3 -15
  227. package/lib/form/components/List/ListContainer.js +2 -1
  228. package/lib/form/components/List/index.d.ts +1 -1
  229. package/lib/form/components/List/index.js +0 -2
  230. package/lib/form/components/Radio/index.js +5 -4
  231. package/lib/form/components/SchemaForm/index.js +0 -1
  232. package/lib/form/components/SchemaForm/layoutType/StepsForm.js +0 -1
  233. package/lib/form/components/Select/index.js +11 -2
  234. package/lib/form/components/Text/index.js +0 -3
  235. package/lib/form/components/UploadButton/index.js +4 -2
  236. package/lib/form/components/UploadDragger/index.js +0 -1
  237. package/lib/form/helpers/grid.js +1 -5
  238. package/lib/form/layouts/DrawerForm/index.d.ts +4 -4
  239. package/lib/form/layouts/DrawerForm/index.js +2 -6
  240. package/lib/form/layouts/LightFilter/index.js +5 -6
  241. package/lib/form/layouts/LoginForm/index.js +8 -8
  242. package/lib/form/layouts/LoginFormPage/index.js +15 -15
  243. package/lib/form/layouts/ModalForm/index.d.ts +2 -2
  244. package/lib/form/layouts/ModalForm/index.js +1 -4
  245. package/lib/form/layouts/QueryFilter/Actions.js +2 -1
  246. package/lib/form/layouts/QueryFilter/index.js +39 -24
  247. package/lib/form/layouts/StepsForm/StepForm.js +0 -1
  248. package/lib/form/layouts/StepsForm/index.js +5 -14
  249. package/lib/layout/ProLayout.d.ts +1 -1
  250. package/lib/layout/ProLayout.js +2 -7
  251. package/lib/layout/components/AppsLogoComponents/DefaultContent.js +6 -5
  252. package/lib/layout/components/AppsLogoComponents/SimpleContent.js +6 -5
  253. package/lib/layout/components/AppsLogoComponents/style/index.js +4 -0
  254. package/lib/layout/components/FooterToolbar/index.d.ts +1 -1
  255. package/lib/layout/components/FooterToolbar/index.js +2 -6
  256. package/lib/layout/components/GlobalFooter/index.js +3 -3
  257. package/lib/layout/components/GlobalHeader/ActionsContent.js +6 -7
  258. package/lib/layout/components/GlobalHeader/index.js +1 -1
  259. package/lib/layout/components/GridContent/index.js +1 -1
  260. package/lib/layout/components/Header/index.js +1 -3
  261. package/lib/layout/components/Help/ProHelpPanel.js +11 -10
  262. package/lib/layout/components/PageContainer/index.js +9 -10
  263. package/lib/layout/components/PageContainer/style/index.js +4 -0
  264. package/lib/layout/components/PageHeader/index.js +10 -10
  265. package/lib/layout/components/SettingDrawer/BlockCheckbox.js +2 -3
  266. package/lib/layout/components/SettingDrawer/LayoutChange.js +3 -2
  267. package/lib/layout/components/SettingDrawer/RegionalChange.js +3 -2
  268. package/lib/layout/components/SettingDrawer/ThemeColor.js +3 -2
  269. package/lib/layout/components/SettingDrawer/index.js +5 -5
  270. package/lib/layout/components/SettingDrawer/style/index.js +4 -0
  271. package/lib/layout/components/SiderMenu/BaseMenu.js +5 -9
  272. package/lib/layout/components/SiderMenu/SiderMenu.js +6 -8
  273. package/lib/layout/components/SiderMenu/index.js +0 -1
  274. package/lib/layout/components/TopNavHeader/index.js +4 -5
  275. package/lib/layout/style/index.js +4 -0
  276. package/lib/layout/utils/getBreadcrumbProps.js +1 -1
  277. package/lib/layout/utils/getMenuData.js +0 -1
  278. package/lib/list/Item.d.ts +4 -7
  279. package/lib/list/Item.js +81 -103
  280. package/lib/list/ListView.d.ts +6 -4
  281. package/lib/list/ListView.js +41 -54
  282. package/lib/list/ProListBase.d.ts +74 -0
  283. package/lib/list/ProListBase.js +365 -0
  284. package/lib/list/constants.d.ts +2 -2
  285. package/lib/list/constants.js +2 -5
  286. package/lib/list/index.d.ts +23 -13
  287. package/lib/list/index.js +77 -40
  288. package/lib/list/style/index.d.ts +0 -1
  289. package/lib/list/style/index.js +227 -86
  290. package/lib/provider/index.d.ts +2 -2
  291. package/lib/provider/index.js +0 -3
  292. package/lib/provider/useStyle/index.d.ts +1 -21
  293. package/lib/provider/useStyle/index.js +6 -3
  294. package/lib/skeleton/components/Descriptions/index.js +1 -4
  295. package/lib/skeleton/components/List/index.js +1 -4
  296. package/lib/table/Store/Provide.js +0 -2
  297. package/lib/table/Table.js +17 -17
  298. package/lib/table/components/Alert/index.js +6 -5
  299. package/lib/table/components/ColumnSetting/index.js +9 -10
  300. package/lib/table/components/DragSortTable/index.js +8 -4
  301. package/lib/table/components/EditableTable/index.d.ts +1 -1
  302. package/lib/table/components/EditableTable/index.js +6 -8
  303. package/lib/table/components/ListToolBar/HeaderMenu.d.ts +1 -0
  304. package/lib/table/components/ListToolBar/HeaderMenu.js +4 -3
  305. package/lib/table/components/ListToolBar/index.d.ts +1 -1
  306. package/lib/table/components/ListToolBar/index.js +18 -21
  307. package/lib/table/components/ListToolBar/style.js +3 -3
  308. package/lib/table/components/ToolBar/index.d.ts +1 -1
  309. package/lib/table/style/index.js +4 -0
  310. package/lib/table/typing.d.ts +10 -5
  311. package/lib/table/useFetchData.js +4 -4
  312. package/lib/table/utils/cellRenderToFromItem.js +2 -4
  313. package/lib/table/utils/index.js +0 -1
  314. package/lib/table/utils/useDragSort.js +1 -1
  315. package/lib/utils/components/DropdownFooter/index.d.ts +1 -1
  316. package/lib/utils/components/FieldLabel/index.js +1 -1
  317. package/lib/utils/components/FilterDropdown/index.d.ts +1 -1
  318. package/lib/utils/components/FilterDropdown/index.js +1 -1
  319. package/lib/utils/components/InlineErrorFormItem/index.js +5 -4
  320. package/lib/utils/components/LabelIconTip/index.d.ts +3 -4
  321. package/lib/utils/components/LabelIconTip/index.js +2 -2
  322. package/lib/utils/genCopyable/index.d.ts +6 -0
  323. package/lib/utils/genCopyable/index.js +28 -8
  324. package/lib/utils/hooks/useDebounceValue/index.js +1 -3
  325. package/lib/utils/hooks/useDeepCompareEffect/index.js +0 -2
  326. package/lib/utils/hooks/useFetchData/index.js +0 -2
  327. package/lib/utils/index.d.ts +2 -1
  328. package/lib/utils/isDeepEqualReact/index.js +0 -8
  329. package/lib/utils/isUrl/index.js +1 -1
  330. package/lib/utils/merge/index.js +0 -3
  331. package/lib/utils/nanoid/index.d.ts +1 -3
  332. package/lib/utils/nanoid/index.js +2 -10
  333. package/lib/utils/proFieldParsingText/index.d.ts +2 -2
  334. package/lib/utils/proFieldParsingText/index.js +3 -5
  335. package/lib/utils/typing.d.ts +2 -1
  336. package/lib/utils/useEditableArray/index.js +0 -2
  337. package/lib/utils/useEditableMap/index.js +0 -2
  338. package/package.json +32 -32
@@ -23,9 +23,7 @@ function ModalForm({
23
23
  open: propsOpen,
24
24
  ...rest
25
25
  }) {
26
- noteOnce(
27
- // eslint-disable-next-line @typescript-eslint/dot-notation
28
- !rest['footer'] || !modalProps?.footer, 'ModalForm 是一个 ProForm 的特殊布局,如果想自定义按钮,请使用 submit.render 自定义。');
26
+ noteOnce(!rest.footer || !modalProps?.footer, 'ModalForm 是一个 ProForm 的特殊布局,如果想自定义按钮,请使用 submit.render 自定义。');
29
27
  const context = useContext(ConfigProvider.ConfigContext);
30
28
  const [, forceUpdate] = useState([]);
31
29
  const [loading, setLoading] = useState(false);
@@ -74,7 +72,6 @@ function ModalForm({
74
72
  if (propsOpen) {
75
73
  onOpenChange?.(true);
76
74
  }
77
- // eslint-disable-next-line react-hooks/exhaustive-deps
78
75
  }, [propsOpen]);
79
76
  const triggerDom = useMemo(() => {
80
77
  if (!trigger) {
@@ -1,5 +1,6 @@
1
1
  import { DownOutlined } from '@ant-design/icons';
2
2
  import { ConfigProvider, Space } from 'antd';
3
+ import { clsx } from 'clsx';
3
4
  import React, { useContext } from 'react';
4
5
  import { ProProvider, useIntl } from "../../../provider";
5
6
  import { omitBoolean } from "../../../utils";
@@ -54,7 +55,7 @@ const Actions = props => {
54
55
  style: style,
55
56
  size: 16,
56
57
  children: [submitter, props.collapseRender !== false && /*#__PURE__*/_jsx("a", {
57
- className: `${getPrefixCls('pro-query-filter-collapse-button')} ${hashId}`.trim(),
58
+ className: clsx(getPrefixCls('pro-query-filter-collapse-button'), hashId),
58
59
  onClick: () => setCollapsed(!collapsed),
59
60
  children: collapseRender?.(collapsed, props, intl, hiddenNum)
60
61
  })]
@@ -1,7 +1,6 @@
1
- /* eslint-disable no-param-reassign */
2
1
  import RcResizeObserver from '@rc-component/resize-observer';
3
2
  import { useControlledState } from '@rc-component/util';
4
- import { Col, ConfigProvider, Form, Row } from 'antd';
3
+ import { Col, ConfigProvider, Form, Row, theme } from 'antd';
5
4
  import { clsx } from 'clsx';
6
5
  import React, { useCallback, useContext, useMemo, useState } from 'react';
7
6
  import { ProProvider, useIntl } from "../../../provider";
@@ -11,20 +10,28 @@ import Actions from "./Actions";
11
10
  import { useStyle } from "./style";
12
11
  import { jsx as _jsx } from "react/jsx-runtime";
13
12
  import { jsxs as _jsxs } from "react/jsx-runtime";
14
- const CONFIG_SPAN_BREAKPOINTS = {
15
- xs: 513,
16
- sm: 513,
17
- md: 785,
18
- lg: 992,
19
- xl: 1057,
20
- xxl: Infinity
21
- };
22
- /** 配置表单列变化的容器宽度断点 */
23
- const BREAKPOINTS = {
24
- vertical: [
25
- // [breakpoint, cols, layout]
26
- [513, 1, 'vertical'], [785, 2, 'vertical'], [1057, 3, 'vertical'], [Infinity, 4, 'vertical']],
27
- default: [[513, 1, 'vertical'], [701, 2, 'vertical'], [1062, 3, 'horizontal'], [1352, 3, 'horizontal'], [Infinity, 4, 'horizontal']]
13
+ /** antd 设计 token 获取断点配置,与 Grid 响应式布局保持一致 */
14
+ const getBreakpointsConfig = token => {
15
+ const defaultToken = theme.getDesignToken();
16
+ const t = {
17
+ ...defaultToken,
18
+ ...token
19
+ };
20
+ const bp = {
21
+ xs: t.screenSMMin ?? 576,
22
+ sm: t.screenMDMin ?? 768,
23
+ md: t.screenLGMin ?? 992,
24
+ lg: t.screenXLMin ?? 1200,
25
+ xl: t.screenXXLMin ?? 1600,
26
+ xxl: Infinity
27
+ };
28
+ return {
29
+ configSpanBreakpoints: bp,
30
+ breakpoints: {
31
+ vertical: [[bp.xs, 1, 'vertical'], [bp.md, 2, 'vertical'], [bp.xl, 3, 'vertical'], [Infinity, 4, 'vertical']],
32
+ default: [[bp.xs, 1, 'vertical'], [bp.sm, 2, 'vertical'], [bp.xl, 3, 'horizontal'], [Infinity, 4, 'horizontal']]
33
+ }
34
+ };
28
35
  };
29
36
 
30
37
  /**
@@ -32,16 +39,21 @@ const BREAKPOINTS = {
32
39
  *
33
40
  * @param layout
34
41
  * @param width
42
+ * @param breakpointsConfig 从 theme.useToken() 获取,支持 ConfigProvider 主题定制
35
43
  */
36
- const getSpanConfig = (layout, width, span) => {
44
+ const getSpanConfig = (layout, width, span, breakpointsConfig) => {
37
45
  if (span && typeof span === 'number') {
38
46
  return {
39
47
  span,
40
48
  layout
41
49
  };
42
50
  }
43
- const spanConfig = span ? ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].map(key => [CONFIG_SPAN_BREAKPOINTS[key], 24 / span[key], 'horizontal']) : BREAKPOINTS[layout || 'default'];
44
- const breakPoint = (spanConfig || BREAKPOINTS.default).find(item => width < item[0] + 16 // 16 = 2 * (ant-row -8px margin)
51
+ const {
52
+ breakpoints,
53
+ configSpanBreakpoints
54
+ } = breakpointsConfig;
55
+ const spanConfig = span ? ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].map(key => [configSpanBreakpoints[key], 24 / span[key], 'horizontal']) : breakpoints[layout || 'default'];
56
+ const breakPoint = (spanConfig || breakpoints.default).find(item => width < item[0] + 16 // 16 = 2 * (ant-row -8px margin)
45
57
  );
46
58
  if (!breakPoint) {
47
59
  return {
@@ -200,12 +212,12 @@ const QueryFilterContent = props => {
200
212
  if (split && currentSpan % 24 === 0 && index < itemLength - 1) {
201
213
  return /*#__PURE__*/_jsx(Col, {
202
214
  span: colSpan,
203
- className: `${props.baseClassName}-row-split-line ${props.baseClassName}-row-split ${hashId}`.trim(),
215
+ className: clsx(`${props.baseClassName}-row-split-line`, `${props.baseClassName}-row-split`, hashId),
204
216
  children: itemDom
205
217
  }, itemKey);
206
218
  }
207
219
  return /*#__PURE__*/_jsx(Col, {
208
- className: `${props.baseClassName}-row-split ${hashId}`.trim(),
220
+ className: clsx(`${props.baseClassName}-row-split`, hashId),
209
221
  span: colSpan,
210
222
  children: itemDom
211
223
  }, itemKey);
@@ -244,7 +256,7 @@ const QueryFilterContent = props => {
244
256
  label: " ",
245
257
  colon: false,
246
258
  shouldUpdate: false,
247
- className: `${baseClassName}-actions ${hashId}`.trim(),
259
+ className: clsx(`${baseClassName}-actions`, hashId),
248
260
  children: /*#__PURE__*/_jsx(Actions, {
249
261
  hiddenNum: hiddenNum,
250
262
  collapsed: collapsed,
@@ -287,8 +299,12 @@ function QueryFilter(props) {
287
299
  wrapSSR,
288
300
  hashId
289
301
  } = useStyle(baseClassName);
302
+ const {
303
+ token
304
+ } = theme.useToken();
290
305
  const [width, setWidth] = useState(() => typeof style?.width === 'number' ? style?.width : defaultWidth);
291
- const spanSize = useMemo(() => getSpanConfig(layout, width + 16, span), [layout, width, span]);
306
+ const breakpointsConfig = useMemo(() => getBreakpointsConfig(token), [token.screenSMMin, token.screenMDMin, token.screenLGMin, token.screenXLMin, token.screenXXLMin]);
307
+ const spanSize = useMemo(() => getSpanConfig(layout, width + 16, span, breakpointsConfig), [layout, width, span, breakpointsConfig]);
292
308
  const showLength = useMemo(() => {
293
309
  if (defaultFormItemsNumber !== undefined) {
294
310
  return defaultFormItemsNumber;
@@ -328,7 +344,7 @@ function QueryFilter(props) {
328
344
  },
329
345
  children: ref => /*#__PURE__*/_jsx("div", {
330
346
  ref: ref,
331
- className: `${baseClassName}-container ${hashId}`,
347
+ className: clsx(`${baseClassName}-container`, hashId),
332
348
  style: props.containerStyle,
333
349
  children: /*#__PURE__*/_jsx(BaseForm, {
334
350
  isKeyPressSubmit: true,
@@ -35,7 +35,6 @@ function StepForm(stepNativeProps) {
35
35
  return () => {
36
36
  context?.unRegForm(name);
37
37
  };
38
- // eslint-disable-next-line react-hooks/exhaustive-deps
39
38
  }, []);
40
39
  if (context && context?.formArrayRef) {
41
40
  context.formArrayRef.current[step || 0] = formRef;
@@ -140,8 +140,8 @@ function StepsForm(props) {
140
140
  });
141
141
  }, [onCurrentChangeCallback]);
142
142
  const layoutRender = useMemo(() => {
143
- return StepsLayoutStrategy[stepsProps?.direction || 'horizontal'];
144
- }, [stepsProps?.direction]);
143
+ return StepsLayoutStrategy[stepsProps?.orientation || 'horizontal'];
144
+ }, [stepsProps?.orientation]);
145
145
  const lastStep = useMemo(() => step === formArray.length - 1, [formArray.length, step]);
146
146
 
147
147
  /**
@@ -207,22 +207,13 @@ function StepsForm(props) {
207
207
  return stepItemProps;
208
208
  })
209
209
  };
210
-
211
- // Convert deprecated direction to orientation
212
- const processedStepsProps = stepsProps ? {
213
- ...stepsProps
214
- } : {};
215
- if ('direction' in processedStepsProps) {
216
- processedStepsProps.orientation = processedStepsProps.direction;
217
- delete processedStepsProps.direction;
218
- }
219
210
  return /*#__PURE__*/_jsx("div", {
220
- className: `${prefixCls}-steps-container ${hashId}`.trim(),
211
+ className: clsx(`${prefixCls}-steps-container`, hashId),
221
212
  style: {
222
213
  maxWidth: Math.min(formArray.length * 320, 1160)
223
214
  },
224
215
  children: /*#__PURE__*/_jsx(Steps, {
225
- ...processedStepsProps,
216
+ ...stepsProps,
226
217
  ...itemsProps,
227
218
  current: step,
228
219
  onChange: undefined
@@ -346,7 +337,7 @@ function StepsForm(props) {
346
337
  return stepsDom;
347
338
  }, [formArray, stepsDom, stepsRender]);
348
339
  const formContainer = useMemo(() => /*#__PURE__*/_jsxs("div", {
349
- className: `${prefixCls}-container ${hashId}`.trim(),
340
+ className: clsx(`${prefixCls}-container`, hashId),
350
341
  style: containerStyle,
351
342
  children: [formDom, stepsFormRender ? null : /*#__PURE__*/_jsx(Space, {
352
343
  children: submitterDom
@@ -50,7 +50,7 @@ export type ProLayoutProps = GlobalTypes & {
50
50
  * @example 设置 logo 为 false 不显示 logo logo={false}
51
51
  * @example 设置 logo 为 方法 logo={()=> <img src="https://avatars1.githubusercontent.com/u/8186664?s=460&v=4"/> }
52
52
  * */
53
- logo?: React.ReactNode | JSX.Element | WithFalse<() => React.ReactNode | JSX.Element>;
53
+ logo?: React.ReactNode | React.JSX.Element | WithFalse<() => React.ReactNode | React.JSX.Element>;
54
54
  /**
55
55
  * @name 页面切换的时候触发
56
56
  *
@@ -229,7 +229,6 @@ const BaseProLayout = props => {
229
229
  });
230
230
  useEffect(() => {
231
231
  setMenuLoading(isLoading);
232
- // eslint-disable-next-line react-hooks/exhaustive-deps
233
232
  }, [isLoading]);
234
233
  const {
235
234
  cache
@@ -238,7 +237,6 @@ const BaseProLayout = props => {
238
237
  return () => {
239
238
  if (cache instanceof Map) cache.delete(defaultId);
240
239
  };
241
- // eslint-disable-next-line react-hooks/exhaustive-deps
242
240
  }, []);
243
241
  const menuInfoData = useMemo(() => getMenuData(data || route?.children || route?.routes || [], menu, formatMessage, menuDataRender), [formatMessage, menu, menuDataRender, data, route?.children]);
244
242
  const {
@@ -401,7 +399,6 @@ const BaseProLayout = props => {
401
399
  /** 页面切换的时候触发 */
402
400
  useEffect(() => {
403
401
  props.onPageChange?.(props.location);
404
- // eslint-disable-next-line react-hooks/exhaustive-deps
405
402
  }, [location.pathname, location.pathname?.search]);
406
403
  const [hasFooterToolbar, setHasFooterToolbar] = useState(false);
407
404
  /**
@@ -462,9 +459,7 @@ const BaseProLayout = props => {
462
459
  flexDirection: siderMenuDom ? 'row' : undefined,
463
460
  ...style
464
461
  },
465
- children: [/*#__PURE__*/_jsx(ConfigProvider
466
- // @ts-ignore
467
- , {
462
+ children: [/*#__PURE__*/_jsx(ConfigProvider, {
468
463
  theme: {
469
464
  hashed: isNeedOpenHash(),
470
465
  token: {
@@ -495,7 +490,7 @@ const BaseProLayout = props => {
495
490
  children: siderMenuDom
496
491
  }), /*#__PURE__*/_jsxs("div", {
497
492
  style: genLayoutStyle,
498
- className: `${proLayoutClassName}-container ${hashId}`.trim(),
493
+ className: clsx(`${proLayoutClassName}-container`, hashId),
499
494
  children: [headerDom, /*#__PURE__*/_jsx(WrapContent, {
500
495
  hasPageContainer: hasPageContainer,
501
496
  isChildrenLayout: isChildrenLayout,
@@ -1,3 +1,4 @@
1
+ import { clsx } from 'clsx';
1
2
  import React from 'react';
2
3
  import { defaultRenderLogo } from "./index";
3
4
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -10,15 +11,15 @@ export const DefaultContent = props => {
10
11
  itemClick
11
12
  } = props;
12
13
  return /*#__PURE__*/_jsx("div", {
13
- className: `${baseClassName}-content ${hashId}`.trim(),
14
+ className: clsx(`${baseClassName}-content`, hashId),
14
15
  children: /*#__PURE__*/_jsx("ul", {
15
- className: `${baseClassName}-content-list ${hashId}`.trim(),
16
+ className: clsx(`${baseClassName}-content-list`, hashId),
16
17
  children: appList?.map((app, index) => {
17
18
  if (app?.children?.length) {
18
19
  return /*#__PURE__*/_jsxs("div", {
19
- className: `${baseClassName}-content-list-item-group ${hashId}`.trim(),
20
+ className: clsx(`${baseClassName}-content-list-item-group`, hashId),
20
21
  children: [/*#__PURE__*/_jsx("div", {
21
- className: `${baseClassName}-content-list-item-group-title ${hashId}`.trim(),
22
+ className: clsx(`${baseClassName}-content-list-item-group-title`, hashId),
22
23
  children: app.title
23
24
  }), /*#__PURE__*/_jsx(DefaultContent, {
24
25
  hashId: hashId,
@@ -29,7 +30,7 @@ export const DefaultContent = props => {
29
30
  }, index);
30
31
  }
31
32
  return /*#__PURE__*/_jsx("li", {
32
- className: `${baseClassName}-content-list-item ${hashId}`.trim(),
33
+ className: clsx(`${baseClassName}-content-list-item`, hashId),
33
34
  onClick: e => {
34
35
  e.stopPropagation();
35
36
  itemClick?.(app);
@@ -1,3 +1,4 @@
1
+ import { clsx } from 'clsx';
1
2
  import React from 'react';
2
3
  import { isUrl } from "../../../utils";
3
4
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -42,15 +43,15 @@ export const SimpleContent = props => {
42
43
  itemClick
43
44
  } = props;
44
45
  return /*#__PURE__*/_jsx("div", {
45
- className: `${baseClassName}-content ${hashId}`.trim(),
46
+ className: clsx(`${baseClassName}-content`, hashId),
46
47
  children: /*#__PURE__*/_jsx("ul", {
47
- className: `${baseClassName}-content-list ${hashId}`.trim(),
48
+ className: clsx(`${baseClassName}-content-list`, hashId),
48
49
  children: appList?.map((app, index) => {
49
50
  if (app?.children?.length) {
50
51
  return /*#__PURE__*/_jsxs("div", {
51
- className: `${baseClassName}-content-list-item-group ${hashId}`.trim(),
52
+ className: clsx(`${baseClassName}-content-list-item-group`, hashId),
52
53
  children: [/*#__PURE__*/_jsx("div", {
53
- className: `${baseClassName}-content-list-item-group-title ${hashId}`.trim(),
54
+ className: clsx(`${baseClassName}-content-list-item-group-title`, hashId),
54
55
  children: app.title
55
56
  }), /*#__PURE__*/_jsx(SimpleContent, {
56
57
  hashId: hashId,
@@ -61,7 +62,7 @@ export const SimpleContent = props => {
61
62
  }, index);
62
63
  }
63
64
  return /*#__PURE__*/_jsx("li", {
64
- className: `${baseClassName}-content-list-item ${hashId}`.trim(),
65
+ className: clsx(`${baseClassName}-content-list-item`, hashId),
65
66
  onClick: e => {
66
67
  e.stopPropagation();
67
68
  itemClick?.(app);
@@ -4,6 +4,10 @@ import { genAppsLogoComponentsSimpleListStyle } from "./simple";
4
4
  const genAppsLogoComponentsStyle = token => {
5
5
  return {
6
6
  [token.componentCls]: {
7
+ boxSizing: 'border-box',
8
+ '*, *::before, *::after': {
9
+ boxSizing: 'border-box'
10
+ },
7
11
  '&-icon': {
8
12
  display: 'inline-flex',
9
13
  alignItems: 'center',
@@ -9,7 +9,7 @@ export type FooterToolbarProps = {
9
9
  className?: string;
10
10
  renderContent?: (props: FooterToolbarProps & RouteContextType & {
11
11
  leftWidth?: string;
12
- }, dom: JSX.Element) => ReactNode;
12
+ }, dom: React.JSX.Element) => ReactNode;
13
13
  prefixCls?: string;
14
14
  stylish?: GenerateStyle<FooterToolBarToken>;
15
15
  children?: React.ReactNode;
@@ -1,4 +1,3 @@
1
- /* eslint-disable react-hooks/exhaustive-deps */
2
1
  import { omit } from '@rc-component/util';
3
2
  import { ConfigProvider } from 'antd';
4
3
  import { clsx } from 'clsx';
@@ -46,7 +45,6 @@ const FooterToolbar = props => {
46
45
  return '100%';
47
46
  }
48
47
  return isMobile ? '100%' : `calc(100% - ${siderWidth}px)`;
49
- // eslint-disable-next-line react-hooks/exhaustive-deps
50
48
  }, [value.collapsed, value.hasSiderMenu, value.isMobile, value.siderWidth]);
51
49
  const containerDom = useMemo(() => {
52
50
  if (typeof window === 'undefined' || typeof document === 'undefined') return null;
@@ -58,10 +56,10 @@ const FooterToolbar = props => {
58
56
  });
59
57
  const dom = /*#__PURE__*/_jsxs(_Fragment, {
60
58
  children: [/*#__PURE__*/_jsx("div", {
61
- className: `${baseClassName}-left ${hashId}`.trim(),
59
+ className: clsx(`${baseClassName}-left`, hashId),
62
60
  children: extra
63
61
  }), /*#__PURE__*/_jsx("div", {
64
- className: `${baseClassName}-right ${hashId}`.trim(),
62
+ className: clsx(`${baseClassName}-right`, hashId),
65
63
  children: children
66
64
  })]
67
65
  });
@@ -75,7 +73,6 @@ const FooterToolbar = props => {
75
73
  return () => {
76
74
  value?.setHasFooterToolbar?.(false);
77
75
  };
78
- // eslint-disable-next-line react-hooks/exhaustive-deps
79
76
  }, []);
80
77
  const renderDom = /*#__PURE__*/_jsx("div", {
81
78
  className: clsx(className, hashId, baseClassName, {
@@ -24,9 +24,9 @@ const GlobalFooter = ({
24
24
  className: clsx(baseClassName, hashId, className),
25
25
  style: style,
26
26
  children: [links && /*#__PURE__*/_jsx("div", {
27
- className: `${baseClassName}-list ${hashId}`.trim(),
27
+ className: clsx(`${baseClassName}-list`, hashId),
28
28
  children: links.map(link => /*#__PURE__*/_jsx("a", {
29
- className: `${baseClassName}-list-link ${hashId}`.trim(),
29
+ className: clsx(`${baseClassName}-list-link`, hashId),
30
30
  title: link.key,
31
31
  target: link.blankTarget ? '_blank' : '_self',
32
32
  href: link.href,
@@ -34,7 +34,7 @@ const GlobalFooter = ({
34
34
  children: link.title
35
35
  }, link.key))
36
36
  }), copyright && /*#__PURE__*/_jsx("div", {
37
- className: `${baseClassName}-copyright ${hashId}`.trim(),
37
+ className: clsx(`${baseClassName}-copyright`, hashId),
38
38
  children: copyright
39
39
  })]
40
40
  }));
@@ -58,14 +58,14 @@ export const ActionsContent = ({
58
58
  const doms = actionsRender && actionsRender?.(restParams);
59
59
  if (!doms && !avatarDom) return null;
60
60
  if (!Array.isArray(doms)) return wrapSSR( /*#__PURE__*/_jsxs("div", {
61
- className: `${prefixCls}-header-actions ${hashId}`.trim(),
61
+ className: clsx(`${prefixCls}-header-actions`, hashId),
62
62
  children: [doms, avatarDom && /*#__PURE__*/_jsx("span", {
63
- className: `${prefixCls}-header-actions-avatar ${hashId}`.trim(),
63
+ className: clsx(`${prefixCls}-header-actions-avatar`, hashId),
64
64
  children: avatarDom
65
65
  })]
66
66
  }));
67
67
  return wrapSSR( /*#__PURE__*/_jsxs("div", {
68
- className: `${prefixCls}-header-actions ${hashId}`.trim(),
68
+ className: clsx(`${prefixCls}-header-actions`, hashId),
69
69
  children: [doms.filter(Boolean).map((dom, index) => {
70
70
  let hideHover = false;
71
71
  // 如果配置了 hideHover 就不展示 hover 效果了
@@ -73,13 +73,13 @@ export const ActionsContent = ({
73
73
  hideHover = !!dom?.props?.['aria-hidden'];
74
74
  }
75
75
  return /*#__PURE__*/_jsx("div", {
76
- className: clsx(`${prefixCls}-header-actions-item ${hashId}`, {
76
+ className: clsx(`${prefixCls}-header-actions-item`, hashId, {
77
77
  [`${prefixCls}-header-actions-hover`]: !hideHover
78
78
  }),
79
79
  children: dom
80
80
  }, index);
81
81
  }), avatarDom && /*#__PURE__*/_jsx("span", {
82
- className: `${prefixCls}-header-actions-avatar ${hashId}`.trim(),
82
+ className: clsx(`${prefixCls}-header-actions-avatar`, hashId),
83
83
  children: avatarDom
84
84
  })]
85
85
  }));
@@ -90,7 +90,7 @@ export const ActionsContent = ({
90
90
  }, 160);
91
91
  const contentRender = rightActionsRender;
92
92
  return /*#__PURE__*/_jsx("div", {
93
- className: `${prefixCls}-right-content ${hashId}`.trim(),
93
+ className: clsx(`${prefixCls}-right-content`, hashId),
94
94
  style: {
95
95
  minWidth: rightSize,
96
96
  height: '100%'
@@ -116,7 +116,6 @@ export const ActionsContent = ({
116
116
  children: contentRender ? contentRender({
117
117
  ...props,
118
118
  // 测试专用
119
- //@ts-ignore
120
119
  rightContentSize: rightSize
121
120
  }) : null
122
121
  })
@@ -77,7 +77,7 @@ const GlobalHeader = props => {
77
77
  ...style
78
78
  },
79
79
  children: [isMobile && /*#__PURE__*/_jsx("span", {
80
- className: `${baseClassName}-collapsed-button ${hashId}`.trim(),
80
+ className: clsx(`${baseClassName}-collapsed-button`, hashId),
81
81
  onClick: () => {
82
82
  onCollapse?.(!collapsed);
83
83
  },
@@ -35,7 +35,7 @@ const GridContent = props => {
35
35
  }),
36
36
  style: style,
37
37
  children: /*#__PURE__*/_jsx("div", {
38
- className: `${prefixCls}-grid-content-children ${hashId}`.trim(),
38
+ className: clsx(`${prefixCls}-grid-content-children`, hashId),
39
39
  children: children
40
40
  })
41
41
  }));
@@ -97,9 +97,7 @@ const DefaultHeader = props => {
97
97
  });
98
98
  if (layout === 'side' && !isMobile) return null;
99
99
  return stylish.wrapSSR(wrapSSR( /*#__PURE__*/_jsx(_Fragment, {
100
- children: /*#__PURE__*/_jsxs(ConfigProvider
101
- // @ts-ignore
102
- , {
100
+ children: /*#__PURE__*/_jsxs(ConfigProvider, {
103
101
  theme: {
104
102
  hashed: isNeedOpenHash(),
105
103
  components: {
@@ -1,6 +1,7 @@
1
1
  import { CloseOutlined, ProfileOutlined } from '@ant-design/icons';
2
2
  import { useControlledState } from '@rc-component/util';
3
3
  import { Card, ConfigProvider, Menu } from 'antd';
4
+ import { clsx } from 'clsx';
4
5
  import React, { useCallback, useContext, useMemo, useState } from 'react';
5
6
  import { ProProvider, isNeedOpenHash } from "../../../provider";
6
7
  import { ProHelpProvide } from "./HelpProvide";
@@ -77,7 +78,7 @@ export const ProHelpPanel = ({
77
78
  const parentKey = useMemo(() => dataSourceKeyMap.get(selectedKey)?.parentKey, [dataSourceKeyMap, selectedKey]);
78
79
  const defaultExtraActions = {
79
80
  collapsePanelAction: /*#__PURE__*/_jsx("div", {
80
- className: `${className}-actions-item ${hashId}`.trim(),
81
+ className: clsx(`${className}-actions-item`, hashId),
81
82
  children: /*#__PURE__*/_jsx(ProfileOutlined, {
82
83
  title: "collapse panel",
83
84
  onClick: () => {
@@ -86,8 +87,8 @@ export const ProHelpPanel = ({
86
87
  })
87
88
  }),
88
89
  helpSelectAction: /*#__PURE__*/_jsx(ProHelpSelect, {
89
- iconClassName: `${className}-actions-item`,
90
- className: `${hashId} ${className}-actions-input`,
90
+ iconClassName: clsx(`${className}-actions-item`, hashId),
91
+ className: clsx(hashId, `${className}-actions-input`),
91
92
  value: selectedKey,
92
93
  onChange: (value, item) => {
93
94
  setSelectedKey(value);
@@ -95,7 +96,7 @@ export const ProHelpPanel = ({
95
96
  }
96
97
  }),
97
98
  closeAction: /*#__PURE__*/_jsx("div", {
98
- className: `${className}-actions-item ${hashId}`.trim(),
99
+ className: clsx(`${className}-actions-item`, hashId),
99
100
  children: /*#__PURE__*/_jsx(CloseOutlined, {
100
101
  title: "close panel",
101
102
  onClick: () => {
@@ -106,7 +107,7 @@ export const ProHelpPanel = ({
106
107
  };
107
108
  const extraDomList = () => {
108
109
  return /*#__PURE__*/_jsx("div", {
109
- className: `${className}-actions ${hashId}`.trim(),
110
+ className: clsx(`${className}-actions`, hashId),
110
111
  children: extraRender ? extraRender(defaultExtraActions.collapsePanelAction, defaultExtraActions.helpSelectAction, defaultExtraActions.closeAction) : /*#__PURE__*/_jsxs(_Fragment, {
111
112
  children: [defaultExtraActions.collapsePanelAction, defaultExtraActions.helpSelectAction, onClose ? defaultExtraActions.closeAction : null]
112
113
  })
@@ -132,7 +133,7 @@ export const ProHelpPanel = ({
132
133
  size: "small",
133
134
  extra: extraDomList(),
134
135
  children: [showLeftPanel ? /*#__PURE__*/_jsx("div", {
135
- className: `${hashId} ${className}-left-panel `,
136
+ className: clsx(hashId, `${className}-left-panel`),
136
137
  style: {
137
138
  height
138
139
  },
@@ -162,7 +163,7 @@ export const ProHelpPanel = ({
162
163
  }
163
164
  },
164
165
  children: /*#__PURE__*/_jsx(Menu, {
165
- className: `${hashId} ${className}-left-panel-menu`,
166
+ className: clsx(hashId, `${className}-left-panel-menu`),
166
167
  openKeys: [parentKey, openKey],
167
168
  onOpenChange: keys => {
168
169
  setOpenKey(keys.at(-1) || '');
@@ -189,17 +190,17 @@ export const ProHelpPanel = ({
189
190
  })
190
191
  })
191
192
  }) : null, /*#__PURE__*/_jsxs("div", {
192
- className: `${hashId} ${className}-content-panel`,
193
+ className: clsx(hashId, `${className}-content-panel`),
193
194
  style: {
194
195
  height
195
196
  },
196
197
  children: [selectedKey ? /*#__PURE__*/_jsx(ProHelpContentPanel, {
197
198
  parentItem: dataSourceKeyMap.get(parentKey),
198
- className: `${className}-content-render`,
199
+ className: clsx(`${className}-content-render`, hashId),
199
200
  selectedKey: selectedKey,
200
201
  onScroll: key => setSelectedKey(key)
201
202
  }) : null, footer ? /*#__PURE__*/_jsx("div", {
202
- className: `${hashId} ${className}-footer`,
203
+ className: clsx(hashId, `${className}-footer`),
203
204
  children: footer
204
205
  }) : null]
205
206
  })]
@@ -36,7 +36,7 @@ const renderFooter = ({
36
36
  }) => {
37
37
  if (Array.isArray(tabList) || tabBarExtraContent) {
38
38
  return /*#__PURE__*/_jsx(Tabs, {
39
- className: `${prefixedClassName}-tabs ${hashId}`.trim(),
39
+ className: clsx(`${prefixedClassName}-tabs`, hashId),
40
40
  activeKey: tabActiveKey,
41
41
  onChange: key => {
42
42
  if (onTabChange) {
@@ -59,16 +59,16 @@ const renderPageHeader = (content, extraContent, prefixedClassName, hashId) => {
59
59
  return null;
60
60
  }
61
61
  return /*#__PURE__*/_jsx("div", {
62
- className: `${prefixedClassName}-detail ${hashId}`.trim(),
62
+ className: clsx(`${prefixedClassName}-detail`, hashId),
63
63
  children: /*#__PURE__*/_jsx("div", {
64
- className: `${prefixedClassName}-main ${hashId}`.trim(),
64
+ className: clsx(`${prefixedClassName}-main`, hashId),
65
65
  children: /*#__PURE__*/_jsxs("div", {
66
- className: `${prefixedClassName}-row ${hashId}`.trim(),
66
+ className: clsx(`${prefixedClassName}-row`, hashId),
67
67
  children: [content && /*#__PURE__*/_jsx("div", {
68
- className: `${prefixedClassName}-content ${hashId}`.trim(),
68
+ className: clsx(`${prefixedClassName}-content`, hashId),
69
69
  children: content
70
70
  }), extraContent && /*#__PURE__*/_jsx("div", {
71
- className: `${prefixedClassName}-extraContent ${hashId}`.trim(),
71
+ className: clsx(`${prefixedClassName}-extraContent`, hashId),
72
72
  children: extraContent
73
73
  })]
74
74
  })
@@ -155,7 +155,7 @@ const memoRenderPageHeader = props => {
155
155
  }
156
156
  return /*#__PURE__*/_jsx(PageHeader, {
157
157
  ...pageHeaderProps,
158
- className: `${prefixedClassName}-warp-page-header ${hashId}`.trim(),
158
+ className: clsx(`${prefixedClassName}-warp-page-header`, hashId),
159
159
  breadcrumb: breadcrumbRender === false ? undefined : {
160
160
  ...pageHeaderProps.breadcrumb,
161
161
  ...value.breadcrumbProps
@@ -190,7 +190,6 @@ const PageContainerBase = props => {
190
190
  return () => {
191
191
  value?.setHasPageContainer?.(num => num - 1);
192
192
  };
193
- // eslint-disable-next-line react-hooks/exhaustive-deps
194
193
  }, []);
195
194
  const {
196
195
  token
@@ -277,9 +276,9 @@ const PageContainerBase = props => {
277
276
  _jsx(Affix, {
278
277
  offsetTop: value.hasHeader && value.fixedHeader ? token.layout?.header?.heightLayoutHeader : 1,
279
278
  ...affixProps,
280
- className: `${basePageContainer}-affix ${hashId}`.trim(),
279
+ className: clsx(`${basePageContainer}-affix`, hashId),
281
280
  children: /*#__PURE__*/_jsx("div", {
282
- className: `${basePageContainer}-warp ${hashId}`.trim(),
281
+ className: clsx(`${basePageContainer}-warp`, hashId),
283
282
  children: pageHeaderDom
284
283
  })
285
284
  }) : pageHeaderDom, renderContentDom && /*#__PURE__*/_jsx(GridContent, {
@@ -3,6 +3,10 @@ const [sm, md, lg, xl] = [576, 768, 992, 1200].map(bp => `@media (max-width: ${b
3
3
  const genPageContainerStyle = token => {
4
4
  return {
5
5
  [token.componentCls]: {
6
+ boxSizing: 'border-box',
7
+ '*, *::before, *::after': {
8
+ boxSizing: 'border-box'
9
+ },
6
10
  position: 'relative',
7
11
  '&-children-container': {
8
12
  paddingBlockStart: 0,