@phillips/seldon 1.7.1 → 1.7.2

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.
@@ -1,31 +1,25 @@
1
- export interface ButtonProps {
1
+ import { CommonProps } from '../../utils';
2
+ export interface ButtonProps extends CommonProps {
2
3
  /**
3
- * Is this the principal call to action on the page?
4
+ * Button contents
4
5
  */
5
- primary?: boolean;
6
+ children: React.ReactNode;
6
7
  /**
7
- * What background color to use
8
+ * True if button comes after text
8
9
  */
9
- backgroundColor?: string;
10
+ iconLast?: boolean;
10
11
  /**
11
- * How large should the button be?
12
+ * Optional click handler
12
13
  */
13
- size?: 'sm' | 'md' | 'lg';
14
+ onClick?: () => void;
14
15
  /**
15
- * Button contents
16
+ * Is this the principal call to action on the page?
16
17
  */
17
- children: React.ReactNode;
18
- /**
19
- * Unique id for component
20
- */
21
- id?: string;
18
+ primary?: boolean;
22
19
  /**
23
- * Optional click handler
20
+ * How large should the button be?
24
21
  */
25
- onClick?: () => void;
22
+ size?: 'sm' | 'md' | 'lg';
26
23
  }
27
- /**
28
- * Primary UI component for user interaction
29
- */
30
- declare const Button: ({ primary, size, backgroundColor, children, id, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
24
+ declare const Button: ({ primary, size, children, iconLast, id, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
31
25
  export default Button;
@@ -1,22 +1,17 @@
1
- import { jsx as a } from "react/jsx-runtime";
1
+ import { jsx as e } from "react/jsx-runtime";
2
2
  import m from "../../node_modules/classnames/index.js";
3
- import { px as o } from "../../utils/index.js";
4
- const c = ({
5
- primary: n = !0,
6
- size: r = "md",
7
- backgroundColor: s,
8
- children: u,
9
- id: t,
10
- ...e
11
- }) => /* @__PURE__ */ a(
3
+ import { px as t } from "../../utils/index.js";
4
+ const c = ({ primary: n = !0, size: s = "md", children: u, iconLast: a = !1, id: o, ...r }) => /* @__PURE__ */ e(
12
5
  "button",
13
6
  {
14
- "data-testid": t ? `button-${t}` : "button",
15
- id: t,
7
+ "data-testid": o ? `button-${o}` : "button",
8
+ id: o,
16
9
  type: "button",
17
- className: m(`${o}-button`, `${o}-button--${r}`, { [`${o}-button--secondary`]: !n }),
18
- style: { backgroundColor: s },
19
- ...e,
10
+ className: m(`${t}-button`, `${t}-button--${s}`, {
11
+ [`${t}-button--secondary`]: !n,
12
+ [`${t}-button--icon-last`]: a
13
+ }),
14
+ ...r,
20
15
  children: u
21
16
  }
22
17
  );
@@ -3,27 +3,9 @@ import i from "../Button/Button.js";
3
3
  const a = ({ user: n, onLogin: r, onLogout: h, onCreateAccount: c }) => /* @__PURE__ */ e("header", { children: /* @__PURE__ */ l("div", { className: "storybook-header", children: [
4
4
  /* @__PURE__ */ l("div", { children: [
5
5
  /* @__PURE__ */ e("svg", { width: "32", height: "32", viewBox: "0 0 32 32", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ l("g", { fill: "none", fillRule: "evenodd", children: [
6
- /* @__PURE__ */ e(
7
- "path",
8
- {
9
- d: "M10 0h12a10 10 0 0110 10v12a10 10 0 01-10 10H10A10 10 0 010 22V10A10 10 0 0110 0z",
10
- fill: "#FFF"
11
- }
12
- ),
13
- /* @__PURE__ */ e(
14
- "path",
15
- {
16
- d: "M5.3 10.6l10.4 6v11.1l-10.4-6v-11zm11.4-6.2l9.7 5.5-9.7 5.6V4.4z",
17
- fill: "#555AB9"
18
- }
19
- ),
20
- /* @__PURE__ */ e(
21
- "path",
22
- {
23
- d: "M27.2 10.6v11.2l-10.5 6V16.5l10.5-6zM15.7 4.4v11L6 10l9.7-5.5z",
24
- fill: "#91BAF8"
25
- }
26
- )
6
+ /* @__PURE__ */ e("path", { d: "M10 0h12a10 10 0 0110 10v12a10 10 0 01-10 10H10A10 10 0 010 22V10A10 10 0 0110 0z", fill: "#FFF" }),
7
+ /* @__PURE__ */ e("path", { d: "M5.3 10.6l10.4 6v11.1l-10.4-6v-11zm11.4-6.2l9.7 5.5-9.7 5.6V4.4z", fill: "#555AB9" }),
8
+ /* @__PURE__ */ e("path", { d: "M27.2 10.6v11.2l-10.5 6V16.5l10.5-6zM15.7 4.4v11L6 10l9.7-5.5z", fill: "#91BAF8" })
27
9
  ] }) }),
28
10
  /* @__PURE__ */ e("h1", { children: "Acme" })
29
11
  ] }),
@@ -16,16 +16,16 @@ interface HeroBannerProps {
16
16
  */
17
17
  subHeadText?: string;
18
18
  /**
19
- * Is there an association related to this sale?
20
- */
19
+ * Is there an association related to this sale?
20
+ */
21
21
  association?: string;
22
22
  /**
23
- * What background image or color to use
24
- */
23
+ * What background image or color to use
24
+ */
25
25
  background?: string;
26
26
  /**
27
- * Unique id for component testing
28
- */
27
+ * Unique id for component testing
28
+ */
29
29
  id?: string;
30
30
  }
31
31
  declare const HeroBanner: ({ prehead, date, headerText, subHeadText, association, background, id }: HeroBannerProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,14 +1,6 @@
1
1
  import { jsx as n, jsxs as s } from "react/jsx-runtime";
2
2
  import { px as t } from "../../utils/index.js";
3
- const r = `${t}-hero-banner`, m = ({
4
- prehead: e,
5
- date: l,
6
- headerText: o,
7
- subHeadText: c,
8
- association: h,
9
- background: p,
10
- id: a
11
- }) => /* @__PURE__ */ n(
3
+ const r = `${t}-hero-banner`, m = ({ prehead: e, date: l, headerText: o, subHeadText: c, association: h, background: p, id: a }) => /* @__PURE__ */ n(
12
4
  "header",
13
5
  {
14
6
  "data-testid": a ? `hero-banner-${a}` : "hero-banner",
@@ -2,63 +2,60 @@ import { jsxs as P, jsx as r } from "react/jsx-runtime";
2
2
  import * as R from "react";
3
3
  import e from "../../node_modules/classnames/index.js";
4
4
  import { px as t, useNormalizedInputProps as y } from "../../utils/index.js";
5
- const z = R.forwardRef(({
6
- className: p,
7
- defaultValue: l,
8
- disabled: u,
9
- hideLabel: d,
10
- id: n,
11
- inline: o,
12
- invalid: m,
13
- invalidText: $,
14
- labelText: c,
15
- onChange: _,
16
- onClick: b,
17
- placeholder: f,
18
- readOnly: a,
19
- size: w = "md",
20
- type: s = "text",
21
- value: x,
22
- warn: h,
23
- warnText: v,
24
- ...I
25
- }, N) => {
26
- const i = y({ disabled: u, id: n, invalid: m, invalidText: $, readOnly: a, type: s, warn: h, warnText: v }), j = e(
27
- `${t}-${s}-input`,
28
- `${t}-input`,
29
- `${t}-input--${w}`,
30
- {
5
+ const z = R.forwardRef(
6
+ ({
7
+ className: p,
8
+ defaultValue: l,
9
+ disabled: u,
10
+ hideLabel: d,
11
+ id: n,
12
+ inline: o,
13
+ invalid: m,
14
+ invalidText: $,
15
+ labelText: c,
16
+ onChange: _,
17
+ onClick: b,
18
+ placeholder: f,
19
+ readOnly: a,
20
+ size: w = "md",
21
+ type: s = "text",
22
+ value: x,
23
+ warn: h,
24
+ warnText: v,
25
+ ...I
26
+ }, N) => {
27
+ const i = y({ disabled: u, id: n, invalid: m, invalidText: $, readOnly: a, type: s, warn: h, warnText: v }), j = e(`${t}-${s}-input`, `${t}-input`, `${t}-input--${w}`, {
31
28
  [`${t}-input--inline`]: o,
32
29
  [`${t}-input--readonly`]: a,
33
30
  [`${t}-input--disabled`]: i.disabled,
34
31
  [`${t}-input--invalid`]: i.invalid,
35
32
  [`${t}-input--warn`]: i.warn,
36
33
  [`${p}__wrapper`]: p
37
- }
38
- );
39
- return /* @__PURE__ */ P("div", { className: j, children: [
40
- /* @__PURE__ */ r("label", { htmlFor: n, className: e(`${t}-input__label`, { [`${t}-input__label--hidden`]: d }), children: c }),
41
- /* @__PURE__ */ r(
42
- "input",
43
- {
44
- className: e(`${t}-input__input`, { className: p }),
45
- "data-testid": n,
46
- defaultValue: l,
47
- disabled: i.disabled,
48
- id: n,
49
- onChange: _,
50
- onClick: b,
51
- placeholder: f,
52
- readOnly: a,
53
- ref: N,
54
- type: i.type,
55
- value: x,
56
- ...I
57
- }
58
- ),
59
- i.validation
60
- ] });
61
- });
34
+ });
35
+ return /* @__PURE__ */ P("div", { className: j, children: [
36
+ /* @__PURE__ */ r("label", { htmlFor: n, className: e(`${t}-input__label`, { [`${t}-input__label--hidden`]: d }), children: c }),
37
+ /* @__PURE__ */ r(
38
+ "input",
39
+ {
40
+ className: e(`${t}-input__input`, { className: p }),
41
+ "data-testid": n,
42
+ defaultValue: l,
43
+ disabled: i.disabled,
44
+ id: n,
45
+ onChange: _,
46
+ onClick: b,
47
+ placeholder: f,
48
+ readOnly: a,
49
+ ref: N,
50
+ type: i.type,
51
+ value: x,
52
+ ...I
53
+ }
54
+ ),
55
+ i.validation
56
+ ] });
57
+ }
58
+ );
62
59
  z.displayName = "Input";
63
60
  export {
64
61
  z as default
@@ -2,60 +2,57 @@ import { jsxs as R, jsx as l } from "react/jsx-runtime";
2
2
  import * as y from "react";
3
3
  import a from "../../node_modules/classnames/index.js";
4
4
  import { px as t, useNormalizedInputProps as z } from "../../utils/index.js";
5
- const S = y.forwardRef(({
6
- children: r,
7
- className: n,
8
- defaultValue: o,
9
- disabled: d,
10
- hideLabel: u,
11
- id: e,
12
- inline: m,
13
- invalid: $,
14
- invalidText: c,
15
- labelText: _,
16
- onChange: b,
17
- onClick: f,
18
- readOnly: p,
19
- size: w = "md",
20
- value: h,
21
- warn: v,
22
- warnText: x,
23
- ...j
24
- }, N) => {
25
- const s = "select", i = z({ disabled: d, id: e, invalid: $, invalidText: c, readOnly: p, type: s, warn: v, warnText: x }), P = a(
26
- `${t}-${s}-input`,
27
- `${t}-input`,
28
- `${t}-input--${w}`,
29
- {
5
+ const S = y.forwardRef(
6
+ ({
7
+ children: r,
8
+ className: n,
9
+ defaultValue: o,
10
+ disabled: d,
11
+ hideLabel: u,
12
+ id: e,
13
+ inline: m,
14
+ invalid: $,
15
+ invalidText: c,
16
+ labelText: _,
17
+ onChange: b,
18
+ onClick: f,
19
+ readOnly: p,
20
+ size: w = "md",
21
+ value: h,
22
+ warn: v,
23
+ warnText: x,
24
+ ...j
25
+ }, N) => {
26
+ const s = "select", i = z({ disabled: d, id: e, invalid: $, invalidText: c, readOnly: p, type: s, warn: v, warnText: x }), P = a(`${t}-${s}-input`, `${t}-input`, `${t}-input--${w}`, {
30
27
  [`${t}-input--inline`]: m,
31
28
  [`${t}-input--readonly`]: p,
32
29
  [`${t}-input--disabled`]: i.disabled,
33
30
  [`${t}-input--invalid`]: i.invalid,
34
31
  [`${t}-input--warn`]: i.warn,
35
32
  [`${n}__wrapper`]: n
36
- }
37
- );
38
- return /* @__PURE__ */ R("div", { className: P, children: [
39
- /* @__PURE__ */ l("label", { htmlFor: e, className: a(`${t}-input__label`, { [`${t}-input__label--hidden`]: u }), children: _ }),
40
- /* @__PURE__ */ l(
41
- "select",
42
- {
43
- className: a(`${t}-input__input`, { className: n }),
44
- "data-testid": e,
45
- defaultValue: o,
46
- disabled: i.disabled,
47
- id: e,
48
- onChange: b,
49
- onClick: f,
50
- ref: N,
51
- value: h,
52
- ...j,
53
- children: r
54
- }
55
- ),
56
- i.validation
57
- ] });
58
- });
33
+ });
34
+ return /* @__PURE__ */ R("div", { className: P, children: [
35
+ /* @__PURE__ */ l("label", { htmlFor: e, className: a(`${t}-input__label`, { [`${t}-input__label--hidden`]: u }), children: _ }),
36
+ /* @__PURE__ */ l(
37
+ "select",
38
+ {
39
+ className: a(`${t}-input__input`, { className: n }),
40
+ "data-testid": e,
41
+ defaultValue: o,
42
+ disabled: i.disabled,
43
+ id: e,
44
+ onChange: b,
45
+ onClick: f,
46
+ ref: N,
47
+ value: h,
48
+ ...j,
49
+ children: r
50
+ }
51
+ ),
52
+ i.validation
53
+ ] });
54
+ }
55
+ );
59
56
  export {
60
57
  S as default
61
58
  };
@@ -1,4 +1,6 @@
1
- *, *::before, *::after {
1
+ *,
2
+ *::before,
3
+ *::after {
2
4
  box-sizing: border-box;
3
5
  }
4
6
 
@@ -11,19 +13,32 @@ body {
11
13
  -webkit-font-smoothing: antialiased;
12
14
  }
13
15
 
14
- img, picture, video, canvas, svg {
16
+ img,
17
+ picture,
18
+ video,
19
+ canvas,
20
+ svg {
15
21
  display: block;
16
22
  max-width: 100%;
17
23
  }
18
24
 
19
- input, button, textarea, select {
25
+ input,
26
+ button,
27
+ textarea,
28
+ select {
20
29
  font: inherit;
21
30
  }
22
31
 
23
- p, h1, h2, h3, h4, h5, h6 {
32
+ p,
33
+ h1,
34
+ h2,
35
+ h3,
36
+ h4,
37
+ h5,
38
+ h6 {
24
39
  overflow-wrap: break-word;
25
40
  }
26
41
 
27
42
  #root {
28
43
  isolation: isolate;
29
- }
44
+ }
@@ -1,17 +1,27 @@
1
1
  @import './vars';
2
2
 
3
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;
4
+ font-family:
5
+ SeroWebPro,
6
+ 'Helvetica Neue',
7
+ Helvetica,
8
+ -apple-system,
9
+ '.SFNSText-Regular',
10
+ 'San Francisco',
11
+ BlinkMacSystemFont,
12
+ 'Segoe UI',
13
+ 'Helvetica Neue',
14
+ Helvetica,
15
+ Arial,
16
+ sans-serif;
17
+ font-size: 16px;
18
+ margin: 0;
19
+ -webkit-font-smoothing: antialiased;
20
+ -moz-osx-font-smoothing: grayscale;
21
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
22
+ -webkit-overflow-scrolling: touch;
11
23
  }
12
24
 
13
-
14
-
15
25
  /** Fonts **/
16
26
  @font-face {
17
27
  font-family: 'DistinctDisplay';
@@ -56,7 +66,6 @@ body {
56
66
 
57
67
  @mixin bodyText {
58
68
  color: $soft-black;
59
- @include DistinctText();
60
69
  }
61
70
 
62
71
  // @TODO: uncomment when site is able to be refactored
@@ -76,4 +85,4 @@ body {
76
85
  // button {
77
86
  // color: $soft-black;
78
87
  // @include DistinctText();
79
- // }
88
+ // }
@@ -5,7 +5,7 @@
5
5
  border: 0;
6
6
  margin: -1px;
7
7
  block-size: 1px;
8
- clip: rect(0,0,0,0);
8
+ clip: rect(0, 0, 0, 0);
9
9
  inline-size: 1px;
10
10
  visibility: inherit;
11
11
  white-space: nowrap;
@@ -35,4 +35,4 @@
35
35
  top: 50px;
36
36
  text-align: center;
37
37
  line-height: 1;
38
- }
38
+ }
@@ -1,8 +1,6 @@
1
-
2
1
  // prefix
3
2
  $px: phillips;
4
3
 
5
-
6
4
  // Primary color palette
7
5
  $pure-black: #000000;
8
6
  $primary-black: #323232;
@@ -32,7 +30,6 @@ $articker-red: #fc1e2b;
32
30
  $articker-orange: #ff8201;
33
31
  $articker-red-orange-gradient: linear-gradient(90deg, #fc1e2b, #ff8201);
34
32
 
35
-
36
33
  // Font-variables
37
34
  $DistinctDisplay: 'DistinctDisplay';
38
35
  $DistinctDisplayItalic: 'DistinctDisplayItalic';
@@ -43,4 +40,4 @@ $DistinctText: 'DistinctText';
43
40
  $header-color: $pure-black;
44
41
  $header-family: $DistinctDisplay;
45
42
  $text-color: $soft-black;
46
- $text-family: $DistinctText;
43
+ $text-family: $DistinctText;
@@ -1,4 +1,5 @@
1
1
  @import '../../vars';
2
+ @import '../../_utils';
2
3
 
3
4
  .#{$px}-button {
4
5
  @include bodyText;
@@ -12,17 +13,48 @@
12
13
  justify-content: center;
13
14
  min-width: 9rem;
14
15
  padding: 0.5em 1.75em;
15
- transition: color 0.25s, background-color 0.25s, font-weight 0.25s;
16
+ transition:
17
+ color 0.25s,
18
+ background-color 0.25s,
19
+ font-weight 0.25s;
16
20
 
17
21
  &:hover,
18
22
  &:focus {
19
- background-color: $soft-black;
23
+ background-color: $primary-black;
24
+
25
+ svg {
26
+ fill: $pure-white;
27
+ }
28
+ }
29
+ svg {
30
+ fill: $pure-white;
31
+ transition: fill 0.25s;
32
+ margin-inline-end: 0.5rem;
33
+ width: 1em;
20
34
  }
21
35
 
22
36
  &--secondary {
23
37
  color: $text-color;
24
38
  background-color: transparent;
25
39
  box-shadow: rgba(0, 0, 0, 0.5) 0 0 0 1px inset;
40
+
41
+ &:hover,
42
+ &:focus {
43
+ color: $pure-white;
44
+
45
+ svg {
46
+ fill: $pure-white;
47
+ }
48
+ }
49
+
50
+ svg {
51
+ fill: $text-color;
52
+ }
53
+ }
54
+
55
+ &.#{$px}-button--icon-last svg {
56
+ margin-inline-end: unset;
57
+ margin-inline-start: 0.5rem;
26
58
  }
27
59
 
28
60
  &--sm {
@@ -39,8 +71,6 @@
39
71
  }
40
72
 
41
73
  * {
42
- margin: 0
74
+ margin: 0;
43
75
  }
44
-
45
76
  }
46
-
@@ -2,7 +2,6 @@
2
2
  @import '../../vars';
3
3
  @import '../../typography';
4
4
 
5
-
6
5
  .flatpickr-calendar {
7
6
  @include DistinctText;
8
7
 
@@ -67,9 +66,9 @@
67
66
  padding: 0.65rem 0 0 0;
68
67
  }
69
68
 
70
- .flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n+1)),
71
- .flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n+1)),
72
- .flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n+1)) {
69
+ .flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n + 1)),
70
+ .flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n + 1)),
71
+ .flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n + 1)) {
73
72
  -webkit-box-shadow: -10px 0 0 #e6e6e6;
74
73
  box-shadow: -10px 0 0 #e6e6e6;
75
74
  }
@@ -1,5 +1,5 @@
1
1
  .storybook-header {
2
- font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
2
+ font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
3
3
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
4
4
  padding: 15px 20px;
5
5
  display: flex;
@@ -1,101 +1,101 @@
1
1
  @import '../../vars';
2
2
 
3
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%;
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
15
 
16
- @media (max-width: 28.8125rem) {
17
- flex-direction: column;
18
- align-items: center;
19
- gap: 1.875rem;
20
- align-self: stretch;
21
- padding: 1.875rem 0.9375rem;
22
- background: $pure-black;
16
+ @media (max-width: 28.8125rem) {
17
+ flex-direction: column;
18
+ align-items: center;
19
+ gap: 1.875rem;
20
+ align-self: stretch;
21
+ padding: 1.875rem 0.9375rem;
22
+ background: $pure-black;
23
23
 
24
- &::before{
25
- content: '';
26
- background: var(--background);
27
- width: 100%;
28
- height: 12rem;
29
- background-size: cover;
30
- background-repeat: no-repeat;
31
- background-position: center center;
32
- }
24
+ &::before {
25
+ content: '';
26
+ background: var(--background);
27
+ width: 100%;
28
+ height: 12rem;
29
+ background-size: cover;
30
+ background-repeat: no-repeat;
31
+ background-position: center center;
33
32
  }
33
+ }
34
34
 
35
- h1 {
36
- font-family: 'DistinctDisplay', sans-serif;
37
- }
35
+ h1 {
36
+ font-family: 'DistinctDisplay', sans-serif;
37
+ }
38
38
 
39
- h1 span,
40
- p {
41
- font-family: 'DistinctText', sans-serif;
42
- }
39
+ h1 span,
40
+ p {
41
+ font-family: 'DistinctText', sans-serif;
42
+ }
43
43
 
44
- h1,
45
- h1 span,
46
- p {
47
- color: $pure-white;
48
- font-weight: 400;
49
- margin: 0;
50
- text-transform: uppercase;
51
- }
44
+ h1,
45
+ h1 span,
46
+ p {
47
+ color: $pure-white;
48
+ font-weight: 400;
49
+ margin: 0;
50
+ text-transform: uppercase;
51
+ }
52
52
 
53
- p {
54
- font-size: 0.875rem;
55
- line-height: 1;
56
- letter-spacing: 0.125rem;
57
- text-align: center;
58
- }
53
+ p {
54
+ font-size: 0.875rem;
55
+ line-height: 1;
56
+ letter-spacing: 0.125rem;
57
+ text-align: center;
58
+ }
59
59
 
60
- & .#{$px}-hero-banner__content-wrapper {
61
- max-width: 1082px;
62
- display: flex;
63
- flex-direction: column;
64
- align-items: center;
65
- }
60
+ & .#{$px}-hero-banner__content-wrapper {
61
+ max-width: 1082px;
62
+ display: flex;
63
+ flex-direction: column;
64
+ align-items: center;
65
+ }
66
66
 
67
- & .#{$px}-hero-banner__pre-head {
68
- align-items: flex-start;
69
- display: flex;
70
- font-size: 0.75rem;
71
- gap: 1.875rem;
67
+ & .#{$px}-hero-banner__pre-head {
68
+ align-items: flex-start;
69
+ display: flex;
70
+ font-size: 0.75rem;
71
+ gap: 1.875rem;
72
72
 
73
- @media (min-width: 28.8125rem) {
74
- font-size: 0.875rem;
75
- }
73
+ @media (min-width: 28.8125rem) {
74
+ font-size: 0.875rem;
75
+ }
76
76
 
77
- @media (max-width: 28.8125rem) {
78
- flex-direction: column;
79
- gap: 1rem;
80
- align-items: center;
81
- }
77
+ @media (max-width: 28.8125rem) {
78
+ flex-direction: column;
79
+ gap: 1rem;
80
+ align-items: center;
82
81
  }
82
+ }
83
83
 
84
- & .#{$px}-hero-banner__heading {
85
- align-self: stretch;
86
- display: flex;
87
- flex-direction: column;
88
- font-size: 2rem;
89
- line-height: 1;
90
- margin: 1.875rem 0;
91
- text-align: center;
84
+ & .#{$px}-hero-banner__heading {
85
+ align-self: stretch;
86
+ display: flex;
87
+ flex-direction: column;
88
+ font-size: 2rem;
89
+ line-height: 1;
90
+ margin: 1.875rem 0;
91
+ text-align: center;
92
92
 
93
- @media (min-width: 28.8125rem) {
94
- font-size: 2.375rem;
95
- }
93
+ @media (min-width: 28.8125rem) {
94
+ font-size: 2.375rem;
95
+ }
96
96
 
97
- span {
98
- font-size: 1.625rem;
99
- }
97
+ span {
98
+ font-size: 1.625rem;
100
99
  }
100
+ }
101
101
  }
@@ -129,7 +129,7 @@ $lg: #{$px}-input--lg;
129
129
 
130
130
  .#{$px}-input--inline.#{$px}-radio-input,
131
131
  .#{$px}-input--inline.#{$px}-checkbox-input,
132
- .#{$px}-input--inline.#{$px}-toggle-input {
132
+ .#{$px}-input--inline.#{$px}-toggle-input {
133
133
  flex-direction: row-reverse;
134
134
  justify-content: flex-end;
135
135
  position: relative;
@@ -142,7 +142,7 @@ $lg: #{$px}-input--lg;
142
142
  .#{$px}-input__validation {
143
143
  left: 0;
144
144
  position: absolute;
145
- top: 0
145
+ top: 0;
146
146
  }
147
147
  }
148
148
 
@@ -28,19 +28,23 @@ $lg: #{$px}-input--lg;
28
28
  }
