@phillips/seldon 1.24.0 → 1.25.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.
@@ -12,6 +12,10 @@ export interface ModalProps extends ReactModal.Props {
12
12
  * The selector for aria-hide
13
13
  */
14
14
  appElementSelector?: string;
15
+ /**
16
+ * The children of the modal
17
+ */
18
+ children: React.ReactNode;
15
19
  }
16
20
  /**
17
21
  * ## Overview
@@ -1,45 +1,40 @@
1
- import { jsxs as n, jsx as t } from "react/jsx-runtime";
1
+ import { jsxs as n, jsx as r } from "react/jsx-runtime";
2
2
  import a from "../../node_modules/classnames/index.js";
3
- import { px as r, noOp as c } from "../../utils/index.js";
4
- import u from "../../assets/close.svg.js";
5
- import f from "../../node_modules/react-modal/lib/index.js";
6
- import p from "../IconButton/IconButton.js";
7
- import { useMemo as v } from "react";
8
- const b = ({
9
- children: s,
10
- className: i,
11
- isOpen: e = !1,
12
- onClose: l = c,
13
- appElementSelector: m = "main",
14
- ...d
15
- }) => {
16
- const o = v(() => document.querySelector(m), [m]);
17
- return !e || !o ? null : /* @__PURE__ */ n(
18
- f,
19
- {
20
- isOpen: e,
21
- onRequestClose: l,
22
- className: a(`${r}-modal`, i),
23
- overlayClassName: a(`${r}-modal__overlay`),
24
- appElement: o != null ? o : void 0,
25
- ariaHideApp: !o,
26
- ...d,
27
- children: [
28
- /* @__PURE__ */ t(
29
- p,
30
- {
31
- "data-testid": "modal-button",
32
- onClick: l,
33
- "aria-label": "Close Modal",
34
- className: a(`${r}-modal__close`),
35
- children: /* @__PURE__ */ t(u, {})
36
- }
37
- ),
38
- s
39
- ]
40
- }
41
- );
42
- };
3
+ import { px as l, noOp as p } 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 f from "../IconButton/IconButton.js";
7
+ const N = ({
8
+ children: t,
9
+ className: s,
10
+ isOpen: o = !1,
11
+ onClose: e = p,
12
+ appElementSelector: d = "main",
13
+ ...i
14
+ }) => o ? (m.setAppElement(d), /* @__PURE__ */ n(
15
+ m,
16
+ {
17
+ isOpen: o,
18
+ onRequestClose: e,
19
+ className: a(`${l}-modal`, s),
20
+ overlayClassName: a(`${l}-modal__overlay`),
21
+ ariaHideApp: o,
22
+ ...i,
23
+ children: [
24
+ /* @__PURE__ */ r(
25
+ f,
26
+ {
27
+ "data-testid": "modal-button",
28
+ onClick: e,
29
+ "aria-label": "Close Modal",
30
+ className: a(`${l}-modal__close`),
31
+ children: /* @__PURE__ */ r(c, {})
32
+ }
33
+ ),
34
+ t
35
+ ]
36
+ }
37
+ )) : null;
43
38
  export {
44
- b as default
39
+ N as default
45
40
  };
package/dist/index.d.ts CHANGED
@@ -16,6 +16,7 @@ export { GridItemAlign } from './components/GridItem/types';
16
16
  export { default as Select, type SelectProps } from './components/Select/Select';
17
17
  export { default as SplitPanel, type SplitPanelProps } from './components/SplitPanel/SplitPanel';
18
18
  export { default as Subscribe, type SubscribeProps } from './components/Subscribe/Subscribe';
19
+ export { SubscriptionState } from './components/Subscribe/types';
19
20
  export { default as Social, type SocialProps } from './components/Social/Social';
20
21
  export { default as ViewingsList, type ViewingsListProps } from './components/ViewingsList/ViewingsList';
21
22
  export { default as Modal, type ModalProps } from './components/Modal/Modal';
package/dist/index.js CHANGED
@@ -1,33 +1,34 @@
1
- import { default as t } from "./components/Button/Button.js";
1
+ import { default as r } from "./components/Button/Button.js";
2
2
  import { default as a } from "./components/IconButton/IconButton.js";
3
- import { default as d } from "./components/ErrorBoundary/ErrorBoundary.js";
4
- import { default as s } from "./components/Footer/Footer.js";
3
+ import { default as s } from "./components/ErrorBoundary/ErrorBoundary.js";
4
+ import { default as l } from "./components/Footer/Footer.js";
5
5
  import { Grid as m } from "./components/Grid/Grid.js";
