xph-crud 0.3.9 → 0.4.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.
- package/dist/index.js +2347 -2041
- package/dist/index.umd.cjs +10 -10
- package/dist/style.css +1 -1
- package/dist/types/common/src/components/dialog/hooks/dialogScrollEvents.d.ts +2 -0
- package/dist/types/common/src/components/dialog/hooks/useDialogLayer.d.ts +10 -0
- package/dist/types/common/src/components/dialog/hooks/useDialogProps.d.ts +1 -19
- package/dist/types/common/src/components/dialog/hooks/useDialogScrollLock.d.ts +6 -0
- package/dist/types/common/src/components/dialog/hooks/useOnContainerSizeChange.d.ts +1 -0
- package/dist/types/common/src/components/dialog/hooks/useOnPropsSizeChange.d.ts +4 -4
- package/dist/types/common/src/components/dialog/hooks/usePopperContainerSize.d.ts +4 -3
- package/dist/types/common/src/components/dialog/types/dialog.d.ts +2 -2
- package/package.json +1 -1
|
@@ -6,6 +6,7 @@ declare const useOnContainerSizeChange: ({ container, dialogProps, baseDialogPro
|
|
|
6
6
|
baseDialogProps: IDialogProps;
|
|
7
7
|
}) => {
|
|
8
8
|
containerSizeTarget: import('react').MutableRefObject<import('./usePopperContainerSize').IContainerSizeTarget>;
|
|
9
|
+
containerMeasurable: boolean;
|
|
9
10
|
parentInitRecord: number;
|
|
10
11
|
initLeft: import('react').MutableRefObject<number>;
|
|
11
12
|
initTop: import('react').MutableRefObject<number>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
|
|
3
|
+
declare const useOnPropsSizeChange: ({ curPropsWidth, curPropsHeight, setParentInitRecord, }: {
|
|
4
4
|
curPropsWidth: number | string;
|
|
5
5
|
curPropsHeight: number | string;
|
|
6
|
-
setParentInitRecord:
|
|
6
|
+
setParentInitRecord: Dispatch<SetStateAction<number>>;
|
|
7
7
|
}) => void;
|
|
8
8
|
export default useOnPropsSizeChange;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
/**
|
|
2
|
+
/** 带遮罩窗口以覆盖层的可视区域为定位和最大化范围。 */
|
|
3
3
|
export interface IContainerSizeTarget {
|
|
4
4
|
clientWidth: number;
|
|
5
5
|
clientHeight: number;
|
|
6
6
|
scrollWidth: number;
|
|
7
7
|
scrollHeight: number;
|
|
8
8
|
}
|
|
9
|
-
declare const usePopperContainerSize: ({ container }: {
|
|
9
|
+
declare const usePopperContainerSize: ({ container, mask, }: {
|
|
10
10
|
container: HTMLElement;
|
|
11
|
+
mask?: boolean | undefined;
|
|
11
12
|
}) => {
|
|
12
13
|
containerSizeTarget: import('react').MutableRefObject<IContainerSizeTarget>;
|
|
13
|
-
setContainerSizeTarget: () =>
|
|
14
|
+
setContainerSizeTarget: () => boolean;
|
|
14
15
|
};
|
|
15
16
|
export default usePopperContainerSize;
|
|
@@ -12,7 +12,7 @@ export interface IDialogProps {
|
|
|
12
12
|
*/
|
|
13
13
|
height?: number;
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* 是否显示遮罩;覆盖挂载容器的可视区域,显示期间锁定容器滚动,关闭后恢复
|
|
16
16
|
* @defaultValue `false`
|
|
17
17
|
*/
|
|
18
18
|
mask?: boolean;
|
|
@@ -74,7 +74,7 @@ export interface IDialogProps {
|
|
|
74
74
|
*/
|
|
75
75
|
onClose?: () => void;
|
|
76
76
|
/**
|
|
77
|
-
*
|
|
77
|
+
* 挂载弹窗的容器;开启 mask 时遮罩也限制在该容器内
|
|
78
78
|
* @defaultValue `() => document.body`
|
|
79
79
|
*/
|
|
80
80
|
getPopperContainer?: () => HTMLElement | null;
|