@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
@@ -1,29 +1,29 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
2
  import { createContext as g, use as P, useLayoutEffect as F, useState as f, useMemo as b } from "react";
3
3
  const s = g(null), d = (l) => {
4
- const t = P(s);
4
+ const i = P(s);
5
5
  return F(() => {
6
- l && t.configure(l);
7
- }, []), t;
6
+ l && i.configure(l);
7
+ }, []), i;
8
8
  };
9
- function I({ children: l, ...t }) {
10
- const [e, i] = f({
9
+ function I({ children: l = void 0, ...i }) {
10
+ const [e, u] = f({
11
11
  inFullPage: !1,
12
12
  showToggleButton: !1,
13
13
  headerVisibleInFullPage: !0,
14
14
  footerVisibleInFullPage: !1,
15
15
  sidebarVisibleInFullPage: !1
16
16
  }), a = () => {
17
- i((u) => ({ ...u, inFullPage: !u.inFullPage }));
17
+ u((t) => ({ ...t, inFullPage: !t.inFullPage }));
18
18
  }, o = b(() => ({
19
19
  ...e,
20
20
  headerVisible: !e.inFullPage || e.headerVisibleInFullPage,
21
21
  footerVisible: !e.inFullPage || e.footerVisibleInFullPage,
22
22
  sidebarVisible: !e.inFullPage || e.sidebarVisibleInFullPage,
23
23
  toggleFullPage: a,
24
- configure: (u) => i((n) => ({ ...n, ...u }))
24
+ configure: (t) => u((n) => ({ ...n, ...t }))
25
25
  }), [e]);
26
- return /* @__PURE__ */ r(s, { value: o, ...t, children: l });
26
+ return /* @__PURE__ */ r(s, { value: o, ...i, children: l });
27
27
  }
28
28
  export {
29
29
  s as FullPageContext,
@@ -44,7 +44,7 @@ function Q({
44
44
  fullWidth: y = !1,
45
45
  dense: c = "auto",
46
46
  footerProps: N = {},
47
- sx: P,
47
+ sx: P = {},
48
48
  children: F,
49
49
  ...m
50
50
  }) {
@@ -27,7 +27,7 @@ function m(e, i) {
27
27
  /* @__PURE__ */ t("ul", { children: e.children.map(p) })
28
28
  ] }, `group-${e.title}-${i}`);
29
29
  }
30
- function z({ links: e, addons: i, dense: a = !1, ...r }) {
30
+ function z({ links: e, addons: i = void 0, dense: a = !1, ...r }) {
31
31
  return /* @__PURE__ */ o(f, { ...r, className: d({ "layout-sidebar-dense": a }), children: [
32
32
  /* @__PURE__ */ t("ul", { children: e.map(p) }),
33
33
  /* @__PURE__ */ t("div", { style: { flex: 1 } }),
@@ -1,6 +1,6 @@
1
1
  import { jsx as r, jsxs as a } from "react/jsx-runtime";
2
2
  import { Menu as m } from "@mui/icons-material";
3
- import { AppBar as x, Toolbar as f, Button as u, Box as o, Typography as n } from "@mui/material";
3
+ import { AppBar as x, Toolbar as f, Button as u, Box as o, Typography as i } from "@mui/material";
4
4
  import { Link as y } from "react-router-dom";
5
5
  import g from "../../Logo/index.js";
6
6
  import { styled as b } from "../../Theme/index.js";
@@ -77,12 +77,12 @@ const k = b(x)`
77
77
  `;
78
78
  function j({
79
79
  onToggleMenu: e,
80
- brand: i,
81
- description: l,
82
- addons: d,
83
- brandAddon: s,
80
+ brand: n = void 0,
81
+ description: d = void 0,
82
+ addons: l = void 0,
83
+ brandAddon: s = void 0,
84
84
  homeUrl: h = "/",
85
- logo: p,
85
+ logo: p = void 0,
86
86
  children: t,
87
87
  ...c
88
88
  }) {
@@ -113,11 +113,11 @@ function j({
113
113
  }
114
114
  ),
115
115
  /* @__PURE__ */ a("div", { className: "header-title", children: [
116
- /* @__PURE__ */ a(n, { component: "h2", noWrap: !0, className: "header-title__primary", children: [
117
- i,
116
+ /* @__PURE__ */ a(i, { component: "h2", noWrap: !0, className: "header-title__primary", children: [
117
+ n,
118
118
  s
119
119
  ] }),
120
- /* @__PURE__ */ r(n, { component: "p", noWrap: !0, className: "header-title__secondary", children: l })
120
+ /* @__PURE__ */ r(i, { component: "p", noWrap: !0, className: "header-title__secondary", children: d })
121
121
  ] })
122
122
  ] }),
123
123
  /* @__PURE__ */ r(
@@ -129,7 +129,7 @@ function j({
129
129
  }
130
130
  ),
131
131
  !!t && /* @__PURE__ */ r("div", { className: "header-children", children: t }),
132
- /* @__PURE__ */ r("div", { className: "header-addons", children: d })
132
+ /* @__PURE__ */ r("div", { className: "header-addons", children: l })
133
133
  ] }) });
134
134
  }
135
135
  export {
@@ -31,37 +31,37 @@ const B = T("div")`
31
31
  position: relative;
32
32
  white-space: nowrap;
33
33
  width: 120px;
34
- background: ${(r) => r.theme.palette.background.default};
35
- box-shadow: 2px 16px 10px 0 rgba(0, 0, 0, ${(r) => r.theme.palette.mode === "light" ? 0.05 : 0.5});
34
+ background: ${(o) => o.theme.palette.background.default};
35
+ box-shadow: 2px 16px 10px 0 rgba(0, 0, 0, ${(o) => o.theme.palette.mode === "light" ? 0.05 : 0.5});
36
36
  border: 0;
37
37
  }
38
38
  `;
39
39
  function R({
40
- links: r = [],
40
+ links: o = [],
41
41
  brand: d = "",
42
42
  description: f = "",
43
43
  images: b,
44
44
  title: u = "Home",
45
- brandAddon: w,
46
- headerAddon: x,
45
+ brandAddon: w = void 0,
46
+ headerAddon: x = void 0,
47
47
  prefix: _ = "/images",
48
48
  fullWidth: g = !1,
49
49
  contentLayout: y = "column",
50
- className: N = "",
51
- homeUrl: k = "/",
52
- logo: s,
53
- children: v,
50
+ className: v = "",
51
+ homeUrl: N = "/",
52
+ logo: s = void 0,
53
+ children: k,
54
54
  ...M
55
55
  }) {
56
- const a = j(document.body), o = (a == null ? void 0 : a.width) || 0, [n, D] = c(o >= 960 ? "permanent" : "temporary"), [i, l] = c(n === "permanent");
56
+ const r = j(document.body), a = (r == null ? void 0 : r.width) || 0, [n, D] = c(a >= 960 ? "permanent" : "temporary"), [i, l] = c(n === "permanent");
57
57
  P(() => {
58
- const p = o >= 960 ? "permanent" : "temporary";
58
+ const p = a >= 960 ? "permanent" : "temporary";
59
59
  D(p), l(p !== "temporary");
60
- }, [o]);
60
+ }, [a]);
61
61
  const m = () => {
62
62
  l(!i);
63
63
  }, $ = g || y === "row";
64
- return /* @__PURE__ */ t(B, { className: `dashboard ${N}`, ...M, children: [
64
+ return /* @__PURE__ */ t(B, { className: `dashboard ${v}`, ...M, children: [
65
65
  /* @__PURE__ */ e(H, { title: `${u}-${d}` }),
66
66
  /* @__PURE__ */ e(
67
67
  F,
@@ -72,7 +72,7 @@ function R({
72
72
  brandAddon: w,
73
73
  description: f,
74
74
  addons: x,
75
- homeUrl: k,
75
+ homeUrl: N,
76
76
  logo: s
77
77
  }
78
78
  ),
@@ -93,11 +93,11 @@ function R({
93
93
  open: i,
94
94
  onClose: m,
95
95
  ModalProps: { disablePortal: !0, keepMounted: !0 },
96
- children: /* @__PURE__ */ e(C, { className: "dashboard__sidebar", images: b, links: r, prefix: _, logo: s })
96
+ children: /* @__PURE__ */ e(C, { className: "dashboard__sidebar", images: b, links: o, prefix: _, logo: s })
97
97
  }
98
98
  ),
99
99
  /* @__PURE__ */ t(h, { className: "dashboard__main", children: [
100
- /* @__PURE__ */ e(W, { maxWidth: $ ? !1 : "lg", className: "dashboard__content", children: v }),
100
+ /* @__PURE__ */ e(W, { maxWidth: $ ? !1 : "lg", className: "dashboard__content", children: k }),
101
101
  /* @__PURE__ */ e(O, {})
102
102
  ] })
103
103
  ]
@@ -8,7 +8,7 @@ export type LinkItem = {
8
8
  export interface SidebarProps extends React.HTMLAttributes<HTMLDivElement> {
9
9
  images: Record<string, string>;
10
10
  links: LinkItem[];
11
- prefix: string;
11
+ prefix?: string;
12
12
  addons?: React.ReactNode;
13
13
  logo?: React.ReactNode;
14
14
  sx?: SxProps;
@@ -1,20 +1,27 @@
1
1
  import { jsxs as a, jsx as t } from "react/jsx-runtime";
2
2
  import { memo as k } from "react";
3
3
  import { useLocation as $, Link as s } from "react-router-dom";
4
- import { Button as w, useTheme as z, Typography as I } from "@mui/material";
4
+ import { Button as w, useTheme as z, Typography as v } from "@mui/material";
5
5
  import { teal as l } from "@mui/material/colors";
6
- import j from "../../Icon/image.js";
7
- import v from "../../Logo/index.js";
8
- import { styled as d } from "../../Theme/index.js";
9
- function q({ images: e, links: m, prefix: p = "/images", addons: g, logo: f, ...x }) {
6
+ import I from "../../Icon/image.js";
7
+ import j from "../../Logo/index.js";
8
+ import { styled as c } from "../../Theme/index.js";
9
+ function q({
10
+ images: e,
11
+ links: m,
12
+ prefix: p = "/images",
13
+ addons: g = void 0,
14
+ logo: f = void 0,
15
+ ...x
16
+ }) {
10
17
  const u = z(), b = $(), h = (o, n) => new RegExp(`/${n}`).test(b.pathname);
11
18
  return /* @__PURE__ */ a(L, { ...x, children: [
12
- /* @__PURE__ */ t(s, { to: "/", className: "sidebar-logo", children: f || /* @__PURE__ */ t(v, { showText: !1, size: 20 }) }),
19
+ /* @__PURE__ */ t(s, { to: "/", className: "sidebar-logo", children: f || /* @__PURE__ */ t(j, { showText: !1, size: 20 }) }),
13
20
  m.map(({ url: o, name: n, title: r, showBadge: y }) => {
14
21
  const i = h(o, n);
15
22
  return /* @__PURE__ */ a(T, { component: s, selected: i, to: o, children: [
16
23
  /* @__PURE__ */ t(
17
- j,
24
+ I,
18
25
  {
19
26
  name: e[n],
20
27
  size: 36,
@@ -23,14 +30,14 @@ function q({ images: e, links: m, prefix: p = "/images", addons: g, logo: f, ...
23
30
  showBadge: y
24
31
  }
25
32
  ),
26
- /* @__PURE__ */ t(I, { component: "span", className: "menu-title", children: r })
33
+ /* @__PURE__ */ t(v, { component: "span", className: "menu-title", children: r })
27
34
  ] }, o);
28
35
  }),
29
36
  /* @__PURE__ */ t("div", { style: { flex: 1 } }),
30
37
  g
31
38
  ] });
32
39
  }
33
- const L = k(d("div")`
40
+ const L = k(c("div")`
34
41
  flex: 1;
35
42
  display: flex;
36
43
  flex-direction: column;
@@ -51,7 +58,7 @@ const L = k(d("div")`
51
58
  display: block;
52
59
  }
53
60
  }
54
- `), c = "linear-gradient(32deg, rgba(144, 255, 230, 0.1), rgba(144, 255, 230, 0))", T = d(w)`
61
+ `), d = "linear-gradient(32deg, rgba(144, 255, 230, 0.1), rgba(144, 255, 230, 0))", T = c(w)`
55
62
  && {
56
63
  display: flex;
57
64
  flex-direction: column;
@@ -59,13 +66,13 @@ const L = k(d("div")`
59
66
  align-items: center;
60
67
  width: 100%;
61
68
  transition: all 200ms ease-in-out;
62
- background: ${(e) => e.selected ? c : ""};
69
+ background: ${(e) => e.selected ? d : ""};
63
70
  padding: 24px 0;
64
71
  border-left: 2px solid ${(e) => e.selected ? l.A700 : "transparent"};
65
72
  border-radius: 0;
66
73
 
67
74
  &:hover {
68
- background: ${c};
75
+ background: ${d};
69
76
  border-left-color: ${l.A700};
70
77
  }
71
78
 
@@ -11,11 +11,11 @@ import { styled as x } from "../Theme/index.js";
11
11
  function ie({
12
12
  title: i,
13
13
  brand: l,
14
- description: s,
14
+ description: s = void 0,
15
15
  links: a = [],
16
16
  logo: c = /* @__PURE__ */ e(H, { showText: !1, style: { width: "40px", height: "40px" } }),
17
17
  showLogo: d = !1,
18
- addons: y,
18
+ addons: y = void 0,
19
19
  footer: k = /* @__PURE__ */ e(t, { children: /* @__PURE__ */ e(Z, {}) }),
20
20
  baseUrl: h = "",
21
21
  homeUrl: N = "/",
@@ -4,6 +4,6 @@ export interface LoadingMaskProps {
4
4
  borderWidth?: number;
5
5
  borderRadius?: number;
6
6
  duration?: number;
7
- children?: React.ReactNode;
7
+ children: React.ReactNode;
8
8
  }
9
9
  export default function LoadingMask({ size, padding, borderWidth, borderRadius, duration, children, }: LoadingMaskProps): import("react/jsx-runtime").JSX.Element;
@@ -2,10 +2,10 @@ import { jsxs as h, jsx as a } from "react/jsx-runtime";
2
2
  import { Box as n } from "@mui/material";
3
3
  function b({
4
4
  size: s = 64,
5
- padding: d,
6
- borderWidth: l,
7
- borderRadius: f,
8
- duration: c,
5
+ padding: d = void 0,
6
+ borderWidth: l = void 0,
7
+ borderRadius: f = void 0,
8
+ duration: c = void 0,
9
9
  children: g
10
10
  }) {
11
11
  const t = s, i = f ?? t / 8, e = l ?? t / 32, o = d ?? t * 0.25 - e, p = c ?? 2.5;
@@ -1,81 +1,81 @@
1
- import { jsx as v } from "react/jsx-runtime";
1
+ import { jsx as g } from "react/jsx-runtime";
2
2
  import { createContext as x, use as k, useState as p, useRef as A, useEffect as R, useCallback as b } from "react";
3
3
  import j from "lodash/get";
4
- import f from "js-cookie";
4
+ import i from "js-cookie";
5
5
  import S from "./browser-lang.js";
6
6
  import { translate as U } from "./util.js";
7
7
  import { getCookieOptions as D, resolveRootDomain as E } from "../Util/index.js";
8
- const l = "nf_lang", F = (e, o = window.location.href) => {
8
+ const f = "nf_lang", F = (e, o = window.location.href) => {
9
9
  const t = new URL(o).searchParams.get("locale");
10
10
  return e.find((r) => r.code === t) ? t : null;
11
11
  }, O = (e, o = window.location.href) => {
12
12
  const t = new URL(o);
13
13
  t.searchParams.has("locale") && (t.searchParams.set("locale", e), window.history.replaceState({}, "", t.href));
14
- }, L = (e = []) => {
14
+ }, d = (e = []) => {
15
15
  var t;
16
16
  const o = {
17
17
  languages: e.map((r) => r.code),
18
18
  // 取 languages 首个元素的 code 值, 如果不存在则取 'en'
19
19
  fallback: ((t = e == null ? void 0 : e[0]) == null ? void 0 : t.code) || "en"
20
20
  };
21
- return F(e) || f.get(l) || S(o);
21
+ return F(e) || i.get(f) || S(o);
22
22
  }, z = (e) => {
23
23
  const o = D();
24
24
  if (!o.domain) {
25
25
  const t = E();
26
- t && f.remove(l, { path: o.path || "/", domain: t });
26
+ t && i.remove(f, { path: o.path || "/", domain: t });
27
27
  }
28
- f.set(l, e, o), O(e);
28
+ i.set(f, e, o), O(e);
29
29
  }, N = (e) => {
30
30
  const o = j(window, "blocklet.languages");
31
31
  return Array.isArray(o) && o.length ? o : Array.isArray(e) && e.length ? e : [
32
32
  { code: "en", name: "English" },
33
33
  { code: "zh", name: "简体中文" }
34
34
  ];
35
- }, d = x(null), { Provider: _, Consumer: M } = d;
35
+ }, L = x(null), { Provider: _, Consumer: M } = L;
36
36
  function Q({
37
37
  children: e,
38
- locale: o,
39
- fallbackLocale: t,
38
+ locale: o = void 0,
39
+ fallbackLocale: t = void 0,
40
40
  translations: r,
41
- onLoadingTranslation: m,
41
+ onLoadingTranslation: m = void 0,
42
42
  languages: P = [],
43
- ...C
43
+ ...v
44
44
  }) {
45
45
  const a = N(P);
46
- let [n, w] = p(o || L(a));
47
- const i = A(t || ""), [, y] = p(0), u = (c) => {
48
- w(c), z(c);
46
+ let [n, C] = p(o || d(a));
47
+ const l = A(t || ""), [, w] = p(0), u = (c) => {
48
+ C(c), z(c);
49
49
  };
50
50
  if (R(() => {
51
- const c = o || L(a);
51
+ const c = o || d(a);
52
52
  c !== n && u(c);
53
53
  }, [o]), n && r[n] && typeof r[n] == "function") {
54
54
  const c = n;
55
55
  try {
56
56
  Promise.resolve(r[c]()).then((s) => {
57
- s && typeof s == "object" && (r[c] = s, y((h) => h > 999 ? 0 : h + 1));
57
+ s && typeof s == "object" && (r[c] = s, w((h) => h > 999 ? 0 : h + 1));
58
58
  });
59
59
  } catch (s) {
60
60
  console.error(s);
61
61
  }
62
- m == null || m(c, a), n = i.current;
62
+ m == null || m(c, a), n = l.current;
63
63
  } else
64
- i.current = n;
65
- const g = b(
64
+ l.current = n;
65
+ const y = b(
66
66
  (c, s) => U(r, c, n, t, s),
67
67
  [r, n, t]
68
68
  );
69
- return /* @__PURE__ */ v(_, { value: { locale: n, changeLocale: u, t: g, languages: a, ...C }, children: e });
69
+ return /* @__PURE__ */ g(_, { value: { locale: n, changeLocale: u, t: y, languages: a, ...v }, children: e });
70
70
  }
71
71
  function V() {
72
- return k(d);
72
+ return k(L);
73
73
  }
74
74
  export {
75
75
  M as LocaleConsumer,
76
- d as LocaleContext,
76
+ L as LocaleContext,
77
77
  Q as LocaleProvider,
78
- L as getLocale,
78
+ d as getLocale,
79
79
  z as setLocale,
80
80
  V as useLocaleContext
81
81
  };
@@ -8,4 +8,4 @@ export interface LocaleSelectorProps extends Omit<React.HTMLAttributes<HTMLDivEl
8
8
  size?: number;
9
9
  onChange?: (locale: Locale) => void;
10
10
  }
11
- export default function LocaleSelector(props: LocaleSelectorProps): import("react/jsx-runtime").JSX.Element;
11
+ export default function LocaleSelector({ ...props }: LocaleSelectorProps): import("react/jsx-runtime").JSX.Element;
@@ -7,7 +7,7 @@ import H from "iconify-icons-material-symbols-400/language";
7
7
  import { LocaleContext as O } from "./context.js";
8
8
  import { styled as W } from "../Theme/index.js";
9
9
  import { mergeSx as q } from "../Util/style.js";
10
- function Z(t) {
10
+ function Z({ ...t }) {
11
11
  var g;
12
12
  const { showText: p = !0, popperProps: r = {}, popperType: d = "click", icon: c, size: f = 24, ...y } = t, { locale: l, changeLocale: I, languages: u } = z(O), a = L(null), [x, o] = M(!1), k = (e) => {
13
13
  I(e), o(!1), typeof t.onChange == "function" && t.onChange(e);
package/lib/Logo/index.js CHANGED
@@ -9,17 +9,17 @@ function j({
9
9
  showLogo: n = !0,
10
10
  mode: a = "dark",
11
11
  layout: l = "vertical",
12
- size: r,
12
+ size: r = void 0,
13
13
  style: i = {},
14
14
  ...g
15
15
  }) {
16
16
  const e = a === "light", m = e ? /* @__PURE__ */ t(s, {}) : /* @__PURE__ */ t(u, {}), c = e ? /* @__PURE__ */ t(f, { className: "logo-text" }) : /* @__PURE__ */ t(h, { className: "logo-text" });
17
- return r && (i.width = `${r}px`, i.height = `${r}px`), /* @__PURE__ */ p(L, { layout: l, style: i, ...g, children: [
17
+ return r && (i.width = `${r}px`, i.height = `${r}px`), /* @__PURE__ */ p(d, { layout: l, style: i, ...g, children: [
18
18
  n && m,
19
19
  o && c
20
20
  ] });
21
21
  }
22
- const L = x("span")`
22
+ const d = x("span")`
23
23
  display: inline-flex;
24
24
  flex-direction: ${(o) => o.layout === "horizontal" ? "row" : "column"};
25
25
  justify-content: center;
@@ -1,6 +1,6 @@
1
1
  export interface AspectRatioContainerProps {
2
2
  aspect: number;
3
- children?: React.ReactNode;
3
+ children: React.ReactNode;
4
4
  }
5
5
  declare function AspectRatioContainer({ aspect, children, ...rest }: AspectRatioContainerProps): import("react/jsx-runtime").JSX.Element;
6
6
  export default AspectRatioContainer;
@@ -46,7 +46,10 @@ function lr({
46
46
  ...k
47
47
  }) {
48
48
  var R;
49
- const F = (l) => /* @__PURE__ */ n(cr, { component: T, ...k, className: S(z, { "nft-display--inset": m }), children: l }), a = M({});
49
+ const F = (l) => (
50
+ // @ts-expect-error
51
+ /* @__PURE__ */ n(cr, { component: T, ...k, className: S(z, { "nft-display--inset": m }), children: l })
52
+ ), a = M({});
50
53
  try {
51
54
  typeof e == "string" ? a.current = JSON.parse(e) : a.current = e;
52
55
  const { vcId: l } = a.current, U = a.current.credentialSubject ? K(a.current, "credentialSubject.display") : a.current, { content: f, type: y } = U, G = y === "url", [t, c] = P({
@@ -198,7 +201,7 @@ const cr = nr(Z)`
198
201
  }
199
202
  `;
200
203
  function pr(e) {
201
- return function({ aspect: s, inset: m, ...g }) {
204
+ return function({ aspect: s = void 0, inset: m = !1, ...g }) {
202
205
  return s && s > 0 && !m ? /* @__PURE__ */ n(rr, { aspect: s, children: /* @__PURE__ */ n(e, { inset: !0, ...g }) }) : /* @__PURE__ */ n(e, { inset: m, ...g });
203
206
  };
204
207
  }
@@ -4,11 +4,11 @@ import { useAsyncEffect as f } from "ahooks";
4
4
  import c from "axios";
5
5
  import { useState as p } from "react";
6
6
  import a from "./svg-embedder/inline-svg.js";
7
- function y({ src: e, onLoad: t }) {
7
+ function y({ src: e, onLoad: t = void 0 }) {
8
8
  const [r, s] = p("");
9
9
  return f(async () => {
10
- const n = await c.get(e), i = m.sanitize(n.data);
11
- s(i), t == null || t();
10
+ const i = await c.get(e), n = m.sanitize(i.data);
11
+ s(n), t == null || t();
12
12
  }, []), /* @__PURE__ */ o(a, { svg: r });
13
13
  }
14
14
  export {