@arcblock/ux 3.0.9 → 3.0.11

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 (66) hide show
  1. package/lib/Address/did-address.js +47 -49
  2. package/lib/Address/responsive-did-address.js +53 -57
  3. package/lib/Avatar/index.js +16 -16
  4. package/lib/BlockletV2/blocklet.js +64 -64
  5. package/lib/BlockletV2/components/tooltip-icon.js +26 -27
  6. package/lib/CardSelector/index.js +1 -2
  7. package/lib/ClickToCopy/hook.js +10 -11
  8. package/lib/ClickToCopy/index.js +16 -16
  9. package/lib/Config/theme-mode-toggle.js +7 -8
  10. package/lib/DID/index.js +131 -133
  11. package/lib/DIDConnect/app-info-item.js +18 -18
  12. package/lib/DIDConnect/auth-apps/index.js +83 -84
  13. package/lib/DIDConnect/did-connect-container.js +89 -90
  14. package/lib/DIDConnect/did-connect-footer.js +25 -25
  15. package/lib/DIDConnect/landing-page.js +17 -17
  16. package/lib/DIDConnect/powered-by.js +11 -11
  17. package/lib/DIDConnect/request-storage-access-api-dialog.js +36 -37
  18. package/lib/DIDConnect/with-container.js +66 -68
  19. package/lib/Dialog/use-confirm.js +40 -43
  20. package/lib/Earth/index.js +21 -22
  21. package/lib/Footer/index.js +15 -16
  22. package/lib/Header/responsive-header.js +23 -24
  23. package/lib/Layout/dashboard/index.js +63 -72
  24. package/lib/Layout/dashboard/sidebar.js +20 -21
  25. package/lib/Layout/dashboard-legacy/index.js +52 -52
  26. package/lib/Locale/context.js +36 -37
  27. package/lib/Locale/selector.js +40 -42
  28. package/lib/NFTDisplay/index.js +114 -118
  29. package/lib/NFTDisplay/render-svg.js +12 -12
  30. package/lib/NavMenu/nav-menu.js +159 -161
  31. package/lib/NavMenu/sub-container.js +25 -26
  32. package/lib/PageScroller/index.js +28 -32
  33. package/lib/Passport/passport.js +11 -11
  34. package/lib/PhoneInput/country-select.js +38 -38
  35. package/lib/PhoneInput/index.js +65 -66
  36. package/lib/Screenshot/index.js +26 -27
  37. package/lib/SessionBlocklet/index.js +87 -93
  38. package/lib/SessionPermission/index.js +5 -9
  39. package/lib/SessionUser/components/did-space.js +24 -25
  40. package/lib/SessionUser/components/logged-in.js +122 -127
  41. package/lib/SessionUser/components/quick-login-item.js +41 -42
  42. package/lib/SessionUser/components/session-user-item.js +35 -36
  43. package/lib/SessionUser/components/session-user-switch.js +81 -85
  44. package/lib/SessionUser/components/un-login.js +41 -41
  45. package/lib/SessionUser/components/user-info.js +43 -47
  46. package/lib/SessionUser/index.js +1 -1
  47. package/lib/SessionUser/libs/utils.js +24 -30
  48. package/lib/SharedBridge/index.js +35 -35
  49. package/lib/Theme/index.js +16 -16
  50. package/lib/Theme/theme.js +42 -43
  51. package/lib/Toast/index.js +24 -25
  52. package/lib/Typography/index.js +42 -42
  53. package/lib/UserCard/Content/basic.js +91 -93
  54. package/lib/UserCard/Content/shorten-label.js +9 -9
  55. package/lib/UserCard/components.js +15 -15
  56. package/lib/Util/deprecate.js +1 -1
  57. package/lib/Util/federated.js +28 -32
  58. package/lib/Util/iframe.js +9 -10
  59. package/lib/Util/index.js +134 -135
  60. package/lib/Util/security.js +9 -10
  61. package/lib/Util/wallet.js +6 -9
  62. package/lib/VerificationCode/index.js +26 -28
  63. package/lib/hooks/use-blocklet-logo.js +11 -14
  64. package/lib/ux.css +1 -1
  65. package/lib/withTracker/index.js +13 -14
  66. package/package.json +10 -11
