@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.
- package/dist/umd/semi-ui.js +14 -10
- package/dist/umd/semi-ui.js.map +1 -1
- package/dist/umd/semi-ui.min.js +1 -1
- package/dist/umd/semi-ui.min.js.map +1 -1
- package/lib/cjs/anchor/index.d.ts +1 -1
- package/lib/cjs/autoComplete/index.d.ts +1 -1
- package/lib/cjs/button/Button.d.ts +1 -1
- package/lib/cjs/button/buttonGroup.d.ts +1 -1
- package/lib/cjs/button/index.d.ts +1 -1
- package/lib/cjs/carousel/CarouselIndicator.d.ts +1 -1
- package/lib/cjs/carousel/index.d.ts +1 -1
- package/lib/cjs/cascader/index.d.ts +1 -1
- package/lib/cjs/cascader/item.d.ts +1 -1
- package/lib/cjs/datePicker/dateInput.d.ts +1 -1
- package/lib/cjs/datePicker/datePicker.d.ts +2 -2
- package/lib/cjs/datePicker/monthsGrid.d.ts +1 -1
- package/lib/cjs/datePicker/yearAndMonth.d.ts +1 -1
- package/lib/cjs/form/baseForm.d.ts +1 -1
- package/lib/cjs/form/field.d.ts +1 -1
- package/lib/cjs/input/index.d.ts +1 -1
- package/lib/cjs/input/inputGroup.d.ts +1 -1
- package/lib/cjs/modal/Modal.js +9 -6
- package/lib/cjs/modal/ModalContent.js +5 -4
- package/lib/cjs/modal/confirm.d.ts +20 -20
- package/lib/cjs/popover/index.d.ts +1 -1
- package/lib/cjs/rating/index.d.ts +1 -1
- package/lib/cjs/rating/item.d.ts +1 -1
- package/lib/cjs/switch/index.d.ts +1 -1
- package/lib/cjs/table/Table.d.ts +2 -2
- package/lib/cjs/table/index.d.ts +1 -1
- package/lib/cjs/tagInput/index.d.ts +1 -1
- package/lib/cjs/timePicker/TimePicker.d.ts +1 -1
- package/lib/cjs/timePicker/index.d.ts +1 -1
- package/lib/cjs/tooltip/index.d.ts +1 -1
- package/lib/cjs/typography/title.d.ts +1 -1
- package/lib/es/anchor/index.d.ts +1 -1
- package/lib/es/autoComplete/index.d.ts +1 -1
- package/lib/es/button/Button.d.ts +1 -1
- package/lib/es/button/buttonGroup.d.ts +1 -1
- package/lib/es/button/index.d.ts +1 -1
- package/lib/es/carousel/CarouselIndicator.d.ts +1 -1
- package/lib/es/carousel/index.d.ts +1 -1
- package/lib/es/cascader/index.d.ts +1 -1
- package/lib/es/cascader/item.d.ts +1 -1
- package/lib/es/datePicker/dateInput.d.ts +1 -1
- package/lib/es/datePicker/datePicker.d.ts +2 -2
- package/lib/es/datePicker/monthsGrid.d.ts +1 -1
- package/lib/es/datePicker/yearAndMonth.d.ts +1 -1
- package/lib/es/form/baseForm.d.ts +1 -1
- package/lib/es/form/field.d.ts +1 -1
- package/lib/es/input/index.d.ts +1 -1
- package/lib/es/input/inputGroup.d.ts +1 -1
- package/lib/es/modal/Modal.js +9 -6
- package/lib/es/modal/ModalContent.js +5 -4
- package/lib/es/modal/confirm.d.ts +20 -20
- package/lib/es/popover/index.d.ts +1 -1
- package/lib/es/rating/index.d.ts +1 -1
- package/lib/es/rating/item.d.ts +1 -1
- package/lib/es/switch/index.d.ts +1 -1
- package/lib/es/table/Table.d.ts +2 -2
- package/lib/es/table/index.d.ts +1 -1
- package/lib/es/tagInput/index.d.ts +1 -1
- package/lib/es/timePicker/TimePicker.d.ts +1 -1
- package/lib/es/timePicker/index.d.ts +1 -1
- package/lib/es/tooltip/index.d.ts +1 -1
- package/lib/es/typography/title.d.ts +1 -1
- package/package.json +8 -8
package/dist/umd/semi-ui.js
CHANGED
|
@@ -57149,20 +57149,21 @@ class ModalContent extends BaseComponent {
|
|
|
57149
57149
|
this.foundation.destroy();
|
|
57150
57150
|
}
|
|
57151
57151
|
render() {
|
|
57152
|
-
|
|
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
|
-
} =
|
|
57160
|
-
rest = ModalContent_rest(
|
|
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
|
-
|
|
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
|
-
} =
|
|
57578
|
-
restProps = Modal_rest(
|
|
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
|
}
|