@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.
Files changed (38) hide show
  1. package/dist/components/Button/Button.d.ts +1 -1
  2. package/dist/components/Button/Button.js +33 -32
  3. package/dist/components/Grid/Grid.d.ts +2 -2
  4. package/dist/components/Grid/Grid.js +8 -16
  5. package/dist/components/GridItem/GridItem.d.ts +1 -1
  6. package/dist/components/GridItem/GridItem.js +21 -22
  7. package/dist/components/HeroBanner/HeroBanner.d.ts +3 -2
  8. package/dist/components/HeroBanner/HeroBanner.js +36 -23
  9. package/dist/components/IconButton/IconButton.js +18 -14
  10. package/dist/components/Link/Link.d.ts +2 -2
  11. package/dist/components/Link/Link.js +21 -23
  12. package/dist/components/Link/utils.d.ts +1 -1
  13. package/dist/components/Link/utils.js +6 -6
  14. package/dist/components/LinkBlock/LinkBlock.d.ts +1 -1
  15. package/dist/components/LinkBlock/LinkBlock.js +10 -10
  16. package/dist/components/LinkList/LinkList.d.ts +1 -1
  17. package/dist/components/LinkList/LinkList.js +11 -10
  18. package/dist/components/Modal/Modal.js +43 -36
  19. package/dist/components/Row/Row.d.ts +1 -1
  20. package/dist/components/Row/Row.js +21 -23
  21. package/dist/components/Social/Social.d.ts +2 -2
  22. package/dist/components/Social/Social.js +11 -8
  23. package/dist/components/SplitPanel/SplitPanel.d.ts +1 -1
  24. package/dist/components/SplitPanel/SplitPanel.js +22 -21
  25. package/dist/components/Subscribe/Subscribe.d.ts +1 -1
  26. package/dist/components/Subscribe/Subscribe.js +41 -52
  27. package/dist/components/Text/Text.d.ts +1 -1
  28. package/dist/components/Text/Text.js +12 -20
  29. package/dist/components/ViewingsList/ViewingsList.d.ts +2 -2
  30. package/dist/components/ViewingsList/ViewingsList.js +43 -45
  31. package/dist/index.d.ts +2 -2
  32. package/dist/index.js +61 -60
  33. package/dist/node_modules/change-case/dist/index.js +64 -0
  34. package/dist/scss/components/Grid/_grid.scss +2 -4
  35. package/dist/scss/styles.scss +3 -5
  36. package/dist/utils/index.d.ts +9 -10
  37. package/dist/utils/index.js +38 -29
  38. package/package.json +8 -6
@@ -1,36 +1,45 @@
1
- import { jsx as s } from "react/jsx-runtime";
2
- const n = "phillips";
3
- var c = /* @__PURE__ */ ((i) => (i.xs = "xs", i.sm = "sm", i.md = "md", i.lg = "lg", i.xl = "xl", i))(c || {});
4
- const v = () => {
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 p({
7
- disabled: i = !1,
8
- id: l,
9
- invalid: t = !1,
10
- invalidText: o = "invalid",
11
- readOnly: r = !1,
12
- type: e,
13
- warn: d = !1,
14
- warnText: m
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 a = {
17
- disabled: !r && i,
18
- invalid: !r && !i && t,
19
- invalidId: `${l}-error-msg`,
20
- type: e === "toggle" ? "checkbox" : e,
21
- warn: !r && !i && !t && d,
22
- warnId: `${l}-warn-msg`,
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 a.invalid && (a.validation = /* @__PURE__ */ s("div", { className: `${n}-input__validation ${n}-${e}-input--invalid`, id: a.invalidId, children: o })), a.warn && (a.validation = /* @__PURE__ */ s("div", { className: `${n}-input__validation ${n}-${e}-input--warn`, id: a.warnId, children: m })), a;
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 $ = (/* @__PURE__ */ new Date()).getFullYear(), x = (i, l = "end", t = "vertical") => `${n}-padding-${t}-${i}-${l}`, f = (i) => /(.+)@(.+){2,}\.(.+){2,}/i.test(i);
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
- c as PaddingTokens,
30
- $ as defaultYear,
31
- f as emailValidation,
32
- x as generatePaddingClassName,
33
- v as noOp,
34
- n as px,
35
- p as useNormalizedInputProps
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.0",
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.0",
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.9",
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.9",
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.9",
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.5",
87
+ "sass": "^1.77.6",
86
88
  "semantic-release": "^23.1.1",
87
89
  "storybook": "^8.1.4",
88
90
  "stylelint": "^16.6.1",