@ant-design/pro-components 3.1.6-0 → 3.1.7-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.
package/es/list/Item.js CHANGED
@@ -44,7 +44,8 @@ function ProListItem(props) {
44
44
  getPrefixCls
45
45
  } = useContext(ConfigProvider.ConfigContext);
46
46
  const {
47
- hashId
47
+ hashId,
48
+ token
48
49
  } = useContext(ProProvider);
49
50
  const prefixCls = getPrefixCls('pro-list', props.prefixCls);
50
51
  const defaultClassName = `${prefixCls}-row`;
@@ -102,7 +103,8 @@ function ProListItem(props) {
102
103
  [`${defaultClassName}-type-${type}`]: !!type,
103
104
  [`${defaultClassName}-editable`]: isEditable
104
105
  }, hashId, defaultClassName);
105
- const needExpanded = expanded || Object.values(expandableConfig || {}).length === 0;
106
+ const hasExpandBehavior = expandableConfig != null && Object.keys(expandableConfig).length > 0;
107
+ const needExpanded = expanded || !hasExpandBehavior;
106
108
  const expandedRowDom = expandedRowRender && expandedRowRender(record, index, indentSize, expanded);
107
109
  const actionsArray = useMemo(() => actions ? React.Children.toArray(actions) : undefined, [actions]);
108
110
  const titleDom = title || subTitle ? /*#__PURE__*/_jsxs("div", {
@@ -113,8 +115,8 @@ function ProListItem(props) {
113
115
  }),
114
116
  children: title
115
117
  }), subTitle && /*#__PURE__*/_jsx("div", {
116
- className: clsx(`${defaultClassName}-subTitle`, hashId, {
117
- [`${defaultClassName}-subTitle-editable`]: isEditable
118
+ className: clsx(`${defaultClassName}-sub-title`, hashId, {
119
+ [`${defaultClassName}-sub-title-editable`]: isEditable
118
120
  }),
119
121
  children: subTitle
120
122
  })]
@@ -129,7 +131,7 @@ function ProListItem(props) {
129
131
  })
130
132
  }) : null;
131
133
  const itemProps = onItem?.(record, index);
132
- const hasExpandableConfig = Object.keys(expandableConfig || {}).length > 0;
134
+ const hasExpandableConfig = hasExpandBehavior;
133
135
  const expandedRowClassStr = typeof expandedRowClassName === 'function' ? expandedRowClassName(record, index, indentSize) : expandedRowClassName;
134
136
  const headerDom = typeof itemHeaderRender === 'function' ? itemHeaderRender(record, index, metaDom) : metaDom;
135
137
 
@@ -157,7 +159,7 @@ function ProListItem(props) {
157
159
  subTitle: subTitle,
158
160
  extra: actionsArray,
159
161
  bodyStyle: {
160
- padding: 24,
162
+ padding: token.paddingLG,
161
163
  ...cardProps.bodyStyle
162
164
  },
163
165
  ...itemProps,
@@ -190,6 +192,7 @@ function ProListItem(props) {
190
192
  [propsClassName]: propsClassName !== defaultClassName
191
193
  }),
192
194
  ...rest,
195
+ actions: actionsArray,
193
196
  extra: extra,
194
197
  ...onRow?.(record, index),
195
198
  ...itemProps,
@@ -220,14 +223,7 @@ function ProListItem(props) {
220
223
  expanded,
221
224
  record
222
225
  })]
