antd-mobile 5.16.0 → 5.16.1

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.
@@ -8987,7 +8987,7 @@ const defaultPopupBaseProps = {
8987
8987
  destroyOnClose: false,
8988
8988
  disableBodyScroll: true,
8989
8989
  forceRender: false,
8990
- getContainer: null,
8990
+ getContainer: () => document.body,
8991
8991
  mask: true,
8992
8992
  showCloseButton: false,
8993
8993
  stopPropagation: ["click"],
@@ -11635,7 +11635,9 @@ var index$f = attachPropertiesToComponent(Cascader, {
11635
11635
  optionSkeleton
11636
11636
  });
11637
11637
  var centerPopup = /* @__PURE__ */ (() => ".adm-center-popup {\n --background-color: var(--adm-center-popup-background-color, var(--adm-color-background));\n --border-radius: var(--adm-center-popup-border-radius, 8px);\n --max-width: var(--adm-center-popup-max-width, 75vw);\n --min-width: var(--adm-center-popup-min-width, 280px);\n --z-index: var(--adm-center-popup-z-index, 1000);\n position: fixed;\n z-index: var(--z-index);\n}\n.adm-center-popup .adm-center-popup-mask {\n z-index: 0;\n}\n.adm-center-popup-wrap {\n position: fixed;\n z-index: 1;\n top: 50%;\n left: 50%;\n width: auto;\n min-width: var(--min-width);\n max-width: var(--max-width);\n transform: translate(-50%, -50%);\n}\n.adm-center-popup-body {\n background-color: var(--background-color);\n border-radius: var(--border-radius);\n}\n.adm-center-popup-close {\n position: absolute;\n z-index: 100;\n right: 8px;\n top: 8px;\n cursor: pointer;\n padding: 4px;\n font-size: 18px;\n color: var(--adm-color-weak);\n}\n")();
11638
- const defaultProps$O = defaultPopupBaseProps;
11638
+ const defaultProps$O = Object.assign(Object.assign({}, defaultPopupBaseProps), {
11639
+ getContainer: null
11640
+ });
11639
11641
  const CenterPopup = (p2) => {
11640
11642
  const props = mergeProps(defaultProps$O, p2);
11641
11643
  const unmountedRef = ahooks.useUnmountedRef();
@@ -12571,7 +12573,8 @@ const Image$1 = stagedComponents.staged((p2) => {
12571
12573
  const defaultProps$I = {
12572
12574
  actions: [],
12573
12575
  closeOnAction: false,
12574
- closeOnMaskClick: false
12576
+ closeOnMaskClick: false,
12577
+ getContainer: null
12575
12578
  };
12576
12579
  const Dialog = (p2) => {
12577
12580
  const props = mergeProps(defaultProps$I, p2);
@@ -15912,7 +15915,8 @@ const ModalActionButton = (props) => {
15912
15915
  const defaultProps$r = {
15913
15916
  actions: [],
15914
15917
  closeOnAction: false,
15915
- closeOnMaskClick: false
15918
+ closeOnMaskClick: false,
15919
+ getContainer: null
15916
15920
  };
15917
15921
  const Modal = (p2) => {
15918
15922
  const props = mergeProps(defaultProps$r, p2);
@@ -8977,7 +8977,7 @@ const defaultPopupBaseProps = {
8977
8977
  destroyOnClose: false,
8978
8978
  disableBodyScroll: true,
8979
8979
  forceRender: false,
8980
- getContainer: null,
8980
+ getContainer: () => document.body,
8981
8981
  mask: true,
8982
8982
  showCloseButton: false,
8983
8983
  stopPropagation: ["click"],
@@ -11625,7 +11625,9 @@ var index$f = attachPropertiesToComponent(Cascader, {
11625
11625
  optionSkeleton
11626
11626
  });
11627
11627
  var centerPopup = /* @__PURE__ */ (() => ".adm-center-popup {\n --background-color: var(--adm-center-popup-background-color, var(--adm-color-background));\n --border-radius: var(--adm-center-popup-border-radius, 8px);\n --max-width: var(--adm-center-popup-max-width, 75vw);\n --min-width: var(--adm-center-popup-min-width, 280px);\n --z-index: var(--adm-center-popup-z-index, 1000);\n position: fixed;\n z-index: var(--z-index);\n}\n.adm-center-popup .adm-center-popup-mask {\n z-index: 0;\n}\n.adm-center-popup-wrap {\n position: fixed;\n z-index: 1;\n top: 50%;\n left: 50%;\n width: auto;\n min-width: var(--min-width);\n max-width: var(--max-width);\n transform: translate(-50%, -50%);\n}\n.adm-center-popup-body {\n background-color: var(--background-color);\n border-radius: var(--border-radius);\n}\n.adm-center-popup-close {\n position: absolute;\n z-index: 100;\n right: 8px;\n top: 8px;\n cursor: pointer;\n padding: 4px;\n font-size: 18px;\n color: var(--adm-color-weak);\n}\n")();
11628
- const defaultProps$O = defaultPopupBaseProps;
11628
+ const defaultProps$O = Object.assign(Object.assign({}, defaultPopupBaseProps), {
11629
+ getContainer: null
11630
+ });
11629
11631
  const CenterPopup = (p2) => {
11630
11632
  const props = mergeProps(defaultProps$O, p2);
11631
11633
  const unmountedRef = useUnmountedRef();
@@ -12561,7 +12563,8 @@ const Image$1 = staged((p2) => {
12561
12563
  const defaultProps$I = {
12562
12564
  actions: [],
12563
12565
  closeOnAction: false,
12564
- closeOnMaskClick: false
12566
+ closeOnMaskClick: false,
12567
+ getContainer: null
12565
12568
  };
12566
12569
  const Dialog = (p2) => {
12567
12570
  const props = mergeProps(defaultProps$I, p2);
@@ -15902,7 +15905,8 @@ const ModalActionButton = (props) => {
15902
15905
  const defaultProps$r = {
15903
15906
  actions: [],
15904
15907
  closeOnAction: false,
15905
- closeOnMaskClick: false
15908
+ closeOnMaskClick: false,
15909
+ getContainer: null
15906
15910
  };
15907
15911
  const Modal = (p2) => {
15908
15912
  const props = mergeProps(defaultProps$r, p2);
@@ -39,7 +39,9 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
39
39
 
40
40
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
41
41
 
42
- const defaultProps = _popupBaseProps.defaultPopupBaseProps;
42
+ const defaultProps = Object.assign(Object.assign({}, _popupBaseProps.defaultPopupBaseProps), {
43
+ getContainer: null
44
+ });
43
45
 
44
46
  const CenterPopup = p => {
45
47
  const props = (0, _withDefaultProps.mergeProps)(defaultProps, p);
@@ -26,7 +26,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
26
26
  const defaultProps = {
27
27
  actions: [],
28
28
  closeOnAction: false,
29
- closeOnMaskClick: false
29
+ closeOnMaskClick: false,
30
+ getContainer: null
30
31
  };
31
32
 
32
33
  const Dialog = p => {
@@ -28,7 +28,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
28
28
  const defaultProps = {
29
29
  actions: [],
30
30
  closeOnAction: false,
31
- closeOnMaskClick: false
31
+ closeOnMaskClick: false,
32
+ getContainer: null
32
33
  };
33
34
 
34
35
  const Modal = p => {
@@ -27,7 +27,7 @@ export declare const defaultPopupBaseProps: {
27
27
  destroyOnClose: boolean;
28
28
  disableBodyScroll: boolean;
29
29
  forceRender: boolean;
30
- getContainer: null;
30
+ getContainer: () => HTMLElement;
31
31
  mask: boolean;
32
32
  showCloseButton: boolean;
33
33
  stopPropagation: string[];
@@ -9,7 +9,7 @@ const defaultPopupBaseProps = {
9
9
  destroyOnClose: false,
10
10
  disableBodyScroll: true,
11
11
  forceRender: false,
12
- getContainer: null,
12
+ getContainer: () => document.body,
13
13
  mask: true,
14
14
  showCloseButton: false,
15
15
  stopPropagation: ['click'],
@@ -12,7 +12,9 @@ import { ShouldRender } from '../../utils/should-render';
12
12
  import { useLockScroll } from '../../utils/use-lock-scroll';
13
13
  import { CloseOutline } from 'antd-mobile-icons';
14
14
  import { defaultPopupBaseProps } from '../popup/popup-base-props';
15
- const defaultProps = defaultPopupBaseProps;
15
+ const defaultProps = Object.assign(Object.assign({}, defaultPopupBaseProps), {
16
+ getContainer: null
17
+ });
16
18
  export const CenterPopup = p => {
17
19
  const props = mergeProps(defaultProps, p);
18
20
  const unmountedRef = useUnmountedRef();
@@ -9,7 +9,8 @@ import CenterPopup from '../center-popup';
9
9
  const defaultProps = {
10
10
  actions: [],
11
11
  closeOnAction: false,
12
- closeOnMaskClick: false
12
+ closeOnMaskClick: false,
13
+ getContainer: null
13
14
  };
14
15
  export const Dialog = p => {
15
16
  const props = mergeProps(defaultProps, p);
@@ -10,7 +10,8 @@ import CenterPopup from '../center-popup';
10
10
  const defaultProps = {
11
11
  actions: [],
12
12
  closeOnAction: false,
13
- closeOnMaskClick: false
13
+ closeOnMaskClick: false,
14
+ getContainer: null
14
15
  };
15
16
  export const Modal = p => {
16
17
  const props = mergeProps(defaultProps, p);
@@ -27,7 +27,7 @@ export declare const defaultPopupBaseProps: {
27
27
  destroyOnClose: boolean;
28
28
  disableBodyScroll: boolean;
29
29
  forceRender: boolean;
30
- getContainer: null;
30
+ getContainer: () => HTMLElement;
31
31
  mask: boolean;
32
32
  showCloseButton: boolean;
33
33
  stopPropagation: string[];
@@ -3,7 +3,7 @@ export const defaultPopupBaseProps = {
3
3
  destroyOnClose: false,
4
4
  disableBodyScroll: true,
5
5
  forceRender: false,
6
- getContainer: null,
6
+ getContainer: () => document.body,
7
7
  mask: true,
8
8
  showCloseButton: false,
9
9
  stopPropagation: ['click'],
package/2x/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antd-mobile",
3
- "version": "5.16.0",
3
+ "version": "5.16.1",
4
4
  "dependencies": {
5
5
  "@floating-ui/dom": "^0.5.2",
6
6
  "@react-spring/web": "^9.4.5",