@arcblock/ux 3.4.14 → 3.5.0

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.
Files changed (335) hide show
  1. package/lib/Util/constant.d.ts +6 -0
  2. package/lib/Util/constant.js +25 -16
  3. package/lib/package.json.js +1 -1
  4. package/package.json +12 -9
  5. package/src/ActionButton/ActionButton.stories.jsx +0 -61
  6. package/src/ActionButton/index.jsx +0 -106
  7. package/src/ActivityIndicator/ActivityIndicator.stories.jsx +0 -9
  8. package/src/ActivityIndicator/index.jsx +0 -140
  9. package/src/Address/Address.stories.jsx +0 -38
  10. package/src/Address/compact-text.jsx +0 -76
  11. package/src/Address/did-address.tsx +0 -223
  12. package/src/Address/index.tsx +0 -21
  13. package/src/Address/responsive-did-address.tsx +0 -154
  14. package/src/Alert/Alert.stories.jsx +0 -100
  15. package/src/Alert/index.jsx +0 -130
  16. package/src/AnimationWaiter/AnimationWaiter.stories.jsx +0 -35
  17. package/src/AnimationWaiter/dark-animation.json +0 -1
  18. package/src/AnimationWaiter/default-animation.json +0 -1
  19. package/src/AnimationWaiter/index.jsx +0 -296
  20. package/src/Async/index.tsx +0 -44
  21. package/src/Avatar/Avatar.stories.jsx +0 -11
  22. package/src/Avatar/did-motif.jsx +0 -38
  23. package/src/Avatar/etherscan-blockies.js +0 -81
  24. package/src/Avatar/index.jsx +0 -195
  25. package/src/Badge/Badge.stories.jsx +0 -41
  26. package/src/Badge/index.jsx +0 -101
  27. package/src/Blocklet/Blocklet.stories.jsx +0 -21
  28. package/src/Blocklet/blocklet.jsx +0 -276
  29. package/src/Blocklet/index.js +0 -5
  30. package/src/Blocklet/utils.jsx +0 -58
  31. package/src/BlockletContext/index.tsx +0 -72
  32. package/src/BlockletNFT/BlockletNFT.stories.jsx +0 -21
  33. package/src/BlockletNFT/index.jsx +0 -378
  34. package/src/BlockletV2/Blocklet.stories.jsx +0 -34
  35. package/src/BlockletV2/blocklet.tsx +0 -247
  36. package/src/BlockletV2/components/icon-text.tsx +0 -47
  37. package/src/BlockletV2/components/tooltip-icon.tsx +0 -52
  38. package/src/BlockletV2/index.ts +0 -6
  39. package/src/BlockletV2/utils.js +0 -75
  40. package/src/Button/Button.stories.jsx +0 -24
  41. package/src/Button/index.js +0 -9
  42. package/src/Button/wrap.jsx +0 -126
  43. package/src/ButtonGroup/index.js +0 -16
  44. package/src/CardSelector/index.tsx +0 -136
  45. package/src/Center/Center.stories.jsx +0 -20
  46. package/src/Center/index.tsx +0 -33
  47. package/src/ClickToCopy/ClickToCopy.stories.jsx +0 -24
  48. package/src/ClickToCopy/copy-button.tsx +0 -43
  49. package/src/ClickToCopy/hook.ts +0 -42
  50. package/src/ClickToCopy/index.tsx +0 -96
  51. package/src/CloseButton/index.tsx +0 -37
  52. package/src/CodeBlock/CodeBlock.stories.jsx +0 -22
  53. package/src/CodeBlock/LightBox.tsx +0 -87
  54. package/src/CodeBlock/index.tsx +0 -217
  55. package/src/Colors/Colors.stories.jsx +0 -211
  56. package/src/Colors/index.ts +0 -4
  57. package/src/Colors/themes/default.ts +0 -8
  58. package/src/Colors/themes/did-connect.ts +0 -64
  59. package/src/Colors/themes/temp.ts +0 -52
  60. package/src/Config/Config.stories.jsx +0 -16
  61. package/src/Config/config-provider.tsx +0 -62
  62. package/src/Config/index.ts +0 -2
  63. package/src/Config/theme-mode-toggle.tsx +0 -38
  64. package/src/ContactForm/ContactForm.stories.jsx +0 -32
  65. package/src/ContactForm/index.tsx +0 -264
  66. package/src/CookieConsent/CookieConsent.stories.jsx +0 -33
  67. package/src/CookieConsent/index.tsx +0 -104
  68. package/src/CountDown/CountDown.stories.jsx +0 -15
  69. package/src/CountDown/index.tsx +0 -170
  70. package/src/DID/DID.stories.jsx +0 -37
  71. package/src/DID/index.tsx +0 -393
  72. package/src/DIDConnect/app-icon.tsx +0 -37
  73. package/src/DIDConnect/app-info-item.tsx +0 -93
  74. package/src/DIDConnect/auth-apps/auth-apps-info.tsx +0 -77
  75. package/src/DIDConnect/auth-apps/index.tsx +0 -278
  76. package/src/DIDConnect/auth-apps/switch-role.tsx +0 -47
  77. package/src/DIDConnect/did-connect-container.tsx +0 -326
  78. package/src/DIDConnect/did-connect-footer.tsx +0 -76
  79. package/src/DIDConnect/did-connect-logo.tsx +0 -8
  80. package/src/DIDConnect/icons/did-wallet-logo.tsx +0 -18
  81. package/src/DIDConnect/icons/github-logo.tsx +0 -17
  82. package/src/DIDConnect/index.ts +0 -11
  83. package/src/DIDConnect/landing-page.tsx +0 -218
  84. package/src/DIDConnect/powered-by.tsx +0 -48
  85. package/src/DIDConnect/provider-icon.tsx +0 -62
  86. package/src/DIDConnect/request-storage-access-api-dialog.tsx +0 -304
  87. package/src/DIDConnect/with-container.tsx +0 -323
  88. package/src/DIDConnect/with-ux-theme.tsx +0 -22
  89. package/src/DIDLogo/Logo.stories.jsx +0 -11
  90. package/src/DIDLogo/index.tsx +0 -168
  91. package/src/Datatable/CustomToolbar.jsx +0 -415
  92. package/src/Datatable/Datatable.stories.jsx +0 -92
  93. package/src/Datatable/DatatableContext.jsx +0 -35
  94. package/src/Datatable/TableSearch.jsx +0 -166
  95. package/src/Datatable/index.jsx +0 -652
  96. package/src/Datatable/utils.js +0 -161
  97. package/src/Dialog/Dialog.stories.jsx +0 -21
  98. package/src/Dialog/confirm.jsx +0 -143
  99. package/src/Dialog/dialog.jsx +0 -199
  100. package/src/Dialog/index.js +0 -4
  101. package/src/Dialog/types.d.ts +0 -20
  102. package/src/Dialog/use-confirm.jsx +0 -188
  103. package/src/DriftBot/index.tsx +0 -81
  104. package/src/Earth/Earth.stories.jsx +0 -39
  105. package/src/Earth/countries.json +0 -8057
  106. package/src/Earth/index.tsx +0 -515
  107. package/src/Earth/util.ts +0 -72
  108. package/src/Empty/Empty.stories.jsx +0 -23
  109. package/src/Empty/index.jsx +0 -48
  110. package/src/ErrorBoundary/ErrorBoundary.stories.jsx +0 -13
  111. package/src/ErrorBoundary/fallback.tsx +0 -85
  112. package/src/ErrorBoundary/index.ts +0 -1
  113. package/src/Footer/Footer.stories.jsx +0 -13
  114. package/src/Footer/index.tsx +0 -130
  115. package/src/Header/Header.stories.jsx +0 -30
  116. package/src/Header/addon-button.tsx +0 -41
  117. package/src/Header/auto-hidden.tsx +0 -31
  118. package/src/Header/header-addons.tsx +0 -37
  119. package/src/Header/header.tsx +0 -214
  120. package/src/Header/index.ts +0 -3
  121. package/src/Header/responsive-header.tsx +0 -145
  122. package/src/Icon/Icon.stories.jsx +0 -45
  123. package/src/Icon/image.tsx +0 -53
  124. package/src/Icon/index.tsx +0 -63
  125. package/src/Img/Img.stories.jsx +0 -17
  126. package/src/Img/index.jsx +0 -258
  127. package/src/InfoRow/InfoRow.stories.jsx +0 -14
  128. package/src/InfoRow/index.tsx +0 -91
  129. package/src/Layout/Layout.stories.jsx +0 -24
  130. package/src/Layout/dashboard/external-link.tsx +0 -59
  131. package/src/Layout/dashboard/full-page.tsx +0 -58
  132. package/src/Layout/dashboard/index.tsx +0 -260
  133. package/src/Layout/dashboard/sidebar.tsx +0 -198
  134. package/src/Layout/dashboard-legacy/header.tsx +0 -156
  135. package/src/Layout/dashboard-legacy/index.tsx +0 -127
  136. package/src/Layout/dashboard-legacy/sidebar.tsx +0 -129
  137. package/src/Layout/index.tsx +0 -310
  138. package/src/LoadingMask/index.tsx +0 -108
  139. package/src/Locale/LocaleSelector.stories.jsx +0 -44
  140. package/src/Locale/browser-lang.ts +0 -65
  141. package/src/Locale/context.tsx +0 -162
  142. package/src/Locale/languages.ts +0 -58
  143. package/src/Locale/selector.tsx +0 -174
  144. package/src/Locale/util.ts +0 -38
  145. package/src/Logo/Logo.stories.jsx +0 -23
  146. package/src/Logo/images/logo-dark-text.svg +0 -3
  147. package/src/Logo/images/logo-dark-top.svg +0 -6
  148. package/src/Logo/images/logo-light-text.svg +0 -3
  149. package/src/Logo/images/logo-light-top.svg +0 -6
  150. package/src/Logo/index.tsx +0 -58
  151. package/src/Metric/Metric.stories.jsx +0 -29
  152. package/src/Metric/index.tsx +0 -130
  153. package/src/MuiWrap/index.tsx +0 -10
  154. package/src/NFTDisplay/NFTBroken.svg +0 -34
  155. package/src/NFTDisplay/NFTDisplay.stories.jsx +0 -30
  156. package/src/NFTDisplay/README.md +0 -59
  157. package/src/NFTDisplay/aspect-ratio-container.tsx +0 -36
  158. package/src/NFTDisplay/broken.tsx +0 -51
  159. package/src/NFTDisplay/displayApi.ts +0 -43
  160. package/src/NFTDisplay/index.tsx +0 -393
  161. package/src/NFTDisplay/loading.tsx +0 -16
  162. package/src/NFTDisplay/preview.tsx +0 -84
  163. package/src/NFTDisplay/render-svg.tsx +0 -21
  164. package/src/NFTDisplay/svg-embedder/img.tsx +0 -27
  165. package/src/NFTDisplay/svg-embedder/inline-svg.tsx +0 -36
  166. package/src/NavMenu/NavMenu.stories.jsx +0 -17
  167. package/src/NavMenu/images/OCAP.svg +0 -1
  168. package/src/NavMenu/images/abt-network.svg +0 -1
  169. package/src/NavMenu/images/ai-kit.svg +0 -1
  170. package/src/NavMenu/images/aigne-image-smith.svg +0 -1
  171. package/src/NavMenu/images/aigne.svg +0 -1
  172. package/src/NavMenu/images/aistro.png +0 -0
  173. package/src/NavMenu/images/arcsphere.svg +0 -1
  174. package/src/NavMenu/images/blocklet-framework.svg +0 -1
  175. package/src/NavMenu/images/blocklet-launcher.svg +0 -1
  176. package/src/NavMenu/images/blocklet-server.svg +0 -1
  177. package/src/NavMenu/images/blocklet-store.svg +0 -1
  178. package/src/NavMenu/images/creator-studio.svg +0 -1
  179. package/src/NavMenu/images/did-wallet.svg +0 -1
  180. package/src/NavMenu/images/did.svg +0 -1
  181. package/src/NavMenu/images/nft-studio.svg +0 -1
  182. package/src/NavMenu/images/payment-kit.png +0 -0
  183. package/src/NavMenu/images/vc.svg +0 -1
  184. package/src/NavMenu/images/web3-kit.svg +0 -1
  185. package/src/NavMenu/index.ts +0 -3
  186. package/src/NavMenu/nav-menu-context.tsx +0 -30
  187. package/src/NavMenu/nav-menu.tsx +0 -441
  188. package/src/NavMenu/products.tsx +0 -830
  189. package/src/NavMenu/style.ts +0 -258
  190. package/src/NavMenu/sub-container.tsx +0 -125
  191. package/src/NavMenu/sub-item-group.tsx +0 -42
  192. package/src/OrgTransfer/index.tsx +0 -53
  193. package/src/OrgTransfer/locales.ts +0 -25
  194. package/src/OrgTransfer/selector.tsx +0 -252
  195. package/src/OrgTransfer/type.ts +0 -31
  196. package/src/PageScroller/index.tsx +0 -316
  197. package/src/PageScroller/story/FifthComponent.jsx +0 -7
  198. package/src/PageScroller/story/FirstComponent.jsx +0 -7
  199. package/src/PageScroller/story/FourthComponent.jsx +0 -7
  200. package/src/PageScroller/story/FullPage.jsx +0 -55
  201. package/src/PageScroller/story/PageContain.jsx +0 -59
  202. package/src/PageScroller/story/PageScroller.stories.jsx +0 -18
  203. package/src/PageScroller/story/SecondComponent.jsx +0 -7
  204. package/src/PageScroller/story/ThirdComponent.jsx +0 -7
  205. package/src/PageScroller/story/index.css +0 -115
  206. package/src/PageScroller/usePrevValue.ts +0 -11
  207. package/src/Passport/index.ts +0 -3
  208. package/src/Passport/passport.tsx +0 -118
  209. package/src/PhoneInput/PhoneInput.stories.jsx +0 -12
  210. package/src/PhoneInput/country-select.tsx +0 -148
  211. package/src/PhoneInput/index.tsx +0 -269
  212. package/src/PoweredByArcBlock/index.tsx +0 -27
  213. package/src/PricingTable/PricingPlan.tsx +0 -120
  214. package/src/PricingTable/PricingTable.stories.jsx +0 -38
  215. package/src/PricingTable/index.tsx +0 -59
  216. package/src/QRCode/QRCode.stories.jsx +0 -13
  217. package/src/QRCode/index.tsx +0 -66
  218. package/src/RelativeTime/RelativeTime.stories.jsx +0 -20
  219. package/src/RelativeTime/index.tsx +0 -334
  220. package/src/Result/Result.stories.jsx +0 -61
  221. package/src/Result/common.tsx +0 -119
  222. package/src/Result/index.tsx +0 -30
  223. package/src/Result/result.tsx +0 -65
  224. package/src/Result/translations.ts +0 -57
  225. package/src/Screenshot/BaseScreenshot/index.tsx +0 -73
  226. package/src/Screenshot/BaseScreenshot/shells/Macbook.tsx +0 -38
  227. package/src/Screenshot/BaseScreenshot/shells/Phone.tsx +0 -35
  228. package/src/Screenshot/Screenshot.stories.jsx +0 -44
  229. package/src/Screenshot/devices.css +0 -1366
  230. package/src/Screenshot/index.tsx +0 -300
  231. package/src/SessionBlocklet/index.tsx +0 -178
  232. package/src/SessionManager/SessionManager.stories.jsx +0 -9
  233. package/src/SessionManager/index.tsx +0 -3
  234. package/src/SessionPermission/index.tsx +0 -26
  235. package/src/SessionUser/components/did-space.tsx +0 -68
  236. package/src/SessionUser/components/logged-in.tsx +0 -338
  237. package/src/SessionUser/components/quick-login-item.tsx +0 -132
  238. package/src/SessionUser/components/session-user-item.tsx +0 -93
  239. package/src/SessionUser/components/session-user-switch.tsx +0 -240
  240. package/src/SessionUser/components/un-login.tsx +0 -257
  241. package/src/SessionUser/components/user-info.tsx +0 -201
  242. package/src/SessionUser/index.tsx +0 -68
  243. package/src/SessionUser/libs/translation.ts +0 -30
  244. package/src/SessionUser/libs/utils.ts +0 -39
  245. package/src/SharedBridge/index.tsx +0 -126
  246. package/src/SocialShare/index.tsx +0 -194
  247. package/src/Sparkline/Sparkline.stories.jsx +0 -13
  248. package/src/Sparkline/index.tsx +0 -231
  249. package/src/Spinner/Spinner.stories.jsx +0 -98
  250. package/src/Spinner/index.tsx +0 -20
  251. package/src/SplitButton/SplitButton.stories.jsx +0 -32
  252. package/src/SplitButton/index.tsx +0 -116
  253. package/src/SplitButton/useClickAway.tsx +0 -24
  254. package/src/Success/index.tsx +0 -175
  255. package/src/Switch/Switch.stories.jsx +0 -16
  256. package/src/Switch/index.jsx +0 -79
  257. package/src/Tabs/Tabs.stories.jsx +0 -18
  258. package/src/Tabs/index.tsx +0 -255
  259. package/src/Tag/Tag.stories.jsx +0 -15
  260. package/src/Tag/index.jsx +0 -106
  261. package/src/TextCollapse/TextCollapse.stories.jsx +0 -73
  262. package/src/TextCollapse/index.tsx +0 -85
  263. package/src/Theme/Theme.stories.jsx +0 -11
  264. package/src/Theme/index.ts +0 -21
  265. package/src/Theme/theme-provider.tsx +0 -374
  266. package/src/Theme/theme.ts +0 -229
  267. package/src/Toast/Toast.stories.jsx +0 -28
  268. package/src/Toast/index.tsx +0 -80
  269. package/src/Typography/index.tsx +0 -124
  270. package/src/UserCard/Cards/avatar-only.tsx +0 -27
  271. package/src/UserCard/Cards/basic-info.tsx +0 -43
  272. package/src/UserCard/Cards/index.tsx +0 -16
  273. package/src/UserCard/Cards/social-actions.tsx +0 -196
  274. package/src/UserCard/Container/card.tsx +0 -63
  275. package/src/UserCard/Container/dialog.tsx +0 -37
  276. package/src/UserCard/Content/basic.tsx +0 -330
  277. package/src/UserCard/Content/clock.tsx +0 -82
  278. package/src/UserCard/Content/minimal.tsx +0 -113
  279. package/src/UserCard/Content/shorten-label.tsx +0 -32
  280. package/src/UserCard/Content/tooltip-avatar.tsx +0 -80
  281. package/src/UserCard/UserCard.stories.jsx +0 -19
  282. package/src/UserCard/components.tsx +0 -81
  283. package/src/UserCard/index.tsx +0 -132
  284. package/src/UserCard/types.ts +0 -165
  285. package/src/UserCard/use-follow.tsx +0 -111
  286. package/src/UserCard/utils.ts +0 -155
  287. package/src/Util/WebWalletOpener.stories.jsx +0 -5
  288. package/src/Util/client.ts +0 -4
  289. package/src/Util/constant.ts +0 -60
  290. package/src/Util/deprecate.tsx +0 -29
  291. package/src/Util/federated.ts +0 -125
  292. package/src/Util/iframe.ts +0 -19
  293. package/src/Util/index.ts +0 -760
  294. package/src/Util/logger.ts +0 -44
  295. package/src/Util/passport.ts +0 -127
  296. package/src/Util/security.ts +0 -72
  297. package/src/Util/style.ts +0 -17
  298. package/src/Util/wallet.ts +0 -35
  299. package/src/VerificationCode/index.tsx +0 -83
  300. package/src/Video/Video.stories.jsx +0 -6
  301. package/src/Video/index.tsx +0 -70
  302. package/src/Wallet/Action.stories.jsx +0 -8
  303. package/src/Wallet/Action.tsx +0 -118
  304. package/src/Wallet/Download.stories.jsx +0 -9
  305. package/src/Wallet/Download.tsx +0 -157
  306. package/src/Wallet/Open.tsx +0 -47
  307. package/src/Wallet/OpenInWallet.stories.jsx +0 -5
  308. package/src/Wallet/images/abtwallet.png +0 -0
  309. package/src/Wallet/images/android_download.svg +0 -22
  310. package/src/Wallet/images/app-store.svg +0 -30
  311. package/src/Wallet/images/google-play.svg +0 -69
  312. package/src/WalletOSIcon/index.tsx +0 -47
  313. package/src/WebWalletSWKeeper/index.tsx +0 -117
  314. package/src/WechatPrompt/images/android.png +0 -0
  315. package/src/WechatPrompt/images/ios.png +0 -0
  316. package/src/WechatPrompt/index.tsx +0 -75
  317. package/src/global.d.ts +0 -28
  318. package/src/hooks/use-blocklet-logo.tsx +0 -32
  319. package/src/hooks/use-clock.tsx +0 -62
  320. package/src/hooks/use-location-state.tsx +0 -117
  321. package/src/hooks/use-mobile.tsx +0 -6
  322. package/src/index.ts +0 -79
  323. package/src/type.d.ts +0 -44
  324. package/src/withTheme/index.tsx +0 -72
  325. package/src/withTracker/README.md +0 -37
  326. package/src/withTracker/action/bind-wallet.tsx +0 -17
  327. package/src/withTracker/action/login.tsx +0 -18
  328. package/src/withTracker/action/pay.tsx +0 -14
  329. package/src/withTracker/action/switch-passport.tsx +0 -20
  330. package/src/withTracker/constant/index.tsx +0 -3
  331. package/src/withTracker/env.tsx +0 -1
  332. package/src/withTracker/error_boundary.jsx +0 -34
  333. package/src/withTracker/index.tsx +0 -50
  334. package/src/withTracker/libs/utm.ts +0 -46
  335. package/vite.config.mjs +0 -37
