@amboss/design-system 3.7.6 → 3.7.7

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.
@@ -5,8 +5,8 @@ import type { StackProps } from "../../Stack/Stack";
5
5
  import type { ButtonGroupButtonProps } from "../ButtonGroup/ButtonGroup";
6
6
  import type { TextProps } from "../../Typography/Text/Text";
7
7
  type BaseProps = {
8
- header: string;
9
- onAction: (action: "cancel" | "action") => void;
8
+ header?: string;
9
+ onAction?: (action: "cancel" | "action") => void;
10
10
  role?: "dialog" | "alertdialog";
11
11
  labelHeader?: string;
12
12
  /** The black color is going to be replaced with gray one */
@@ -18,16 +18,18 @@ type BaseProps = {
18
18
  /** @deprecated Use secondaryButton to pass in text and other props for secondary button */
19
19
  cancelButtonLabel?: string;
20
20
  /** Aim to use <Modal.Text> and <Modal.Stack> */
21
- children: React.ReactNode;
21
+ children?: React.ReactNode;
22
22
  "data-e2e-test-id"?: string;
23
23
  privateProps?: {
24
24
  skipPortal?: boolean;
25
25
  };
26
26
  /** It's a bad pattern to use non-dismissible Modal */
27
- isDismissible: boolean;
27
+ isDismissible?: boolean;
28
28
  isFullScreen?: boolean;
29
29
  isMaxWidthLimit?: boolean;
30
30
  size?: "m" | "l";
31
+ "aria-label"?: string;
32
+ "aria-labelledby"?: string;
31
33
  "aria-describedby"?: string;
32
34
  };
33
35
  type ConditionalProps = {
@@ -44,7 +46,7 @@ export declare const StyledBackdrop: import("@emotion/styled").StyledComponent<{
44
46
  theme?: Theme;
45
47
  as?: React.ElementType;
46
48
  } & Partial<BaseProps>, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
47
- export declare function Modal({ header, subHeader, labelHeader, children, imageUrl, ImageComponent, secondaryButton, cancelButtonLabel, isDismissible, isFullScreen, isMaxWidthLimit, actionButton, role, onAction, size, privateProps: { skipPortal }, portalContainer, "aria-describedby": ariaDescribedBy, "data-e2e-test-id": dataE2eTestId, }: ModalProps): React.ReactElement;
49
+ export declare function Modal({ header, subHeader, labelHeader, children, imageUrl, ImageComponent, secondaryButton, cancelButtonLabel, isDismissible, isFullScreen, isMaxWidthLimit, actionButton, role, onAction, size, privateProps: { skipPortal }, portalContainer, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "data-e2e-test-id": dataE2eTestId, }: ModalProps): React.ReactElement;
48
50
  export declare namespace Modal {
49
51
  var Stack: ({ children, ...rest }: Omit<StackProps, "space">) => React.JSX.Element;
50
52
  var Text: ({ children, ...rest }: Omit<TextProps, "size" | "variant">) => React.JSX.Element;