@phillips/seldon 1.26.0 → 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/components/Button/Button.d.ts +1 -1
- package/dist/components/Button/Button.js +33 -32
- 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/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 +8 -6
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.26.
|
|
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,18 +48,18 @@
|
|
|
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.2.
|
|
51
|
+
"@figma/code-connect": "^0.2.1",
|
|
50
52
|
"@semantic-release/changelog": "^6.0.3",
|
|
51
53
|
"@semantic-release/git": "^10.0.1",
|
|
52
54
|
"@semantic-release/github": "^10.0.6",
|
|
53
|
-
"@storybook/addon-essentials": "^8.1.
|
|
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.
|
|
62
|
+
"@storybook/theming": "^8.1.10",
|
|
61
63
|
"@testing-library/jest-dom": "^6.4.6",
|
|
62
64
|
"@testing-library/react": "^16.0.0",
|
|
63
65
|
"@testing-library/user-event": "^14.5.2",
|
|
@@ -82,7 +84,7 @@
|
|
|
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",
|