@phillips/seldon 1.64.0 → 1.65.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,18 +1,18 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
2
  import l from "../../node_modules/classnames/index.js";
3
3
  import { forwardRef as i } from "react";
4
- import { getCommonProps as p } from "../../utils/index.js";
5
- import { useCarousel as c } from "./utils.js";
6
- const u = i(({ className: m, ...o }, s) => {
7
- const { className: r, ...a } = p(o, "Carousel"), { columnGap: e } = c();
4
+ import { getCommonProps as c } from "../../utils/index.js";
5
+ import { useCarousel as n } from "./utils.js";
6
+ const u = i(({ className: r, ...o }, s) => {
7
+ const { className: e, ...a } = c(o, "Carousel"), { columnGap: m } = n();
8
8
  return /* @__PURE__ */ t(
9
9
  "div",
10
10
  {
11
11
  ref: s,
12
- role: "group",
12
+ role: o.onClick ? "button" : "group",
13
13
  "aria-roledescription": "slide",
14
- className: l(`${r}-item`, m, {
15
- [`${r}-item--gap-${e}`]: !!e
14
+ className: l(`${e}-item`, r, {
15
+ [`${e}-item--gap-${m}`]: !!m
16
16
  }),
17
17
  ...o,
18
18
  ...a
@@ -16,6 +16,10 @@ export interface ModalProps extends ReactModal.Props {
16
16
  * The children of the modal
17
17
  */
18
18
  children: React.ReactNode;
19
+ /**
20
+ * className for the modal
21
+ */
22
+ className?: string;
19
23
  }
20
24
  /**
21
25
  * ## Overview
@@ -1,49 +1,51 @@
1
- import { jsxs as p, jsx as s } from "react/jsx-runtime";
1
+ import { jsxs as f, jsx as s } from "react/jsx-runtime";
2
2
  import t from "../../node_modules/classnames/index.js";
3
- import { getCommonProps as f, noOp as u } from "../../utils/index.js";
4
- import C from "../../assets/close.svg.js";
5
- import m from "../../node_modules/react-modal/lib/index.js";
6
- import N from "../IconButton/IconButton.js";
3
+ import { getCommonProps as p, noOp as u } from "../../utils/index.js";
4
+ import y from "../../assets/close.svg.js";
5
+ import l from "../../node_modules/react-modal/lib/index.js";
6
+ import C from "../IconButton/IconButton.js";
7
7
  import { ButtonVariants as v } from "../Button/types.js";
8
- const j = ({
9
- children: l,
10
- className: i,
8
+ const g = ({
9
+ children: m,
10
+ className: n,
11
11
  isOpen: o = !1,
12
- onClose: r = u,
13
- appElementSelector: n = "main",
14
- ...e
12
+ onClose: a = u,
13
+ appElementSelector: d = "main",
14
+ ...r
15
15
  }) => {
16
16
  if (!o)
17
17
  return null;
18
- const { className: a, "data-testid": c, ...d } = f(e, "Modal");
19
- return m.setAppElement(n), /* @__PURE__ */ p(
20
- m,
18
+ const { className: e, "data-testid": i, ...c } = p(r, "Modal");
19
+ return l.setAppElement(d), /* @__PURE__ */ f(
20
+ l,
21
21
  {
22
- ...d,
22
+ ...c,
23
23
  isOpen: o,
24
- onRequestClose: r,
25
- className: t(a, i),
26
- overlayClassName: t(`${a}__overlay`),
24
+ onRequestClose: a,
25
+ className: t(e, n),
26
+ overlayClassName: t(`${e}__overlay`),
27
27
  ariaHideApp: o,
28
- testId: c,
29
- ...e,
28
+ testId: i,
29
+ onAfterOpen: () => document.body.style.overflow = "hidden",
30
+ onAfterClose: () => document.body.style.overflow = "unset",
31
+ ...r,
30
32
  children: [
31
33
  /* @__PURE__ */ s(
32
- N,
34
+ C,
33
35
  {
34
36
  id: "modal-button",
35
- onClick: r,
37
+ onClick: a,
36
38
  "aria-label": "Close Modal",
37
- className: t(`${a}__close`),
39
+ className: t(`${e}__close`),
38
40
  variant: v.tertiary,
39
- children: /* @__PURE__ */ s(C, {})
41
+ children: /* @__PURE__ */ s(y, {})
40
42
  }
41
43
  ),
42
- l
44
+ m
43
45
  ]
44
46
  }
45
47
  );
46
48
  };
47
49
  export {
48
- j as default
50
+ g as default
49
51
  };
@@ -30,5 +30,5 @@ p.#{$px}-text {
30
30
  .#{$px}-text--super-script {
31
31
  font-size: 60%;
32
32
  margin-left: $spacing-xsm;
33
- vertical-align: text-bottom;
33
+ vertical-align: super;
34
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phillips/seldon",
3
- "version": "1.64.0",
3
+ "version": "1.65.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/PhillipsAuctionHouse/seldon"