@douyinfe/semi-ui 2.38.2-alpha.2 → 2.38.2-alpha.2-patch-modal

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.
Files changed (47) hide show
  1. package/dist/css/semi.css +45 -2
  2. package/dist/css/semi.min.css +1 -1
  3. package/dist/umd/semi-ui.js +318 -299
  4. package/dist/umd/semi-ui.js.map +1 -1
  5. package/dist/umd/semi-ui.min.js +1 -1
  6. package/dist/umd/semi-ui.min.js.map +1 -1
  7. package/lib/cjs/collapsible/index.d.ts +2 -0
  8. package/lib/cjs/collapsible/index.js +19 -11
  9. package/lib/cjs/datePicker/dateInput.d.ts +1 -1
  10. package/lib/cjs/datePicker/datePicker.d.ts +1 -1
  11. package/lib/cjs/datePicker/monthsGrid.d.ts +1 -1
  12. package/lib/cjs/datePicker/yearAndMonth.d.ts +1 -1
  13. package/lib/cjs/dropdown/dropdownItem.js +11 -1
  14. package/lib/cjs/form/baseForm.d.ts +1 -1
  15. package/lib/cjs/form/field.d.ts +1 -1
  16. package/lib/cjs/modal/Modal.js +9 -6
  17. package/lib/cjs/modal/ModalContent.js +5 -4
  18. package/lib/cjs/modal/confirm.d.ts +16 -16
  19. package/lib/cjs/scrollList/scrollItem.js +1 -1
  20. package/lib/cjs/select/option.js +2 -1
  21. package/lib/cjs/spin/icon.js +14 -51
  22. package/lib/cjs/table/TableCell.js +7 -1
  23. package/lib/cjs/table/interface.d.ts +9 -0
  24. package/lib/cjs/tooltip/index.js +0 -7
  25. package/lib/cjs/treeSelect/index.d.ts +1 -1
  26. package/lib/cjs/treeSelect/index.js +2 -2
  27. package/lib/es/collapsible/index.d.ts +2 -0
  28. package/lib/es/collapsible/index.js +19 -11
  29. package/lib/es/datePicker/dateInput.d.ts +1 -1
  30. package/lib/es/datePicker/datePicker.d.ts +1 -1
  31. package/lib/es/datePicker/monthsGrid.d.ts +1 -1
  32. package/lib/es/datePicker/yearAndMonth.d.ts +1 -1
  33. package/lib/es/dropdown/dropdownItem.js +11 -1
  34. package/lib/es/form/baseForm.d.ts +1 -1
  35. package/lib/es/form/field.d.ts +1 -1
  36. package/lib/es/modal/Modal.js +9 -6
  37. package/lib/es/modal/ModalContent.js +5 -4
  38. package/lib/es/modal/confirm.d.ts +16 -16
  39. package/lib/es/scrollList/scrollItem.js +1 -1
  40. package/lib/es/select/option.js +2 -1
  41. package/lib/es/spin/icon.js +14 -51
  42. package/lib/es/table/TableCell.js +7 -1
  43. package/lib/es/table/interface.d.ts +9 -0
  44. package/lib/es/tooltip/index.js +0 -7
  45. package/lib/es/treeSelect/index.d.ts +1 -1
  46. package/lib/es/treeSelect/index.js +2 -2
  47. package/package.json +8 -8
@@ -19,7 +19,7 @@ export interface MonthsGridProps extends MonthsGridFoundationProps, BaseProps {
19
19
  export 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" | "monthRange" | "dateTimeRange">;
22
+ type: PropTypes.Requireable<"date" | "month" | "dateTime" | "dateRange" | "year" | "monthRange" | "dateTimeRange">;
23
23
  defaultValue: PropTypes.Requireable<any[]>;
24
24
  defaultPickerValue: PropTypes.Requireable<NonNullable<string | number | object>>;
25
25
  multiple: PropTypes.Requireable<boolean>;
@@ -24,7 +24,7 @@ declare class YearAndMonth extends BaseComponent<YearAndMonthProps, YearAndMonth
24
24
  presetPosition: PropTypes.Requireable<"left" | "top" | "right" | "bottom">;
25
25
  renderQuickControls: PropTypes.Requireable<PropTypes.ReactNodeLike>;
26
26
  renderDateInput: PropTypes.Requireable<PropTypes.ReactNodeLike>;
27
- type: PropTypes.Requireable<"dateTime" | "date" | "month" | "dateRange" | "year" | "monthRange" | "dateTimeRange">;
27
+ type: PropTypes.Requireable<"date" | "month" | "dateTime" | "dateRange" | "year" | "monthRange" | "dateTimeRange">;
28
28
  startYear: PropTypes.Requireable<number>;
29
29
  endYear: PropTypes.Requireable<number>;
30
30
  };