29
29
 
30
30
  &::before {
31
- background-color: rgba(0,0,0, .4);
31
+ background-color: rgba(0, 0, 0, 0.4);
32
32
  border-radius: 1rem;
33
33
  width: $toggleBaseWidth;
34
34
  height: 1rem;
35
35
  left: 0;
36
- transition: background-color 0.25s, color 0.25s;
36
+ transition:
37
+ background-color 0.25s,
38
+ color 0.25s;
37
39
  }
38
40
 
39
41
  &::after {
40
42
  // background-color: transparent;
41
- background: #fff linear-gradient(transparent,rgba($pure-black, 0.05));
43
+ background: #fff linear-gradient(transparent, rgba($pure-black, 0.05));
42
44
  border-radius: 50%;
43
- box-shadow: 0 1px 2px 0 rgba($pure-black,.15), 0 0 0 1px rgba($pure-black,.15) inset;
45
+ box-shadow:
46
+ 0 1px 2px 0 rgba($pure-black, 0.15),
47
+ 0 0 0 1px rgba($pure-black, 0.15) inset;
44
48
  color: white;
45
49
  height: 1rem;
46
50
  left: 0;
@@ -51,7 +55,6 @@ $lg: #{$px}-input--lg;
51
55
  }
52
56
 
53
57
  &.#{$inline} {
