@phillips/seldon 1.78.0 → 1.79.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.
@@ -1,4 +1,4 @@
1
- import { __module as t } from "../../_virtual/index5.js";
1
+ import { __module as t } from "../../_virtual/index6.js";
2
2
  /*!
3
3
  Copyright (c) 2015 Jed Watson.
4
4
  Based on code that is Copyright 2013-2015, Facebook, Inc.
@@ -1,4 +1,4 @@
1
- import { __module as e } from "../../../../_virtual/index6.js";
1
+ import { __module as e } from "../../../../_virtual/index5.js";
2
2
  import { __require as o } from "./cjs/react-is.production.min.js";
3
3
  import { __require as t } from "./cjs/react-is.development.js";
4
4
  var r;
@@ -55,13 +55,20 @@
55
55
 
56
56
  &--hovered &__submenu {
57
57
  left: 0;
58
- max-height: 700px;
58
+ max-height: calc(90vh - #{$header-height});
59
59
  opacity: 1;
60
+ -ms-overflow-style: none; /* Internet Explorer 10+ */
61
+ overflow-y: scroll;
60
62
  pointer-events: all;
63
+ scrollbar-width: none; /* Firefox */
61
64
  transition:
62
65
  max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
63
66
  opacity 0.3s cubic-bezier(0.33, 1, 0.68, 1);
64
67
 
68
+ &::-webkit-scrollbar {
69
+ display: none; /* Safari and Chrome */
70
+ }
71
+
65
72
  .#{$px}-nav__list__section {
66
73
  opacity: 1;
67
74
  }