6
6
  import { default as x } from "./components/Header/Header.js";
7
7
  import { default as n } from "./components/HeroBanner/HeroBanner.js";
8
8
  import { default as L } from "./components/Input/Input.js";
9
9
  import { default as c } from "./components/Link/Link.js";
10
- import { LinkVariants as I } from "./components/Link/utils.js";
11
- import { default as S } from "./components/LinkBlock/LinkBlock.js";
12
- import { default as w } from "./components/LinkList/LinkList.js";
13
- import { default as T } from "./components/Row/Row.js";
10
+ import { LinkVariants as B } from "./components/Link/utils.js";
11
+ import { default as P } from "./components/LinkBlock/LinkBlock.js";
12
+ import { default as b } from "./components/LinkList/LinkList.js";
13
+ import { default as G } from "./components/Row/Row.js";
14
14
  import { default as H } from "./components/GridItem/GridItem.js";
15
15
  import { GridItemAlign as y } from "./components/GridItem/types.js";
16
16
  import { default as A } from "./components/Select/Select.js";
17
17
  import { default as E } from "./components/SplitPanel/SplitPanel.js";
18
18
  import { default as M } from "./components/Subscribe/Subscribe.js";
19
- import { default as R } from "./components/Social/Social.js";
20
- import { default as h } from "./components/ViewingsList/ViewingsList.js";
21
- import { default as q } from "./components/Modal/Modal.js";
22
- import { default as D } from "./components/ViewingsList/StatefulViewingsList.js";
23
- import { TextVariants as K } from "./components/Text/types.js";
24
- import { default as U } from "./components/Text/Text.js";
25
- import { PaddingTokens as X, defaultYear as Z, emailValidation as _, generatePaddingClassName as $, noOp as ee, px as re, useNormalizedInputProps as te } from "./utils/index.js";
26
- import { default as ae } from "./pages/Page.js";
19
+ import { SubscriptionState as R } from "./components/Subscribe/types.js";
20
+ import { default as h } from "./components/Social/Social.js";
21
+ import { default as q } from "./components/ViewingsList/ViewingsList.js";
22
+ import { default as D } from "./components/Modal/Modal.js";
23
+ import { default as K } from "./components/ViewingsList/StatefulViewingsList.js";
24
+ import { TextVariants as U } from "./components/Text/types.js";
25
+ import { default as X } from "./components/Text/Text.js";
26
+ import { PaddingTokens as _, defaultYear as $, emailValidation as ee, generatePaddingClassName as te, noOp as re, px as oe, useNormalizedInputProps as ae } from "./utils/index.js";
27
+ import { default as se } from "./pages/Page.js";
27
28
  export {
28
- t as Button,
29
- d as ErrorBoundary,
30
- s as Footer,
29
+ r as Button,
30
+ s as ErrorBoundary,
31
+ l as Footer,
31
32
  m as Grid,
32
33
  H as GridItem,
33
34
  y as GridItemAlign,
@@ -36,25 +37,26 @@ export {
36
37
  a as IconButton,
37
38
  L as Input,
38
39
  c as Link,
39
- S as LinkBlock,
40
- w as LinkList,
41
- I as LinkVariants,
42
- q as Modal,
43
- X as PaddingTokens,
44
- ae as Page,
45
- T as Row,
40
+ P as LinkBlock,
41
+ b as LinkList,
42
+ B as LinkVariants,
43
+ D as Modal,
44
+ _ as PaddingTokens,
45
+ se as Page,
46
+ G as Row,
46
47
  A as Select,
47
- R as Social,
48
+ h as Social,
48
49
  E as SplitPanel,
49
- D as StatefulViewingsList,
50
+ K as StatefulViewingsList,
50
51
  M as Subscribe,
51
- U as Text,
52
- K as TextVariants,
53
- h as ViewingsList,
54
- Z as defaultYear,
55
- _ as emailValidation,
56
- $ as generatePaddingClassName,
57
- ee as noOp,
58
- re as px,
59
- te as useNormalizedInputProps
52
+ R as SubscriptionState,
53
+ X as Text,
54
+ U as TextVariants,
55
+ q as ViewingsList,
56
+ $ as defaultYear,
57
+ ee as emailValidation,
58
+ te as generatePaddingClassName,
59
+ re as noOp,
60
+ oe as px,
61
+ ae as useNormalizedInputProps
60
62
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phillips/seldon",
3
- "version": "1.24.0",
3
+ "version": "1.25.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/PhillipsAuctionHouse/seldon"