54
-
55
58
  .#{$px}-input__label {
56
59
  margin-bottom: 0.5rem;
57
60
  margin-left: 66px;
@@ -82,7 +85,6 @@ $lg: #{$px}-input--lg;
82
85
  padding-top: 2rem;
83
86
  }
84
87
 
85
-
86
88
  // Height changes
87
89
  &.#{$md},
88
90
  &.#{$lg} {
@@ -140,24 +142,24 @@ $lg: #{$px}-input--lg;
140
142
 
141
143
  // When in checked state
142
144
  &:has(input:checked) {
143
-
144
145
  .#{$px}-input__label {
145
146
  &::before {
146
147
  background-color: $pure-black;
147
148
  }
148
149
 
149
150
  &::after {
150
- transform: translate($toggleBaseWidth - 1rem, 0)
151
+ transform: translate($toggleBaseWidth - 1rem, 0);
151
152
  }
152
153
  }
153
154
 
154
155
  &.#{$md} .#{$px}-input__label::after,
155
156
  &.#{$lg} .#{$px}-input__label::after {
156
- transform: translate($toggleBaseWidth - 1.5rem, 0)
157
+ transform: translate($toggleBaseWidth - 1.5rem, 0);
157
158
  }
158
159
 
159
-
160
- &.#{$inline} .#{$px}-input__label::after { transform: translate($toggleBaseWidth - 1rem, -50%); }
160
+ &.#{$inline} .#{$px}-input__label::after {
161
+ transform: translate($toggleBaseWidth - 1rem, -50%);
162
+ }
161
163
 
