@arcblock/ux 2.10.67 → 2.10.68

Sign up to get free protection for your applications and to get access to all the features.
Files changed (294) hide show
  1. package/lib/Address/did-address.d.ts +6 -5
  2. package/lib/Address/index.d.ts +1 -1
  3. package/lib/Avatar/index.d.ts +10 -8
  4. package/lib/Avatar/index.js +6 -4
  5. package/lib/Blocklet/blocklet.d.ts +4 -4
  6. package/lib/Blocklet/blocklet.js +2 -2
  7. package/lib/BlockletContext/index.d.ts +3 -3
  8. package/lib/BlockletNFT/index.d.ts +6 -6
  9. package/lib/BlockletNFT/index.js +3 -3
  10. package/lib/BlockletV2/blocklet.d.ts +2 -2
  11. package/lib/Button/wrap.d.ts +4 -4
  12. package/lib/Button/wrap.js +2 -2
  13. package/lib/CardSelector/index.js +0 -1
  14. package/lib/Center/index.d.ts +1 -1
  15. package/lib/ClickToCopy/copy-button.d.ts +5 -4
  16. package/lib/ClickToCopy/copy-button.js +0 -1
  17. package/lib/ClickToCopy/hook.d.ts +3 -8
  18. package/lib/ClickToCopy/index.d.ts +6 -4
  19. package/lib/CodeBlock/index.d.ts +3 -1
  20. package/lib/CookieConsent/index.d.ts +8 -29
  21. package/lib/CookieConsent/index.js +3 -17
  22. package/lib/CountDown/index.d.ts +21 -25
  23. package/lib/CountDown/index.js +12 -11
  24. package/lib/DID/index.d.ts +9 -8
  25. package/lib/Datatable/index.d.ts +5 -5
  26. package/lib/Datatable/index.js +5 -5
  27. package/lib/Dialog/confirm.d.ts +6 -6
  28. package/lib/Dialog/confirm.js +3 -3
  29. package/lib/Dialog/types.d.ts +1 -1
  30. package/lib/DidLogo/index.d.ts +5 -25
  31. package/lib/DidLogo/index.js +4 -15
  32. package/lib/DriftBot/index.d.ts +13 -19
  33. package/lib/DriftBot/index.js +5 -6
  34. package/lib/Earth/index.d.ts +28 -10
  35. package/lib/Earth/index.js +12 -52
  36. package/lib/Earth/util.d.ts +10 -5
  37. package/lib/Earth/util.js +1 -0
  38. package/lib/ErrorBoundary/fallback.d.ts +12 -19
  39. package/lib/ErrorBoundary/fallback.js +2 -19
  40. package/lib/ErrorBoundary/index.d.ts +1 -1
  41. package/lib/Footer/index.d.ts +17 -24
  42. package/lib/Footer/index.js +2 -11
  43. package/lib/Header/header.d.ts +2 -2
  44. package/lib/Icon/image.d.ts +3 -2
  45. package/lib/Icon/index.d.ts +6 -4
  46. package/lib/Img/index.d.ts +1 -1
  47. package/lib/Img/index.js +1 -1
  48. package/lib/InfoRow/index.d.ts +9 -32
  49. package/lib/InfoRow/index.js +10 -23
  50. package/lib/Layout/dashboard/external-link.d.ts +13 -14
  51. package/lib/Layout/dashboard/external-link.js +5 -22
  52. package/lib/Layout/dashboard/full-page.d.ts +19 -11
  53. package/lib/Layout/dashboard/full-page.js +2 -6
  54. package/lib/Layout/dashboard/index.d.ts +20 -39
  55. package/lib/Layout/dashboard/index.js +10 -38
  56. package/lib/Layout/dashboard/sidebar.d.ts +17 -20
  57. package/lib/Layout/dashboard/sidebar.js +3 -16
  58. package/lib/Layout/dashboard-legacy/header.d.ts +10 -36
  59. package/lib/Layout/dashboard-legacy/header.js +5 -24
  60. package/lib/Layout/dashboard-legacy/index.d.ts +17 -56
  61. package/lib/Layout/dashboard-legacy/index.js +12 -41
  62. package/lib/Layout/dashboard-legacy/sidebar.d.ts +15 -26
  63. package/lib/Layout/dashboard-legacy/sidebar.js +5 -15
  64. package/lib/Layout/index.d.ts +17 -56
  65. package/lib/Layout/index.js +24 -50
  66. package/lib/LoadingMask/index.d.ts +8 -31
  67. package/lib/LoadingMask/index.js +2 -18
  68. package/lib/Locale/browser-lang.d.ts +4 -1
  69. package/lib/Locale/browser-lang.js +8 -3
  70. package/lib/Locale/context.d.ts +18 -8
  71. package/lib/Locale/context.js +1 -1
  72. package/lib/Locale/languages.d.ts +9 -55
  73. package/lib/Locale/selector.d.ts +10 -26
  74. package/lib/Locale/selector.js +8 -25
  75. package/lib/Locale/util.d.ts +4 -3
  76. package/lib/Locale/util.js +0 -1
  77. package/lib/Logo/index.d.ts +9 -40
  78. package/lib/Logo/index.js +88 -46
  79. package/lib/Metric/index.d.ts +9 -31
  80. package/lib/Metric/index.js +5 -20
  81. package/lib/NFTDisplay/aspect-ratio-container.d.ts +5 -12
  82. package/lib/NFTDisplay/aspect-ratio-container.js +0 -5
  83. package/lib/NFTDisplay/broken.d.ts +3 -13
  84. package/lib/NFTDisplay/broken.js +80 -10
  85. package/lib/NFTDisplay/displayApi.d.ts +1 -1
  86. package/lib/NFTDisplay/index.d.ts +28 -6
  87. package/lib/NFTDisplay/index.js +17 -51
  88. package/lib/NFTDisplay/svg-embedder/img.d.ts +8 -23
  89. package/lib/NFTDisplay/svg-embedder/img.js +3 -17
  90. package/lib/NFTDisplay/svg-embedder/inline-svg.d.ts +7 -13
  91. package/lib/NFTDisplay/svg-embedder/inline-svg.js +1 -8
  92. package/lib/NavMenu/nav-menu.d.ts +2 -0
  93. package/lib/NavMenu/nav-menu.js +0 -1
  94. package/lib/PageScroller/index.d.ts +14 -13
  95. package/lib/PageScroller/index.js +12 -37
  96. package/lib/PageScroller/usePrevValue.d.ts +1 -1
  97. package/lib/PageScroller/usePrevValue.js +1 -2
  98. package/lib/Passport/index.d.ts +1 -1
  99. package/lib/Passport/passport.d.ts +10 -30
  100. package/lib/Passport/passport.js +5 -19
  101. package/lib/PoweredByArcBlock/index.d.ts +4 -14
  102. package/lib/PoweredByArcBlock/index.js +1 -8
  103. package/lib/PricingTable/PricingPlan.d.ts +11 -9
  104. package/lib/PricingTable/PricingPlan.js +0 -4
  105. package/lib/PricingTable/index.d.ts +5 -3
  106. package/lib/PricingTable/index.js +1 -5
  107. package/lib/QRCode/index.d.ts +11 -22
  108. package/lib/QRCode/index.js +1 -15
  109. package/lib/RelativeTime/index.d.ts +12 -40
  110. package/lib/RelativeTime/index.js +7 -27
  111. package/lib/Result/common.d.ts +26 -45
  112. package/lib/Result/common.js +2 -4
  113. package/lib/Result/index.d.ts +5 -18
  114. package/lib/Result/index.js +1 -9
  115. package/lib/Result/result.d.ts +7 -29
  116. package/lib/Result/result.js +2 -17
  117. package/lib/Result/translations.d.ts +2 -54
  118. package/lib/Screenshot/BaseScreenshot/index.d.ts +7 -24
  119. package/lib/Screenshot/BaseScreenshot/index.js +2 -15
  120. package/lib/Screenshot/BaseScreenshot/shells/Macbook.d.ts +25 -19
  121. package/lib/Screenshot/BaseScreenshot/shells/Phone.d.ts +25 -19
  122. package/lib/Screenshot/index.d.ts +84 -28
  123. package/lib/Screenshot/index.js +14 -43
  124. package/lib/SessionBlocklet/index.d.ts +6 -19
  125. package/lib/SessionBlocklet/index.js +3 -14
  126. package/lib/SessionManager/index.d.ts +1 -1
  127. package/lib/SessionPermission/index.d.ts +9 -17
  128. package/lib/SessionPermission/index.js +3 -11
  129. package/lib/SessionUser/components/logged-in.d.ts +9 -31
  130. package/lib/SessionUser/components/logged-in.js +13 -29
  131. package/lib/SessionUser/components/session-user-item.d.ts +8 -1
  132. package/lib/SessionUser/components/session-user-item.js +2 -12
  133. package/lib/SessionUser/components/session-user-switch.d.ts +9 -21
  134. package/lib/SessionUser/components/session-user-switch.js +3 -15
  135. package/lib/SessionUser/components/un-login.d.ts +7 -23
  136. package/lib/SessionUser/components/un-login.js +4 -16
  137. package/lib/SessionUser/components/user-info.d.ts +12 -29
  138. package/lib/SessionUser/components/user-info.js +4 -19
  139. package/lib/SessionUser/index.d.ts +7 -30
  140. package/lib/SessionUser/index.js +5 -26
  141. package/lib/SessionUser/libs/translation.d.ts +2 -31
  142. package/lib/SessionUser/libs/translation.js +1 -0
  143. package/lib/SessionUser/libs/utils.d.ts +10 -9
  144. package/lib/Sparkline/index.d.ts +22 -1
  145. package/lib/Sparkline/index.js +25 -17
  146. package/lib/Spinner/index.d.ts +6 -1
  147. package/lib/Spinner/index.js +4 -11
  148. package/lib/Success/index.d.ts +5 -21
  149. package/lib/Success/index.js +4 -16
  150. package/lib/Tabs/index.d.ts +12 -26
  151. package/lib/Tabs/index.js +7 -37
  152. package/lib/TextCollapse/index.d.ts +10 -10
  153. package/lib/TextCollapse/index.js +4 -21
  154. package/lib/Theme/index.js +0 -2
  155. package/lib/Theme/theme-provider.d.ts +1 -1
  156. package/lib/Theme/theme.d.ts +4 -1
  157. package/lib/Theme/theme.js +1 -2
  158. package/lib/Typography/index.d.ts +5 -24
  159. package/lib/Typography/index.js +5 -17
  160. package/lib/Util/index.d.ts +11 -6
  161. package/lib/Util/index.js +6 -0
  162. package/lib/Video/index.d.ts +12 -16
  163. package/lib/Video/index.js +0 -14
  164. package/lib/Wallet/Action.d.ts +13 -18
  165. package/lib/Wallet/Action.js +0 -7
  166. package/lib/Wallet/Download.d.ts +24 -30
  167. package/lib/Wallet/Download.js +201 -18
  168. package/lib/Wallet/Open.d.ts +5 -15
  169. package/lib/Wallet/Open.js +5 -11
  170. package/lib/WalletOSIcon/index.d.ts +6 -25
  171. package/lib/WalletOSIcon/index.js +3 -16
  172. package/lib/WebWalletSWKeeper/index.d.ts +8 -20
  173. package/lib/WebWalletSWKeeper/index.js +14 -19
  174. package/lib/WechatPrompt/index.js +2 -0
  175. package/lib/global.d.ts +15 -0
  176. package/lib/type.d.ts +12 -3
  177. package/lib/withTheme/index.d.ts +8 -6
  178. package/lib/withTracker/index.d.ts +1 -1
  179. package/lib/withTracker/index.js +3 -0
  180. package/package.json +9 -5
  181. package/src/Address/did-address.tsx +7 -6
  182. package/src/Address/index.tsx +1 -1
  183. package/src/Avatar/index.jsx +6 -4
  184. package/src/Blocklet/blocklet.jsx +2 -2
  185. package/src/BlockletContext/index.tsx +3 -3
  186. package/src/BlockletNFT/index.jsx +3 -3
  187. package/src/BlockletV2/blocklet.tsx +2 -2
  188. package/src/Button/wrap.jsx +2 -2
  189. package/src/CardSelector/index.tsx +0 -1
  190. package/src/Center/index.tsx +1 -1
  191. package/src/ClickToCopy/copy-button.tsx +4 -4
  192. package/src/ClickToCopy/hook.ts +3 -2
  193. package/src/ClickToCopy/index.tsx +6 -5
  194. package/src/CodeBlock/index.tsx +3 -1
  195. package/src/CookieConsent/{index.jsx → index.tsx} +16 -19
  196. package/src/CountDown/{index.jsx → index.tsx} +30 -16
  197. package/src/DID/index.tsx +9 -8
  198. package/src/Datatable/index.jsx +5 -5
  199. package/src/Dialog/confirm.jsx +3 -3
  200. package/src/Dialog/types.d.ts +1 -1
  201. package/src/DidLogo/{index.jsx → index.tsx} +7 -14
  202. package/src/DriftBot/{index.jsx → index.tsx} +13 -11
  203. package/src/Earth/{index.jsx → index.tsx} +94 -66
  204. package/src/Earth/{util.js → util.ts} +20 -17
  205. package/src/ErrorBoundary/{fallback.jsx → fallback.tsx} +20 -21
  206. package/src/Footer/{index.jsx → index.tsx} +17 -14
  207. package/src/Header/header.tsx +2 -3
  208. package/src/Header/responsive-header.tsx +0 -1
  209. package/src/Icon/image.tsx +3 -3
  210. package/src/Icon/index.tsx +7 -4
  211. package/src/Img/index.jsx +1 -1
  212. package/src/InfoRow/{index.jsx → index.tsx} +32 -25
  213. package/src/Layout/dashboard/external-link.tsx +46 -0
  214. package/src/Layout/dashboard/{full-page.jsx → full-page.tsx} +20 -9
  215. package/src/Layout/dashboard/{index.jsx → index.tsx} +42 -44
  216. package/src/Layout/dashboard/{sidebar.jsx → sidebar.tsx} +23 -20
  217. package/src/Layout/dashboard-legacy/{header.jsx → header.tsx} +16 -26
  218. package/src/Layout/dashboard-legacy/{index.jsx → index.tsx} +32 -46
  219. package/src/Layout/dashboard-legacy/{sidebar.jsx → sidebar.tsx} +27 -19
  220. package/src/Layout/{index.jsx → index.tsx} +41 -47
  221. package/src/LoadingMask/{index.jsx → index.tsx} +17 -19
  222. package/src/Locale/{browser-lang.js → browser-lang.ts} +9 -7
  223. package/src/Locale/context.tsx +18 -11
  224. package/src/Locale/{languages.js → languages.ts} +1 -1
  225. package/src/Locale/{selector.jsx → selector.tsx} +32 -29
  226. package/src/Locale/{util.js → util.ts} +9 -2
  227. package/src/Logo/index.tsx +58 -0
  228. package/src/Metric/{index.jsx → index.tsx} +23 -18
  229. package/src/NFTDisplay/{aspect-ratio-container.jsx → aspect-ratio-container.tsx} +9 -7
  230. package/src/NFTDisplay/{broken.jsx → broken.tsx} +7 -12
  231. package/src/NFTDisplay/{displayApi.js → displayApi.ts} +4 -4
  232. package/src/NFTDisplay/{index.jsx → index.tsx} +59 -64
  233. package/src/NFTDisplay/svg-embedder/{img.jsx → img.tsx} +10 -18
  234. package/src/NFTDisplay/svg-embedder/{inline-svg.jsx → inline-svg.tsx} +8 -9
  235. package/src/NavMenu/nav-menu.tsx +2 -3
  236. package/src/PageScroller/{index.jsx → index.tsx} +40 -53
  237. package/src/PageScroller/{usePrevValue.js → usePrevValue.ts} +2 -3
  238. package/src/Passport/{passport.jsx → passport.tsx} +22 -19
  239. package/src/PoweredByArcBlock/{index.jsx → index.tsx} +6 -11
  240. package/src/PricingTable/{PricingPlan.jsx → PricingPlan.tsx} +15 -5
  241. package/src/PricingTable/{index.jsx → index.tsx} +9 -6
  242. package/src/QRCode/{index.jsx → index.tsx} +13 -17
  243. package/src/RelativeTime/{index.jsx → index.tsx} +24 -24
  244. package/src/Result/{common.jsx → common.tsx} +17 -13
  245. package/src/Result/index.tsx +30 -0
  246. package/src/Result/{result.jsx → result.tsx} +8 -17
  247. package/src/Result/{translations.js → translations.ts} +3 -1
  248. package/src/Screenshot/BaseScreenshot/{index.jsx → index.tsx} +9 -15
  249. package/src/Screenshot/BaseScreenshot/shells/{Macbook.jsx → Macbook.tsx} +3 -1
  250. package/src/Screenshot/BaseScreenshot/shells/{Phone.jsx → Phone.tsx} +3 -1
  251. package/src/Screenshot/{index.jsx → index.tsx} +60 -54
  252. package/src/SessionBlocklet/{index.jsx → index.tsx} +8 -14
  253. package/src/SessionPermission/index.tsx +25 -0
  254. package/src/SessionUser/components/{logged-in.jsx → logged-in.tsx} +49 -31
  255. package/src/SessionUser/components/session-user-item.tsx +97 -0
  256. package/src/SessionUser/components/{session-user-switch.jsx → session-user-switch.tsx} +16 -21
  257. package/src/SessionUser/components/{un-login.jsx → un-login.tsx} +10 -15
  258. package/src/SessionUser/components/{user-info.jsx → user-info.tsx} +16 -22
  259. package/src/SessionUser/index.tsx +26 -0
  260. package/src/SessionUser/libs/{translation.js → translation.ts} +3 -1
  261. package/src/SessionUser/libs/utils.ts +39 -0
  262. package/src/Sparkline/{index.jsx → index.tsx} +38 -22
  263. package/src/Spinner/index.tsx +20 -0
  264. package/src/Success/{index.jsx → index.tsx} +7 -13
  265. package/src/Tabs/{index.jsx → index.tsx} +26 -40
  266. package/src/TextCollapse/{index.jsx → index.tsx} +26 -21
  267. package/src/Theme/index.ts +0 -1
  268. package/src/Theme/theme-provider.tsx +1 -1
  269. package/src/Theme/theme.ts +6 -3
  270. package/src/Typography/{index.jsx → index.tsx} +19 -22
  271. package/src/Util/index.ts +14 -8
  272. package/src/Video/{index.jsx → index.tsx} +7 -10
  273. package/src/Wallet/{Action.jsx → Action.tsx} +16 -12
  274. package/src/Wallet/{Download.jsx → Download.tsx} +25 -21
  275. package/src/Wallet/{Open.jsx → Open.tsx} +8 -11
  276. package/src/WalletOSIcon/{index.jsx → index.tsx} +8 -16
  277. package/src/WebWalletSWKeeper/{index.jsx → index.tsx} +21 -24
  278. package/src/WechatPrompt/{index.jsx → index.tsx} +1 -0
  279. package/src/global.d.ts +15 -0
  280. package/src/type.d.ts +12 -3
  281. package/src/withTheme/{index.jsx → index.tsx} +12 -2
  282. package/src/withTracker/{index.jsx → index.tsx} +6 -4
  283. package/src/Layout/dashboard/external-link.jsx +0 -47
  284. package/src/Logo/index.jsx +0 -66
  285. package/src/Result/index.jsx +0 -33
  286. package/src/SessionPermission/index.jsx +0 -28
  287. package/src/SessionUser/components/session-user-item.jsx +0 -93
  288. package/src/SessionUser/index.jsx +0 -38
  289. package/src/SessionUser/libs/utils.js +0 -37
  290. package/src/Spinner/index.jsx +0 -21
  291. /package/src/ErrorBoundary/{index.jsx → index.ts} +0 -0
  292. /package/src/NFTDisplay/{loading.jsx → loading.tsx} +0 -0
  293. /package/src/Passport/{index.jsx → index.ts} +0 -0
  294. /package/src/SessionManager/{index.jsx → index.tsx} +0 -0