@@ -37,7 +37,17 @@ class DropdownItem extends BaseComponent {
37
37
  const events = {};
38
38
  if (!disabled) {
39
39
  ['onClick', 'onMouseEnter', 'onMouseLeave', 'onContextMenu'].forEach(eventName => {
40
- events[eventName] = this.props[eventName];
40
+ const isInAnotherDropdown = this.context.level !== 1;
41
+ if (isInAnotherDropdown && eventName === "onClick") {
42
+ events["onMouseDown"] = e => {
43
+ var _a, _b;
44
+ if (e.button === 0) {
45
+ (_b = (_a = this.props)[eventName]) === null || _b === void 0 ? void 0 : _b.call(_a, e);
46
+ }
47
+ };
48
+ } else {
49
+ events[eventName] = this.props[eventName];
50
+ }
41
51
  });
42
52
  }
43
53
  let tick = null;
@@ -138,7 +138,7 @@ declare class Form<Values extends Record<string, any> = any> extends BaseCompone
138
138
  preventScroll?: boolean;
139
139
  showRestTagsPopover?: boolean;
140
140
  restTagsPopoverProps?: import("../popover").PopoverProps;
141
- } & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "motion" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay" | "getPopupContainer"> & React.RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
141
+ } & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "motion" | "getPopupContainer" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & React.RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
142
142
  static Checkbox: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox").CheckboxProps & import("./interface").RCIncludeType>;
143
143
  static CheckboxGroup: React.ComponentType<import("utility-types").Subtract<import("../checkbox").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & React.RefAttributes<any>>;
144
144
  static Radio: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../radio").RadioProps & import("./interface").RCIncludeType>;
@@ -86,7 +86,7 @@ declare const FormSelect: import("react").ComponentType<import("utility-types").
86
86
  preventScroll?: boolean;
87
87
  showRestTagsPopover?: boolean;
88
88
  restTagsPopoverProps?: import("../popover").PopoverProps;
89
- } & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "motion" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay" | "getPopupContainer"> & import("react").RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
89
+ } & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "motion" | "getPopupContainer" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & import("react").RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
90
90
  declare const FormCheckboxGroup: import("react").ComponentType<import("utility-types").Subtract<import("../checkbox/checkboxGroup").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & import("react").RefAttributes<any>>;
91
91
  declare const FormCheckbox: import("react").ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox/checkbox").CheckboxProps & import("./interface").RCIncludeType>;
92
92
  declare const FormRadioGroup: import("react").ComponentType<import("utility-types").Subtract<import("../radio/radioGroup").RadioGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & import("react").RefAttributes<any>>;
