@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.
@@ -60,7 +60,7 @@
60
60
  right: 0;
61
61
  top: 0;
62
62
  width: 307px;
63
- z-index: -10;
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: 100vw;
77
+ width: 100%;
78
78
  z-index: -1;
79
79
 
80
80
  li {
@@ -50,11 +50,7 @@
50
50
  }
51
51
  }
52
52
 
53
- &__input-wrapper {
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
- @include text($heading3);
16
-
17
- margin-bottom: $spacing-xsm;
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: 0 0 $spacing-md;
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 {
@@ -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 {};
@@ -1,45 +1,54 @@
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);
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
- ...i,
7
- "data-testid": a ? `${l}-${a}` : `${l}`,
8
- className: `${t}-${l}`
7
+ ...n,
8
+ "data-testid": e ? `${t}-${e}` : `${t}`,
9
+ className: `${i}-${t}`
9
10
  };
10
11
  };
11
- var $ = /* @__PURE__ */ ((a) => (a.xs = "xs", a.sm = "sm", a.md = "md", a.lg = "lg", a.xl = "xl", a))($ || {});
12
- const f = () => {
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: 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
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 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`,
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 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;
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 g = (/* @__PURE__ */ new Date()).getFullYear(), w = (a, i = "end", e = "vertical") => `${t}-padding-${e}-${a}-${i}`, N = (a) => /(.+)@(.+){2,}\.(.+){2,}/i.test(a);
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
- $ as PaddingTokens,
38
- g as defaultYear,
39
- N as emailValidation,
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
- f as noOp,
43
- t as px,
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.33.0",
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.5",
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",