@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 u, jsx as a } from "react/jsx-runtime";
2
- import { getCommonProps as x, px as j, noOp as s } from "../../utils/index.js";
3
- import A from "../Input/Input.js";
4
- import E from "../../assets/account_circle.svg.js";
5
- import M from "../Navigation/NavigationItemTrigger/NavigationItemTrigger.js";
6
- import P from "../Navigation/NavigationList/NavigationList.js";
7
- import S from "../Navigation/NavigationItem/NavigationItem.js";
8
- import { SupportedLanguages as o } from "../../types/commonTypes.js";
9
- import T from "../../node_modules/classnames/index.js";
10
- const H = ({
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: p,
13
- className: v,
14
- currentLanguage: n = o.en,
15
- languageOptions: i = [
16
- { label: "English", value: o.en },
17
- { label: "中文", value: o.zh }
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: d = s,
20
- isLoggedIn: r = !1,
21
- onLogin: f = s,
22
- onLogout: _ = s,
23
- loginLabel: h = "Login",
24
- logoutLabel: N = "Logout",
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 t, g;
28
- const { className: l, ...b } = x(c, "UserManagement"), $ = (g = (t = i.find((e) => e.value === n)) == null ? void 0 : t.label) != null ? g : "English", C = m != null ? m : "a";
29
- return /* @__PURE__ */ u("div", { ...b, className: T(l, v), ...c, children: [
30
- /* @__PURE__ */ u("ul", { className: `${l}__account-wrapper`, children: [
31
- r && /* @__PURE__ */ a(C, { children: /* @__PURE__ */ a(E, { className: `${l}__account-icon` }) }),
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
- S,
36
+ U,
34
37
  {
35
38
  className: `${l}__login`,
36
- onClick: r ? _ : f,
37
- label: r ? N : h
39
+ onClick: n ? _ : f,
40
+ label: n ? b : N
38
41
  }
39
42
  )
40
43
  ] }),
41
- /* @__PURE__ */ a(M, { className: `${l}__language`, label: $, children: /* @__PURE__ */ a(P, { id: `${j}-langauge-selection-list`, className: `${l}__language__selections`, children: i.map((e) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a(
42
- A,
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 === n,
51
- onChange: () => d(e.value)
53
+ checked: e.value === o,
54
+ onChange: () => E(e.value)
52
55
  }
53
56
  ) }, e.value)) }) }),
54
- p
57
+ v
55
58
  ] });
56
59
  };
57
60
  export {
58
- H as default
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.0",
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.4",
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.0.11",
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.3",
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",