@seams/wallet 0.21.0 → 0.22.0
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.
- package/dist/.build-inputs.sha256 +1 -1
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/TransactionReceipt.js +107 -43
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/mountConfirmationSurface.js +1 -1
- package/dist/esm/core/signingEngine/uiConfirm/ui/transaction-receipt.js +36 -6
- package/dist/esm/core/ui/messages.js +9 -14
- package/dist/esm/react/components/AccountMenuButton/ProfileDropdown.js +23 -9
- package/dist/esm/react/components/AccountMenuButton/TransactionSettingsSection.css +376 -84
- package/dist/esm/react/components/AccountMenuButton/TransactionSettingsSection.js +87 -167
- package/dist/esm/react/components/AccountMenuButton/WalletRegionSection.js +11 -9
- package/dist/esm/react/components/AccountMenuButton/WalletSettingsLayout.css +76 -74
- package/dist/esm/react/components/AccountMenuButton/WalletSettingsLayout.js +23 -22
- package/dist/esm/react/components/AccountMenuButton/Web3AuthProfileButton.css +1 -5
- package/dist/esm/react/components/AccountMenuButton/icons/MapPinIcon.js +12 -0
- package/dist/esm/react/components/AccountMenuButton/index.js +2 -1
- package/dist/esm/react/styles/styles.css +452 -162
- package/dist/{public/sdk/ConfirmationDrawer-B7RCp58z.js → esm/sdk/ConfirmationDrawer-Ck33ZmU-.js} +1 -1
- package/dist/esm/sdk/adapters-CgJpSAxH.js +2 -0
- package/dist/esm/sdk/appearance-token-vars-BA3KQyEE.js +2 -0
- package/dist/esm/sdk/{export-viewer-host-CVdpEuY6.js → export-viewer-host-C9n-62Pi.js} +1 -1
- package/dist/esm/sdk/{exportKeypairOperation-gVCqLrDl.js → exportKeypairOperation-Du9HKB8f.js} +1 -1
- package/dist/esm/sdk/{host-Bz7mRJPZ.js → host-DoftJdVQ.js} +1 -1
- package/dist/esm/sdk/{localOnly-TXaYAZj-.js → localOnly-CvFSZFUy.js} +1 -1
- package/dist/esm/sdk/{mountExportPrivateKeySurface-DUnKOBQr.js → mountExportPrivateKeySurface-DdJHWwqY.js} +1 -1
- package/dist/esm/sdk/{mountRecoveryCodeBackupSurface-MGTl6FhG.js → mountRecoveryCodeBackupSurface-D3QFgMGE.js} +1 -1
- package/dist/{public/sdk/pendingWalletRecoveryCodeBackup-DWeemdJv.js → esm/sdk/pendingWalletRecoveryCodeBackup-LbstFwcY.js} +1 -1
- package/dist/esm/sdk/{registration-DVX_lnP7.js → registration-CIxJvbTo.js} +1 -1
- package/dist/esm/sdk/{registration-DeCUrUR9.js → registration-CeOmKyCG.js} +1 -1
- package/dist/esm/sdk/{runtime-auth-BAGyfscG.js → runtime-auth-C0V-5znH.js} +1 -1
- package/dist/{public/sdk/runtime-device-link-DKkMLVor.js → esm/sdk/runtime-device-link-B1jpHQSF.js} +1 -1
- package/dist/{public/sdk/runtime-ecdsa-tempo-0TAVH1xg.js → esm/sdk/runtime-ecdsa-tempo-CDSZ3pxS.js} +1 -1
- package/dist/esm/sdk/{runtime-email-otp-DoHa8Hif.js → runtime-email-otp-DXuxFOjL.js} +1 -1
- package/dist/esm/sdk/{runtime-export-CAt17IFH.js → runtime-export-Ba12ChDI.js} +1 -1
- package/dist/esm/sdk/{runtime-near-BQX9Jk9Z.js → runtime-near-DRrdWzmr.js} +1 -1
- package/dist/esm/sdk/{runtime-preferences-BuKTIpv6.js → runtime-preferences-BWyhRaBA.js} +1 -1
- package/dist/esm/sdk/{runtime-recovery-DyxJKKNw.js → runtime-recovery-DlJlaZlf.js} +1 -1
- package/dist/esm/sdk/{runtime-recovery-codes-CWmt0FDB.js → runtime-recovery-codes-CuqYWqK7.js} +1 -1
- package/dist/esm/sdk/{shared-BVps1f3F.js → shared-B95wnpoD.js} +1 -1
- package/dist/esm/sdk/transaction-activity-CpDMkSPm.js +1 -0
- package/dist/esm/sdk/tx-confirm-ui.js +186 -71
- package/dist/esm/sdk/wallet-iframe-host-ecdsa.js +1 -1
- package/dist/esm/sdk/wallet-iframe-host-full.js +1 -1
- package/dist/esm/sdk/wallet-iframe-host-near.js +1 -1
- package/dist/esm/sdk/wallet-iframe-host-runtime.js +1 -1
- package/dist/esm/sdk/wallet-ui.css +1 -1
- package/dist/{public/sdk/walletRecoveryAdminProof-CIoLawfC.js → esm/sdk/walletRecoveryAdminProof-CtH8_lph.js} +1 -1
- package/dist/public/headers.manifest.json +1 -1
- package/dist/{esm/sdk/ConfirmationDrawer-B7RCp58z.js → public/sdk/ConfirmationDrawer-Ck33ZmU-.js} +1 -1
- package/dist/public/sdk/adapters-CgJpSAxH.js +2 -0
- package/dist/public/sdk/appearance-token-vars-BA3KQyEE.js +2 -0
- package/dist/public/sdk/{export-viewer-host-CVdpEuY6.js → export-viewer-host-C9n-62Pi.js} +1 -1
- package/dist/public/sdk/{exportKeypairOperation-gVCqLrDl.js → exportKeypairOperation-Du9HKB8f.js} +1 -1
- package/dist/public/sdk/{host-Bz7mRJPZ.js → host-DoftJdVQ.js} +1 -1
- package/dist/public/sdk/{localOnly-TXaYAZj-.js → localOnly-CvFSZFUy.js} +1 -1
- package/dist/public/sdk/{mountExportPrivateKeySurface-DUnKOBQr.js → mountExportPrivateKeySurface-DdJHWwqY.js} +1 -1
- package/dist/public/sdk/{mountRecoveryCodeBackupSurface-MGTl6FhG.js → mountRecoveryCodeBackupSurface-D3QFgMGE.js} +1 -1
- package/dist/{esm/sdk/pendingWalletRecoveryCodeBackup-DWeemdJv.js → public/sdk/pendingWalletRecoveryCodeBackup-LbstFwcY.js} +1 -1
- package/dist/public/sdk/{registration-DVX_lnP7.js → registration-CIxJvbTo.js} +1 -1
- package/dist/public/sdk/{registration-DeCUrUR9.js → registration-CeOmKyCG.js} +1 -1
- package/dist/public/sdk/{runtime-auth-BAGyfscG.js → runtime-auth-C0V-5znH.js} +1 -1
- package/dist/{esm/sdk/runtime-device-link-DKkMLVor.js → public/sdk/runtime-device-link-B1jpHQSF.js} +1 -1
- package/dist/{esm/sdk/runtime-ecdsa-tempo-0TAVH1xg.js → public/sdk/runtime-ecdsa-tempo-CDSZ3pxS.js} +1 -1
- package/dist/public/sdk/{runtime-email-otp-DoHa8Hif.js → runtime-email-otp-DXuxFOjL.js} +1 -1
- package/dist/public/sdk/{runtime-export-CAt17IFH.js → runtime-export-Ba12ChDI.js} +1 -1
- package/dist/public/sdk/{runtime-near-BQX9Jk9Z.js → runtime-near-DRrdWzmr.js} +1 -1
- package/dist/public/sdk/{runtime-preferences-BuKTIpv6.js → runtime-preferences-BWyhRaBA.js} +1 -1
- package/dist/public/sdk/{runtime-recovery-DyxJKKNw.js → runtime-recovery-DlJlaZlf.js} +1 -1
- package/dist/public/sdk/{runtime-recovery-codes-CWmt0FDB.js → runtime-recovery-codes-CuqYWqK7.js} +1 -1
- package/dist/public/sdk/{shared-BVps1f3F.js → shared-B95wnpoD.js} +1 -1
- package/dist/public/sdk/transaction-activity-CpDMkSPm.js +1 -0
- package/dist/public/sdk/tx-confirm-ui.js +186 -71
- package/dist/public/sdk/wallet-iframe-host-ecdsa.js +1 -1
- package/dist/public/sdk/wallet-iframe-host-full.js +1 -1
- package/dist/public/sdk/wallet-iframe-host-near.js +1 -1
- package/dist/public/sdk/wallet-iframe-host-runtime.js +1 -1
- package/dist/public/sdk/wallet-ui.css +1 -1
- package/dist/{esm/sdk/walletRecoveryAdminProof-CIoLawfC.js → public/sdk/walletRecoveryAdminProof-CtH8_lph.js} +1 -1
- package/dist/public/wallet-assets.manifest.json +50 -50
- package/dist/public/wallet-service/index.html +4 -4
- package/dist/types/wallet/src/SeamsWeb/walletIframe/host/auth-menu/controller.d.ts +2 -0
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/transaction-activity.d.ts +2 -2
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/transaction-receipt.d.ts +25 -6
- package/dist/types/wallet/src/core/ui/messages.d.ts +1 -1
- package/dist/types/wallet/src/react/components/AccountMenuButton/icons/MapPinIcon.d.ts +2 -0
- package/package.json +1 -1
- package/dist/esm/react/components/AccountMenuButton/SegmentedControl.js +0 -77
- package/dist/esm/sdk/adapters-La60hveX.js +0 -2
- package/dist/esm/sdk/appearance-token-vars-Bu6YUWmf.js +0 -2
- package/dist/esm/sdk/transaction-activity-D5f-Yn9t.js +0 -1
- package/dist/public/sdk/adapters-La60hveX.js +0 -2
- package/dist/public/sdk/appearance-token-vars-Bu6YUWmf.js +0 -2
- package/dist/public/sdk/transaction-activity-D5f-Yn9t.js +0 -1
- package/dist/types/wallet/src/react/components/AccountMenuButton/SegmentedControl.d.ts +0 -25
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { WalletText } from "../../context/WalletLocale.js";
|
|
2
|
-
import SegmentedControl from "./SegmentedControl.js";
|
|
3
2
|
import React from "react";
|
|
4
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
4
|
//#region src/react/components/AccountMenuButton/TransactionSettingsSection.tsx
|
|
6
|
-
const TRANSACTION_SETTINGS_ACTIVE_BACKGROUND = "var(--seams-colors-buttonBackground, var(--seams-colors-primary))";
|
|
7
5
|
const TransactionSettingsSection = ({ currentConfirmConfig, onSetUiMode, onToggleSkipClick, onSetDelay, className, style, isOpen = true, presentation = "menu" }) => {
|
|
8
6
|
React.useEffect(() => {
|
|
9
7
|
if (!isOpen) return;
|
|
@@ -16,14 +14,49 @@ const TransactionSettingsSection = ({ currentConfirmConfig, onSetUiMode, onToggl
|
|
|
16
14
|
isOpen,
|
|
17
15
|
onSetDelay
|
|
18
16
|
]);
|
|
17
|
+
const reviewLabelId = React.useId();
|
|
19
18
|
const handleClick = (e) => {
|
|
20
19
|
e.stopPropagation();
|
|
21
20
|
};
|
|
22
|
-
const disableRequireClick = currentConfirmConfig?.uiMode === "none";
|
|
23
21
|
const disableAll = !isOpen;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
const compact = presentation === "menu";
|
|
23
|
+
const uiMode = currentConfirmConfig.uiMode ?? "modal";
|
|
24
|
+
const reviewOn = uiMode !== "none" && currentConfirmConfig.behavior !== "skipClick";
|
|
25
|
+
const toggleReview = () => {
|
|
26
|
+
if (reviewOn) {
|
|
27
|
+
setBehavior(currentConfirmConfig, onSetDelay, onToggleSkipClick, "skipClick");
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
if (uiMode === "none") onSetUiMode?.("modal");
|
|
31
|
+
setBehavior(currentConfirmConfig, onSetDelay, onToggleSkipClick, "requireClick");
|
|
32
|
+
};
|
|
33
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
34
|
+
className: `seams-transaction-page${className ? ` ${className}` : ""}`,
|
|
35
|
+
"data-presentation": presentation,
|
|
36
|
+
style,
|
|
37
|
+
onClick: compact ? handleClick : void 0,
|
|
38
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
39
|
+
className: "seams-transaction-review",
|
|
40
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
41
|
+
className: "seams-transaction-review-row",
|
|
42
|
+
children: [/* @__PURE__ */ jsxs("span", {
|
|
43
|
+
className: "seams-transaction-review-text",
|
|
44
|
+
children: [/* @__PURE__ */ jsx("strong", {
|
|
45
|
+
id: reviewLabelId,
|
|
46
|
+
children: /* @__PURE__ */ jsx(WalletText, { message: "Review before signing" })
|
|
47
|
+
}), /* @__PURE__ */ jsx("span", { children: reviewOn ? /* @__PURE__ */ jsx(WalletText, { message: "Show the transaction details, then click Continue to sign." }) : /* @__PURE__ */ jsx(WalletText, { message: "Passkey authentication starts as soon as the details appear." }) })]
|
|
48
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
49
|
+
type: "button",
|
|
50
|
+
role: "switch",
|
|
51
|
+
className: "seams-transaction-switch",
|
|
52
|
+
"aria-checked": reviewOn,
|
|
53
|
+
"aria-labelledby": reviewLabelId,
|
|
54
|
+
disabled: disableAll,
|
|
55
|
+
onClick: toggleReview,
|
|
56
|
+
children: /* @__PURE__ */ jsx("span", { "aria-hidden": "true" })
|
|
57
|
+
})]
|
|
58
|
+
}), /* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx(WalletText, { message: "On phones, in Safari and for Email OTP sign-in, the wallet always waits for Continue." }) })]
|
|
59
|
+
}), /* @__PURE__ */ jsxs("fieldset", {
|
|
27
60
|
className: "seams-transaction-group",
|
|
28
61
|
disabled: disableAll,
|
|
29
62
|
children: [
|
|
@@ -31,185 +64,72 @@ const TransactionSettingsSection = ({ currentConfirmConfig, onSetUiMode, onToggl
|
|
|
31
64
|
/* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx(WalletText, { message: "Choose where transaction details appear before signing." }) }),
|
|
32
65
|
/* @__PURE__ */ jsx("div", {
|
|
33
66
|
className: "seams-transaction-choices",
|
|
34
|
-
children: UI_CHOICES.map(renderUiChoice.bind(null,
|
|
35
|
-
})
|
|
36
|
-
]
|
|
37
|
-
}), /* @__PURE__ */ jsxs("fieldset", {
|
|
38
|
-
className: "seams-transaction-group",
|
|
39
|
-
disabled: disableAll || disableRequireClick,
|
|
40
|
-
children: [
|
|
41
|
-
/* @__PURE__ */ jsx("legend", { children: /* @__PURE__ */ jsx(WalletText, { message: "Confirmation step" }) }),
|
|
42
|
-
/* @__PURE__ */ jsx("p", { children: disableRequireClick ? /* @__PURE__ */ jsx(WalletText, { message: "Choose Modal or Drawer to configure the confirmation step." }) : /* @__PURE__ */ jsx(WalletText, { message: "Choose whether to click Continue before authentication starts." }) }),
|
|
43
|
-
/* @__PURE__ */ jsx("div", {
|
|
44
|
-
className: "seams-transaction-choices seams-transaction-choices--two",
|
|
45
|
-
children: BEHAVIOR_CHOICES.map(renderBehaviorChoice.bind(null, currentConfirmConfig, onSetDelay, onToggleSkipClick))
|
|
67
|
+
children: UI_CHOICES.map(renderUiChoice.bind(null, compact, uiMode, onSetUiMode))
|
|
46
68
|
})
|
|
47
69
|
]
|
|
48
70
|
})]
|
|
49
71
|
});
|
|
50
|
-
return /* @__PURE__ */ jsx("div", {
|
|
51
|
-
className: `seams-dropdown-tx-settings-root ${isOpen ? "is-expanded" : ""} ${className || ""}`,
|
|
52
|
-
style,
|
|
53
|
-
onClick: handleClick,
|
|
54
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
55
|
-
className: "seams-dropdown-toggle-tx-settings",
|
|
56
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
57
|
-
className: "seams-dropdown-toggle-tx-settings-content",
|
|
58
|
-
"aria-hidden": !isOpen,
|
|
59
|
-
style: { pointerEvents: isOpen ? "auto" : "none" },
|
|
60
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
61
|
-
style: {
|
|
62
|
-
width: "100%",
|
|
63
|
-
display: "flex",
|
|
64
|
-
flexDirection: "column",
|
|
65
|
-
gap: 8
|
|
66
|
-
},
|
|
67
|
-
children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("div", {
|
|
68
|
-
className: "seams-confirmation-options",
|
|
69
|
-
children: /* @__PURE__ */ jsx(WalletText, { message: "Confirmer UI" })
|
|
70
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
71
|
-
style: { width: "100%" },
|
|
72
|
-
children: /* @__PURE__ */ jsx(SegmentedControl, {
|
|
73
|
-
items: [
|
|
74
|
-
{
|
|
75
|
-
value: "none",
|
|
76
|
-
label: "none",
|
|
77
|
-
disabled: disableAll
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
value: "modal",
|
|
81
|
-
label: "modal",
|
|
82
|
-
disabled: disableAll
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
value: "drawer",
|
|
86
|
-
label: "drawer",
|
|
87
|
-
disabled: disableAll
|
|
88
|
-
}
|
|
89
|
-
],
|
|
90
|
-
value: currentConfirmConfig?.uiMode ?? "modal",
|
|
91
|
-
onValueChange: (v) => onSetUiMode?.(v),
|
|
92
|
-
activeBg: TRANSACTION_SETTINGS_ACTIVE_BACKGROUND,
|
|
93
|
-
height: 40,
|
|
94
|
-
buttonFontSize: 12,
|
|
95
|
-
containerStyle: { width: "100%" },
|
|
96
|
-
buttonStyle: {
|
|
97
|
-
display: "grid",
|
|
98
|
-
placeItems: "center",
|
|
99
|
-
lineHeight: 1,
|
|
100
|
-
padding: "0 10px"
|
|
101
|
-
},
|
|
102
|
-
activeButtonStyle: { color: "var(--seams-colors-textButton)" }
|
|
103
|
-
})
|
|
104
|
-
})] }), /* @__PURE__ */ jsxs("div", {
|
|
105
|
-
style: {
|
|
106
|
-
opacity: disableRequireClick ? .6 : 1,
|
|
107
|
-
pointerEvents: disableRequireClick ? "none" : "auto"
|
|
108
|
-
},
|
|
109
|
-
children: [/* @__PURE__ */ jsx("div", {
|
|
110
|
-
className: "seams-confirmation-options",
|
|
111
|
-
children: /* @__PURE__ */ jsx(WalletText, { message: "Confirmation Options" })
|
|
112
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
113
|
-
style: { width: "100%" },
|
|
114
|
-
children: /* @__PURE__ */ jsx(SegmentedControl, {
|
|
115
|
-
items: [{
|
|
116
|
-
value: "skipClick",
|
|
117
|
-
label: "skip click",
|
|
118
|
-
disabled: disableAll || disableRequireClick
|
|
119
|
-
}, {
|
|
120
|
-
value: "requireClick",
|
|
121
|
-
label: "require click",
|
|
122
|
-
disabled: disableAll || disableRequireClick
|
|
123
|
-
}],
|
|
124
|
-
value: currentConfirmConfig?.behavior === "skipClick" ? "skipClick" : "requireClick",
|
|
125
|
-
onValueChange: (v) => {
|
|
126
|
-
const wantsSkipClick = v === "skipClick";
|
|
127
|
-
const isSkipClick = currentConfirmConfig?.behavior === "skipClick";
|
|
128
|
-
if (wantsSkipClick && (currentConfirmConfig?.autoProceedDelay ?? 0) !== 0) onSetDelay(0);
|
|
129
|
-
if (wantsSkipClick !== isSkipClick) onToggleSkipClick?.();
|
|
130
|
-
},
|
|
131
|
-
activeBg: TRANSACTION_SETTINGS_ACTIVE_BACKGROUND,
|
|
132
|
-
height: 40,
|
|
133
|
-
buttonFontSize: 12,
|
|
134
|
-
containerStyle: { width: "100%" },
|
|
135
|
-
buttonStyle: {
|
|
136
|
-
display: "grid",
|
|
137
|
-
placeItems: "center",
|
|
138
|
-
lineHeight: 1,
|
|
139
|
-
padding: "0 10px"
|
|
140
|
-
},
|
|
141
|
-
activeButtonStyle: { color: "var(--seams-colors-textButton)" }
|
|
142
|
-
})
|
|
143
|
-
})]
|
|
144
|
-
})]
|
|
145
|
-
})
|
|
146
|
-
})
|
|
147
|
-
})
|
|
148
|
-
});
|
|
149
72
|
};
|
|
150
|
-
const UI_CHOICES = [
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
description: "Start authentication without showing a review panel."
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
value: "modal",
|
|
158
|
-
label: "Modal",
|
|
159
|
-
description: "Review the transaction in a centered dialog."
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
value: "drawer",
|
|
163
|
-
label: "Drawer",
|
|
164
|
-
description: "Review the transaction in a slide-out panel."
|
|
165
|
-
}
|
|
166
|
-
];
|
|
167
|
-
const BEHAVIOR_CHOICES = [{
|
|
168
|
-
value: "skipClick",
|
|
169
|
-
label: "Start automatically",
|
|
170
|
-
description: "Begin authentication as soon as the review opens."
|
|
73
|
+
const UI_CHOICES = [{
|
|
74
|
+
value: "modal",
|
|
75
|
+
label: "Modal",
|
|
76
|
+
description: "Review the transaction in a centered dialog."
|
|
171
77
|
}, {
|
|
172
|
-
value: "
|
|
173
|
-
label: "
|
|
174
|
-
description: "Review the
|
|
78
|
+
value: "drawer",
|
|
79
|
+
label: "Drawer",
|
|
80
|
+
description: "Review the transaction in a slide-out panel."
|
|
175
81
|
}];
|
|
176
|
-
function
|
|
82
|
+
function ChoicePreview({ kind }) {
|
|
83
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
84
|
+
className: "seams-transaction-preview",
|
|
85
|
+
"data-preview": kind,
|
|
86
|
+
"aria-hidden": "true",
|
|
87
|
+
children: [
|
|
88
|
+
/* @__PURE__ */ jsxs("span", {
|
|
89
|
+
className: "seams-tp-page",
|
|
90
|
+
children: [
|
|
91
|
+
/* @__PURE__ */ jsx("i", {}),
|
|
92
|
+
/* @__PURE__ */ jsx("i", {}),
|
|
93
|
+
/* @__PURE__ */ jsx("i", {})
|
|
94
|
+
]
|
|
95
|
+
}),
|
|
96
|
+
/* @__PURE__ */ jsx("span", { className: "seams-tp-scrim" }),
|
|
97
|
+
/* @__PURE__ */ jsxs("span", {
|
|
98
|
+
className: "seams-tp-panel",
|
|
99
|
+
children: [
|
|
100
|
+
/* @__PURE__ */ jsx("i", {}),
|
|
101
|
+
/* @__PURE__ */ jsx("i", {}),
|
|
102
|
+
/* @__PURE__ */ jsx("b", {})
|
|
103
|
+
]
|
|
104
|
+
})
|
|
105
|
+
]
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
function renderUiChoice(compact, selected, onSelect, choice) {
|
|
177
109
|
return /* @__PURE__ */ jsxs("button", {
|
|
178
110
|
type: "button",
|
|
179
111
|
className: "seams-transaction-choice",
|
|
180
112
|
"aria-pressed": selected === choice.value,
|
|
181
113
|
onClick: onSelect?.bind(null, choice.value),
|
|
182
|
-
children: [
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
114
|
+
children: [/* @__PURE__ */ jsx(ChoicePreview, { kind: choice.value }), /* @__PURE__ */ jsxs("span", {
|
|
115
|
+
className: "seams-transaction-choice-text",
|
|
116
|
+
children: [/* @__PURE__ */ jsxs("span", {
|
|
117
|
+
className: "seams-transaction-choice-head",
|
|
118
|
+
children: [/* @__PURE__ */ jsx("strong", { children: /* @__PURE__ */ jsx(WalletText, { copy: choice.label }) }), /* @__PURE__ */ jsx("span", {
|
|
119
|
+
className: "seams-transaction-choice-indicator",
|
|
120
|
+
"aria-hidden": "true"
|
|
121
|
+
})]
|
|
122
|
+
}), compact ? null : /* @__PURE__ */ jsx("span", {
|
|
123
|
+
className: "seams-transaction-choice-description",
|
|
124
|
+
children: /* @__PURE__ */ jsx(WalletText, { copy: choice.description })
|
|
125
|
+
})]
|
|
126
|
+
})]
|
|
190
127
|
}, choice.value);
|
|
191
128
|
}
|
|
192
129
|
function setBehavior(config, setDelay, toggle, value) {
|
|
193
130
|
if (value === "skipClick" && (config.autoProceedDelay ?? 0) !== 0) setDelay(0);
|
|
194
131
|
if (value === "skipClick" !== (config.behavior === "skipClick")) toggle();
|
|
195
132
|
}
|
|
196
|
-
function renderBehaviorChoice(config, setDelay, toggle, choice) {
|
|
197
|
-
const selected = config.behavior === "skipClick" ? "skipClick" : "requireClick";
|
|
198
|
-
return /* @__PURE__ */ jsxs("button", {
|
|
199
|
-
type: "button",
|
|
200
|
-
className: "seams-transaction-choice",
|
|
201
|
-
"aria-pressed": selected === choice.value,
|
|
202
|
-
onClick: setBehavior.bind(null, config, setDelay, toggle, choice.value),
|
|
203
|
-
children: [
|
|
204
|
-
/* @__PURE__ */ jsx("span", {
|
|
205
|
-
className: "seams-transaction-choice-indicator",
|
|
206
|
-
"aria-hidden": "true"
|
|
207
|
-
}),
|
|
208
|
-
/* @__PURE__ */ jsx("strong", { children: /* @__PURE__ */ jsx(WalletText, { copy: choice.label }) }),
|
|
209
|
-
/* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(WalletText, { copy: choice.description }) })
|
|
210
|
-
]
|
|
211
|
-
}, choice.value);
|
|
212
|
-
}
|
|
213
133
|
//#endregion
|
|
214
134
|
export { TransactionSettingsSection };
|
|
215
135
|
|
|
@@ -273,15 +273,17 @@ var WalletRegionSection = class extends Component {
|
|
|
273
273
|
" ",
|
|
274
274
|
/* @__PURE__ */ jsx("strong", { children: /* @__PURE__ */ jsx(WalletText, { copy: regionName(state.placement.region) }) })
|
|
275
275
|
] }),
|
|
276
|
-
/* @__PURE__ */ jsxs("label", {
|
|
277
|
-
|
|
278
|
-
" ",
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
276
|
+
/* @__PURE__ */ jsxs("label", {
|
|
277
|
+
className: "seams-region-field",
|
|
278
|
+
children: [/* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(WalletText, { message: "Destination region" }) }), /* @__PURE__ */ jsx("span", {
|
|
279
|
+
className: "seams-region-select",
|
|
280
|
+
children: /* @__PURE__ */ jsx("select", {
|
|
281
|
+
value: state.selected,
|
|
282
|
+
onChange: this.select,
|
|
283
|
+
children: REGIONS.map(renderRegion)
|
|
284
|
+
})
|
|
285
|
+
})]
|
|
286
|
+
}),
|
|
285
287
|
/* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx(WalletText, { message: "Moving your wallet ends signing sessions on all devices. After the move, unlock your wallet again to sign." }) }),
|
|
286
288
|
state.placement.nextMoveAtMs > Date.now() ? /* @__PURE__ */ jsxs("p", { children: [
|
|
287
289
|
/* @__PURE__ */ jsx(WalletText, { message: "Another move is available after" }),
|
|
@@ -206,8 +206,7 @@
|
|
|
206
206
|
padding: 24px;
|
|
207
207
|
}
|
|
208
208
|
.seams-settings-content .seams-dropdown-accounts-root,
|
|
209
|
-
.seams-settings-content .seams-dropdown-export-keys-root
|
|
210
|
-
.seams-settings-content .seams-dropdown-tx-settings-root {
|
|
209
|
+
.seams-settings-content .seams-dropdown-export-keys-root {
|
|
211
210
|
margin: 0;
|
|
212
211
|
border: 1px solid var(--seams-colors-borderPrimary);
|
|
213
212
|
border-radius: 16px;
|
|
@@ -375,90 +374,93 @@
|
|
|
375
374
|
}
|
|
376
375
|
}
|
|
377
376
|
|
|
378
|
-
.seams-
|
|
377
|
+
.seams-region-field {
|
|
379
378
|
display: grid;
|
|
380
|
-
gap:
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
min-width: 0;
|
|
384
|
-
margin: 0;
|
|
385
|
-
padding: 0;
|
|
386
|
-
border: 0;
|
|
387
|
-
}
|
|
388
|
-
.seams-transaction-group legend {
|
|
389
|
-
padding: 0;
|
|
390
|
-
font-size: 20px;
|
|
391
|
-
font-weight: 600;
|
|
392
|
-
}
|
|
393
|
-
.seams-transaction-group > p {
|
|
394
|
-
margin: 8px 0 20px;
|
|
395
|
-
color: var(--seams-colors-textSecondary);
|
|
379
|
+
gap: 8px;
|
|
380
|
+
max-width: 360px;
|
|
381
|
+
margin: 24px 0 16px;
|
|
396
382
|
font-size: 14px;
|
|
397
|
-
|
|
398
|
-
}
|
|
399
|
-
.seams-transaction-choices {
|
|
400
|
-
display: grid;
|
|
401
|
-
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
402
|
-
gap: 16px;
|
|
383
|
+
font-weight: 500;
|
|
403
384
|
}
|
|
404
|
-
|
|
405
|
-
|
|
385
|
+
/* The wrapper draws the chevron, so the closed control looks the same in
|
|
386
|
+
every browser. */
|
|
387
|
+
.seams-region-select {
|
|
388
|
+
position: relative;
|
|
389
|
+
display: block;
|
|
406
390
|
}
|
|
407
|
-
.seams-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
391
|
+
.seams-region-select::after {
|
|
392
|
+
content: '';
|
|
393
|
+
position: absolute;
|
|
394
|
+
inset-block-start: 50%;
|
|
395
|
+
inset-inline-end: 18px;
|
|
396
|
+
width: 7px;
|
|
397
|
+
height: 7px;
|
|
398
|
+
border-inline-end: 1.5px solid var(--seams-colors-textSecondary);
|
|
399
|
+
border-block-end: 1.5px solid var(--seams-colors-textSecondary);
|
|
400
|
+
transform: translateY(-70%) rotate(45deg);
|
|
401
|
+
pointer-events: none;
|
|
402
|
+
}
|
|
403
|
+
.seams-region-select select {
|
|
404
|
+
appearance: none;
|
|
405
|
+
width: 100%;
|
|
406
|
+
min-height: 48px;
|
|
407
|
+
padding-block: 12px;
|
|
408
|
+
padding-inline: 14px 44px;
|
|
414
409
|
border: 1px solid var(--seams-colors-borderPrimary);
|
|
415
|
-
border-radius:
|
|
410
|
+
border-radius: 12px;
|
|
416
411
|
background: var(--seams-colors-colorBackground);
|
|
417
412
|
color: var(--seams-colors-textPrimary);
|
|
418
413
|
font: inherit;
|
|
419
|
-
|
|
414
|
+
font-weight: 400;
|
|
420
415
|
cursor: pointer;
|
|
421
416
|
}
|
|
422
|
-
.seams-
|
|
423
|
-
|
|
424
|
-
}
|
|
425
|
-
.seams-transaction-choice > span:last-child {
|
|
426
|
-
color: var(--seams-colors-textSecondary);
|
|
427
|
-
font-size: 14px;
|
|
428
|
-
line-height: 1.5;
|
|
429
|
-
}
|
|
430
|
-
.seams-transaction-choice-indicator {
|
|
431
|
-
width: 20px;
|
|
432
|
-
height: 20px;
|
|
433
|
-
box-sizing: border-box;
|
|
434
|
-
border: 1px solid var(--seams-colors-borderPrimary);
|
|
435
|
-
border-radius: 50%;
|
|
436
|
-
}
|
|
437
|
-
.seams-transaction-choice[aria-pressed='true'] {
|
|
438
|
-
border-color: var(--seams-colors-primary);
|
|
439
|
-
box-shadow: inset 0 0 0 1px var(--seams-colors-primary);
|
|
440
|
-
background: var(--seams-colors-surface2);
|
|
441
|
-
}
|
|
442
|
-
.seams-transaction-choice[aria-pressed='true'] .seams-transaction-choice-indicator {
|
|
443
|
-
border: 6px solid var(--seams-colors-primary);
|
|
444
|
-
}
|
|
445
|
-
.seams-transaction-choice:hover:not(:disabled) {
|
|
446
|
-
background: var(--seams-colors-surface2);
|
|
447
|
-
}
|
|
448
|
-
.seams-transaction-choice:focus-visible {
|
|
449
|
-
outline: 2px solid var(--seams-colors-primary);
|
|
450
|
-
outline-offset: 4px;
|
|
417
|
+
.seams-region-select select:hover {
|
|
418
|
+
background: var(--seams-colors-surface);
|
|
451
419
|
}
|
|
452
|
-
.seams-
|
|
453
|
-
|
|
454
|
-
|
|
420
|
+
.seams-region-select select:focus-visible {
|
|
421
|
+
outline: 2px solid var(--seams-colors-textPrimary);
|
|
422
|
+
outline-offset: 2px;
|
|
455
423
|
}
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
424
|
+
/* Browsers with customizable select also style the open list. Others keep
|
|
425
|
+
the native list. */
|
|
426
|
+
@supports (appearance: base-select) {
|
|
427
|
+
.seams-region-select select,
|
|
428
|
+
.seams-region-select ::picker(select) {
|
|
429
|
+
appearance: base-select;
|
|
459
430
|
}
|
|
460
|
-
.seams-
|
|
461
|
-
|
|
462
|
-
|
|
431
|
+
.seams-region-select select::picker-icon {
|
|
432
|
+
display: none;
|
|
433
|
+
}
|
|
434
|
+
.seams-region-select ::picker(select) {
|
|
435
|
+
margin-block: 6px;
|
|
436
|
+
padding: 6px;
|
|
437
|
+
border: 1px solid var(--seams-colors-borderPrimary);
|
|
438
|
+
border-radius: 12px;
|
|
439
|
+
background: var(--seams-colors-colorBackground);
|
|
440
|
+
color: var(--seams-colors-textPrimary);
|
|
441
|
+
box-shadow: 0 12px 32px rgb(0 0 0 / 0.14);
|
|
442
|
+
}
|
|
443
|
+
.seams-region-select option {
|
|
444
|
+
display: flex;
|
|
445
|
+
align-items: center;
|
|
446
|
+
gap: 10px;
|
|
447
|
+
min-height: 40px;
|
|
448
|
+
padding: 8px 10px;
|
|
449
|
+
border-radius: 8px;
|
|
450
|
+
font: inherit;
|
|
451
|
+
cursor: pointer;
|
|
452
|
+
}
|
|
453
|
+
.seams-region-select option:hover,
|
|
454
|
+
.seams-region-select option:focus-visible {
|
|
455
|
+
outline: none;
|
|
456
|
+
background: var(--seams-colors-surface2);
|
|
457
|
+
}
|
|
458
|
+
.seams-region-select option:checked {
|
|
459
|
+
font-weight: 500;
|
|
460
|
+
}
|
|
461
|
+
.seams-region-select option::checkmark {
|
|
462
|
+
order: 1;
|
|
463
|
+
margin-inline-start: auto;
|
|
464
|
+
color: var(--seams-colors-textSecondary);
|
|
463
465
|
}
|
|
464
466
|
}
|
|
@@ -8,6 +8,7 @@ import { ScanIcon } from "./icons/ScanIcon.js";
|
|
|
8
8
|
import { KeyIcon } from "./icons/KeyIcon.js";
|
|
9
9
|
import { LinkIcon } from "./icons/LinkIcon.js";
|
|
10
10
|
import { GlobeIcon } from "./icons/GlobeIcon.js";
|
|
11
|
+
import { MapPinIcon } from "./icons/MapPinIcon.js";
|
|
11
12
|
import { SlidersIcon } from "./icons/SlidersIcon.js";
|
|
12
13
|
import { RecoveryCodesIcon } from "./icons/RecoveryCodesIcon.js";
|
|
13
14
|
import TouchIcon from "./icons/TouchIcon.js";
|
|
@@ -21,12 +22,6 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
21
22
|
import "./WalletSettingsLayout.css";
|
|
22
23
|
//#region src/react/components/AccountMenuButton/WalletSettingsLayout.tsx
|
|
23
24
|
const SETTINGS_ITEMS = [
|
|
24
|
-
{
|
|
25
|
-
id: PROFILE_MENU_ITEM_IDS.WALLET_REGION,
|
|
26
|
-
label: "Wallet region",
|
|
27
|
-
description: "Choose where your wallet runs",
|
|
28
|
-
icon: /* @__PURE__ */ jsx(GlobeIcon, {})
|
|
29
|
-
},
|
|
30
25
|
{
|
|
31
26
|
id: PROFILE_MENU_ITEM_IDS.ACCOUNTS,
|
|
32
27
|
label: "Accounts",
|
|
@@ -34,10 +29,16 @@ const SETTINGS_ITEMS = [
|
|
|
34
29
|
icon: /* @__PURE__ */ jsx(GlobeIcon, {})
|
|
35
30
|
},
|
|
36
31
|
{
|
|
37
|
-
id: PROFILE_MENU_ITEM_IDS.
|
|
38
|
-
label: "
|
|
39
|
-
description: "
|
|
40
|
-
icon: /* @__PURE__ */ jsx(
|
|
32
|
+
id: PROFILE_MENU_ITEM_IDS.TRANSACTION_SETTINGS,
|
|
33
|
+
label: "Transaction settings",
|
|
34
|
+
description: "Customize confirmation behavior",
|
|
35
|
+
icon: /* @__PURE__ */ jsx(SlidersIcon, {})
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: PROFILE_MENU_ITEM_IDS.AUTHENTICATION_METHODS,
|
|
39
|
+
label: "Authentication methods",
|
|
40
|
+
description: "Choose how you unlock this device",
|
|
41
|
+
icon: /* @__PURE__ */ jsx(TouchIcon, {})
|
|
41
42
|
},
|
|
42
43
|
{
|
|
43
44
|
id: PROFILE_MENU_ITEM_IDS.RECOVERY_CODES,
|
|
@@ -46,10 +47,10 @@ const SETTINGS_ITEMS = [
|
|
|
46
47
|
icon: /* @__PURE__ */ jsx(RecoveryCodesIcon, {})
|
|
47
48
|
},
|
|
48
49
|
{
|
|
49
|
-
id: PROFILE_MENU_ITEM_IDS.
|
|
50
|
-
label: "
|
|
51
|
-
description: "
|
|
52
|
-
icon: /* @__PURE__ */ jsx(
|
|
50
|
+
id: PROFILE_MENU_ITEM_IDS.LINKED_DEVICES,
|
|
51
|
+
label: "Linked devices",
|
|
52
|
+
description: "See devices using this wallet",
|
|
53
|
+
icon: /* @__PURE__ */ jsx(LinkIcon, {})
|
|
53
54
|
},
|
|
54
55
|
{
|
|
55
56
|
id: PROFILE_MENU_ITEM_IDS.SCAN_LINK_DEVICE,
|
|
@@ -58,16 +59,16 @@ const SETTINGS_ITEMS = [
|
|
|
58
59
|
icon: /* @__PURE__ */ jsx(ScanIcon, {})
|
|
59
60
|
},
|
|
60
61
|
{
|
|
61
|
-
id: PROFILE_MENU_ITEM_IDS.
|
|
62
|
-
label: "
|
|
63
|
-
description: "
|
|
64
|
-
icon: /* @__PURE__ */ jsx(
|
|
62
|
+
id: PROFILE_MENU_ITEM_IDS.WALLET_REGION,
|
|
63
|
+
label: "Wallet region",
|
|
64
|
+
description: "Choose where your wallet runs",
|
|
65
|
+
icon: /* @__PURE__ */ jsx(MapPinIcon, {})
|
|
65
66
|
},
|
|
66
67
|
{
|
|
67
|
-
id: PROFILE_MENU_ITEM_IDS.
|
|
68
|
-
label: "
|
|
69
|
-
description: "
|
|
70
|
-
icon: /* @__PURE__ */ jsx(
|
|
68
|
+
id: PROFILE_MENU_ITEM_IDS.EXPORT_KEYS,
|
|
69
|
+
label: "Export keys",
|
|
70
|
+
description: "Export wallet signing keys",
|
|
71
|
+
icon: /* @__PURE__ */ jsx(KeyIcon, {})
|
|
71
72
|
}
|
|
72
73
|
];
|
|
73
74
|
function WalletSettingsHeader() {
|
|
@@ -457,11 +457,7 @@
|
|
|
457
457
|
.seams-account-identity:focus {
|
|
458
458
|
outline: none;
|
|
459
459
|
}
|
|
460
|
-
.seams-account-screen .seams-
|
|
461
|
-
--seams-expander-surface: var(--seams-colors-colorBackground);
|
|
462
|
-
border: 0;
|
|
463
|
-
border-radius: 12px;
|
|
464
|
-
overflow: hidden;
|
|
460
|
+
.seams-account-screen .seams-transaction-page {
|
|
465
461
|
margin-top: 14px;
|
|
466
462
|
}
|
|
467
463
|
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { lucideIcon } from "./lucideIcon.js";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
//#region src/react/components/AccountMenuButton/icons/MapPinIcon.tsx
|
|
4
|
+
const MapPinIcon = lucideIcon("map-pin", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0" }), /* @__PURE__ */ jsx("circle", {
|
|
5
|
+
cx: "12",
|
|
6
|
+
cy: "10",
|
|
7
|
+
r: "3"
|
|
8
|
+
})] }));
|
|
9
|
+
//#endregion
|
|
10
|
+
export { MapPinIcon };
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=MapPinIcon.js.map
|
|
@@ -11,6 +11,7 @@ import { ScanIcon } from "./icons/ScanIcon.js";
|
|
|
11
11
|
import { KeyIcon } from "./icons/KeyIcon.js";
|
|
12
12
|
import { LinkIcon } from "./icons/LinkIcon.js";
|
|
13
13
|
import { GlobeIcon } from "./icons/GlobeIcon.js";
|
|
14
|
+
import { MapPinIcon } from "./icons/MapPinIcon.js";
|
|
14
15
|
import { SlidersIcon } from "./icons/SlidersIcon.js";
|
|
15
16
|
import { RecoveryCodesIcon } from "./icons/RecoveryCodesIcon.js";
|
|
16
17
|
import SpinnerIcon from "./icons/SpinnerIcon.js";
|
|
@@ -370,7 +371,7 @@ const AccountMenuButtonInner = ({ presentation, nearAccountId: nearAccountIdProp
|
|
|
370
371
|
}
|
|
371
372
|
if (presentation === "page") items.push({
|
|
372
373
|
id: PROFILE_MENU_ITEM_IDS.WALLET_REGION,
|
|
373
|
-
icon: /* @__PURE__ */ jsx(
|
|
374
|
+
icon: /* @__PURE__ */ jsx(MapPinIcon, {}),
|
|
374
375
|
label: "Wallet region",
|
|
375
376
|
description: "Choose where your wallet runs",
|
|
376
377
|
disabled: accountMenuCapabilities.kind !== "owner"
|