@phillips/seldon 1.25.1 → 1.26.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.
- package/dist/_virtual/_commonjsHelpers.js +2 -4
- package/dist/components/Button/Button.d.ts +1 -1
- package/dist/components/Button/Button.js +33 -32
- package/dist/components/ErrorBoundary/ErrorBoundary.js +4 -4
- package/dist/components/Grid/Grid.d.ts +2 -2
- package/dist/components/Grid/Grid.js +8 -16
- package/dist/components/GridItem/GridItem.d.ts +1 -1
- package/dist/components/GridItem/GridItem.js +21 -22
- package/dist/components/HeroBanner/HeroBanner.d.ts +3 -2
- package/dist/components/HeroBanner/HeroBanner.js +36 -23
- package/dist/components/IconButton/IconButton.js +18 -14
- package/dist/components/Link/Link.d.ts +2 -2
- package/dist/components/Link/Link.js +21 -23
- package/dist/components/Link/utils.d.ts +1 -1
- package/dist/components/Link/utils.js +6 -6
- package/dist/components/LinkBlock/LinkBlock.d.ts +1 -1
- package/dist/components/LinkBlock/LinkBlock.js +10 -10
- package/dist/components/LinkList/LinkList.d.ts +1 -1
- package/dist/components/LinkList/LinkList.js +11 -10
- package/dist/components/Modal/Modal.js +43 -36
- package/dist/components/Row/Row.d.ts +1 -1
- package/dist/components/Row/Row.js +21 -23
- package/dist/components/Social/Social.d.ts +2 -2
- package/dist/components/Social/Social.js +11 -8
- package/dist/components/SplitPanel/SplitPanel.d.ts +1 -1
- package/dist/components/SplitPanel/SplitPanel.js +22 -21
- package/dist/components/Subscribe/Subscribe.d.ts +1 -1
- package/dist/components/Subscribe/Subscribe.js +41 -52
- package/dist/components/Text/Text.d.ts +1 -1
- package/dist/components/Text/Text.js +12 -20
- package/dist/components/ViewingsList/ViewingsList.d.ts +2 -2
- package/dist/components/ViewingsList/ViewingsList.js +43 -45
- package/dist/index.d.ts +2 -2
- package/dist/index.js +61 -60
- package/dist/node_modules/change-case/dist/index.js +64 -0
- package/dist/node_modules/object-assign/index.js +1 -2
- package/dist/node_modules/prop-types/checkPropTypes.js +1 -2
- package/dist/node_modules/prop-types/factoryWithThrowingShims.js +1 -2
- package/dist/node_modules/prop-types/factoryWithTypeCheckers.js +1 -2
- package/dist/node_modules/prop-types/lib/ReactPropTypesSecret.js +1 -2
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +1 -2
- package/dist/node_modules/react-modal/lib/helpers/scopeTab.js +1 -2
- package/dist/node_modules/react-modal/lib/helpers/tabbable.js +2 -4
- package/dist/scss/components/Footer/_footer.scss +1 -0
- package/dist/scss/components/Grid/_grid.scss +2 -4
- package/dist/scss/styles.scss +3 -5
- package/dist/utils/index.d.ts +9 -10
- package/dist/utils/index.js +38 -29
- package/package.json +15 -13
|
@@ -9,8 +9,7 @@ import { __exports as r } from "../../../../../_virtual/react-is.production.min.
|
|
|
9
9
|
*/
|
|
10
10
|
var _;
|
|
11
11
|
function g() {
|
|
12
|
-
if (_)
|
|
13
|
-
return r;
|
|
12
|
+
if (_) return r;
|
|
14
13
|
_ = 1;
|
|
15
14
|
var t = typeof Symbol == "function" && Symbol.for, a = t ? Symbol.for("react.element") : 60103, b = t ? Symbol.for("react.portal") : 60106, n = t ? Symbol.for("react.fragment") : 60107, c = t ? Symbol.for("react.strict_mode") : 60108, f = t ? Symbol.for("react.profiler") : 60114, i = t ? Symbol.for("react.provider") : 60109, s = t ? Symbol.for("react.context") : 60110, d = t ? Symbol.for("react.async_mode") : 60111, u = t ? Symbol.for("react.concurrent_mode") : 60111, y = t ? Symbol.for("react.forward_ref") : 60112, l = t ? Symbol.for("react.suspense") : 60113, x = t ? Symbol.for("react.suspense_list") : 60120, m = t ? Symbol.for("react.memo") : 60115, p = t ? Symbol.for("react.lazy") : 60116, C = t ? Symbol.for("react.block") : 60121, M = t ? Symbol.for("react.fundamental") : 60117, v = t ? Symbol.for("react.responder") : 60118, w = t ? Symbol.for("react.scope") : 60119;
|
|
16
15
|
function o(e) {
|
|
@@ -21,8 +21,7 @@ import { __module as n } from "../../../../_virtual/tabbable.js";
|
|
|
21
21
|
}
|
|
22
22
|
function b(t) {
|
|
23
23
|
var e = t.offsetWidth <= 0 && t.offsetHeight <= 0;
|
|
24
|
-
if (e && !t.innerHTML)
|
|
25
|
-
return !0;
|
|
24
|
+
if (e && !t.innerHTML) return !0;
|
|
26
25
|
try {
|
|
27
26
|
var r = window.getComputedStyle(t), o = r.getPropertyValue("display");
|
|
28
27
|
return e ? o !== s && c(t, r) : o === d;
|
|
@@ -32,8 +31,7 @@ import { __module as n } from "../../../../_virtual/tabbable.js";
|
|
|
32
31
|
}
|
|
33
32
|
function l(t) {
|
|
34
33
|
for (var e = t, r = t.getRootNode && t.getRootNode(); e && e !== document.body; ) {
|
|
35
|
-
if (r && e === r && (e = r.host.parentNode), b(e))
|
|
36
|
-
return !1;
|
|
34
|
+
if (r && e === r && (e = r.host.parentNode), b(e)) return !1;
|
|
37
35
|
e = e.parentNode;
|
|
38
36
|
}
|
|
39
37
|
return !0;
|
package/dist/scss/styles.scss
CHANGED
|
@@ -7,11 +7,12 @@
|
|
|
7
7
|
@import './typography';
|
|
8
8
|
@import './sharedClasses';
|
|
9
9
|
|
|
10
|
+
// 📑 Pages
|
|
11
|
+
@import 'pages/page';
|
|
12
|
+
|
|
10
13
|
// ⚛️ Components
|
|
11
14
|
@import 'components/Button/button';
|
|
12
15
|
@import 'components/IconButton/iconButton';
|
|
13
|
-
|
|
14
|
-
// @import 'components/DatePicker/datePicker';
|
|
15
16
|
@import 'components/Footer/footer';
|
|
16
17
|
@import 'components/Grid/grid';
|
|
17
18
|
@import 'components/Header/header';
|
|
@@ -29,6 +30,3 @@
|
|
|
29
30
|
@import 'components/LinkList/linkList';
|
|
30
31
|
@import 'components/Text/text';
|
|
31
32
|
@import 'components/Modal/modal';
|
|
32
|
-
|
|
33
|
-
// 📑 Pages
|
|
34
|
-
@import 'pages/page';
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export declare const px = "phillips";
|
|
3
|
+
/**
|
|
4
|
+
* Returns standard props values incorporating the component name into the class name and data-testid
|
|
5
|
+
*/
|
|
6
|
+
export declare const getCommonProps: ({ id, ...props }: {
|
|
7
|
+
id?: string | undefined;
|
|
8
|
+
}, componentName: string) => {
|
|
9
|
+
'data-testid': string;
|
|
10
|
+
className: string;
|
|
11
|
+
};
|
|
3
12
|
export declare enum PaddingTokens {
|
|
4
13
|
xs = "xs",
|
|
5
14
|
sm = "sm",
|
|
@@ -8,16 +17,6 @@ export declare enum PaddingTokens {
|
|
|
8
17
|
xl = "xl"
|
|
9
18
|
}
|
|
10
19
|
export declare const noOp: () => void;
|
|
11
|
-
export interface CommonProps {
|
|
12
|
-
/**
|
|
13
|
-
* Optional className to be applied to the outer most element
|
|
14
|
-
*/
|
|
15
|
-
className?: string;
|
|
16
|
-
/**
|
|
17
|
-
* A custom `id`
|
|
18
|
-
*/
|
|
19
|
-
id?: string;
|
|
20
|
-
}
|
|
21
20
|
export interface InputProps {
|
|
22
21
|
/**
|
|
23
22
|
* Specify whether the `<input>` should be disabled
|
package/dist/utils/index.js
CHANGED
|
@@ -1,36 +1,45 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { kebabCase as c } from "../node_modules/change-case/dist/index.js";
|
|
3
|
+
const t = "phillips", v = ({ id: a, ...i }, e) => {
|
|
4
|
+
const l = c(e);
|
|
5
|
+
return {
|
|
6
|
+
...i,
|
|
7
|
+
"data-testid": a ? `${l}-${a}` : `${l}`,
|
|
8
|
+
className: `${t}-${l}`
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
var $ = /* @__PURE__ */ ((a) => (a.xs = "xs", a.sm = "sm", a.md = "md", a.lg = "lg", a.xl = "xl", a))($ || {});
|
|
12
|
+
const f = () => {
|
|
5
13
|
};
|
|
6
|
-
function
|
|
7
|
-
disabled:
|
|
8
|
-
id:
|
|
9
|
-
invalid:
|
|
10
|
-
invalidText:
|
|
11
|
-
readOnly:
|
|
12
|
-
type:
|
|
13
|
-
warn:
|
|
14
|
-
warnText:
|
|
14
|
+
function x({
|
|
15
|
+
disabled: a = !1,
|
|
16
|
+
id: i,
|
|
17
|
+
invalid: e = !1,
|
|
18
|
+
invalidText: l = "invalid",
|
|
19
|
+
readOnly: s = !1,
|
|
20
|
+
type: r,
|
|
21
|
+
warn: m = !1,
|
|
22
|
+
warnText: d
|
|
15
23
|
}) {
|
|
16
|
-
const
|
|
17
|
-
disabled: !
|
|
18
|
-
invalid: !
|
|
19
|
-
invalidId: `${
|
|
20
|
-
type:
|
|
21
|
-
warn: !
|
|
22
|
-
warnId: `${
|
|
24
|
+
const n = {
|
|
25
|
+
disabled: !s && a,
|
|
26
|
+
invalid: !s && !a && e,
|
|
27
|
+
invalidId: `${i}-error-msg`,
|
|
28
|
+
type: r === "toggle" ? "checkbox" : r,
|
|
29
|
+
warn: !s && !a && !e && m,
|
|
30
|
+
warnId: `${i}-warn-msg`,
|
|
23
31
|
validation: null
|
|
24
32
|
};
|
|
25
|
-
return
|
|
33
|
+
return n.invalid && (n.validation = /* @__PURE__ */ o("div", { className: `${t}-input__validation ${t}-${r}-input--invalid`, id: n.invalidId, children: l })), n.warn && (n.validation = /* @__PURE__ */ o("div", { className: `${t}-input__validation ${t}-${r}-input--warn`, id: n.warnId, children: d })), n;
|
|
26
34
|
}
|
|
27
|
-
const
|
|
35
|
+
const g = (/* @__PURE__ */ new Date()).getFullYear(), w = (a, i = "end", e = "vertical") => `${t}-padding-${e}-${a}-${i}`, N = (a) => /(.+)@(.+){2,}\.(.+){2,}/i.test(a);
|
|
28
36
|
export {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
v as
|
|
34
|
-
|
|
35
|
-
|
|
37
|
+
$ as PaddingTokens,
|
|
38
|
+
g as defaultYear,
|
|
39
|
+
N as emailValidation,
|
|
40
|
+
w as generatePaddingClassName,
|
|
41
|
+
v as getCommonProps,
|
|
42
|
+
f as noOp,
|
|
43
|
+
t as px,
|
|
44
|
+
x as useNormalizedInputProps
|
|
36
45
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phillips/seldon",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.26.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/PhillipsAuctionHouse/seldon"
|
|
@@ -32,12 +32,14 @@
|
|
|
32
32
|
"preview": "npx http-server storybook-static",
|
|
33
33
|
"clean": "rimraf './dist'",
|
|
34
34
|
"clean:stories": "rimraf './storybook-static'",
|
|
35
|
+
"create-component": "node --no-warnings --loader ts-node/esm .template/scripts/createComponent.ts",
|
|
35
36
|
"format": "prettier . --write",
|
|
36
37
|
"lint": "tsc --noEmit && eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0 && npm run lint:styles",
|
|
37
38
|
"lint:styles": "stylelint \"src/**/*.scss\" --fix",
|
|
38
39
|
"prepare": "husky install"
|
|
39
40
|
},
|
|
40
41
|
"dependencies": {
|
|
42
|
+
"change-case": "^5.4.4",
|
|
41
43
|
"classnames": "^2.5.1",
|
|
42
44
|
"flatpickr": "^4.6.13",
|
|
43
45
|
"react-modal": "^3.16.1"
|
|
@@ -46,20 +48,20 @@
|
|
|
46
48
|
"@chromatic-com/storybook": "^1.5.0",
|
|
47
49
|
"@commitlint/cli": "^19.3.0",
|
|
48
50
|
"@commitlint/config-conventional": "^19.2.2",
|
|
49
|
-
"@figma/code-connect": "^0.1
|
|
51
|
+
"@figma/code-connect": "^0.2.1",
|
|
50
52
|
"@semantic-release/changelog": "^6.0.3",
|
|
51
53
|
"@semantic-release/git": "^10.0.1",
|
|
52
|
-
"@semantic-release/github": "^10.0.
|
|
53
|
-
"@storybook/addon-essentials": "^8.1.
|
|
54
|
+
"@semantic-release/github": "^10.0.6",
|
|
55
|
+
"@storybook/addon-essentials": "^8.1.10",
|
|
54
56
|
"@storybook/addon-interactions": "^8.1.4",
|
|
55
57
|
"@storybook/addon-links": "^8.1.4",
|
|
56
|
-
"@storybook/addon-mdx-gfm": "^8.1.
|
|
58
|
+
"@storybook/addon-mdx-gfm": "^8.1.10",
|
|
57
59
|
"@storybook/blocks": "^8.1.4",
|
|
58
60
|
"@storybook/react": "^8.1.4",
|
|
59
61
|
"@storybook/react-vite": "^8.1.4",
|
|
60
|
-
"@storybook/theming": "^8.1.
|
|
61
|
-
"@testing-library/jest-dom": "^6.4.
|
|
62
|
-
"@testing-library/react": "^
|
|
62
|
+
"@storybook/theming": "^8.1.10",
|
|
63
|
+
"@testing-library/jest-dom": "^6.4.6",
|
|
64
|
+
"@testing-library/react": "^16.0.0",
|
|
63
65
|
"@testing-library/user-event": "^14.5.2",
|
|
64
66
|
"@types/color": "^3.0.6",
|
|
65
67
|
"@types/react": "^18.3.3",
|
|
@@ -67,7 +69,7 @@
|
|
|
67
69
|
"@types/react-modal": "^3.16.3",
|
|
68
70
|
"@typescript-eslint/eslint-plugin": "^5.62.0",
|
|
69
71
|
"@typescript-eslint/parser": "^5.62.0",
|
|
70
|
-
"@vitejs/plugin-react": "^4.3.
|
|
72
|
+
"@vitejs/plugin-react": "^4.3.1",
|
|
71
73
|
"@vitest/coverage-v8": "^1.6.0",
|
|
72
74
|
"color": "^4.2.3",
|
|
73
75
|
"eslint": "^8.57.0",
|
|
@@ -75,24 +77,24 @@
|
|
|
75
77
|
"eslint-plugin-react-refresh": "^0.4.7",
|
|
76
78
|
"eslint-plugin-storybook": "^0.8.0",
|
|
77
79
|
"husky": "^9.0.11",
|
|
78
|
-
"prettier": "3.3.
|
|
80
|
+
"prettier": "3.3.2",
|
|
79
81
|
"react": "^18.3.1",
|
|
80
82
|
"react-docgen-typescript": "^2.2.2",
|
|
81
83
|
"react-dom": "^18.2.0",
|
|
82
84
|
"rimraf": "^5.0.7",
|
|
83
85
|
"rollup-plugin-copy": "^3.5.0",
|
|
84
86
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
85
|
-
"sass": "^1.77.
|
|
87
|
+
"sass": "^1.77.6",
|
|
86
88
|
"semantic-release": "^23.1.1",
|
|
87
89
|
"storybook": "^8.1.4",
|
|
88
90
|
"stylelint": "^16.6.1",
|
|
89
91
|
"stylelint-config-standard": "^36.0.0",
|
|
90
92
|
"stylelint-config-standard-scss": "^13.1.0",
|
|
91
93
|
"stylelint-order": "^6.0.4",
|
|
92
|
-
"stylelint-scss": "^6.3.
|
|
94
|
+
"stylelint-scss": "^6.3.1",
|
|
93
95
|
"ts-node": "^10.9.2",
|
|
94
96
|
"typescript": "^5.4.5",
|
|
95
|
-
"vite": "^5.
|
|
97
|
+
"vite": "^5.3.1",
|
|
96
98
|
"vite-plugin-dts": "^2.3.0",
|
|
97
99
|
"vite-plugin-svgr": "^4.2.0",
|
|
98
100
|
"vite-tsconfig-paths": "^4.3.2",
|