@phillips/seldon 1.1.9 → 1.2.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/Button/Button.d.ts +31 -0
- package/dist/components/Header/Header.d.ts +11 -0
- package/dist/components/HeroBanner/HeroBanner.d.ts +32 -0
- package/dist/components/HeroBanner/HeroBanner.js +32 -0
- package/dist/fonts/Distinct-Display.woff +0 -0
- package/dist/fonts/Distinct-Display.woff2 +0 -0
- package/dist/fonts/Distinct-DisplayItalic.woff +0 -0
- package/dist/fonts/Distinct-DisplayItalic.woff2 +0 -0
- package/dist/fonts/Distinct-Italic.woff +0 -0
- package/dist/fonts/Distinct-Italic.woff2 +0 -0
- package/dist/fonts/Distinct-Text.woff +0 -0
- package/dist/fonts/Distinct-Text.woff2 +0 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +8 -6
- package/dist/pages/Page.d.ts +3 -0
- package/dist/scss/components/HeroBanner/_heroBanner.scss +61 -0
- package/dist/scss/styles.scss +3 -0
- package/dist/scss/utils/_typography.scss +38 -1
- package/dist/utils/index.d.ts +1 -0
- package/package.json +2 -4
- /package/dist/{vite.svg → assets/vite.svg} +0 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
interface ButtonProps {
|
|
2
|
+
/**
|
|
3
|
+
* Is this the principal call to action on the page?
|
|
4
|
+
*/
|
|
5
|
+
primary?: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* What background color to use
|
|
8
|
+
*/
|
|
9
|
+
backgroundColor?: string;
|
|
10
|
+
/**
|
|
11
|
+
* How large should the button be?
|
|
12
|
+
*/
|
|
13
|
+
size?: 'small' | 'medium' | 'large';
|
|
14
|
+
/**
|
|
15
|
+
* Button contents
|
|
16
|
+
*/
|
|
17
|
+
label: React.ReactElement | string;
|
|
18
|
+
/**
|
|
19
|
+
* Unique id for component
|
|
20
|
+
*/
|
|
21
|
+
id?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Optional click handler
|
|
24
|
+
*/
|
|
25
|
+
onClick?: () => void;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Primary UI component for user interaction
|
|
29
|
+
*/
|
|
30
|
+
declare const Button: ({ primary, size, backgroundColor, label, id, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export default Button;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type User = {
|
|
2
|
+
name: string;
|
|
3
|
+
};
|
|
4
|
+
interface HeaderProps {
|
|
5
|
+
user?: User;
|
|
6
|
+
onLogin: () => void;
|
|
7
|
+
onLogout: () => void;
|
|
8
|
+
onCreateAccount: () => void;
|
|
9
|
+
}
|
|
10
|
+
declare const Header: ({ user, onLogin, onLogout, onCreateAccount }: HeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default Header;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
interface HeroBannerProps {
|
|
2
|
+
/**
|
|
3
|
+
* informational text above the header (e.g. region label or "buy now")
|
|
4
|
+
*/
|
|
5
|
+
prehead?: string;
|
|
6
|
+
/**
|
|
7
|
+
* When is this sale taking place?
|
|
8
|
+
*/
|
|
9
|
+
date?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Main header text
|
|
12
|
+
*/
|
|
13
|
+
headerText: string;
|
|
14
|
+
/**
|
|
15
|
+
* Sub-head text
|
|
16
|
+
*/
|
|
17
|
+
subHeadText?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Is there an association related to this sale?
|
|
20
|
+
*/
|
|
21
|
+
association?: string;
|
|
22
|
+
/**
|
|
23
|
+
* What background image or color to use
|
|
24
|
+
*/
|
|
25
|
+
background?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Unique id for component
|
|
28
|
+
*/
|
|
29
|
+
id?: string;
|
|
30
|
+
}
|
|
31
|
+
declare const HeroBanner: ({ prehead, date, headerText, subHeadText, association, background, id }: HeroBannerProps) => import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export default HeroBanner;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsxs as e, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { px as p } from "../../utils/index.js";
|
|
3
|
+
const s = `${p}-hero-banner`, m = ({
|
|
4
|
+
prehead: l,
|
|
5
|
+
date: r,
|
|
6
|
+
headerText: a,
|
|
7
|
+
subHeadText: c,
|
|
8
|
+
association: h,
|
|
9
|
+
background: i,
|
|
10
|
+
id: o
|
|
11
|
+
}) => /* @__PURE__ */ e(
|
|
12
|
+
"header",
|
|
13
|
+
{
|
|
14
|
+
"data-testid": o ? `hero-banner-${o}` : "hero-banner",
|
|
15
|
+
className: s,
|
|
16
|
+
style: { "--background": i },
|
|
17
|
+
children: [
|
|
18
|
+
l || r ? /* @__PURE__ */ e("p", { className: `${s}__pre-head`, children: [
|
|
19
|
+
l ? /* @__PURE__ */ n("span", { children: l }) : null,
|
|
20
|
+
r ? /* @__PURE__ */ n("span", { children: r }) : null
|
|
21
|
+
] }) : null,
|
|
22
|
+
a ? /* @__PURE__ */ e("h1", { className: `${s}__heading`, children: [
|
|
23
|
+
a,
|
|
24
|
+
c ? /* @__PURE__ */ n("span", { children: c }) : null
|
|
25
|
+
] }) : null,
|
|
26
|
+
h ? /* @__PURE__ */ n("p", { children: h }) : null
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
export {
|
|
31
|
+
m as default
|
|
32
|
+
};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/index.d.ts
ADDED
package/dist/index.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
import { default as
|
|
3
|
-
import { default as d } from "./
|
|
1
|
+
import { default as r } from "./components/Button/Button.js";
|
|
2
|
+
import { default as t } from "./components/Header/Header.js";
|
|
3
|
+
import { default as d } from "./components/HeroBanner/HeroBanner.js";
|
|
4
|
+
import { default as l } from "./pages/Page.js";
|
|
4
5
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
d as
|
|
6
|
+
r as Button,
|
|
7
|
+
t as Header,
|
|
8
|
+
d as HeroBanner,
|
|
9
|
+
l as Page
|
|
8
10
|
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
@use '../../utils/vars' as *;
|
|
2
|
+
|
|
3
|
+
.#{$px}-hero-banner {
|
|
4
|
+
align-items: center;
|
|
5
|
+
background: var(--background);
|
|
6
|
+
background-repeat: no-repeat;
|
|
7
|
+
background-size: cover;
|
|
8
|
+
background-position: center center;
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-flow: column;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
min-height: 25rem;
|
|
13
|
+
padding: 1rem;
|
|
14
|
+
width: 100%;
|
|
15
|
+
|
|
16
|
+
h1,
|
|
17
|
+
h1 span,
|
|
18
|
+
p {
|
|
19
|
+
color: $pure-white;
|
|
20
|
+
font-weight: 400;
|
|
21
|
+
margin: 0;
|
|
22
|
+
text-transform: uppercase;
|
|
23
|
+
font-family: 'DistinctText';
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
p {
|
|
27
|
+
font-size: 0.875rem;
|
|
28
|
+
line-height: 1;
|
|
29
|
+
letter-spacing: 0.125rem;
|
|
30
|
+
text-align: center;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
& .#{$px}-hero-banner__pre-head {
|
|
34
|
+
align-items: flex-start;
|
|
35
|
+
display: flex;
|
|
36
|
+
font-size: 0.75rem;
|
|
37
|
+
gap: 1.875rem;
|
|
38
|
+
|
|
39
|
+
@media (min-width: 28.8125rem) {
|
|
40
|
+
font-size: 0.875rem;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
& .#{$px}-hero-banner__heading {
|
|
45
|
+
align-self: stretch;
|
|
46
|
+
display: flex;
|
|
47
|
+
flex-direction: column;
|
|
48
|
+
font-size: 2rem;
|
|
49
|
+
line-height: 1;
|
|
50
|
+
margin: 1.875rem 0;
|
|
51
|
+
text-align: center;
|
|
52
|
+
|
|
53
|
+
@media (min-width: 28.8125rem) {
|
|
54
|
+
font-size: 2.375rem;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
span {
|
|
58
|
+
font-size: 1.625rem;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
package/dist/scss/styles.scss
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
@use 'utils/vars';
|
|
2
|
+
// @TODO: add styles when we can do a site wide regressions QA
|
|
3
|
+
// @use 'utils/reset';
|
|
2
4
|
@use 'utils/typography';
|
|
3
5
|
@use 'components/Button/button';
|
|
4
6
|
@use 'components/Header/header';
|
|
7
|
+
@use 'components/HeroBanner/heroBanner';
|
|
5
8
|
@use 'pages/page';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@use './vars' as *;
|
|
2
2
|
|
|
3
3
|
body {
|
|
4
|
-
font-family: "
|
|
4
|
+
font-family: SeroWebPro,"Helvetica Neue",Helvetica,-apple-system,".SFNSText-Regular","San Francisco",BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Helvetica,Arial,sans-serif;
|
|
5
5
|
font-size: 16px;
|
|
6
6
|
margin: 0;
|
|
7
7
|
-webkit-font-smoothing: antialiased;
|
|
@@ -19,4 +19,41 @@ h4 {
|
|
|
19
19
|
|
|
20
20
|
p {
|
|
21
21
|
color: $soft-black;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** Fonts **/
|
|
25
|
+
@font-face {
|
|
26
|
+
font-family: 'DistinctDisplay';
|
|
27
|
+
src: url('../../fonts/Distinct-Display.woff') format('woff');
|
|
28
|
+
src: url('../../fonts/Distinct-Display.woff2') format('woff2');
|
|
29
|
+
}
|
|
30
|
+
@mixin DistinctDisplay {
|
|
31
|
+
font-family: $DistinctDisplay;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@font-face {
|
|
35
|
+
font-family: 'DistinctDisplayItalic';
|
|
36
|
+
src: url('../../fonts/Distinct-DisplayItalic.woff') format('woff');
|
|
37
|
+
src: url('../../fonts/Distinct-DisplayItalic.woff2') format('woff2');
|
|
38
|
+
}
|
|
39
|
+
@mixin DistinctDisplayItalic {
|
|
40
|
+
font-family: $DistinctDisplayItalic;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@font-face {
|
|
44
|
+
font-family: 'DistinctItalic';
|
|
45
|
+
src: url('../../fonts/Distinct-Italic.woff') format('woff');
|
|
46
|
+
src: url('../../fonts/Distinct-Italic.woff2') format('woff2');
|
|
47
|
+
}
|
|
48
|
+
@mixin DistinctItalic {
|
|
49
|
+
font-family: $DistinctItalic;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@font-face {
|
|
53
|
+
font-family: 'DistinctText';
|
|
54
|
+
src: url('../../fonts/Distinct-Text.woff') format('woff');
|
|
55
|
+
src: url('../../fonts/Distinct-Text.woff2') format('woff2');
|
|
56
|
+
}
|
|
57
|
+
@mixin DistinctText {
|
|
58
|
+
font-family: $DistinctText;
|
|
22
59
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const px = "phillips";
|
package/package.json
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phillips/seldon",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"main": "./dist/index.js",
|
|
6
5
|
"module": "./dist/index.js",
|
|
7
6
|
"types": "./dist/index.d.ts",
|
|
8
7
|
"exports": {
|
|
@@ -24,7 +23,7 @@
|
|
|
24
23
|
"dev": "vite",
|
|
25
24
|
"build": "npm run clean && tsc && vite build && rimraf --glob './public/scss'",
|
|
26
25
|
"build:storybook": "storybook build",
|
|
27
|
-
"clean": "rimraf './dist'
|
|
26
|
+
"clean": "rimraf './dist'",
|
|
28
27
|
"clean:stories": "rimraf './storybook-static'",
|
|
29
28
|
"lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
30
29
|
"start": "storybook dev -p 6006",
|
|
@@ -95,7 +94,6 @@
|
|
|
95
94
|
{
|
|
96
95
|
"assets": [
|
|
97
96
|
"package.json",
|
|
98
|
-
"dist/**/*.{js,scss}",
|
|
99
97
|
"CHANGELOG.md"
|
|
100
98
|
],
|
|
101
99
|
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
|
|
File without changes
|