@@ -5,6 +5,10 @@ export interface HeaderProps extends ComponentProps<'header'> {
5
5
  * Logo src
6
6
  */
7
7
  logo?: ReactElement<Component> | string;
8
+ /**
9
+ * Logo href
10
+ */
11
+ logoHref?: string;
8
12
  /**
9
13
  * Toggle open text
10
14
  */
@@ -1,36 +1,37 @@
1
1
  import { jsxs as o, jsx as a } from "react/jsx-runtime";
2
- import l, { createContext as O, forwardRef as T, useState as h } from "react";
2
+ import l, { createContext as T, forwardRef as P, useState as h } from "react";
3
3
  import d from "../../node_modules/classnames/index.js";
4
- import { findChildrenOfType as s, findChildrenExcludingTypes as P, px as e } from "../../utils/index.js";
5
- import j from "../../assets/PhillipsLogo.svg.js";
4
+ import { findChildrenOfType as s, findChildrenExcludingTypes as j, px as e } from "../../utils/index.js";
5
+ import R from "../../assets/PhillipsLogo.svg.js";
6
6
  import p from "../../patterns/UserManagement/UserManagement.js";
7
7
  import g from "../../patterns/LanguageSelector/LanguageSelector.js";
8
8
  import f from "../../components/Navigation/Navigation.js";
9
- import { defaultHeaderContext as R } from "./utils.js";
10
- import { SSRMediaQuery as w } from "../../providers/SeldonProvider/utils.js";
11
- const I = O(R), L = T(
9
+ import { defaultHeaderContext as w } from "./utils.js";
10
+ import { SSRMediaQuery as I } from "../../providers/SeldonProvider/utils.js";
11
+ const L = T(w), k = P(
12
12
  ({
13
- logo: i = /* @__PURE__ */ a(j, {}),
14
- className: u,
13
+ logo: i = /* @__PURE__ */ a(R, {}),
14
+ logoHref: u = "/",
15
+ className: _,
15
16
  children: r,
16
- toggleOpenText: _ = "Open Menu",
17
- toggleCloseText: v = "Close Menu",
18
- logoText: x = "Home Page",
19
- ...C
20
- }, y) => {
21
- const E = s(r, p), m = s(r, g), [c, M] = h(!1), $ = s(r, f), b = P(r, [f, p, g]), [n, N] = h(!1), S = n ? v : _, H = function() {
22
- N((t) => !t);
17
+ toggleOpenText: v = "Open Menu",
18
+ toggleCloseText: x = "Close Menu",
19
+ logoText: C = "Home Page",
20
+ ...y
21
+ }, E) => {
22
+ const M = s(r, p), m = s(r, g), [c, $] = h(!1), b = s(r, f), N = j(r, [f, p, g]), [n, S] = h(!1), H = n ? x : v, O = function() {
23
+ S((t) => !t);
23
24
  };
24
- return /* @__PURE__ */ o("header", { ...C, className: d(`${e}-header`, u), ref: y, children: [
25
+ return /* @__PURE__ */ o("header", { ...y, className: d(`${e}-header`, _), ref: E, children: [
25
26
  /* @__PURE__ */ o("div", { className: `${e}-header__top-row`, children: [
26
- /* @__PURE__ */ a(w.Media, { greaterThanOrEqual: "md", children: m }),
27
+ /* @__PURE__ */ a(I.Media, { greaterThanOrEqual: "md", children: m }),
27
28
  /* @__PURE__ */ o(
28
29
  "button",
29
30
  {
30
- "aria-label": S,
31
+ "aria-label": H,
31
32
  "data-testid": "mobile-menu-toggle",
32
33
  type: "button",
33
- onClick: H,
34
+ onClick: O,
34
35
  className: d(`${e}-header__toggle-btn`, {
35
36
  [`${e}-header__toggle-btn--open`]: n
36
37
  }),
@@ -40,20 +41,20 @@ const I = O(R), L = T(
40
41
  ]
41
42
  }
42
43
  ),
43
- /* @__PURE__ */ a("h1", { "data-testid": "header-logo", className: `${e}-header__logo`, children: /* @__PURE__ */ a("a", { href: "/", "aria-label": x, children: typeof i == "object" ? i : /* @__PURE__ */ a("img", { alt: "Phillips", "data-testid": "header-logo-img", src: i, height: "14" }) }) }),
44
- E
44
+ /* @__PURE__ */ a("h1", { "data-testid": "header-logo", className: `${e}-header__logo`, children: /* @__PURE__ */ a("a", { href: u, "aria-label": C, children: typeof i == "object" ? i : /* @__PURE__ */ a("img", { alt: "Phillips", "data-testid": "header-logo-img", src: i, height: "14" }) }) }),
45
+ M
45
46
  ] }),
46
47
  /* @__PURE__ */ a("div", { className: d(`${e}-header__nav`, { [`${e}-header__nav--closed`]: !n }), children: /* @__PURE__ */ o(
47
- I.Provider,
48
+ L.Provider,
48
49
  {
49
50
  value: {
50
51
  isMenuOpen: n,
51
52
  isSearchExpanded: c,
52
- setIsSearchExpanded: M
53
+ setIsSearchExpanded: $
53
54
  },
54
55
  children: [
55
56
  l.Children.map(
56
- $,
57
+ b,
57
58
  (t) => l.isValidElement(t) ? l.cloneElement(t, {
58
59
  children: [
59
60
  ...l.Children.toArray(t.props.children),
@@ -61,7 +62,7 @@ const I = O(R), L = T(
61
62
  ]
62
63
  }) : t
63
64
  ),
64
- b
65
+ N
65
66
  ]
66
67
  }
67
68
  ) }),
@@ -76,8 +77,8 @@ const I = O(R), L = T(
76
77
  ] });
77
78
  }
78
79
  );
79
- L.displayName = "Header";
80
+ k.displayName = "Header";
80
81
  export {
81
- I as HeaderContext,
82
- L as default
82
+ L as HeaderContext,
83
+ k as default
83
84
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phillips/seldon",
3
- "version": "1.78.0",
3
+ "version": "1.79.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/PhillipsAuctionHouse/seldon"