@cloudoperators/juno-ui-components 5.8.1 → 5.9.0
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,4 +1,4 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
2
|
import { KnownIcons } from '../Icon/Icon.component';
|
|
3
3
|
/**
|
|
4
4
|
A generic Modal component.
|
|
@@ -15,11 +15,11 @@ To make the modal less intrusive and effectively un-modal it, pass `closeOnBackd
|
|
|
15
15
|
*/
|
|
16
16
|
export declare const Modal: React.FC<ModalProps>;
|
|
17
17
|
type ModalSize = "small" | "large" | "xl" | "2xl";
|
|
18
|
-
export interface ModalProps extends Omit<React.HTMLProps<HTMLDivElement>, "size"> {
|
|
18
|
+
export interface ModalProps extends Omit<React.HTMLProps<HTMLDivElement>, "size" | "title"> {
|
|
19
19
|
/** The title of the modal. This will be rendering as the heading of the modal, and the modal's `arial-labelledby` attribute will reference the title/heading element. If the modal does not have `title` or `heading`, use `ariaLabel` to provide an accessible name for the modal. */
|
|
20
|
-
title?:
|
|
21
|
-
/** Also the title of the modal, just for API flexibility. If both `title` and `heading` are passed, `title` will
|
|
22
|
-
heading?:
|
|
20
|
+
title?: ReactNode;
|
|
21
|
+
/** Also the title of the modal, just for API flexibility. If both `title` and `heading` are passed, `title` will take precedence. */
|
|
22
|
+
heading?: ReactNode;
|
|
23
23
|
/** The aria-label of the modal. Use only if the modal does NOT have a `title` or `heading`. */
|
|
24
24
|
ariaLabel?: string;
|
|
25
25
|
/** By default, the first element in the tab order of the Modal content will be focussed. To specify an element to be focussed when the modal opens, pass an element, DOM node, or selector string. */
|
|
@@ -32,6 +32,8 @@ export interface ModalProps extends Omit<React.HTMLProps<HTMLDivElement>, "size"
|
|
|
32
32
|
closeOnEsc?: boolean;
|
|
33
33
|
/** The Modal size */
|
|
34
34
|
closeOnBackdropClick?: boolean;
|
|
35
|
+
/** Determines whether the close button should be disabled */
|
|
36
|
+
disableCloseButton?: boolean;
|
|
35
37
|
/** Whether the modal can be closed by hitting the ESC key */
|
|
36
38
|
size?: ModalSize;
|
|
37
39
|
/** Pass to remove default padding from the content area of the modal */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.component.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/Modal.component.tsx"],"names":[],"mappings":"AAKA,OAAO,
|
|
1
|
+
{"version":3,"file":"Modal.component.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/Modal.component.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAAsC,SAAS,EAAE,MAAM,OAAO,CAAA;AAI5E,OAAO,EAAQ,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAiEzD;;;;;;;;;;;;EAYE;AACF,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAoKtC,CAAA;AAED,KAAK,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,IAAI,GAAG,KAAK,CAAA;AAEjD,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACzF,uRAAuR;IACvR,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,qIAAqI;IACrI,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,gGAAgG;IAChG,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,sMAAsM;IACtM,YAAY,CAAC,EAAE,WAAW,GAAG,UAAU,GAAG,MAAM,CAAA;IAChD,qCAAqC;IACrC,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,8FAA8F;IAC9F,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,0GAA0G;IAC1G,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,qBAAqB;IACrB,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,6DAA6D;IAC7D,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,6DAA6D;IAC7D,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,wEAAwE;IACxE,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,8IAA8I;IAC9I,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,qJAAqJ;IACrJ,WAAW,CAAC,EAAE,KAAK,CAAC,YAAY,CAAA;IAChC,kEAAkE;IAClE,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,+DAA+D;IAC/D,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,gEAAgE;IAChE,iBAAiB,CAAC,EAAE,UAAU,CAAA;IAC9B,yDAAyD;IACzD,gBAAgB,CAAC,EAAE,UAAU,CAAA;IAC7B,sEAAsE;IACtE,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,qEAAqE;IACrE,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,oJAAoJ;IACpJ,SAAS,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAA;IAChD,6HAA6H;IAE7H,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG,aAAa,KAAK,IAAI,CAAA;CAC1E"}
|
|
@@ -13,6 +13,7 @@ export declare const XLWithForm: Story;
|
|
|
13
13
|
export declare const XXLWithForm: Story;
|
|
14
14
|
export declare const NonCloseable: Story;
|
|
15
15
|
export declare const CloseOnBackdropClick: Story;
|
|
16
|
+
export declare const DisabledCloseButton: Story;
|
|
16
17
|
export declare const Login: Story;
|
|
17
18
|
export declare const CustomModalFooter: Story;
|
|
18
19
|
export declare const TestSelectInModal: Story;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/Modal.stories.tsx"],"names":[],"mappings":"AAK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