@ichaingo/header 1.5.32 → 1.5.34
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/lib/Explorer.js +20 -18
- package/package.json +14 -14
package/dist/lib/Explorer.js
CHANGED
|
@@ -7,32 +7,34 @@ import b from "@ichaingo/request";
|
|
|
7
7
|
import x from "@ichaingo/link";
|
|
8
8
|
import y from "@ichaingo/better-link";
|
|
9
9
|
import N from "@ichaingo/image";
|
|
10
|
-
import {
|
|
10
|
+
import { usePathname as A } from "next/navigation";
|
|
11
|
+
import { Accordion as L, AccordionItem as I, AccordionTrigger as S, AccordionContent as j } from "@ichaingo/ui/accordion";
|
|
11
12
|
function F({ onClick: o = () => {
|
|
12
13
|
} }) {
|
|
13
|
-
|
|
14
|
+
A();
|
|
15
|
+
const { gotoExplorer: m } = y(), [n, u] = p([]), [f, l] = p(""), h = async () => {
|
|
14
16
|
const e = await b.get("/api/v2/chains/all-chain-list/basic");
|
|
15
|
-
|
|
17
|
+
u(e.data);
|
|
16
18
|
};
|
|
17
19
|
w(() => {
|
|
18
|
-
|
|
20
|
+
h();
|
|
19
21
|
}, []);
|
|
20
|
-
const
|
|
21
|
-
var
|
|
22
|
+
const c = (e) => {
|
|
23
|
+
var t, s;
|
|
22
24
|
return /* @__PURE__ */ a(
|
|
23
25
|
x,
|
|
24
26
|
{
|
|
25
|
-
href:
|
|
27
|
+
href: m({ chain: e.chainSymbol }),
|
|
26
28
|
className: "w-full h-full flex items-center gap-2 py-2 cursor-pointer font-medium",
|
|
27
29
|
baseUrl: process.env.NEXT_PUBLIC_BASE_URL,
|
|
28
30
|
onClick: (i) => {
|
|
29
|
-
i.preventDefault(), i.stopPropagation(), o == null || o(),
|
|
31
|
+
i.preventDefault(), i.stopPropagation(), o == null || o(), l("");
|
|
30
32
|
},
|
|
31
33
|
children: [
|
|
32
34
|
/* @__PURE__ */ r(
|
|
33
35
|
N,
|
|
34
36
|
{
|
|
35
|
-
src: e != null && e.chainIconUrl ? e == null ? void 0 : e.chainIconUrl : `//cdn.ichaingo.com/module/cryptos/${(
|
|
37
|
+
src: e != null && e.chainIconUrl ? e == null ? void 0 : e.chainIconUrl : `//cdn.ichaingo.com/module/cryptos/${(s = (t = e == null ? void 0 : e.chain) == null ? void 0 : t.toLowerCase()) == null ? void 0 : s.replace(" ", "-")}.png?format=auto&width=20&height=20`,
|
|
36
38
|
className: "w-5 h-5",
|
|
37
39
|
objectFit: "contain"
|
|
38
40
|
}
|
|
@@ -53,8 +55,8 @@ function F({ onClick: o = () => {
|
|
|
53
55
|
arrow: { pointAtCenter: !0 },
|
|
54
56
|
placement: "bottom",
|
|
55
57
|
menu: {
|
|
56
|
-
items:
|
|
57
|
-
label:
|
|
58
|
+
items: n.map((e) => ({
|
|
59
|
+
label: c(e),
|
|
58
60
|
key: e.chainSymbol
|
|
59
61
|
}))
|
|
60
62
|
},
|
|
@@ -62,18 +64,18 @@ function F({ onClick: o = () => {
|
|
|
62
64
|
}
|
|
63
65
|
) }),
|
|
64
66
|
/* @__PURE__ */ r("div", { className: "md:hidden w-full", children: /* @__PURE__ */ r("div", { onClick: (e) => {
|
|
65
|
-
e.preventDefault(), e.stopPropagation()
|
|
67
|
+
e.preventDefault(), e.stopPropagation();
|
|
66
68
|
}, children: /* @__PURE__ */ r(
|
|
67
|
-
|
|
69
|
+
L,
|
|
68
70
|
{
|
|
69
71
|
type: "single",
|
|
70
72
|
collapsible: !0,
|
|
71
73
|
className: "w-full",
|
|
72
|
-
value:
|
|
73
|
-
onValueChange:
|
|
74
|
-
children: /* @__PURE__ */ a(
|
|
75
|
-
/* @__PURE__ */ r(
|
|
76
|
-
/* @__PURE__ */ r(
|
|
74
|
+
value: f,
|
|
75
|
+
onValueChange: l,
|
|
76
|
+
children: /* @__PURE__ */ a(I, { value: "explorer", className: "border-0", children: [
|
|
77
|
+
/* @__PURE__ */ r(S, { className: "rounded-lg font-medium h-11 w-full flex py-2 justify-between items-center hover:no-underline focus-visible:ring-0 focus-visible:ring-offset-0", children: /* @__PURE__ */ r("div", { className: "flex w-full justify-between items-center", children: /* @__PURE__ */ r("span", { className: "text-title", children: /* @__PURE__ */ r(d, { value: "title", parentKey: "browser" }) }) }) }),
|
|
78
|
+
/* @__PURE__ */ r(j, { className: "mt-3 rounded-lg flex flex-col gap-2 max-h-[60vh] overflow-auto", children: n.map((e) => /* @__PURE__ */ r("div", { className: "w-full", children: c(e) }, e.chainSymbol)) })
|
|
77
79
|
] })
|
|
78
80
|
}
|
|
79
81
|
) }) })
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ichaingo/header",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.34",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -32,18 +32,18 @@
|
|
|
32
32
|
"tailwind-merge": "3.3.1",
|
|
33
33
|
"next": "15.5.6",
|
|
34
34
|
"antd": "6.1.1",
|
|
35
|
-
"@ichaingo/image": "1.5.
|
|
36
|
-
"@ichaingo/
|
|
37
|
-
"@ichaingo/
|
|
38
|
-
"@ichaingo/
|
|
39
|
-
"@ichaingo/better-link": "1.5.
|
|
40
|
-
"@ichaingo/
|
|
41
|
-
"@ichaingo/
|
|
42
|
-
"@ichaingo/
|
|
43
|
-
"@ichaingo/
|
|
44
|
-
"@ichaingo/
|
|
45
|
-
"@ichaingo/
|
|
46
|
-
"@ichaingo/
|
|
47
|
-
"@ichaingo/theme-toggle": "1.5.
|
|
35
|
+
"@ichaingo/image": "1.5.34",
|
|
36
|
+
"@ichaingo/auth": "1.5.34",
|
|
37
|
+
"@ichaingo/avatar": "1.5.34",
|
|
38
|
+
"@ichaingo/ui": "1.5.34",
|
|
39
|
+
"@ichaingo/better-link": "1.5.34",
|
|
40
|
+
"@ichaingo/link": "1.5.34",
|
|
41
|
+
"@ichaingo/translation": "1.5.34",
|
|
42
|
+
"@ichaingo/iconfont": "1.5.34",
|
|
43
|
+
"@ichaingo/request": "1.5.34",
|
|
44
|
+
"@ichaingo/with-login": "1.5.34",
|
|
45
|
+
"@ichaingo/tooltip": "1.5.34",
|
|
46
|
+
"@ichaingo/token": "1.5.34",
|
|
47
|
+
"@ichaingo/theme-toggle": "1.5.34"
|
|
48
48
|
}
|
|
49
49
|
}
|