@@ -83,7 +83,8 @@ class Modal extends BaseComponent {
83
83
  // return <ModalContent {...restProps} footer={renderFooter} onClose={this.handleCancel}/>;
84
84
  // };
85
85
  this.renderDialog = () => {
86
- let _a = this.props,
86
+ var _a;
87
+ let _b = this.props,
87
88
  {
88
89
  footer,
89
90
  className,
@@ -94,15 +95,15 @@ class Modal extends BaseComponent {
94
95
  zIndex,
95
96
  getPopupContainer,
96
97
  visible
97
- } = _a,
98
- restProps = __rest(_a, ["footer", "className", "motion", "maskStyle", "keepDOM", "style", "zIndex", "getPopupContainer", "visible"]);
98
+ } = _b,
99
+ restProps = __rest(_b, ["footer", "className", "motion", "maskStyle", "keepDOM", "style", "zIndex", "getPopupContainer", "visible"]);
99
100
  let style = styleFromProps;
100
101
  const maskStyle = maskStyleFromProps;
101
102
  const renderFooter = 'footer' in this.props ? footer : this.renderFooter();
102
103
  let wrapperStyle = {
103
104
  zIndex
104
105
  };
105
- if (getPopupContainer) {
106
+ if (getPopupContainer && getPopupContainer() !== ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) === null || _a === void 0 ? void 0 : _a.body)) {
106
107
  wrapperStyle = {
107
108
  zIndex,
108
109
  position: 'static'
@@ -173,20 +174,22 @@ class Modal extends BaseComponent {
173
174
  return Object.assign(Object.assign({}, super.adapter), {
174
175
  getProps: () => this.props,
175
176
  disabledBodyScroll: () => {
177
+ var _a;
176
178
  const {
177
179
  getPopupContainer
178
180
  } = this.props;
179
181
  this.bodyOverflow = document.body.style.overflow || '';
180
- if (!getPopupContainer && this.bodyOverflow !== 'hidden') {
182
+ if ((!getPopupContainer || getPopupContainer() === ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) === null || _a === void 0 ? void 0 : _a.body)) && this.bodyOverflow !== 'hidden') {
181
183
  document.body.style.overflow = 'hidden';
182
184
  document.body.style.width = `calc(${this.originBodyWidth || '100%'} - ${this.scrollBarWidth}px)`;
183
185
  }
184
186
  },
185
187
  enabledBodyScroll: () => {
188
+ var _a;
186
189
  const {
187
190
  getPopupContainer
188
191
  } = this.props;
189
- if (!getPopupContainer && this.bodyOverflow !== 'hidden') {
192
+ if ((!getPopupContainer || getPopupContainer() === ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) === null || _a === void 0 ? void 0 : _a.body)) && this.bodyOverflow !== null && this.bodyOverflow !== 'hidden') {
190
193
  document.body.style.overflow = this.bodyOverflow;
191
194
  document.body.style.width = this.originBodyWidth;
192
195
  }
@@ -278,20 +278,21 @@ export default class ModalContent extends BaseComponent {
278
278
  this.foundation.destroy();
279
279
  }
280
280
  render() {
281
- const _a = this.props,
281
+ var _a;
282
+ const _b = this.props,
282
283
  {
283
284
  maskClosable,
284
285
  className,
285
286
  getPopupContainer,
286
287
  maskFixed,
287
288
  getContainerContext
288
- } = _a,
289
- rest = __rest(_a, ["maskClosable", "className", "getPopupContainer", "maskFixed", "getContainerContext"]);
289
+ } = _b,
290
+ rest = __rest(_b, ["maskClosable", "className", "getPopupContainer", "maskFixed", "getContainerContext"]);
290
291
  const {
291
292
  direction
292
293
  } = this.context;
293
294
  const classList = cls(className, {
294
- [`${cssClasses.DIALOG}-popup`]: getPopupContainer && !maskFixed,
295
+ [`${cssClasses.DIALOG}-popup`]: getPopupContainer && getPopupContainer() !== ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) === null || _a === void 0 ? void 0 : _a.body) && !maskFixed,
295
296
  [`${cssClasses.DIALOG}-fixed`]: maskFixed,
296
297
  [`${cssClasses.DIALOG}-rtl`]: direction === 'rtl'
297
298
  });
@@ -146,24 +146,24 @@ export declare function withError(props: ModalReactProps): {
146
146
  style?: React.CSSProperties;
147
147
  className?: string;
148
148
  motion?: boolean;
149
- width?: string | number;
150
- height?: string | number;
149
+ getPopupContainer?: () => HTMLElement;
151
150
  footer?: React.ReactNode;
152
151
  header?: React.ReactNode;
152
+ direction?: any;
153
+ width?: string | number;
154
+ height?: string | number;
153
155
  mask?: boolean;
154
156
  visible?: boolean;
155
157
  content?: React.ReactNode;
156
158
  icon: string | number | boolean | React.ReactFragment | JSX.Element;
157
- onCancel?: (e: React.MouseEvent<Element, MouseEvent>) => void | Promise<any>;
158
- direction?: any;
159
159
  zIndex?: number;
160
160
  closeOnEsc?: boolean;
161
161
  preventScroll?: boolean;
162
- getPopupContainer?: () => HTMLElement;
163
162
  afterClose?: () => void;
164
163
  keepDOM?: boolean;
165
164
  cancelText?: string;
166
165
  okText?: string;
166
+ onCancel?: (e: React.MouseEvent<Element, MouseEvent>) => void | Promise<any>;
167
167
  closeIcon?: React.ReactNode;
168
168
  bodyStyle?: React.CSSProperties;
169
169
  closable?: boolean;
@@ -211,22 +211,12 @@ export declare function withError(props: ModalReactProps): {
211
211
  hidden?: boolean;
212
212
  color?: string;
213
213
  content?: string;
214
- onChange?: React.FormEventHandler<HTMLButtonElement>;
215
- defaultChecked?: boolean;
216
214
  defaultValue?: string | number | readonly string[];
217
- suppressContentEditableWarning?: boolean;
218
- suppressHydrationWarning?: boolean;
219
215
  accessKey?: string;
220
- autoFocus?: boolean;
221
- formAction?: string;
222
- formEncType?: string;
223
- formMethod?: string;
224
- formNoValidate?: boolean;
225
- formTarget?: string;
226
216
  dir?: string;
227
217
  draggable?: boolean | "false" | "true";
228
218
  lang?: string;
229
- translate?: "no" | "yes";
219
+ translate?: "yes" | "no";
230
220
  prefix?: string;
231
221
  role?: React.AriaRole;
232
222
  contentEditable?: "inherit" | (boolean | "false" | "true");
@@ -242,6 +232,10 @@ export declare function withError(props: ModalReactProps): {
242
232
  'aria-haspopup'?: boolean | "dialog" | "menu" | "listbox" | "grid" | "false" | "true" | "tree";
243
233
  'aria-controls'?: string;
244
234
  'aria-describedby'?: string;
235
+ defaultChecked?: boolean;
236
+ suppressContentEditableWarning?: boolean;
237
+ suppressHydrationWarning?: boolean;
238
+ autoFocus?: boolean;
245
239
  contextMenu?: string;
246
240
  placeholder?: string;
247
241
  spellCheck?: boolean | "false" | "true";
@@ -327,6 +321,7 @@ export declare function withError(props: ModalReactProps): {
327
321
  onCompositionUpdateCapture?: React.CompositionEventHandler<HTMLButtonElement>;
328
322
  onFocusCapture?: React.FocusEventHandler<HTMLButtonElement>;
329
323
  onBlurCapture?: React.FocusEventHandler<HTMLButtonElement>;
324
+ onChange?: React.FormEventHandler<HTMLButtonElement>;
330
325
  onChangeCapture?: React.FormEventHandler<HTMLButtonElement>;
331
326
  onBeforeInput?: React.FormEventHandler<HTMLButtonElement>;
332
327
  onBeforeInputCapture?: React.FormEventHandler<HTMLButtonElement>;
@@ -463,6 +458,11 @@ export declare function withError(props: ModalReactProps): {
463
458
  onAnimationIterationCapture?: React.AnimationEventHandler<HTMLButtonElement>;
464
459
  onTransitionEnd?: React.TransitionEventHandler<HTMLButtonElement>;
465
460
  onTransitionEndCapture?: React.TransitionEventHandler<HTMLButtonElement>;
461
+ formAction?: string;
462
+ formEncType?: string;
463
+ formMethod?: string;
464
+ formNoValidate?: boolean;
465
+ formTarget?: string;
466
466
  };
467
467
  };
468
468
  export declare function withConfirm(props: ModalReactProps): {
@@ -243,8 +243,8 @@ export default class ScrollItem extends BaseComponent {
243
243
  key: prefixKey + index
244
244
  }, events, {
245
245
  className: cls,
246
+ // eslint-disable-next-line jsx-a11y/role-has-required-aria-props
246
247
  role: "option",
247
- "aria-selected": selected,
248
248
  "aria-disabled": item.disabled
249
249
  }), text)
250
250
  );
@@ -102,7 +102,8 @@ class Option extends PureComponent {
102
102
  value,
103
103
  label,
104
104
  children
105
- }, rest), e)
105
+ }, rest), e),
106
+ className
106
107
  }, rest));
