@phillips/seldon 1.184.0 → 1.185.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.
@@ -14,7 +14,7 @@ export interface ComposedModalProps extends Omit<ModalProps, 'onClose' | 'role'
14
14
  /**
15
15
  * Title for Composed Modal
16
16
  */
17
- title: string;
17
+ title?: string;
18
18
  /**
19
19
  * The content of the modal.
20
20
  */
@@ -1,67 +1,67 @@
1
- import { jsxs as s, jsx as i, Fragment as C } from "react/jsx-runtime";
1
+ import { jsxs as e, jsx as m, Fragment as C } from "react/jsx-runtime";
2
2
  import g from "../../node_modules/classnames/index.js";
3
3
  import { forwardRef as x } from "react";
4
4
  import { getCommonProps as k, noOp as M } from "../../utils/index.js";
5
- import d from "../Button/Button.js";
6
- import { ButtonVariants as t } from "../Button/types.js";
5
+ import t from "../Button/Button.js";
6
+ import { ButtonVariants as n } from "../Button/types.js";
7
7
  import y from "../Divider/Divider.js";
8
8
  import j from "../Modal/Modal.js";
9
- import { TextVariants as n } from "../Text/types.js";
10
- import c from "../Text/Text.js";
11
- const L = x(
9
+ import { TextVariants as c } from "../Text/types.js";
10
+ import p from "../Text/Text.js";
11
+ const u = x(
12
12
  ({
13
- children: p,
14
- className: f,
15
- overlayClassName: P,
16
- isOpen: h = !1,
17
- onClose: v = M,
18
- maxHeightValue: b = "60vh",
19
- title: N,
20
- footerContent: o,
21
- secondaryButton: r,
22
- primaryButton: e,
23
- id: m,
24
- ...l
13
+ children: f,
14
+ className: h,
15
+ overlayClassName: L,
16
+ isOpen: v = !1,
17
+ onClose: b = M,
18
+ maxHeightValue: N = "60vh",
19
+ title: l,
20
+ footerContent: s,
21
+ secondaryButton: i,
22
+ primaryButton: o,
23
+ id: r,
24
+ ...d
25
25
  }, _) => {
26
26
  const {
27
27
  className: a,
28
- "data-testid": T,
28
+ "data-testid": P,
29
29
  ...$
30
- } = k({ id: m, ...l }, "ComposedModal");
31
- return /* @__PURE__ */ s(
30
+ } = k({ id: r, ...d }, "ComposedModal");
31
+ return /* @__PURE__ */ e(
32
32
  j,
33
33
  {
34
- isOpen: h,
35
- onClose: v,
36
- ...l,
34
+ isOpen: v,
35
+ onClose: b,
36
+ ...d,
37
37
  ...$,
38
- className: g(`${a}`, f),
39
- id: m,
38
+ className: g(`${a}`, h),
39
+ id: r,
40
40
  ref: _,
41
41
  children: [
42
- /* @__PURE__ */ i(c, { variant: n.heading3, className: `${a}__title`, children: N }),
43
- /* @__PURE__ */ i(
42
+ l ? /* @__PURE__ */ m(p, { variant: c.heading3, className: `${a}__title`, children: l }) : null,
43
+ /* @__PURE__ */ m(
44
44
  "div",
45
45
  {
46
46
  className: `${a}__body`,
47
- style: { "--max-modal-body-height": b },
48
- children: p
47
+ style: { "--max-modal-body-height": N },
48
+ children: f
49
49
  }
50
50
  ),
51
- (r || e || o) && /* @__PURE__ */ s(C, { children: [
52
- /* @__PURE__ */ i(y, { className: `${a}__divider`, id: `${m}-divider` }),
53
- /* @__PURE__ */ s("div", { className: `${a}__btns-group`, children: [
54
- r && /* @__PURE__ */ i(d, { id: `${m}-secondary-btn`, variant: t.secondary, onClick: r.onClick, children: r.buttonLabel }),
55
- e && /* @__PURE__ */ i(d, { id: `${m}-primary-btn`, variant: t.primary, onClick: e.onClick, children: e.buttonLabel })
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 })
56
56
  ] }),
57
- o && /* @__PURE__ */ i(c, { variant: n.heading5, className: `${a}__disclaimer`, children: o })
57
+ s && /* @__PURE__ */ m(p, { variant: c.heading5, className: `${a}__disclaimer`, children: s })
58
58
  ] })
59
59
  ]
60
60
  }
61
61
  );
62
62
  }
63
63
  );