@@ -48,3 +48,9 @@ export declare const OAUTH_PROVIDER: {
48
48
  };
49
49
  export declare const DID_CONNECT_SMALL_WIDTH = 380;
50
50
  export declare const DID_CONNECT_MEDIUM_WIDTH = 576;
51
+ export declare const LAST_USED_LOGIN_METHOD = "last-used-login-method";
52
+ export declare const WALLET_LOGIN_METHOD: {
53
+ MOBILE: string;
54
+ WEB: string;
55
+ SCAN: string;
56
+ };
@@ -1,4 +1,4 @@
1
- const e = 300, T = 1800, t = "/.well-known/service", I = "login_token", _ = "refresh_token", o = "/.well-known/service", A = "/api/did", n = `${t}/admin/overview`, s = `${t}/user`, O = `${t}/user/did-spaces`, R = `${t}/admin/navigation`, D = "did:abt:", L = {
1
+ const e = 300, T = 1800, t = "/.well-known/service", _ = "login_token", I = "refresh_token", o = "/.well-known/service", n = "/api/did", s = `${t}/admin/overview`, A = `${t}/user`, O = `${t}/user/did-spaces`, L = `${t}/admin/navigation`, l = "did:abt:", D = {
2
2
  VALID: "valid",
3
3
  REVOKED: "revoked"
4
4
  }, E = {
@@ -11,7 +11,7 @@ const e = 300, T = 1800, t = "/.well-known/service", I = "login_token", _ = "ref
11
11
  NFT: "nft",
12
12
  PASSKEY: "passkey",
13
13
  TWITTER: "twitter"
14
- }, i = {
14
+ }, R = {
15
15
  [E.EMAIL]: "Email",
16
16
  [E.AUTH0]: "Auth0",
17
17
  [E.APPLE]: "Apple",
@@ -22,32 +22,41 @@ const e = 300, T = 1800, t = "/.well-known/service", I = "login_token", _ = "ref
22
22
  [E.PASSKEY]: "Passkey",
23
23
  [E.TWITTER]: "X (Twitter)",
24
24
  federated: "Federated"
25
- }, a = 16, c = {
25
+ }, a = 16, i = {
26
26
  email: "Email",
27
27
  auth0: "Auth0",
28
28
  apple: "Apple",
29
29
  github: "Github",
30
30
  google: "Google",
31
31
  twitter: "X (Twitter)"
32
- }, l = 380, P = 576;
32
+ }, c = 380, S = 576, N = "last-used-login-method", P = {
33
+ MOBILE: "wallet",
34
+ // 移动端(WebView 内 / Deeplink 唤起)
35
+ WEB: "wallet-web",
36
+ // Web Wallet / 浏览器扩展
37
+ SCAN: "wallet-scan"
38
+ // 桌面浏览器扫码
39
+ };
33
40
  export {
34
- A as API_DID_PREFIX,
41
+ n as API_DID_PREFIX,
35
42
  t as BLOCKLET_SERVICE_PATH_PREFIX,
36
- n as DASHBOARD_URL,
43
+ s as DASHBOARD_URL,
37
44
  e as DEFAULT_TIMEOUT,
38
45
  T as DEFAULT_WINDOW_TIMEOUT,
39
- P as DID_CONNECT_MEDIUM_WIDTH,
40
- l as DID_CONNECT_SMALL_WIDTH,
41
- D as DID_PREFIX,
46
+ S as DID_CONNECT_MEDIUM_WIDTH,
47
+ c as DID_CONNECT_SMALL_WIDTH,
48
+ l as DID_PREFIX,
42
49
  O as DID_SPACE_URL,
50
+ N as LAST_USED_LOGIN_METHOD,
43
51
  E as LOGIN_PROVIDER,
44
52
  a as LOGIN_PROVIDER_ICON_SIZE,
45
- i as LOGIN_PROVIDER_NAME,
46
- R as NAVIGATION_URL,
47
- c as OAUTH_PROVIDER,
48
- L as PASSPORT_STATUS,
49
- s as PROFILE_URL,
50
- _ as REFRESH_TOKEN_STORAGE_KEY,
53
+ R as LOGIN_PROVIDER_NAME,
54
+ L as NAVIGATION_URL,
55
+ i as OAUTH_PROVIDER,
56
+ D as PASSPORT_STATUS,
57
+ A as PROFILE_URL,
58
+ I as REFRESH_TOKEN_STORAGE_KEY,
51
59
  o as RELAY_SOCKET_PREFIX,
52
- I as SESSION_TOKEN_STORAGE_KEY
60
+ _ as SESSION_TOKEN_STORAGE_KEY,
61
+ P as WALLET_LOGIN_METHOD
53
62
  };
