@douyinfe/semi-ui 2.38.3-alpha.2-patch-2395 → 2.38.3-alpha.2-patch-3006

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.
@@ -21,6 +21,7 @@ interface CollapsibleState extends CollapsibleFoundationState {
21
21
  domHeight: number;
22
22
  visible: boolean;
23
23
  isTransitioning: boolean;
24
+ cacheIsOpen: boolean;
24
25
  }
25
26
  declare class Collapsible extends BaseComponent<CollapsibleProps, CollapsibleState> {
26
27
  static defaultProps: {
@@ -36,6 +37,7 @@ declare class Collapsible extends BaseComponent<CollapsibleProps, CollapsibleSta
36
37
  private resizeObserver;
37
38
  constructor(props: CollapsibleProps);
38
39
  get adapter(): CollapsibleAdapter<CollapsibleProps, CollapsibleState>;
40
+ static getDerivedStateFromProps(props: CollapsibleProps, prevState: CollapsibleState): Partial<CollapsibleState>;
39
41
  static getEntryInfo: (entry: ResizeObserverEntry) => {
40
42
  isShown: boolean;
41
43
  height: number;
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
+ var _pick2 = _interopRequireDefault(require("lodash/pick"));
7
8
  var _isEqual2 = _interopRequireDefault(require("lodash/isEqual"));
8
9
  var _react = _interopRequireDefault(require("react"));
9
10
  var _foundation = _interopRequireDefault(require("@douyinfe/semi-foundation/lib/cjs/collapsible/foundation"));
@@ -36,7 +37,8 @@ class Collapsible extends _baseComponent.default {
36
37
  domInRenderTree: false,
37
38
  domHeight: 0,
38
39
  visible: this.props.isOpen,
39
- isTransitioning: false
40
+ isTransitioning: false,
41
+ cacheIsOpen: this.props.isOpen
40
42
  };
41
43
  this.foundation = new _foundation.default(this.adapter);
42
44
  }
@@ -72,6 +74,20 @@ class Collapsible extends _baseComponent.default {
72
74
  }
73
75
  });
74
76
  }
77
+ static getDerivedStateFromProps(props, prevState) {
78
+ const newState = {};
79
+ const isOpenChanged = props.isOpen !== prevState.cacheIsOpen;
80
+ if (isOpenChanged) {
81
+ if (props.isOpen || !props.motion) {
82
+ newState.visible = props.isOpen;
83
+ }
84
+ }
85
+ if (props.motion && isOpenChanged) {
86
+ newState.isTransitioning = true;
87
+ }
88
+ newState.cacheIsOpen = props.isOpen;
89
+ return newState;
90
+ }
75
91
  componentDidMount() {
76
92
  super.componentDidMount();
77
93
  this.resizeObserver = new ResizeObserver(this.handleResize);
@@ -83,22 +99,14 @@ class Collapsible extends _baseComponent.default {
83
99
  }
84
100
  }
85
101
  componentDidUpdate(prevProps, prevState, snapshot) {
86
- const changedPropKeys = Object.keys(this.props).filter(key => !(0, _isEqual2.default)(this.props[key], prevProps[key]));
87
- const changedStateKeys = Object.keys(this.state).filter(key => !(0, _isEqual2.default)(this.state[key], prevState[key]));
102
+ const changedPropKeys = Object.keys((0, _pick2.default)(this.props, ['reCalcKey'])).filter(key => !(0, _isEqual2.default)(this.props[key], prevProps[key]));
103
+ const changedStateKeys = Object.keys((0, _pick2.default)(this.state, ['domInRenderTree'])).filter(key => !(0, _isEqual2.default)(this.state[key], prevState[key]));
88
104
  if (changedPropKeys.includes("reCalcKey")) {
89
105
  this.foundation.updateDOMHeight(this.domRef.current.scrollHeight);
90
106
  }
91
107
  if (changedStateKeys.includes("domInRenderTree") && this.state.domInRenderTree) {
92
108
  this.foundation.updateDOMHeight(this.domRef.current.scrollHeight);
93
109
  }
94
- if (changedPropKeys.includes("isOpen")) {
95
- if (this.props.isOpen || !this.props.motion) {
96
- this.foundation.updateVisible(this.props.isOpen);
97
- }
98
- }
99
- if (this.props.motion && prevProps.isOpen !== this.props.isOpen) {
100
- this.foundation.updateIsTransitioning(true);
101
- }
102
110
  }
