@douyinfe/semi-ui 2.33.0-beta.0 → 2.33.1

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.
@@ -5,7 +5,7 @@ import React from 'react';
5
5
  * @param {React.MouseEvent<HTMLElement>} e React mouse event object
6
6
  * @param {boolean} noImmediate Skip stopping immediate propagation
7
7
  */
8
- export declare function stopPropagation(e: React.MouseEvent, noImmediate?: boolean): void;
8
+ export declare function stopPropagation(e: React.MouseEvent | React.FocusEvent<HTMLElement>, noImmediate?: boolean): void;
9
9
  /**
10
10
  * use in Table, Form, Navigation
11
11
  *
@@ -32,7 +32,7 @@ declare class Button extends React.PureComponent<ButtonProps> {
32
32
  'aria-label': import("prop-types").Requireable<string>;
33
33
  };
34
34
  static elementType: string;
35
- constructor(props?: {});
35
+ constructor(props?: ButtonProps);
36
36
  render(): JSX.Element;
37
37
  }
38
38
  export default Button;
@@ -126,7 +126,7 @@ declare class Input extends BaseComponent<InputProps, InputState> {
126
126
  onKeyPress: (...args: any[]) => void;
127
127
  onEnterPress: (...args: any[]) => void;
128
128
  validateStatus: string;
129
- noBg: boolean;
129
+ borderless: boolean;
130
130
  };
131
131
  inputRef: React.RefObject<HTMLInputElement>;
132
132
  prefixRef: React.RefObject<React.ReactNode>;
@@ -549,7 +549,7 @@ Input.defaultProps = {
549
549
  onKeyPress: _noop2.default,
550
550
  onEnterPress: _noop2.default,
551
551
  validateStatus: 'default',
552
- noBg: false
552
+ borderless: false
553
553
  };
554
554
 
555
555
  const ForwardInput = /*#__PURE__*/_react.default.forwardRef((props, ref) => /*#__PURE__*/_react.default.createElement(Input, Object.assign({}, props, {
@@ -217,7 +217,7 @@ class TableRow extends _baseComponent.default {
217
217
  if (level != null && columnIndex === firstIndex) {
218
218
  expandableProps.indent = level;
219
219
 
220
- if (!expandableRow) {
220
+ if (!expandableRow && hideExpandedColumn) {
221
221
  expandableProps.indent = level + 1;
222
222
  }
223
223
  }
@@ -188,6 +188,8 @@ export default class Tooltip extends BaseComponent<TooltipProps, TooltipState> {
188
188
  renderIcon: () => any;
189
189
  handlePortalInnerClick: (e: React.MouseEvent) => void;
190
190
  handlePortalMouseDown: (e: React.MouseEvent) => void;
191
+ handlePortalFocus: (e: React.FocusEvent<HTMLElement>) => void;
192
+ handlePortalBlur: (e: React.FocusEvent<HTMLElement>) => void;
191
193
  handlePortalInnerKeyDown: (e: React.KeyboardEvent) => void;
192
194
  renderContentNode: (content: TooltipProps['content']) => React.ReactNode;
193
195
  renderPortal: () => JSX.Element;
@@ -181,6 +181,18 @@ class Tooltip extends _baseComponent.default {
181
181
  }
182
182
  };
183
183
 
184
+ this.handlePortalFocus = e => {
185
+ if (this.props.stopPropagation) {
186
+ (0, _utils.stopPropagation)(e);
187
+ }
188
+ };
189
+
190
+ this.handlePortalBlur = e => {
191
+ if (this.props.stopPropagation) {
192
+ (0, _utils.stopPropagation)(e);
193
+ }
194
+ };
195
+
184
196
  this.handlePortalInnerKeyDown = e => {
185
197
  this.foundation.handleContainerKeydown(e);
186
198
  };
@@ -276,6 +288,8 @@ class Tooltip extends _baseComponent.default {
276
288
  style: portalInnerStyle,
277
289
  ref: this.setContainerEl,
278
290
  onClick: this.handlePortalInnerClick,
291
+ onFocus: this.handlePortalFocus,
292
+ onBlur: this.handlePortalBlur,
279
293
  onMouseDown: this.handlePortalMouseDown,
280
294
  onKeyDown: this.handlePortalInnerKeyDown
281
295
  }, inner));
@@ -64,7 +64,7 @@ const SortableList = (0, _reactSortableHoc.SortableContainer)(_ref => {
64
64
  /*#__PURE__*/
65
65
  // @ts-ignore skip SortableItem type check
66
66
  _react.default.createElement(SortableItem, {
67
- key: item.label,
67
+ key: item.key,
68
68
  index: index,
69
69
  item: item
70
70
  }))) // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -5,7 +5,7 @@ import React from 'react';
5
5
  * @param {React.MouseEvent<HTMLElement>} e React mouse event object
6
6
  * @param {boolean} noImmediate Skip stopping immediate propagation
7
7
  */
8
- export declare function stopPropagation(e: React.MouseEvent, noImmediate?: boolean): void;
8
+ export declare function stopPropagation(e: React.MouseEvent | React.FocusEvent<HTMLElement>, noImmediate?: boolean): void;
9
9
  /**
10
10
  * use in Table, Form, Navigation
11
11
  *
@@ -32,7 +32,7 @@ declare class Button extends React.PureComponent<ButtonProps> {
32
32
  'aria-label': import("prop-types").Requireable<string>;
33
33
  };
34
34
  static elementType: string;
35
- constructor(props?: {});
35
+ constructor(props?: ButtonProps);
36
36
  render(): JSX.Element;
37
37
  }
38
38
  export default Button;
@@ -126,7 +126,7 @@ declare class Input extends BaseComponent<InputProps, InputState> {
126
126
  onKeyPress: (...args: any[]) => void;
127
127
  onEnterPress: (...args: any[]) => void;
128
128
  validateStatus: string;
129
- noBg: boolean;
129
+ borderless: boolean;
130
130
  };
131
131
  inputRef: React.RefObject<HTMLInputElement>;
132
132
  prefixRef: React.RefObject<React.ReactNode>;
@@ -527,7 +527,7 @@ Input.defaultProps = {
527
527
  onKeyPress: _noop,
528
528
  onEnterPress: _noop,
529
529
  validateStatus: 'default',
530
- noBg: false
530
+ borderless: false
531
531
  };
532
532
  const ForwardInput = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React.createElement(Input, Object.assign({}, props, {
533
533
  forwardRef: ref
@@ -192,7 +192,7 @@ export default class TableRow extends BaseComponent {
192
192
  if (level != null && columnIndex === firstIndex) {
193
193
  expandableProps.indent = level;
194
194
 
195
- if (!expandableRow) {
195
+ if (!expandableRow && hideExpandedColumn) {
196
196
  expandableProps.indent = level + 1;
197
197
  }
198
198
  }
@@ -188,6 +188,8 @@ export default class Tooltip extends BaseComponent<TooltipProps, TooltipState> {
188
188
  renderIcon: () => any;
189
189
  handlePortalInnerClick: (e: React.MouseEvent) => void;
190
190
  handlePortalMouseDown: (e: React.MouseEvent) => void;
191
+ handlePortalFocus: (e: React.FocusEvent<HTMLElement>) => void;
192
+ handlePortalBlur: (e: React.FocusEvent<HTMLElement>) => void;
191
193
  handlePortalInnerKeyDown: (e: React.KeyboardEvent) => void;
192
194
  renderContentNode: (content: TooltipProps['content']) => React.ReactNode;
193
195
  renderPortal: () => JSX.Element;
@@ -143,6 +143,18 @@ export default class Tooltip extends BaseComponent {
143
143
  }
144
144
  };
145
145
 
146
+ this.handlePortalFocus = e => {
147
+ if (this.props.stopPropagation) {
148
+ stopPropagation(e);
149
+ }
150
+ };
151
+
152
+ this.handlePortalBlur = e => {
153
+ if (this.props.stopPropagation) {
154
+ stopPropagation(e);
155
+ }
156
+ };
157
+
146
158
  this.handlePortalInnerKeyDown = e => {
147
159
  this.foundation.handleContainerKeydown(e);
148
160
  };
@@ -240,6 +252,8 @@ export default class Tooltip extends BaseComponent {
240
252
  style: portalInnerStyle,
241
253
  ref: this.setContainerEl,
242
254
  onClick: this.handlePortalInnerClick,
255
+ onFocus: this.handlePortalFocus,
256
+ onBlur: this.handlePortalBlur,
243
257
  onMouseDown: this.handlePortalMouseDown,
244
258
  onKeyDown: this.handlePortalInnerKeyDown
245
259
  }, inner));
@@ -34,7 +34,7 @@ const SortableList = SortableContainer(_ref => {
34
34
  /*#__PURE__*/
35
35
  // @ts-ignore skip SortableItem type check
36
36
  React.createElement(SortableItem, {
37
- key: item.label,
37
+ key: item.key,
38
38
  index: index,
39
39
  item: item
40
40
  }))) // eslint-disable-next-line @typescript-eslint/ban-ts-comment
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@douyinfe/semi-ui",
3
- "version": "2.33.0-beta.0",
3
+ "version": "2.33.1",
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.33.0-beta.0",
21
- "@douyinfe/semi-animation-react": "2.33.0-beta.0",
22
- "@douyinfe/semi-foundation": "2.33.0-beta.0",
23
- "@douyinfe/semi-icons": "2.33.0-beta.0",
24
- "@douyinfe/semi-illustrations": "2.33.0-beta.0",
25
- "@douyinfe/semi-theme-default": "2.33.0-beta.0",
20
+ "@douyinfe/semi-animation": "2.33.1",
21
+ "@douyinfe/semi-animation-react": "2.33.1",
22
+ "@douyinfe/semi-foundation": "2.33.1",
23
+ "@douyinfe/semi-icons": "2.33.1",
24
+ "@douyinfe/semi-illustrations": "2.33.1",
25
+ "@douyinfe/semi-theme-default": "2.33.1",
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": "270966db4a563cf7b8670dc7d6b568858c5f9060",
72
+ "gitHead": "1810821764823ef746b7a88aae299d12a31cca5d",
73
73
  "devDependencies": {
74
74
  "@babel/plugin-proposal-decorators": "^7.15.8",
75
75
  "@babel/plugin-transform-runtime": "^7.15.8",