@douyinfe/semi-ui 2.30.0-alpha.1 → 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 +3 -0
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +16 -6
- 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/datePicker/dateInput.d.ts +1 -1
- package/lib/cjs/datePicker/datePicker.d.ts +1 -1
- package/lib/cjs/datePicker/monthsGrid.d.ts +1 -1
- package/lib/cjs/form/baseForm.d.ts +1 -1
- package/lib/cjs/form/field.d.ts +1 -1
- package/lib/cjs/timeline/item.d.ts +2 -0
- package/lib/cjs/timeline/item.js +16 -6
- package/lib/cjs/typography/title.d.ts +1 -1
- package/lib/es/datePicker/dateInput.d.ts +1 -1
- package/lib/es/datePicker/datePicker.d.ts +1 -1
- package/lib/es/datePicker/monthsGrid.d.ts +1 -1
- package/lib/es/form/baseForm.d.ts +1 -1
- package/lib/es/form/field.d.ts +1 -1
- package/lib/es/timeline/item.d.ts +2 -0
- package/lib/es/timeline/item.js +16 -6
- package/lib/es/typography/title.d.ts +1 -1
- package/package.json +8 -8
|
@@ -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">;
|
|
@@ -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>;
|
|
@@ -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/cjs/form/field.d.ts
CHANGED
|
@@ -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>>;
|
|
@@ -14,6 +14,7 @@ export interface TimelineItemProps {
|
|
|
14
14
|
onClick?: React.MouseEventHandler<HTMLLIElement>;
|
|
15
15
|
mode?: 'left' | 'right' | 'center' | 'alternate';
|
|
16
16
|
oddIndex?: boolean;
|
|
17
|
+
lastOne?: boolean;
|
|
17
18
|
}
|
|
18
19
|
export default class Item extends PureComponent<TimelineItemProps> {
|
|
19
20
|
static elementType: string;
|
|
@@ -28,6 +29,7 @@ export default class Item extends PureComponent<TimelineItemProps> {
|
|
|
28
29
|
style: PropTypes.Requireable<object>;
|
|
29
30
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
30
31
|
mode: PropTypes.Requireable<string>;
|
|
32
|
+
lastOne: PropTypes.Requireable<boolean>;
|
|
31
33
|
};
|
|
32
34
|
static defaultProps: {
|
|
33
35
|
type: string;
|
package/lib/cjs/timeline/item.js
CHANGED
|
@@ -30,25 +30,34 @@ class Item extends _react.PureComponent {
|
|
|
30
30
|
super(...arguments); // getC2DCls is used in C2D, it does not work in non-C2D scenes
|
|
31
31
|
|
|
32
32
|
this.getC2DCls = () => {
|
|
33
|
+
let c2dCls = '';
|
|
33
34
|
const {
|
|
34
35
|
mode,
|
|
35
|
-
oddIndex
|
|
36
|
+
oddIndex,
|
|
37
|
+
lastOne
|
|
36
38
|
} = this.props;
|
|
37
39
|
|
|
38
40
|
if (mode) {
|
|
39
41
|
switch (mode) {
|
|
40
42
|
case 'center':
|
|
41
|
-
|
|
43
|
+
c2dCls = "".concat(prefixCls, "-center ").concat(prefixCls, "-left");
|
|
44
|
+
break;
|
|
42
45
|
|
|
43
46
|
case 'alternate':
|
|
44
|
-
|
|
47
|
+
c2dCls = "".concat(prefixCls, "-alternate ").concat(prefixCls, "-").concat(oddIndex ? 'left' : 'right');
|
|
48
|
+
break;
|
|
45
49
|
|
|
46
50
|
default:
|
|
47
|
-
|
|
51
|
+
c2dCls = "".concat(prefixCls, "-").concat(mode, " ").concat(mode === 'right' ? "".concat(prefixCls, "-mode-right") : '');
|
|
52
|
+
break;
|
|
48
53
|
}
|
|
49
54
|
}
|
|
50
55
|
|
|
51
|
-
|
|
56
|
+
if (!lastOne) {
|
|
57
|
+
c2dCls += " ".concat(prefixCls, "-not-last-child");
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return c2dCls;
|
|
52
61
|
};
|
|
53
62
|
}
|
|
54
63
|
|
|
@@ -107,7 +116,8 @@ Item.propTypes = {
|
|
|
107
116
|
className: _propTypes.default.string,
|
|
108
117
|
style: _propTypes.default.object,
|
|
109
118
|
onClick: _propTypes.default.func,
|
|
110
|
-
mode: _propTypes.default.string
|
|
119
|
+
mode: _propTypes.default.string,
|
|
120
|
+
lastOne: _propTypes.default.bool
|
|
111
121
|
};
|
|
112
122
|
Item.defaultProps = {
|
|
113
123
|
type: 'default',
|
|
@@ -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>;
|
|
@@ -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">;
|
|
@@ -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>;
|
|
@@ -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
|
@@ -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>>;
|
|
@@ -14,6 +14,7 @@ export interface TimelineItemProps {
|
|
|
14
14
|
onClick?: React.MouseEventHandler<HTMLLIElement>;
|
|
15
15
|
mode?: 'left' | 'right' | 'center' | 'alternate';
|
|
16
16
|
oddIndex?: boolean;
|
|
17
|
+
lastOne?: boolean;
|
|
17
18
|
}
|
|
18
19
|
export default class Item extends PureComponent<TimelineItemProps> {
|
|
19
20
|
static elementType: string;
|
|
@@ -28,6 +29,7 @@ export default class Item extends PureComponent<TimelineItemProps> {
|
|
|
28
29
|
style: PropTypes.Requireable<object>;
|
|
29
30
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
30
31
|
mode: PropTypes.Requireable<string>;
|
|
32
|
+
lastOne: PropTypes.Requireable<boolean>;
|
|
31
33
|
};
|
|
32
34
|
static defaultProps: {
|
|
33
35
|
type: string;
|
package/lib/es/timeline/item.js
CHANGED
|
@@ -10,25 +10,34 @@ export default class Item extends PureComponent {
|
|
|
10
10
|
super(...arguments); // getC2DCls is used in C2D, it does not work in non-C2D scenes
|
|
11
11
|
|
|
12
12
|
this.getC2DCls = () => {
|
|
13
|
+
let c2dCls = '';
|
|
13
14
|
const {
|
|
14
15
|
mode,
|
|
15
|
-
oddIndex
|
|
16
|
+
oddIndex,
|
|
17
|
+
lastOne
|
|
16
18
|
} = this.props;
|
|
17
19
|
|
|
18
20
|
if (mode) {
|
|
19
21
|
switch (mode) {
|
|
20
22
|
case 'center':
|
|
21
|
-
|
|
23
|
+
c2dCls = "".concat(prefixCls, "-center ").concat(prefixCls, "-left");
|
|
24
|
+
break;
|
|
22
25
|
|
|
23
26
|
case 'alternate':
|
|
24
|
-
|
|
27
|
+
c2dCls = "".concat(prefixCls, "-alternate ").concat(prefixCls, "-").concat(oddIndex ? 'left' : 'right');
|
|
28
|
+
break;
|
|
25
29
|
|
|
26
30
|
default:
|
|
27
|
-
|
|
31
|
+
c2dCls = "".concat(prefixCls, "-").concat(mode, " ").concat(mode === 'right' ? "".concat(prefixCls, "-mode-right") : '');
|
|
32
|
+
break;
|
|
28
33
|
}
|
|
29
34
|
}
|
|
30
35
|
|
|
31
|
-
|
|
36
|
+
if (!lastOne) {
|
|
37
|
+
c2dCls += " ".concat(prefixCls, "-not-last-child");
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return c2dCls;
|
|
32
41
|
};
|
|
33
42
|
}
|
|
34
43
|
|
|
@@ -85,7 +94,8 @@ Item.propTypes = {
|
|
|
85
94
|
className: PropTypes.string,
|
|
86
95
|
style: PropTypes.object,
|
|
87
96
|
onClick: PropTypes.func,
|
|
88
|
-
mode: PropTypes.string
|
|
97
|
+
mode: PropTypes.string,
|
|
98
|
+
lastOne: PropTypes.bool
|
|
89
99
|
};
|
|
90
100
|
Item.defaultProps = {
|
|
91
101
|
type: 'default',
|
|
@@ -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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-ui",
|
|
3
|
-
"version": "2.30.0-alpha.
|
|
3
|
+
"version": "2.30.0-alpha.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es/index.js",
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
"lib/*"
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@douyinfe/semi-animation": "2.30.0-alpha.
|
|
21
|
-
"@douyinfe/semi-animation-react": "2.30.0-alpha.
|
|
22
|
-
"@douyinfe/semi-foundation": "2.30.0-alpha.
|
|
23
|
-
"@douyinfe/semi-icons": "2.30.0-alpha.
|
|
24
|
-
"@douyinfe/semi-illustrations": "2.30.0-alpha.
|
|
25
|
-
"@douyinfe/semi-theme-default": "2.30.0-alpha.
|
|
20
|
+
"@douyinfe/semi-animation": "2.30.0-alpha.2",
|
|
21
|
+
"@douyinfe/semi-animation-react": "2.30.0-alpha.2",
|
|
22
|
+
"@douyinfe/semi-foundation": "2.30.0-alpha.2",
|
|
23
|
+
"@douyinfe/semi-icons": "2.30.0-alpha.2",
|
|
24
|
+
"@douyinfe/semi-illustrations": "2.30.0-alpha.2",
|
|
25
|
+
"@douyinfe/semi-theme-default": "2.30.0-alpha.2",
|
|
26
26
|
"async-validator": "^3.5.0",
|
|
27
27
|
"classnames": "^2.2.6",
|
|
28
28
|
"copy-text-to-clipboard": "^2.1.1",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
],
|
|
70
70
|
"author": "",
|
|
71
71
|
"license": "MIT",
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "22568ce0c431646136c6823016342214cac447ca",
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@babel/plugin-proposal-decorators": "^7.15.8",
|
|
75
75
|
"@babel/plugin-transform-runtime": "^7.15.8",
|