@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,13 +1,13 @@
1
1
  import { jsx as e, jsxs as t, Fragment as m } from "react/jsx-runtime";
2
- import { Box as l, Typography as p, Chip as w, List as R, ListItem as y, Button as q } from "@mui/material";
2
+ import { Box as i, Typography as p, Chip as x, List as R, ListItem as w, Button as q } from "@mui/material";
3
3
  import { Icon as u } from "@iconify/react";
4
4
  import D from "@iconify-icons/tabler/external-link";
5
5
  import L from "@iconify-icons/material-symbols/lock-outline";
6
6
  import B from "@iconify-icons/material-symbols/check-circle";
7
- import b from "@iconify-icons/material-symbols/rocket-launch-rounded";
7
+ import y from "@iconify-icons/material-symbols/rocket-launch-rounded";
8
8
  import { useReactive as F, useMemoizedFn as s } from "ahooks";
9
9
  import { memo as U, useRef as j, useImperativeHandle as M } from "react";
10
- import k from "lodash/noop";
10
+ import b from "lodash/noop";
11
11
  import { translate as W } from "../Locale/util.js";
12
12
  import Y from "./did-connect-container.js";
13
13
  import _ from "../CloseButton/index.js";
@@ -56,13 +56,13 @@ const P = {
56
56
  }
57
57
  };
