@dfds-ui/modal 2.2.0-alpha.98e68873 → 2.2.0-alpha.9bb1ab0f

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.
@@ -1,5 +1,5 @@
1
1
  import React, { ReactNode } from 'react';
2
- export declare type ModalHeadlineProps = {
2
+ export type ModalHeadlineProps = {
3
3
  className?: string;
4
4
  children?: ReactNode;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import React, { ReactNode } from 'react';
2
- export declare type ModalPanelProps = {
2
+ export type ModalPanelProps = {
3
3
  /**
4
4
  * Determines if the modal should be shown or not.
5
5
  */
@@ -23,7 +23,7 @@ export declare type ModalPanelProps = {
23
23
  children?: ReactNode;
24
24
  };
25
25
  export declare const ModalPanel: ({ isOpen, shouldCloseOnEsc, onRequestClose, zIndex, className, children, }: ModalPanelProps) => React.JSX.Element;
26
- export declare type ModalPanelHeaderProps = {
26
+ export type ModalPanelHeaderProps = {
27
27
  /**
28
28
  * className to be assigned to component
29
29
  */
@@ -31,7 +31,7 @@ export declare type ModalPanelHeaderProps = {
31
31
  children: ReactNode;
32
32
  };
33
33
  export declare const ModalPanelHeader: ({ className, children }: ModalPanelHeaderProps) => React.JSX.Element;
34
- export declare type ModalPanelContent = {
34
+ export type ModalPanelContent = {
35
35
  /**
36
36
  * className to be assigned to component
37
37
  */
@@ -39,7 +39,7 @@ export declare type ModalPanelContent = {
39
39
  children: ReactNode;
40
40
  };
41
41
  export declare const ModalPanelContent: ({ className, children }: ModalPanelContent) => React.JSX.Element;
42
- export declare type ModalPanelFooterProps = {
42
+ export type ModalPanelFooterProps = {
43
43
  /**
44
44
  * className to be assigned to component
45
45
  */
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import ReactModal from 'react-modal';
3
- export declare type ReactModalWrapperProps = ReactModal.Props & {
3
+ export type ReactModalWrapperProps = ReactModal.Props & {
4
4
  className?: string;
5
5
  children?: React.ReactNode;
6
6
  };
package/modal/Modal.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { ModalSizes, ModalVariation, Backdrop, BackdropVariant } from './ModalDialog';
3
- export declare type ModalProps = React.PropsWithChildren<{
3
+ export type ModalProps = React.PropsWithChildren<{
4
4
  /**
5
5
  * If set to `true` the modal is shown
6
6
  */
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { ButtonProps } from '@dfds-ui/react-components';
3
- export declare type ModalActionVariation = 'primary' | 'secondary';
4
- export declare type ModalActionProps = {
3
+ export type ModalActionVariation = 'primary' | 'secondary';
4
+ export type ModalActionProps = {
5
5
  actionVariation?: ModalActionVariation;
6
6
  onClick?: () => void;
7
7
  /**
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- export declare type ModalActionsProps = {
2
+ export type ModalActionsProps = {
3
3
  /**
4
4
  * Actions to be displayed at the bottom of the modal
5
5
  */
@@ -1,9 +1,9 @@
1
- export declare type ModalBodyProps = {
1
+ export type ModalBodyProps = {
2
2
  hasPadding?: boolean;
3
3
  column?: boolean;
4
4
  };
5
5
  export declare const ModalBody: import("@emotion/styled").StyledComponent<{
6
- theme?: import("@emotion/react").Theme | undefined;
7
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
6
+ theme?: import("@emotion/react").Theme;
7
+ as?: React.ElementType;
8
8
  } & ModalBodyProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
9
9
  export default ModalBody;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { IconButtonSize } from '@dfds-ui/react-components';
3
- export declare type ModalCloseButtonProps = {
3
+ export type ModalCloseButtonProps = {
4
4
  onRequestClose?: () => void;
5
5
  className?: string;
6
6
  icon?: React.ElementType;
@@ -1,10 +1,10 @@
1
1
  import React from 'react';
2
2
  import { theme } from '@dfds-ui/theme';
3
- export declare type ModalVariation = 'default' | 'fullscreen';
4
- export declare type ModalSizes = Record<keyof typeof theme.breakpoints, string>;
5
- export declare type Backdrop = keyof typeof backdropsTransparent;
6
- export declare type BackdropVariant = 'transparent' | 'solid';
7
- export declare type ModalDialogProps = {
3
+ export type ModalVariation = 'default' | 'fullscreen';
4
+ export type ModalSizes = Record<keyof typeof theme.breakpoints, string>;
5
+ export type Backdrop = keyof typeof backdropsTransparent;
6
+ export type BackdropVariant = 'transparent' | 'solid';
7
+ export type ModalDialogProps = {
8
8
  isOpen: boolean;
9
9
  onRequestClose?: () => void;
10
10
  shouldCloseOnOverlayClick?: boolean;
@@ -35,7 +35,7 @@ export declare const defaultProps: {
35
35
  };
36
36
  zIndex: number;
37
37
  renderWhenClosed: boolean;
38
- backdrop: "lowEmphasis" | "mediumEmphasis" | "highEmphasis";
38
+ backdrop: Backdrop;
39
39
  backdropVariant: BackdropVariant;
40
40
  };
41
41
  declare const ModalDialog: ({ isOpen, onRequestClose, shouldCloseOnOverlayClick, shouldCloseOnEsc, variation, zIndex, className, sizes, fixedTopPosition, renderWhenClosed, backdrop, backdropVariant, children, ...rest }: ModalDialogProps) => React.JSX.Element | null;