223
- }), headerDom, actionsArray && actionsArray.length > 0 ? /*#__PURE__*/_jsx("div", {
224
- className: clsx(`${prefixCls}-item-action`, hashId),
225
- onClick: e => e.stopPropagation(),
226
- children: actionsArray.map((action, i) => /*#__PURE__*/_jsx("div", {
227
- className: clsx(`${prefixCls}-item-action-item`, hashId),
228
- children: action
229
- }, i))
230
- }) : null]
226
+ }), headerDom]
231
227
  }), needExpanded && (content || expandedRowDom) && /*#__PURE__*/_jsxs("div", {
232
228
  className: clsx(`${className}-content`, hashId),
233
229
  children: [content, expandedRowRender && rowSupportExpand && /*#__PURE__*/_jsx("div", {
@@ -98,21 +98,17 @@ function ListView(props) {
98
98
  const mergedExpandedKeys = React.useMemo(() => new Set(expandedRowKeys || innerExpandedKeys || []), [expandedRowKeys, innerExpandedKeys]);
99
99
  const onTriggerExpand = React.useCallback(record => {
100
100
  const key = getRowKey(record, dataSource.indexOf(record));
101
- let newExpandedKeys;
102
101
  const hasKey = mergedExpandedKeys.has(key);
102
+ const nextKeys = new Set(mergedExpandedKeys);
103
103
  if (hasKey) {
104
- mergedExpandedKeys.delete(key);
105
- newExpandedKeys = [...mergedExpandedKeys];
104
+ nextKeys.delete(key);
106
105
  } else {
107
- newExpandedKeys = [...mergedExpandedKeys, key];
106
+ nextKeys.add(key);
108
107
  }
108
+ const newExpandedKeys = [...nextKeys];
109
109
  setInnerExpandedKeys(newExpandedKeys);
110
- if (onExpand) {
111
- onExpand(!hasKey, record);
112
- }
113
- if (onExpandedRowsChange) {
114
- onExpandedRowsChange(newExpandedKeys);
115
- }
110
+ onExpand?.(!hasKey, record);
111
+ onExpandedRowsChange?.(newExpandedKeys);
116
112
  }, [getRowKey, mergedExpandedKeys, dataSource, onExpand, onExpandedRowsChange]);
117
113
 
118
114
  /** 展开收起功能区域 end */
@@ -153,8 +149,8 @@ function ListView(props) {
153
149
  ...item,
154
150
  index
155
151
  }) || {};
156
- const isChecked = selectedKeySet.has(recordKey || index);
157
152
  const itemKey = getRowKey(item, index);
153
+ const isChecked = selectedKeySet.has(itemKey);
158
154
  const cardProps = rest.grid ? {
159
155
  ...itemCardProps,
160
156
  ...rest.grid,
@@ -64,7 +64,6 @@ export interface ListItemProps extends React.HTMLAttributes<HTMLDivElement> {
64
64
  style?: React.CSSProperties;
65
65
  extra?: React.ReactNode;
66
66
  actions?: React.ReactNode[];
67
- colStyle?: React.CSSProperties;
68
67
  }
69
68
  export declare const ProListItem: React.ForwardRefExoticComponent<ListItemProps & React.RefAttributes<HTMLDivElement>> & {
70
69
  Meta: typeof ProListItemMeta;
@@ -7,7 +7,6 @@ import { clsx } from 'clsx';
7
7
  import React, { useContext, useMemo } from 'react';
8
8
  import { jsx as _jsx } from "react/jsx-runtime";
9
9
  import { jsxs as _jsxs } from "react/jsx-runtime";
10
- import { Fragment as _Fragment } from "react/jsx-runtime";
11
10
  export const ProListContext = /*#__PURE__*/React.createContext({});
12
11
  export const ProListItemMeta = ({
13
12
  prefixCls: customizePrefixCls,
@@ -48,7 +47,6 @@ const InternalProListItem = /*#__PURE__*/React.forwardRef((props, ref) => {
48
47
  actions,
49
48
  extra,
50
49
  className,
51
- colStyle,
52
50
  ...rest
53
51
  } = props;
54
52
  const {
@@ -67,29 +65,27 @@ const InternalProListItem = /*#__PURE__*/React.forwardRef((props, ref) => {
67
65
  children: action
68
66
  }, i))
69
67
  }, "actions") : null;
70
- const itemChildren = /*#__PURE__*/_jsx("div", {
68
+ const isVerticalWithExtra = itemLayout === 'vertical' && extra != null;
69
+ const extraContent = extra != null ? /*#__PURE__*/_jsx("div", {
70
+ className: `${prefixCls}-item-extra`,
71
+ children: extra
72
+ }, "extra") : null;
73
+ const mainContent = /*#__PURE__*/_jsxs("div", {
74
+ className: `${prefixCls}-item-main`,
75
+ children: [children, actionsContent, !isVerticalWithExtra && extraContent]
76
+ }, "main");
77
+ const itemChildren = /*#__PURE__*/_jsxs("div", {
78
+ ref: ref,
71
79
  ...rest,
72
80
  className: clsx(`${prefixCls}-item`, className),
73
- children: itemLayout === 'vertical' && extra ? /*#__PURE__*/_jsxs(_Fragment, {
74
- children: [/*#__PURE__*/_jsxs("div", {
75
- className: `${prefixCls}-item-main`,
76
- children: [children, actionsContent]
77
- }, "content"), /*#__PURE__*/_jsx("div", {
78
- className: `${prefixCls}-item-extra`,
79
- children: extra
80
- }, "extra")]
81
- }) : /*#__PURE__*/_jsxs(_Fragment, {
82
- children: [children, actionsContent, extra != null && /*#__PURE__*/_jsx(React.Fragment, {
83
- children: extra
84
- }, "extra")]
85
- })
81
+ children: [mainContent, isVerticalWithExtra && extraContent]
86
82
  });
87
83
  if (grid) {
88
84
  return /*#__PURE__*/_jsx("div", {
89
- ref: ref,
90
85
  style: {
91
- width: '100%',
92
- ...colStyle
86
+ display: 'flex',
87
+ flexDirection: 'column',
88
+ width: '100%'
93
89
  },
94
90
  children: itemChildren
95
91
  });
@@ -116,6 +112,14 @@ const defaultPaginationProps = {
116
112
  total: 0,
117
113
  position: 'bottom'
118
114
  };
115
+ const DEFAULT_SCREENS = {
116
+ xs: true,
117
+ sm: true,
118
+ md: true,
119
+ lg: false,
120
+ xl: false,
121
+ xxl: false
122
+ };
119
123
  const ProListContainerInner = /*#__PURE__*/React.forwardRef(function ProListContainerInner(props, ref) {
120
124
  const {
121
125
  pagination = false,
@@ -179,23 +183,15 @@ const ProListContainerInner = /*#__PURE__*/React.forwardRef(function ProListCont
179
183
  }, key);
180
184
  };
181
185
  const rawScreens = Grid.useBreakpoint();
182
- const defaultScreens = {
183
- xs: true,
184
- sm: true,
185
- md: true,
186
- lg: false,
187
- xl: false,
188
- xxl: false
189
- };
190
186
  const screens = useMemo(() => {
191
- if (rawScreens == null) return defaultScreens;
187
+ if (rawScreens == null) return DEFAULT_SCREENS;
192
188
  return {
193
- xxl: rawScreens.xxl ?? defaultScreens.xxl,
194
- xl: rawScreens.xl ?? defaultScreens.xl,
195
- lg: rawScreens.lg ?? defaultScreens.lg,
196
- md: rawScreens.md ?? defaultScreens.md,
197
- sm: rawScreens.sm ?? defaultScreens.sm,
198
- xs: rawScreens.xs ?? defaultScreens.xs
189
+ xxl: rawScreens.xxl ?? DEFAULT_SCREENS.xxl,
190
+ xl: rawScreens.xl ?? DEFAULT_SCREENS.xl,
191
+ lg: rawScreens.lg ?? DEFAULT_SCREENS.lg,
192
+ md: rawScreens.md ?? DEFAULT_SCREENS.md,
193
+ sm: rawScreens.sm ?? DEFAULT_SCREENS.sm,
194
+ xs: rawScreens.xs ?? DEFAULT_SCREENS.xs
199
195
  };
200
196
  }, [rawScreens]);
201
197
 
@@ -223,18 +219,12 @@ const ProListContainerInner = /*#__PURE__*/React.forwardRef(function ProListCont
223
219
  display: 'flex',
224
220
  flexWrap: 'wrap'
225
221
  };
226
-
227
- // 处理 gutter
228
222
  if (grid.gutter) {
229
- const [horizontal, vertical] = Array.isArray(grid.gutter) ? grid.gutter : [grid.gutter, 0];
223
+ const [horizontal, vertical] = Array.isArray(grid.gutter) ? grid.gutter : [grid.gutter, grid.gutter];
230
224
  const h = Number(horizontal) || 0;
231
225
  const v = Number(vertical) || 0;
232
-
233
- // flex 容器使用负 margin 来抵消子元素的 padding
234
- style.marginLeft = -h / 2;
235
- style.marginRight = -h / 2;
236
- style.marginTop = -v / 2;
237
- style.marginBottom = -v / 2;
226
+ style.marginInline = `${-h / 2}px`;
227
+ style.marginBlock = `${-v / 2}px`;
238
228
  }
239
229
  return style;
240
230
  }, [grid?.gutter]);
@@ -251,16 +241,12 @@ const ProListContainerInner = /*#__PURE__*/React.forwardRef(function ProListCont
251
241
  const style = {
252
242
  display: 'flex'
253
243
  };
254
-
255
- // 处理 gutter
256
244
  if (gutter) {
257
- const [horizontal, vertical] = Array.isArray(gutter) ? gutter : [gutter, 0];
245
+ const [horizontal, vertical] = Array.isArray(gutter) ? gutter : [gutter, gutter];
258
246
  const h = Number(horizontal) || 0;
259
247
  const v = Number(vertical) || 0;
260
- style.paddingLeft = h / 2;
261
- style.paddingRight = h / 2;
262
- style.paddingTop = v / 2;
263
- style.paddingBottom = v / 2;
248
+ style.paddingInline = `${h / 2}px`;
249
+ style.paddingBlock = `${v / 2}px`;
264
250
  }
265
251
 
266
252
  // 计算每列的宽度(确保 column 有效,避免除以零)
@@ -280,8 +266,10 @@ const ProListContainerInner = /*#__PURE__*/React.forwardRef(function ProListCont
280
266
  if (splitDataSource.length > 0) {
281
267
  const items = splitDataSource.map((item, idx) => renderInternalItem(item, idx));
282
268
  childrenContent = grid ? /*#__PURE__*/_jsx("div", {
269
+ className: `${prefixCls}-grid-container`,
283
270
  style: gridContainerStyle,
284
271
  children: items.map((child, idx) => /*#__PURE__*/_jsx("div", {
272
+ className: `${prefixCls}-grid-col`,
285
273
  style: colStyle,
286
274
  children: child
287
275
  }, child?.key ?? idx))
@@ -340,7 +328,6 @@ const ProListContainerInner = /*#__PURE__*/React.forwardRef(function ProListCont
340
328
  ...rest,
341
329
  children: /*#__PURE__*/_jsxs(Spin, {
342
330
  spinning: isLoading,
343
- delay: 100,
344
331
  children: [showPaginationTop && paginationNode, header && /*#__PURE__*/_jsx("div", {
345
332
  className: `${prefixCls}-header`,
346
333
  children: header
package/es/list/index.js CHANGED
@@ -78,7 +78,7 @@ function InternalProList(props) {
78
78
  ...rest
79
79
  } = props;
80
80
  const actionRef = useRef();
81
- useImperativeHandle(rest.actionRef, () => actionRef.current, [actionRef.current]);
81
+ useImperativeHandle(rest.actionRef, () => actionRef.current);
82
82
 
83
83
  // metas 废弃提示,仅在开发环境触发一次
84
84
  useEffect(() => {
@@ -11,6 +11,54 @@ const genTechUiListActiveKeyframes = token => new Keyframes('techUiListActive',
11
11
  backgroundColor: 'unset'
12
12
  }
13
13
  });
14
+ const genProListResponsiveStyle = token => {
15
+ const {
16
+ screenMD,
17
+ screenSM,
18
+ contentWidth
19
+ } = token;
20
+ return {
21
+ [`@media screen and (max-width: ${screenMD}px)`]: {
22
+ [token.componentCls]: {
23
+ [`${token.proComponentsCls}-list-item`]: {
24
+ [`${token.proComponentsCls}-list-item-action`]: {
25
+ marginInlineStart: token.marginLG
26
+ }
27
+ },
28
+ [`&${token.proComponentsCls}-list-vertical`]: {
29
+ [`${token.proComponentsCls}-list-item`]: {
30
+ [`${token.proComponentsCls}-list-item-extra`]: {
31
+ marginInlineStart: token.marginLG
32
+ }
33
+ }
34
+ }
35
+ }
36
+ },
37
+ [`@media screen and (max-width: ${screenSM}px)`]: {
38
+ [token.componentCls]: {
39
+ [`${token.proComponentsCls}-list-item`]: {
40
+ flexWrap: 'wrap',
41
+ [`${token.proComponentsCls}-list-item-action`]: {
42
+ marginInlineStart: token.marginSM
43
+ }
44
+ },
45
+ [`&${token.proComponentsCls}-list-vertical`]: {
46
+ [`${token.proComponentsCls}-list-item`]: {
47
+ flexWrap: 'wrap-reverse',
48
+ [`${token.proComponentsCls}-list-item-main`]: {
49
+ minWidth: contentWidth
50
+ },
51
+ [`${token.proComponentsCls}-list-item-extra`]: {
52
+ marginBlockStart: 'auto',
53
+ marginBlockEnd: token.margin,
54
+ marginInline: 'auto'
55
+ }
56
+ }
57
+ }
58
+ }
59
+ }
60
+ };
61
+ };
14
62
  const genProListStyle = token => {
15
63
  const techUiListActive = genTechUiListActiveKeyframes(token);
16
64
  return {
@@ -35,17 +83,25 @@ const genProListStyle = token => {
35
83
  },
36
84
  [`${token.proComponentsCls}-list-item`]: {
37
85
  display: 'flex',
38
- flexDirection: 'column',
86
+ flexDirection: 'row',
87
+ alignItems: 'flex-start',
39
88
  cursor: 'pointer',
40
89
  flex: 1,
41
90
  minWidth: 0,
42
91
  padding: token.paddingXS,
43
- alignItems: 'flex-start',
44
92
  borderRadius: token.borderRadius,
45
93
  listStyle: 'none',
46
94
  '& > *:first-child': {
47
95
  flex: 1,
48
96
  minWidth: 0
97
+ },
98
+ [`${token.proComponentsCls}-list-item-action`]: {
99
+ flex: '0 0 auto',
100
+ alignSelf: 'center',
101
+ marginInlineStart: token.marginXXL
102
+ },
103
+ [`${token.proComponentsCls}-list-item-extra`]: {
104
+ alignSelf: 'center'
49
105
  }
50
106
  },
51
107
  '&-filled': {
@@ -79,7 +135,15 @@ const genProListStyle = token => {
79
135
  gap: token.marginXS,
80
136
  borderBlockEnd: 'none',
81
137
  margin: 0,
82
- minWidth: 0
138
+ minWidth: 0,
139
+ color: token.colorText,
140
+ fontSize: token.fontSize,
141
+ lineHeight: token.lineHeight
142
+ },
143
+ [`${token.proComponentsCls}-list-item-meta-description`]: {
144
+ color: token.colorTextDescription,
145
+ fontSize: token.fontSize,
146
+ lineHeight: token.lineHeight
83
147
  },
84
148
  '&-split': {
85
149
  [`${token.componentCls}-row`]: {
@@ -89,11 +153,7 @@ const genProListStyle = token => {
89
153
  }
90
154
  },
91
155
  [`${token.proComponentsCls}-list-item`]: {
92
- borderRadius: 0,
93
- borderBlockEnd: `${token.lineWidth}px ${token.lineType} ${token.colorSplit}`,
94
- '&:last-child': {
95
- borderBlockEnd: 'none'
96
- }
156
+ borderRadius: 0
97
157
  }
98
158
  },
99
159
  '&-no-split': {
@@ -104,6 +164,149 @@ const genProListStyle = token => {
104
164
  borderBlockEnd: 'none'
105
165
  }
106
166
  },
167
+ '&-grid': {
168
+ [`${token.componentCls}-row`]: {
169
+ borderBlockEnd: 'none'
170
+ },
171
+ [`${token.componentCls}-grid-container`]: {
172
+ display: 'flex',
173
+ flexWrap: 'wrap'
174
+ },
175
+ [`${token.componentCls}-grid-col`]: {
176
+ display: 'flex',
177
+ '> *': {
178
+ flex: 1,
179
+ minWidth: 0
180
+ }
181
+ },
182
+ [`${token.proComponentsCls}-list-item`]: {
183
+ display: 'flex',
184
+ flexDirection: 'column',
185
+ flex: 1,
186
+ borderBlockEnd: 'none'
187
+ }
188
+ },
189
+ // 垂直布局:样式必须在 list 根级别,因 vertical 类在 list 根节点上
190
+ [`&${token.proComponentsCls}-list-vertical`]: {
191
+ [`${token.proComponentsCls}-list-item`]: {
192
+ alignItems: 'initial'
193
+ },
194
+ [`${token.proComponentsCls}-list-item-main`]: {
195
+ display: 'block',
196
+ flex: 1,
197
+ [`${token.proComponentsCls}-list-item-meta`]: {
198
+ marginBlockEnd: token.padding,
199
+ [`${token.proComponentsCls}-list-item-meta-title`]: {
200
+ marginBlockStart: 0,
201
+ marginBlockEnd: token.paddingSM,
202
+ color: token.colorText,
203
+ fontSize: token.fontSizeLG,
204
+ lineHeight: token.lineHeightLG
205
+ }
206
+ },
207
+ [`${token.proComponentsCls}-list-item-action`]: {
208
+ marginBlockStart: token.padding,
209
+ marginInlineStart: 'auto',
210
+ '> *': {
211
+ paddingBlock: 0,
212
+ paddingInline: token.padding,
213
+ '&:first-child': {
214
+ paddingInlineStart: 0
215
+ }
216
+ }
217
+ }
218
+ },
219
+ [`${token.componentCls}-row`]: {
220
+ marginBlockEnd: token.marginSM,
221
+ '&-header-title': {
222
+ display: 'flex',
223
+ flexDirection: 'column',
224
+ alignItems: 'flex-start',
225
+ justifyContent: 'center'
226
+ },
227
+ '&-content': {
228
+ marginBlock: 0,
229
+ marginInline: 0
230
+ },
231
+ '&-sub-title': {
232
+ marginBlockStart: token.marginXS
233
+ }
234
+ },
235
+ [`${token.proComponentsCls}-list-item-extra`]: {
236
+ display: 'flex',
237
+ alignItems: 'center',
238
+ marginInlineStart: token.marginXL,
239
+ [`${token.componentCls}-row-description`]: {
240
+ marginBlockStart: token.margin
241
+ }
242
+ },
243
+ [`${token.proComponentsCls}-list-bordered ${token.proComponentsCls}-list-item`]: {
244
+ paddingInline: 0
245
+ },
246
+ [`${token.componentCls}-row-show-extra-hover`]: {
247
+ [`${token.proComponentsCls}-list-item-extra`]: {
248
+ display: 'none'
249
+ }
250
+ },
251
+ [`${token.proComponentsCls}-list-pagination`]: {
252
+ marginBlockStart: token.margin,
253
+ marginBlockEnd: token.margin
254
+ },
255
+ [`${token.proComponentsCls}-list-list`]: {
256
+ '&-item': {
257
+ cursor: 'pointer',
258
+ paddingBlock: token.paddingSM,
259
+ paddingInline: token.paddingSM
260
+ }
261
+ },
262
+ [`${token.proComponentsCls}-list-row`]: {
263
+ '&-header': {
264
+ display: 'flex',
265
+ flexDirection: 'column',
266
+ alignItems: 'flex-start',
267
+ paddingBlock: 0,
268
+ paddingInline: 0,
269
+ borderBlockEnd: 'none'
270
+ },
271
+ '&-content': {
272
+ marginBlockStart: token.marginSM,
273
+ marginInlineStart: 0
274
+ },
275
+ [`${token.proComponentsCls}-list-item`]: {
276
+ width: '100%',
277
+ paddingBlock: token.paddingSM,
278
+ paddingInlineStart: token.paddingLG,
279
+ paddingInlineEnd: token.paddingMD,
280
+ [`${token.proComponentsCls}-list-item-meta-avatar`]: {
281
+ display: 'flex',
282
+ alignItems: 'center',
283
+ marginInlineEnd: token.marginXS
284
+ },
285
+ [`${token.proComponentsCls}-list-item-meta-title`]: {
286
+ marginBlockStart: 0,
287
+ marginBlockEnd: token.paddingSM,
288
+ marginInline: 0,
289
+ fontSize: token.fontSizeLG,
290
+ lineHeight: token.lineHeightLG
291
+ }
292
+ }
293
+ }
294
+ },
295
+ [`${token.proComponentsCls}-list-item-main`]: {
296
+ display: 'flex',
297
+ flexDirection: 'row',
298
+ alignItems: 'flex-start',
299
+ flex: 1,
300
+ minWidth: 0,
301
+ width: '100%',
302
+ '& > *:first-child': {
303
+ flex: 1,
304
+ minWidth: 0
305
+ },
306
+ [`${token.proComponentsCls}-list-item-action`]: {
307
+ alignSelf: 'center'
308
+ }
309
+ },
107
310
  [`${token.proComponentsCls}-list-item-action,
108
311
  ${token.proComponentsCls}-card-extra,
109
312
  ${token.proComponentsCls}-card-actions`]: {
@@ -182,7 +385,7 @@ const genProListStyle = token => {
182
385
  flexShrink: 9,
183
386
  marginBlock: 0,
184
387
  marginInline: 0,
185
- lineHeight: 22
388
+ lineHeight: token.lineHeightLG
186
389
  }
187
390
  },
188
391
  [`&${token.componentCls}-row-editable`]: {
@@ -255,11 +458,11 @@ const genProListStyle = token => {
255
458
  display: 'flex',
256
459
  alignItems: 'center',
257
460
  justifyContent: 'space-between',
258
- height: 44,
461
+ height: token.controlHeightLG,
259
462
  paddingInline: token.paddingLG,
260
463
  paddingBlock: 0,
261
464
  color: token.colorTextSecondary,
262
- lineHeight: 44,
465
+ lineHeight: token.controlHeightLG,
263
466
  background: setAlpha(token.colorTextBase, 0.02),
264
467
  '&-actions': {
265
468
  display: 'none'
@@ -276,14 +479,14 @@ const genProListStyle = token => {
276
479
  display: 'flex',
277
480
  fontSize: token.fontSizeSM,
278
481
  cursor: 'pointer',
279
- height: 24,
482
+ height: token.controlHeightSM,
280
483
  color: token.colorTextSecondary,
281
484
  '> .anticon > svg': {
282
485
  transition: '0.3s'
283
486
  }
284
487
  },
285
488
  '&-expanded': {
286
- ' > .anticon > svg': {
489
+ '> .anticon > svg': {
287
490
  transform: 'rotate(90deg)'
288
491
  }
289
492
  },
@@ -304,9 +507,10 @@ const genProListStyle = token => {
304
507
  display: 'flex',
305
508
  flex: '1',
306
509
  flexDirection: 'column',
307
- marginBlock: 0
510
+ marginBlock: 0,
511
+ marginInlineStart: token.marginXL
308
512
  },
309
- '&-subTitle': {
513
+ '&-sub-title': {
310
514
  display: 'inline-flex',
311
515
  flexWrap: 'wrap',
312
516
  alignItems: 'center',
@@ -359,42 +563,9 @@ const genProListStyle = token => {
359
563
  alignItems: 'center'
360
564
  },
361
565
  '&-checkbox': {
362
- width: 16,
566
+ width: token.fontSizeLG,
363
567
  marginInlineEnd: token.marginSM
364
568
  },
365
- [`${token.proComponentsCls}-list-vertical`]: {
366
- [`${token.componentCls}-row`]: {
367
- marginBlockEnd: token.marginSM
368
- },
369
- '&-header-title': {
370
- display: 'flex',
371
- flexDirection: 'column',
372
- alignItems: 'flex-start',
373
- justifyContent: 'center'
374
- },
375
- '&-content': {
376
- marginBlock: 0,
377
- marginInline: 0
378
- },
379
- '&-subTitle': {
380
- marginBlockStart: token.marginXS
381
- },
382
- [`${token.proComponentsCls}-list-item-extra`]: {
383
- display: 'flex',
384
- alignItems: 'center',
385
- [`${token.componentCls}-row-description`]: {
386
- marginBlockStart: token.margin
387
- }
388
- },
389
- [`${token.proComponentsCls}-list-bordered ${token.proComponentsCls}-list-item`]: {
390
- paddingInline: 0
391
- },
392
- [`${token.componentCls}-row-show-extra-hover`]: {
393
- [`${token.proComponentsCls}-list-item-extra `]: {
394
- display: 'none'
395
- }
396
- }
397
- },
398
569
  [`${token.proComponentsCls}-list-pagination`]: {
399
570
  marginBlockStart: token.margin,
400
571
  marginBlockEnd: token.margin
@@ -405,28 +576,6 @@ const genProListStyle = token => {
405
576
  paddingBlock: token.paddingSM,
406
577
  paddingInline: token.paddingSM
407
578
  }
408
- },
409
- [`${token.proComponentsCls}-list-vertical ${token.proComponentsCls}-list-row`]: {
410
- '&-header': {
411
- paddingBlock: 0,
412
- paddingInline: 0,
413
- borderBlockEnd: 'none'
414
- },
415
- [`${token.proComponentsCls}-list-item`]: {
416
- width: '100%',
417
- paddingBlock: token.paddingSM,
418
- paddingInlineStart: token.paddingLG,
419
- paddingInlineEnd: token.paddingMD,
420
- [`${token.proComponentsCls}-list-item-meta-avatar`]: {
421
- display: 'flex',
422
- alignItems: 'center',
423
- marginInlineEnd: token.marginXS
424
- },
425
- [`${token.proComponentsCls}-list-item-meta-title`]: {
426
- marginBlock: 0,
427
- marginInline: 0
428
- }
429
- }
430
579
  }
431
580
  }
432
581
  }
@@ -438,6 +587,6 @@ export function useStyle(prefixCls) {
438
587
  ...token,
439
588
  componentCls: `.${prefixCls}`
440
589
  };
441
- return [genProListStyle(proListToken)];
590
+ return [genProListStyle(proListToken), genProListResponsiveStyle(proListToken)];
442
591
  });
443
592
  }