107
108
  }
108
109
  const config = {
@@ -8,64 +8,27 @@ var __rest = this && this.__rest || function (s, e) {
8
8
  };
9
9
  /* eslint-disable no-unused-vars */
10
10
  import React from 'react';
11
- import isNullOrUndefined from '@douyinfe/semi-foundation/lib/es/utils/isNullOrUndefined';
12
- let _id = -1;
13
11
  function Icon() {
14
12
  let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
15
13
  const {
16
- id: propsId,
14
+ id,
17
15
  className
18
16
  } = props,
19
17
  rest = __rest(props, ["id", "className"]);
20
- let _propsId = propsId;
21
- if (isNullOrUndefined(_propsId)) {
22
- _id++;
23
- _propsId = _id;
24
- }
25
- const id = `linearGradient-${_propsId}`;
26
18
  return /*#__PURE__*/React.createElement("svg", Object.assign({}, rest, {
27
19
  className: className,
28
- width: "48",
29
- height: "48",
30
- viewBox: "0 0 36 36",
31
- version: "1.1",
32
- xmlns: "http://www.w3.org/2000/svg",
33
- "aria-hidden": true,
34
- "data-icon": "spin"
35
- }), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
36
- x1: "0%",
37
- y1: "100%",
38
- x2: "100%",
39
- y2: "100%",
40
- id: id
41
- }, /*#__PURE__*/React.createElement("stop", {
42
- stopColor: "currentColor",
43
- stopOpacity: "0",
44
- offset: "0%"
45
- }), /*#__PURE__*/React.createElement("stop", {
46
- stopColor: "currentColor",
47
- stopOpacity: "0.50",
48
- offset: "39.9430698%"
49
- }), /*#__PURE__*/React.createElement("stop", {
50
- stopColor: "currentColor",
51
- offset: "100%"
52
- }))), /*#__PURE__*/React.createElement("g", {
53
- stroke: "none",
54
- strokeWidth: "1",
55
- fill: "none",
56
- fillRule: "evenodd"
57
- }, /*#__PURE__*/React.createElement("rect", {
58
- fillOpacity: "0.01",
59
- fill: "none",
60
- x: "0",
61
- y: "0",
62
- width: "36",
63
- height: "36"
64
- }), /*#__PURE__*/React.createElement("path", {
65
- d: "M34,18 C34,9.163444 26.836556,2 18,2 C11.6597233,2 6.18078805,5.68784135 3.59122325,11.0354951",
66
- stroke: `url(#${id})`,
67
- strokeWidth: "4",
68
- strokeLinecap: "round"
69
- })));
20
+ width: "100%",
21
+ height: "100%",
22
+ viewBox: "0 0 100 100"
23
+ }), /*#__PURE__*/React.createElement("circle", {
24
+ cx: "50",
25
+ cy: "50",
26
+ r: "35",
27
+ stroke: "currentColor",
28
+ strokeWidth: "11",
29
+ strokeLinecap: "round",
30
+ strokeMiterlimit: "10",
31
+ fill: "none"
32
+ }));
70
33
  }
