@phillips/seldon 1.26.0 → 1.26.2

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.
Files changed (41) hide show
  1. package/dist/components/Button/Button.d.ts +2 -2
  2. package/dist/components/Button/Button.js +33 -32
  3. package/dist/components/Grid/Grid.d.ts +2 -2
  4. package/dist/components/Grid/Grid.js +8 -16
  5. package/dist/components/GridItem/GridItem.d.ts +1 -1
  6. package/dist/components/GridItem/GridItem.js +21 -22
  7. package/dist/components/HeroBanner/HeroBanner.d.ts +3 -2
  8. package/dist/components/HeroBanner/HeroBanner.js +36 -23
  9. package/dist/components/IconButton/IconButton.js +18 -14
  10. package/dist/components/Link/Link.d.ts +2 -2
  11. package/dist/components/Link/Link.js +21 -23
  12. package/dist/components/Link/utils.d.ts +1 -1
  13. package/dist/components/Link/utils.js +6 -6
  14. package/dist/components/LinkBlock/LinkBlock.d.ts +1 -1
  15. package/dist/components/LinkBlock/LinkBlock.js +10 -10
  16. package/dist/components/LinkList/LinkList.d.ts +1 -1
  17. package/dist/components/LinkList/LinkList.js +11 -10
  18. package/dist/components/Modal/Modal.js +43 -36
  19. package/dist/components/Row/Row.d.ts +1 -1
  20. package/dist/components/Row/Row.js +21 -23
  21. package/dist/components/Select/Select.js +28 -27
  22. package/dist/components/Social/Social.d.ts +2 -2
  23. package/dist/components/Social/Social.js +11 -8
  24. package/dist/components/SplitPanel/SplitPanel.d.ts +1 -1
  25. package/dist/components/SplitPanel/SplitPanel.js +22 -21
  26. package/dist/components/Subscribe/Subscribe.d.ts +1 -1
  27. package/dist/components/Subscribe/Subscribe.js +41 -52
  28. package/dist/components/Text/Text.d.ts +1 -1
  29. package/dist/components/Text/Text.js +12 -20
  30. package/dist/components/ViewingsList/ViewingsList.d.ts +2 -2
  31. package/dist/components/ViewingsList/ViewingsList.js +43 -45
  32. package/dist/components/ViewingsList/ViewingsListCard.d.ts +2 -2
  33. package/dist/components/ViewingsList/ViewingsListCard.js +51 -51
  34. package/dist/index.d.ts +2 -2
  35. package/dist/index.js +61 -60
  36. package/dist/node_modules/change-case/dist/index.js +64 -0
  37. package/dist/scss/components/Grid/_grid.scss +2 -4
  38. package/dist/scss/styles.scss +3 -5
  39. package/dist/utils/index.d.ts +9 -10
  40. package/dist/utils/index.js +38 -29
  41. package/package.json +10 -7
@@ -6,7 +6,7 @@ export interface ButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
6
6
  /**
7
7
  * True if button comes after text
8
8
  */
9
- iconLast?: boolean;
9
+ isIconLast?: boolean;
10
10
  /**
11
11
  * Optional click handler
12
12
  */
@@ -33,5 +33,5 @@ export interface ButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
33
33
  *
34
34
  * [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-button--overview)
35
35
  */