58
58
  function T({
59
- ref: r,
60
- locale: f = "en",
59
+ ref: r = void 0,
60
+ locale: k = "en",
61
61
  src: c,
62
- storageAccessState: h
62
+ storageAccessState: f
63
63
  }) {
64
- const g = j(null), o = F({
65
- callback: k,
64
+ const h = j(null), o = F({
65
+ callback: b,
66
66
  open: !1,
67
67
  get origin() {
68
68
  try {
@@ -78,8 +78,8 @@ function T({
78
78
  return c;
79
79
  }
80
80
  }
81
- }), i = s((n, a = {}) => W(P, n, f, "en", a)), A = s(() => {
82
- o.open = !1, o.callback = k;
81
+ }), l = s((n, a = {}) => W(P, n, k, "en", a)), A = s(() => {
82
+ o.open = !1, o.callback = b;
83
83
  }), I = s(() => {
84
84
  o.open = !0;
85
85
  }), v = s(() => {
@@ -87,7 +87,7 @@ function T({
87
87
  }), C = s(
88
88
  async (n) => {
89
89
  var d;
90
- (await ((d = g.current) == null ? void 0 : d.callIframe("requestStorageAccess"))).value ? n(!0, "broswer") : h === void 0 ? n(!1, "system") : h === "denied" ? n(!1) : (o.open = !0, o.callback = n);
90
+ (await ((d = h.current) == null ? void 0 : d.callIframe("requestStorageAccess"))).value ? n(!0, "broswer") : f === void 0 ? n(!1, "system") : f === "denied" ? n(!1) : (o.open = !0, o.callback = n);
91
91
  }
92
92
  ), z = s(() => new Promise((n) => {
93
93
  C((a, d) => {
@@ -95,15 +95,15 @@ function T({
95
95
  });
96
96
  })), S = s(() => {
97
97
  o.open = !1;
98
- }), x = s(() => {
98
+ }), g = s(() => {
99
99
  o.open = !1, o.callback(!1, "system");
100
100
  });
101
101
  return M(r, () => ({
102
102
  open: I,
103
103
  close: v,
104
104
  requestStorageAccess: z
105
- })), /* @__PURE__ */ e(Y, { popup: !0, open: o.open, onClose: x, keepMounted: !0, children: /* @__PURE__ */ t(
106
- l,
105
+ })), /* @__PURE__ */ e(Y, { popup: !0, open: o.open, onClose: g, keepMounted: !0, children: /* @__PURE__ */ t(
106
+ i,
107
107
  {
108
108
  sx: {
109
109
  backgroundColor: "background.default",
@@ -121,7 +121,7 @@ function T({
121
121
  /* @__PURE__ */ e(
122
122
  _,
123
123
  {
124
- onClose: x,
124
+ onClose: g,
125
125
  sx: {
126
126
  position: "absolute",
127
127
  right: 14,
@@ -143,7 +143,7 @@ function T({
143
143
  },
144
144
  children: [
145
145
  /* @__PURE__ */ e(
146
- l,
146
+ i,
147
147
  {
148
148
  component: u,
149
149
  icon: L,
@@ -153,14 +153,14 @@ function T({
153
153
  }
154
154
  }
155
155
  ),
156
- i("title")
156
+ l("title")
157
157
  ]
158
158
  }
159
159
  ),
160
- /* @__PURE__ */ t(l, { sx: { display: "flex", flexDirection: "column", gap: 1 }, children: [
161
- /* @__PURE__ */ e(p, { children: i("reason", {
160
+ /* @__PURE__ */ t(i, { sx: { display: "flex", flexDirection: "column", gap: 1 }, children: [
161
+ /* @__PURE__ */ e(p, { children: l("reason", {
162
162
  site: /* @__PURE__ */ e(
163
- w,
163
+ x,
164
164
  {
165
165
  clickable: !0,
166
166
  component: "a",
@@ -174,13 +174,13 @@ function T({
174
174
  }
175
175
  )
176
176
  }) }),
177
- /* @__PURE__ */ e(p, { component: "div", children: i("clickAllow", {
178
- allowButton: /* @__PURE__ */ e(w, { label: i("allow"), size: "small", color: "success" })
177
+ /* @__PURE__ */ e(p, { component: "div", children: l("clickAllow", {
178
+ allowButton: /* @__PURE__ */ e(x, { label: l("allow"), size: "small", color: "success" })
179
179
  }) }),
180
- /* @__PURE__ */ t(l, { sx: { mt: 2 }, children: [
180
+ /* @__PURE__ */ t(i, { sx: { mt: 2 }, children: [
181
181
  /* @__PURE__ */ t(p, { sx: { display: "flex", alignItems: "center", gap: 1, mb: 0.5 }, children: [
182
182
  /* @__PURE__ */ e(
183
- l,
183
+ i,
184
184
  {
185
185
  component: u,
186
186
  icon: B,
@@ -190,36 +190,36 @@ function T({
190
190
  }
191
191
  }
192
192
  ),
193
- i("afterAllow.title")
193
+ l("afterAllow.title")
194
194
  ] }),
195
195
  /* @__PURE__ */ t(R, { dense: !0, sx: { py: 0, pl: 2 }, children: [
196
- /* @__PURE__ */ t(y, { sx: { display: "flex", alignItems: "center", gap: 0.8 }, children: [
196
+ /* @__PURE__ */ t(w, { sx: { display: "flex", alignItems: "center", gap: 0.8 }, children: [
197
197
  /* @__PURE__ */ e(
198
- l,
198
+ i,
199
199
  {
200
200
  component: u,
201
- icon: b,
201
+ icon: y,
202
202
  sx: {
203
203
  fontSize: 20,
204
204
  color: "success.main"
205
205
  }
206
206
  }
207
207
  ),
208
- i("afterAllow.list1")
208
+ l("afterAllow.list1")
209
209
  ] }),
210
- /* @__PURE__ */ t(y, { sx: { display: "flex", alignItems: "center", gap: 0.8 }, children: [
210
+ /* @__PURE__ */ t(w, { sx: { display: "flex", alignItems: "center", gap: 0.8 }, children: [
211
211
  /* @__PURE__ */ e(
212
- l,
212
+ i,
213
213
  {
214
214
  component: u,
215
- icon: b,
215
+ icon: y,
216
216
  sx: {
217
217
  fontSize: 20,
218
218
  color: "success.main"
219
219
  }
220
220
  }
221
221
  ),
222
- i("afterAllow.list2")
222
+ l("afterAllow.list2")
223
223
  ] })
224
224
  ] })
225
225
  ] }),
@@ -231,20 +231,19 @@ function T({
231
231
  sx: {
232
232
  color: "grey.700"
233
233
  },
234
- children: i("dataUsage")
234
+ children: l("dataUsage")
235
235
  }
236
236
  )
237
237
  ] }),
238
- /* @__PURE__ */ e(l, { sx: { display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ t(l, { sx: { position: "relative", display: "inline-block", cursor: "pointer" }, children: [
239
- /* @__PURE__ */ e(q, { variant: "contained", color: "success", onClick: S, sx: { minWidth: 100, letterSpacing: 1 }, children: i("allow") }),
238
+ /* @__PURE__ */ e(i, { sx: { display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ t(i, { sx: { position: "relative", display: "inline-block", cursor: "pointer" }, children: [
239
+ /* @__PURE__ */ e(q, { variant: "contained", color: "success", onClick: S, sx: { minWidth: 100, letterSpacing: 1 }, children: l("allow") }),
240
240
  /* @__PURE__ */ e(
241
241
  H,
242
242
  {
243
- ref: g,
243
+ ref: h,
244
244
  onClick: ({ value: n, visitorId: a }) => {
245
245
  a && O(a), o.callback(n, "broswer");
246
246
  },
247
- locale: f,
248
247
  src: c,
249
248
  sx: {
250
249
  zIndex: 1
@@ -256,7 +255,7 @@ function T({
256
255
  }
257
256
  ) });
258
257
  }
259
- const ie = U(T);
258
+ const le = U(T);
260
259
  export {
261
- ie as default
260
+ le as default
262
261
  };
@@ -1,5 +1,7 @@
1
1
  import { default as PropTypes } from 'prop-types';
2
- declare function CustomToolbar(props: any): import("react/jsx-runtime").JSX.Element;
2
+ declare function CustomToolbar({ ...props }: {
3
+ [x: string]: any;
4
+ }): import("react/jsx-runtime").JSX.Element;
3
5
  declare namespace CustomToolbar {
4
6
  namespace propTypes {
5
7
  let data: PropTypes.Requireable<any[]>;
@@ -14,7 +14,7 @@ function Ie() {
14
14
  const s = Te();
15
15
  return ve(s.breakpoints.down("sm"));
16
16
  }
17
- function Be(s) {
17
+ function Be({ ...s }) {
18
18
  const [f, d] = T(null), k = V(null), F = Ie(), N = V(Math.random().toString(32).slice(2)), [O, A] = T(!1), { customPreButtons: b, customButtons: C, loading: u, disabled: g } = Pe(), {
19
19
  data: Q = [],
20
20
  options: o,
@@ -25,7 +25,7 @@ const fe = $("div")`
25
25
  font-size: 14px;
26
26
  }
27
27
  `;
28
- function N(e) {
28
+ function N({ ...e }) {
29
29
  const { filterLabel: a } = M(), r = !!(e.filterList ?? []).filter((n) => n.length).length;
30
30
  return r ? /* @__PURE__ */ te(fe, { children: [
31
31
  r && /* @__PURE__ */ i("div", { className: "toolbar-filter-title", children: a }),
@@ -58,7 +58,7 @@ const k = (e, a) => {
58
58
  e.align && (a.className = P(a.className, `pc-align-${e.align}`)), e.verticalKeyAlign && (a.className = P(a.className, `vertical-align-${e.verticalKeyAlign}`)), e.minWidth && (r.minWidth = e.minWidth), a.style = Object.assign({}, a.style, r);
59
59
  };
60
60
  function A({
61
- data: e = [],
61
+ data: e,
62
62
  columns: a,
63
63
  locale: r = "en",
64
64
  options: n = {},
@@ -29,7 +29,7 @@ declare namespace Confirm {
29
29
  let open: PropTypes.Validator<boolean>;
30
30
  let onConfirm: PropTypes.Validator<(...args: any[]) => any>;
31
31
  let onCancel: PropTypes.Validator<(...args: any[]) => any>;
32
- let children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
32
+ let children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
33
33
  let showCancelButton: PropTypes.Requireable<boolean>;
34
34
  let showConfirmButton: PropTypes.Requireable<boolean>;
35
35
  let showCloseButton: PropTypes.Requireable<boolean>;
@@ -1,9 +1,9 @@
1
1
  import { jsx as r, jsxs as C, Fragment as g } from "react/jsx-runtime";
2
2
  import o from "prop-types";
3
- import { useMemoizedFn as y } from "ahooks";
4
- import u from "../Button/index.js";
5
- import j from "./dialog.js";
6
- function q({
3
+ import { useMemoizedFn as q } from "ahooks";
4
+ import c from "../Button/index.js";
5
+ import y from "./dialog.js";
6
+ function R({
7
7
  title: a,
8
8
  children: d,
9
9
  onConfirm: m,
@@ -27,11 +27,11 @@ function q({
27
27
  },
28
28
  t.style
29
29
  );
30
- const h = y((e, c) => {
31
- ["backdropClick", "escapeKeyDown"].includes(c) || (e.stopPropagation(), i(e, c));
30
+ const h = q((e, u) => {
31
+ ["backdropClick", "escapeKeyDown"].includes(u) || (e.stopPropagation(), i(e, u));
32
32
  });
33
33
  return /* @__PURE__ */ r(
34
- j,
34
+ y,
35
35
  {
36
36
  title: a,
37
37
  PaperProps: t,
@@ -56,7 +56,7 @@ function q({
56
56
  },
57
57
  actions: n || s ? /* @__PURE__ */ C(g, { children: [
58
58
  n && /* @__PURE__ */ r(
59
- u,
59
+ c,
60
60
  {
61
61
  onClick: (e) => {
62
62
  e.stopPropagation(), i(e, "closeButton");
@@ -67,7 +67,7 @@ function q({
67
67
  }
68
68
  ),
69
69
  s && /* @__PURE__ */ r(
70
- u,
70
+ c,
71
71
  {
72
72
  onClick: (e) => {
73
73
  e.stopPropagation(), m(e);
@@ -83,12 +83,12 @@ function q({
83
83
  }
84
84
  );
85
85
  }
86
- q.propTypes = {
86
+ R.propTypes = {
87
87
  title: o.node.isRequired,
88
88
  open: o.bool.isRequired,
89
89
  onConfirm: o.func.isRequired,
90
90
  onCancel: o.func.isRequired,
91
- children: o.node,
91
+ children: o.node.isRequired,
92
92
  showCancelButton: o.bool,
93
93
  showConfirmButton: o.bool,
94
94
  showCloseButton: o.bool,
@@ -105,5 +105,5 @@ q.propTypes = {
105
105
  PaperProps: o.object
106
106
  };
107
107
  export {
108
- q as default
108
+ R as default
109
109
  };
@@ -52,7 +52,7 @@ function W({
52
52
  height: g = 600,
53
53
  enableRotation: I = !1,
54
54
  rotationSpeed: M = 5,
55
- activeMarkerId: a,
55
+ activeMarkerId: a = void 0,
56
56
  markers: y = [],
57
57
  colors: L = {}
58
58
  }) {
@@ -6,4 +6,4 @@ export interface FooterProps {
6
6
  style?: React.CSSProperties;
7
7
  addon?: React.ReactNode;
8
8
  }
9
- export default function Footer(props: FooterProps): import("react/jsx-runtime").JSX.Element;
9
+ export default function Footer({ ...props }: FooterProps): import("react/jsx-runtime").JSX.Element;
@@ -2,10 +2,10 @@ import { jsxs as o, jsx as t } from "react/jsx-runtime";
2
2
  import { Container as h, Typography as r, Box as g } from "@mui/material";
3
3
  import { mergeProps as w } from "../Util/index.js";
4
4
  import y from "../Logo/index.js";
5
- import { styled as b } from "../Theme/index.js";
6
- function u(e) {
5
+ import { styled as u } from "../Theme/index.js";
6
+ function b({ ...e }) {
7
7
  var s;
8
- const p = w(e, u, ["dark", "style"]), { className: d = "", copyStart: m = "2017", style: c = {}, brand: x = "ArcBlock", dark: n = !1, addon: a = null } = p, i = `${(/* @__PURE__ */ new Date()).getFullYear()}`, l = `${m}`, f = i === l ? i : `${l}-${i}`;
8
+ const p = w(e, b, ["dark", "style"]), { className: d = "", copyStart: m = "2017", style: c = {}, brand: x = "ArcBlock", dark: n = !1, addon: a = null } = p, i = `${(/* @__PURE__ */ new Date()).getFullYear()}`, l = `${m}`, f = i === l ? i : `${l}-${i}`;
9
9
  return /* @__PURE__ */ o(k, { className: d, style: c, dark: n, children: [
10
10
  /* @__PURE__ */ t(h, { maxWidth: !1, children: /* @__PURE__ */ o(r, { component: "div", className: "footer", children: [
11
11
  /* @__PURE__ */ o(r, { component: "p", className: "footer-item", children: [
@@ -46,7 +46,7 @@ function u(e) {
46
46
  )
47
47
  ] });
48
48
  }
49
- const k = b("div", {
49
+ const k = u("div", {
50
50
  shouldForwardProp: (e) => e !== "dark"
51
51
  })`
52
52
  position: relative;
@@ -110,5 +110,5 @@ const k = b("div", {
110
110
  }
111
111
  `;
112
112
  export {
113
- u as default
113
+ b as default
114
114
  };
@@ -1,7 +1,7 @@
1
1
  import { ButtonProps } from '@mui/material';
2
2
  type Props<D extends React.ElementType, P = {}> = {
3
3
  icon?: React.ReactNode;
4
- children?: React.ReactNode;
4
+ children: React.ReactNode;
5
5
  } & ButtonProps<D, P>;
6
6
  export declare function AddonButton<D extends React.ElementType, P = {}>({ icon, children, sx, ...rest }: Props<D, P>): import("react/jsx-runtime").JSX.Element;
7
7
  export {};
@@ -1,6 +1,11 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { Button as d } from "@mui/material";
3
- function m({ icon: o, children: t, sx: r, ...i }) {
1
+ import { jsx as d } from "react/jsx-runtime";
2
+ import { Button as e } from "@mui/material";
3
+ function m({
4
+ icon: t = void 0,
5
+ children: r,
6
+ sx: o,
7
+ ...i
8
+ }) {
4
9
  const n = [
5
10
  {
6
11
  height: 32,
@@ -9,7 +14,7 @@ function m({ icon: o, children: t, sx: r, ...i }) {
9
14
  borderRadius: "100vh",
10
15
  fontSize: 14,
11
16
  color: "text.secondary",
12
- ...!t && {
17
+ ...!r && {
13
18
  padding: 0,
14
19
  height: 32,
15
20
  ".MuiButton-startIcon": {
@@ -17,9 +22,9 @@ function m({ icon: o, children: t, sx: r, ...i }) {
17
22
  }
18
23
  }
19
24
  },
20
- ...Array.isArray(r) ? r : [r]
25
+ ...Array.isArray(o) ? o : [o]
21
26
  ];
22
- return /* @__PURE__ */ e(d, { startIcon: o, color: "inherit", variant: "outlined", sx: n, ...i, children: t });
27
+ return /* @__PURE__ */ d(e, { startIcon: t, color: "inherit", variant: "outlined", sx: n, ...i, children: r });
23
28
  }
24
29
  export {
25
30
  m as AddonButton
@@ -13,7 +13,7 @@ function I({
13
13
  addons: p = null,
14
14
  prepend: f = null,
15
15
  align: o = "left",
16
- maxWidth: x,
16
+ maxWidth: x = !1,
17
17
  homeLink: i = "/",
18
18
  ...m
19
19
  }) {
@@ -13,5 +13,5 @@ export interface ResponsiveHeaderProps extends Omit<HeaderProps, 'children'> {
13
13
  *
14
14
  * 注意: 暂时不要通过 display: none 隐藏 logo, https://blog.patw.me/archives/1820/inline-svg-same-id-and-display-none-issue/
15
15
  */
16
- declare function ResponsiveHeader({ menu, prepend, children, ...rest }: ResponsiveHeaderProps): import("react/jsx-runtime").JSX.Element;
16
+ declare function ResponsiveHeader({ prepend, children, ...rest }: ResponsiveHeaderProps): import("react/jsx-runtime").JSX.Element;
17
17
  export default ResponsiveHeader;
@@ -1,48 +1,47 @@
1
- import { jsx as o, jsxs as y } from "react/jsx-runtime";
2
- import { useState as v } from "react";
3
- import { useReactive as g, useCreation as h } from "ahooks";
4
- import { Close as b, Menu as x } from "@mui/icons-material";
5
- import { Container as w, useTheme as P, useMediaQuery as k, Drawer as C, Button as M } from "@mui/material";
6
- import c from "./header.js";
7
- import { styled as f } from "../Theme/index.js";
8
- function H({ menu: m, prepend: s, children: r, ...u }) {
9
- const n = P(), a = k(n.breakpoints.down("md")), [t, l] = v(!1), d = typeof r == "function" ? r({ isMobile: a, closeMenu: () => l(!1) }) : r, e = g({
1
+ import { jsx as o, jsxs as f } from "react/jsx-runtime";
2
+ import { useState as y } from "react";
3
+ import { useReactive as v, useCreation as h } from "ahooks";
4
+ import { Close as g, Menu as b } from "@mui/icons-material";
5
+ import { Container as x, useTheme as w, useMediaQuery as P, Drawer as k, Button as C } from "@mui/material";
6
+ import i from "./header.js";
7
+ import { styled as c } from "../Theme/index.js";
8
+ function D({ prepend: n, children: r = null, ...s }) {
9
+ const a = w(), l = P(a.breakpoints.down("md")), [t, m] = y(!1), u = typeof r == "function" ? r({ isMobile: l, closeMenu: () => m(!1) }) : r, e = v({
10
10
  changed: !1,
11
11
  value: "",
12
12
  priority: ""
13
13
  });
14
14
  return h(() => {
15
- var p;
16
- if ((p = document.documentElement) != null && p.style) {
17
- const i = () => {
15
+ var d;
16
+ if ((d = document.documentElement) != null && d.style) {
17
+ const p = () => {
18
18
  e.changed && (e.value ? document.documentElement.style.setProperty("overflow", e.value, e.priority) : document.documentElement.style.removeProperty("overflow"), e.value = "", e.priority = "", e.changed = !1);
19
19
  };
20
- return t ? (e.changed = !0, e.value = document.documentElement.style.getPropertyValue("overflow"), e.priority = document.documentElement.style.getPropertyPriority("overflow"), document.documentElement.style.setProperty("overflow", "revert", "important")) : i(), i;
20
+ return t ? (e.changed = !0, e.value = document.documentElement.style.getPropertyValue("overflow"), e.priority = document.documentElement.style.getPropertyPriority("overflow"), document.documentElement.style.setProperty("overflow", "revert", "important")) : p(), p;
21
21
  }
22
22
  return () => {
23
23
  };
24
- }, [t]), r ? /* @__PURE__ */ y(
25
- E,
24
+ }, [t]), r ? /* @__PURE__ */ f(
25
+ M,
26
26
  {
27
- prepend: s || /* @__PURE__ */ o(
28
- M,
27
+ prepend: n || /* @__PURE__ */ o(
28
+ C,
29
29
  {
30
- sx: { color: n.palette.grey[500] },
31
- edge: "start",
30
+ sx: { color: a.palette.grey[500] },
32
31
  className: "header-menu",
33
32
  "aria-label": "header menu button",
34
- onClick: () => l(!t),
35
- children: t ? /* @__PURE__ */ o(b, {}) : /* @__PURE__ */ o(x, {})
33
+ onClick: () => m(!t),
34
+ children: t ? /* @__PURE__ */ o(g, {}) : /* @__PURE__ */ o(b, {})
36
35
  }
37
36
  ),
38
- ...u,
37
+ ...s,
39
38
  children: [
40
- !a && d,
41
- a && /* @__PURE__ */ o(
42
- C,
39
+ !l && u,
40
+ l && /* @__PURE__ */ o(
41
+ k,
43
42
  {
44
43
  open: t,
45
- onClose: () => l(!1),
44
+ onClose: () => m(!1),
46
45
  ModalProps: {
47
46
  disablePortal: !1,
48
47
  keepMounted: !0,
@@ -51,7 +50,7 @@ function H({ menu: m, prepend: s, children: r, ...u }) {
51
50
  anchor: "top",
52
51
  sx: {
53
52
  top: 64,
54
- zIndex: n.zIndex.appBar - 1
53
+ zIndex: a.zIndex.appBar - 1
55
54
  },
56
55
  slotProps: {
57
56
  paper: {
@@ -60,28 +59,28 @@ function H({ menu: m, prepend: s, children: r, ...u }) {
60
59
  bottom: 0,
61
60
  boxShadow: "none",
62
61
  backgroundImage: "none",
63
- backgroundColor: n.palette.background.paper
62
+ backgroundColor: a.palette.background.paper
64
63
  }
65
64
  }
66
65
  },
67
- children: /* @__PURE__ */ o(B, { children: d })
66
+ children: /* @__PURE__ */ o(E, { children: u })
68
67
  }
69
68
  )
70
69
  ]
71
70
  }
72
- ) : /* @__PURE__ */ o(c, { prepend: s, ...u });
71
+ ) : /* @__PURE__ */ o(i, { prepend: n, ...s });
73
72
  }
74
- const E = f(c)`
73
+ const M = c(i)`
75
74
  .header-menu {
76
75
  display: none;
77
76
  }
78
- ${(m) => m.theme.breakpoints.down("md")} {
77
+ ${(n) => n.theme.breakpoints.down("md")} {
79
78
  .header-menu {
80
79
  display: flex;
81
80
  margin-right: 12px;
82
81
  }
83
82
  }
84
- `, B = f(w)`
83
+ `, E = c(x)`
85
84
  padding-top: 8px;
86
85
  padding-bottom: 16px;
87
86
  .navmenu {
@@ -93,5 +92,5 @@ const E = f(c)`
93
92
  }
94
93
  `;
95
94
  export {
96
- H as default
95
+ D as default
97
96
  };
package/lib/Icon/index.js CHANGED
@@ -4,22 +4,22 @@ import l from "../Colors/themes/default.js";
4
4
  import { styled as p } from "../Theme/index.js";
5
5
  import { withDeprecated as m } from "../Util/deprecate.js";
6
6
  function h({
7
- name: r,
8
- color: o = l.grey[900],
7
+ name: o,
8
+ color: r = l.grey[900],
9
9
  size: e = 24,
10
10
  variant: a = "regular",
11
11
  rounded: f = !1,
12
12
  className: i = "",
13
- forwardedRef: c
13
+ forwardedRef: c = void 0
14
14
  }) {
15
- const s = a === "solid" ? `fa-solid:${r}` : `fa-regular:${r}`, n = /* @__PURE__ */ t(d, { icon: s, color: o, width: e, height: e, className: i });
16
- return f ? /* @__PURE__ */ t(u, { ref: c, size: e, color: o, className: i, children: n }) : n;
15
+ const s = a === "solid" ? `fa-solid:${o}` : `fa-regular:${o}`, n = /* @__PURE__ */ t(d, { icon: s, color: r, width: e, height: e, className: i });
16
+ return f ? /* @__PURE__ */ t(u, { ref: c, size: e, color: r, className: i, children: n }) : n;
17
17
  }
18
18
  const u = p("span")`
19
- width: ${(r) => r.size * 2}px;
20
- height: ${(r) => r.size * 2}px;
19
+ width: ${(o) => o.size * 2}px;
20
+ height: ${(o) => o.size * 2}px;
21
21
  border-radius: 50%;
22
- border: 1px solid ${(r) => r.color};
22
+ border: 1px solid ${(o) => o.color};
23
23
  display: flex;
24
24
  justify-content: center;
25
25
  align-items: center;
@@ -28,13 +28,13 @@ const u = p("span")`
28
28
  .fas,
29
29
  .fal,
30
30
  .far {
31
- line-height: ${(r) => r.size}px;
31
+ line-height: ${(o) => o.size}px;
32
32
  }
33
33
  `, y = m(
34
34
  ({
35
- ref: r,
36
- ...o
37
- }) => /* @__PURE__ */ t(h, { ...o, forwardedRef: r }),
35
+ ref: o,
36
+ ...r
37
+ }) => /* @__PURE__ */ t(h, { ...r, forwardedRef: o }),
38
38
  { name: "Icon", alternative: "SVG icons" }
39
39
  );
40
40
  export {
@@ -1,6 +1,6 @@
1
1
  export interface InfoRowProps {
2
2
  name: React.ReactNode;
3
- nameFormatter: (name: React.ReactNode) => React.ReactNode;
3
+ nameFormatter?: (name: React.ReactNode) => React.ReactNode;
4
4
  layout?: 'horizontal' | 'vertical';
5
5
  children: React.ReactNode;
6
6
  valueComponent?: React.ElementType;
@@ -5,7 +5,6 @@ import { Typography as e } from "@mui/material";
5
5
  import { styled as d } from "../Theme/index.js";
6
6
  function v({
7
7
  name: t,
8
- // eslint-disable-next-line no-shadow
9
8
  nameFormatter: a = (o) => typeof o == "string" ? o.split(" ").map((s) => x(c(s))).join(" ") : o,
10
9
  layout: n = "horizontal",
11
10
  children: r,
@@ -4,7 +4,7 @@ type RouterNavLinkProps = React.ComponentProps<typeof RouterNavLink>;
4
4
  export interface LinkProps extends RouterLinkProps {
5
5
  external?: false | true;
6
6
  }
7
- export declare function Link(props: LinkProps): import("react/jsx-runtime").JSX.Element;
7
+ export declare function Link({ ...props }: LinkProps): import("react/jsx-runtime").JSX.Element;
8
8
  export interface NavLinkProps extends Omit<RouterNavLinkProps, 'className'> {
9
9
  className?: string | ((props: Partial<NavLinkRenderProps>) => string | undefined);
10
10
  external?: false | true;
@@ -15,7 +15,7 @@ function u({
15
15
  /* @__PURE__ */ r(n, { to: o, ...e, children: i })
16
16
  );
17
17
  }
18
- function p(n) {
18
+ function p({ ...n }) {
19
19
  return /* @__PURE__ */ r(u, { routerLinkComponent: f, ...n });
20
20
  }
21
21
  function m({ className: n = "", ...o }) {