@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,34 +1,34 @@
|
|
1
1
|
import { jsx as i, jsxs as R } from "react/jsx-runtime";
|
2
2
|
import { createContext as _, use as B, useState as L, useRef as j, useMemo as h, useCallback as C, useEffect as k } from "react";
|
3
|
-
import { useTheme as
|
4
|
-
import
|
5
|
-
import { BLOCKLET_THEME_PREFER_KEY as
|
6
|
-
import { useLocationState as q } from "../hooks/use-location-state
|
7
|
-
import { createTheme as g, lazyCreateDefaultTheme as z, isUxTheme as A, isTheme as F } from "./theme
|
8
|
-
const G = g(),
|
3
|
+
import { useTheme as y, StyledEngineProvider as D, ThemeProvider as K, CssBaseline as U, GlobalStyles as V } from "@mui/material";
|
4
|
+
import v from "lodash/set";
|
5
|
+
import { BLOCKLET_THEME_PREFER_KEY as b, isValidThemeMode as W, getDefaultThemePrefer as w } from "@blocklet/theme";
|
6
|
+
import { useLocationState as q } from "../hooks/use-location-state";
|
7
|
+
import { createTheme as g, lazyCreateDefaultTheme as z, isUxTheme as A, isTheme as F } from "./theme";
|
8
|
+
const G = g(), $ = _({});
|
9
9
|
function H() {
|
10
|
-
return B(
|
10
|
+
return B($);
|
11
11
|
}
|
12
|
-
const
|
13
|
-
function I({ className:
|
14
|
-
const e =
|
12
|
+
const x = (l) => l ? l === "system" ? w({ theme: { prefer: "system" } }) : l : w();
|
13
|
+
function I({ className: l = void 0 }) {
|
14
|
+
const e = y();
|
15
15
|
if (e.palette.mode === "dark") {
|
16
|
-
const s = "transparent",
|
16
|
+
const s = "transparent", n = e.palette.grey[300], o = (l || "").trim().split(/\s+/).filter(Boolean).map((c) => c.startsWith(".") ? c : `.${c}`).join(" "), r = o ? `${o}::-webkit-scrollbar, ${o} *::-webkit-scrollbar` : "*::-webkit-scrollbar", a = o ? `${o}::-webkit-scrollbar-track, ${o} *::-webkit-scrollbar-track` : "*::-webkit-scrollbar-track", m = o ? `${o}::-webkit-scrollbar-thumb, ${o} *::-webkit-scrollbar-thumb` : "*::-webkit-scrollbar-thumb", d = o ? `${o}, ${o} *` : "*";
|
17
17
|
return /* @__PURE__ */ i(
|
18
18
|
V,
|
19
19
|
{
|
20
20
|
styles: {
|
21
21
|
// Chrome, Safari, Edge
|
22
22
|
"@supports selector(::-webkit-scrollbar)": {
|
23
|
-
[
|
23
|
+
[r]: {
|
24
24
|
width: "12px",
|
25
25
|
height: "12px"
|
26
26
|
},
|
27
27
|
[a]: {
|
28
28
|
background: s
|
29
29
|
},
|
30
|
-
[
|
31
|
-
background:
|
30
|
+
[m]: {
|
31
|
+
background: n,
|
32
32
|
borderRadius: "6px",
|
33
33
|
border: "2px solid",
|
34
34
|
borderColor: s,
|
@@ -41,9 +41,9 @@ function I({ className: c }) {
|
|
41
41
|
},
|
42
42
|
// Firefox
|
43
43
|
"@supports not selector(::-webkit-scrollbar)": {
|
44
|
-
[
|
44
|
+
[d]: {
|
45
45
|
scrollbarWidth: "auto",
|
46
|
-
scrollbarColor: `${
|
46
|
+
scrollbarColor: `${n} ${s}`
|
47
47
|
}
|
48
48
|
}
|
49
49
|
}
|
@@ -53,77 +53,82 @@ function I({ className: c }) {
|
|
53
53
|
return null;
|
54
54
|
}
|
55
55
|
function E({
|
56
|
-
children:
|
56
|
+
children: l = null,
|
57
57
|
theme: e = G,
|
58
58
|
injectFirst: s = !0,
|
59
|
-
darkSchemeClass:
|
59
|
+
darkSchemeClass: n = ""
|
60
60
|
}) {
|
61
|
-
const
|
61
|
+
const o = h(() => typeof e == "function" || F(e) ? e : g(e), [e]);
|
62
62
|
return (
|
63
63
|
// injectFirst 会影响 makeStyles 自定义样式和 mui styles 覆盖问题
|
64
|
-
/* @__PURE__ */ i(D, { injectFirst: s, children: /* @__PURE__ */ R(K, { theme:
|
64
|
+
/* @__PURE__ */ i(D, { injectFirst: s, children: /* @__PURE__ */ R(K, { theme: o, children: [
|
65
65
|
/* @__PURE__ */ i(U, {}),
|
66
|
-
/* @__PURE__ */ i(I, { className:
|
67
|
-
|
66
|
+
/* @__PURE__ */ i(I, { className: n }),
|
67
|
+
l
|
68
68
|
] }) })
|
69
69
|
);
|
70
70
|
}
|
71
71
|
function N({
|
72
|
-
children:
|
73
|
-
theme: e,
|
74
|
-
prefer: s,
|
75
|
-
disableBlockletTheme:
|
76
|
-
...
|
72
|
+
children: l = null,
|
73
|
+
theme: e = void 0,
|
74
|
+
prefer: s = void 0,
|
75
|
+
disableBlockletTheme: n = !1,
|
76
|
+
...o
|
77
77
|
}) {
|
78
|
-
const [
|
78
|
+
const [r, a] = L(() => x(s)), m = y(), d = q(), c = j(null), p = h(() => {
|
79
79
|
let t = {};
|
80
|
-
const
|
80
|
+
const u = z(r);
|
81
81
|
if (e)
|
82
82
|
if (typeof e == "function") {
|
83
|
-
const M =
|
84
|
-
A(
|
83
|
+
const M = u();
|
84
|
+
A(m) ? t = { ...e(m, { mode: r }) } : t = { ...e(M, { mode: r }) };
|
85
85
|
} else
|
86
86
|
t = { ...e };
|
87
|
-
return
|
88
|
-
}, [
|
89
|
-
const t =
|
90
|
-
a(t), sessionStorage.removeItem(
|
91
|
-
}, [
|
87
|
+
return v(t, "palette.mode", r), v(t, "mode", r), t;
|
88
|
+
}, [r, e, m]), f = h(() => g({ ...p, disableBlockletTheme: n }), [p, n]), T = C(() => {
|
89
|
+
const t = r === "light" ? "dark" : "light";
|
90
|
+
a(t), sessionStorage.removeItem(b), localStorage.setItem(b, t);
|
91
|
+
}, [r, a]), S = C(
|
92
92
|
(t) => {
|
93
|
-
|
93
|
+
r !== t && (a(t), sessionStorage.removeItem(b), localStorage.setItem(b, t));
|
94
94
|
},
|
95
|
-
[
|
95
|
+
[r, a]
|
96
96
|
), P = h(
|
97
97
|
() => ({
|
98
|
-
mode:
|
98
|
+
mode: r,
|
99
99
|
toggleMode: T,
|
100
100
|
changeMode: S,
|
101
101
|
prefer: s
|
102
102
|
}),
|
103
|
-
[
|
103
|
+
[r, s, T, S]
|
104
104
|
);
|
105
105
|
return k(() => {
|
106
|
-
a(
|
107
|
-
}, [s, a,
|
108
|
-
const t = new URLSearchParams(
|
109
|
-
W(t) && sessionStorage.setItem(
|
110
|
-
}, [
|
111
|
-
|
106
|
+
a(x(s));
|
107
|
+
}, [s, a, d.search]), k(() => {
|
108
|
+
const t = new URLSearchParams(d.search).get("theme");
|
109
|
+
W(t) && sessionStorage.setItem(b, t);
|
110
|
+
}, [d.search]), k(() => {
|
111
|
+
c.current || (c.current = document.querySelector('meta[name="theme-color"]'));
|
112
112
|
const t = f.palette.background.default;
|
113
|
-
if (
|
114
|
-
|
113
|
+
if (c.current)
|
114
|
+
c.current.setAttribute("content", t);
|
115
115
|
else {
|
116
|
-
const
|
117
|
-
|
116
|
+
const u = document.createElement("meta");
|
117
|
+
u.name = "theme-color", u.content = t, document.head.appendChild(u), c.current = u;
|
118
118
|
}
|
119
|
-
}, [f.palette.background.default]), /* @__PURE__ */ i(
|
119
|
+
}, [f.palette.background.default]), /* @__PURE__ */ i($, { value: P, children: /* @__PURE__ */ i(E, { theme: f, ...o, children: l }) });
|
120
120
|
}
|
121
|
-
function te({
|
122
|
-
|
123
|
-
|
121
|
+
function te({
|
122
|
+
children: l = null,
|
123
|
+
prefer: e = void 0,
|
124
|
+
enableColorScheme: s = !1,
|
125
|
+
...n
|
126
|
+
}) {
|
127
|
+
const { toggleMode: o } = H();
|
128
|
+
return s || e || !o ? /* @__PURE__ */ i(N, { prefer: e, ...n, children: l }) : /* @__PURE__ */ i(E, { ...n, children: l });
|
124
129
|
}
|
125
130
|
export {
|
126
|
-
|
131
|
+
$ as ColorSchemeContext,
|
127
132
|
te as default,
|
128
133
|
H as useColorScheme
|
129
134
|
};
|
package/lib/Theme/theme.js
CHANGED
@@ -2,8 +2,8 @@ import { createTheme as f, responsiveFontSizes as _ } from "@mui/material";
|
|
2
2
|
import { deepmerge as d } from "@mui/utils";
|
3
3
|
import { deepmerge as X } from "@mui/utils";
|
4
4
|
import b from "webfontloader";
|
5
|
-
import { DEFAULT_FONTS as C,
|
6
|
-
import { deepmergeAll as E, cleanedObj as m } from "../Util
|
5
|
+
import { DEFAULT_FONTS as C, BLOCKLET_THEME_DARK as k, BLOCKLET_THEME_LIGHT as x, getBlockletThemeOptions as h, getDefaultThemePrefer as A } from "@blocklet/theme";
|
6
|
+
import { deepmergeAll as E, cleanedObj as m } from "../Util";
|
7
7
|
import "@fontsource/roboto/latin-400.css";
|
8
8
|
import "@fontsource/roboto/latin-500.css";
|
9
9
|
import "@fontsource/roboto/latin-700.css";
|
@@ -42,7 +42,7 @@ function w(e) {
|
|
42
42
|
});
|
43
43
|
}
|
44
44
|
function T(e = "light") {
|
45
|
-
return e === "dark" ?
|
45
|
+
return e === "dark" ? k : x;
|
46
46
|
}
|
47
47
|
function v(e) {
|
48
48
|
let t = null;
|
@@ -60,6 +60,7 @@ const p = ({ palette: e, components: t, overrides: o, ...r }) => ({
|
|
60
60
|
},
|
61
61
|
...r
|
62
62
|
}), L = {
|
63
|
+
// @ts-expect-error
|
63
64
|
themeName: "ArcBlock",
|
64
65
|
pageWidth: "md",
|
65
66
|
disableBlockletTheme: !1,
|
@@ -86,7 +87,7 @@ const p = ({ palette: e, components: t, overrides: o, ...r }) => ({
|
|
86
87
|
}
|
87
88
|
}, U = (...e) => {
|
88
89
|
var l;
|
89
|
-
const t =
|
90
|
+
const t = A(), o = v(t), r = e.reduce(
|
90
91
|
(O, c) => d(O, p(typeof c == "function" ? c(o()) : c)),
|
91
92
|
p(L)
|
92
93
|
), n = r.mode || ((l = r.palette) == null ? void 0 : l.mode) || t, i = h(n), F = T(n), { disableBlockletTheme: g } = r, y = E(
|
package/lib/Toast/index.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
import { jsxs as
|
1
|
+
import { jsxs as k, jsx as s } from "react/jsx-runtime";
|
2
2
|
import { createRef as g } from "react";
|
3
3
|
import { SnackbarProvider as b, useSnackbar as h } from "notistack";
|
4
4
|
import { IconButton as S } from "@mui/material";
|
5
|
-
import { Close as
|
5
|
+
import { Close as x } from "@mui/icons-material";
|
6
6
|
import e from "lodash/noop";
|
7
7
|
let l = e, u = e, f = e, m = e, p = e;
|
8
8
|
const t = (o, r) => (i, n = {}) => o(i, {
|
@@ -10,12 +10,12 @@ const t = (o, r) => (i, n = {}) => o(i, {
|
|
10
10
|
variant: r,
|
11
11
|
...n
|
12
12
|
});
|
13
|
-
function
|
14
|
-
const n = g(),
|
13
|
+
function P({ children: o, anchorOrigin: r, ...i }) {
|
14
|
+
const n = g(), d = (c) => () => {
|
15
15
|
var a;
|
16
16
|
(a = n.current) == null || a.closeSnackbar(c);
|
17
17
|
};
|
18
|
-
return /* @__PURE__ */
|
18
|
+
return /* @__PURE__ */ k(
|
19
19
|
b,
|
20
20
|
{
|
21
21
|
anchorOrigin: {
|
@@ -25,19 +25,19 @@ function H({ children: o, anchorOrigin: r, ...i }) {
|
|
25
25
|
},
|
26
26
|
...i,
|
27
27
|
ref: n,
|
28
|
-
action: (c) => /* @__PURE__ */ s(S, { "aria-label": "close", color: "inherit", onClick:
|
28
|
+
action: (c) => /* @__PURE__ */ s(S, { "aria-label": "close", color: "inherit", onClick: d(c), size: "large", children: /* @__PURE__ */ s(x, { style: { fontSize: 16 } }) }, "close"),
|
29
29
|
children: [
|
30
|
-
/* @__PURE__ */ s(
|
30
|
+
/* @__PURE__ */ s(v, {}),
|
31
31
|
o
|
32
32
|
]
|
33
33
|
}
|
34
34
|
);
|
35
35
|
}
|
36
|
-
function
|
36
|
+
function v() {
|
37
37
|
const { enqueueSnackbar: o, closeSnackbar: r } = h();
|
38
38
|
return l = t(o, "success"), u = t(o, "error"), f = t(o, "warning"), m = t(o, "info"), p = r, null;
|
39
39
|
}
|
40
|
-
const
|
40
|
+
const R = {
|
41
41
|
success: (o, r = {}) => l(o, r),
|
42
42
|
error: (o, r = { autoHideDuration: 15e3 }) => u(o, r),
|
43
43
|
warning: (o, r = {}) => f(o, r),
|
@@ -45,6 +45,6 @@ const P = {
|
|
45
45
|
close: (o) => p(o)
|
46
46
|
};
|
47
47
|
export {
|
48
|
-
|
49
|
-
|
48
|
+
P as ToastProvider,
|
49
|
+
R as default
|
50
50
|
};
|
package/lib/Typography/index.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { jsxs as g, jsx as a } from "react/jsx-runtime";
|
2
|
-
import { Box as x, Typography as
|
3
|
-
import { useReactive as
|
4
|
-
import
|
2
|
+
import { Box as x, Typography as u, Skeleton as y } from "@mui/material";
|
3
|
+
import { useReactive as v, useSize as c, useCreation as C } from "ahooks";
|
4
|
+
import b from "lodash/noop";
|
5
5
|
import { useRef as m, useEffect as w } from "react";
|
6
6
|
let p = -1;
|
7
7
|
function T() {
|
@@ -18,27 +18,27 @@ function M({
|
|
18
18
|
children: t = null,
|
19
19
|
minFontSize: f = 12,
|
20
20
|
/* 设置为 auto 时字体会自动收缩,直到达到浏览器最小字体限制 */
|
21
|
-
fontSize: n,
|
21
|
+
fontSize: n = void 0,
|
22
22
|
sx: s,
|
23
|
-
onShrink: i =
|
23
|
+
onShrink: i = b,
|
24
24
|
...r
|
25
25
|
}) {
|
26
|
-
const
|
26
|
+
const d = m(null), z = m(null), e = v({
|
27
27
|
// @ts-expect-error
|
28
28
|
fontSize: n,
|
29
29
|
loading: !0
|
30
|
-
}), o = c(
|
30
|
+
}), o = c(d.current), l = c(z.current);
|
31
31
|
return w(() => {
|
32
32
|
if (e.loading)
|
33
33
|
if (n === "auto") {
|
34
34
|
if (o && !e.initialSize) {
|
35
|
-
const S = getComputedStyle(
|
35
|
+
const S = getComputedStyle(d.current).fontSize;
|
36
36
|
e.initialSize = Number(S.replace("px", "")), e.fontSize = e.initialSize;
|
37
37
|
}
|
38
38
|
p < 0 && (p = T()), e.fontSize <= p ? (e.loading = !1, i == null || i({ fontSize: e.fontSize, initialSize: e.initialSize })) : l && o && (l.width < o.width && e.fontSize > f ? e.fontSize-- : (e.loading = !1, i == null || i({ fontSize: e.fontSize, initialSize: e.initialSize })));
|
39
39
|
} else
|
40
40
|
e.loading = !1;
|
41
|
-
}, [n, o == null ? void 0 : o.width, l == null ? void 0 : l.width]),
|
41
|
+
}, [n, o == null ? void 0 : o.width, l == null ? void 0 : l.width]), C(() => n === "auto" ? e.loading : !1, [n, e.loading]) ? /* @__PURE__ */ g(
|
42
42
|
x,
|
43
43
|
{
|
44
44
|
ref: z,
|
@@ -46,11 +46,11 @@ function M({
|
|
46
46
|
flex: 1
|
47
47
|
},
|
48
48
|
children: [
|
49
|
-
/* @__PURE__ */ a(
|
49
|
+
/* @__PURE__ */ a(u, { ...r, sx: s, noWrap: !0, children: /* @__PURE__ */ a(y, { variant: "text", sx: { fontSize: "1rem" } }) }),
|
50
50
|
/* @__PURE__ */ a(
|
51
|
-
|
51
|
+
u,
|
52
52
|
{
|
53
|
-
ref:
|
53
|
+
ref: d,
|
54
54
|
...r,
|
55
55
|
sx: {
|
56
56
|
...s,
|
@@ -66,7 +66,7 @@ function M({
|
|
66
66
|
]
|
67
67
|
}
|
68
68
|
) : /* @__PURE__ */ a(
|
69
|
-
|
69
|
+
u,
|
70
70
|
{
|
71
71
|
...r,
|
72
72
|
sx: {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
2
|
-
import { InfoType as d } from "../types
|
3
|
-
import l from "../Content/tooltip-avatar
|
2
|
+
import { InfoType as d } from "../types";
|
3
|
+
import l from "../Content/tooltip-avatar";
|
4
4
|
function u(i) {
|
5
5
|
const { user: r, infoType: n, avatarSize: o = 48, shouldShowHoverCard: f = !1, renderCardContent: e, ...t } = i;
|
6
6
|
return n === d.NameOnly ? /* @__PURE__ */ a(
|
@@ -5,5 +5,5 @@ interface BasicCardProps extends Omit<UserCardProps, 'user'> {
|
|
5
5
|
shouldShowHoverCard: boolean;
|
6
6
|
renderCardContent?: () => React.ReactNode | null;
|
7
7
|
}
|
8
|
-
declare function BasicCard(props: BasicCardProps): import("react/jsx-runtime").JSX.Element;
|
8
|
+
declare function BasicCard({ ...props }: BasicCardProps): import("react/jsx-runtime").JSX.Element;
|
9
9
|
export default BasicCard;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { jsxs as d, jsx as e } from "react/jsx-runtime";
|
2
2
|
import { Box as r } from "@mui/material";
|
3
|
-
import { InfoType as t } from "../types
|
4
|
-
import f from "../Content/minimal
|
5
|
-
import c from "../Content/basic
|
6
|
-
function y(n) {
|
3
|
+
import { InfoType as t } from "../types";
|
4
|
+
import f from "../Content/minimal";
|
5
|
+
import c from "../Content/basic";
|
6
|
+
function y({ ...n }) {
|
7
7
|
const {
|
8
8
|
user: i,
|
9
9
|
avatarSize: s = 40,
|
@@ -5,5 +5,5 @@ interface DetailedCardProps extends Omit<UserCardProps, 'user'> {
|
|
5
5
|
shouldShowHoverCard: boolean;
|
6
6
|
renderCardContent?: () => React.ReactNode | null;
|
7
7
|
}
|
8
|
-
declare function DetailedCard(props: DetailedCardProps): import("react/jsx-runtime").JSX.Element;
|
8
|
+
declare function DetailedCard({ ...props }: DetailedCardProps): import("react/jsx-runtime").JSX.Element;
|
9
9
|
export default DetailedCard;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
2
|
-
import { InfoType as a } from "../types
|
3
|
-
import i from "./name-only
|
4
|
-
import m from "./basic-info
|
5
|
-
function l(r) {
|
2
|
+
import { InfoType as a } from "../types";
|
3
|
+
import i from "./name-only";
|
4
|
+
import m from "./basic-info";
|
5
|
+
function l({ ...r }) {
|
6
6
|
const { infoType: e = a.Minimal } = r;
|
7
7
|
switch (e) {
|
8
8
|
case a.NameOnly:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { jsxs as o, Fragment as i, jsx as n } from "react/jsx-runtime";
|
2
2
|
import { Typography as m } from "@mui/material";
|
3
|
-
import { renderAvatar as d } from "../components
|
3
|
+
import { renderAvatar as d } from "../components";
|
4
4
|
function c(a) {
|
5
5
|
const { user: r, avatarSize: t = 48, onAvatarClick: e } = a;
|
6
6
|
return /* @__PURE__ */ o(i, { children: [
|
@@ -1,13 +1,13 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import { Paper as
|
3
|
-
import { CardType as r } from "../types
|
4
|
-
import { mergeSx as n } from "../../Util/style
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
2
|
+
import { Paper as m, Box as p } from "@mui/material";
|
3
|
+
import { CardType as r } from "../types";
|
4
|
+
import { mergeSx as n } from "../../Util/style";
|
5
5
|
function b({
|
6
6
|
children: e,
|
7
7
|
cardType: o = r.Detailed,
|
8
|
-
variant:
|
9
|
-
containerRef: t,
|
10
|
-
sx: i
|
8
|
+
variant: l = "box",
|
9
|
+
containerRef: t = void 0,
|
10
|
+
sx: i = {}
|
11
11
|
}) {
|
12
12
|
const a = {
|
13
13
|
minWidth: 320,
|
@@ -18,7 +18,7 @@ function b({
|
|
18
18
|
borderColor: "divider"
|
19
19
|
} : {}
|
20
20
|
};
|
21
|
-
return
|
21
|
+
return l === "paper" ? /* @__PURE__ */ d(m, { ref: t, elevation: 0, sx: a, children: e }) : /* @__PURE__ */ d(
|
22
22
|
p,
|
23
23
|
{
|
24
24
|
ref: t,
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
2
2
|
import { useTheme as t, Box as d } from "@mui/material";
|
3
|
-
import { mergeSx as a } from "../../Util/style
|
4
|
-
function p({ children: o, sx: r }) {
|
3
|
+
import { mergeSx as a } from "../../Util/style";
|
4
|
+
function p({ children: o, sx: r = {} }) {
|
5
5
|
const e = t();
|
6
6
|
return /* @__PURE__ */ i(
|
7
7
|
d,
|
@@ -12,7 +12,7 @@ import V from "@arcblock/icons/lib/Email";
|
|
12
12
|
import B from "@arcblock/icons/lib/Timezone";
|
13
13
|
import { withoutProtocol as R } from "ufo";
|
14
14
|
import { useCallback as G, useMemo as N } from "react";
|
15
|
-
import Z from "./clock
|
15
|
+
import Z from "./clock";
|
16
16
|
const q = {
|
17
17
|
timezone: B,
|
18
18
|
email: V,
|
@@ -71,7 +71,7 @@ function K({ value: e }) {
|
|
71
71
|
) })
|
72
72
|
] });
|
73
73
|
}
|
74
|
-
function S({ field: e, value: s, children: a }) {
|
74
|
+
function S({ field: e, value: s, children: a = null }) {
|
75
75
|
const h = q[e], m = k().palette.mode === "dark", c = x(m);
|
76
76
|
return /* @__PURE__ */ y(
|
77
77
|
f,
|
@@ -90,7 +90,7 @@ function S({ field: e, value: s, children: a }) {
|
|
90
90
|
e
|
91
91
|
);
|
92
92
|
}
|
93
|
-
function se({ user: e, renderFields: s }) {
|
93
|
+
function se({ user: e, renderFields: s = void 0 }) {
|
94
94
|
var w;
|
95
95
|
const a = p(() => s ?? ["bio", "email", "phone", "location", "timezone", "link"], [s]), h = p(() => a.includes("bio"), [a]), l = p(() => e.metadata ?? {
|
96
96
|
joinedAt: e == null ? void 0 : e.createdAt,
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { jsxs as t, jsx as a } from "react/jsx-runtime";
|
2
2
|
import { Box as c, Typography as l, Tooltip as f } from "@mui/material";
|
3
3
|
import { useMemoizedFn as p } from "ahooks";
|
4
|
-
import h from "../../hooks/use-clock
|
5
|
-
import { translate as d } from "../../Locale/util
|
6
|
-
import { useLocaleContext as x } from "../../Locale/context
|
4
|
+
import h from "../../hooks/use-clock";
|
5
|
+
import { translate as d } from "../../Locale/util";
|
6
|
+
import { useLocaleContext as x } from "../../Locale/context";
|
7
7
|
const u = {
|
8
8
|
en: {
|
9
9
|
localTime: "Local Time",
|
@@ -8,6 +8,6 @@ interface MinimalContentProps extends UserCardProps {
|
|
8
8
|
avatarProps?: UserCardProps['avatarProps'];
|
9
9
|
shortenLabelProps?: UserCardProps['shortenLabelProps'];
|
10
10
|
}
|
11
|
-
declare function MinimalContent(props: MinimalContentProps): import("react/jsx-runtime").JSX.Element;
|
11
|
+
declare function MinimalContent({ ...props }: MinimalContentProps): import("react/jsx-runtime").JSX.Element;
|
12
12
|
declare const _default: React.MemoExoticComponent<typeof MinimalContent>;
|
13
13
|
export default _default;
|
@@ -1,14 +1,14 @@
|
|
1
1
|
import { jsxs as r, jsx as t } from "react/jsx-runtime";
|
2
2
|
import { memo as x } from "react";
|
3
3
|
import { Box as o, Typography as g } from "@mui/material";
|
4
|
-
import { DID as y } from "../../DID
|
5
|
-
import C from "./tooltip-avatar
|
6
|
-
import { renderTopRight as b } from "../components
|
7
|
-
import v from "./shorten-label
|
8
|
-
function W(
|
4
|
+
import { DID as y } from "../../DID";
|
5
|
+
import C from "./tooltip-avatar";
|
6
|
+
import { renderTopRight as b } from "../components";
|
7
|
+
import v from "./shorten-label";
|
8
|
+
function W({ ...a }) {
|
9
9
|
const {
|
10
10
|
user: e,
|
11
|
-
showDid:
|
11
|
+
showDid: n,
|
12
12
|
didProps: l,
|
13
13
|
avatarSize: s,
|
14
14
|
shouldShowHoverCard: d,
|
@@ -19,7 +19,7 @@ function W(n) {
|
|
19
19
|
shortenLabelProps: h,
|
20
20
|
renderName: i,
|
21
21
|
...u
|
22
|
-
} =
|
22
|
+
} = a;
|
23
23
|
return /* @__PURE__ */ r(
|
24
24
|
o,
|
25
25
|
{
|
@@ -69,7 +69,7 @@ function W(n) {
|
|
69
69
|
children: i ? i(e) : /* @__PURE__ */ t(v, { sx: { fontWeight: 500 }, ...h, children: e.fullName || e.email || e.did })
|
70
70
|
}
|
71
71
|
),
|
72
|
-
|
72
|
+
n && e.did ? /* @__PURE__ */ t(y, { did: e.did, size: 14, copyable: !0, compact: !0, locale: "en", sx: { lineHeight: 1.5 }, ...l ?? {} }) : null
|
73
73
|
] })
|
74
74
|
]
|
75
75
|
}
|
@@ -1,28 +1,28 @@
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
2
|
-
import { Tooltip as
|
3
|
-
import { renderAvatar as c } from "../components
|
4
|
-
function
|
5
|
-
user:
|
2
|
+
import { Tooltip as i, Zoom as f } from "@mui/material";
|
3
|
+
import { renderAvatar as c } from "../components";
|
4
|
+
function x({
|
5
|
+
user: l,
|
6
6
|
avatarSize: m,
|
7
|
-
shouldShowHoverCard:
|
8
|
-
renderCardContent:
|
9
|
-
tooltipTitle: t,
|
10
|
-
tooltipProps: a,
|
11
|
-
avatarProps: p,
|
7
|
+
shouldShowHoverCard: r,
|
8
|
+
renderCardContent: e = void 0,
|
9
|
+
tooltipTitle: t = void 0,
|
10
|
+
tooltipProps: a = void 0,
|
11
|
+
avatarProps: p = void 0,
|
12
12
|
onAvatarClick: s
|
13
13
|
}) {
|
14
|
-
const
|
15
|
-
|
14
|
+
const o = c(
|
15
|
+
l,
|
16
16
|
m,
|
17
17
|
p,
|
18
18
|
s,
|
19
|
-
|
19
|
+
r || !!t
|
20
20
|
);
|
21
|
-
return t ? /* @__PURE__ */ n(
|
22
|
-
|
21
|
+
return t ? /* @__PURE__ */ n(i, { enterDelay: 200, title: t, placement: "bottom", ...a ?? {}, children: o }) : r ? /* @__PURE__ */ n(
|
22
|
+
i,
|
23
23
|
{
|
24
24
|
enterDelay: 200,
|
25
|
-
title:
|
25
|
+
title: e ? e() : null,
|
26
26
|
placement: "bottom",
|
27
27
|
arrow: !1,
|
28
28
|
...a ?? {},
|
@@ -41,10 +41,10 @@ function d({
|
|
41
41
|
slots: {
|
42
42
|
transition: f
|
43
43
|
},
|
44
|
-
children:
|
44
|
+
children: o
|
45
45
|
}
|
46
|
-
) :
|
46
|
+
) : o;
|
47
47
|
}
|
48
48
|
export {
|
49
|
-
|
49
|
+
x as default
|
50
50
|
};
|