@phillips/seldon 1.26.0 → 1.26.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.
Files changed (38) hide show
  1. package/dist/components/Button/Button.d.ts +1 -1
  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/Social/Social.d.ts +2 -2
  22. package/dist/components/Social/Social.js +11 -8
  23. package/dist/components/SplitPanel/SplitPanel.d.ts +1 -1
  24. package/dist/components/SplitPanel/SplitPanel.js +22 -21
  25. package/dist/components/Subscribe/Subscribe.d.ts +1 -1
  26. package/dist/components/Subscribe/Subscribe.js +41 -52
  27. package/dist/components/Text/Text.d.ts +1 -1
  28. package/dist/components/Text/Text.js +12 -20
  29. package/dist/components/ViewingsList/ViewingsList.d.ts +2 -2
  30. package/dist/components/ViewingsList/ViewingsList.js +43 -45
  31. package/dist/index.d.ts +2 -2
  32. package/dist/index.js +61 -60
  33. package/dist/node_modules/change-case/dist/index.js +64 -0
  34. package/dist/scss/components/Grid/_grid.scss +2 -4
  35. package/dist/scss/styles.scss +3 -5
  36. package/dist/utils/index.d.ts +9 -10
  37. package/dist/utils/index.js +38 -29
  38. package/package.json +8 -6
@@ -1,10 +1,13 @@
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
- ] });
1
+ import { jsxs as r, jsx as c } from "react/jsx-runtime";
2
+ import i from "../../node_modules/classnames/index.js";
3
+ import { getCommonProps as n } from "../../utils/index.js";
4
+ const h = ({ className: a, children: m, titleText: e = "Follow on Social", ...o }) => {
5
+ const { className: s, ...l } = n(o, "Social");
6
+ return /* @__PURE__ */ r("div", { ...l, className: i(s, a), ...o, children: [
7
+ /* @__PURE__ */ c("h3", { className: `${s}__header`, children: e }),
8
+ m
9
+ ] });
10
+ };
8
11
  export {
9
- n as default
12
+ h as default
10
13
  };
