@douyinfe/semi-ui 2.30.0-alpha.0 → 2.30.0-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/dist/css/semi.css +41 -4
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +79 -27
- 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/lib/cjs/anchor/index.d.ts +1 -1
- package/lib/cjs/autoComplete/index.d.ts +1 -1
- package/lib/cjs/carousel/CarouselIndicator.d.ts +1 -1
- package/lib/cjs/carousel/index.d.ts +2 -2
- package/lib/cjs/datePicker/dateInput.d.ts +1 -1
- package/lib/cjs/datePicker/datePicker.d.ts +3 -3
- package/lib/cjs/datePicker/monthsGrid.d.ts +3 -3
- package/lib/cjs/datePicker/quickControl.d.ts +1 -1
- package/lib/cjs/datePicker/yearAndMonth.d.ts +1 -1
- package/lib/cjs/dropdown/index.d.ts +1 -1
- package/lib/cjs/form/baseForm.d.ts +4 -4
- package/lib/cjs/form/field.d.ts +4 -4
- package/lib/cjs/overflowList/index.d.ts +1 -1
- package/lib/cjs/popover/index.d.ts +1 -1
- package/lib/cjs/radio/radio.d.ts +1 -1
- package/lib/cjs/radio/radioGroup.d.ts +1 -1
- package/lib/cjs/select/index.d.ts +1 -1
- package/lib/cjs/steps/basicStep.d.ts +2 -1
- package/lib/cjs/steps/basicStep.js +5 -4
- package/lib/cjs/steps/basicSteps.js +6 -3
- package/lib/cjs/steps/fillStep.d.ts +2 -1
- package/lib/cjs/steps/fillStep.js +2 -1
- package/lib/cjs/steps/fillSteps.js +10 -11
- package/lib/cjs/steps/index.d.ts +59 -0
- package/lib/cjs/steps/index.js +9 -0
- package/lib/cjs/steps/navStep.d.ts +2 -1
- package/lib/cjs/steps/navStep.js +2 -2
- package/lib/cjs/steps/navSteps.js +4 -2
- package/lib/cjs/steps/step.d.ts +0 -1
- package/lib/cjs/steps/step.js +3 -2
- package/lib/cjs/table/Table.d.ts +2 -2
- package/lib/cjs/timeline/item.d.ts +7 -0
- package/lib/cjs/timeline/item.js +41 -3
- package/lib/cjs/tooltip/index.d.ts +1 -1
- package/lib/cjs/typography/numeral.d.ts +1 -1
- package/lib/cjs/typography/title.d.ts +1 -1
- package/lib/es/anchor/index.d.ts +1 -1
- package/lib/es/autoComplete/index.d.ts +1 -1
- package/lib/es/carousel/CarouselIndicator.d.ts +1 -1
- package/lib/es/carousel/index.d.ts +2 -2
- package/lib/es/datePicker/dateInput.d.ts +1 -1
- package/lib/es/datePicker/datePicker.d.ts +3 -3
- package/lib/es/datePicker/monthsGrid.d.ts +3 -3
- package/lib/es/datePicker/quickControl.d.ts +1 -1
- package/lib/es/datePicker/yearAndMonth.d.ts +1 -1
- package/lib/es/dropdown/index.d.ts +1 -1
- package/lib/es/form/baseForm.d.ts +4 -4
- package/lib/es/form/field.d.ts +4 -4
- package/lib/es/overflowList/index.d.ts +1 -1
- package/lib/es/popover/index.d.ts +1 -1
- package/lib/es/radio/radio.d.ts +1 -1
- package/lib/es/radio/radioGroup.d.ts +1 -1
- package/lib/es/select/index.d.ts +1 -1
- package/lib/es/steps/basicStep.d.ts +2 -1
- package/lib/es/steps/basicStep.js +5 -4
- package/lib/es/steps/basicSteps.js +6 -3
- package/lib/es/steps/fillStep.d.ts +2 -1
- package/lib/es/steps/fillStep.js +2 -1
- package/lib/es/steps/fillSteps.js +11 -11
- package/lib/es/steps/index.d.ts +59 -0
- package/lib/es/steps/index.js +6 -0
- package/lib/es/steps/navStep.d.ts +2 -1
- package/lib/es/steps/navStep.js +2 -2
- package/lib/es/steps/navSteps.js +4 -2
- package/lib/es/steps/step.d.ts +0 -1
- package/lib/es/steps/step.js +3 -2
- package/lib/es/table/Table.d.ts +2 -2
- package/lib/es/timeline/item.d.ts +7 -0
- package/lib/es/timeline/item.js +41 -3
- package/lib/es/tooltip/index.d.ts +1 -1
- package/lib/es/typography/numeral.d.ts +1 -1
- package/lib/es/typography/title.d.ts +1 -1
- package/package.json +8 -8
package/lib/cjs/timeline/item.js
CHANGED
|
@@ -26,6 +26,41 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
26
26
|
const prefixCls = _constants.cssClasses.ITEM;
|
|
27
27
|
|
|
28
28
|
class Item extends _react.PureComponent {
|
|
29
|
+
constructor() {
|
|
30
|
+
super(...arguments); // getC2DCls is used in C2D, it does not work in non-C2D scenes
|
|
31
|
+
|
|
32
|
+
this.getC2DCls = () => {
|
|
33
|
+
let c2dCls = '';
|
|
34
|
+
const {
|
|
35
|
+
mode,
|
|
36
|
+
oddIndex,
|
|
37
|
+
lastOne
|
|
38
|
+
} = this.props;
|
|
39
|
+
|
|
40
|
+
if (mode) {
|
|
41
|
+
switch (mode) {
|
|
42
|
+
case 'center':
|
|
43
|
+
c2dCls = "".concat(prefixCls, "-center ").concat(prefixCls, "-left");
|
|
44
|
+
break;
|
|
45
|
+
|
|
46
|
+
case 'alternate':
|
|
47
|
+
c2dCls = "".concat(prefixCls, "-alternate ").concat(prefixCls, "-").concat(oddIndex ? 'left' : 'right');
|
|
48
|
+
break;
|
|
49
|
+
|
|
50
|
+
default:
|
|
51
|
+
c2dCls = "".concat(prefixCls, "-").concat(mode, " ").concat(mode === 'right' ? "".concat(prefixCls, "-mode-right") : '');
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
if (!lastOne) {
|
|
57
|
+
c2dCls += " ".concat(prefixCls, "-not-last-child");
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return c2dCls;
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
|
|
29
64
|
render() {
|
|
30
65
|
const {
|
|
31
66
|
className,
|
|
@@ -38,7 +73,7 @@ class Item extends _react.PureComponent {
|
|
|
38
73
|
extra,
|
|
39
74
|
onClick
|
|
40
75
|
} = this.props;
|
|
41
|
-
const itemCls = (0, _classnames.default)(prefixCls, className);
|
|
76
|
+
const itemCls = (0, _classnames.default)(prefixCls, className, this.getC2DCls());
|
|
42
77
|
const dotCls = (0, _classnames.default)({
|
|
43
78
|
["".concat(prefixCls, "-head")]: true,
|
|
44
79
|
["".concat(prefixCls, "-head-custom")]: dot,
|
|
@@ -80,10 +115,13 @@ Item.propTypes = {
|
|
|
80
115
|
position: _propTypes.default.oneOf(_constants.strings.ITEM_POS),
|
|
81
116
|
className: _propTypes.default.string,
|
|
82
117
|
style: _propTypes.default.object,
|
|
83
|
-
onClick: _propTypes.default.func
|
|
118
|
+
onClick: _propTypes.default.func,
|
|
119
|
+
mode: _propTypes.default.string,
|
|
120
|
+
lastOne: _propTypes.default.bool
|
|
84
121
|
};
|
|
85
122
|
Item.defaultProps = {
|
|
86
123
|
type: 'default',
|
|
87
124
|
time: '',
|
|
88
125
|
onClick: _noop2.default
|
|
89
|
-
};
|
|
126
|
+
};
|
|
127
|
+
Item.elementType = 'Timeline.Item';
|
|
@@ -86,7 +86,7 @@ export default class Tooltip extends BaseComponent<TooltipProps, TooltipState> {
|
|
|
86
86
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
87
87
|
motion: PropTypes.Requireable<boolean>;
|
|
88
88
|
autoAdjustOverflow: PropTypes.Requireable<boolean>;
|
|
89
|
-
position: PropTypes.Requireable<"
|
|
89
|
+
position: PropTypes.Requireable<"left" | "top" | "right" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver">;
|
|
90
90
|
getPopupContainer: PropTypes.Requireable<(...args: any[]) => any>;
|
|
91
91
|
mouseEnterDelay: PropTypes.Requireable<number>;
|
|
92
92
|
mouseLeaveDelay: PropTypes.Requireable<number>;
|
|
@@ -28,7 +28,7 @@ export default class Numeral extends PureComponent<NumeralProps> {
|
|
|
28
28
|
static propTypes: {
|
|
29
29
|
rule: PropTypes.Requireable<"text" | "numbers" | "bytes-decimal" | "bytes-binary" | "percentages" | "exponential">;
|
|
30
30
|
precision: PropTypes.Requireable<number>;
|
|
31
|
-
truncate: PropTypes.Requireable<"
|
|
31
|
+
truncate: PropTypes.Requireable<"round" | "ceil" | "floor">;
|
|
32
32
|
parser: PropTypes.Requireable<(...args: any[]) => any>;
|
|
33
33
|
copyable: PropTypes.Requireable<NonNullable<boolean | object>>;
|
|
34
34
|
delete: PropTypes.Requireable<boolean>;
|
|
@@ -37,7 +37,7 @@ export default class Title extends PureComponent<TitleProps> {
|
|
|
37
37
|
underline: PropTypes.Requireable<boolean>;
|
|
38
38
|
strong: PropTypes.Requireable<boolean>;
|
|
39
39
|
type: PropTypes.Requireable<"warning" | "success" | "primary" | "tertiary" | "secondary" | "danger" | "quaternary">;
|
|
40
|
-
heading: PropTypes.Requireable<
|
|
40
|
+
heading: PropTypes.Requireable<4 | 2 | 1 | 3 | 6 | 5>;
|
|
41
41
|
style: PropTypes.Requireable<object>;
|
|
42
42
|
className: PropTypes.Requireable<string>;
|
|
43
43
|
component: PropTypes.Requireable<string>;
|
package/lib/es/anchor/index.d.ts
CHANGED
|
@@ -48,7 +48,7 @@ declare class Anchor extends BaseComponent<AnchorProps, AnchorState> {
|
|
|
48
48
|
offsetTop: PropTypes.Requireable<number>;
|
|
49
49
|
targetOffset: PropTypes.Requireable<number>;
|
|
50
50
|
showTooltip: PropTypes.Requireable<boolean>;
|
|
51
|
-
position: PropTypes.Requireable<"
|
|
51
|
+
position: PropTypes.Requireable<"left" | "top" | "right" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver">;
|
|
52
52
|
maxWidth: PropTypes.Requireable<NonNullable<string | number>>;
|
|
53
53
|
maxHeight: PropTypes.Requireable<NonNullable<string | number>>;
|
|
54
54
|
getContainer: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -116,7 +116,7 @@ declare class AutoComplete<T extends AutoCompleteItems> extends BaseComponent<Au
|
|
|
116
116
|
onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
117
117
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
118
118
|
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
119
|
-
position: PropTypes.Requireable<"
|
|
119
|
+
position: PropTypes.Requireable<"left" | "top" | "right" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver">;
|
|
120
120
|
placeholder: PropTypes.Requireable<string>;
|
|
121
121
|
prefix: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
122
122
|
onChangeWithObject: PropTypes.Requireable<boolean>;
|
|
@@ -8,7 +8,7 @@ declare class CarouselIndicator extends React.PureComponent<CarouselIndicatorPro
|
|
|
8
8
|
position: PropTypes.Requireable<"left" | "right" | "center">;
|
|
9
9
|
size: PropTypes.Requireable<"small" | "medium">;
|
|
10
10
|
style: PropTypes.Requireable<object>;
|
|
11
|
-
theme: PropTypes.Requireable<"
|
|
11
|
+
theme: PropTypes.Requireable<"dark" | "light" | "primary">;
|
|
12
12
|
total: PropTypes.Requireable<number>;
|
|
13
13
|
onIndicatorChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
14
14
|
type: PropTypes.Requireable<"line" | "dot" | "columnar">;
|
|
@@ -22,9 +22,9 @@ declare class Carousel extends BaseComponent<CarouselProps, CarouselState> {
|
|
|
22
22
|
indicatorPosition: PropTypes.Requireable<"left" | "right" | "center">;
|
|
23
23
|
indicatorSize: PropTypes.Requireable<"small" | "medium">;
|
|
24
24
|
indicatorType: PropTypes.Requireable<"line" | "dot" | "columnar">;
|
|
25
|
-
theme: PropTypes.Requireable<"
|
|
25
|
+
theme: PropTypes.Requireable<"dark" | "light" | "primary">;
|
|
26
26
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
27
|
-
arrowType: PropTypes.Requireable<"
|
|
27
|
+
arrowType: PropTypes.Requireable<"always" | "hover">;
|
|
28
28
|
showArrow: PropTypes.Requireable<boolean>;
|
|
29
29
|
showIndicator: PropTypes.Requireable<boolean>;
|
|
30
30
|
slideDirection: PropTypes.Requireable<"left" | "right">;
|
|
@@ -26,7 +26,7 @@ export default class DateInput extends BaseComponent<DateInputProps, {}> {
|
|
|
26
26
|
onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
27
27
|
value: PropTypes.Requireable<any[]>;
|
|
28
28
|
disabled: PropTypes.Requireable<boolean>;
|
|
29
|
-
type: PropTypes.Requireable<"
|
|
29
|
+
type: PropTypes.Requireable<"date" | "month" | "dateTime" | "dateRange" | "year" | "dateTimeRange">;
|
|
30
30
|
showClear: PropTypes.Requireable<boolean>;
|
|
31
31
|
format: PropTypes.Requireable<string>;
|
|
32
32
|
inputStyle: PropTypes.Requireable<object>;
|
|
@@ -46,7 +46,7 @@ export default class DatePicker extends BaseComponent<DatePickerProps, DatePicke
|
|
|
46
46
|
'aria-invalid': PropTypes.Requireable<boolean>;
|
|
47
47
|
'aria-labelledby': PropTypes.Requireable<string>;
|
|
48
48
|
'aria-required': PropTypes.Requireable<boolean>;
|
|
49
|
-
type: PropTypes.Requireable<"
|
|
49
|
+
type: PropTypes.Requireable<"date" | "month" | "dateTime" | "dateRange" | "year" | "dateTimeRange">;
|
|
50
50
|
size: PropTypes.Requireable<"default" | "small" | "large">;
|
|
51
51
|
clearIcon: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
52
52
|
density: PropTypes.Requireable<"default" | "compact">;
|
|
@@ -62,7 +62,7 @@ export default class DatePicker extends BaseComponent<DatePickerProps, DatePicke
|
|
|
62
62
|
max: PropTypes.Requireable<number>;
|
|
63
63
|
placeholder: PropTypes.Requireable<NonNullable<string | any[]>>;
|
|
64
64
|
presets: PropTypes.Requireable<any[]>;
|
|
65
|
-
presetPosition: PropTypes.Requireable<"
|
|
65
|
+
presetPosition: PropTypes.Requireable<"left" | "top" | "right" | "bottom">;
|
|
66
66
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
67
67
|
onChangeWithDateFirst: PropTypes.Requireable<boolean>;
|
|
68
68
|
weekStartsOn: PropTypes.Requireable<number>;
|
|
@@ -79,7 +79,7 @@ export default class DatePicker extends BaseComponent<DatePickerProps, DatePicke
|
|
|
79
79
|
insetLabel: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
80
80
|
insetLabelId: PropTypes.Requireable<string>;
|
|
81
81
|
zIndex: PropTypes.Requireable<number>;
|
|
82
|
-
position: PropTypes.Requireable<"
|
|
82
|
+
position: PropTypes.Requireable<"left" | "top" | "right" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver">;
|
|
83
83
|
getPopupContainer: PropTypes.Requireable<(...args: any[]) => any>;
|
|
84
84
|
onCancel: PropTypes.Requireable<(...args: any[]) => any>;
|
|
85
85
|
onConfirm: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -19,7 +19,7 @@ export interface MonthsGridProps extends MonthsGridFoundationProps, BaseProps {
|
|
|
19
19
|
export declare type MonthsGridState = MonthsGridFoundationState;
|
|
20
20
|
export default class MonthsGrid extends BaseComponent<MonthsGridProps, MonthsGridState> {
|
|
21
21
|
static propTypes: {
|
|
22
|
-
type: PropTypes.Requireable<"
|
|
22
|
+
type: PropTypes.Requireable<"date" | "month" | "dateTime" | "dateRange" | "year" | "dateTimeRange">;
|
|
23
23
|
defaultValue: PropTypes.Requireable<any[]>;
|
|
24
24
|
defaultPickerValue: PropTypes.Requireable<NonNullable<string | number | object>>;
|
|
25
25
|
multiple: PropTypes.Requireable<boolean>;
|
|
@@ -51,7 +51,7 @@ export default class MonthsGrid extends BaseComponent<MonthsGridProps, MonthsGri
|
|
|
51
51
|
onPanelChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
52
52
|
focusRecordsRef: PropTypes.Requireable<object>;
|
|
53
53
|
triggerRender: PropTypes.Requireable<(...args: any[]) => any>;
|
|
54
|
-
presetPosition: PropTypes.Requireable<"
|
|
54
|
+
presetPosition: PropTypes.Requireable<"left" | "top" | "right" | "bottom">;
|
|
55
55
|
renderQuickControls: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
56
56
|
renderDateInput: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
57
57
|
};
|
|
@@ -86,7 +86,7 @@ export default class MonthsGrid extends BaseComponent<MonthsGridProps, MonthsGri
|
|
|
86
86
|
renderMonth(month: Date, panelType: PanelType): JSX.Element;
|
|
87
87
|
handleWeeksRowNumChange: (weeksRowNum: number, panelType: PanelType) => void;
|
|
88
88
|
reselect: () => void;
|
|
89
|
-
getYAMOpenType: () => "
|
|
89
|
+
getYAMOpenType: () => "both" | "none" | "left" | "right";
|
|
90
90
|
renderTimePicker(panelType: PanelType, panelDetail: MonthInfo): JSX.Element;
|
|
91
91
|
renderYearAndMonth(panelType: PanelType, panelDetail: MonthInfo): JSX.Element;
|
|
92
92
|
renderSwitch(panelType: PanelType): JSX.Element;
|
|
@@ -14,7 +14,7 @@ export interface QuickControlProps {
|
|
|
14
14
|
declare class QuickControl extends PureComponent<QuickControlProps> {
|
|
15
15
|
static propTypes: {
|
|
16
16
|
presets: PropTypes.Requireable<any[]>;
|
|
17
|
-
presetPosition: PropTypes.Requireable<"
|
|
17
|
+
presetPosition: PropTypes.Requireable<"left" | "top" | "right" | "bottom">;
|
|
18
18
|
onPresetClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
19
19
|
type: PropTypes.Requireable<string>;
|
|
20
20
|
insetInput: PropTypes.Requireable<NonNullable<boolean | object>>;
|
|
@@ -20,7 +20,7 @@ declare class YearAndMonth extends BaseComponent<YearAndMonthProps, YearAndMonth
|
|
|
20
20
|
noBackBtn: PropTypes.Requireable<boolean>;
|
|
21
21
|
disabledDate: PropTypes.Requireable<(...args: any[]) => any>;
|
|
22
22
|
density: PropTypes.Requireable<string>;
|
|
23
|
-
presetPosition: PropTypes.Requireable<"
|
|
23
|
+
presetPosition: PropTypes.Requireable<"left" | "top" | "right" | "bottom">;
|
|
24
24
|
renderQuickControls: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
25
25
|
renderDateInput: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
26
26
|
};
|
|
@@ -66,7 +66,7 @@ declare class Dropdown extends BaseComponent<DropdownProps, DropdownState> {
|
|
|
66
66
|
motion: PropTypes.Requireable<NonNullable<boolean | object>>;
|
|
67
67
|
onVisibleChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
68
68
|
prefixCls: PropTypes.Requireable<string>;
|
|
69
|
-
position: PropTypes.Requireable<"
|
|
69
|
+
position: PropTypes.Requireable<"left" | "top" | "right" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver">;
|
|
70
70
|
rePosKey: PropTypes.Requireable<NonNullable<string | number>>;
|
|
71
71
|
render: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
72
72
|
spacing: PropTypes.Requireable<number>;
|
|
@@ -57,9 +57,9 @@ declare class Form<Values extends Record<string, any> = any> extends BaseCompone
|
|
|
57
57
|
static Select: React.ComponentType<import("utility-types").Subtract<{
|
|
58
58
|
'aria-describedby'?: string;
|
|
59
59
|
'aria-errormessage'?: string;
|
|
60
|
-
'aria-invalid'?: boolean | "
|
|
60
|
+
'aria-invalid'?: boolean | "false" | "true" | "grammar" | "spelling";
|
|
61
61
|
'aria-labelledby'?: string;
|
|
62
|
-
'aria-required'?: boolean | "
|
|
62
|
+
'aria-required'?: boolean | "false" | "true";
|
|
63
63
|
id?: string;
|
|
64
64
|
autoFocus?: boolean;
|
|
65
65
|
autoClearSearchValue?: boolean;
|
|
@@ -82,7 +82,7 @@ declare class Form<Values extends Record<string, any> = any> extends BaseCompone
|
|
|
82
82
|
expandRestTagsOnClick?: boolean;
|
|
83
83
|
onDropdownVisibleChange?: (visible: boolean) => void;
|
|
84
84
|
zIndex?: number;
|
|
85
|
-
position?: "
|
|
85
|
+
position?: "left" | "top" | "right" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver";
|
|
86
86
|
onSearch?: (value: string) => void;
|
|
87
87
|
dropdownClassName?: string;
|
|
88
88
|
dropdownStyle?: React.CSSProperties;
|
|
@@ -137,7 +137,7 @@ declare class Form<Values extends Record<string, any> = any> extends BaseCompone
|
|
|
137
137
|
preventScroll?: boolean;
|
|
138
138
|
showRestTagsPopover?: boolean;
|
|
139
139
|
restTagsPopoverProps?: import("../popover").PopoverProps;
|
|
140
|
-
} & Pick<import("../tooltip").TooltipProps, "
|
|
140
|
+
} & Pick<import("../tooltip").TooltipProps, "getPopupContainer" | "motion" | "stopPropagation" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & React.RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
|
|
141
141
|
static Checkbox: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox").CheckboxProps & import("./interface").RCIncludeType>;
|
|
142
142
|
static CheckboxGroup: React.ComponentType<import("utility-types").Subtract<import("../checkbox").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & React.RefAttributes<any>>;
|
|
143
143
|
static Radio: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../radio").RadioProps & import("./interface").RCIncludeType>;
|
package/lib/es/form/field.d.ts
CHANGED
|
@@ -5,9 +5,9 @@ declare const FormTextArea: import("react").ComponentType<import("utility-types"
|
|
|
5
5
|
declare const FormSelect: import("react").ComponentType<import("utility-types").Subtract<{
|
|
6
6
|
'aria-describedby'?: string;
|
|
7
7
|
'aria-errormessage'?: string;
|
|
8
|
-
'aria-invalid'?: boolean | "
|
|
8
|
+
'aria-invalid'?: boolean | "false" | "true" | "grammar" | "spelling";
|
|
9
9
|
'aria-labelledby'?: string;
|
|
10
|
-
'aria-required'?: boolean | "
|
|
10
|
+
'aria-required'?: boolean | "false" | "true";
|
|
11
11
|
id?: string;
|
|
12
12
|
autoFocus?: boolean;
|
|
13
13
|
autoClearSearchValue?: boolean;
|
|
@@ -30,7 +30,7 @@ declare const FormSelect: import("react").ComponentType<import("utility-types").
|
|
|
30
30
|
expandRestTagsOnClick?: boolean;
|
|
31
31
|
onDropdownVisibleChange?: (visible: boolean) => void;
|
|
32
32
|
zIndex?: number;
|
|
33
|
-
position?: "
|
|
33
|
+
position?: "left" | "top" | "right" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver";
|
|
34
34
|
onSearch?: (value: string) => void;
|
|
35
35
|
dropdownClassName?: string;
|
|
36
36
|
dropdownStyle?: import("react").CSSProperties;
|
|
@@ -85,7 +85,7 @@ declare const FormSelect: import("react").ComponentType<import("utility-types").
|
|
|
85
85
|
preventScroll?: boolean;
|
|
86
86
|
showRestTagsPopover?: boolean;
|
|
87
87
|
restTagsPopoverProps?: import("../popover").PopoverProps;
|
|
88
|
-
} & Pick<import("../tooltip").TooltipProps, "
|
|
88
|
+
} & Pick<import("../tooltip").TooltipProps, "getPopupContainer" | "motion" | "stopPropagation" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & import("react").RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
|
|
89
89
|
declare const FormCheckboxGroup: import("react").ComponentType<import("utility-types").Subtract<import("../checkbox/checkboxGroup").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & import("react").RefAttributes<any>>;
|
|
90
90
|
declare const FormCheckbox: import("react").ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox/checkbox").CheckboxProps & import("./interface").RCIncludeType>;
|
|
91
91
|
declare const FormRadioGroup: import("react").ComponentType<import("utility-types").Subtract<import("../radio/radioGroup").RadioGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & import("react").RefAttributes<any>>;
|
|
@@ -88,7 +88,7 @@ declare class OverflowList extends BaseComponent<OverflowListProps, OverflowList
|
|
|
88
88
|
className: string;
|
|
89
89
|
style: {
|
|
90
90
|
maxWidth: string;
|
|
91
|
-
visibility: "
|
|
91
|
+
visibility: "hidden" | "visible";
|
|
92
92
|
accentColor?: import("csstype").Property.AccentColor;
|
|
93
93
|
alignContent?: import("csstype").Property.AlignContent;
|
|
94
94
|
alignItems?: import("csstype").Property.AlignItems;
|
|
@@ -54,7 +54,7 @@ declare class Popover extends React.PureComponent<PopoverProps, PopoverState> {
|
|
|
54
54
|
visible: PropTypes.Requireable<boolean>;
|
|
55
55
|
autoAdjustOverflow: PropTypes.Requireable<boolean>;
|
|
56
56
|
motion: PropTypes.Requireable<boolean>;
|
|
57
|
-
position: PropTypes.Requireable<"
|
|
57
|
+
position: PropTypes.Requireable<"left" | "top" | "right" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver">;
|
|
58
58
|
margin: PropTypes.Requireable<NonNullable<number | object>>;
|
|
59
59
|
mouseEnterDelay: PropTypes.Requireable<number>;
|
|
60
60
|
mouseLeaveDelay: PropTypes.Requireable<number>;
|
package/lib/es/radio/radio.d.ts
CHANGED
|
@@ -82,7 +82,7 @@ declare class Radio extends BaseComponent<RadioProps, RadioState> {
|
|
|
82
82
|
prefixCls?: string;
|
|
83
83
|
name?: string;
|
|
84
84
|
onChange?: (e: RadioChangeEvent) => void;
|
|
85
|
-
buttonSize?: "small" | "
|
|
85
|
+
buttonSize?: "small" | "large" | "middle";
|
|
86
86
|
isCardRadio?: boolean;
|
|
87
87
|
isPureCardRadio?: boolean;
|
|
88
88
|
};
|
|
@@ -48,7 +48,7 @@ declare class RadioGroup extends BaseComponent<RadioGroupProps, RadioGroupState>
|
|
|
48
48
|
disabled: PropTypes.Requireable<boolean>;
|
|
49
49
|
name: PropTypes.Requireable<string>;
|
|
50
50
|
options: PropTypes.Requireable<any[]>;
|
|
51
|
-
buttonSize: PropTypes.Requireable<"small" | "
|
|
51
|
+
buttonSize: PropTypes.Requireable<"small" | "large" | "middle">;
|
|
52
52
|
type: PropTypes.Requireable<"default" | "button" | "card" | "pureCard">;
|
|
53
53
|
value: PropTypes.Requireable<any>;
|
|
54
54
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
package/lib/es/select/index.d.ts
CHANGED
|
@@ -181,7 +181,7 @@ declare class Select extends BaseComponent<SelectProps, SelectState> {
|
|
|
181
181
|
expandRestTagsOnClick: PropTypes.Requireable<boolean>;
|
|
182
182
|
onDropdownVisibleChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
183
183
|
zIndex: PropTypes.Requireable<number>;
|
|
184
|
-
position: PropTypes.Requireable<"
|
|
184
|
+
position: PropTypes.Requireable<"left" | "top" | "right" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver">;
|
|
185
185
|
onSearch: PropTypes.Requireable<(...args: any[]) => any>;
|
|
186
186
|
getPopupContainer: PropTypes.Requireable<(...args: any[]) => any>;
|
|
187
187
|
dropdownClassName: PropTypes.Requireable<string>;
|
|
@@ -19,7 +19,7 @@ export interface BasicStepProps {
|
|
|
19
19
|
onKeyDown?: React.KeyboardEventHandler<HTMLDivElement>;
|
|
20
20
|
"role"?: React.AriaRole;
|
|
21
21
|
"aria-label"?: React.AriaAttributes["aria-label"];
|
|
22
|
-
|
|
22
|
+
usedInC2D?: string;
|
|
23
23
|
direction?: string;
|
|
24
24
|
}
|
|
25
25
|
export declare enum stepSizeMapIconSize {
|
|
@@ -47,5 +47,6 @@ declare const BasicStep: {
|
|
|
47
47
|
status: string;
|
|
48
48
|
className: string;
|
|
49
49
|
};
|
|
50
|
+
elementType: string;
|
|
50
51
|
};
|
|
51
52
|
export default BasicStep;
|
|
@@ -27,8 +27,8 @@ const BasicStep = props => {
|
|
|
27
27
|
onClick,
|
|
28
28
|
onChange,
|
|
29
29
|
onKeyDown,
|
|
30
|
-
|
|
31
|
-
direction:
|
|
30
|
+
usedInC2D,
|
|
31
|
+
direction: direction
|
|
32
32
|
} = props;
|
|
33
33
|
|
|
34
34
|
const renderIcon = () => {
|
|
@@ -90,8 +90,8 @@ const BasicStep = props => {
|
|
|
90
90
|
const classString = classnames(prefixCls, "".concat(prefixCls, "-").concat(status), {
|
|
91
91
|
["".concat(prefixCls, "-active")]: active,
|
|
92
92
|
["".concat(prefixCls, "-done")]: done,
|
|
93
|
-
["".concat(prefixCls, "-basic")]:
|
|
94
|
-
["".concat(prefixCls, "-").concat(
|
|
93
|
+
["".concat(prefixCls, "-basic")]: usedInC2D,
|
|
94
|
+
["".concat(prefixCls, "-").concat(direction)]: direction,
|
|
95
95
|
["".concat(prefixCls, "-small")]: size === 'small'
|
|
96
96
|
}, className);
|
|
97
97
|
|
|
@@ -156,4 +156,5 @@ BasicStep.defaultProps = {
|
|
|
156
156
|
status: 'wait',
|
|
157
157
|
className: ''
|
|
158
158
|
};
|
|
159
|
+
BasicStep.elementType = 'Steps.BasicStep';
|
|
159
160
|
export default BasicStep;
|
|
@@ -25,10 +25,13 @@ const Steps = props => {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
const stepNumber = initial + index;
|
|
28
|
-
const childProps = Object.assign({
|
|
28
|
+
const childProps = Object.assign(Object.assign({
|
|
29
29
|
stepNumber: "".concat(stepNumber + 1),
|
|
30
|
-
size
|
|
31
|
-
|
|
30
|
+
size,
|
|
31
|
+
direction
|
|
32
|
+
}, child.props), {
|
|
33
|
+
total: filteredChildren.length
|
|
34
|
+
});
|
|
32
35
|
|
|
33
36
|
if (status === 'error' && index === current - 1) {
|
|
34
37
|
childProps.className = "".concat(prefixCls, "-next-error");
|
|
@@ -15,7 +15,7 @@ export interface FillStepProps {
|
|
|
15
15
|
onKeyDown?: React.KeyboardEventHandler<HTMLDivElement>;
|
|
16
16
|
"role"?: React.AriaRole;
|
|
17
17
|
"aria-label"?: React.AriaAttributes["aria-label"];
|
|
18
|
-
|
|
18
|
+
usedInC2D?: boolean;
|
|
19
19
|
}
|
|
20
20
|
declare const FillStep: {
|
|
21
21
|
(props: FillStepProps): JSX.Element;
|
|
@@ -34,5 +34,6 @@ declare const FillStep: {
|
|
|
34
34
|
status: string;
|
|
35
35
|
className: string;
|
|
36
36
|
};
|
|
37
|
+
elementType: string;
|
|
37
38
|
};
|
|
38
39
|
export default FillStep;
|
package/lib/es/steps/fillStep.js
CHANGED
|
@@ -98,7 +98,7 @@ const FillStep = props => {
|
|
|
98
98
|
[prefixCls]: true,
|
|
99
99
|
["".concat(prefixCls, "-").concat(status)]: Boolean(status),
|
|
100
100
|
["".concat(prefixCls, "-clickable")]: onClick,
|
|
101
|
-
["".concat(prefixCls, "-fill")]: props.
|
|
101
|
+
["".concat(prefixCls, "-fill")]: props.usedInC2D
|
|
102
102
|
}, className),
|
|
103
103
|
style: style,
|
|
104
104
|
onClick: e => {
|
|
@@ -133,4 +133,5 @@ FillStep.defaultProps = {
|
|
|
133
133
|
status: 'wait',
|
|
134
134
|
className: ''
|
|
135
135
|
};
|
|
136
|
+
FillStep.elementType = 'Steps.FillStep';
|
|
136
137
|
export default FillStep;
|
|
@@ -17,19 +17,20 @@ const Steps = props => {
|
|
|
17
17
|
onChange
|
|
18
18
|
} = props;
|
|
19
19
|
const inner = useMemo(() => {
|
|
20
|
-
const filteredChildren = Children.toArray(children).filter(c => /*#__PURE__*/isValidElement(c));
|
|
21
|
-
|
|
22
|
-
width: "".concat(100 / filteredChildren.length, "%")
|
|
23
|
-
};
|
|
20
|
+
const filteredChildren = Children.toArray(children).filter(c => /*#__PURE__*/isValidElement(c)); // const colStyle = direction === 'vertical' ? null : { width: `${100 / filteredChildren.length }%` };
|
|
21
|
+
|
|
24
22
|
const content = Children.map(filteredChildren, (child, index) => {
|
|
25
23
|
if (!child) {
|
|
26
24
|
return null;
|
|
27
25
|
}
|
|
28
26
|
|
|
29
27
|
const stepNumber = initial + index;
|
|
30
|
-
const childProps = Object.assign({
|
|
31
|
-
stepNumber: "".concat(stepNumber + 1)
|
|
32
|
-
|
|
28
|
+
const childProps = Object.assign(Object.assign({
|
|
29
|
+
stepNumber: "".concat(stepNumber + 1),
|
|
30
|
+
direction
|
|
31
|
+
}, child.props), {
|
|
32
|
+
total: filteredChildren.length
|
|
33
|
+
});
|
|
33
34
|
|
|
34
35
|
if (status === 'error' && index === current - 1) {
|
|
35
36
|
childProps.className = "".concat(prefixCls, "-next-error");
|
|
@@ -49,11 +50,10 @@ const Steps = props => {
|
|
|
49
50
|
if (index !== current) {
|
|
50
51
|
onChange(index + initial);
|
|
51
52
|
}
|
|
52
|
-
};
|
|
53
|
+
}; // return <Col style={colStyle}>{cloneElement(child, { ...childProps })}</Col>;
|
|
54
|
+
|
|
53
55
|
|
|
54
|
-
return /*#__PURE__*/React.createElement(Col, {
|
|
55
|
-
style: colStyle
|
|
56
|
-
}, /*#__PURE__*/cloneElement(child, Object.assign({}, childProps)));
|
|
56
|
+
return /*#__PURE__*/React.createElement(Col, null, /*#__PURE__*/cloneElement(child, Object.assign({}, childProps)));
|
|
57
57
|
});
|
|
58
58
|
return content;
|
|
59
59
|
}, [children, initial, prefixCls, direction, status, current, onChange]);
|
package/lib/es/steps/index.d.ts
CHANGED
|
@@ -26,6 +26,65 @@ declare class Steps extends Component<StepsProps> {
|
|
|
26
26
|
(props: import("./step").StepProps): JSX.Element;
|
|
27
27
|
elementType: string;
|
|
28
28
|
};
|
|
29
|
+
static FillStep: {
|
|
30
|
+
(props: import("./fillStep").FillStepProps): JSX.Element;
|
|
31
|
+
propTypes: {
|
|
32
|
+
prefixCls: PropTypes.Requireable<string>;
|
|
33
|
+
description: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
34
|
+
icon: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
35
|
+
status: PropTypes.Requireable<string>;
|
|
36
|
+
title: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
37
|
+
className: PropTypes.Requireable<string>;
|
|
38
|
+
style: PropTypes.Requireable<object>;
|
|
39
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
40
|
+
};
|
|
41
|
+
defaultProps: {
|
|
42
|
+
prefixCls: string;
|
|
43
|
+
status: string;
|
|
44
|
+
className: string;
|
|
45
|
+
};
|
|
46
|
+
elementType: string;
|
|
47
|
+
};
|
|
48
|
+
static BasicStep: {
|
|
49
|
+
(props: import("./basicStep").BasicStepProps): JSX.Element;
|
|
50
|
+
propTypes: {
|
|
51
|
+
prefixCls: PropTypes.Requireable<string>;
|
|
52
|
+
description: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
53
|
+
icon: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
54
|
+
status: PropTypes.Requireable<string>;
|
|
55
|
+
title: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
56
|
+
className: PropTypes.Requireable<string>;
|
|
57
|
+
style: PropTypes.Requireable<object>;
|
|
58
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
59
|
+
active: PropTypes.Requireable<boolean>;
|
|
60
|
+
done: PropTypes.Requireable<boolean>;
|
|
61
|
+
};
|
|
62
|
+
defaultProps: {
|
|
63
|
+
prefixCls: string;
|
|
64
|
+
active: boolean;
|
|
65
|
+
done: boolean;
|
|
66
|
+
status: string;
|
|
67
|
+
className: string;
|
|
68
|
+
};
|
|
69
|
+
elementType: string;
|
|
70
|
+
};
|
|
71
|
+
static NavStep: {
|
|
72
|
+
(props: import("./navStep").NavStepProps): JSX.Element;
|
|
73
|
+
propTypes: {
|
|
74
|
+
prefixCls: PropTypes.Requireable<string>;
|
|
75
|
+
title: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
76
|
+
className: PropTypes.Requireable<string>;
|
|
77
|
+
style: PropTypes.Requireable<object>;
|
|
78
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
79
|
+
active: PropTypes.Requireable<boolean>;
|
|
80
|
+
};
|
|
81
|
+
defaultProps: {
|
|
82
|
+
prefixCls: string;
|
|
83
|
+
active: boolean;
|
|
84
|
+
className: string;
|
|
85
|
+
};
|
|
86
|
+
elementType: string;
|
|
87
|
+
};
|
|
29
88
|
static propTypes: {
|
|
30
89
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
31
90
|
type: PropTypes.Requireable<string>;
|
package/lib/es/steps/index.js
CHANGED
|
@@ -18,6 +18,9 @@ import Step from './step';
|
|
|
18
18
|
import FillSteps from './fillSteps';
|
|
19
19
|
import BasicSteps from './basicSteps';
|
|
20
20
|
import NavSteps from './navSteps';
|
|
21
|
+
import FillStep from './fillStep';
|
|
22
|
+
import BasicStep from './basicStep';
|
|
23
|
+
import NavStep from './navStep';
|
|
21
24
|
import Context from './context';
|
|
22
25
|
|
|
23
26
|
class Steps extends Component {
|
|
@@ -57,6 +60,9 @@ class Steps extends Component {
|
|
|
57
60
|
}
|
|
58
61
|
|
|
59
62
|
Steps.Step = Step;
|
|
63
|
+
Steps.FillStep = FillStep;
|
|
64
|
+
Steps.BasicStep = BasicStep;
|
|
65
|
+
Steps.NavStep = NavStep;
|
|
60
66
|
Steps.propTypes = {
|
|
61
67
|
onChange: PropTypes.func,
|
|
62
68
|
type: PropTypes.oneOf(['fill', 'basic', 'nav']),
|
|
@@ -13,7 +13,7 @@ export interface NavStepProps {
|
|
|
13
13
|
onKeyDown?: React.KeyboardEventHandler<HTMLDivElement>;
|
|
14
14
|
"role"?: React.AriaRole;
|
|
15
15
|
"aria-label"?: React.AriaAttributes["aria-label"];
|
|
16
|
-
|
|
16
|
+
usedInC2D?: boolean;
|
|
17
17
|
lastOne?: boolean;
|
|
18
18
|
size?: string;
|
|
19
19
|
}
|
|
@@ -32,5 +32,6 @@ declare const NavStep: {
|
|
|
32
32
|
active: boolean;
|
|
33
33
|
className: string;
|
|
34
34
|
};
|
|
35
|
+
elementType: string;
|
|
35
36
|
};
|
|
36
37
|
export default NavStep;
|