@arcblock/ux 3.0.6 → 3.0.8
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/lib/ActionButton/index.d.ts +1 -1
- package/lib/ActionButton/index.js +1 -1
- package/lib/Address/compact-text.d.ts +1 -1
- package/lib/Address/compact-text.js +5 -5
- package/lib/Address/did-address.js +1 -1
- package/lib/Address/index.js +5 -5
- package/lib/Address/responsive-did-address.js +14 -14
- package/lib/Alert/index.d.ts +1 -1
- package/lib/Alert/index.js +1 -1
- package/lib/Avatar/index.d.ts +1 -1
- package/lib/Avatar/index.js +1 -1
- package/lib/Badge/index.js +1 -1
- package/lib/BlockletContext/index.d.ts +1 -1
- package/lib/BlockletNFT/index.js +1 -1
- package/lib/BlockletV2/blocklet.d.ts +1 -1
- package/lib/BlockletV2/blocklet.js +1 -1
- package/lib/BlockletV2/components/icon-text.d.ts +1 -1
- package/lib/BlockletV2/components/icon-text.js +13 -13
- package/lib/BlockletV2/components/tooltip-icon.js +22 -20
- package/lib/Button/wrap.js +1 -1
- package/lib/Center/index.js +3 -3
- package/lib/ClickToCopy/copy-button.js +3 -3
- package/lib/CloseButton/index.js +1 -1
- package/lib/ContactForm/index.js +22 -21
- package/lib/DID/index.js +45 -44
- package/lib/DIDConnect/app-info-item.js +1 -1
- package/lib/DIDConnect/auth-apps/index.js +48 -48
- package/lib/DIDConnect/did-connect-container.js +22 -22
- package/lib/DIDConnect/did-connect-footer.js +1 -1
- package/lib/DIDConnect/landing-page.js +27 -27
- package/lib/DIDConnect/request-storage-access-api-dialog.js +39 -40
- package/lib/Datatable/CustomToolbar.d.ts +3 -1
- package/lib/Datatable/CustomToolbar.js +1 -1
- package/lib/Datatable/index.js +2 -2
- package/lib/Dialog/confirm.d.ts +1 -1
- package/lib/Dialog/confirm.js +12 -12
- package/lib/Earth/index.js +1 -1
- package/lib/Footer/index.d.ts +1 -1
- package/lib/Footer/index.js +5 -5
- package/lib/Header/addon-button.d.ts +1 -1
- package/lib/Header/addon-button.js +11 -6
- package/lib/Header/header.js +1 -1
- package/lib/Header/responsive-header.d.ts +1 -1
- package/lib/Header/responsive-header.js +33 -34
- package/lib/Icon/index.js +12 -12
- package/lib/InfoRow/index.d.ts +1 -1
- package/lib/InfoRow/index.js +0 -1
- package/lib/Layout/dashboard/external-link.d.ts +1 -1
- package/lib/Layout/dashboard/external-link.js +1 -1
- package/lib/Layout/dashboard/full-page.js +8 -8
- package/lib/Layout/dashboard/index.js +1 -1
- package/lib/Layout/dashboard/sidebar.js +1 -1
- package/lib/Layout/dashboard-legacy/header.js +10 -10
- package/lib/Layout/dashboard-legacy/index.js +16 -16
- package/lib/Layout/dashboard-legacy/sidebar.d.ts +1 -1
- package/lib/Layout/dashboard-legacy/sidebar.js +19 -12
- package/lib/Layout/index.js +2 -2
- package/lib/LoadingMask/index.d.ts +1 -1
- package/lib/LoadingMask/index.js +4 -4
- package/lib/Locale/context.js +24 -24
- package/lib/Locale/selector.d.ts +1 -1
- package/lib/Locale/selector.js +1 -1
- package/lib/Logo/index.js +3 -3
- package/lib/NFTDisplay/aspect-ratio-container.d.ts +1 -1
- package/lib/NFTDisplay/index.js +5 -2
- package/lib/NFTDisplay/render-svg.js +3 -3
- package/lib/NavMenu/nav-menu.js +29 -26
- package/lib/NavMenu/products.js +1 -1
- package/lib/PageScroller/index.js +43 -43
- package/lib/PhoneInput/country-select.js +23 -23
- package/lib/PhoneInput/index.js +11 -11
- package/lib/PoweredByArcBlock/index.js +10 -6
- package/lib/QRCode/index.js +5 -5
- package/lib/RelativeTime/index.js +16 -16
- package/lib/Result/result.js +5 -5
- package/lib/Screenshot/index.d.ts +1 -1
- package/lib/Screenshot/index.js +1 -1
- package/lib/SessionUser/components/did-space.d.ts +1 -1
- package/lib/SessionUser/components/session-user-item.js +10 -10
- package/lib/SharedBridge/index.js +6 -6
- package/lib/Spinner/index.js +1 -1
- package/lib/SplitButton/index.d.ts +1 -1
- package/lib/SplitButton/index.js +1 -1
- package/lib/Success/index.js +1 -1
- package/lib/Tabs/index.js +15 -8
- package/lib/Tag/index.d.ts +1 -1
- package/lib/Tag/index.js +1 -1
- package/lib/TextCollapse/index.js +1 -1
- package/lib/Theme/theme-provider.js +58 -53
- package/lib/Theme/theme.js +1 -0
- package/lib/Typography/index.js +13 -13
- package/lib/UserCard/Cards/basic-info.d.ts +1 -1
- package/lib/UserCard/Cards/basic-info.js +1 -1
- package/lib/UserCard/Cards/index.d.ts +1 -1
- package/lib/UserCard/Cards/index.js +1 -1
- package/lib/UserCard/Container/card.js +6 -6
- package/lib/UserCard/Container/dialog.js +1 -1
- package/lib/UserCard/Content/basic.js +2 -2
- package/lib/UserCard/Content/minimal.d.ts +1 -1
- package/lib/UserCard/Content/minimal.js +1 -1
- package/lib/UserCard/Content/tooltip-avatar.js +17 -17
- package/lib/VerificationCode/index.js +1 -1
- package/lib/WalletOSIcon/index.d.ts +2 -2
- package/lib/WalletOSIcon/index.js +7 -2
- package/lib/WebWalletSWKeeper/index.d.ts +3 -1
- package/lib/WebWalletSWKeeper/index.js +4 -1
- package/lib/withTheme/index.d.ts +3 -2
- package/lib/withTheme/index.js +16 -16
- package/package.json +7 -7
- package/src/ActionButton/index.jsx +1 -1
- package/src/Address/compact-text.jsx +1 -1
- package/src/Address/did-address.tsx +1 -1
- package/src/Address/index.tsx +1 -1
- package/src/Address/responsive-did-address.tsx +3 -3
- package/src/Alert/index.jsx +1 -1
- package/src/Avatar/index.jsx +1 -1
- package/src/Badge/index.jsx +1 -1
- package/src/BlockletContext/index.tsx +1 -1
- package/src/BlockletNFT/index.jsx +1 -1
- package/src/BlockletV2/blocklet.tsx +1 -1
- package/src/BlockletV2/components/icon-text.tsx +4 -4
- package/src/BlockletV2/components/tooltip-icon.tsx +5 -3
- package/src/Button/wrap.jsx +1 -1
- package/src/Center/index.tsx +1 -1
- package/src/ClickToCopy/copy-button.tsx +1 -1
- package/src/CloseButton/index.tsx +1 -1
- package/src/ContactForm/index.tsx +9 -2
- package/src/DID/index.tsx +5 -4
- package/src/DIDConnect/app-info-item.tsx +1 -1
- package/src/DIDConnect/auth-apps/index.tsx +8 -8
- package/src/DIDConnect/did-connect-container.tsx +2 -2
- package/src/DIDConnect/did-connect-footer.tsx +1 -1
- package/src/DIDConnect/landing-page.tsx +6 -6
- package/src/DIDConnect/request-storage-access-api-dialog.tsx +1 -2
- package/src/Datatable/CustomToolbar.jsx +1 -1
- package/src/Datatable/index.jsx +2 -2
- package/src/Dialog/confirm.jsx +1 -1
- package/src/Earth/index.tsx +1 -1
- package/src/Footer/index.tsx +5 -2
- package/src/Header/addon-button.tsx +7 -2
- package/src/Header/header.tsx +1 -1
- package/src/Header/responsive-header.tsx +1 -2
- package/src/Icon/index.tsx +1 -1
- package/src/InfoRow/index.tsx +1 -2
- package/src/Layout/dashboard/external-link.tsx +1 -1
- package/src/Layout/dashboard/full-page.tsx +1 -1
- package/src/Layout/dashboard/index.tsx +1 -1
- package/src/Layout/dashboard/sidebar.tsx +5 -2
- package/src/Layout/dashboard-legacy/header.tsx +5 -5
- package/src/Layout/dashboard-legacy/index.tsx +3 -3
- package/src/Layout/dashboard-legacy/sidebar.tsx +10 -2
- package/src/Layout/index.tsx +2 -2
- package/src/LoadingMask/index.tsx +5 -5
- package/src/Locale/context.tsx +3 -3
- package/src/Locale/selector.tsx +1 -1
- package/src/Logo/index.tsx +1 -1
- package/src/NFTDisplay/aspect-ratio-container.tsx +1 -1
- package/src/NFTDisplay/index.tsx +2 -1
- package/src/NFTDisplay/render-svg.tsx +1 -1
- package/src/NavMenu/nav-menu.tsx +8 -5
- package/src/NavMenu/products.tsx +3 -1
- package/src/PageScroller/index.tsx +4 -4
- package/src/PhoneInput/country-select.tsx +3 -3
- package/src/PhoneInput/index.tsx +1 -1
- package/src/PoweredByArcBlock/index.tsx +5 -1
- package/src/QRCode/index.tsx +1 -1
- package/src/RelativeTime/index.tsx +3 -3
- package/src/Result/result.tsx +1 -1
- package/src/Screenshot/index.tsx +2 -2
- package/src/SessionUser/components/did-space.tsx +1 -1
- package/src/SessionUser/components/session-user-item.tsx +1 -1
- package/src/SharedBridge/index.tsx +2 -2
- package/src/Spinner/index.tsx +1 -1
- package/src/SplitButton/index.tsx +1 -1
- package/src/Success/index.tsx +1 -1
- package/src/Tabs/index.tsx +10 -3
- package/src/Tag/index.jsx +1 -1
- package/src/TextCollapse/index.tsx +1 -1
- package/src/Theme/theme-provider.tsx +11 -6
- package/src/Theme/theme.ts +5 -0
- package/src/Typography/index.tsx +1 -1
- package/src/UserCard/Cards/basic-info.tsx +1 -1
- package/src/UserCard/Cards/index.tsx +1 -1
- package/src/UserCard/Container/card.tsx +2 -2
- package/src/UserCard/Container/dialog.tsx +1 -1
- package/src/UserCard/Content/basic.tsx +2 -2
- package/src/UserCard/Content/minimal.tsx +1 -1
- package/src/UserCard/Content/tooltip-avatar.tsx +4 -4
- package/src/VerificationCode/index.tsx +1 -1
- package/src/WalletOSIcon/index.tsx +7 -2
- package/src/WebWalletSWKeeper/index.tsx +6 -1
- package/src/withTheme/index.tsx +7 -3
- package/vite.config.mjs +4 -1
- package/lib/ActionButton/ActionButton.stories.d.ts +0 -18
- package/lib/ActivityIndicator/ActivityIndicator.stories.d.ts +0 -8
- package/lib/Address/Address.stories.d.ts +0 -16
- package/lib/Alert/Alert.stories.d.ts +0 -28
- package/lib/AnimationWaiter/AnimationWaiter.stories.d.ts +0 -21
- package/lib/Avatar/Avatar.stories.d.ts +0 -11
- package/lib/Badge/Badge.stories.d.ts +0 -13
- package/lib/Blocklet/Blocklet.stories.d.ts +0 -17
- package/lib/BlockletNFT/BlockletNFT.stories.d.ts +0 -17
- package/lib/BlockletV2/Blocklet.stories.d.ts +0 -18
- package/lib/Button/Button.stories.d.ts +0 -19
- package/lib/Center/Center.stories.d.ts +0 -18
- package/lib/ClickToCopy/ClickToCopy.stories.d.ts +0 -16
- package/lib/CodeBlock/CodeBlock.stories.d.ts +0 -20
- package/lib/Colors/Colors.stories.d.ts +0 -34
- package/lib/Config/Config.stories.d.ts +0 -14
- package/lib/ContactForm/ContactForm.stories.d.ts +0 -23
- package/lib/CookieConsent/CookieConsent.stories.d.ts +0 -18
- package/lib/CountDown/CountDown.stories.d.ts +0 -14
- package/lib/DID/DID.stories.d.ts +0 -15
- package/lib/Datatable/Datatable.stories.d.ts +0 -32
- package/lib/Dialog/Dialog.stories.d.ts +0 -20
- package/lib/DidLogo/Logo.stories.d.ts +0 -8
- package/lib/Earth/Earth.stories.d.ts +0 -18
- package/lib/Empty/Empty.stories.d.ts +0 -17
- package/lib/ErrorBoundary/ErrorBoundary.stories.d.ts +0 -12
- package/lib/Footer/Footer.stories.d.ts +0 -12
- package/lib/Header/Header.stories.d.ts +0 -21
- package/lib/Icon/Icon.stories.d.ts +0 -23
- package/lib/Img/Img.stories.d.ts +0 -13
- package/lib/InfoRow/InfoRow.stories.d.ts +0 -14
- package/lib/Layout/Layout.stories.d.ts +0 -23
- package/lib/Locale/LocaleSelector.stories.d.ts +0 -22
- package/lib/Logo/Logo.stories.d.ts +0 -22
- package/lib/Metric/Metric.stories.d.ts +0 -14
- package/lib/NFTDisplay/NFTDisplay.stories.d.ts +0 -15
- package/lib/NavMenu/NavMenu.stories.d.ts +0 -17
- package/lib/PageScroller/story/PageScroller.stories.d.ts +0 -13
- package/lib/PhoneInput/PhoneInput.stories.d.ts +0 -12
- package/lib/PricingTable/PricingTable.stories.d.ts +0 -8
- package/lib/QRCode/QRCode.stories.d.ts +0 -13
- package/lib/RelativeTime/RelativeTime.stories.d.ts +0 -20
- package/lib/Result/Result.stories.d.ts +0 -21
- package/lib/Screenshot/Screenshot.stories.d.ts +0 -13
- package/lib/SessionManager/SessionManager.stories.d.ts +0 -9
- package/lib/Sparkline/Sparkline.stories.d.ts +0 -12
- package/lib/Spinner/Spinner.stories.d.ts +0 -18
- package/lib/SplitButton/SplitButton.stories.d.ts +0 -15
- package/lib/Switch/Switch.stories.d.ts +0 -13
- package/lib/Tabs/Tabs.stories.d.ts +0 -14
- package/lib/Tag/Tag.stories.d.ts +0 -13
- package/lib/TextCollapse/TextCollapse.stories.d.ts +0 -28
- package/lib/Theme/Theme.stories.d.ts +0 -10
- package/lib/Toast/Toast.stories.d.ts +0 -15
- package/lib/UserCard/UserCard.stories.d.ts +0 -18
- package/lib/Util/WebWalletOpener.stories.d.ts +0 -5
- package/lib/Video/Video.stories.d.ts +0 -6
- package/lib/Wallet/Action.stories.d.ts +0 -8
- package/lib/Wallet/Download.stories.d.ts +0 -9
- package/lib/Wallet/OpenInWallet.stories.d.ts +0 -5
@@ -1,29 +1,29 @@
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
2
2
|
import { createContext as g, use as P, useLayoutEffect as F, useState as f, useMemo as b } from "react";
|
3
3
|
const s = g(null), d = (l) => {
|
4
|
-
const
|
4
|
+
const i = P(s);
|
5
5
|
return F(() => {
|
6
|
-
l &&
|
7
|
-
}, []),
|
6
|
+
l && i.configure(l);
|
7
|
+
}, []), i;
|
8
8
|
};
|
9
|
-
function I({ children: l, ...
|
10
|
-
const [e,
|
9
|
+
function I({ children: l = void 0, ...i }) {
|
10
|
+
const [e, u] = f({
|
11
11
|
inFullPage: !1,
|
12
12
|
showToggleButton: !1,
|
13
13
|
headerVisibleInFullPage: !0,
|
14
14
|
footerVisibleInFullPage: !1,
|
15
15
|
sidebarVisibleInFullPage: !1
|
16
16
|
}), a = () => {
|
17
|
-
|
17
|
+
u((t) => ({ ...t, inFullPage: !t.inFullPage }));
|
18
18
|
}, o = b(() => ({
|
19
19
|
...e,
|
20
20
|
headerVisible: !e.inFullPage || e.headerVisibleInFullPage,
|
21
21
|
footerVisible: !e.inFullPage || e.footerVisibleInFullPage,
|
22
22
|
sidebarVisible: !e.inFullPage || e.sidebarVisibleInFullPage,
|
23
23
|
toggleFullPage: a,
|
24
|
-
configure: (
|
24
|
+
configure: (t) => u((n) => ({ ...n, ...t }))
|
25
25
|
}), [e]);
|
26
|
-
return /* @__PURE__ */ r(s, { value: o, ...
|
26
|
+
return /* @__PURE__ */ r(s, { value: o, ...i, children: l });
|
27
27
|
}
|
28
28
|
export {
|
29
29
|
s as FullPageContext,
|
@@ -27,7 +27,7 @@ function m(e, i) {
|
|
27
27
|
/* @__PURE__ */ t("ul", { children: e.children.map(p) })
|
28
28
|
] }, `group-${e.title}-${i}`);
|
29
29
|
}
|
30
|
-
function z({ links: e, addons: i, dense: a = !1, ...r }) {
|
30
|
+
function z({ links: e, addons: i = void 0, dense: a = !1, ...r }) {
|
31
31
|
return /* @__PURE__ */ o(f, { ...r, className: d({ "layout-sidebar-dense": a }), children: [
|
32
32
|
/* @__PURE__ */ t("ul", { children: e.map(p) }),
|
33
33
|
/* @__PURE__ */ t("div", { style: { flex: 1 } }),
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { jsx as r, jsxs as a } from "react/jsx-runtime";
|
2
2
|
import { Menu as m } from "@mui/icons-material";
|
3
|
-
import { AppBar as x, Toolbar as f, Button as u, Box as o, Typography as
|
3
|
+
import { AppBar as x, Toolbar as f, Button as u, Box as o, Typography as i } from "@mui/material";
|
4
4
|
import { Link as y } from "react-router-dom";
|
5
5
|
import g from "../../Logo/index.js";
|
6
6
|
import { styled as b } from "../../Theme/index.js";
|
@@ -77,12 +77,12 @@ const k = b(x)`
|
|
77
77
|
`;
|
78
78
|
function j({
|
79
79
|
onToggleMenu: e,
|
80
|
-
brand:
|
81
|
-
description:
|
82
|
-
addons:
|
83
|
-
brandAddon: s,
|
80
|
+
brand: n = void 0,
|
81
|
+
description: d = void 0,
|
82
|
+
addons: l = void 0,
|
83
|
+
brandAddon: s = void 0,
|
84
84
|
homeUrl: h = "/",
|
85
|
-
logo: p,
|
85
|
+
logo: p = void 0,
|
86
86
|
children: t,
|
87
87
|
...c
|
88
88
|
}) {
|
@@ -113,11 +113,11 @@ function j({
|
|
113
113
|
}
|
114
114
|
),
|
115
115
|
/* @__PURE__ */ a("div", { className: "header-title", children: [
|
116
|
-
/* @__PURE__ */ a(
|
117
|
-
|
116
|
+
/* @__PURE__ */ a(i, { component: "h2", noWrap: !0, className: "header-title__primary", children: [
|
117
|
+
n,
|
118
118
|
s
|
119
119
|
] }),
|
120
|
-
/* @__PURE__ */ r(
|
120
|
+
/* @__PURE__ */ r(i, { component: "p", noWrap: !0, className: "header-title__secondary", children: d })
|
121
121
|
] })
|
122
122
|
] }),
|
123
123
|
/* @__PURE__ */ r(
|
@@ -129,7 +129,7 @@ function j({
|
|
129
129
|
}
|
130
130
|
),
|
131
131
|
!!t && /* @__PURE__ */ r("div", { className: "header-children", children: t }),
|
132
|
-
/* @__PURE__ */ r("div", { className: "header-addons", children:
|
132
|
+
/* @__PURE__ */ r("div", { className: "header-addons", children: l })
|
133
133
|
] }) });
|
134
134
|
}
|
135
135
|
export {
|
@@ -31,37 +31,37 @@ const B = T("div")`
|
|
31
31
|
position: relative;
|
32
32
|
white-space: nowrap;
|
33
33
|
width: 120px;
|
34
|
-
background: ${(
|
35
|
-
box-shadow: 2px 16px 10px 0 rgba(0, 0, 0, ${(
|
34
|
+
background: ${(o) => o.theme.palette.background.default};
|
35
|
+
box-shadow: 2px 16px 10px 0 rgba(0, 0, 0, ${(o) => o.theme.palette.mode === "light" ? 0.05 : 0.5});
|
36
36
|
border: 0;
|
37
37
|
}
|
38
38
|
`;
|
39
39
|
function R({
|
40
|
-
links:
|
40
|
+
links: o = [],
|
41
41
|
brand: d = "",
|
42
42
|
description: f = "",
|
43
43
|
images: b,
|
44
44
|
title: u = "Home",
|
45
|
-
brandAddon: w,
|
46
|
-
headerAddon: x,
|
45
|
+
brandAddon: w = void 0,
|
46
|
+
headerAddon: x = void 0,
|
47
47
|
prefix: _ = "/images",
|
48
48
|
fullWidth: g = !1,
|
49
49
|
contentLayout: y = "column",
|
50
|
-
className:
|
51
|
-
homeUrl:
|
52
|
-
logo: s,
|
53
|
-
children:
|
50
|
+
className: v = "",
|
51
|
+
homeUrl: N = "/",
|
52
|
+
logo: s = void 0,
|
53
|
+
children: k,
|
54
54
|
...M
|
55
55
|
}) {
|
56
|
-
const
|
56
|
+
const r = j(document.body), a = (r == null ? void 0 : r.width) || 0, [n, D] = c(a >= 960 ? "permanent" : "temporary"), [i, l] = c(n === "permanent");
|
57
57
|
P(() => {
|
58
|
-
const p =
|
58
|
+
const p = a >= 960 ? "permanent" : "temporary";
|
59
59
|
D(p), l(p !== "temporary");
|
60
|
-
}, [
|
60
|
+
}, [a]);
|
61
61
|
const m = () => {
|
62
62
|
l(!i);
|
63
63
|
}, $ = g || y === "row";
|
64
|
-
return /* @__PURE__ */ t(B, { className: `dashboard ${
|
64
|
+
return /* @__PURE__ */ t(B, { className: `dashboard ${v}`, ...M, children: [
|
65
65
|
/* @__PURE__ */ e(H, { title: `${u}-${d}` }),
|
66
66
|
/* @__PURE__ */ e(
|
67
67
|
F,
|
@@ -72,7 +72,7 @@ function R({
|
|
72
72
|
brandAddon: w,
|
73
73
|
description: f,
|
74
74
|
addons: x,
|
75
|
-
homeUrl:
|
75
|
+
homeUrl: N,
|
76
76
|
logo: s
|
77
77
|
}
|
78
78
|
),
|
@@ -93,11 +93,11 @@ function R({
|
|
93
93
|
open: i,
|
94
94
|
onClose: m,
|
95
95
|
ModalProps: { disablePortal: !0, keepMounted: !0 },
|
96
|
-
children: /* @__PURE__ */ e(C, { className: "dashboard__sidebar", images: b, links:
|
96
|
+
children: /* @__PURE__ */ e(C, { className: "dashboard__sidebar", images: b, links: o, prefix: _, logo: s })
|
97
97
|
}
|
98
98
|
),
|
99
99
|
/* @__PURE__ */ t(h, { className: "dashboard__main", children: [
|
100
|
-
/* @__PURE__ */ e(W, { maxWidth: $ ? !1 : "lg", className: "dashboard__content", children:
|
100
|
+
/* @__PURE__ */ e(W, { maxWidth: $ ? !1 : "lg", className: "dashboard__content", children: k }),
|
101
101
|
/* @__PURE__ */ e(O, {})
|
102
102
|
] })
|
103
103
|
]
|
@@ -8,7 +8,7 @@ export type LinkItem = {
|
|
8
8
|
export interface SidebarProps extends React.HTMLAttributes<HTMLDivElement> {
|
9
9
|
images: Record<string, string>;
|
10
10
|
links: LinkItem[];
|
11
|
-
prefix
|
11
|
+
prefix?: string;
|
12
12
|
addons?: React.ReactNode;
|
13
13
|
logo?: React.ReactNode;
|
14
14
|
sx?: SxProps;
|
@@ -1,20 +1,27 @@
|
|
1
1
|
import { jsxs as a, jsx as t } from "react/jsx-runtime";
|
2
2
|
import { memo as k } from "react";
|
3
3
|
import { useLocation as $, Link as s } from "react-router-dom";
|
4
|
-
import { Button as w, useTheme as z, Typography as
|
4
|
+
import { Button as w, useTheme as z, Typography as v } from "@mui/material";
|
5
5
|
import { teal as l } from "@mui/material/colors";
|
6
|
-
import
|
7
|
-
import
|
8
|
-
import { styled as
|
9
|
-
function q({
|
6
|
+
import I from "../../Icon/image.js";
|
7
|
+
import j from "../../Logo/index.js";
|
8
|
+
import { styled as c } from "../../Theme/index.js";
|
9
|
+
function q({
|
10
|
+
images: e,
|
11
|
+
links: m,
|
12
|
+
prefix: p = "/images",
|
13
|
+
addons: g = void 0,
|
14
|
+
logo: f = void 0,
|
15
|
+
...x
|
16
|
+
}) {
|
10
17
|
const u = z(), b = $(), h = (o, n) => new RegExp(`/${n}`).test(b.pathname);
|
11
18
|
return /* @__PURE__ */ a(L, { ...x, children: [
|
12
|
-
/* @__PURE__ */ t(s, { to: "/", className: "sidebar-logo", children: f || /* @__PURE__ */ t(
|
19
|
+
/* @__PURE__ */ t(s, { to: "/", className: "sidebar-logo", children: f || /* @__PURE__ */ t(j, { showText: !1, size: 20 }) }),
|
13
20
|
m.map(({ url: o, name: n, title: r, showBadge: y }) => {
|
14
21
|
const i = h(o, n);
|
15
22
|
return /* @__PURE__ */ a(T, { component: s, selected: i, to: o, children: [
|
16
23
|
/* @__PURE__ */ t(
|
17
|
-
|
24
|
+
I,
|
18
25
|
{
|
19
26
|
name: e[n],
|
20
27
|
size: 36,
|
@@ -23,14 +30,14 @@ function q({ images: e, links: m, prefix: p = "/images", addons: g, logo: f, ...
|
|
23
30
|
showBadge: y
|
24
31
|
}
|
25
32
|
),
|
26
|
-
/* @__PURE__ */ t(
|
33
|
+
/* @__PURE__ */ t(v, { component: "span", className: "menu-title", children: r })
|
27
34
|
] }, o);
|
28
35
|
}),
|
29
36
|
/* @__PURE__ */ t("div", { style: { flex: 1 } }),
|
30
37
|
g
|
31
38
|
] });
|
32
39
|
}
|
33
|
-
const L = k(
|
40
|
+
const L = k(c("div")`
|
34
41
|
flex: 1;
|
35
42
|
display: flex;
|
36
43
|
flex-direction: column;
|
@@ -51,7 +58,7 @@ const L = k(d("div")`
|
|
51
58
|
display: block;
|
52
59
|
}
|
53
60
|
}
|
54
|
-
`),
|
61
|
+
`), d = "linear-gradient(32deg, rgba(144, 255, 230, 0.1), rgba(144, 255, 230, 0))", T = c(w)`
|
55
62
|
&& {
|
56
63
|
display: flex;
|
57
64
|
flex-direction: column;
|
@@ -59,13 +66,13 @@ const L = k(d("div")`
|
|
59
66
|
align-items: center;
|
60
67
|
width: 100%;
|
61
68
|
transition: all 200ms ease-in-out;
|
62
|
-
background: ${(e) => e.selected ?
|
69
|
+
background: ${(e) => e.selected ? d : ""};
|
63
70
|
padding: 24px 0;
|
64
71
|
border-left: 2px solid ${(e) => e.selected ? l.A700 : "transparent"};
|
65
72
|
border-radius: 0;
|
66
73
|
|
67
74
|
&:hover {
|
68
|
-
background: ${
|
75
|
+
background: ${d};
|
69
76
|
border-left-color: ${l.A700};
|
70
77
|
}
|
71
78
|
|
package/lib/Layout/index.js
CHANGED
@@ -11,11 +11,11 @@ import { styled as x } from "../Theme/index.js";
|
|
11
11
|
function ie({
|
12
12
|
title: i,
|
13
13
|
brand: l,
|
14
|
-
description: s,
|
14
|
+
description: s = void 0,
|
15
15
|
links: a = [],
|
16
16
|
logo: c = /* @__PURE__ */ e(H, { showText: !1, style: { width: "40px", height: "40px" } }),
|
17
17
|
showLogo: d = !1,
|
18
|
-
addons: y,
|
18
|
+
addons: y = void 0,
|
19
19
|
footer: k = /* @__PURE__ */ e(t, { children: /* @__PURE__ */ e(Z, {}) }),
|
20
20
|
baseUrl: h = "",
|
21
21
|
homeUrl: N = "/",
|
@@ -4,6 +4,6 @@ export interface LoadingMaskProps {
|
|
4
4
|
borderWidth?: number;
|
5
5
|
borderRadius?: number;
|
6
6
|
duration?: number;
|
7
|
-
children
|
7
|
+
children: React.ReactNode;
|
8
8
|
}
|
9
9
|
export default function LoadingMask({ size, padding, borderWidth, borderRadius, duration, children, }: LoadingMaskProps): import("react/jsx-runtime").JSX.Element;
|
package/lib/LoadingMask/index.js
CHANGED
@@ -2,10 +2,10 @@ import { jsxs as h, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { Box as n } from "@mui/material";
|
3
3
|
function b({
|
4
4
|
size: s = 64,
|
5
|
-
padding: d,
|
6
|
-
borderWidth: l,
|
7
|
-
borderRadius: f,
|
8
|
-
duration: c,
|
5
|
+
padding: d = void 0,
|
6
|
+
borderWidth: l = void 0,
|
7
|
+
borderRadius: f = void 0,
|
8
|
+
duration: c = void 0,
|
9
9
|
children: g
|
10
10
|
}) {
|
11
11
|
const t = s, i = f ?? t / 8, e = l ?? t / 32, o = d ?? t * 0.25 - e, p = c ?? 2.5;
|
package/lib/Locale/context.js
CHANGED
@@ -1,81 +1,81 @@
|
|
1
|
-
import { jsx as
|
1
|
+
import { jsx as g } from "react/jsx-runtime";
|
2
2
|
import { createContext as x, use as k, useState as p, useRef as A, useEffect as R, useCallback as b } from "react";
|
3
3
|
import j from "lodash/get";
|
4
|
-
import
|
4
|
+
import i from "js-cookie";
|
5
5
|
import S from "./browser-lang.js";
|
6
6
|
import { translate as U } from "./util.js";
|
7
7
|
import { getCookieOptions as D, resolveRootDomain as E } from "../Util/index.js";
|
8
|
-
const
|
8
|
+
const f = "nf_lang", F = (e, o = window.location.href) => {
|
9
9
|
const t = new URL(o).searchParams.get("locale");
|
10
10
|
return e.find((r) => r.code === t) ? t : null;
|
11
11
|
}, O = (e, o = window.location.href) => {
|
12
12
|
const t = new URL(o);
|
13
13
|
t.searchParams.has("locale") && (t.searchParams.set("locale", e), window.history.replaceState({}, "", t.href));
|
14
|
-
},
|
14
|
+
}, d = (e = []) => {
|
15
15
|
var t;
|
16
16
|
const o = {
|
17
17
|
languages: e.map((r) => r.code),
|
18
18
|
// 取 languages 首个元素的 code 值, 如果不存在则取 'en'
|
19
19
|
fallback: ((t = e == null ? void 0 : e[0]) == null ? void 0 : t.code) || "en"
|
20
20
|
};
|
21
|
-
return F(e) ||
|
21
|
+
return F(e) || i.get(f) || S(o);
|
22
22
|
}, z = (e) => {
|
23
23
|
const o = D();
|
24
24
|
if (!o.domain) {
|
25
25
|
const t = E();
|
26
|
-
t &&
|
26
|
+
t && i.remove(f, { path: o.path || "/", domain: t });
|
27
27
|
}
|
28
|
-
|
28
|
+
i.set(f, e, o), O(e);
|
29
29
|
}, N = (e) => {
|
30
30
|
const o = j(window, "blocklet.languages");
|
31
31
|
return Array.isArray(o) && o.length ? o : Array.isArray(e) && e.length ? e : [
|
32
32
|
{ code: "en", name: "English" },
|
33
33
|
{ code: "zh", name: "简体中文" }
|
34
34
|
];
|
35
|
-
},
|
35
|
+
}, L = x(null), { Provider: _, Consumer: M } = L;
|
36
36
|
function Q({
|
37
37
|
children: e,
|
38
|
-
locale: o,
|
39
|
-
fallbackLocale: t,
|
38
|
+
locale: o = void 0,
|
39
|
+
fallbackLocale: t = void 0,
|
40
40
|
translations: r,
|
41
|
-
onLoadingTranslation: m,
|
41
|
+
onLoadingTranslation: m = void 0,
|
42
42
|
languages: P = [],
|
43
|
-
...
|
43
|
+
...v
|
44
44
|
}) {
|
45
45
|
const a = N(P);
|
46
|
-
let [n,
|
47
|
-
const
|
48
|
-
|
46
|
+
let [n, C] = p(o || d(a));
|
47
|
+
const l = A(t || ""), [, w] = p(0), u = (c) => {
|
48
|
+
C(c), z(c);
|
49
49
|
};
|
50
50
|
if (R(() => {
|
51
|
-
const c = o ||
|
51
|
+
const c = o || d(a);
|
52
52
|
c !== n && u(c);
|
53
53
|
}, [o]), n && r[n] && typeof r[n] == "function") {
|
54
54
|
const c = n;
|
55
55
|
try {
|
56
56
|
Promise.resolve(r[c]()).then((s) => {
|
57
|
-
s && typeof s == "object" && (r[c] = s,
|
57
|
+
s && typeof s == "object" && (r[c] = s, w((h) => h > 999 ? 0 : h + 1));
|
58
58
|
});
|
59
59
|
} catch (s) {
|
60
60
|
console.error(s);
|
61
61
|
}
|
62
|
-
m == null || m(c, a), n =
|
62
|
+
m == null || m(c, a), n = l.current;
|
63
63
|
} else
|
64
|
-
|
65
|
-
const
|
64
|
+
l.current = n;
|
65
|
+
const y = b(
|
66
66
|
(c, s) => U(r, c, n, t, s),
|
67
67
|
[r, n, t]
|
68
68
|
);
|
69
|
-
return /* @__PURE__ */
|
69
|
+
return /* @__PURE__ */ g(_, { value: { locale: n, changeLocale: u, t: y, languages: a, ...v }, children: e });
|
70
70
|
}
|
71
71
|
function V() {
|
72
|
-
return k(
|
72
|
+
return k(L);
|
73
73
|
}
|
74
74
|
export {
|
75
75
|
M as LocaleConsumer,
|
76
|
-
|
76
|
+
L as LocaleContext,
|
77
77
|
Q as LocaleProvider,
|
78
|
-
|
78
|
+
d as getLocale,
|
79
79
|
z as setLocale,
|
80
80
|
V as useLocaleContext
|
81
81
|
};
|
package/lib/Locale/selector.d.ts
CHANGED
@@ -8,4 +8,4 @@ export interface LocaleSelectorProps extends Omit<React.HTMLAttributes<HTMLDivEl
|
|
8
8
|
size?: number;
|
9
9
|
onChange?: (locale: Locale) => void;
|
10
10
|
}
|
11
|
-
export default function LocaleSelector(props: LocaleSelectorProps): import("react/jsx-runtime").JSX.Element;
|
11
|
+
export default function LocaleSelector({ ...props }: LocaleSelectorProps): import("react/jsx-runtime").JSX.Element;
|
package/lib/Locale/selector.js
CHANGED
@@ -7,7 +7,7 @@ import H from "iconify-icons-material-symbols-400/language";
|
|
7
7
|
import { LocaleContext as O } from "./context.js";
|
8
8
|
import { styled as W } from "../Theme/index.js";
|
9
9
|
import { mergeSx as q } from "../Util/style.js";
|
10
|
-
function Z(t) {
|
10
|
+
function Z({ ...t }) {
|
11
11
|
var g;
|
12
12
|
const { showText: p = !0, popperProps: r = {}, popperType: d = "click", icon: c, size: f = 24, ...y } = t, { locale: l, changeLocale: I, languages: u } = z(O), a = L(null), [x, o] = M(!1), k = (e) => {
|
13
13
|
I(e), o(!1), typeof t.onChange == "function" && t.onChange(e);
|
package/lib/Logo/index.js
CHANGED
@@ -9,17 +9,17 @@ function j({
|
|
9
9
|
showLogo: n = !0,
|
10
10
|
mode: a = "dark",
|
11
11
|
layout: l = "vertical",
|
12
|
-
size: r,
|
12
|
+
size: r = void 0,
|
13
13
|
style: i = {},
|
14
14
|
...g
|
15
15
|
}) {
|
16
16
|
const e = a === "light", m = e ? /* @__PURE__ */ t(s, {}) : /* @__PURE__ */ t(u, {}), c = e ? /* @__PURE__ */ t(f, { className: "logo-text" }) : /* @__PURE__ */ t(h, { className: "logo-text" });
|
17
|
-
return r && (i.width = `${r}px`, i.height = `${r}px`), /* @__PURE__ */ p(
|
17
|
+
return r && (i.width = `${r}px`, i.height = `${r}px`), /* @__PURE__ */ p(d, { layout: l, style: i, ...g, children: [
|
18
18
|
n && m,
|
19
19
|
o && c
|
20
20
|
] });
|
21
21
|
}
|
22
|
-
const
|
22
|
+
const d = x("span")`
|
23
23
|
display: inline-flex;
|
24
24
|
flex-direction: ${(o) => o.layout === "horizontal" ? "row" : "column"};
|
25
25
|
justify-content: center;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
export interface AspectRatioContainerProps {
|
2
2
|
aspect: number;
|
3
|
-
children
|
3
|
+
children: React.ReactNode;
|
4
4
|
}
|
5
5
|
declare function AspectRatioContainer({ aspect, children, ...rest }: AspectRatioContainerProps): import("react/jsx-runtime").JSX.Element;
|
6
6
|
export default AspectRatioContainer;
|
package/lib/NFTDisplay/index.js
CHANGED
@@ -46,7 +46,10 @@ function lr({
|
|
46
46
|
...k
|
47
47
|
}) {
|
48
48
|
var R;
|
49
|
-
const F = (l) =>
|
49
|
+
const F = (l) => (
|
50
|
+
// @ts-expect-error
|
51
|
+
/* @__PURE__ */ n(cr, { component: T, ...k, className: S(z, { "nft-display--inset": m }), children: l })
|
52
|
+
), a = M({});
|
50
53
|
try {
|
51
54
|
typeof e == "string" ? a.current = JSON.parse(e) : a.current = e;
|
52
55
|
const { vcId: l } = a.current, U = a.current.credentialSubject ? K(a.current, "credentialSubject.display") : a.current, { content: f, type: y } = U, G = y === "url", [t, c] = P({
|
@@ -198,7 +201,7 @@ const cr = nr(Z)`
|
|
198
201
|
}
|
199
202
|
`;
|
200
203
|
function pr(e) {
|
201
|
-
return function({ aspect: s, inset: m, ...g }) {
|
204
|
+
return function({ aspect: s = void 0, inset: m = !1, ...g }) {
|
202
205
|
return s && s > 0 && !m ? /* @__PURE__ */ n(rr, { aspect: s, children: /* @__PURE__ */ n(e, { inset: !0, ...g }) }) : /* @__PURE__ */ n(e, { inset: m, ...g });
|
203
206
|
};
|
204
207
|
}
|
@@ -4,11 +4,11 @@ import { useAsyncEffect as f } from "ahooks";
|
|
4
4
|
import c from "axios";
|
5
5
|
import { useState as p } from "react";
|
6
6
|
import a from "./svg-embedder/inline-svg.js";
|
7
|
-
function y({ src: e, onLoad: t }) {
|
7
|
+
function y({ src: e, onLoad: t = void 0 }) {
|
8
8
|
const [r, s] = p("");
|
9
9
|
return f(async () => {
|
10
|
-
const
|
11
|
-
s(
|
10
|
+
const i = await c.get(e), n = m.sanitize(i.data);
|
11
|
+
s(n), t == null || t();
|
12
12
|
}, []), /* @__PURE__ */ o(a, { svg: r });
|
13
13
|
}
|
14
14
|
export {
|