@@ -1,14 +1,14 @@
1
- import { jsx as o, jsxs as P } from "react/jsx-runtime";
1
+ import { jsx as o, jsxs as I } from "react/jsx-runtime";
2
2
  import "@fontsource/ubuntu-mono/400.css";
3
- import { Check as B } from "@mui/icons-material";
4
- import { Box as l, Tooltip as C } from "@mui/material";
5
- import E from "copy-to-clipboard";
6
- import w from "lodash/noop";
7
- import F from "@arcblock/icons/lib/Copy";
8
- import { useState as S, useRef as g, useImperativeHandle as A } from "react";
9
- import { styled as H } from "../Theme/index.js";
10
- import { getFontSize as L } from "../Util/index.js";
11
- import M from "./compact-text.js";
3
+ import { Check as P } from "@mui/icons-material";
4
+ import { Box as l, Tooltip as h } from "@mui/material";
5
+ import B from "copy-to-clipboard";
6
+ import C from "lodash/noop";
7
+ import E from "@arcblock/icons/lib/Copy";
8
+ import { useState as F, useRef as w, useImperativeHandle as S } from "react";
9
+ import { styled as A } from "../Theme/index.js";
10
+ import { getFontSize as H } from "../Util/index.js";
11
+ import L from "./compact-text.js";
12
12
  const i = {
13
13
  en: {
14
14
  copy: "Click To Copy",
@@ -19,36 +19,35 @@ const i = {
19
19
  copied: "已复制!"
20
20
  }
21
21
  };
22
- function _({
22
+ function Z({
23
23
  ref: e = void 0,
24
- ...v
24
+ ...g
25
25
  }) {
26
26
  const {
27
- component: b = "span",
28
- size: z = 0,
29
- copyable: r = !0,
30
- showCopyButtonInTooltip: $ = !1,
27
+ component: v = "span",
28
+ size: b = 0,
29
+ copyable: t = !0,
30
+ showCopyButtonInTooltip: z = !1,
31
31
  children: a = null,
32
- content: k = "",
33
- prepend: N = null,
34
- append: T = null,
32
+ content: $ = "",
33
+ prepend: k = null,
34
+ append: N = null,
35
35
  compact: d = !1,
36
- startChars: D = 6,
37
- endChars: R = 6,
38
- locale: j = "en",
39
- ...I
40
- } = v;
41
- let n = j;
42
- i[n] || (n = "en");
43
- const [s, m] = S(!1), u = g(null), c = g(null), f = () => {
44
- var t;
45
- E(k || ((t = u.current) == null ? void 0 : t.textContent) || ""), m(!0), setTimeout(() => {
36
+ startChars: T = 6,
37
+ endChars: D = 6,
38
+ locale: R = "en",
39
+ ...j
40
+ } = g;
41
+ let r = R;
42
+ i[r] || (r = "en");
43
+ const [n, m] = F(!1), u = w(null), c = w(null), f = () => {
44
+ B($ || u.current?.textContent || ""), m(!0), setTimeout(() => {
46
45
  m(!1);
47
46
  }, 1500);
48
- }, p = (t) => {
49
- t.stopPropagation(), t.preventDefault(), f();
47
+ }, p = (s) => {
48
+ s.stopPropagation(), s.preventDefault(), f();
50
49
  };
51
- A(
50
+ S(
52
51
  e,
53
52
  () => new Proxy(
54
53
  {
@@ -56,30 +55,29 @@ function _({
56
55
  getEl: () => c.current
57
56
  },
58
57
  {
59
- get(t, x) {
60
- var h;
61
- return t[x] || ((h = c.current) == null ? void 0 : h[x]);
58
+ get(s, x) {
59
+ return s[x] || c.current?.[x];
62
60
  }
63
61
  }
64
62
  )
65
63
  );
66
64
  let y = null;
67
- return r && (y = /* @__PURE__ */ o("span", { className: "did-address-copy-wrapper", title: s ? "" : i[n].copy, children: s ? /* @__PURE__ */ o(C, { title: i[n].copied, placement: "bottom", arrow: !0, open: s, children: /* @__PURE__ */ o(B, { className: "did-address-copy", sx: { color: "success.main" } }) }) : (
65
+ return t && (y = /* @__PURE__ */ o("span", { className: "did-address-copy-wrapper", title: n ? "" : i[r].copy, children: n ? /* @__PURE__ */ o(h, { title: i[r].copied, placement: "bottom", arrow: !0, open: n, children: /* @__PURE__ */ o(P, { className: "did-address-copy", sx: { color: "success.main" } }) }) : (
68
66
  /* title prop 直接加在 icon 上不生效 */
69
- /* @__PURE__ */ o(F, { className: "did-address-copy", width: "1em", height: "1em", onClick: p })
70
- ) })), /* @__PURE__ */ P(U, { as: b, size: z, ...I, ref: c, children: [
71
- N,
67
+ /* @__PURE__ */ o(E, { className: "did-address-copy", width: "1em", height: "1em", onClick: p })
68
+ ) })), /* @__PURE__ */ I(M, { as: v, size: b, ...j, ref: c, children: [
69
+ k,
72
70
  /* @__PURE__ */ o(l, { sx: { display: "none" }, ref: u, children: a }),
73
- /* @__PURE__ */ o(C, { title: r ? "" : i[n].copied, placement: "bottom", arrow: !0, open: s, children: d ? /* @__PURE__ */ o(
71
+ /* @__PURE__ */ o(h, { title: t ? "" : i[r].copied, placement: "bottom", arrow: !0, open: n, children: d ? /* @__PURE__ */ o(
74
72
  l,
75
73
  {
76
74
  component: "span",
77
75
  className: "did-address-text",
78
76
  sx: {
79
- cursor: r ? "unset" : "pointer"
77
+ cursor: t ? "unset" : "pointer"
80
78
  },
81
- onDoubleClick: r ? w : p,
82
- children: /* @__PURE__ */ o(M, { startChars: D, endChars: R, showCopyButtonInTooltip: $, children: a })
79
+ onDoubleClick: t ? C : p,
80
+ children: /* @__PURE__ */ o(L, { startChars: T, endChars: D, showCopyButtonInTooltip: z, children: a })
83
81
  }
84
82
  ) : /* @__PURE__ */ o(
85
83
  l,
@@ -88,17 +86,17 @@ function _({
88
86
  className: "did-address-text did-address-truncate",
89
87
  sx: {
90
88
  display: d ? "none" : "inline",
91
- cursor: r ? "unset" : "pointer"
89
+ cursor: t ? "unset" : "pointer"
92
90
  },
93
- onDoubleClick: r ? w : p,
91
+ onDoubleClick: t ? C : p,
94
92
  children: a
95
93
  }
96
94
  ) }),
97
95
  y,
98
- T
96
+ N
99
97
  ] });
100
98
  }
101
- const U = H(l, { shouldForwardProp: (e) => e !== "inline" })`
99
+ const M = A(l, { shouldForwardProp: (e) => e !== "inline" })`
102
100
  font-family: 'Ubuntu Mono', monospace;
103
101
  && {
104
102
  display: ${({ inline: e }) => e ? "inline-flex" : "flex"};
@@ -106,7 +104,7 @@ const U = H(l, { shouldForwardProp: (e) => e !== "inline" })`
106
104
  max-width: 100%;
107
105
  overflow: hidden;
108
106
  color: #ccc;
109
- font-size: ${(e) => L(e.size)};
107
+ font-size: ${(e) => H(e.size)};
110
108
  font-weight: 400;
111
109
 
112
110
  svg {
@@ -149,5 +147,5 @@ const U = H(l, { shouldForwardProp: (e) => e !== "inline" })`
149
147
  }
150
148
  `;
151
149
  export {
152
- _ as default
150
+ Z as default
153
151
  };
@@ -1,89 +1,85 @@
1
- import { jsxs as E, jsx as y } from "react/jsx-runtime";
2
- import { useLatest as L, useDebounceFn as $ } from "ahooks";
3
- import { useState as r, useRef as b, useImperativeHandle as j, useEffect as R } from "react";
4
- import { Box as k } from "@mui/material";
5
- import { styled as F } from "../Theme/index.js";
6
- import P from "./did-address.js";
7
- import { getFontSize as B } from "../Util/index.js";
8
- function Q({
9
- ref: t = void 0,
10
- style: A = {},
11
- className: D = void 0,
12
- component: l = "span",
13
- size: d = 0,
14
- ...p
1
+ import { jsxs as D, jsx as w } from "react/jsx-runtime";
2
+ import { useLatest as O, useDebounceFn as S } from "ahooks";
3
+ import { useState as s, useRef as x, useImperativeHandle as z, useEffect as b } from "react";
4
+ import { Box as C } from "@mui/material";
5
+ import { styled as W } from "../Theme/index.js";
6
+ import E from "./did-address.js";
7
+ import { getFontSize as L } from "../Util/index.js";
8
+ function J({
9
+ ref: e = void 0,
10
+ style: g = {},
11
+ className: y = void 0,
12
+ component: i = "span",
13
+ size: o = 0,
14
+ ...u
15
15
  }) {
16
- const [h, S] = r(!1), z = L(h), [f, m] = r(null), [u, w] = r(null), [a, C] = r(!0), { run: x } = $(() => C(!1), {
16
+ const [p, R] = s(!1), F = O(p), [l, h] = s(null), [d, m] = s(null), [a, A] = s(!0), { run: v } = S(() => A(!1), {
17
17
  wait: 50
18
- }), o = b(null), i = b(null);
19
- return j(
20
- t,
18
+ }), n = x(null), t = x(null);
19
+ return z(
20
+ e,
21
21
  () => new Proxy(
22
22
  {},
23
23
  {
24
- get(c, s) {
25
- var e;
26
- return (e = i.current) == null ? void 0 : e[s];
24
+ get(c, r) {
25
+ return t.current?.[r];
27
26
  }
28
27
  }
29
28
  )
30
- ), R(() => {
31
- var v, W;
32
- const c = ((v = i.current) == null ? void 0 : v.offsetWidth) || 0;
33
- let s = null, e = null;
34
- return m(c), w((W = o.current) == null ? void 0 : W.offsetWidth), s = new ResizeObserver(() => {
35
- var n, g;
36
- !z.current && ((n = i.current) == null ? void 0 : n.offsetWidth) !== c && (m((g = i.current) == null ? void 0 : g.offsetWidth), x());
37
- }), e = new ResizeObserver(() => {
38
- var n;
39
- w((n = o.current) == null ? void 0 : n.offsetWidth);
40
- }), s.observe(i.current.getEl()), e.observe(o.current), x(), () => {
41
- s == null || s.disconnect(), e == null || e.disconnect();
29
+ ), b(() => {
30
+ const c = t.current?.offsetWidth || 0;
31
+ let r = null, f = null;
32
+ return h(c), m(n.current?.offsetWidth), r = new ResizeObserver(() => {
33
+ !F.current && t.current?.offsetWidth !== c && (h(t.current?.offsetWidth), v());
34
+ }), f = new ResizeObserver(() => {
35
+ m(n.current?.offsetWidth);
36
+ }), r.observe(t.current.getEl()), f.observe(n.current), v(), () => {
37
+ r?.disconnect(), f?.disconnect();
42
38
  };
43
- }, []), R(() => {
44
- u && f && S(u < f);
45
- }, [u, f]), /* @__PURE__ */ E(
46
- H,
39
+ }, []), b(() => {
40
+ d && l && R(d < l);
41
+ }, [d, l]), /* @__PURE__ */ D(
42
+ $,
47
43
  {
48
- as: l,
49
- ref: o,
50
- style: A,
51
- className: D,
52
- size: d,
53
- ...l === "span" ? {} : {
54
- inline: p.inline
44
+ as: i,
45
+ ref: n,
46
+ style: g,
47
+ className: y,
48
+ size: o,
49
+ ...i === "span" ? {} : {
50
+ inline: u.inline
55
51
  },
56
52
  children: [
57
- /* @__PURE__ */ y(
58
- I,
53
+ /* @__PURE__ */ w(
54
+ j,
59
55
  {
60
56
  style: {
61
57
  position: a ? "absolute" : "static",
62
58
  left: a ? "-99999px" : "auto"
63
59
  },
64
- ...p,
65
- size: d,
66
- component: l,
60
+ ...u,
61
+ size: o,
62
+ component: i,
67
63
  inline: !0,
68
- compact: h,
69
- ref: i
64
+ compact: p,
65
+ ref: t
70
66
  }
71
67
  ),
72
- a && /* @__PURE__ */ y("div", { style: { width: "100%", height: `${(d || 16) * 1.5}px` } })
68
+ a && /* @__PURE__ */ w("div", { style: { width: "100%", height: `${(o || 16) * 1.5}px` } })
73
69
  ]
74
70
  }
75
71
  );
76
72
  }
77
- const H = F(k, { shouldForwardProp: (t) => t !== "size" })`
73
+ const $ = W(C, { shouldForwardProp: (e) => e !== "size" })`
78
74
  display: block;
79
75
  width: 100%; /* flex & column & align-items: flex-start 时, 块级元素不会自动铺满容器 */
80
- font-size: ${({ size: t }) => B(t)};
76
+ font-size: ${({ size: e }) => L(e)};
81
77
  overflow: hidden;
82
- ${({ inline: t }) => t && `
78
+ ${({ inline: e }) => e && `
83
79
  display: inline-block;
84
80
  width: 100%;
85
81
  `}
86
- `, I = F(P)`
82
+ `, j = W(E)`
87
83
  && {
88
84
  max-width: none;
89
85
  }
@@ -95,5 +91,5 @@ const H = F(k, { shouldForwardProp: (t) => t !== "size" })`
95
91
  }
96
92
  `;
97
93
  export {
98
- Q as default
94
+ J as default
99
95
  };
@@ -1,4 +1,4 @@
1
- import { jsx as a } from "react/jsx-runtime";
1
+ import { jsx as o } from "react/jsx-runtime";
2
2
  import { useState as k, useMemo as P } from "react";
3
3
  import t from "prop-types";
4
4
  import { ErrorBoundary as z } from "react-error-boundary";
@@ -13,21 +13,21 @@ import { DID_PREFIX as f } from "../Util/constant.js";
13
13
  function d({ ...s }) {
14
14
  const r = Object.assign({}, s);
15
15
  n(r.did) && (r.did = ""), n(r.size) && (r.size = 36), n(r.variant) && (r.variant = "default"), n(r.animation) && (r.animation = !1), n(r.shape) && (r.shape = ""), n(r.blockiesPadding) && (r.blockiesPadding = !0), n(r.responsive) && (r.responsive = !1);
16
- const [c, h] = k(!1), g = E(r, d, []), { did: i = "", size: e, src: p, variant: b, animation: v, shape: x, blockiesPadding: y, responsive: w, ...o } = g, l = P(() => R(i) ? T.createIcon({
16
+ const [c, h] = k(!1), g = E(r, d, []), { did: i = "", size: e, src: p, variant: b, animation: v, shape: x, blockiesPadding: y, responsive: w, ...a } = g, l = P(() => R(i) ? T.createIcon({
17
17
  seed: i.replace(f, "").toLowerCase(),
18
18
  size: 8,
19
19
  scale: 16
20
20
  }).toDataURL() : null, [i]);
21
21
  if (p && !c)
22
- return /* @__PURE__ */ a(
22
+ return /* @__PURE__ */ o(
23
23
  m,
24
24
  {
25
25
  width: e,
26
26
  src: p,
27
27
  alt: i,
28
28
  onError: () => h(!0),
29
- ...o,
30
- className: `avatar-img--${b} ${(o == null ? void 0 : o.className) || ""}`,
29
+ ...a,
30
+ className: `avatar-img--${b} ${a?.className || ""}`,
31
31
  sx: {
32
32
  "& .avatar-img--rounded": {
33
33
  borderRadius: "4px",
@@ -37,17 +37,17 @@ function d({ ...s }) {
37
37
  borderRadius: "100%",
38
38
  overflow: "hidden"
39
39
  },
40
- ...o.sx
40
+ ...a.sx
41
41
  }
42
42
  }
43
43
  );
44
44
  if (l) {
45
45
  if (y) {
46
46
  const I = e > 24 ? 4 : 2;
47
- return /* @__PURE__ */ a(
47
+ return /* @__PURE__ */ o(
48
48
  u,
49
49
  {
50
- ...o,
50
+ ...a,
51
51
  sx: {
52
52
  display: "flex",
53
53
  alignItems: "center",
@@ -63,16 +63,16 @@ function d({ ...s }) {
63
63
  borderRadius: `${Math.min(10, Math.floor(0.1 * e + 2))}px`,
64
64
  background: "#ddd"
65
65
  },
66
- ...o.sx
66
+ ...a.sx
67
67
  },
68
- children: /* @__PURE__ */ a("div", { className: "blocky-icon-inner", children: /* @__PURE__ */ a(m, { width: e * 0.7 - I * 2, src: l, alt: i }) })
68
+ children: /* @__PURE__ */ o("div", { className: "blocky-icon-inner", children: /* @__PURE__ */ o(m, { width: e * 0.7 - I * 2, src: l, alt: i }) })
69
69
  }
70
70
  );
71
71
  }
72
- return /* @__PURE__ */ a(m, { ...o, width: e, src: l, alt: i, style: { marginRight: 4 } });
72
+ return /* @__PURE__ */ o(m, { ...a, width: e, src: l, alt: i, style: { marginRight: 4 } });
73
73
  }
74
74
  if (i)
75
- return /* @__PURE__ */ a(
75
+ return /* @__PURE__ */ o(
76
76
  M,
77
77
  {
78
78
  did: i.replace(f, ""),
@@ -80,7 +80,7 @@ function d({ ...s }) {
80
80
  animation: v,
81
81
  shape: D[(x || "").toUpperCase()],
82
82
  responsive: w,
83
- ...o
83
+ ...a
84
84
  }
85
85
  );
86
86
  throw new Error(`Invalid DID: ${i}`);
@@ -98,10 +98,10 @@ d.propTypes = {
98
98
  };
99
99
  function $(s) {
100
100
  const r = s.size || 36, c = { rounded: "4px", circle: "100%" }[s.variant] || 0;
101
- return /* @__PURE__ */ a(
101
+ return /* @__PURE__ */ o(
102
102
  z,
103
103
  {
104
- fallbackRender: () => /* @__PURE__ */ a(
104
+ fallbackRender: () => /* @__PURE__ */ o(
105
105
  u,
106
106
  {
107
107
  sx: {
@@ -112,7 +112,7 @@ function $(s) {
112
112
  }
113
113
  }
114
114
  ),
115
- children: /* @__PURE__ */ a(d, { ...s })
115
+ children: /* @__PURE__ */ o(d, { ...s })
116
116
  }
117
117
  );
118
118
  }
@@ -1,52 +1,52 @@
1
- import { jsxs as r, jsx as t } from "react/jsx-runtime";
2
- import { isValidElement as S } from "react";
1
+ import { jsxs as i, jsx as t } from "react/jsx-runtime";
2
+ import { isValidElement as W } from "react";
3
3
  import E from "@iconify-icons/tabler/cloud-download";
4
4
  import { Icon as s } from "@iconify/react";
5
5
  import { Verified as F } from "@mui/icons-material";
6
- import { useTheme as O, Card as V, Stack as x, Typography as I, Box as z, CircularProgress as q } from "@mui/material";
7
- import B from "../Avatar/index.js";
6
+ import { useTheme as O, Card as V, Stack as f, Typography as S, Box as I, CircularProgress as q } from "@mui/material";
7
+ import z from "../Avatar/index.js";
8
8
  import G from "../Button/index.js";
9
9
  import "../Theme/theme.js";
10
10
  import "../Theme/theme-provider.js";
11
- import d from "./components/icon-text.js";
12
- import T from "./components/tooltip-icon.js";
13
- import { strippedString as M, formatDownloadCount as J } from "./utils.js";
14
- function co({ ...A }) {
11
+ import c from "./components/icon-text.js";
12
+ import B from "./components/tooltip-icon.js";
13
+ import { strippedString as T, formatDownloadCount as J } from "./utils.js";
14
+ function so({ ...M }) {
15
15
  const {
16
- title: e,
17
- description: n = "",
18
- cover: D = "",
19
- avatar: L,
20
- author: P,
21
- download: m,
22
- did: u,
23
- official: l,
24
- buttonText: R = "Install",
25
- buttonDisabled: y,
26
- buttonLoading: p,
27
- button: g,
28
- onButtonClick: k = () => {
16
+ title: r,
17
+ description: e = "",
18
+ cover: A = "",
19
+ avatar: D,
20
+ author: L,
21
+ download: h,
22
+ did: x,
23
+ official: n,
24
+ buttonText: P = "Install",
25
+ buttonDisabled: m,
26
+ buttonLoading: d,
27
+ button: u,
28
+ onButtonClick: y = () => {
29
29
  },
30
- onMainClick: b,
30
+ onMainClick: g,
31
31
  className: K,
32
32
  ref: Q,
33
- icons: f,
34
- status: i,
35
- ...v
36
- } = A, h = O(), w = (o, H = () => !1) => (C, ...N) => {
37
- const W = o instanceof Function;
38
- (H() || W) && (C.preventDefault(), C.stopPropagation(), W && o(...N));
39
- }, _ = b && w(b), j = w(k, () => !!(g || y || p)), a = S(e) ? { children: e } : { title: M(e), dangerouslySetInnerHTML: { __html: e } }, c = S(n) ? { children: n } : { title: M(n), dangerouslySetInnerHTML: { __html: n } };
40
- return /* @__PURE__ */ r(
33
+ icons: R,
34
+ status: k,
35
+ ...b
36
+ } = M, p = O(), v = (o, H = () => !1) => (w, ...N) => {
37
+ const C = o instanceof Function;
38
+ (H() || C) && (w.preventDefault(), w.stopPropagation(), C && o(...N));
39
+ }, _ = g && v(g), j = v(y, () => !!(u || m || d)), l = W(r) ? { children: r } : { title: T(r), dangerouslySetInnerHTML: { __html: r } }, a = W(e) ? { children: e } : { title: T(e), dangerouslySetInnerHTML: { __html: e } };
40
+ return /* @__PURE__ */ i(
41
41
  V,
42
42
  {
43
43
  variant: "outlined",
44
44
  onClick: _,
45
- ...v,
46
- sx: { p: { xs: 2, md: 3 }, borderRadius: 1, ...v.sx },
45
+ ...b,
46
+ sx: { p: { xs: 2, md: 3 }, borderRadius: 1, ...b.sx },
47
47
  children: [
48
- /* @__PURE__ */ r(
49
- x,
48
+ /* @__PURE__ */ i(
49
+ f,
50
50
  {
51
51
  direction: "row",
52
52
  sx: {
@@ -57,12 +57,12 @@ function co({ ...A }) {
57
57
  "& > *": { flexShrink: 0 }
58
58
  },
59
59
  children: [
60
- /* @__PURE__ */ t(B, { src: D, did: u, size: 48, variant: "rounded", style: { borderRadius: "8px", overflow: "hidden" } }),
60
+ /* @__PURE__ */ t(z, { src: A, did: x, size: 48, variant: "rounded", style: { borderRadius: "8px", overflow: "hidden" } }),
61
61
  /* @__PURE__ */ t(
62
- I,
62
+ S,
63
63
  {
64
64
  className: "blocklet-title",
65
- ...a,
65
+ ...l,
66
66
  sx: [
67
67
  {
68
68
  fontWeight: "fontWeightMedium",
@@ -74,12 +74,12 @@ function co({ ...A }) {
74
74
  pl: 0.5,
75
75
  "&&": { flexShrink: 1 }
76
76
  },
77
- ...Array.isArray(a.sx) ? a.sx : [a.sx]
77
+ ...Array.isArray(l.sx) ? l.sx : [l.sx]
78
78
  ]
79
79
  }
80
80
  ),
81
- /* @__PURE__ */ r(
82
- z,
81
+ /* @__PURE__ */ i(
82
+ I,
83
83
  {
84
84
  sx: {
85
85
  flex: 1,
@@ -89,47 +89,47 @@ function co({ ...A }) {
89
89
  gap: 1
90
90
  },
91
91
  children: [
92
- l && /* @__PURE__ */ t(T, { title: l.tooltip, children: /* @__PURE__ */ t(F, { sx: { color: l.color || "#D97706", fontSize: l.size || 18 } }) }),
93
- f == null ? void 0 : f.map((o) => /* @__PURE__ */ t(T, { title: o.title, children: typeof o.icon == "string" ? /* @__PURE__ */ t(s, { icon: o.icon, style: { color: o.color } }) : o.icon }, o.key))
92
+ n && /* @__PURE__ */ t(B, { title: n.tooltip, children: /* @__PURE__ */ t(F, { sx: { color: n.color || "#D97706", fontSize: n.size || 18 } }) }),
93
+ R?.map((o) => /* @__PURE__ */ t(B, { title: o.title, children: typeof o.icon == "string" ? /* @__PURE__ */ t(s, { icon: o.icon, style: { color: o.color } }) : o.icon }, o.key))
94
94
  ]
95
95
  }
96
96
  ),
97
- k && /* @__PURE__ */ r(
97
+ y && /* @__PURE__ */ i(
98
98
  G,
99
99
  {
100
100
  variant: "outlined",
101
101
  size: "small",
102
- disabled: y || p,
102
+ disabled: m || d,
103
103
  style: {
104
- color: h.palette.text.primary,
105
- borderColor: h.palette.grey[300],
104
+ color: p.palette.text.primary,
105
+ borderColor: p.palette.grey[300],
106
106
  borderRadius: 8,
107
107
  fontSize: 13,
108
- fontWeight: h.typography.fontWeightMedium
108
+ fontWeight: p.typography.fontWeightMedium
109
109
  },
110
110
  onClick: j,
111
111
  children: [
112
- p && /* @__PURE__ */ t(q, { size: 15, style: { marginRight: 3, color: "inherit" } }),
113
- R
112
+ d && /* @__PURE__ */ t(q, { size: 15, style: { marginRight: 3, color: "inherit" } }),
113
+ P
114
114
  ]
115
115
  }
116
116
  ),
117
- g
117
+ u
118
118
  ]
119
119
  }
120
120
  ),
121
121
  /* @__PURE__ */ t(
122
- x,
122
+ f,
123
123
  {
124
124
  sx: {
125
125
  py: 2
126
126
  },
127
127
  children: /* @__PURE__ */ t(
128
- I,
128
+ S,
129
129
  {
130
130
  className: "blocklet-description",
131
131
  variant: "body2",
132
- ...c,
132
+ ...a,
133
133
  sx: [
134
134
  {
135
135
  color: "text.secondary",
@@ -141,14 +141,14 @@ function co({ ...A }) {
141
141
  cursor: "default",
142
142
  height: 40
143
143
  },
144
- ...Array.isArray(c.sx) ? c.sx : [c.sx]
144
+ ...Array.isArray(a.sx) ? a.sx : [a.sx]
145
145
  ]
146
146
  }
147
147
  )
148
148
  }
149
149
  ),
150
- /* @__PURE__ */ r(
151
- x,
150
+ /* @__PURE__ */ i(
151
+ f,
152
152
  {
153
153
  direction: "row",
154
154
  sx: {
@@ -157,10 +157,10 @@ function co({ ...A }) {
157
157
  color: "text.secondary"
158
158
  },
159
159
  children: [
160
- /* @__PURE__ */ t(d, { icon: /* @__PURE__ */ t(B, { src: L, did: u, size: 20, variant: "circle" }), maxWidth: 200, children: P }),
161
- /* @__PURE__ */ t(d, { icon: /* @__PURE__ */ t(s, { icon: E }), title: m, children: J(m) }),
162
- i == null ? void 0 : i.filter((o) => o.align !== "right").map((o) => /* @__PURE__ */ t(
163
- d,
160
+ /* @__PURE__ */ t(c, { icon: /* @__PURE__ */ t(z, { src: D, did: x, size: 20, variant: "circle" }), maxWidth: 200, children: L }),
161
+ /* @__PURE__ */ t(c, { icon: /* @__PURE__ */ t(s, { icon: E }), title: h, children: J(h) }),
162
+ k?.filter((o) => o.align !== "right").map((o) => /* @__PURE__ */ t(
163
+ c,
164
164
  {
165
165
  icon: typeof o.icon == "string" ? /* @__PURE__ */ t(s, { icon: o.icon }) : o.icon,
166
166
  title: o.title,
@@ -169,9 +169,9 @@ function co({ ...A }) {
169
169
  },
170
170
  o.key
171
171
  )),
172
- /* @__PURE__ */ t(z, { sx: { flex: 1 } }),
173
- i == null ? void 0 : i.filter((o) => o.align === "right").map((o) => /* @__PURE__ */ t(
174
- d,
172
+ /* @__PURE__ */ t(I, { sx: { flex: 1 } }),
173
+ k?.filter((o) => o.align === "right").map((o) => /* @__PURE__ */ t(
174
+ c,
175
175
  {
176
176
  icon: typeof o.icon == "string" ? /* @__PURE__ */ t(s, { icon: o.icon }) : o.icon,
177
177
  title: o.title,
@@ -189,5 +189,5 @@ function co({ ...A }) {
189
189
  );
190
190
  }
191
191
  export {
192
- co as default
192
+ so as default
193
193
  };