@blocklet/ui-react 3.0.9 → 3.0.10

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 (51) hide show
  1. package/lib/BlockletStudio/index.js +70 -71
  2. package/lib/ComponentInstaller/index.js +85 -88
  3. package/lib/ComponentInstaller/installer-item.js +47 -53
  4. package/lib/ComponentInstaller/use-component-installed.js +32 -38
  5. package/lib/ComponentManager/components/add-component.js +47 -50
  6. package/lib/ComponentManager/components/publish-component.js +30 -31
  7. package/lib/ComponentManager/components/resource-dialog.js +28 -30
  8. package/lib/Dashboard/index.d.ts +1 -1
  9. package/lib/Dashboard/index.js +59 -61
  10. package/lib/Footer/index.js +51 -52
  11. package/lib/Footer/internal-footer.js +43 -47
  12. package/lib/Footer/layout/standard.js +11 -12
  13. package/lib/Footer/links.js +25 -28
  14. package/lib/Footer/social-media.js +17 -17
  15. package/lib/Header/index.js +81 -83
  16. package/lib/Notifications/Snackbar.js +76 -77
  17. package/lib/Notifications/hooks/use-title.js +34 -34
  18. package/lib/Notifications/utils.js +56 -60
  19. package/lib/UserCenter/components/config-inviter.js +17 -18
  20. package/lib/UserCenter/components/danger-zone.js +49 -52
  21. package/lib/UserCenter/components/nft.js +44 -45
  22. package/lib/UserCenter/components/notification.js +92 -99
  23. package/lib/UserCenter/components/passport.js +22 -22
  24. package/lib/UserCenter/components/privacy.js +6 -6
  25. package/lib/UserCenter/components/settings.js +40 -43
  26. package/lib/UserCenter/components/status-dialog/date-picker.js +7 -8
  27. package/lib/UserCenter/components/status-dialog/index.js +112 -114
  28. package/lib/UserCenter/components/status-selector/duration-menu.js +35 -36
  29. package/lib/UserCenter/components/status-selector/index.js +13 -13
  30. package/lib/UserCenter/components/storage/action.js +21 -22
  31. package/lib/UserCenter/components/storage/delete.js +24 -24
  32. package/lib/UserCenter/components/third-party-login/index.js +53 -53
  33. package/lib/UserCenter/components/third-party-login/third-party-item.js +87 -89
  34. package/lib/UserCenter/components/user-center.js +198 -207
  35. package/lib/UserCenter/components/user-info/metadata.js +343 -353
  36. package/lib/UserCenter/components/user-info/switch-role.js +17 -20
  37. package/lib/UserCenter/components/user-info/user-basic-info.js +79 -82
  38. package/lib/UserCenter/components/user-info/user-info.js +40 -40
  39. package/lib/UserCenter/components/user-info/user-status.js +97 -99
  40. package/lib/UserCenter/components/user-info/utils.js +34 -35
  41. package/lib/UserSessions/components/user-session-info.js +25 -28
  42. package/lib/UserSessions/components/user-sessions.js +169 -181
  43. package/lib/blocklets.js +62 -72
  44. package/lib/common/domain-warning.js +31 -31
  45. package/lib/common/header-addons.d.ts +1 -1
  46. package/lib/common/header-addons.js +49 -53
  47. package/lib/common/notification-addon.js +29 -32
  48. package/lib/common/ws.js +17 -18
  49. package/lib/contexts/config-user-space.js +16 -19
  50. package/lib/utils.js +44 -48
  51. package/package.json +6 -6
@@ -1,60 +1,60 @@
1
1
  import { jsx as s, jsxs as L, Fragment as O } from "react/jsx-runtime";
2
- import a from "lodash/noop";
2
+ import p from "lodash/noop";
3
3
  import { use as k, useState as H } from "react";
4
4
  import { Box as U } from "@mui/material";