162
164
  &.#{$md}.#{$inline} .#{$px}-input__label::after,
163
165
  &.#{$lg}.#{$inline} .#{$px}-input__label::after {
@@ -165,10 +167,14 @@ $lg: #{$px}-input--lg;
165
167
  }
166
168
 
167
169
  // Error state checked
168
- &.#{$invalid} .#{$px}-input__label::before { background-color: $error-red; }
170
+ &.#{$invalid} .#{$px}-input__label::before {
171
+ background-color: $error-red;
172
+ }
169
173
 
170
174
  // warn state checked
171
- &.#{$warn} .#{$px}-input__label::before { background-color: $warn-yellow; }
175
+ &.#{$warn} .#{$px}-input__label::before {
176
+ background-color: $warn-yellow;
177
+ }
172
178
  }
173
179
  &.#{$warn} {
174
180
  &.#{$md},
@@ -1,5 +1,5 @@
1
1
  .storybook-page {
2
- font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
2
+ font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
3
3
  font-size: 14px;
4
4
  line-height: 24px;
5
5
  padding: 48px 20px;
@@ -11,4 +11,4 @@
11
11
  @import 'components/Input/input';
12
12
  @import 'components/Toggle/toggle';
13
13
  // 📑 Pages
14
- @import 'pages/page';
14
+ @import 'pages/page';
@@ -1,6 +1,16 @@
1
1
  import * as React from 'react';
2
2
  export declare const px = "phillips";
3
3
  export declare const noOP: () => void;
4
+ export interface CommonProps {
5
+ /**
6
+ * Optional className to be applied to the outer most element
7
+ */
8
+ className?: string;
9
+ /**
10
+ * A custom `id`
11
+ */
12
+ id?: string;
13
+ }
4
14
  export interface InputProps {
5
15
  /**
6
16
  * Specify whether the `<input>` should be disabled
@@ -19,21 +19,7 @@ function c({
19
19
  warnId: `${r}-warn-msg`,
20
20
  validation: null
21
21
  };
22
- return i.invalid && (i.validation = /* @__PURE__ */ s(
23
- "div",
24
- {
25
- className: `${n}-input__validation ${n}-${a}-input--invalid`,
26
- id: i.invalidId,
27
- children: t
28
- }
29
- )), i.warn && (i.validation = /* @__PURE__ */ s(
30
- "div",
31
- {
32
- className: `${n}-input__validation ${n}-${a}-input--warn`,
33
- id: i.warnId,
34
- children: e
35
- }
36
- )), i;
22
+ return i.invalid && (i.validation = /* @__PURE__ */ s("div", { className: `${n}-input__validation ${n}-${a}-input--invalid`, id: i.invalidId, children: t })), i.warn && (i.validation = /* @__PURE__ */ s("div", { className: `${n}-input__validation ${n}-${a}-input--warn`, id: i.warnId, children: e })), i;
37
23
  }
