@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?: ModalButtonProps;
23
+ secondaryButton?: React.ReactNode;
34
24
  /**
35
25
  * Right Button Props
36
26
  */
37
- primaryButton?: ModalButtonProps;
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 e, jsx as m, Fragment as C } from "react/jsx-runtime";
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 k, noOp as M } from "../../utils/index.js";
5
- import t from "../Button/Button.js";
6
- import { ButtonVariants as n } from "../Button/types.js";
7
- import y from "../Divider/Divider.js";
8
- import j from "../Modal/Modal.js";
9
- import { TextVariants as c } from "../Text/types.js";
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: f,
14
- className: h,
15
- overlayClassName: L,
16
- isOpen: v = !1,
17
- onClose: b = M,
11
+ children: p,
12
+ className: n,
13
+ overlayClassName: u,
14
+ isOpen: f = !1,
15
+ onClose: h = C,
18
16
  maxHeightValue: N = "60vh",
19
- title: l,
20
- footerContent: s,
21
- secondaryButton: i,
22
- primaryButton: o,
23
- id: r,
24
- ...d
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
- } = k({ id: r, ...d }, "ComposedModal");
31
- return /* @__PURE__ */ e(
32
- j,
27
+ ...v
28
+ } = b({ id: e, ...l }, "ComposedModal");
29
+ return /* @__PURE__ */ o(
30
+ y,
33
31
  {
34
- isOpen: v,
35
- onClose: b,
36
- ...d,
37
- ...$,
38
- className: g(`${a}`, h),
39
- id: r,
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
- l ? /* @__PURE__ */ m(p, { variant: c.heading3, className: `${a}__title`, children: l }) : null,
43
- /* @__PURE__ */ m(
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: f
46
+ children: p
49
47
  }
50
48
  ),
51
- (i || o || s) && /* @__PURE__ */ e(C, { children: [
52
- /* @__PURE__ */ m(y, { className: `${a}__divider`, id: `${r}-divider` }),
53
- /* @__PURE__ */ e("div", { className: `${a}__btns-group`, children: [
54
- i && /* @__PURE__ */ m(t, { id: `${r}-secondary-btn`, variant: n.secondary, onClick: i.onClick, children: i.buttonLabel }),
55
- o && /* @__PURE__ */ m(t, { id: `${r}-primary-btn`, variant: n.primary, onClick: o.onClick, children: o.buttonLabel })
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
- s && /* @__PURE__ */ m(p, { variant: c.heading5, className: `${a}__disclaimer`, children: s })
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
- u.displayName = "ComposedModal";
62
+ j.displayName = "ComposedModal";
65
63
  export {
66
- u as default
64
+ j as default
67
65
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phillips/seldon",
3
- "version": "1.188.0",
3
+ "version": "1.188.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/PhillipsAuctionHouse/seldon"