@douyinfe/semi-ui 2.12.0 → 2.12.1-alpha.2
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/avatar/index.tsx +2 -2
- package/backtop/index.tsx +11 -7
- package/badge/index.tsx +1 -1
- package/banner/index.tsx +5 -5
- package/breadcrumb/index.tsx +5 -3
- package/button/Button.tsx +10 -8
- package/card/index.tsx +43 -41
- package/carousel/CarouselArrow.tsx +2 -0
- package/carousel/index.tsx +1 -0
- package/cascader/index.tsx +101 -123
- package/cascader/item.tsx +1 -1
- package/checkbox/checkbox.tsx +13 -2
- package/collapsible/index.tsx +8 -1
- package/datePicker/dateInput.tsx +1 -0
- package/datePicker/datePicker.tsx +13 -5
- package/dist/css/semi.css +40 -40
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +491 -362
- package/dist/umd/semi-ui.js.map +1 -1
- package/dist/umd/semi-ui.min.js +1 -1
- package/dist/umd/semi-ui.min.js.map +1 -1
- package/divider/index.tsx +8 -4
- package/dropdown/index.tsx +1 -1
- package/empty/index.tsx +13 -5
- package/form/hoc/withField.tsx +1 -1
- package/form/label.tsx +1 -1
- package/grid/col.tsx +1 -1
- package/grid/row.tsx +1 -1
- package/iconButton/index.tsx +2 -1
- package/input/index.tsx +38 -11
- package/lib/cjs/avatar/index.js +4 -2
- package/lib/cjs/backtop/index.js +2 -1
- package/lib/cjs/badge/index.js +2 -1
- package/lib/cjs/banner/index.js +9 -4
- package/lib/cjs/breadcrumb/index.js +4 -3
- package/lib/cjs/button/Button.d.ts +1 -1
- package/lib/cjs/button/Button.js +13 -3
- package/lib/cjs/button/index.d.ts +1 -1
- package/lib/cjs/card/index.js +10 -5
- package/lib/cjs/carousel/CarouselArrow.js +6 -2
- package/lib/cjs/carousel/CarouselIndicator.d.ts +1 -1
- package/lib/cjs/carousel/index.d.ts +1 -1
- package/lib/cjs/carousel/index.js +2 -1
- package/lib/cjs/cascader/index.js +9 -6
- package/lib/cjs/cascader/item.js +2 -1
- package/lib/cjs/checkbox/checkbox.js +8 -4
- package/lib/cjs/collapsible/index.js +2 -1
- package/lib/cjs/datePicker/dateInput.d.ts +1 -1
- package/lib/cjs/datePicker/dateInput.js +2 -1
- package/lib/cjs/datePicker/datePicker.d.ts +1 -1
- package/lib/cjs/datePicker/datePicker.js +4 -2
- package/lib/cjs/datePicker/monthsGrid.d.ts +1 -1
- package/lib/cjs/divider/index.js +2 -1
- package/lib/cjs/dropdown/index.js +2 -1
- package/lib/cjs/empty/index.js +8 -4
- package/lib/cjs/form/baseForm.d.ts +1 -1
- package/lib/cjs/form/field.d.ts +1 -1
- package/lib/cjs/form/hoc/withField.js +2 -1
- package/lib/cjs/form/label.js +2 -1
- package/lib/cjs/grid/col.js +2 -1
- package/lib/cjs/grid/row.js +2 -1
- package/lib/cjs/iconButton/index.js +3 -1
- package/lib/cjs/input/index.js +9 -5
- package/lib/cjs/list/index.js +6 -3
- package/lib/cjs/modal/ConfirmModal.js +2 -1
- package/lib/cjs/modal/Modal.js +6 -2
- package/lib/cjs/modal/ModalContent.js +13 -6
- package/lib/cjs/modal/confirm.d.ts +5 -5
- package/lib/cjs/notification/notice.js +6 -3
- package/lib/cjs/pagination/index.js +4 -2
- package/lib/cjs/popconfirm/index.js +6 -3
- package/lib/cjs/radio/radio.d.ts +1 -1
- package/lib/cjs/radio/radio.js +4 -2
- package/lib/cjs/radio/radioGroup.d.ts +1 -1
- package/lib/cjs/rating/item.js +2 -1
- package/lib/cjs/scrollList/index.js +6 -3
- package/lib/cjs/select/index.js +8 -4
- package/lib/cjs/select/option.js +2 -1
- package/lib/cjs/sideSheet/SideSheetContent.js +6 -3
- package/lib/cjs/skeleton/index.js +3 -1
- package/lib/cjs/space/index.js +2 -1
- package/lib/cjs/spin/index.js +7 -3
- package/lib/cjs/switch/index.js +6 -4
- package/lib/cjs/table/Table.d.ts +1 -1
- package/lib/cjs/table/Table.js +6 -3
- package/lib/cjs/tabs/TabBar.js +2 -1
- package/lib/cjs/tabs/TabPane.js +5 -2
- package/lib/cjs/tagInput/index.js +4 -2
- package/lib/cjs/timePicker/Combobox.js +3 -1
- package/lib/cjs/timePicker/TimePicker.d.ts +2 -2
- package/lib/cjs/timePicker/TimeShape.d.ts +1 -1
- package/lib/cjs/timePicker/index.d.ts +2 -2
- package/lib/cjs/toast/toast.js +6 -3
- package/lib/cjs/transfer/index.js +2 -1
- package/lib/cjs/tree/treeNode.js +2 -1
- package/lib/cjs/treeSelect/index.js +6 -3
- package/lib/cjs/typography/base.d.ts +1 -1
- package/lib/cjs/typography/base.js +2 -1
- package/lib/cjs/typography/paragraph.d.ts +1 -1
- package/lib/cjs/typography/text.d.ts +1 -1
- package/lib/cjs/typography/title.d.ts +2 -2
- package/lib/cjs/upload/index.d.ts +2 -2
- package/lib/cjs/upload/index.js +13 -6
- package/lib/es/avatar/index.js +4 -2
- package/lib/es/backtop/index.js +2 -1
- package/lib/es/badge/index.js +2 -1
- package/lib/es/banner/index.js +9 -4
- package/lib/es/breadcrumb/index.js +4 -3
- package/lib/es/button/Button.d.ts +1 -1
- package/lib/es/button/Button.js +11 -3
- package/lib/es/button/index.d.ts +1 -1
- package/lib/es/card/index.js +10 -5
- package/lib/es/carousel/CarouselArrow.js +6 -2
- package/lib/es/carousel/CarouselIndicator.d.ts +1 -1
- package/lib/es/carousel/index.d.ts +1 -1
- package/lib/es/carousel/index.js +2 -1
- package/lib/es/cascader/index.js +9 -6
- package/lib/es/cascader/item.js +2 -1
- package/lib/es/checkbox/checkbox.js +8 -4
- package/lib/es/collapsible/index.js +2 -1
- package/lib/es/datePicker/dateInput.d.ts +1 -1
- package/lib/es/datePicker/dateInput.js +2 -1
- package/lib/es/datePicker/datePicker.d.ts +1 -1
- package/lib/es/datePicker/datePicker.js +4 -2
- package/lib/es/datePicker/monthsGrid.d.ts +1 -1
- package/lib/es/divider/index.js +2 -1
- package/lib/es/dropdown/index.js +2 -1
- package/lib/es/empty/index.js +8 -4
- package/lib/es/form/baseForm.d.ts +1 -1
- package/lib/es/form/field.d.ts +1 -1
- package/lib/es/form/hoc/withField.js +2 -1
- package/lib/es/form/label.js +2 -1
- package/lib/es/grid/col.js +2 -1
- package/lib/es/grid/row.js +2 -1
- package/lib/es/iconButton/index.js +3 -1
- package/lib/es/input/index.js +9 -5
- package/lib/es/list/index.js +6 -3
- package/lib/es/modal/ConfirmModal.js +2 -1
- package/lib/es/modal/Modal.js +6 -2
- package/lib/es/modal/ModalContent.js +13 -6
- package/lib/es/modal/confirm.d.ts +5 -5
- package/lib/es/notification/notice.js +6 -3
- package/lib/es/pagination/index.js +4 -2
- package/lib/es/popconfirm/index.js +6 -3
- package/lib/es/radio/radio.d.ts +1 -1
- package/lib/es/radio/radio.js +4 -2
- package/lib/es/radio/radioGroup.d.ts +1 -1
- package/lib/es/rating/item.js +2 -1
- package/lib/es/scrollList/index.js +6 -3
- package/lib/es/select/index.js +8 -4
- package/lib/es/select/option.js +2 -1
- package/lib/es/sideSheet/SideSheetContent.js +6 -3
- package/lib/es/skeleton/index.js +3 -1
- package/lib/es/space/index.js +2 -1
- package/lib/es/spin/index.js +7 -3
- package/lib/es/switch/index.js +6 -4
- package/lib/es/table/Table.d.ts +1 -1
- package/lib/es/table/Table.js +6 -3
- package/lib/es/tabs/TabBar.js +2 -1
- package/lib/es/tabs/TabPane.js +5 -2
- package/lib/es/tagInput/index.js +4 -2
- package/lib/es/timePicker/Combobox.js +3 -1
- package/lib/es/timePicker/TimePicker.d.ts +2 -2
- package/lib/es/timePicker/TimeShape.d.ts +1 -1
- package/lib/es/timePicker/index.d.ts +2 -2
- package/lib/es/toast/toast.js +6 -3
- package/lib/es/transfer/index.js +2 -1
- package/lib/es/tree/treeNode.js +2 -1
- package/lib/es/treeSelect/index.js +6 -3
- package/lib/es/typography/base.d.ts +1 -1
- package/lib/es/typography/base.js +2 -1
- package/lib/es/typography/paragraph.d.ts +1 -1
- package/lib/es/typography/text.d.ts +1 -1
- package/lib/es/typography/title.d.ts +2 -2
- package/lib/es/upload/index.d.ts +2 -2
- package/lib/es/upload/index.js +13 -6
- package/list/index.tsx +16 -4
- package/modal/ConfirmModal.tsx +1 -1
- package/modal/Modal.tsx +2 -0
- package/modal/ModalContent.tsx +27 -14
- package/notification/notice.tsx +16 -4
- package/package.json +9 -9
- package/pagination/index.tsx +16 -2
- package/popconfirm/index.tsx +11 -3
- package/radio/radio.tsx +10 -2
- package/rating/item.tsx +1 -1
- package/scrollList/index.tsx +19 -3
- package/select/index.tsx +12 -4
- package/select/option.tsx +5 -1
- package/sideSheet/SideSheetContent.tsx +3 -3
- package/skeleton/index.tsx +1 -1
- package/space/index.tsx +1 -1
- package/spin/index.tsx +15 -9
- package/switch/index.tsx +9 -14
- package/table/Table.tsx +5 -3
- package/tabs/TabBar.tsx +1 -1
- package/tabs/TabPane.tsx +9 -4
- package/tagInput/index.tsx +2 -2
- package/timePicker/Combobox.tsx +6 -1
- package/toast/toast.tsx +3 -3
- package/transfer/index.tsx +1 -0
- package/tree/treeNode.tsx +1 -1
- package/treeSelect/index.tsx +15 -3
- package/typography/base.tsx +1 -1
- package/upload/index.tsx +107 -38
- package/yarn-error.log +26235 -0
package/avatar/index.tsx
CHANGED
|
@@ -135,7 +135,7 @@ export default class Avatar extends BaseComponent<AvatarProps, AvatarState> {
|
|
|
135
135
|
className
|
|
136
136
|
);
|
|
137
137
|
let content = children;
|
|
138
|
-
const hoverRender = hoverContent ? (<div className={`${prefixCls}-hover`}>{hoverContent}</div>) : null;
|
|
138
|
+
const hoverRender = hoverContent ? (<div className={`${prefixCls}-hover`} x-semi-prop="hoverContent">{hoverContent}</div>) : null;
|
|
139
139
|
if (isImg) {
|
|
140
140
|
content = (
|
|
141
141
|
<img src={src} srcSet={srcSet} onError={this.handleError} alt={alt} {...imgAttr} />
|
|
@@ -143,7 +143,7 @@ export default class Avatar extends BaseComponent<AvatarProps, AvatarState> {
|
|
|
143
143
|
} else if (typeof children === 'string') {
|
|
144
144
|
content = (
|
|
145
145
|
<span className={`${prefixCls}-content`}>
|
|
146
|
-
<span className={`${prefixCls}-label`}>{children}</span>
|
|
146
|
+
<span className={`${prefixCls}-label`} x-semi-prop="children">{children}</span>
|
|
147
147
|
</span>
|
|
148
148
|
);
|
|
149
149
|
}
|
package/backtop/index.tsx
CHANGED
|
@@ -101,13 +101,17 @@ export default class BackTop extends BaseComponent<BackTopProps, BackTopState> {
|
|
|
101
101
|
className
|
|
102
102
|
);
|
|
103
103
|
const backtopBtn = children ? children : this.renderDefault();
|
|
104
|
-
const content = visible ?
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
104
|
+
const content = visible ? (
|
|
105
|
+
<div
|
|
106
|
+
{...others}
|
|
107
|
+
className={preCls}
|
|
108
|
+
style={style}
|
|
109
|
+
onClick={e => this.handleClick(e)}
|
|
110
|
+
x-semi-prop="children"
|
|
111
|
+
>
|
|
112
|
+
{backtopBtn}
|
|
113
|
+
</div>
|
|
114
|
+
) : null;
|
|
111
115
|
return content;
|
|
112
116
|
}
|
|
113
117
|
}
|
package/badge/index.tsx
CHANGED
|
@@ -82,7 +82,7 @@ export default class Badge extends PureComponent<BadgeProps> {
|
|
|
82
82
|
return (
|
|
83
83
|
<span className={prefixCls} {...rest}>
|
|
84
84
|
{children}
|
|
85
|
-
<span className={wrapper} style={style}>
|
|
85
|
+
<span className={wrapper} style={style} x-semi-prop="count">
|
|
86
86
|
{dot ? null : content}
|
|
87
87
|
</span>
|
|
88
88
|
</span>
|
package/banner/index.tsx
CHANGED
|
@@ -109,7 +109,7 @@ export default class Banner extends BaseComponent<BannerProps, BannerState> {
|
|
|
109
109
|
<Button
|
|
110
110
|
className={`${prefixCls}-close`}
|
|
111
111
|
onClick={this.remove}
|
|
112
|
-
icon={closeIcon || <IconClose aria-hidden={true}/>}
|
|
112
|
+
icon={closeIcon || <IconClose x-semi-prop="closeIcon" aria-hidden={true}/>}
|
|
113
113
|
theme="borderless"
|
|
114
114
|
size="small"
|
|
115
115
|
type="tertiary"
|
|
@@ -137,7 +137,7 @@ export default class Banner extends BaseComponent<BannerProps, BannerState> {
|
|
|
137
137
|
}
|
|
138
138
|
if (iconType) {
|
|
139
139
|
return (
|
|
140
|
-
<div className={iconCls}>
|
|
140
|
+
<div className={iconCls} x-semi-prop="icon">
|
|
141
141
|
{iconType}
|
|
142
142
|
</div>
|
|
143
143
|
);
|
|
@@ -160,13 +160,13 @@ export default class Banner extends BaseComponent<BannerProps, BannerState> {
|
|
|
160
160
|
<div className={`${prefixCls}-content`}>
|
|
161
161
|
{this.renderIcon()}
|
|
162
162
|
<div className={`${prefixCls}-content-body`}>
|
|
163
|
-
{title ? <Typography.Title heading={5} className={`${prefixCls}-title`} component="div">{title}</Typography.Title> : null}
|
|
164
|
-
{description ? <Typography.Paragraph className={`${prefixCls}-description`} component="div">{description}</Typography.Paragraph> : null}
|
|
163
|
+
{title ? <Typography.Title heading={5} className={`${prefixCls}-title`} component="div" x-semi-prop="title">{title}</Typography.Title> : null}
|
|
164
|
+
{description ? <Typography.Paragraph className={`${prefixCls}-description`} component="div" x-semi-prop="description">{description}</Typography.Paragraph> : null}
|
|
165
165
|
</div>
|
|
166
166
|
</div>
|
|
167
167
|
{this.renderCloser()}
|
|
168
168
|
</div>
|
|
169
|
-
{children ? <div className={`${prefixCls}-extra`}>{children}</div> : null}
|
|
169
|
+
{children ? <div className={`${prefixCls}-extra`} x-semi-prop="children">{children}</div> : null}
|
|
170
170
|
</div>
|
|
171
171
|
) : null;
|
|
172
172
|
return banner;
|
package/breadcrumb/index.tsx
CHANGED
|
@@ -167,9 +167,9 @@ class Breadcrumb extends BaseComponent<BreadcrumbProps, BreadcrumbState> {
|
|
|
167
167
|
<span className={`${clsPrefix}-collapse`} key={`more-${itemsLen}`}>
|
|
168
168
|
<span className={`${clsPrefix}-item-wrap`}>
|
|
169
169
|
<span
|
|
170
|
-
role=
|
|
170
|
+
role="button"
|
|
171
171
|
tabIndex={0}
|
|
172
|
-
aria-label=
|
|
172
|
+
aria-label="Expand breadcrumb items"
|
|
173
173
|
className={`${clsPrefix}-item ${clsPrefix}-item-more`}
|
|
174
174
|
onClick={item => this.foundation.handleExpand(item)}
|
|
175
175
|
onKeyPress={e => this.foundation.handleExpandEnterPress(e)}
|
|
@@ -178,7 +178,9 @@ class Breadcrumb extends BaseComponent<BreadcrumbProps, BreadcrumbState> {
|
|
|
178
178
|
{!hasRenderMore && moreType === 'default' && <IconMore />}
|
|
179
179
|
{!hasRenderMore && moreType === 'popover' && this.renderPopoverMore(restItem)}
|
|
180
180
|
</span>
|
|
181
|
-
<span className={`${clsPrefix}-separator`}
|
|
181
|
+
<span className={`${clsPrefix}-separator`} x-semi-prop="separator">
|
|
182
|
+
{this.props.separator}
|
|
183
|
+
</span>
|
|
182
184
|
</span>
|
|
183
185
|
</span>
|
|
184
186
|
);
|
package/button/Button.tsx
CHANGED
|
@@ -5,6 +5,7 @@ import PropTypes from 'prop-types';
|
|
|
5
5
|
import { cssClasses, strings } from '@douyinfe/semi-foundation/button/constants';
|
|
6
6
|
import '@douyinfe/semi-foundation/button/button.scss';
|
|
7
7
|
import { noop } from '@douyinfe/semi-foundation/utils/function';
|
|
8
|
+
import { omit } from 'lodash';
|
|
8
9
|
|
|
9
10
|
const btnSizes = strings.sizes;
|
|
10
11
|
const { htmlTypes, btnTypes } = strings;
|
|
@@ -93,7 +94,7 @@ export default class Button extends PureComponent<ButtonProps> {
|
|
|
93
94
|
|
|
94
95
|
const baseProps = {
|
|
95
96
|
disabled,
|
|
96
|
-
...attr,
|
|
97
|
+
...omit(attr, ['x-semi-children-alias']),
|
|
97
98
|
className: classNames(
|
|
98
99
|
prefixCls,
|
|
99
100
|
{
|
|
@@ -113,16 +114,17 @@ export default class Button extends PureComponent<ButtonProps> {
|
|
|
113
114
|
'aria-disabled': disabled,
|
|
114
115
|
};
|
|
115
116
|
|
|
117
|
+
const xSemiProps = {};
|
|
118
|
+
|
|
119
|
+
if (!(className && className.includes('-with-icon'))) {
|
|
120
|
+
xSemiProps['x-semi-prop'] = this.props['x-semi-children-alias'] || 'children';
|
|
121
|
+
}
|
|
122
|
+
|
|
116
123
|
return (
|
|
117
124
|
// eslint-disable-next-line react/button-has-type
|
|
118
|
-
<button
|
|
119
|
-
{...baseProps}
|
|
120
|
-
onClick={this.props.onClick}
|
|
121
|
-
onMouseDown={this.props.onMouseDown}
|
|
122
|
-
style={style}
|
|
123
|
-
>
|
|
125
|
+
<button {...baseProps} onClick={this.props.onClick} onMouseDown={this.props.onMouseDown} style={style}>
|
|
124
126
|
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions */}
|
|
125
|
-
<span className={`${prefixCls}-content`} onClick={e => disabled && e.stopPropagation()}>
|
|
127
|
+
<span className={`${prefixCls}-content`} onClick={e => disabled && e.stopPropagation()} {...xSemiProps}>
|
|
126
128
|
{children}
|
|
127
129
|
</span>
|
|
128
130
|
</button>
|
package/card/index.tsx
CHANGED
|
@@ -55,7 +55,6 @@ export interface CardProps {
|
|
|
55
55
|
'aria-label'?: string;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
|
|
59
58
|
class Card extends PureComponent<CardProps> {
|
|
60
59
|
static Meta = Meta;
|
|
61
60
|
|
|
@@ -106,37 +105,33 @@ class Card extends PureComponent<CardProps> {
|
|
|
106
105
|
if (header || headerExtraContent || title) {
|
|
107
106
|
return (
|
|
108
107
|
<div style={headerStyle} className={headerCls}>
|
|
109
|
-
{
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
}
|
|
137
|
-
</div>
|
|
138
|
-
)
|
|
139
|
-
}
|
|
108
|
+
{header || ( // Priority of header over title and headerExtraContent
|
|
109
|
+
<div className={headerWrapperCls}>
|
|
110
|
+
{headerExtraContent && (
|
|
111
|
+
<div
|
|
112
|
+
className={`${prefixcls}-header-wrapper-extra`}
|
|
113
|
+
x-semi-prop="headerExtraContent"
|
|
114
|
+
>
|
|
115
|
+
{headerExtraContent}
|
|
116
|
+
</div>
|
|
117
|
+
)}
|
|
118
|
+
{title && (
|
|
119
|
+
<div className={titleCls}>
|
|
120
|
+
{isString(title) ? (
|
|
121
|
+
<Typography.Title
|
|
122
|
+
heading={6}
|
|
123
|
+
ellipsis={{ showTooltip: true, rows: 1 }}
|
|
124
|
+
x-semi-prop="title"
|
|
125
|
+
>
|
|
126
|
+
{title}
|
|
127
|
+
</Typography.Title>
|
|
128
|
+
) : (
|
|
129
|
+
title
|
|
130
|
+
)}
|
|
131
|
+
</div>
|
|
132
|
+
)}
|
|
133
|
+
</div>
|
|
134
|
+
)}
|
|
140
135
|
</div>
|
|
141
136
|
);
|
|
142
137
|
}
|
|
@@ -149,16 +144,17 @@ class Card extends PureComponent<CardProps> {
|
|
|
149
144
|
} = this.props;
|
|
150
145
|
const coverCls = cls(`${prefixcls}-cover`);
|
|
151
146
|
|
|
152
|
-
return
|
|
147
|
+
return (
|
|
148
|
+
cover && (
|
|
149
|
+
<div className={coverCls} x-semi-prop="cover">
|
|
150
|
+
{cover}
|
|
151
|
+
</div>
|
|
152
|
+
)
|
|
153
|
+
);
|
|
153
154
|
};
|
|
154
155
|
|
|
155
156
|
renderBody = (): ReactNode => {
|
|
156
|
-
const {
|
|
157
|
-
bodyStyle,
|
|
158
|
-
children,
|
|
159
|
-
actions,
|
|
160
|
-
loading
|
|
161
|
-
} = this.props;
|
|
157
|
+
const { bodyStyle, children, actions, loading } = this.props;
|
|
162
158
|
const bodyCls = cls(`${prefixcls}-body`);
|
|
163
159
|
const actionsCls = cls(`${prefixcls}-body-actions`);
|
|
164
160
|
const actionsItemCls = cls(`${prefixcls}-body-actions-item`);
|
|
@@ -182,7 +178,7 @@ class Card extends PureComponent<CardProps> {
|
|
|
182
178
|
<div className={actionsCls}>
|
|
183
179
|
<Space spacing={12}>
|
|
184
180
|
{actions.map((item, idx) => (
|
|
185
|
-
<div key={idx} className={actionsItemCls}>{item}</div>
|
|
181
|
+
<div key={idx} className={actionsItemCls} x-semi-prop={`actions.${idx}`}>{item}</div>
|
|
186
182
|
))}
|
|
187
183
|
</Space>
|
|
188
184
|
</div>
|
|
@@ -202,7 +198,13 @@ class Card extends PureComponent<CardProps> {
|
|
|
202
198
|
[`${prefixcls}-footer-bordered`]: footerLine
|
|
203
199
|
});
|
|
204
200
|
|
|
205
|
-
return
|
|
201
|
+
return (
|
|
202
|
+
footer && (
|
|
203
|
+
<div style={footerStyle} className={footerCls} x-semi-prop="footer">
|
|
204
|
+
{footer}
|
|
205
|
+
</div>
|
|
206
|
+
)
|
|
207
|
+
);
|
|
206
208
|
};
|
|
207
209
|
|
|
208
210
|
render(): ReactNode {
|
|
@@ -41,6 +41,7 @@ class CarouselArrow extends React.PureComponent<CarouselArrowProps> {
|
|
|
41
41
|
className={leftClassNames}
|
|
42
42
|
onClick={prev}
|
|
43
43
|
{...get(this.props, 'arrowProps.leftArrow.props')}
|
|
44
|
+
x-semi-prop="arrowProps.leftArrow.children"
|
|
44
45
|
>
|
|
45
46
|
{this.renderLeftIcon()}
|
|
46
47
|
</div>
|
|
@@ -50,6 +51,7 @@ class CarouselArrow extends React.PureComponent<CarouselArrowProps> {
|
|
|
50
51
|
className={rightClassNames}
|
|
51
52
|
onClick={next}
|
|
52
53
|
{...get(this.props, 'arrowProps.rightArrow.props')}
|
|
54
|
+
x-semi-prop="arrowProps.rightArrow.children"
|
|
53
55
|
>
|
|
54
56
|
{this.renderRightIcon()}
|
|
55
57
|
</div>
|
package/carousel/index.tsx
CHANGED
|
@@ -279,6 +279,7 @@ class Carousel extends BaseComponent<CarouselProps, CarouselState> {
|
|
|
279
279
|
[`${cssClasses.CAROUSEL_CONTENT}`]: true,
|
|
280
280
|
[`${cssClasses.CAROUSEL_CONTENT}-reverse`]: slideDirection === 'left' ? isReverse : !isReverse,
|
|
281
281
|
})}
|
|
282
|
+
x-semi-prop="children"
|
|
282
283
|
>
|
|
283
284
|
{this.renderChildren()}
|
|
284
285
|
</div>
|