@phillips/seldon 1.17.5 → 1.19.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.
Files changed (45) hide show
  1. package/README.md +2 -32
  2. package/dist/components/Button/Button.d.ts +8 -5
  3. package/dist/components/Button/Button.js +24 -9
  4. package/dist/components/Footer/Footer.d.ts +20 -0
  5. package/dist/components/Footer/Footer.js +18 -0
  6. package/dist/components/Grid/Grid.d.ts +3 -5
  7. package/dist/components/Grid/Grid.js +12 -13
  8. package/dist/components/Link/Link.d.ts +44 -0
  9. package/dist/components/Link/Link.js +40 -0
  10. package/dist/components/Link/utils.d.ts +3 -0
  11. package/dist/components/Link/utils.js +8 -0
  12. package/dist/components/LinkBlock/LinkBlock.d.ts +17 -0
  13. package/dist/components/LinkBlock/LinkBlock.js +14 -0
  14. package/dist/components/LinkList/LinkList.d.ts +15 -0
  15. package/dist/components/LinkList/LinkList.js +15 -0
  16. package/dist/components/Social/Social.d.ts +15 -0
  17. package/dist/components/Social/Social.js +10 -0
  18. package/dist/components/SplitPanel/SplitPanel.d.ts +19 -0
  19. package/dist/components/SplitPanel/SplitPanel.js +23 -0
  20. package/dist/components/Subscribe/Subscribe.d.ts +40 -0
  21. package/dist/components/Subscribe/Subscribe.js +42 -0
  22. package/dist/index.d.ts +7 -0
  23. package/dist/index.js +30 -16
  24. package/dist/scss/_reset.scss +14 -0
  25. package/dist/scss/_type.scss +6 -1
  26. package/dist/scss/_typography.scss +3 -0
  27. package/dist/scss/_utils.scss +41 -10
  28. package/dist/scss/_vars.scss +15 -2
  29. package/dist/scss/components/Button/_button.scss +4 -3
  30. package/dist/scss/components/Footer/_footer.scss +96 -0
  31. package/dist/scss/components/Grid/_grid.scss +1 -1
  32. package/dist/scss/components/Input/_input.scss +1 -1
  33. package/dist/scss/components/Link/_link.scss +34 -0
  34. package/dist/scss/components/LinkBlock/_linkBlock.scss +14 -0
  35. package/dist/scss/components/LinkList/_linkList.scss +11 -0
  36. package/dist/scss/components/Social/_social.scss +40 -0
  37. package/dist/scss/components/SplitPanel/_splitPanel.scss +39 -0
  38. package/dist/scss/components/SplitPanel/_splitPanel.stories.scss +18 -0
  39. package/dist/scss/components/Subscribe/_subscribe.scss +37 -0
  40. package/dist/scss/components/Toggle/_toggle.scss +1 -1
  41. package/dist/scss/components/ViewingsList/_viewingsList.scss +1 -1
  42. package/dist/scss/styles.scss +9 -1
  43. package/dist/utils/index.d.ts +1 -0
  44. package/dist/utils/index.js +15 -13
  45. package/package.json +21 -21
package/README.md CHANGED
@@ -6,6 +6,8 @@
6
6
 
7
7
  Seldon is the source for design guidelines, component documentation, and resources for building apps with the Phillips.com Design System.
8
8
 
