@phillips/seldon 1.34.0 → 1.35.0
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 +2 -1
- package/dist/components/Button/Button.js +17 -16
- package/dist/components/Button/types.d.ts +5 -0
- package/dist/components/Button/types.js +4 -0
- package/dist/components/Header/Header.js +34 -34
- package/dist/components/IconButton/IconButton.js +13 -12
- package/dist/components/Search/Search.d.ts +44 -3
- package/dist/components/Search/Search.js +113 -43
- package/dist/components/Search/SearchResults/SearchResults.d.ts +13 -0
- package/dist/components/Search/SearchResults/SearchResults.js +16 -0
- package/dist/components/Social/Social.js +14 -13
- package/dist/components/Subscribe/Subscribe.js +37 -27
- package/dist/components/ViewingsList/ViewingsListCard.js +145 -114
- package/dist/index.d.ts +1 -0
- package/dist/index.js +84 -80
- package/dist/scss/components/Input/_input.scss +2 -1
- package/dist/scss/components/Navigation/NavigationItem/_navigationItem.scss +2 -2
- package/dist/scss/components/Search/_search.scss +54 -5
- package/dist/utils/index.d.ts +10 -0
- package/dist/utils/index.js +40 -31
- package/package.json +2 -2
package/dist/utils/index.js
CHANGED
|
@@ -1,45 +1,54 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { kebabCase as
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { kebabCase as d } from "../node_modules/change-case/dist/index.js";
|
|
3
|
+
import * as u from "react";
|
|
4
|
+
const i = "phillips", v = ({ id: e, ...n }, a) => {
|
|
5
|
+
const t = d(a);
|
|
5
6
|
return {
|
|
6
|
-
...
|
|
7
|
-
"data-testid":
|
|
8
|
-
className: `${
|
|
7
|
+
...n,
|
|
8
|
+
"data-testid": e ? `${t}-${e}` : `${t}`,
|
|
9
|
+
className: `${i}-${t}`
|
|
9
10
|
};
|
|
10
11
|
};
|
|
11
|
-
var
|
|
12
|
-
const
|
|
12
|
+
var p = /* @__PURE__ */ ((e) => (e.xs = "xs", e.sm = "sm", e.md = "md", e.lg = "lg", e.xl = "xl", e))(p || {});
|
|
13
|
+
const g = () => {
|
|
13
14
|
};
|
|
14
15
|
function x({
|
|
15
|
-
disabled:
|
|
16
|
-
id:
|
|
17
|
-
invalid:
|
|
18
|
-
invalidText:
|
|
19
|
-
readOnly:
|
|
20
|
-
type:
|
|
21
|
-
warn:
|
|
22
|
-
warnText:
|
|
16
|
+
disabled: e = !1,
|
|
17
|
+
id: n,
|
|
18
|
+
invalid: a = !1,
|
|
19
|
+
invalidText: t = "invalid",
|
|
20
|
+
readOnly: r = !1,
|
|
21
|
+
type: s,
|
|
22
|
+
warn: l = !1,
|
|
23
|
+
warnText: c
|
|
23
24
|
}) {
|
|
24
|
-
const
|
|
25
|
-
disabled: !
|
|
26
|
-
invalid: !
|
|
27
|
-
invalidId: `${
|
|
28
|
-
type:
|
|
29
|
-
warn: !
|
|
30
|
-
warnId: `${
|
|
25
|
+
const o = {
|
|
26
|
+
disabled: !r && e,
|
|
27
|
+
invalid: !r && !e && a,
|
|
28
|
+
invalidId: `${n}-error-msg`,
|
|
29
|
+
type: s === "toggle" ? "checkbox" : s,
|
|
30
|
+
warn: !r && !e && !a && l,
|
|
31
|
+
warnId: `${n}-warn-msg`,
|
|
31
32
|
validation: null
|
|
32
33
|
};
|
|
33
|
-
return
|
|
34
|
+
return o.invalid && (o.validation = /* @__PURE__ */ m("div", { className: `${i}-input__validation ${i}-${s}-input--invalid`, id: o.invalidId, children: t })), o.warn && (o.validation = /* @__PURE__ */ m("div", { className: `${i}-input__validation ${i}-${s}-input--warn`, id: o.warnId, children: c })), o;
|
|
34
35
|
}
|
|
35
|
-
const
|
|
36
|
+
const C = (/* @__PURE__ */ new Date()).getFullYear(), w = (e, n = "end", a = "vertical") => `${i}-padding-${a}-${e}-${n}`, h = (e) => /(.+)@(.+){2,}\.(.+){2,}/i.test(e), I = function(e, n, a = !1) {
|
|
37
|
+
const t = u.Children.toArray(e).filter((r) => r && r.type === n && !a ? r : r && r.type !== n && a);
|
|
38
|
+
return t.length > 0 ? t : null;
|
|
39
|
+
}, N = (e) => {
|
|
40
|
+
const n = e.split("?"), a = new URLSearchParams(n[1]), r = Array.from(a.entries()).map(([l, c]) => [l, encodeURIComponent(c)]).map(([l, c]) => `${l}=${c}`).join("&");
|
|
41
|
+
return `${n[0]}?${r}`;
|
|
42
|
+
};
|
|
36
43
|
export {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
44
|
+
p as PaddingTokens,
|
|
45
|
+
C as defaultYear,
|
|
46
|
+
h as emailValidation,
|
|
47
|
+
N as encodeURLSearchParams,
|
|
48
|
+
I as findChildrenOfType,
|
|
40
49
|
w as generatePaddingClassName,
|
|
41
50
|
v as getCommonProps,
|
|
42
|
-
|
|
43
|
-
|
|
51
|
+
g as noOp,
|
|
52
|
+
i as px,
|
|
44
53
|
x as useNormalizedInputProps
|
|
45
54
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phillips/seldon",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.35.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/PhillipsAuctionHouse/seldon"
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@semantic-release/changelog": "^6.0.3",
|
|
55
55
|
"@semantic-release/git": "^10.0.1",
|
|
56
56
|
"@semantic-release/github": "^10.1.0",
|
|
57
|
-
"@storybook/addon-essentials": "^8.2.
|
|
57
|
+
"@storybook/addon-essentials": "^8.2.7",
|
|
58
58
|
"@storybook/addon-interactions": "^8.1.4",
|
|
59
59
|
"@storybook/addon-links": "^8.1.4",
|
|
60
60
|
"@storybook/addon-mdx-gfm": "^8.2.4",
|