@arcblock/ux 3.0.5 → 3.0.7

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 (370) hide show
  1. package/lib/ActionButton/index.d.ts +1 -1
  2. package/lib/ActionButton/index.js +9 -9
  3. package/lib/ActivityIndicator/index.js +6 -7
  4. package/lib/Address/compact-text.d.ts +1 -1
  5. package/lib/Address/compact-text.js +6 -7
  6. package/lib/Address/did-address.js +4 -4
  7. package/lib/Address/index.js +6 -6
  8. package/lib/Address/responsive-did-address.js +17 -17
  9. package/lib/Alert/index.d.ts +1 -1
  10. package/lib/Alert/index.js +8 -8
  11. package/lib/AnimationWaiter/index.js +10 -10
  12. package/lib/Async/index.js +4 -4
  13. package/lib/Avatar/etherscan-blockies.js +15 -15
  14. package/lib/Avatar/index.d.ts +1 -1
  15. package/lib/Avatar/index.js +6 -6
  16. package/lib/Badge/index.js +5 -5
  17. package/lib/Blocklet/blocklet.js +10 -10
  18. package/lib/Blocklet/index.js +6 -5
  19. package/lib/Blocklet/utils.js +1 -1
  20. package/lib/BlockletContext/index.d.ts +1 -1
  21. package/lib/BlockletContext/index.js +1 -1
  22. package/lib/BlockletNFT/index.js +19 -19
  23. package/lib/BlockletV2/blocklet.d.ts +1 -1
  24. package/lib/BlockletV2/blocklet.js +36 -37
  25. package/lib/BlockletV2/components/icon-text.d.ts +1 -1
  26. package/lib/BlockletV2/components/icon-text.js +13 -13
  27. package/lib/BlockletV2/components/tooltip-icon.js +22 -20
  28. package/lib/BlockletV2/index.js +8 -7
  29. package/lib/BlockletV2/utils.js +1 -1
  30. package/lib/Button/index.js +1 -1
  31. package/lib/Button/wrap.js +3 -3
  32. package/lib/ButtonGroup/index.js +1 -1
  33. package/lib/Center/index.js +4 -4
  34. package/lib/ClickToCopy/copy-button.js +3 -3
  35. package/lib/ClickToCopy/index.js +5 -5
  36. package/lib/CloseButton/index.js +2 -2
  37. package/lib/CodeBlock/index.js +3 -3
  38. package/lib/Colors/index.js +3 -3
  39. package/lib/Config/config-provider.js +15 -16
  40. package/lib/Config/index.js +3 -5
  41. package/lib/Config/theme-mode-toggle.js +1 -1
  42. package/lib/ContactForm/index.js +26 -25
  43. package/lib/CookieConsent/index.js +1 -1
  44. package/lib/CountDown/index.js +2 -2
  45. package/lib/DID/index.js +79 -78
  46. package/lib/DIDConnect/app-icon.js +10 -10
  47. package/lib/DIDConnect/app-info-item.js +5 -5
  48. package/lib/DIDConnect/auth-apps/auth-apps-info.js +1 -1
  49. package/lib/DIDConnect/auth-apps/index.js +56 -56
  50. package/lib/DIDConnect/did-connect-container.js +35 -36
  51. package/lib/DIDConnect/did-connect-footer.js +7 -7
  52. package/lib/DIDConnect/index.js +10 -10
  53. package/lib/DIDConnect/landing-page.js +45 -46
  54. package/lib/DIDConnect/powered-by.js +2 -2
  55. package/lib/DIDConnect/request-storage-access-api-dialog.js +44 -45
  56. package/lib/DIDConnect/with-container.js +25 -26
  57. package/lib/DIDConnect/with-ux-theme.js +6 -7
  58. package/lib/Datatable/CustomToolbar.d.ts +3 -1
  59. package/lib/Datatable/CustomToolbar.js +13 -13
  60. package/lib/Datatable/TableSearch.js +2 -2
  61. package/lib/Datatable/index.js +6 -6
  62. package/lib/Dialog/confirm.d.ts +1 -1
  63. package/lib/Dialog/confirm.js +20 -20
  64. package/lib/Dialog/dialog.js +7 -7
  65. package/lib/Dialog/index.js +3 -3
  66. package/lib/Dialog/types.d.ts +20 -0
  67. package/lib/Dialog/use-confirm.js +1 -1
  68. package/lib/DriftBot/index.js +1 -1
  69. package/lib/Earth/index.js +10 -10
  70. package/lib/Empty/index.js +1 -1
  71. package/lib/ErrorBoundary/fallback.js +15 -15
  72. package/lib/ErrorBoundary/index.js +1 -6
  73. package/lib/Footer/index.d.ts +1 -1
  74. package/lib/Footer/index.js +7 -7
  75. package/lib/Header/addon-button.d.ts +1 -1
  76. package/lib/Header/addon-button.js +11 -6
  77. package/lib/Header/auto-hidden.js +1 -1
  78. package/lib/Header/header.js +4 -4
  79. package/lib/Header/index.js +3 -3
  80. package/lib/Header/responsive-header.d.ts +1 -1
  81. package/lib/Header/responsive-header.js +33 -34
  82. package/lib/Icon/image.js +2 -2
  83. package/lib/Icon/index.js +12 -12
  84. package/lib/Img/index.js +1 -1
  85. package/lib/InfoRow/index.d.ts +1 -1
  86. package/lib/InfoRow/index.js +1 -2
  87. package/lib/Layout/dashboard/external-link.d.ts +1 -1
  88. package/lib/Layout/dashboard/external-link.js +1 -1
  89. package/lib/Layout/dashboard/full-page.js +8 -8
  90. package/lib/Layout/dashboard/index.js +30 -32
  91. package/lib/Layout/dashboard/sidebar.js +3 -3
  92. package/lib/Layout/dashboard-legacy/header.js +12 -12
  93. package/lib/Layout/dashboard-legacy/index.js +20 -20
  94. package/lib/Layout/dashboard-legacy/sidebar.d.ts +1 -1
  95. package/lib/Layout/dashboard-legacy/sidebar.js +20 -13
  96. package/lib/Layout/index.js +7 -7
  97. package/lib/LoadingMask/index.d.ts +1 -1
  98. package/lib/LoadingMask/index.js +4 -4
  99. package/lib/Locale/context.js +27 -27
  100. package/lib/Locale/selector.d.ts +1 -1
  101. package/lib/Locale/selector.js +4 -4
  102. package/lib/Logo/index.js +19 -19
  103. package/lib/Metric/index.js +2 -2
  104. package/lib/NFTDisplay/aspect-ratio-container.d.ts +1 -1
  105. package/lib/NFTDisplay/aspect-ratio-container.js +1 -1
  106. package/lib/NFTDisplay/broken.js +2 -2
  107. package/lib/NFTDisplay/index.js +38 -35
  108. package/lib/NFTDisplay/loading.js +1 -1
  109. package/lib/NFTDisplay/render-svg.js +4 -4
  110. package/lib/NFTDisplay/svg-embedder/img.js +3 -3
  111. package/lib/NFTDisplay/svg-embedder/inline-svg.js +1 -1
  112. package/lib/NavMenu/index.js +2 -2
  113. package/lib/NavMenu/nav-menu.js +46 -44
  114. package/lib/NavMenu/products.js +33 -33
  115. package/lib/NavMenu/style.js +1 -1
  116. package/lib/NavMenu/sub-item-group.js +1 -1
  117. package/lib/PageScroller/index.js +53 -53
  118. package/lib/PageScroller/story/FullPage.js +27 -27
  119. package/lib/PageScroller/story/PageContain.js +8 -8
  120. package/lib/Passport/index.js +3 -2
  121. package/lib/Passport/passport.js +2 -2
  122. package/lib/PhoneInput/country-select.js +24 -24
  123. package/lib/PhoneInput/index.js +13 -13
  124. package/lib/PoweredByArcBlock/index.js +10 -6
  125. package/lib/PricingTable/PricingPlan.js +1 -1
  126. package/lib/PricingTable/index.js +3 -3
  127. package/lib/QRCode/index.js +5 -5
  128. package/lib/RelativeTime/index.js +17 -17
  129. package/lib/Result/common.js +4 -6
  130. package/lib/Result/index.js +2 -2
  131. package/lib/Result/result.js +5 -5
  132. package/lib/Screenshot/BaseScreenshot/index.js +3 -3
  133. package/lib/Screenshot/index.d.ts +1 -1
  134. package/lib/Screenshot/index.js +10 -10
  135. package/lib/SessionBlocklet/index.js +8 -8
  136. package/lib/SessionManager/index.js +3 -2
  137. package/lib/SessionUser/components/did-space.d.ts +1 -1
  138. package/lib/SessionUser/components/did-space.js +14 -14
  139. package/lib/SessionUser/components/logged-in.js +33 -33
  140. package/lib/SessionUser/components/quick-login-item.js +29 -29
  141. package/lib/SessionUser/components/session-user-item.js +27 -27
  142. package/lib/SessionUser/components/session-user-switch.js +4 -4
  143. package/lib/SessionUser/components/un-login.js +7 -7
  144. package/lib/SessionUser/components/user-info.js +16 -16
  145. package/lib/SessionUser/index.js +2 -2
  146. package/lib/SharedBridge/index.js +23 -23
  147. package/lib/Spinner/index.js +2 -2
  148. package/lib/SplitButton/index.d.ts +1 -1
  149. package/lib/SplitButton/index.js +2 -2
  150. package/lib/Success/index.js +1 -1
  151. package/lib/Switch/index.js +1 -1
  152. package/lib/Tabs/index.js +16 -9
  153. package/lib/Tag/index.d.ts +1 -1
  154. package/lib/Tag/index.js +7 -7
  155. package/lib/TextCollapse/index.js +3 -3
  156. package/lib/Theme/index.js +11 -22
  157. package/lib/Theme/theme-provider.js +60 -55
  158. package/lib/Theme/theme.js +5 -4
  159. package/lib/Toast/index.js +11 -11
  160. package/lib/Typography/index.js +13 -13
  161. package/lib/UserCard/Cards/avatar-only.js +2 -2
  162. package/lib/UserCard/Cards/basic-info.d.ts +1 -1
  163. package/lib/UserCard/Cards/basic-info.js +4 -4
  164. package/lib/UserCard/Cards/index.d.ts +1 -1
  165. package/lib/UserCard/Cards/index.js +4 -4
  166. package/lib/UserCard/Cards/name-only.js +1 -1
  167. package/lib/UserCard/Container/card.js +8 -8
  168. package/lib/UserCard/Container/dialog.js +2 -2
  169. package/lib/UserCard/Content/basic.js +3 -3
  170. package/lib/UserCard/Content/clock.js +3 -3
  171. package/lib/UserCard/Content/minimal.d.ts +1 -1
  172. package/lib/UserCard/Content/minimal.js +8 -8
  173. package/lib/UserCard/Content/tooltip-avatar.js +18 -18
  174. package/lib/UserCard/components.js +23 -23
  175. package/lib/UserCard/index.js +12 -12
  176. package/lib/Util/index.js +2 -2
  177. package/lib/VerificationCode/index.js +2 -2
  178. package/lib/Video/index.js +2 -2
  179. package/lib/Wallet/Action.js +4 -4
  180. package/lib/Wallet/Download.js +6 -6
  181. package/lib/Wallet/Open.js +1 -1
  182. package/lib/WalletOSIcon/index.d.ts +2 -2
  183. package/lib/WalletOSIcon/index.js +8 -3
  184. package/lib/WebWalletSWKeeper/index.d.ts +3 -1
  185. package/lib/WebWalletSWKeeper/index.js +6 -3
  186. package/lib/WechatPrompt/index.js +1 -1
  187. package/lib/global.d.ts +28 -0
  188. package/lib/hooks/use-blocklet-logo.js +13 -15
  189. package/lib/hooks/use-clock.js +1 -1
  190. package/lib/index.js +74 -79
  191. package/lib/type.d.ts +44 -0
  192. package/lib/withTheme/index.d.ts +3 -2
  193. package/lib/withTheme/index.js +13 -14
  194. package/lib/withTracker/error_boundary.js +1 -1
  195. package/package.json +7 -7
  196. package/src/ActionButton/index.jsx +1 -1
  197. package/src/Address/compact-text.jsx +1 -1
  198. package/src/Address/did-address.tsx +1 -1
  199. package/src/Address/index.tsx +1 -1
  200. package/src/Address/responsive-did-address.tsx +3 -3
  201. package/src/Alert/index.jsx +1 -1
  202. package/src/Avatar/index.jsx +1 -1
  203. package/src/Badge/index.jsx +1 -1
  204. package/src/BlockletContext/index.tsx +1 -1
  205. package/src/BlockletNFT/index.jsx +1 -1
  206. package/src/BlockletV2/blocklet.tsx +1 -1
  207. package/src/BlockletV2/components/icon-text.tsx +4 -4
  208. package/src/BlockletV2/components/tooltip-icon.tsx +5 -3
  209. package/src/Button/wrap.jsx +1 -1
  210. package/src/Center/index.tsx +1 -1
  211. package/src/ClickToCopy/copy-button.tsx +1 -1
  212. package/src/CloseButton/index.tsx +1 -1
  213. package/src/ContactForm/index.tsx +9 -2
  214. package/src/DID/index.tsx +5 -4
  215. package/src/DIDConnect/app-info-item.tsx +1 -1
  216. package/src/DIDConnect/auth-apps/index.tsx +8 -8
  217. package/src/DIDConnect/did-connect-container.tsx +2 -2
  218. package/src/DIDConnect/did-connect-footer.tsx +1 -1
  219. package/src/DIDConnect/landing-page.tsx +6 -6
  220. package/src/DIDConnect/request-storage-access-api-dialog.tsx +1 -2
  221. package/src/Datatable/CustomToolbar.jsx +1 -1
  222. package/src/Datatable/index.jsx +2 -2
  223. package/src/Dialog/confirm.jsx +1 -1
  224. package/src/Earth/index.tsx +1 -1
  225. package/src/Footer/index.tsx +5 -2
  226. package/src/Header/addon-button.tsx +7 -2
  227. package/src/Header/header.tsx +1 -1
  228. package/src/Header/responsive-header.tsx +1 -2
  229. package/src/Icon/index.tsx +1 -1
  230. package/src/InfoRow/index.tsx +1 -2
  231. package/src/Layout/dashboard/external-link.tsx +1 -1
  232. package/src/Layout/dashboard/full-page.tsx +1 -1
  233. package/src/Layout/dashboard/index.tsx +1 -1
  234. package/src/Layout/dashboard/sidebar.tsx +5 -2
  235. package/src/Layout/dashboard-legacy/header.tsx +5 -5
  236. package/src/Layout/dashboard-legacy/index.tsx +3 -3
  237. package/src/Layout/dashboard-legacy/sidebar.tsx +10 -2
  238. package/src/Layout/index.tsx +2 -2
  239. package/src/LoadingMask/index.tsx +5 -5
  240. package/src/Locale/context.tsx +3 -3
  241. package/src/Locale/selector.tsx +1 -1
  242. package/src/Logo/index.tsx +1 -1
  243. package/src/NFTDisplay/aspect-ratio-container.tsx +1 -1
  244. package/src/NFTDisplay/index.tsx +2 -1
  245. package/src/NFTDisplay/render-svg.tsx +1 -1
  246. package/src/NavMenu/nav-menu.tsx +8 -5
  247. package/src/NavMenu/products.tsx +3 -1
  248. package/src/PageScroller/index.tsx +4 -4
  249. package/src/PhoneInput/country-select.tsx +3 -3
  250. package/src/PhoneInput/index.tsx +1 -1
  251. package/src/PoweredByArcBlock/index.tsx +5 -1
  252. package/src/QRCode/index.tsx +1 -1
  253. package/src/RelativeTime/index.tsx +3 -3
  254. package/src/Result/result.tsx +1 -1
  255. package/src/Screenshot/index.tsx +2 -2
  256. package/src/SessionUser/components/did-space.tsx +1 -1
  257. package/src/SessionUser/components/session-user-item.tsx +1 -1
  258. package/src/SharedBridge/index.tsx +2 -2
  259. package/src/Spinner/index.tsx +1 -1
  260. package/src/SplitButton/index.tsx +1 -1
  261. package/src/Success/index.tsx +1 -1
  262. package/src/Tabs/index.tsx +10 -3
  263. package/src/Tag/index.jsx +1 -1
  264. package/src/TextCollapse/index.tsx +1 -1
  265. package/src/Theme/theme-provider.tsx +11 -6
  266. package/src/Theme/theme.ts +5 -0
  267. package/src/Typography/index.tsx +1 -1
  268. package/src/UserCard/Cards/basic-info.tsx +1 -1
  269. package/src/UserCard/Cards/index.tsx +1 -1
  270. package/src/UserCard/Container/card.tsx +2 -2
  271. package/src/UserCard/Container/dialog.tsx +1 -1
  272. package/src/UserCard/Content/basic.tsx +2 -2
  273. package/src/UserCard/Content/minimal.tsx +1 -1
  274. package/src/UserCard/Content/tooltip-avatar.tsx +4 -4
  275. package/src/VerificationCode/index.tsx +1 -1
  276. package/src/WalletOSIcon/index.tsx +7 -2
  277. package/src/WebWalletSWKeeper/index.tsx +6 -1
  278. package/src/withTheme/index.tsx +7 -3
  279. package/vite.config.mjs +5 -2
  280. package/lib/ActionButton/ActionButton.stories.d.ts +0 -18
  281. package/lib/ActivityIndicator/ActivityIndicator.stories.d.ts +0 -8
  282. package/lib/Address/Address.stories.d.ts +0 -16
  283. package/lib/Alert/Alert.stories.d.ts +0 -28
  284. package/lib/AnimationWaiter/AnimationWaiter.stories.d.ts +0 -21
  285. package/lib/AnimationWaiter/dark-animation.json.js +0 -27
  286. package/lib/AnimationWaiter/default-animation.json.js +0 -29
  287. package/lib/Avatar/Avatar.stories.d.ts +0 -11
  288. package/lib/Badge/Badge.stories.d.ts +0 -13
  289. package/lib/Blocklet/Blocklet.stories.d.ts +0 -17
  290. package/lib/BlockletNFT/BlockletNFT.stories.d.ts +0 -17
  291. package/lib/BlockletV2/Blocklet.stories.d.ts +0 -18
  292. package/lib/Button/Button.stories.d.ts +0 -19
  293. package/lib/Center/Center.stories.d.ts +0 -18
  294. package/lib/ClickToCopy/ClickToCopy.stories.d.ts +0 -16
  295. package/lib/CodeBlock/CodeBlock.stories.d.ts +0 -20
  296. package/lib/Colors/Colors.stories.d.ts +0 -34
  297. package/lib/Config/Config.stories.d.ts +0 -14
  298. package/lib/ContactForm/ContactForm.stories.d.ts +0 -23
  299. package/lib/CookieConsent/CookieConsent.stories.d.ts +0 -18
  300. package/lib/CountDown/CountDown.stories.d.ts +0 -14
  301. package/lib/DID/DID.stories.d.ts +0 -15
  302. package/lib/Datatable/Datatable.stories.d.ts +0 -32
  303. package/lib/Dialog/Dialog.stories.d.ts +0 -20
  304. package/lib/DidLogo/Logo.stories.d.ts +0 -8
  305. package/lib/Earth/Earth.stories.d.ts +0 -18
  306. package/lib/Earth/countries.json.js +0 -13
  307. package/lib/Empty/Empty.stories.d.ts +0 -17
  308. package/lib/ErrorBoundary/ErrorBoundary.stories.d.ts +0 -12
  309. package/lib/Footer/Footer.stories.d.ts +0 -12
  310. package/lib/Header/Header.stories.d.ts +0 -21
  311. package/lib/Icon/Icon.stories.d.ts +0 -23
  312. package/lib/Img/Img.stories.d.ts +0 -13
  313. package/lib/InfoRow/InfoRow.stories.d.ts +0 -14
  314. package/lib/Layout/Layout.stories.d.ts +0 -23
  315. package/lib/Locale/LocaleSelector.stories.d.ts +0 -22
  316. package/lib/Logo/Logo.stories.d.ts +0 -22
  317. package/lib/Logo/images/logo-dark-text.svg.js +0 -5
  318. package/lib/Logo/images/logo-dark-top.svg.js +0 -5
  319. package/lib/Logo/images/logo-light-text.svg.js +0 -5
  320. package/lib/Logo/images/logo-light-top.svg.js +0 -5
  321. package/lib/Metric/Metric.stories.d.ts +0 -14
  322. package/lib/NFTDisplay/NFTBroken.svg.js +0 -108
  323. package/lib/NFTDisplay/NFTDisplay.stories.d.ts +0 -15
  324. package/lib/NavMenu/NavMenu.stories.d.ts +0 -17
  325. package/lib/NavMenu/images/OCAP.svg.js +0 -5
  326. package/lib/NavMenu/images/abt-network.svg.js +0 -7
  327. package/lib/NavMenu/images/ai-kit.svg.js +0 -7
  328. package/lib/NavMenu/images/aigne.svg.js +0 -7
  329. package/lib/NavMenu/images/aistro.svg.js +0 -5
  330. package/lib/NavMenu/images/arcsphere.svg.js +0 -10
  331. package/lib/NavMenu/images/blocklet-framework.svg.js +0 -7
  332. package/lib/NavMenu/images/blocklet-launcher.svg.js +0 -5
  333. package/lib/NavMenu/images/blocklet-server.svg.js +0 -7
  334. package/lib/NavMenu/images/blocklet-store.svg.js +0 -5
  335. package/lib/NavMenu/images/creator-studio.svg.js +0 -7
  336. package/lib/NavMenu/images/did-connect.svg.js +0 -5
  337. package/lib/NavMenu/images/did-name-service.svg.js +0 -5
  338. package/lib/NavMenu/images/did-wallet.svg.js +0 -7
  339. package/lib/NavMenu/images/did.svg.js +0 -5
  340. package/lib/NavMenu/images/nft-studio.svg.js +0 -5
  341. package/lib/NavMenu/images/vc.svg.js +0 -5
  342. package/lib/NavMenu/images/web3-kit.svg.js +0 -7
  343. package/lib/PageScroller/story/PageScroller.stories.d.ts +0 -13
  344. package/lib/PhoneInput/PhoneInput.stories.d.ts +0 -12
  345. package/lib/PricingTable/PricingTable.stories.d.ts +0 -8
  346. package/lib/QRCode/QRCode.stories.d.ts +0 -13
  347. package/lib/RelativeTime/RelativeTime.stories.d.ts +0 -20
  348. package/lib/Result/Result.stories.d.ts +0 -21
  349. package/lib/Screenshot/Screenshot.stories.d.ts +0 -13
  350. package/lib/SessionManager/SessionManager.stories.d.ts +0 -9
  351. package/lib/SessionUser/images/did-spaces.svg.js +0 -5
  352. package/lib/Sparkline/Sparkline.stories.d.ts +0 -12
  353. package/lib/Spinner/Spinner.stories.d.ts +0 -18
  354. package/lib/SplitButton/SplitButton.stories.d.ts +0 -15
  355. package/lib/Switch/Switch.stories.d.ts +0 -13
  356. package/lib/Tabs/Tabs.stories.d.ts +0 -14
  357. package/lib/Tag/Tag.stories.d.ts +0 -13
  358. package/lib/TextCollapse/TextCollapse.stories.d.ts +0 -28
  359. package/lib/Theme/Theme.stories.d.ts +0 -10
  360. package/lib/Toast/Toast.stories.d.ts +0 -15
  361. package/lib/UserCard/UserCard.stories.d.ts +0 -18
  362. package/lib/Util/WebWalletOpener.stories.d.ts +0 -5
  363. package/lib/Video/Video.stories.d.ts +0 -6
  364. package/lib/Wallet/Action.stories.d.ts +0 -8
  365. package/lib/Wallet/Download.stories.d.ts +0 -9
  366. package/lib/Wallet/OpenInWallet.stories.d.ts +0 -5
  367. package/lib/Wallet/images/android_download.svg.js +0 -5
  368. package/lib/Wallet/images/app-store.svg.js +0 -5
  369. package/lib/Wallet/images/google-play.svg.js +0 -5
  370. package/lib/ux.css +0 -1