@@ -1,52 +1,33 @@
1
- export function PageNotFound({ locale, ...rest }: {
2
- [x: string]: any;
3
- locale: any;
4
- }): import("react/jsx-runtime").JSX.Element;
5
- export namespace PageNotFound {
6
- let status: string;
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
- [x: string]: any;
10
- locale: any;
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
- [x: string]: any;
18
- locale: any;
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
- [x: string]: any;
26
- locale: any;
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
- [x: string]: any;
34
- locale: any;
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
- [x: string]: any;
42
- locale: any;
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: any): import("react/jsx-runtime").JSX.Element;
49
- export namespace Info {
50
- let status_6: string;
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
  }
@@ -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
  }
@@ -1,19 +1,6 @@
1
- export default ResultWrapper;
2
- declare function ResultWrapper({ status, ...rest }: {
3
- [x: string]: any;
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
- import PropTypes from 'prop-types';
5
+ declare function ResultWrapper({ status, ...rest }: ResultWrapperProps): import("react/jsx-runtime").JSX.Element;
6
+ export default ResultWrapper;
@@ -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;
@@ -1,30 +1,8 @@
1
- export default Result;
2
- declare function Result({ icon, title, description, extra, ...rest }: {
3
- [x: string]: any;
4
- icon: any;
5
- title: any;
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
- import PropTypes from 'prop-types';
7
+ declare function Result({ icon, title, description, extra, ...rest }: ResultProps): import("react/jsx-runtime").JSX.Element;
8
+ export default Result;
@@ -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
- declare namespace _default {
2
- let en: {
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
- export default Screenshot;
2
- declare function Screenshot({ width, children, type, sx, ...rest }: {
3
- [x: string]: any;
4
- width: any;
5
- children: any;
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
- import PropTypes from 'prop-types';
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 function Shell({ ...rest }: {
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 function Shell({ ...rest }: {
2
- [x: string]: any;
3
- }): import("react/jsx-runtime").JSX.Element;
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
- export default Screenshot;
2
- declare function Screenshot({ type, src, children, style, sx, ...rest }: {
3
- [x: string]: any;
4
- type: any;
5
- src: any;
6
- children: any;
7
- style: any;
8
- sx: any;
9
- }): import("react/jsx-runtime").JSX.Element;
10
- declare namespace Screenshot {
11
- namespace propTypes {
12
- let type: PropTypes.Validator<string>;
13
- let src: PropTypes.Requireable<string>;
14
- let style: PropTypes.Requireable<object>;
15
- let sx: PropTypes.Requireable<object>;
16
- let children: PropTypes.Requireable<any>;
17
- }
18
- namespace defaultProps {
19
- let src_1: string;
20
- export { src_1 as src };
21
- let children_1: null;
22
- export { children_1 as children };
23
- let style_1: {};
24
- export { style_1 as style };
25
- let sx_1: {};
26
- export { sx_1 as sx };
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
- import PropTypes from 'prop-types';
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;