@douyinfe/semi-ui 2.38.3-alpha.2-patch-3006 → 2.38.3-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 (67) hide show
  1. package/dist/umd/semi-ui.js +14 -10
  2. package/dist/umd/semi-ui.js.map +1 -1
  3. package/dist/umd/semi-ui.min.js +1 -1
  4. package/dist/umd/semi-ui.min.js.map +1 -1
  5. package/lib/cjs/anchor/index.d.ts +1 -1
  6. package/lib/cjs/autoComplete/index.d.ts +1 -1
  7. package/lib/cjs/button/Button.d.ts +1 -1
  8. package/lib/cjs/button/buttonGroup.d.ts +1 -1
  9. package/lib/cjs/button/index.d.ts +1 -1
  10. package/lib/cjs/carousel/CarouselIndicator.d.ts +1 -1
  11. package/lib/cjs/carousel/index.d.ts +1 -1
  12. package/lib/cjs/cascader/index.d.ts +1 -1
  13. package/lib/cjs/cascader/item.d.ts +1 -1
  14. package/lib/cjs/datePicker/dateInput.d.ts +1 -1
  15. package/lib/cjs/datePicker/datePicker.d.ts +2 -2
  16. package/lib/cjs/datePicker/monthsGrid.d.ts +1 -1
  17. package/lib/cjs/datePicker/yearAndMonth.d.ts +1 -1
  18. package/lib/cjs/form/baseForm.d.ts +1 -1
  19. package/lib/cjs/form/field.d.ts +1 -1
  20. package/lib/cjs/input/index.d.ts +1 -1
  21. package/lib/cjs/input/inputGroup.d.ts +1 -1
  22. package/lib/cjs/modal/Modal.js +9 -6
  23. package/lib/cjs/modal/ModalContent.js +5 -4
  24. package/lib/cjs/modal/confirm.d.ts +20 -20
  25. package/lib/cjs/popover/index.d.ts +1 -1
  26. package/lib/cjs/rating/index.d.ts +1 -1
  27. package/lib/cjs/rating/item.d.ts +1 -1
  28. package/lib/cjs/switch/index.d.ts +1 -1
  29. package/lib/cjs/table/Table.d.ts +2 -2
  30. package/lib/cjs/table/index.d.ts +1 -1
  31. package/lib/cjs/tagInput/index.d.ts +1 -1
  32. package/lib/cjs/timePicker/TimePicker.d.ts +1 -1
  33. package/lib/cjs/timePicker/index.d.ts +1 -1
  34. package/lib/cjs/tooltip/index.d.ts +1 -1
  35. package/lib/cjs/typography/title.d.ts +1 -1
  36. package/lib/es/anchor/index.d.ts +1 -1
  37. package/lib/es/autoComplete/index.d.ts +1 -1
  38. package/lib/es/button/Button.d.ts +1 -1
  39. package/lib/es/button/buttonGroup.d.ts +1 -1
  40. package/lib/es/button/index.d.ts +1 -1
  41. package/lib/es/carousel/CarouselIndicator.d.ts +1 -1
  42. package/lib/es/carousel/index.d.ts +1 -1
  43. package/lib/es/cascader/index.d.ts +1 -1
  44. package/lib/es/cascader/item.d.ts +1 -1
  45. package/lib/es/datePicker/dateInput.d.ts +1 -1
  46. package/lib/es/datePicker/datePicker.d.ts +2 -2
  47. package/lib/es/datePicker/monthsGrid.d.ts +1 -1
  48. package/lib/es/datePicker/yearAndMonth.d.ts +1 -1
  49. package/lib/es/form/baseForm.d.ts +1 -1
  50. package/lib/es/form/field.d.ts +1 -1
  51. package/lib/es/input/index.d.ts +1 -1
  52. package/lib/es/input/inputGroup.d.ts +1 -1
  53. package/lib/es/modal/Modal.js +9 -6
  54. package/lib/es/modal/ModalContent.js +5 -4
  55. package/lib/es/modal/confirm.d.ts +20 -20
  56. package/lib/es/popover/index.d.ts +1 -1
  57. package/lib/es/rating/index.d.ts +1 -1
  58. package/lib/es/rating/item.d.ts +1 -1
  59. package/lib/es/switch/index.d.ts +1 -1
  60. package/lib/es/table/Table.d.ts +2 -2
  61. package/lib/es/table/index.d.ts +1 -1
  62. package/lib/es/tagInput/index.d.ts +1 -1
  63. package/lib/es/timePicker/TimePicker.d.ts +1 -1
  64. package/lib/es/timePicker/index.d.ts +1 -1
  65. package/lib/es/tooltip/index.d.ts +1 -1
  66. package/lib/es/typography/title.d.ts +1 -1
  67. package/package.json +8 -8
