@arcblock/ux 3.0.7 → 3.0.9
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.js +8 -8
- package/lib/ActivityIndicator/index.js +7 -6
- package/lib/Address/compact-text.js +3 -2
- package/lib/Address/did-address.js +3 -3
- package/lib/Address/index.js +2 -2
- package/lib/Address/responsive-did-address.js +3 -3
- package/lib/Alert/index.js +7 -7
- package/lib/AnimationWaiter/dark-animation.json.js +27 -0
- package/lib/AnimationWaiter/default-animation.json.js +29 -0
- package/lib/AnimationWaiter/index.js +10 -10
- package/lib/Async/index.js +4 -4
- package/lib/Avatar/etherscan-blockies.js +15 -15
- package/lib/Avatar/index.js +5 -5
- package/lib/Badge/index.js +4 -4
- package/lib/Blocklet/blocklet.js +10 -10
- package/lib/Blocklet/index.js +5 -6
- package/lib/Blocklet/utils.js +1 -1
- package/lib/BlockletContext/index.js +1 -1
- package/lib/BlockletNFT/index.js +18 -18
- package/lib/BlockletV2/blocklet.js +36 -35
- package/lib/BlockletV2/components/icon-text.js +1 -1
- package/lib/BlockletV2/components/tooltip-icon.js +1 -1
- package/lib/BlockletV2/index.js +7 -8
- package/lib/BlockletV2/utils.js +1 -1
- package/lib/Button/index.js +1 -1
- package/lib/Button/wrap.js +2 -2
- package/lib/ButtonGroup/index.js +1 -1
- package/lib/Center/index.js +1 -1
- package/lib/ClickToCopy/copy-button.js +1 -1
- package/lib/ClickToCopy/index.js +5 -5
- package/lib/CloseButton/index.js +1 -1
- package/lib/CodeBlock/index.js +3 -3
- package/lib/Colors/index.js +3 -3
- package/lib/Config/config-provider.js +16 -15
- package/lib/Config/index.js +5 -3
- package/lib/Config/theme-mode-toggle.js +1 -1
- package/lib/ContactForm/index.js +4 -4
- package/lib/CookieConsent/index.js +1 -1
- package/lib/CountDown/index.js +2 -2
- package/lib/DID/index.js +49 -49
- package/lib/DIDConnect/app-icon.js +10 -10
- package/lib/DIDConnect/app-info-item.js +4 -4
- package/lib/DIDConnect/auth-apps/auth-apps-info.js +1 -1
- package/lib/DIDConnect/auth-apps/index.js +9 -9
- package/lib/DIDConnect/did-connect-container.js +19 -18
- package/lib/DIDConnect/did-connect-footer.js +6 -6
- package/lib/DIDConnect/index.js +10 -10
- package/lib/DIDConnect/landing-page.js +30 -29
- package/lib/DIDConnect/powered-by.js +2 -2
- package/lib/DIDConnect/request-storage-access-api-dialog.js +5 -5
- package/lib/DIDConnect/with-container.js +26 -25
- package/lib/DIDConnect/with-ux-theme.js +7 -6
- package/lib/Datatable/CustomToolbar.js +12 -12
- package/lib/Datatable/TableSearch.js +2 -2
- package/lib/Datatable/index.js +4 -4
- package/lib/Dialog/confirm.js +10 -10
- package/lib/Dialog/dialog.js +7 -7
- package/lib/Dialog/index.js +3 -3
- package/lib/Dialog/use-confirm.js +1 -1
- package/lib/DriftBot/index.js +1 -1
- package/lib/Earth/countries.json.js +13 -0
- package/lib/Earth/index.js +9 -9
- package/lib/Empty/index.js +1 -1
- package/lib/ErrorBoundary/fallback.js +15 -15
- package/lib/ErrorBoundary/index.js +6 -1
- package/lib/Footer/index.js +3 -3
- package/lib/Header/auto-hidden.js +1 -1
- package/lib/Header/header.js +3 -3
- package/lib/Header/index.js +3 -3
- package/lib/Header/responsive-header.js +6 -6
- package/lib/Icon/image.js +2 -2
- package/lib/Icon/index.js +18 -18
- package/lib/Img/index.js +1 -1
- package/lib/InfoRow/index.js +1 -1
- package/lib/Layout/dashboard/index.js +31 -29
- package/lib/Layout/dashboard/sidebar.js +2 -2
- package/lib/Layout/dashboard-legacy/header.js +2 -2
- package/lib/Layout/dashboard-legacy/index.js +4 -4
- package/lib/Layout/dashboard-legacy/sidebar.js +8 -8
- package/lib/Layout/index.js +5 -5
- package/lib/Locale/context.js +20 -20
- package/lib/Locale/selector.js +3 -3
- package/lib/Logo/images/logo-dark-text.svg.js +5 -0
- package/lib/Logo/images/logo-dark-top.svg.js +5 -0
- package/lib/Logo/images/logo-light-text.svg.js +5 -0
- package/lib/Logo/images/logo-light-top.svg.js +5 -0
- package/lib/Logo/index.js +18 -18
- package/lib/Metric/index.js +2 -2
- package/lib/NFTDisplay/NFTBroken.svg.js +108 -0
- package/lib/NFTDisplay/aspect-ratio-container.js +1 -1
- package/lib/NFTDisplay/broken.js +2 -2
- package/lib/NFTDisplay/index.js +35 -35
- package/lib/NFTDisplay/loading.js +1 -1
- package/lib/NFTDisplay/render-svg.js +1 -1
- package/lib/NFTDisplay/svg-embedder/img.js +3 -3
- package/lib/NFTDisplay/svg-embedder/inline-svg.js +1 -1
- package/lib/NavMenu/images/OCAP.svg.js +5 -0
- package/lib/NavMenu/images/abt-network.svg.js +7 -0
- package/lib/NavMenu/images/ai-kit.svg.js +7 -0
- package/lib/NavMenu/images/aigne.svg.js +7 -0
- package/lib/NavMenu/images/aistro.svg.js +5 -0
- package/lib/NavMenu/images/arcsphere.svg.js +10 -0
- package/lib/NavMenu/images/blocklet-framework.svg.js +7 -0
- package/lib/NavMenu/images/blocklet-launcher.svg.js +5 -0
- package/lib/NavMenu/images/blocklet-server.svg.js +7 -0
- package/lib/NavMenu/images/blocklet-store.svg.js +5 -0
- package/lib/NavMenu/images/creator-studio.svg.js +7 -0
- package/lib/NavMenu/images/did-connect.svg.js +5 -0
- package/lib/NavMenu/images/did-name-service.svg.js +5 -0
- package/lib/NavMenu/images/did-wallet.svg.js +7 -0
- package/lib/NavMenu/images/did.svg.js +5 -0
- package/lib/NavMenu/images/nft-studio.svg.js +5 -0
- package/lib/NavMenu/images/vc.svg.js +5 -0
- package/lib/NavMenu/images/web3-kit.svg.js +7 -0
- package/lib/NavMenu/index.js +2 -2
- package/lib/NavMenu/nav-menu.js +23 -22
- package/lib/NavMenu/products.js +32 -32
- package/lib/NavMenu/style.js +1 -1
- package/lib/NavMenu/sub-item-group.js +1 -1
- package/lib/PageScroller/index.js +19 -19
- package/lib/PageScroller/story/FullPage.js +27 -27
- package/lib/PageScroller/story/PageContain.js +8 -8
- package/lib/Passport/index.js +2 -3
- package/lib/Passport/passport.js +2 -2
- package/lib/PhoneInput/country-select.js +1 -1
- package/lib/PhoneInput/index.js +2 -2
- package/lib/PricingTable/PricingPlan.js +1 -1
- package/lib/PricingTable/index.js +3 -3
- package/lib/RelativeTime/index.js +1 -1
- package/lib/Result/common.js +6 -4
- package/lib/Result/index.js +2 -2
- package/lib/Result/result.js +1 -1
- package/lib/Screenshot/BaseScreenshot/index.js +3 -3
- package/lib/Screenshot/index.js +9 -9
- package/lib/SessionBlocklet/index.js +8 -8
- package/lib/SessionManager/index.js +2 -3
- package/lib/SessionUser/components/did-space.js +14 -14
- package/lib/SessionUser/components/logged-in.js +33 -33
- package/lib/SessionUser/components/quick-login-item.js +29 -29
- package/lib/SessionUser/components/session-user-item.js +23 -23
- package/lib/SessionUser/components/session-user-switch.js +4 -4
- package/lib/SessionUser/components/un-login.js +7 -7
- package/lib/SessionUser/components/user-info.js +16 -16
- package/lib/SessionUser/images/did-spaces.svg.js +5 -0
- package/lib/SessionUser/index.js +2 -2
- package/lib/SharedBridge/index.js +23 -23
- package/lib/Spinner/index.js +1 -1
- package/lib/SplitButton/index.js +1 -1
- package/lib/Switch/index.js +1 -1
- package/lib/Tabs/index.js +1 -1
- package/lib/Tag/index.js +6 -6
- package/lib/TextCollapse/index.js +2 -2
- package/lib/Theme/index.js +22 -11
- package/lib/Theme/theme-provider.js +2 -2
- package/lib/Theme/theme.js +4 -4
- package/lib/Toast/index.js +11 -11
- package/lib/UserCard/Cards/avatar-only.js +2 -2
- package/lib/UserCard/Cards/basic-info.js +3 -3
- package/lib/UserCard/Cards/index.js +3 -3
- package/lib/UserCard/Cards/name-only.js +1 -1
- package/lib/UserCard/Container/card.js +2 -2
- package/lib/UserCard/Container/dialog.js +1 -1
- package/lib/UserCard/Content/basic.js +1 -1
- package/lib/UserCard/Content/clock.js +3 -3
- package/lib/UserCard/Content/minimal.js +8 -8
- package/lib/UserCard/Content/tooltip-avatar.js +1 -1
- package/lib/UserCard/components.js +23 -23
- package/lib/UserCard/index.js +12 -12
- package/lib/Util/index.js +2 -2
- package/lib/VerificationCode/index.js +1 -1
- package/lib/Video/index.js +2 -2
- package/lib/Wallet/Action.js +4 -4
- package/lib/Wallet/Download.js +6 -6
- package/lib/Wallet/Open.js +1 -1
- package/lib/Wallet/images/android_download.svg.js +5 -0
- package/lib/Wallet/images/app-store.svg.js +5 -0
- package/lib/Wallet/images/google-play.svg.js +5 -0
- package/lib/WalletOSIcon/index.js +1 -1
- package/lib/WebWalletSWKeeper/index.js +2 -2
- package/lib/WechatPrompt/index.js +1 -1
- package/lib/hooks/use-blocklet-logo.js +15 -13
- package/lib/hooks/use-clock.js +1 -1
- package/lib/index.js +79 -74
- package/lib/ux.css +1 -0
- package/lib/withTheme/index.js +7 -6
- package/lib/withTracker/error_boundary.js +1 -1
- package/package.json +7 -7
- package/vite.config.mjs +1 -1
@@ -1,17 +1,18 @@
|
|
1
1
|
import { jsx as t, jsxs as x } from "react/jsx-runtime";
|
2
|
-
import {
|
3
|
-
import { isEthereumDid as
|
2
|
+
import { useTheme as C, useMediaQuery as j, Box as e, Typography as A } from "@mui/material";
|
3
|
+
import { isEthereumDid as B } from "@arcblock/did";
|
4
4
|
import { getDIDMotifInfo as P } from "@arcblock/did-motif";
|
5
5
|
import { useCreation as T } from "ahooks";
|
6
|
-
import
|
7
|
-
import
|
8
|
-
import
|
9
|
-
import
|
10
|
-
import
|
11
|
-
|
12
|
-
|
6
|
+
import "../Theme/theme.js";
|
7
|
+
import "../Theme/theme-provider.js";
|
8
|
+
import E from "../PoweredByArcBlock/index.js";
|
9
|
+
import b from "../Avatar/index.js";
|
10
|
+
import { getDIDColor as M, hexToRgba as z } from "../Util/index.js";
|
11
|
+
import L from "../hooks/use-blocklet-logo.js";
|
12
|
+
function K({
|
13
|
+
did: a,
|
13
14
|
children: n,
|
14
|
-
title:
|
15
|
+
title: l = void 0,
|
15
16
|
description: s = void 0,
|
16
17
|
actions: h = void 0,
|
17
18
|
logo: i = void 0,
|
@@ -20,15 +21,15 @@ function J({
|
|
20
21
|
termsOfUse: u = void 0,
|
21
22
|
standalone: y = !1
|
22
23
|
}) {
|
23
|
-
const o = (globalThis == null ? void 0 : globalThis.blocklet) || (globalThis == null ? void 0 : globalThis.env) || {}, { palette: g } =
|
24
|
+
const o = (globalThis == null ? void 0 : globalThis.blocklet) || (globalThis == null ? void 0 : globalThis.env) || {}, { palette: g } = C(), c = j((r) => r.breakpoints.down("lg")), I = L({
|
24
25
|
meta: o
|
25
26
|
}), D = T(() => {
|
26
|
-
const r = o.appPid, v =
|
27
|
-
return v ?
|
27
|
+
const r = o.appPid, v = B(r), w = v ? void 0 : P(r);
|
28
|
+
return v ? M(r) : w.color;
|
28
29
|
}, [o == null ? void 0 : o.appPid]);
|
29
|
-
if (!
|
30
|
+
if (!a)
|
30
31
|
return n;
|
31
|
-
|
32
|
+
l === void 0 && (l = o.appName), s === void 0 && (s = o.appDescription), i === void 0 && (i = I || ""), typeof i == "string" && (i ? i = /* @__PURE__ */ t(
|
32
33
|
e,
|
33
34
|
{
|
34
35
|
sx: {
|
@@ -40,8 +41,8 @@ function J({
|
|
40
41
|
src: i,
|
41
42
|
alt: `${o.appName}'s logo`
|
42
43
|
}
|
43
|
-
) : i = /* @__PURE__ */ t(b, { size: d, did:
|
44
|
-
|
44
|
+
) : i = /* @__PURE__ */ t(b, { size: d, did: a, src: i, variant: "rounded" })), m === void 0 && (m = /* @__PURE__ */ t(
|
45
|
+
E,
|
45
46
|
{
|
46
47
|
linkProps: {
|
47
48
|
color: g.text.secondary,
|
@@ -59,20 +60,20 @@ function J({
|
|
59
60
|
}
|
60
61
|
}
|
61
62
|
));
|
62
|
-
let
|
63
|
-
!n && !c && (
|
63
|
+
let p = n;
|
64
|
+
!n && !c && (p = /* @__PURE__ */ t(
|
64
65
|
e,
|
65
66
|
{
|
66
67
|
sx: {
|
67
68
|
filter: "blur(180px)",
|
68
69
|
display: "flex"
|
69
70
|
},
|
70
|
-
children: /* @__PURE__ */ t(b, { size: 210, did:
|
71
|
+
children: /* @__PURE__ */ t(b, { size: 210, did: a, variant: "rounded" })
|
71
72
|
}
|
72
73
|
));
|
73
74
|
const k = !!n;
|
74
|
-
let
|
75
|
-
return c && (
|
75
|
+
let f = !y;
|
76
|
+
return c && (f = !k), /* @__PURE__ */ x(
|
76
77
|
e,
|
77
78
|
{
|
78
79
|
sx: {
|
@@ -95,7 +96,7 @@ function J({
|
|
95
96
|
xs: 5,
|
96
97
|
md: 8
|
97
98
|
},
|
98
|
-
background: `radial-gradient(circle at bottom right, ${
|
99
|
+
background: `radial-gradient(circle at bottom right, ${z(D, 0.3)} 10%, ${g.background.default} 50%)`,
|
99
100
|
position: "relative"
|
100
101
|
},
|
101
102
|
children: [
|
@@ -106,12 +107,12 @@ function J({
|
|
106
107
|
maxWidth: 1200,
|
107
108
|
display: "flex",
|
108
109
|
alignItems: "center",
|
109
|
-
justifyContent: [
|
110
|
+
justifyContent: [f, p].filter(Boolean).length > 1 ? "space-between" : "center",
|
110
111
|
width: "100%",
|
111
112
|
margin: "auto"
|
112
113
|
},
|
113
114
|
children: [
|
114
|
-
|
115
|
+
f ? /* @__PURE__ */ x(
|
115
116
|
e,
|
116
117
|
{
|
117
118
|
sx: {
|
@@ -122,7 +123,7 @@ function J({
|
|
122
123
|
children: [
|
123
124
|
/* @__PURE__ */ t(e, { sx: { display: "flex", alignItems: "center" }, children: i }),
|
124
125
|
/* @__PURE__ */ t(
|
125
|
-
|
126
|
+
A,
|
126
127
|
{
|
127
128
|
variant: "h2",
|
128
129
|
sx: {
|
@@ -133,7 +134,7 @@ function J({
|
|
133
134
|
xl: "3.5rem"
|
134
135
|
}
|
135
136
|
},
|
136
|
-
children:
|
137
|
+
children: l
|
137
138
|
}
|
138
139
|
),
|
139
140
|
s ? /* @__PURE__ */ t(
|
@@ -151,7 +152,7 @@ function J({
|
|
151
152
|
]
|
152
153
|
}
|
153
154
|
) : null,
|
154
|
-
|
155
|
+
p
|
155
156
|
]
|
156
157
|
}
|
157
158
|
),
|
@@ -174,5 +175,5 @@ function J({
|
|
174
175
|
);
|
175
176
|
}
|
176
177
|
export {
|
177
|
-
|
178
|
+
K as default
|
178
179
|
};
|
@@ -2,8 +2,8 @@ import { jsxs as r, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { useTheme as i, Box as n } from "@mui/material";
|
3
3
|
import { Icon as c } from "@iconify/react";
|
4
4
|
import a from "@iconify-icons/mdi/shield-check";
|
5
|
-
import l from "./did-connect-logo";
|
6
|
-
import { mergeSx as m } from "../Util/style";
|
5
|
+
import l from "./did-connect-logo.js";
|
6
|
+
import { mergeSx as m } from "../Util/style.js";
|
7
7
|
function u({ ...e }) {
|
8
8
|
const { palette: t } = i();
|
9
9
|
return /* @__PURE__ */ r(
|
@@ -8,11 +8,11 @@ import y from "@iconify-icons/material-symbols/rocket-launch-rounded";
|
|
8
8
|
import { useReactive as F, useMemoizedFn as s } from "ahooks";
|
9
9
|
import { memo as U, useRef as j, useImperativeHandle as M } from "react";
|
10
10
|
import b from "lodash/noop";
|
11
|
-
import { translate as W } from "../Locale/util";
|
12
|
-
import Y from "./did-connect-container";
|
13
|
-
import _ from "../CloseButton";
|
14
|
-
import H from "../SharedBridge";
|
15
|
-
import { setVisitorId as O } from "../Util";
|
11
|
+
import { translate as W } from "../Locale/util.js";
|
12
|
+
import Y from "./did-connect-container.js";
|
13
|
+
import _ from "../CloseButton/index.js";
|
14
|
+
import H from "../SharedBridge/index.js";
|
15
|
+
import { setVisitorId as O } from "../Util/index.js";
|
16
16
|
const P = {
|
17
17
|
en: {
|
18
18
|
allow: "Allow",
|
@@ -1,12 +1,13 @@
|
|
1
1
|
import { jsx as n, jsxs as E } from "react/jsx-runtime";
|
2
2
|
import { memo as H, createElement as I, useState as K, useRef as Q } from "react";
|
3
|
-
import { Backdrop as U, useMediaQuery as V, Box as c, Drawer as
|
4
|
-
import { useDebounce as
|
5
|
-
import { useBrowser as
|
6
|
-
import
|
7
|
-
import
|
8
|
-
import
|
9
|
-
import {
|
3
|
+
import { Backdrop as U, useMediaQuery as V, useTheme as q, Box as c, Drawer as J, SwipeableDrawer as X, Dialog as Y, DialogContent as Z } from "@mui/material";
|
4
|
+
import { useDebounce as oo, useMemoizedFn as D } from "ahooks";
|
5
|
+
import { useBrowser as eo } from "@arcblock/react-hooks";
|
6
|
+
import no from "color-convert";
|
7
|
+
import "../Theme/theme.js";
|
8
|
+
import "../Theme/theme-provider.js";
|
9
|
+
import { mergeSx as ro } from "../Util/style.js";
|
10
|
+
import { hexToRgba as d } from "../Util/index.js";
|
10
11
|
const L = H(({ ref: l, ...m }) => /* @__PURE__ */ I(
|
11
12
|
U,
|
12
13
|
{
|
@@ -21,7 +22,7 @@ const L = H(({ ref: l, ...m }) => /* @__PURE__ */ I(
|
|
21
22
|
key: "background"
|
22
23
|
}
|
23
24
|
));
|
24
|
-
function
|
25
|
+
function fo(l) {
|
25
26
|
function m({
|
26
27
|
popup: B = !1,
|
27
28
|
open: _ = !1,
|
@@ -29,25 +30,25 @@ function go(l) {
|
|
29
30
|
...e
|
30
31
|
}) {
|
31
32
|
var P, y;
|
32
|
-
const [
|
33
|
+
const [a, x] = K("#fff"), w = Q(null), z = eo(), M = V("(max-width:640px)");
|
33
34
|
let r = "page";
|
34
35
|
B && (r = "dialog", M && z.mobile.any && (r = "drawer"));
|
35
|
-
const g =
|
36
|
+
const g = q(), p = _, T = ((y = (P = g == null ? void 0 : g.transitions) == null ? void 0 : P.duration) == null ? void 0 : y.leavingScreen) || 500, A = oo(p, {
|
36
37
|
wait: T
|
37
38
|
}), k = D(() => {
|
38
39
|
const o = new URLSearchParams(window.location.search);
|
39
40
|
o.get("magicToken") && o.delete("magicToken"), o.toString() && window.history.replaceState({}, "", `${window.location.pathname}?${o.toString()}`);
|
40
|
-
}), C = (o,
|
41
|
-
["backdropClick", "escapeKeyDown"].includes(
|
42
|
-
}, $ = A || p, j = h ?
|
41
|
+
}), C = (o, t) => {
|
42
|
+
["backdropClick", "escapeKeyDown"].includes(t) || (k(), e == null || e.onClose());
|
43
|
+
}, $ = A || p, j = h ? J : X, O = no.hex.hsl(a), [R, S, i] = O, u = [0, 30, 60, 30, 0, 30, 60, 30], W = Math.max(...u), G = Math.min(...u);
|
43
44
|
let f = !1;
|
44
45
|
(i * (100 + W) / 100 > 100 || i * (100 + G) / 100 < 0) && (f = !0);
|
45
46
|
const N = `linear-gradient(45deg, ${u.map((o) => {
|
46
|
-
let
|
47
|
-
return f ? s = 0.5 * (100 + o) / 100 :
|
47
|
+
let t = i * (100 + o) / 100, s = 0.6;
|
48
|
+
return f ? s = 0.5 * (100 + o) / 100 : t = i * (100 + o) / 100, `hsla(${R}, ${S}%, ${t}%, ${s})`;
|
48
49
|
}).join(", ")})`, F = `linear-gradient(45deg, ${u.map((o) => {
|
49
|
-
let
|
50
|
-
return f ? s = 0.3 * (100 + o) / 100 :
|
50
|
+
let t = i * (100 + o) / 100, s = 0.2;
|
51
|
+
return f ? s = 0.3 * (100 + o) / 100 : t = i * (100 + o) / 100, `hsla(${R}, ${S}%, ${t}%, ${s})`;
|
51
52
|
}).join(", ")})`, v = {
|
52
53
|
overflow: "visible",
|
53
54
|
"&::before, &::after": {
|
@@ -96,7 +97,7 @@ function go(l) {
|
|
96
97
|
c,
|
97
98
|
{
|
98
99
|
sx: {
|
99
|
-
border: `1px solid ${d(
|
100
|
+
border: `1px solid ${d(a, 0.1)}`,
|
100
101
|
m: "-1px",
|
101
102
|
position: "relative",
|
102
103
|
borderRadius: "12px",
|
@@ -134,13 +135,13 @@ function go(l) {
|
|
134
135
|
"@keyframes glowBreathe": {
|
135
136
|
"0%, 100%": {
|
136
137
|
boxShadow: `
|
137
|
-
inset 0 0 7px ${d(
|
138
|
-
inset 0 0 12px ${d(
|
138
|
+
inset 0 0 7px ${d(a, 0.3)},
|
139
|
+
inset 0 0 12px ${d(a, 0.3)}`
|
139
140
|
},
|
140
141
|
"50%": {
|
141
142
|
boxShadow: `
|
142
|
-
inset 0 0 18px ${d(
|
143
|
-
inset 0 0 24px ${d(
|
143
|
+
inset 0 0 18px ${d(a, 0.7)},
|
144
|
+
inset 0 0 24px ${d(a, 0.5)}`
|
144
145
|
}
|
145
146
|
}
|
146
147
|
}
|
@@ -186,7 +187,7 @@ function go(l) {
|
|
186
187
|
]
|
187
188
|
}
|
188
189
|
) : /* @__PURE__ */ n(
|
189
|
-
|
190
|
+
Y,
|
190
191
|
{
|
191
192
|
open: p,
|
192
193
|
slots: {
|
@@ -205,7 +206,7 @@ function go(l) {
|
|
205
206
|
}
|
206
207
|
},
|
207
208
|
children: /* @__PURE__ */ n(
|
208
|
-
|
209
|
+
Z,
|
209
210
|
{
|
210
211
|
sx: {
|
211
212
|
maxWidth: "calc(100vw - 18px)",
|
@@ -234,5 +235,5 @@ function go(l) {
|
|
234
235
|
return m;
|
235
236
|
}
|
236
237
|
export {
|
237
|
-
|
238
|
+
fo as default
|
238
239
|
};
|
@@ -1,15 +1,16 @@
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
2
2
|
import { createTheme as t, useTheme as i } from "@mui/material";
|
3
3
|
import { DID_CONNECT_THEME_LIGHT as T, DID_CONNECT_THEME_DARK as c } from "@blocklet/theme";
|
4
|
-
import
|
5
|
-
|
6
|
-
|
4
|
+
import "../Theme/theme.js";
|
5
|
+
import p from "../Theme/theme-provider.js";
|
6
|
+
const f = t(T), s = t(c);
|
7
|
+
function d(o) {
|
7
8
|
function r(m) {
|
8
|
-
const { palette: n } = i(), h = n.mode === "dark" ? s :
|
9
|
-
return /* @__PURE__ */ e(
|
9
|
+
const { palette: n } = i(), h = n.mode === "dark" ? s : f;
|
10
|
+
return /* @__PURE__ */ e(p, { theme: h, children: /* @__PURE__ */ e(o, { ...m }) });
|
10
11
|
}
|
11
12
|
return r;
|
12
13
|
}
|
13
14
|
export {
|
14
|
-
|
15
|
+
d as default
|
15
16
|
};
|
@@ -4,18 +4,18 @@ import i from "prop-types";
|
|
4
4
|
import { TableFilter as ue, TableViewCol as pe } from "mui-datatables";
|
5
5
|
import he, { PrintContextConsumer as me } from "react-to-print";
|
6
6
|
import { MoreVert as fe, CloudDownload as be, ViewColumn as Ce, FilterList as ge, Print as $ } from "@mui/icons-material";
|
7
|
-
import { Popover as xe, Tooltip as D, IconButton as R, ListItemIcon as L, ListItemText as j, MenuItem as U, Menu as we, LinearProgress as ye,
|
8
|
-
import { useDeepCompareEffect as
|
9
|
-
import { handleCSVDownload as
|
10
|
-
import
|
11
|
-
import { useDatatableContext as
|
12
|
-
import { styled as z
|
7
|
+
import { Popover as xe, Tooltip as D, IconButton as R, ListItemIcon as L, ListItemText as j, MenuItem as U, Menu as we, LinearProgress as ye, useTheme as Te, useMediaQuery as ve } from "@mui/material";
|
8
|
+
import { useDeepCompareEffect as Re } from "ahooks";
|
9
|
+
import { handleCSVDownload as ke } from "./utils.js";
|
10
|
+
import Fe from "./TableSearch.js";
|
11
|
+
import { useDatatableContext as Pe } from "./DatatableContext.js";
|
12
|
+
import { styled as z } from "../Theme/index.js";
|
13
13
|
function Ie() {
|
14
|
-
const s =
|
15
|
-
return
|
14
|
+
const s = Te();
|
15
|
+
return ve(s.breakpoints.down("sm"));
|
16
16
|
}
|
17
17
|
function Be({ ...s }) {
|
18
|
-
const [f, d] = T(null), k = V(null), F = Ie(), N = V(Math.random().toString(32).slice(2)), [O, A] = T(!1), { customPreButtons: b, customButtons: C, loading: u, disabled: g } =
|
18
|
+
const [f, d] = T(null), k = V(null), F = Ie(), N = V(Math.random().toString(32).slice(2)), [O, A] = T(!1), { customPreButtons: b, customButtons: C, loading: u, disabled: g } = Pe(), {
|
19
19
|
data: Q = [],
|
20
20
|
options: o,
|
21
21
|
components: p = {},
|
@@ -32,7 +32,7 @@ function Be({ ...s }) {
|
|
32
32
|
searchTextUpdate: _,
|
33
33
|
searchClose: ee
|
34
34
|
} = s, [B, h] = T({}), te = o.customToolbar ? o.customToolbar(s) : "", { search: oe, downloadCsv: ie, print: m, viewColumns: ne, filterTable: le } = o.textLabels.toolbar, re = o.search === !1 || o.search === "false", x = o.print === !1 || o.print === "false", se = p.TableFilter || ue, ae = p.TableViewCol || pe;
|
35
|
-
|
35
|
+
Re(() => {
|
36
36
|
(u || g) && h({});
|
37
37
|
}, [u, g]);
|
38
38
|
const q = (e) => /* @__PURE__ */ t(he, { content: () => s.tableRef(), children: /* @__PURE__ */ t(me, { children: e }) }), w = (e) => `toolbar-pop-${N.current}-${e}`, a = [];
|
@@ -40,7 +40,7 @@ function Be({ ...s }) {
|
|
40
40
|
icon: /* @__PURE__ */ t(be, {}),
|
41
41
|
title: ie,
|
42
42
|
onClick: () => {
|
43
|
-
|
43
|
+
ke(s);
|
44
44
|
}
|
45
45
|
}), o.viewColumns === !1 || o.viewColumns === "false" || a.push({
|
46
46
|
icon: /* @__PURE__ */ t(Ce, {}),
|
@@ -155,7 +155,7 @@ function Be({ ...s }) {
|
|
155
155
|
),
|
156
156
|
/* @__PURE__ */ r("div", { className: `custom-toobar-btns ${u || g ? "toobar-btns-disabled" : ""}`, children: [
|
157
157
|
!re && /* @__PURE__ */ t(
|
158
|
-
|
158
|
+
Fe,
|
159
159
|
{
|
160
160
|
search: oe,
|
161
161
|
options: o,
|
@@ -5,8 +5,8 @@ import { Tooltip as N, IconButton as w, TextField as g } from "@mui/material";
|
|
5
5
|
import { Search as v, Clear as R } from "@mui/icons-material";
|
6
6
|
import q from "clsx";
|
7
7
|
import E from "lodash/noop";
|
8
|
-
import { useDatatableContext as B } from "./DatatableContext";
|
9
|
-
import { styled as D } from "../Theme";
|
8
|
+
import { useDatatableContext as B } from "./DatatableContext.js";
|
9
|
+
import { styled as D } from "../Theme/index.js";
|
10
10
|
function M({
|
11
11
|
search: t = "",
|
12
12
|
options: s,
|
package/lib/Datatable/index.js
CHANGED
@@ -10,10 +10,10 @@ import ne from "lodash/get";
|
|
10
10
|
import P from "clsx";
|
11
11
|
import { useCreation as de, useDeepCompareEffect as h } from "ahooks";
|
12
12
|
import { CircularProgress as ce } from "@mui/material";
|
13
|
-
import R from "../Empty";
|
14
|
-
import pe from "./CustomToolbar";
|
15
|
-
import { DatatableProvider as ue, useDatatableContext as M } from "./DatatableContext";
|
16
|
-
import { styled as $ } from "../Theme";
|
13
|
+
import R from "../Empty/index.js";
|
14
|
+
import pe from "./CustomToolbar.js";
|
15
|
+
import { DatatableProvider as ue, useDatatableContext as M } from "./DatatableContext.js";
|
16
|
+
import { styled as $ } from "../Theme/index.js";
|
17
17
|
const fe = $("div")`
|
18
18
|
display: flex;
|
19
19
|
align-items: center;
|
package/lib/Dialog/confirm.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
import { jsx as r, jsxs as
|
1
|
+
import { jsx as r, jsxs as C, Fragment as g } from "react/jsx-runtime";
|
2
2
|
import o from "prop-types";
|
3
3
|
import { useMemoizedFn as q } from "ahooks";
|
4
|
-
import c from "../Button";
|
5
|
-
import y from "./dialog";
|
4
|
+
import c from "../Button/index.js";
|
5
|
+
import y from "./dialog.js";
|
6
6
|
function R({
|
7
7
|
title: a,
|
8
8
|
children: d,
|
@@ -12,10 +12,10 @@ function R({
|
|
12
12
|
showCancelButton: n = !0,
|
13
13
|
showConfirmButton: s = !0,
|
14
14
|
fullScreen: x = !1,
|
15
|
-
confirmButton:
|
15
|
+
confirmButton: p = {
|
16
16
|
text: "Confirm"
|
17
17
|
},
|
18
|
-
cancelButton:
|
18
|
+
cancelButton: l = {
|
19
19
|
text: "Cancel"
|
20
20
|
},
|
21
21
|
PaperProps: t = {},
|
@@ -54,7 +54,7 @@ function R({
|
|
54
54
|
}
|
55
55
|
}
|
56
56
|
},
|
57
|
-
actions: n || s ? /* @__PURE__ */ g
|
57
|
+
actions: n || s ? /* @__PURE__ */ C(g, { children: [
|
58
58
|
n && /* @__PURE__ */ r(
|
59
59
|
c,
|
60
60
|
{
|
@@ -62,8 +62,8 @@ function R({
|
|
62
62
|
e.stopPropagation(), i(e, "closeButton");
|
63
63
|
},
|
64
64
|
color: "primary",
|
65
|
-
...
|
66
|
-
children:
|
65
|
+
...l.props,
|
66
|
+
children: l.text
|
67
67
|
}
|
68
68
|
),
|
69
69
|
s && /* @__PURE__ */ r(
|
@@ -74,8 +74,8 @@ function R({
|
|
74
74
|
},
|
75
75
|
color: "primary",
|
76
76
|
autoFocus: !0,
|
77
|
-
...
|
78
|
-
children:
|
77
|
+
...p.props,
|
78
|
+
children: p.text
|
79
79
|
}
|
80
80
|
)
|
81
81
|
] }) : null,
|
package/lib/Dialog/dialog.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
import { jsxs as n, jsx as t } from "react/jsx-runtime";
|
2
2
|
import e from "prop-types";
|
3
3
|
import { Close as D } from "@mui/icons-material";
|
4
|
-
import { Dialog as M, Box as w,
|
5
|
-
import { styled as h
|
4
|
+
import { Dialog as M, Box as w, useTheme as v, useMediaQuery as N, Typography as C, DialogContent as B, DialogActions as A, IconButton as T } from "@mui/material";
|
5
|
+
import { styled as h } from "../Theme/index.js";
|
6
6
|
function $({
|
7
7
|
children: o,
|
8
8
|
title: l = "",
|
@@ -15,7 +15,7 @@ function $({
|
|
15
15
|
slotProps: u = {},
|
16
16
|
...p
|
17
17
|
}) {
|
18
|
-
const _ =
|
18
|
+
const _ = v(), i = N(_.breakpoints.down("md")), b = l || a || c, x = (r, j) => {
|
19
19
|
const { onClose: m } = p;
|
20
20
|
m && m(r, j);
|
21
21
|
};
|
@@ -26,21 +26,21 @@ function $({
|
|
26
26
|
},
|
27
27
|
s.style
|
28
28
|
);
|
29
|
-
const f = /* @__PURE__ */ t(
|
29
|
+
const f = /* @__PURE__ */ t(T, { className: "ux-dialog_closeButton", onClick: (r) => x(r, "closeButton"), children: /* @__PURE__ */ t(D, {}) });
|
30
30
|
return /* @__PURE__ */ n(H, { fullScreen: i, onClose: x, PaperProps: s, ...p, children: [
|
31
31
|
b && /* @__PURE__ */ n(O, { ...u.header, className: "ux-dialog_header", isMobile: i, children: [
|
32
32
|
/* @__PURE__ */ n("div", { className: "ux-dialog_left", children: [
|
33
33
|
a && i && f,
|
34
34
|
d && /* @__PURE__ */ t("div", { className: "ux-dialog_prepend", children: d }),
|
35
|
-
l && /* @__PURE__ */ t(
|
35
|
+
l && /* @__PURE__ */ t(C, { variant: "h6", className: "ux-dialog_title", children: l })
|
36
36
|
] }),
|
37
37
|
/* @__PURE__ */ n("div", { className: "ux-dialog_right", children: [
|
38
38
|
/* @__PURE__ */ t("div", { className: "ux-dialog_toolbar", children: c }),
|
39
39
|
a && !i && f
|
40
40
|
] })
|
41
41
|
] }),
|
42
|
-
/* @__PURE__ */ t(
|
43
|
-
g && /* @__PURE__ */ t(
|
42
|
+
/* @__PURE__ */ t(B, { ...u.content, children: o }),
|
43
|
+
g && /* @__PURE__ */ t(A, { className: `ux-dialog_actions--${y}`, children: g })
|
44
44
|
] });
|
45
45
|
}
|
46
46
|
$.propTypes = {
|
package/lib/Dialog/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
import { default as r } from "./dialog";
|
2
|
-
import { default as t } from "./confirm";
|
3
|
-
import { default as m } from "./use-confirm";
|
1
|
+
import { default as r } from "./dialog.js";
|
2
|
+
import { default as t } from "./confirm.js";
|
3
|
+
import { default as m } from "./use-confirm.js";
|
4
4
|
export {
|
5
5
|
t as Confirm,
|
6
6
|
r as default,
|
@@ -2,7 +2,7 @@ import { jsx as d } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as g, useState as w, isValidElement as f, useImperativeHandle as y } from "react";
|
3
3
|
import { useMemoizedFn as e, useReactive as v } from "ahooks";
|
4
4
|
import u from "lodash/noop";
|
5
|
-
import H from "./confirm";
|
5
|
+
import H from "./confirm.js";
|
6
6
|
function R({ ref: s, ...l }) {
|
7
7
|
const [B, c] = w(""), [C, i] = w(""), t = v({
|
8
8
|
show: !1,
|
package/lib/DriftBot/index.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Component as n } from "react";
|
2
|
-
import { mergeProps as s } from "../Util";
|
2
|
+
import { mergeProps as s } from "../Util/index.js";
|
3
3
|
const i = class i extends n {
|
4
4
|
constructor(t) {
|
5
5
|
super(s(t, i, ["attributes"])), this.addMainScript = this.addMainScript.bind(this), this.addIdentityVariables = this.addIdentityVariables.bind(this), this.insertScript = this.insertScript.bind(this);
|