@ant-design/pro-components 3.1.4-0 → 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 (198) hide show
  1. package/dist/pro-components.min.js +1 -1
  2. package/es/card/ProCard.js +15 -7
  3. package/es/card/components/Card/index.js +43 -19
  4. package/es/card/components/Card/style.js +12 -1
  5. package/es/card/components/Statistic/index.js +2 -2
  6. package/es/card/components/StatisticCard/index.js +1 -1
  7. package/es/card/typing.d.ts +27 -8
  8. package/es/field/AllProField.d.ts +2 -0
  9. package/es/field/AllProField.js +3 -0
  10. package/es/field/PureProField.d.ts +2 -0
  11. package/es/field/PureProField.js +2 -0
  12. package/es/field/components/Cascader/index.js +8 -1
  13. package/es/field/components/Checkbox/index.js +5 -1
  14. package/es/field/components/DatePicker/index.js +13 -1
  15. package/es/field/components/Digit/index.js +20 -3
  16. package/es/field/components/Money/index.js +51 -3
  17. package/es/field/components/Password/index.js +12 -11
  18. package/es/field/components/Radio/index.js +5 -1
  19. package/es/field/components/Segmented/index.js +2 -1
  20. package/es/field/components/Select/index.d.ts +1 -1
  21. package/es/field/components/Select/index.js +1 -1
  22. package/es/field/components/Switch/index.js +10 -2
  23. package/es/field/components/Text/index.js +7 -1
  24. package/es/field/components/TextArea/index.js +6 -3
  25. package/es/field/components/TimePicker/index.js +10 -1
  26. package/es/field/components/TreeSelect/index.d.ts +2 -12
  27. package/es/field/components/TreeSelect/index.js +31 -17
  28. package/es/form/BaseForm/BaseForm.js +4 -3
  29. package/es/form/BaseForm/Submitter/index.d.ts +1 -1
  30. package/es/form/components/Digit/DigitRange.js +5 -2
  31. package/es/form/components/Digit/index.js +7 -2
  32. package/es/form/components/FormItem/FormItemRender/index.d.ts +1 -1
  33. package/es/form/components/FormItem/FormItemRender/index.js +10 -2
  34. package/es/form/components/FormItem/Group/index.js +1 -1
  35. package/es/form/components/List/ListContainer.js +2 -1
  36. package/es/form/components/Select/index.js +11 -1
  37. package/es/form/layouts/DrawerForm/index.d.ts +4 -4
  38. package/es/form/layouts/DrawerForm/index.js +1 -1
  39. package/es/form/layouts/LightFilter/index.js +5 -5
  40. package/es/form/layouts/LoginForm/index.js +8 -8
  41. package/es/form/layouts/LoginFormPage/index.js +15 -15
  42. package/es/form/layouts/ModalForm/index.d.ts +2 -2
  43. package/es/form/layouts/ProForm/index.d.ts +1 -1
  44. package/es/form/layouts/QueryFilter/Actions.js +2 -1
  45. package/es/form/layouts/QueryFilter/index.js +40 -23
  46. package/es/form/layouts/StepsForm/index.js +2 -2
  47. package/es/layout/ProLayout.d.ts +1 -1
  48. package/es/layout/ProLayout.js +1 -1
  49. package/es/layout/components/AppsLogoComponents/DefaultContent.js +6 -5
  50. package/es/layout/components/AppsLogoComponents/SimpleContent.js +6 -5
  51. package/es/layout/components/FooterToolbar/index.d.ts +1 -1
  52. package/es/layout/components/FooterToolbar/index.js +2 -2
  53. package/es/layout/components/GlobalFooter/index.js +3 -3
  54. package/es/layout/components/GlobalHeader/ActionsContent.js +6 -6
  55. package/es/layout/components/GlobalHeader/index.js +1 -1
  56. package/es/layout/components/GridContent/index.js +1 -1
  57. package/es/layout/components/Help/ProHelpPanel.js +11 -10
  58. package/es/layout/components/PageContainer/index.js +9 -9
  59. package/es/layout/components/PageHeader/index.js +10 -10
  60. package/es/layout/components/SettingDrawer/BlockCheckbox.js +2 -2
  61. package/es/layout/components/SettingDrawer/LayoutChange.js +3 -2
  62. package/es/layout/components/SettingDrawer/RegionalChange.js +3 -2
  63. package/es/layout/components/SettingDrawer/ThemeColor.js +3 -2
  64. package/es/layout/components/SettingDrawer/index.js +5 -4
  65. package/es/layout/components/SiderMenu/BaseMenu.js +3 -3
  66. package/es/layout/components/SiderMenu/SiderMenu.js +5 -5
  67. package/es/layout/components/TopNavHeader/index.js +3 -3
  68. package/es/layout/utils/getBreadcrumbProps.js +1 -1
  69. package/es/list/Item.d.ts +3 -3
  70. package/es/list/Item.js +8 -1
  71. package/es/list/ListView.js +1 -2
  72. package/es/list/ProListBase.d.ts +1 -1
  73. package/es/list/ProListBase.js +29 -21
  74. package/es/list/style/index.js +13 -0
  75. package/es/provider/index.d.ts +2 -2
  76. package/es/table/Table.js +14 -5
  77. package/es/table/components/Alert/index.js +6 -5
  78. package/es/table/components/ColumnSetting/index.js +9 -9
  79. package/es/table/components/DragSortTable/index.js +8 -4
  80. package/es/table/components/EditableTable/index.d.ts +1 -1
  81. package/es/table/components/EditableTable/index.js +6 -7
  82. package/es/table/components/ListToolBar/HeaderMenu.d.ts +1 -0
  83. package/es/table/components/ListToolBar/HeaderMenu.js +4 -3
  84. package/es/table/components/ListToolBar/index.js +15 -12
  85. package/es/table/components/ListToolBar/style.js +2 -2
  86. package/es/table/useFetchData.js +4 -1
  87. package/es/table/utils/cellRenderToFromItem.js +1 -1
  88. package/es/table/utils/useDragSort.js +1 -1
  89. package/es/utils/components/DropdownFooter/index.d.ts +1 -1
  90. package/es/utils/components/FieldLabel/index.js +1 -1
  91. package/es/utils/components/FilterDropdown/index.d.ts +1 -1
  92. package/es/utils/components/FilterDropdown/index.js +1 -1
  93. package/es/utils/components/InlineErrorFormItem/index.js +5 -4
  94. package/es/utils/components/LabelIconTip/index.js +2 -2
  95. package/es/utils/hooks/useFetchData/index.js +0 -2
  96. package/es/utils/isUrl/index.js +1 -1
  97. package/es/utils/proFieldParsingText/index.d.ts +2 -2
  98. package/es/utils/proFieldParsingText/index.js +2 -2
  99. package/guidelines/components/pro-card.md +5 -4
  100. package/lib/card/ProCard.js +15 -7
  101. package/lib/card/components/Card/index.js +43 -19
  102. package/lib/card/components/Card/style.js +12 -1
  103. package/lib/card/components/Statistic/index.js +2 -2
  104. package/lib/card/components/StatisticCard/index.js +1 -1
  105. package/lib/card/typing.d.ts +27 -8
  106. package/lib/field/AllProField.d.ts +2 -0
  107. package/lib/field/AllProField.js +3 -0
  108. package/lib/field/PureProField.d.ts +2 -0
  109. package/lib/field/PureProField.js +2 -0
  110. package/lib/field/components/Cascader/index.js +8 -1
  111. package/lib/field/components/Checkbox/index.js +5 -1
  112. package/lib/field/components/DatePicker/index.js +13 -1
  113. package/lib/field/components/Digit/index.js +20 -3
  114. package/lib/field/components/Money/index.js +50 -2
  115. package/lib/field/components/Password/index.js +11 -10
  116. package/lib/field/components/Percent/util.d.ts +1 -1
  117. package/lib/field/components/Radio/index.js +5 -1
  118. package/lib/field/components/Segmented/index.js +2 -1
  119. package/lib/field/components/Select/index.d.ts +1 -1
  120. package/lib/field/components/Select/index.js +1 -1
  121. package/lib/field/components/Switch/index.js +10 -2
  122. package/lib/field/components/Text/index.js +7 -1
  123. package/lib/field/components/TextArea/index.js +6 -3
  124. package/lib/field/components/TimePicker/index.js +10 -1
  125. package/lib/field/components/TreeSelect/index.d.ts +2 -12
  126. package/lib/field/components/TreeSelect/index.js +30 -16
  127. package/lib/form/BaseForm/BaseForm.js +4 -3
  128. package/lib/form/BaseForm/Submitter/index.d.ts +1 -1
  129. package/lib/form/components/Digit/DigitRange.js +5 -2
  130. package/lib/form/components/Digit/index.js +7 -2
  131. package/lib/form/components/FormItem/FormItemRender/index.d.ts +1 -1
  132. package/lib/form/components/FormItem/FormItemRender/index.js +10 -2
  133. package/lib/form/components/FormItem/Group/index.js +1 -1
  134. package/lib/form/components/List/ListContainer.js +2 -1
  135. package/lib/form/components/Select/index.js +11 -1
  136. package/lib/form/layouts/DrawerForm/index.d.ts +4 -4
  137. package/lib/form/layouts/DrawerForm/index.js +1 -1
  138. package/lib/form/layouts/LightFilter/index.js +5 -5
  139. package/lib/form/layouts/LoginForm/index.js +8 -8
  140. package/lib/form/layouts/LoginFormPage/index.js +15 -15
  141. package/lib/form/layouts/ModalForm/index.d.ts +2 -2
  142. package/lib/form/layouts/ProForm/index.d.ts +1 -1
  143. package/lib/form/layouts/QueryFilter/Actions.js +2 -1
  144. package/lib/form/layouts/QueryFilter/index.js +39 -22
  145. package/lib/form/layouts/StepsForm/index.js +2 -2
  146. package/lib/layout/ProLayout.d.ts +1 -1
  147. package/lib/layout/ProLayout.js +1 -1
  148. package/lib/layout/components/AppsLogoComponents/DefaultContent.js +6 -5
  149. package/lib/layout/components/AppsLogoComponents/SimpleContent.js +6 -5
  150. package/lib/layout/components/FooterToolbar/index.d.ts +1 -1
  151. package/lib/layout/components/FooterToolbar/index.js +2 -2
  152. package/lib/layout/components/GlobalFooter/index.js +3 -3
  153. package/lib/layout/components/GlobalHeader/ActionsContent.js +6 -6
  154. package/lib/layout/components/GlobalHeader/index.js +1 -1
  155. package/lib/layout/components/GridContent/index.js +1 -1
  156. package/lib/layout/components/Help/ProHelpPanel.js +11 -10
  157. package/lib/layout/components/PageContainer/index.js +9 -9
  158. package/lib/layout/components/PageHeader/index.js +10 -10
  159. package/lib/layout/components/SettingDrawer/BlockCheckbox.js +2 -2
  160. package/lib/layout/components/SettingDrawer/LayoutChange.js +3 -2
  161. package/lib/layout/components/SettingDrawer/RegionalChange.js +3 -2
  162. package/lib/layout/components/SettingDrawer/ThemeColor.js +3 -2
  163. package/lib/layout/components/SettingDrawer/index.js +5 -4
  164. package/lib/layout/components/SiderMenu/BaseMenu.js +3 -3
  165. package/lib/layout/components/SiderMenu/SiderMenu.js +5 -5
  166. package/lib/layout/components/TopNavHeader/index.js +3 -3
  167. package/lib/layout/utils/getBreadcrumbProps.js +1 -1
  168. package/lib/list/Item.d.ts +3 -3
  169. package/lib/list/Item.js +8 -1
  170. package/lib/list/ListView.js +1 -2
  171. package/lib/list/ProListBase.d.ts +1 -1
  172. package/lib/list/ProListBase.js +28 -20
  173. package/lib/list/style/index.js +13 -0
  174. package/lib/provider/index.d.ts +2 -2
  175. package/lib/table/Table.js +14 -5
  176. package/lib/table/components/Alert/index.js +6 -5
  177. package/lib/table/components/ColumnSetting/index.js +9 -9
  178. package/lib/table/components/DragSortTable/index.js +8 -4
  179. package/lib/table/components/EditableTable/index.d.ts +1 -1
  180. package/lib/table/components/EditableTable/index.js +6 -7
  181. package/lib/table/components/ListToolBar/HeaderMenu.d.ts +1 -0
  182. package/lib/table/components/ListToolBar/HeaderMenu.js +4 -3
  183. package/lib/table/components/ListToolBar/index.js +15 -12
  184. package/lib/table/components/ListToolBar/style.js +2 -2
  185. package/lib/table/useFetchData.js +4 -1
  186. package/lib/table/utils/cellRenderToFromItem.js +1 -1
  187. package/lib/table/utils/useDragSort.js +1 -1
  188. package/lib/utils/components/DropdownFooter/index.d.ts +1 -1
  189. package/lib/utils/components/FieldLabel/index.js +1 -1
  190. package/lib/utils/components/FilterDropdown/index.d.ts +1 -1
  191. package/lib/utils/components/FilterDropdown/index.js +1 -1
  192. package/lib/utils/components/InlineErrorFormItem/index.js +5 -4
  193. package/lib/utils/components/LabelIconTip/index.js +2 -2
  194. package/lib/utils/hooks/useFetchData/index.js +0 -2
  195. package/lib/utils/isUrl/index.js +1 -1
  196. package/lib/utils/proFieldParsingText/index.d.ts +2 -2
  197. package/lib/utils/proFieldParsingText/index.js +2 -2
  198. package/package.json +31 -30