@@ -57149,20 +57149,21 @@ class ModalContent extends BaseComponent {
57149
57149
  this.foundation.destroy();
57150
57150
  }
57151
57151
  render() {
57152
- const _a = this.props,
57152
+ var _a;
57153
+ const _b = this.props,
57153
57154
  {
57154
57155
  maskClosable,
57155
57156
  className,
57156
57157
  getPopupContainer,
57157
57158
  maskFixed,
57158
57159
  getContainerContext
57159
- } = _a,
57160
- rest = ModalContent_rest(_a, ["maskClosable", "className", "getPopupContainer", "maskFixed", "getContainerContext"]);
57160
+ } = _b,
57161
+ rest = ModalContent_rest(_b, ["maskClosable", "className", "getPopupContainer", "maskFixed", "getContainerContext"]);
57161
57162
  const {
57162
57163
  direction
57163
57164
  } = this.context;
57164
57165
  const classList = classnames_default()(className, {
57165
- [`${modal_constants_cssClasses.DIALOG}-popup`]: getPopupContainer && !maskFixed,
57166
+ [`${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,
57166
57167
  [`${modal_constants_cssClasses.DIALOG}-fixed`]: maskFixed,
57167
57168
  [`${modal_constants_cssClasses.DIALOG}-rtl`]: direction === 'rtl'
57168
57169
  });
@@ -57563,7 +57564,8 @@ class Modal extends BaseComponent {
57563
57564
  // return <ModalContent {...restProps} footer={renderFooter} onClose={this.handleCancel}/>;
57564
57565
  // };
57565
57566
  this.renderDialog = () => {
57566
- let _a = this.props,
57567
+ var _a;
57568
+ let _b = this.props,
57567
57569
  {
57568
57570
  footer,
57569
57571
  className,
@@ -57574,15 +57576,15 @@ class Modal extends BaseComponent {
57574
57576
  zIndex,
57575
57577
  getPopupContainer,
57576
57578
  visible
57577
- } = _a,
57578
- restProps = Modal_rest(_a, ["footer", "className", "motion", "maskStyle", "keepDOM", "style", "zIndex", "getPopupContainer", "visible"]);
57579
+ } = _b,
57580
+ restProps = Modal_rest(_b, ["footer", "className", "motion", "maskStyle", "keepDOM", "style", "zIndex", "getPopupContainer", "visible"]);
57579
57581
  let style = styleFromProps;
57580
57582
  const maskStyle = maskStyleFromProps;
57581
57583
  const renderFooter = 'footer' in this.props ? footer : this.renderFooter();
57582
57584
  let wrapperStyle = {
57583
57585
  zIndex
57584
57586
  };
57585
- if (getPopupContainer) {
57587
+ if (getPopupContainer && getPopupContainer() !== ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) === null || _a === void 0 ? void 0 : _a.body)) {
57586
57588
  wrapperStyle = {
57587
57589
  zIndex,
57588
57590
  position: 'static'
@@ -57653,20 +57655,22 @@ class Modal extends BaseComponent {
57653
57655
  return Object.assign(Object.assign({}, super.adapter), {
57654
57656
  getProps: () => this.props,
57655
57657
  disabledBodyScroll: () => {
57658
+ var _a;
57656
57659
  const {
57657
57660
  getPopupContainer
57658
57661
  } = this.props;
57659
57662
  this.bodyOverflow = document.body.style.overflow || '';
57660
- if (!getPopupContainer && this.bodyOverflow !== 'hidden') {
57663
+ if ((!getPopupContainer || getPopupContainer() === ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) === null || _a === void 0 ? void 0 : _a.body)) && this.bodyOverflow !== 'hidden') {
57661
57664
  document.body.style.overflow = 'hidden';
57662
57665
  document.body.style.width = `calc(${this.originBodyWidth || '100%'} - ${this.scrollBarWidth}px)`;
57663
57666
  }
57664
57667
  },
57665
57668
  enabledBodyScroll: () => {
57669
+ var _a;
57666
57670
  const {
57667
57671
  getPopupContainer
57668
57672
  } = this.props;
57669
- if (!getPopupContainer && this.bodyOverflow !== 'hidden') {
57673
+ 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') {
57670
57674
  document.body.style.overflow = this.bodyOverflow;
57671
57675
  document.body.style.width = this.originBodyWidth;
57672
57676
  }