@arcblock/ux 3.0.6 → 3.0.8

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 (253) hide show
  1. package/lib/ActionButton/index.d.ts +1 -1
  2. package/lib/ActionButton/index.js +1 -1
  3. package/lib/Address/compact-text.d.ts +1 -1
  4. package/lib/Address/compact-text.js +5 -5
  5. package/lib/Address/did-address.js +1 -1
  6. package/lib/Address/index.js +5 -5
  7. package/lib/Address/responsive-did-address.js +14 -14
  8. package/lib/Alert/index.d.ts +1 -1
  9. package/lib/Alert/index.js +1 -1
  10. package/lib/Avatar/index.d.ts +1 -1
  11. package/lib/Avatar/index.js +1 -1
  12. package/lib/Badge/index.js +1 -1
  13. package/lib/BlockletContext/index.d.ts +1 -1
  14. package/lib/BlockletNFT/index.js +1 -1
  15. package/lib/BlockletV2/blocklet.d.ts +1 -1
  16. package/lib/BlockletV2/blocklet.js +1 -1
  17. package/lib/BlockletV2/components/icon-text.d.ts +1 -1
  18. package/lib/BlockletV2/components/icon-text.js +13 -13
  19. package/lib/BlockletV2/components/tooltip-icon.js +22 -20
  20. package/lib/Button/wrap.js +1 -1
  21. package/lib/Center/index.js +3 -3
  22. package/lib/ClickToCopy/copy-button.js +3 -3
  23. package/lib/CloseButton/index.js +1 -1
  24. package/lib/ContactForm/index.js +22 -21
  25. package/lib/DID/index.js +45 -44
  26. package/lib/DIDConnect/app-info-item.js +1 -1
  27. package/lib/DIDConnect/auth-apps/index.js +48 -48
  28. package/lib/DIDConnect/did-connect-container.js +22 -22
  29. package/lib/DIDConnect/did-connect-footer.js +1 -1
  30. package/lib/DIDConnect/landing-page.js +27 -27
  31. package/lib/DIDConnect/request-storage-access-api-dialog.js +39 -40
  32. package/lib/Datatable/CustomToolbar.d.ts +3 -1
  33. package/lib/Datatable/CustomToolbar.js +1 -1
  34. package/lib/Datatable/index.js +2 -2
  35. package/lib/Dialog/confirm.d.ts +1 -1
  36. package/lib/Dialog/confirm.js +12 -12
  37. package/lib/Earth/index.js +1 -1
  38. package/lib/Footer/index.d.ts +1 -1
  39. package/lib/Footer/index.js +5 -5
  40. package/lib/Header/addon-button.d.ts +1 -1
  41. package/lib/Header/addon-button.js +11 -6
  42. package/lib/Header/header.js +1 -1
  43. package/lib/Header/responsive-header.d.ts +1 -1
  44. package/lib/Header/responsive-header.js +33 -34
  45. package/lib/Icon/index.js +12 -12
  46. package/lib/InfoRow/index.d.ts +1 -1
  47. package/lib/InfoRow/index.js +0 -1
  48. package/lib/Layout/dashboard/external-link.d.ts +1 -1
  49. package/lib/Layout/dashboard/external-link.js +1 -1
  50. package/lib/Layout/dashboard/full-page.js +8 -8
  51. package/lib/Layout/dashboard/index.js +1 -1
  52. package/lib/Layout/dashboard/sidebar.js +1 -1
  53. package/lib/Layout/dashboard-legacy/header.js +10 -10
  54. package/lib/Layout/dashboard-legacy/index.js +16 -16
  55. package/lib/Layout/dashboard-legacy/sidebar.d.ts +1 -1
  56. package/lib/Layout/dashboard-legacy/sidebar.js +19 -12
  57. package/lib/Layout/index.js +2 -2
  58. package/lib/LoadingMask/index.d.ts +1 -1
  59. package/lib/LoadingMask/index.js +4 -4
  60. package/lib/Locale/context.js +24 -24
  61. package/lib/Locale/selector.d.ts +1 -1
  62. package/lib/Locale/selector.js +1 -1
  63. package/lib/Logo/index.js +3 -3
  64. package/lib/NFTDisplay/aspect-ratio-container.d.ts +1 -1
  65. package/lib/NFTDisplay/index.js +5 -2
  66. package/lib/NFTDisplay/render-svg.js +3 -3
  67. package/lib/NavMenu/nav-menu.js +29 -26
  68. package/lib/NavMenu/products.js +1 -1
  69. package/lib/PageScroller/index.js +43 -43
  70. package/lib/PhoneInput/country-select.js +23 -23
  71. package/lib/PhoneInput/index.js +11 -11
  72. package/lib/PoweredByArcBlock/index.js +10 -6
  73. package/lib/QRCode/index.js +5 -5
  74. package/lib/RelativeTime/index.js +16 -16
  75. package/lib/Result/result.js +5 -5
  76. package/lib/Screenshot/index.d.ts +1 -1
  77. package/lib/Screenshot/index.js +1 -1
  78. package/lib/SessionUser/components/did-space.d.ts +1 -1
  79. package/lib/SessionUser/components/session-user-item.js +10 -10
  80. package/lib/SharedBridge/index.js +6 -6
  81. package/lib/Spinner/index.js +1 -1
  82. package/lib/SplitButton/index.d.ts +1 -1
  83. package/lib/SplitButton/index.js +1 -1
  84. package/lib/Success/index.js +1 -1
  85. package/lib/Tabs/index.js +15 -8
  86. package/lib/Tag/index.d.ts +1 -1
  87. package/lib/Tag/index.js +1 -1
  88. package/lib/TextCollapse/index.js +1 -1
  89. package/lib/Theme/theme-provider.js +58 -53
  90. package/lib/Theme/theme.js +1 -0
  91. package/lib/Typography/index.js +13 -13
  92. package/lib/UserCard/Cards/basic-info.d.ts +1 -1
  93. package/lib/UserCard/Cards/basic-info.js +1 -1
  94. package/lib/UserCard/Cards/index.d.ts +1 -1
  95. package/lib/UserCard/Cards/index.js +1 -1
  96. package/lib/UserCard/Container/card.js +6 -6
  97. package/lib/UserCard/Container/dialog.js +1 -1
  98. package/lib/UserCard/Content/basic.js +2 -2
  99. package/lib/UserCard/Content/minimal.d.ts +1 -1
  100. package/lib/UserCard/Content/minimal.js +1 -1
  101. package/lib/UserCard/Content/tooltip-avatar.js +17 -17
  102. package/lib/VerificationCode/index.js +1 -1
  103. package/lib/WalletOSIcon/index.d.ts +2 -2
  104. package/lib/WalletOSIcon/index.js +7 -2
  105. package/lib/WebWalletSWKeeper/index.d.ts +3 -1
  106. package/lib/WebWalletSWKeeper/index.js +4 -1
  107. package/lib/withTheme/index.d.ts +3 -2
  108. package/lib/withTheme/index.js +16 -16
  109. package/package.json +7 -7
  110. package/src/ActionButton/index.jsx +1 -1
  111. package/src/Address/compact-text.jsx +1 -1
  112. package/src/Address/did-address.tsx +1 -1
  113. package/src/Address/index.tsx +1 -1
  114. package/src/Address/responsive-did-address.tsx +3 -3
  115. package/src/Alert/index.jsx +1 -1
  116. package/src/Avatar/index.jsx +1 -1
  117. package/src/Badge/index.jsx +1 -1
  118. package/src/BlockletContext/index.tsx +1 -1
  119. package/src/BlockletNFT/index.jsx +1 -1
  120. package/src/BlockletV2/blocklet.tsx +1 -1
  121. package/src/BlockletV2/components/icon-text.tsx +4 -4
  122. package/src/BlockletV2/components/tooltip-icon.tsx +5 -3
  123. package/src/Button/wrap.jsx +1 -1
  124. package/src/Center/index.tsx +1 -1
  125. package/src/ClickToCopy/copy-button.tsx +1 -1
  126. package/src/CloseButton/index.tsx +1 -1
  127. package/src/ContactForm/index.tsx +9 -2
  128. package/src/DID/index.tsx +5 -4
  129. package/src/DIDConnect/app-info-item.tsx +1 -1
  130. package/src/DIDConnect/auth-apps/index.tsx +8 -8
  131. package/src/DIDConnect/did-connect-container.tsx +2 -2
  132. package/src/DIDConnect/did-connect-footer.tsx +1 -1
  133. package/src/DIDConnect/landing-page.tsx +6 -6
  134. package/src/DIDConnect/request-storage-access-api-dialog.tsx +1 -2
  135. package/src/Datatable/CustomToolbar.jsx +1 -1
  136. package/src/Datatable/index.jsx +2 -2
  137. package/src/Dialog/confirm.jsx +1 -1
  138. package/src/Earth/index.tsx +1 -1
  139. package/src/Footer/index.tsx +5 -2
  140. package/src/Header/addon-button.tsx +7 -2
  141. package/src/Header/header.tsx +1 -1
  142. package/src/Header/responsive-header.tsx +1 -2
  143. package/src/Icon/index.tsx +1 -1
  144. package/src/InfoRow/index.tsx +1 -2
  145. package/src/Layout/dashboard/external-link.tsx +1 -1
  146. package/src/Layout/dashboard/full-page.tsx +1 -1
  147. package/src/Layout/dashboard/index.tsx +1 -1
  148. package/src/Layout/dashboard/sidebar.tsx +5 -2
  149. package/src/Layout/dashboard-legacy/header.tsx +5 -5
  150. package/src/Layout/dashboard-legacy/index.tsx +3 -3
  151. package/src/Layout/dashboard-legacy/sidebar.tsx +10 -2
  152. package/src/Layout/index.tsx +2 -2
  153. package/src/LoadingMask/index.tsx +5 -5
  154. package/src/Locale/context.tsx +3 -3
  155. package/src/Locale/selector.tsx +1 -1
  156. package/src/Logo/index.tsx +1 -1
  157. package/src/NFTDisplay/aspect-ratio-container.tsx +1 -1
  158. package/src/NFTDisplay/index.tsx +2 -1
  159. package/src/NFTDisplay/render-svg.tsx +1 -1
  160. package/src/NavMenu/nav-menu.tsx +8 -5
  161. package/src/NavMenu/products.tsx +3 -1
  162. package/src/PageScroller/index.tsx +4 -4
  163. package/src/PhoneInput/country-select.tsx +3 -3
  164. package/src/PhoneInput/index.tsx +1 -1
  165. package/src/PoweredByArcBlock/index.tsx +5 -1
  166. package/src/QRCode/index.tsx +1 -1
  167. package/src/RelativeTime/index.tsx +3 -3
  168. package/src/Result/result.tsx +1 -1
  169. package/src/Screenshot/index.tsx +2 -2
  170. package/src/SessionUser/components/did-space.tsx +1 -1
  171. package/src/SessionUser/components/session-user-item.tsx +1 -1
  172. package/src/SharedBridge/index.tsx +2 -2
  173. package/src/Spinner/index.tsx +1 -1
  174. package/src/SplitButton/index.tsx +1 -1
  175. package/src/Success/index.tsx +1 -1
  176. package/src/Tabs/index.tsx +10 -3
  177. package/src/Tag/index.jsx +1 -1
  178. package/src/TextCollapse/index.tsx +1 -1
  179. package/src/Theme/theme-provider.tsx +11 -6
  180. package/src/Theme/theme.ts +5 -0
  181. package/src/Typography/index.tsx +1 -1
  182. package/src/UserCard/Cards/basic-info.tsx +1 -1
  183. package/src/UserCard/Cards/index.tsx +1 -1
  184. package/src/UserCard/Container/card.tsx +2 -2
  185. package/src/UserCard/Container/dialog.tsx +1 -1
  186. package/src/UserCard/Content/basic.tsx +2 -2
  187. package/src/UserCard/Content/minimal.tsx +1 -1
  188. package/src/UserCard/Content/tooltip-avatar.tsx +4 -4
  189. package/src/VerificationCode/index.tsx +1 -1
  190. package/src/WalletOSIcon/index.tsx +7 -2
  191. package/src/WebWalletSWKeeper/index.tsx +6 -1
  192. package/src/withTheme/index.tsx +7 -3
  193. package/vite.config.mjs +4 -1
  194. package/lib/ActionButton/ActionButton.stories.d.ts +0 -18
  195. package/lib/ActivityIndicator/ActivityIndicator.stories.d.ts +0 -8
  196. package/lib/Address/Address.stories.d.ts +0 -16
  197. package/lib/Alert/Alert.stories.d.ts +0 -28
  198. package/lib/AnimationWaiter/AnimationWaiter.stories.d.ts +0 -21
  199. package/lib/Avatar/Avatar.stories.d.ts +0 -11
  200. package/lib/Badge/Badge.stories.d.ts +0 -13
  201. package/lib/Blocklet/Blocklet.stories.d.ts +0 -17
  202. package/lib/BlockletNFT/BlockletNFT.stories.d.ts +0 -17
  203. package/lib/BlockletV2/Blocklet.stories.d.ts +0 -18
  204. package/lib/Button/Button.stories.d.ts +0 -19
  205. package/lib/Center/Center.stories.d.ts +0 -18
  206. package/lib/ClickToCopy/ClickToCopy.stories.d.ts +0 -16
  207. package/lib/CodeBlock/CodeBlock.stories.d.ts +0 -20
  208. package/lib/Colors/Colors.stories.d.ts +0 -34
  209. package/lib/Config/Config.stories.d.ts +0 -14
  210. package/lib/ContactForm/ContactForm.stories.d.ts +0 -23
  211. package/lib/CookieConsent/CookieConsent.stories.d.ts +0 -18
  212. package/lib/CountDown/CountDown.stories.d.ts +0 -14
  213. package/lib/DID/DID.stories.d.ts +0 -15
  214. package/lib/Datatable/Datatable.stories.d.ts +0 -32
  215. package/lib/Dialog/Dialog.stories.d.ts +0 -20
  216. package/lib/DidLogo/Logo.stories.d.ts +0 -8
  217. package/lib/Earth/Earth.stories.d.ts +0 -18
  218. package/lib/Empty/Empty.stories.d.ts +0 -17
  219. package/lib/ErrorBoundary/ErrorBoundary.stories.d.ts +0 -12
  220. package/lib/Footer/Footer.stories.d.ts +0 -12
  221. package/lib/Header/Header.stories.d.ts +0 -21
  222. package/lib/Icon/Icon.stories.d.ts +0 -23
  223. package/lib/Img/Img.stories.d.ts +0 -13
  224. package/lib/InfoRow/InfoRow.stories.d.ts +0 -14
  225. package/lib/Layout/Layout.stories.d.ts +0 -23
  226. package/lib/Locale/LocaleSelector.stories.d.ts +0 -22
  227. package/lib/Logo/Logo.stories.d.ts +0 -22
  228. package/lib/Metric/Metric.stories.d.ts +0 -14
  229. package/lib/NFTDisplay/NFTDisplay.stories.d.ts +0 -15
  230. package/lib/NavMenu/NavMenu.stories.d.ts +0 -17
  231. package/lib/PageScroller/story/PageScroller.stories.d.ts +0 -13
  232. package/lib/PhoneInput/PhoneInput.stories.d.ts +0 -12
  233. package/lib/PricingTable/PricingTable.stories.d.ts +0 -8
  234. package/lib/QRCode/QRCode.stories.d.ts +0 -13
  235. package/lib/RelativeTime/RelativeTime.stories.d.ts +0 -20
  236. package/lib/Result/Result.stories.d.ts +0 -21
  237. package/lib/Screenshot/Screenshot.stories.d.ts +0 -13
  238. package/lib/SessionManager/SessionManager.stories.d.ts +0 -9
  239. package/lib/Sparkline/Sparkline.stories.d.ts +0 -12
  240. package/lib/Spinner/Spinner.stories.d.ts +0 -18
  241. package/lib/SplitButton/SplitButton.stories.d.ts +0 -15
  242. package/lib/Switch/Switch.stories.d.ts +0 -13
  243. package/lib/Tabs/Tabs.stories.d.ts +0 -14
  244. package/lib/Tag/Tag.stories.d.ts +0 -13
  245. package/lib/TextCollapse/TextCollapse.stories.d.ts +0 -28
  246. package/lib/Theme/Theme.stories.d.ts +0 -10
  247. package/lib/Toast/Toast.stories.d.ts +0 -15
  248. package/lib/UserCard/UserCard.stories.d.ts +0 -18
  249. package/lib/Util/WebWalletOpener.stories.d.ts +0 -5
  250. package/lib/Video/Video.stories.d.ts +0 -6
  251. package/lib/Wallet/Action.stories.d.ts +0 -8
  252. package/lib/Wallet/Download.stories.d.ts +0 -9
  253. package/lib/Wallet/OpenInWallet.stories.d.ts +0 -5