5
- import { useAsyncEffect as B, useCreation as f } from "ahooks";
6
- import { getConnectedAccounts as l, getSourceProvider as G } from "@arcblock/ux/lib/SessionUser/libs/utils";
7
- import { LOGIN_PROVIDER as t } from "@arcblock/ux/lib/Util/constant";
8
- import { SessionContext as I } from "@arcblock/did-connect/lib/Session";
5
+ import { useAsyncEffect as b, useCreation as u } from "ahooks";
6
+ import { getConnectedAccounts as v, getSourceProvider as B } from "@arcblock/ux/lib/SessionUser/libs/utils";
7
+ import { LOGIN_PROVIDER as o } from "@arcblock/ux/lib/Util/constant";
8
+ import { SessionContext as G } from "@arcblock/did-connect/lib/Session";
9
9
  import { PasskeyActions as T } from "@arcblock/did-connect/lib/Passkey";
10
- import { useBrowser as S } from "@arcblock/react-hooks";
11
- import u from "./third-party-item.js";
12
- function q({ user: r }) {
13
- const { session: C } = k(I), [m, w] = H({}), { getOAuthConfigs: E } = C.useOAuth(), A = S();
14
- B(async () => {
15
- const e = await E({
16
- sourceAppPid: r == null ? void 0 : r.sourceAppPid
10
+ import { useBrowser as I } from "@arcblock/react-hooks";
11
+ import l from "./third-party-item.js";
12
+ function q({ user: i }) {
13
+ const { session: C } = k(G), [f, w] = H({}), { getOAuthConfigs: E } = C.useOAuth(), A = I();
14
+ b(async () => {
15
+ const r = await E({
16
+ sourceAppPid: i?.sourceAppPid
17
17
  });
18
- w(e);
19
- }, [r == null ? void 0 : r.sourceAppPid]);
20
- const P = f(() => Object.keys(m).map((i) => ({
21
- ...m[i],
22
- provider: i
23
- })).filter((i) => i.enabled), [m]), h = f(() => {
24
- const e = l(r);
25
- let i = !1, n = "", c = G(r);
26
- const p = e.find((o) => o.provider === t.AUTH0);
27
- return p && (p.id.startsWith("google-oauth2|") && (e.some((o) => o.provider === "google") || (i = !0, n = t.GOOGLE, c === t.AUTH0 && (c = t.GOOGLE))), p.id.startsWith("appleid|") && (e.some((o) => o.provider === t.APPLE) || (i = !0, n = t.APPLE, c === t.AUTH0 && (c = t.APPLE))), p.id.startsWith("github|") && (e.some((o) => o.provider === t.GITHUB) || (i = !0, n = t.GITHUB, c === t.AUTH0 && (c = t.GITHUB)))), P.map((o) => {
28
- if (o.provider === t.AUTH0 && i)
18
+ w(r);
19
+ }, [i?.sourceAppPid]);
20
+ const P = u(() => Object.keys(f).map((n) => ({
21
+ ...f[n],
22
+ provider: n
23
+ })).filter((n) => n.enabled), [f]), h = u(() => {
24
+ const r = v(i);
25
+ let n = !1, t = "", d = B(i);
26
+ const a = r.find((e) => e.provider === o.AUTH0);
27
+ return a && (a.id.startsWith("google-oauth2|") && (r.some((e) => e.provider === "google") || (n = !0, t = o.GOOGLE, d === o.AUTH0 && (d = o.GOOGLE))), a.id.startsWith("appleid|") && (r.some((e) => e.provider === o.APPLE) || (n = !0, t = o.APPLE, d === o.AUTH0 && (d = o.APPLE))), a.id.startsWith("github|") && (r.some((e) => e.provider === o.GITHUB) || (n = !0, t = o.GITHUB, d === o.AUTH0 && (d = o.GITHUB)))), P.map((e) => {
28
+ if (e.provider === o.AUTH0 && n)
29
29
  return null;
30
- const d = i && o.provider === n ? e.find((v) => v.provider === t.AUTH0) : e.find((v) => v.provider === o.provider);
31
- return d ? {
32
- ...o,
33
- provider: o.provider,
34
- did: d.did,
35
- pk: d.pk,
36
- userInfo: d.userInfo,
30
+ const c = n && e.provider === t ? r.find((m) => m.provider === o.AUTH0) : r.find((m) => m.provider === e.provider);
31
+ return c ? {
32
+ ...e,
33
+ provider: e.provider,
34
+ did: c.did,
35
+ pk: c.pk,
36
+ userInfo: c.userInfo,
37
37
  _bind: !0,
38
- _rawProvider: d.provider,
39
- _mainProvider: o.provider === c
38
+ _rawProvider: c.provider,
39
+ _mainProvider: e.provider === d
40
40
  } : {
41
- ...o,
42
- provider: o.provider,
43
- _rawProvider: o.provider,
44
- _mainProvider: o.provider === c
41
+ ...e,
42
+ provider: e.provider,
43
+ _rawProvider: e.provider,
44
+ _mainProvider: e.provider === d
45
45
  };
46
- }).filter(Boolean).sort((o, d) => (o == null ? void 0 : o.order) !== void 0 && (d == null ? void 0 : d.order) !== void 0 ? o.order - d.order : (o == null ? void 0 : o.order) !== void 0 ? -1 : 1);
47
- }, [r == null ? void 0 : r.connectedAccounts, P]), g = f(() => l(r).filter(
48
- (n) => n.provider === t.PASSKEY && n.did !== (r == null ? void 0 : r.did)
49
- ).map((n) => ({
50
- ...n,
46
+ }).filter(Boolean).sort((e, c) => e?.order !== void 0 && c?.order !== void 0 ? e.order - c.order : e?.order !== void 0 ? -1 : 1);
47
+ }, [i?.connectedAccounts, P]), g = u(() => v(i).filter(
48
+ (t) => t.provider === o.PASSKEY && t.did !== i?.did
49
+ ).map((t) => ({
50
+ ...t,
51
51
  _bind: !0
52
- })), [r]), y = f(() => l(r).filter(
53
- (n) => n.provider === t.WALLET && n.did !== (r == null ? void 0 : r.did)
54
- ).map((n) => ({
55
- ...n,
52
+ })), [i]), y = u(() => v(i).filter(
53
+ (t) => t.provider === o.WALLET && t.did !== i?.did
54
+ ).map((t) => ({
55
+ ...t,
56
56
  _mainProvider: !0
57
- })), [r]);
57
+ })), [i]);
58
58
  return /* @__PURE__ */ s(
59
59
  U,
60
60
  {
@@ -70,14 +70,14 @@ function q({ user: r }) {
70
70
  action: "connect",
71
71
  createMode: "connect",
72
72
  createButtonText: "Add Passkey",
73
- onSuccess: a,
74
- onError: a,
73
+ onSuccess: p,
74
+ onError: p,
75
75
  dense: !0
76
76
  }
77
77
  ) : /* @__PURE__ */ L(O, { children: [
78
- h.map((e) => /* @__PURE__ */ s(u, { item: e }, e == null ? void 0 : e.provider)),
79
- g.map((e) => /* @__PURE__ */ s(u, { item: e }, e.id)),
80
- y.map((e) => /* @__PURE__ */ s(u, { item: e }, e.id)),
78
+ h.map((r) => /* @__PURE__ */ s(l, { item: r }, r?.provider)),
79
+ g.map((r) => /* @__PURE__ */ s(l, { item: r }, r.id)),
80
+ y.map((r) => /* @__PURE__ */ s(l, { item: r }, r.id)),
81
81
  A.wallet || A.arcSphere ? null : /* @__PURE__ */ s(
82
82
  T,
83
83
  {
@@ -85,8 +85,8 @@ function q({ user: r }) {
85
85
  action: "connect",
86
86
  createMode: "connect",
87
87
  createButtonText: "Add New Passkey",
88
- onSuccess: a,
89
- onError: a,
88
+ onSuccess: p,
89
+ onError: p,
90
90
  dense: !0,
91
91
  sx: {
92
92
  px: 1.5,
@@ -1,45 +1,44 @@
1
- import { jsxs as s, Fragment as S, jsx as n } from "react/jsx-runtime";
2
- import { Icon as g } from "@iconify/react";
3
- import { Box as t, Tooltip as A, Typography as B } from "@mui/material";
4
- import F from "@iconify-icons/material-symbols/link-rounded";
5
- import W from "@arcblock/ux/lib/Button";
6
- import N from "@arcblock/ux/lib/Avatar";
7
- import { useReactive as K, useMemoizedFn as L, useCreation as _ } from "ahooks";
8
- import { translate as V } from "@arcblock/ux/lib/Locale/util";
9
- import { useConfirm as Y } from "@arcblock/ux/lib/Dialog";
10
- import { useLocaleContext as j } from "@arcblock/ux/lib/Locale/context";
11
- import $ from "@iconify-icons/material-symbols/mail-outline-rounded";
12
- import q from "@iconify-icons/material-symbols/info-outline-rounded";
13
- import J from "@iconify-icons/material-symbols/passkey";
14
- import Q from "@iconify-icons/material-symbols/wallet-sharp";
15
- import X from "@iconify-icons/logos/apple";
16
- import Z from "@iconify-icons/logos/github-icon";
17
- import oo from "@iconify-icons/logos/google-icon";
18
- import { SessionContext as ro } from "@arcblock/did-connect/lib/Session";
19
- import { use as no } from "react";
20
- import eo from "lodash/pick";
21
- import { getFederatedEnabled as co, getMaster as to } from "@arcblock/ux/lib/Util/federated";
22
- import { LOGIN_PROVIDER as l, LOGIN_PROVIDER_NAME as ao } from "@arcblock/ux/lib/Util/constant";
23
- import { useStateContext as io } from "@arcblock/did-connect/lib/Connect/contexts/state";
24
- import { translations as lo } from "../../libs/locales.js";
25
- function Uo({
1
+ import { jsxs as s, Fragment as P, jsx as n } from "react/jsx-runtime";
2
+ import { Icon as m } from "@iconify/react";
3
+ import { Box as c, Tooltip as y, Typography as I } from "@mui/material";
4
+ import E from "@iconify-icons/material-symbols/link-rounded";
5
+ import z from "@arcblock/ux/lib/Button";
6
+ import G from "@arcblock/ux/lib/Avatar";
7
+ import { useReactive as H, useMemoizedFn as k, useCreation as v } from "ahooks";
8
+ import { translate as M } from "@arcblock/ux/lib/Locale/util";
9
+ import { useConfirm as D } from "@arcblock/ux/lib/Dialog";
10
+ import { useLocaleContext as F } from "@arcblock/ux/lib/Locale/context";
11
+ import W from "@iconify-icons/material-symbols/mail-outline-rounded";
12
+ import N from "@iconify-icons/material-symbols/info-outline-rounded";
13
+ import K from "@iconify-icons/material-symbols/passkey";
14
+ import V from "@iconify-icons/material-symbols/wallet-sharp";
15
+ import Y from "@iconify-icons/logos/apple";
16
+ import j from "@iconify-icons/logos/github-icon";
17
+ import $ from "@iconify-icons/logos/google-icon";
18
+ import { SessionContext as q } from "@arcblock/did-connect/lib/Session";
19
+ import { use as J } from "react";
20
+ import Q from "lodash/pick";
21
+ import { getFederatedEnabled as X, getMaster as Z } from "@arcblock/ux/lib/Util/federated";
22
+ import { LOGIN_PROVIDER as a, LOGIN_PROVIDER_NAME as oo } from "@arcblock/ux/lib/Util/constant";
23
+ import { useStateContext as ro } from "@arcblock/did-connect/lib/Connect/contexts/state";
24
+ import { translations as no } from "../../libs/locales.js";
25
+ function Ao({
26
26
  item: o
27
27
  }) {
28
- var m, y, I, k, v;
29
- const { blocklet: u } = io(), { confirmApi: x, confirmHolder: O } = Y(), p = K({
28
+ const { blocklet: w } = ro(), { confirmApi: f, confirmHolder: C } = D(), p = H({
30
29
  loading: !1
31
- }), { locale: R } = j(), e = L((r, c = {}) => V(lo, r, R, "en", c)), { session: a } = no(ro), { bindOAuth: T, unbindOAuth: U, setBaseUrl: b, baseUrl: E } = a.useOAuth(), { disconnectPasskey: z, setTargetAppPid: P } = a.usePasskey(), G = {
30
+ }), { locale: B } = F(), e = k((r, t = {}) => M(no, r, B, "en", t)), { session: l } = J(q), { bindOAuth: S, unbindOAuth: A, setBaseUrl: u, baseUrl: L } = l.useOAuth(), { disconnectPasskey: _, setTargetAppPid: h } = l.usePasskey(), O = {
32
31
  // email: MailOutlineRoundedIcon,
33
- [l.AUTH0]: $,
34
- [l.APPLE]: X,
35
- [l.GITHUB]: Z,
36
- [l.GOOGLE]: oo,
37
- [l.PASSKEY]: J,
38
- [l.WALLET]: Q
39
- }, H = _(() => G[o == null ? void 0 : o.provider], [o == null ? void 0 : o.provider]), d = _(() => ao[o == null ? void 0 : o.provider] || "unknown", [o == null ? void 0 : o.provider]), M = L(async () => {
40
- if ((o == null ? void 0 : o.provider) === l.PASSKEY) {
41
- await new Promise((r, c) => {
42
- x.open({
32
+ [a.AUTH0]: W,
33
+ [a.APPLE]: Y,
34
+ [a.GITHUB]: j,
35
+ [a.GOOGLE]: $,
36
+ [a.PASSKEY]: K,
37
+ [a.WALLET]: V
38
+ }, R = v(() => O[o?.provider], [o?.provider]), d = v(() => oo[o?.provider] || "unknown", [o?.provider]), T = k(async () => {
39
+ if (o?.provider === a.PASSKEY) {
40
+ await new Promise((r, t) => {
41
+ f.open({
43
42
  title: e("thirdPartyLogin.disconnectPasskey", { name: d }),
44
43
  content: e("thirdPartyLogin.disconnectPasskeyDescription", { name: d }),
45
44
  confirmButtonText: e("common.confirm"),
@@ -48,7 +47,7 @@ function Uo({
48
47
  },
49
48
  cancelButtonText: e("common.cancel"),
50
49
  onConfirm(i) {
51
- z({ session: a, connectedAccount: o }).then(r).catch(c), i();
50
+ _({ session: l, connectedAccount: o }).then(r).catch(t), i();
52
51
  },
53
52
  // @ts-ignore
54
53
  onCancel: r
@@ -57,10 +56,9 @@ function Uo({
57
56
  return;
58
57
  }
59
58
  try {
60
- p.loading = !0, await new Promise((r, c) => {
61
- var i;
62
- if (o != null && o._bind)
63
- x.open({
59
+ p.loading = !0, await new Promise((r, t) => {
60
+ if (o?._bind)
61
+ f.open({
64
62
  title: e("thirdPartyLogin.confirmUnbind", { name: d }),
65
63
  content: e("thirdPartyLogin.confirmUnbindDescription", { name: d }),
66
64
  confirmButtonText: e("common.confirm"),
@@ -68,43 +66,43 @@ function Uo({
68
66
  color: "error"
69
67
  },
70
68
  cancelButtonText: e("common.cancel"),
71
- onConfirm(h) {
72
- U({
73
- session: a,
69
+ onConfirm(i) {
70
+ A({
71
+ session: l,
74
72
  connectedAccount: {
75
- ...eo(o, ["did", "pk"]),
73
+ ...Q(o, ["did", "pk"]),
76
74
  showProvider: o.provider,
77
75
  provider: o._rawProvider
78
76
  }
79
- }).then(r).catch(c), h();
77
+ }).then(r).catch(t), i();
80
78
  },
81
79
  // @ts-ignore
82
80
  onCancel: r
83
81
  });
84
82
  else {
85
- const h = E, w = window == null ? void 0 : window.blocklet;
86
- let C = "/";
87
- const D = co(w), f = to(w);
88
- D && (f != null && f.appPid) && ((i = a == null ? void 0 : a.user) != null && i.sourceAppPid) && (C = f.appUrl), b(C), P(u == null ? void 0 : u.appPid), T({
89
- session: a,
83
+ const i = L, g = window?.blocklet;
84
+ let x = "/";
85
+ const U = X(g), b = Z(g);
86
+ U && b?.appPid && l?.user?.sourceAppPid && (x = b.appUrl), u(x), h(w?.appPid), S({
87
+ session: l,
90
88
  oauthItem: {
91
89
  ...o,
92
90
  provider: o._rawProvider
93
91
  }
94
- }).then(r).catch(c).finally(() => {
95
- b(h), P();
92
+ }).then(r).catch(t).finally(() => {
93
+ u(i), h();
96
94
  });
97
95
  }
98
96
  });
99
97
  } catch (r) {
100
- console.error(`Failed to ${o != null && o._bind ? "unbind" : "bind"} oauth account`, r);
98
+ console.error(`Failed to ${o?._bind ? "unbind" : "bind"} oauth account`, r);
101
99
  } finally {
102
100
  p.loading = !1;
103
101
  }
104
102
  });
105
- return /* @__PURE__ */ s(S, { children: [
103
+ return /* @__PURE__ */ s(P, { children: [
106
104
  /* @__PURE__ */ s(
107
- t,
105
+ c,
108
106
  {
109
107
  sx: {
110
108
  borderRadius: 1,
@@ -122,10 +120,10 @@ function Uo({
122
120
  },
123
121
  children: [
124
122
  /* @__PURE__ */ n(
125
- t,
123
+ c,
126
124
  {
127
- component: g,
128
- icon: H,
125
+ component: m,
126
+ icon: R,
129
127
  fill: "currentColor",
130
128
  sx: {
131
129
  width: "1em",
@@ -133,12 +131,12 @@ function Uo({
133
131
  flexShrink: 0,
134
132
  fontSize: 16,
135
133
  // githubIcon 不支持变色,dark 模式做一个反色处理
136
- filter: ({ palette: r }) => (o == null ? void 0 : o.provider) === l.GITHUB && r.mode === "dark" ? "invert(1)" : "none"
134
+ filter: ({ palette: r }) => o?.provider === a.GITHUB && r.mode === "dark" ? "invert(1)" : "none"
137
135
  }
138
136
  }
139
137
  ),
140
138
  /* @__PURE__ */ n(
141
- t,
139
+ c,
142
140
  {
143
141
  sx: {
144
142
  flex: 1
@@ -147,7 +145,7 @@ function Uo({
147
145
  }
148
146
  ),
149
147
  /* @__PURE__ */ s(
150
- t,
148
+ c,
151
149
  {
152
150
  sx: {
153
151
  display: "flex",
@@ -156,7 +154,7 @@ function Uo({
156
154
  },
157
155
  children: [
158
156
  /* @__PURE__ */ n(
159
- t,
157
+ c,
160
158
  {
161
159
  sx: {
162
160
  flex: 1,
@@ -164,44 +162,44 @@ function Uo({
164
162
  overflow: "hidden",
165
163
  lineHeight: "normal"
166
164
  },
167
- children: ((m = o.userInfo) == null ? void 0 : m.email) || o.did
165
+ children: o.userInfo?.email || o.did
168
166
  }
169
167
  ),
170
- (y = o.userInfo) != null && y.name ? /* @__PURE__ */ n(
171
- A,
168
+ o.userInfo?.name ? /* @__PURE__ */ n(
169
+ y,
172
170
  {
173
- title: /* @__PURE__ */ n(S, { children: /* @__PURE__ */ s(t, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
174
- /* @__PURE__ */ n(N, { size: 36, variant: "circle", shape: "circle", src: (I = o.userInfo) == null ? void 0 : I.picture, did: o.did }),
175
- /* @__PURE__ */ s(t, { children: [
171
+ title: /* @__PURE__ */ n(P, { children: /* @__PURE__ */ s(c, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
172
+ /* @__PURE__ */ n(G, { size: 36, variant: "circle", shape: "circle", src: o.userInfo?.picture, did: o.did }),
173
+ /* @__PURE__ */ s(c, { children: [
176
174
  /* @__PURE__ */ n(
177
- B,
175
+ I,
178
176
  {
179
177
  sx: {
180
178
  whiteSpace: "normal",
181
179
  wordBreak: "break-all",
182
180
  fontSize: "0.9rem"
183
181
  },
184
- children: (k = o.userInfo) == null ? void 0 : k.name
182
+ children: o.userInfo?.name
185
183
  }
186
184
  ),
187
185
  /* @__PURE__ */ n(
188
- B,
186
+ I,
189
187
  {
190
188
  sx: {
191
189
  whiteSpace: "normal",
192
190
  wordBreak: "break-all",
193
191
  fontSize: "0.9rem"
194
192
  },
195
- children: (v = o.userInfo) == null ? void 0 : v.email
193
+ children: o.userInfo?.email
196
194
  }
197
195
  )
198
196
  ] })
199
197
  ] }) }),
200
198
  children: /* @__PURE__ */ n(
201
- t,
199
+ c,
202
200
  {
203
- component: g,
204
- icon: q,
201
+ component: m,
202
+ icon: N,
205
203
  sx: {
206
204
  color: "text.secondary",
207
205
  fontSize: 16,
@@ -218,19 +216,19 @@ function Uo({
218
216
  ]
219
217
  }
220
218
  ),
221
- /* @__PURE__ */ n(A, { title: o._mainProvider ? e("thirdPartyLogin.mainProviderCantRemove") : "", children: /* @__PURE__ */ n(t, { children: /* @__PURE__ */ n(
222
- W,
219
+ /* @__PURE__ */ n(y, { title: o._mainProvider ? e("thirdPartyLogin.mainProviderCantRemove") : "", children: /* @__PURE__ */ n(c, { children: /* @__PURE__ */ n(
220
+ z,
223
221
  {
224
222
  variant: "outlined",
225
223
  size: "small",
226
224
  sx: (r) => {
227
- const c = r.palette.error.main, i = r.palette.primary.main;
225
+ const t = r.palette.error.main, i = r.palette.primary.main;
228
226
  return {
229
- color: o != null && o._bind ? c : i,
230
- borderColor: o != null && o._bind ? c : i,
227
+ color: o?._bind ? t : i,
228
+ borderColor: o?._bind ? t : i,
231
229
  backgroundColor: "background.default",
232
230
  "&:hover": {
233
- borderColor: o != null && o._bind ? c : i,
231
+ borderColor: o?._bind ? t : i,
234
232
  backgroundColor: "action.hover"
235
233
  },
236
234
  py: 0.5,
@@ -240,16 +238,16 @@ function Uo({
240
238
  };
241
239
  },
242
240
  fullWidth: !0,
243
- startIcon: p.loading ? null : /* @__PURE__ */ n(g, { icon: F }),
244
- onClick: M,
241
+ startIcon: p.loading ? null : /* @__PURE__ */ n(m, { icon: E }),
242
+ onClick: T,
245
243
  disabled: o._mainProvider,
246
244
  loading: p.loading,
247
- children: o != null && o._bind ? e("thirdPartyLogin.disconnect") : e("thirdPartyLogin.connect")
245
+ children: o?._bind ? e("thirdPartyLogin.disconnect") : e("thirdPartyLogin.connect")
248
246
  }
249
247
  ) }) }),
250
- O
248
+ C
251
249
  ] });
252
250
  }
253
251
  export {
254
- Uo as default
252
+ Ao as default
255
253
  };