@phillips/seldon 1.1.9 → 1.2.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.
@@ -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
@@ -0,0 +1,4 @@
1
+ export { default as Button } from './components/Button/Button';
2
+ export { default as Header } from './components/Header/Header';
3
+ export { default as HeroBanner } from './components/HeroBanner/HeroBanner';
4
+ export { default as Page } from './pages/Page';
package/dist/index.js CHANGED
@@ -1,8 +1,10 @@
1
- import { default as t } from "./components/Button/Button.js";
2
- import { default as r } from "./components/Header/Header.js";
3
- import { default as d } from "./pages/Page.js";
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
- t as Button,
6
- r as Header,
7
- d as Page
6
+ r as Button,
7
+ t as Header,
8
+ d as HeroBanner,
9
+ l as Page
8
10
  };
@@ -0,0 +1,3 @@
1
+ import * as React from 'react';
2
+ declare const Page: React.FC;
3
+ export default Page;
@@ -0,0 +1,59 @@
1
+ @import './vars';
2
+
3
+ body {
4
+ font-family: SeroWebPro,"Helvetica Neue",Helvetica,-apple-system,".SFNSText-Regular","San Francisco",BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Helvetica,Arial,sans-serif;
5
+ font-size: 16px;
6
+ margin: 0;
7
+ -webkit-font-smoothing: antialiased;
8
+ -moz-osx-font-smoothing: grayscale;
9
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
10
+ -webkit-overflow-scrolling: touch;
11
+ }
12
+
13
+ h1,
14
+ h2,
15
+ h3,
16
+ h4 {
17
+ color: $primary-black;
18
+ }
19
+
20
+ p {
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;
59
+ }
@@ -1,4 +1,4 @@
1
- @use '../../utils/vars' as *;
1
+ @import '../../vars';
2
2
 
3
3
  .#{$px}-button {
4
4
  background-color: #1ea7fd;
@@ -0,0 +1,61 @@
1
+ @import '../../vars';
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
+ }
@@ -1,5 +1,8 @@
1
- @use 'utils/vars';
2
- @use 'utils/typography';
3
- @use 'components/Button/button';
4
- @use 'components/Header/header';
5
- @use 'pages/page';
1
+ @import './vars';
2
+ // @TODO: add styles when we can do a site wide regressions QA
3
+ // @use 'reset';
4
+ @import './typography';
5
+ @import 'components/Button/button';
6
+ @import 'components/Header/header';
7
+ @import 'components/HeroBanner/heroBanner';
8
+ @import 'pages/page';
@@ -0,0 +1 @@
1
+ export declare const px = "phillips";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phillips/seldon",
3
- "version": "1.1.9",
3
+ "version": "1.2.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -17,14 +17,13 @@
17
17
  }
18
18
  },
19
19
  "files": [
20
- "dist/**",
21
- "!dist/src"
20
+ "dist/**"
22
21
  ],
23
22
  "scripts": {
24
23
  "dev": "vite",
25
- "build": "npm run clean && tsc && vite build && rimraf --glob './public/scss'",
24
+ "build": "npm run clean && tsc && vite build",
26
25
  "build:storybook": "storybook build",
27
- "clean": "rimraf './dist'rimraf",
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}"
@@ -1,22 +0,0 @@
1
- @use './vars' as *;
2
-
3
- body {
4
- font-family: "Nunito Sans",-apple-system,".SFNSText-Regular","San Francisco",BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Helvetica,Arial,sans-serif;
5
- font-size: 16px;
6
- margin: 0;
7
- -webkit-font-smoothing: antialiased;
8
- -moz-osx-font-smoothing: grayscale;
9
- -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
10
- -webkit-overflow-scrolling: touch;
11
- }
12
-
13
- h1,
14
- h2,
15
- h3,
16
- h4 {
17
- color: $primary-black;
18
- }
19
-
20
- p {
21
- color: $soft-black;
22
- }
package/dist/vite.svg DELETED
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
File without changes
File without changes