64
- L.displayName = "ComposedModal";
64
+ u.displayName = "ComposedModal";
65
65
  export {
66
- L as default
66
+ u as default
67
67
  };
@@ -423,7 +423,7 @@ $desktop-max-width: var(--desktop-max-width);
423
423
  /// z-index TOKENS:
424
424
  ///////////////////////
425
425
  $modal-z-index: 30;
426
- $z-index-notification-banner: 1000;
426
+ $notification-banner-z-index: 10;
427
427
 
428
428
  ////////////////////////
429
429
  /// Our tokens usually support at least 4 sizes.
@@ -423,7 +423,7 @@ $desktop-max-width: var(--desktop-max-width);
423
423
  /// z-index TOKENS:
424
424
  ///////////////////////
425
425
  $modal-z-index: 30;
426
- $z-index-notification-banner: 1000;
426
+ $notification-banner-z-index: 10;
427
427
 
428
428
  ////////////////////////
429
429
  /// Our tokens usually support at least 4 sizes.
@@ -4,33 +4,41 @@
4
4
  border-radius: 1rem;
5
5
  max-width: 95vw;
6
6
  min-width: 0;
7
- padding: $spacing-sm 0;
7
+ padding: $spacing-lg 0 $spacing-sm 0;
8
8
  width: 95vw;
9
+ &:not(:has(.#{$px}-composed-modal__btns-group)) {
10
+ padding-bottom: $spacing-lg;
11
+ }
9
12
 
10
13
  &__title {
11
- margin-top: $spacing-md;
12
- padding: 0 $spacing-md;
14
+ margin: $spacing-md $spacing-lg $spacing-sm;
13
15
  }
14
16
 
15
17
  &__body {
18
+ margin: 0 $spacing-lg $spacing-md;
16
19
  max-height: var('--max-modal-body-height');
17
20
  overflow-y: auto;
18
21
  }
19
22
 
20
- &__divider {
23
+ .#{$px}-divider {
21
24
  margin: 0;
25
+
26
+ hr {
27
+ margin: 0;
28
+ }
22
29
  }
23
30
 
24
31
  &__btns-group {
25
32
  display: flex;
26
33
  gap: $spacing-sm;
27
34
  justify-content: center;
28
- padding: $spacing-sm $spacing-md;
35
+ margin: 0 $spacing-lg;
36
+ padding: $spacing-sm 0 0;
29
37
  }
30
38
 
31
39
  &__btns-group > * {
32
40
  flex: 1 1 50%;
33
- max-width: 50%;
41
+ margin: $spacing-xsm 0 0;
34
42
  }
35
43
 
36
44
  &__btns {
@@ -12,7 +12,7 @@
12
12
  text-align: center;
13
13
  top: 0;
14
14
  width: 100%;
15
- z-index: $z-index-notification-banner;
15
+ z-index: $notification-banner-z-index;
16
16
 
17
17
  > * {
18
18
  font-size: $snowflake-note-size;
@@ -2,7 +2,6 @@
2
2
 
3
3
  .#{$px}-viewing-details {
4
4
  &__content {
5
- padding: 0 $spacing-md;
6
5
  position: relative;
7
6
  }
8
7
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phillips/seldon",
3
- "version": "1.184.0",
3
+ "version": "1.185.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/PhillipsAuctionHouse/seldon"