@@ -1,4 +1,4 @@
1
- const e = "3.4.14", s = { "@blocklet/js-sdk": "^1.17.7" }, n = {
1
+ const e = "3.5.0", s = { "@blocklet/js-sdk": "^1.17.7" }, n = {
2
2
  version: e,
3
3
  dependencies: s
4
4
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcblock/ux",
3
- "version": "3.4.14",
3
+ "version": "3.5.0",
4
4
  "description": "Common used react components for arcblock products",
5
5
  "keywords": [
6
6
  "react",
@@ -36,6 +36,9 @@
36
36
  "**/*.svg?react",
37
37
  "**/*.svg"
38
38
  ],
39
+ "files": [
40
+ "lib"
41
+ ],
39
42
  "publishConfig": {
40
43
  "access": "public"
41
44
  },
@@ -74,16 +77,16 @@
74
77
  "react": "^19.0.0",
75
78
  "react-router-dom": "^6.22.3"
76
79
  },
77
- "gitHead": "d663390d3c6a9b2d8d71790c770dd0025ae309de",
80
+ "gitHead": "1cfc816004525cf1b352ec2b64d459f4769f0237",
78
81
  "dependencies": {
79
- "@arcblock/bridge": "3.4.14",
80
- "@arcblock/did": "^1.28.8",
82
+ "@arcblock/bridge": "3.5.0",
83
+ "@arcblock/did": "^1.29.4",
81
84
  "@arcblock/did-motif": "^1.1.14",
82
- "@arcblock/icons": "3.4.14",
83
- "@arcblock/nft-display": "3.4.14",
84
- "@arcblock/react-hooks": "3.4.14",
85
+ "@arcblock/icons": "3.5.0",
86
+ "@arcblock/nft-display": "3.5.0",
87
+ "@arcblock/react-hooks": "3.5.0",
85
88
  "@blocklet/js-sdk": "^1.17.7",
86
- "@blocklet/theme": "3.4.14",
89
+ "@blocklet/theme": "3.5.0",
87
90
  "@fontsource/roboto": "~5.1.1",
88
91
  "@fontsource/ubuntu-mono": "^5.2.6",
89
92
  "@iconify-icons/logos": "^1.2.36",
@@ -91,7 +94,7 @@
91
94
  "@iconify-icons/mdi": "^1.2.48",
92
95
  "@iconify-icons/tabler": "^1.2.95",
93
96
  "@iconify/react": "^5.2.1",
94
- "@ocap/mcrypto": "^1.28.8",
97
+ "@ocap/mcrypto": "^1.29.4",
95
98
  "@solana/qr-code-styling": "^1.6.0",
96
99
  "@types/dompurify": "^3.2.0",
97
100
  "@types/mui-datatables": "^4.3.12",
@@ -1,61 +0,0 @@
1
- import { createTheme, ThemeProvider } from '../Theme';
2
- import ActionButton from '.';
3
-
4
- export default {
5
- title: 'Deprecated/ActionButton',
6
-
7
- parameters: {
8
- readme: {
9
- sidebar: '<!-- PROPS -->',
10
- },
11
- },
12
- };
13
-
14
- export function WithDifferentColor() {
15
- return (
16
- <ThemeProvider theme={createTheme()}>
17
- <div>
18
- <ActionButton href="/" theme="inherit">
19
- Default Button
20
- </ActionButton>
21
- <ActionButton href="/" theme="primary">
22
- Primary Button
23
- </ActionButton>
24
- <ActionButton href="/" theme="secondary">
25
- Secondary Button
26
- </ActionButton>
27
- <ActionButton href="/" theme="reverse">
28
- Reverse Button
29
- </ActionButton>
30
- </div>
31
- </ThemeProvider>
32
- );
33
- }
34
-
35
- WithDifferentColor.storyName = 'with different color';
36
-
37
- export function WithDifferentVariant() {
38
- return (
39
- <ThemeProvider theme={createTheme()}>
40
- <div>
41
- <ActionButton href="/" variant="text">
42
- Text Button
43
- </ActionButton>
44
- <ActionButton href="/" variant="outlined">
45
- Outlined Button
46
- </ActionButton>
47
- <ActionButton href="/" variant="contained">
48
- Contained Button
49
- </ActionButton>
50
-
51
- <div style={{ background: '#222', padding: 12, marginTop: 24 }}>
52
- <ActionButton href="/" variant="contained" theme="reverse">
53
- Contained Reverse Button
54
- </ActionButton>
55
- </div>
56
- </div>
57
- </ThemeProvider>
58
- );
59
- }
60
-
61
- WithDifferentVariant.storyName = 'with different variant';
@@ -1,106 +0,0 @@
1
- import PropTypes from 'prop-types';
2
- import isUndefined from 'lodash/isUndefined';
3
-
4
- import Button from '../Button';
5
- import { mergeProps } from '../Util';
6
- import { withDeprecated } from '../Util/deprecate';
7
-
8
- /**
9
- * Action button component
10
- * @typedef {{
11
- * href: string;
12
- * children?: import('react').ReactNode;
13
- * gradient?: string;
14
- * color?: string;
15
- * icon?: string;
16
- * border?: string;
17
- * text?: string;
18
- * theme?: string;
19
- * variant?: string;
20
- * size?: string;
21
- * width?: string;
22
- * }} ActionButtonProps
23
- */
24
-
25
- /**
26
- * Action button component
27
- * @param {ActionButtonProps} props
28
- * @returns {JSX.Element}
29
- */
30
- function ActionButton({ ...rawProps }) {
31
- const props = Object.assign({}, rawProps);
32
- if (isUndefined(props.gradient)) {
33
- props.gradient = '';
34
- }
35
- if (isUndefined(props.icon)) {
36
- props.icon = '';
37
- }
38
- if (isUndefined(props.text)) {
39
- props.text = '';
40
- }
41
- if (isUndefined(props.color)) {
42
- props.color = '';
43
- }
44
- if (isUndefined(props.border)) {
45
- props.border = '';
46
- }
47
- if (isUndefined(props.width)) {
48
- props.width = '';
49
- }
50
- if (isUndefined(props.theme)) {
51
- props.theme = 'inherit';
52
- }
53
- if (isUndefined(props.variant)) {
54
- props.variant = 'outlined';
55
- }
56
- if (isUndefined(props.size)) {
57
- props.size = 'large';
58
- }
59
- /** @type {ActionButtonProps & {}} */
60
- const newProps = mergeProps(props, ActionButton);
61
- const { href, icon, size, color, theme, variant, gradient, children, text, ...rest } = newProps;
62
-
63
- /** @type {import('react').CSSProperties} */
64
- const styles = {};
65
- if (gradient) {
66
- styles.backgroundImage = gradient;
67
- styles.borderColor = 'transparent';
68
- }
69
- const attrs = ['color', 'border', 'width'];
70
- attrs.forEach((x) => {
71
- if (newProps[x]) {
72
- styles[x] = newProps[x];
73
- }
74
- });
75
-
76
- return (
77
- <Button
78
- color={theme}
79
- href={href}
80
- target="_blank"
81
- variant={variant}
82
- style={styles}
83
- size={size}
84
- className="action-button"
85
- {...rest}>
86
- {!!icon && <i className={icon} />}
87
- {text || children}
88
- </Button>
89
- );
90
- }
91
-
92
- ActionButton.propTypes = {
93
- href: PropTypes.string.isRequired,
94
- children: PropTypes.any,
95
- gradient: PropTypes.string,
96
- color: PropTypes.string,
97
- icon: PropTypes.string,
98
- border: PropTypes.string,
99
- text: PropTypes.string,
100
- theme: PropTypes.string,
101
- variant: PropTypes.string,
102
- size: PropTypes.string,
103
- width: PropTypes.string,
104
- };
105
-
106
- export default withDeprecated(ActionButton, { name: 'ActionButton' });
@@ -1,9 +0,0 @@
1
- import ActivityIndicator from '.';
2
-
3
- export { default as Basic } from './demo/basic';
4
- export { default as WithCustomMessages } from './demo/with-custom-messages';
5
-
6
- export default {
7
- title: 'Feedback/ActivityIndicator',
8
- component: ActivityIndicator,
9
- };
@@ -1,140 +0,0 @@
1
- import { useEffect, useState } from 'react';
2
- import PropTypes from 'prop-types';
3
- import { green, blue } from '@mui/material/colors';
4
-
5
- import Logo from '../Logo';
6
- import { styled, useTheme } from '../Theme';
7
-
8
- /**
9
- * ActivityIndicator is used when we want to tell the user the request they made on the UI will take time.
10
- * @typedef {{
11
- * interval?: number;
12
- * messages: string[];
13
- * } & import('react').ComponentPropsWithoutRef<"div"> } ActivityIndicatorProps
14
- */
15
-
16
- /**
17
- * @description ActivityIndicator is used when we want to tell the user the request they made on the UI will take time.
18
- * @param {ActivityIndicatorProps} props
19
- * @returns {JSX.Element}
20
- */
21
- export default function ActivityIndicator({ messages = ['Loading data...'], interval = 3000, ...rest }) {
22
- const [index, setIndex] = useState(0);
23
- const { palette } = useTheme();
24
-
25
- useEffect(() => {
26
- const timer = setInterval(() => {
27
- setIndex((index + 1) % messages.length);
28
- }, interval);
29
-
30
- return () => {
31
- clearTimeout(timer);
32
- };
33
- });
34
-
35
- return (
36
- <Div {...rest}>
37
- <div className="pm-loader-container">
38
- <div className="pm-loader-text">
39
- <p>{messages[index]}</p>
40
- </div>
41
- <div className="pm-loader-atoms">
42
- <Logo style={{ transform: 'scale(0.6)' }} showText={false} />
43
- <Orbit size={56} orbitColor={green[500]} atomColor={green[500]} duration={1} />
44
- <Orbit size={80} orbitColor={blue[800]} atomColor={blue[800]} duration={1.5} />
45
- <Orbit size={100} orbitColor={palette.grey[900]} atomColor={palette.grey[900]} />
46
- </div>
47
- </div>
48
- </Div>
49
- );
50
- }
51
-
52
- ActivityIndicator.propTypes = {
53
- interval: PropTypes.number,
54
- messages: PropTypes.arrayOf(PropTypes.string.isRequired),
55
- };
56
-
57
- const Div = styled('div')`
58
- && {
59
- box-sizing: border-box;
60
- padding: 20px;
61
- width: 100%;
62
- height: 100%;
63
- min-height: 360px;
64
- z-index: 100;
65
- transition: opacity 0.5s linear;
66
- display: flex;
67
- align-items: center;
68
- flex-direction: column;
69
- justify-content: center;
70
- }
71
-
72
- .pm-loader-text {
73
- color: ${({ theme }) => theme.palette.grey[900]};
74
- font-size: 14px;
75
- text-align: center;
76
- position: relative;
77
- height: 70px;
78
- -webkit-user-select: none;
79
- }
80
-
81
- .pm-loader-container {
82
- width: 100%;
83
- height: 100%;
84
- display: flex;
85
- align-items: center;
86
- flex-direction: column;
87
- justify-content: center;
88
- flex: 1;
89
- }
90
-
91
- .pm-loader-atoms {
92
- width: 100px;
93
- height: 100px;
94
- display: flex;
95
- position: relative;
96
- align-items: center;
97
- justify-content: center;
98
- }
99
- `;
100
-
101
- function Orbit({ size, orbitColor, atomColor, duration = 2, ...rest }) {
102
- return (
103
- <OrbitRoot $duration={duration} style={{ width: size, height: size, border: `1px solid ${orbitColor}` }} {...rest}>
104
- <div style={{ background: atomColor }} />
105
- </OrbitRoot>
106
- );
107
- }
108
-
109
- Orbit.propTypes = {
110
- size: PropTypes.number.isRequired,
111
- orbitColor: PropTypes.string.isRequired,
112
- atomColor: PropTypes.string.isRequired,
113
- duration: PropTypes.number,
114
- };
115
-
116
- const OrbitRoot = styled('div')`
117
- @keyframes orbit {
118
- 0% {
119
- transform: rotate(0deg);
120
- }
121
- 100% {
122
- transform: rotate(360deg);
123
- }
124
- }
125
-
126
- position: absolute;
127
- border-radius: 50%;
128
- animation: orbit ${({ $duration }) => $duration}s infinite;
129
- animation-timing-function: linear;
130
- transform-origin: center;
131
-
132
- > div {
133
- position: absolute;
134
- top: 50%;
135
- width: 6px;
136
- height: 6px;
137
- transform: translateX(-50%);
138
- border-radius: 50%;
139
- }
140
- `;
@@ -1,38 +0,0 @@
1
- import { styled } from '../Theme';
2
-
3
- export { default as WithDifferentSizes } from './demo/with-different-sizes';
4
- export { default as Copyable } from './demo/copyable';
5
- export { default as CompactMode } from './demo/compact-mode';
6
- export { default as WithInheritSize } from './demo/with-inherit-size';
7
- export { default as ResponsiveFontSize } from './demo/responsive-font-size';
8
- export { default as InlineElementBlockElement } from './demo/inline-element-block-element';
9
- export { default as DynamicTagname } from './demo/dynamic-tagname';
10
- export { default as NonResponsiveCompact } from './demo/non-responsive-compact';
11
- export { default as CopyTextI18N } from './demo/copy-text-i18n';
12
- export { default as PrependAppend } from './demo/prepend-append';
13
-
14
- export default {
15
- title: 'DID/Address',
16
- parameters: {},
17
- decorators: [
18
- (StoryFn) => (
19
- <ResizableContainer>
20
- <StoryFn />
21
- </ResizableContainer>
22
- ),
23
- ],
24
- };
25
-
26
- const ResizableContainer = styled('div')`
27
- width: 600px;
28
- max-width: 100%;
29
- padding: 16px;
30
- border: 1px solid #ddd;
31
- overflow: auto;
32
- background: #fff;
33
- resize: both;
34
-
35
- > * + * {
36
- margin-top: 16px;
37
- }
38
- `;
@@ -1,76 +0,0 @@
1
- import { Children } from 'react';
2
- import PropTypes from 'prop-types';
3
- import { Box, Tooltip, tooltipClasses } from '@mui/material';
4
- import { styled } from '../Theme';
5
- import { CopyButton } from '../ClickToCopy';
6
-
7
- const StyledTooltip = styled(({ className, ...props }) => <Tooltip {...props} classes={{ popper: className }} />)({
8
- [`& .${tooltipClasses.tooltip}`]: {
9
- maxWidth: 360,
10
- wordBreak: 'break-all',
11
- },
12
- });
13
-
14
- // 递归, 将 text (string) 部分替换为 CompactText (保持元素结构)
15
- // eslint-disable-next-line react/prop-types
16
- function RecursiveWrapper({ children, ...rest }) {
17
- const wrappedChildren = Children.map(children, (child) => {
18
- if (typeof child === 'string') {
19
- return <CompactText {...rest}>{child}</CompactText>;
20
- }
21
- if (child.props && child.props.children) {
22
- return (
23
- <child.type {...child.props}>
24
- <RecursiveWrapper {...rest}>{child.props.children}</RecursiveWrapper>
25
- </child.type>
26
- );
27
- }
28
- return child;
29
- });
30
- return wrappedChildren;
31
- }
32
-
33
- /**
34
- * 紧凑文本组件 (显示首尾, 中间截断显示省略号), 仅考虑等宽字体的情况
35
- */
36
- export default function CompactText({ startChars = 6, endChars = 6, children, showCopyButtonInTooltip = false }) {
37
- if (typeof children !== 'string') {
38
- return (
39
- <RecursiveWrapper startChars={startChars} endChars={endChars} showCopyButtonInTooltip={showCopyButtonInTooltip}>
40
- {children}
41
- </RecursiveWrapper>
42
- );
43
- }
44
-
45
- // stopPropagation: 当 tooltip 处于 link 中时, 避免点击复制时触发链接跳转
46
- const tooltipContent = (
47
- <Box
48
- onClick={(e) => e.stopPropagation()}
49
- sx={{
50
- display: 'flex',
51
- alignItems: 'center',
52
- lineHeight: 1,
53
- }}>
54
- <Box>{children}</Box>
55
- {showCopyButtonInTooltip && (
56
- <CopyButton content={children} showTooltip={false} style={{ fontSize: 16, marginLeft: 4 }} />
57
- )}
58
- </Box>
59
- );
60
-
61
- return (
62
- <StyledTooltip title={tooltipContent} placement="top">
63
- <span>
64
- {children.slice(0, startChars)}...{children.slice(children.length - endChars)}
65
- </span>
66
- </StyledTooltip>
67
- );
68
- }
69
-
70
- CompactText.propTypes = {
71
- startChars: PropTypes.number,
72
- endChars: PropTypes.number,
73
- children: PropTypes.node.isRequired,
74
- // 在 tooltip 中完整地址后显示复制按钮
75
- showCopyButtonInTooltip: PropTypes.bool,
76
- };