@phillips/seldon 1.188.0 → 1.188.1
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,15 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { ModalProps } from '../Modal/Modal';
|
|
3
|
-
export interface ModalButtonProps {
|
|
4
|
-
/**
|
|
5
|
-
* Callback click function for button
|
|
6
|
-
*/
|
|
7
|
-
onClick?: () => void | unknown;
|
|
8
|
-
/**
|
|
9
|
-
* Button label text
|
|
10
|
-
*/
|
|
11
|
-
buttonLabel?: string;
|
|
12
|
-
}
|
|
13
3
|
export interface ComposedModalProps extends Omit<ModalProps, 'onClose' | 'role' | 'style'> {
|
|
14
4
|
/**
|
|
15
5
|
* Title for Composed Modal
|
|
@@ -30,11 +20,11 @@ export interface ComposedModalProps extends Omit<ModalProps, 'onClose' | 'role'
|
|
|
30
20
|
/**
|
|
31
21
|
* Left Button Props
|
|
32
22
|
*/
|
|
33
|
-
secondaryButton?:
|
|
23
|
+
secondaryButton?: React.ReactNode;
|
|
34
24
|
/**
|
|
35
25
|
* Right Button Props
|
|
36
26
|
*/
|
|
37
|
-
primaryButton?:
|
|
27
|
+
primaryButton?: React.ReactNode;
|
|
38
28
|
/**
|
|
39
29
|
* Footer content for bottom of Viewings Details
|
|
40
30
|
*/
|
|
@@ -1,67 +1,65 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as o, jsx as s, Fragment as $ } from "react/jsx-runtime";
|
|
2
2
|
import g from "../../node_modules/classnames/index.js";
|
|
3
3
|
import { forwardRef as x } from "react";
|
|
4
|
-
import { getCommonProps as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
import p from "../Text/Text.js";
|
|
11
|
-
const u = x(
|
|
4
|
+
import { getCommonProps as b, noOp as C } from "../../utils/index.js";
|
|
5
|
+
import M from "../Divider/Divider.js";
|
|
6
|
+
import y from "../Modal/Modal.js";
|
|
7
|
+
import { TextVariants as t } from "../Text/types.js";
|
|
8
|
+
import c from "../Text/Text.js";
|
|
9
|
+
const j = x(
|
|
12
10
|
({
|
|
13
|
-
children:
|
|
14
|
-
className:
|
|
15
|
-
overlayClassName:
|
|
16
|
-
isOpen:
|
|
17
|
-
onClose:
|
|
11
|
+
children: p,
|
|
12
|
+
className: n,
|
|
13
|
+
overlayClassName: u,
|
|
14
|
+
isOpen: f = !1,
|
|
15
|
+
onClose: h = C,
|
|
18
16
|
maxHeightValue: N = "60vh",
|
|
19
|
-
title:
|
|
20
|
-
footerContent:
|
|
21
|
-
secondaryButton:
|
|
22
|
-
primaryButton:
|
|
23
|
-
id:
|
|
24
|
-
...
|
|
17
|
+
title: r,
|
|
18
|
+
footerContent: m,
|
|
19
|
+
secondaryButton: d,
|
|
20
|
+
primaryButton: i,
|
|
21
|
+
id: e,
|
|
22
|
+
...l
|
|
25
23
|
}, _) => {
|
|
26
24
|
const {
|
|
27
25
|
className: a,
|
|
28
26
|
"data-testid": P,
|
|
29
|
-
|
|
30
|
-
} =
|
|
31
|
-
return /* @__PURE__ */
|
|
32
|
-
|
|
27
|
+
...v
|
|
28
|
+
} = b({ id: e, ...l }, "ComposedModal");
|
|
29
|
+
return /* @__PURE__ */ o(
|
|
30
|
+
y,
|
|
33
31
|
{
|
|
34
|
-
isOpen:
|
|
35
|
-
onClose:
|
|
36
|
-
...
|
|
37
|
-
|
|
38
|
-
className: g(`${a}`,
|
|
39
|
-
id:
|
|
32
|
+
isOpen: f,
|
|
33
|
+
onClose: h,
|
|
34
|
+
...l,
|
|
35
|
+
...v,
|
|
36
|
+
className: g(`${a}`, n),
|
|
37
|
+
id: e,
|
|
40
38
|
ref: _,
|
|
41
39
|
children: [
|
|
42
|
-
|
|
43
|
-
/* @__PURE__ */
|
|
40
|
+
r ? /* @__PURE__ */ s(c, { variant: t.heading3, className: `${a}__title`, children: r }) : null,
|
|
41
|
+
/* @__PURE__ */ s(
|
|
44
42
|
"div",
|
|
45
43
|
{
|
|
46
44
|
className: `${a}__body`,
|
|
47
45
|
style: { "--max-modal-body-height": N },
|
|
48
|
-
children:
|
|
46
|
+
children: p
|
|
49
47
|
}
|
|
50
48
|
),
|
|
51
|
-
(
|
|
52
|
-
/* @__PURE__ */
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
-
|
|
55
|
-
|
|
49
|
+
(d || i || m) && /* @__PURE__ */ o($, { children: [
|
|
50
|
+
/* @__PURE__ */ s(M, { className: `${a}__divider`, id: `${e}-divider` }),
|
|
51
|
+
/* @__PURE__ */ o("div", { className: `${a}__btns-group`, children: [
|
|
52
|
+
d,
|
|
53
|
+
i
|
|
56
54
|
] }),
|
|
57
|
-
|
|
55
|
+
m && /* @__PURE__ */ s(c, { variant: t.heading5, className: `${a}__disclaimer`, children: m })
|
|
58
56
|
] })
|
|
59
57
|
]
|
|
60
58
|
}
|
|
61
59
|
);
|
|
62
60
|
}
|
|
63
61
|
);
|
|
64
|
-
|
|
62
|
+
j.displayName = "ComposedModal";
|
|
65
63
|
export {
|
|
66
|
-
|
|
64
|
+
j as default
|
|
67
65
|
};
|