@arcblock/ux 2.10.24 → 2.10.25
Sign up to get free protection for your applications and to get access to all the features.
- package/babel.config.es.js +1 -0
- package/lib/ActionButton/index.js +1 -1
- package/lib/ActivityIndicator/index.d.ts +34 -0
- package/lib/ActivityIndicator/index.js +1 -1
- package/lib/Address/compact-text.js +1 -1
- package/lib/Address/did-address.js +1 -1
- package/lib/Address/index.js +1 -1
- package/lib/Address/responsive-did-address.js +1 -1
- package/lib/Alert/index.d.ts +12 -0
- package/lib/Alert/index.js +1 -1
- package/lib/AnimationWaiter/index.js +1 -1
- package/lib/Async/index.js +1 -1
- package/lib/Avatar/did-motif.d.ts +29 -0
- package/lib/Avatar/did-motif.js +1 -1
- package/lib/Avatar/etherscan-blockies.d.ts +5 -0
- package/lib/Avatar/index.d.ts +64 -0
- package/lib/Avatar/index.js +1 -1
- package/lib/Badge/index.d.ts +12 -0
- package/lib/Badge/index.js +1 -1
- package/lib/Blocklet/blocklet.d.ts +84 -0
- package/lib/Blocklet/blocklet.js +1 -1
- package/lib/Blocklet/index.d.ts +5 -0
- package/lib/Blocklet/utils.d.ts +3 -0
- package/lib/BlockletContext/index.js +1 -1
- package/lib/BlockletNFT/index.js +1 -1
- package/lib/Button/index.d.ts +3 -0
- package/lib/Button/wrap.d.ts +27 -0
- package/lib/Button/wrap.js +4 -3
- package/lib/CardSelector/index.js +1 -1
- package/lib/Center/index.js +1 -1
- package/lib/ClickToCopy/copy-button.js +1 -1
- package/lib/ClickToCopy/index.js +1 -1
- package/lib/CodeBlock/index.js +1 -1
- package/lib/Colors/index.d.ts +2 -0
- package/lib/Colors/themes/default.d.ts +76 -0
- package/lib/Colors/themes/temp.d.ts +36 -0
- package/lib/ContactForm/index.js +1 -1
- package/lib/CookieConsent/index.js +1 -1
- package/lib/CountDown/index.js +1 -1
- package/lib/DID/index.js +1 -1
- package/lib/Datatable/CustomToolbar.d.ts +37 -0
- package/lib/Datatable/CustomToolbar.js +1 -1
- package/lib/Datatable/DatatableContext.d.ts +4 -0
- package/lib/Datatable/DatatableContext.js +1 -1
- package/lib/Datatable/TableSearch.d.ts +28 -0
- package/lib/Datatable/TableSearch.js +1 -1
- package/lib/Datatable/index.d.ts +53 -0
- package/lib/Datatable/index.js +11 -3
- package/lib/Datatable/utils.d.ts +5 -0
- package/lib/Dialog/confirm.d.ts +86 -0
- package/lib/Dialog/confirm.js +23 -13
- package/lib/Dialog/dialog.d.ts +115 -0
- package/lib/Dialog/dialog.js +12 -7
- package/lib/Dialog/index.d.ts +3 -0
- package/lib/Dialog/use-confirm.d.ts +8 -0
- package/lib/Dialog/use-confirm.js +1 -1
- package/lib/DidLogo/index.js +1 -1
- package/lib/Earth/index.js +1 -1
- package/lib/Empty/index.d.ts +39 -0
- package/lib/Empty/index.js +1 -1
- package/lib/ErrorBoundary/fallback.js +1 -1
- package/lib/Footer/index.js +1 -1
- package/lib/Header/auto-hidden.js +1 -1
- package/lib/Header/header.js +1 -1
- package/lib/Header/responsive-header.js +1 -1
- package/lib/Icon/image.js +1 -1
- package/lib/Icon/index.d.ts +2 -0
- package/lib/Icon/index.js +1 -1
- package/lib/Img/index.d.ts +77 -0
- package/lib/Img/index.js +2 -1
- package/lib/InfoRow/index.js +1 -1
- package/lib/Layout/dashboard/external-link.js +1 -1
- package/lib/Layout/dashboard/full-page.js +1 -1
- package/lib/Layout/dashboard/index.js +1 -1
- package/lib/Layout/dashboard/sidebar.js +1 -1
- package/lib/Layout/dashboard-legacy/header.js +1 -1
- package/lib/Layout/dashboard-legacy/index.js +1 -1
- package/lib/Layout/dashboard-legacy/sidebar.js +1 -1
- package/lib/Layout/index.js +1 -1
- package/lib/LoadingMask/index.js +1 -1
- package/lib/Locale/context.js +1 -1
- package/lib/Locale/selector.js +1 -1
- package/lib/Logo/index.d.ts +42 -0
- package/lib/Logo/index.js +1 -1
- package/lib/Metric/index.js +1 -1
- package/lib/NFTDisplay/aspect-ratio-container.js +1 -1
- package/lib/NFTDisplay/broken.js +1 -1
- package/lib/NFTDisplay/index.js +1 -1
- package/lib/NFTDisplay/loading.js +1 -1
- package/lib/NFTDisplay/svg-embedder/img.js +1 -1
- package/lib/NFTDisplay/svg-embedder/inline-svg.js +1 -1
- package/lib/NavMenu/nav-menu.js +1 -1
- package/lib/PageScroller/index.js +1 -1
- package/lib/PageScroller/story/FullPage.js +1 -1
- package/lib/PageScroller/story/PageContain.js +1 -1
- package/lib/Passport/passport.js +1 -1
- package/lib/PoweredByArcBlock/index.js +1 -1
- package/lib/PricingTable/PricingPlan.js +1 -1
- package/lib/PricingTable/index.js +1 -1
- package/lib/QRCode/index.js +1 -1
- package/lib/RelativeTime/index.js +1 -1
- package/lib/Result/common.js +1 -1
- package/lib/Result/index.js +1 -1
- package/lib/Result/result.js +1 -1
- package/lib/Screenshot/BaseScreenshot/index.js +1 -1
- package/lib/Screenshot/index.js +1 -1
- package/lib/SessionBlocklet/index.js +1 -1
- package/lib/SessionUser/components/logged-in.js +1 -1
- package/lib/SessionUser/components/session-user-item.js +1 -1
- package/lib/SessionUser/components/session-user-switch.js +1 -1
- package/lib/SessionUser/components/un-login.js +1 -1
- package/lib/SessionUser/components/user-info.js +1 -1
- package/lib/SessionUser/index.js +1 -1
- package/lib/Spinner/index.js +1 -1
- package/lib/SplitButton/index.js +8 -8
- package/lib/Success/index.js +1 -1
- package/lib/Switch/index.d.ts +31 -0
- package/lib/Switch/index.js +1 -1
- package/lib/Tabs/index.js +1 -1
- package/lib/Tag/index.d.ts +14 -0
- package/lib/Tag/index.js +11 -7
- package/lib/TextCollapse/index.js +1 -1
- package/lib/Theme/index.d.ts +14 -0
- package/lib/Theme/index.js +9 -0
- package/lib/Theme/theme-provider.d.ts +25 -0
- package/lib/Theme/theme-provider.js +1 -1
- package/lib/Theme/theme.d.ts +17 -0
- package/lib/Theme/theme.js +21 -3
- package/lib/Toast/index.d.ts +11 -0
- package/lib/Toast/index.js +2 -1
- package/lib/Typography/index.js +1 -1
- package/lib/Util/constant.d.ts +33 -0
- package/lib/Util/deprecate.d.ts +5 -0
- package/lib/Util/deprecate.js +1 -1
- package/lib/Util/index.d.ts +81 -0
- package/lib/Video/index.js +1 -1
- package/lib/Wallet/Action.js +1 -1
- package/lib/Wallet/Download.js +1 -1
- package/lib/Wallet/Open.js +1 -1
- package/lib/WalletOSIcon/index.js +1 -1
- package/lib/WebWalletSWKeeper/index.js +1 -1
- package/lib/WechatPrompt/index.js +1 -1
- package/lib/withTheme/index.js +1 -1
- package/lib/withTracker/error_boundary.js +1 -1
- package/lib/withTracker/index.js +1 -1
- package/package.json +13 -7
- package/src/Button/wrap.js +3 -2
- package/src/Datatable/index.jsx +9 -2
- package/src/Dialog/confirm.jsx +22 -12
- package/src/Dialog/dialog.jsx +11 -6
- package/src/SplitButton/index.js +7 -7
- package/src/Tag/index.js +10 -6
- package/src/Theme/index.js +8 -0
- package/src/Theme/theme.js +20 -3
package/babel.config.es.js
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
1
2
|
import PropTypes from 'prop-types';
|
2
3
|
import Button from '../Button';
|
3
4
|
import { mergeProps } from '../Util';
|
@@ -25,7 +26,6 @@ import { withDeprecated } from '../Util/deprecate';
|
|
25
26
|
* @param {ActionButtonProps} props
|
26
27
|
* @returns {JSX.Element}
|
27
28
|
*/
|
28
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
29
29
|
function ActionButton(props) {
|
30
30
|
/** @type {ActionButtonProps & {}} */
|
31
31
|
const newProps = mergeProps(props, ActionButton);
|
@@ -0,0 +1,34 @@
|
|
1
|
+
/**
|
2
|
+
* ActivityIndicator is used when we want to tell the user the request they made on the UI will take time.
|
3
|
+
* @typedef {{
|
4
|
+
* interval?: number;
|
5
|
+
* messages: string[];
|
6
|
+
* } & import('react').ComponentPropsWithoutRef<"div"> } ActivityIndicatorProps
|
7
|
+
*/
|
8
|
+
/**
|
9
|
+
* @description ActivityIndicator is used when we want to tell the user the request they made on the UI will take time.
|
10
|
+
* @param {ActivityIndicatorProps} props
|
11
|
+
* @returns {JSX.Element}
|
12
|
+
*/
|
13
|
+
declare function ActivityIndicator({ messages, interval, ...rest }: ActivityIndicatorProps): JSX.Element;
|
14
|
+
declare namespace ActivityIndicator {
|
15
|
+
namespace propTypes {
|
16
|
+
let interval: PropTypes.Requireable<number>;
|
17
|
+
let messages: PropTypes.Requireable<string[]>;
|
18
|
+
}
|
19
|
+
namespace defaultProps {
|
20
|
+
let interval_1: number;
|
21
|
+
export { interval_1 as interval };
|
22
|
+
let messages_1: string[];
|
23
|
+
export { messages_1 as messages };
|
24
|
+
}
|
25
|
+
}
|
26
|
+
export default ActivityIndicator;
|
27
|
+
/**
|
28
|
+
* ActivityIndicator is used when we want to tell the user the request they made on the UI will take time.
|
29
|
+
*/
|
30
|
+
export type ActivityIndicatorProps = {
|
31
|
+
interval?: number;
|
32
|
+
messages: string[];
|
33
|
+
} & import("react").ComponentPropsWithoutRef<"div">;
|
34
|
+
import PropTypes from 'prop-types';
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
1
2
|
import { useEffect, useState } from 'react';
|
2
3
|
import PropTypes from 'prop-types';
|
3
4
|
import { green, blue } from '@mui/material/colors';
|
@@ -18,7 +19,6 @@ import { styled } from '../Theme';
|
|
18
19
|
* @param {ActivityIndicatorProps} props
|
19
20
|
* @returns {JSX.Element}
|
20
21
|
*/
|
21
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
22
22
|
export default function ActivityIndicator({
|
23
23
|
messages,
|
24
24
|
interval,
|
@@ -1,10 +1,10 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
1
2
|
import { Children } from 'react';
|
2
3
|
import PropTypes from 'prop-types';
|
3
4
|
import Tooltip, { tooltipClasses } from '@mui/material/Tooltip';
|
4
5
|
import Box from '@mui/material/Box';
|
5
6
|
import { styled } from '../Theme';
|
6
7
|
import { CopyButton } from '../ClickToCopy';
|
7
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
8
8
|
const StyledTooltip = styled(({
|
9
9
|
className,
|
10
10
|
...props
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
1
2
|
import React, { useRef, useState, forwardRef } from 'react';
|
2
3
|
import PropTypes from 'prop-types';
|
3
4
|
import '@fontsource/ubuntu-mono/400.css';
|
@@ -9,7 +10,6 @@ import noop from 'lodash/noop';
|
|
9
10
|
import { styled } from '../Theme';
|
10
11
|
import { getFontSize } from '../Util';
|
11
12
|
import CompactText from './compact-text';
|
12
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
13
13
|
const translations = {
|
14
14
|
en: {
|
15
15
|
copy: 'Click To Copy',
|
package/lib/Address/index.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
1
2
|
import PropTypes from 'prop-types';
|
2
3
|
import DidAddress from './did-address';
|
3
4
|
import ResponsiveDidAddress from './responsive-did-address';
|
4
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
5
5
|
export default function DidAddressWrapper({
|
6
6
|
responsive,
|
7
7
|
...rest
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
1
2
|
import { useState, createRef, useEffect, useRef } from 'react';
|
2
3
|
import PropTypes from 'prop-types';
|
3
4
|
import { useSize } from 'ahooks';
|
@@ -14,7 +15,6 @@ import DidAddress from './did-address';
|
|
14
15
|
* - 监听容器宽度变化, 当容器宽度变化时, 对比容器宽度和 did address full-width, => 切换 compact 模式
|
15
16
|
* - TODO: 初始化时, 在确定是否应该以 compact 模式渲染前, 隐藏显示, 避免闪烁问题
|
16
17
|
*/
|
17
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
18
18
|
export default function ResponsiveDidAddress({
|
19
19
|
style,
|
20
20
|
className,
|
@@ -0,0 +1,12 @@
|
|
1
|
+
declare const _default: (props: any) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
2
|
+
export default _default;
|
3
|
+
/**
|
4
|
+
* Alert notification component
|
5
|
+
*/
|
6
|
+
export type AlertProps = {
|
7
|
+
type?: "error" | "warning" | "success" | "tip";
|
8
|
+
children: any;
|
9
|
+
className?: string;
|
10
|
+
style?: object | string;
|
11
|
+
variant?: "border" | "icon";
|
12
|
+
} & import("react").ComponentPropsWithoutRef<"div">;
|
package/lib/Alert/index.js
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
1
2
|
import PropTypes from 'prop-types';
|
2
3
|
import Typography from '@mui/material/Typography';
|
3
4
|
import { blueGrey } from '@mui/material/colors';
|
@@ -6,7 +7,6 @@ import { mergeProps } from '../Util';
|
|
6
7
|
import colors from '../Colors';
|
7
8
|
import { styled } from '../Theme';
|
8
9
|
import { withDeprecated } from '../Util/deprecate';
|
9
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
10
10
|
const types = {
|
11
11
|
error: {
|
12
12
|
icon: 'exclamation-circle',
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
1
2
|
import { useState, useEffect, useRef } from 'react';
|
2
3
|
import PropTypes from 'prop-types';
|
3
4
|
import Lottie from 'react-lottie-player';
|
@@ -20,7 +21,6 @@ import { styled } from '../Theme';
|
|
20
21
|
* @param {Number} increaseSpeed 在 maybeDuration 时间下增加的速度,默认为0(不增加速度)
|
21
22
|
* @returns element
|
22
23
|
*/
|
23
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
24
24
|
export default function AnimationWaiter({
|
25
25
|
animationData,
|
26
26
|
size,
|
package/lib/Async/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
1
2
|
import * as React from 'react';
|
2
3
|
import CircularProgress from '@mui/material/CircularProgress';
|
3
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
4
4
|
export default function LoadAsyncComponent(importComponent, key = 'default', showProgress = true) {
|
5
5
|
class AsyncComponent extends React.Component {
|
6
6
|
constructor(props) {
|
@@ -0,0 +1,29 @@
|
|
1
|
+
export default DIDMotif;
|
2
|
+
declare function DIDMotif({ did, size, animation, shape, responsive, ...rest }: {
|
3
|
+
[x: string]: any;
|
4
|
+
did: any;
|
5
|
+
size: any;
|
6
|
+
animation: any;
|
7
|
+
shape: any;
|
8
|
+
responsive: any;
|
9
|
+
}): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
10
|
+
declare namespace DIDMotif {
|
11
|
+
namespace propTypes {
|
12
|
+
let did: PropTypes.Validator<string>;
|
13
|
+
let size: PropTypes.Requireable<number>;
|
14
|
+
let animation: PropTypes.Requireable<boolean>;
|
15
|
+
let responsive: PropTypes.Requireable<boolean>;
|
16
|
+
let shape: PropTypes.Requireable<number>;
|
17
|
+
}
|
18
|
+
namespace defaultProps {
|
19
|
+
let size_1: number;
|
20
|
+
export { size_1 as size };
|
21
|
+
let animation_1: boolean;
|
22
|
+
export { animation_1 as animation };
|
23
|
+
let responsive_1: boolean;
|
24
|
+
export { responsive_1 as responsive };
|
25
|
+
let shape_1: any;
|
26
|
+
export { shape_1 as shape };
|
27
|
+
}
|
28
|
+
}
|
29
|
+
import PropTypes from 'prop-types';
|
package/lib/Avatar/did-motif.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
1
2
|
import { useRef, useLayoutEffect } from 'react';
|
2
3
|
import PropTypes from 'prop-types';
|
3
4
|
import { update } from '@arcblock/did-motif';
|
4
5
|
import { Box } from '@mui/material';
|
5
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
6
6
|
function DIDMotif({
|
7
7
|
did,
|
8
8
|
size,
|
@@ -0,0 +1,64 @@
|
|
1
|
+
declare function AvatarWithErrorBoundary(props: any): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
2
|
+
declare namespace AvatarWithErrorBoundary {
|
3
|
+
import propTypes = Avatar.propTypes;
|
4
|
+
export { propTypes };
|
5
|
+
}
|
6
|
+
export default AvatarWithErrorBoundary;
|
7
|
+
/**
|
8
|
+
* Avatar component
|
9
|
+
*/
|
10
|
+
export type AvatarProps = {
|
11
|
+
did: string;
|
12
|
+
size?: number;
|
13
|
+
variant?: "circle" | "rounded" | "default";
|
14
|
+
animation?: boolean;
|
15
|
+
shape?: "" | "rectangle" | "square" | "hexagon" | "circle";
|
16
|
+
src?: string;
|
17
|
+
responsive?: boolean;
|
18
|
+
};
|
19
|
+
/**
|
20
|
+
* Avatar component
|
21
|
+
* @typedef {{
|
22
|
+
* did: string;
|
23
|
+
* size?: number;
|
24
|
+
* variant?: 'circle' | 'rounded' | 'default';
|
25
|
+
* animation?: boolean;
|
26
|
+
* shape?: '' | 'rectangle' | 'square' | 'hexagon' | 'circle';
|
27
|
+
* src?: string;
|
28
|
+
* responsive?: boolean;
|
29
|
+
* }} AvatarProps
|
30
|
+
*/
|
31
|
+
/**
|
32
|
+
* Avatar component
|
33
|
+
* @see 参考: https://github.com/blocklet/block-explorer/issues/478#issuecomment-1038954976
|
34
|
+
* @param {AvatarProps} props
|
35
|
+
* @returns {JSX.Element}
|
36
|
+
*/
|
37
|
+
declare function Avatar(props: AvatarProps): JSX.Element;
|
38
|
+
declare namespace Avatar {
|
39
|
+
export namespace propTypes_1 {
|
40
|
+
let did: PropTypes.Validator<string>;
|
41
|
+
let size: PropTypes.Requireable<number>;
|
42
|
+
let variant: PropTypes.Requireable<string>;
|
43
|
+
let animation: PropTypes.Requireable<boolean>;
|
44
|
+
let shape: PropTypes.Requireable<string>;
|
45
|
+
let blockiesPadding: PropTypes.Requireable<boolean>;
|
46
|
+
let responsive: PropTypes.Requireable<boolean>;
|
47
|
+
}
|
48
|
+
export { propTypes_1 as propTypes };
|
49
|
+
export namespace defaultProps {
|
50
|
+
let size_1: number;
|
51
|
+
export { size_1 as size };
|
52
|
+
let variant_1: string;
|
53
|
+
export { variant_1 as variant };
|
54
|
+
let animation_1: boolean;
|
55
|
+
export { animation_1 as animation };
|
56
|
+
let blockiesPadding_1: boolean;
|
57
|
+
export { blockiesPadding_1 as blockiesPadding };
|
58
|
+
let shape_1: string;
|
59
|
+
export { shape_1 as shape };
|
60
|
+
let responsive_1: boolean;
|
61
|
+
export { responsive_1 as responsive };
|
62
|
+
}
|
63
|
+
}
|
64
|
+
import PropTypes from 'prop-types';
|
package/lib/Avatar/index.js
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
1
2
|
/* eslint-disable react/no-unused-prop-types */
|
2
3
|
import { useState, useMemo } from 'react';
|
3
4
|
import PropTypes from 'prop-types';
|
@@ -29,7 +30,6 @@ import { DID_PREFIX } from '../Util/constant';
|
|
29
30
|
* @param {AvatarProps} props
|
30
31
|
* @returns {JSX.Element}
|
31
32
|
*/
|
32
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
33
33
|
function Avatar(props) {
|
34
34
|
const [imgError, setImgError] = useState(false);
|
35
35
|
const newProps = mergeProps(props, Avatar, []);
|
@@ -0,0 +1,12 @@
|
|
1
|
+
declare const _default: (props: any) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
2
|
+
export default _default;
|
3
|
+
/**
|
4
|
+
* Badge component to display notification badge
|
5
|
+
*/
|
6
|
+
export type BadgeProps = {
|
7
|
+
children: import("react").ReactNode;
|
8
|
+
content?: string;
|
9
|
+
type?: "error" | "warning" | "success" | "primary" | "reverse";
|
10
|
+
className?: string;
|
11
|
+
style?: object | string;
|
12
|
+
} & import("@mui/material").TypographyProps;
|
package/lib/Badge/index.js
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
1
2
|
import { forwardRef } from 'react';
|
2
3
|
import PropTypes from 'prop-types';
|
3
4
|
import Typography from '@mui/material/Typography';
|
@@ -5,7 +6,6 @@ import colors from '../Colors';
|
|
5
6
|
import { mergeProps } from '../Util';
|
6
7
|
import { withDeprecated } from '../Util/deprecate';
|
7
8
|
import { styled } from '../Theme';
|
8
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
9
9
|
const types = {
|
10
10
|
error: {
|
11
11
|
color: colors.common.white,
|
@@ -0,0 +1,84 @@
|
|
1
|
+
/**
|
2
|
+
* BlockletStore component
|
3
|
+
* @typedef {{
|
4
|
+
* title?: string | JSX.Element;
|
5
|
+
* did?: string;
|
6
|
+
* description?: string | JSX.Element;
|
7
|
+
* cover?: string;
|
8
|
+
* version?: string;
|
9
|
+
* buttonText?: string;
|
10
|
+
* buttonDisabled?: boolean;
|
11
|
+
* buttonLoading?: boolean;
|
12
|
+
* button?: JSX.Element;
|
13
|
+
* onButtonClick?: Function;
|
14
|
+
* onMainClick?: Function;
|
15
|
+
* className?: string;
|
16
|
+
* } & import('react').ComponentPropsWithoutRef<"div"> } BlockletStoreProps
|
17
|
+
*/
|
18
|
+
/**
|
19
|
+
* BlockletStore component
|
20
|
+
* @param {BlockletStoreProps} props
|
21
|
+
* @returns {JSX.Element}
|
22
|
+
*/
|
23
|
+
declare function BlockletStore({ title, did, description, cover, version, button, buttonText, buttonDisabled, buttonLoading, onButtonClick, onMainClick, className, ...rest }: BlockletStoreProps): JSX.Element;
|
24
|
+
declare namespace BlockletStore {
|
25
|
+
namespace propTypes {
|
26
|
+
let title: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
27
|
+
let did: PropTypes.Requireable<string>;
|
28
|
+
let description: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
29
|
+
let cover: PropTypes.Requireable<string>;
|
30
|
+
let buttonText: PropTypes.Requireable<string>;
|
31
|
+
let buttonDisabled: PropTypes.Requireable<boolean>;
|
32
|
+
let buttonLoading: PropTypes.Requireable<boolean>;
|
33
|
+
let button: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
34
|
+
let version: PropTypes.Requireable<string>;
|
35
|
+
let onButtonClick: PropTypes.Requireable<(...args: any[]) => any>;
|
36
|
+
let onMainClick: PropTypes.Requireable<(...args: any[]) => any>;
|
37
|
+
let className: PropTypes.Requireable<string>;
|
38
|
+
}
|
39
|
+
namespace defaultProps {
|
40
|
+
let title_1: string;
|
41
|
+
export { title_1 as title };
|
42
|
+
let description_1: string;
|
43
|
+
export { description_1 as description };
|
44
|
+
let cover_1: any;
|
45
|
+
export { cover_1 as cover };
|
46
|
+
let did_1: any;
|
47
|
+
export { did_1 as did };
|
48
|
+
let buttonText_1: string;
|
49
|
+
export { buttonText_1 as buttonText };
|
50
|
+
let buttonDisabled_1: boolean;
|
51
|
+
export { buttonDisabled_1 as buttonDisabled };
|
52
|
+
let buttonLoading_1: boolean;
|
53
|
+
export { buttonLoading_1 as buttonLoading };
|
54
|
+
let button_1: any;
|
55
|
+
export { button_1 as button };
|
56
|
+
let version_1: any;
|
57
|
+
export { version_1 as version };
|
58
|
+
let onButtonClick_1: any;
|
59
|
+
export { onButtonClick_1 as onButtonClick };
|
60
|
+
let onMainClick_1: any;
|
61
|
+
export { onMainClick_1 as onMainClick };
|
62
|
+
let className_1: any;
|
63
|
+
export { className_1 as className };
|
64
|
+
}
|
65
|
+
}
|
66
|
+
export default BlockletStore;
|
67
|
+
/**
|
68
|
+
* BlockletStore component
|
69
|
+
*/
|
70
|
+
export type BlockletStoreProps = {
|
71
|
+
title?: string | JSX.Element;
|
72
|
+
did?: string;
|
73
|
+
description?: string | JSX.Element;
|
74
|
+
cover?: string;
|
75
|
+
version?: string;
|
76
|
+
buttonText?: string;
|
77
|
+
buttonDisabled?: boolean;
|
78
|
+
buttonLoading?: boolean;
|
79
|
+
button?: JSX.Element;
|
80
|
+
onButtonClick?: Function;
|
81
|
+
onMainClick?: Function;
|
82
|
+
className?: string;
|
83
|
+
} & import("react").ComponentPropsWithoutRef<"div">;
|
84
|
+
import PropTypes from 'prop-types';
|
package/lib/Blocklet/blocklet.js
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
1
2
|
/* eslint-disable react/no-danger */
|
2
3
|
import { isValidElement } from 'react';
|
3
4
|
import PropTypes from 'prop-types';
|
@@ -9,7 +10,6 @@ import Button from '../Button';
|
|
9
10
|
import Img from '../Img';
|
10
11
|
import { useTheme, styled } from '../Theme';
|
11
12
|
import { strippedString } from './utils';
|
12
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
13
13
|
const Div = styled('div')`
|
14
14
|
&.arcblock-blocklet {
|
15
15
|
padding: ${props => props.theme.spacing(2)} ${props => props.theme.spacing(2)} 0
|
@@ -0,0 +1,3 @@
|
|
1
|
+
export default ActionButton;
|
2
|
+
export function strippedString(originalString?: string): string;
|
3
|
+
declare const ActionButton: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
@@ -1,7 +1,7 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
1
2
|
import PropTypes from 'prop-types';
|
2
3
|
import { useMemoizedFn, useAsyncEffect } from 'ahooks';
|
3
4
|
import { createContext, useContext, useState } from 'react';
|
4
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
5
5
|
const BlockletContext = /*#__PURE__*/createContext();
|
6
6
|
const {
|
7
7
|
Provider,
|
package/lib/BlockletNFT/index.js
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
1
2
|
import { useRef } from 'react';
|
2
3
|
import PropTypes from 'prop-types';
|
3
4
|
import Portal from '@mui/material/Portal';
|
@@ -16,7 +17,6 @@ import { useTheme, styled } from '../Theme';
|
|
16
17
|
* @param {*} digits
|
17
18
|
* @returns
|
18
19
|
*/
|
19
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
20
20
|
function prettySize(_size, digits = 1) {
|
21
21
|
let size = _size;
|
22
22
|
const list = ['', 'k', 'm', 'b'];
|
@@ -0,0 +1,27 @@
|
|
1
|
+
/**
|
2
|
+
* @typedef {import('@mui/material').ButtonProps} MuiButtonProps
|
3
|
+
* @typedef {{
|
4
|
+
* rounded?: boolean,
|
5
|
+
* loading?: boolean,
|
6
|
+
* forwardedRef?: import('react').ForwardedRef<any>,
|
7
|
+
* color?: MuiButtonProps['color'] | 'reverse' | 'did'
|
8
|
+
* } & Omit<MuiButtonProps, 'color'>} ButtonProps
|
9
|
+
*/
|
10
|
+
/**
|
11
|
+
* @typedef {React.ForwardRefExoticComponent<React.PropsWithoutRef<ButtonProps> & React.RefAttributes<HTMLButtonElement>>} ButtonComponent
|
12
|
+
*/
|
13
|
+
/**
|
14
|
+
* @description
|
15
|
+
* @export
|
16
|
+
* @param {import('@mui/material').ExtendButtonBase<import('@mui/material').ButtonTypeMap<{}, "button">>} BaseComponent
|
17
|
+
* @return {ButtonComponent}
|
18
|
+
*/
|
19
|
+
export default function _default(BaseComponent: import("@mui/material").ExtendButtonBase<import("@mui/material").ButtonTypeMap<{}, "button">>): ButtonComponent;
|
20
|
+
export type MuiButtonProps = import("@mui/material").ButtonProps;
|
21
|
+
export type ButtonProps = {
|
22
|
+
rounded?: boolean;
|
23
|
+
loading?: boolean;
|
24
|
+
forwardedRef?: import("react").ForwardedRef<any>;
|
25
|
+
color?: MuiButtonProps["color"] | "reverse" | "did";
|
26
|
+
} & Omit<MuiButtonProps, "color">;
|
27
|
+
export type ButtonComponent = React.ForwardRefExoticComponent<React.PropsWithoutRef<ButtonProps> & React.RefAttributes<HTMLButtonElement>>;
|
package/lib/Button/wrap.js
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
1
2
|
/* eslint-disable prefer-destructuring */
|
2
3
|
/* eslint-disable func-names */
|
3
4
|
import { forwardRef } from 'react';
|
@@ -5,7 +6,6 @@ import PropTypes from 'prop-types';
|
|
5
6
|
import CircularProgress from '@mui/material/CircularProgress';
|
6
7
|
import colors from '../Colors';
|
7
8
|
import { mergeProps } from '../Util';
|
8
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
9
9
|
const extendedColors = {
|
10
10
|
did: {
|
11
11
|
contained: {
|
@@ -30,12 +30,13 @@ const extendedColors = {
|
|
30
30
|
};
|
31
31
|
|
32
32
|
/**
|
33
|
+
* @typedef {import('@mui/material').ButtonProps} MuiButtonProps
|
33
34
|
* @typedef {{
|
34
35
|
* rounded?: boolean,
|
35
36
|
* loading?: boolean,
|
36
37
|
* forwardedRef?: import('react').ForwardedRef<any>,
|
37
|
-
* color?: '
|
38
|
-
* } &
|
38
|
+
* color?: MuiButtonProps['color'] | 'reverse' | 'did'
|
39
|
+
* } & Omit<MuiButtonProps, 'color'>} ButtonProps
|
39
40
|
*/
|
40
41
|
|
41
42
|
/**
|
@@ -1,8 +1,8 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
1
2
|
import { useState, useEffect, useRef } from 'react';
|
2
3
|
import styled from '@emotion/styled';
|
3
4
|
import PropTypes from 'prop-types';
|
4
5
|
import noop from 'lodash/noop';
|
5
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
6
6
|
export default function CardSelector({
|
7
7
|
list,
|
8
8
|
width,
|
package/lib/Center/index.js
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
1
2
|
import PropTypes from 'prop-types';
|
2
3
|
import { styled } from '../Theme';
|
3
4
|
|
@@ -6,7 +7,6 @@ import { styled } from '../Theme';
|
|
6
7
|
* @param {string} relative 容器相对尺寸,默认相对屏幕(screen),可设置为父容器(parent)
|
7
8
|
* @returns react component element
|
8
9
|
*/
|
9
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
10
10
|
export default function Center({
|
11
11
|
children,
|
12
12
|
relative
|
@@ -1,10 +1,10 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
1
2
|
import PropTypes from 'prop-types';
|
2
3
|
import Tooltip from '@mui/material/Tooltip';
|
3
4
|
import { green } from '@mui/material/colors';
|
4
5
|
import CopyIcon from '@mui/icons-material/ContentCopy';
|
5
6
|
import CheckIcon from '@mui/icons-material/Check';
|
6
7
|
import useCopy from './hook';
|
7
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
8
8
|
export default function CopyButton({
|
9
9
|
content,
|
10
10
|
locale,
|
package/lib/ClickToCopy/index.js
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
1
2
|
import PropTypes from 'prop-types';
|
2
3
|
import { useSize } from 'ahooks';
|
3
4
|
import Tooltip from '@mui/material/Tooltip';
|
@@ -5,7 +6,6 @@ import useCopy from './hook';
|
|
5
6
|
import Toast, { ToastProvider } from '../Toast';
|
6
7
|
import { mergeProps } from '../Util';
|
7
8
|
import { styled } from '../Theme';
|
8
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
9
9
|
export { default as CopyButton } from './copy-button';
|
10
10
|
const Container = styled('span')`
|
11
11
|
display: inline;
|
package/lib/CodeBlock/index.js
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
1
2
|
/* eslint-disable react/no-danger */
|
2
3
|
import { useState } from 'react';
|
3
4
|
import PropTypes from 'prop-types';
|
@@ -24,7 +25,6 @@ import CheckIcon from '@mui/icons-material/Check';
|
|
24
25
|
import colors from '../Colors';
|
25
26
|
import { styled } from '../Theme';
|
26
27
|
import LightBox from './LightBox';
|
27
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
28
28
|
hljs.registerLanguage('javascript', javascript);
|
29
29
|
hljs.registerLanguage('js', javascript);
|
30
30
|
hljs.registerLanguage('jsx', javascript);
|