@phillips/seldon 1.51.1 → 1.53.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/assets/minus.svg.js +1 -1
- package/dist/assets/plus.svg.js +1 -1
- package/dist/components/Accordion/AccordionItem.d.ts +8 -4
- package/dist/components/Accordion/AccordionItem.js +67 -65
- package/dist/components/Collapsible/Collapsible.d.ts +10 -0
- package/dist/components/Collapsible/Collapsible.js +13 -0
- package/dist/components/Collapsible/CollapsibleContent.d.ts +11 -0
- package/dist/components/Collapsible/CollapsibleContent.js +21 -0
- package/dist/components/Collapsible/CollapsibleTrigger.d.ts +10 -0
- package/dist/components/Collapsible/CollapsibleTrigger.js +21 -0
- package/dist/components/Collapsible/index.d.ts +3 -0
- 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/ReadMore/ReadMore.d.ts +35 -0
- package/dist/components/ReadMore/ReadMore.js +57 -0
- package/dist/components/ReadMore/index.d.ts +1 -0
- 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 +3 -0
- package/dist/index.js +87 -76
- package/dist/scss/_utils.scss +13 -3
- package/dist/scss/_vars.scss +30 -11
- package/dist/scss/componentStyles.scss +2 -0
- package/dist/scss/components/Accordion/_accordion.scss +3 -0
- package/dist/scss/components/Button/_button.scss +2 -2
- 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/ReadMore/_readMore.scss +58 -0
- 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 +3 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as e from "react";
|
|
2
|
-
const
|
|
2
|
+
const t = (l) => /* @__PURE__ */ e.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...l }, /* @__PURE__ */ e.createElement("g", { clipPath: "url(#clip0_11553_447)" }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M10.5 5.5C10.5 6.88071 9.38071 8 8 8C6.61929 8 5.5 6.88071 5.5 5.5C5.5 4.11929 6.61929 3 8 3C9.38071 3 10.5 4.11929 10.5 5.5ZM9.5 5.5C9.5 6.32843 8.82843 7 8 7C7.17157 7 6.5 6.32843 6.5 5.5C6.5 4.67157 7.17157 4 8 4C8.82843 4 9.5 4.67157 9.5 5.5Z", fill: "black" }), /* @__PURE__ */ e.createElement("path", { d: "M5.375 10C4.75 10 4.5 10.75 4.5 11.0769V12.5C4.5 12.75 4.25 13 4 13C3.75 13 3.5 12.75 3.5 12.5V11.0769C3.5 10.0148 4.33947 9 5.375 9H10.625C11.6605 9 12.5 10.0148 12.5 11.0769V12.5C12.5 12.75 12.25 13 12 13C11.75 13 11.5 12.75 11.5 12.5V11.0769C11.5 10.75 11.2463 10 10.625 10H5.375Z", fill: "black" })), /* @__PURE__ */ e.createElement("defs", null, /* @__PURE__ */ e.createElement("clipPath", { id: "clip0_11553_447" }, /* @__PURE__ */ e.createElement("rect", { width: 16, height: 16, fill: "white" }))));
|
|
3
3
|
export {
|
|
4
|
-
|
|
4
|
+
t as default
|
|
5
5
|
};
|
package/dist/assets/minus.svg.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as e from "react";
|
|
2
|
-
const t = (l) => /* @__PURE__ */ e.createElement("svg", { width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...l }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4.5 11.8929C4.5 11.4195 4.83579 11.0357 5.25 11.0357L18.75 11.0357C19.1642 11.0357 19.5 11.4195 19.5 11.8929C19.5 12.3662 19.1642 12.75 18.75 12.75L5.25 12.75C4.83579 12.75 4.5 12.3662 4.5 11.8929Z", fill: "
|
|
2
|
+
const t = (l) => /* @__PURE__ */ e.createElement("svg", { width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...l }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4.5 11.8929C4.5 11.4195 4.83579 11.0357 5.25 11.0357L18.75 11.0357C19.1642 11.0357 19.5 11.4195 19.5 11.8929C19.5 12.3662 19.1642 12.75 18.75 12.75L5.25 12.75C4.83579 12.75 4.5 12.3662 4.5 11.8929Z", fill: "currentColor" }), /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4.5 11.8929C4.5 11.4195 4.83579 11.0357 5.25 11.0357L18.75 11.0357C19.1642 11.0357 19.5 11.4195 19.5 11.8929C19.5 12.3662 19.1642 12.75 18.75 12.75L5.25 12.75C4.83579 12.75 4.5 12.3662 4.5 11.8929Z", fill: "currentColor" }));
|
|
3
3
|
export {
|
|
4
4
|
t as default
|
|
5
5
|
};
|
package/dist/assets/plus.svg.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as e from "react";
|
|
2
|
-
const t = (l) => /* @__PURE__ */ e.createElement("svg", { width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...l }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4.5 11.8929C4.5 11.4195 4.83579 11.0357 5.25 11.0357L18.75 11.0357C19.1642 11.0357 19.5 11.4195 19.5 11.8929C19.5 12.3662 19.1642 12.75 18.75 12.75L5.25 12.75C4.83579 12.75 4.5 12.3662 4.5 11.8929Z", fill: "
|
|
2
|
+
const t = (l) => /* @__PURE__ */ e.createElement("svg", { width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...l }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4.5 11.8929C4.5 11.4195 4.83579 11.0357 5.25 11.0357L18.75 11.0357C19.1642 11.0357 19.5 11.4195 19.5 11.8929C19.5 12.3662 19.1642 12.75 18.75 12.75L5.25 12.75C4.83579 12.75 4.5 12.3662 4.5 11.8929Z", fill: "currentColor" }), /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.1071 4.5C12.5805 4.5 12.9643 4.83579 12.9643 5.25L12.9643 18.75C12.9643 19.1642 12.5805 19.5 12.1071 19.5C11.6338 19.5 11.25 19.1642 11.25 18.75L11.25 5.25C11.25 4.83579 11.6338 4.5 12.1071 4.5Z", fill: "currentColor" }));
|
|
3
3
|
export {
|
|
4
4
|
t as default
|
|
5
5
|
};
|
|
@@ -7,15 +7,19 @@ export interface AccordionItemProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
7
7
|
/**
|
|
8
8
|
* When true, prevents the user from interacting with the item.
|
|
9
9
|
*/
|
|
10
|
-
isLocked
|
|
10
|
+
isLocked?: boolean;
|
|
11
11
|
/**
|
|
12
12
|
* Determines whether the variation on text style is large or small.
|
|
13
13
|
*/
|
|
14
14
|
variation: string;
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* Uniqueid for the Accordion Item.
|
|
17
17
|
*/
|
|
18
|
-
|
|
18
|
+
id: string;
|
|
19
|
+
/**
|
|
20
|
+
* Accordion item label.
|
|
21
|
+
*/
|
|
22
|
+
label: React.ReactNode;
|
|
19
23
|
/**
|
|
20
24
|
* Child element pass in to display as item content.
|
|
21
25
|
*/
|
|
@@ -25,5 +29,5 @@ export interface AccordionItemProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
25
29
|
*/
|
|
26
30
|
hasTransition?: boolean;
|
|
27
31
|
}
|
|
28
|
-
declare const AccordionItem: ({ isLocked, variation, label, isLastItem, hasTransition, children, ...props }: AccordionItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
declare const AccordionItem: ({ isLocked, variation, id, label, isLastItem, hasTransition, children, ...props }: AccordionItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
33
|
export default AccordionItem;
|
|
@@ -1,108 +1,110 @@
|
|
|
1
|
-
import { jsxs as g, jsx as
|
|
1
|
+
import { jsxs as g, jsx as o, Fragment as h } from "react/jsx-runtime";
|
|
2
2
|
import { getCommonProps as $ } from "../../utils/index.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import f from "../../assets/plus.svg.js";
|
|
4
|
+
import v from "../../assets/minus.svg.js";
|
|
5
5
|
import I from "../../assets/lock.svg.js";
|
|
6
|
-
import
|
|
7
|
-
import { Item as _, Trigger as C, Content as
|
|
8
|
-
import { getIconClasses as
|
|
9
|
-
const
|
|
6
|
+
import d from "../../node_modules/classnames/index.js";
|
|
7
|
+
import { Item as _, Trigger as C, Content as x } from "../../node_modules/@radix-ui/react-accordion/dist/index.js";
|
|
8
|
+
import { getIconClasses as p } from "./utils.js";
|
|
9
|
+
const N = ({
|
|
10
10
|
children: n,
|
|
11
|
-
className:
|
|
12
|
-
baseClassName:
|
|
13
|
-
disable:
|
|
11
|
+
className: s,
|
|
12
|
+
baseClassName: t,
|
|
13
|
+
disable: c,
|
|
14
14
|
isLargeVariation: e,
|
|
15
|
-
id:
|
|
15
|
+
id: r
|
|
16
16
|
}) => {
|
|
17
|
-
const
|
|
17
|
+
const a = c, l = /* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(
|
|
18
18
|
I,
|
|
19
19
|
{
|
|
20
|
-
className:
|
|
21
|
-
"data-testid": `${
|
|
20
|
+
className: p(t, e, "lock"),
|
|
21
|
+
"data-testid": `${r}-lockedIcon`,
|
|
22
22
|
"aria-hidden": !0
|
|
23
23
|
}
|
|
24
|
-
) }),
|
|
25
|
-
|
|
24
|
+
) }), u = /* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(
|
|
25
|
+
f,
|
|
26
26
|
{
|
|
27
|
-
className:
|
|
28
|
-
"data-testid": `${
|
|
27
|
+
className: p(t, e, "plus"),
|
|
28
|
+
"data-testid": `${r}-plusIcon`,
|
|
29
29
|
"aria-hidden": !0
|
|
30
30
|
}
|
|
31
|
-
) }),
|
|
32
|
-
|
|
31
|
+
) }), i = /* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(
|
|
32
|
+
v,
|
|
33
33
|
{
|
|
34
|
-
className:
|
|
35
|
-
"data-testid": `${
|
|
34
|
+
className: p(t, e, "minus"),
|
|
35
|
+
"data-testid": `${r}-minusIcon`,
|
|
36
36
|
"aria-hidden": !0
|
|
37
37
|
}
|
|
38
38
|
) });
|
|
39
|
-
return /* @__PURE__ */
|
|
39
|
+
return /* @__PURE__ */ o(
|
|
40
40
|
C,
|
|
41
41
|
{
|
|
42
|
-
"data-disabled":
|
|
42
|
+
"data-disabled": c,
|
|
43
43
|
asChild: !0,
|
|
44
|
-
className:
|
|
45
|
-
children: /* @__PURE__ */ g("div", { "data-testid": `${
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
|
|
48
|
-
!
|
|
49
|
-
!
|
|
44
|
+
className: d(t, { [`${t}--hoverable`]: !c }, s),
|
|
45
|
+
children: /* @__PURE__ */ g("div", { "data-testid": `${r}-trigger`, children: [
|
|
46
|
+
/* @__PURE__ */ o("div", { className: d(`${t}__text`, { [`${t}__text--lg`]: e }), children: n }),
|
|
47
|
+
a && l,
|
|
48
|
+
!a && u,
|
|
49
|
+
!a && i
|
|
50
50
|
] })
|
|
51
51
|
}
|
|
52
52
|
);
|
|
53
|
-
},
|
|
53
|
+
}, A = ({
|
|
54
54
|
children: n,
|
|
55
|
-
baseClassName:
|
|
56
|
-
disable:
|
|
57
|
-
hasTransition:
|
|
55
|
+
baseClassName: s,
|
|
56
|
+
disable: t,
|
|
57
|
+
hasTransition: c,
|
|
58
58
|
isLargeVariation: e,
|
|
59
|
-
className:
|
|
60
|
-
}) => /* @__PURE__ */
|
|
61
|
-
|
|
59
|
+
className: r
|
|
60
|
+
}) => /* @__PURE__ */ o(h, { children: t && n ? /* @__PURE__ */ o("div", { children: n }) : /* @__PURE__ */ o(
|
|
61
|
+
x,
|
|
62
62
|
{
|
|
63
63
|
asChild: !0,
|
|
64
|
-
className:
|
|
65
|
-
{ [`${
|
|
66
|
-
{ [`${
|
|
67
|
-
|
|
64
|
+
className: d(
|
|
65
|
+
{ [`${s}__content--lg`]: e },
|
|
66
|
+
{ [`${s}--transition`]: c },
|
|
67
|
+
r
|
|
68
68
|
),
|
|
69
69
|
children: n
|
|
70
70
|
}
|
|
71
|
-
) }),
|
|
72
|
-
isLocked: n,
|
|
73
|
-
variation:
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
71
|
+
) }), H = ({
|
|
72
|
+
isLocked: n = !1,
|
|
73
|
+
variation: s,
|
|
74
|
+
id: t,
|
|
75
|
+
label: c,
|
|
76
|
+
isLastItem: e,
|
|
77
|
+
hasTransition: r = !1,
|
|
78
|
+
children: a,
|
|
79
|
+
...l
|
|
79
80
|
}) => {
|
|
80
|
-
const { className:
|
|
81
|
+
const { className: u } = $({ id: t }, "Accordion"), i = s === "lg", m = `${u}-item`;
|
|
81
82
|
return /* @__PURE__ */ g(
|
|
82
83
|
_,
|
|
83
84
|
{
|
|
84
85
|
disabled: n,
|
|
85
|
-
value:
|
|
86
|
-
className:
|
|
86
|
+
value: t,
|
|
87
|
+
className: d(m, { [`${m}__border-bottom`]: !e }),
|
|
88
|
+
...l,
|
|
87
89
|
children: [
|
|
88
|
-
/* @__PURE__ */
|
|
89
|
-
|
|
90
|
+
/* @__PURE__ */ o(
|
|
91
|
+
N,
|
|
90
92
|
{
|
|
91
93
|
disable: n,
|
|
92
|
-
isLargeVariation:
|
|
93
|
-
id:
|
|
94
|
-
baseClassName: `${
|
|
95
|
-
children:
|
|
94
|
+
isLargeVariation: i,
|
|
95
|
+
id: t,
|
|
96
|
+
baseClassName: `${m}-label`,
|
|
97
|
+
children: c
|
|
96
98
|
}
|
|
97
99
|
),
|
|
98
|
-
/* @__PURE__ */
|
|
99
|
-
|
|
100
|
+
/* @__PURE__ */ o(
|
|
101
|
+
A,
|
|
100
102
|
{
|
|
101
103
|
disable: n,
|
|
102
|
-
hasTransition:
|
|
103
|
-
isLargeVariation:
|
|
104
|
-
baseClassName:
|
|
105
|
-
children:
|
|
104
|
+
hasTransition: r,
|
|
105
|
+
isLargeVariation: i,
|
|
106
|
+
baseClassName: m,
|
|
107
|
+
children: a
|
|
106
108
|
}
|
|
107
109
|
)
|
|
108
110
|
]
|
|
@@ -110,5 +112,5 @@ const x = ({
|
|
|
110
112
|
);
|
|
111
113
|
};
|
|
112
114
|
export {
|
|
113
|
-
|
|
115
|
+
H as default
|
|
114
116
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
|
2
|
+
export type CollapsibleProps = CollapsiblePrimitive.CollapsibleProps;
|
|
3
|
+
/**
|
|
4
|
+
* ## Overview
|
|
5
|
+
*
|
|
6
|
+
* A 1:1 port of the [Radix UI Collapsible Component](https://www.radix-ui.com/primitives/docs/components/collapsible).
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
declare const Collapsible: import("react").ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export default Collapsible;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { Root as e } from "../../node_modules/@radix-ui/react-collapsible/dist/index.js";
|
|
3
|
+
import { getCommonProps as t } from "../../utils/index.js";
|
|
4
|
+
import p from "../../node_modules/classnames/index.js";
|
|
5
|
+
import { forwardRef as i } from "react";
|
|
6
|
+
const f = i(({ className: m, ...o }, s) => {
|
|
7
|
+
const { className: a, ...r } = t(o, "Collapsible");
|
|
8
|
+
return /* @__PURE__ */ l(e, { className: p(a, m), ...r, ...o, ref: s });
|
|
9
|
+
});
|
|
10
|
+
f.displayName = "Collapsible";
|
|
11
|
+
export {
|
|
12
|
+
f as default
|
|
13
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
|
3
|
+
export type CollapsibleContentProps = CollapsiblePrimitive.CollapsibleContentProps;
|
|
4
|
+
/**
|
|
5
|
+
* ## Overview
|
|
6
|
+
*
|
|
7
|
+
* A 1:1 port of the [Radix UI Collapsible Content Component](https://www.radix-ui.com/primitives/docs/components/collapsible#content).
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
declare const CollapsibleContent: React.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export default CollapsibleContent;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import l from "react";
|
|
3
|
+
import { Content as r } from "../../node_modules/@radix-ui/react-collapsible/dist/index.js";
|
|
4
|
+
import { getCommonProps as n } from "../../utils/index.js";
|
|
5
|
+
import p from "../../node_modules/classnames/index.js";
|
|
6
|
+
const f = l.forwardRef(({ className: t, ...o }, e) => {
|
|
7
|
+
const { className: a, ...m } = n(o, "CollapsibleContent");
|
|
8
|
+
return /* @__PURE__ */ s(
|
|
9
|
+
r,
|
|
10
|
+
{
|
|
11
|
+
ref: e,
|
|
12
|
+
className: p(a, t),
|
|
13
|
+
...m,
|
|
14
|
+
...o
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
});
|
|
18
|
+
f.displayName = "CollapsibleContent";
|
|
19
|
+
export {
|
|
20
|
+
f as default
|
|
21
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
|
2
|
+
export type CollapsibleTriggerProps = CollapsiblePrimitive.CollapsibleTriggerProps;
|
|
3
|
+
/**
|
|
4
|
+
* ## Overview
|
|
5
|
+
*
|
|
6
|
+
* A 1:1 port of the [Radix UI Collapsible Trigger Component](https://www.radix-ui.com/primitives/docs/components/collapsible#trigger).
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
declare const CollapsibleTrigger: import("react").ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
export default CollapsibleTrigger;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { Trigger as l } from "../../node_modules/@radix-ui/react-collapsible/dist/index.js";
|
|
3
|
+
import { getCommonProps as i } from "../../utils/index.js";
|
|
4
|
+
import t from "../../node_modules/classnames/index.js";
|
|
5
|
+
import { forwardRef as p } from "react";
|
|
6
|
+
const g = p(({ className: o, ...r }, m) => {
|
|
7
|
+
const { className: s, ...e } = i(r, "CollapsibleTrigger");
|
|
8
|
+
return /* @__PURE__ */ a(
|
|
9
|
+
l,
|
|
10
|
+
{
|
|
11
|
+
className: t(s, o),
|
|
12
|
+
...e,
|
|
13
|
+
...r,
|
|
14
|
+
ref: m
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
});
|
|
18
|
+
g.displayName = "CollapsibleTrigger";
|
|
19
|
+
export {
|
|
20
|
+
g as default
|
|
21
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { default as Collapsible, type CollapsibleProps } from './Collapsible';
|
|
2
|
+
export { default as CollapsibleContent, type CollapsibleContentProps } from './CollapsibleContent';
|
|
3
|
+
export { default as CollapsibleTrigger, type CollapsibleTriggerProps } from './CollapsibleTrigger';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
2
|
import * as DropdownSelect from '@radix-ui/react-select';
|
|
3
3
|
import { DropdownItem } from './types';
|
|
4
|
-
export interface DropdownProps extends Omit<DropdownSelect.SelectProps, 'defaultValue' | 'dir'>,
|
|
4
|
+
export interface DropdownProps extends Omit<DropdownSelect.SelectProps, 'defaultValue' | 'dir'>, ComponentPropsWithoutRef<'div'> {
|
|
5
5
|
/**
|
|
6
6
|
* All options to be listed in the dropdown
|
|
7
7
|
*/
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* Default mobile menu label
|
|
5
|
-
*/
|
|
6
|
-
defaultMobileMenuLabel?: string;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Component, ComponentProps, ReactElement } from 'react';
|
|
3
|
+
export interface HeaderProps extends ComponentProps<'header'> {
|
|
7
4
|
/**
|
|
8
5
|
* Logo src
|
|
9
6
|
*/
|
|
10
|
-
logo?:
|
|
7
|
+
logo?: ReactElement<Component> | string;
|
|
11
8
|
/**
|
|
12
9
|
* Toggle open text
|
|
13
10
|
*/
|
|
@@ -22,11 +19,10 @@ export interface HeaderProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
22
19
|
logoText?: string;
|
|
23
20
|
}
|
|
24
21
|
export type HeaderContextType = {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
onSelect: (label: string) => void;
|
|
22
|
+
/**
|
|
23
|
+
* Used for mobile navigation menu hiding and showing
|
|
24
|
+
*/
|
|
25
|
+
isMenuOpen: boolean;
|
|
30
26
|
/**
|
|
31
27
|
* Is the user within the search input and searching
|
|
32
28
|
*/
|
|
@@ -37,5 +33,16 @@ export type HeaderContextType = {
|
|
|
37
33
|
setIsSearchExpanded: React.Dispatch<React.SetStateAction<boolean>>;
|
|
38
34
|
};
|
|
39
35
|
export declare const HeaderContext: React.Context<HeaderContextType>;
|
|
40
|
-
|
|
36
|
+
/**
|
|
37
|
+
* ## Overview
|
|
38
|
+
*
|
|
39
|
+
* This component allows navigation, search, login/logout, and language selection and supports desktop and mobile layouts
|
|
40
|
+
*
|
|
41
|
+
* [Figma Link Mobile](https://www.figma.com/design/hMu9IWH5N3KamJy8tLFdyV/EASEL-Compendium%3A-Tokens%2C-Components-%26-Patterns?node-id=10877-33417&node-type=INSTANCE&m=dev)
|
|
42
|
+
*
|
|
43
|
+
* [Figma Link Desktop](https://www.figma.com/design/hMu9IWH5N3KamJy8tLFdyV/EASEL-Compendium%3A-Tokens%2C-Components-%26-Patterns?node-id=10570-6295&node-type=FRAME&m=dev)
|
|
44
|
+
*
|
|
45
|
+
* [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-header--overview)
|
|
46
|
+
*/
|
|
47
|
+
declare const Header: React.ForwardRefExoticComponent<Omit<HeaderProps, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
41
48
|
export default Header;
|
|
@@ -1,79 +1,76 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as o, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import l, { createContext as O, forwardRef as P, useState as h } from "react";
|
|
2
3
|
import s from "../../node_modules/classnames/index.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
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
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
{
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
)
|
|
74
|
-
] });
|
|
75
|
-
};
|
|
4
|
+
import { findChildrenOfType as i, findChildrenExcludingTypes as T, px as e } from "../../utils/index.js";
|
|
5
|
+
import j from "../../assets/PhillipsLogo.svg.js";
|
|
6
|
+
import p from "../UserManagement/UserManagement.js";
|
|
7
|
+
import g from "../LanguageSelector/LanguageSelector.js";
|
|
8
|
+
import f from "../Navigation/Navigation.js";
|
|
9
|
+
import { defaultHeaderContext as w } from "./utils.js";
|
|
10
|
+
const I = O(w), L = P(
|
|
11
|
+
({
|
|
12
|
+
logo: d = /* @__PURE__ */ a(j, {}),
|
|
13
|
+
className: u,
|
|
14
|
+
children: r,
|
|
15
|
+
toggleOpenText: _ = "Open Menu",
|
|
16
|
+
toggleCloseText: v = "Close Menu",
|
|
17
|
+
logoText: x = "Home Page",
|
|
18
|
+
...C
|
|
19
|
+
}, $) => {
|
|
20
|
+
const b = i(r, p), m = i(r, g), [c, y] = h(!1), E = i(r, f), N = T(r, [f, p, g]), [n, M] = h(!1), S = n ? v : _, H = function() {
|
|
21
|
+
M((t) => !t);
|
|
22
|
+
};
|
|
23
|
+
return /* @__PURE__ */ o("header", { ...C, className: s(`${e}-header`, u), ref: $, children: [
|
|
24
|
+
/* @__PURE__ */ o("div", { className: `${e}-header__top-row`, children: [
|
|
25
|
+
m,
|
|
26
|
+
" ",
|
|
27
|
+
/* @__PURE__ */ o(
|
|
28
|
+
"button",
|
|
29
|
+
{
|
|
30
|
+
"aria-label": S,
|
|
31
|
+
"data-testid": "mobile-menu-toggle",
|
|
32
|
+
type: "button",
|
|
33
|
+
onClick: H,
|
|
34
|
+
className: s(`${e}-header__toggle-btn`, {
|
|
35
|
+
[`${e}-header__toggle-btn--open`]: n
|
|
36
|
+
}),
|
|
37
|
+
children: [
|
|
38
|
+
/* @__PURE__ */ a("span", {}),
|
|
39
|
+
" "
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
),
|
|
43
|
+
/* @__PURE__ */ a("h1", { "data-testid": "header-logo", className: `${e}-header__logo`, children: /* @__PURE__ */ a("a", { href: "/", "aria-label": x, children: typeof d == "object" ? d : /* @__PURE__ */ a("img", { alt: "Phillips", "data-testid": "header-logo-img", src: d, height: "14" }) }) }),
|
|
44
|
+
b
|
|
45
|
+
] }),
|
|
46
|
+
/* @__PURE__ */ a("div", { className: s(`${e}-header__nav`, { [`${e}-header__nav--closed`]: !n }), children: /* @__PURE__ */ o(
|
|
47
|
+
I.Provider,
|
|
48
|
+
{
|
|
49
|
+
value: {
|
|
50
|
+
isMenuOpen: n,
|
|
51
|
+
isSearchExpanded: c,
|
|
52
|
+
setIsSearchExpanded: y
|
|
53
|
+
},
|
|
54
|
+
children: [
|
|
55
|
+
l.Children.map(
|
|
56
|
+
E,
|
|
57
|
+
(t) => l.isValidElement(t) ? l.cloneElement(t, {
|
|
58
|
+
children: [
|
|
59
|
+
...l.Children.toArray(t.props.children),
|
|
60
|
+
m
|
|
61
|
+
]
|
|
62
|
+
}) : t
|
|
63
|
+
),
|
|
64
|
+
N
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
) }),
|
|
68
|
+
/* @__PURE__ */ a("div", { className: s(`${e}-header__overlay`, { [`${e}-header__overlay--active`]: c }) })
|
|
69
|
+
] });
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
L.displayName = "Header";
|
|
76
73
|
export {
|
|
77
|
-
|
|
78
|
-
|
|
74
|
+
I as HeaderContext,
|
|
75
|
+
L as default
|
|
79
76
|
};
|
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
expandedItem: string;
|
|
4
|
-
setExpandedItem: () => void;
|
|
5
|
-
isExpanded: boolean;
|
|
6
|
-
onSelect: () => void;
|
|
7
|
-
isSearchExpanded: boolean;
|
|
8
|
-
setIsSearchExpanded: () => void;
|
|
9
|
-
};
|
|
1
|
+
import { HeaderContextType } from './Header';
|
|
2
|
+
export declare const defaultHeaderContext: HeaderContextType;
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import { noOp as e } from "../../utils/index.js";
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
expandedItem: "",
|
|
5
|
-
setExpandedItem: e,
|
|
6
|
-
isExpanded: !1,
|
|
7
|
-
onSelect: e,
|
|
2
|
+
const n = {
|
|
3
|
+
isMenuOpen: !1,
|
|
8
4
|
isSearchExpanded: !1,
|
|
9
5
|
setIsSearchExpanded: e
|
|
10
6
|
};
|
|
11
7
|
export {
|
|
12
|
-
|
|
8
|
+
n as defaultHeaderContext
|
|
13
9
|
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { SupportedLanguages } from '../../types/commonTypes';
|
|
3
|
+
export type LanguageOption = {
|
|
4
|
+
label: string;
|
|
5
|
+
value: SupportedLanguages;
|
|
6
|
+
};
|
|
7
|
+
export interface LanguageSelectorProps extends ComponentProps<'div'> {
|
|
8
|
+
/**
|
|
9
|
+
* Available language options to select from
|
|
10
|
+
*/
|
|
11
|
+
languageOptions?: LanguageOption[];
|
|
12
|
+
/**
|
|
13
|
+
* The currently selected language, shows in the input
|
|
14
|
+
*/
|
|
15
|
+
currentLanguage?: SupportedLanguages;
|
|
16
|
+
/**
|
|
17
|
+
* Called when the language is changed in the dropdown
|
|
18
|
+
* @param language
|
|
19
|
+
*/
|
|
20
|
+
onLanguageChange?: (language: SupportedLanguages) => void;
|
|
21
|
+
/**
|
|
22
|
+
* hide or show with an opacity transition
|
|
23
|
+
*/
|
|
24
|
+
isHidden?: boolean;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* ## Overview
|
|
28
|
+
*
|
|
29
|
+
* This is used in the Header component to allow users to change the language of the site. It is a controlled component.
|
|
30
|
+
*
|
|
31
|
+
* [Figma Link](https://www.figma.com/design/hMu9IWH5N3KamJy8tLFdyV/EASEL-Compendium%3A-Tokens%2C-Components-%26-Patterns?node-id=10570-6295&m=dev)
|
|
32
|
+
*
|
|
33
|
+
* [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-languageselector--overview)
|
|
34
|
+
*/
|
|
35
|
+
declare const LanguageSelector: import("react").ForwardRefExoticComponent<Omit<LanguageSelectorProps, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
36
|
+
export default LanguageSelector;
|