71
34
  export default Icon;
@@ -1,5 +1,5 @@
1
- import _merge from "lodash/merge";
2
1
  import _isEqual from "lodash/isEqual";
2
+ import _merge from "lodash/merge";
3
3
  import _omit from "lodash/omit";
4
4
  import _set from "lodash/set";
5
5
  import _noop from "lodash/noop";
@@ -72,6 +72,12 @@ export default class TableCell extends BaseComponent {
72
72
  expandIcon
73
73
  } = props;
74
74
  const cellInSelectionColumn = isSelectionColumn(column);
75
+ const {
76
+ shouldCellUpdate
77
+ } = column;
78
+ if (typeof shouldCellUpdate === 'function') {
79
+ return shouldCellUpdate(nextProps, props);
80
+ }
75
81
  // The expand button may be in a separate column or in the first data column
76
82
  const columnHasExpandIcon = isExpandedColumn(column) || expandIcon;
77
83
  if ((cellInSelectionColumn || columnHasExpandIcon) && !_isEqual(nextProps, this.props)) {
@@ -8,6 +8,7 @@ import { ArrayElement } from '../_base/base';
8
8
  import { strings } from '@douyinfe/semi-foundation/lib/es/table/constants';
9
9
  import { BaseRowKeyType, BaseSortOrder, BaseGroupBy, BaseGroupByFn, BaseFixed, BaseAlign, BaseChangeInfoSorter, BaseSorter, BaseFilter, BaseChangeInfoFilter, BaseIncludeGroupRecord, BaseEllipsis } from '@douyinfe/semi-foundation/lib/es/table/foundation';
10
10
  import { ScrollDirection, CSSDirection } from 'react-window';
11
+ import { TableCellProps } from './TableCell';
11
12
  export interface TableProps<RecordType extends Record<string, any> = any> extends BaseProps {
12
13
  bordered?: boolean;
13
14
  children?: ReactNode;
@@ -90,6 +91,10 @@ export interface ColumnProps<RecordType extends Record<string, any> = any> {
90
91
  onFilterDropdownVisibleChange?: OnFilterDropdownVisibleChange;
91
92
  onHeaderCell?: OnHeaderCell<RecordType>;
92
93
  ellipsis?: BaseEllipsis;
94
+ /**
95
+ * self control whether to update cell for performance reasons
96
+ */
97
+ shouldCellUpdate?: (props: TableCellProps, prevProps: TableCellProps) => boolean;
93
98
  }
94
99
  export type Align = BaseAlign;
95
100
  export type SortOrder = BaseSortOrder;
@@ -211,6 +216,10 @@ export interface RowSelectionProps<RecordType> {
211
216
  onChange?: RowSelectionOnChange<RecordType>;
212
217
  onSelect?: RowSelectionOnSelect<RecordType>;
213
218
  onSelectAll?: RowSelectionOnSelectAll<RecordType>;
219
+ /**
220
+ * self control whether to update cell for performance reasons
221
+ */
222
+ shouldCellUpdate?: (props: TableCellProps, prevProps: TableCellProps) => boolean;
214
223
  }
215
224
  export type GetCheckboxProps<RecordType> = (record: RecordType) => CheckboxProps;
216
225
  export type RowSelectionOnChange<RecordType> = (selectedRowKeys?: (string | number)[], selectedRows?: RecordType[]) => void;
@@ -527,13 +527,6 @@ export default class Tooltip extends BaseComponent {
527
527
  this.setState({
528
528
  id: getUuidShort()
529
529
  });
530
- },
531
- getTriggerDOM: () => {
532
- if (this.triggerEl.current) {
533
- return ReactDOM.findDOMNode(this.triggerEl.current);
534
- } else {
535
- return null;
536
- }
537
530
  }
538
531
  });
