@elliemae/ds-dialog 2.4.1-rc.2 → 2.4.1-rc.6

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.
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const DSDialogPortal: () => JSX.Element | null;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const DSDialogContent: () => JSX.Element;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ export declare const useDialogContent: () => {
3
+ handleOutsideClick: (e: React.MouseEvent) => void;
4
+ handleOnKeyDown: (e: React.KeyboardEvent) => void;
5
+ };
@@ -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 Props extends DefaultProps, PropsRequired, Omit<GlobalAttributesT<HTMLDivElement>, 'size' | 'children'> {
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: {
@@ -1,7 +1,16 @@
1
+ /// <reference types="react" />
2
+ import type { DSDialogT } from './propTypes';
1
3
  export declare namespace DSDialogInternalsT {
2
- interface BodyInfoT {
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 FixedBody: any;
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 type GetSpaceArgsT = Partial<Record<string, string | number>>;
2
- export declare const getSpaceProps: (props: GetSpaceArgsT) => GetSpaceArgsT;
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 {};