@arcblock/ux 3.0.5 → 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/types.d.ts +20 -0
- 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/global.d.ts +28 -0
- 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/type.d.ts +44 -0
- 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,25 +1,23 @@
|
|
1
|
-
import { jsx as r, jsxs as
|
1
|
+
import { jsx as r, jsxs as c } from "react/jsx-runtime";
|
2
2
|
import { useMemo as M, useEffect as u } from "react";
|
3
3
|
import { useLocation as x, matchPath as z } from "react-router-dom";
|
4
4
|
import D from "react-helmet";
|
5
|
-
import {
|
6
|
-
import
|
7
|
-
import { CloseFullscreen as
|
8
|
-
import
|
9
|
-
import "../../Header
|
10
|
-
import G from "../../
|
11
|
-
import O from "../../
|
12
|
-
import "
|
13
|
-
import q from "../../
|
14
|
-
import
|
15
|
-
import {
|
16
|
-
import { Link as v } from "./external-link.js";
|
17
|
-
import { FullPageProvider as A, useFullPage as J } from "./full-page.js";
|
5
|
+
import { Box as i, Container as R } from "@mui/material";
|
6
|
+
import T from "clsx";
|
7
|
+
import { CloseFullscreen as V, OpenInFull as B } from "@mui/icons-material";
|
8
|
+
import U from "../dashboard-legacy";
|
9
|
+
import { ResponsiveHeader as E } from "../../Header";
|
10
|
+
import G from "../../NavMenu";
|
11
|
+
import O from "../../Footer";
|
12
|
+
import p from "./sidebar";
|
13
|
+
import { styled as g, useTheme as q } from "../../Theme";
|
14
|
+
import { Link as v } from "./external-link";
|
15
|
+
import { FullPageProvider as A, useFullPage as J } from "./full-page";
|
18
16
|
function K({ closeMenu: o, ...a }) {
|
19
17
|
const e = x();
|
20
18
|
return u(() => {
|
21
19
|
o();
|
22
|
-
}, [e]), /* @__PURE__ */ r(
|
20
|
+
}, [e]), /* @__PURE__ */ r(G, { ...a });
|
23
21
|
}
|
24
22
|
function w(o, a) {
|
25
23
|
return o.map((e) => {
|
@@ -42,16 +40,16 @@ function Q({
|
|
42
40
|
links: e = [],
|
43
41
|
sidebarWidth: s = 120,
|
44
42
|
fullWidth: y = !1,
|
45
|
-
dense:
|
43
|
+
dense: h = "auto",
|
46
44
|
footerProps: N = {},
|
47
|
-
sx: P,
|
45
|
+
sx: P = {},
|
48
46
|
children: F,
|
49
47
|
...m
|
50
48
|
}) {
|
51
|
-
const b =
|
49
|
+
const b = q(), { inFullPage: L, showToggleButton: W, headerVisible: C, footerVisible: H, sidebarVisible: _, toggleFullPage: $ } = J(), f = x(), l = M(() => w(e, f), [f, e]), S = l.some((t) => {
|
52
50
|
var d;
|
53
51
|
return !!((d = t.children) != null && d.length);
|
54
|
-
}), n =
|
52
|
+
}), n = h === "auto" ? l.length >= 8 || S : h, j = T("dashboard", { "dashboard-dense": n }, m.className), I = {
|
55
53
|
homeLink: (t) => {
|
56
54
|
var d;
|
57
55
|
return /* @__PURE__ */ r(v, { to: ((d = window.blocklet) == null ? void 0 : d.prefix) || "/", children: t });
|
@@ -61,9 +59,9 @@ function Q({
|
|
61
59
|
return u(() => {
|
62
60
|
const { searchParams: t } = new URL(window.location.href);
|
63
61
|
t.get("inviter") && window.localStorage.setItem("inviter", t.get("inviter"));
|
64
|
-
}, []), /* @__PURE__ */
|
62
|
+
}, []), /* @__PURE__ */ c(X, { sx: P, ...m, className: j, sidebarWidth: s, children: [
|
65
63
|
/* @__PURE__ */ r(D, { title: o }, o),
|
66
|
-
|
64
|
+
C && /* @__PURE__ */ r(Y, { ...I, className: "dashboard-header", children: e != null && e.length ? ({ isMobile: t, closeMenu: d }) => t ? /* @__PURE__ */ r(
|
67
65
|
K,
|
68
66
|
{
|
69
67
|
mode: "inline",
|
@@ -73,7 +71,7 @@ function Q({
|
|
73
71
|
activeTextColor: b.palette.primary.main
|
74
72
|
}
|
75
73
|
) : null : null }),
|
76
|
-
/* @__PURE__ */
|
74
|
+
/* @__PURE__ */ c(
|
77
75
|
i,
|
78
76
|
{
|
79
77
|
className: "dashboard-body",
|
@@ -81,7 +79,7 @@ function Q({
|
|
81
79
|
display: "flex"
|
82
80
|
},
|
83
81
|
children: [
|
84
|
-
!!(e != null && e.length) &&
|
82
|
+
!!(e != null && e.length) && _ && /* @__PURE__ */ r(
|
85
83
|
i,
|
86
84
|
{
|
87
85
|
className: "dashboard-sidebar",
|
@@ -94,7 +92,7 @@ function Q({
|
|
94
92
|
children: n ? /* @__PURE__ */ r(p, { links: e, dense: n }) : /* @__PURE__ */ r(i, { className: "dashboard-sidebar-container", children: /* @__PURE__ */ r(p, { links: e, dense: n }) })
|
95
93
|
}
|
96
94
|
),
|
97
|
-
/* @__PURE__ */
|
95
|
+
/* @__PURE__ */ c(i, { className: "dashboard-main", id: "arc__dashboard-main", children: [
|
98
96
|
W && /* @__PURE__ */ r(
|
99
97
|
i,
|
100
98
|
{
|
@@ -112,12 +110,12 @@ function Q({
|
|
112
110
|
borderRadius: 1,
|
113
111
|
cursor: "pointer"
|
114
112
|
},
|
115
|
-
onClick:
|
116
|
-
children: L ? /* @__PURE__ */ r(
|
113
|
+
onClick: $,
|
114
|
+
children: L ? /* @__PURE__ */ r(V, { style: { fontSize: 18 } }) : /* @__PURE__ */ r(B, { style: { fontSize: 18 } })
|
117
115
|
}
|
118
116
|
),
|
119
|
-
/* @__PURE__ */ r(
|
120
|
-
|
117
|
+
/* @__PURE__ */ r(R, { className: "dashboard-content", id: "arc__dashboard-content", ...y && { maxWidth: !1 }, children: F }),
|
118
|
+
H && /* @__PURE__ */ r(O, { dark: b.palette.mode === "dark", ...N })
|
121
119
|
] })
|
122
120
|
]
|
123
121
|
}
|
@@ -182,17 +180,17 @@ const X = g("div", {
|
|
182
180
|
}
|
183
181
|
}
|
184
182
|
}
|
185
|
-
`, Y = g(
|
183
|
+
`, Y = g(E)`
|
186
184
|
.header-container {
|
187
185
|
max-width: 100%;
|
188
186
|
}
|
189
187
|
`;
|
190
|
-
function
|
188
|
+
function fe({
|
191
189
|
legacy: o = !0,
|
192
190
|
...a
|
193
191
|
}) {
|
194
|
-
return o ? /* @__PURE__ */ r(
|
192
|
+
return o ? /* @__PURE__ */ r(U, { ...a }) : /* @__PURE__ */ r(A, { children: /* @__PURE__ */ r(Q, { ...a }) });
|
195
193
|
}
|
196
194
|
export {
|
197
|
-
|
195
|
+
fe as default
|
198
196
|
};
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { jsxs as o, jsx as t } from "react/jsx-runtime";
|
2
2
|
import { Typography as b } from "@mui/material";
|
3
3
|
import d from "clsx";
|
4
|
-
import { styled as c } from "../../Theme
|
5
|
-
import { NavLink as h } from "./external-link
|
4
|
+
import { styled as c } from "../../Theme";
|
5
|
+
import { NavLink as h } from "./external-link";
|
6
6
|
function p(e, i) {
|
7
7
|
var n;
|
8
8
|
if ((n = e.children) != null && n.length)
|
@@ -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,9 +1,9 @@
|
|
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
|
-
import g from "../../Logo
|
6
|
-
import { styled as b } from "../../Theme
|
5
|
+
import g from "../../Logo";
|
6
|
+
import { styled as b } from "../../Theme";
|
7
7
|
const k = b(x)`
|
8
8
|
&& {
|
9
9
|
z-index: ${(e) => e.theme.zIndex.drawer};
|
@@ -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 {
|
@@ -3,10 +3,10 @@ import { useState as c, useEffect as P } from "react";
|
|
3
3
|
import H from "react-helmet";
|
4
4
|
import { Box as h, Drawer as S, Container as W } from "@mui/material";
|
5
5
|
import { useSize as j } from "ahooks";
|
6
|
-
import C from "./sidebar
|
7
|
-
import F from "./header
|
8
|
-
import O from "../../Footer
|
9
|
-
import { styled as T } from "../../Theme
|
6
|
+
import C from "./sidebar";
|
7
|
+
import F from "./header";
|
8
|
+
import O from "../../Footer";
|
9
|
+
import { styled as T } from "../../Theme";
|
10
10
|
const B = T("div")`
|
11
11
|
&.dashboard {
|
12
12
|
display: flex;
|
@@ -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,
|
4
|
+
import { Button as w, Typography as z } from "@mui/material";
|
5
5
|
import { teal as l } from "@mui/material/colors";
|
6
|
-
import
|
7
|
-
import
|
8
|
-
import { styled as
|
9
|
-
function q({
|
10
|
-
|
6
|
+
import v from "../../Icon/image";
|
7
|
+
import I from "../../Logo";
|
8
|
+
import { styled as c, useTheme as j } from "../../Theme";
|
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
|
+
}) {
|
17
|
+
const u = j(), 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(I, { 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
|
+
v,
|
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(z, { 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
@@ -3,19 +3,19 @@ import { useState as R, useEffect as W } from "react";
|
|
3
3
|
import $ from "react-helmet";
|
4
4
|
import { Container as t, Toolbar as u, Divider as B, List as C, Link as v, ListItemButton as G, ListItemText as M, AppBar as j, IconButton as E, Typography as w, Drawer as F } from "@mui/material";
|
5
5
|
import { Menu as S } from "@mui/icons-material";
|
6
|
-
import Z from "../Footer
|
7
|
-
import A from "../Wallet/Open
|
8
|
-
import b from "../Icon
|
9
|
-
import H from "../Logo
|
10
|
-
import { styled as x } from "../Theme
|
6
|
+
import Z from "../Footer";
|
7
|
+
import A from "../Wallet/Open";
|
8
|
+
import b from "../Icon";
|
9
|
+
import H from "../Logo";
|
10
|
+
import { styled as x } from "../Theme";
|
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
|
2
|
-
import { createContext as
|
1
|
+
import { jsx as x } from "react/jsx-runtime";
|
2
|
+
import { createContext as g, useState as p, useRef as b, useEffect as k, useCallback as A, use as R } from "react";
|
3
3
|
import j from "lodash/get";
|
4
|
-
import
|
5
|
-
import S from "./browser-lang
|
6
|
-
import { translate as U } from "./util
|
7
|
-
import { getCookieOptions as D, resolveRootDomain as E } from "../Util
|
4
|
+
import i from "js-cookie";
|
5
|
+
import S from "./browser-lang";
|
6
|
+
import { translate as U } from "./util";
|
7
|
+
import { getCookieOptions as D, resolveRootDomain as E } from "../Util";
|
8
8
|
const l = "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(l) || 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(l, { path: o.path || "/", domain: t });
|
27
27
|
}
|
28
|
-
|
28
|
+
i.set(l, 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 = g(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, w] = p(o ||
|
47
|
-
const
|
46
|
+
let [n, w] = p(o || d(a));
|
47
|
+
const f = b(t || ""), [, C] = p(0), u = (c) => {
|
48
48
|
w(c), z(c);
|
49
49
|
};
|
50
|
-
if (
|
51
|
-
const c = o ||
|
50
|
+
if (k(() => {
|
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, C((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 = f.current;
|
63
63
|
} else
|
64
|
-
|
65
|
-
const
|
64
|
+
f.current = n;
|
65
|
+
const y = A(
|
66
66
|
(c, s) => U(r, c, n, t, s),
|
67
67
|
[r, n, t]
|
68
68
|
);
|
69
|
-
return /* @__PURE__ */
|
69
|
+
return /* @__PURE__ */ x(_, { value: { locale: n, changeLocale: u, t: y, languages: a, ...v }, children: e });
|
70
70
|
}
|
71
71
|
function V() {
|
72
|
-
return
|
72
|
+
return R(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
@@ -4,10 +4,10 @@ import { Box as m, Button as w, IconButton as B, Typography as E, Popper as j, P
|
|
4
4
|
import { Icon as h } from "@iconify/react";
|
5
5
|
import $ from "@iconify-icons/material-symbols/check";
|
6
6
|
import H from "iconify-icons-material-symbols-400/language";
|
7
|
-
import { LocaleContext as O } from "./context
|
8
|
-
import { styled as W } from "../Theme
|
9
|
-
import { mergeSx as q } from "../Util/style
|
10
|
-
function Z(t) {
|
7
|
+
import { LocaleContext as O } from "./context";
|
8
|
+
import { styled as W } from "../Theme";
|
9
|
+
import { mergeSx as q } from "../Util/style";
|
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
@@ -1,35 +1,35 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { styled as
|
3
|
-
import s from "./images/logo-light-top.svg
|
4
|
-
import f from "./images/logo-light-text.svg
|
5
|
-
import u from "./images/logo-dark-top.svg
|
6
|
-
import h from "./images/logo-dark-text.svg
|
7
|
-
function
|
8
|
-
showText:
|
1
|
+
import { jsxs as x, jsx as o } from "react/jsx-runtime";
|
2
|
+
import { styled as p } from "../Theme";
|
3
|
+
import s from "./images/logo-light-top.svg";
|
4
|
+
import f from "./images/logo-light-text.svg";
|
5
|
+
import u from "./images/logo-dark-top.svg";
|
6
|
+
import h from "./images/logo-dark-text.svg";
|
7
|
+
function w({
|
8
|
+
showText: t = !0,
|
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
|
+
...m
|
15
15
|
}) {
|
16
|
-
const e = a === "light",
|
17
|
-
return r && (i.width = `${r}px`, i.height = `${r}px`), /* @__PURE__ */
|
18
|
-
n &&
|
19
|
-
|
16
|
+
const e = a === "light", c = e ? /* @__PURE__ */ o(s, {}) : /* @__PURE__ */ o(u, {}), g = e ? /* @__PURE__ */ o(f, { className: "logo-text" }) : /* @__PURE__ */ o(h, { className: "logo-text" });
|
17
|
+
return r && (i.width = `${r}px`, i.height = `${r}px`), /* @__PURE__ */ x(d, { layout: l, style: i, ...m, children: [
|
18
|
+
n && c,
|
19
|
+
t && g
|
20
20
|
] });
|
21
21
|
}
|
22
|
-
const
|
22
|
+
const d = p("span")`
|
23
23
|
display: inline-flex;
|
24
|
-
flex-direction: ${(
|
24
|
+
flex-direction: ${(t) => t.layout === "horizontal" ? "row" : "column"};
|
25
25
|
justify-content: center;
|
26
26
|
align-items: center;
|
27
27
|
|
28
28
|
.logo-text {
|
29
|
-
${(
|
30
|
-
${(
|
29
|
+
${(t) => t.layout === "vertical" ? "margin-top: 8px;" : ""}
|
30
|
+
${(t) => t.layout === "vertical" ? "" : "margin-left: 8px;"};
|
31
31
|
}
|
32
32
|
`;
|
33
33
|
export {
|
34
|
-
|
34
|
+
w as default
|
35
35
|
};
|
package/lib/Metric/index.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { jsx as i, jsxs as m, Fragment as d } from "react/jsx-runtime";
|
2
2
|
import { Link as x } from "@mui/material";
|
3
|
-
import h from "../Icon/image
|
4
|
-
import { styled as f } from "../Theme
|
3
|
+
import h from "../Icon/image";
|
4
|
+
import { styled as f } from "../Theme";
|
5
5
|
function z({
|
6
6
|
icon: e,
|
7
7
|
value: r,
|
@@ -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;
|