@phillips/seldon 1.79.3 → 1.80.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/components/Text/types.d.ts +3 -1
- package/dist/components/Text/types.js +2 -2
- package/dist/components/Text/utils.js +6 -3
- package/dist/patterns/HeroBanner/HeroBanner.d.ts +5 -1
- package/dist/patterns/HeroBanner/HeroBanner.js +24 -23
- package/dist/patterns/HeroBanner/HeroBanner.stories.d.ts +1 -1
- package/dist/scss/_type.scss +12 -0
- package/dist/scss/_vars.scss +17 -1
- package/dist/scss/components/Accordion/_accordion.scss +2 -2
- package/dist/scss/components/Navigation/NavigationList/_navigationList.scss +1 -1
- package/dist/scss/patterns/HeroBanner/_heroBanner.scss +11 -12
- package/dist/scss/site-furniture/Header/_header.scss +1 -6
- package/dist/site-furniture/Header/Header.js +4 -4
- package/package.json +1 -1
|
@@ -21,5 +21,7 @@ export declare enum TextVariants {
|
|
|
21
21
|
link = "link",
|
|
22
22
|
badge = "badge",
|
|
23
23
|
snwFlyoutLink = "snwFlyoutLink",
|
|
24
|
-
snwHeaderLink = "snwHeaderLink"
|
|
24
|
+
snwHeaderLink = "snwHeaderLink",
|
|
25
|
+
snwHeadingHero1 = "snwHeadingHero1",
|
|
26
|
+
snwHeadingHero2 = "snwHeadingHero2"
|
|
25
27
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var g = /* @__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.snwHeadingHero1 = "snwHeadingHero1", d.snwHeadingHero2 = "snwHeadingHero2", d))(g || {});
|
|
2
2
|
export {
|
|
3
|
-
|
|
3
|
+
g as TextVariants
|
|
4
4
|
};
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { px as
|
|
1
|
+
import { px as s } from "../../utils/index.js";
|
|
2
2
|
import { TextVariants as t } from "./types.js";
|
|
3
|
-
const
|
|
3
|
+
const i = (e = t.body1) => `${s}-text--${e.charAt(0).toLowerCase() + e.slice(1)}`, u = (e = t.body1) => {
|
|
4
|
+
const r = e.toLowerCase();
|
|
5
|
+
return e === t.blockquote ? "blockquote" : e.includes("body") ? "p" : e.includes("string") || e.includes("title") ? "span" : e === t.label ? "label" : r.includes("heading") ? `h${isNaN(parseInt(e.slice(-1))) ? 3 : parseInt(e.slice(-1))}` : "span";
|
|
6
|
+
};
|
|
4
7
|
export {
|
|
5
8
|
u as determineDefaultTextElement,
|
|
6
|
-
|
|
9
|
+
i as determineTextClassName
|
|
7
10
|
};
|
|
@@ -24,6 +24,10 @@ export interface HeroBannerProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
24
24
|
* What background image or color to use
|
|
25
25
|
*/
|
|
26
26
|
background?: string;
|
|
27
|
+
/**
|
|
28
|
+
* What gradient to use
|
|
29
|
+
*/
|
|
30
|
+
gradient?: string;
|
|
27
31
|
/**
|
|
28
32
|
* Unique id for component testing
|
|
29
33
|
*/
|
|
@@ -38,5 +42,5 @@ export interface HeroBannerProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
38
42
|
*
|
|
39
43
|
* [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-herobanner--overview)
|
|
40
44
|
*/
|
|
41
|
-
declare const HeroBanner: ({ prehead, date, headerText, subHeadText, association, background, className, ...props }: HeroBannerProps) => import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
declare const HeroBanner: ({ prehead, date, headerText, subHeadText, association, background, gradient, className, ...props }: HeroBannerProps) => import("react/jsx-runtime").JSX.Element;
|
|
42
46
|
export default HeroBanner;
|
|
@@ -1,38 +1,39 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { getCommonProps as
|
|
3
|
-
import
|
|
4
|
-
import { TextVariants as
|
|
5
|
-
import
|
|
6
|
-
const
|
|
7
|
-
prehead:
|
|
8
|
-
date:
|
|
1
|
+
import { jsx as r, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { getCommonProps as f } from "../../utils/index.js";
|
|
3
|
+
import u from "../../node_modules/classnames/index.js";
|
|
4
|
+
import { TextVariants as i } from "../../components/Text/types.js";
|
|
5
|
+
import c from "../../components/Text/Text.js";
|
|
6
|
+
const w = ({
|
|
7
|
+
prehead: a,
|
|
8
|
+
date: e,
|
|
9
9
|
headerText: t,
|
|
10
|
-
subHeadText:
|
|
10
|
+
subHeadText: l,
|
|
11
11
|
association: s,
|
|
12
|
-
background:
|
|
12
|
+
background: d,
|
|
13
|
+
gradient: p = "linear-gradient(rgba(0, 0, 0, 50%), rgba(0, 0, 0, 50%))",
|
|
13
14
|
className: h,
|
|
14
15
|
...o
|
|
15
16
|
}) => {
|
|
16
|
-
const { className:
|
|
17
|
-
return /* @__PURE__ */
|
|
17
|
+
const { className: n, ...g } = f(o, "HeroBanner");
|
|
18
|
+
return /* @__PURE__ */ r(
|
|
18
19
|
"header",
|
|
19
20
|
{
|
|
20
|
-
...
|
|
21
|
-
className:
|
|
22
|
-
style: { "--background": p },
|
|
21
|
+
...g,
|
|
22
|
+
className: u(n, h),
|
|
23
|
+
style: { "--background": d, "--gradient": p },
|
|
23
24
|
...o,
|
|
24
|
-
children: /* @__PURE__ */ m("span", { className: `${
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
children: /* @__PURE__ */ m("span", { className: `${n}__content-wrapper`, children: [
|
|
26
|
+
a || e ? /* @__PURE__ */ m("p", { className: `${n}__pre-head`, children: [
|
|
27
|
+
a ? /* @__PURE__ */ r("span", { children: a }) : null,
|
|
28
|
+
e ? /* @__PURE__ */ r("span", { children: e }) : null
|
|
28
29
|
] }) : null,
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
-
|
|
31
|
-
s ? /* @__PURE__ */
|
|
30
|
+
/* @__PURE__ */ r(c, { variant: i.snwHeadingHero1, children: t }),
|
|
31
|
+
l ? /* @__PURE__ */ r(c, { variant: i.snwHeadingHero2, children: l }) : null,
|
|
32
|
+
s ? /* @__PURE__ */ r("p", { className: `${n}__after-head`, children: s }) : null
|
|
32
33
|
] })
|
|
33
34
|
}
|
|
34
35
|
);
|
|
35
36
|
};
|
|
36
37
|
export {
|
|
37
|
-
|
|
38
|
+
w as default
|
|
38
39
|
};
|
|
@@ -2,7 +2,7 @@ import { StoryObj } from '@storybook/react';
|
|
|
2
2
|
import { HeroBannerProps } from './HeroBanner';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: ({ prehead, date, headerText, subHeadText, association, background, className, ...props }: HeroBannerProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
component: ({ prehead, date, headerText, subHeadText, association, background, gradient, className, ...props }: HeroBannerProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
};
|
|
7
7
|
export default meta;
|
|
8
8
|
type Story = StoryObj<typeof meta>;
|
package/dist/scss/_type.scss
CHANGED
|
@@ -223,4 +223,16 @@
|
|
|
223
223
|
line-height: $snw-flyout-link-line-height;
|
|
224
224
|
text-transform: capitalize;
|
|
225
225
|
}
|
|
226
|
+
|
|
227
|
+
@if $token == 'snwHeadingHero1' {
|
|
228
|
+
@include hText($snw-heading-hero-size1, $line-height: $snw-heading-hero-line-height1, $transform-style: uppercase);
|
|
229
|
+
|
|
230
|
+
text-align: center;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
@if $token == 'snwHeadingHero2' {
|
|
234
|
+
@include hText($snw-heading-hero-size2, $line-height: $snw-heading-hero-line-height2, $transform-style: uppercase);
|
|
235
|
+
|
|
236
|
+
text-align: center;
|
|
237
|
+
}
|
|
226
238
|
}
|
package/dist/scss/_vars.scss
CHANGED
|
@@ -98,9 +98,11 @@ $string2: 'string2';
|
|
|
98
98
|
$string3: 'string3';
|
|
99
99
|
$snwHeaderLink: 'snwHeaderLink';
|
|
100
100
|
$snwFlyoutLink: 'snwFlyoutLink';
|
|
101
|
+
$snwHeadingHero1: 'snwHeadingHero1';
|
|
102
|
+
$snwHeadingHero2: 'snwHeadingHero2';
|
|
101
103
|
$text-tokens: $button, $link, $email, $label, $badge, $blockquote, $heading1, $heading2, $heading3, $heading4, $heading5,
|
|
102
104
|
$title1, $title2, $title3, $title4, $body1, $body2, $body3, $string1, $string2, $string3, $snwFlyoutLink,
|
|
103
|
-
$snwHeaderLink;
|
|
105
|
+
$snwHeaderLink, $snwHeadingHero1, $snwHeadingHero2;
|
|
104
106
|
|
|
105
107
|
////////////////////////
|
|
106
108
|
/// Breakpoint TOKENS to be used for min-width comparisons, make sure they match BREAKPOINTS in constants.ts
|
|
@@ -153,6 +155,10 @@ $breakpoint-xl: 1801px;
|
|
|
153
155
|
--snw-header-link-line-height: 1.5rem;
|
|
154
156
|
--snw-flyout-link-size: 1rem;
|
|
155
157
|
--snw-flyout-link-line-height: 1.75rem;
|
|
158
|
+
--snw-heading-hero-size1: 2rem;
|
|
159
|
+
--snw-heading-hero-line-height-size1: 2.375rem;
|
|
160
|
+
--snw-heading-hero-size2: 1.625rem;
|
|
161
|
+
--snw-heading-hero-line-height-size2: 1.9375rem;
|
|
156
162
|
|
|
157
163
|
@media (min-width: $breakpoint-md) {
|
|
158
164
|
--quote-size: 1.75rem;
|
|
@@ -192,6 +198,8 @@ $breakpoint-xl: 1801px;
|
|
|
192
198
|
--snw-header-link-line-height: 1.5rem;
|
|
193
199
|
--snw-flyout-link-size: 1rem;
|
|
194
200
|
--snw-flyout-link-line-height: 1.875rem;
|
|
201
|
+
--snw-heading-hero-size1: 2.375rem;
|
|
202
|
+
--snw-heading-hero-line-height-size1: 2.875rem;
|
|
195
203
|
}
|
|
196
204
|
|
|
197
205
|
@media (min-width: $breakpoint-xl) {
|
|
@@ -283,10 +291,18 @@ $snw-header-link-size: var(--snw-header-link-size);
|
|
|
283
291
|
$snw-header-link-line-height: var(--snw-header-link-line-height);
|
|
284
292
|
$snw-flyout-link-size: var(--snw-flyout-link-size);
|
|
285
293
|
$snw-flyout-link-line-height: var(--snw-flyout-link-line-height);
|
|
294
|
+
$snw-heading-hero-size1: var(--snw-heading-hero-size1);
|
|
295
|
+
$snw-heading-hero-line-height1: var(--snw-heading-hero-line-height-size1);
|
|
296
|
+
$snw-heading-hero-size2: var(--snw-heading-hero-size2);
|
|
297
|
+
$snw-heading-hero-line-height2: var(--snw-heading-hero-line-height-size2);
|
|
286
298
|
|
|
287
299
|
////////////////////////
|
|
288
300
|
/// SPACING TOKENS:
|
|
289
301
|
///////////////////////
|
|
302
|
+
|
|
303
|
+
// SNOWFLAKES
|
|
304
|
+
$snowflake-menu-padding: 1.25rem;
|
|
305
|
+
|
|
290
306
|
/* stylelint-disable-next-line no-duplicate-selectors */
|
|
291
307
|
:root {
|
|
292
308
|
--spacing-micro: 0.25rem;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
width: 100%;
|
|
10
10
|
|
|
11
11
|
&--large {
|
|
12
|
-
padding: $
|
|
12
|
+
padding: $snowflake-menu-padding 0;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
svg {
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
padding: $spacing-sm 0;
|
|
104
104
|
|
|
105
105
|
&--large {
|
|
106
|
-
padding: $
|
|
106
|
+
padding: $snowflake-menu-padding 0;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
&--hoverable {
|
|
@@ -70,7 +70,7 @@ $top-transition: top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
|
70
70
|
.#{$px}-link--snwHeaderLink {
|
|
71
71
|
border-bottom: 1px solid $light-gray;
|
|
72
72
|
flex-wrap: wrap;
|
|
73
|
-
padding: $
|
|
73
|
+
padding: $snowflake-menu-padding 0;
|
|
74
74
|
}
|
|
75
75
|
.#{$px}-link--snwFlyoutLink {
|
|
76
76
|
padding: 0;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
.#{$px}-hero-banner {
|
|
4
4
|
align-items: center;
|
|
5
|
-
background:
|
|
5
|
+
background: var(--gradient), var(--background);
|
|
6
6
|
background-position: center center;
|
|
7
7
|
background-repeat: no-repeat;
|
|
8
8
|
background-size: cover;
|
|
@@ -11,19 +11,21 @@
|
|
|
11
11
|
justify-content: center;
|
|
12
12
|
min-height: 25rem;
|
|
13
13
|
padding: 1rem;
|
|
14
|
+
text-transform: uppercase;
|
|
14
15
|
width: 100%;
|
|
15
16
|
|
|
16
17
|
@include media($size-md, $type: 'max') {
|
|
17
18
|
align-items: center;
|
|
18
19
|
align-self: stretch;
|
|
19
20
|
background: transparent;
|
|
21
|
+
background-color: $pure-black;
|
|
20
22
|
flex-direction: column;
|
|
21
23
|
gap: 1.875rem;
|
|
22
24
|
min-height: unset;
|
|
23
|
-
padding: 1.875rem 0
|
|
25
|
+
padding: 1.875rem 0.9375rem;
|
|
24
26
|
|
|
25
|
-
&::
|
|
26
|
-
background: var(--background);
|
|
27
|
+
&::before {
|
|
28
|
+
background: var(--gradient), var(--background);
|
|
27
29
|
background-position: center center;
|
|
28
30
|
background-repeat: no-repeat;
|
|
29
31
|
background-size: cover;
|
|
@@ -38,19 +40,11 @@
|
|
|
38
40
|
margin: 0;
|
|
39
41
|
}
|
|
40
42
|
|
|
41
|
-
p {
|
|
42
|
-
margin: 1.875rem 0;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
43
|
h1,
|
|
46
44
|
h2,
|
|
47
45
|
p {
|
|
48
46
|
color: $pure-white;
|
|
49
47
|
text-align: center;
|
|
50
|
-
|
|
51
|
-
@include media($size-md, $type: 'max') {
|
|
52
|
-
color: $pure-black;
|
|
53
|
-
}
|
|
54
48
|
}
|
|
55
49
|
|
|
56
50
|
p {
|
|
@@ -72,6 +66,7 @@
|
|
|
72
66
|
display: flex;
|
|
73
67
|
font-size: 0.75rem;
|
|
74
68
|
gap: 1.875rem;
|
|
69
|
+
padding-bottom: 1.875rem;
|
|
75
70
|
|
|
76
71
|
@include media($size-md) {
|
|
77
72
|
font-size: 0.875rem;
|
|
@@ -83,4 +78,8 @@
|
|
|
83
78
|
gap: 1rem;
|
|
84
79
|
}
|
|
85
80
|
}
|
|
81
|
+
|
|
82
|
+
& .#{$px}-hero-banner__after-head {
|
|
83
|
+
padding-top: 1.875rem;
|
|
84
|
+
}
|
|
86
85
|
}
|
|
@@ -77,17 +77,12 @@
|
|
|
77
77
|
padding-top: 6px; // small adjustment to center the logo
|
|
78
78
|
|
|
79
79
|
svg {
|
|
80
|
-
height:
|
|
80
|
+
height: 25.73px; // 25.73px is the height of the logo's container to make logo 20px
|
|
81
81
|
width: 100%;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
@include isHeaderDesktop {
|
|
85
85
|
padding-top: 0;
|
|
86
|
-
|
|
87
|
-
svg {
|
|
88
|
-
height: 28px;
|
|
89
|
-
width: 100%;
|
|
90
|
-
}
|
|
91
86
|
}
|
|
92
87
|
}
|
|
93
88
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as o, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import l, { createContext as T, forwardRef as P, useState as h } from "react";
|
|
3
3
|
import d from "../../node_modules/classnames/index.js";
|
|
4
|
-
import { findChildrenOfType as
|
|
4
|
+
import { findChildrenOfType as i, findChildrenExcludingTypes as j, px as e } from "../../utils/index.js";
|
|
5
5
|
import R from "../../assets/PhillipsLogo.svg.js";
|
|
6
6
|
import p from "../../patterns/UserManagement/UserManagement.js";
|
|
7
7
|
import g from "../../patterns/LanguageSelector/LanguageSelector.js";
|
|
@@ -10,7 +10,7 @@ import { defaultHeaderContext as w } from "./utils.js";
|
|
|
10
10
|
import { SSRMediaQuery as I } from "../../providers/SeldonProvider/utils.js";
|
|
11
11
|
const L = T(w), k = P(
|
|
12
12
|
({
|
|
13
|
-
logo:
|
|
13
|
+
logo: s = /* @__PURE__ */ a(R, {}),
|
|
14
14
|
logoHref: u = "/",
|
|
15
15
|
className: _,
|
|
16
16
|
children: r,
|
|
@@ -19,7 +19,7 @@ const L = T(w), k = P(
|
|
|
19
19
|
logoText: C = "Home Page",
|
|
20
20
|
...y
|
|
21
21
|
}, E) => {
|
|
22
|
-
const M =
|
|
22
|
+
const M = i(r, p), m = i(r, g), [c, $] = h(!1), b = i(r, f), N = j(r, [f, p, g]), [n, S] = h(!1), H = n ? x : v, O = function() {
|
|
23
23
|
S((t) => !t);
|
|
24
24
|
};
|
|
25
25
|
return /* @__PURE__ */ o("header", { ...y, className: d(`${e}-header`, _), ref: E, children: [
|
|
@@ -41,7 +41,7 @@ const L = T(w), k = P(
|
|
|
41
41
|
]
|
|
42
42
|
}
|
|
43
43
|
),
|
|
44
|
-
/* @__PURE__ */ a("h1", { "data-testid": "header-logo", className: `${e}-header__logo`, children: /* @__PURE__ */ a("a", { href: u, "aria-label": C, children: typeof
|
|
44
|
+
/* @__PURE__ */ a("h1", { "data-testid": "header-logo", className: `${e}-header__logo`, children: /* @__PURE__ */ a("a", { href: u, "aria-label": C, children: typeof s == "object" ? s : /* @__PURE__ */ a("img", { alt: "Phillips", "data-testid": "header-logo-img", src: s }) }) }),
|
|
45
45
|
M
|
|
46
46
|
] }),
|
|
47
47
|
/* @__PURE__ */ a("div", { className: d(`${e}-header__nav`, { [`${e}-header__nav--closed`]: !n }), children: /* @__PURE__ */ o(
|