38
24
  export {
39
25
  n as px,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phillips/seldon",
3
- "version": "1.7.1",
3
+ "version": "1.7.2",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -8,8 +8,8 @@
8
8
  "exports": {
9
9
  ".": {
10
10
  "import": {
11
- "types": "./dist/index.js",
12
- "default": "./dist/index.d.ts"
11
+ "types": "./dist/index.d.ts",
12
+ "default": "./dist/index.js"
13
13
  }
14
14
  },
15
15
  "./dist/": {
@@ -28,6 +28,7 @@
28
28
  "preview": "npx http-server storybook-static",
29
29
  "clean": "rimraf './dist'",
30
30
  "clean:stories": "rimraf './storybook-static'",
31
+ "format": "prettier . --write",
31
32
  "lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
32
33
  "prepare": "husky install"
33
34
  },
@@ -67,6 +68,7 @@
67
68
  "husky": "^8.0.3",
68
69
  "jest": "^29.6.1",
69
70
  "jest-environment-jsdom": "^29.6.1",
71
+ "prettier": "3.0.3",
70
72
  "prop-types": "^15.8.1",
71
73
  "rimraf": "^5.0.1",
72
74
  "rollup-plugin-copy": "^3.4.0",
@@ -78,7 +80,8 @@
78
80
  "ts-node": "^10.9.1",
79
81
  "typescript": "^5.0.2",
80
82
  "vite": "^4.3.9",
81
- "vite-plugin-dts": "^2.3.0"
83
+ "vite-plugin-dts": "^2.3.0",
84
+ "vite-plugin-svgr": "^4.1.0"
82
85
  },
83
86
  "peerDependencies": {
84
87
  "react": "^18.2.0",