@phillips/seldon 1.19.1 → 1.19.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.
@@ -3,7 +3,8 @@ var i = (t, r, o) => r in t ? n(t, r, { enumerable: !0, configurable: !0, writab
3
3
  var e = (t, r, o) => (i(t, typeof r != "symbol" ? r + "" : r, o), o);
4
4
  import { jsx as c } from "react/jsx-runtime";
5
5
  import * as l from "react";
6
- class p extends l.Component {
6
+ import { nullishCoalescing as p } from "../../utils/index.js";
7
+ class h extends l.Component {
7
8
  constructor() {
8
9
  super(...arguments);
9
10
  e(this, "state", {
@@ -15,15 +16,15 @@ class p extends l.Component {
15
16
  }
16
17
  componentDidCatch(o, s) {
17
18
  var a;
18
- (a = this.props) == null || a.logger(o, s.componentStack ?? "ErrorBoundary caught an error");
19
+ (a = this.props) == null || a.logger(o, p(s.componentStack, "ErrorBoundary caught an error"));
19
20
  }
20
21
  render() {
21
22
  return this.state.hasError ? this.props.fallback || /* @__PURE__ */ c("h2", { children: "Sorry... An error occurred and we are looking into it" }) : this.props.children;
22
23
  }
23
24
  }
24
- e(p, "defaultProps", {
25
+ e(h, "defaultProps", {
25
26
  logger: console.log
26
27
  });
27
28
  export {
28
- p as default
29
+ h as default
29
30
  };
@@ -1,15 +1,15 @@
1
- import { jsxs as c, jsx as o } from "react/jsx-runtime";
1
+ import { jsxs as r, jsx as o } from "react/jsx-runtime";
2
2
  import k from "../../node_modules/classnames/index.js";
3
- import { px as d } from "../../utils/index.js";
4
- import p from "../Link/Link.js";
5
- import { LinkVariants as f } from "../Link/utils.js";
6
- const h = ({ linkProps: s, description: i, className: e, id: t, ...l }) => {
7
- const a = `${d}-link-block`, m = k(a, e), r = s.element ?? p, n = t ? `link-block-${t}` : "link-block";
8
- return /* @__PURE__ */ c("div", { ...l, className: m, id: t, "data-testid": n, children: [
9
- /* @__PURE__ */ o(r, { ...s, "data-testid": `${n}-link`, variant: f.list }),
3
+ import { nullishCoalescing as d, px as p } from "../../utils/index.js";
4
+ import f from "../Link/Link.js";
5
+ import { LinkVariants as b } from "../Link/utils.js";
6
+ const u = ({ linkProps: t, description: i, className: e, id: s, ...l }) => {
7
+ const a = `${p}-link-block`, c = k(a, e), m = d(t.element, f), n = s ? `link-block-${s}` : "link-block";
8
+ return /* @__PURE__ */ r("div", { ...l, className: c, id: s, "data-testid": n, children: [
9
+ /* @__PURE__ */ o(m, { ...t, "data-testid": `${n}-link`, variant: b.list }),
10
10
  /* @__PURE__ */ o("p", { className: `${a}__description`, children: i })
11
11
  ] });
12
12
  };
13
13
  export {
14
- h as default
14
+ u as default
15
15
  };
@@ -25,7 +25,7 @@ body {
25
25
  -moz-osx-font-smoothing: grayscale;
26
26
  margin: 0;
27
27
  -webkit-overflow-scrolling: touch;
28
- -webkit-tap-highlight-color: rgb(0 0 0 / 0%);
28
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0%);
29
29
  }
30
30
 
31
31
  /** Fonts **/
@@ -22,7 +22,7 @@ $off-white: #f4f2f1;
22
22
 
23
23
  // Notification color palette
24
24
  $error-red: #f00;
25
- $error-pink: rgb(255 229 229 / 90%);
25
+ $error-pink: rgba(255, 229, 229, 90%);
26
26
  $warn-yellow: #d6d141;
27
27
  $post-sale-pink: #ff0086;
28
28
  $cta-blue: #4a90e2;
@@ -104,7 +104,7 @@ $body3: 'body3';
104
104
  --label-size2: 1rem;
105
105
  --label-size3: 0.75rem;
106
106
 
107
- @media (width <= 960px) {
107
+ @media (max-width: 960px) {
108
108
  --heading-size0: 2.59rem;
109
109
  --heading-size1: 1.83rem;
110
110
  --heading-size2: 1.46rem;
@@ -118,7 +118,7 @@ $body3: 'body3';
118
118
  --label-size3: 0.56rem;
119
119
  }
120
120
 
121
- @media (width >= 1801px) {
121
+ @media (min-width: 1801px) {
122
122
  --heading-size0: 4.06rem;
123
123
  --heading-size1: 3.05rem;
124
124
  --heading-size2: 2.44rem;
@@ -170,7 +170,7 @@ $text-badge-label-size: var(--label-size3);
170
170
  --spacing-large: 3rem;
171
171
  --spacing-xl: 6rem;
172
172
 
173
- @media (width <= 960px) {
173
+ @media (max-width: 960px) {
174
174
  --spacing-micro: 0.19rem;
175
175
  --spacing-xsm: 0.38rem;
176
176
  --spacing-small: 0.75rem;
@@ -179,7 +179,7 @@ $text-badge-label-size: var(--label-size3);
179
179
  --spacing-xl: 4.8rem;
180
180
  }
181
181
 
182
- @media (width >= 1801px) {
182
+ @media (min-width: 1801px) {
183
183
  --spacing-micro: 0.31rem;
184
184
  --spacing-xsm: 0.63rem;
185
185
  --spacing-small: 1.25rem;
@@ -9,11 +9,11 @@
9
9
  &__container--has-margins {
10
10
  margin: 0 $spacing-medium;
11
11
 
12
- @media (width >= 1401px) {
12
+ @media (min-width: 1401px) {
13
13
  margin: 0 $spacing-large;
14
14
  }
15
15
 
16
- @media (width >= 1801px) {
16
+ @media (min-width: 1801px) {
17
17
  margin: 0 $spacing-xl;
18
18
  }
19
19
  }
@@ -1,6 +1,6 @@
1
1
  .storybook-header {
2
2
  align-items: center;
3
- border-bottom: 1px solid rgb(0 0 0 / 10%);
3
+ border-bottom: 1px solid rgba(0, 0, 0, 10%);
4
4
  display: flex;
5
5
  font-family: Montserrat, 'Helvetica Neue', Helvetica, Arial, sans-serif;
6
6
  justify-content: space-between;
@@ -13,7 +13,7 @@
13
13
  padding: 1rem;
14
14
  width: 100%;
15
15
 
16
- @media (width <= 28.8125rem) {
16
+ @media (max-width: 28.8125rem) {
17
17
  align-items: center;
18
18
  align-self: stretch;
19
19
  background: $pure-black;
@@ -70,11 +70,11 @@
70
70
  font-size: 0.75rem;
71
71
  gap: 1.875rem;
72
72
 
73
- @media (width >= 28.8125rem) {
73
+ @media (min-width: 28.8125rem) {
74
74
  font-size: 0.875rem;
75
75
  }
76
76
 
77
- @media (width <= 28.8125rem) {
77
+ @media (max-width: 28.8125rem) {
78
78
  align-items: center;
79
79
  flex-direction: column;
80
80
  gap: 1rem;
@@ -90,7 +90,7 @@
90
90
  margin: 1.875rem 0;
91
91
  text-align: center;
92
92
 
93
- @media (width >= 28.8125rem) {
93
+ @media (min-width: 28.8125rem) {
94
94
  font-size: 2.375rem;
95
95
  }
96
96
 
@@ -97,7 +97,7 @@ $lg: #{$px}-input--lg;
97
97
  }
98
98
 
99
99
  .#{$px}-input__input {
100
- background-color: rgb(239 239 239 / 30%);
100
+ background-color: rgba(239, 239, 239, 30%);
101
101
  }
102
102
  }
103
103
 
@@ -30,7 +30,7 @@ $lg: #{$px}-input--lg;
30
30
  }
31
31
 
32
32
  &::before {
33
- background-color: rgb(0 0 0 / 40%);
33
+ background-color: rgba(0, 0, 0, 40%);
34
34
  border-radius: 1rem;
35
35
  height: 1rem;
36
36
  left: 0;
@@ -65,4 +65,9 @@ interface NormalizedProps {
65
65
  */
66
66
  export declare function useNormalizedInputProps({ disabled, id, invalid, invalidText, readOnly, type, warn, warnText, }: InputProps): NormalizedProps;
67
67
  export declare const defaultYear: number;
68
+ /**
69
+ * Nullish coalescing operator '??' polyfill
70
+ * To be removed once sass upgrade branch is merged in phillips-public
71
+ */
72
+ export declare const nullishCoalescing: (a: any, b: any) => any;
68
73
  export {};
@@ -1,29 +1,30 @@
1
- import { jsx as d } from "react/jsx-runtime";
2
- const n = "phillips";
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ const o = "phillips";
3
3
  function c({
4
- disabled: l = !1,
5
- id: o,
6
- invalid: t = !1,
7
- invalidText: e = "invalid",
4
+ disabled: i = !1,
5
+ id: a,
6
+ invalid: s = !1,
7
+ invalidText: d = "invalid",
8
8
  readOnly: r = !1,
9
- type: a,
10
- warn: s = !1,
11
- warnText: v
9
+ type: l,
10
+ warn: e = !1,
11
+ warnText: u
12
12
  }) {
13
- const i = {
14
- disabled: !r && l,
15
- invalid: !r && !l && t,
16
- invalidId: `${o}-error-msg`,
17
- type: a === "toggle" ? "checkbox" : a,
18
- warn: !r && !l && !t && s,
19
- warnId: `${o}-warn-msg`,
13
+ const n = {
14
+ disabled: !r && i,
15
+ invalid: !r && !i && s,
16
+ invalidId: `${a}-error-msg`,
17
+ type: l === "toggle" ? "checkbox" : l,
18
+ warn: !r && !i && !s && e,
19
+ warnId: `${a}-warn-msg`,
20
20
  validation: null
21
21
  };
22
- return i.invalid && (i.validation = /* @__PURE__ */ d("div", { className: `${n}-input__validation ${n}-${a}-input--invalid`, id: i.invalidId, children: e })), i.warn && (i.validation = /* @__PURE__ */ d("div", { className: `${n}-input__validation ${n}-${a}-input--warn`, id: i.warnId, children: v })), i;
22
+ return n.invalid && (n.validation = /* @__PURE__ */ t("div", { className: `${o}-input__validation ${o}-${l}-input--invalid`, id: n.invalidId, children: d })), n.warn && (n.validation = /* @__PURE__ */ t("div", { className: `${o}-input__validation ${o}-${l}-input--warn`, id: n.warnId, children: u })), n;
23
23
  }
24
- const p = (/* @__PURE__ */ new Date()).getFullYear();
24
+ const p = (/* @__PURE__ */ new Date()).getFullYear(), f = (i, a) => i ?? a;
25
25
  export {
26
26
  p as defaultYear,
27
- n as px,
27
+ f as nullishCoalescing,
28
+ o as px,
28
29
  c as useNormalizedInputProps
29
30
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phillips/seldon",
3
- "version": "1.19.1",
3
+ "version": "1.19.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/PhillipsAuctionHouse/seldon"
@@ -49,45 +49,46 @@
49
49
  "@semantic-release/github": "^10.0.3",
50
50
  "@storybook/addon-essentials": "^7.6.18",
51
51
  "@storybook/addon-interactions": "^7.0.22",
52
- "@storybook/addon-links": "^7.6.18",
52
+ "@storybook/addon-links": "^7.6.19",
53
53
  "@storybook/addon-styling": "^1.3.7",
54
54
  "@storybook/blocks": "^7.0.22",
55
55
  "@storybook/react": "^7.0.22",
56
- "@storybook/react-vite": "^7.6.18",
56
+ "@storybook/react-vite": "^7.6.19",
57
57
  "@testing-library/jest-dom": "^5.17.0",
58
58
  "@testing-library/react": "^14.0.0",
59
59
  "@testing-library/user-event": "^14.5.2",
60
60
  "@types/color": "^3.0.6",
61
- "@types/jest": "^29.5.3",
61
+ "@types/jest": "^29.5.12",
62
62
  "@types/react": "^18.3.1",
63
63
  "@types/react-dom": "^18.0.11",
64
64
  "@typescript-eslint/eslint-plugin": "^5.59.0",
65
- "@typescript-eslint/parser": "^5.59.0",
66
- "@vitejs/plugin-react": "^4.0.0",
65
+ "@typescript-eslint/parser": "^5.62.0",
66
+ "@vitejs/plugin-react": "^4.2.1",
67
67
  "color": "^4.2.3",
68
- "eslint": "^8.38.0",
68
+ "eslint": "^8.57.0",
69
69
  "eslint-plugin-react-hooks": "^4.6.2",
70
- "eslint-plugin-react-refresh": "^0.4.6",
70
+ "eslint-plugin-react-refresh": "^0.4.7",
71
71
  "eslint-plugin-storybook": "^0.8.0",
72
72
  "husky": "^9.0.11",
73
- "jest": "^29.6.1",
73
+ "jest": "^29.7.0",
74
74
  "jest-environment-jsdom": "^29.6.1",
75
- "prettier": "3.0.3",
76
- "react-docgen-typescript": "^2.2.2",
75
+ "prettier": "3.2.5",
77
76
  "react": "^18.3.1",
77
+ "react-docgen-typescript": "^2.2.2",
78
78
  "react-dom": "^18.2.0",
79
79
  "rimraf": "^5.0.5",
80
80
  "rollup-plugin-copy": "^3.5.0",
81
81
  "rollup-plugin-peer-deps-external": "^2.2.4",
82
- "sass": "^1.75.0",
83
- "semantic-release": "^21.0.5",
84
- "storybook": "^7.6.18",
82
+ "sass": "^1.77.0",
83
+ "semantic-release": "^23.0.8",
84
+ "storybook": "^7.6.19",
85
85
  "stylelint": "^16.4.0",
86
86
  "stylelint-config-standard": "^36.0.0",
87
87
  "stylelint-config-standard-scss": "^13.1.0",
88
88
  "stylelint-order": "^6.0.4",
89
89
  "stylelint-scss": "^6.2.1",
90
90
  "ts-jest": "^29.1.2",
91
+ "ts-node": "^10.9.2",
91
92
  "typescript": "^5.0.2",
92
93
  "vite": "^4.5.3",
93
94
  "vite-plugin-dts": "^2.3.0",