@@ -5,5 +5,5 @@ interface DetailedCardProps extends Omit<UserCardProps, 'user'> {
5
5
  shouldShowHoverCard: boolean;
6
6
  renderCardContent?: () => React.ReactNode | null;
7
7
  }
8
- declare function DetailedCard(props: DetailedCardProps): import("react/jsx-runtime").JSX.Element;
8
+ declare function DetailedCard({ ...props }: DetailedCardProps): import("react/jsx-runtime").JSX.Element;
9
9
  export default DetailedCard;
@@ -2,7 +2,7 @@ import { jsx as t } from "react/jsx-runtime";
2
2
  import { InfoType as a } from "../types.js";
3
3
  import i from "./name-only.js";
4
4
  import m from "./basic-info.js";
5
- function l(r) {
5
+ function l({ ...r }) {
6
6
  const { infoType: e = a.Minimal } = r;
7
7
  switch (e) {
8
8
  case a.NameOnly:
@@ -1,13 +1,13 @@
1
- import { jsx as l } from "react/jsx-runtime";
2
- import { Paper as d, Box as p } from "@mui/material";
1
+ import { jsx as d } from "react/jsx-runtime";
2
+ import { Paper as m, Box as p } from "@mui/material";
3
3
  import { CardType as r } from "../types.js";
4
4
  import { mergeSx as n } from "../../Util/style.js";
5
5
  function b({
6
6
  children: e,
7
7
  cardType: o = r.Detailed,
8
- variant: m = "box",
9
- containerRef: t,
10
- sx: i
8
+ variant: l = "box",
9
+ containerRef: t = void 0,
10
+ sx: i = {}
11
11
  }) {
12
12
  const a = {
13
13
  minWidth: 320,
@@ -18,7 +18,7 @@ function b({
18
18
  borderColor: "divider"
19
19
  } : {}
20
20
  };
21
- return m === "paper" ? /* @__PURE__ */ l(d, { ref: t, elevation: 0, sx: a, children: e }) : /* @__PURE__ */ l(
21
+ return l === "paper" ? /* @__PURE__ */ d(m, { ref: t, elevation: 0, sx: a, children: e }) : /* @__PURE__ */ d(
22
22
  p,
23
23
  {
24
24
  ref: t,
@@ -1,7 +1,7 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
2
  import { useTheme as t, Box as d } from "@mui/material";
3
3
  import { mergeSx as a } from "../../Util/style.js";
4
- function p({ children: o, sx: r }) {
4
+ function p({ children: o, sx: r = {} }) {
5
5
  const e = t();
6
6
  return /* @__PURE__ */ i(
7
7
  d,
@@ -71,7 +71,7 @@ function K({ value: e }) {
71
71
  ) })
72
72
  ] });
73
73
  }
74
- function S({ field: e, value: s, children: a }) {
74
+ function S({ field: e, value: s, children: a = null }) {
75
75
  const h = q[e], m = k().palette.mode === "dark", c = x(m);
76
76
  return /* @__PURE__ */ y(
77
77
  f,
@@ -90,7 +90,7 @@ function S({ field: e, value: s, children: a }) {
90
90
  e
91
91
  );
92
92
  }
93
- function se({ user: e, renderFields: s }) {
93
+ function se({ user: e, renderFields: s = void 0 }) {
94
94
  var w;
95
95
  const a = p(() => s ?? ["bio", "email", "phone", "location", "timezone", "link"], [s]), h = p(() => a.includes("bio"), [a]), l = p(() => e.metadata ?? {
96
96
  joinedAt: e == null ? void 0 : e.createdAt,
@@ -8,6 +8,6 @@ interface MinimalContentProps extends UserCardProps {
8
8
  avatarProps?: UserCardProps['avatarProps'];
9
9
  shortenLabelProps?: UserCardProps['shortenLabelProps'];
10
10
  }
11
- declare function MinimalContent(props: MinimalContentProps): import("react/jsx-runtime").JSX.Element;
11
+ declare function MinimalContent({ ...props }: MinimalContentProps): import("react/jsx-runtime").JSX.Element;
12
12
  declare const _default: React.MemoExoticComponent<typeof MinimalContent>;
13
13
  export default _default;
@@ -5,7 +5,7 @@ import { DID as y } from "../../DID/index.js";
5
5
  import C from "./tooltip-avatar.js";
6
6
  import { renderTopRight as b } from "../components.js";
7
7
  import v from "./shorten-label.js";
8
- function W(n) {
8
+ function W({ ...n }) {
9
9
  const {
10
10
  user: e,
11
11
  showDid: a,
@@ -1,28 +1,28 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
- import { Tooltip as l, Zoom as f } from "@mui/material";
2
+ import { Tooltip as i, Zoom as f } from "@mui/material";
3
3
  import { renderAvatar as c } from "../components.js";
4
- function d({
5
- user: i,
4
+ function x({
5
+ user: l,
6
6
  avatarSize: m,
7
- shouldShowHoverCard: e,
8
- renderCardContent: o,
9
- tooltipTitle: t,
10
- tooltipProps: a,
11
- avatarProps: p,
7
+ shouldShowHoverCard: r,
8
+ renderCardContent: e = void 0,
9
+ tooltipTitle: t = void 0,
10
+ tooltipProps: a = void 0,
11
+ avatarProps: p = void 0,
12
12
  onAvatarClick: s
13
13
  }) {
14
- const r = c(
15
- i,
14
+ const o = c(
15
+ l,
16
16
  m,
17
17
  p,
18
18
  s,
19
- e || !!t
19
+ r || !!t
20
20
  );
21
- return t ? /* @__PURE__ */ n(l, { enterDelay: 200, title: t, placement: "bottom", ...a ?? {}, children: r }) : e ? /* @__PURE__ */ n(
22
- l,
21
+ return t ? /* @__PURE__ */ n(i, { enterDelay: 200, title: t, placement: "bottom", ...a ?? {}, children: o }) : r ? /* @__PURE__ */ n(
22
+ i,
23
23
  {
24
24
  enterDelay: 200,
25
- title: o ? o() : null,
25
+ title: e ? e() : null,
26
26
  placement: "bottom",
27
27
  arrow: !1,
28
28
  ...a ?? {},
@@ -41,10 +41,10 @@ function d({
41
41
  slots: {
42
42
  transition: f
43
43
  },
44
- children: r
44
+ children: o
45
45
  }
46
- ) : r;
46
+ ) : o;
47
47
  }
48
48
  export {
49
- d as default
49
+ x as default
50
50
  };
@@ -10,7 +10,7 @@ function j({
10
10
  code: e,
11
11
  onChange: u = a,
12
12
  onComplete: p = a,
13
- sx: s
13
+ sx: s = {}
14
14
  }) {
15
15
  return c(() => {
16
16
  e.length === i && (p == null || p(e));
@@ -1,7 +1,7 @@
1
1
  export interface WalletOSIconProps {
2
2
  loading?: false | true;
3
- walletOS?: string;
3
+ walletOS: string;
4
4
  provider?: string;
5
5
  color?: string;
6
6
  }
7
- export default function WalletOSIcon({ loading, walletOS, provider, color }: WalletOSIconProps): import("react/jsx-runtime").JSX.Element | null;
7
+ export default function WalletOSIcon({ loading, walletOS, provider, color, }: WalletOSIconProps): import("react/jsx-runtime").JSX.Element | null;
@@ -7,8 +7,13 @@ import a from "@iconify-icons/material-symbols/android";
7
7
  import c from "@iconify-icons/material-symbols/question-mark-rounded";
8
8
  import u from "@iconify-icons/material-symbols/mail-outline-rounded";
9
9
  import { LOGIN_PROVIDER as p } from "../Util/constant.js";
10
- function x({ loading: t = !1, walletOS: i, provider: e, color: n = "black" }) {
11
- return t ? /* @__PURE__ */ r(o, { icon: c, style: { color: "transparent" } }) : e === p.AUTH0 ? /* @__PURE__ */ r(o, { icon: u, style: { color: n, transform: "scale(0.85)" } }) : i === "ios" ? /* @__PURE__ */ r(o, { icon: f, style: { color: n, transform: "scale(1.1)" } }) : i === "android" ? /* @__PURE__ */ r(o, { icon: a, style: { color: n } }) : i === "web" ? /* @__PURE__ */ r(o, { icon: s, style: { color: n } }) : i === "api" ? /* @__PURE__ */ r(o, { icon: m, style: { color: n, transform: "scale(1.05)" } }) : null;
10
+ function x({
11
+ loading: i = !1,
12
+ walletOS: t,
13
+ provider: e = "wallet",
14
+ color: n = "black"
15
+ }) {
16
+ return i ? /* @__PURE__ */ r(o, { icon: c, style: { color: "transparent" } }) : e === p.AUTH0 ? /* @__PURE__ */ r(o, { icon: u, style: { color: n, transform: "scale(0.85)" } }) : t === "ios" ? /* @__PURE__ */ r(o, { icon: f, style: { color: n, transform: "scale(1.1)" } }) : t === "android" ? /* @__PURE__ */ r(o, { icon: a, style: { color: n } }) : t === "web" ? /* @__PURE__ */ r(o, { icon: s, style: { color: n } }) : t === "api" ? /* @__PURE__ */ r(o, { icon: m, style: { color: n, transform: "scale(1.05)" } }) : null;
12
17
  }
13
18
  export {
14
19
  x as default
@@ -2,7 +2,9 @@ interface WebWalletSWKeeperProps {
2
2
  webWalletUrl: string;
3
3
  maxIdleTime: number;
4
4
  }
5
- declare function WebWalletSWKeeper({ webWalletUrl, maxIdleTime }: WebWalletSWKeeperProps): null;
5
+ declare function WebWalletSWKeeper({ webWalletUrl, maxIdleTime, }: WebWalletSWKeeperProps & {
6
+ maxIdleTime?: number;
7
+ }): null;
6
8
  export declare const withWebWalletSWKeeper: <P extends {
7
9
  webWalletUrl: string;
8
10
  }>(Component: React.ComponentType<P>) => ({ webWalletUrl, maxIdleTime, ...rest }: WebWalletSWKeeperProps & P) => import("react/jsx-runtime").JSX.Element;
@@ -18,7 +18,10 @@ const g = (t) => {
18
18
  }, A = (t) => {
19
19
  s || (s = `web_wallet_sw_keeper_${Date.now()}`, g(t));
20
20
  };
21
- function K({ webWalletUrl: t, maxIdleTime: e = I }) {
21
+ function K({
22
+ webWalletUrl: t,
23
+ maxIdleTime: e = I
24
+ }) {
22
25
  const o = b(!!s), n = E(e), r = () => {
23
26
  o.current || k();
24
27
  };
@@ -1,8 +1,9 @@
1
- import { Breakpoint, PaletteMode, PaletteOptions, TypographyOptions } from '@mui/material';
1
+ import { Breakpoint, PaletteMode, PaletteOptions } from '@mui/material';
2
+ import { TypographyStyleOptions } from '@mui/material/styles/createTypography';
2
3
  declare function withTheme<P extends object>(Component: React.ComponentType<P>, { mode, pageWidth, palette, typography, }?: {
3
4
  mode?: PaletteMode;
4
5
  pageWidth?: Breakpoint;
5
6
  palette?: PaletteOptions;
6
- typography?: TypographyOptions;
7
+ typography?: TypographyStyleOptions;
7
8
  }): (props: P) => import("react/jsx-runtime").JSX.Element;
8
9
  export default withTheme;
@@ -1,18 +1,18 @@
1
- import { jsxs as c, jsx as e } from "react/jsx-runtime";
2
- import { useEffect as p } from "react";
3
- import { css as f, Global as h } from "@emotion/react";
4
- import { CssBaseline as d } from "@mui/material";
5
- import { createTheme as y } from "../Theme/theme.js";
6
- import u from "../Theme/theme-provider.js";
7
- function S(r, {
1
+ import { jsxs as p, jsx as e } from "react/jsx-runtime";
2
+ import { useEffect as f } from "react";
3
+ import { css as h, Global as d } from "@emotion/react";
4
+ import { CssBaseline as y } from "@mui/material";
5
+ import { createTheme as u } from "../Theme/theme.js";
6
+ import g from "../Theme/theme-provider.js";
7
+ function k(r, {
8
8
  mode: i = "light",
9
9
  pageWidth: n = "md",
10
10
  palette: s,
11
11
  typography: a
12
12
  } = {}) {
13
- const o = y({ mode: i, pageWidth: n, palette: s, typography: a }), m = f`
13
+ const o = u({ mode: i, pageWidth: n, palette: s, typography: a }), m = o.typography.color.main, l = h`
14
14
  font-family: ${o.typography.fontFamily};
15
- color: ${o.typography.color.main};
15
+ color: ${m};
16
16
 
17
17
  a,
18
18
  a:hover,
@@ -43,17 +43,17 @@ function S(r, {
43
43
  }
44
44
  }
45
45
  `;
46
- return function(l) {
47
- return p(() => {
46
+ return function(c) {
47
+ return f(() => {
48
48
  const t = document.querySelector("#jss-server-side");
49
49
  t && t.parentNode && t.parentNode.removeChild(t);
50
- }, []), /* @__PURE__ */ c(u, { theme: o, children: [
51
- /* @__PURE__ */ e(d, {}),
52
- /* @__PURE__ */ e(h, { styles: m }),
53
- /* @__PURE__ */ e(r, { ...l })
50
+ }, []), /* @__PURE__ */ p(g, { theme: o, children: [
51
+ /* @__PURE__ */ e(y, {}),
52
+ /* @__PURE__ */ e(d, { styles: l }),
53
+ /* @__PURE__ */ e(r, { ...c })
54
54
  ] });
55
55
  };
56
56
  }
57
57
  export {
58
- S as default
58
+ k as default
59
59
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcblock/ux",
3
- "version": "3.0.6",
3
+ "version": "3.0.8",
4
4
  "description": "Common used react components for arcblock products",
5
5
  "keywords": [
6
6
  "react",
@@ -60,16 +60,16 @@
60
60
  "react": ">=19.0.0",
61
61
  "react-router-dom": ">=6.22.3"
62
62
  },
63
- "gitHead": "b985886f6650c3df0f48665c71d7a8ce0d9bdb93",
63
+ "gitHead": "30b21395b2f3ef6824df728aeafd10e9dea173d9",
64
64
  "dependencies": {
65
- "@arcblock/bridge": "3.0.6",
65
+ "@arcblock/bridge": "3.0.8",
66
66
  "@arcblock/did": "^1.20.15",
67
67
  "@arcblock/did-motif": "^1.1.13",
68
- "@arcblock/icons": "3.0.6",
69
- "@arcblock/nft-display": "3.0.6",
70
- "@arcblock/react-hooks": "3.0.6",
68
+ "@arcblock/icons": "3.0.8",
69
+ "@arcblock/nft-display": "3.0.8",
70
+ "@arcblock/react-hooks": "3.0.8",
71
71
  "@blocklet/js-sdk": "^1.16.44",
72
- "@blocklet/theme": "3.0.6",
72
+ "@blocklet/theme": "3.0.8",
73
73
  "@fontsource/roboto": "~5.1.1",
74
74
  "@fontsource/ubuntu-mono": "^5.2.6",
75
75
  "@iconify-icons/logos": "^1.2.36",
@@ -27,7 +27,7 @@ import { withDeprecated } from '../Util/deprecate';
27
27
  * @param {ActionButtonProps} props
28
28
  * @returns {JSX.Element}
29
29
  */
30
- function ActionButton(rawProps) {
30
+ function ActionButton({ ...rawProps }) {
31
31
  const props = Object.assign({}, rawProps);
32
32
  if (isUndefined(props.gradient)) {
33
33
  props.gradient = '';
@@ -70,7 +70,7 @@ export default function CompactText({ startChars = 6, endChars = 6, children, sh
70
70
  CompactText.propTypes = {
71
71
  startChars: PropTypes.number,
72
72
  endChars: PropTypes.number,
73
- children: PropTypes.node,
73
+ children: PropTypes.node.isRequired,
74
74
  // 在 tooltip 中完整地址后显示复制按钮
75
75
  showCopyButtonInTooltip: PropTypes.bool,
76
76
  };
@@ -56,7 +56,7 @@ export interface IDidAddressProps extends BoxProps {
56
56
  * - 可配合 useMediaQuery 使用
57
57
  */
58
58
  function DidAddress({
59
- ref,
59
+ ref = undefined,
60
60
  ...props
61
61
  }: IDidAddressProps & {
62
62
  ref?: React.Ref<unknown>;
@@ -6,7 +6,7 @@ export interface IDidAddressWrapper extends IDidAddressProps {
6
6
  }
7
7
 
8
8
  function DidAddressWrapper({
9
- ref,
9
+ ref = undefined,
10
10
  responsive = true,
11
11
  ...rest
12
12
  }: IDidAddressWrapper & {
@@ -15,9 +15,9 @@ import { getFontSize } from '../Util';
15
15
  * - 监听容器宽度变化, 当容器宽度变化时, 对比容器宽度和 did address full-width, => 切换 compact 模式
16
16
  */
17
17
  export default function ResponsiveDidAddress({
18
- ref,
19
- style,
20
- className,
18
+ ref = undefined,
19
+ style = {},
20
+ className = undefined,
21
21
  component = 'span',
22
22
  size = 0,
23
23
  ...rest
@@ -55,7 +55,7 @@ const types = {
55
55
  * @param {AlertProps} props
56
56
  * @returns {JSX.Element}
57
57
  */
58
- function Alert(rawProps) {
58
+ function Alert({ ...rawProps }) {
59
59
  const props = Object.assign({}, rawProps);
60
60
  if (isUndefined(props.type)) {
61
61
  props.type = 'tip';
@@ -31,7 +31,7 @@ import { DID_PREFIX } from '../Util/constant';
31
31
  * @param {AvatarProps} props
32
32
  * @returns {JSX.Element}
33
33
  */
34
- function Avatar(rawProps) {
34
+ function Avatar({ ...rawProps }) {
35
35
  const props = Object.assign({}, rawProps);
36
36
  if (isUndefined(props.did)) {
37
37
  props.did = '';
@@ -46,7 +46,7 @@ const types = {
46
46
  * @param {BadgeProps} props
47
47
  * @returns {JSX.Element}
48
48
  */
49
- function Badge(rawProps) {
49
+ function Badge({ ...rawProps }) {
50
50
  const props = Object.assign({}, rawProps);
51
51
  if (isUndefined(props.type)) {
52
52
  props.type = 'primary';
@@ -18,7 +18,7 @@ function BlockletProvider({
18
18
  baseUrl = '',
19
19
  loading = null,
20
20
  }: {
21
- children?: React.ReactNode;
21
+ children: React.ReactNode;
22
22
  /**
23
23
  * baseUrl 为 blocklet origin + blocklet prefix
24
24
  */
@@ -226,7 +226,7 @@ BlockletIcon.propTypes = {
226
226
  */
227
227
  export default function BlockletNFT({
228
228
  title,
229
- did,
229
+ did = undefined,
230
230
  description = null,
231
231
  cover = null,
232
232
  size = 'auto',
@@ -48,7 +48,7 @@ export interface IBlockletStore extends CardProps {
48
48
  }[];
49
49
  }
50
50
 
51
- export default function BlockletStore(props: IBlockletStore) {
51
+ export default function BlockletStore({ ...props }: IBlockletStore) {
52
52
  const {
53
53
  title,
54
54
  description = '',
@@ -3,11 +3,11 @@ import React from 'react';
3
3
  import TooltipIcon from './tooltip-icon';
4
4
 
5
5
  export default function IconText({
6
- icon,
7
- children,
6
+ icon = null,
7
+ children = null,
8
8
  maxWidth = 100,
9
- title,
10
- sx,
9
+ title = undefined,
10
+ sx = {},
11
11
  }: {
12
12
  icon?: React.ReactNode;
13
13
  children?: React.ReactNode;
@@ -1,4 +1,5 @@
1
1
  import { Tooltip, TooltipProps, tooltipClasses } from '@mui/material';
2
+ import { mergeSx } from '../../Util/style';
2
3
 
3
4
  export interface TooltipIconProps extends TooltipProps {
4
5
  fontSize?: number | string;
@@ -24,7 +25,7 @@ export default function TooltipIcon({
24
25
  slotProps={{
25
26
  popper: {
26
27
  ...slotProps?.popper,
27
- sx: [
28
+ sx: mergeSx(
28
29
  {
29
30
  [`& .${tooltipClasses.tooltip}`]: {
30
31
  fontSize,
@@ -38,8 +39,9 @@ export default function TooltipIcon({
38
39
  alignItems: 'center',
39
40
  },
40
41
  },
41
- ...(Array.isArray(slotProps?.popper?.sx) ? slotProps.popper.sx : [slotProps?.popper?.sx]),
42
- ],
42
+ // @ts-expect-error
43
+ slotProps?.popper?.sx
44
+ ),
43
45
  },
44
46
  }}>
45
47
  {children}
@@ -43,7 +43,7 @@ export default function wrap(BaseComponent) {
43
43
  * @param {ButtonProps} props
44
44
  * @returns
45
45
  */
46
- function WrappedComponent(rawProps) {
46
+ function WrappedComponent({ ...rawProps }) {
47
47
  const props = Object.assign({}, rawProps);
48
48
  if (isUndefined(props.rounded)) {
49
49
  props.rounded = false;
@@ -1,7 +1,7 @@
1
1
  import { styled } from '../Theme';
2
2
 
3
3
  export default function Center({
4
- children,
4
+ children = null,
5
5
  relative = 'screen',
6
6
  }: {
7
7
  children?: React.ReactNode;
@@ -15,7 +15,7 @@ export interface CopyButtonProps extends React.HTMLAttributes<HTMLSpanElement> {
15
15
  export default function CopyButton({
16
16
  content = '',
17
17
  locale = 'en',
18
- render,
18
+ render = undefined,
19
19
  showTooltip = true,
20
20
  ...rest
21
21
  }: CopyButtonProps) {
@@ -8,7 +8,7 @@ import { mergeSx } from '../Util/style';
8
8
 
9
9
  export default function CloseButton({
10
10
  onClose = noop,
11
- sx,
11
+ sx = {},
12
12
  size = 20,
13
13
  }: {
14
14
  onClose?: () => void;
@@ -221,7 +221,10 @@ const Form = styled('form', {
221
221
  .title {
222
222
  font-size: 30px;
223
223
  text-align: center;
224
- color: ${(props) => props.theme.typography.color.main};
224
+ color: ${(props) => {
225
+ // @ts-expect-error
226
+ return props.theme.typography.color.main;
227
+ }};
225
228
  }
226
229
 
227
230
  .form-controls {
@@ -234,7 +237,11 @@ const Form = styled('form', {
234
237
  width: ${(props) => getInputWidth(props)};
235
238
  height: 50px;
236
239
  border: none;
237
- border-bottom: 1px solid ${(props) => props.theme.typography.color.main};
240
+ border-bottom: 1px solid
241
+ ${(props) => {
242
+ // @ts-expect-error
243
+ return props.theme.typography.color.main;
244
+ }};
238
245
  font-size: 16px;
239
246
  letter-spacing: 1.8px;
240
247
  outline: none;
package/src/DID/index.tsx CHANGED
@@ -7,6 +7,7 @@ import { Box, Dialog, DialogContent, ModalProps, Typography } from '@mui/materia
7
7
  import { useCreation, useMemoizedFn } from 'ahooks';
8
8
  import { useImperativeHandle, useRef, useState } from 'react';
9
9
  import { toAddress } from '@arcblock/did';
10
+ import noop from 'lodash/noop';
10
11
 
11
12
  import Address, { IDidAddressWrapper } from '../Address';
12
13
  import Avatar from '../Avatar';
@@ -137,7 +138,7 @@ export interface HTMLDIDElement extends HTMLDidAddressElement {
137
138
  }
138
139
 
139
140
  export function DID({
140
- ref,
141
+ ref = undefined,
141
142
  ...props
142
143
  }: DIDProps & {
143
144
  ref?: React.Ref<unknown>;
@@ -261,15 +262,15 @@ export interface DIDDialogProps extends DIDProps {
261
262
  }
262
263
  export function DIDDialog({
263
264
  did,
264
- chainId,
265
- roleType,
265
+ chainId = undefined,
266
+ roleType = undefined,
266
267
  showAvatar = true,
267
268
  // DialogProps
268
269
  open,
269
270
  fullScreen = false,
270
271
  fullWidth = false,
271
272
  scroll = 'paper',
272
- onClose,
273
+ onClose = noop,
273
274
  // AddressProps
274
275
  locale = 'en',
275
276
  ...rest
@@ -13,7 +13,7 @@ export default function AppInfoItem({
13
13
  appInfo,
14
14
  active = false,
15
15
  appLogo = null,
16
- sx,
16
+ sx = {},
17
17
  }: {
18
18
  appInfo: any;
19
19
  active?: boolean;
@@ -37,20 +37,20 @@ export default function AuthApps({
37
37
  session,
38
38
  requestAppInfo,
39
39
  currentAppInfo,
40
- children,
41
- userInfo,
40
+ children = null,
41
+ userInfo = undefined,
42
42
 
43
43
  hideSwitchConnect = false,
44
44
  hideAuthorize = false,
45
45
  hideCancel = false,
46
46
 
47
- notThisText,
48
- authorizeText,
49
- connectText,
50
- cancelText,
51
- useAnotherText,
47
+ notThisText = undefined,
48
+ authorizeText = undefined,
49
+ connectText = undefined,
50
+ cancelText = undefined,
51
+ useAnotherText = undefined,
52
52
 
53
- slotProps,
53
+ slotProps = undefined,
54
54
 
55
55
  onConnect = noop,
56
56
  onAuthorize = noop,
@@ -33,8 +33,8 @@ export default function DIDConnectContainer({
33
33
  popup = false,
34
34
  hideCloseButton = false,
35
35
  children,
36
- appPid,
37
- slotProps,
36
+ appPid = undefined,
37
+ slotProps = undefined,
38
38
  onClose = noop,
39
39
  keepMounted = false,
40
40
  }: {
@@ -13,7 +13,7 @@ import { DID_CONNECT_MEDIUM_WIDTH } from '../Util/constant';
13
13
  export default function DIDConnectFooter({
14
14
  currentAppInfo = globalThis.blocklet,
15
15
  currentAppColor = globalThis.blocklet?.appPid ? getDIDColor(globalThis.blocklet?.appPid) : '#fff',
16
- sx,
16
+ sx = {},
17
17
  }: {
18
18
  currentAppInfo?: any;
19
19
  currentAppColor?: string;