@lgsm/account 1.6.20-beta.14 → 1.6.20-beta.15
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/index.d.ts +1 -0
- package/dist/index.js +24 -22
- package/dist/shared-function/getGroupsUrl.d.ts +2 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { ProfileMenu } from './ProfileMenu';
|
|
2
2
|
export type { ProfileMenuProps } from './ProfileMenu';
|
|
3
3
|
export { getProfileUrl } from './shared-function/getProfileUrl';
|
|
4
|
+
export { getGroupsUrl } from './shared-function/getGroupsUrl';
|
|
4
5
|
export { SystemSwitcher } from './SystemSwitcher';
|
|
5
6
|
export type { SystemSwitcherProps } from './SystemSwitcher';
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { DropdownMenu as c, DropdownMenuTrigger as d, DropdownMenuContent as u, DropdownMenuItem as
|
|
3
|
-
import './assets/index.css';const
|
|
1
|
+
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { DropdownMenu as c, DropdownMenuTrigger as d, DropdownMenuContent as u, DropdownMenuItem as t, systemSwitchIcon as h, cn as p } from "@lgsm/ui";
|
|
3
|
+
import './assets/index.css';const i = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%3e%3ccircle%20cx='12'%20cy='12'%20r='12'%20fill='%23F0ECE4'/%3e%3ccircle%20cx='12'%20cy='8'%20r='3'%20fill='%23A8A196'/%3e%3cpath%20d='M6%2018c0-3.313%202.687-6%206-6s6%202.687%206%206'%20stroke='%23A8A196'%20stroke-width='1.5'%20stroke-linecap='round'/%3e%3c/svg%3e", m = (r) => new URL("/my-groups", r).href, g = (r) => new URL("/profile", r).href, s = "cursor-pointer rounded-lg px-4 py-2 text-sm text-black focus:bg-gray-100 focus:text-black", v = ({
|
|
4
4
|
avatarUrl: r,
|
|
5
|
-
jakartaUrl:
|
|
6
|
-
onChangePassword:
|
|
5
|
+
jakartaUrl: l,
|
|
6
|
+
onChangePassword: o,
|
|
7
7
|
onLogout: f
|
|
8
|
-
}) => /* @__PURE__ */
|
|
8
|
+
}) => /* @__PURE__ */ a(c, { modal: !1, children: [
|
|
9
9
|
/* @__PURE__ */ e(d, { asChild: !0, children: /* @__PURE__ */ e(
|
|
10
10
|
"button",
|
|
11
11
|
{
|
|
@@ -16,11 +16,11 @@ import './assets/index.css';const s = "data:image/svg+xml,%3csvg%20xmlns='http:/
|
|
|
16
16
|
children: /* @__PURE__ */ e(
|
|
17
17
|
"img",
|
|
18
18
|
{
|
|
19
|
-
src: r ||
|
|
19
|
+
src: r || i,
|
|
20
20
|
alt: "",
|
|
21
21
|
className: "h-full w-full rounded-full object-cover",
|
|
22
22
|
onError: ({ currentTarget: n }) => {
|
|
23
|
-
n.getAttribute("src") !==
|
|
23
|
+
n.getAttribute("src") !== i && (n.src = i);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
)
|
|
@@ -32,28 +32,29 @@ import './assets/index.css';const s = "data:image/svg+xml,%3csvg%20xmlns='http:/
|
|
|
32
32
|
align: "end",
|
|
33
33
|
sideOffset: 8,
|
|
34
34
|
className: "w-44 rounded-xl border-0 bg-[#FAF9F5] p-2 text-black shadow-lg",
|
|
35
|
-
children: /* @__PURE__ */
|
|
36
|
-
/* @__PURE__ */ e(
|
|
37
|
-
/* @__PURE__ */ e(
|
|
38
|
-
|
|
35
|
+
children: /* @__PURE__ */ a("div", { className: "rounded-lg bg-white p-2", children: [
|
|
36
|
+
/* @__PURE__ */ e(t, { asChild: !0, className: s, children: /* @__PURE__ */ e("a", { href: g(l), children: "My Profile" }) }),
|
|
37
|
+
/* @__PURE__ */ e(t, { asChild: !0, className: s, children: /* @__PURE__ */ e("a", { href: m(l), children: "My Groups" }) }),
|
|
38
|
+
/* @__PURE__ */ e(t, { className: s, onSelect: () => {
|
|
39
|
+
o();
|
|
39
40
|
}, children: "Change Password" }),
|
|
40
|
-
/* @__PURE__ */ e(
|
|
41
|
+
/* @__PURE__ */ e(t, { className: s, onSelect: () => {
|
|
41
42
|
f();
|
|
42
43
|
}, children: "Logout" })
|
|
43
44
|
] })
|
|
44
45
|
}
|
|
45
46
|
)
|
|
46
|
-
] }),
|
|
47
|
+
] }), x = ({
|
|
47
48
|
children: r,
|
|
48
|
-
label:
|
|
49
|
-
contentClassName:
|
|
50
|
-
}) => /* @__PURE__ */
|
|
49
|
+
label: l = "Switch applications",
|
|
50
|
+
contentClassName: o
|
|
51
|
+
}) => /* @__PURE__ */ a(c, { modal: !1, children: [
|
|
51
52
|
/* @__PURE__ */ e(d, { asChild: !0, children: /* @__PURE__ */ e(
|
|
52
53
|
"button",
|
|
53
54
|
{
|
|
54
55
|
"data-lgsm-ui": "",
|
|
55
56
|
type: "button",
|
|
56
|
-
"aria-label":
|
|
57
|
+
"aria-label": l,
|
|
57
58
|
className: "flex h-8 w-8 shrink-0 cursor-pointer items-center justify-center rounded-lg border-0 bg-transparent p-0 opacity-40 grayscale transition-all hover:opacity-100 hover:grayscale-0 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[#A50034] data-[state=open]:opacity-100 data-[state=open]:grayscale-0",
|
|
58
59
|
children: /* @__PURE__ */ e("img", { src: h, alt: "", className: "h-full w-full object-contain p-0.5" })
|
|
59
60
|
}
|
|
@@ -63,13 +64,14 @@ import './assets/index.css';const s = "data:image/svg+xml,%3csvg%20xmlns='http:/
|
|
|
63
64
|
{
|
|
64
65
|
align: "end",
|
|
65
66
|
sideOffset: 8,
|
|
66
|
-
className: p("w-80 max-w-[calc(100vw-2rem)] rounded-xl border-0 bg-[#FAF9F5] p-2 text-[#404041] shadow-lg",
|
|
67
|
+
className: p("w-80 max-w-[calc(100vw-2rem)] rounded-xl border-0 bg-[#FAF9F5] p-2 text-[#404041] shadow-lg", o),
|
|
67
68
|
children: /* @__PURE__ */ e("div", { className: "rounded-lg bg-white p-2", children: r })
|
|
68
69
|
}
|
|
69
70
|
)
|
|
70
71
|
] });
|
|
71
72
|
export {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
m as
|
|
73
|
+
v as ProfileMenu,
|
|
74
|
+
x as SystemSwitcher,
|
|
75
|
+
m as getGroupsUrl,
|
|
76
|
+
g as getProfileUrl
|
|
75
77
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lgsm/account",
|
|
3
|
-
"version": "1.6.20-beta.
|
|
3
|
+
"version": "1.6.20-beta.15",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"module": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
"react-dom": "^19.0.0"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@lgsm/ui": "1.6.20-beta.
|
|
29
|
+
"@lgsm/ui": "1.6.20-beta.15"
|
|
30
30
|
}
|
|
31
31
|
}
|