9
+ We use Storybook to document the components. Our storybook is hosted in Netlify at [here](https://phillips-seldon.netlify.app/?path=/docs/welcome--overview).
10
+
9
11
  ## Installation
10
12
 
11
13
  ```
@@ -16,38 +18,6 @@ npm install @phillips/seldon
16
18
  yarn add @phillips/seldon
17
19
  ```
18
20
 
19
- ## What's included
20
-
21
- ```
22
- @phillips/seldon/
23
- ├── components
24
- │ └── HeroBanner
25
- │ └── HeroBanner.d.ts
26
- │ └── HeroBanner.js
27
- │ └── ...
28
- ├── Pages
29
- │ └── HomePage
30
- │ └── HomePage.d.ts
31
- │ └── HomePage.js
32
- │ └── ...
33
- ├── scss
34
- │ └── components
35
- │ └── HeroBanner
36
- │ └── _HeroBanner.scss
37
- │ └── ...
38
- │ └── Pages
39
- │ └── HomePage
40
- │ └── _HomePage.scss
41
- │ └── ...
42
- │ └── _reset.scss
43
- │ └── _typography_.scss
44
- │ └── _vars.scss
45
- │ └── styles.scss (sass entrypoint)
46
- ├── utils
47
- ├── index.d.ts
48
- ├── index.js
49
- ```
50
-
51
21
  ### Styling
52
22
 
53
23
  The project contains a `scss` folder. Here you will find the main export of our sass styles. This will include all the styles bundled with this package, including resets and typography styles.
@@ -1,9 +1,8 @@
1
- import { CommonProps } from '../../utils';
2
- export interface ButtonProps extends CommonProps, Record<string, unknown> {
1
+ export interface ButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
3
2
  /**
4
3
  * Button contents
5
4
  */
6
- children: React.ReactNode;
5
+ children?: React.ReactNode;
7
6
  /**
8
7
  * True if button comes after text
9
8
  */
@@ -11,7 +10,7 @@ export interface ButtonProps extends CommonProps, Record<string, unknown> {
11
10
  /**
12
11
  * Optional click handler
13
12
  */
14
- onClick?: (e: React.MouseEvent<HTMLElement>) => void | unknown;
13
+ onClick?: React.MouseEventHandler<HTMLButtonElement> | undefined;
15
14
  /**
16
15
  * Is this the principal call to action on the page?
17
16
  */
@@ -20,6 +19,10 @@ export interface ButtonProps extends CommonProps, Record<string, unknown> {
20
19
  * How large should the button be?
21
20
  */
22
21
  size?: 'sm' | 'md' | 'lg';
22
+ /**
23
+ * The type of the button.
24
+ */
25
+ type?: 'button' | 'submit' | 'reset';
23
26
  }
24
- declare const Button: ({ buttonType, size, children, iconLast, id, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
27
+ declare const Button: ({ buttonType, size, children, className, iconLast, id, type, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
25
28
  export default Button;
@@ -1,19 +1,34 @@
1
- import { jsx as m } from "react/jsx-runtime";
2
- import b from "../../node_modules/classnames/index.js";
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import $ from "../../node_modules/classnames/index.js";
3
3
  import { px as t } from "../../utils/index.js";
4
- const f = ({ buttonType: n = "primary", size: a = "md", children: r, iconLast: s = !1, id: o, ...u }) => /* @__PURE__ */ m(
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(
5
14
  "button",
6
15
  {
7
16
  "data-testid": o ? `button-${o}` : "button",
8
17
  id: o,
9
- type: "button",
10
- className: b(`${t}-button`, `${t}-button--${a}`, `${t}-button--${n}`, {
11
- [`${t}-button--icon-last`]: s
12
- }),
13
- ...u,
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,
14
29
  children: r
15
30
  }
16
31
  );
17
32
  export {
18
- f as default
33
+ c as default
19
34
  };
@@ -0,0 +1,20 @@
1
+ export interface FooterProps extends React.HTMLAttributes<HTMLElement> {
2
+ chidlren?: React.ReactNode;
3
+ /**
4
+ * Copyright data added to bottom of site
5
+ */
6
+ copyright?: string;
7
+ /**
8
+ * Navigation items
9
+ */
10
+ navigationComponent: React.ReactElement;
11
+ }
12
+ /**
13
+ * ## Overview
14
+ *
15
+ * A component for adding a footer to the bottom of the site.
16
+ *
17
+ * [Figma Link](https://www.figma.com/file/npS5ECbNut8hevUkGWSzUN/Site-Furniture-(Navigation)---SP24?type=design&node-id=4346-1981&mode=design&t=D7PpghvLOEpBYd3n-0)
18
+ */
19
+ declare const Footer: ({ children, className, copyright, id, navigationComponent, }: FooterProps) => import("react/jsx-runtime").JSX.Element;
20
+ export default Footer;
@@ -0,0 +1,18 @@
1
+ import { jsxs as f, jsx as r } from "react/jsx-runtime";
2
+ import i from "../../node_modules/classnames/index.js";
3
+ import { px as o, defaultYear as m } from "../../utils/index.js";
4
+ import n from "../SplitPanel/SplitPanel.js";
5
+ const _ = ({
6
+ children: t,
7
+ className: a,
8
+ copyright: s = `© ${m} Phillips Auctioneers, LLC`,
9
+ id: e,
10
+ navigationComponent: l
11
+ }) => /* @__PURE__ */ f("footer", { "data-testid": e || "footer", id: e, className: i(`${o}-footer`, { className: a }), children: [
12
+ /* @__PURE__ */ r("nav", { className: `${o}-footer__navigation`, children: l }),
13
+ /* @__PURE__ */ r(n, { className: `${o}-footer__content`, hasBorder: !1, children: t }),
14
+ /* @__PURE__ */ r("p", { className: `${o}-footer__copyright`, children: s })
15
+ ] });
16
+ export {
17
+ _ as default
18
+ };
@@ -1,14 +1,12 @@
1
- import { ElementType } from 'react';
2
- import { CommonProps } from '../../utils';
3
- export interface GridProps extends CommonProps {
1
+ export interface GridProps extends React.HTMLAttributes<HTMLElement> {
4
2
  /**
5
3
  * Button contents
6
4
  */
7
5
  children: React.ReactNode;
8
6
  /**
9
- * Optional element to render in place of a button e.g. React-Router, etc
7
+ * Optional element to render in place of a button e.g. 'div', 'span', CustomComponent, etc
10
8
  */
11
- element?: ElementType;
9
+ element?: React.ElementType<GridProps>;
12
10
  /**
13
11
  * Optional boolean to dictate if the grid has left and right margins
14
12
  */
@@ -1,24 +1,23 @@
1
- import { jsx as m } from "react/jsx-runtime";
2
- import s from "../../node_modules/classnames/index.js";
3
- import { px as n } from "../../utils/index.js";
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import m from "../../node_modules/classnames/index.js";
3
+ import { px as t } from "../../utils/index.js";
4
4
  function g({
5
5
  children: e,
6
- className: t,
7
- element: i = "section",
8
- hasMargins: o = !0,
6
+ className: n,
7
+ element: a = "section",
8
+ hasMargins: i = !0,
9
9
  id: r,
10
- ...a
10
+ ...o
11
11
  }) {
12
- return /* @__PURE__ */ m(
13
- i,
12
+ return /* @__PURE__ */ s(
13
+ a,
14
14
  {
15
15
  "data-testid": r ? `grid-container-${r}` : "grid-container",
16
16
  id: r,
17
- className: s(`${n}-grid__container`, {
18
- [`${t}`]: t,
19
- [`${n}-grid__container--has-margins`]: o
17
+ className: m(`${t}-grid__container`, n, {
18
+ [`${t}-grid__container--has-margins`]: i
20
19
  }),
21
- ...a,
20
+ ...o,
22
21
  children: e
23
22
  }
24
23
  );
@@ -0,0 +1,44 @@
1
+ import React, { HTMLAttributes } from 'react';
2
+ export declare const LinkVariants: {
3
+ /** Default variant, used */
4
+ readonly standalone: "standalone";
5
+ /** link rendering emailto: */
6
+ readonly email: "email";
7
+ /** these links are being rendered in a list */
8
+ readonly list: "list";
9
+ /** link is being rendered within body copy */
10
+ readonly inline: "inline";
11
+ };
12
+ export interface LinkProps extends HTMLAttributes<HTMLAnchorElement> {
13
+ /**
14
+ * Describes where the link is used. It controls the styling of the link so we apply consistent styles. Defaults to `standalone`. See the documentation [here](https://www.figma.com/file/xMuOXOAKVt5HC7hgYjF3ot/Components-v2.0?type=design&node-id=5731-12815) to see where each variant is used.
15
+ *
16
+ * @default standalone
17
+ * @see LinkVariants
18
+ */
19
+ variant?: keyof typeof LinkVariants;
20
+ /**
21
+ * The text of the link
22
+ */
23
+ children: React.ReactNode;
24
+ /**
25
+ * URL to navigate to when clicked
26
+ */
27
+ href: string;
28
+ /**
29
+ * Can be used to render alternative link components like the prefetching `Link` from `@remix-run/react`.
30
+ * This component should handle the `children`, `data-testid`, `id`, `className`, and `href` props.
31
+ */
32
+ element?: React.ElementType<LinkProps & {
33
+ 'data-testid': string;
34
+ }>;
35
+ }
36
+ /**
37
+ * ## Overview
38
+ *
39
+ * A component that can be used to navigate to different pages or external websites. Renders a standard anchor tag by default.
40
+ *
41
+ * [Figma Link](https://www.figma.com/file/xMuOXOAKVt5HC7hgYjF3ot/Components-v2.0?node-id=5736%3A13364&mode=dev)
42
+ */
43
+ declare const Link: ({ children, id, className, element: Element, variant, href, ...props }: LinkProps) => import("react/jsx-runtime").JSX.Element;
44
+ export default Link;
@@ -0,0 +1,40 @@
1
+ import { jsx as c } from "react/jsx-runtime";
2
+ import k from "../../node_modules/classnames/index.js";
3
+ import { px as p } from "../../utils/index.js";
4
+ import { getLinkVariantClassName as d, isLinkExternal as f } from "./utils.js";
5
+ const x = {
6
+ /** Default variant, used */
7
+ standalone: "standalone",
8
+ /** link rendering emailto: */
9
+ email: "email",
10
+ /** these links are being rendered in a list */
11
+ list: "list",
12
+ /** link is being rendered within body copy */
13
+ inline: "inline"
14
+ }, V = ({
15
+ children: s,
16
+ id: a,
17
+ className: e,
18
+ element: n = "a",
19
+ variant: i = x.standalone,
20
+ href: t,
21
+ ...l
22
+ }) => {
23
+ const r = k(`${p}-link`, d(i), e), o = a ? `link-${a}` : "link", m = f(t);
24
+ return /* @__PURE__ */ c(
25
+ n,
26
+ {
27
+ ...l,
28
+ href: t,
29
+ "data-testid": o,
30
+ id: a,
31
+ className: r,
32
+ ...m && n === "a" ? { rel: "noopener noreferrer", target: "_blank" } : {},
33
+ children: s
34
+ }
35
+ );
36
+ };
37
+ export {
38
+ x as LinkVariants,
39
+ V as default
40
+ };
@@ -0,0 +1,3 @@
1
+ import { LinkVariants } from './Link';
2
+ export declare const getLinkVariantClassName: (variant: keyof typeof LinkVariants) => string;
3
+ export declare const isLinkExternal: (href: string) => boolean;
@@ -0,0 +1,8 @@
1
+ import { px as a } from "../../utils/index.js";
2
+ const n = (t) => `${a}-link--${t}`, s = (t) => !!t.match(
3
+ /(http[s]?:\/\/)(?!.*phillips\.com)([a-zA-Z0-9\-.]+)(:[0-9]{1,4})?([a-zA-Z0-9/\-._~:?#[\]@!$&'()*+,;=]*)/g
4
+ );
5
+ export {
6
+ n as getLinkVariantClassName,
7
+ s as isLinkExternal
8
+ };
@@ -0,0 +1,17 @@
1
+ import { LinkProps } from '../Link/Link';
2
+ export interface LinkBlockProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ /** Props for the Link component */
4
+ linkProps: Omit<LinkProps, 'variant'>;
5
+ /** Renders description under link */
6
+ description: string;
7
+ }
8
+ /**
9
+ * ## Overview
10
+ *
11
+ * The LinkBlock component is used to render a link with a description underneath it. Usually this is used in a list of links.
12
+ *
13
+ * [Figma Link](https://www.figma.com/file/xMuOXOAKVt5HC7hgYjF3ot/Components-v2.0?type=design&node-id=5709-8035&mode=design&t=CTNssP89Nrnt6Jkw-0)
14
+ *
15
+ */
16
+ declare const LinkBlock: ({ linkProps, description, className: classNameProp, id, ...props }: LinkBlockProps) => import("react/jsx-runtime").JSX.Element;
17
+ export default LinkBlock;
@@ -0,0 +1,14 @@
1
+ import { jsxs as r, jsx as o } from "react/jsx-runtime";
2
+ import k from "../../node_modules/classnames/index.js";
3
+ import { px as d } from "../../utils/index.js";
4
+ import p, { LinkVariants as f } from "../Link/Link.js";
5
+ const $ = ({ linkProps: t, description: e, className: i, id: s, ...l }) => {
6
+ const a = `${d}-link-block`, c = k(a, i), m = t.element ?? p, n = s ? `link-block-${s}` : "link-block";
7
+ return /* @__PURE__ */ r("div", { ...l, className: c, id: s, "data-testid": n, children: [
8
+ /* @__PURE__ */ o(m, { ...t, "data-testid": `${n}-link`, variant: f.list }),
9
+ /* @__PURE__ */ o("p", { className: `${a}__description`, children: e })
10
+ ] });
11
+ };
12
+ export {
13
+ $ as default
14
+ };
@@ -0,0 +1,15 @@
1
+ import LinkBlock, { type LinkBlockProps } from '../LinkBlock/LinkBlock';
2
+ import React from 'react';
3
+ export interface LinkListProps extends React.HTMLAttributes<HTMLUListElement> {
4
+ /** These children should be an array of LinkBlock components */
5
+ children: React.ReactElement<LinkBlockProps, typeof LinkBlock>[];
6
+ }
7
+ /**
8
+ * ## Overview
9
+ *
10
+ * The LinkList component is used to display a list of LinkBlocks in a 3 column list on some breakpoints and 1 column list on others. Because of the 3 column design, the set of LinkBlocks should be divisible by 3.
11
+ *
12
+ * [Figma Link](https://www.figma.com/file/xMuOXOAKVt5HC7hgYjF3ot/Components-v2.0?type=design&node-id=5709-8035&mode=design&t=jOnrmrqnE8lCQvGR-4)
13
+ */
14
+ declare const LinkList: ({ children, id, ...props }: LinkListProps) => import("react/jsx-runtime").JSX.Element;
15
+ export default LinkList;
@@ -0,0 +1,15 @@
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";
5
+ 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);
11
+ }) });
12
+ };
13
+ export {
14
+ y as default
15
+ };
@@ -0,0 +1,15 @@
1
+ export interface SocialProps extends React.HTMLAttributes<HTMLElement> {
2
+ /**
3
+ * Title text for the social section
4
+ */
5
+ titleText?: string;
6
+ }
7
+ /**
8
+ * ## Overview
9
+ *
10
+ * A component for displaying our social icons. Expects children to be an unordered list of social icons.
11
+ *
12
+ * [Figma Link](https://www.figma.com/file/npS5ECbNut8hevUkGWSzUN/Site-Furniture-(Navigation)---SP24?type=design&node-id=4357-7418&mode=design&t=D7PpghvLOEpBYd3n-0)
13
+ */
14
+ declare const Social: ({ className, children, id, titleText }: SocialProps) => import("react/jsx-runtime").JSX.Element;
15
+ export default Social;
@@ -0,0 +1,10 @@
1
+ import { jsxs as i, jsx as e } from "react/jsx-runtime";
2
+ import r from "../../node_modules/classnames/index.js";
3
+ import { px as o } from "../../utils/index.js";
4
+ const n = ({ className: s, children: l, id: a, titleText: c = "Follow on Social" }) => /* @__PURE__ */ i("div", { "data-testid": a || "social", className: r(`${o}-social`, s), children: [
5
+ /* @__PURE__ */ e("h3", { className: `${o}-social__header`, children: c }),
6
+ l
7
+ ] });
8
+ export {
9
+ n as default
10
+ };
@@ -0,0 +1,19 @@
1
+ export interface SplitPanelProps extends React.HTMLAttributes<HTMLElement> {
2
+ /**
3
+ * Optional element to render in place of a section e.g. div, span, etc
4
+ */
5
+ element?: React.ElementType;
6
+ /**
7
+ * Boolean that will determine if the split panel has a border between panels at large screens
8
+ */
9
+ hasBorder?: boolean;
10
+ }
11
+ /**
12
+ * ## Overview
13
+ *
14
+ * A component for splitting content into two sections. The sections are split 50/50 that stack on the default and 'sm' break points and are side by side at bigger screen sizes.
15
+ *
16
+ * [Figma Link](https://www.figma.com/file/Hp2FyltbOmRxTuw9kSwBAd/EPIC-About-Us?type=design&node-id=635-34713&mode=design&t=wKZW1vKP8WePUjrH-0)
17
+ */
18
+ declare const SplitPanel: ({ children, className, element: Element, hasBorder, id, ...props }: SplitPanelProps) => import("react/jsx-runtime").JSX.Element;
19
+ export default SplitPanel;
@@ -0,0 +1,23 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import m from "../../node_modules/classnames/index.js";
3
+ import { px as t } from "../../utils/index.js";
4
+ const f = ({
5
+ children: s,
6
+ className: l,
7
+ element: a = "section",
8
+ hasBorder: p = !0,
9
+ id: e,
10
+ ...r
11
+ }) => /* @__PURE__ */ o(
12
+ a,
13
+ {
14
+ "data-testid": e || "split-panel",
15
+ id: e,
16
+ className: m(`${t}-split-panel`, l, { [`${t}-split-panel--borderless`]: !p }),
17
+ ...r,
18
+ children: s
19
+ }
20
+ );
21
+ export {
22
+ f as default
23
+ };
@@ -0,0 +1,40 @@
1
+ import { ButtonProps } from '../Button/Button';
2
+ export interface SubscribeProps extends React.HTMLAttributes<HTMLFormElement> {
3
+ /**
4
+ * Subscribe blurb
5
+ */
6
+ blurb?: string;
7
+ /**
8
+ * Subscribe button extra props to spread
9
+ */
10
+ buttonProps?: ButtonProps;
11
+ /**
12
+ * Subscribe button text
13
+ */
14
+ buttonText?: string;
15
+ /**
16
+ * Optional element to render in place of a form e.g. Remix Form, etc
17
+ */
18
+ element?: React.ElementType<SubscribeProps>;
19
+ /**
20
+ * Subscribe input label
21
+ */
22
+ inputLabelText?: string;
23
+ /**
24
+ * Subscribe input label
25
+ */
26
+ inputPlaceholder?: string;
27
+ /**
28
+ * Subscribe title text
29
+ */
30
+ title?: string;
31
+ }
32
+ /**
33
+ * ## Overview
34
+ *
35
+ * A component for adding an email signup form.
36
+ *
37
+ * [Figma Link](https://www.figma.com/file/npS5ECbNut8hevUkGWSzUN/Site-Furniture-(Navigation)---SP24?node-id=4347%3A4194&mode=dev)
38
+ */
39
+ declare const Subscribe: ({ blurb, buttonText, buttonProps, className, element: Element, id, inputLabelText, inputPlaceholder, title, ...props }: SubscribeProps) => import("react/jsx-runtime").JSX.Element;
40
+ export default Subscribe;
@@ -0,0 +1,42 @@
1
+ import { jsxs as n, jsx as s } from "react/jsx-runtime";
2
+ import p from "../../node_modules/classnames/index.js";
3
+ import { px as e } from "../../utils/index.js";
4
+ import f from "../Input/Input.js";
5
+ import _ from "../Button/Button.js";
6
+ const y = ({
7
+ blurb: t,
8
+ buttonText: i = "Sign Up",
9
+ buttonProps: l,
10
+ className: m,
11
+ element: a = "form",
12
+ id: r,
13
+ inputLabelText: c = "Email*",
14
+ inputPlaceholder: o = "example@email.com",
15
+ title: b = "Subscribe to Newsletter",
16
+ ...u
17
+ }) => /* @__PURE__ */ n(
18
+ a,
19
+ {
20
+ "data-testid": r || "subscribe-form",
21
+ id: r,
22
+ className: p(`${e}-subscribe`, m),
23
+ ...u,
24
+ children: [
25
+ /* @__PURE__ */ s("h3", { className: `${e}-subscribe__title`, children: b }),
26
+ t ? /* @__PURE__ */ s("p", { className: `${e}-subscribe__blurb`, children: t }) : null,
27
+ /* @__PURE__ */ s(
28
+ f,
29
+ {
30
+ className: `${e}-subscribe__input`,
31
+ type: "email",
32
+ placeholder: o,
33
+ labelText: c
34
+ }
35
+ ),
36
+ /* @__PURE__ */ s(_, { className: `${e}-subscribe__button ${m}`, buttonType: "secondary", type: "submit", ...l, children: i })
37
+ ]
38
+ }
39
+ );
40
+ export {
41
+ y as default
42
+ };
package/dist/index.d.ts CHANGED
@@ -1,10 +1,17 @@
1
1
  export { default as Button, type ButtonProps } from './components/Button/Button';
2
2
  export { default as ErrorBoundary, type ErrorBoundaryProps } from './components/ErrorBoundary/ErrorBoundary';
3
+ export { default as Footer, type FooterProps } from './components/Footer/Footer';
3
4
  export { default as Grid, type GridProps } from './components/Grid/Grid';
4
5
  export { default as Header, type HeaderProps } from './components/Header/Header';
5
6
  export { default as HeroBanner, type HeroBannerProps } from './components/HeroBanner/HeroBanner';
6
7
  export { default as Input, type InputProps } from './components/Input/Input';
8
+ export { default as Link, type LinkProps } from './components/Link/Link';
9
+ export { default as LinkBlock, type LinkBlockProps } from './components/LinkBlock/LinkBlock';
10
+ export { default as LinkList, type LinkListProps } from './components/LinkList/LinkList';
7
11
  export { default as Select, type SelectProps } from './components/Select/Select';
12
+ export { default as SplitPanel, type SplitPanelProps } from './components/SplitPanel/SplitPanel';
13
+ export { default as Subscribe, type SubscribeProps } from './components/Subscribe/Subscribe';
14
+ export { default as Social, type SocialProps } from './components/Social/Social';
8
15
  export { default as ViewingsList, type ViewingsListProps } from './components/ViewingsList/ViewingsList';
9
16
  export { default as StatefulViewingsList, type StatefulViewingsListProps, } from './components/ViewingsList/StatefulViewingsList';
10
17
  export { default as Page } from './pages/Page';
package/dist/index.js CHANGED
@@ -1,22 +1,36 @@
1
1
  import { default as t } from "./components/Button/Button.js";
2
2
  import { default as a } from "./components/ErrorBoundary/ErrorBoundary.js";
3
- import { Grid as s } from "./components/Grid/Grid.js";
4
- import { default as d } from "./components/Header/Header.js";
5
- import { default as p } from "./components/HeroBanner/HeroBanner.js";
6
- import { default as x } from "./components/Input/Input.js";
7
- import { default as n } from "./components/Select/Select.js";
8
- import { default as B } from "./components/ViewingsList/ViewingsList.js";
9
- import { default as H } from "./components/ViewingsList/StatefulViewingsList.js";
10
- import { default as S } from "./pages/Page.js";
3
+ import { default as l } from "./components/Footer/Footer.js";
4
+ import { Grid as u } from "./components/Grid/Grid.js";
5
+ import { default as p } from "./components/Header/Header.js";
6
+ import { default as x } from "./components/HeroBanner/HeroBanner.js";
7
+ import { default as n } from "./components/Input/Input.js";
8
+ import { default as S } from "./components/Link/Link.js";
9
+ import { default as k } from "./components/LinkBlock/LinkBlock.js";
10
+ import { default as g } from "./components/LinkList/LinkList.js";
11
+ import { default as w } from "./components/Select/Select.js";
12
+ import { default as P } from "./components/SplitPanel/SplitPanel.js";
13
+ import { default as y } from "./components/Subscribe/Subscribe.js";
14
+ import { default as F } from "./components/Social/Social.js";
15
+ import { default as I } from "./components/ViewingsList/ViewingsList.js";
16
+ import { default as j } from "./components/ViewingsList/StatefulViewingsList.js";
17
+ import { default as v } from "./pages/Page.js";
11
18
  export {
12
19
  t as Button,
13
20
  a as ErrorBoundary,
14
- s as Grid,
15
- d as Header,
16
- p as HeroBanner,
17
- x as Input,
18
- S as Page,
19
- n as Select,
20
- H as StatefulViewingsList,
21
- B as ViewingsList
21
+ l as Footer,
22
+ u as Grid,
23
+ p as Header,
24
+ x as HeroBanner,
25
+ n as Input,
26
+ S as Link,
27
+ k as LinkBlock,
28
+ g as LinkList,
29
+ v as Page,
30
+ w as Select,
31
+ F as Social,
32
+ P as SplitPanel,
33
+ j as StatefulViewingsList,
34
+ y as Subscribe,
35
+ I as ViewingsList
22
36
  };
@@ -39,6 +39,20 @@ h6 {
39
39
  overflow-wrap: break-word;
40
40
  }
41
41
 
42
+ a {
43
+ color: inherit;
44
+ text-decoration: none;
45
+ }
46
+
47
+ ul {
48
+ list-style: none;
49
+ padding: 0;
50
+ }
51
+
52
+ li {
53
+ list-style: none;
54
+ }
55
+
42
56
  #root {
43
57
  isolation: isolate;
44
58
  }
@@ -1,4 +1,9 @@
1
- @use './vars' as *;
1
+ @import './vars';
2
+
3
+ @mixin underline($padding: 0, $width: 0.0625rem, $color: $cta-blue) {
4
+ border-bottom: $width solid $color;
5
+ padding-bottom: $padding;
6
+ }
2
7
 
3
8
  @mixin hText($size: $heading-size1, $color: $primary-black, $transform-style: capitalize) {
4
9
  color: $color;