@@ -1,18 +1,18 @@
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";
11
- import { translate as W } from "../Locale/util.js";
12
- import Y from "./did-connect-container.js";
13
- import _ from "../CloseButton/index.js";
14
- import H from "../SharedBridge/index.js";
15
- import { setVisitorId as O } from "../Util/index.js";
10
+ import b from "lodash/noop";
11
+ import { translate as W } from "../Locale/util";
12
+ import Y from "./did-connect-container";
13
+ import _ from "../CloseButton";
14
+ import H from "../SharedBridge";
15
+ import { setVisitorId as O } from "../Util";
16
16
  const P = {
17
17
  en: {
18
18
  allow: "Allow",
@@ -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,13 +1,12 @@
1
1
  import { jsx as n, jsxs as E } from "react/jsx-runtime";
2
2
  import { memo as H, createElement as I, useState as K, useRef as Q } from "react";
3
- import { Backdrop as U, useMediaQuery as V, useTheme as q, Box as c, Drawer as J, SwipeableDrawer as X, Dialog as Y, DialogContent as Z } from "@mui/material";
4
- import { useDebounce as oo, useMemoizedFn as D } from "ahooks";
5
- import { useBrowser as eo } from "@arcblock/react-hooks";
6
- import no from "color-convert";
7
- import "../Theme/theme.js";
8
- import "../Theme/theme-provider.js";
9
- import { mergeSx as ro } from "../Util/style.js";
10
- import { hexToRgba as d } from "../Util/index.js";
3
+ import { Backdrop as U, useMediaQuery as V, Box as c, Drawer as q, SwipeableDrawer as J, Dialog as X, DialogContent as Y } from "@mui/material";
4
+ import { useDebounce as Z, useMemoizedFn as D } from "ahooks";
5
+ import { useBrowser as oo } from "@arcblock/react-hooks";
6
+ import eo from "color-convert";
7
+ import { useTheme as no } from "../Theme";
8
+ import { mergeSx as ro } from "../Util/style";
9
+ import { hexToRgba as d } from "../Util";
11
10
  const L = H(({ ref: l, ...m }) => /* @__PURE__ */ I(
12
11
  U,
13
12
  {
@@ -22,7 +21,7 @@ const L = H(({ ref: l, ...m }) => /* @__PURE__ */ I(
22
21
  key: "background"
23
22
  }
24
23
  ));
25
- function fo(l) {
24
+ function go(l) {
26
25
  function m({
27
26
  popup: B = !1,
28
27
  open: _ = !1,
@@ -30,25 +29,25 @@ function fo(l) {
30
29
  ...e
31
30
  }) {
32
31
  var P, y;
33
- const [a, x] = K("#fff"), w = Q(null), z = eo(), M = V("(max-width:640px)");
32
+ const [t, x] = K("#fff"), w = Q(null), z = oo(), M = V("(max-width:640px)");
34
33
  let r = "page";
35
34
  B && (r = "dialog", M && z.mobile.any && (r = "drawer"));
36
- const g = q(), p = _, T = ((y = (P = g == null ? void 0 : g.transitions) == null ? void 0 : P.duration) == null ? void 0 : y.leavingScreen) || 500, A = oo(p, {
35
+ const g = no(), p = _, T = ((y = (P = g == null ? void 0 : g.transitions) == null ? void 0 : P.duration) == null ? void 0 : y.leavingScreen) || 500, A = Z(p, {
37
36
  wait: T
38
37
  }), k = D(() => {
39
38
  const o = new URLSearchParams(window.location.search);
40
39
  o.get("magicToken") && o.delete("magicToken"), o.toString() && window.history.replaceState({}, "", `${window.location.pathname}?${o.toString()}`);
41
- }), C = (o, t) => {
42
- ["backdropClick", "escapeKeyDown"].includes(t) || (k(), e == null || e.onClose());
43
- }, $ = A || p, j = h ? J : X, O = no.hex.hsl(a), [R, S, i] = O, u = [0, 30, 60, 30, 0, 30, 60, 30], W = Math.max(...u), G = Math.min(...u);
40
+ }), C = (o, a) => {
41
+ ["backdropClick", "escapeKeyDown"].includes(a) || (k(), e == null || e.onClose());
42
+ }, $ = A || p, j = h ? q : J, O = eo.hex.hsl(t), [R, S, i] = O, u = [0, 30, 60, 30, 0, 30, 60, 30], W = Math.max(...u), G = Math.min(...u);
44
43
  let f = !1;
45
44
  (i * (100 + W) / 100 > 100 || i * (100 + G) / 100 < 0) && (f = !0);
46
45
  const N = `linear-gradient(45deg, ${u.map((o) => {
47
- let t = i * (100 + o) / 100, s = 0.6;
48
- return f ? s = 0.5 * (100 + o) / 100 : t = i * (100 + o) / 100, `hsla(${R}, ${S}%, ${t}%, ${s})`;
46
+ let a = i * (100 + o) / 100, s = 0.6;
47
+ return f ? s = 0.5 * (100 + o) / 100 : a = i * (100 + o) / 100, `hsla(${R}, ${S}%, ${a}%, ${s})`;
49
48
  }).join(", ")})`, F = `linear-gradient(45deg, ${u.map((o) => {
50
- let t = i * (100 + o) / 100, s = 0.2;
51
- return f ? s = 0.3 * (100 + o) / 100 : t = i * (100 + o) / 100, `hsla(${R}, ${S}%, ${t}%, ${s})`;
49
+ let a = i * (100 + o) / 100, s = 0.2;
50
+ return f ? s = 0.3 * (100 + o) / 100 : a = i * (100 + o) / 100, `hsla(${R}, ${S}%, ${a}%, ${s})`;
52
51
  }).join(", ")})`, v = {
53
52
  overflow: "visible",
54
53
  "&::before, &::after": {
@@ -97,7 +96,7 @@ function fo(l) {
97
96
  c,
98
97
  {
99
98
  sx: {
100
- border: `1px solid ${d(a, 0.1)}`,
99
+ border: `1px solid ${d(t, 0.1)}`,
101
100
  m: "-1px",
102
101
  position: "relative",
103
102
  borderRadius: "12px",
@@ -135,13 +134,13 @@ function fo(l) {
135
134
  "@keyframes glowBreathe": {
136
135
  "0%, 100%": {
137
136
  boxShadow: `
138
- inset 0 0 7px ${d(a, 0.3)},
139
- inset 0 0 12px ${d(a, 0.3)}`
137
+ inset 0 0 7px ${d(t, 0.3)},
138
+ inset 0 0 12px ${d(t, 0.3)}`
140
139
  },
141
140
  "50%": {
142
141
  boxShadow: `
143
- inset 0 0 18px ${d(a, 0.7)},
144
- inset 0 0 24px ${d(a, 0.5)}`
142
+ inset 0 0 18px ${d(t, 0.7)},
143
+ inset 0 0 24px ${d(t, 0.5)}`
145
144
  }
146
145
  }
147
146
  }
@@ -187,7 +186,7 @@ function fo(l) {
187
186
  ]
188
187
  }
189
188
  ) : /* @__PURE__ */ n(
190
- Y,
189
+ X,
191
190
  {
192
191
  open: p,
193
192
  slots: {
@@ -206,7 +205,7 @@ function fo(l) {
206
205
  }
207
206
  },
208
207
  children: /* @__PURE__ */ n(
209
- Z,
208
+ Y,
210
209
  {
211
210
  sx: {
212
211
  maxWidth: "calc(100vw - 18px)",
@@ -235,5 +234,5 @@ function fo(l) {
235
234
  return m;
236
235
  }
237
236
  export {
238
- fo as default
237
+ go as default
239
238
  };
@@ -1,16 +1,15 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
2
  import { createTheme as t, useTheme as i } from "@mui/material";
3
3
  import { DID_CONNECT_THEME_LIGHT as T, DID_CONNECT_THEME_DARK as c } from "@blocklet/theme";
4
- import "../Theme/theme.js";
5
- import p from "../Theme/theme-provider.js";
6
- const f = t(T), s = t(c);
7
- function d(o) {
4
+ import { ThemeProvider as f } from "../Theme";
5
+ const p = t(T), s = t(c);
6
+ function _(o) {
8
7
  function r(m) {
9
- const { palette: n } = i(), h = n.mode === "dark" ? s : f;
10
- return /* @__PURE__ */ e(p, { theme: h, children: /* @__PURE__ */ e(o, { ...m }) });
8
+ const { palette: n } = i(), h = n.mode === "dark" ? s : p;
9
+ return /* @__PURE__ */ e(f, { theme: h, children: /* @__PURE__ */ e(o, { ...m }) });
11
10
  }
12
11
  return r;
13
12
  }
14
13
  export {
15
- d as default
14
+ _ as default
16
15
  };
@@ -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[]>;
@@ -4,18 +4,18 @@ import i from "prop-types";
4
4
  import { TableFilter as ue, TableViewCol as pe } from "mui-datatables";
5
5
  import he, { PrintContextConsumer as me } from "react-to-print";
6
6
  import { MoreVert as fe, CloudDownload as be, ViewColumn as Ce, FilterList as ge, Print as $ } from "@mui/icons-material";
7
- import { Popover as xe, Tooltip as D, IconButton as R, ListItemIcon as L, ListItemText as j, MenuItem as U, Menu as we, LinearProgress as ye, useTheme as Te, useMediaQuery as ve } from "@mui/material";
8
- import { useDeepCompareEffect as Re } from "ahooks";
9
- import { handleCSVDownload as ke } from "./utils.js";
10
- import Fe from "./TableSearch.js";
11
- import { useDatatableContext as Pe } from "./DatatableContext.js";
12
- import { styled as z } from "../Theme/index.js";
7
+ import { Popover as xe, Tooltip as D, IconButton as R, ListItemIcon as L, ListItemText as j, MenuItem as U, Menu as we, LinearProgress as ye, useMediaQuery as Te } from "@mui/material";
8
+ import { useDeepCompareEffect as ve } from "ahooks";
9
+ import { handleCSVDownload as Re } from "./utils";
10
+ import ke from "./TableSearch";
11
+ import { useDatatableContext as Fe } from "./DatatableContext";
12
+ import { styled as z, useTheme as Pe } from "../Theme";
13
13
  function Ie() {
14
- const s = Te();
15
- return ve(s.breakpoints.down("sm"));
14
+ const s = Pe();
15
+ return Te(s.breakpoints.down("sm"));
16
16
  }
17
- function Be(s) {
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(), {
17
+ function Be({ ...s }) {
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 } = Fe(), {
19
19
  data: Q = [],
20
20
  options: o,
21
21
  components: p = {},
@@ -32,7 +32,7 @@ function Be(s) {
32
32
  searchTextUpdate: _,
33
33
  searchClose: ee
34
34
  } = s, [B, h] = T({}), te = o.customToolbar ? o.customToolbar(s) : "", { search: oe, downloadCsv: ie, print: m, viewColumns: ne, filterTable: le } = o.textLabels.toolbar, re = o.search === !1 || o.search === "false", x = o.print === !1 || o.print === "false", se = p.TableFilter || ue, ae = p.TableViewCol || pe;
35
- Re(() => {
35
+ ve(() => {
36
36
  (u || g) && h({});
37
37
  }, [u, g]);
38
38
  const q = (e) => /* @__PURE__ */ t(he, { content: () => s.tableRef(), children: /* @__PURE__ */ t(me, { children: e }) }), w = (e) => `toolbar-pop-${N.current}-${e}`, a = [];
@@ -40,7 +40,7 @@ function Be(s) {
40
40
  icon: /* @__PURE__ */ t(be, {}),
41
41
  title: ie,
42
42
  onClick: () => {
43
- ke(s);
43
+ Re(s);
44
44
  }
45
45
  }), o.viewColumns === !1 || o.viewColumns === "false" || a.push({
46
46
  icon: /* @__PURE__ */ t(Ce, {}),
@@ -155,7 +155,7 @@ function Be(s) {
155
155
  ),
156
156
  /* @__PURE__ */ r("div", { className: `custom-toobar-btns ${u || g ? "toobar-btns-disabled" : ""}`, children: [
157
157
  !re && /* @__PURE__ */ t(
158
- Fe,
158
+ ke,
159
159
  {
160
160
  search: oe,
161
161
  options: o,
@@ -5,8 +5,8 @@ import { Tooltip as N, IconButton as w, TextField as g } from "@mui/material";
5
5
  import { Search as v, Clear as R } from "@mui/icons-material";
6
6
  import q from "clsx";
7
7
  import E from "lodash/noop";
8
- import { useDatatableContext as B } from "./DatatableContext.js";
9
- import { styled as D } from "../Theme/index.js";
8
+ import { useDatatableContext as B } from "./DatatableContext";
9
+ import { styled as D } from "../Theme";
10
10
  function M({
11
11
  search: t = "",
12
12
  options: s,
@@ -10,10 +10,10 @@ import ne from "lodash/get";
10
10
  import P from "clsx";
11
11
  import { useCreation as de, useDeepCompareEffect as h } from "ahooks";
12
12
  import { CircularProgress as ce } from "@mui/material";
13
- import R from "../Empty/index.js";
14
- import pe from "./CustomToolbar.js";
15
- import { DatatableProvider as ue, useDatatableContext as M } from "./DatatableContext.js";
16
- import { styled as $ } from "../Theme/index.js";
13
+ import R from "../Empty";
14
+ import pe from "./CustomToolbar";
15
+ import { DatatableProvider as ue, useDatatableContext as M } from "./DatatableContext";
16
+ import { styled as $ } from "../Theme";
17
17
  const fe = $("div")`
18
18
  display: flex;
19
19
  align-items: center;
@@ -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
- import { jsx as r, jsxs as C, Fragment as g } from "react/jsx-runtime";
1
+ import { jsx as r, jsxs as g, Fragment as C } 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";
5
+ import y from "./dialog";
6
+ function R({
7
7
  title: a,
8
8
  children: d,
9
9
  onConfirm: m,
@@ -12,10 +12,10 @@ function q({
12
12
  showCancelButton: n = !0,
13
13
  showConfirmButton: s = !0,
14
14
  fullScreen: x = !1,
15
- confirmButton: p = {
15
+ confirmButton: l = {
16
16
  text: "Confirm"
17
17
  },
18
- cancelButton: l = {
18
+ cancelButton: p = {
19
19
  text: "Cancel"
20
20
  },
21
21
  PaperProps: t = {},
@@ -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,
@@ -54,28 +54,28 @@ function q({
54
54
  }
55
55
  }
56
56
  },
57
- actions: n || s ? /* @__PURE__ */ C(g, { children: [
57
+ actions: n || s ? /* @__PURE__ */ g(C, { children: [
58
58
  n && /* @__PURE__ */ r(
59
- u,
59
+ c,
60
60
  {
61
61
  onClick: (e) => {
62
62
  e.stopPropagation(), i(e, "closeButton");
63
63
  },
64
64
  color: "primary",
65
- ...l.props,
66
- children: l.text
65
+ ...p.props,
66
+ children: p.text
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);
74
74
  },
75
75
  color: "primary",
76
76
  autoFocus: !0,
77
- ...p.props,
78
- children: p.text
77
+ ...l.props,
78
+ children: l.text
79
79
  }
80
80
  )
81
81
  ] }) : null,
@@ -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
  };
@@ -1,8 +1,8 @@
1
1
  import { jsxs as n, jsx as t } from "react/jsx-runtime";
2
2
  import e from "prop-types";
3
3
  import { Close as D } from "@mui/icons-material";
4
- import { Dialog as M, Box as w, useTheme as v, useMediaQuery as N, Typography as C, DialogContent as B, DialogActions as A, IconButton as T } from "@mui/material";
5
- import { styled as h } from "../Theme/index.js";
4
+ import { Dialog as M, Box as w, useMediaQuery as v, Typography as N, DialogContent as C, DialogActions as B, IconButton as A } from "@mui/material";
5
+ import { styled as h, useTheme as T } from "../Theme";
6
6
  function $({
7
7
  children: o,
8
8
  title: l = "",
@@ -15,7 +15,7 @@ function $({
15
15
  slotProps: u = {},
16
16
  ...p
17
17
  }) {
18
- const _ = v(), i = N(_.breakpoints.down("md")), b = l || a || c, x = (r, j) => {
18
+ const _ = T(), i = v(_.breakpoints.down("md")), b = l || a || c, x = (r, j) => {
19
19
  const { onClose: m } = p;
20
20
  m && m(r, j);
21
21
  };
@@ -26,21 +26,21 @@ function $({
26
26
  },
27
27
  s.style
28
28
  );
29
- const f = /* @__PURE__ */ t(T, { className: "ux-dialog_closeButton", onClick: (r) => x(r, "closeButton"), children: /* @__PURE__ */ t(D, {}) });
29
+ const f = /* @__PURE__ */ t(A, { className: "ux-dialog_closeButton", onClick: (r) => x(r, "closeButton"), children: /* @__PURE__ */ t(D, {}) });
30
30
  return /* @__PURE__ */ n(H, { fullScreen: i, onClose: x, PaperProps: s, ...p, children: [
31
31
  b && /* @__PURE__ */ n(O, { ...u.header, className: "ux-dialog_header", isMobile: i, children: [
32
32
  /* @__PURE__ */ n("div", { className: "ux-dialog_left", children: [
33
33
  a && i && f,
34
34
  d && /* @__PURE__ */ t("div", { className: "ux-dialog_prepend", children: d }),
35
- l && /* @__PURE__ */ t(C, { variant: "h6", className: "ux-dialog_title", children: l })
35
+ l && /* @__PURE__ */ t(N, { variant: "h6", className: "ux-dialog_title", children: l })
36
36
  ] }),
37
37
  /* @__PURE__ */ n("div", { className: "ux-dialog_right", children: [
38
38
  /* @__PURE__ */ t("div", { className: "ux-dialog_toolbar", children: c }),
39
39
  a && !i && f
40
40
  ] })
41
41
  ] }),
42
- /* @__PURE__ */ t(B, { ...u.content, children: o }),
43
- g && /* @__PURE__ */ t(A, { className: `ux-dialog_actions--${y}`, children: g })
42
+ /* @__PURE__ */ t(C, { ...u.content, children: o }),
43
+ g && /* @__PURE__ */ t(B, { className: `ux-dialog_actions--${y}`, children: g })
44
44
  ] });
45
45
  }
46
46
  $.propTypes = {
@@ -1,6 +1,6 @@
1
- import { default as r } from "./dialog.js";
2
- import { default as t } from "./confirm.js";
3
- import { default as m } from "./use-confirm.js";
1
+ import { default as r } from "./dialog";
2
+ import { default as t } from "./confirm";
3
+ import { default as m } from "./use-confirm";
4
4
  export {
5
5
  t as Confirm,
6
6
  r as default,
@@ -0,0 +1,20 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { ButtonProps } from '@mui/material';
3
+
4
+ export interface OpenConfirmProps {
5
+ title: ReactNode;
6
+ content: ReactNode;
7
+ onConfirm?: (close: () => void) => void;
8
+ onCancel?: () => void;
9
+ showCancelButton?: true | false;
10
+ confirmButtonText?: string;
11
+ cancelButtonText?: string;
12
+ confirmButtonProps?: ButtonProps;
13
+ cancelButtonProps?: ButtonProps;
14
+ }
15
+
16
+ export type UpdateConfirmProps = Partial<Pick<OpenConfirmProps, 'title' | 'content'>>;
17
+
18
+ export type OpenConfirm = (params: OpenConfirmProps) => void;
19
+ export type CloseConfirm = () => void;
20
+ export type UpdateConfirm = (params: UpdateConfirmProps) => void;