539
532
  }
@@ -228,7 +228,7 @@ declare class TreeSelect extends BaseComponent<TreeSelectProps, TreeSelectState>
228
228
  renderArrow: () => JSX.Element;
229
229
  renderClearBtn: () => JSX.Element;
230
230
  renderSelection: () => JSX.Element;
231
- renderTagItem: (key: string, idx: number) => string | number | boolean | React.ReactFragment | JSX.Element;
231
+ renderTagItem: (key: string, idx: number) => any;
232
232
  renderTagInput: () => JSX.Element;
233
233
  renderInput: () => JSX.Element;
234
234
  renderEmpty: () => JSX.Element;
@@ -192,7 +192,7 @@ class TreeSelect extends BaseComponent {
192
192
  } = item && treeNodeLabelProp in item ? renderSelectedItem(item, {
193
193
  index,
194
194
  onClose
195
- }) : null;
195
+ }) : {};
196
196
  if (_isNull(content) || _isUndefined(content)) {
197
197
  return;
198
198
  }
@@ -490,7 +490,7 @@ class TreeSelect extends BaseComponent {
490
490
  } = item && treeNodeLabelProp in item ? renderSelectedItem(item, {
491
491
  index: idx,
492
492
  onClose
493
- }) : null;
493
+ }) : {};
494
494
  if (isRenderInTag) {
495
495
  return /*#__PURE__*/React.createElement(Tag, Object.assign({}, tagProps), content);
496
496
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@douyinfe/semi-ui",
3
- "version": "2.38.2-alpha.2",
3
+ "version": "2.38.2-alpha.2-patch-modal",
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.38.2-alpha.2",
21
- "@douyinfe/semi-animation-react": "2.38.2-alpha.2",
22
- "@douyinfe/semi-foundation": "2.38.2-alpha.2",
23
- "@douyinfe/semi-icons": "2.38.2-alpha.2",
24
- "@douyinfe/semi-illustrations": "2.38.2-alpha.2",
25
- "@douyinfe/semi-theme-default": "2.38.2-alpha.2",
20
+ "@douyinfe/semi-animation": "2.38.2-alpha.2-patch-modal",
21
+ "@douyinfe/semi-animation-react": "2.38.2-alpha.2-patch-modal",
22
+ "@douyinfe/semi-foundation": "2.38.2-alpha.2-patch-modal",
23
+ "@douyinfe/semi-icons": "2.38.2-alpha.2-patch-modal",
24
+ "@douyinfe/semi-illustrations": "2.38.2-alpha.2-patch-modal",
25
+ "@douyinfe/semi-theme-default": "2.38.2-alpha.2-patch-modal",
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": "8fb732d3d44b16a0bda607843c72b625bd7929af",
72
+ "gitHead": "0b01c3ee2c2e054522e1022f24f64fcc1b6ce6ac",
73
73
  "devDependencies": {
74
74
  "@babel/plugin-proposal-decorators": "^7.15.8",
75
75
  "@babel/plugin-transform-runtime": "^7.15.8",