@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.
@@ -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<"dateTime" | "date" | "month" | "dateRange" | "year" | "dateTimeRange">;
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<"dateTime" | "date" | "month" | "dateRange" | "year" | "dateTimeRange">;
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<"dateTime" | "date" | "month" | "dateRange" | "year" | "dateTimeRange">;
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, "stopPropagation" | "motion" | "getPopupContainer" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & React.RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
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>;
@@ -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, "stopPropagation" | "motion" | "getPopupContainer" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & import("react").RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
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;
@@ -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
- return "".concat(prefixCls, "-center ").concat(prefixCls, "-left");
43
+ c2dCls = "".concat(prefixCls, "-center ").concat(prefixCls, "-left");
44
+ break;
42
45
 
43
46
  case 'alternate':
44
- return "".concat(prefixCls, "-alternate ").concat(prefixCls, "-").concat(oddIndex ? 'left' : 'right');
47
+ c2dCls = "".concat(prefixCls, "-alternate ").concat(prefixCls, "-").concat(oddIndex ? 'left' : 'right');
48
+ break;
45
49
 
46
50
  default:
47
- return "".concat(prefixCls, "-").concat(mode, " ").concat(mode === 'right' ? "".concat(prefixCls, "-mode-right") : '');
51
+ c2dCls = "".concat(prefixCls, "-").concat(mode, " ").concat(mode === 'right' ? "".concat(prefixCls, "-mode-right") : '');
52
+ break;
48
53
  }
49
54
  }
50
55
 
51
- return '';
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<1 | 2 | 3 | 4 | 6 | 5>;
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<"dateTime" | "date" | "month" | "dateRange" | "year" | "dateTimeRange">;
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<"dateTime" | "date" | "month" | "dateRange" | "year" | "dateTimeRange">;
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<"dateTime" | "date" | "month" | "dateRange" | "year" | "dateTimeRange">;
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, "stopPropagation" | "motion" | "getPopupContainer" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & React.RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
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>;
@@ -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, "stopPropagation" | "motion" | "getPopupContainer" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & import("react").RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
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;
@@ -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
- return "".concat(prefixCls, "-center ").concat(prefixCls, "-left");
23
+ c2dCls = "".concat(prefixCls, "-center ").concat(prefixCls, "-left");
24
+ break;
22
25
 
23
26
  case 'alternate':
24
- return "".concat(prefixCls, "-alternate ").concat(prefixCls, "-").concat(oddIndex ? 'left' : 'right');
27
+ c2dCls = "".concat(prefixCls, "-alternate ").concat(prefixCls, "-").concat(oddIndex ? 'left' : 'right');
28
+ break;
25
29
 
26
30
  default:
27
- return "".concat(prefixCls, "-").concat(mode, " ").concat(mode === 'right' ? "".concat(prefixCls, "-mode-right") : '');
31
+ c2dCls = "".concat(prefixCls, "-").concat(mode, " ").concat(mode === 'right' ? "".concat(prefixCls, "-mode-right") : '');
32
+ break;
28
33
  }
29
34
  }
30
35
 
31
- return '';
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<1 | 2 | 3 | 4 | 6 | 5>;
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.1",
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.1",
21
- "@douyinfe/semi-animation-react": "2.30.0-alpha.1",
22
- "@douyinfe/semi-foundation": "2.30.0-alpha.1",
23
- "@douyinfe/semi-icons": "2.30.0-alpha.1",
24
- "@douyinfe/semi-illustrations": "2.30.0-alpha.1",
25
- "@douyinfe/semi-theme-default": "2.30.0-alpha.1",
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": "8bb24709d0cd0a406d93f3c61e73774a02ea1af3",
72
+ "gitHead": "22568ce0c431646136c6823016342214cac447ca",
73
73
  "devDependencies": {
74
74
  "@babel/plugin-proposal-decorators": "^7.15.8",
75
75
  "@babel/plugin-transform-runtime": "^7.15.8",