@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.
- package/dist/components/Button/Button.d.ts +1 -1
- package/dist/components/Button/Button.js +33 -32
- package/dist/components/Grid/Grid.d.ts +2 -2
- package/dist/components/Grid/Grid.js +8 -16
- package/dist/components/GridItem/GridItem.d.ts +1 -1
- package/dist/components/GridItem/GridItem.js +21 -22
- package/dist/components/HeroBanner/HeroBanner.d.ts +3 -2
- package/dist/components/HeroBanner/HeroBanner.js +36 -23
- package/dist/components/IconButton/IconButton.js +18 -14
- package/dist/components/Link/Link.d.ts +2 -2
- package/dist/components/Link/Link.js +21 -23
- package/dist/components/Link/utils.d.ts +1 -1
- package/dist/components/Link/utils.js +6 -6
- package/dist/components/LinkBlock/LinkBlock.d.ts +1 -1
- package/dist/components/LinkBlock/LinkBlock.js +10 -10
- package/dist/components/LinkList/LinkList.d.ts +1 -1
- package/dist/components/LinkList/LinkList.js +11 -10
- package/dist/components/Modal/Modal.js +43 -36
- package/dist/components/Row/Row.d.ts +1 -1
- package/dist/components/Row/Row.js +21 -23
- package/dist/components/Social/Social.d.ts +2 -2
- package/dist/components/Social/Social.js +11 -8
- package/dist/components/SplitPanel/SplitPanel.d.ts +1 -1
- package/dist/components/SplitPanel/SplitPanel.js +22 -21
- package/dist/components/Subscribe/Subscribe.d.ts +1 -1
- package/dist/components/Subscribe/Subscribe.js +41 -52
- package/dist/components/Text/Text.d.ts +1 -1
- package/dist/components/Text/Text.js +12 -20
- package/dist/components/ViewingsList/ViewingsList.d.ts +2 -2
- package/dist/components/ViewingsList/ViewingsList.js +43 -45
- package/dist/index.d.ts +2 -2
- package/dist/index.js +61 -60
- package/dist/node_modules/change-case/dist/index.js +64 -0
- package/dist/scss/components/Grid/_grid.scss +2 -4
- package/dist/scss/styles.scss +3 -5
- package/dist/utils/index.d.ts +9 -10
- package/dist/utils/index.js +38 -29
- package/package.json +8 -6
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
5
|
-
|
|
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
|
-
|
|
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,
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
5
|
-
children:
|
|
6
|
-
className:
|
|
7
|
-
element:
|
|
8
|
-
hasBorder:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
|
|
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,
|
|
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
|
|
1
|
+
import { jsxs as $, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import y from "../../node_modules/classnames/index.js";
|
|
3
|
-
import {
|
|
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
|
|
6
|
+
import { SubscriptionState as S } from "./types.js";
|
|
7
7
|
const D = ({
|
|
8
|
-
blurb:
|
|
9
|
-
buttonText:
|
|
10
|
-
buttonProps:
|
|
11
|
-
className:
|
|
12
|
-
element:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
|
24
|
-
invalid:
|
|
25
|
-
success:
|
|
26
|
-
loading:
|
|
27
|
-
}[e] : "",
|
|
28
|
-
return /* @__PURE__ */
|
|
29
|
-
|
|
30
|
-
{
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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,
|
|
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 {
|
|
3
|
-
import f from "
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
const
|
|
7
|
-
|
|
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
|
-
|
|
9
|
+
r,
|
|
17
10
|
{
|
|
18
|
-
...
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
|
|
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,
|
|
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 {
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import * as d from "react";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import M from "
|
|
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
|
|
8
|
-
cardTitle:
|
|
9
|
-
|
|
10
|
-
i18n:
|
|
11
|
-
onAdd:
|
|
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:
|
|
14
|
-
title:
|
|
15
|
-
viewings:
|
|
14
|
+
onSave: O,
|
|
15
|
+
title: D,
|
|
16
|
+
viewings: c,
|
|
17
|
+
...i
|
|
16
18
|
}) => {
|
|
17
|
-
const [a, h] = 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(
|
|
20
|
-
}, [
|
|
21
|
-
const { addViewingsBtnLabel:
|
|
22
|
-
const t = `${
|
|
23
|
-
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
},
|
|
29
|
-
|
|
30
|
-
},
|
|
31
|
-
typeof
|
|
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__ */
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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
|
-
|
|
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 {
|
|
2
|
-
import { default as
|
|
3
|
-
import { default as
|
|
4
|
-
import { default as
|
|
5
|
-
import {
|
|
6
|
-
import { default as
|
|
7
|
-
import {
|
|
8
|
-
import { default as
|
|
9
|
-
import { default as
|
|
10
|
-
import {
|
|
11
|
-
import { default as
|
|
12
|
-
import {
|
|
13
|
-
import { default as
|
|
14
|
-
import { default as
|
|
15
|
-
import {
|
|
16
|
-
import { default as
|
|
17
|
-
import {
|
|
18
|
-
import { default as
|
|
19
|
-
import {
|
|
20
|
-
import { default as
|
|
21
|
-
import {
|
|
22
|
-
import { default as
|
|
23
|
-
import { default as
|
|
24
|
-
import {
|
|
25
|
-
import { default as
|
|
26
|
-
import {
|
|
27
|
-
import { default as
|
|
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
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
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
|
+
};
|
package/dist/scss/styles.scss
CHANGED
|
@@ -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';
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -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
|