@phillips/seldon 1.31.0 → 1.31.1
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,45 +1,48 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { getCommonProps as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { SupportedLanguages as
|
|
9
|
-
import
|
|
10
|
-
const
|
|
1
|
+
import { jsxs as d, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { getCommonProps as j, px as A, noOp as r } from "../../utils/index.js";
|
|
3
|
+
import M from "../Input/Input.js";
|
|
4
|
+
import P from "../../assets/account_circle.svg.js";
|
|
5
|
+
import S from "../Navigation/NavigationItemTrigger/NavigationItemTrigger.js";
|
|
6
|
+
import T from "../Navigation/NavigationList/NavigationList.js";
|
|
7
|
+
import U from "../Navigation/NavigationItem/NavigationItem.js";
|
|
8
|
+
import { SupportedLanguages as s } from "../../types/commonTypes.js";
|
|
9
|
+
import w from "../../node_modules/classnames/index.js";
|
|
10
|
+
const K = ({
|
|
11
11
|
accountDetailsLink: m,
|
|
12
|
-
children:
|
|
13
|
-
className:
|
|
14
|
-
currentLanguage:
|
|
15
|
-
languageOptions:
|
|
16
|
-
{ label: "English", value:
|
|
17
|
-
{ label: "中文", value:
|
|
12
|
+
children: v,
|
|
13
|
+
className: p,
|
|
14
|
+
currentLanguage: o = s.en,
|
|
15
|
+
languageOptions: t = [
|
|
16
|
+
{ label: "English", value: s.en },
|
|
17
|
+
{ label: "中文", value: s.zh }
|
|
18
18
|
],
|
|
19
|
-
onLanguageChange:
|
|
20
|
-
isLoggedIn:
|
|
21
|
-
onLogin: f =
|
|
22
|
-
onLogout: _ =
|
|
23
|
-
loginLabel:
|
|
24
|
-
logoutLabel:
|
|
19
|
+
onLanguageChange: h = r,
|
|
20
|
+
isLoggedIn: n = !1,
|
|
21
|
+
onLogin: f = r,
|
|
22
|
+
onLogout: _ = r,
|
|
23
|
+
loginLabel: N = "Login",
|
|
24
|
+
logoutLabel: b = "Logout",
|
|
25
25
|
...c
|
|
26
26
|
}) => {
|
|
27
|
-
var
|
|
28
|
-
const { className: l, ...
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
var i, g;
|
|
28
|
+
const { className: l, ...C } = j(c, "UserManagement"), $ = (g = (i = t.find((e) => e.value === o)) == null ? void 0 : i.label) != null ? g : "English", x = m != null ? m : "a", E = (e) => {
|
|
29
|
+
var u;
|
|
30
|
+
(u = document.activeElement) == null || u.blur(), h(e);
|
|
31
|
+
};
|
|
32
|
+
return /* @__PURE__ */ d("div", { ...C, className: w(l, p), ...c, children: [
|
|
33
|
+
/* @__PURE__ */ d("ul", { className: `${l}__account-wrapper`, children: [
|
|
34
|
+
n && /* @__PURE__ */ a(x, { children: /* @__PURE__ */ a(P, { className: `${l}__account-icon` }) }),
|
|
32
35
|
/* @__PURE__ */ a(
|
|
33
|
-
|
|
36
|
+
U,
|
|
34
37
|
{
|
|
35
38
|
className: `${l}__login`,
|
|
36
|
-
onClick:
|
|
37
|
-
label:
|
|
39
|
+
onClick: n ? _ : f,
|
|
40
|
+
label: n ? b : N
|
|
38
41
|
}
|
|
39
42
|
)
|
|
40
43
|
] }),
|
|
41
|
-
/* @__PURE__ */ a(
|
|
42
|
-
|
|
44
|
+
/* @__PURE__ */ a(S, { className: `${l}__language`, label: $, children: /* @__PURE__ */ a(T, { id: `${A}-langauge-selection-list`, className: `${l}__language__selections`, children: t.map((e) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a(
|
|
45
|
+
M,
|
|
43
46
|
{
|
|
44
47
|
type: "radio",
|
|
45
48
|
id: `radio-${e.value}`,
|
|
@@ -47,13 +50,13 @@ const H = ({
|
|
|
47
50
|
value: e.value,
|
|
48
51
|
inline: !0,
|
|
49
52
|
name: "languages",
|
|
50
|
-
checked: e.value ===
|
|
51
|
-
onChange: () =>
|
|
53
|
+
checked: e.value === o,
|
|
54
|
+
onChange: () => E(e.value)
|
|
52
55
|
}
|
|
53
56
|
) }, e.value)) }) }),
|
|
54
|
-
|
|
57
|
+
v
|
|
55
58
|
] });
|
|
56
59
|
};
|
|
57
60
|
export {
|
|
58
|
-
|
|
61
|
+
K as default
|
|
59
62
|
};
|
|
@@ -22,6 +22,10 @@
|
|
|
22
22
|
margin-top: auto;
|
|
23
23
|
padding: 0;
|
|
24
24
|
position: unset;
|
|
25
|
+
|
|
26
|
+
.#{$px}-nav__item-trigger {
|
|
27
|
+
text-align: unset;
|
|
28
|
+
}
|
|
25
29
|
}
|
|
26
30
|
|
|
27
31
|
> li {
|
|
@@ -88,6 +92,8 @@
|
|
|
88
92
|
}
|
|
89
93
|
.#{$px}-user-management__language {
|
|
90
94
|
&__selections {
|
|
95
|
+
padding: 0.8125rem;
|
|
96
|
+
|
|
91
97
|
@include isHeaderDesktop {
|
|
92
98
|
background: $off-white;
|
|
93
99
|
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 85%);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phillips/seldon",
|
|
3
|
-
"version": "1.31.
|
|
3
|
+
"version": "1.31.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/PhillipsAuctionHouse/seldon"
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@semantic-release/changelog": "^6.0.3",
|
|
53
53
|
"@semantic-release/git": "^10.0.1",
|
|
54
54
|
"@semantic-release/github": "^10.1.0",
|
|
55
|
-
"@storybook/addon-essentials": "^8.2.
|
|
55
|
+
"@storybook/addon-essentials": "^8.2.5",
|
|
56
56
|
"@storybook/addon-interactions": "^8.1.4",
|
|
57
57
|
"@storybook/addon-links": "^8.1.4",
|
|
58
58
|
"@storybook/addon-mdx-gfm": "^8.2.4",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
79
79
|
"eslint-plugin-react-refresh": "^0.4.8",
|
|
80
80
|
"eslint-plugin-storybook": "^0.8.0",
|
|
81
|
-
"husky": "^9.
|
|
81
|
+
"husky": "^9.1.2",
|
|
82
82
|
"prettier": "3.3.2",
|
|
83
83
|
"react": "^18.3.1",
|
|
84
84
|
"react-docgen-typescript": "^2.2.2",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"stylelint-order": "^6.0.4",
|
|
96
96
|
"stylelint-scss": "^6.4.1",
|
|
97
97
|
"ts-node": "^10.9.2",
|
|
98
|
-
"typescript": "^5.5.
|
|
98
|
+
"typescript": "^5.5.4",
|
|
99
99
|
"vite": "^5.3.3",
|
|
100
100
|
"vite-plugin-dts": "^2.3.0",
|
|
101
101
|
"vite-plugin-svgr": "^4.2.0",
|