kaleido-ui 0.1.60 → 0.1.62
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/web/index.cjs +127 -72
- package/dist/web/index.d.cts +16 -2
- package/dist/web/index.d.ts +16 -2
- package/dist/web/index.js +128 -73
- package/package.json +1 -1
package/dist/web/index.cjs
CHANGED
|
@@ -1822,12 +1822,14 @@ function AssetCard({
|
|
|
1822
1822
|
balanceVisible = true,
|
|
1823
1823
|
accentColor,
|
|
1824
1824
|
status,
|
|
1825
|
+
isYielding,
|
|
1825
1826
|
onClick,
|
|
1826
1827
|
className
|
|
1827
1828
|
}) {
|
|
1828
1829
|
const shown = balanceVisible ? displayBalance : "\u2022\u2022\u2022\u2022\u2022\u2022";
|
|
1829
1830
|
const displayShown = balanceVisible ? formatDisplayAmountText(displayBalance) : shown;
|
|
1830
1831
|
const [hovered, setHovered] = (0, import_react4.useState)(false);
|
|
1832
|
+
const showYield = isYielding ?? ["USDB"].includes(ticker.toUpperCase());
|
|
1831
1833
|
const gradientStyle = accentColor ? { background: `linear-gradient(135deg, var(--card) 30%, ${accentColor}${hovered ? "77" : "55"} 75%, ${accentColor}${hovered ? "dd" : "b3"} 100%)`, transition: "background 0.3s ease" } : void 0;
|
|
1832
1834
|
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1833
1835
|
"div",
|
|
@@ -1879,7 +1881,26 @@ function AssetCard({
|
|
|
1879
1881
|
children: displayShown
|
|
1880
1882
|
}
|
|
1881
1883
|
),
|
|
1882
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.
|
|
1884
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex items-center justify-end gap-1 mt-0.5", children: [
|
|
1885
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "truncate text-tiny font-medium uppercase tracking-wide text-muted-foreground", children: ticker }),
|
|
1886
|
+
showYield && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { title: "Yield Generating Asset", className: "text-success/90 flex items-center justify-center bg-success/10 rounded-full p-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1887
|
+
"svg",
|
|
1888
|
+
{
|
|
1889
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1890
|
+
viewBox: "0 0 24 24",
|
|
1891
|
+
fill: "none",
|
|
1892
|
+
stroke: "currentColor",
|
|
1893
|
+
strokeWidth: "2",
|
|
1894
|
+
strokeLinecap: "round",
|
|
1895
|
+
strokeLinejoin: "round",
|
|
1896
|
+
className: "w-3 h-3",
|
|
1897
|
+
children: [
|
|
1898
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("path", { d: "M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z" }),
|
|
1899
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("path", { d: "M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12" })
|
|
1900
|
+
]
|
|
1901
|
+
}
|
|
1902
|
+
) })
|
|
1903
|
+
] }),
|
|
1883
1904
|
status && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(StatusBadge, { status, className: "mt-2" })
|
|
1884
1905
|
] })
|
|
1885
1906
|
] })
|
|
@@ -2551,11 +2572,14 @@ function AccountStatusTabs({
|
|
|
2551
2572
|
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "mt-5 text-sm leading-relaxed text-muted-foreground", children: selectedAccount.detail }),
|
|
2552
2573
|
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "mt-5", children: [
|
|
2553
2574
|
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "text-icon-xxs font-black uppercase tracking-[0.18em] text-white/45", children: "Capabilities" }),
|
|
2554
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "mt-3 flex flex-wrap gap-2", children: selectedAccount.capabilityBullets.map((capability) => /* @__PURE__ */ (0, import_jsx_runtime28.
|
|
2575
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "mt-3 flex flex-wrap gap-2", children: selectedAccount.capabilityBullets.map((capability) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
2555
2576
|
"span",
|
|
2556
2577
|
{
|
|
2557
|
-
className: "rounded-full border bg-white/[0.05] px-2.5 py-1 text-xxs font-medium text-white/
|
|
2558
|
-
children:
|
|
2578
|
+
className: "inline-flex items-center gap-1.5 rounded-full border bg-white/[0.05] px-2.5 py-1 text-xxs font-medium text-white/70",
|
|
2579
|
+
children: [
|
|
2580
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "size-1.5 rounded-full bg-primary/70" }),
|
|
2581
|
+
capability
|
|
2582
|
+
]
|
|
2559
2583
|
},
|
|
2560
2584
|
capability
|
|
2561
2585
|
)) })
|
|
@@ -8092,9 +8116,14 @@ function DepositPreGeneration({
|
|
|
8092
8116
|
generateInvoice,
|
|
8093
8117
|
needsColorableUtxos = false,
|
|
8094
8118
|
onOpenCreateUtxos,
|
|
8095
|
-
showReceiveSummary = true
|
|
8119
|
+
showReceiveSummary = true,
|
|
8120
|
+
isNewRgbAsset = false,
|
|
8121
|
+
newAssetId = "",
|
|
8122
|
+
setNewAssetId,
|
|
8123
|
+
colorableUtxoCount
|
|
8096
8124
|
}) {
|
|
8097
8125
|
const method = METHOD_META2[currentMethod];
|
|
8126
|
+
const isRgbOnchain = network === "onchain" && !isBtc;
|
|
8098
8127
|
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "space-y-3", children: [
|
|
8099
8128
|
showReceiveSummary && /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "rounded-2xl border border-white/8 bg-white/4 p-3", children: [
|
|
8100
8129
|
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("p", { className: "text-xxs font-bold uppercase tracking-widest text-white/35", children: "Receive Summary" }),
|
|
@@ -8144,16 +8173,33 @@ function DepositPreGeneration({
|
|
|
8144
8173
|
] })
|
|
8145
8174
|
] })
|
|
8146
8175
|
] }),
|
|
8147
|
-
|
|
8176
|
+
isRgbOnchain && isNewRgbAsset && setNewAssetId && /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "space-y-1.5", children: [
|
|
8177
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("label", { className: "text-xxs font-bold uppercase tracking-widest text-white/40", children: "RGB Asset ID - Optional" }),
|
|
8178
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
8179
|
+
"input",
|
|
8180
|
+
{
|
|
8181
|
+
type: "text",
|
|
8182
|
+
value: newAssetId,
|
|
8183
|
+
onChange: (event) => setNewAssetId(event.target.value),
|
|
8184
|
+
placeholder: "rgb:... (leave empty for any asset)",
|
|
8185
|
+
spellCheck: false,
|
|
8186
|
+
autoCapitalize: "off",
|
|
8187
|
+
className: "w-full rounded-xl border bg-white/5 px-3 py-2.5 font-mono text-sm text-white transition-all placeholder:text-white/20 focus:border-primary/50 focus:outline-none"
|
|
8188
|
+
}
|
|
8189
|
+
),
|
|
8190
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("p", { className: "text-xxs text-white/35", children: "Enter a specific asset ID to receive it, or leave empty to accept any RGB asset to this invoice." })
|
|
8191
|
+
] }),
|
|
8192
|
+
isRgbOnchain && /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "space-y-2.5 rounded-xl border bg-card p-3", children: [
|
|
8148
8193
|
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "flex items-center justify-between gap-3", children: [
|
|
8149
8194
|
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
8150
|
-
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("h4", { className: "text-xs font-bold text-white", children: "
|
|
8151
|
-
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("p", { className: "mt-0.5 text-xxs text-muted-foreground", children: usePrivacy ? "
|
|
8195
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("h4", { className: "text-xs font-bold text-white", children: usePrivacy ? "Blinded receive" : "Witness receive" }),
|
|
8196
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("p", { className: "mt-0.5 text-xxs text-muted-foreground", children: usePrivacy ? "Private - recommended" : "Simpler - less private" })
|
|
8152
8197
|
] }),
|
|
8153
8198
|
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
8154
8199
|
"button",
|
|
8155
8200
|
{
|
|
8156
8201
|
type: "button",
|
|
8202
|
+
"aria-label": "Toggle blinded (private) receive",
|
|
8157
8203
|
className: cn(
|
|
8158
8204
|
"relative inline-flex h-5 w-9 flex-shrink-0 items-center rounded-full border shadow-inner transition-colors",
|
|
8159
8205
|
usePrivacy ? "bg-primary" : "bg-white/10"
|
|
@@ -8171,7 +8217,21 @@ function DepositPreGeneration({
|
|
|
8171
8217
|
}
|
|
8172
8218
|
)
|
|
8173
8219
|
] }),
|
|
8174
|
-
|
|
8220
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("p", { className: "text-tiny leading-relaxed text-white/45", children: usePrivacy ? "Blinded: the sender never sees which UTXO you receive into. Spends one of your colorable UTXOs as the receiving slot." : "Witness: the sender creates the receiving UTXO for you. No colorable UTXO needed, but the sender sees the receiving output." }),
|
|
8221
|
+
usePrivacy && colorableUtxoCount !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
8222
|
+
"div",
|
|
8223
|
+
{
|
|
8224
|
+
className: cn(
|
|
8225
|
+
"flex items-center justify-between rounded-lg border px-2.5 py-1.5 text-xxs",
|
|
8226
|
+
colorableUtxoCount > 0 ? "border-success/20 bg-success/5 text-success/80" : "border-warning/20 bg-warning/5 text-warning/80"
|
|
8227
|
+
),
|
|
8228
|
+
children: [
|
|
8229
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "font-medium", children: "Available colorable UTXOs" }),
|
|
8230
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "font-mono font-bold", children: colorableUtxoCount })
|
|
8231
|
+
]
|
|
8232
|
+
}
|
|
8233
|
+
),
|
|
8234
|
+
usePrivacy && colorableUtxoCount === 0 && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("p", { className: "text-tiny text-warning/70", children: "None available \u2014 create a colorable UTXO below to receive privately, or switch off privacy to use a witness receive." })
|
|
8175
8235
|
] }),
|
|
8176
8236
|
network === "onchain" && !isBtc && /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "space-y-1.5", children: [
|
|
8177
8237
|
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
@@ -8201,7 +8261,7 @@ function DepositPreGeneration({
|
|
|
8201
8261
|
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("p", { className: "mb-0.5 text-xs font-bold text-warning", children: "Colorable UTXOs Required" }),
|
|
8202
8262
|
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("p", { className: "text-tiny text-warning/70", children: "To receive RGB assets on-chain you need at least one uncolored UTXO. Create some now and the invoice will be generated automatically." })
|
|
8203
8263
|
] }),
|
|
8204
|
-
!isAutoGenerate && (needsColorableUtxos && onOpenCreateUtxos ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Button, { variant: "cta", size: "cta", onClick: onOpenCreateUtxos, disabled: loading, children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("span", { className: "flex items-center justify-center gap-2", children: [
|
|
8264
|
+
!isAutoGenerate && ((needsColorableUtxos || isRgbOnchain && usePrivacy && colorableUtxoCount === 0) && onOpenCreateUtxos ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Button, { variant: "cta", size: "cta", onClick: onOpenCreateUtxos, disabled: loading, children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("span", { className: "flex items-center justify-center gap-2", children: [
|
|
8205
8265
|
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "material-symbols-outlined text-icon-md", children: "add_circle" }),
|
|
8206
8266
|
"Create Colorable UTXOs"
|
|
8207
8267
|
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Button, { variant: "cta", size: "cta", onClick: generateInvoice, disabled: loading, children: loading ? /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("span", { className: "flex items-center justify-center gap-2", children: [
|
|
@@ -8217,6 +8277,11 @@ function DepositPreGeneration({
|
|
|
8217
8277
|
// src/web/components/deposit-asset-selection.tsx
|
|
8218
8278
|
var import_react16 = require("react");
|
|
8219
8279
|
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
8280
|
+
var ADD_ASSET_SUBTITLE = {
|
|
8281
|
+
RGB: "RGB asset on Bitcoin",
|
|
8282
|
+
SPARK: "Spark-native asset",
|
|
8283
|
+
ARKADE: "Arkade-native asset"
|
|
8284
|
+
};
|
|
8220
8285
|
var PROTOCOL_BADGE = {
|
|
8221
8286
|
RGB: { label: "RGB", className: "bg-network-rgb-chip text-network-rgb-text" },
|
|
8222
8287
|
SPARK: { label: "Spark", className: "bg-network-spark-chip text-network-spark-text" },
|
|
@@ -8254,6 +8319,7 @@ function DepositAssetSelection({
|
|
|
8254
8319
|
const noResults = filteredAssets.length === 0 && !!searchQuery;
|
|
8255
8320
|
const isSearching = !!searchQuery;
|
|
8256
8321
|
const [assetsExpanded, setAssetsExpanded] = (0, import_react16.useState)(false);
|
|
8322
|
+
const [showAddAssetModal, setShowAddAssetModal] = (0, import_react16.useState)(false);
|
|
8257
8323
|
(0, import_react16.useEffect)(() => {
|
|
8258
8324
|
if (isSearching) setAssetsExpanded(true);
|
|
8259
8325
|
}, [isSearching]);
|
|
@@ -8433,71 +8499,60 @@ function DepositAssetSelection({
|
|
|
8433
8499
|
]
|
|
8434
8500
|
}
|
|
8435
8501
|
) }),
|
|
8436
|
-
!searchQuery && newAssetOptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime79.
|
|
8437
|
-
|
|
8438
|
-
|
|
8439
|
-
"
|
|
8502
|
+
!searchQuery && newAssetOptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "pb-1 pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
|
|
8503
|
+
"button",
|
|
8504
|
+
{
|
|
8505
|
+
type: "button",
|
|
8506
|
+
"data-testid": "deposit-add-asset",
|
|
8507
|
+
onClick: () => setShowAddAssetModal(true),
|
|
8508
|
+
className: "group flex w-full items-center gap-3 rounded-2xl border border-white/8 bg-white/3 p-3 transition-all hover:border-border hover:bg-accent",
|
|
8509
|
+
children: [
|
|
8510
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "flex size-10 shrink-0 items-center justify-center rounded-xl bg-primary/15", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Icon, { name: "add", size: "md", className: "text-primary" }) }),
|
|
8511
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "flex-1 text-left", children: [
|
|
8512
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("p", { className: "text-sm font-semibold text-white transition-colors group-hover:text-primary", children: "Add an asset" }),
|
|
8513
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("p", { className: "text-xxs leading-tight text-white/40", children: [
|
|
8514
|
+
"Receive a new ",
|
|
8515
|
+
newAssetOptions.map((o) => o.ticker).join(", "),
|
|
8516
|
+
" asset"
|
|
8517
|
+
] })
|
|
8518
|
+
] }),
|
|
8519
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "material-symbols-outlined text-lg text-white/30 transition-colors group-hover:text-primary", children: "arrow_forward" })
|
|
8520
|
+
]
|
|
8521
|
+
}
|
|
8522
|
+
) })
|
|
8523
|
+
] }),
|
|
8524
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
8525
|
+
BottomSheet,
|
|
8526
|
+
{
|
|
8527
|
+
open: showAddAssetModal,
|
|
8528
|
+
title: "Add an asset",
|
|
8529
|
+
onClose: () => setShowAddAssetModal(false),
|
|
8530
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "space-y-2", children: newAssetOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
|
|
8531
|
+
"button",
|
|
8440
8532
|
{
|
|
8533
|
+
type: "button",
|
|
8534
|
+
"data-testid": `deposit-new-asset-${option.account.toLowerCase()}`,
|
|
8441
8535
|
className: cn(
|
|
8442
|
-
"
|
|
8443
|
-
|
|
8536
|
+
"group flex w-full items-center gap-3 rounded-2xl px-4 py-3 text-left transition-all",
|
|
8537
|
+
option.idleClass
|
|
8444
8538
|
),
|
|
8445
|
-
|
|
8446
|
-
|
|
8447
|
-
|
|
8448
|
-
|
|
8449
|
-
|
|
8450
|
-
|
|
8451
|
-
|
|
8452
|
-
|
|
8453
|
-
|
|
8454
|
-
|
|
8455
|
-
|
|
8456
|
-
|
|
8457
|
-
|
|
8458
|
-
|
|
8459
|
-
|
|
8460
|
-
|
|
8461
|
-
|
|
8462
|
-
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "mt-2 min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
8463
|
-
"div",
|
|
8464
|
-
{
|
|
8465
|
-
className: cn(
|
|
8466
|
-
"text-sm font-bold tracking-wide",
|
|
8467
|
-
active ? "text-white" : "text-white group-hover:opacity-90",
|
|
8468
|
-
!active && option.titleHoverClass
|
|
8469
|
-
),
|
|
8470
|
-
children: option.title
|
|
8471
|
-
}
|
|
8472
|
-
) })
|
|
8473
|
-
]
|
|
8474
|
-
},
|
|
8475
|
-
option.account
|
|
8476
|
-
);
|
|
8477
|
-
})
|
|
8478
|
-
}
|
|
8479
|
-
)
|
|
8480
|
-
] })
|
|
8481
|
-
] }),
|
|
8482
|
-
isNewAsset && newAssetAccount === "RGB" && /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_jsx_runtime79.Fragment, { children: [
|
|
8483
|
-
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "flex-shrink-0 px-5 pb-3 animate-in fade-in slide-in-from-bottom-2 duration-300", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "space-y-2 rounded-2xl border border-network-arkade/20 bg-network-arkade/5 p-3", children: [
|
|
8484
|
-
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("p", { className: "text-tiny leading-relaxed text-network-arkade/80", children: "Leave empty to receive any RGB asset, or enter a specific asset ID." }),
|
|
8485
|
-
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
8486
|
-
"input",
|
|
8487
|
-
{
|
|
8488
|
-
className: "w-full rounded-xl border bg-white/5 px-3 py-2 font-mono text-sm text-white transition-all placeholder:text-white/25 focus:border-network-arkade/40 focus:outline-none",
|
|
8489
|
-
onChange: (event) => setNewAssetId(event.target.value),
|
|
8490
|
-
placeholder: "Asset ID (optional)",
|
|
8491
|
-
type: "text",
|
|
8492
|
-
value: newAssetId
|
|
8493
|
-
}
|
|
8494
|
-
)
|
|
8495
|
-
] }) }),
|
|
8496
|
-
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "flex-shrink-0 px-5 pb-5 pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(Button, { variant: "cta", size: "cta", onClick: handleContinueToGenerate, children: [
|
|
8497
|
-
"Continue with New Asset",
|
|
8498
|
-
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "material-symbols-outlined text-icon-xl font-bold", children: "arrow_forward" })
|
|
8499
|
-
] }) })
|
|
8500
|
-
] })
|
|
8539
|
+
onClick: () => {
|
|
8540
|
+
setShowAddAssetModal(false);
|
|
8541
|
+
handleAddNewAsset(option.account);
|
|
8542
|
+
},
|
|
8543
|
+
children: [
|
|
8544
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(AssetIcon, { ticker: option.ticker, size: 36, className: "flex-shrink-0" }),
|
|
8545
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
8546
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: cn("text-sm font-bold tracking-wide text-white", option.titleHoverClass), children: option.title }),
|
|
8547
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "mt-0.5 text-xxs text-white/40", children: ADD_ASSET_SUBTITLE[option.account] })
|
|
8548
|
+
] }),
|
|
8549
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Icon, { name: "add", size: "sm", className: "text-white/30 transition-colors group-hover:text-white/60" })
|
|
8550
|
+
]
|
|
8551
|
+
},
|
|
8552
|
+
option.account
|
|
8553
|
+
)) })
|
|
8554
|
+
}
|
|
8555
|
+
)
|
|
8501
8556
|
] });
|
|
8502
8557
|
}
|
|
8503
8558
|
|
package/dist/web/index.d.cts
CHANGED
|
@@ -230,10 +230,12 @@ interface AssetCardProps {
|
|
|
230
230
|
accentColor?: string;
|
|
231
231
|
/** Optional state badge for assets that are present but not currently spendable. */
|
|
232
232
|
status?: StatusType;
|
|
233
|
+
/** Whether the asset is yield generating */
|
|
234
|
+
isYielding?: boolean;
|
|
233
235
|
onClick?: () => void;
|
|
234
236
|
className?: string;
|
|
235
237
|
}
|
|
236
|
-
declare function AssetCard({ ticker, name, displayBalance, networks, logoUri, balanceVisible, accentColor, status, onClick, className, }: AssetCardProps): react_jsx_runtime.JSX.Element;
|
|
238
|
+
declare function AssetCard({ ticker, name, displayBalance, networks, logoUri, balanceVisible, accentColor, status, isYielding, onClick, className, }: AssetCardProps): react_jsx_runtime.JSX.Element;
|
|
237
239
|
|
|
238
240
|
interface TransactionCardProps {
|
|
239
241
|
/** Direction of the transaction */
|
|
@@ -1543,8 +1545,20 @@ interface DepositPreGenerationProps {
|
|
|
1543
1545
|
/** Invoked by the inline "Create Colorable UTXOs" CTA. */
|
|
1544
1546
|
onOpenCreateUtxos?: () => void;
|
|
1545
1547
|
showReceiveSummary?: boolean;
|
|
1548
|
+
/** RGB-asset receive: render an inline asset-id field (receive a specific asset). */
|
|
1549
|
+
isNewRgbAsset?: boolean;
|
|
1550
|
+
/** Current asset-id value for the inline field. */
|
|
1551
|
+
newAssetId?: string;
|
|
1552
|
+
/** Setter for the inline asset-id field. */
|
|
1553
|
+
setNewAssetId?: (value: string) => void;
|
|
1554
|
+
/**
|
|
1555
|
+
* Number of colorable (uncolored) UTXOs available for a blinded receive.
|
|
1556
|
+
* `undefined` ⇒ unknown/loading; a number drives the availability hint and the
|
|
1557
|
+
* create-UTXO prompt for the privacy (blinded) path.
|
|
1558
|
+
*/
|
|
1559
|
+
colorableUtxoCount?: number;
|
|
1546
1560
|
}
|
|
1547
|
-
declare function DepositPreGeneration({ selectedAsset, isBtc, network, net, selectedAccount, currentMethod, channelsLoading, showChannelWarning, showLiquidityWarning, isAutoGenerate, loading, usePrivacy, setUsePrivacy, amount, handleAmountChange, getUnitLabel, generateInvoice, needsColorableUtxos, onOpenCreateUtxos, showReceiveSummary, }: DepositPreGenerationProps): react_jsx_runtime.JSX.Element;
|
|
1561
|
+
declare function DepositPreGeneration({ selectedAsset, isBtc, network, net, selectedAccount, currentMethod, channelsLoading, showChannelWarning, showLiquidityWarning, isAutoGenerate, loading, usePrivacy, setUsePrivacy, amount, handleAmountChange, getUnitLabel, generateInvoice, needsColorableUtxos, onOpenCreateUtxos, showReceiveSummary, isNewRgbAsset, newAssetId, setNewAssetId, colorableUtxoCount, }: DepositPreGenerationProps): react_jsx_runtime.JSX.Element;
|
|
1548
1562
|
|
|
1549
1563
|
interface DepositSelectionAsset {
|
|
1550
1564
|
asset_id: string;
|
package/dist/web/index.d.ts
CHANGED
|
@@ -230,10 +230,12 @@ interface AssetCardProps {
|
|
|
230
230
|
accentColor?: string;
|
|
231
231
|
/** Optional state badge for assets that are present but not currently spendable. */
|
|
232
232
|
status?: StatusType;
|
|
233
|
+
/** Whether the asset is yield generating */
|
|
234
|
+
isYielding?: boolean;
|
|
233
235
|
onClick?: () => void;
|
|
234
236
|
className?: string;
|
|
235
237
|
}
|
|
236
|
-
declare function AssetCard({ ticker, name, displayBalance, networks, logoUri, balanceVisible, accentColor, status, onClick, className, }: AssetCardProps): react_jsx_runtime.JSX.Element;
|
|
238
|
+
declare function AssetCard({ ticker, name, displayBalance, networks, logoUri, balanceVisible, accentColor, status, isYielding, onClick, className, }: AssetCardProps): react_jsx_runtime.JSX.Element;
|
|
237
239
|
|
|
238
240
|
interface TransactionCardProps {
|
|
239
241
|
/** Direction of the transaction */
|
|
@@ -1543,8 +1545,20 @@ interface DepositPreGenerationProps {
|
|
|
1543
1545
|
/** Invoked by the inline "Create Colorable UTXOs" CTA. */
|
|
1544
1546
|
onOpenCreateUtxos?: () => void;
|
|
1545
1547
|
showReceiveSummary?: boolean;
|
|
1548
|
+
/** RGB-asset receive: render an inline asset-id field (receive a specific asset). */
|
|
1549
|
+
isNewRgbAsset?: boolean;
|
|
1550
|
+
/** Current asset-id value for the inline field. */
|
|
1551
|
+
newAssetId?: string;
|
|
1552
|
+
/** Setter for the inline asset-id field. */
|
|
1553
|
+
setNewAssetId?: (value: string) => void;
|
|
1554
|
+
/**
|
|
1555
|
+
* Number of colorable (uncolored) UTXOs available for a blinded receive.
|
|
1556
|
+
* `undefined` ⇒ unknown/loading; a number drives the availability hint and the
|
|
1557
|
+
* create-UTXO prompt for the privacy (blinded) path.
|
|
1558
|
+
*/
|
|
1559
|
+
colorableUtxoCount?: number;
|
|
1546
1560
|
}
|
|
1547
|
-
declare function DepositPreGeneration({ selectedAsset, isBtc, network, net, selectedAccount, currentMethod, channelsLoading, showChannelWarning, showLiquidityWarning, isAutoGenerate, loading, usePrivacy, setUsePrivacy, amount, handleAmountChange, getUnitLabel, generateInvoice, needsColorableUtxos, onOpenCreateUtxos, showReceiveSummary, }: DepositPreGenerationProps): react_jsx_runtime.JSX.Element;
|
|
1561
|
+
declare function DepositPreGeneration({ selectedAsset, isBtc, network, net, selectedAccount, currentMethod, channelsLoading, showChannelWarning, showLiquidityWarning, isAutoGenerate, loading, usePrivacy, setUsePrivacy, amount, handleAmountChange, getUnitLabel, generateInvoice, needsColorableUtxos, onOpenCreateUtxos, showReceiveSummary, isNewRgbAsset, newAssetId, setNewAssetId, colorableUtxoCount, }: DepositPreGenerationProps): react_jsx_runtime.JSX.Element;
|
|
1548
1562
|
|
|
1549
1563
|
interface DepositSelectionAsset {
|
|
1550
1564
|
asset_id: string;
|
package/dist/web/index.js
CHANGED
|
@@ -1639,12 +1639,14 @@ function AssetCard({
|
|
|
1639
1639
|
balanceVisible = true,
|
|
1640
1640
|
accentColor,
|
|
1641
1641
|
status,
|
|
1642
|
+
isYielding,
|
|
1642
1643
|
onClick,
|
|
1643
1644
|
className
|
|
1644
1645
|
}) {
|
|
1645
1646
|
const shown = balanceVisible ? displayBalance : "\u2022\u2022\u2022\u2022\u2022\u2022";
|
|
1646
1647
|
const displayShown = balanceVisible ? formatDisplayAmountText(displayBalance) : shown;
|
|
1647
1648
|
const [hovered, setHovered] = useState5(false);
|
|
1649
|
+
const showYield = isYielding ?? ["USDB"].includes(ticker.toUpperCase());
|
|
1648
1650
|
const gradientStyle = accentColor ? { background: `linear-gradient(135deg, var(--card) 30%, ${accentColor}${hovered ? "77" : "55"} 75%, ${accentColor}${hovered ? "dd" : "b3"} 100%)`, transition: "background 0.3s ease" } : void 0;
|
|
1649
1651
|
return /* @__PURE__ */ jsxs8(
|
|
1650
1652
|
"div",
|
|
@@ -1696,7 +1698,26 @@ function AssetCard({
|
|
|
1696
1698
|
children: displayShown
|
|
1697
1699
|
}
|
|
1698
1700
|
),
|
|
1699
|
-
/* @__PURE__ */
|
|
1701
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex items-center justify-end gap-1 mt-0.5", children: [
|
|
1702
|
+
/* @__PURE__ */ jsx19("p", { className: "truncate text-tiny font-medium uppercase tracking-wide text-muted-foreground", children: ticker }),
|
|
1703
|
+
showYield && /* @__PURE__ */ jsx19("div", { title: "Yield Generating Asset", className: "text-success/90 flex items-center justify-center bg-success/10 rounded-full p-0.5", children: /* @__PURE__ */ jsxs8(
|
|
1704
|
+
"svg",
|
|
1705
|
+
{
|
|
1706
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1707
|
+
viewBox: "0 0 24 24",
|
|
1708
|
+
fill: "none",
|
|
1709
|
+
stroke: "currentColor",
|
|
1710
|
+
strokeWidth: "2",
|
|
1711
|
+
strokeLinecap: "round",
|
|
1712
|
+
strokeLinejoin: "round",
|
|
1713
|
+
className: "w-3 h-3",
|
|
1714
|
+
children: [
|
|
1715
|
+
/* @__PURE__ */ jsx19("path", { d: "M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z" }),
|
|
1716
|
+
/* @__PURE__ */ jsx19("path", { d: "M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12" })
|
|
1717
|
+
]
|
|
1718
|
+
}
|
|
1719
|
+
) })
|
|
1720
|
+
] }),
|
|
1700
1721
|
status && /* @__PURE__ */ jsx19(StatusBadge, { status, className: "mt-2" })
|
|
1701
1722
|
] })
|
|
1702
1723
|
] })
|
|
@@ -2374,11 +2395,14 @@ function AccountStatusTabs({
|
|
|
2374
2395
|
/* @__PURE__ */ jsx28("p", { className: "mt-5 text-sm leading-relaxed text-muted-foreground", children: selectedAccount.detail }),
|
|
2375
2396
|
/* @__PURE__ */ jsxs15("div", { className: "mt-5", children: [
|
|
2376
2397
|
/* @__PURE__ */ jsx28("div", { className: "text-icon-xxs font-black uppercase tracking-[0.18em] text-white/45", children: "Capabilities" }),
|
|
2377
|
-
/* @__PURE__ */ jsx28("div", { className: "mt-3 flex flex-wrap gap-2", children: selectedAccount.capabilityBullets.map((capability) => /* @__PURE__ */
|
|
2398
|
+
/* @__PURE__ */ jsx28("div", { className: "mt-3 flex flex-wrap gap-2", children: selectedAccount.capabilityBullets.map((capability) => /* @__PURE__ */ jsxs15(
|
|
2378
2399
|
"span",
|
|
2379
2400
|
{
|
|
2380
|
-
className: "rounded-full border bg-white/[0.05] px-2.5 py-1 text-xxs font-medium text-white/
|
|
2381
|
-
children:
|
|
2401
|
+
className: "inline-flex items-center gap-1.5 rounded-full border bg-white/[0.05] px-2.5 py-1 text-xxs font-medium text-white/70",
|
|
2402
|
+
children: [
|
|
2403
|
+
/* @__PURE__ */ jsx28("span", { className: "size-1.5 rounded-full bg-primary/70" }),
|
|
2404
|
+
capability
|
|
2405
|
+
]
|
|
2382
2406
|
},
|
|
2383
2407
|
capability
|
|
2384
2408
|
)) })
|
|
@@ -7915,9 +7939,14 @@ function DepositPreGeneration({
|
|
|
7915
7939
|
generateInvoice,
|
|
7916
7940
|
needsColorableUtxos = false,
|
|
7917
7941
|
onOpenCreateUtxos,
|
|
7918
|
-
showReceiveSummary = true
|
|
7942
|
+
showReceiveSummary = true,
|
|
7943
|
+
isNewRgbAsset = false,
|
|
7944
|
+
newAssetId = "",
|
|
7945
|
+
setNewAssetId,
|
|
7946
|
+
colorableUtxoCount
|
|
7919
7947
|
}) {
|
|
7920
7948
|
const method = METHOD_META2[currentMethod];
|
|
7949
|
+
const isRgbOnchain = network === "onchain" && !isBtc;
|
|
7921
7950
|
return /* @__PURE__ */ jsxs64("div", { className: "space-y-3", children: [
|
|
7922
7951
|
showReceiveSummary && /* @__PURE__ */ jsxs64("div", { className: "rounded-2xl border border-white/8 bg-white/4 p-3", children: [
|
|
7923
7952
|
/* @__PURE__ */ jsx78("p", { className: "text-xxs font-bold uppercase tracking-widest text-white/35", children: "Receive Summary" }),
|
|
@@ -7967,16 +7996,33 @@ function DepositPreGeneration({
|
|
|
7967
7996
|
] })
|
|
7968
7997
|
] })
|
|
7969
7998
|
] }),
|
|
7970
|
-
|
|
7999
|
+
isRgbOnchain && isNewRgbAsset && setNewAssetId && /* @__PURE__ */ jsxs64("div", { className: "space-y-1.5", children: [
|
|
8000
|
+
/* @__PURE__ */ jsx78("label", { className: "text-xxs font-bold uppercase tracking-widest text-white/40", children: "RGB Asset ID - Optional" }),
|
|
8001
|
+
/* @__PURE__ */ jsx78(
|
|
8002
|
+
"input",
|
|
8003
|
+
{
|
|
8004
|
+
type: "text",
|
|
8005
|
+
value: newAssetId,
|
|
8006
|
+
onChange: (event) => setNewAssetId(event.target.value),
|
|
8007
|
+
placeholder: "rgb:... (leave empty for any asset)",
|
|
8008
|
+
spellCheck: false,
|
|
8009
|
+
autoCapitalize: "off",
|
|
8010
|
+
className: "w-full rounded-xl border bg-white/5 px-3 py-2.5 font-mono text-sm text-white transition-all placeholder:text-white/20 focus:border-primary/50 focus:outline-none"
|
|
8011
|
+
}
|
|
8012
|
+
),
|
|
8013
|
+
/* @__PURE__ */ jsx78("p", { className: "text-xxs text-white/35", children: "Enter a specific asset ID to receive it, or leave empty to accept any RGB asset to this invoice." })
|
|
8014
|
+
] }),
|
|
8015
|
+
isRgbOnchain && /* @__PURE__ */ jsxs64("div", { className: "space-y-2.5 rounded-xl border bg-card p-3", children: [
|
|
7971
8016
|
/* @__PURE__ */ jsxs64("div", { className: "flex items-center justify-between gap-3", children: [
|
|
7972
8017
|
/* @__PURE__ */ jsxs64("div", { className: "min-w-0 flex-1", children: [
|
|
7973
|
-
/* @__PURE__ */ jsx78("h4", { className: "text-xs font-bold text-white", children: "
|
|
7974
|
-
/* @__PURE__ */ jsx78("p", { className: "mt-0.5 text-xxs text-muted-foreground", children: usePrivacy ? "
|
|
8018
|
+
/* @__PURE__ */ jsx78("h4", { className: "text-xs font-bold text-white", children: usePrivacy ? "Blinded receive" : "Witness receive" }),
|
|
8019
|
+
/* @__PURE__ */ jsx78("p", { className: "mt-0.5 text-xxs text-muted-foreground", children: usePrivacy ? "Private - recommended" : "Simpler - less private" })
|
|
7975
8020
|
] }),
|
|
7976
8021
|
/* @__PURE__ */ jsx78(
|
|
7977
8022
|
"button",
|
|
7978
8023
|
{
|
|
7979
8024
|
type: "button",
|
|
8025
|
+
"aria-label": "Toggle blinded (private) receive",
|
|
7980
8026
|
className: cn(
|
|
7981
8027
|
"relative inline-flex h-5 w-9 flex-shrink-0 items-center rounded-full border shadow-inner transition-colors",
|
|
7982
8028
|
usePrivacy ? "bg-primary" : "bg-white/10"
|
|
@@ -7994,7 +8040,21 @@ function DepositPreGeneration({
|
|
|
7994
8040
|
}
|
|
7995
8041
|
)
|
|
7996
8042
|
] }),
|
|
7997
|
-
|
|
8043
|
+
/* @__PURE__ */ jsx78("p", { className: "text-tiny leading-relaxed text-white/45", children: usePrivacy ? "Blinded: the sender never sees which UTXO you receive into. Spends one of your colorable UTXOs as the receiving slot." : "Witness: the sender creates the receiving UTXO for you. No colorable UTXO needed, but the sender sees the receiving output." }),
|
|
8044
|
+
usePrivacy && colorableUtxoCount !== void 0 && /* @__PURE__ */ jsxs64(
|
|
8045
|
+
"div",
|
|
8046
|
+
{
|
|
8047
|
+
className: cn(
|
|
8048
|
+
"flex items-center justify-between rounded-lg border px-2.5 py-1.5 text-xxs",
|
|
8049
|
+
colorableUtxoCount > 0 ? "border-success/20 bg-success/5 text-success/80" : "border-warning/20 bg-warning/5 text-warning/80"
|
|
8050
|
+
),
|
|
8051
|
+
children: [
|
|
8052
|
+
/* @__PURE__ */ jsx78("span", { className: "font-medium", children: "Available colorable UTXOs" }),
|
|
8053
|
+
/* @__PURE__ */ jsx78("span", { className: "font-mono font-bold", children: colorableUtxoCount })
|
|
8054
|
+
]
|
|
8055
|
+
}
|
|
8056
|
+
),
|
|
8057
|
+
usePrivacy && colorableUtxoCount === 0 && /* @__PURE__ */ jsx78("p", { className: "text-tiny text-warning/70", children: "None available \u2014 create a colorable UTXO below to receive privately, or switch off privacy to use a witness receive." })
|
|
7998
8058
|
] }),
|
|
7999
8059
|
network === "onchain" && !isBtc && /* @__PURE__ */ jsxs64("div", { className: "space-y-1.5", children: [
|
|
8000
8060
|
/* @__PURE__ */ jsxs64("div", { className: "flex items-center justify-between", children: [
|
|
@@ -8024,7 +8084,7 @@ function DepositPreGeneration({
|
|
|
8024
8084
|
/* @__PURE__ */ jsx78("p", { className: "mb-0.5 text-xs font-bold text-warning", children: "Colorable UTXOs Required" }),
|
|
8025
8085
|
/* @__PURE__ */ jsx78("p", { className: "text-tiny text-warning/70", children: "To receive RGB assets on-chain you need at least one uncolored UTXO. Create some now and the invoice will be generated automatically." })
|
|
8026
8086
|
] }),
|
|
8027
|
-
!isAutoGenerate && (needsColorableUtxos && onOpenCreateUtxos ? /* @__PURE__ */ jsx78(Button, { variant: "cta", size: "cta", onClick: onOpenCreateUtxos, disabled: loading, children: /* @__PURE__ */ jsxs64("span", { className: "flex items-center justify-center gap-2", children: [
|
|
8087
|
+
!isAutoGenerate && ((needsColorableUtxos || isRgbOnchain && usePrivacy && colorableUtxoCount === 0) && onOpenCreateUtxos ? /* @__PURE__ */ jsx78(Button, { variant: "cta", size: "cta", onClick: onOpenCreateUtxos, disabled: loading, children: /* @__PURE__ */ jsxs64("span", { className: "flex items-center justify-center gap-2", children: [
|
|
8028
8088
|
/* @__PURE__ */ jsx78("span", { className: "material-symbols-outlined text-icon-md", children: "add_circle" }),
|
|
8029
8089
|
"Create Colorable UTXOs"
|
|
8030
8090
|
] }) }) : /* @__PURE__ */ jsx78(Button, { variant: "cta", size: "cta", onClick: generateInvoice, disabled: loading, children: loading ? /* @__PURE__ */ jsxs64("span", { className: "flex items-center justify-center gap-2", children: [
|
|
@@ -8039,7 +8099,12 @@ function DepositPreGeneration({
|
|
|
8039
8099
|
|
|
8040
8100
|
// src/web/components/deposit-asset-selection.tsx
|
|
8041
8101
|
import { useEffect as useEffect10, useState as useState15 } from "react";
|
|
8042
|
-
import {
|
|
8102
|
+
import { jsx as jsx79, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
8103
|
+
var ADD_ASSET_SUBTITLE = {
|
|
8104
|
+
RGB: "RGB asset on Bitcoin",
|
|
8105
|
+
SPARK: "Spark-native asset",
|
|
8106
|
+
ARKADE: "Arkade-native asset"
|
|
8107
|
+
};
|
|
8043
8108
|
var PROTOCOL_BADGE = {
|
|
8044
8109
|
RGB: { label: "RGB", className: "bg-network-rgb-chip text-network-rgb-text" },
|
|
8045
8110
|
SPARK: { label: "Spark", className: "bg-network-spark-chip text-network-spark-text" },
|
|
@@ -8077,6 +8142,7 @@ function DepositAssetSelection({
|
|
|
8077
8142
|
const noResults = filteredAssets.length === 0 && !!searchQuery;
|
|
8078
8143
|
const isSearching = !!searchQuery;
|
|
8079
8144
|
const [assetsExpanded, setAssetsExpanded] = useState15(false);
|
|
8145
|
+
const [showAddAssetModal, setShowAddAssetModal] = useState15(false);
|
|
8080
8146
|
useEffect10(() => {
|
|
8081
8147
|
if (isSearching) setAssetsExpanded(true);
|
|
8082
8148
|
}, [isSearching]);
|
|
@@ -8256,71 +8322,60 @@ function DepositAssetSelection({
|
|
|
8256
8322
|
]
|
|
8257
8323
|
}
|
|
8258
8324
|
) }),
|
|
8259
|
-
!searchQuery && newAssetOptions.length > 0 && /* @__PURE__ */
|
|
8260
|
-
|
|
8261
|
-
|
|
8262
|
-
"
|
|
8325
|
+
!searchQuery && newAssetOptions.length > 0 && /* @__PURE__ */ jsx79("div", { className: "pb-1 pt-2", children: /* @__PURE__ */ jsxs65(
|
|
8326
|
+
"button",
|
|
8327
|
+
{
|
|
8328
|
+
type: "button",
|
|
8329
|
+
"data-testid": "deposit-add-asset",
|
|
8330
|
+
onClick: () => setShowAddAssetModal(true),
|
|
8331
|
+
className: "group flex w-full items-center gap-3 rounded-2xl border border-white/8 bg-white/3 p-3 transition-all hover:border-border hover:bg-accent",
|
|
8332
|
+
children: [
|
|
8333
|
+
/* @__PURE__ */ jsx79("div", { className: "flex size-10 shrink-0 items-center justify-center rounded-xl bg-primary/15", children: /* @__PURE__ */ jsx79(Icon, { name: "add", size: "md", className: "text-primary" }) }),
|
|
8334
|
+
/* @__PURE__ */ jsxs65("div", { className: "flex-1 text-left", children: [
|
|
8335
|
+
/* @__PURE__ */ jsx79("p", { className: "text-sm font-semibold text-white transition-colors group-hover:text-primary", children: "Add an asset" }),
|
|
8336
|
+
/* @__PURE__ */ jsxs65("p", { className: "text-xxs leading-tight text-white/40", children: [
|
|
8337
|
+
"Receive a new ",
|
|
8338
|
+
newAssetOptions.map((o) => o.ticker).join(", "),
|
|
8339
|
+
" asset"
|
|
8340
|
+
] })
|
|
8341
|
+
] }),
|
|
8342
|
+
/* @__PURE__ */ jsx79("span", { className: "material-symbols-outlined text-lg text-white/30 transition-colors group-hover:text-primary", children: "arrow_forward" })
|
|
8343
|
+
]
|
|
8344
|
+
}
|
|
8345
|
+
) })
|
|
8346
|
+
] }),
|
|
8347
|
+
/* @__PURE__ */ jsx79(
|
|
8348
|
+
BottomSheet,
|
|
8349
|
+
{
|
|
8350
|
+
open: showAddAssetModal,
|
|
8351
|
+
title: "Add an asset",
|
|
8352
|
+
onClose: () => setShowAddAssetModal(false),
|
|
8353
|
+
children: /* @__PURE__ */ jsx79("div", { className: "space-y-2", children: newAssetOptions.map((option) => /* @__PURE__ */ jsxs65(
|
|
8354
|
+
"button",
|
|
8263
8355
|
{
|
|
8356
|
+
type: "button",
|
|
8357
|
+
"data-testid": `deposit-new-asset-${option.account.toLowerCase()}`,
|
|
8264
8358
|
className: cn(
|
|
8265
|
-
"
|
|
8266
|
-
|
|
8359
|
+
"group flex w-full items-center gap-3 rounded-2xl px-4 py-3 text-left transition-all",
|
|
8360
|
+
option.idleClass
|
|
8267
8361
|
),
|
|
8268
|
-
|
|
8269
|
-
|
|
8270
|
-
|
|
8271
|
-
|
|
8272
|
-
|
|
8273
|
-
|
|
8274
|
-
|
|
8275
|
-
|
|
8276
|
-
|
|
8277
|
-
|
|
8278
|
-
|
|
8279
|
-
|
|
8280
|
-
|
|
8281
|
-
|
|
8282
|
-
|
|
8283
|
-
|
|
8284
|
-
|
|
8285
|
-
/* @__PURE__ */ jsx79("div", { className: "mt-2 min-w-0", children: /* @__PURE__ */ jsx79(
|
|
8286
|
-
"div",
|
|
8287
|
-
{
|
|
8288
|
-
className: cn(
|
|
8289
|
-
"text-sm font-bold tracking-wide",
|
|
8290
|
-
active ? "text-white" : "text-white group-hover:opacity-90",
|
|
8291
|
-
!active && option.titleHoverClass
|
|
8292
|
-
),
|
|
8293
|
-
children: option.title
|
|
8294
|
-
}
|
|
8295
|
-
) })
|
|
8296
|
-
]
|
|
8297
|
-
},
|
|
8298
|
-
option.account
|
|
8299
|
-
);
|
|
8300
|
-
})
|
|
8301
|
-
}
|
|
8302
|
-
)
|
|
8303
|
-
] })
|
|
8304
|
-
] }),
|
|
8305
|
-
isNewAsset && newAssetAccount === "RGB" && /* @__PURE__ */ jsxs65(Fragment16, { children: [
|
|
8306
|
-
/* @__PURE__ */ jsx79("div", { className: "flex-shrink-0 px-5 pb-3 animate-in fade-in slide-in-from-bottom-2 duration-300", children: /* @__PURE__ */ jsxs65("div", { className: "space-y-2 rounded-2xl border border-network-arkade/20 bg-network-arkade/5 p-3", children: [
|
|
8307
|
-
/* @__PURE__ */ jsx79("p", { className: "text-tiny leading-relaxed text-network-arkade/80", children: "Leave empty to receive any RGB asset, or enter a specific asset ID." }),
|
|
8308
|
-
/* @__PURE__ */ jsx79(
|
|
8309
|
-
"input",
|
|
8310
|
-
{
|
|
8311
|
-
className: "w-full rounded-xl border bg-white/5 px-3 py-2 font-mono text-sm text-white transition-all placeholder:text-white/25 focus:border-network-arkade/40 focus:outline-none",
|
|
8312
|
-
onChange: (event) => setNewAssetId(event.target.value),
|
|
8313
|
-
placeholder: "Asset ID (optional)",
|
|
8314
|
-
type: "text",
|
|
8315
|
-
value: newAssetId
|
|
8316
|
-
}
|
|
8317
|
-
)
|
|
8318
|
-
] }) }),
|
|
8319
|
-
/* @__PURE__ */ jsx79("div", { className: "flex-shrink-0 px-5 pb-5 pt-2", children: /* @__PURE__ */ jsxs65(Button, { variant: "cta", size: "cta", onClick: handleContinueToGenerate, children: [
|
|
8320
|
-
"Continue with New Asset",
|
|
8321
|
-
/* @__PURE__ */ jsx79("span", { className: "material-symbols-outlined text-icon-xl font-bold", children: "arrow_forward" })
|
|
8322
|
-
] }) })
|
|
8323
|
-
] })
|
|
8362
|
+
onClick: () => {
|
|
8363
|
+
setShowAddAssetModal(false);
|
|
8364
|
+
handleAddNewAsset(option.account);
|
|
8365
|
+
},
|
|
8366
|
+
children: [
|
|
8367
|
+
/* @__PURE__ */ jsx79(AssetIcon, { ticker: option.ticker, size: 36, className: "flex-shrink-0" }),
|
|
8368
|
+
/* @__PURE__ */ jsxs65("div", { className: "min-w-0 flex-1", children: [
|
|
8369
|
+
/* @__PURE__ */ jsx79("div", { className: cn("text-sm font-bold tracking-wide text-white", option.titleHoverClass), children: option.title }),
|
|
8370
|
+
/* @__PURE__ */ jsx79("div", { className: "mt-0.5 text-xxs text-white/40", children: ADD_ASSET_SUBTITLE[option.account] })
|
|
8371
|
+
] }),
|
|
8372
|
+
/* @__PURE__ */ jsx79(Icon, { name: "add", size: "sm", className: "text-white/30 transition-colors group-hover:text-white/60" })
|
|
8373
|
+
]
|
|
8374
|
+
},
|
|
8375
|
+
option.account
|
|
8376
|
+
)) })
|
|
8377
|
+
}
|
|
8378
|
+
)
|
|
8324
8379
|
] });
|
|
8325
8380
|
}
|
|
8326
8381
|
|
package/package.json
CHANGED