@@ -208,7 +208,7 @@ function StepsForm(props) {
208
208
  })
209
209
  };
210
210
  return /*#__PURE__*/_jsx("div", {
211
- className: `${prefixCls}-steps-container ${hashId}`.trim(),
211
+ className: clsx(`${prefixCls}-steps-container`, hashId),
212
212
  style: {
213
213
  maxWidth: Math.min(formArray.length * 320, 1160)
214
214
  },
@@ -337,7 +337,7 @@ function StepsForm(props) {
337
337
  return stepsDom;
338
338
  }, [formArray, stepsDom, stepsRender]);
339
339
  const formContainer = useMemo(() => /*#__PURE__*/_jsxs("div", {
340
- className: `${prefixCls}-container ${hashId}`.trim(),
340
+ className: clsx(`${prefixCls}-container`, hashId),
341
341
  style: containerStyle,
342
342
  children: [formDom, stepsFormRender ? null : /*#__PURE__*/_jsx(Space, {
343
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
  *
@@ -490,7 +490,7 @@ const BaseProLayout = props => {
490
490
  children: siderMenuDom
491
491
  }), /*#__PURE__*/_jsxs("div", {
492
492
  style: genLayoutStyle,
493
- className: `${proLayoutClassName}-container ${hashId}`.trim(),
493
+ className: clsx(`${proLayoutClassName}-container`, hashId),
494
494
  children: [headerDom, /*#__PURE__*/_jsx(WrapContent, {
495
495
  hasPageContainer: hasPageContainer,
496
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);
@@ -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;
@@ -56,10 +56,10 @@ const FooterToolbar = props => {
56
56
  });
57
57
  const dom = /*#__PURE__*/_jsxs(_Fragment, {
58
58
  children: [/*#__PURE__*/_jsx("div", {
59
- className: `${baseClassName}-left ${hashId}`.trim(),
59
+ className: clsx(`${baseClassName}-left`, hashId),
60
60
  children: extra
61
61
  }), /*#__PURE__*/_jsx("div", {
62
- className: `${baseClassName}-right ${hashId}`.trim(),
62
+ className: clsx(`${baseClassName}-right`, hashId),
63
63
  children: children
64
64
  })]
65
65
  });
@@ -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%'
@@ -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
  }));
@@ -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
@@ -276,9 +276,9 @@ const PageContainerBase = props => {
276
276
  _jsx(Affix, {
277
277
  offsetTop: value.hasHeader && value.fixedHeader ? token.layout?.header?.heightLayoutHeader : 1,
278
278
  ...affixProps,
279
- className: `${basePageContainer}-affix ${hashId}`.trim(),
279
+ className: clsx(`${basePageContainer}-affix`, hashId),
280
280
  children: /*#__PURE__*/_jsx("div", {
281
- className: `${basePageContainer}-warp ${hashId}`.trim(),
281
+ className: clsx(`${basePageContainer}-warp`, hashId),
282
282
  children: pageHeaderDom
283
283
  })
284
284
  }) : pageHeaderDom, renderContentDom && /*#__PURE__*/_jsx(GridContent, {
@@ -11,13 +11,13 @@ const renderBack = (prefixCls, hashId, backIcon, onBack) => {
11
11
  return null;
12
12
  }
13
13
  return /*#__PURE__*/_jsx("div", {
14
- className: `${prefixCls}-back ${hashId}`.trim(),
14
+ className: clsx(`${prefixCls}-back`, hashId),
15
15
  children: /*#__PURE__*/_jsx("div", {
16
16
  role: "button",
17
17
  onClick: e => {
18
18
  onBack?.(e);
19
19
  },
20
- className: `${prefixCls}-back-button ${hashId}`.trim(),
20
+ className: clsx(`${prefixCls}-back-button`, hashId),
21
21
  "aria-label": "back",
22
22
  children: backIcon
23
23
  })
@@ -55,26 +55,26 @@ const renderTitle = (prefixCls, props, direction = 'ltr', hashId) => {
55
55
  const backIconDom = renderBack(prefixCls, hashId, backIcon, onBack);
56
56
  const hasTitle = backIconDom || avatar || hasHeading;
57
57
  return /*#__PURE__*/_jsxs("div", {
58
- className: headingPrefixCls + ' ' + hashId,
58
+ className: clsx(headingPrefixCls, hashId),
59
59
  children: [hasTitle && /*#__PURE__*/_jsxs("div", {
60
- className: `${headingPrefixCls}-left ${hashId}`.trim(),
60
+ className: clsx(`${headingPrefixCls}-left`, hashId),
61
61
  children: [backIconDom, avatar && /*#__PURE__*/_jsx(Avatar, {
62
62
  className: clsx(`${headingPrefixCls}-avatar`, hashId, avatar.className),
63
63
  ...avatar
64
64
  }), title && /*#__PURE__*/_jsx("span", {
65
- className: `${headingPrefixCls}-title ${hashId}`.trim(),
65
+ className: clsx(`${headingPrefixCls}-title`, hashId),
66
66
  title: typeof title === 'string' ? title : undefined,
67
67
  children: title
68
68
  }), subTitle && /*#__PURE__*/_jsx("span", {
69
- className: `${headingPrefixCls}-sub-title ${hashId}`.trim(),
69
+ className: clsx(`${headingPrefixCls}-sub-title`, hashId),
70
70
  title: typeof subTitle === 'string' ? subTitle : undefined,
71
71
  children: subTitle
72
72
  }), tags && /*#__PURE__*/_jsx("span", {
73
- className: `${headingPrefixCls}-tags ${hashId}`.trim(),
73
+ className: clsx(`${headingPrefixCls}-tags`, hashId),
74
74
  children: tags
75
75
  })]
76
76
  }), extra && /*#__PURE__*/_jsx("span", {
77
- className: `${headingPrefixCls}-extra ${hashId}`.trim(),
77
+ className: clsx(`${headingPrefixCls}-extra`, hashId),
78
78
  children: /*#__PURE__*/_jsx(Space, {
79
79
  children: extra
80
80
  })
@@ -84,14 +84,14 @@ const renderTitle = (prefixCls, props, direction = 'ltr', hashId) => {
84
84
  const renderFooter = (prefixCls, footer, hashId) => {
85
85
  if (footer) {
86
86
  return /*#__PURE__*/_jsx("div", {
87
- className: `${prefixCls}-footer ${hashId}`.trim(),
87
+ className: clsx(`${prefixCls}-footer`, hashId),
88
88
  children: footer
89
89
  });
90
90
  }
91
91
  return null;
92
92
  };
93
93
  const renderChildren = (prefixCls, children, hashId) => /*#__PURE__*/_jsx("div", {
94
- className: `${prefixCls}-content ${hashId}`.trim(),
94
+ className: clsx(`${prefixCls}-content`, hashId),
95
95
  children: children
96
96
  });
97
97
  const PageHeader = props => {
@@ -20,12 +20,12 @@ const BlockCheckbox = ({
20
20
  className: clsx(hashId, `${baseClassName}-item`, `${baseClassName}-item-${item.key}`, `${baseClassName}-${configType}-item`),
21
21
  onClick: () => onChange(item.key),
22
22
  children: [/*#__PURE__*/_jsx(CheckOutlined, {
23
- className: `${baseClassName}-selectIcon ${hashId}`.trim(),
23
+ className: clsx(`${baseClassName}-selectIcon`, hashId),
24
24
  style: {
25
25
  display: value === item.key ? 'block' : 'none'
26
26
  }
27
27
  }), item?.icon ? /*#__PURE__*/_jsx("div", {
28
- className: `${baseClassName}-icon ${hashId}`.trim(),
28
+ className: clsx(`${baseClassName}-icon`, hashId),
29
29
  children: item.icon
30
30
  }) : null]
31
31
  })
@@ -1,4 +1,5 @@
1
1
  import { List, Select, Switch, Tooltip } from 'antd';
2
+ import { clsx } from 'clsx';
2
3
  import React from 'react';
3
4
  import { defaultSettings } from "../../defaultSettings";
4
5
  import { getFormatMessage } from "./index";
@@ -37,7 +38,7 @@ const LayoutSetting = ({
37
38
  fixSiderbar
38
39
  } = settings || defaultSettings;
39
40
  return /*#__PURE__*/_jsx(List, {
40
- className: `${prefixCls}-list ${hashId}`.trim(),
41
+ className: clsx(`${prefixCls}-list`, hashId),
41
42
  split: false,
42
43
  dataSource: [{
43
44
  title: formatMessage({
@@ -47,7 +48,7 @@ const LayoutSetting = ({
47
48
  action: /*#__PURE__*/_jsxs(Select, {
48
49
  value: contentWidth || 'Fixed',
49
50
  size: "small",
50
- className: `content-width ${hashId}`.trim(),
51
+ className: clsx('content-width', hashId),
51
52
  onSelect: value => {
52
53
  changeSetting('contentWidth', value);
53
54
  },
@@ -1,4 +1,5 @@
1
1
  import { List, Switch } from 'antd';
2
+ import { clsx } from 'clsx';
2
3
  import React from 'react';
3
4
  import { getFormatMessage } from "./index";
4
5
  import { renderLayoutSettingItem } from "./LayoutChange";
@@ -12,7 +13,7 @@ const RegionalSetting = ({
12
13
  const formatMessage = getFormatMessage();
13
14
  const regionalSetting = ['header', 'footer', 'menu', 'menuHeader'];
14
15
  return /*#__PURE__*/_jsx(List, {
15
- className: `${prefixCls}-list ${hashId}`.trim(),
16
+ className: clsx(`${prefixCls}-list`, hashId),
16
17
  split: false,
17
18
  renderItem: renderLayoutSettingItem,
18
19
  dataSource: regionalSetting.map(key => {
@@ -22,7 +23,7 @@ const RegionalSetting = ({
22
23
  }),
23
24
  action: /*#__PURE__*/_jsx(Switch, {
24
25
  size: "small",
25
- className: `regional-${key} ${hashId}`.trim(),
26
+ className: clsx(`regional-${key}`, hashId),
26
27
  checked: settings[`${key}Render`] || settings[`${key}Render`] === undefined,
27
28
  onChange: checked => changeSetting(`${key}Render`, checked === true ? undefined : false)
28
29
  })
@@ -1,5 +1,6 @@
1
1
  import { CheckOutlined } from '@ant-design/icons';
2
2
  import { Tooltip } from 'antd';
3
+ import { clsx } from 'clsx';
3
4
  import React from 'react';
4
5
  import { jsx as _jsx } from "react/jsx-runtime";
5
6
  const Tag = /*#__PURE__*/React.forwardRef(({
@@ -27,7 +28,7 @@ const ThemeColor = ({
27
28
  }
28
29
  const baseClassName = `${prefixCls}-theme-color`;
29
30
  return /*#__PURE__*/_jsx("div", {
30
- className: `${baseClassName} ${hashId}`.trim(),
31
+ className: clsx(baseClassName, hashId),
31
32
  children: colorList?.map(({
32
33
  key,
33
34
  color,
@@ -39,7 +40,7 @@ const ThemeColor = ({
39
40
  id: `app.setting.themecolor.${key}`
40
41
  }),
41
42
  children: /*#__PURE__*/_jsx(Tag, {
42
- className: `${baseClassName}-block ${hashId}`.trim(),
43
+ className: clsx(`${baseClassName}-block`, hashId),
43
44
  color: color,
44
45
  check: value === color,
45
46
  onClick: () => onChange && onChange(color)
@@ -2,6 +2,7 @@ import { CloseOutlined, CopyOutlined, NotificationOutlined, SettingOutlined } fr
2
2
  import { omit, useControlledState } from '@rc-component/util';
3
3
  import { useUrlSearchParams } from '@umijs/use-params';
4
4
  import { Alert, Button, Divider, Drawer, List, Switch, message } from 'antd';
5
+ import { clsx } from 'clsx';
5
6
  import React, { useCallback, useEffect, useRef, useState } from 'react';
6
7
  import { isBrowser, merge, useRefFunction } from "../../../utils";
7
8
  import { defaultSettings } from "../../defaultSettings";
@@ -27,7 +28,7 @@ const Body = ({
27
28
  marginBlockEnd: 12
28
29
  },
29
30
  children: [/*#__PURE__*/_jsx("h3", {
30
- className: `${prefixCls}-body-title ${hashId}`.trim(),
31
+ className: clsx(`${prefixCls}-body-title`, hashId),
31
32
  children: title
32
33
  }), children]
33
34
  });
@@ -288,7 +289,7 @@ export const SettingDrawer = props => {
288
289
  } = useStyle(baseClassName);
289
290
  return wrapSSR( /*#__PURE__*/_jsxs(_Fragment, {
290
291
  children: [/*#__PURE__*/_jsx("div", {
291
- className: `${baseClassName}-handle ${hashId}`.trim(),
292
+ className: clsx(`${baseClassName}-handle`, hashId),
292
293
  onClick: () => setOpen(!open),
293
294
  style: {
294
295
  width: 48,
@@ -317,7 +318,7 @@ export const SettingDrawer = props => {
317
318
  },
318
319
  ...drawerProps,
319
320
  children: /*#__PURE__*/_jsxs("div", {
320
- className: `${baseClassName}-drawer-content ${hashId}`.trim(),
321
+ className: clsx(`${baseClassName}-drawer-content`, hashId),
321
322
  children: [/*#__PURE__*/_jsx(Body, {
322
323
  title: formatMessage({
323
324
  id: 'app.setting.pagestyle',
@@ -444,7 +445,7 @@ export const SettingDrawer = props => {
444
445
  id: 'app.setting.othersettings'
445
446
  }),
446
447
  children: /*#__PURE__*/_jsx(List, {
447
- className: `${baseClassName}-list ${hashId}`.trim(),
448
+ className: clsx(`${baseClassName}-list`, hashId),
448
449
  split: false,
449
450
  size: "small",
450
451
  renderItem: renderLayoutSettingItem,
@@ -107,7 +107,7 @@ class MenuUtil {
107
107
  [`${baseClassName}-item-collapsed-show-title`]: menu?.collapsedShowTitle && collapsed
108
108
  }),
109
109
  children: [menuType === 'group' && collapsed ? null : shouldHasIcon && iconDom ? /*#__PURE__*/_jsx("span", {
110
- className: `${baseClassName}-item-icon ${this.props?.hashId}`.trim(),
110
+ className: clsx(`${baseClassName}-item-icon`, this.props?.hashId),
111
111
  children: iconDom
112
112
  }) : defaultIcon, /*#__PURE__*/_jsx("span", {
113
113
  className: clsx(`${baseClassName}-item-text`, this.props?.hashId, {
@@ -221,7 +221,7 @@ class MenuUtil {
221
221
  [`${baseClassName}-item-collapsed-show-title`]: menu?.collapsedShowTitle && collapsed
222
222
  }),
223
223
  children: [/*#__PURE__*/_jsx("span", {
224
- className: `${baseClassName}-item-icon ${this.props?.hashId}`.trim(),
224
+ className: clsx(`${baseClassName}-item-icon`, this.props?.hashId),
225
225
  style: {
226
226
  display: defaultIcon === null && !icon ? 'none' : ''
227
227
  },
@@ -251,7 +251,7 @@ class MenuUtil {
251
251
  [`${baseClassName}-item-collapsed-show-title`]: menu?.collapsedShowTitle && collapsed
252
252
  }),
253
253
  children: [/*#__PURE__*/_jsx("span", {
254
- className: `${baseClassName}-item-icon ${this.props?.hashId}`.trim(),
254
+ className: clsx(`${baseClassName}-item-icon`, this.props?.hashId),
255
255
  style: {
256
256
  display: defaultIcon === null && !icon ? 'none' : ''
257
257
  },
@@ -125,7 +125,7 @@ const SiderMenu = props => {
125
125
  style: {
126
126
  width: '100%'
127
127
  },
128
- className: `${baseClassName}-menu ${hashId}`.trim()
128
+ className: clsx(`${baseClassName}-menu`, hashId)
129
129
  }), [baseClassName, hashId, menuContentRender, onOpenChange, props]);
130
130
  const linksMenuItems = (links || []).map((node, index) => ({
131
131
  className: `${baseClassName}-link`,
@@ -165,7 +165,7 @@ const SiderMenu = props => {
165
165
  className: clsx([`${baseClassName}-actions-list`, collapsed && `${baseClassName}-actions-list-collapsed`, hashId]),
166
166
  children: [actionsRender?.(props)].flat(1).map((item, index) => {
167
167
  return /*#__PURE__*/_jsx("div", {
168
- className: `${baseClassName}-actions-list-item ${hashId}`.trim(),
168
+ className: clsx(`${baseClassName}-actions-list-item`, hashId),
169
169
  children: item
170
170
  }, index);
171
171
  })
@@ -233,10 +233,10 @@ const SiderMenu = props => {
233
233
  }), /*#__PURE__*/_jsxs(SiderContext.Provider, {
234
234
  value: {},
235
235
  children: [links ? /*#__PURE__*/_jsx("div", {
236
- className: `${baseClassName}-links ${hashId}`.trim(),
236
+ className: clsx(`${baseClassName}-links`, hashId),
237
237
  children: /*#__PURE__*/_jsx(Menu, {
238
238
  inlineIndent: 16,
239
- className: `${baseClassName}-link-menu ${hashId}`.trim(),
239
+ className: clsx(`${baseClassName}-link-menu`, hashId),
240
240
  selectedKeys: [],
241
241
  openKeys: [],
242
242
  theme: theme,
@@ -279,7 +279,7 @@ const SiderMenu = props => {
279
279
  width: siderWidth,
280
280
  className: clsx(siderClassName, hashId, hideMenuWhenCollapsedClassName),
281
281
  children: [hideMenuWhenCollapsedClassName ? /*#__PURE__*/_jsx("div", {
282
- className: `${baseClassName}-hide-when-collapsed ${hashId}`.trim(),
282
+ className: clsx(`${baseClassName}-hide-when-collapsed`, hashId),
283
283
  style: {
284
284
  height: '100%',
285
285
  width: '100%',
@@ -81,7 +81,7 @@ const TopNavHeader = props => {
81
81
  children: /*#__PURE__*/_jsx(BaseMenu, {
82
82
  theme: dark ? 'dark' : 'light',
83
83
  ...props,
84
- className: `${prefixCls}-base-menu ${hashId}`.trim(),
84
+ className: clsx(`${prefixCls}-base-menu`, hashId),
85
85
  ...props.menuProps,
86
86
  style: {
87
87
  width: '100%',
@@ -113,7 +113,7 @@ const TopNavHeader = props => {
113
113
  children: [/*#__PURE__*/_jsx(AppsLogoComponents, {
114
114
  ...props
115
115
  }), /*#__PURE__*/_jsx("div", {
116
- className: `${prefixCls}-logo ${hashId}`.trim(),
116
+ className: clsx(`${prefixCls}-logo`, hashId),
117
117
  id: "logo",
118
118
  children: headerDom
119
119
  }, "logo")]
@@ -121,7 +121,7 @@ const TopNavHeader = props => {
121
121
  style: {
122
122
  flex: 1
123
123
  },
124
- className: `${prefixCls}-menu ${hashId}`.trim(),
124
+ className: clsx(`${prefixCls}-menu`, hashId),
125
125
  children: contentDom
126
126
  }), (actionsRender || props.avatarProps) && /*#__PURE__*/_jsx(ActionsContent, {
127
127
  ...props,