@arcblock/ux 2.10.67 → 2.10.69
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/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 +3 -19
- 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 +2 -17
- 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 +5 -15
- 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 +10 -19
- 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 +17 -8
- package/lib/Util/index.js +22 -3
- 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} +18 -20
- 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} +14 -19
- 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} +9 -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} +13 -16
- 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 +26 -9
- 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
package/lib/Result/common.d.ts
CHANGED
@@ -1,52 +1,33 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
import { type ResultProps } from './result';
|
2
|
+
import type { Locale } from '../type';
|
3
|
+
export type CommonResultProps = {
|
4
|
+
locale: Locale;
|
5
|
+
} & Omit<ResultProps, 'icon' | 'title' | 'description'>;
|
6
|
+
export declare function PageNotFound({ locale, ...rest }: CommonResultProps): import("react/jsx-runtime").JSX.Element;
|
7
|
+
export declare namespace PageNotFound {
|
8
|
+
var status: string;
|
7
9
|
}
|
8
|
-
export function Forbidden({ locale, ...rest }:
|
9
|
-
|
10
|
-
|
11
|
-
}): import("react/jsx-runtime").JSX.Element;
|
12
|
-
export namespace Forbidden {
|
13
|
-
let status_1: string;
|
14
|
-
export { status_1 as status };
|
10
|
+
export declare function Forbidden({ locale, ...rest }: CommonResultProps): import("react/jsx-runtime").JSX.Element;
|
11
|
+
export declare namespace Forbidden {
|
12
|
+
var status: string;
|
15
13
|
}
|
16
|
-
export function InternalServerError({ locale, ...rest }:
|
17
|
-
|
18
|
-
|
19
|
-
}): import("react/jsx-runtime").JSX.Element;
|
20
|
-
export namespace InternalServerError {
|
21
|
-
let status_2: string;
|
22
|
-
export { status_2 as status };
|
14
|
+
export declare function InternalServerError({ locale, ...rest }: CommonResultProps): import("react/jsx-runtime").JSX.Element;
|
15
|
+
export declare namespace InternalServerError {
|
16
|
+
var status: string;
|
23
17
|
}
|
24
|
-
export function Error({ locale, ...rest }:
|
25
|
-
|
26
|
-
|
27
|
-
}): import("react/jsx-runtime").JSX.Element;
|
28
|
-
export namespace Error {
|
29
|
-
let status_3: string;
|
30
|
-
export { status_3 as status };
|
18
|
+
export declare function Error({ locale, ...rest }: CommonResultProps): import("react/jsx-runtime").JSX.Element;
|
19
|
+
export declare namespace Error {
|
20
|
+
var status: string;
|
31
21
|
}
|
32
|
-
export function Maintenance({ locale, ...rest }:
|
33
|
-
|
34
|
-
|
35
|
-
}): import("react/jsx-runtime").JSX.Element;
|
36
|
-
export namespace Maintenance {
|
37
|
-
let status_4: string;
|
38
|
-
export { status_4 as status };
|
22
|
+
export declare function Maintenance({ locale, ...rest }: CommonResultProps): import("react/jsx-runtime").JSX.Element;
|
23
|
+
export declare namespace Maintenance {
|
24
|
+
var status: string;
|
39
25
|
}
|
40
|
-
export function ComingSoon({ locale, ...rest }:
|
41
|
-
|
42
|
-
|
43
|
-
}): import("react/jsx-runtime").JSX.Element;
|
44
|
-
export namespace ComingSoon {
|
45
|
-
let status_5: string;
|
46
|
-
export { status_5 as status };
|
26
|
+
export declare function ComingSoon({ locale, ...rest }: CommonResultProps): import("react/jsx-runtime").JSX.Element;
|
27
|
+
export declare namespace ComingSoon {
|
28
|
+
var status: string;
|
47
29
|
}
|
48
|
-
export function Info(props:
|
49
|
-
export namespace Info {
|
50
|
-
|
51
|
-
export { status_6 as status };
|
30
|
+
export declare function Info(props: Omit<ResultProps, 'icon'>): import("react/jsx-runtime").JSX.Element;
|
31
|
+
export declare namespace Info {
|
32
|
+
var status: string;
|
52
33
|
}
|
package/lib/Result/common.js
CHANGED
@@ -7,7 +7,6 @@ import Result from './result';
|
|
7
7
|
import translations from './translations';
|
8
8
|
import { useLocaleContext } from '../Locale/context';
|
9
9
|
import { useTheme } from '../Theme';
|
10
|
-
|
11
10
|
// 优先使用显式指定的 locale, 再尝试使用 context 中的 locale, 最后使用默认 'en'
|
12
11
|
const useLocale = locale => {
|
13
12
|
locale = ['zh', 'en'].includes(locale) ? locale : '';
|
@@ -19,7 +18,6 @@ const useLocale = locale => {
|
|
19
18
|
const result = locale || localeFromContext;
|
20
19
|
return translations[result] ? result : 'en';
|
21
20
|
};
|
22
|
-
|
23
21
|
// 404
|
24
22
|
export function PageNotFound({
|
25
23
|
locale,
|
@@ -28,8 +26,8 @@ export function PageNotFound({
|
|
28
26
|
locale = useLocale(locale);
|
29
27
|
return /*#__PURE__*/_jsx(Result, {
|
30
28
|
icon: /*#__PURE__*/_jsx(StyledErrorIcon, {}),
|
31
|
-
title: translations[locale][404].title,
|
32
|
-
description: translations[locale][404].description,
|
29
|
+
title: translations[locale]['404'].title,
|
30
|
+
description: translations[locale]['404'].description,
|
33
31
|
...rest
|
34
32
|
});
|
35
33
|
}
|
package/lib/Result/index.d.ts
CHANGED
@@ -1,19 +1,6 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
status: any;
|
5
|
-
}): import("react/jsx-runtime").JSX.Element;
|
6
|
-
declare namespace ResultWrapper {
|
7
|
-
let propTypes: {
|
8
|
-
icon: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
9
|
-
title: PropTypes.Requireable<NonNullable<string | PropTypes.ReactElementLike | null | undefined>>;
|
10
|
-
description: PropTypes.Requireable<NonNullable<string | PropTypes.ReactElementLike | null | undefined>>;
|
11
|
-
actions: PropTypes.Requireable<any>;
|
12
|
-
extra: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
13
|
-
status: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
14
|
-
};
|
15
|
-
namespace defaultProps {
|
16
|
-
let status: string;
|
17
|
-
}
|
1
|
+
import { type ResultProps } from './result';
|
2
|
+
export interface ResultWrapperProps extends ResultProps {
|
3
|
+
status?: string | number;
|
18
4
|
}
|
19
|
-
|
5
|
+
declare function ResultWrapper({ status, ...rest }: ResultWrapperProps): import("react/jsx-runtime").JSX.Element;
|
6
|
+
export default ResultWrapper;
|
package/lib/Result/index.js
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import PropTypes from 'prop-types';
|
3
2
|
import Result from './result';
|
4
3
|
import * as common from './common';
|
5
4
|
const componentsKeyByStatus = Object.keys(common).reduce((acc, cur) => ({
|
@@ -7,7 +6,7 @@ const componentsKeyByStatus = Object.keys(common).reduce((acc, cur) => ({
|
|
7
6
|
[common[cur].status || cur]: common[cur]
|
8
7
|
}), {});
|
9
8
|
function ResultWrapper({
|
10
|
-
status,
|
9
|
+
status = '',
|
11
10
|
...rest
|
12
11
|
}) {
|
13
12
|
if (status) {
|
@@ -23,11 +22,4 @@ function ResultWrapper({
|
|
23
22
|
...rest
|
24
23
|
});
|
25
24
|
}
|
26
|
-
ResultWrapper.propTypes = {
|
27
|
-
status: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
28
|
-
...Result.propTypes
|
29
|
-
};
|
30
|
-
ResultWrapper.defaultProps = {
|
31
|
-
status: ''
|
32
|
-
};
|
33
25
|
export default ResultWrapper;
|
package/lib/Result/result.d.ts
CHANGED
@@ -1,30 +1,8 @@
|
|
1
|
-
export
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
description: any;
|
7
|
-
extra: any;
|
8
|
-
}): import("react/jsx-runtime").JSX.Element;
|
9
|
-
declare namespace Result {
|
10
|
-
namespace propTypes {
|
11
|
-
let icon: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
12
|
-
let title: PropTypes.Requireable<NonNullable<string | PropTypes.ReactElementLike | null | undefined>>;
|
13
|
-
let description: PropTypes.Requireable<NonNullable<string | PropTypes.ReactElementLike | null | undefined>>;
|
14
|
-
let actions: PropTypes.Requireable<any>;
|
15
|
-
let extra: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
16
|
-
}
|
17
|
-
namespace defaultProps {
|
18
|
-
let icon_1: undefined;
|
19
|
-
export { icon_1 as icon };
|
20
|
-
let title_1: string;
|
21
|
-
export { title_1 as title };
|
22
|
-
let description_1: string;
|
23
|
-
export { description_1 as description };
|
24
|
-
let actions_1: null;
|
25
|
-
export { actions_1 as actions };
|
26
|
-
let extra_1: undefined;
|
27
|
-
export { extra_1 as extra };
|
28
|
-
}
|
1
|
+
export interface ResultProps {
|
2
|
+
icon?: React.ReactNode;
|
3
|
+
title?: React.ReactNode;
|
4
|
+
description?: React.ReactNode;
|
5
|
+
extra?: React.ReactNode;
|
29
6
|
}
|
30
|
-
|
7
|
+
declare function Result({ icon, title, description, extra, ...rest }: ResultProps): import("react/jsx-runtime").JSX.Element;
|
8
|
+
export default Result;
|
package/lib/Result/result.js
CHANGED
@@ -1,11 +1,10 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
-
import PropTypes from 'prop-types';
|
3
2
|
import Box from '@mui/material/Box';
|
4
3
|
import { styled } from '../Theme';
|
5
4
|
function Result({
|
6
5
|
icon,
|
7
|
-
title,
|
8
|
-
description,
|
6
|
+
title = '',
|
7
|
+
description = '',
|
9
8
|
extra,
|
10
9
|
...rest
|
11
10
|
}) {
|
@@ -30,20 +29,6 @@ function Result({
|
|
30
29
|
})]
|
31
30
|
});
|
32
31
|
}
|
33
|
-
Result.propTypes = {
|
34
|
-
icon: PropTypes.element,
|
35
|
-
title: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
36
|
-
description: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
37
|
-
actions: PropTypes.any,
|
38
|
-
extra: PropTypes.element
|
39
|
-
};
|
40
|
-
Result.defaultProps = {
|
41
|
-
icon: undefined,
|
42
|
-
title: '',
|
43
|
-
description: '',
|
44
|
-
actions: null,
|
45
|
-
extra: undefined
|
46
|
-
};
|
47
32
|
const Root = styled('div')`
|
48
33
|
box-sizing: border-box;
|
49
34
|
display: flex;
|
@@ -1,55 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
404: {
|
4
|
-
title: string;
|
5
|
-
description: string;
|
6
|
-
};
|
7
|
-
403: {
|
8
|
-
title: string;
|
9
|
-
description: string;
|
10
|
-
};
|
11
|
-
500: {
|
12
|
-
title: string;
|
13
|
-
description: string;
|
14
|
-
};
|
15
|
-
error: {
|
16
|
-
title: string;
|
17
|
-
description: string;
|
18
|
-
};
|
19
|
-
maintenance: {
|
20
|
-
title: string;
|
21
|
-
description: string;
|
22
|
-
};
|
23
|
-
comingSoon: {
|
24
|
-
title: string;
|
25
|
-
description: string;
|
26
|
-
};
|
27
|
-
};
|
28
|
-
let zh: {
|
29
|
-
404: {
|
30
|
-
title: string;
|
31
|
-
description: string;
|
32
|
-
};
|
33
|
-
403: {
|
34
|
-
title: string;
|
35
|
-
description: string;
|
36
|
-
};
|
37
|
-
500: {
|
38
|
-
title: string;
|
39
|
-
description: string;
|
40
|
-
};
|
41
|
-
error: {
|
42
|
-
title: string;
|
43
|
-
description: string;
|
44
|
-
};
|
45
|
-
maintenance: {
|
46
|
-
title: string;
|
47
|
-
description: string;
|
48
|
-
};
|
49
|
-
comingSoon: {
|
50
|
-
title: string;
|
51
|
-
description: string;
|
52
|
-
};
|
53
|
-
};
|
54
|
-
}
|
1
|
+
import type { Translations } from '../type';
|
2
|
+
declare const _default: Translations;
|
55
3
|
export default _default;
|
@@ -1,25 +1,8 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
type: any;
|
7
|
-
sx: any;
|
8
|
-
}): import("react/jsx-runtime").JSX.Element;
|
9
|
-
declare namespace Screenshot {
|
10
|
-
namespace propTypes {
|
11
|
-
let width: PropTypes.Requireable<number>;
|
12
|
-
let type: PropTypes.Requireable<string>;
|
13
|
-
let children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
|
14
|
-
let sx: PropTypes.Requireable<object>;
|
15
|
-
}
|
16
|
-
namespace defaultProps {
|
17
|
-
let width_1: number;
|
18
|
-
export { width_1 as width };
|
19
|
-
let type_1: string;
|
20
|
-
export { type_1 as type };
|
21
|
-
let sx_1: {};
|
22
|
-
export { sx_1 as sx };
|
23
|
-
}
|
1
|
+
import { type SxProps } from '@mui/material';
|
2
|
+
export interface ScreenshotProps extends React.ComponentProps<'div'> {
|
3
|
+
width?: number;
|
4
|
+
type?: string;
|
5
|
+
sx?: SxProps;
|
24
6
|
}
|
25
|
-
|
7
|
+
declare function Screenshot({ width, children, type, ...rest }: ScreenshotProps): import("react/jsx-runtime").JSX.Element;
|
8
|
+
export default Screenshot;
|
@@ -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 phone from './shells/Phone';
|
4
3
|
import macbook from './shells/Macbook';
|
5
4
|
import { styled } from '../../Theme';
|
@@ -8,10 +7,9 @@ const map = {
|
|
8
7
|
macbook
|
9
8
|
};
|
10
9
|
function Screenshot({
|
11
|
-
width,
|
10
|
+
width = 0,
|
12
11
|
children,
|
13
|
-
type,
|
14
|
-
sx,
|
12
|
+
type = 'phone',
|
15
13
|
...rest
|
16
14
|
}) {
|
17
15
|
const _type = type.toLowerCase();
|
@@ -76,15 +74,4 @@ function Screenshot({
|
|
76
74
|
})
|
77
75
|
});
|
78
76
|
}
|
79
|
-
Screenshot.propTypes = {
|
80
|
-
width: PropTypes.number,
|
81
|
-
type: PropTypes.string,
|
82
|
-
children: PropTypes.node.isRequired,
|
83
|
-
sx: PropTypes.object
|
84
|
-
};
|
85
|
-
Screenshot.defaultProps = {
|
86
|
-
width: 0,
|
87
|
-
type: 'phone',
|
88
|
-
sx: {}
|
89
|
-
};
|
90
77
|
export default Screenshot;
|
@@ -1,21 +1,27 @@
|
|
1
|
-
export
|
2
|
-
[x: string]: any;
|
3
|
-
}): import("react/jsx-runtime").JSX.Element;
|
4
|
-
export const width: 909;
|
5
|
-
export const height: 517;
|
6
|
-
export const ratio: number;
|
7
|
-
export namespace screenData {
|
8
|
-
let x: number;
|
9
|
-
let y: number;
|
10
|
-
let width: number;
|
11
|
-
let height: number;
|
12
|
-
let radius: string;
|
13
|
-
}
|
14
|
-
declare namespace _default {
|
15
|
-
export { Shell };
|
16
|
-
export { ratio };
|
17
|
-
export { screenData };
|
18
|
-
export { width };
|
19
|
-
export { height };
|
1
|
+
export interface ShellProps extends React.ComponentProps<'svg'> {
|
20
2
|
}
|
3
|
+
export declare function Shell({ ...rest }: ShellProps): import("react/jsx-runtime").JSX.Element;
|
4
|
+
export declare const width = 909;
|
5
|
+
export declare const height = 517;
|
6
|
+
export declare const ratio: number;
|
7
|
+
export declare const screenData: {
|
8
|
+
x: number;
|
9
|
+
y: number;
|
10
|
+
width: number;
|
11
|
+
height: number;
|
12
|
+
radius: string;
|
13
|
+
};
|
14
|
+
declare const _default: {
|
15
|
+
Shell: typeof Shell;
|
16
|
+
ratio: number;
|
17
|
+
screenData: {
|
18
|
+
x: number;
|
19
|
+
y: number;
|
20
|
+
width: number;
|
21
|
+
height: number;
|
22
|
+
radius: string;
|
23
|
+
};
|
24
|
+
width: number;
|
25
|
+
height: number;
|
26
|
+
};
|
21
27
|
export default _default;
|
@@ -1,21 +1,27 @@
|
|
1
|
-
export
|
2
|
-
|
3
|
-
|
4
|
-
export const width: 268;
|
5
|
-
export const height: 554;
|
6
|
-
export const ratio: number;
|
7
|
-
export namespace screenData {
|
8
|
-
let x: number;
|
9
|
-
let y: number;
|
10
|
-
let width: number;
|
11
|
-
let height: number;
|
12
|
-
let radius: string;
|
13
|
-
}
|
14
|
-
declare namespace _default {
|
15
|
-
export { Shell };
|
16
|
-
export { ratio };
|
17
|
-
export { screenData };
|
18
|
-
export { width };
|
19
|
-
export { height };
|
1
|
+
export declare const width = 268;
|
2
|
+
export declare const height = 554;
|
3
|
+
export interface ShellProps extends React.ComponentProps<'svg'> {
|
20
4
|
}
|
5
|
+
export declare function Shell({ ...rest }: ShellProps): import("react/jsx-runtime").JSX.Element;
|
6
|
+
export declare const ratio: number;
|
7
|
+
export declare const screenData: {
|
8
|
+
x: number;
|
9
|
+
y: number;
|
10
|
+
width: number;
|
11
|
+
height: number;
|
12
|
+
radius: string;
|
13
|
+
};
|
14
|
+
declare const _default: {
|
15
|
+
Shell: typeof Shell;
|
16
|
+
ratio: number;
|
17
|
+
screenData: {
|
18
|
+
x: number;
|
19
|
+
y: number;
|
20
|
+
width: number;
|
21
|
+
height: number;
|
22
|
+
radius: string;
|
23
|
+
};
|
24
|
+
width: number;
|
25
|
+
height: number;
|
26
|
+
};
|
21
27
|
export default _default;
|
@@ -1,29 +1,85 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
1
|
+
import { type SxProps } from '@mui/material';
|
2
|
+
import './devices.css';
|
3
|
+
declare const types: {
|
4
|
+
'iphone-x': {
|
5
|
+
borderRadius: number;
|
6
|
+
width: number;
|
7
|
+
scale: number;
|
8
|
+
};
|
9
|
+
'iphone-8': {
|
10
|
+
borderRadius: number;
|
11
|
+
width: number;
|
12
|
+
scale: number;
|
13
|
+
};
|
14
|
+
'ipad-pro': {
|
15
|
+
borderRadius: number;
|
16
|
+
width: number;
|
17
|
+
scale: number;
|
18
|
+
};
|
19
|
+
'imac-pro': {
|
20
|
+
borderRadius: number;
|
21
|
+
width: number;
|
22
|
+
scale: number;
|
23
|
+
};
|
24
|
+
macbook: {
|
25
|
+
borderRadius: number;
|
26
|
+
width: number;
|
27
|
+
scale: number;
|
28
|
+
};
|
29
|
+
'macbook-pro': {
|
30
|
+
borderRadius: number;
|
31
|
+
width: number;
|
32
|
+
scale: number;
|
33
|
+
};
|
34
|
+
'surface-pro': {
|
35
|
+
borderRadius: number;
|
36
|
+
width: number;
|
37
|
+
scale: number;
|
38
|
+
};
|
39
|
+
'surface-book': {
|
40
|
+
borderRadius: number;
|
41
|
+
width: number;
|
42
|
+
scale: number;
|
43
|
+
};
|
44
|
+
'surface-studio': {
|
45
|
+
borderRadius: number;
|
46
|
+
width: number;
|
47
|
+
scale: number;
|
48
|
+
};
|
49
|
+
'galaxy-s8': {
|
50
|
+
borderRadius: number;
|
51
|
+
width: number;
|
52
|
+
scale: number;
|
53
|
+
};
|
54
|
+
'google-pixel': {
|
55
|
+
borderRadius: number;
|
56
|
+
width: number;
|
57
|
+
scale: number;
|
58
|
+
};
|
59
|
+
'google-pixel-2-xl': {
|
60
|
+
borderRadius: number;
|
61
|
+
width: number;
|
62
|
+
scale: number;
|
63
|
+
};
|
64
|
+
'apple-watch': {
|
65
|
+
borderRadius: number;
|
66
|
+
width: number;
|
67
|
+
scale: number;
|
68
|
+
};
|
69
|
+
};
|
70
|
+
export interface OldScreenshotProps extends React.ComponentProps<'div'> {
|
71
|
+
type?: keyof typeof types;
|
72
|
+
className?: string;
|
73
|
+
style?: React.CSSProperties;
|
74
|
+
width?: number;
|
75
|
+
height?: number;
|
76
|
+
sx?: SxProps;
|
77
|
+
}
|
78
|
+
export interface ScreenFixerProps extends OldScreenshotProps {
|
28
79
|
}
|
29
|
-
|
80
|
+
export interface ScreenShotProps extends ScreenFixerProps {
|
81
|
+
type: keyof typeof types;
|
82
|
+
src?: string;
|
83
|
+
}
|
84
|
+
declare function Screenshot({ type, src, children, sx, ...rest }: ScreenShotProps): import("react/jsx-runtime").JSX.Element;
|
85
|
+
export default Screenshot;
|