@phillips/seldon 1.40.0 → 1.42.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.
- package/dist/assets/loading_spinner.svg.js +7 -0
- package/dist/components/HeroBanner/HeroBanner.js +21 -21
- package/dist/components/Link/Link.js +23 -24
- package/dist/components/Link/types.d.ts +3 -16
- package/dist/components/Link/types.js +6 -2
- package/dist/components/Link/utils.d.ts +2 -18
- package/dist/components/Link/utils.js +4 -6
- package/dist/components/LinkBlock/LinkBlock.js +8 -8
- package/dist/components/Navigation/NavigationItem/NavigationItem.d.ts +1 -1
- package/dist/components/Navigation/NavigationItem/NavigationItem.js +28 -20
- package/dist/components/Search/Search.d.ts +1 -5
- package/dist/components/Search/Search.js +112 -94
- package/dist/components/Search/SearchResults/SearchResults.d.ts +8 -6
- package/dist/components/Search/SearchResults/SearchResults.js +17 -13
- package/dist/components/Text/types.d.ts +5 -8
- package/dist/components/Text/types.js +1 -1
- package/dist/components/Text/utils.js +4 -7
- package/dist/components/Video/Video.d.ts +23 -0
- package/dist/components/Video/Video.js +26 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +7 -5
- package/dist/scss/_type.scss +29 -62
- package/dist/scss/_vars.scss +59 -51
- package/dist/scss/componentStyles.scss +2 -0
- package/dist/scss/components/HeroBanner/_heroBanner.scss +12 -29
- package/dist/scss/components/Link/_link.scss +29 -89
- package/dist/scss/components/Navigation/NavigationItem/_navigationItem.scss +41 -92
- package/dist/scss/components/Navigation/NavigationList/_navigationList.scss +2 -49
- package/dist/scss/components/Navigation/_navigation.scss +1 -3
- package/dist/scss/components/Row/_row.scss +4 -0
- package/dist/scss/components/Search/SearchResults/_searchResults.scss +61 -0
- package/dist/scss/components/Search/_search.scss +81 -101
- package/dist/scss/components/Text/_text.scss +4 -2
- package/dist/scss/components/UserManagement/_userManagement.scss +0 -8
- package/dist/scss/components/Video/_video.scss +17 -0
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.js +7 -7
- package/package.json +4 -2
|
@@ -1,113 +1,131 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import { getCommonProps as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
import { jsxs as v, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import * as d from "react";
|
|
3
|
+
import { getCommonProps as P, encodeURLSearchParams as N } from "../../utils/index.js";
|
|
4
|
+
import f from "../../node_modules/classnames/index.js";
|
|
5
|
+
import T from "../Input/Input.js";
|
|
6
|
+
import j from "../../assets/search.svg.js";
|
|
7
|
+
import D from "../../assets/close.svg.js";
|
|
8
|
+
import V from "../../assets/loading_spinner.svg.js";
|
|
9
|
+
import A from "../Link/Link.js";
|
|
10
|
+
import F from "./SearchResults/SearchResults.js";
|
|
11
|
+
import { TextVariants as H } from "../Text/types.js";
|
|
12
|
+
import K from "../Text/Text.js";
|
|
13
|
+
const Z = ({
|
|
14
|
+
onSearch: h,
|
|
15
|
+
searchResults: R = [],
|
|
16
|
+
state: s = "idle",
|
|
17
|
+
defaultValue: C = "",
|
|
18
|
+
className: w,
|
|
19
|
+
placeholder: l,
|
|
20
|
+
searchButtonText: c = "Search",
|
|
21
|
+
loadingText: x = "Search In Progress...",
|
|
22
|
+
invalidText: k = "Invalid search",
|
|
23
|
+
getAllResultsText: y = (e) => `View all results for ${e}`,
|
|
24
|
+
getAllResultsLink: _ = (e) => `/Search?Search=${e}`,
|
|
25
|
+
...p
|
|
23
26
|
}) => {
|
|
24
|
-
var
|
|
25
|
-
const { className: e, "data-testid":
|
|
26
|
-
var
|
|
27
|
-
|
|
27
|
+
var g;
|
|
28
|
+
const { className: e, "data-testid": r, ...L } = P(p, "Search"), [n, b] = d.useState(!1), m = d.useRef(null), u = d.useRef(null), o = (g = m.current) == null ? void 0 : g.value, E = s === "loading" || s === "submitting", $ = () => {
|
|
29
|
+
var t, i;
|
|
30
|
+
if (b(!n), n) {
|
|
31
|
+
(t = u.current) == null || t.reset();
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
(i = m.current) == null || i.focus();
|
|
35
|
+
}, S = (t) => {
|
|
36
|
+
var i;
|
|
37
|
+
if (t.stopPropagation(), t.key === "Enter") {
|
|
38
|
+
if (t.preventDefault(), o && o.length > 2) {
|
|
39
|
+
const I = N(_(o));
|
|
40
|
+
window.location.href = I;
|
|
41
|
+
}
|
|
42
|
+
t.currentTarget instanceof HTMLAnchorElement && t.currentTarget.click();
|
|
43
|
+
}
|
|
44
|
+
t.key === "Escape" && (b(!1), (i = u.current) == null || i.reset());
|
|
28
45
|
};
|
|
29
|
-
return /* @__PURE__ */
|
|
46
|
+
return /* @__PURE__ */ v(
|
|
30
47
|
"div",
|
|
31
48
|
{
|
|
32
|
-
...
|
|
33
|
-
className:
|
|
34
|
-
"data-testid":
|
|
49
|
+
...L,
|
|
50
|
+
className: f(e, w),
|
|
51
|
+
"data-testid": r,
|
|
35
52
|
role: "search",
|
|
36
|
-
...
|
|
53
|
+
...p,
|
|
37
54
|
children: [
|
|
38
|
-
/* @__PURE__ */ a(
|
|
39
|
-
|
|
55
|
+
/* @__PURE__ */ a(K, { variant: H.heading3, className: `${e}__label`, children: c }),
|
|
56
|
+
n ? null : /* @__PURE__ */ a(
|
|
57
|
+
"button",
|
|
40
58
|
{
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
|
|
59
|
+
type: "button",
|
|
60
|
+
"data-testid": `${r}-button`,
|
|
61
|
+
"aria-label": c,
|
|
62
|
+
className: `${e}__button ${e}__button--search`,
|
|
63
|
+
onClick: $,
|
|
64
|
+
children: /* @__PURE__ */ a(j, { "data-testid": `${r}-button-icon`, className: `${e}__button__icon` })
|
|
44
65
|
}
|
|
45
66
|
),
|
|
46
|
-
/* @__PURE__ */ a(
|
|
67
|
+
n && s === "idle" ? /* @__PURE__ */ a(
|
|
47
68
|
"button",
|
|
48
69
|
{
|
|
49
|
-
|
|
50
|
-
"
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
70
|
+
type: "button",
|
|
71
|
+
"data-testid": `${r}-close-button`,
|
|
72
|
+
"aria-label": "Close Search",
|
|
73
|
+
className: `${e}__button ${e}__button--close`,
|
|
74
|
+
onClick: $,
|
|
75
|
+
children: /* @__PURE__ */ a(D, { "data-testid": `${r}-form-icon`, className: `${e}__button__icon` })
|
|
54
76
|
}
|
|
55
|
-
),
|
|
77
|
+
) : null,
|
|
78
|
+
n && E ? /* @__PURE__ */ a(
|
|
79
|
+
V,
|
|
80
|
+
{
|
|
81
|
+
"data-testid": `${r}-form-icon`,
|
|
82
|
+
className: `${e}__button__icon ${e}__input-status-icon`
|
|
83
|
+
}
|
|
84
|
+
) : null,
|
|
56
85
|
/* @__PURE__ */ a(
|
|
57
86
|
"form",
|
|
58
87
|
{
|
|
59
|
-
"data-testid": `${
|
|
60
|
-
className:
|
|
61
|
-
"aria-hidden": !
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
),
|
|
93
|
-
l && l.length > 2 ? /* @__PURE__ */ a(
|
|
94
|
-
j,
|
|
88
|
+
"data-testid": `${r}-form`,
|
|
89
|
+
className: f(`${e}__form`, { [`${e}__form--active`]: n }),
|
|
90
|
+
"aria-hidden": !n,
|
|
91
|
+
ref: u,
|
|
92
|
+
children: /* @__PURE__ */ v("div", { className: f(`${e}__content-wrapper`), role: "combobox", "aria-haspopup": "listbox", children: [
|
|
93
|
+
/* @__PURE__ */ a(
|
|
94
|
+
T,
|
|
95
|
+
{
|
|
96
|
+
className: `${e}__input`,
|
|
97
|
+
id: "search-input",
|
|
98
|
+
hideLabel: !0,
|
|
99
|
+
labelText: c,
|
|
100
|
+
placeholder: l != null ? l : null,
|
|
101
|
+
type: "text",
|
|
102
|
+
defaultValue: C,
|
|
103
|
+
invalid: s === "invalid",
|
|
104
|
+
invalidText: k,
|
|
105
|
+
onKeyDown: S,
|
|
106
|
+
onChange: h ? (t) => {
|
|
107
|
+
h(t.target.value);
|
|
108
|
+
} : void 0,
|
|
109
|
+
ref: m
|
|
110
|
+
}
|
|
111
|
+
),
|
|
112
|
+
o && o.length > 2 ? /* @__PURE__ */ a(
|
|
113
|
+
F,
|
|
114
|
+
{
|
|
115
|
+
autoCompleteResults: R,
|
|
116
|
+
isLoading: s === "loading",
|
|
117
|
+
loadingText: x,
|
|
118
|
+
onKeyDown: S,
|
|
119
|
+
children: /* @__PURE__ */ a("li", { className: `${e}__result`, children: /* @__PURE__ */ a(
|
|
120
|
+
A,
|
|
95
121
|
{
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
loadingText: g,
|
|
99
|
-
children: /* @__PURE__ */ a("li", { className: `${e}__result`, children: /* @__PURE__ */ a(
|
|
100
|
-
P,
|
|
101
|
-
{
|
|
102
|
-
href: ((r) => k(C(r)))(l),
|
|
103
|
-
children: /* @__PURE__ */ a("p", { children: R(l) })
|
|
104
|
-
}
|
|
105
|
-
) }, "viewAllSearchResults")
|
|
122
|
+
href: ((t) => N(_(t)))(o),
|
|
123
|
+
children: /* @__PURE__ */ a("p", { children: y(o) })
|
|
106
124
|
}
|
|
107
|
-
)
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
)
|
|
125
|
+
) }, "viewAllSearchResults")
|
|
126
|
+
}
|
|
127
|
+
) : null
|
|
128
|
+
] })
|
|
111
129
|
}
|
|
112
130
|
)
|
|
113
131
|
]
|
|
@@ -115,5 +133,5 @@ const V = ({
|
|
|
115
133
|
);
|
|
116
134
|
};
|
|
117
135
|
export {
|
|
118
|
-
|
|
136
|
+
Z as default
|
|
119
137
|
};
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
export interface SearchResult {
|
|
3
|
+
id: string;
|
|
4
|
+
url: string;
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
2
7
|
export interface SearchResultsProps extends React.HTMLAttributes<HTMLElement> {
|
|
3
|
-
autoCompleteResults?:
|
|
4
|
-
id: string;
|
|
5
|
-
url: string;
|
|
6
|
-
label: string;
|
|
7
|
-
}[];
|
|
8
|
+
autoCompleteResults?: SearchResult[];
|
|
8
9
|
isLoading?: boolean;
|
|
9
10
|
children?: React.ReactNode;
|
|
10
11
|
loadingText?: string;
|
|
12
|
+
onKeyDown?: (event: React.KeyboardEvent<HTMLAnchorElement>) => void;
|
|
11
13
|
}
|
|
12
|
-
declare const SearchResults: ({ autoCompleteResults, isLoading, children, loadingText, }: React.PropsWithChildren<SearchResultsProps>) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare const SearchResults: ({ autoCompleteResults, isLoading, children, loadingText, onKeyDown, }: React.PropsWithChildren<SearchResultsProps>) => import("react/jsx-runtime").JSX.Element;
|
|
13
15
|
export default SearchResults;
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { px as
|
|
3
|
-
import
|
|
4
|
-
const
|
|
5
|
-
autoCompleteResults:
|
|
1
|
+
import { jsx as r, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
import { px as s } from "../../../utils/index.js";
|
|
3
|
+
import d from "../../Link/Link.js";
|
|
4
|
+
const u = ({
|
|
5
|
+
autoCompleteResults: e = [],
|
|
6
6
|
isLoading: l,
|
|
7
|
-
children:
|
|
8
|
-
loadingText:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Array.isArray(
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
children: c,
|
|
8
|
+
loadingText: i = "Loading...",
|
|
9
|
+
onKeyDown: n
|
|
10
|
+
}) => {
|
|
11
|
+
const h = Array.isArray(e) && e.length > 0;
|
|
12
|
+
return /* @__PURE__ */ r("div", { className: `${s}-search__results`, children: /* @__PURE__ */ t("ul", { "data-testid": "search-results", className: `${s}-search__results-container`, children: [
|
|
13
|
+
l ? /* @__PURE__ */ r("li", { className: `${s}-search__result`, children: i }) : null,
|
|
14
|
+
h && e.map((a) => /* @__PURE__ */ r("li", { className: `${s}-search__result`, children: /* @__PURE__ */ r(d, { href: a.url, onKeyDown: n, children: /* @__PURE__ */ r("p", { children: a.label }) }) }, a.id)),
|
|
15
|
+
c
|
|
16
|
+
] }) });
|
|
17
|
+
};
|
|
14
18
|
export {
|
|
15
|
-
|
|
19
|
+
u as default
|
|
16
20
|
};
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
export declare enum TextVariants {
|
|
2
|
-
display0 = "display0",
|
|
3
|
-
display1 = "display1",
|
|
4
|
-
display2 = "display2",
|
|
5
|
-
display3 = "display3",
|
|
6
|
-
display4 = "display4",
|
|
7
2
|
blockquote = "blockquote",
|
|
8
3
|
heading1 = "heading1",
|
|
9
4
|
heading2 = "heading2",
|
|
10
5
|
heading3 = "heading3",
|
|
11
6
|
heading4 = "heading4",
|
|
7
|
+
heading5 = "heading5",
|
|
12
8
|
title1 = "title1",
|
|
13
9
|
title2 = "title2",
|
|
14
10
|
title3 = "title3",
|
|
@@ -20,9 +16,10 @@ export declare enum TextVariants {
|
|
|
20
16
|
string2 = "string2",
|
|
21
17
|
string3 = "string3",
|
|
22
18
|
button = "button",
|
|
23
|
-
ctaLg = "ctaLg",
|
|
24
|
-
ctaSm = "ctaSm",
|
|
25
19
|
email = "email",
|
|
26
20
|
label = "label",
|
|
27
|
-
|
|
21
|
+
link = "link",
|
|
22
|
+
badge = "badge",
|
|
23
|
+
snwFlyoutLink = "snwFlyoutLink",
|
|
24
|
+
snwHeaderLink = "snwHeaderLink"
|
|
28
25
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var l = /* @__PURE__ */ ((d) => (d.
|
|
1
|
+
var l = /* @__PURE__ */ ((d) => (d.blockquote = "blockquote", d.heading1 = "heading1", d.heading2 = "heading2", d.heading3 = "heading3", d.heading4 = "heading4", d.heading5 = "heading5", d.title1 = "title1", d.title2 = "title2", d.title3 = "title3", d.title4 = "title4", d.body1 = "body1", d.body2 = "body2", d.body3 = "body3", d.string1 = "string1", d.string2 = "string2", d.string3 = "string3", d.button = "button", d.email = "email", d.label = "label", d.link = "link", d.badge = "badge", d.snwFlyoutLink = "snwFlyoutLink", d.snwHeaderLink = "snwHeaderLink", d))(l || {});
|
|
2
2
|
export {
|
|
3
3
|
l as TextVariants
|
|
4
4
|
};
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import { px as
|
|
1
|
+
import { px as r } from "../../utils/index.js";
|
|
2
2
|
import { TextVariants as t } from "./types.js";
|
|
3
|
-
const
|
|
4
|
-
const r = e.replace("ctaSm", "cta-sm").replace("ctaLg", "cta-lg");
|
|
5
|
-
return `${s}-text--${r.charAt(0).toLowerCase() + r.slice(1)}`;
|
|
6
|
-
}, c = (e = t.body1) => [t.display0, t.display1].includes(e) ? "h1" : [t.display2, t.display3, t.display4].includes(e) ? "h3" : e === t.blockquote ? "blockquote" : e.includes("body") ? "p" : e === t.label ? "label" : e.includes("heading") ? `h${isNaN(parseInt(e.slice(-1))) ? 3 : parseInt(e.slice(-1))}` : "span";
|
|
3
|
+
const o = (e = t.body1) => `${r}-text--${e.charAt(0).toLowerCase() + e.slice(1)}`, u = (e = t.body1) => e === t.blockquote ? "blockquote" : e.includes("body") ? "p" : e.includes("string") || e.includes("title") ? "span" : e === t.label ? "label" : e.includes("heading") ? `h${isNaN(parseInt(e.slice(-1))) ? 3 : parseInt(e.slice(-1))}` : "span";
|
|
7
4
|
export {
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
u as determineDefaultTextElement,
|
|
6
|
+
o as determineTextClassName
|
|
10
7
|
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
export interface VideoProps extends ComponentProps<'div'> {
|
|
3
|
+
/**
|
|
4
|
+
* Aspect ratio of the video
|
|
5
|
+
* Defaults to 1.777 (16/9)
|
|
6
|
+
*/
|
|
7
|
+
aspectRatio?: number;
|
|
8
|
+
/**
|
|
9
|
+
* The url of the video source
|
|
10
|
+
*/
|
|
11
|
+
videoSource: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* ## Overview
|
|
15
|
+
*
|
|
16
|
+
* A component for rendering a video iframe with a specified aspect ratio and height.
|
|
17
|
+
*
|
|
18
|
+
* [Figma Link](https://www.figma.com/design/Hp2FyltbOmRxTuw9kSwBAd/EPIC-About-Us?node-id=1103-5014)
|
|
19
|
+
*
|
|
20
|
+
* [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-video--overview)
|
|
21
|
+
*/
|
|
22
|
+
declare const Video: ({ aspectRatio, className, videoSource, ...props }: VideoProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export default Video;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { getCommonProps as d } from "../../utils/index.js";
|
|
3
|
+
import l from "../../node_modules/classnames/index.js";
|
|
4
|
+
const u = ({ aspectRatio: s = 16 / 9, className: o, videoSource: m, ...e }) => {
|
|
5
|
+
const { className: a, "data-testid": r, ...i } = d(e, "Video"), c = {
|
|
6
|
+
className: l(a, o),
|
|
7
|
+
"data-testid": r,
|
|
8
|
+
style: { "--aspect-ratio": s },
|
|
9
|
+
...i,
|
|
10
|
+
...e
|
|
11
|
+
};
|
|
12
|
+
return /* @__PURE__ */ t("div", { ...c, children: /* @__PURE__ */ t(
|
|
13
|
+
"iframe",
|
|
14
|
+
{
|
|
15
|
+
"data-testid": `${r}-iframe`,
|
|
16
|
+
className: `${a}__iframe`,
|
|
17
|
+
src: m,
|
|
18
|
+
allowFullScreen: !0,
|
|
19
|
+
allow: "encrypted-media",
|
|
20
|
+
referrerPolicy: "no-referrer"
|
|
21
|
+
}
|
|
22
|
+
) });
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
u as default
|
|
26
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export { default as NavigationList, type NavigationListProps, } from './componen
|
|
|
14
14
|
export { default as HeroBanner, type HeroBannerProps } from './components/HeroBanner/HeroBanner';
|
|
15
15
|
export { default as Input, type InputProps } from './components/Input/Input';
|
|
16
16
|
export { default as Link, type LinkProps } from './components/Link/Link';
|
|
17
|
-
export { LinkVariants } from './components/Link/
|
|
17
|
+
export { LinkVariants } from './components/Link/types';
|
|
18
18
|
export { default as LinkBlock, type LinkBlockProps } from './components/LinkBlock/LinkBlock';
|
|
19
19
|
export { default as LinkList, type LinkListProps } from './components/LinkList/LinkList';
|
|
20
20
|
export { default as Row, type RowProps } from './components/Row/Row';
|
|
@@ -36,3 +36,4 @@ export { default as UserManagement, type UserManagementProps } from './component
|
|
|
36
36
|
export { AuthState } from './components/UserManagement/types';
|
|
37
37
|
export * from './types/commonTypes';
|
|
38
38
|
export { Breadcrumb, type BreadcrumbProps } from './components/Breadcrumb';
|
|
39
|
+
export { default as Video, type VideoProps } from './components/Video/Video';
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { default as g } from "./pages/Page.js";
|
|
|
3
3
|
import { default as S } from "./components/Button/Button.js";
|
|
4
4
|
import { ButtonVariants as I } from "./components/Button/types.js";
|
|
5
5
|
import { default as P } from "./components/IconButton/IconButton.js";
|
|
6
|
-
import { default as
|
|
6
|
+
import { default as k } from "./components/ErrorBoundary/ErrorBoundary.js";
|
|
7
7
|
import { default as T } from "./components/Footer/Footer.js";
|
|
8
8
|
import { Grid as h } from "./components/Grid/Grid.js";
|
|
9
9
|
import { default as w } from "./components/Header/Header.js";
|
|
@@ -14,7 +14,7 @@ import { default as R } from "./components/Navigation/NavigationList/NavigationL
|
|
|
14
14
|
import { default as z } from "./components/HeroBanner/HeroBanner.js";
|
|
15
15
|
import { default as E } from "./components/Input/Input.js";
|
|
16
16
|
import { default as Y } from "./components/Link/Link.js";
|
|
17
|
-
import { LinkVariants as q } from "./components/Link/
|
|
17
|
+
import { LinkVariants as q } from "./components/Link/types.js";
|
|
18
18
|
import { default as K } from "./components/LinkBlock/LinkBlock.js";
|
|
19
19
|
import { default as W } from "./components/LinkList/LinkList.js";
|
|
20
20
|
import { default as Z } from "./components/Row/Row.js";
|
|
@@ -30,7 +30,7 @@ import { default as ge } from "./components/ViewingsList/ViewingsList.js";
|
|
|
30
30
|
import { default as Se } from "./components/Modal/Modal.js";
|
|
31
31
|
import { default as Ie } from "./components/Drawer/Drawer.js";
|
|
32
32
|
import { default as Pe } from "./components/ViewingsList/StatefulViewingsList.js";
|
|
33
|
-
import { TextVariants as
|
|
33
|
+
import { TextVariants as ke } from "./components/Text/types.js";
|
|
34
34
|
import { default as Te } from "./components/Text/Text.js";
|
|
35
35
|
import { default as he } from "./components/Accordion/Accordion.js";
|
|
36
36
|
import { default as we } from "./components/Accordion/AccordionItem.js";
|
|
@@ -40,6 +40,7 @@ import { SupportedLanguages as Me } from "./types/commonTypes.js";
|
|
|
40
40
|
import { default as Re } from "./components/Breadcrumb/Breadcrumb.js";
|
|
41
41
|
import "react/jsx-runtime";
|
|
42
42
|
import "./node_modules/classnames/index.js";
|
|
43
|
+
import { default as ze } from "./components/Video/Video.js";
|
|
43
44
|
export {
|
|
44
45
|
he as Accordion,
|
|
45
46
|
we as AccordionItem,
|
|
@@ -48,7 +49,7 @@ export {
|
|
|
48
49
|
S as Button,
|
|
49
50
|
I as ButtonVariants,
|
|
50
51
|
Ie as Drawer,
|
|
51
|
-
|
|
52
|
+
k as ErrorBoundary,
|
|
52
53
|
T as Footer,
|
|
53
54
|
h as Grid,
|
|
54
55
|
$ as GridItem,
|
|
@@ -78,8 +79,9 @@ export {
|
|
|
78
79
|
ie as SubscriptionState,
|
|
79
80
|
Me as SupportedLanguages,
|
|
80
81
|
Te as Text,
|
|
81
|
-
|
|
82
|
+
ke as TextVariants,
|
|
82
83
|
Ce as UserManagement,
|
|
84
|
+
ze as Video,
|
|
83
85
|
ge as ViewingsList,
|
|
84
86
|
f as defaultYear,
|
|
85
87
|
m as emailValidation,
|
package/dist/scss/_type.scss
CHANGED
|
@@ -7,6 +7,10 @@
|
|
|
7
7
|
font-weight: 400;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
@mixin titleText {
|
|
11
|
+
@include DistinctDisplay;
|
|
12
|
+
}
|
|
13
|
+
|
|
10
14
|
@mixin bodyText {
|
|
11
15
|
color: $soft-black;
|
|
12
16
|
}
|
|
@@ -33,7 +37,7 @@
|
|
|
33
37
|
font-family: Distinct, sans-serif;
|
|
34
38
|
}
|
|
35
39
|
|
|
36
|
-
@mixin underline($padding: 0, $width: 0.0625rem, $color: $
|
|
40
|
+
@mixin underline($padding: 0, $width: 0.0625rem, $color: $pure-black) {
|
|
37
41
|
border-bottom: $width solid $color;
|
|
38
42
|
padding-bottom: $padding;
|
|
39
43
|
}
|
|
@@ -44,8 +48,9 @@
|
|
|
44
48
|
$transform-style: capitalize,
|
|
45
49
|
$line-height: $heading-line-height-size1
|
|
46
50
|
) {
|
|
51
|
+
@include DistinctDisplay;
|
|
52
|
+
|
|
47
53
|
color: $color;
|
|
48
|
-
font-family: DistinctDisplay, sans-serif;
|
|
49
54
|
font-size: $size;
|
|
50
55
|
font-weight: 400;
|
|
51
56
|
line-height: $line-height;
|
|
@@ -54,49 +59,32 @@
|
|
|
54
59
|
}
|
|
55
60
|
|
|
56
61
|
@mixin pText($size: $body-size1, $color: $pure-black, $line-height: 1.5) {
|
|
62
|
+
@include Montserrat;
|
|
63
|
+
|
|
57
64
|
color: $color;
|
|
58
|
-
font-family: Montserrat, sans-serif;
|
|
59
65
|
font-size: $size;
|
|
60
66
|
line-height: $line-height;
|
|
61
67
|
}
|
|
62
68
|
|
|
63
69
|
@mixin labelText($label) {
|
|
64
|
-
|
|
70
|
+
@include Montserrat;
|
|
65
71
|
|
|
66
72
|
@if $label == 'link' {
|
|
67
|
-
|
|
68
|
-
font-size: $link-button-label-size;
|
|
69
|
-
line-height: $link-label-line-height;
|
|
73
|
+
font-size: $link-label-size;
|
|
70
74
|
font-weight: 600;
|
|
71
75
|
letter-spacing: 1px;
|
|
76
|
+
line-height: $link-label-line-height;
|
|
72
77
|
text-transform: uppercase;
|
|
73
|
-
text-decoration: underline;
|
|
74
78
|
}
|
|
75
79
|
|
|
76
80
|
@if $label == 'button' {
|
|
77
|
-
font-size: $
|
|
78
|
-
line-height: $button-label-line-height;
|
|
81
|
+
font-size: $button-label-size;
|
|
79
82
|
font-weight: 600;
|
|
80
83
|
letter-spacing: 0;
|
|
84
|
+
line-height: $button-label-line-height;
|
|
81
85
|
text-transform: capitalize;
|
|
82
86
|
}
|
|
83
87
|
|
|
84
|
-
@if $label == 'cta-sm' {
|
|
85
|
-
font-size: $cta-sm-label-size;
|
|
86
|
-
font-weight: 600;
|
|
87
|
-
letter-spacing: 0.0625rem;
|
|
88
|
-
line-height: 1.25;
|
|
89
|
-
text-transform: uppercase;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
@if $label == 'cta-lg' {
|
|
93
|
-
font-size: $cta-lg-label-size;
|
|
94
|
-
font-weight: 700;
|
|
95
|
-
letter-spacing: 0.125rem;
|
|
96
|
-
line-height: 1.25;
|
|
97
|
-
text-transform: uppercase;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
88
|
@if $label == 'email' {
|
|
101
89
|
font-size: $email-label-size;
|
|
102
90
|
font-weight: 600;
|
|
@@ -114,9 +102,9 @@
|
|
|
114
102
|
|
|
115
103
|
@if $label == 'badge' {
|
|
116
104
|
font-size: $badge-label-size;
|
|
117
|
-
line-height: $badge-label-line-height;
|
|
118
105
|
font-weight: 500;
|
|
119
106
|
letter-spacing: 0;
|
|
107
|
+
line-height: $badge-label-line-height;
|
|
120
108
|
text-transform: uppercase;
|
|
121
109
|
}
|
|
122
110
|
}
|
|
@@ -131,14 +119,6 @@
|
|
|
131
119
|
@include labelText($link);
|
|
132
120
|
}
|
|
133
121
|
|
|
134
|
-
@if $token == 'cta-sm' {
|
|
135
|
-
@include labelText($cta-sm);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
@if $token == 'cta-lg' {
|
|
139
|
-
@include labelText($cta-lg);
|
|
140
|
-
}
|
|
141
|
-
|
|
142
122
|
@if $token == 'email' {
|
|
143
123
|
@include labelText($email);
|
|
144
124
|
}
|
|
@@ -151,27 +131,6 @@
|
|
|
151
131
|
@include labelText($badge);
|
|
152
132
|
}
|
|
153
133
|
|
|
154
|
-
// Displays
|
|
155
|
-
@if $token == 'display0' {
|
|
156
|
-
@include hText($display-size0, null, uppercase);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
@if $token == 'display1' {
|
|
160
|
-
@include hText($display-size1, null, uppercase);
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
@if $token == 'display2' {
|
|
164
|
-
@include hText($display-size2, null, uppercase);
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
@if $token == 'display3' {
|
|
168
|
-
@include hText($display-size3, null, uppercase);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
@if $token == 'display4' {
|
|
172
|
-
@include hText($display-size4, null, uppercase);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
134
|
// Headings
|
|
176
135
|
@if $token == 'blockquote' {
|
|
177
136
|
@include hText(
|
|
@@ -198,20 +157,25 @@
|
|
|
198
157
|
@include hText($heading-size4, $line-height: $heading-line-height-size4, $transform-style: capitalize);
|
|
199
158
|
}
|
|
200
159
|
|
|
160
|
+
@if $token == 'heading5' {
|
|
161
|
+
@include hText($heading-size5, $line-height: $heading-line-height-size5, $transform-style: capitalize);
|
|
162
|
+
}
|
|
163
|
+
|
|
201
164
|
@if $token == 'title1' {
|
|
202
165
|
@include hText($heading-size1, $line-height: $heading-line-height-size1, $transform-style: uppercase);
|
|
203
166
|
}
|
|
204
167
|
|
|
168
|
+
// the title2 token skips heading 2 because it's the same size currently as heading1
|
|
205
169
|
@if $token == 'title2' {
|
|
206
|
-
@include hText($heading-
|
|
170
|
+
@include hText($heading-size3, $line-height: $heading-line-height-size3, $transform-style: uppercase);
|
|
207
171
|
}
|
|
208
172
|
|
|
209
173
|
@if $token == 'title3' {
|
|
210
|
-
@include hText($heading-
|
|
174
|
+
@include hText($heading-size4, $line-height: $heading-line-height-size4, $transform-style: uppercase);
|
|
211
175
|
}
|
|
212
176
|
|
|
213
177
|
@if $token == 'title4' {
|
|
214
|
-
@include hText($heading-
|
|
178
|
+
@include hText($heading-size5, $line-height: $heading-line-height-size5, $transform-style: uppercase);
|
|
215
179
|
}
|
|
216
180
|
|
|
217
181
|
// Body
|
|
@@ -242,18 +206,21 @@
|
|
|
242
206
|
|
|
243
207
|
// SNW
|
|
244
208
|
@if $token == 'snwHeaderLink' {
|
|
245
|
-
|
|
209
|
+
@include DistinctDisplay;
|
|
210
|
+
|
|
211
|
+
font-size: $snw-header-link-size;
|
|
246
212
|
font-weight: 400;
|
|
247
213
|
letter-spacing: 1px;
|
|
248
|
-
font-size: $snw-header-link-size;
|
|
249
214
|
line-height: $snw-header-link-line-height;
|
|
250
215
|
text-transform: uppercase;
|
|
251
216
|
}
|
|
252
217
|
|
|
253
218
|
@if $token == 'snwFlyoutLink' {
|
|
219
|
+
@include Montserrat;
|
|
220
|
+
|
|
221
|
+
font-size: $snw-flyout-link-size;
|
|
254
222
|
font-weight: 400;
|
|
255
223
|
letter-spacing: 1px;
|
|
256
|
-
font-size: $snw-flyout-link-size;
|
|
257
224
|
line-height: $snw-flyout-link-line-height;
|
|
258
225
|
text-transform: capitalize;
|
|
259
226
|
}
|