@phillips/seldon 1.33.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/Accordion/AccordionItem.d.ts +5 -1
- package/dist/components/Accordion/AccordionItem.js +59 -58
- 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/Footer/Footer.d.ts +1 -1
- package/dist/components/Footer/Footer.js +12 -10
- 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.d.ts +10 -1
- package/dist/components/Social/Social.js +19 -9
- 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/Footer/_footer.scss +79 -32
- 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/scss/components/Social/_social.scss +44 -6
- package/dist/utils/index.d.ts +10 -0
- package/dist/utils/index.js +40 -31
- package/package.json +2 -2
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
right: 0;
|
|
61
61
|
top: 0;
|
|
62
62
|
width: 307px;
|
|
63
|
-
z-index: -
|
|
63
|
+
z-index: -1;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
@include isHeaderDesktop {
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
overflow: hidden;
|
|
75
75
|
position: fixed;
|
|
76
76
|
top: 90px;
|
|
77
|
-
width:
|
|
77
|
+
width: 100%;
|
|
78
78
|
z-index: -1;
|
|
79
79
|
|
|
80
80
|
li {
|
|
@@ -50,11 +50,7 @@
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
&
|
|
54
|
-
background: #323232;
|
|
55
|
-
color: $white;
|
|
56
|
-
display: flex;
|
|
57
|
-
height: 100px;
|
|
53
|
+
&__form {
|
|
58
54
|
overflow: hidden;
|
|
59
55
|
position: absolute;
|
|
60
56
|
right: 0;
|
|
@@ -68,13 +64,28 @@
|
|
|
68
64
|
}
|
|
69
65
|
|
|
70
66
|
&--active {
|
|
67
|
+
overflow: visible;
|
|
71
68
|
width: 50%;
|
|
72
69
|
|
|
73
70
|
@include isHeaderMobile {
|
|
74
71
|
top: $header-height;
|
|
75
72
|
width: 100%;
|
|
76
73
|
}
|
|
74
|
+
|
|
75
|
+
.#{$px}-search__results {
|
|
76
|
+
display: flex;
|
|
77
|
+
flex-direction: column;
|
|
78
|
+
}
|
|
77
79
|
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&__input-wrapper {
|
|
83
|
+
background: #323232;
|
|
84
|
+
color: $white;
|
|
85
|
+
display: flex;
|
|
86
|
+
height: 100px;
|
|
87
|
+
position: relative;
|
|
88
|
+
z-index: 3;
|
|
78
89
|
|
|
79
90
|
&__icon {
|
|
80
91
|
height: 24px;
|
|
@@ -99,4 +110,42 @@
|
|
|
99
110
|
padding: 1rem 2rem;
|
|
100
111
|
}
|
|
101
112
|
}
|
|
113
|
+
|
|
114
|
+
&__results {
|
|
115
|
+
background: $soft-black;
|
|
116
|
+
display: none;
|
|
117
|
+
padding: 1rem 2rem;
|
|
118
|
+
position: absolute;
|
|
119
|
+
top: 100px;
|
|
120
|
+
width: 100%;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
&__result {
|
|
124
|
+
border-bottom: 1px solid $white;
|
|
125
|
+
display: flex;
|
|
126
|
+
padding: 0.625rem 0;
|
|
127
|
+
|
|
128
|
+
&:last-child {
|
|
129
|
+
border-bottom: none;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.phillips-link {
|
|
133
|
+
&:hover {
|
|
134
|
+
border-bottom: none;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
p {
|
|
139
|
+
@include text($body3);
|
|
140
|
+
|
|
141
|
+
color: $white;
|
|
142
|
+
text-transform: none;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
&:hover {
|
|
146
|
+
p {
|
|
147
|
+
color: $cta-blue;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
102
151
|
}
|
|
@@ -3,30 +3,68 @@
|
|
|
3
3
|
@import '../../type';
|
|
4
4
|
|
|
5
5
|
.#{$px}-social {
|
|
6
|
-
align-items: center;
|
|
7
6
|
display: inline-flex;
|
|
8
7
|
flex-direction: column;
|
|
8
|
+
padding: 0;
|
|
9
|
+
width: 100%;
|
|
10
|
+
|
|
11
|
+
@include media($size-sm) {
|
|
12
|
+
align-items: center;
|
|
13
|
+
padding: $spacing-sm;
|
|
14
|
+
width: unset;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&__button {
|
|
18
|
+
color: $pure-black;
|
|
19
|
+
font-size: 0.875rem;
|
|
20
|
+
justify-content: flex-start;
|
|
21
|
+
opacity: 1;
|
|
22
|
+
padding: 0;
|
|
23
|
+
text-decoration: underline;
|
|
24
|
+
white-space: nowrap;
|
|
25
|
+
|
|
26
|
+
@include media($size-sm) {
|
|
27
|
+
justify-content: center;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&:hover {
|
|
31
|
+
background-color: unset;
|
|
32
|
+
color: unset;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&:focus {
|
|
36
|
+
background-color: unset;
|
|
37
|
+
color: unset;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
9
40
|
|
|
10
41
|
@include media($size-sm) {
|
|
11
42
|
align-items: flex-end;
|
|
12
43
|
}
|
|
13
44
|
|
|
14
45
|
&__header {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
46
|
+
color: $pure-black;
|
|
47
|
+
font-family: $Distinct;
|
|
48
|
+
font-size: 1rem;
|
|
49
|
+
font-weight: 600;
|
|
50
|
+
margin-bottom: 0.75rem;
|
|
18
51
|
}
|
|
19
52
|
|
|
20
53
|
ul {
|
|
21
54
|
align-items: center;
|
|
55
|
+
border-top: 1px solid #eae8e4;
|
|
22
56
|
display: flex;
|
|
23
57
|
gap: 0 1.25rem;
|
|
24
58
|
list-style: none;
|
|
25
|
-
margin:
|
|
26
|
-
padding: 0;
|
|
59
|
+
margin: $spacing-md 0 $spacing-md;
|
|
60
|
+
padding: $spacing-md 0 0;
|
|
27
61
|
|
|
28
62
|
@include media($size-sm) {
|
|
29
63
|
gap: 0 1rem;
|
|
64
|
+
justify-content: flex-end;
|
|
65
|
+
margin: $spacing-sm 0 $spacing-md;
|
|
66
|
+
padding: $spacing-sm 0 0;
|
|
67
|
+
width: 100%;
|
|
30
68
|
}
|
|
31
69
|
|
|
32
70
|
li {
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -81,4 +81,14 @@ export declare const generatePaddingClassName: (padding: PaddingTokens, side?: '
|
|
|
81
81
|
|
|
82
82
|
*/
|
|
83
83
|
export declare const emailValidation: (email: string) => boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Return array of children of a specific type
|
|
86
|
+
*
|
|
87
|
+
* @param children - React children
|
|
88
|
+
* @param componentType - React component type
|
|
89
|
+
* @param inverse - Return children that are not of the specified type
|
|
90
|
+
*
|
|
91
|
+
*/
|
|
92
|
+
export declare const findChildrenOfType: (children: React.ReactNode, componentType?: React.ElementType, inverse?: boolean) => (string | number | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal)[] | null;
|
|
93
|
+
export declare const encodeURLSearchParams: (url: string) => string;
|
|
84
94
|
export {};
|
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",
|