36
- declare const Button: ({ buttonType, size, children, className, iconLast, id, type, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
36
+ declare const Button: ({ buttonType, size, children, className, isIconLast: iconLast, type, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
37
37
  export default Button;
@@ -1,34 +1,35 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import $ from "../../node_modules/classnames/index.js";
3
- import { px as t } from "../../utils/index.js";
4
- const c = ({
5
- buttonType: n = "primary",
6
- size: a = "md",
7
- children: r,
8
- className: s,
9
- iconLast: u = !1,
10
- id: o,
11
- type: m = "button",
12
- ...b
13
- }) => /* @__PURE__ */ e(
14
- "button",
15
- {
16
- "data-testid": o ? `button-${o}` : "button",
17
- id: o,
18
- type: m,
19
- className: $(
20
- `${t}-button`,
21
- `${t}-button--${a}`,
22
- `${t}-button--${n}`,
23
- {
24
- [`${t}-button--icon-last`]: u
25
- },
26
- s
27
- ),
28
- ...b,
29
- children: r
30
- }
31
- );
1
+ import { jsx as l } from "react/jsx-runtime";
2
+ import i from "../../node_modules/classnames/index.js";
3
+ import { getCommonProps as u } from "../../utils/index.js";
4
+ const b = ({
5
+ buttonType: t = "primary",
6
+ size: m = "md",
7
+ children: a,
8
+ className: n,
9
+ isIconLast: r = !1,
10
+ type: e = "button",
11
+ ...s
12
+ }) => {
13
+ const { className: o, ...c } = u(s, "Button");
14
+ return /* @__PURE__ */ l(
15
+ "button",
16
+ {
17
+ ...c,
18
+ type: e,
19
+ className: i(
20
+ `${o}`,
21
+ `${o}--${m}`,
22
+ `${o}--${t}`,
23
+ {
24
+ [`${o}--icon-last`]: r
25
+ },
26
+ n
27
+ ),
28
+ ...s,
29
+ children: a
30
+ }
31
+ );
32
+ };
32
33
  export {
33
- c as default
34
+ b as default
34
35
  };
@@ -1,6 +1,6 @@
1
1
  export interface GridProps extends React.HTMLAttributes<HTMLElement> {
2
2
  /**
3
- * Button contents
3
+ * A Grid must have children
4
4
  */
5
5
  children: React.ReactNode;
6
6
  /**
@@ -17,5 +17,5 @@ export interface GridProps extends React.HTMLAttributes<HTMLElement> {
17
17
  *
18
18
  * [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-layouts-grid--overview)
19
19
  */
20
- export declare function Grid({ children, className, element: Element, id, ...props }: GridProps): import("react/jsx-runtime").JSX.Element;
20
+ export declare function Grid({ children, className, element: Element, ...props }: GridProps): import("react/jsx-runtime").JSX.Element;
21
21
  export default Grid;
@@ -1,19 +1,11 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import i from "../../node_modules/classnames/index.js";
3
- import { px as m } from "../../utils/index.js";
4
- function f({ children: t, className: e, element: n = "section", id: r, ...o }) {
5
- return /* @__PURE__ */ a(
6
- n,
7
- {
8
- "data-testid": r ? `grid-container-${r}` : "grid-container",
9
- id: r,
10
- className: i(`${m}-grid__container`, e),
11
- ...o,
12
- children: t
13
- }
14
- );
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import n from "../../node_modules/classnames/index.js";
3
+ import { getCommonProps as c } from "../../utils/index.js";
4
+ function p({ children: o, className: s, element: e = "section", ...m }) {
5
+ const { className: r, ...a } = c(m, "Grid");
6
+ return /* @__PURE__ */ t(e, { ...a, className: n(r, s), ...m, children: o });
15
7
  }
16
8
  export {
17
- f as Grid,
18
- f as default
9
+ p as Grid,
10
+ p as default
19
11
  };
@@ -27,5 +27,5 @@ export interface GridItemProps extends React.HTMLAttributes<HTMLDivElement> {
27
27
  *
28
28
  * [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-layouts-griditem--overview)
29
29
  */
30
- declare const GridItem: ({ children, xs, sm, md, lg, align, id, element: Element, className, ...props }: GridItemProps) => import("react/jsx-runtime").JSX.Element | null;
30
+ declare const GridItem: ({ children, xs, sm, md, lg, align, element: Element, className, ...props }: GridItemProps) => import("react/jsx-runtime").JSX.Element | null;
31
31
  export default GridItem;
@@ -1,31 +1,30 @@
1
1
  import { jsx as I } from "react/jsx-runtime";
2
- import { useMemo as a } from "react";
3
- import { px as g } from "../../utils/index.js";
2
+ import { useMemo as l } from "react";
3
+ import { getCommonProps as b } from "../../utils/index.js";
4
4
  import j from "../../node_modules/classnames/index.js";
5
- import { determineColumnSpanClassName as v, validateColumnSpans as S } from "./gridItemUtils.js";
6
- import { GridItemAlign as b } from "./types.js";
7
- const B = ({
5
+ import { determineColumnSpanClassName as v, validateColumnSpans as G } from "./gridItemUtils.js";
6
+ import { GridItemAlign as N } from "./types.js";
7
+ const A = ({
8
8
  children: p,
9
- xs: r = 2,
10
- sm: m = 4,
11
- md: o = 12,
12
- lg: i = 12,
13
- align: n = b.center,
14
- id: e,
15
- element: d = "div",
16
- className: s,
17
- ...l
9
+ xs: m = 2,
10
+ sm: r = 4,
11
+ md: t = 12,
12
+ lg: o = 12,
13
+ align: s = N.center,
14
+ element: c = "div",
15
+ className: n,
16
+ ...a
18
17
  }) => {
19
- const u = e ? `grid-item-${e}` : "grid-item", t = a(() => ({ xs: r, sm: m, md: o, lg: i }), [r, m, o, i]), c = a(() => [
20
- `${g}-grid-item`,
18
+ const { className: i, ...u } = b(a, "GridItem"), e = l(() => ({ xs: m, sm: r, md: t, lg: o }), [m, r, t, o]), f = l(() => [
19
+ i,
21
20
  // figure out the class names for each breakpoint
22
- Object.entries(t).map(
23
- ([f, C]) => v(f, C, n)
21
+ Object.entries(e).map(
22
+ ([d, C]) => v(d, C, s)
24
23
  ),
25
- s
26
- ], [n, t, s]);
27
- return S(Object.values(t)) ? /* @__PURE__ */ I(d, { ...l, "data-testid": u, id: e, className: j(c), children: p }) : null;
24
+ n
25
+ ], [s, e, i, n]);
26
+ return G(Object.values(e)) ? /* @__PURE__ */ I(c, { ...u, className: j(f), ...a, children: p }) : null;
28
27
  };
29
28
  export {
30
- B as default
29
+ A as default
31
30
  };
@@ -1,4 +1,5 @@
1
- export interface HeroBannerProps {
1
+ import { HTMLAttributes } from 'react';
2
+ export interface HeroBannerProps extends HTMLAttributes<HTMLDivElement> {
2
3
  /**
3
4
  * informational text above the header (e.g. region label or "buy now")
4
5
  */
@@ -37,5 +38,5 @@ export interface HeroBannerProps {
37
38
  *
38
39
  * [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-herobanner--overview)
39
40
  */
40
- declare const HeroBanner: ({ prehead, date, headerText, subHeadText, association, background, id }: HeroBannerProps) => import("react/jsx-runtime").JSX.Element;
41
+ declare const HeroBanner: ({ prehead, date, headerText, subHeadText, association, background, className, ...props }: HeroBannerProps) => import("react/jsx-runtime").JSX.Element;
41
42
  export default HeroBanner;
@@ -1,25 +1,38 @@
1
- import { jsx as n, jsxs as s } from "react/jsx-runtime";
2
- import { px as t } from "../../utils/index.js";
3
- const r = `${t}-hero-banner`, m = ({ prehead: e, date: l, headerText: o, subHeadText: c, association: h, background: p, id: a }) => /* @__PURE__ */ n(
4
- "header",
5
- {
6
- "data-testid": a ? `hero-banner-${a}` : "hero-banner",
7
- id: a,
8
- className: r,
9
- style: { "--background": p },
10
- children: /* @__PURE__ */ s("span", { className: `${r}__content-wrapper`, children: [
11
- e || l ? /* @__PURE__ */ s("p", { className: `${r}__pre-head`, children: [
12
- e ? /* @__PURE__ */ n("span", { children: e }) : null,
13
- l ? /* @__PURE__ */ n("span", { children: l }) : null
14
- ] }) : null,
15
- /* @__PURE__ */ s("h1", { className: `${r}__heading`, children: [
16
- o,
17
- c ? /* @__PURE__ */ n("span", { children: c }) : null
18
- ] }),
19
- h ? /* @__PURE__ */ n("p", { children: h }) : null
20
- ] })
21
- }
22
- );
1
+ import { jsx as n, jsxs as e } from "react/jsx-runtime";
2
+ import { getCommonProps as d } from "../../utils/index.js";
3
+ import t from "../../node_modules/classnames/index.js";
4
+ const f = ({
5
+ prehead: r,
6
+ date: s,
7
+ headerText: o,
8
+ subHeadText: a,
9
+ association: c,
10
+ background: p,
11
+ className: h,
12
+ ...m
13
+ }) => {
14
+ const { className: l, ...i } = d(m, "HeroBanner");
15
+ return /* @__PURE__ */ n(
16
+ "header",
17
+ {
18
+ ...i,
19
+ className: t(l, h),
20
+ style: { "--background": p },
21
+ ...m,
22
+ children: /* @__PURE__ */ e("span", { className: `${l}__content-wrapper`, children: [
23
+ r || s ? /* @__PURE__ */ e("p", { className: `${l}__pre-head`, children: [
24
+ r ? /* @__PURE__ */ n("span", { children: r }) : null,
25
+ s ? /* @__PURE__ */ n("span", { children: s }) : null
26
+ ] }) : null,
27
+ /* @__PURE__ */ e("h1", { className: `${l}__heading`, children: [
28
+ o,
29
+ a ? /* @__PURE__ */ n("span", { children: a }) : null
30
+ ] }),
31
+ c ? /* @__PURE__ */ n("p", { children: c }) : null
32
+ ] })
33
+ }
34
+ );
35
+ };
23
36
  export {
24
- m as default
37
+ f as default
25
38
  };
@@ -1,16 +1,20 @@
1
- import { jsx as p } from "react/jsx-runtime";
2
- import s from "../../node_modules/classnames/index.js";
3
- import a from "../Button/Button.js";
4
- import { px as o } from "../../utils/index.js";
5
- const f = ({ children: t, size: r = "md", className: m, ...n }) => /* @__PURE__ */ p(
6
- a,
7
- {
8
- buttonType: "primary",
9
- className: s(`${o}-icon-button`, `${o}-icon-button--${r}`, m),
10
- ...n,
11
- children: t
12
- }
13
- );
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import e from "../../node_modules/classnames/index.js";
3
+ import c from "../Button/Button.js";
4
+ import { getCommonProps as p } from "../../utils/index.js";
5
+ const B = ({ children: m, size: s = "md", className: r, ...o }) => {
6
+ const { className: t, ...n } = p(o, "IconButton");
7
+ return /* @__PURE__ */ a(
8
+ c,
9
+ {
10
+ ...n,
11
+ buttonType: "primary",
12
+ className: e(t, `${t}--${s}`, r),
13
+ ...o,
14
+ children: m
15
+ }
16
+ );
17
+ };
14
18
  export {
15
- f as default
19
+ B as default
16
20
  };
@@ -15,7 +15,7 @@ export interface LinkProps extends HTMLAttributes<HTMLAnchorElement> {
15
15
  /**
16
16
  * URL to navigate to when clicked
17
17
  */
18
- href: string;
18
+ href?: string;
19
19
  /**
20
20
  * Can be used to render alternative link components like the prefetching `Link` from `@remix-run/react`.
21
21
  * This component should handle the `children`, `data-testid`, `id`, `className`, and `href` props.
@@ -33,5 +33,5 @@ export interface LinkProps extends HTMLAttributes<HTMLAnchorElement> {
33
33
  *
34
34
  * [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-links-link--overview)
35
35
  */
36
- declare const Link: ({ children, id, className, element: Element, variant, href, ...props }: LinkProps) => import("react/jsx-runtime").JSX.Element;
36
+ declare const Link: ({ children, className, element: Element, variant, href, ...props }: LinkProps) => import("react/jsx-runtime").JSX.Element;
37
37
  export default Link;
@@ -1,32 +1,30 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- import f from "../../node_modules/classnames/index.js";
3
- import { px as x } from "../../utils/index.js";
4
- import { getLinkVariantClassName as d, isLinkExternal as L, LinkVariants as s } from "./utils.js";
5
- import { TextVariants as o } from "../Text/types.js";
6
- import N from "../Text/Text.js";
7
- const j = ({
8
- children: i,
9
- id: a,
10
- className: m,
11
- element: t = "a",
12
- variant: r = s.standalone,
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import k from "../../node_modules/classnames/index.js";
3
+ import { getCommonProps as x } from "../../utils/index.js";
4
+ import { getLinkVariantClassName as L, isLinkExternal as N, LinkVariants as t } from "./utils.js";
5
+ import { TextVariants as m } from "../Text/types.js";
6
+ import d from "../Text/Text.js";
7
+ const T = ({
8
+ children: n,
9
+ className: i,
10
+ element: a = "a",
11
+ variant: r = t.standalone,
13
12
  href: e,
14
- ...l
13
+ ...s
15
14
  }) => {
16
- const c = f(`${x}-link`, d(r), m), p = a ? `link-${a}` : "link", k = L(e);
17
- return /* @__PURE__ */ n(
18
- t,
15
+ const { className: l, ...c } = x(s, "Link"), p = k(l, L(r), i), f = N(e);
16
+ return /* @__PURE__ */ o(
17
+ a,
19
18
  {
20
- ...l,
19
+ ...c,
21
20
  href: e,
22
- "data-testid": p,
23
- id: a,
24
- className: c,
25
- ...k && t === "a" ? { rel: "noopener noreferrer", target: "_blank" } : {},
26
- children: /* @__PURE__ */ n(N, { variant: r === s.email ? o.email : o.ctaSm, children: i })
21
+ className: p,
22
+ ...f && a === "a" ? { rel: "noopener noreferrer", target: "_blank" } : {},
23
+ ...s,
24
+ children: /* @__PURE__ */ o(d, { variant: r === t.email ? m.email : m.ctaSm, children: n })
27
25
  }
28
26
  );
29
27
  };
30
28
  export {
31
- j as default
29
+ T as default
32
30
  };
@@ -1,5 +1,5 @@
1
1
  export declare const getLinkVariantClassName: (variant: keyof typeof LinkVariants) => string;
2
- export declare const isLinkExternal: (href: string) => boolean;
2
+ export declare const isLinkExternal: (href?: string) => boolean;
3
3
  export declare enum LinkVariants {
4
4
  /** Default variant, used */
5
5
  standalone = "standalone",
@@ -1,10 +1,10 @@
1
1
  import { px as t } from "../../utils/index.js";
2
- const n = (l) => `${t}-link--${l}`, a = (l) => !!l.match(
2
+ const a = (l) => `${t}-link--${l}`, o = (l) => !!(l != null && l.match(
3
3
  /(http[s]?:\/\/)(?!.*phillips\.com)([a-zA-Z0-9\-.]+)(:[0-9]{1,4})?([a-zA-Z0-9/\-._~:?#[\]@!$&'()*+,;=]*)/g
4
- );
5
- var e = /* @__PURE__ */ ((l) => (l.standalone = "standalone", l.email = "email", l.list = "list", l.inline = "inline", l))(e || {});
4
+ ));
5
+ var i = /* @__PURE__ */ ((l) => (l.standalone = "standalone", l.email = "email", l.list = "list", l.inline = "inline", l))(i || {});
6
6
  export {
7
- e as LinkVariants,
8
- n as getLinkVariantClassName,
9
- a as isLinkExternal
7
+ i as LinkVariants,
8
+ a as getLinkVariantClassName,
9
+ o as isLinkExternal
10
10
  };
@@ -15,5 +15,5 @@ export interface LinkBlockProps extends React.HTMLAttributes<HTMLDivElement> {
15
15
  * [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-links-linkblock--overview)
16
16
  *
17
17
  */
18
- declare const LinkBlock: ({ linkProps, description, className: classNameProp, id, ...props }: LinkBlockProps) => import("react/jsx-runtime").JSX.Element;
18
+ declare const LinkBlock: ({ linkProps, description, className: classNameProp, ...props }: LinkBlockProps) => import("react/jsx-runtime").JSX.Element;
19
19
  export default LinkBlock;
@@ -1,14 +1,14 @@
1
- import { jsxs as k, jsx as i } from "react/jsx-runtime";
1
+ import { jsxs as l, jsx as n } from "react/jsx-runtime";
2
2
  import d from "../../node_modules/classnames/index.js";
3
- import { px as p } from "../../utils/index.js";
4
- import f from "../Link/Link.js";
5
- import { LinkVariants as b } from "../Link/utils.js";
6
- const j = ({ linkProps: s, description: e, className: l, id: t, ...m }) => {
7
- var o;
8
- const a = `${p}-link-block`, r = d(a, l), c = (o = s.element) != null ? o : f, n = t ? `link-block-${t}` : "link-block";
9
- return /* @__PURE__ */ k("div", { ...m, className: r, id: t, "data-testid": n, children: [
10
- /* @__PURE__ */ i(c, { ...s, "data-testid": `${n}-link`, variant: b.list }),
11
- /* @__PURE__ */ i("p", { className: `${a}__description`, children: e })
3
+ import { getCommonProps as p } from "../../utils/index.js";
4
+ import k from "../Link/Link.js";
5
+ import { LinkVariants as f } from "../Link/utils.js";
6
+ const j = ({ linkProps: s, description: e, className: i, ...t }) => {
7
+ var m;
8
+ const { className: o, ...a } = p(t, "LinkBlock"), r = d(o, i), c = (m = s.element) != null ? m : k;
9
+ return /* @__PURE__ */ l("div", { ...a, className: r, ...t, children: [
10
+ /* @__PURE__ */ n(c, { ...s, "data-testid": `${a["data-testid"]}-link`, variant: f.list }),
11
+ /* @__PURE__ */ n("p", { className: `${o}__description`, children: e })
12
12
  ] });
13
13
  };
14
14
  export {
@@ -13,5 +13,5 @@ export interface LinkListProps extends React.HTMLAttributes<HTMLUListElement> {
13
13
  *
14
14
  * [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-links-linklist--overview)
15
15
  */
16
- declare const LinkList: ({ children, id, ...props }: LinkListProps) => import("react/jsx-runtime").JSX.Element;
16
+ declare const LinkList: ({ children, className, ...props }: LinkListProps) => import("react/jsx-runtime").JSX.Element;
17
17
  export default LinkList;
@@ -1,15 +1,16 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import f from "../LinkBlock/LinkBlock.js";
3
- import c from "react";
4
- import { px as u } from "../../utils/index.js";
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import c from "../LinkBlock/LinkBlock.js";
3
+ import d from "react";
4
+ import { getCommonProps as o } from "../../utils/index.js";
5
+ import u from "../../node_modules/classnames/index.js";
5
6
  import { Grid as p } from "../Grid/Grid.js";
6
- const y = ({ children: a, id: s, ...m }) => {
7
- const d = s ? `link-list-${s}` : "link-list", t = `${u}-link-list`;
8
- return /* @__PURE__ */ i(p, { ...m, "data-testid": d, id: s, className: t, element: "ul", role: "list", children: a.map((r) => {
9
- var l, e;
10
- return c.isValidElement(r) && r.type !== f ? (console.warn("LinkList only accepts LinkBlock children"), null) : /* @__PURE__ */ i("li", { className: `${t}--item`, children: r }, (e = (l = r == null ? void 0 : r.props) == null ? void 0 : l.linkProps) == null ? void 0 : e.href);
7
+ const _ = ({ children: t, className: l, ...s }) => {
8
+ const { className: e, ...f } = o(s, "LinkList");
9
+ return /* @__PURE__ */ m(p, { ...f, className: u(e, l), element: "ul", role: "list", ...s, children: t.map((r) => {
10
+ var a, i;
11
+ return d.isValidElement(r) && r.type !== c ? (console.warn("LinkList only accepts LinkBlock children"), null) : /* @__PURE__ */ m("li", { className: `${e}--item`, children: r }, (i = (a = r == null ? void 0 : r.props) == null ? void 0 : a.linkProps) == null ? void 0 : i.href);
11
12
  }) });
12
13
  };
13
14
  export {
14
- y as default
15
+ _ as default
15
16
  };
@@ -1,40 +1,47 @@
1
- import { jsxs as n, jsx as r } from "react/jsx-runtime";
2
- import a from "../../node_modules/classnames/index.js";
3
- import { px as l, noOp as p } from "../../utils/index.js";
4
- import c from "../../assets/close.svg.js";
1
+ import { jsxs as p, jsx as t } from "react/jsx-runtime";
2
+ import e 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
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,
6
+ import N from "../IconButton/IconButton.js";
7
+ const h = ({
8
+ children: r,
9
+ className: n,
10
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;
11
+ onClose: s = u,
12
+ appElementSelector: i = "main",
13
+ ...l
14
+ }) => {
15
+ if (!o)
16
+ return null;
17
+ const { className: a, "data-testid": c, ...d } = f(l, "Modal");
18
+ return m.setAppElement(i), /* @__PURE__ */ p(
19
+ m,
20
+ {
21
+ ...d,
22
+ isOpen: o,
23
+ onRequestClose: s,
24
+ className: e(a, n),
25
+ overlayClassName: e(`${a}__overlay`),
26
+ ariaHideApp: o,
27
+ testId: c,
28
+ ...l,
29
+ children: [
30
+ /* @__PURE__ */ t(
31
+ N,
32
+ {
33
+ id: "modal-button",
34
+ onClick: s,
35
+ "aria-label": "Close Modal",
36
+ className: e(`${a}__close`),
37
+ children: /* @__PURE__ */ t(C, {})
38
+ }
39
+ ),
40
+ r
41
+ ]
42
+ }
43
+ );
44
+ };
38
45
  export {
39
- N as default
46
+ h as default
40
47
  };
@@ -25,5 +25,5 @@ export interface RowProps extends React.HTMLAttributes<HTMLElement> {
25
25
  *
26
26
  * [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-layouts-row--overview)
27
27
  */
28
- declare const Row: ({ children, id, element: CustomElement, padding, className, ...props }: RowProps) => import("react/jsx-runtime").JSX.Element;
28
+ declare const Row: ({ children, element: CustomElement, padding, className, ...props }: RowProps) => import("react/jsx-runtime").JSX.Element;
29
29
  export default Row;
@@ -1,31 +1,29 @@
1
- import { jsx as p } from "react/jsx-runtime";
2
- import { generatePaddingClassName as e, PaddingTokens as s, px as b } from "../../utils/index.js";
3
- import f from "../../node_modules/classnames/index.js";
4
- const d = ({
5
- children: a,
6
- id: o,
7
- element: m,
8
- padding: t = { top: s.lg, bottom: s.lg },
9
- className: n,
10
- ...r
1
+ import { jsx as c } from "react/jsx-runtime";
2
+ import { getCommonProps as p, generatePaddingClassName as e, PaddingTokens as m } from "../../utils/index.js";
3
+ import C from "../../node_modules/classnames/index.js";
4
+ const g = ({
5
+ children: s,
6
+ element: n,
7
+ padding: o = { top: m.lg, bottom: m.lg },
8
+ className: a,
9
+ ...t
11
10
  }) => {
12
- const l = o ? `row-${o}` : "row", c = `${b}-row`;
13
- return /* @__PURE__ */ p(
14
- m || "section",
11
+ const { className: r, ...l } = p(t, "Row");
12
+ return /* @__PURE__ */ c(
13
+ n || "section",
15
14
  {
16
- ...r,
17
- "data-testid": l,
18
- id: o,
19
- className: f(
20
- c,
21
- t.top && e(t.top, "start"),
22
- t.bottom && e(t.bottom, "end"),
23
- n
15
+ ...l,
16
+ className: C(
17
+ r,
18
+ o.top && e(o.top, "start"),
19
+ o.bottom && e(o.bottom, "end"),
20
+ a
24
21
  ),
25
- children: a
22
+ ...t,
23
+ children: s
26
24
  }
27
25
  );
28
26
  };
29
27
  export {
30
- d as default
28
+ g as default
31
29
  };