@phillips/seldon 1.19.2 → 1.19.3
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,10 +1,9 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var e = (t, r, o) => (
|
|
4
|
-
import { jsx as
|
|
5
|
-
import * as
|
|
6
|
-
|
|
7
|
-
class h extends l.Component {
|
|
1
|
+
var i = Object.defineProperty;
|
|
2
|
+
var c = (t, r, o) => r in t ? i(t, r, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[r] = o;
|
|
3
|
+
var e = (t, r, o) => (c(t, typeof r != "symbol" ? r + "" : r, o), o);
|
|
4
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
5
|
+
import * as p from "react";
|
|
6
|
+
class h extends p.Component {
|
|
8
7
|
constructor() {
|
|
9
8
|
super(...arguments);
|
|
10
9
|
e(this, "state", {
|
|
@@ -14,12 +13,12 @@ class h extends l.Component {
|
|
|
14
13
|
static getDerivedStateFromError() {
|
|
15
14
|
return { hasError: !0 };
|
|
16
15
|
}
|
|
17
|
-
componentDidCatch(o,
|
|
18
|
-
var a;
|
|
19
|
-
(
|
|
16
|
+
componentDidCatch(o, n) {
|
|
17
|
+
var a, s;
|
|
18
|
+
(s = this.props) == null || s.logger(o, (a = n.componentStack) != null ? a : "ErrorBoundary caught an error");
|
|
20
19
|
}
|
|
21
20
|
render() {
|
|
22
|
-
return this.state.hasError ? this.props.fallback || /* @__PURE__ */
|
|
21
|
+
return this.state.hasError ? this.props.fallback || /* @__PURE__ */ l("h2", { children: "Sorry... An error occurred and we are looking into it" }) : this.props.children;
|
|
23
22
|
}
|
|
24
23
|
}
|
|
25
24
|
e(h, "defaultProps", {
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import { jsxs as k, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import d from "../../node_modules/classnames/index.js";
|
|
3
|
+
import { px as p } from "../../utils/index.js";
|
|
4
4
|
import f from "../Link/Link.js";
|
|
5
5
|
import { LinkVariants as b } from "../Link/utils.js";
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
/* @__PURE__ */
|
|
6
|
+
const j = ({ linkProps: s, description: e, className: l, id: t, ...m }) => {
|
|
7
|
+
var o;
|
|
8
|
+
const a = `${p}-link-block`, r = d(a, l), c = (o = s.element) != null ? o : f, n = t ? `link-block-${t}` : "link-block";
|
|
9
|
+
return /* @__PURE__ */ k("div", { ...m, className: r, id: t, "data-testid": n, children: [
|
|
10
|
+
/* @__PURE__ */ i(c, { ...s, "data-testid": `${n}-link`, variant: b.list }),
|
|
11
|
+
/* @__PURE__ */ i("p", { className: `${a}__description`, children: e })
|
|
11
12
|
] });
|
|
12
13
|
};
|
|
13
14
|
export {
|
|
14
|
-
|
|
15
|
+
j as default
|
|
15
16
|
};
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -65,9 +65,4 @@ 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;
|
|
73
68
|
export {};
|
package/dist/utils/index.js
CHANGED
|
@@ -1,30 +1,29 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
const
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
+
const n = "phillips";
|
|
3
3
|
function c({
|
|
4
|
-
disabled:
|
|
5
|
-
id:
|
|
6
|
-
invalid:
|
|
7
|
-
invalidText:
|
|
4
|
+
disabled: l = !1,
|
|
5
|
+
id: o,
|
|
6
|
+
invalid: t = !1,
|
|
7
|
+
invalidText: e = "invalid",
|
|
8
8
|
readOnly: r = !1,
|
|
9
|
-
type:
|
|
10
|
-
warn:
|
|
11
|
-
warnText:
|
|
9
|
+
type: a,
|
|
10
|
+
warn: s = !1,
|
|
11
|
+
warnText: v
|
|
12
12
|
}) {
|
|
13
|
-
const
|
|
14
|
-
disabled: !r &&
|
|
15
|
-
invalid: !r && !
|
|
16
|
-
invalidId: `${
|
|
17
|
-
type:
|
|
18
|
-
warn: !r && !
|
|
19
|
-
warnId: `${
|
|
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`,
|
|
20
20
|
validation: null
|
|
21
21
|
};
|
|
22
|
-
return
|
|
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;
|
|
23
23
|
}
|
|
24
|
-
const p = (/* @__PURE__ */ new Date()).getFullYear()
|
|
24
|
+
const p = (/* @__PURE__ */ new Date()).getFullYear();
|
|
25
25
|
export {
|
|
26
26
|
p as defaultYear,
|
|
27
|
-
|
|
28
|
-
o as px,
|
|
27
|
+
n as px,
|
|
29
28
|
c as useNormalizedInputProps
|
|
30
29
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phillips/seldon",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.3",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/PhillipsAuctionHouse/seldon"
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"@testing-library/user-event": "^14.5.2",
|
|
60
60
|
"@types/color": "^3.0.6",
|
|
61
61
|
"@types/jest": "^29.5.12",
|
|
62
|
-
"@types/react": "^18.3.
|
|
62
|
+
"@types/react": "^18.3.2",
|
|
63
63
|
"@types/react-dom": "^18.0.11",
|
|
64
64
|
"@typescript-eslint/eslint-plugin": "^5.59.0",
|
|
65
65
|
"@typescript-eslint/parser": "^5.62.0",
|