@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.
- package/dist/node_modules/exenv/index.js +1 -1
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
- package/dist/scss/components/Navigation/NavigationItemTrigger/_navigationItemTrigger.scss +8 -1
- package/dist/site-furniture/Header/Header.d.ts +4 -0
- package/dist/site-furniture/Header/Header.js +29 -28
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __module as e } from "../../../../_virtual/
|
|
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:
|
|
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
|
}
|
|
@@ -1,36 +1,37 @@
|
|
|
1
1
|
import { jsxs as o, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import l, { createContext as
|
|
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
|
|
5
|
-
import
|
|
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
|
|
10
|
-
import { SSRMediaQuery as
|
|
11
|
-
const
|
|
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(
|
|
14
|
-
|
|
13
|
+
logo: i = /* @__PURE__ */ a(R, {}),
|
|
14
|
+
logoHref: u = "/",
|
|
15
|
+
className: _,
|
|
15
16
|
children: r,
|
|
16
|
-
toggleOpenText:
|
|
17
|
-
toggleCloseText:
|
|
18
|
-
logoText:
|
|
19
|
-
...
|
|
20
|
-
},
|
|
21
|
-
const
|
|
22
|
-
|
|
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", { ...
|
|
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(
|
|
27
|
+
/* @__PURE__ */ a(I.Media, { greaterThanOrEqual: "md", children: m }),
|
|
27
28
|
/* @__PURE__ */ o(
|
|
28
29
|
"button",
|
|
29
30
|
{
|
|
30
|
-
"aria-label":
|
|
31
|
+
"aria-label": H,
|
|
31
32
|
"data-testid": "mobile-menu-toggle",
|
|
32
33
|
type: "button",
|
|
33
|
-
onClick:
|
|
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:
|
|
44
|
-
|
|
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
|
-
|
|
48
|
+
L.Provider,
|
|
48
49
|
{
|
|
49
50
|
value: {
|
|
50
51
|
isMenuOpen: n,
|
|
51
52
|
isSearchExpanded: c,
|
|
52
|
-
setIsSearchExpanded:
|
|
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
|
-
|
|
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
|
-
|
|
80
|
+
k.displayName = "Header";
|
|
80
81
|
export {
|
|
81
|
-
|
|
82
|
-
|
|
82
|
+
L as HeaderContext,
|
|
83
|
+
k as default
|
|
83
84
|
};
|