@arcblock/ux 2.10.66 → 2.10.68
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/Address/did-address.d.ts +6 -5
- package/lib/Address/index.d.ts +1 -1
- package/lib/Avatar/index.d.ts +10 -8
- package/lib/Avatar/index.js +6 -4
- package/lib/Blocklet/blocklet.d.ts +4 -4
- package/lib/Blocklet/blocklet.js +2 -2
- package/lib/BlockletContext/index.d.ts +3 -3
- package/lib/BlockletNFT/index.d.ts +6 -6
- package/lib/BlockletNFT/index.js +3 -3
- package/lib/BlockletV2/blocklet.d.ts +2 -2
- package/lib/Button/wrap.d.ts +4 -4
- package/lib/Button/wrap.js +2 -2
- package/lib/CardSelector/index.js +0 -1
- package/lib/Center/index.d.ts +1 -1
- package/lib/ClickToCopy/copy-button.d.ts +5 -4
- package/lib/ClickToCopy/copy-button.js +0 -1
- package/lib/ClickToCopy/hook.d.ts +3 -8
- package/lib/ClickToCopy/index.d.ts +6 -4
- package/lib/CodeBlock/index.d.ts +3 -1
- package/lib/CookieConsent/index.d.ts +8 -29
- package/lib/CookieConsent/index.js +3 -17
- package/lib/CountDown/index.d.ts +21 -25
- package/lib/CountDown/index.js +12 -11
- package/lib/DID/index.d.ts +9 -8
- package/lib/Datatable/index.d.ts +5 -5
- package/lib/Datatable/index.js +5 -5
- package/lib/Dialog/confirm.d.ts +6 -6
- package/lib/Dialog/confirm.js +3 -3
- package/lib/Dialog/types.d.ts +1 -1
- package/lib/DidLogo/index.d.ts +5 -25
- package/lib/DidLogo/index.js +4 -15
- package/lib/DriftBot/index.d.ts +13 -19
- package/lib/DriftBot/index.js +5 -6
- package/lib/Earth/index.d.ts +28 -10
- package/lib/Earth/index.js +12 -52
- package/lib/Earth/util.d.ts +10 -5
- package/lib/Earth/util.js +1 -0
- package/lib/ErrorBoundary/fallback.d.ts +12 -19
- package/lib/ErrorBoundary/fallback.js +2 -19
- package/lib/ErrorBoundary/index.d.ts +1 -1
- package/lib/Footer/index.d.ts +17 -24
- package/lib/Footer/index.js +2 -11
- package/lib/Header/header.d.ts +2 -2
- package/lib/Icon/image.d.ts +3 -2
- package/lib/Icon/index.d.ts +6 -4
- package/lib/Img/index.d.ts +1 -1
- package/lib/Img/index.js +1 -1
- package/lib/InfoRow/index.d.ts +9 -32
- package/lib/InfoRow/index.js +10 -23
- package/lib/Layout/dashboard/external-link.d.ts +13 -14
- package/lib/Layout/dashboard/external-link.js +5 -22
- package/lib/Layout/dashboard/full-page.d.ts +19 -11
- package/lib/Layout/dashboard/full-page.js +2 -6
- package/lib/Layout/dashboard/index.d.ts +20 -39
- package/lib/Layout/dashboard/index.js +10 -38
- package/lib/Layout/dashboard/sidebar.d.ts +17 -20
- package/lib/Layout/dashboard/sidebar.js +3 -16
- package/lib/Layout/dashboard-legacy/header.d.ts +10 -36
- package/lib/Layout/dashboard-legacy/header.js +5 -24
- package/lib/Layout/dashboard-legacy/index.d.ts +17 -56
- package/lib/Layout/dashboard-legacy/index.js +12 -41
- package/lib/Layout/dashboard-legacy/sidebar.d.ts +15 -26
- package/lib/Layout/dashboard-legacy/sidebar.js +5 -15
- package/lib/Layout/index.d.ts +17 -56
- package/lib/Layout/index.js +24 -50
- package/lib/LoadingMask/index.d.ts +8 -31
- package/lib/LoadingMask/index.js +2 -18
- package/lib/Locale/browser-lang.d.ts +4 -1
- package/lib/Locale/browser-lang.js +8 -3
- package/lib/Locale/context.d.ts +18 -8
- package/lib/Locale/context.js +1 -1
- package/lib/Locale/languages.d.ts +9 -55
- package/lib/Locale/selector.d.ts +10 -26
- package/lib/Locale/selector.js +8 -25
- package/lib/Locale/util.d.ts +4 -3
- package/lib/Locale/util.js +0 -1
- package/lib/Logo/index.d.ts +9 -40
- package/lib/Logo/index.js +88 -46
- package/lib/Metric/index.d.ts +9 -31
- package/lib/Metric/index.js +5 -20
- package/lib/NFTDisplay/aspect-ratio-container.d.ts +5 -12
- package/lib/NFTDisplay/aspect-ratio-container.js +0 -5
- package/lib/NFTDisplay/broken.d.ts +3 -13
- package/lib/NFTDisplay/broken.js +80 -10
- package/lib/NFTDisplay/displayApi.d.ts +1 -1
- package/lib/NFTDisplay/index.d.ts +28 -6
- package/lib/NFTDisplay/index.js +17 -51
- package/lib/NFTDisplay/svg-embedder/img.d.ts +8 -23
- package/lib/NFTDisplay/svg-embedder/img.js +3 -17
- package/lib/NFTDisplay/svg-embedder/inline-svg.d.ts +7 -13
- package/lib/NFTDisplay/svg-embedder/inline-svg.js +1 -8
- package/lib/NavMenu/nav-menu.d.ts +2 -0
- package/lib/NavMenu/nav-menu.js +0 -1
- package/lib/PageScroller/index.d.ts +14 -13
- package/lib/PageScroller/index.js +12 -37
- package/lib/PageScroller/usePrevValue.d.ts +1 -1
- package/lib/PageScroller/usePrevValue.js +1 -2
- package/lib/Passport/index.d.ts +1 -1
- package/lib/Passport/passport.d.ts +10 -30
- package/lib/Passport/passport.js +5 -19
- package/lib/PoweredByArcBlock/index.d.ts +4 -14
- package/lib/PoweredByArcBlock/index.js +1 -8
- package/lib/PricingTable/PricingPlan.d.ts +11 -9
- package/lib/PricingTable/PricingPlan.js +0 -4
- package/lib/PricingTable/index.d.ts +5 -3
- package/lib/PricingTable/index.js +1 -5
- package/lib/QRCode/index.d.ts +11 -22
- package/lib/QRCode/index.js +1 -15
- package/lib/RelativeTime/index.d.ts +12 -40
- package/lib/RelativeTime/index.js +7 -27
- package/lib/Result/common.d.ts +26 -45
- package/lib/Result/common.js +2 -4
- package/lib/Result/index.d.ts +5 -18
- package/lib/Result/index.js +1 -9
- package/lib/Result/result.d.ts +7 -29
- package/lib/Result/result.js +2 -17
- package/lib/Result/translations.d.ts +2 -54
- package/lib/Screenshot/BaseScreenshot/index.d.ts +7 -24
- package/lib/Screenshot/BaseScreenshot/index.js +2 -15
- package/lib/Screenshot/BaseScreenshot/shells/Macbook.d.ts +25 -19
- package/lib/Screenshot/BaseScreenshot/shells/Phone.d.ts +25 -19
- package/lib/Screenshot/index.d.ts +84 -28
- package/lib/Screenshot/index.js +14 -43
- package/lib/SessionBlocklet/index.d.ts +6 -19
- package/lib/SessionBlocklet/index.js +3 -14
- package/lib/SessionManager/index.d.ts +1 -1
- package/lib/SessionPermission/index.d.ts +9 -17
- package/lib/SessionPermission/index.js +3 -11
- package/lib/SessionUser/components/logged-in.d.ts +9 -31
- package/lib/SessionUser/components/logged-in.js +13 -29
- package/lib/SessionUser/components/session-user-item.d.ts +8 -1
- package/lib/SessionUser/components/session-user-item.js +2 -12
- package/lib/SessionUser/components/session-user-switch.d.ts +9 -21
- package/lib/SessionUser/components/session-user-switch.js +3 -15
- package/lib/SessionUser/components/un-login.d.ts +7 -23
- package/lib/SessionUser/components/un-login.js +4 -16
- package/lib/SessionUser/components/user-info.d.ts +12 -29
- package/lib/SessionUser/components/user-info.js +4 -19
- package/lib/SessionUser/index.d.ts +7 -30
- package/lib/SessionUser/index.js +5 -26
- package/lib/SessionUser/libs/translation.d.ts +2 -31
- package/lib/SessionUser/libs/translation.js +1 -0
- package/lib/SessionUser/libs/utils.d.ts +10 -9
- package/lib/Sparkline/index.d.ts +22 -1
- package/lib/Sparkline/index.js +25 -17
- package/lib/Spinner/index.d.ts +6 -1
- package/lib/Spinner/index.js +4 -11
- package/lib/Success/index.d.ts +5 -21
- package/lib/Success/index.js +4 -16
- package/lib/Tabs/index.d.ts +12 -26
- package/lib/Tabs/index.js +7 -37
- package/lib/TextCollapse/index.d.ts +10 -10
- package/lib/TextCollapse/index.js +4 -21
- package/lib/Theme/index.js +0 -2
- package/lib/Theme/theme-provider.d.ts +1 -1
- package/lib/Theme/theme.d.ts +4 -1
- package/lib/Theme/theme.js +1 -2
- package/lib/Typography/index.d.ts +5 -24
- package/lib/Typography/index.js +5 -17
- package/lib/Util/index.d.ts +11 -6
- package/lib/Util/index.js +6 -0
- package/lib/Video/index.d.ts +12 -16
- package/lib/Video/index.js +0 -14
- package/lib/Wallet/Action.d.ts +13 -18
- package/lib/Wallet/Action.js +0 -7
- package/lib/Wallet/Download.d.ts +24 -30
- package/lib/Wallet/Download.js +201 -18
- package/lib/Wallet/Open.d.ts +5 -15
- package/lib/Wallet/Open.js +5 -11
- package/lib/WalletOSIcon/index.d.ts +6 -25
- package/lib/WalletOSIcon/index.js +3 -16
- package/lib/WebWalletSWKeeper/index.d.ts +8 -20
- package/lib/WebWalletSWKeeper/index.js +14 -19
- package/lib/WechatPrompt/index.js +2 -0
- package/lib/global.d.ts +15 -0
- package/lib/type.d.ts +12 -3
- package/lib/withTheme/index.d.ts +8 -6
- package/lib/withTracker/index.d.ts +1 -1
- package/lib/withTracker/index.js +3 -0
- package/package.json +9 -5
- package/src/Address/did-address.tsx +7 -6
- package/src/Address/index.tsx +1 -1
- package/src/Avatar/index.jsx +6 -4
- package/src/Blocklet/blocklet.jsx +2 -2
- package/src/BlockletContext/index.tsx +3 -3
- package/src/BlockletNFT/index.jsx +3 -3
- package/src/BlockletV2/blocklet.tsx +2 -2
- package/src/Button/wrap.jsx +2 -2
- package/src/CardSelector/index.tsx +0 -1
- package/src/Center/index.tsx +1 -1
- package/src/ClickToCopy/copy-button.tsx +4 -4
- package/src/ClickToCopy/hook.ts +3 -2
- package/src/ClickToCopy/index.tsx +6 -5
- package/src/CodeBlock/index.tsx +3 -1
- package/src/CookieConsent/{index.jsx → index.tsx} +16 -19
- package/src/CountDown/{index.jsx → index.tsx} +30 -16
- package/src/DID/index.tsx +9 -8
- package/src/Datatable/index.jsx +5 -5
- package/src/Dialog/confirm.jsx +3 -3
- package/src/Dialog/types.d.ts +1 -1
- package/src/DidLogo/{index.jsx → index.tsx} +7 -14
- package/src/DriftBot/{index.jsx → index.tsx} +13 -11
- package/src/Earth/{index.jsx → index.tsx} +94 -66
- package/src/Earth/{util.js → util.ts} +20 -17
- package/src/ErrorBoundary/{fallback.jsx → fallback.tsx} +20 -21
- package/src/Footer/{index.jsx → index.tsx} +17 -14
- package/src/Header/header.tsx +2 -3
- package/src/Header/responsive-header.tsx +0 -1
- package/src/Icon/image.tsx +3 -3
- package/src/Icon/index.tsx +7 -4
- package/src/Img/index.jsx +1 -1
- package/src/InfoRow/{index.jsx → index.tsx} +32 -25
- package/src/Layout/dashboard/external-link.tsx +46 -0
- package/src/Layout/dashboard/{full-page.jsx → full-page.tsx} +20 -9
- package/src/Layout/dashboard/{index.jsx → index.tsx} +42 -44
- package/src/Layout/dashboard/{sidebar.jsx → sidebar.tsx} +23 -20
- package/src/Layout/dashboard-legacy/{header.jsx → header.tsx} +16 -26
- package/src/Layout/dashboard-legacy/{index.jsx → index.tsx} +32 -46
- package/src/Layout/dashboard-legacy/{sidebar.jsx → sidebar.tsx} +27 -19
- package/src/Layout/{index.jsx → index.tsx} +41 -47
- package/src/LoadingMask/{index.jsx → index.tsx} +17 -19
- package/src/Locale/{browser-lang.js → browser-lang.ts} +9 -7
- package/src/Locale/context.tsx +18 -11
- package/src/Locale/{languages.js → languages.ts} +1 -1
- package/src/Locale/{selector.jsx → selector.tsx} +32 -29
- package/src/Locale/{util.js → util.ts} +9 -2
- package/src/Logo/index.tsx +58 -0
- package/src/Metric/{index.jsx → index.tsx} +23 -18
- package/src/NFTDisplay/{aspect-ratio-container.jsx → aspect-ratio-container.tsx} +9 -7
- package/src/NFTDisplay/{broken.jsx → broken.tsx} +7 -12
- package/src/NFTDisplay/{displayApi.js → displayApi.ts} +4 -4
- package/src/NFTDisplay/{index.jsx → index.tsx} +59 -64
- package/src/NFTDisplay/svg-embedder/{img.jsx → img.tsx} +10 -18
- package/src/NFTDisplay/svg-embedder/{inline-svg.jsx → inline-svg.tsx} +8 -9
- package/src/NavMenu/nav-menu.tsx +2 -3
- package/src/PageScroller/{index.jsx → index.tsx} +40 -53
- package/src/PageScroller/{usePrevValue.js → usePrevValue.ts} +2 -3
- package/src/Passport/{passport.jsx → passport.tsx} +22 -19
- package/src/PoweredByArcBlock/{index.jsx → index.tsx} +6 -11
- package/src/PricingTable/{PricingPlan.jsx → PricingPlan.tsx} +15 -5
- package/src/PricingTable/{index.jsx → index.tsx} +9 -6
- package/src/QRCode/{index.jsx → index.tsx} +13 -17
- package/src/RelativeTime/{index.jsx → index.tsx} +24 -24
- package/src/Result/{common.jsx → common.tsx} +17 -13
- package/src/Result/index.tsx +30 -0
- package/src/Result/{result.jsx → result.tsx} +8 -17
- package/src/Result/{translations.js → translations.ts} +3 -1
- package/src/Screenshot/BaseScreenshot/{index.jsx → index.tsx} +9 -15
- package/src/Screenshot/BaseScreenshot/shells/{Macbook.jsx → Macbook.tsx} +3 -1
- package/src/Screenshot/BaseScreenshot/shells/{Phone.jsx → Phone.tsx} +3 -1
- package/src/Screenshot/{index.jsx → index.tsx} +60 -54
- package/src/SessionBlocklet/{index.jsx → index.tsx} +8 -14
- package/src/SessionPermission/index.tsx +25 -0
- package/src/SessionUser/components/{logged-in.jsx → logged-in.tsx} +49 -31
- package/src/SessionUser/components/session-user-item.tsx +97 -0
- package/src/SessionUser/components/{session-user-switch.jsx → session-user-switch.tsx} +16 -21
- package/src/SessionUser/components/{un-login.jsx → un-login.tsx} +10 -15
- package/src/SessionUser/components/{user-info.jsx → user-info.tsx} +16 -22
- package/src/SessionUser/index.tsx +26 -0
- package/src/SessionUser/libs/{translation.js → translation.ts} +3 -1
- package/src/SessionUser/libs/utils.ts +39 -0
- package/src/Sparkline/{index.jsx → index.tsx} +38 -22
- package/src/Spinner/index.tsx +20 -0
- package/src/Success/{index.jsx → index.tsx} +7 -13
- package/src/Tabs/{index.jsx → index.tsx} +26 -40
- package/src/TextCollapse/{index.jsx → index.tsx} +26 -21
- package/src/Theme/index.ts +0 -1
- package/src/Theme/theme-provider.tsx +1 -1
- package/src/Theme/theme.ts +6 -3
- package/src/Typography/{index.jsx → index.tsx} +19 -22
- package/src/Util/index.ts +14 -8
- package/src/Video/{index.jsx → index.tsx} +7 -10
- package/src/Wallet/{Action.jsx → Action.tsx} +16 -12
- package/src/Wallet/{Download.jsx → Download.tsx} +25 -21
- package/src/Wallet/{Open.jsx → Open.tsx} +8 -11
- package/src/WalletOSIcon/{index.jsx → index.tsx} +8 -16
- package/src/WebWalletSWKeeper/{index.jsx → index.tsx} +21 -24
- package/src/WechatPrompt/{index.jsx → index.tsx} +1 -0
- package/src/global.d.ts +15 -0
- package/src/type.d.ts +12 -3
- package/src/withTheme/{index.jsx → index.tsx} +12 -2
- package/src/withTracker/{index.jsx → index.tsx} +6 -4
- package/src/Layout/dashboard/external-link.jsx +0 -47
- package/src/Logo/index.jsx +0 -66
- package/src/Result/index.jsx +0 -33
- package/src/SessionPermission/index.jsx +0 -28
- package/src/SessionUser/components/session-user-item.jsx +0 -93
- package/src/SessionUser/index.jsx +0 -38
- package/src/SessionUser/libs/utils.js +0 -37
- package/src/Spinner/index.jsx +0 -21
- /package/src/ErrorBoundary/{index.jsx → index.ts} +0 -0
- /package/src/NFTDisplay/{loading.jsx → loading.tsx} +0 -0
- /package/src/Passport/{index.jsx → index.ts} +0 -0
- /package/src/SessionManager/{index.jsx → index.tsx} +0 -0
@@ -1,14 +1,8 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
declare function InlineSvg({ svg, ...rest }: {
|
6
|
-
[x: string]: any;
|
7
|
-
svg: any;
|
8
|
-
}): import("react/jsx-runtime").JSX.Element;
|
9
|
-
declare namespace InlineSvg {
|
10
|
-
namespace propTypes {
|
11
|
-
let svg: PropTypes.Validator<string>;
|
12
|
-
}
|
1
|
+
import { type SxProps } from '@mui/material';
|
2
|
+
export interface InlineSvgProps extends React.HTMLAttributes<HTMLSpanElement> {
|
3
|
+
svg: string;
|
4
|
+
sx?: SxProps;
|
13
5
|
}
|
14
|
-
|
6
|
+
/** inline svg 的方式嵌入 svg, 使用 shadow DOM 避免样式污染 */
|
7
|
+
declare function InlineSvg({ svg, ...rest }: InlineSvgProps): import("react/jsx-runtime").JSX.Element;
|
8
|
+
export default InlineSvg;
|
@@ -1,11 +1,7 @@
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import PropTypes from 'prop-types';
|
3
2
|
import root from 'react-shadow/emotion';
|
4
3
|
import { styled } from '../../Theme';
|
5
|
-
|
6
|
-
/**
|
7
|
-
* inline svg 的方式嵌入 svg, 使用 shadow DOM 避免样式污染
|
8
|
-
*/
|
4
|
+
/** inline svg 的方式嵌入 svg, 使用 shadow DOM 避免样式污染 */
|
9
5
|
function InlineSvg({
|
10
6
|
svg,
|
11
7
|
...rest
|
@@ -19,9 +15,6 @@ function InlineSvg({
|
|
19
15
|
})
|
20
16
|
});
|
21
17
|
}
|
22
|
-
InlineSvg.propTypes = {
|
23
|
-
svg: PropTypes.string.isRequired
|
24
|
-
};
|
25
18
|
const Root = styled(root.span)`
|
26
19
|
display: block;
|
27
20
|
width: 100%;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { type SxProps } from '@mui/material';
|
1
2
|
export type ItemOptions = {
|
2
3
|
id?: string;
|
3
4
|
icon?: React.ReactNode;
|
@@ -14,6 +15,7 @@ export interface NavMenuProps extends React.HTMLAttributes<HTMLElement> {
|
|
14
15
|
activeTextColor?: string;
|
15
16
|
bgColor?: string;
|
16
17
|
onSelected?: (id: string) => void;
|
18
|
+
sx?: SxProps;
|
17
19
|
}
|
18
20
|
/**
|
19
21
|
* NavMenu, 导航组件, 可用于 header/footer/sidebar
|
package/lib/NavMenu/nav-menu.js
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
-
/* eslint-disable no-unused-vars */
|
3
2
|
import { Children, cloneElement, useEffect, createContext, useContext, useRef, forwardRef, useLayoutEffect, isValidElement } from 'react';
|
4
3
|
import clsx from 'clsx';
|
5
4
|
import { MoreHoriz as MoreHorizIcon, ExpandMore as ExpandMoreIcon, Menu as MenuIcon } from '@mui/icons-material';
|
@@ -1,14 +1,15 @@
|
|
1
|
-
|
2
|
-
animationTimer
|
3
|
-
blockScrollDown
|
4
|
-
blockScrollUp
|
5
|
-
children
|
6
|
-
height
|
7
|
-
width
|
8
|
-
customPageNumber
|
9
|
-
onScrollUnavailable
|
10
|
-
onChange:
|
11
|
-
renderAllPagesOnFirstRender
|
12
|
-
transitionTimingFunction
|
13
|
-
}
|
1
|
+
export interface PageScrollerProps {
|
2
|
+
animationTimer?: number;
|
3
|
+
blockScrollDown?: false | true;
|
4
|
+
blockScrollUp?: false | true;
|
5
|
+
children?: React.ReactElement | React.ReactElement[];
|
6
|
+
height?: number | string;
|
7
|
+
width?: number | string;
|
8
|
+
customPageNumber?: number;
|
9
|
+
onScrollUnavailable?: () => void;
|
10
|
+
onChange?: (index: number) => void;
|
11
|
+
renderAllPagesOnFirstRender?: false | true;
|
12
|
+
transitionTimingFunction?: string;
|
13
|
+
}
|
14
|
+
declare const _default: (props: PageScrollerProps) => import("react/jsx-runtime").JSX.Element;
|
14
15
|
export default _default;
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
2
2
|
/* eslint-disable jsx-a11y/no-noninteractive-tabindex */
|
3
3
|
import { Children, cloneElement, useCallback, useEffect, useRef, useState } from 'react';
|
4
|
-
import PropTypes from 'prop-types';
|
5
4
|
import isEqual from 'lodash/isEqual';
|
6
5
|
import isNil from 'lodash/isNil';
|
7
6
|
import isNull from 'lodash/isNull';
|
@@ -28,22 +27,23 @@ let isBodyScrollEnabled = true;
|
|
28
27
|
let isTransitionAfterComponentsToRenderChanged = false;
|
29
28
|
const containers = [];
|
30
29
|
function PageScroller({
|
31
|
-
animationTimer,
|
32
|
-
blockScrollDown,
|
33
|
-
blockScrollUp,
|
34
|
-
children,
|
35
|
-
height,
|
36
|
-
width,
|
30
|
+
animationTimer = DEFAULT_ANIMATION_TIMER,
|
31
|
+
blockScrollDown = false,
|
32
|
+
blockScrollUp = false,
|
33
|
+
children: _children,
|
34
|
+
height = DEFAULT_CONTAINER_HEIGHT,
|
35
|
+
width = DEFAULT_CONTAINER_WIDTH,
|
37
36
|
customPageNumber,
|
38
37
|
onScrollUnavailable,
|
39
38
|
onChange,
|
40
|
-
renderAllPagesOnFirstRender,
|
41
|
-
transitionTimingFunction
|
39
|
+
renderAllPagesOnFirstRender = false,
|
40
|
+
transitionTimingFunction = DEFAULT_ANIMATION
|
42
41
|
}) {
|
43
42
|
const [componentIndex, setComponentIndex] = useState(DEFAULT_COMPONENT_INDEX);
|
44
43
|
const [componentsToRenderLength, setComponentsToRenderLength] = useState(DEFAULT_COMPONENTS_TO_RENDER_LENGTH);
|
45
44
|
const prevComponentIndex = usePrevious(componentIndex);
|
46
45
|
const pageContainer = useRef(null);
|
46
|
+
const children = Children.toArray(_children);
|
47
47
|
const addNextComponent = useCallback(componentsToRenderOnMountLength => {
|
48
48
|
let tempComponentsToRenderLength = 0;
|
49
49
|
if (!isNil(componentsToRenderOnMountLength)) {
|
@@ -168,8 +168,8 @@ function PageScroller({
|
|
168
168
|
}
|
169
169
|
}, [scrollWindowDown, scrollWindowUp]);
|
170
170
|
useEffect(() => {
|
171
|
-
pageContainer.current
|
172
|
-
pageContainer.current
|
171
|
+
pageContainer.current?.addEventListener(Events.TOUCHMOVE, touchMove);
|
172
|
+
pageContainer.current?.addEventListener(Events.KEYDOWN, keyPress);
|
173
173
|
return () => {
|
174
174
|
if (pageContainer.current?.removeEventListener) {
|
175
175
|
pageContainer.current.removeEventListener(Events.TOUCHMOVE, touchMove);
|
@@ -189,7 +189,7 @@ function PageScroller({
|
|
189
189
|
useEffect(() => {
|
190
190
|
isScrolling = false;
|
191
191
|
previousTouchMove = null;
|
192
|
-
if (componentIndex > prevComponentIndex) {
|
192
|
+
if (prevComponentIndex !== undefined && componentIndex > prevComponentIndex) {
|
193
193
|
addNextComponent();
|
194
194
|
}
|
195
195
|
}, [addNextComponent, componentIndex, prevComponentIndex]);
|
@@ -256,31 +256,6 @@ function PageScroller({
|
|
256
256
|
})
|
257
257
|
});
|
258
258
|
}
|
259
|
-
PageScroller.propTypes = {
|
260
|
-
animationTimer: PropTypes.number,
|
261
|
-
blockScrollDown: PropTypes.bool,
|
262
|
-
blockScrollUp: PropTypes.bool,
|
263
|
-
children: PropTypes.any.isRequired,
|
264
|
-
height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
265
|
-
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
266
|
-
customPageNumber: PropTypes.number,
|
267
|
-
onScrollUnavailable: PropTypes.func,
|
268
|
-
onChange: PropTypes.func,
|
269
|
-
renderAllPagesOnFirstRender: PropTypes.bool,
|
270
|
-
transitionTimingFunction: PropTypes.string
|
271
|
-
};
|
272
|
-
PageScroller.defaultProps = {
|
273
|
-
animationTimer: DEFAULT_ANIMATION_TIMER,
|
274
|
-
transitionTimingFunction: DEFAULT_ANIMATION,
|
275
|
-
height: DEFAULT_CONTAINER_HEIGHT,
|
276
|
-
width: DEFAULT_CONTAINER_WIDTH,
|
277
|
-
onChange: undefined,
|
278
|
-
onScrollUnavailable: undefined,
|
279
|
-
blockScrollUp: false,
|
280
|
-
blockScrollDown: false,
|
281
|
-
renderAllPagesOnFirstRender: false,
|
282
|
-
customPageNumber: undefined
|
283
|
-
};
|
284
259
|
export default withDeprecated(PageScroller, {
|
285
260
|
name: 'PageScroller'
|
286
261
|
});
|
@@ -1 +1 @@
|
|
1
|
-
export default function usePrevious(value:
|
1
|
+
export default function usePrevious<T>(value: T): T | undefined;
|
package/lib/Passport/index.d.ts
CHANGED
@@ -1,31 +1,11 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
createPassportSvg: any;
|
10
|
-
}): import("react/jsx-runtime").JSX.Element;
|
11
|
-
declare namespace Passport {
|
12
|
-
namespace propTypes {
|
13
|
-
let passport: PropTypes.Validator<any>;
|
14
|
-
let user: PropTypes.Validator<any>;
|
15
|
-
let color: PropTypes.Validator<string>;
|
16
|
-
let createPassportSvg: PropTypes.Validator<(...args: any[]) => any>;
|
17
|
-
let icon: PropTypes.Requireable<any>;
|
18
|
-
let children: PropTypes.Requireable<any>;
|
19
|
-
let width: PropTypes.Requireable<number>;
|
20
|
-
}
|
21
|
-
namespace defaultProps {
|
22
|
-
let icon_1: null;
|
23
|
-
export { icon_1 as icon };
|
24
|
-
let children_1: null;
|
25
|
-
export { children_1 as children };
|
26
|
-
let width_1: number;
|
27
|
-
export { width_1 as width };
|
28
|
-
}
|
1
|
+
import { type BoxProps } from '@mui/material';
|
2
|
+
import { Passport as PassportType, User } from '../type';
|
3
|
+
export interface PassportProps extends BoxProps {
|
4
|
+
passport: PassportType;
|
5
|
+
user: User;
|
6
|
+
color: string;
|
7
|
+
width?: number;
|
8
|
+
icon?: React.ReactNode;
|
9
|
+
createPassportSvg: (props: any) => string;
|
29
10
|
}
|
30
|
-
export default Passport;
|
31
|
-
import PropTypes from 'prop-types';
|
11
|
+
export default function Passport({ passport, user, color, width, icon, createPassportSvg, children, ...rest }: PassportProps): import("react/jsx-runtime").JSX.Element;
|
package/lib/Passport/passport.js
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
-
import PropTypes from 'prop-types';
|
3
2
|
import upperFirst from 'lodash/upperFirst';
|
4
3
|
import { Box } from '@mui/material';
|
5
4
|
import RevokeIcon from '@arcblock/icons/lib/RevokeIcon';
|
@@ -9,10 +8,11 @@ export default function Passport({
|
|
9
8
|
passport,
|
10
9
|
user,
|
11
10
|
color,
|
12
|
-
width,
|
13
|
-
icon,
|
14
|
-
children,
|
11
|
+
width = 150,
|
12
|
+
icon = null,
|
15
13
|
createPassportSvg,
|
14
|
+
// inherit props
|
15
|
+
children,
|
16
16
|
...rest
|
17
17
|
}) {
|
18
18
|
const {
|
@@ -102,18 +102,4 @@ export default function Passport({
|
|
102
102
|
}), children]
|
103
103
|
})]
|
104
104
|
});
|
105
|
-
}
|
106
|
-
Passport.propTypes = {
|
107
|
-
passport: PropTypes.any.isRequired,
|
108
|
-
user: PropTypes.any.isRequired,
|
109
|
-
color: PropTypes.string.isRequired,
|
110
|
-
createPassportSvg: PropTypes.func.isRequired,
|
111
|
-
icon: PropTypes.any,
|
112
|
-
children: PropTypes.any,
|
113
|
-
width: PropTypes.number
|
114
|
-
};
|
115
|
-
Passport.defaultProps = {
|
116
|
-
icon: null,
|
117
|
-
children: null,
|
118
|
-
width: 150
|
119
|
-
};
|
105
|
+
}
|
@@ -1,15 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
linkProps
|
4
|
-
}): import("react/jsx-runtime").JSX.Element;
|
5
|
-
declare namespace PoweredByArcBlock {
|
6
|
-
namespace propTypes {
|
7
|
-
let linkProps: PropTypes.Requireable<object>;
|
8
|
-
}
|
9
|
-
namespace defaultProps {
|
10
|
-
let linkProps_1: {};
|
11
|
-
export { linkProps_1 as linkProps };
|
12
|
-
}
|
1
|
+
import { type TypographyProps, type LinkProps } from '@mui/material';
|
2
|
+
export interface PoweredByArcBlockProps extends TypographyProps {
|
3
|
+
linkProps?: LinkProps;
|
13
4
|
}
|
14
|
-
export default PoweredByArcBlock;
|
15
|
-
import PropTypes from 'prop-types';
|
5
|
+
export default function PoweredByArcBlock({ linkProps, ...props }: PoweredByArcBlockProps): import("react/jsx-runtime").JSX.Element;
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
-
import PropTypes from 'prop-types';
|
3
2
|
import { Link, Typography } from '@mui/material';
|
4
3
|
export default function PoweredByArcBlock({
|
5
4
|
linkProps,
|
@@ -21,10 +20,4 @@ export default function PoweredByArcBlock({
|
|
21
20
|
children: "Blocklet Technology"
|
22
21
|
}), ", the decentralized web engine."]
|
23
22
|
});
|
24
|
-
}
|
25
|
-
PoweredByArcBlock.propTypes = {
|
26
|
-
linkProps: PropTypes.object
|
27
|
-
};
|
28
|
-
PoweredByArcBlock.defaultProps = {
|
29
|
-
linkProps: {}
|
30
|
-
};
|
23
|
+
}
|
@@ -1,10 +1,12 @@
|
|
1
|
-
export
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
1
|
+
export interface PricingPlanProps {
|
2
|
+
plan: {
|
3
|
+
name: string;
|
4
|
+
price: string;
|
5
|
+
featureList: string[];
|
6
|
+
showButton: boolean;
|
7
|
+
buttonLink: string;
|
8
|
+
buttonText: string;
|
9
|
+
};
|
9
10
|
}
|
10
|
-
|
11
|
+
declare function PricingPlan({ plan }: PricingPlanProps): import("react/jsx-runtime").JSX.Element;
|
12
|
+
export default PricingPlan;
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
-
import PropTypes from 'prop-types';
|
3
2
|
import Card from '@mui/material/Card';
|
4
3
|
import Button from '@mui/material/Button';
|
5
4
|
import CardContent from '@mui/material/CardContent';
|
@@ -52,9 +51,6 @@ function PricingPlan({
|
|
52
51
|
});
|
53
52
|
}
|
54
53
|
export default PricingPlan;
|
55
|
-
PricingPlan.propTypes = {
|
56
|
-
plan: PropTypes.object.isRequired
|
57
|
-
};
|
58
54
|
const PlanCard = styled(Card)`
|
59
55
|
height: 500px;
|
60
56
|
display: flex;
|
@@ -1,4 +1,6 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
import { type PricingPlanProps } from './PricingPlan';
|
2
|
+
export interface PricingTableProps {
|
3
|
+
plans?: Array<PricingPlanProps['plan']>;
|
4
|
+
}
|
5
|
+
declare const _default: (props: PricingTableProps) => import("react/jsx-runtime").JSX.Element;
|
4
6
|
export default _default;
|
@@ -1,11 +1,10 @@
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import PropTypes from 'prop-types';
|
3
2
|
import Grid from '@mui/material/Grid';
|
4
3
|
import PricingPlan from './PricingPlan';
|
5
4
|
import { styled } from '../Theme';
|
6
5
|
import { withDeprecated } from '../Util/deprecate';
|
7
6
|
function PricingTable({
|
8
|
-
plans
|
7
|
+
plans = []
|
9
8
|
}) {
|
10
9
|
if (plans && plans.length > 0) {
|
11
10
|
return /*#__PURE__*/_jsx(Div, {
|
@@ -35,9 +34,6 @@ function PricingTable({
|
|
35
34
|
export default withDeprecated(PricingTable, {
|
36
35
|
name: 'PricingTable'
|
37
36
|
});
|
38
|
-
PricingTable.propTypes = {
|
39
|
-
plans: PropTypes.array.isRequired
|
40
|
-
};
|
41
37
|
const Div = styled('div')`
|
42
38
|
padding: 100px 0;
|
43
39
|
text-align: center;
|
package/lib/QRCode/index.d.ts
CHANGED
@@ -1,23 +1,12 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
data
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
namespace propTypes {
|
11
|
-
let data: PropTypes.Validator<string>;
|
12
|
-
let size: PropTypes.Validator<number>;
|
13
|
-
let image: PropTypes.Requireable<string>;
|
14
|
-
let config: PropTypes.Requireable<object>;
|
15
|
-
}
|
16
|
-
namespace defaultProps {
|
17
|
-
let image_1: null;
|
18
|
-
export { image_1 as image };
|
19
|
-
let config_1: {};
|
20
|
-
export { config_1 as config };
|
21
|
-
}
|
1
|
+
import QRCodeStyling from '@solana/qr-code-styling';
|
2
|
+
type QRCodeStylingOptions = NonNullable<ConstructorParameters<typeof QRCodeStyling>[0]>;
|
3
|
+
export interface QRCodeProps {
|
4
|
+
/** 一般情况下仅使用 data/size/image 即可 */
|
5
|
+
data: string;
|
6
|
+
size: number;
|
7
|
+
image?: string;
|
8
|
+
/** 覆盖 qr-code-styling 配置 */
|
9
|
+
config?: QRCodeStylingOptions;
|
22
10
|
}
|
23
|
-
|
11
|
+
declare function QRCode({ data, size, image, config, ...rest }: QRCodeProps): import("react/jsx-runtime").JSX.Element;
|
12
|
+
export default QRCode;
|
package/lib/QRCode/index.js
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
2
2
|
import { useRef, useEffect, useMemo, useState } from 'react';
|
3
|
-
import PropTypes from 'prop-types';
|
4
3
|
import QRCodeStyling from '@solana/qr-code-styling';
|
5
4
|
import { Box } from '@mui/material';
|
6
5
|
const defaults = {
|
@@ -15,14 +14,13 @@ const defaults = {
|
|
15
14
|
type: 'dot'
|
16
15
|
}
|
17
16
|
};
|
18
|
-
|
19
17
|
// 该组件用于生成与 android wallet 样式风格相似的 qrcode
|
20
18
|
// 注意: 依赖的 @solana/qr-code-styling 是一份 fork 版本, 原版本的 margin 配置存在 bug
|
21
19
|
function QRCode({
|
22
20
|
data,
|
23
21
|
size,
|
24
22
|
image,
|
25
|
-
config,
|
23
|
+
config = {},
|
26
24
|
...rest
|
27
25
|
}) {
|
28
26
|
const ref = useRef(null);
|
@@ -58,16 +56,4 @@ function QRCode({
|
|
58
56
|
...rest
|
59
57
|
});
|
60
58
|
}
|
61
|
-
QRCode.propTypes = {
|
62
|
-
// 一般情况下仅使用 data/size/image 即可
|
63
|
-
data: PropTypes.string.isRequired,
|
64
|
-
size: PropTypes.number.isRequired,
|
65
|
-
image: PropTypes.string,
|
66
|
-
// 覆盖 qr-code-styling 配置
|
67
|
-
config: PropTypes.object
|
68
|
-
};
|
69
|
-
QRCode.defaultProps = {
|
70
|
-
image: null,
|
71
|
-
config: {}
|
72
|
-
};
|
73
59
|
export default QRCode;
|
@@ -1,41 +1,13 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
declare namespace RelativeTime {
|
13
|
-
namespace propTypes {
|
14
|
-
let value: PropTypes.Validator<NonNullable<NonNullable<string | number | null | undefined>>>;
|
15
|
-
let locale: PropTypes.Requireable<string>;
|
16
|
-
let withoutSuffix: PropTypes.Requireable<boolean>;
|
17
|
-
let from: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
18
|
-
let to: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
19
|
-
let type: PropTypes.Requireable<string>;
|
20
|
-
let tz: PropTypes.Requireable<string>;
|
21
|
-
let relativeRange: PropTypes.Requireable<number>;
|
22
|
-
}
|
23
|
-
namespace defaultProps {
|
24
|
-
let locale_1: string;
|
25
|
-
export { locale_1 as locale };
|
26
|
-
let withoutSuffix_1: boolean;
|
27
|
-
export { withoutSuffix_1 as withoutSuffix };
|
28
|
-
let from_1: string;
|
29
|
-
export { from_1 as from };
|
30
|
-
let to_1: string;
|
31
|
-
export { to_1 as to };
|
32
|
-
let type_1: string;
|
33
|
-
export { type_1 as type };
|
34
|
-
let tz_1: undefined;
|
35
|
-
export { tz_1 as tz };
|
36
|
-
let relativeRange_1: undefined;
|
37
|
-
export { relativeRange_1 as relativeRange };
|
38
|
-
}
|
1
|
+
import 'dayjs/locale/zh-cn';
|
2
|
+
import type { Locale } from '../type';
|
3
|
+
export interface RelativeTimeProps {
|
4
|
+
value: string | number;
|
5
|
+
locale?: Locale;
|
6
|
+
withoutSuffix?: false | true;
|
7
|
+
from?: string | number;
|
8
|
+
to?: string | number;
|
9
|
+
type?: 'relative' | 'absolute';
|
10
|
+
tz?: string;
|
11
|
+
relativeRange?: number;
|
39
12
|
}
|
40
|
-
export default RelativeTime;
|
41
|
-
import PropTypes from 'prop-types';
|
13
|
+
export default function RelativeTime({ value, locale, withoutSuffix, from, to, type, tz, relativeRange, ...rest }: RelativeTimeProps): "-" | import("react/jsx-runtime").JSX.Element;
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import PropTypes from 'prop-types';
|
3
2
|
import relativeTime from 'dayjs/plugin/relativeTime';
|
4
3
|
import dayjs from 'dayjs';
|
5
4
|
import 'dayjs/locale/zh-cn';
|
@@ -35,11 +34,11 @@ dayjs.updateLocale('zh-cn', {
|
|
35
34
|
setDateTool(dayjs);
|
36
35
|
export default function RelativeTime({
|
37
36
|
value,
|
38
|
-
locale,
|
39
|
-
withoutSuffix,
|
40
|
-
from,
|
41
|
-
to,
|
42
|
-
type,
|
37
|
+
locale = 'en',
|
38
|
+
withoutSuffix = false,
|
39
|
+
from = '',
|
40
|
+
to = '',
|
41
|
+
type = 'relative',
|
43
42
|
tz,
|
44
43
|
relativeRange,
|
45
44
|
...rest
|
@@ -52,7 +51,7 @@ export default function RelativeTime({
|
|
52
51
|
if (tz) {
|
53
52
|
datetime.tz(tz);
|
54
53
|
}
|
55
|
-
const absoluteString = formatToDatetime(value, {
|
54
|
+
const absoluteString = formatToDatetime(value.toString(), {
|
56
55
|
locale: localeOption,
|
57
56
|
tz
|
58
57
|
});
|
@@ -85,23 +84,4 @@ export default function RelativeTime({
|
|
85
84
|
children: innerContent
|
86
85
|
})
|
87
86
|
});
|
88
|
-
}
|
89
|
-
RelativeTime.propTypes = {
|
90
|
-
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
|
91
|
-
locale: PropTypes.string,
|
92
|
-
withoutSuffix: PropTypes.bool,
|
93
|
-
from: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
94
|
-
to: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
95
|
-
type: PropTypes.oneOf(['relative', 'absolute']),
|
96
|
-
tz: PropTypes.string,
|
97
|
-
relativeRange: PropTypes.number
|
98
|
-
};
|
99
|
-
RelativeTime.defaultProps = {
|
100
|
-
locale: 'en',
|
101
|
-
withoutSuffix: false,
|
102
|
-
from: '',
|
103
|
-
to: '',
|
104
|
-
type: 'relative',
|
105
|
-
tz: undefined,
|
106
|
-
relativeRange: undefined
|
107
|
-
};
|
87
|
+
}
|