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

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.
@@ -57141,20 +57141,21 @@ class ModalContent extends BaseComponent {
57141
57141
  this.foundation.destroy();
57142
57142
  }
57143
57143
  render() {
57144
- const _a = this.props,
57144
+ var _a;
57145
+ const _b = this.props,
57145
57146
  {
57146
57147
  maskClosable,
57147
57148
  className,
57148
57149
  getPopupContainer,
57149
57150
  maskFixed,
57150
57151
  getContainerContext
57151
- } = _a,
57152
- rest = ModalContent_rest(_a, ["maskClosable", "className", "getPopupContainer", "maskFixed", "getContainerContext"]);
57152
+ } = _b,
57153
+ rest = ModalContent_rest(_b, ["maskClosable", "className", "getPopupContainer", "maskFixed", "getContainerContext"]);
57153
57154
  const {
57154
57155
  direction
57155
57156
  } = this.context;
57156
57157
  const classList = classnames_default()(className, {
57157
- [`${modal_constants_cssClasses.DIALOG}-popup`]: getPopupContainer && !maskFixed,
57158
+ [`${modal_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,
57158
57159
  [`${modal_constants_cssClasses.DIALOG}-fixed`]: maskFixed,
57159
57160
  [`${modal_constants_cssClasses.DIALOG}-rtl`]: direction === 'rtl'
57160
57161
  });
@@ -57555,7 +57556,8 @@ class Modal extends BaseComponent {
57555
57556
  // return <ModalContent {...restProps} footer={renderFooter} onClose={this.handleCancel}/>;
57556
57557
  // };
57557
57558
  this.renderDialog = () => {
57558
- let _a = this.props,
57559
+ var _a;
57560
+ let _b = this.props,
57559
57561
  {
57560
57562
  footer,
57561
57563
  className,
@@ -57566,15 +57568,15 @@ class Modal extends BaseComponent {
57566
57568
  zIndex,
57567
57569
  getPopupContainer,
57568
57570
  visible
57569
- } = _a,
57570
- restProps = Modal_rest(_a, ["footer", "className", "motion", "maskStyle", "keepDOM", "style", "zIndex", "getPopupContainer", "visible"]);
57571
+ } = _b,
57572
+ restProps = Modal_rest(_b, ["footer", "className", "motion", "maskStyle", "keepDOM", "style", "zIndex", "getPopupContainer", "visible"]);
57571
57573
  let style = styleFromProps;
57572
57574
  const maskStyle = maskStyleFromProps;
57573
57575
  const renderFooter = 'footer' in this.props ? footer : this.renderFooter();
57574
57576
  let wrapperStyle = {
57575
57577
  zIndex
57576
57578
  };
57577
- if (getPopupContainer) {
57579
+ if (getPopupContainer && getPopupContainer() !== ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) === null || _a === void 0 ? void 0 : _a.body)) {
57578
57580
  wrapperStyle = {
57579
57581
  zIndex,
57580
57582
  position: 'static'
@@ -57645,20 +57647,22 @@ class Modal extends BaseComponent {
57645
57647
  return Object.assign(Object.assign({}, super.adapter), {
57646
57648
  getProps: () => this.props,
57647
57649
  disabledBodyScroll: () => {
57650
+ var _a;
57648
57651
  const {
57649
57652
  getPopupContainer
57650
57653
  } = this.props;
57651
57654
  this.bodyOverflow = document.body.style.overflow || '';
57652
- if (!getPopupContainer && this.bodyOverflow !== 'hidden') {
57655
+ if ((!getPopupContainer || getPopupContainer() === ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) === null || _a === void 0 ? void 0 : _a.body)) && this.bodyOverflow !== 'hidden') {
57653
57656
  document.body.style.overflow = 'hidden';
57654
57657
  document.body.style.width = `calc(${this.originBodyWidth || '100%'} - ${this.scrollBarWidth}px)`;
57655
57658
  }
57656
57659
  },
57657
57660
  enabledBodyScroll: () => {
57661
+ var _a;
57658
57662
  const {
57659
57663
  getPopupContainer
57660
57664
  } = this.props;
57661
- if (!getPopupContainer && this.bodyOverflow !== 'hidden') {
57665
+ 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') {
57662
57666
  document.body.style.overflow = this.bodyOverflow;
57663
57667
  document.body.style.width = this.originBodyWidth;
57664
57668
  }