@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,13 +1,13 @@
|
|
1
1
|
import { jsxs as b, jsx as w } from "react/jsx-runtime";
|
2
2
|
import r from "prop-types";
|
3
3
|
import i from "lodash/isUndefined";
|
4
|
-
import x from "../Button
|
5
|
-
import { mergeProps as y } from "../Util
|
6
|
-
import { withDeprecated as v } from "../Util/deprecate
|
7
|
-
function s(d) {
|
4
|
+
import x from "../Button";
|
5
|
+
import { mergeProps as y } from "../Util";
|
6
|
+
import { withDeprecated as v } from "../Util/deprecate";
|
7
|
+
function s({ ...d }) {
|
8
8
|
const t = Object.assign({}, d);
|
9
9
|
i(t.gradient) && (t.gradient = ""), i(t.icon) && (t.icon = ""), i(t.text) && (t.text = ""), i(t.color) && (t.color = ""), i(t.border) && (t.border = ""), i(t.width) && (t.width = ""), i(t.theme) && (t.theme = "inherit"), i(t.variant) && (t.variant = "outlined"), i(t.size) && (t.size = "large");
|
10
|
-
const o = y(t, s), { href: f, icon: a, size: m, color: z, theme: g, variant:
|
10
|
+
const o = y(t, s), { href: f, icon: a, size: m, color: z, theme: g, variant: l, gradient: c, children: p, text: h, ...u } = o, e = {};
|
11
11
|
return c && (e.backgroundImage = c, e.borderColor = "transparent"), ["color", "border", "width"].forEach((n) => {
|
12
12
|
o[n] && (e[n] = o[n]);
|
13
13
|
}), /* @__PURE__ */ b(
|
@@ -16,14 +16,14 @@ function s(d) {
|
|
16
16
|
color: g,
|
17
17
|
href: f,
|
18
18
|
target: "_blank",
|
19
|
-
variant:
|
19
|
+
variant: l,
|
20
20
|
style: e,
|
21
21
|
size: m,
|
22
22
|
className: "action-button",
|
23
23
|
...u,
|
24
24
|
children: [
|
25
25
|
!!a && /* @__PURE__ */ w("i", { className: a }),
|
26
|
-
h ||
|
26
|
+
h || p
|
27
27
|
]
|
28
28
|
}
|
29
29
|
);
|
@@ -41,7 +41,7 @@ s.propTypes = {
|
|
41
41
|
size: r.string,
|
42
42
|
width: r.string
|
43
43
|
};
|
44
|
-
const
|
44
|
+
const q = v(s, { name: "ActionButton" });
|
45
45
|
export {
|
46
|
-
|
46
|
+
q as default
|
47
47
|
};
|
@@ -1,10 +1,9 @@
|
|
1
1
|
import { jsx as t, jsxs as d } from "react/jsx-runtime";
|
2
2
|
import { useState as f, useEffect as g } from "react";
|
3
3
|
import i from "prop-types";
|
4
|
-
import { green as m, blue as
|
5
|
-
import h from "../Logo
|
6
|
-
import { styled as
|
7
|
-
import { useTheme as x } from "@mui/material";
|
4
|
+
import { green as m, blue as c } from "@mui/material/colors";
|
5
|
+
import h from "../Logo";
|
6
|
+
import { styled as p, useTheme as x } from "../Theme";
|
8
7
|
function b({ messages: e = ["Loading data..."], interval: n = 3e3, ...s }) {
|
9
8
|
const [r, a] = f(0), { palette: l } = x();
|
10
9
|
return g(() => {
|
@@ -19,7 +18,7 @@ function b({ messages: e = ["Loading data..."], interval: n = 3e3, ...s }) {
|
|
19
18
|
/* @__PURE__ */ d("div", { className: "pm-loader-atoms", children: [
|
20
19
|
/* @__PURE__ */ t(h, { style: { transform: "scale(0.6)" }, showText: !1 }),
|
21
20
|
/* @__PURE__ */ t(o, { size: 56, orbitColor: m[500], atomColor: m[500], duration: 1 }),
|
22
|
-
/* @__PURE__ */ t(o, { size: 80, orbitColor:
|
21
|
+
/* @__PURE__ */ t(o, { size: 80, orbitColor: c[800], atomColor: c[800], duration: 1.5 }),
|
23
22
|
/* @__PURE__ */ t(o, { size: 100, orbitColor: l.grey[900], atomColor: l.grey[900] })
|
24
23
|
] })
|
25
24
|
] }) });
|
@@ -28,7 +27,7 @@ b.propTypes = {
|
|
28
27
|
interval: i.number,
|
29
28
|
messages: i.arrayOf(i.string.isRequired)
|
30
29
|
};
|
31
|
-
const y =
|
30
|
+
const y = p("div")`
|
32
31
|
&& {
|
33
32
|
box-sizing: border-box;
|
34
33
|
padding: 20px;
|
@@ -80,7 +79,7 @@ o.propTypes = {
|
|
80
79
|
atomColor: i.string.isRequired,
|
81
80
|
duration: i.number
|
82
81
|
};
|
83
|
-
const v =
|
82
|
+
const v = p("div")`
|
84
83
|
@keyframes orbit {
|
85
84
|
0% {
|
86
85
|
transform: rotate(0deg);
|
@@ -12,7 +12,7 @@ declare namespace CompactText {
|
|
12
12
|
namespace propTypes {
|
13
13
|
let startChars: PropTypes.Requireable<number>;
|
14
14
|
let endChars: PropTypes.Requireable<number>;
|
15
|
-
let children: PropTypes.
|
15
|
+
let children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
|
16
16
|
let showCopyButtonInTooltip: PropTypes.Requireable<boolean>;
|
17
17
|
}
|
18
18
|
}
|
@@ -2,10 +2,9 @@ import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
2
2
|
import { Children as f } from "react";
|
3
3
|
import n from "prop-types";
|
4
4
|
import { Tooltip as u, tooltipClasses as c, Box as s } from "@mui/material";
|
5
|
-
import { styled as y } from "../Theme
|
6
|
-
import "../ClickToCopy
|
7
|
-
|
8
|
-
const d = y(({ className: p, ...r }) => /* @__PURE__ */ e(u, { ...r, classes: { popper: p } }))({
|
5
|
+
import { styled as y } from "../Theme";
|
6
|
+
import { CopyButton as d } from "../ClickToCopy";
|
7
|
+
const C = y(({ className: p, ...r }) => /* @__PURE__ */ e(u, { ...r, classes: { popper: p } }))({
|
9
8
|
[`& .${c.tooltip}`]: {
|
10
9
|
maxWidth: 360,
|
11
10
|
wordBreak: "break-all"
|
@@ -15,7 +14,7 @@ function l({ children: p, ...r }) {
|
|
15
14
|
return f.map(p, (t) => typeof t == "string" ? /* @__PURE__ */ e(a, { ...r, children: t }) : t.props && t.props.children ? /* @__PURE__ */ e(t.type, { ...t.props, children: /* @__PURE__ */ e(l, { ...r, children: t.props.children }) }) : t);
|
16
15
|
}
|
17
16
|
function a({ startChars: p = 6, endChars: r = 6, children: o, showCopyButtonInTooltip: t = !1 }) {
|
18
|
-
return typeof o != "string" ? /* @__PURE__ */ e(l, { startChars: p, endChars: r, showCopyButtonInTooltip: t, children: o }) : /* @__PURE__ */ e(
|
17
|
+
return typeof o != "string" ? /* @__PURE__ */ e(l, { startChars: p, endChars: r, showCopyButtonInTooltip: t, children: o }) : /* @__PURE__ */ e(C, { title: /* @__PURE__ */ i(
|
19
18
|
s,
|
20
19
|
{
|
21
20
|
onClick: (m) => m.stopPropagation(),
|
@@ -26,7 +25,7 @@ function a({ startChars: p = 6, endChars: r = 6, children: o, showCopyButtonInTo
|
|
26
25
|
},
|
27
26
|
children: [
|
28
27
|
/* @__PURE__ */ e(s, { children: o }),
|
29
|
-
t && /* @__PURE__ */ e(
|
28
|
+
t && /* @__PURE__ */ e(d, { content: o, showTooltip: !1, style: { fontSize: 16, marginLeft: 4 } })
|
30
29
|
]
|
31
30
|
}
|
32
31
|
), placement: "top", children: /* @__PURE__ */ i("span", { children: [
|
@@ -38,7 +37,7 @@ function a({ startChars: p = 6, endChars: r = 6, children: o, showCopyButtonInTo
|
|
38
37
|
a.propTypes = {
|
39
38
|
startChars: n.number,
|
40
39
|
endChars: n.number,
|
41
|
-
children: n.node,
|
40
|
+
children: n.node.isRequired,
|
42
41
|
// 在 tooltip 中完整地址后显示复制按钮
|
43
42
|
showCopyButtonInTooltip: n.bool
|
44
43
|
};
|
@@ -6,9 +6,9 @@ import E from "copy-to-clipboard";
|
|
6
6
|
import w from "lodash/noop";
|
7
7
|
import F from "@arcblock/icons/lib/Copy";
|
8
8
|
import { useState as S, useRef as g, useImperativeHandle as A } from "react";
|
9
|
-
import { styled as H } from "../Theme
|
10
|
-
import { getFontSize as L } from "../Util
|
11
|
-
import M from "./compact-text
|
9
|
+
import { styled as H } from "../Theme";
|
10
|
+
import { getFontSize as L } from "../Util";
|
11
|
+
import M from "./compact-text";
|
12
12
|
const i = {
|
13
13
|
en: {
|
14
14
|
copy: "Click To Copy",
|
@@ -20,7 +20,7 @@ const i = {
|
|
20
20
|
}
|
21
21
|
};
|
22
22
|
function _({
|
23
|
-
ref: e,
|
23
|
+
ref: e = void 0,
|
24
24
|
...v
|
25
25
|
}) {
|
26
26
|
const {
|
package/lib/Address/index.js
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import
|
3
|
-
import s from "./responsive-did-address
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
2
|
+
import e from "./did-address";
|
3
|
+
import s from "./responsive-did-address";
|
4
4
|
function f({
|
5
|
-
ref: r,
|
6
|
-
responsive:
|
5
|
+
ref: r = void 0,
|
6
|
+
responsive: o = !0,
|
7
7
|
...d
|
8
8
|
}) {
|
9
|
-
return
|
9
|
+
return o ? /* @__PURE__ */ i(s, { ...d, ref: r }) : /* @__PURE__ */ i(e, { ...d, ref: r });
|
10
10
|
}
|
11
11
|
export {
|
12
12
|
f as default
|
@@ -2,20 +2,20 @@ import { jsxs as E, jsx as y } from "react/jsx-runtime";
|
|
2
2
|
import { useLatest as L, useDebounceFn as $ } from "ahooks";
|
3
3
|
import { useState as r, useRef as b, useImperativeHandle as j, useEffect as R } from "react";
|
4
4
|
import { Box as k } from "@mui/material";
|
5
|
-
import { styled as F } from "../Theme
|
6
|
-
import P from "./did-address
|
7
|
-
import { getFontSize as B } from "../Util
|
5
|
+
import { styled as F } from "../Theme";
|
6
|
+
import P from "./did-address";
|
7
|
+
import { getFontSize as B } from "../Util";
|
8
8
|
function Q({
|
9
|
-
ref: t,
|
10
|
-
style: A,
|
11
|
-
className: D,
|
9
|
+
ref: t = void 0,
|
10
|
+
style: A = {},
|
11
|
+
className: D = void 0,
|
12
12
|
component: l = "span",
|
13
13
|
size: d = 0,
|
14
14
|
...p
|
15
15
|
}) {
|
16
16
|
const [h, S] = r(!1), z = L(h), [f, m] = r(null), [u, w] = r(null), [a, C] = r(!0), { run: x } = $(() => C(!1), {
|
17
17
|
wait: 50
|
18
|
-
}), o = b(null),
|
18
|
+
}), o = b(null), i = b(null);
|
19
19
|
return j(
|
20
20
|
t,
|
21
21
|
() => new Proxy(
|
@@ -23,21 +23,21 @@ function Q({
|
|
23
23
|
{
|
24
24
|
get(c, s) {
|
25
25
|
var e;
|
26
|
-
return (e =
|
26
|
+
return (e = i.current) == null ? void 0 : e[s];
|
27
27
|
}
|
28
28
|
}
|
29
29
|
)
|
30
30
|
), R(() => {
|
31
|
-
var
|
32
|
-
const c = ((
|
31
|
+
var v, W;
|
32
|
+
const c = ((v = i.current) == null ? void 0 : v.offsetWidth) || 0;
|
33
33
|
let s = null, e = null;
|
34
|
-
return m(c), w((
|
35
|
-
var
|
36
|
-
!z.current && ((
|
34
|
+
return m(c), w((W = o.current) == null ? void 0 : W.offsetWidth), s = new ResizeObserver(() => {
|
35
|
+
var n, g;
|
36
|
+
!z.current && ((n = i.current) == null ? void 0 : n.offsetWidth) !== c && (m((g = i.current) == null ? void 0 : g.offsetWidth), x());
|
37
37
|
}), e = new ResizeObserver(() => {
|
38
|
-
var
|
39
|
-
w((
|
40
|
-
}), s.observe(
|
38
|
+
var n;
|
39
|
+
w((n = o.current) == null ? void 0 : n.offsetWidth);
|
40
|
+
}), s.observe(i.current.getEl()), e.observe(o.current), x(), () => {
|
41
41
|
s == null || s.disconnect(), e == null || e.disconnect();
|
42
42
|
};
|
43
43
|
}, []), R(() => {
|
@@ -66,7 +66,7 @@ function Q({
|
|
66
66
|
component: l,
|
67
67
|
inline: !0,
|
68
68
|
compact: h,
|
69
|
-
ref:
|
69
|
+
ref: i
|
70
70
|
}
|
71
71
|
),
|
72
72
|
a && /* @__PURE__ */ y("div", { style: { width: "100%", height: `${(d || 16) * 1.5}px` } })
|
package/lib/Alert/index.d.ts
CHANGED
package/lib/Alert/index.js
CHANGED
@@ -3,11 +3,11 @@ import o from "prop-types";
|
|
3
3
|
import { Typography as N } from "@mui/material";
|
4
4
|
import { blueGrey as j } from "@mui/material/colors";
|
5
5
|
import n from "lodash/isUndefined";
|
6
|
-
import E from "../Icon
|
7
|
-
import { mergeProps as O } from "../Util
|
8
|
-
import t from "../Colors
|
9
|
-
import { styled as w } from "../Theme
|
10
|
-
import { withDeprecated as
|
6
|
+
import E from "../Icon";
|
7
|
+
import { mergeProps as O } from "../Util";
|
8
|
+
import t from "../Colors";
|
9
|
+
import { styled as w } from "../Theme";
|
10
|
+
import { withDeprecated as T } from "../Util/deprecate";
|
11
11
|
const i = {
|
12
12
|
error: {
|
13
13
|
icon: "exclamation-circle",
|
@@ -37,7 +37,7 @@ const i = {
|
|
37
37
|
variant: "solid"
|
38
38
|
}
|
39
39
|
};
|
40
|
-
function a(l) {
|
40
|
+
function a({ ...l }) {
|
41
41
|
const r = Object.assign({}, l);
|
42
42
|
n(r.type) && (r.type = "tip"), n(r.className) && (r.className = ""), n(r.style) && (r.style = {}), n(r.variant) && (r.variant = "border");
|
43
43
|
const m = O(r, a, ["style"]), { type: s, children: p, style: d, className: f, variant: e, showIcon: g = !1, ...b } = m, { icon: y, color: u, backgroundColor: x, borderColor: v, variant: C } = i[s] || i.success, h = Object.assign(
|
@@ -48,7 +48,7 @@ function a(l) {
|
|
48
48
|
},
|
49
49
|
d
|
50
50
|
);
|
51
|
-
return /* @__PURE__ */ k(
|
51
|
+
return /* @__PURE__ */ k($, { ...b, className: `alert alert--${s} alert--${e} ${f}`.trim(), style: h, children: [
|
52
52
|
(e === "icon" || g) && /* @__PURE__ */ c(E, { className: "alert-icon", name: y, size: 24, color: u, variant: C }),
|
53
53
|
/* @__PURE__ */ c(N, { component: "div", className: "alert-content", children: p })
|
54
54
|
] });
|
@@ -60,7 +60,7 @@ a.propTypes = {
|
|
60
60
|
style: o.oneOfType([o.object, o.string]),
|
61
61
|
variant: o.oneOf(["border", "icon"])
|
62
62
|
};
|
63
|
-
const V =
|
63
|
+
const V = T(a, { name: "Alert", alternative: "@mui/material/Alert" }), $ = w("div")`
|
64
64
|
display: flex;
|
65
65
|
align-items: center;
|
66
66
|
font-size: 16px;
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { jsxs as b, jsx as o } from "react/jsx-runtime";
|
2
2
|
import { useState as l, useRef as $, useEffect as c } from "react";
|
3
|
-
import {
|
3
|
+
import { Skeleton as M } from "@mui/material";
|
4
4
|
import n from "prop-types";
|
5
|
-
import
|
6
|
-
import
|
7
|
-
import { styled as R } from "../Theme
|
5
|
+
import E from "react-lottie-player";
|
6
|
+
import F from "lodash/noop";
|
7
|
+
import { styled as P, useTheme as R } from "../Theme";
|
8
8
|
function W({
|
9
9
|
animationData: m = null,
|
10
10
|
size: s = 256,
|
@@ -18,11 +18,11 @@ function W({
|
|
18
18
|
increaseSpeed: x = 0,
|
19
19
|
...I
|
20
20
|
}) {
|
21
|
-
const g =
|
21
|
+
const g = R(), [d, N] = l(0), [y, k] = l(h), [w, A] = l(0), [O, S] = l(null), [j, p] = l(!m), C = $((/* @__PURE__ */ new Date()).getTime());
|
22
22
|
Array.isArray(r) || (r = [r]), c(() => {
|
23
23
|
m || (p(!0), (async () => {
|
24
24
|
try {
|
25
|
-
const e = await (g.palette.mode === "dark" ? import("./dark-animation.json
|
25
|
+
const e = await (g.palette.mode === "dark" ? import("./dark-animation.json") : import("./default-animation.json"));
|
26
26
|
S(e.default || e), p(!1);
|
27
27
|
} catch (e) {
|
28
28
|
console.error("Failed to load animation:", e), p(!1);
|
@@ -40,7 +40,7 @@ function W({
|
|
40
40
|
};
|
41
41
|
}, [r, f]), c(() => {
|
42
42
|
if (!a.length)
|
43
|
-
return
|
43
|
+
return F;
|
44
44
|
const t = setTimeout(() => {
|
45
45
|
let e = d + 1;
|
46
46
|
e >= a.length && (e = 0), N(e);
|
@@ -60,8 +60,8 @@ function W({
|
|
60
60
|
return w === t ? e = "show-message" : w < t && (e = "message-after"), e;
|
61
61
|
};
|
62
62
|
return /* @__PURE__ */ b(q, { ...I, children: [
|
63
|
-
j ? /* @__PURE__ */ o("div", { style: { width: s, height: s, display: "flex", justifyContent: "center", alignItems: "center" }, children: /* @__PURE__ */ o(
|
64
|
-
|
63
|
+
j ? /* @__PURE__ */ o("div", { style: { width: s, height: s, display: "flex", justifyContent: "center", alignItems: "center" }, children: /* @__PURE__ */ o(M, { variant: "rounded", width: s * 0.4, height: s * 0.4 }) }) : /* @__PURE__ */ o(
|
64
|
+
E,
|
65
65
|
{
|
66
66
|
loop: !0,
|
67
67
|
animationData: m || O,
|
@@ -108,7 +108,7 @@ W.propTypes = {
|
|
108
108
|
maybeDuration: n.number,
|
109
109
|
increaseSpeed: n.number
|
110
110
|
};
|
111
|
-
const q =
|
111
|
+
const q = P("div")`
|
112
112
|
display: flex;
|
113
113
|
justify-content: center;
|
114
114
|
align-items: center;
|
package/lib/Async/index.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
import { jsx as
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
2
2
|
import m from "react";
|
3
3
|
import { CircularProgress as p } from "@mui/material";
|
4
|
-
function d(
|
4
|
+
function d(e, n = "default", s = !0) {
|
5
5
|
class a extends m.Component {
|
6
6
|
constructor(t) {
|
7
7
|
super(t), this.state = {
|
@@ -10,11 +10,11 @@ function d(r, n = "default", s = !0) {
|
|
10
10
|
};
|
11
11
|
}
|
12
12
|
componentDidMount() {
|
13
|
-
|
13
|
+
e().then((t) => this.setState({ Component: t[n] })).catch((t) => this.setState({ error: `Failed to load async component: ${t.message}` }));
|
14
14
|
}
|
15
15
|
render() {
|
16
16
|
const { Component: t, error: o } = this.state;
|
17
|
-
return o || (t ? /* @__PURE__ */
|
17
|
+
return o || (t ? /* @__PURE__ */ r(t, { ...this.props }) : s ? /* @__PURE__ */ r(p, { color: "primary" }) : null);
|
18
18
|
}
|
19
19
|
}
|
20
20
|
return a;
|
@@ -5,20 +5,20 @@ function g(t) {
|
|
5
5
|
for (let o = 0; o < t.length; o++)
|
6
6
|
n[o % 4] = (n[o % 4] << 5) - n[o % 4] + t.charCodeAt(o);
|
7
7
|
}
|
8
|
-
function
|
8
|
+
function i() {
|
9
9
|
const t = n[0] ^ n[0] << 11;
|
10
10
|
return n[0] = n[1], n[1] = n[2], n[2] = n[3], n[3] = n[3] ^ n[3] >> 19 ^ t ^ t >> 8, (n[3] >>> 0) / (1 << 31 >>> 0);
|
11
11
|
}
|
12
12
|
function d() {
|
13
|
-
const t = Math.floor(
|
13
|
+
const t = Math.floor(i() * 360), o = `${i() * 60 + 40}%`, e = `${(i() + i() + i() + i()) * 25}%`;
|
14
14
|
return `hsl(${t},${o},${e})`;
|
15
15
|
}
|
16
16
|
function w(t) {
|
17
|
-
const o = t, e = t,
|
18
|
-
for (let
|
17
|
+
const o = t, e = t, h = Math.ceil(o / 2), f = o - h, r = [];
|
18
|
+
for (let a = 0; a < e; a++) {
|
19
19
|
let c = [];
|
20
|
-
for (let s = 0; s <
|
21
|
-
c[s] = Math.floor(
|
20
|
+
for (let s = 0; s < h; s++)
|
21
|
+
c[s] = Math.floor(i() * 2.3);
|
22
22
|
const l = c.slice(0, f);
|
23
23
|
l.reverse(), c = c.concat(l);
|
24
24
|
for (let s = 0; s < c.length; s++)
|
@@ -26,23 +26,23 @@ function w(t) {
|
|
26
26
|
}
|
27
27
|
return r;
|
28
28
|
}
|
29
|
-
function M(t, o, e,
|
30
|
-
const r = document.createElement("canvas"),
|
31
|
-
r.width = r.height =
|
29
|
+
function M(t, o, e, h, f) {
|
30
|
+
const r = document.createElement("canvas"), a = Math.sqrt(t.length);
|
31
|
+
r.width = r.height = a * e;
|
32
32
|
const c = r.getContext("2d");
|
33
|
-
c.fillStyle =
|
33
|
+
c.fillStyle = h, c.fillRect(0, 0, r.width, r.height), c.fillStyle = o;
|
34
34
|
for (let l = 0; l < t.length; l++) {
|
35
|
-
const s = Math.floor(l /
|
35
|
+
const s = Math.floor(l / a), u = l % a;
|
36
36
|
c.fillStyle = t[l] === 1 ? o : f, t[l] && c.fillRect(u * e, s * e, e, e);
|
37
37
|
}
|
38
38
|
return r;
|
39
39
|
}
|
40
40
|
function v(t) {
|
41
41
|
t = t || {};
|
42
|
-
const o = t.size || 8, e = t.scale || 4,
|
43
|
-
g(
|
44
|
-
const f = t.color || d(), r = t.bgcolor || d(),
|
45
|
-
return M(c, f, e, r,
|
42
|
+
const o = t.size || 8, e = t.scale || 4, h = t.seed || Math.floor(Math.random() * 10 ** 16).toString(16);
|
43
|
+
g(h);
|
44
|
+
const f = t.color || d(), r = t.bgcolor || d(), a = t.spotcolor || d(), c = w(o);
|
45
|
+
return M(c, f, e, r, a);
|
46
46
|
}
|
47
47
|
const y = { createIcon: v };
|
48
48
|
export {
|
package/lib/Avatar/index.d.ts
CHANGED
@@ -41,7 +41,7 @@ export { Avatar as AvatarProps };
|
|
41
41
|
* @param {AvatarProps} props
|
42
42
|
* @returns {JSX.Element}
|
43
43
|
*/
|
44
|
-
declare function Avatar(rawProps:
|
44
|
+
declare function Avatar({ ...rawProps }: AvatarProps): JSX.Element;
|
45
45
|
declare namespace Avatar {
|
46
46
|
export namespace propTypes_1 {
|
47
47
|
let did: PropTypes.Requireable<string>;
|
package/lib/Avatar/index.js
CHANGED
@@ -5,12 +5,12 @@ import { ErrorBoundary as z } from "react-error-boundary";
|
|
5
5
|
import { Shape as D } from "@arcblock/did-motif";
|
6
6
|
import { Box as u } from "@mui/material";
|
7
7
|
import n from "lodash/isUndefined";
|
8
|
-
import m from "../Img
|
9
|
-
import { mergeProps as E, isEthereumDid as R } from "../Util
|
10
|
-
import M from "./did-motif
|
11
|
-
import T from "./etherscan-blockies
|
12
|
-
import { DID_PREFIX as f } from "../Util/constant
|
13
|
-
function d(s) {
|
8
|
+
import m from "../Img";
|
9
|
+
import { mergeProps as E, isEthereumDid as R } from "../Util";
|
10
|
+
import M from "./did-motif";
|
11
|
+
import T from "./etherscan-blockies";
|
12
|
+
import { DID_PREFIX as f } from "../Util/constant";
|
13
|
+
function d({ ...s }) {
|
14
14
|
const r = Object.assign({}, s);
|
15
15
|
n(r.did) && (r.did = ""), n(r.size) && (r.size = 36), n(r.variant) && (r.variant = "default"), n(r.animation) && (r.animation = !1), n(r.shape) && (r.shape = ""), n(r.blockiesPadding) && (r.blockiesPadding = !0), n(r.responsive) && (r.responsive = !1);
|
16
16
|
const [c, h] = k(!1), g = E(r, d, []), { did: i = "", size: e, src: p, variant: b, animation: v, shape: x, blockiesPadding: y, responsive: w, ...o } = g, l = P(() => R(i) ? T.createIcon({
|
package/lib/Badge/index.js
CHANGED
@@ -2,10 +2,10 @@ import { jsx as c } from "react/jsx-runtime";
|
|
2
2
|
import r from "prop-types";
|
3
3
|
import { Typography as u } from "@mui/material";
|
4
4
|
import n from "lodash/isUndefined";
|
5
|
-
import o from "../Colors
|
6
|
-
import { mergeProps as b } from "../Util
|
7
|
-
import { withDeprecated as w } from "../Util/deprecate
|
8
|
-
import { styled as x } from "../Theme
|
5
|
+
import o from "../Colors";
|
6
|
+
import { mergeProps as b } from "../Util";
|
7
|
+
import { withDeprecated as w } from "../Util/deprecate";
|
8
|
+
import { styled as x } from "../Theme";
|
9
9
|
const s = {
|
10
10
|
error: {
|
11
11
|
color: o.common.white,
|
@@ -28,7 +28,7 @@ const s = {
|
|
28
28
|
backgroundColor: o.grey[900]
|
29
29
|
}
|
30
30
|
};
|
31
|
-
function i(t) {
|
31
|
+
function i({ ...t }) {
|
32
32
|
const e = Object.assign({}, t);
|
33
33
|
n(e.type) && (e.type = "primary"), n(e.content) && (e.content = ""), n(e.className) && (e.className = ""), n(e.style) && (e.style = {});
|
34
34
|
const a = b(e, i, ["style"]), { type: m, content: p, children: l, style: y, className: d, forwardedRef: f, ...g } = a, h = Object.assign(s[m] || s.primary, y);
|
package/lib/Blocklet/blocklet.js
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
import { jsx as o, jsxs as r } from "react/jsx-runtime";
|
2
2
|
import { isValidElement as f } from "react";
|
3
3
|
import t from "prop-types";
|
4
|
-
import {
|
5
|
-
import
|
6
|
-
import P from "../Button
|
7
|
-
import A from "../Img
|
8
|
-
import { styled as D } from "../Theme
|
9
|
-
import { strippedString as g } from "./utils
|
10
|
-
const F =
|
4
|
+
import { useMediaQuery as S, Typography as n, CircularProgress as C } from "@mui/material";
|
5
|
+
import I from "../Avatar";
|
6
|
+
import P from "../Button";
|
7
|
+
import A from "../Img";
|
8
|
+
import { styled as B, useTheme as D } from "../Theme";
|
9
|
+
import { strippedString as g } from "./utils";
|
10
|
+
const F = B("div")`
|
11
11
|
&.arcblock-blocklet {
|
12
12
|
padding: ${(e) => e.theme.spacing(2)} ${(e) => e.theme.spacing(2)} 0
|
13
13
|
${(e) => e.theme.spacing(2)};
|
@@ -135,9 +135,9 @@ function H({
|
|
135
135
|
}) {
|
136
136
|
const h = (k, M = () => !1) => (i, ...T) => {
|
137
137
|
M() ? (i.preventDefault(), i.stopPropagation()) : k instanceof Function && (i.preventDefault(), i.stopPropagation(), k(...T));
|
138
|
-
}, w = h(b, () => !!(m || d || a)), y =
|
138
|
+
}, w = h(b, () => !!(m || d || a)), y = D(), $ = S(y.breakpoints.up("sm")), N = h(v), z = $ ? 80 : 64;
|
139
139
|
return /* @__PURE__ */ o(F, { className: `${_} arcblock-blocklet`, ...x, children: /* @__PURE__ */ r("div", { className: "arcblock-blocklet__content", onClick: N, children: [
|
140
|
-
s ? /* @__PURE__ */ o("div", { className: "arcblock-blocklet__cover", children: /* @__PURE__ */ o(A, { src: s }) }) : c && /* @__PURE__ */ o("div", { className: "arcblock-blocklet__cover", children: /* @__PURE__ */ o(
|
140
|
+
s ? /* @__PURE__ */ o("div", { className: "arcblock-blocklet__cover", children: /* @__PURE__ */ o(A, { src: s }) }) : c && /* @__PURE__ */ o("div", { className: "arcblock-blocklet__cover", children: /* @__PURE__ */ o(I, { did: c, size: z }) }),
|
141
141
|
/* @__PURE__ */ r("div", { className: "arcblock-blocklet__info", children: [
|
142
142
|
/* @__PURE__ */ r("div", { className: "arcblock-blocklet__text", children: [
|
143
143
|
f(e) ? /* @__PURE__ */ o(n, { component: "h3", variant: "h3", className: "arcblock-blocklet__title", children: e }) : /* @__PURE__ */ o(
|
@@ -186,7 +186,7 @@ function H({
|
|
186
186
|
textAlign: "center"
|
187
187
|
},
|
188
188
|
children: [
|
189
|
-
a && /* @__PURE__ */ o(
|
189
|
+
a && /* @__PURE__ */ o(C, { size: 15, style: { marginRight: 3, color: "inherit" } }),
|
190
190
|
u
|
191
191
|
]
|
192
192
|
}
|
package/lib/Blocklet/index.js
CHANGED
@@ -1,7 +1,8 @@
|
|
1
|
-
import { default as
|
2
|
-
import
|
1
|
+
import { default as f, strippedString as p } from "./utils";
|
2
|
+
import "./blocklet";
|
3
|
+
import { default as l } from "./blocklet";
|
3
4
|
export {
|
4
|
-
|
5
|
-
|
6
|
-
|
5
|
+
f as ActionButton,
|
6
|
+
l as default,
|
7
|
+
p as strippedString
|
7
8
|
};
|
package/lib/Blocklet/utils.js
CHANGED
@@ -8,7 +8,7 @@ declare const Consumer: import('react').Consumer<{
|
|
8
8
|
masterBlocklet: Blocklet | null;
|
9
9
|
}>;
|
10
10
|
declare function BlockletProvider({ children, baseUrl, loading, }: {
|
11
|
-
children
|
11
|
+
children: React.ReactNode;
|
12
12
|
/**
|
13
13
|
* baseUrl 为 blocklet origin + blocklet prefix
|
14
14
|
*/
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { jsx as B } from "react/jsx-runtime";
|
2
2
|
import { useMemoizedFn as d, useAsyncEffect as h } from "ahooks";
|
3
3
|
import { createContext as D, useState as c, use as p } from "react";
|
4
|
-
import { getBlockletData as r, getFederatedEnabled as w, getMaster as b } from "../Util/federated
|
4
|
+
import { getBlockletData as r, getFederatedEnabled as w, getMaster as b } from "../Util/federated";
|
5
5
|
const s = D({
|
6
6
|
blocklet: null,
|
7
7
|
masterBlocklet: null
|