@@ -15,5 +15,5 @@ export interface SplitPanelProps extends React.HTMLAttributes<HTMLElement> {
15
15
  *
16
16
  * [Figma Link](https://www.figma.com/file/Hp2FyltbOmRxTuw9kSwBAd/EPIC-About-Us?type=design&node-id=635-34713&mode=design&t=wKZW1vKP8WePUjrH-0)
17
17
  */
18
- declare const SplitPanel: ({ children, className, element: Element, hasBorder, id, ...props }: SplitPanelProps) => import("react/jsx-runtime").JSX.Element;
18
+ declare const SplitPanel: ({ children, className, element: Element, hasBorder, ...props }: SplitPanelProps) => import("react/jsx-runtime").JSX.Element;
19
19
  export default SplitPanel;
@@ -1,23 +1,24 @@
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
- );
1
+ import { jsx as l } from "react/jsx-runtime";
2
+ import n from "../../node_modules/classnames/index.js";
3
+ import { getCommonProps as c } from "../../utils/index.js";
4
+ const P = ({
5
+ children: o,
6
+ className: m,
7
+ element: t = "section",
8
+ hasBorder: a = !0,
9
+ ...e
10
+ }) => {
11
+ const { className: s, ...r } = c(e, "SplitPanel");
12
+ return /* @__PURE__ */ l(
13
+ t,
14
+ {
15
+ ...r,
16
+ className: n(s, m, { [`${s}--borderless`]: !a }),
17
+ ...e,
18
+ children: o
19
+ }
20
+ );
21
+ };
21
22
  export {
22
- f as default
23
+ P as default
23
24
  };
@@ -55,5 +55,5 @@ export interface SubscribeProps extends React.HTMLAttributes<HTMLFormElement> {
55
55
  *
56
56
  * [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-subscribe--overview)
57
57
  */
58
- declare const Subscribe: ({ blurb, buttonText, buttonProps, className, element: Element, id, inputLabelText, inputPlaceholder, title, loadingText, invalidText, successText, subscriptionState, ...props }: SubscribeProps) => import("react/jsx-runtime").JSX.Element;
58
+ declare const Subscribe: ({ blurb, buttonText, buttonProps, className, element: Element, inputLabelText, inputPlaceholder, title, loadingText, invalidText, successText, subscriptionState, ...props }: SubscribeProps) => import("react/jsx-runtime").JSX.Element;
59
59
  export default Subscribe;
@@ -1,60 +1,49 @@
1
- import { jsxs as N, jsx as t } from "react/jsx-runtime";
1
+ import { jsxs as $, jsx as o } from "react/jsx-runtime";
2
2
  import y from "../../node_modules/classnames/index.js";
3
- import { px as s } from "../../utils/index.js";
3
+ import { getCommonProps as C } from "../../utils/index.js";
4
4
  import v from "../Input/Input.js";
5
5
  import w from "../Button/Button.js";
6
- import { SubscriptionState as j } from "./types.js";
6
+ import { SubscriptionState as S } from "./types.js";
7
7
  const D = ({
8
- blurb: o,
9
- buttonText: a = "Sign Up",
10
- buttonProps: l,
11
- className: r,
12
- element: c = "form",
13
- id: i,
14
- inputLabelText: m = "Email*",
15
- inputPlaceholder: u = "example@email.com",
16
- title: d = "Subscribe to Newsletter",
17
- loadingText: b = "Loading...",
18
- invalidText: n = "",
19
- successText: p,
20
- subscriptionState: e = j.Default,
21
- ...f
8
+ blurb: t,
9
+ buttonText: i = "Sign Up",
10
+ buttonProps: m,
11
+ className: n,
12
+ element: r = "form",
13
+ inputLabelText: c = "Email*",
14
+ inputPlaceholder: d = "example@email.com",
15
+ title: u = "Subscribe to Newsletter",
16
+ loadingText: p = "Loading...",
17
+ invalidText: a = "",
18
+ successText: f,
19
+ subscriptionState: e = S.Default,
20
+ ...l
22
21
  }) => {
23
- const x = e === "invalid", _ = e === "loading", h = e === "success", $ = e !== "default" ? {
24
- invalid: n,
25
- success: p,
26
- loading: b
27
- }[e] : "", g = h || _;
28
- return /* @__PURE__ */ N(
29
- c,
30
- {
31
- "data-testid": i || "subscribe-form",
32
- id: i,
33
- className: y(`${s}-subscribe`, r),
34
- noValidate: !0,
35
- ...f,
36
- children: [
37
- /* @__PURE__ */ t("h3", { className: `${s}-subscribe__title`, children: d }),
38
- o ? /* @__PURE__ */ t("p", { className: `${s}-subscribe__blurb`, children: o }) : null,
39
- /* @__PURE__ */ t(
40
- v,
41
- {
42
- className: `${s}-subscribe__input`,
43
- type: "email",
44
- name: "email",
45
- placeholder: u,
46
- labelText: m,
47
- invalid: x,
48
- invalidText: n,
49
- warn: g,
50
- warnText: $,
51
- required: !0
52
- }
53
- ),
54
- /* @__PURE__ */ t(w, { className: `${s}-subscribe__button ${r}`, buttonType: "secondary", type: "submit", ...l, children: a })
55
- ]
56
- }
57
- );
22
+ const { className: s, ...b } = C(l, "Subscribe"), _ = e === "invalid", x = e === "loading", N = e === "success", g = e !== "default" ? {
23
+ invalid: a,
24
+ success: f,
25
+ loading: p
26
+ }[e] : "", h = N || x;
27
+ return /* @__PURE__ */ $(r, { ...b, className: y(s, n), noValidate: !0, ...l, children: [
28
+ /* @__PURE__ */ o("h3", { className: `${s}__title`, children: u }),
29
+ t ? /* @__PURE__ */ o("p", { className: `${s}__blurb`, children: t }) : null,
30
+ /* @__PURE__ */ o(
31
+ v,
32
+ {
33
+ className: `${s}__input`,
34
+ type: "email",
35
+ name: "email",
36
+ placeholder: d,
37
+ labelText: c,
38
+ invalid: _,
39
+ invalidText: a,
40
+ warn: h,
41
+ warnText: g,
42
+ required: !0
43
+ }
44
+ ),
45
+ /* @__PURE__ */ o(w, { className: `${s}__button ${n}`, buttonType: "secondary", type: "submit", ...m, children: i })
46
+ ] });
58
47
  };
59
48
  export {
60
49
  D as default
@@ -19,5 +19,5 @@ export interface TextProps extends React.HTMLAttributes<HTMLElement> {
19
19
  *
20
20
  * [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-text--overview)
21
21
  */
22
- declare const Text: ({ children, id, element: CustomElement, variant, className, ...props }: TextProps) => import("react/jsx-runtime").JSX.Element;
22
+ declare const Text: ({ children, className, element: CustomElement, variant, ...props }: TextProps) => import("react/jsx-runtime").JSX.Element;
23
23
  export default Text;
@@ -1,28 +1,20 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
- import { px as p } from "../../utils/index.js";
3
- import f from "../../node_modules/classnames/index.js";
4
- import { TextVariants as c } from "./types.js";
5
- import { determineDefaultTextElement as d, determineTextClassName as i } from "./utils.js";
6
- const $ = ({
7
- children: m,
8
- id: t,
9
- element: s,
10
- variant: e = c.body2,
11
- className: o,
12
- ...a
13
- }) => {
14
- const r = t ? `text-${t}` : "text", n = `${p}-text`, x = s || d(e);
2
+ import { getCommonProps as c } from "../../utils/index.js";
3
+ import { TextVariants as f } from "./types.js";
4
+ import { determineDefaultTextElement as i, determineTextClassName as p } from "./utils.js";
5
+ import x from "../../node_modules/classnames/index.js";
6
+ const b = ({ children: t, className: o, element: s, variant: e = f.body2, ...m }) => {
7
+ const r = s || i(e), { className: a, ...n } = c(m, "Text");
15
8
  return /* @__PURE__ */ l(
16
- x,
9
+ r,
17
10
  {
18
- ...a,
19
- "data-testid": r,
20
- id: t,
21
- className: f(n, i(e), o),
22
- children: m
11
+ ...n,
12
+ className: x(a, o, p(e)),
13
+ ...m,
14
+ children: t
23
15
  }
24
16
  );
25
17
  };
26
18
  export {
27
- $ as default
19
+ b as default
28
20
  };
@@ -26,7 +26,7 @@ export interface I18nObject {
26
26
  viewingHours1Label?: string;
27
27
  viewingHours2Label?: string;
28
28
  }
29
- export interface ViewingsListProps {
29
+ export interface ViewingsListProps extends React.HTMLAttributes<HTMLDivElement> {
30
30
  /**
31
31
  * String for Viewing cards that gets nuber appended. EX: 'Title {x}`
32
32
  */
@@ -60,5 +60,5 @@ export interface ViewingsListProps {
60
60
  */
61
61
  onSave: (e: React.MouseEvent<HTMLElement>) => boolean;
62
62
  }
63
- declare const ViewingsList: ({ cardTitle, id, i18n, onAdd, onDelete, onSave, title, viewings, }: ViewingsListProps) => import("react/jsx-runtime").JSX.Element;
63
+ declare const ViewingsList: ({ cardTitle, className, i18n, onAdd, onDelete, onSave, title, viewings, ...props }: ViewingsListProps) => import("react/jsx-runtime").JSX.Element;
64
64
  export default ViewingsList;
@@ -1,54 +1,52 @@
1
- import { jsxs as B, jsx as l } from "react/jsx-runtime";
1
+ import { jsx as l } from "react/jsx-runtime";
2
2
  import * as d from "react";
3
- import p from "../../node_modules/classnames/index.js";
4
- import { px as $ } from "../../utils/index.js";
5
- import M from "./ViewingsListCard.js";
3
+ import { createElement as L } from "react";
4
+ import S from "../../node_modules/classnames/index.js";
5
+ import { getCommonProps as M } from "../../utils/index.js";
6
+ import P from "./ViewingsListCard.js";
6
7
  import R from "../Button/Button.js";
7
- const S = () => Math.floor(Math.random() * 100) + Date.now(), z = ({
8
- cardTitle: O = "Viewing Details",
9
- id: f,
10
- i18n: r = {},
11
- onAdd: m,
8
+ const $ = () => Math.floor(Math.random() * 100) + Date.now(), G = ({
9
+ cardTitle: C = "Viewing Details",
10
+ className: N,
11
+ i18n: f = {},
12
+ onAdd: r,
12
13
  onDelete: e,
13
- onSave: D,
14
- title: x,
15
- viewings: i
14
+ onSave: O,
15
+ title: D,
16
+ viewings: c,
17
+ ...i
16
18
  }) => {
17
- const [a, h] = d.useState(i), [c, o] = d.useState(""), [s, u] = d.useState();
19
+ const [a, h] = d.useState(c), [m, n] = d.useState(""), [o, u] = d.useState(), { className: p, ...E } = M(i, "ViewingsList");
18
20
  d.useEffect(() => {
19
- h(i);
20
- }, [i]);
21
- const { addViewingsBtnLabel: C = "ADD VIEWINGS" } = r, E = () => {
22
- const t = `${S()}${a ? "-" + a.length : ""}`;
23
- o(t), u(t), m && m(t);
24
- }, N = (t) => {
25
- o(""), typeof e == "function" && e(t);
26
- }, y = (t) => {
27
- o(t), u(a == null ? void 0 : a.find((n) => n.id === t));
28
- }, b = (t) => {
29
- D(t) && o("");
30
- }, j = () => {
31
- typeof s == "string" ? typeof e == "function" && e(s) : c === (s == null ? void 0 : s.id) && h((t) => t == null ? void 0 : t.map((n) => n.id === s.id ? s : n)), o("");
21
+ h(c);
22
+ }, [c]);
23
+ const { addViewingsBtnLabel: y = "ADD VIEWINGS" } = f, b = () => {
24
+ const t = `${$()}${a ? "-" + a.length : ""}`;
25
+ n(t), u(t), r && r(t);
26
+ }, V = (t) => {
27
+ n(""), typeof e == "function" && e(t);
28
+ }, k = (t) => {
29
+ n(t), u(a == null ? void 0 : a.find((s) => s.id === t));
30
+ }, x = (t) => {
31
+ O(t) && n("");
32
+ }, B = () => {
33
+ typeof o == "string" ? typeof e == "function" && e(o) : m === (o == null ? void 0 : o.id) && h((t) => t == null ? void 0 : t.map((s) => s.id === o.id ? o : s)), n("");
32
34
  };
33
- return /* @__PURE__ */ B("div", { className: p(`${$}-viewings-list`), id: f, children: [
34
- /* @__PURE__ */ l("h2", { className: p(`${$}-viewings-list__title`), children: x }),
35
- a == null ? void 0 : a.map((t, n) => /* @__PURE__ */ l(
36
- M,
37
- {
38
- ...t,
39
- ...r,
40
- cardTitle: t.location ? `${O} ${n + 1}` : void 0,
41
- editState: c === t.id,
42
- onCancel: j,
43
- onDelete: N,
44
- onEdit: () => y(t.id),
45
- onSave: b
46
- },
47
- `${t.id}`
48
- )),
49
- /* @__PURE__ */ l(R, { id: `viewings-list-add-btn-${f || S()}`, size: "sm", onClick: E, children: C })
50
- ] }, c);
35
+ return /* @__PURE__ */ L("div", { ...E, className: S(p, N), key: m, ...i }, /* @__PURE__ */ l("h2", { className: S(`${p}__title`), children: D }), a == null ? void 0 : a.map((t, s) => /* @__PURE__ */ l(
36
+ P,
37
+ {
38
+ ...t,
39
+ ...f,
40
+ cardTitle: t.location ? `${C} ${s + 1}` : void 0,
41
+ editState: m === t.id,
42
+ onCancel: B,
43
+ onDelete: V,
44
+ onEdit: () => k(t.id),
45
+ onSave: x
46
+ },
47
+ `${t.id}`
48
+ )), /* @__PURE__ */ l(R, { id: `viewings-list-add-btn-${i.id || $()}`, size: "sm", onClick: b, children: y }));
51
49
  };
52
50
  export {
53
- z as default
51
+ G as default
54
52
  };
package/dist/index.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ export * from './utils';
2
+ export { default as Page } from './pages/Page';
1
3
  export { default as Button, type ButtonProps } from './components/Button/Button';
2
4
  export { default as IconButton } from './components/IconButton/IconButton';
3
5
  export { default as ErrorBoundary, type ErrorBoundaryProps } from './components/ErrorBoundary/ErrorBoundary';
@@ -22,5 +24,3 @@ export { default as ViewingsList, type ViewingsListProps } from './components/Vi
22
24
  export { default as Modal, type ModalProps } from './components/Modal/Modal';
23
25
  export { default as StatefulViewingsList, type StatefulViewingsListProps, } from './components/ViewingsList/StatefulViewingsList';
24
26
  export * from './components/Text';
25
- export * from './utils';
26
- export { default as Page } from './pages/Page';
package/dist/index.js CHANGED
@@ -1,62 +1,63 @@
1
- import { default as r } from "./components/Button/Button.js";
2
- import { default as a } from "./components/IconButton/IconButton.js";
3
- import { default as s } from "./components/ErrorBoundary/ErrorBoundary.js";
4
- import { default as l } from "./components/Footer/Footer.js";
5
- import { Grid as m } from "./components/Grid/Grid.js";
6
- import { default as x } from "./components/Header/Header.js";
7
- import { default as n } from "./components/HeroBanner/HeroBanner.js";
8
- import { default as L } from "./components/Input/Input.js";
9
- import { default as c } from "./components/Link/Link.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
- import { default as H } from "./components/GridItem/GridItem.js";
15
- import { GridItemAlign as y } from "./components/GridItem/types.js";
16
- import { default as A } from "./components/Select/Select.js";
17
- import { default as E } from "./components/SplitPanel/SplitPanel.js";
18
- import { default as M } from "./components/Subscribe/Subscribe.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";
1
+ import { PaddingTokens as t, defaultYear as r, emailValidation as a, generatePaddingClassName as f, getCommonProps as s, noOp as p, px as d, useNormalizedInputProps as l } from "./utils/index.js";
2
+ import { default as u } from "./pages/Page.js";
3
+ import { default as i } from "./components/Button/Button.js";
4
+ import { default as g } from "./components/IconButton/IconButton.js";
5
+ import { default as S } from "./components/ErrorBoundary/ErrorBoundary.js";
6
+ import { default as k } from "./components/Footer/Footer.js";
7
+ import { Grid as B } from "./components/Grid/Grid.js";
8
+ import { default as V } from "./components/Header/Header.js";
9
+ import { default as w } from "./components/HeroBanner/HeroBanner.js";
10
+ import { default as T } from "./components/Input/Input.js";
11
+ import { default as H } from "./components/Link/Link.js";
12
+ import { LinkVariants as y } from "./components/Link/utils.js";
13
+ import { default as A } from "./components/LinkBlock/LinkBlock.js";
14
+ import { default as F } from "./components/LinkList/LinkList.js";
15
+ import { default as O } from "./components/Row/Row.js";
16
+ import { default as Y } from "./components/GridItem/GridItem.js";
17
+ import { GridItemAlign as j } from "./components/GridItem/types.js";
18
+ import { default as v } from "./components/Select/Select.js";
19
+ import { default as J } from "./components/SplitPanel/SplitPanel.js";
20
+ import { default as Q } from "./components/Subscribe/Subscribe.js";
21
+ import { SubscriptionState as W } from "./components/Subscribe/types.js";
22
+ import { default as Z } from "./components/Social/Social.js";
23
+ import { default as $ } from "./components/ViewingsList/ViewingsList.js";
24
+ import { default as oe } from "./components/Modal/Modal.js";
25
+ import { default as re } from "./components/ViewingsList/StatefulViewingsList.js";
26
+ import { TextVariants as fe } from "./components/Text/types.js";
27
+ import { default as pe } from "./components/Text/Text.js";
28
28
  export {
29
- r as Button,
30
- s as ErrorBoundary,
31
- l as Footer,
32
- m as Grid,
33
- H as GridItem,
34
- y as GridItemAlign,
35
- x as Header,
36
- n as HeroBanner,
37
- a as IconButton,
38
- L as Input,
39
- c as Link,
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,
47
- A as Select,
48
- h as Social,
49
- E as SplitPanel,
50
- K as StatefulViewingsList,
51
- M as Subscribe,
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
29
+ i as Button,
30
+ S as ErrorBoundary,
31
+ k as Footer,
32
+ B as Grid,
33
+ Y as GridItem,
34
+ j as GridItemAlign,
35
+ V as Header,
36
+ w as HeroBanner,
37
+ g as IconButton,
38
+ T as Input,
39
+ H as Link,
40
+ A as LinkBlock,
41
+ F as LinkList,
42
+ y as LinkVariants,
43
+ oe as Modal,
44
+ t as PaddingTokens,
45
+ u as Page,
46
+ O as Row,
47
+ v as Select,
48
+ Z as Social,
49
+ J as SplitPanel,
50
+ re as StatefulViewingsList,
51
+ Q as Subscribe,
52
+ W as SubscriptionState,
53
+ pe as Text,
54
+ fe as TextVariants,
55
+ $ as ViewingsList,
56
+ r as defaultYear,
57
+ a as emailValidation,
58
+ f as generatePaddingClassName,
59
+ s as getCommonProps,
60
+ p as noOp,
61
+ d as px,
62
+ l as useNormalizedInputProps
62
63
  };
@@ -0,0 +1,64 @@
1
+ const x = /([\p{Ll}\d])(\p{Lu})/gu, P = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu, _ = /(\d)\p{Ll}|(\p{L})\d/u, R = /[^\p{L}\d]+/giu, h = "$1\0$2", L = "";
2
+ function E(r) {
3
+ let e = r.trim();
4
+ e = e.replace(x, h).replace(P, h), e = e.replace(R, "\0");
5
+ let l = 0, c = e.length;
6
+ for (; e.charAt(l) === "\0"; )
7
+ l++;
8
+ if (l === c)
9
+ return [];
10
+ for (; e.charAt(c - 1) === "\0"; )
11
+ c--;
12
+ return e.slice(l, c).split(/\0/g);
13
+ }
14
+ function o(r) {
15
+ var l;
16
+ const e = E(r);
17
+ for (let c = 0; c < e.length; c++) {
18
+ const a = e[c], t = _.exec(a);
19
+ if (t) {
20
+ const s = t.index + ((l = t[1]) != null ? l : t[2]).length;
21
+ e.splice(c, 1, a.slice(0, s), a.slice(s));
22
+ }
23
+ }
24
+ return e;
25
+ }
26
+ function A(r, e) {
27
+ var t;
28
+ const [l, c, a] = w(r, e);
29
+ return l + c.map(C(e == null ? void 0 : e.locale)).join((t = e == null ? void 0 : e.delimiter) != null ? t : " ") + a;
30
+ }
31
+ function S(r, e) {
32
+ return A(r, { delimiter: "-", ...e });
33
+ }
34
+ function C(r) {
35
+ return r === !1 ? (e) => e.toLowerCase() : (e) => e.toLocaleLowerCase(r);
36
+ }
37
+ function w(r, e = {}) {
38
+ var i, f, u;
39
+ const l = (i = e.split) != null ? i : e.separateNumbers ? o : E, c = (f = e.prefixCharacters) != null ? f : L, a = (u = e.suffixCharacters) != null ? u : L;
40
+ let t = 0, s = r.length;
41
+ for (; t < r.length; ) {
42
+ const n = r.charAt(t);
43
+ if (!c.includes(n))
44
+ break;
45
+ t++;
46
+ }
47
+ for (; s > t; ) {
48
+ const n = s - 1, d = r.charAt(n);
49
+ if (!a.includes(d))
50
+ break;
51
+ s = n;
52
+ }
53
+ return [
54
+ r.slice(0, t),
55
+ l(r.slice(t, s)),
56
+ r.slice(s)
57
+ ];
58
+ }
59
+ export {
60
+ S as kebabCase,
61
+ A as noCase,
62
+ E as split,
63
+ o as splitSeparateNumbers
64
+ };
@@ -2,11 +2,9 @@
2
2
  @import '../../utils';
3
3
 
4
4
  .#{$px}-grid {
5
- &__container {
6
- @include gridContainer(false);
7
- }
5
+ @include gridContainer(false);
8
6
 
9
- &__container--has-margins {
7
+ &--has-margins {
10
8
  margin: 0 $spacing-md;
11
9
 
12
10
  @media (min-width: 1401px) {
@@ -7,11 +7,12 @@
7
7
  @import './typography';
8
8
  @import './sharedClasses';
9
9
 
10
+ // 📑 Pages
11
+ @import 'pages/page';
12
+
10
13
  // ⚛️ Components
11
14
  @import 'components/Button/button';
12
15
  @import 'components/IconButton/iconButton';
13
-
14
- // @import 'components/DatePicker/datePicker';
15
16
  @import 'components/Footer/footer';
16
17
  @import 'components/Grid/grid';
17
18
  @import 'components/Header/header';
@@ -29,6 +30,3 @@
29
30
  @import 'components/LinkList/linkList';
30
31
  @import 'components/Text/text';
31
32
  @import 'components/Modal/modal';
32
-
33
- // 📑 Pages
34
- @import 'pages/page';
@@ -1,5 +1,14 @@
1
1
  import * as React from 'react';
2
2
  export declare const px = "phillips";
3
+ /**
4
+ * Returns standard props values incorporating the component name into the class name and data-testid
5
+ */
6
+ export declare const getCommonProps: ({ id, ...props }: {
7
+ id?: string | undefined;
8
+ }, componentName: string) => {
9
+ 'data-testid': string;
10
+ className: string;
11
+ };
3
12
  export declare enum PaddingTokens {
4
13
  xs = "xs",
5
14
  sm = "sm",
@@ -8,16 +17,6 @@ export declare enum PaddingTokens {
8
17
  xl = "xl"
9
18
  }
10
19
  export declare const noOp: () => void;
11
- export interface CommonProps {
12
- /**
13
- * Optional className to be applied to the outer most element
14
- */
15
- className?: string;
16
- /**
17
- * A custom `id`
18
- */
19
- id?: string;
20
- }
21
20
  export interface InputProps {
22
21
  /**
23
22
  * Specify whether the `<input>` should be disabled