@phillips/seldon 1.51.1 → 1.52.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/assets/account_circle.svg.js +2 -2
- package/dist/components/Accordion/AccordionItem.d.ts +8 -4
- package/dist/components/Accordion/AccordionItem.js +67 -65
- package/dist/components/Dropdown/Dropdown.d.ts +2 -2
- package/dist/components/Header/Header.d.ts +20 -13
- package/dist/components/Header/Header.js +73 -76
- package/dist/components/Header/utils.d.ts +2 -9
- package/dist/components/Header/utils.js +3 -7
- package/dist/components/LanguageSelector/LanguageSelector.d.ts +36 -0
- package/dist/components/LanguageSelector/LanguageSelector.js +73 -0
- package/dist/components/LanguageSelector/index.d.ts +1 -0
- package/dist/components/Link/Link.d.ts +3 -11
- package/dist/components/Link/index.d.ts +2 -0
- package/dist/components/Navigation/Navigation.d.ts +12 -4
- package/dist/components/Navigation/Navigation.js +34 -51
- package/dist/components/Navigation/NavigationItem/NavigationItem.d.ts +15 -10
- package/dist/components/Navigation/NavigationItem/NavigationItem.js +19 -37
- package/dist/components/Navigation/NavigationItemTrigger/NavigationItemTrigger.d.ts +12 -3
- package/dist/components/Navigation/NavigationItemTrigger/NavigationItemTrigger.js +33 -29
- package/dist/components/Navigation/NavigationList/NavigationList.d.ts +2 -2
- package/dist/components/Navigation/NavigationList/NavigationList.js +31 -32
- package/dist/components/Search/Search.d.ts +1 -1
- package/dist/components/Search/Search.js +134 -122
- package/dist/components/Search/SearchButton.js +21 -17
- package/dist/components/Search/SearchResults/SearchResults.js +14 -13
- package/dist/components/UserManagement/UserManagement.d.ts +21 -13
- package/dist/components/UserManagement/UserManagement.js +31 -61
- package/dist/index.d.ts +1 -0
- package/dist/index.js +65 -62
- package/dist/scss/_utils.scss +13 -3
- package/dist/scss/_vars.scss +30 -11
- package/dist/scss/componentStyles.scss +1 -0
- package/dist/scss/components/Accordion/_accordion.scss +3 -0
- package/dist/scss/components/Dropdown/_dropdown.scss +2 -0
- package/dist/scss/components/Header/_header.scss +72 -86
- package/dist/scss/components/LanguageSelector/_languageSelector.scss +47 -0
- package/dist/scss/components/Link/_link.scss +15 -4
- package/dist/scss/components/LinkList/_linkList.scss +4 -0
- package/dist/scss/components/Navigation/NavigationItem/_navigationItem.scss +4 -119
- package/dist/scss/components/Navigation/NavigationItemTrigger/_navigationItemTrigger.scss +75 -0
- package/dist/scss/components/Navigation/NavigationList/_navigationList.scss +29 -42
- package/dist/scss/components/Navigation/_navigation.scss +24 -82
- package/dist/scss/components/Search/SearchResults/_searchResults.scss +1 -25
- package/dist/scss/components/Search/_search.scss +48 -7
- package/dist/scss/components/Search/_searchButton.scss +6 -2
- package/dist/scss/components/UserManagement/_userManagement.scss +33 -94
- package/dist/scss/components/Video/_video.scss +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +31 -24
- package/package.json +2 -1
|
@@ -1,54 +1,37 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import { findChildrenOfType as
|
|
4
|
-
import
|
|
5
|
-
import { HeaderContext as
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
children: i,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
{
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
className: `${a}-nav__back-btn`,
|
|
30
|
-
onClick: h,
|
|
31
|
-
children: f
|
|
32
|
-
}
|
|
33
|
-
),
|
|
34
|
-
/* @__PURE__ */ c(
|
|
35
|
-
"h2",
|
|
36
|
-
{
|
|
37
|
-
id: `${e}-label`,
|
|
38
|
-
"data-testid": `${e}-label`,
|
|
39
|
-
className: b(`${a}-nav__label`, { [`${a}-nav__label--hidden`]: !s }),
|
|
40
|
-
style: { "--visible": s ? "visible" : "hidden" },
|
|
41
|
-
children: n || "Main Menu"
|
|
42
|
-
}
|
|
43
|
-
),
|
|
44
|
-
/* @__PURE__ */ r("div", { className: `${a}-nav__list-container`, children: [
|
|
45
|
-
l.isValidElement(t == null ? void 0 : t[0]) ? l.cloneElement(t[0], { isOffScreen: $ }) : void 0,
|
|
46
|
-
u
|
|
1
|
+
import { jsx as x, jsxs as h } from "react/jsx-runtime";
|
|
2
|
+
import e, { forwardRef as E } from "react";
|
|
3
|
+
import { findChildrenOfType as l, findChildrenExcludingTypes as N, px as d } from "../../utils/index.js";
|
|
4
|
+
import C from "../../node_modules/classnames/index.js";
|
|
5
|
+
import { HeaderContext as y } from "../Header/Header.js";
|
|
6
|
+
import m from "./NavigationList/NavigationList.js";
|
|
7
|
+
import c from "../LanguageSelector/LanguageSelector.js";
|
|
8
|
+
const S = E(
|
|
9
|
+
({ children: i, className: f, id: n, visible: p = !0, ...v }, g) => {
|
|
10
|
+
var r, s;
|
|
11
|
+
const { isSearchExpanded: a } = e.useContext(y), o = (r = l(i, m)) == null ? void 0 : r[0], u = N(i, [m, c]), t = (s = l(i, c)) == null ? void 0 : s[0];
|
|
12
|
+
return /* @__PURE__ */ x(
|
|
13
|
+
"nav",
|
|
14
|
+
{
|
|
15
|
+
role: "navigation",
|
|
16
|
+
"data-testid": n,
|
|
17
|
+
id: n,
|
|
18
|
+
style: { "--visible": p ? "visible" : "hidden" },
|
|
19
|
+
className: C(`${d}-nav`, f),
|
|
20
|
+
...v,
|
|
21
|
+
ref: g,
|
|
22
|
+
children: /* @__PURE__ */ h("div", { className: `${d}-nav__list-container`, children: [
|
|
23
|
+
u,
|
|
24
|
+
e.isValidElement(o) ? e.cloneElement(o, { isOffScreen: a }) : void 0,
|
|
25
|
+
/* This is not visible through css when in desktop breakpoint */
|
|
26
|
+
e.isValidElement(t) && t ? e.cloneElement(t, {
|
|
27
|
+
isHidden: a
|
|
28
|
+
}) : void 0
|
|
47
29
|
] })
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
S.displayName = "Navigation";
|
|
52
35
|
export {
|
|
53
|
-
|
|
36
|
+
S as default
|
|
54
37
|
};
|
|
@@ -1,23 +1,19 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { LinkProps } from '../../Link/Link';
|
|
3
2
|
import { LinkVariants } from '../../Link/types';
|
|
4
|
-
|
|
3
|
+
import { ComponentProps, ElementType, ReactNode } from 'react';
|
|
4
|
+
export interface NavigationItemProps extends ComponentProps<'li'> {
|
|
5
5
|
/**
|
|
6
6
|
* Optional badge for navigation item. Used currently for location of auctions
|
|
7
7
|
*/
|
|
8
|
-
badge?:
|
|
8
|
+
badge?: ReactNode;
|
|
9
9
|
/**
|
|
10
10
|
* href link
|
|
11
11
|
*/
|
|
12
12
|
href?: string;
|
|
13
|
-
/**
|
|
14
|
-
* Optional listen to onClick event
|
|
15
|
-
*/
|
|
16
|
-
onClick?: (event: React.MouseEvent<HTMLLIElement>) => void;
|
|
17
13
|
/**
|
|
18
14
|
* Label for the navigation item
|
|
19
15
|
*/
|
|
20
|
-
label?:
|
|
16
|
+
label?: ReactNode;
|
|
21
17
|
/**
|
|
22
18
|
* Optional group for navigation items
|
|
23
19
|
*/
|
|
@@ -29,7 +25,16 @@ export interface NavigationItemProps extends Omit<React.HTMLAttributes<HTMLLIEle
|
|
|
29
25
|
/**
|
|
30
26
|
* Element to render within the navigation item, renders <Link> by default
|
|
31
27
|
*/
|
|
32
|
-
element?:
|
|
28
|
+
element?: ElementType<LinkProps>;
|
|
33
29
|
}
|
|
34
|
-
|
|
30
|
+
/**
|
|
31
|
+
* ## Overview
|
|
32
|
+
*
|
|
33
|
+
* Renders a styled link within the Header->Navigation component. It supports both mobile and desktop layouts. It can be used with Remix links as well.
|
|
34
|
+
*
|
|
35
|
+
* [Figma Link](https://www.figma.com/design/hMu9IWH5N3KamJy8tLFdyV/EASEL-Compendium%3A-Tokens%2C-Components-%26-Patterns?node-id=10570-6295&m=dev)
|
|
36
|
+
*
|
|
37
|
+
* [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-languageselector--overview)
|
|
38
|
+
*/
|
|
39
|
+
declare const NavigationItem: import("react").ForwardRefExoticComponent<Omit<NavigationItemProps, "ref"> & import("react").RefAttributes<HTMLLIElement>>;
|
|
35
40
|
export default NavigationItem;
|
|
@@ -1,44 +1,26 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
badge: a,
|
|
10
|
-
className: r = "",
|
|
11
|
-
href: i,
|
|
12
|
-
label: n,
|
|
13
|
-
navGroup: s,
|
|
14
|
-
navType: m,
|
|
15
|
-
onClick: o,
|
|
16
|
-
element: l = _,
|
|
17
|
-
...d
|
|
18
|
-
}) => {
|
|
19
|
-
const { expandedItem: c } = f.useContext($);
|
|
20
|
-
return /* @__PURE__ */ e(
|
|
1
|
+
import { jsx as a, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { px as i } from "../../../utils/index.js";
|
|
3
|
+
import f from "../../../node_modules/classnames/index.js";
|
|
4
|
+
import v from "../../Link/Link.js";
|
|
5
|
+
import { LinkVariants as N } from "../../Link/types.js";
|
|
6
|
+
import { forwardRef as _ } from "react";
|
|
7
|
+
const $ = _(
|
|
8
|
+
({ badge: e, className: t = "", href: n, label: m, navGroup: s, navType: r, onClick: o, element: l = v, ...d }, p) => /* @__PURE__ */ a(
|
|
21
9
|
"li",
|
|
22
10
|
{
|
|
23
11
|
...d,
|
|
24
12
|
onClick: o,
|
|
25
|
-
"data-testid": `nav-item-${
|
|
26
|
-
className:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
{
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
tabIndex: c === "" ? 0 : -1,
|
|
33
|
-
children: [
|
|
34
|
-
/* @__PURE__ */ e("span", { className: `${t}-nav__item--label`, children: n }),
|
|
35
|
-
a ? /* @__PURE__ */ e("span", { className: `${t}-nav__item--badge `, children: ` • ${a}` }) : null
|
|
36
|
-
]
|
|
37
|
-
}
|
|
38
|
-
)
|
|
13
|
+
"data-testid": `nav-item-${m}`,
|
|
14
|
+
className: f(`${i}-nav__item`, s, t),
|
|
15
|
+
ref: p,
|
|
16
|
+
children: /* @__PURE__ */ c(l, { href: n, variant: r || N.snwHeaderLink, children: [
|
|
17
|
+
/* @__PURE__ */ a("span", { className: `${i}-nav__item--label`, children: m }),
|
|
18
|
+
e ? /* @__PURE__ */ a("span", { className: `${i}-nav__item--badge `, children: ` • ${e}` }) : null
|
|
19
|
+
] })
|
|
39
20
|
}
|
|
40
|
-
)
|
|
41
|
-
|
|
21
|
+
)
|
|
22
|
+
);
|
|
23
|
+
$.displayName = "NavigationItem";
|
|
42
24
|
export {
|
|
43
|
-
|
|
25
|
+
$ as default
|
|
44
26
|
};
|
|
@@ -1,9 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
export interface NavigationItemTriggerProps extends
|
|
1
|
+
import React, { ComponentProps } from 'react';
|
|
2
|
+
export interface NavigationItemTriggerProps extends ComponentProps<'li'> {
|
|
3
3
|
/**
|
|
4
4
|
* Label for the navigation item
|
|
5
5
|
*/
|
|
6
6
|
label: string;
|
|
7
7
|
}
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* ## Overview
|
|
10
|
+
*
|
|
11
|
+
* Supports clicking in mobile mode and hovering in desktop mode to expand the child navigation lists
|
|
12
|
+
*
|
|
13
|
+
* [Figma Link](https://www.figma.com/design/hMu9IWH5N3KamJy8tLFdyV/EASEL-Compendium%3A-Tokens%2C-Components-%26-Patterns?node-id=10570-6295&m=dev)
|
|
14
|
+
*
|
|
15
|
+
* [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-languageselector--overview)
|
|
16
|
+
*/
|
|
17
|
+
declare const NavigationItemTrigger: React.ForwardRefExoticComponent<Omit<NavigationItemTriggerProps, "ref"> & React.RefAttributes<HTMLLIElement>>;
|
|
9
18
|
export default NavigationItemTrigger;
|
|
@@ -1,31 +1,35 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
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";
|
|
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
|
+
);
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
I.displayName = "NavigationItemTrigger";
|
|
29
33
|
export {
|
|
30
|
-
|
|
34
|
+
I as default
|
|
31
35
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export interface NavigationListProps extends React.
|
|
2
|
+
export interface NavigationListProps extends React.ComponentProps<'ul'> {
|
|
3
3
|
/**
|
|
4
4
|
* id for the navigation list
|
|
5
5
|
*/
|
|
@@ -9,5 +9,5 @@ export interface NavigationListProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
9
9
|
*/
|
|
10
10
|
isOffScreen?: boolean;
|
|
11
11
|
}
|
|
12
|
-
declare const NavigationList: React.
|
|
12
|
+
declare const NavigationList: React.ForwardRefExoticComponent<Omit<NavigationListProps, "ref"> & React.RefAttributes<HTMLUListElement>>;
|
|
13
13
|
export default NavigationList;
|
|
@@ -1,36 +1,35 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as p, jsx as _ } from "react/jsx-runtime";
|
|
2
2
|
import * as r from "react";
|
|
3
3
|
import { px as a } from "../../../utils/index.js";
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
};
|
|
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;
|
|
13
|
+
});
|
|
14
|
+
return /* @__PURE__ */ p(
|
|
15
|
+
"ul",
|
|
16
|
+
{
|
|
17
|
+
"aria-hidden": o,
|
|
18
|
+
id: i,
|
|
19
|
+
"data-testid": i,
|
|
20
|
+
role: "list",
|
|
21
|
+
className: e(m, `${a}-nav__list`, { [`${a}-nav__list--offscreen`]: o }),
|
|
22
|
+
ref: v,
|
|
23
|
+
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
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
c.displayName = "NavigationList";
|
|
34
33
|
export {
|
|
35
|
-
|
|
34
|
+
c as default
|
|
36
35
|
};
|