@arcblock/ux 3.0.6 → 3.0.7
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 +9 -9
- package/lib/ActivityIndicator/index.js +6 -7
- package/lib/Address/compact-text.d.ts +1 -1
- package/lib/Address/compact-text.js +6 -7
- package/lib/Address/did-address.js +4 -4
- package/lib/Address/index.js +6 -6
- package/lib/Address/responsive-did-address.js +17 -17
- package/lib/Alert/index.d.ts +1 -1
- package/lib/Alert/index.js +8 -8
- 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.d.ts +1 -1
- package/lib/Avatar/index.js +6 -6
- package/lib/Badge/index.js +5 -5
- package/lib/Blocklet/blocklet.js +10 -10
- package/lib/Blocklet/index.js +6 -5
- package/lib/Blocklet/utils.js +1 -1
- package/lib/BlockletContext/index.d.ts +1 -1
- package/lib/BlockletContext/index.js +1 -1
- package/lib/BlockletNFT/index.js +19 -19
- package/lib/BlockletV2/blocklet.d.ts +1 -1
- package/lib/BlockletV2/blocklet.js +36 -37
- 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/BlockletV2/index.js +8 -7
- package/lib/BlockletV2/utils.js +1 -1
- package/lib/Button/index.js +1 -1
- package/lib/Button/wrap.js +3 -3
- package/lib/ButtonGroup/index.js +1 -1
- package/lib/Center/index.js +4 -4
- package/lib/ClickToCopy/copy-button.js +3 -3
- package/lib/ClickToCopy/index.js +5 -5
- package/lib/CloseButton/index.js +2 -2
- package/lib/CodeBlock/index.js +3 -3
- package/lib/Colors/index.js +3 -3
- package/lib/Config/config-provider.js +15 -16
- package/lib/Config/index.js +3 -5
- package/lib/Config/theme-mode-toggle.js +1 -1
- package/lib/ContactForm/index.js +26 -25
- package/lib/CookieConsent/index.js +1 -1
- package/lib/CountDown/index.js +2 -2
- package/lib/DID/index.js +79 -78
- package/lib/DIDConnect/app-icon.js +10 -10
- package/lib/DIDConnect/app-info-item.js +5 -5
- package/lib/DIDConnect/auth-apps/auth-apps-info.js +1 -1
- package/lib/DIDConnect/auth-apps/index.js +56 -56
- package/lib/DIDConnect/did-connect-container.js +35 -36
- package/lib/DIDConnect/did-connect-footer.js +7 -7
- package/lib/DIDConnect/index.js +10 -10
- package/lib/DIDConnect/landing-page.js +45 -46
- package/lib/DIDConnect/powered-by.js +2 -2
- package/lib/DIDConnect/request-storage-access-api-dialog.js +44 -45
- package/lib/DIDConnect/with-container.js +25 -26
- package/lib/DIDConnect/with-ux-theme.js +6 -7
- package/lib/Datatable/CustomToolbar.d.ts +3 -1
- package/lib/Datatable/CustomToolbar.js +13 -13
- package/lib/Datatable/TableSearch.js +2 -2
- package/lib/Datatable/index.js +6 -6
- package/lib/Dialog/confirm.d.ts +1 -1
- package/lib/Dialog/confirm.js +20 -20
- 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/index.js +10 -10
- package/lib/Empty/index.js +1 -1
- package/lib/ErrorBoundary/fallback.js +15 -15
- package/lib/ErrorBoundary/index.js +1 -6
- package/lib/Footer/index.d.ts +1 -1
- package/lib/Footer/index.js +7 -7
- package/lib/Header/addon-button.d.ts +1 -1
- package/lib/Header/addon-button.js +11 -6
- package/lib/Header/auto-hidden.js +1 -1
- package/lib/Header/header.js +4 -4
- package/lib/Header/index.js +3 -3
- package/lib/Header/responsive-header.d.ts +1 -1
- package/lib/Header/responsive-header.js +33 -34
- package/lib/Icon/image.js +2 -2
- package/lib/Icon/index.js +12 -12
- package/lib/Img/index.js +1 -1
- package/lib/InfoRow/index.d.ts +1 -1
- package/lib/InfoRow/index.js +1 -2
- 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 +30 -32
- package/lib/Layout/dashboard/sidebar.js +3 -3
- package/lib/Layout/dashboard-legacy/header.js +12 -12
- package/lib/Layout/dashboard-legacy/index.js +20 -20
- package/lib/Layout/dashboard-legacy/sidebar.d.ts +1 -1
- package/lib/Layout/dashboard-legacy/sidebar.js +20 -13
- package/lib/Layout/index.js +7 -7
- package/lib/LoadingMask/index.d.ts +1 -1
- package/lib/LoadingMask/index.js +4 -4
- package/lib/Locale/context.js +27 -27
- package/lib/Locale/selector.d.ts +1 -1
- package/lib/Locale/selector.js +4 -4
- package/lib/Logo/index.js +19 -19
- package/lib/Metric/index.js +2 -2
- package/lib/NFTDisplay/aspect-ratio-container.d.ts +1 -1
- package/lib/NFTDisplay/aspect-ratio-container.js +1 -1
- package/lib/NFTDisplay/broken.js +2 -2
- package/lib/NFTDisplay/index.js +38 -35
- package/lib/NFTDisplay/loading.js +1 -1
- package/lib/NFTDisplay/render-svg.js +4 -4
- package/lib/NFTDisplay/svg-embedder/img.js +3 -3
- package/lib/NFTDisplay/svg-embedder/inline-svg.js +1 -1
- package/lib/NavMenu/index.js +2 -2
- package/lib/NavMenu/nav-menu.js +46 -44
- package/lib/NavMenu/products.js +33 -33
- package/lib/NavMenu/style.js +1 -1
- package/lib/NavMenu/sub-item-group.js +1 -1
- package/lib/PageScroller/index.js +53 -53
- package/lib/PageScroller/story/FullPage.js +27 -27
- package/lib/PageScroller/story/PageContain.js +8 -8
- package/lib/Passport/index.js +3 -2
- package/lib/Passport/passport.js +2 -2
- package/lib/PhoneInput/country-select.js +24 -24
- package/lib/PhoneInput/index.js +13 -13
- package/lib/PoweredByArcBlock/index.js +10 -6
- package/lib/PricingTable/PricingPlan.js +1 -1
- package/lib/PricingTable/index.js +3 -3
- package/lib/QRCode/index.js +5 -5
- package/lib/RelativeTime/index.js +17 -17
- package/lib/Result/common.js +4 -6
- package/lib/Result/index.js +2 -2
- package/lib/Result/result.js +5 -5
- package/lib/Screenshot/BaseScreenshot/index.js +3 -3
- package/lib/Screenshot/index.d.ts +1 -1
- package/lib/Screenshot/index.js +10 -10
- package/lib/SessionBlocklet/index.js +8 -8
- package/lib/SessionManager/index.js +3 -2
- package/lib/SessionUser/components/did-space.d.ts +1 -1
- 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 +27 -27
- 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/index.js +2 -2
- package/lib/SharedBridge/index.js +23 -23
- package/lib/Spinner/index.js +2 -2
- package/lib/SplitButton/index.d.ts +1 -1
- package/lib/SplitButton/index.js +2 -2
- package/lib/Success/index.js +1 -1
- package/lib/Switch/index.js +1 -1
- package/lib/Tabs/index.js +16 -9
- package/lib/Tag/index.d.ts +1 -1
- package/lib/Tag/index.js +7 -7
- package/lib/TextCollapse/index.js +3 -3
- package/lib/Theme/index.js +11 -22
- package/lib/Theme/theme-provider.js +60 -55
- package/lib/Theme/theme.js +5 -4
- package/lib/Toast/index.js +11 -11
- package/lib/Typography/index.js +13 -13
- package/lib/UserCard/Cards/avatar-only.js +2 -2
- package/lib/UserCard/Cards/basic-info.d.ts +1 -1
- package/lib/UserCard/Cards/basic-info.js +4 -4
- package/lib/UserCard/Cards/index.d.ts +1 -1
- package/lib/UserCard/Cards/index.js +4 -4
- package/lib/UserCard/Cards/name-only.js +1 -1
- package/lib/UserCard/Container/card.js +8 -8
- package/lib/UserCard/Container/dialog.js +2 -2
- package/lib/UserCard/Content/basic.js +3 -3
- package/lib/UserCard/Content/clock.js +3 -3
- package/lib/UserCard/Content/minimal.d.ts +1 -1
- package/lib/UserCard/Content/minimal.js +8 -8
- package/lib/UserCard/Content/tooltip-avatar.js +18 -18
- 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 +2 -2
- 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/WalletOSIcon/index.d.ts +2 -2
- package/lib/WalletOSIcon/index.js +8 -3
- package/lib/WebWalletSWKeeper/index.d.ts +3 -1
- package/lib/WebWalletSWKeeper/index.js +6 -3
- package/lib/WechatPrompt/index.js +1 -1
- package/lib/hooks/use-blocklet-logo.js +13 -15
- package/lib/hooks/use-clock.js +1 -1
- package/lib/index.js +74 -79
- package/lib/withTheme/index.d.ts +3 -2
- package/lib/withTheme/index.js +13 -14
- package/lib/withTracker/error_boundary.js +1 -1
- 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 +5 -2
- 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/AnimationWaiter/dark-animation.json.js +0 -27
- package/lib/AnimationWaiter/default-animation.json.js +0 -29
- 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/Earth/countries.json.js +0 -13
- 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/Logo/images/logo-dark-text.svg.js +0 -5
- package/lib/Logo/images/logo-dark-top.svg.js +0 -5
- package/lib/Logo/images/logo-light-text.svg.js +0 -5
- package/lib/Logo/images/logo-light-top.svg.js +0 -5
- package/lib/Metric/Metric.stories.d.ts +0 -14
- package/lib/NFTDisplay/NFTBroken.svg.js +0 -108
- package/lib/NFTDisplay/NFTDisplay.stories.d.ts +0 -15
- package/lib/NavMenu/NavMenu.stories.d.ts +0 -17
- package/lib/NavMenu/images/OCAP.svg.js +0 -5
- package/lib/NavMenu/images/abt-network.svg.js +0 -7
- package/lib/NavMenu/images/ai-kit.svg.js +0 -7
- package/lib/NavMenu/images/aigne.svg.js +0 -7
- package/lib/NavMenu/images/aistro.svg.js +0 -5
- package/lib/NavMenu/images/arcsphere.svg.js +0 -10
- package/lib/NavMenu/images/blocklet-framework.svg.js +0 -7
- package/lib/NavMenu/images/blocklet-launcher.svg.js +0 -5
- package/lib/NavMenu/images/blocklet-server.svg.js +0 -7
- package/lib/NavMenu/images/blocklet-store.svg.js +0 -5
- package/lib/NavMenu/images/creator-studio.svg.js +0 -7
- package/lib/NavMenu/images/did-connect.svg.js +0 -5
- package/lib/NavMenu/images/did-name-service.svg.js +0 -5
- package/lib/NavMenu/images/did-wallet.svg.js +0 -7
- package/lib/NavMenu/images/did.svg.js +0 -5
- package/lib/NavMenu/images/nft-studio.svg.js +0 -5
- package/lib/NavMenu/images/vc.svg.js +0 -5
- package/lib/NavMenu/images/web3-kit.svg.js +0 -7
- 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/SessionUser/images/did-spaces.svg.js +0 -5
- 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
- package/lib/Wallet/images/android_download.svg.js +0 -5
- package/lib/Wallet/images/app-store.svg.js +0 -5
- package/lib/Wallet/images/google-play.svg.js +0 -5
- package/lib/ux.css +0 -1
@@ -1,18 +1,18 @@
|
|
1
1
|
import { jsx as e, jsxs as t, Fragment as m } from "react/jsx-runtime";
|
2
|
-
import { Box as
|
2
|
+
import { Box as i, Typography as p, Chip as x, List as R, ListItem as w, Button as q } from "@mui/material";
|
3
3
|
import { Icon as u } from "@iconify/react";
|
4
4
|
import D from "@iconify-icons/tabler/external-link";
|
5
5
|
import L from "@iconify-icons/material-symbols/lock-outline";
|
6
6
|
import B from "@iconify-icons/material-symbols/check-circle";
|
7
|
-
import
|
7
|
+
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
|
-
import
|
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
|
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";
|
16
16
|
const P = {
|
17
17
|
en: {
|
18
18
|
allow: "Allow",
|
@@ -56,13 +56,13 @@ const P = {
|
|
56
56
|
}
|
57
57
|
};
|
58
58
|
function T({
|
59
|
-
ref: r,
|
60
|
-
locale:
|
59
|
+
ref: r = void 0,
|
60
|
+
locale: k = "en",
|
61
61
|
src: c,
|
62
|
-
storageAccessState:
|
62
|
+
storageAccessState: f
|
63
63
|
}) {
|
64
|
-
const
|
65
|
-
callback:
|
64
|
+
const h = j(null), o = F({
|
65
|
+
callback: b,
|
66
66
|
open: !1,
|
67
67
|
get origin() {
|
68
68
|
try {
|
@@ -78,8 +78,8 @@ function T({
|
|
78
78
|
return c;
|
79
79
|
}
|
80
80
|
}
|
81
|
-
}),
|
82
|
-
o.open = !1, o.callback =
|
81
|
+
}), l = s((n, a = {}) => W(P, n, k, "en", a)), A = s(() => {
|
82
|
+
o.open = !1, o.callback = b;
|
83
83
|
}), I = s(() => {
|
84
84
|
o.open = !0;
|
85
85
|
}), v = s(() => {
|
@@ -87,7 +87,7 @@ function T({
|
|
87
87
|
}), C = s(
|
88
88
|
async (n) => {
|
89
89
|
var d;
|
90
|
-
(await ((d =
|
90
|
+
(await ((d = h.current) == null ? void 0 : d.callIframe("requestStorageAccess"))).value ? n(!0, "broswer") : f === void 0 ? n(!1, "system") : f === "denied" ? n(!1) : (o.open = !0, o.callback = n);
|
91
91
|
}
|
92
92
|
), z = s(() => new Promise((n) => {
|
93
93
|
C((a, d) => {
|
@@ -95,15 +95,15 @@ function T({
|
|
95
95
|
});
|
96
96
|
})), S = s(() => {
|
97
97
|
o.open = !1;
|
98
|
-
}),
|
98
|
+
}), g = s(() => {
|
99
99
|
o.open = !1, o.callback(!1, "system");
|
100
100
|
});
|
101
101
|
return M(r, () => ({
|
102
102
|
open: I,
|
103
103
|
close: v,
|
104
104
|
requestStorageAccess: z
|
105
|
-
})), /* @__PURE__ */ e(Y, { popup: !0, open: o.open, onClose:
|
106
|
-
|
105
|
+
})), /* @__PURE__ */ e(Y, { popup: !0, open: o.open, onClose: g, keepMounted: !0, children: /* @__PURE__ */ t(
|
106
|
+
i,
|
107
107
|
{
|
108
108
|
sx: {
|
109
109
|
backgroundColor: "background.default",
|
@@ -121,7 +121,7 @@ function T({
|
|
121
121
|
/* @__PURE__ */ e(
|
122
122
|
_,
|
123
123
|
{
|
124
|
-
onClose:
|
124
|
+
onClose: g,
|
125
125
|
sx: {
|
126
126
|
position: "absolute",
|
127
127
|
right: 14,
|
@@ -143,7 +143,7 @@ function T({
|
|
143
143
|
},
|
144
144
|
children: [
|
145
145
|
/* @__PURE__ */ e(
|
146
|
-
|
146
|
+
i,
|
147
147
|
{
|
148
148
|
component: u,
|
149
149
|
icon: L,
|
@@ -153,14 +153,14 @@ function T({
|
|
153
153
|
}
|
154
154
|
}
|
155
155
|
),
|
156
|
-
|
156
|
+
l("title")
|
157
157
|
]
|
158
158
|
}
|
159
159
|
),
|
160
|
-
/* @__PURE__ */ t(
|
161
|
-
/* @__PURE__ */ e(p, { children:
|
160
|
+
/* @__PURE__ */ t(i, { sx: { display: "flex", flexDirection: "column", gap: 1 }, children: [
|
161
|
+
/* @__PURE__ */ e(p, { children: l("reason", {
|
162
162
|
site: /* @__PURE__ */ e(
|
163
|
-
|
163
|
+
x,
|
164
164
|
{
|
165
165
|
clickable: !0,
|
166
166
|
component: "a",
|
@@ -174,13 +174,13 @@ function T({
|
|
174
174
|
}
|
175
175
|
)
|
176
176
|
}) }),
|
177
|
-
/* @__PURE__ */ e(p, { component: "div", children:
|
178
|
-
allowButton: /* @__PURE__ */ e(
|
177
|
+
/* @__PURE__ */ e(p, { component: "div", children: l("clickAllow", {
|
178
|
+
allowButton: /* @__PURE__ */ e(x, { label: l("allow"), size: "small", color: "success" })
|
179
179
|
}) }),
|
180
|
-
/* @__PURE__ */ t(
|
180
|
+
/* @__PURE__ */ t(i, { sx: { mt: 2 }, children: [
|
181
181
|
/* @__PURE__ */ t(p, { sx: { display: "flex", alignItems: "center", gap: 1, mb: 0.5 }, children: [
|
182
182
|
/* @__PURE__ */ e(
|
183
|
-
|
183
|
+
i,
|
184
184
|
{
|
185
185
|
component: u,
|
186
186
|
icon: B,
|
@@ -190,36 +190,36 @@ function T({
|
|
190
190
|
}
|
191
191
|
}
|
192
192
|
),
|
193
|
-
|
193
|
+
l("afterAllow.title")
|
194
194
|
] }),
|
195
195
|
/* @__PURE__ */ t(R, { dense: !0, sx: { py: 0, pl: 2 }, children: [
|
196
|
-
/* @__PURE__ */ t(
|
196
|
+
/* @__PURE__ */ t(w, { sx: { display: "flex", alignItems: "center", gap: 0.8 }, children: [
|
197
197
|
/* @__PURE__ */ e(
|
198
|
-
|
198
|
+
i,
|
199
199
|
{
|
200
200
|
component: u,
|
201
|
-
icon:
|
201
|
+
icon: y,
|
202
202
|
sx: {
|
203
203
|
fontSize: 20,
|
204
204
|
color: "success.main"
|
205
205
|
}
|
206
206
|
}
|
207
207
|
),
|
208
|
-
|
208
|
+
l("afterAllow.list1")
|
209
209
|
] }),
|
210
|
-
/* @__PURE__ */ t(
|
210
|
+
/* @__PURE__ */ t(w, { sx: { display: "flex", alignItems: "center", gap: 0.8 }, children: [
|
211
211
|
/* @__PURE__ */ e(
|
212
|
-
|
212
|
+
i,
|
213
213
|
{
|
214
214
|
component: u,
|
215
|
-
icon:
|
215
|
+
icon: y,
|
216
216
|
sx: {
|
217
217
|
fontSize: 20,
|
218
218
|
color: "success.main"
|
219
219
|
}
|
220
220
|
}
|
221
221
|
),
|
222
|
-
|
222
|
+
l("afterAllow.list2")
|
223
223
|
] })
|
224
224
|
] })
|
225
225
|
] }),
|
@@ -231,20 +231,19 @@ function T({
|
|
231
231
|
sx: {
|
232
232
|
color: "grey.700"
|
233
233
|
},
|
234
|
-
children:
|
234
|
+
children: l("dataUsage")
|
235
235
|
}
|
236
236
|
)
|
237
237
|
] }),
|
238
|
-
/* @__PURE__ */ e(
|
239
|
-
/* @__PURE__ */ e(q, { variant: "contained", color: "success", onClick: S, sx: { minWidth: 100, letterSpacing: 1 }, children:
|
238
|
+
/* @__PURE__ */ e(i, { sx: { display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ t(i, { sx: { position: "relative", display: "inline-block", cursor: "pointer" }, children: [
|
239
|
+
/* @__PURE__ */ e(q, { variant: "contained", color: "success", onClick: S, sx: { minWidth: 100, letterSpacing: 1 }, children: l("allow") }),
|
240
240
|
/* @__PURE__ */ e(
|
241
241
|
H,
|
242
242
|
{
|
243
|
-
ref:
|
243
|
+
ref: h,
|
244
244
|
onClick: ({ value: n, visitorId: a }) => {
|
245
245
|
a && O(a), o.callback(n, "broswer");
|
246
246
|
},
|
247
|
-
locale: f,
|
248
247
|
src: c,
|
249
248
|
sx: {
|
250
249
|
zIndex: 1
|
@@ -256,7 +255,7 @@ function T({
|
|
256
255
|
}
|
257
256
|
) });
|
258
257
|
}
|
259
|
-
const
|
258
|
+
const le = U(T);
|
260
259
|
export {
|
261
|
-
|
260
|
+
le as default
|
262
261
|
};
|
@@ -1,13 +1,12 @@
|
|
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,
|
4
|
-
import { useDebounce as
|
5
|
-
import { useBrowser as
|
6
|
-
import
|
7
|
-
import "../Theme
|
8
|
-
import "../
|
9
|
-
import {
|
10
|
-
import { hexToRgba as d } from "../Util/index.js";
|
3
|
+
import { Backdrop as U, useMediaQuery as V, Box as c, Drawer as q, SwipeableDrawer as J, Dialog as X, DialogContent as Y } from "@mui/material";
|
4
|
+
import { useDebounce as Z, useMemoizedFn as D } from "ahooks";
|
5
|
+
import { useBrowser as oo } from "@arcblock/react-hooks";
|
6
|
+
import eo from "color-convert";
|
7
|
+
import { useTheme as no } from "../Theme";
|
8
|
+
import { mergeSx as ro } from "../Util/style";
|
9
|
+
import { hexToRgba as d } from "../Util";
|
11
10
|
const L = H(({ ref: l, ...m }) => /* @__PURE__ */ I(
|
12
11
|
U,
|
13
12
|
{
|
@@ -22,7 +21,7 @@ const L = H(({ ref: l, ...m }) => /* @__PURE__ */ I(
|
|
22
21
|
key: "background"
|
23
22
|
}
|
24
23
|
));
|
25
|
-
function
|
24
|
+
function go(l) {
|
26
25
|
function m({
|
27
26
|
popup: B = !1,
|
28
27
|
open: _ = !1,
|
@@ -30,25 +29,25 @@ function fo(l) {
|
|
30
29
|
...e
|
31
30
|
}) {
|
32
31
|
var P, y;
|
33
|
-
const [
|
32
|
+
const [t, x] = K("#fff"), w = Q(null), z = oo(), M = V("(max-width:640px)");
|
34
33
|
let r = "page";
|
35
34
|
B && (r = "dialog", M && z.mobile.any && (r = "drawer"));
|
36
|
-
const g =
|
35
|
+
const g = no(), p = _, T = ((y = (P = g == null ? void 0 : g.transitions) == null ? void 0 : P.duration) == null ? void 0 : y.leavingScreen) || 500, A = Z(p, {
|
37
36
|
wait: T
|
38
37
|
}), k = D(() => {
|
39
38
|
const o = new URLSearchParams(window.location.search);
|
40
39
|
o.get("magicToken") && o.delete("magicToken"), o.toString() && window.history.replaceState({}, "", `${window.location.pathname}?${o.toString()}`);
|
41
|
-
}), C = (o,
|
42
|
-
["backdropClick", "escapeKeyDown"].includes(
|
43
|
-
}, $ = A || p, j = h ?
|
40
|
+
}), C = (o, a) => {
|
41
|
+
["backdropClick", "escapeKeyDown"].includes(a) || (k(), e == null || e.onClose());
|
42
|
+
}, $ = A || p, j = h ? q : J, O = eo.hex.hsl(t), [R, S, i] = O, u = [0, 30, 60, 30, 0, 30, 60, 30], W = Math.max(...u), G = Math.min(...u);
|
44
43
|
let f = !1;
|
45
44
|
(i * (100 + W) / 100 > 100 || i * (100 + G) / 100 < 0) && (f = !0);
|
46
45
|
const N = `linear-gradient(45deg, ${u.map((o) => {
|
47
|
-
let
|
48
|
-
return f ? s = 0.5 * (100 + o) / 100 :
|
46
|
+
let a = i * (100 + o) / 100, s = 0.6;
|
47
|
+
return f ? s = 0.5 * (100 + o) / 100 : a = i * (100 + o) / 100, `hsla(${R}, ${S}%, ${a}%, ${s})`;
|
49
48
|
}).join(", ")})`, F = `linear-gradient(45deg, ${u.map((o) => {
|
50
|
-
let
|
51
|
-
return f ? s = 0.3 * (100 + o) / 100 :
|
49
|
+
let a = i * (100 + o) / 100, s = 0.2;
|
50
|
+
return f ? s = 0.3 * (100 + o) / 100 : a = i * (100 + o) / 100, `hsla(${R}, ${S}%, ${a}%, ${s})`;
|
52
51
|
}).join(", ")})`, v = {
|
53
52
|
overflow: "visible",
|
54
53
|
"&::before, &::after": {
|
@@ -97,7 +96,7 @@ function fo(l) {
|
|
97
96
|
c,
|
98
97
|
{
|
99
98
|
sx: {
|
100
|
-
border: `1px solid ${d(
|
99
|
+
border: `1px solid ${d(t, 0.1)}`,
|
101
100
|
m: "-1px",
|
102
101
|
position: "relative",
|
103
102
|
borderRadius: "12px",
|
@@ -135,13 +134,13 @@ function fo(l) {
|
|
135
134
|
"@keyframes glowBreathe": {
|
136
135
|
"0%, 100%": {
|
137
136
|
boxShadow: `
|
138
|
-
inset 0 0 7px ${d(
|
139
|
-
inset 0 0 12px ${d(
|
137
|
+
inset 0 0 7px ${d(t, 0.3)},
|
138
|
+
inset 0 0 12px ${d(t, 0.3)}`
|
140
139
|
},
|
141
140
|
"50%": {
|
142
141
|
boxShadow: `
|
143
|
-
inset 0 0 18px ${d(
|
144
|
-
inset 0 0 24px ${d(
|
142
|
+
inset 0 0 18px ${d(t, 0.7)},
|
143
|
+
inset 0 0 24px ${d(t, 0.5)}`
|
145
144
|
}
|
146
145
|
}
|
147
146
|
}
|
@@ -187,7 +186,7 @@ function fo(l) {
|
|
187
186
|
]
|
188
187
|
}
|
189
188
|
) : /* @__PURE__ */ n(
|
190
|
-
|
189
|
+
X,
|
191
190
|
{
|
192
191
|
open: p,
|
193
192
|
slots: {
|
@@ -206,7 +205,7 @@ function fo(l) {
|
|
206
205
|
}
|
207
206
|
},
|
208
207
|
children: /* @__PURE__ */ n(
|
209
|
-
|
208
|
+
Y,
|
210
209
|
{
|
211
210
|
sx: {
|
212
211
|
maxWidth: "calc(100vw - 18px)",
|
@@ -235,5 +234,5 @@ function fo(l) {
|
|
235
234
|
return m;
|
236
235
|
}
|
237
236
|
export {
|
238
|
-
|
237
|
+
go as default
|
239
238
|
};
|
@@ -1,16 +1,15 @@
|
|
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 "../Theme
|
5
|
-
|
6
|
-
|
7
|
-
function d(o) {
|
4
|
+
import { ThemeProvider as f } from "../Theme";
|
5
|
+
const p = t(T), s = t(c);
|
6
|
+
function _(o) {
|
8
7
|
function r(m) {
|
9
|
-
const { palette: n } = i(), h = n.mode === "dark" ? s :
|
10
|
-
return /* @__PURE__ */ e(
|
8
|
+
const { palette: n } = i(), h = n.mode === "dark" ? s : p;
|
9
|
+
return /* @__PURE__ */ e(f, { theme: h, children: /* @__PURE__ */ e(o, { ...m }) });
|
11
10
|
}
|
12
11
|
return r;
|
13
12
|
}
|
14
13
|
export {
|
15
|
-
|
14
|
+
_ as default
|
16
15
|
};
|
@@ -1,5 +1,7 @@
|
|
1
1
|
import { default as PropTypes } from 'prop-types';
|
2
|
-
declare function CustomToolbar(props
|
2
|
+
declare function CustomToolbar({ ...props }: {
|
3
|
+
[x: string]: any;
|
4
|
+
}): import("react/jsx-runtime").JSX.Element;
|
3
5
|
declare namespace CustomToolbar {
|
4
6
|
namespace propTypes {
|
5
7
|
let data: PropTypes.Requireable<any[]>;
|
@@ -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 } from "../Theme
|
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, useMediaQuery as Te } from "@mui/material";
|
8
|
+
import { useDeepCompareEffect as ve } from "ahooks";
|
9
|
+
import { handleCSVDownload as Re } from "./utils";
|
10
|
+
import ke from "./TableSearch";
|
11
|
+
import { useDatatableContext as Fe } from "./DatatableContext";
|
12
|
+
import { styled as z, useTheme as Pe } from "../Theme";
|
13
13
|
function Ie() {
|
14
|
-
const s =
|
15
|
-
return
|
14
|
+
const s = Pe();
|
15
|
+
return Te(s.breakpoints.down("sm"));
|
16
16
|
}
|
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 } =
|
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 } = Fe(), {
|
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
|
+
ve(() => {
|
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
|
+
Re(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
|
+
ke,
|
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";
|
9
|
+
import { styled as D } from "../Theme";
|
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";
|
14
|
+
import pe from "./CustomToolbar";
|
15
|
+
import { DatatableProvider as ue, useDatatableContext as M } from "./DatatableContext";
|
16
|
+
import { styled as $ } from "../Theme";
|
17
17
|
const fe = $("div")`
|
18
18
|
display: flex;
|
19
19
|
align-items: center;
|
@@ -25,7 +25,7 @@ const fe = $("div")`
|
|
25
25
|
font-size: 14px;
|
26
26
|
}
|
27
27
|
`;
|
28
|
-
function N(e) {
|
28
|
+
function N({ ...e }) {
|
29
29
|
const { filterLabel: a } = M(), r = !!(e.filterList ?? []).filter((n) => n.length).length;
|
30
30
|
return r ? /* @__PURE__ */ te(fe, { children: [
|
31
31
|
r && /* @__PURE__ */ i("div", { className: "toolbar-filter-title", children: a }),
|
@@ -58,7 +58,7 @@ const k = (e, a) => {
|
|
58
58
|
e.align && (a.className = P(a.className, `pc-align-${e.align}`)), e.verticalKeyAlign && (a.className = P(a.className, `vertical-align-${e.verticalKeyAlign}`)), e.minWidth && (r.minWidth = e.minWidth), a.style = Object.assign({}, a.style, r);
|
59
59
|
};
|
60
60
|
function A({
|
61
|
-
data: e
|
61
|
+
data: e,
|
62
62
|
columns: a,
|
63
63
|
locale: r = "en",
|
64
64
|
options: n = {},
|
package/lib/Dialog/confirm.d.ts
CHANGED
@@ -29,7 +29,7 @@ declare namespace Confirm {
|
|
29
29
|
let open: PropTypes.Validator<boolean>;
|
30
30
|
let onConfirm: PropTypes.Validator<(...args: any[]) => any>;
|
31
31
|
let onCancel: PropTypes.Validator<(...args: any[]) => any>;
|
32
|
-
let children: PropTypes.
|
32
|
+
let children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
|
33
33
|
let showCancelButton: PropTypes.Requireable<boolean>;
|
34
34
|
let showConfirmButton: PropTypes.Requireable<boolean>;
|
35
35
|
let showCloseButton: PropTypes.Requireable<boolean>;
|
package/lib/Dialog/confirm.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
import { jsx as r, jsxs as
|
1
|
+
import { jsx as r, jsxs as g, Fragment as C } from "react/jsx-runtime";
|
2
2
|
import o from "prop-types";
|
3
|
-
import { useMemoizedFn as
|
4
|
-
import
|
5
|
-
import
|
6
|
-
function
|
3
|
+
import { useMemoizedFn as q } from "ahooks";
|
4
|
+
import c from "../Button";
|
5
|
+
import y from "./dialog";
|
6
|
+
function R({
|
7
7
|
title: a,
|
8
8
|
children: d,
|
9
9
|
onConfirm: m,
|
@@ -12,10 +12,10 @@ function q({
|
|
12
12
|
showCancelButton: n = !0,
|
13
13
|
showConfirmButton: s = !0,
|
14
14
|
fullScreen: x = !1,
|
15
|
-
confirmButton:
|
15
|
+
confirmButton: l = {
|
16
16
|
text: "Confirm"
|
17
17
|
},
|
18
|
-
cancelButton:
|
18
|
+
cancelButton: p = {
|
19
19
|
text: "Cancel"
|
20
20
|
},
|
21
21
|
PaperProps: t = {},
|
@@ -27,11 +27,11 @@ function q({
|
|
27
27
|
},
|
28
28
|
t.style
|
29
29
|
);
|
30
|
-
const h =
|
31
|
-
["backdropClick", "escapeKeyDown"].includes(
|
30
|
+
const h = q((e, u) => {
|
31
|
+
["backdropClick", "escapeKeyDown"].includes(u) || (e.stopPropagation(), i(e, u));
|
32
32
|
});
|
33
33
|
return /* @__PURE__ */ r(
|
34
|
-
|
34
|
+
y,
|
35
35
|
{
|
36
36
|
title: a,
|
37
37
|
PaperProps: t,
|
@@ -54,28 +54,28 @@ function q({
|
|
54
54
|
}
|
55
55
|
}
|
56
56
|
},
|
57
|
-
actions: n || s ? /* @__PURE__ */ C
|
57
|
+
actions: n || s ? /* @__PURE__ */ g(C, { children: [
|
58
58
|
n && /* @__PURE__ */ r(
|
59
|
-
|
59
|
+
c,
|
60
60
|
{
|
61
61
|
onClick: (e) => {
|
62
62
|
e.stopPropagation(), i(e, "closeButton");
|
63
63
|
},
|
64
64
|
color: "primary",
|
65
|
-
...
|
66
|
-
children:
|
65
|
+
...p.props,
|
66
|
+
children: p.text
|
67
67
|
}
|
68
68
|
),
|
69
69
|
s && /* @__PURE__ */ r(
|
70
|
-
|
70
|
+
c,
|
71
71
|
{
|
72
72
|
onClick: (e) => {
|
73
73
|
e.stopPropagation(), m(e);
|
74
74
|
},
|
75
75
|
color: "primary",
|
76
76
|
autoFocus: !0,
|
77
|
-
...
|
78
|
-
children:
|
77
|
+
...l.props,
|
78
|
+
children: l.text
|
79
79
|
}
|
80
80
|
)
|
81
81
|
] }) : null,
|
@@ -83,12 +83,12 @@ function q({
|
|
83
83
|
}
|
84
84
|
);
|
85
85
|
}
|
86
|
-
|
86
|
+
R.propTypes = {
|
87
87
|
title: o.node.isRequired,
|
88
88
|
open: o.bool.isRequired,
|
89
89
|
onConfirm: o.func.isRequired,
|
90
90
|
onCancel: o.func.isRequired,
|
91
|
-
children: o.node,
|
91
|
+
children: o.node.isRequired,
|
92
92
|
showCancelButton: o.bool,
|
93
93
|
showConfirmButton: o.bool,
|
94
94
|
showCloseButton: o.bool,
|
@@ -105,5 +105,5 @@ q.propTypes = {
|
|
105
105
|
PaperProps: o.object
|
106
106
|
};
|
107
107
|
export {
|
108
|
-
|
108
|
+
R as default
|
109
109
|
};
|
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 } from "../Theme
|
4
|
+
import { Dialog as M, Box as w, useMediaQuery as v, Typography as N, DialogContent as C, DialogActions as B, IconButton as A } from "@mui/material";
|
5
|
+
import { styled as h, useTheme as T } from "../Theme";
|
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 _ = T(), i = v(_.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(A, { 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(N, { 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(C, { ...u.content, children: o }),
|
43
|
+
g && /* @__PURE__ */ t(B, { 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";
|
2
|
+
import { default as t } from "./confirm";
|
3
|
+
import { default as m } from "./use-confirm";
|
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";
|
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";
|
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);
|