@phillips/seldon 1.1.8 → 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/README.md +5 -3
- 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/pages/Page.js +3 -3
- 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 +22 -8
- /package/dist/{vite.svg → assets/vite.svg} +0 -0
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Easel Design System 🎨 by Phillips Auction House
|
|
2
2
|
|
|
3
|
+
[](https://app.netlify.com/sites/snazzy-liger-5606f7/deploys)
|
|
4
|
+
|
|
3
5
|
Seldon is the source for design guidelines, component documentation, and resources for building apps with the Phillips.com Design System.
|
|
4
6
|
|
|
5
7
|
## Installation
|
|
@@ -19,13 +21,13 @@ yarn add @phillips/seldon
|
|
|
19
21
|
The project contains a `scss` folder. Here you will find the main export of our sass styles. This will include all the styles bundled with this package, including resets and typography styles.
|
|
20
22
|
|
|
21
23
|
```scss
|
|
22
|
-
@use '@phillips/seldon/scss/styles';
|
|
24
|
+
@use '@phillips/seldon/dist/scss/styles';
|
|
23
25
|
```
|
|
24
26
|
|
|
25
27
|
If you wish to only import specific component styles you can find them in their respective directories inside the `scss` folder.
|
|
26
28
|
|
|
27
29
|
```scss
|
|
28
|
-
@use '@phillips/seldon/scss/components/Button/button';
|
|
30
|
+
@use '@phillips/seldon/dist/scss/components/Button/button';
|
|
29
31
|
```
|
|
30
32
|
|
|
31
33
|
### Components
|
|
@@ -33,7 +35,7 @@ If you wish to only import specific component styles you can find them in their
|
|
|
33
35
|
Each component can be imported in your project by referencing the component name inside the `components` directory.
|
|
34
36
|
|
|
35
37
|
```js
|
|
36
|
-
import Button from '@phillips/seldon/components/Button/Button';
|
|
38
|
+
import Button from '@phillips/seldon/dist/components/Button/Button';
|
|
37
39
|
```
|
|
38
40
|
|
|
39
41
|
You can also use named exports for multiple component imports from main index file.
|
|
@@ -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
|
};
|
package/dist/pages/Page.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import n from "react";
|
|
2
|
+
import * as n from "react";
|
|
3
3
|
import a from "../components/Header/Header.js";
|
|
4
|
-
const
|
|
4
|
+
const h = () => {
|
|
5
5
|
const [r, t] = n.useState();
|
|
6
6
|
return /* @__PURE__ */ o("article", { children: [
|
|
7
7
|
/* @__PURE__ */ e(
|
|
@@ -54,5 +54,5 @@ const c = () => {
|
|
|
54
54
|
] });
|
|
55
55
|
};
|
|
56
56
|
export {
|
|
57
|
-
|
|
57
|
+
h as default
|
|
58
58
|
};
|
|
@@ -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": {
|
|
@@ -22,19 +21,23 @@
|
|
|
22
21
|
],
|
|
23
22
|
"scripts": {
|
|
24
23
|
"dev": "vite",
|
|
25
|
-
"clean": "rimraf './dist'rimraf",
|
|
26
|
-
"clean:stories": "rimraf ./storybook-static'",
|
|
27
24
|
"build": "npm run clean && tsc && vite build && rimraf --glob './public/scss'",
|
|
25
|
+
"build:storybook": "storybook build",
|
|
26
|
+
"clean": "rimraf './dist'",
|
|
27
|
+
"clean:stories": "rimraf './storybook-static'",
|
|
28
28
|
"lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
29
|
-
"preview": "vite preview",
|
|
30
29
|
"start": "storybook dev -p 6006",
|
|
31
|
-
"
|
|
30
|
+
"preview": "npx http-server storybook-static",
|
|
31
|
+
"prepare": "husky install"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"react": "^18.2.0",
|
|
35
35
|
"react-dom": "^18.2.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
+
"@commitlint/cli": "^17.6.6",
|
|
39
|
+
"@commitlint/config-conventional": "^17.6.6",
|
|
40
|
+
"@semantic-release/changelog": "^6.0.3",
|
|
38
41
|
"@semantic-release/git": "^10.0.1",
|
|
39
42
|
"@storybook/addon-essentials": "^7.0.22",
|
|
40
43
|
"@storybook/addon-interactions": "^7.0.22",
|
|
@@ -56,6 +59,7 @@
|
|
|
56
59
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
57
60
|
"eslint-plugin-react-refresh": "^0.3.4",
|
|
58
61
|
"eslint-plugin-storybook": "^0.6.12",
|
|
62
|
+
"husky": "^8.0.3",
|
|
59
63
|
"prop-types": "^15.8.1",
|
|
60
64
|
"rimraf": "^5.0.1",
|
|
61
65
|
"rollup-plugin-copy": "^3.4.0",
|
|
@@ -78,19 +82,29 @@
|
|
|
78
82
|
"plugins": [
|
|
79
83
|
"@semantic-release/commit-analyzer",
|
|
80
84
|
"@semantic-release/release-notes-generator",
|
|
85
|
+
[
|
|
86
|
+
"@semantic-release/changelog",
|
|
87
|
+
{
|
|
88
|
+
"changelogFile": "CHANGELOG.md"
|
|
89
|
+
}
|
|
90
|
+
],
|
|
81
91
|
"@semantic-release/npm",
|
|
82
92
|
[
|
|
83
93
|
"@semantic-release/git",
|
|
84
94
|
{
|
|
85
95
|
"assets": [
|
|
86
96
|
"package.json",
|
|
87
|
-
"package-lock.json",
|
|
88
|
-
"README.md",
|
|
89
97
|
"CHANGELOG.md"
|
|
90
98
|
],
|
|
91
99
|
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
|
|
92
100
|
}
|
|
93
101
|
]
|
|
94
102
|
]
|
|
103
|
+
},
|
|
104
|
+
"commitlint": {
|
|
105
|
+
"extends": [
|
|
106
|
+
"@commitlint/config-conventional"
|
|
107
|
+
],
|
|
108
|
+
"helpUrl": "https://www.conventionalcommits.org/en/v1.0.0/"
|
|
95
109
|
}
|
|
96
110
|
}
|
|
File without changes
|