103
111
  componentWillUnmount() {
104
112
  super.componentWillUnmount();
@@ -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" | "getPopupContainer" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & React.RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
141
+ } & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "getPopupContainer" | "motion" | "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" | "getPopupContainer" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & import("react").RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
89
+ } & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "getPopupContainer" | "motion" | "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>>;
@@ -94,8 +94,7 @@ class Modal extends _baseComponent.default {
94
94
  // return <ModalContent {...restProps} footer={renderFooter} onClose={this.handleCancel}/>;
95
95
  // };
96
96
  this.renderDialog = () => {
97
- var _a;
98
- let _b = this.props,
97
+ let _a = this.props,
99
98
  {
100
99
  footer,
101
100
  className,
@@ -106,15 +105,15 @@ class Modal extends _baseComponent.default {
106
105
  zIndex,
107
106
  getPopupContainer,
108
107
  visible
109
- } = _b,
110
- restProps = __rest(_b, ["footer", "className", "motion", "maskStyle", "keepDOM", "style", "zIndex", "getPopupContainer", "visible"]);
108
+ } = _a,
109
+ restProps = __rest(_a, ["footer", "className", "motion", "maskStyle", "keepDOM", "style", "zIndex", "getPopupContainer", "visible"]);
111
110
  let style = styleFromProps;
112
111
  const maskStyle = maskStyleFromProps;
113
112
  const renderFooter = 'footer' in this.props ? footer : this.renderFooter();
114
113
  let wrapperStyle = {
115
114
  zIndex
116
115
  };
117
- if (getPopupContainer && getPopupContainer() !== ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) === null || _a === void 0 ? void 0 : _a.body)) {
116
+ if (getPopupContainer) {
118
117
  wrapperStyle = {
119
118
  zIndex,
120
119
  position: 'static'
@@ -185,22 +184,20 @@ class Modal extends _baseComponent.default {
185
184
  return Object.assign(Object.assign({}, super.adapter), {
186
185
  getProps: () => this.props,
187
186
  disabledBodyScroll: () => {
188
- var _a;
189
187
  const {
190
188
  getPopupContainer
191
189
  } = this.props;
192
190
  this.bodyOverflow = document.body.style.overflow || '';
193
- if ((!getPopupContainer || getPopupContainer() === ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) === null || _a === void 0 ? void 0 : _a.body)) && this.bodyOverflow !== 'hidden') {
191
+ if (!getPopupContainer && this.bodyOverflow !== 'hidden') {
194
192
  document.body.style.overflow = 'hidden';
195
193
  document.body.style.width = `calc(${this.originBodyWidth || '100%'} - ${this.scrollBarWidth}px)`;
196
194
  }
197
195
  },
198
196
  enabledBodyScroll: () => {
199
- var _a;
200
197
  const {
201
198
  getPopupContainer
202
199
  } = this.props;
203
- 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') {
200
+ if (!getPopupContainer && this.bodyOverflow !== 'hidden') {
204
201
  document.body.style.overflow = this.bodyOverflow;
205
202
  document.body.style.width = this.originBodyWidth;
206
203
  }
@@ -287,21 +287,20 @@ class ModalContent extends _baseComponent.default {
287
287
  this.foundation.destroy();
288
288
  }
289
289
  render() {
290
- var _a;
291
- const _b = this.props,
290
+ const _a = this.props,
292
291
  {
293
292
  maskClosable,
294
293
  className,
295
294
  getPopupContainer,
296
295
  maskFixed,
297
296
  getContainerContext
298
- } = _b,
299
- rest = __rest(_b, ["maskClosable", "className", "getPopupContainer", "maskFixed", "getContainerContext"]);
297
+ } = _a,
298
+ rest = __rest(_a, ["maskClosable", "className", "getPopupContainer", "maskFixed", "getContainerContext"]);
300
299
  const {
301
300
  direction
302
301
  } = this.context;
303
302
  const classList = (0, _classnames.default)(className, {
304
- [`${_constants.cssClasses.DIALOG}-popup`]: getPopupContainer && getPopupContainer() !== ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) === null || _a === void 0 ? void 0 : _a.body) && !maskFixed,
303
+ [`${_constants.cssClasses.DIALOG}-popup`]: getPopupContainer && !maskFixed,
305
304
  [`${_constants.cssClasses.DIALOG}-fixed`]: maskFixed,
306
305
  [`${_constants.cssClasses.DIALOG}-rtl`]: direction === 'rtl'
307
306
  });
@@ -145,11 +145,11 @@ export declare function withError(props: ModalReactProps): {
145
145
  size?: import("@douyinfe/semi-foundation/lib/cjs/modal/modalFoundation").Size;
146
146
  style?: React.CSSProperties;
147
147
  className?: string;
148
- motion?: boolean;
149
148
  getPopupContainer?: () => HTMLElement;
150
149
  footer?: React.ReactNode;
151
150
  header?: React.ReactNode;
152
151
  direction?: any;
152
+ motion?: boolean;
153
153
  width?: string | number;
154
154
  height?: string | number;
155
155
  mask?: boolean;
@@ -204,10 +204,10 @@ export declare function withError(props: ModalReactProps): {
204
204
  title?: string;
205
205
  name?: string;
206
206
  value?: string | number | readonly string[];
207
- onAnimationStart?: React.AnimationEventHandler<HTMLButtonElement>;
208
- onAnimationEnd?: React.AnimationEventHandler<HTMLButtonElement>;
209
207
  form?: string;
210
208
  slot?: string;
209
+ onAnimationStart?: React.AnimationEventHandler<HTMLButtonElement>;
210
+ onAnimationEnd?: React.AnimationEventHandler<HTMLButtonElement>;
211
211
  hidden?: boolean;
212
212
  color?: string;
213
213
  content?: string;
@@ -21,6 +21,7 @@ interface CollapsibleState extends CollapsibleFoundationState {
21
21
  domHeight: number;
22
22
  visible: boolean;
23
23
  isTransitioning: boolean;
24
+ cacheIsOpen: boolean;
24
25
  }
25
26
  declare class Collapsible extends BaseComponent<CollapsibleProps, CollapsibleState> {
26
27
  static defaultProps: {
@@ -36,6 +37,7 @@ declare class Collapsible extends BaseComponent<CollapsibleProps, CollapsibleSta
36
37
  private resizeObserver;
37
38
  constructor(props: CollapsibleProps);
38
39
  get adapter(): CollapsibleAdapter<CollapsibleProps, CollapsibleState>;
40
+ static getDerivedStateFromProps(props: CollapsibleProps, prevState: CollapsibleState): Partial<CollapsibleState>;
39
41
  static getEntryInfo: (entry: ResizeObserverEntry) => {
40
42
  isShown: boolean;
41
43
  height: number;
@@ -1,3 +1,4 @@
1
+ import _pick from "lodash/pick";
1
2
  import _isEqual from "lodash/isEqual";
2
3
  import React from 'react';
3
4
  import CollapsibleFoundation from '@douyinfe/semi-foundation/lib/es/collapsible/foundation';
@@ -29,7 +30,8 @@ class Collapsible extends BaseComponent {
29
30
  domInRenderTree: false,
30
31
  domHeight: 0,
31
32
  visible: this.props.isOpen,
32
- isTransitioning: false
33
+ isTransitioning: false,
34
+ cacheIsOpen: this.props.isOpen
33
35
  };
34
36
  this.foundation = new CollapsibleFoundation(this.adapter);
35
37
  }
@@ -65,6 +67,20 @@ class Collapsible extends BaseComponent {
65
67
  }
66
68
  });
67
69
  }
70
+ static getDerivedStateFromProps(props, prevState) {
71
+ const newState = {};
72
+ const isOpenChanged = props.isOpen !== prevState.cacheIsOpen;
73
+ if (isOpenChanged) {
74
+ if (props.isOpen || !props.motion) {
75
+ newState.visible = props.isOpen;
76
+ }
77
+ }
78
+ if (props.motion && isOpenChanged) {
79
+ newState.isTransitioning = true;
80
+ }
81
+ newState.cacheIsOpen = props.isOpen;
82
+ return newState;
83
+ }
68
84
  componentDidMount() {
69
85
  super.componentDidMount();
70
86
  this.resizeObserver = new ResizeObserver(this.handleResize);
@@ -76,22 +92,14 @@ class Collapsible extends BaseComponent {
76
92
  }
77
93
  }
78
94
  componentDidUpdate(prevProps, prevState, snapshot) {
79
- const changedPropKeys = Object.keys(this.props).filter(key => !_isEqual(this.props[key], prevProps[key]));
80
- const changedStateKeys = Object.keys(this.state).filter(key => !_isEqual(this.state[key], prevState[key]));
95
+ const changedPropKeys = Object.keys(_pick(this.props, ['reCalcKey'])).filter(key => !_isEqual(this.props[key], prevProps[key]));
96
+ const changedStateKeys = Object.keys(_pick(this.state, ['domInRenderTree'])).filter(key => !_isEqual(this.state[key], prevState[key]));
81
97
  if (changedPropKeys.includes("reCalcKey")) {
82
98
  this.foundation.updateDOMHeight(this.domRef.current.scrollHeight);
83
99
  }
84
100
  if (changedStateKeys.includes("domInRenderTree") && this.state.domInRenderTree) {
85
101
  this.foundation.updateDOMHeight(this.domRef.current.scrollHeight);
86
102
  }
87
- if (changedPropKeys.includes("isOpen")) {
88
- if (this.props.isOpen || !this.props.motion) {
89
- this.foundation.updateVisible(this.props.isOpen);
90
- }
91
- }
92
- if (this.props.motion && prevProps.isOpen !== this.props.isOpen) {
93
- this.foundation.updateIsTransitioning(true);
94
- }
95
103
  }
96
104
  componentWillUnmount() {
97
105
  super.componentWillUnmount();
@@ -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" | "getPopupContainer" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & React.RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
141
+ } & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "getPopupContainer" | "motion" | "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" | "getPopupContainer" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & import("react").RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
89
+ } & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "getPopupContainer" | "motion" | "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,8 +83,7 @@ class Modal extends BaseComponent {
83
83
  // return <ModalContent {...restProps} footer={renderFooter} onClose={this.handleCancel}/>;
84
84
  // };
85
85
  this.renderDialog = () => {
86
- var _a;
87
- let _b = this.props,
86
+ let _a = this.props,
88
87
  {
89
88
  footer,
90
89
  className,
@@ -95,15 +94,15 @@ class Modal extends BaseComponent {
95
94
  zIndex,
96
95
  getPopupContainer,
97
96
  visible
98
- } = _b,
99
- restProps = __rest(_b, ["footer", "className", "motion", "maskStyle", "keepDOM", "style", "zIndex", "getPopupContainer", "visible"]);
97
+ } = _a,
98
+ restProps = __rest(_a, ["footer", "className", "motion", "maskStyle", "keepDOM", "style", "zIndex", "getPopupContainer", "visible"]);
100
99
  let style = styleFromProps;
101
100
  const maskStyle = maskStyleFromProps;
102
101
  const renderFooter = 'footer' in this.props ? footer : this.renderFooter();
103
102
  let wrapperStyle = {
104
103
  zIndex
105
104
  };
106
- if (getPopupContainer && getPopupContainer() !== ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) === null || _a === void 0 ? void 0 : _a.body)) {
105
+ if (getPopupContainer) {
107
106
  wrapperStyle = {
108
107
  zIndex,
109
108
  position: 'static'
@@ -174,22 +173,20 @@ class Modal extends BaseComponent {
174
173
  return Object.assign(Object.assign({}, super.adapter), {
175
174
  getProps: () => this.props,
176
175
  disabledBodyScroll: () => {
177
- var _a;
178
176
  const {
179
177
  getPopupContainer
180
178
  } = this.props;
181
179
  this.bodyOverflow = document.body.style.overflow || '';
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') {
180
+ if (!getPopupContainer && this.bodyOverflow !== 'hidden') {
183
181
  document.body.style.overflow = 'hidden';
184
182
  document.body.style.width = `calc(${this.originBodyWidth || '100%'} - ${this.scrollBarWidth}px)`;
185
183
  }
186
184
  },
187
185
  enabledBodyScroll: () => {
188
- var _a;
189
186
  const {
190
187
  getPopupContainer
191
188
  } = this.props;
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') {
189
+ if (!getPopupContainer && this.bodyOverflow !== 'hidden') {
193
190
  document.body.style.overflow = this.bodyOverflow;
194
191
  document.body.style.width = this.originBodyWidth;
195
192
  }
@@ -278,21 +278,20 @@ export default class ModalContent extends BaseComponent {
278
278
  this.foundation.destroy();
279
279
  }
280
280
  render() {
281
- var _a;
282
- const _b = this.props,
281
+ const _a = this.props,
283
282
  {
284
283
  maskClosable,
285
284
  className,
286
285
  getPopupContainer,
287
286
  maskFixed,
288
287
  getContainerContext
289
- } = _b,
290
- rest = __rest(_b, ["maskClosable", "className", "getPopupContainer", "maskFixed", "getContainerContext"]);
288
+ } = _a,
289
+ rest = __rest(_a, ["maskClosable", "className", "getPopupContainer", "maskFixed", "getContainerContext"]);
291
290
  const {
292
291
  direction
293
292
  } = this.context;
294
293
  const classList = cls(className, {
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,
294
+ [`${cssClasses.DIALOG}-popup`]: getPopupContainer && !maskFixed,
296
295
  [`${cssClasses.DIALOG}-fixed`]: maskFixed,
297
296
  [`${cssClasses.DIALOG}-rtl`]: direction === 'rtl'
298
297
  });
@@ -145,11 +145,11 @@ export declare function withError(props: ModalReactProps): {
145
145
  size?: import("@douyinfe/semi-foundation/lib/es/modal/modalFoundation").Size;
146
146
  style?: React.CSSProperties;
147
147
  className?: string;
148
- motion?: boolean;
149
148
  getPopupContainer?: () => HTMLElement;
150
149
  footer?: React.ReactNode;
151
150
  header?: React.ReactNode;
152
151
  direction?: any;
152
+ motion?: boolean;
153
153
  width?: string | number;
154
154
  height?: string | number;
155
155
  mask?: boolean;
@@ -204,10 +204,10 @@ export declare function withError(props: ModalReactProps): {
204
204
  title?: string;
205
205
  name?: string;
206
206
  value?: string | number | readonly string[];
207
- onAnimationStart?: React.AnimationEventHandler<HTMLButtonElement>;
208
- onAnimationEnd?: React.AnimationEventHandler<HTMLButtonElement>;
209
207
  form?: string;
210
208
  slot?: string;
209
+ onAnimationStart?: React.AnimationEventHandler<HTMLButtonElement>;
210
+ onAnimationEnd?: React.AnimationEventHandler<HTMLButtonElement>;
211
211
  hidden?: boolean;
212
212
  color?: string;
213
213
  content?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@douyinfe/semi-ui",
3
- "version": "2.38.3-alpha.2-patch-2395",
3
+ "version": "2.38.3-alpha.2-patch-3006",
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.3-alpha.2-patch-2395",
21
- "@douyinfe/semi-animation-react": "2.38.3-alpha.2-patch-2395",
22
- "@douyinfe/semi-foundation": "2.38.3-alpha.2-patch-2395",
23
- "@douyinfe/semi-icons": "2.38.3-alpha.2-patch-2395",
24
- "@douyinfe/semi-illustrations": "2.38.3-alpha.2-patch-2395",
25
- "@douyinfe/semi-theme-default": "2.38.3-alpha.2-patch-2395",
20
+ "@douyinfe/semi-animation": "2.38.3-alpha.2-patch-3006",
21
+ "@douyinfe/semi-animation-react": "2.38.3-alpha.2-patch-3006",
22
+ "@douyinfe/semi-foundation": "2.38.3-alpha.2-patch-3006",
23
+ "@douyinfe/semi-icons": "2.38.3-alpha.2-patch-3006",
24
+ "@douyinfe/semi-illustrations": "2.38.3-alpha.2-patch-3006",
25
+ "@douyinfe/semi-theme-default": "2.38.3-alpha.2-patch-3006",
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": "0f229469b42b6f684a9c618153993896a438e303",
72
+ "gitHead": "3e02e0b8a1c3e479662e4c0e96fdcbd1b88b7c84",
73
73
  "devDependencies": {
74
74
  "@babel/plugin-proposal-decorators": "^7.15.8",
75
75
  "@babel/plugin-transform-runtime": "^7.15.8",