@elliemae/ds-dialog 2.4.0-rc.2 → 2.4.1-rc.10
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/cjs/DSDialog.js +9 -142
- package/cjs/DSDialogCTX.js +21 -0
- package/cjs/config/useDialog.js +97 -0
- package/cjs/defaultProps.js +3 -1
- package/cjs/parts/DSDialogPortal.js +32 -0
- package/cjs/parts/dialogContent/DSDialogContent.js +87 -0
- package/cjs/parts/dialogContent/useDialogContent.js +46 -0
- package/cjs/styles.js +39 -34
- package/esm/DSDialog.js +10 -140
- package/esm/DSDialogCTX.js +17 -0
- package/esm/config/useDialog.js +89 -0
- package/esm/defaultProps.js +3 -1
- package/esm/parts/DSDialogPortal.js +23 -0
- package/esm/parts/dialogContent/DSDialogContent.js +77 -0
- package/esm/parts/dialogContent/useDialogContent.js +42 -0
- package/esm/styles.js +39 -34
- package/package.json +25 -5
- package/types/DSDialog.d.ts +1 -1
- package/types/DSDialogCTX.d.ts +3 -0
- package/types/config/useDialog.d.ts +3 -0
- package/types/parts/DSDialogPortal.d.ts +2 -0
- package/types/parts/dialogContent/DSDialogContent.d.ts +2 -0
- package/types/parts/dialogContent/useDialogContent.d.ts +5 -0
- package/types/propTypes.d.ts +9 -2
- package/types/sharedTypes.d.ts +10 -1
- package/types/styles.d.ts +1 -1
- package/types/utils.d.ts +3 -3
package/types/propTypes.d.ts
CHANGED
|
@@ -10,11 +10,18 @@ export declare namespace DSDialogT {
|
|
|
10
10
|
zIndex: number;
|
|
11
11
|
onClickOutside: () => void;
|
|
12
12
|
onClose: () => void;
|
|
13
|
+
portalRef: null;
|
|
14
|
+
children: React.ReactNode[] | [];
|
|
13
15
|
}
|
|
14
16
|
interface PropsRequired {
|
|
15
|
-
children: React.ReactNode;
|
|
17
|
+
children: React.ReactNode[] | [];
|
|
16
18
|
}
|
|
17
|
-
interface
|
|
19
|
+
interface PropsOptional {
|
|
20
|
+
portalRef: React.MutableRefObject<HTMLElement | null> | null;
|
|
21
|
+
}
|
|
22
|
+
interface InternalProps extends Omit<DefaultProps, 'portalRef'>, PropsRequired, PropsOptional {
|
|
23
|
+
}
|
|
24
|
+
interface Props extends Omit<DefaultProps, 'portalRef'>, PropsRequired, PropsOptional, Omit<GlobalAttributesT<HTMLDivElement>, 'size' | 'children'> {
|
|
18
25
|
}
|
|
19
26
|
}
|
|
20
27
|
export declare const propTypes: {
|
package/types/sharedTypes.d.ts
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { DSDialogT } from './propTypes';
|
|
1
3
|
export declare namespace DSDialogInternalsT {
|
|
2
|
-
interface
|
|
4
|
+
interface PortalInfo {
|
|
3
5
|
overflow: boolean;
|
|
4
6
|
scrollbarWidth: string;
|
|
5
7
|
paddingRight: string;
|
|
6
8
|
}
|
|
9
|
+
interface DSDialogContext {
|
|
10
|
+
props: DSDialogT.InternalProps;
|
|
11
|
+
actualPortalRef: React.MutableRefObject<HTMLElement | null>;
|
|
12
|
+
containerRef: React.MutableRefObject<HTMLDivElement | null>;
|
|
13
|
+
portalInfo: DSDialogInternalsT.PortalInfo;
|
|
14
|
+
portalClassName: string;
|
|
15
|
+
}
|
|
7
16
|
}
|
package/types/styles.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ interface StyledDialogContainerT {
|
|
|
6
6
|
size: DSDialogT.Sizes;
|
|
7
7
|
centered: boolean;
|
|
8
8
|
}
|
|
9
|
-
export declare const
|
|
9
|
+
export declare const PortalStyles: any;
|
|
10
10
|
export declare const StyledDialogBackground: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, StyledDialogBackgroundT, never>;
|
|
11
11
|
export declare const StyledDialogContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, StyledDialogContainerT, never>;
|
|
12
12
|
export declare const DSDialogTitle: import("styled-components").StyledComponent<"h3", import("styled-components").DefaultTheme, {}, never>;
|
package/types/utils.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
declare
|
|
2
|
-
|
|
1
|
+
export declare const getSpaceProps: (props: Record<string, unknown>) => {
|
|
2
|
+
[k: string]: unknown;
|
|
3
|
+
};
|
|
3
4
|
export declare const DSDialogSizes: {
|
|
4
5
|
DEFAULT: "default";
|
|
5
6
|
SMALL: "small";
|
|
@@ -17,4 +18,3 @@ export declare const allSizes: {
|
|
|
17
18
|
'x-large': string;
|
|
18
19
|
'xx-large': string;
|
|
19
20
|
};
|
|
20
|
-
export {};
|