@phillips/seldon 1.55.1 → 1.56.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.
@@ -17,7 +17,7 @@ export interface NavigationItemProps extends ComponentProps<'li'> {
17
17
  /**
18
18
  * Optional group for navigation items
19
19
  */
20
- navGroup?: 'nav-link-lg' | 'nav-link-sm';
20
+ navGroup?: 'nav-link-start' | 'nav-link-end';
21
21
  /**
22
22
  * Optional type for navigation item
23
23
  */
@@ -1,35 +1,51 @@
1
- import { jsxs as f, jsx as o } from "react/jsx-runtime";
2
- import { getCommonProps as g, findChildrenOfType as v, px as s } from "../../../utils/index.js";
3
- import N from "../../../node_modules/classnames/index.js";
4
- import _, { forwardRef as x, useState as b } from "react";
5
- import { TextVariants as T } from "../../Text/types.js";
6
- import h from "../../Text/Text.js";
1
+ import { jsxs as c, Fragment as _, jsx as e } from "react/jsx-runtime";
2
+ import { getCommonProps as T, findChildrenOfType as b, px as l } from "../../../utils/index.js";
3
+ import x from "../../../node_modules/classnames/index.js";
4
+ import d, { forwardRef as I, useState as M } from "react";
5
+ import { TextVariants as u } from "../../Text/types.js";
6
+ import f from "../../Text/Text.js";
7
7
  import O from "../NavigationList/NavigationList.js";
8
- const I = x(
9
- ({ id: n, label: i, children: m, className: l, onClick: p, ...d }, u) => {
10
- const { className: e, ...c } = g({ id: n }, "NavigationItemTrigger"), [t, a] = b(!1), r = v(m, O);
11
- return /* @__PURE__ */ f(
12
- "li",
13
- {
14
- ...c,
15
- ref: u,
16
- "aria-expanded": t,
17
- className: N(l, e, `${s}-nav__item`, {
18
- [`${e}--hovered`]: t
19
- }),
20
- onClick: p,
21
- onMouseOver: () => a(!0),
22
- onMouseOut: () => a(!1),
23
- ...d,
24
- children: [
25
- /* @__PURE__ */ o("button", { className: `${s}-nav__item-trigger`, type: "button", children: /* @__PURE__ */ o(h, { variant: T.snwHeaderLink, children: i }) }),
26
- r ? _.cloneElement(r[0], { className: `${e}__submenu` }) : void 0
27
- ]
28
- }
29
- );
8
+ import $ from "../../Accordion/Accordion.js";
9
+ import S from "../../Accordion/AccordionItem.js";
10
+ import { SSRMediaQuery as p } from "../../../providers/utils.js";
11
+ const y = ({ id: r, label: n, children: t }) => /* @__PURE__ */ e($, { children: /* @__PURE__ */ e(
12
+ S,
13
+ {
14
+ variation: "sm",
15
+ id: r != null ? r : `${n}-accordion`,
16
+ label: /* @__PURE__ */ e(f, { variant: u.snwHeaderLink, children: n }),
17
+ children: t
18
+ }
19
+ ) }), C = I(
20
+ ({ id: r, label: n, children: t, className: g, onClick: v, ...h }, N) => {
21
+ const { className: o, ...i } = T({ id: r }, "NavigationItemTrigger"), [m, s] = M(!1), a = b(t, O);
22
+ return /* @__PURE__ */ c(_, { children: [
23
+ /* @__PURE__ */ e(p.Media, { lessThan: "md", children: /* @__PURE__ */ e(y, { id: r, label: n, ...i, children: a ? d.cloneElement(a[0], {
24
+ className: `${o}__submenu--mobile`
25
+ }) : void 0 }) }),
26
+ /* @__PURE__ */ e(p.Media, { greaterThanOrEqual: "md", children: /* @__PURE__ */ c(
27
+ "li",
28
+ {
29
+ ...i,
30
+ ref: N,
31
+ "aria-expanded": m,
32
+ className: x(g, o, `${l}-nav__item`, {
33
+ [`${o}--hovered`]: m
34
+ }),
35
+ onClick: v,
36
+ onMouseOver: () => s(!0),
37
+ onMouseOut: () => s(!1),
38
+ ...h,
39
+ children: [
40
+ /* @__PURE__ */ e("button", { className: `${l}-nav__item-trigger`, type: "button", children: /* @__PURE__ */ e(f, { variant: u.snwHeaderLink, children: n }) }),
41
+ a ? d.cloneElement(a[0], { className: `${o}__submenu` }) : void 0
42
+ ]
43
+ }
44
+ ) })
45
+ ] });
30
46
  }
31
47
  );
32
- I.displayName = "NavigationItemTrigger";
48
+ C.displayName = "NavigationItemTrigger";
33
49
  export {
34
- I as default
50
+ C as default
35
51
  };
@@ -8,6 +8,14 @@ export interface NavigationListProps extends React.ComponentProps<'ul'> {
8
8
  * Is the nav list offscreen?
9
9
  */
10
10
  isOffScreen?: boolean;
11
+ /**
12
+ * Optional left section heading
13
+ */
14
+ leftSectionHeading?: string;
15
+ /**
16
+ * Optional right section heading
17
+ */
18
+ rightSectionHeading?: string;
11
19
  }
12
20
  declare const NavigationList: React.ForwardRefExoticComponent<Omit<NavigationListProps, "ref"> & React.RefAttributes<HTMLUListElement>>;
13
21
  export default NavigationList;
@@ -1,35 +1,43 @@
1
- import { jsxs as p, jsx as _ } from "react/jsx-runtime";
2
- import * as r from "react";
3
- import { px as a } from "../../../utils/index.js";
4
- import e from "../../../node_modules/classnames/index.js";
5
- const c = r.forwardRef(
6
- ({ id: i, children: s, className: m, isOffScreen: o }, v) => {
7
- const n = r.Children.toArray(s).filter((t) => {
8
- if (t && t.props.navGroup === "nav-link-lg")
9
- return t;
10
- }), l = r.Children.toArray(s).filter((t) => {
11
- if (t && t.props.navGroup === "nav-link-sm")
12
- return t;
1
+ import { jsxs as e, jsx as c } from "react/jsx-runtime";
2
+ import * as i from "react";
3
+ import { px as t } from "../../../utils/index.js";
4
+ import l from "../../../node_modules/classnames/index.js";
5
+ import { TextVariants as p } from "../../Text/types.js";
6
+ import f from "../../Text/Text.js";
7
+ const h = i.forwardRef(
8
+ ({ id: o, children: n, className: d, isOffScreen: _, leftSectionHeading: m, rightSectionHeading: v }, u) => {
9
+ const s = i.Children.toArray(n).filter((a) => {
10
+ if (a && a.props.navGroup === "nav-link-start")
11
+ return a;
12
+ }), r = i.Children.toArray(n).filter((a) => {
13
+ if (a && a.props.navGroup === "nav-link-end")
14
+ return a;
13
15
  });
14
- return /* @__PURE__ */ p(
16
+ return /* @__PURE__ */ e(
15
17
  "ul",
16
18
  {
17
- "aria-hidden": o,
18
- id: i,
19
- "data-testid": i,
19
+ "aria-hidden": _,
20
+ id: o,
21
+ "data-testid": o,
20
22
  role: "list",
21
- className: e(m, `${a}-nav__list`, { [`${a}-nav__list--offscreen`]: o }),
22
- ref: v,
23
+ className: l(d, `${t}-nav__list`, { [`${t}-nav__list--offscreen`]: _ }),
24
+ ref: u,
23
25
  children: [
24
- n.length > 0 ? /* @__PURE__ */ _("div", { className: e(`${a}-nav__list__section`, `${a}-nav__list__section--large-cta`), children: n }) : null,
25
- l.length > 0 ? /* @__PURE__ */ _("div", { className: e(`${a}-nav__list__section`, `${a}-nav__list__section--small-cta`), children: l }) : null,
26
- !n.length && !l.length ? s : null
26
+ s.length > 0 ? /* @__PURE__ */ e("div", { className: l(`${t}-nav__list__section`, `${t}-nav__list__section--start`), children: [
27
+ m ? /* @__PURE__ */ c(f, { variant: p.heading4, className: `${t}-nav__list__section--start__title`, children: m }) : null,
28
+ s
29
+ ] }) : null,
30
+ r.length > 0 ? /* @__PURE__ */ e("div", { className: l(`${t}-nav__list__section`, `${t}-nav__list__section--end`), children: [
31
+ v ? /* @__PURE__ */ c(f, { variant: p.heading4, className: `${t}-nav__list__section--end__title`, children: v }) : null,
32
+ r
33
+ ] }) : null,
34
+ !s.length && !r.length ? n : null
27
35
  ]
28
36
  }
29
37
  );
30
38
  }
31
39
  );
32
- c.displayName = "NavigationList";
40
+ h.displayName = "NavigationList";
33
41
  export {
34
- c as default
42
+ h as default
35
43
  };
@@ -1,23 +1,23 @@
1
- import { jsxs as h, jsx as t } from "react/jsx-runtime";
2
- import c, { useEffect as P } from "react";
3
- import { getCommonProps as y, px as j, encodeURLSearchParams as C } from "../../utils/index.js";
1
+ import { jsx as a, jsxs as f } from "react/jsx-runtime";
2
+ import i, { useEffect as y } from "react";
3
+ import { getCommonProps as j, px as D, encodeURLSearchParams as C } from "../../utils/index.js";
4
4
  import p from "../../node_modules/classnames/index.js";
5
- import D from "../Input/Input.js";
6
- import H from "../Link/Link.js";
7
- import O from "./SearchResults/SearchResults.js";
8
- import { TextVariants as V } from "../Text/types.js";
9
- import A from "../Text/Text.js";
10
- import { useOnClickOutside as F } from "../../node_modules/usehooks-ts/dist/index.js";
11
- import { HeaderContext as K } from "../../site-furniture/Header/Header.js";
12
- import { SearchButton as M } from "./SearchButton.js";
13
- import U from "../../node_modules/react-transition-group/esm/CSSTransition.js";
14
- const te = ({
5
+ import H from "../Input/Input.js";
6
+ import O from "../Link/Link.js";
7
+ import V from "./SearchResults/SearchResults.js";
8
+ import { TextVariants as A } from "../Text/types.js";
9
+ import F from "../Text/Text.js";
10
+ import { useOnClickOutside as K } from "../../node_modules/usehooks-ts/dist/index.js";
11
+ import { HeaderContext as M } from "../../site-furniture/Header/Header.js";
12
+ import { SearchButton as U } from "./SearchButton.js";
13
+ import q from "../../node_modules/react-transition-group/esm/CSSTransition.js";
14
+ const ne = ({
15
15
  onSearch: u,
16
- searchResults: E = [],
17
- state: i = "idle",
18
- defaultValue: N = "",
19
- className: R,
20
- placeholder: I = "",
16
+ searchResults: N = [],
17
+ state: c = "idle",
18
+ defaultValue: E = "",
19
+ className: I,
20
+ placeholder: R = "",
21
21
  searchButtonText: l = "Search",
22
22
  loadingText: b = "Search In Progress...",
23
23
  invalidText: w = "Invalid search",
@@ -26,119 +26,119 @@ const te = ({
26
26
  ...S
27
27
  }) => {
28
28
  var g;
29
- const { className: e, "data-testid": d, ...L } = y(S, "Search"), o = c.useContext(K), m = c.useRef(null), f = c.useRef(null), x = c.useRef(null), a = o.isSearchExpanded, s = (g = m.current) == null ? void 0 : g.value;
30
- F(x, () => $(!1));
31
- const v = (r) => {
32
- var n;
29
+ const { className: e, "data-testid": d, ...L } = j(S, "Search"), o = i.useContext(M), m = i.useRef(null), h = i.useRef(null), v = i.useRef(null), t = o.isSearchExpanded, n = (g = m.current) == null ? void 0 : g.value, T = u ? (r) => {
30
+ u(r.target.value);
31
+ } : void 0;
32
+ K(v, () => $(!1));
33
+ const x = (r) => {
34
+ var s;
33
35
  if (r.stopPropagation(), r.key === "Enter") {
34
- if (r.preventDefault(), s && s.length > 2) {
35
- const T = C(_(s));
36
- window.location.href = T;
36
+ if (r.preventDefault(), n && n.length > 2) {
37
+ const P = C(_(n));
38
+ window.location.href = P;
37
39
  }
38
40
  r.currentTarget instanceof HTMLAnchorElement && r.currentTarget.click();
39
41
  }
40
- r.key === "Escape" && (o.setIsSearchExpanded(!1), (n = f.current) == null || n.reset());
42
+ r.key === "Escape" && (o.setIsSearchExpanded(!1), (s = h.current) == null || s.reset());
41
43
  };
42
- P(() => {
44
+ y(() => {
43
45
  var r;
44
- if (a) {
46
+ if (t) {
45
47
  (r = m.current) == null || r.focus();
46
48
  return;
47
49
  }
48
- }, [a]);
50
+ }, [t]);
49
51
  const $ = (r) => {
50
- var n;
51
- o.setIsSearchExpanded(r), (n = f.current) == null || n.reset();
52
+ var s;
53
+ o.setIsSearchExpanded(r), (s = h.current) == null || s.reset();
52
54
  };
53
- return /* @__PURE__ */ h(
55
+ return /* @__PURE__ */ a("div", { className: `${e}__container`, children: /* @__PURE__ */ f(
54
56
  "div",
55
57
  {
56
58
  onClick: () => o.setIsSearchExpanded(!0),
57
- className: `${e}__container`,
58
- ref: x,
59
+ className: `${e}__container__inner`,
60
+ ref: v,
59
61
  children: [
60
- /* @__PURE__ */ t(A, { variant: V.heading4, className: `${e}__container__label`, children: l }),
61
- /* @__PURE__ */ t(
62
+ /* @__PURE__ */ a(F, { variant: A.heading4, className: `${e}__container__inner__label`, children: l }),
63
+ /* @__PURE__ */ a(
62
64
  "div",
63
65
  {
64
66
  ...L,
65
- className: p(e, R, { [`${e}--active`]: a }),
67
+ className: p(e, I, { [`${e}--active`]: t }),
66
68
  "data-testid": d,
67
69
  role: "search",
68
70
  ...S,
69
- children: /* @__PURE__ */ h(
71
+ children: /* @__PURE__ */ f(
70
72
  "form",
71
73
  {
72
74
  "data-testid": `${d}-form`,
73
75
  className: p(`${e}__form`, {
74
- [`${e}__form--active`]: a
76
+ [`${e}__form--active`]: t
75
77
  }),
76
- ref: f,
78
+ ref: h,
77
79
  children: [
78
- /* @__PURE__ */ h(
80
+ /* @__PURE__ */ f(
79
81
  "div",
80
82
  {
81
83
  className: p(`${e}__content-wrapper`, {
82
- [`${e}__content-wrapper--active`]: a
84
+ [`${e}__content-wrapper--active`]: t
83
85
  }),
84
86
  role: "combobox",
85
87
  "aria-haspopup": "listbox",
86
88
  children: [
87
- /* @__PURE__ */ t(
88
- U,
89
+ /* @__PURE__ */ a(
90
+ q,
89
91
  {
90
- in: a,
91
- classNames: `${j}-input`,
92
+ in: t,
93
+ classNames: `${D}-input`,
92
94
  addEndListener: () => {
93
95
  },
94
- children: /* @__PURE__ */ t(
95
- D,
96
+ children: /* @__PURE__ */ a(
97
+ H,
96
98
  {
97
- "aria-hidden": !a,
99
+ "aria-hidden": !t,
98
100
  className: `${e}__input`,
99
101
  id: "search-input",
100
102
  hideLabel: !0,
101
103
  labelText: l,
102
- placeholder: a ? I : "",
104
+ placeholder: t ? R : "",
103
105
  type: "text",
104
- defaultValue: N,
105
- invalid: i === "invalid",
106
+ defaultValue: E,
107
+ invalid: c === "invalid",
106
108
  invalidText: w,
107
- onKeyDown: v,
108
- onChange: u ? (r) => {
109
- u(r.target.value);
110
- } : void 0,
109
+ onKeyDown: x,
110
+ onChange: T,
111
111
  ref: m
112
112
  }
113
113
  )
114
114
  }
115
115
  ),
116
- /* @__PURE__ */ t(
117
- M,
116
+ /* @__PURE__ */ a(
117
+ U,
118
118
  {
119
119
  className: e,
120
120
  searchButtonText: l,
121
- state: i,
121
+ state: c,
122
122
  testId: d,
123
- isSearchExpanded: a,
123
+ isSearchExpanded: t,
124
124
  setIsSearchExpanded: $
125
125
  }
126
126
  )
127
127
  ]
128
128
  }
129
129
  ),
130
- s && s.length > 2 ? /* @__PURE__ */ t(
131
- O,
130
+ n && n.length > 2 ? /* @__PURE__ */ a(
131
+ V,
132
132
  {
133
- autoCompleteResults: E,
134
- isLoading: i === "loading",
133
+ autoCompleteResults: N,
134
+ isLoading: c === "loading",
135
135
  loadingText: b,
136
- onKeyDown: v,
137
- children: /* @__PURE__ */ t("li", { className: `${e}__result`, children: /* @__PURE__ */ t(
138
- H,
136
+ onKeyDown: x,
137
+ children: /* @__PURE__ */ a("li", { className: `${e}__result`, children: /* @__PURE__ */ a(
138
+ O,
139
139
  {
140
- href: ((r) => C(_(r)))(s),
141
- children: /* @__PURE__ */ t("p", { children: k(s) })
140
+ href: ((r) => C(_(r)))(n),
141
+ children: /* @__PURE__ */ a("p", { children: k(n) })
142
142
  }
143
143
  ) }, "viewAllSearchResults")
144
144
  }
@@ -150,8 +150,8 @@ const te = ({
150
150
  )
151
151
  ]
152
152
  }
153
- );
153
+ ) });
154
154
  };
155
155
  export {
156
- te as default
156
+ ne as default
157
157
  };
@@ -348,15 +348,15 @@ $margin-xxl: var(--spacing-xxl);
348
348
  ///////////////////////
349
349
  /* stylelint-disable-next-line no-duplicate-selectors */
350
350
  :root {
351
- --header-height: 75px; // ideally we would calculate the size from the current text size plus spacing components so that it scales with the text size and spacing
351
+ --header-height: 73px; // ideally we would calculate the size from the current text size plus spacing components so that it scales with the text size and spacing
352
352
  --search-size: 2.625rem; // This should be calculated from the scaling text and scaling spacing tokens instead of hardcoding in case they change
353
353
 
354
354
  @media (min-width: $breakpoint-md) {
355
- --header-height: 109px; // ideally we would calculate the size from the current text size plus spacing components so that it scales with the text size and spacing
355
+ --header-height: 123px; // ideally we would calculate the size from the current text size plus spacing components so that it scales with the text size and spacing
356
356
  }
357
357
 
358
358
  @media (min-width: $breakpoint-xl) {
359
- --header-height: 121px; // ideally we would calculate the size from the current text size plus spacing components so that it scales with the text size and spacing
359
+ --header-height: 135px; // ideally we would calculate the size from the current text size plus spacing components so that it scales with the text size and spacing
360
360
  --search-size: 2.875rem; // This should be calculated from the scaling text and scaling spacing tokens instead of hardcoding in case they change
361
361
  }
362
362
  }
@@ -3,7 +3,6 @@
3
3
  .#{$px}-link {
4
4
  color: $pure-black;
5
5
  text-decoration: none;
6
- white-space: nowrap;
7
6
 
8
7
  &--email,
9
8
  &--link {
@@ -65,9 +65,41 @@
65
65
  flex-direction: column;
66
66
  gap: $spacing-sm;
67
67
 
68
- &--large-cta {
68
+ .#{$px}-text {
69
+ margin-bottom: 0;
70
+ }
71
+
72
+ &--start,
73
+ &--end {
74
+ &__title {
75
+ @include isHeaderMobile {
76
+ border-bottom: 1px solid $light-gray;
77
+ padding-bottom: 0.625rem;
78
+ }
79
+ }
80
+ }
81
+
82
+ &--end {
83
+ @include isHeaderMobile {
84
+ margin-top: $spacing-md;
85
+ }
86
+ }
87
+
88
+ &--start {
69
89
  margin-right: 1rem;
70
90
 
91
+ & li:last-child {
92
+ a {
93
+ border-bottom: 0;
94
+ padding: $spacing-sm 0;
95
+ text-decoration: underline;
96
+
97
+ span {
98
+ text-transform: uppercase;
99
+ }
100
+ }
101
+ }
102
+
71
103
  @include isHeaderMobile {
72
104
  margin-right: 0;
73
105
  }
@@ -4,12 +4,15 @@
4
4
  flex-direction: column;
5
5
  justify-content: center;
6
6
 
7
+ @include isHeaderMobile {
8
+ display: none;
9
+ }
10
+
7
11
  & > button {
8
12
  color: $pure-black;
9
13
  display: flex;
10
14
  justify-content: flex-start;
11
15
  position: relative;
12
- white-space: nowrap;
13
16
  width: 100%;
14
17
 
15
18
  @include isHeaderDesktop {
@@ -30,12 +33,14 @@
30
33
  }
31
34
 
32
35
  & > &__submenu {
36
+ border-top: 1px solid $light-gray;
33
37
  pointer-events: none;
34
38
  transform: translateY(-100%);
35
39
  transition: none; // remove this when implementing submenu transitions
36
40
  }
37
41
 
38
42
  &--hovered &__submenu {
43
+ align-items: flex-start;
39
44
  height: fit-content;
40
45
  left: 0;
41
46
  max-height: unset;
@@ -44,7 +49,7 @@
44
49
  pointer-events: all;
45
50
  position: fixed; // has to bust out of the box containing it on desktop
46
51
  right: 0;
47
- top: calc($header-height);
52
+ top: $header-height;
48
53
  transform: translateY(0);
49
54
  }
50
55
  }
@@ -61,7 +66,6 @@
61
66
 
62
67
  li {
63
68
  display: inline;
64
- white-space: nowrap;
65
69
 
66
70
  button,
67
71
  a,
@@ -37,8 +37,49 @@ $top-transition: top 0.25s ease-in 0.1s;
37
37
  z-index: 5;
38
38
  }
39
39
 
40
+ &__section {
41
+ display: grid;
42
+ gap: $spacing-sm;
43
+ width: 50%;
44
+
45
+ &:only-child {
46
+ width: 100%;
47
+ }
48
+ }
49
+
50
+ .#{$px}-accordion {
51
+ display: none;
52
+ }
53
+ }
54
+
55
+ @include isHeaderMobile {
40
56
  &__section {
41
57
  width: 100%;
42
58
  }
59
+ .#{$px}-accordion {
60
+ border-bottom: 0;
61
+ border-top: 0;
62
+ margin-bottom: 0;
63
+
64
+ &-item {
65
+ padding: $spacing-sm 0;
66
+
67
+ &__border-bottom {
68
+ border-bottom: 1px solid $light-gray;
69
+ }
70
+
71
+ &-label {
72
+ opacity: 1;
73
+ }
74
+ }
75
+ }
76
+ .#{$px}-link--snwHeaderLink {
77
+ border-bottom: 1px solid $light-gray;
78
+ flex-wrap: wrap;
79
+ padding: $spacing-sm 0;
80
+ }
81
+ .#{$px}-link--snwFlyoutLink {
82
+ padding: 0;
83
+ }
43
84
  }
44
85
  }
@@ -13,13 +13,18 @@
13
13
  justify-content: center;
14
14
  padding: 0 $spacing-sm;
15
15
  position: relative;
16
+ width: 100%;
16
17
 
17
18
  > .#{$px}-nav__list {
18
- border-top: 1px solid $light-gray;
19
+ padding-top: 0;
19
20
 
20
21
  @include isHeaderDesktop {
21
22
  border-top: unset;
22
23
  }
24
+
25
+ .#{$px}-nav__item + .#{$px}-accordion {
26
+ border-top: 0;
27
+ }
23
28
  }
24
29
 
25
30
  @include isHeaderDesktop {
@@ -11,6 +11,10 @@
11
11
  top: $search-size;
12
12
  width: 100%;
13
13
 
14
+ @include isHeaderMobile {
15
+ padding: $spacing-sm 0;
16
+ }
17
+
14
18
  &-container {
15
19
  background: $white;
16
20
  display: flex;
@@ -15,8 +15,13 @@
15
15
  top: 0;
16
16
  }
17
17
 
18
+ @include isHeaderMobile {
19
+ left: calc(100% - $search-size - $spacing-md);
20
+ right: $spacing-md;
21
+ }
22
+
18
23
  &--active {
19
- left: 0;
24
+ left: $spacing-md;
20
25
  transition: left 0.25s ease-in 0.2s;
21
26
  }
22
27
 
@@ -85,6 +90,14 @@
85
90
  margin: 0;
86
91
  padding: $spacing-sm 0 $spacing-sm $spacing-sm;
87
92
 
93
+ @include isHeaderMobile {
94
+ height: calc(var(--spacing-md) + var(--search-size));
95
+ line-height: calc(var(--spacing-md) + var(--search-size));
96
+ padding: $spacing-md 0;
97
+ position: relative;
98
+ top: calc($spacing-md * -1);
99
+ }
100
+
88
101
  @include media($size-xl) {
89
102
  height: 2.875rem;
90
103
  }
@@ -102,34 +115,50 @@
102
115
  }
103
116
 
104
117
  .#{$px}-search__container {
105
- cursor: pointer;
106
- display: flex;
107
- justify-content: space-between;
108
- padding: $padding-md 0;
109
- pointer-events: all;
110
-
111
- @include isHeaderDesktop {
112
- cursor: default;
113
- padding: 0;
114
- }
115
-
116
118
  @include isHeaderMobile {
119
+ border-bottom: 1px solid $light-gray;
120
+ left: 50%;
121
+ margin-left: -50vw;
117
122
  position: relative;
123
+ width: 100vw;
118
124
  }
119
125
 
120
- &__label {
121
- display: none;
122
- margin: 0;
126
+ &__inner {
127
+ cursor: pointer;
128
+ display: flex;
129
+ justify-content: space-between;
130
+ padding: 0 $padding-md;
131
+ pointer-events: all;
132
+
133
+ @include isHeaderDesktop {
134
+ cursor: default;
135
+ padding: 0;
136
+ }
123
137
 
124
138
  @include isHeaderMobile {
125
139
  align-items: center;
126
- cursor: pointer;
127
- display: flex;
128
- flex-wrap: wrap;
129
- height: $search-size;
130
- margin: 0;
131
- padding: 0 $spacing-sm;
132
- pointer-events: all;
140
+ height: calc(var(--spacing-md) + var(--search-size));
141
+ position: relative;
142
+ }
143
+
144
+ .#{$px}-text {
145
+ margin-bottom: 0;
146
+ padding-left: 0;
147
+ }
148
+
149
+ &__label {
150
+ display: none;
151
+
152
+ @include isHeaderMobile {
153
+ align-items: center;
154
+ cursor: pointer;
155
+ display: flex;
156
+ flex-wrap: wrap;
157
+ height: $search-size;
158
+ margin: 0;
159
+ padding: 0 $spacing-sm;
160
+ pointer-events: all;
161
+ }
133
162
  }
134
163
  }
135
164
  }
@@ -16,6 +16,12 @@
16
16
  top: 0;
17
17
  width: $search-size;
18
18
 
19
+ @include isHeaderMobile {
20
+ height: calc($spacing-md + $search-size);
21
+ justify-content: flex-end;
22
+ top: calc($spacing-md * -1);
23
+ }
24
+
19
25
  @include media($size-xl) {
20
26
  padding: 0 0 0.125rem;
21
27
  }
@@ -5,7 +5,6 @@
5
5
  display: flex;
6
6
  min-width: 87px; // needed to handle English vs Chinese option. Arguably this should be determined by the Dropdown component the longest element in the dropdown
7
7
  opacity: 1;
8
- padding-bottom: 10rem; // needed for bottom accordion
9
8
  transition: opacity 0.25s ease-in;
10
9
 
11
10
  &--hidden {
@@ -13,6 +12,31 @@
13
12
  pointer-events: none;
14
13
  }
15
14
 
15
+ @include isHeaderDesktop {
16
+ &.#{$px}-accordion {
17
+ display: none;
18
+ }
19
+ }
20
+
21
+ @include isHeaderMobile {
22
+ border-top: 0;
23
+ &.#{$px}-accordion {
24
+ border-bottom: 0;
25
+ }
26
+ .#{$px}-accordion-item {
27
+ border-top: 1px solid $light-gray;
28
+ padding: $spacing-sm 0;
29
+
30
+ &-label {
31
+ opacity: 1;
32
+ }
33
+
34
+ &__border-bottom {
35
+ border-bottom: 0;
36
+ }
37
+ }
38
+ }
39
+
16
40
  &.#{$px}-dropdown {
17
41
  display: flex;
18
42
  padding: 0;
@@ -15,7 +15,6 @@
15
15
  }
16
16
 
17
17
  @include isHeaderMobile {
18
- justify-content: center;
19
18
  min-width: 44px; // matching the size of mobile menu icon to allow for equal spacing and centering of logo
20
19
  }
21
20
 
@@ -36,6 +35,10 @@
36
35
  @include underline($padding-xsm);
37
36
  }
38
37
 
38
+ @include isHeaderMobile {
39
+ padding-right: 0;
40
+ }
41
+
39
42
  > p.#{$px}-text {
40
43
  margin: 0;
41
44
 
@@ -17,7 +17,7 @@
17
17
  cursor: pointer;
18
18
  display: flex;
19
19
  height: $mobile-minimum-clickable-area;
20
- justify-content: center;
20
+ justify-content: flex-start;
21
21
  padding: 0;
22
22
  width: $mobile-minimum-clickable-area;
23
23
 
@@ -27,7 +27,7 @@
27
27
 
28
28
  /* This is a pseudo icon shown within the button, so we can do fancy transitions */
29
29
  span {
30
- background-color: $dark-gray;
30
+ background-color: $pure-black;
31
31
  color: transparent;
32
32
  display: block;
33
33
  height: 2px;
@@ -37,7 +37,7 @@
37
37
 
38
38
  &::before,
39
39
  &::after {
40
- background-color: $dark-gray;
40
+ background-color: $pure-black;
41
41
  content: '';
42
42
  display: block;
43
43
  height: 2px;
@@ -112,9 +112,19 @@
112
112
  display: flex;
113
113
  padding: 0 $spacing-md;
114
114
 
115
+ @include isHeaderMobile {
116
+ flex-direction: column;
117
+ height: calc(100vh - var(--header-height) - 1px);
118
+ justify-content: flex-start;
119
+ }
120
+
115
121
  @include isHeaderDesktop {
116
122
  padding-right: $search-size;
117
123
  }
124
+
125
+ @media (min-width: $breakpoint-md) and (max-width: calc($breakpoint-md + 40px)) {
126
+ padding: 0 2rem 0 0;
127
+ }
118
128
  }
119
129
 
120
130
  @include isHeaderDesktop {
@@ -65,7 +65,14 @@ const I = O(R), L = T(
65
65
  ]
66
66
  }
67
67
  ) }),
68
- /* @__PURE__ */ a("div", { className: d(`${e}-header__overlay`, { [`${e}-header__overlay--active`]: c }) })
68
+ /* @__PURE__ */ a(
69
+ "div",
70
+ {
71
+ className: d(`${e}-header__overlay`, {
72
+ [`${e}-header__overlay--active`]: c
73
+ })
74
+ }
75
+ )
69
76
  ] });
70
77
  }
71
78
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phillips/seldon",
3
- "version": "1.55.1",
3
+ "version": "1.56.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/PhillipsAuctionHouse/seldon"