kaleido-ui 0.1.72 → 0.1.73

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.
@@ -2245,7 +2245,7 @@ var LOGO_PATHS = /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runti
2245
2245
  ),
2246
2246
  /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("path", { d: "M274.479 0.104797H411.786L274.533 137.411H137.226L274.479 0.104797Z", fill: "#17B581" })
2247
2247
  ] });
2248
- function QrCode({ value, size = 160, className }) {
2248
+ function QrCode({ value, size = 160, className, tone = "onLight" }) {
2249
2249
  const svgContent = (0, import_react6.useMemo)(() => {
2250
2250
  if (!value) return null;
2251
2251
  const matrix = (0, import_qr.default)(value, "raw", { ecc: "medium", border: 0 });
@@ -2253,8 +2253,8 @@ function QrCode({ value, size = 160, className }) {
2253
2253
  const moduleSize = 10;
2254
2254
  const quietZone = moduleSize * 2;
2255
2255
  const svgSize = n * moduleSize + quietZone * 2;
2256
- const fg = "#040404";
2257
- const bg = "#ffffff";
2256
+ const fg = tone === "onDark" ? "#ffffff" : "#040404";
2257
+ const bg = tone === "onDark" ? "transparent" : "#ffffff";
2258
2258
  const logoModules = Math.ceil(n * 0.2);
2259
2259
  const logoZoneSize = logoModules % 2 === 0 ? logoModules + 1 : logoModules;
2260
2260
  const elements = [];
@@ -2308,7 +2308,7 @@ function QrCode({ value, size = 160, className }) {
2308
2308
  children: elements
2309
2309
  }
2310
2310
  );
2311
- }, [value]);
2311
+ }, [value, tone]);
2312
2312
  return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className, style: { width: size, height: size }, children: svgContent });
2313
2313
  }
2314
2314
 
@@ -7179,7 +7179,7 @@ var NETWORK_CONFIG = {
7179
7179
  border: "border-network-bitcoin/40",
7180
7180
  qrBorder: "border-network-bitcoin/30",
7181
7181
  qrGlow: qrGlowStyle(colors.network.bitcoin),
7182
- icon: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "material-symbols-outlined text-icon-xs leading-none", children: "link" })
7182
+ icon: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "material-symbols-outlined text-icon-xs leading-none", children: "currency_bitcoin" })
7183
7183
  },
7184
7184
  lightning: {
7185
7185
  label: "Lightning",
@@ -7591,13 +7591,13 @@ function DepositNetworkDefaultModal({
7591
7591
  }
7592
7592
 
7593
7593
  // src/web/components/btc-unified-receive.tsx
7594
+ var import_react16 = require("react");
7594
7595
  var import_jsx_runtime76 = require("react/jsx-runtime");
7595
7596
  function formatSatsForRow(value) {
7596
7597
  if (!value || value <= 0 || !Number.isFinite(value)) return null;
7597
7598
  return `${value.toLocaleString("en-US")} sats`;
7598
7599
  }
7599
7600
  function BtcUnifiedReceive({
7600
- btcSelectedAccount,
7601
7601
  accountReceiveResult,
7602
7602
  invoiceStatus,
7603
7603
  isInvoicePending,
@@ -7612,66 +7612,56 @@ function BtcUnifiedReceive({
7612
7612
  setAmount,
7613
7613
  setInvoiceStatus,
7614
7614
  setAccountReceiveResult,
7615
- handleDone,
7616
- showRegenerate = true
7615
+ showRegenerate = true,
7616
+ description,
7617
+ onDescriptionChange
7617
7618
  }) {
7618
- const accountNetwork = btcSelectedAccount === "SPARK" ? "spark" : btcSelectedAccount === "ARKADE" ? "arkade" : "onchain";
7619
- const qrNetwork = NETWORK_CONFIG[accountNetwork];
7619
+ const [showEdit, setShowEdit] = (0, import_react16.useState)(false);
7620
+ const isQrCopied = copied === accountReceiveResult.qrValue;
7621
+ const handleNewAddress = () => {
7622
+ setAddress("");
7623
+ setAmount("");
7624
+ setInvoiceStatus(null);
7625
+ setAccountReceiveResult(null);
7626
+ };
7620
7627
  return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "space-y-3 animate-in fade-in zoom-in-95 duration-300", children: [
7621
- /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "flex flex-col gap-1.5 rounded-xl border border-white/8 bg-white/3 p-2.5", children: [
7622
- /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "flex items-center justify-between px-1", children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("label", { className: "text-xxs font-bold uppercase tracking-widest text-white/40", children: "Amount (optional)" }) }),
7623
- /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
7624
- "input",
7625
- {
7626
- type: "text",
7627
- value: amount,
7628
- onChange: handleAmountChange,
7629
- placeholder: "Any amount",
7630
- className: "w-full rounded-lg border bg-white/5 px-3 py-1.5 font-mono text-xs font-bold text-white transition-all placeholder:text-white/25 focus:border-primary/40 focus:outline-none",
7631
- inputMode: "decimal"
7632
- }
7633
- ),
7634
- amount && loading && /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("p", { className: "flex items-center gap-1 text-xxs text-warning/70", children: [
7635
- /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "material-symbols-outlined animate-spin text-icon-xxs", children: "progress_activity" }),
7636
- "Updating invoice..."
7637
- ] })
7638
- ] }),
7639
7628
  /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "flex flex-col items-center gap-3", children: [
7640
- /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
7641
- "div",
7642
- {
7643
- className: cn(
7644
- "relative flex flex-col items-center rounded-2xl border-2 bg-white p-2 transition-all",
7645
- qrNetwork.qrBorder
7646
- ),
7647
- style: qrNetwork.qrGlow,
7648
- children: [
7649
- /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(QrCode, { value: accountReceiveResult.qrValue, size: 200 }),
7650
- isInvoicePaid && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(PaidOverlay, {})
7651
- ]
7652
- }
7653
- ),
7654
- (() => {
7655
- const isQrCopied = copied === accountReceiveResult.qrValue;
7656
- return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
7657
- "button",
7629
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "relative flex flex-col items-center p-2", children: [
7630
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(QrCode, { value: accountReceiveResult.qrValue, size: 200, tone: "onDark" }),
7631
+ isInvoicePaid && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(PaidOverlay, {})
7632
+ ] }),
7633
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "flex items-center justify-center gap-2.5", children: [
7634
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
7635
+ Button,
7658
7636
  {
7659
- type: "button",
7660
- className: cn(
7661
- "flex items-center gap-1 rounded-full border px-2.5 py-1 text-xxs font-bold uppercase tracking-widest transition-all",
7662
- isQrCopied ? "border-primary/30 bg-primary/10 text-primary" : "border-border bg-white/5 text-muted-foreground hover:border-white/20 hover:bg-accent hover:text-white"
7663
- ),
7664
- onClick: (event) => {
7665
- event.stopPropagation();
7666
- void copyToClipboard(accountReceiveResult.qrValue);
7667
- },
7668
- children: [
7669
- /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Icon, { name: isQrCopied ? "check" : "content_copy", size: "xs" }),
7670
- isQrCopied ? "Copied" : `Copy ${accountReceiveResult.qrLabel}`
7671
- ]
7637
+ variant: "surface",
7638
+ size: "icon-xl",
7639
+ "aria-label": `Copy ${accountReceiveResult.qrLabel}`,
7640
+ onClick: () => void copyToClipboard(accountReceiveResult.qrValue),
7641
+ children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Icon, { name: isQrCopied ? "check" : "content_copy", size: "lg" })
7672
7642
  }
7673
- );
7674
- })()
7643
+ ),
7644
+ showRegenerate && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
7645
+ Button,
7646
+ {
7647
+ variant: "surface",
7648
+ size: "icon-xl",
7649
+ "aria-label": "New address",
7650
+ onClick: handleNewAddress,
7651
+ children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Icon, { name: "refresh", size: "lg" })
7652
+ }
7653
+ ),
7654
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
7655
+ Button,
7656
+ {
7657
+ variant: "surface",
7658
+ size: "icon-xl",
7659
+ "aria-label": "Edit amount and description",
7660
+ onClick: () => setShowEdit(true),
7661
+ children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Icon, { name: "edit", size: "lg" })
7662
+ }
7663
+ )
7664
+ ] })
7675
7665
  ] }),
7676
7666
  invoiceStatus && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
7677
7667
  InvoiceStatusBanner,
@@ -7690,9 +7680,8 @@ function BtcUnifiedReceive({
7690
7680
  "div",
7691
7681
  {
7692
7682
  className: cn(
7693
- "group flex cursor-pointer items-center gap-2 rounded-xl border bg-white/3 px-2.5 py-1.5",
7694
- "transition-all hover:bg-white/6 active:scale-[0.98]",
7695
- network.border
7683
+ "group flex cursor-pointer items-center gap-2 rounded-xl bg-white/3 px-2.5 py-1.5",
7684
+ "transition-all hover:bg-white/6 active:scale-[0.98]"
7696
7685
  ),
7697
7686
  style: { borderLeftWidth: 3, borderLeftColor: network.color },
7698
7687
  onClick: () => void copyToClipboard(address.value),
@@ -7716,36 +7705,48 @@ function BtcUnifiedReceive({
7716
7705
  })
7717
7706
  ] }),
7718
7707
  /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
7719
- NetworkInfoDisclosure,
7708
+ BottomSheet,
7720
7709
  {
7721
- networks: Array.from(
7722
- new Set(accountReceiveResult.addresses.map((address) => address.network))
7723
- )
7710
+ open: showEdit,
7711
+ title: "Edit request",
7712
+ icon: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Icon, { name: "edit", size: "md" }),
7713
+ onClose: () => setShowEdit(false),
7714
+ children: /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "space-y-4", children: [
7715
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "space-y-1.5", children: [
7716
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("label", { className: "text-xxs font-bold uppercase tracking-widest text-white/40", children: "Amount (optional)" }),
7717
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
7718
+ "input",
7719
+ {
7720
+ type: "text",
7721
+ value: amount,
7722
+ onChange: handleAmountChange,
7723
+ placeholder: "Any amount",
7724
+ className: "w-full rounded-xl bg-white/5 px-3 py-2.5 font-mono text-sm font-bold text-white shadow-inner transition-all placeholder:text-white/25 focus:outline focus:outline-2 focus:outline-primary/40",
7725
+ inputMode: "decimal"
7726
+ }
7727
+ ),
7728
+ amount && loading && /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("p", { className: "flex items-center gap-1 text-xxs text-warning/70", children: [
7729
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "material-symbols-outlined animate-spin text-icon-xxs", children: "progress_activity" }),
7730
+ "Updating invoice..."
7731
+ ] })
7732
+ ] }),
7733
+ onDescriptionChange && /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "space-y-1.5", children: [
7734
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("label", { className: "text-xxs font-bold uppercase tracking-widest text-white/40", children: "Description (optional)" }),
7735
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
7736
+ "input",
7737
+ {
7738
+ type: "text",
7739
+ value: description ?? "",
7740
+ onChange: (event) => onDescriptionChange(event.target.value),
7741
+ placeholder: "What's this for?",
7742
+ className: "w-full rounded-xl bg-white/5 px-3 py-2.5 text-sm text-white shadow-inner transition-all placeholder:text-white/25 focus:outline focus:outline-2 focus:outline-primary/40"
7743
+ }
7744
+ )
7745
+ ] }),
7746
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Button, { variant: "cta", className: "w-full", onClick: () => setShowEdit(false), children: "Done" })
7747
+ ] })
7724
7748
  }
7725
- ),
7726
- /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "flex gap-2.5 pt-1", children: [
7727
- showRegenerate && /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
7728
- "button",
7729
- {
7730
- type: "button",
7731
- onClick: () => {
7732
- setAddress("");
7733
- setAmount("");
7734
- setInvoiceStatus(null);
7735
- setAccountReceiveResult(null);
7736
- },
7737
- className: "flex flex-1 items-center justify-center gap-1.5 rounded-xl border py-3 text-xs font-bold text-muted-foreground transition-all hover:border-border hover:bg-accent hover:text-white active:scale-[0.98]",
7738
- children: [
7739
- /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "material-symbols-outlined text-icon-sm", children: "refresh" }),
7740
- "New Address"
7741
- ]
7742
- }
7743
- ),
7744
- /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(Button, { variant: "cta", onClick: handleDone, className: showRegenerate ? void 0 : "flex-1", children: [
7745
- /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "material-symbols-outlined text-icon-sm", children: "check" }),
7746
- "Done"
7747
- ] })
7748
- ] })
7749
+ )
7749
7750
  ] });
7750
7751
  }
7751
7752
 
@@ -8167,7 +8168,7 @@ function DepositPreGeneration({
8167
8168
  }
8168
8169
 
8169
8170
  // src/web/components/deposit-asset-selection.tsx
8170
- var import_react16 = require("react");
8171
+ var import_react17 = require("react");
8171
8172
  var import_jsx_runtime79 = require("react/jsx-runtime");
8172
8173
  var ADD_ASSET_SUBTITLE = {
8173
8174
  RGB: "RGB asset on Bitcoin",
@@ -8210,9 +8211,9 @@ function DepositAssetSelection({
8210
8211
  const ownedAssetsCount = ownedAssets.length;
8211
8212
  const noResults = filteredAssets.length === 0 && !!searchQuery;
8212
8213
  const isSearching = !!searchQuery;
8213
- const [assetsExpanded, setAssetsExpanded] = (0, import_react16.useState)(false);
8214
- const [showAddAssetModal, setShowAddAssetModal] = (0, import_react16.useState)(false);
8215
- (0, import_react16.useEffect)(() => {
8214
+ const [assetsExpanded, setAssetsExpanded] = (0, import_react17.useState)(false);
8215
+ const [showAddAssetModal, setShowAddAssetModal] = (0, import_react17.useState)(false);
8216
+ (0, import_react17.useEffect)(() => {
8216
8217
  if (isSearching) setAssetsExpanded(true);
8217
8218
  }, [isSearching]);
8218
8219
  const showOwnedAssets = isSearching ? true : assetsExpanded;
@@ -334,8 +334,14 @@ interface QrCodeProps {
334
334
  value: string;
335
335
  size?: number;
336
336
  className?: string;
337
+ /**
338
+ * 'onLight' (default) renders dark modules on a white card — use inside a
339
+ * white container. 'onDark' renders white modules on a transparent
340
+ * background so the QR sits directly on the app background.
341
+ */
342
+ tone?: 'onLight' | 'onDark';
337
343
  }
338
- declare function QrCode({ value, size, className }: QrCodeProps): react_jsx_runtime.JSX.Element;
344
+ declare function QrCode({ value, size, className, tone }: QrCodeProps): react_jsx_runtime.JSX.Element;
339
345
 
340
346
  interface BottomNavItem<TValue extends string = string> {
341
347
  id: TValue;
@@ -1468,8 +1474,12 @@ interface BtcUnifiedReceiveProps {
1468
1474
  * button leads to a half-initialised state).
1469
1475
  */
1470
1476
  showRegenerate?: boolean;
1477
+ /** Optional request description/memo, edited alongside the amount in the
1478
+ * Edit modal. When omitted the description field is hidden. */
1479
+ description?: string;
1480
+ onDescriptionChange?: (value: string) => void;
1471
1481
  }
1472
- declare function BtcUnifiedReceive({ btcSelectedAccount, accountReceiveResult, invoiceStatus, isInvoicePending, isInvoicePaid, isInvoiceFailedOrExpired, amount, handleAmountChange, loading, copied, copyToClipboard, setAddress, setAmount, setInvoiceStatus, setAccountReceiveResult, handleDone, showRegenerate, }: BtcUnifiedReceiveProps): react_jsx_runtime.JSX.Element;
1482
+ declare function BtcUnifiedReceive({ accountReceiveResult, invoiceStatus, isInvoicePending, isInvoicePaid, isInvoiceFailedOrExpired, amount, handleAmountChange, loading, copied, copyToClipboard, setAddress, setAmount, setInvoiceStatus, setAccountReceiveResult, showRegenerate, description, onDescriptionChange, }: BtcUnifiedReceiveProps): react_jsx_runtime.JSX.Element;
1473
1483
 
1474
1484
  interface DepositGeneratedAsset {
1475
1485
  ticker?: string;
@@ -334,8 +334,14 @@ interface QrCodeProps {
334
334
  value: string;
335
335
  size?: number;
336
336
  className?: string;
337
+ /**
338
+ * 'onLight' (default) renders dark modules on a white card — use inside a
339
+ * white container. 'onDark' renders white modules on a transparent
340
+ * background so the QR sits directly on the app background.
341
+ */
342
+ tone?: 'onLight' | 'onDark';
337
343
  }
338
- declare function QrCode({ value, size, className }: QrCodeProps): react_jsx_runtime.JSX.Element;
344
+ declare function QrCode({ value, size, className, tone }: QrCodeProps): react_jsx_runtime.JSX.Element;
339
345
 
340
346
  interface BottomNavItem<TValue extends string = string> {
341
347
  id: TValue;
@@ -1468,8 +1474,12 @@ interface BtcUnifiedReceiveProps {
1468
1474
  * button leads to a half-initialised state).
1469
1475
  */
1470
1476
  showRegenerate?: boolean;
1477
+ /** Optional request description/memo, edited alongside the amount in the
1478
+ * Edit modal. When omitted the description field is hidden. */
1479
+ description?: string;
1480
+ onDescriptionChange?: (value: string) => void;
1471
1481
  }
1472
- declare function BtcUnifiedReceive({ btcSelectedAccount, accountReceiveResult, invoiceStatus, isInvoicePending, isInvoicePaid, isInvoiceFailedOrExpired, amount, handleAmountChange, loading, copied, copyToClipboard, setAddress, setAmount, setInvoiceStatus, setAccountReceiveResult, handleDone, showRegenerate, }: BtcUnifiedReceiveProps): react_jsx_runtime.JSX.Element;
1482
+ declare function BtcUnifiedReceive({ accountReceiveResult, invoiceStatus, isInvoicePending, isInvoicePaid, isInvoiceFailedOrExpired, amount, handleAmountChange, loading, copied, copyToClipboard, setAddress, setAmount, setInvoiceStatus, setAccountReceiveResult, showRegenerate, description, onDescriptionChange, }: BtcUnifiedReceiveProps): react_jsx_runtime.JSX.Element;
1473
1483
 
1474
1484
  interface DepositGeneratedAsset {
1475
1485
  ticker?: string;
package/dist/web/index.js CHANGED
@@ -2067,7 +2067,7 @@ var LOGO_PATHS = /* @__PURE__ */ jsxs13(Fragment, { children: [
2067
2067
  ),
2068
2068
  /* @__PURE__ */ jsx26("path", { d: "M274.479 0.104797H411.786L274.533 137.411H137.226L274.479 0.104797Z", fill: "#17B581" })
2069
2069
  ] });
2070
- function QrCode({ value, size = 160, className }) {
2070
+ function QrCode({ value, size = 160, className, tone = "onLight" }) {
2071
2071
  const svgContent = useMemo(() => {
2072
2072
  if (!value) return null;
2073
2073
  const matrix = encodeQR(value, "raw", { ecc: "medium", border: 0 });
@@ -2075,8 +2075,8 @@ function QrCode({ value, size = 160, className }) {
2075
2075
  const moduleSize = 10;
2076
2076
  const quietZone = moduleSize * 2;
2077
2077
  const svgSize = n * moduleSize + quietZone * 2;
2078
- const fg = "#040404";
2079
- const bg = "#ffffff";
2078
+ const fg = tone === "onDark" ? "#ffffff" : "#040404";
2079
+ const bg = tone === "onDark" ? "transparent" : "#ffffff";
2080
2080
  const logoModules = Math.ceil(n * 0.2);
2081
2081
  const logoZoneSize = logoModules % 2 === 0 ? logoModules + 1 : logoModules;
2082
2082
  const elements = [];
@@ -2130,7 +2130,7 @@ function QrCode({ value, size = 160, className }) {
2130
2130
  children: elements
2131
2131
  }
2132
2132
  );
2133
- }, [value]);
2133
+ }, [value, tone]);
2134
2134
  return /* @__PURE__ */ jsx26("div", { className, style: { width: size, height: size }, children: svgContent });
2135
2135
  }
2136
2136
 
@@ -7001,7 +7001,7 @@ var NETWORK_CONFIG = {
7001
7001
  border: "border-network-bitcoin/40",
7002
7002
  qrBorder: "border-network-bitcoin/30",
7003
7003
  qrGlow: qrGlowStyle(colors.network.bitcoin),
7004
- icon: /* @__PURE__ */ jsx73("span", { className: "material-symbols-outlined text-icon-xs leading-none", children: "link" })
7004
+ icon: /* @__PURE__ */ jsx73("span", { className: "material-symbols-outlined text-icon-xs leading-none", children: "currency_bitcoin" })
7005
7005
  },
7006
7006
  lightning: {
7007
7007
  label: "Lightning",
@@ -7413,13 +7413,13 @@ function DepositNetworkDefaultModal({
7413
7413
  }
7414
7414
 
7415
7415
  // src/web/components/btc-unified-receive.tsx
7416
+ import { useState as useState15 } from "react";
7416
7417
  import { jsx as jsx76, jsxs as jsxs62 } from "react/jsx-runtime";
7417
7418
  function formatSatsForRow(value) {
7418
7419
  if (!value || value <= 0 || !Number.isFinite(value)) return null;
7419
7420
  return `${value.toLocaleString("en-US")} sats`;
7420
7421
  }
7421
7422
  function BtcUnifiedReceive({
7422
- btcSelectedAccount,
7423
7423
  accountReceiveResult,
7424
7424
  invoiceStatus,
7425
7425
  isInvoicePending,
@@ -7434,66 +7434,56 @@ function BtcUnifiedReceive({
7434
7434
  setAmount,
7435
7435
  setInvoiceStatus,
7436
7436
  setAccountReceiveResult,
7437
- handleDone,
7438
- showRegenerate = true
7437
+ showRegenerate = true,
7438
+ description,
7439
+ onDescriptionChange
7439
7440
  }) {
7440
- const accountNetwork = btcSelectedAccount === "SPARK" ? "spark" : btcSelectedAccount === "ARKADE" ? "arkade" : "onchain";
7441
- const qrNetwork = NETWORK_CONFIG[accountNetwork];
7441
+ const [showEdit, setShowEdit] = useState15(false);
7442
+ const isQrCopied = copied === accountReceiveResult.qrValue;
7443
+ const handleNewAddress = () => {
7444
+ setAddress("");
7445
+ setAmount("");
7446
+ setInvoiceStatus(null);
7447
+ setAccountReceiveResult(null);
7448
+ };
7442
7449
  return /* @__PURE__ */ jsxs62("div", { className: "space-y-3 animate-in fade-in zoom-in-95 duration-300", children: [
7443
- /* @__PURE__ */ jsxs62("div", { className: "flex flex-col gap-1.5 rounded-xl border border-white/8 bg-white/3 p-2.5", children: [
7444
- /* @__PURE__ */ jsx76("div", { className: "flex items-center justify-between px-1", children: /* @__PURE__ */ jsx76("label", { className: "text-xxs font-bold uppercase tracking-widest text-white/40", children: "Amount (optional)" }) }),
7445
- /* @__PURE__ */ jsx76(
7446
- "input",
7447
- {
7448
- type: "text",
7449
- value: amount,
7450
- onChange: handleAmountChange,
7451
- placeholder: "Any amount",
7452
- className: "w-full rounded-lg border bg-white/5 px-3 py-1.5 font-mono text-xs font-bold text-white transition-all placeholder:text-white/25 focus:border-primary/40 focus:outline-none",
7453
- inputMode: "decimal"
7454
- }
7455
- ),
7456
- amount && loading && /* @__PURE__ */ jsxs62("p", { className: "flex items-center gap-1 text-xxs text-warning/70", children: [
7457
- /* @__PURE__ */ jsx76("span", { className: "material-symbols-outlined animate-spin text-icon-xxs", children: "progress_activity" }),
7458
- "Updating invoice..."
7459
- ] })
7460
- ] }),
7461
7450
  /* @__PURE__ */ jsxs62("div", { className: "flex flex-col items-center gap-3", children: [
7462
- /* @__PURE__ */ jsxs62(
7463
- "div",
7464
- {
7465
- className: cn(
7466
- "relative flex flex-col items-center rounded-2xl border-2 bg-white p-2 transition-all",
7467
- qrNetwork.qrBorder
7468
- ),
7469
- style: qrNetwork.qrGlow,
7470
- children: [
7471
- /* @__PURE__ */ jsx76(QrCode, { value: accountReceiveResult.qrValue, size: 200 }),
7472
- isInvoicePaid && /* @__PURE__ */ jsx76(PaidOverlay, {})
7473
- ]
7474
- }
7475
- ),
7476
- (() => {
7477
- const isQrCopied = copied === accountReceiveResult.qrValue;
7478
- return /* @__PURE__ */ jsxs62(
7479
- "button",
7451
+ /* @__PURE__ */ jsxs62("div", { className: "relative flex flex-col items-center p-2", children: [
7452
+ /* @__PURE__ */ jsx76(QrCode, { value: accountReceiveResult.qrValue, size: 200, tone: "onDark" }),
7453
+ isInvoicePaid && /* @__PURE__ */ jsx76(PaidOverlay, {})
7454
+ ] }),
7455
+ /* @__PURE__ */ jsxs62("div", { className: "flex items-center justify-center gap-2.5", children: [
7456
+ /* @__PURE__ */ jsx76(
7457
+ Button,
7480
7458
  {
7481
- type: "button",
7482
- className: cn(
7483
- "flex items-center gap-1 rounded-full border px-2.5 py-1 text-xxs font-bold uppercase tracking-widest transition-all",
7484
- isQrCopied ? "border-primary/30 bg-primary/10 text-primary" : "border-border bg-white/5 text-muted-foreground hover:border-white/20 hover:bg-accent hover:text-white"
7485
- ),
7486
- onClick: (event) => {
7487
- event.stopPropagation();
7488
- void copyToClipboard(accountReceiveResult.qrValue);
7489
- },
7490
- children: [
7491
- /* @__PURE__ */ jsx76(Icon, { name: isQrCopied ? "check" : "content_copy", size: "xs" }),
7492
- isQrCopied ? "Copied" : `Copy ${accountReceiveResult.qrLabel}`
7493
- ]
7459
+ variant: "surface",
7460
+ size: "icon-xl",
7461
+ "aria-label": `Copy ${accountReceiveResult.qrLabel}`,
7462
+ onClick: () => void copyToClipboard(accountReceiveResult.qrValue),
7463
+ children: /* @__PURE__ */ jsx76(Icon, { name: isQrCopied ? "check" : "content_copy", size: "lg" })
7494
7464
  }
7495
- );
7496
- })()
7465
+ ),
7466
+ showRegenerate && /* @__PURE__ */ jsx76(
7467
+ Button,
7468
+ {
7469
+ variant: "surface",
7470
+ size: "icon-xl",
7471
+ "aria-label": "New address",
7472
+ onClick: handleNewAddress,
7473
+ children: /* @__PURE__ */ jsx76(Icon, { name: "refresh", size: "lg" })
7474
+ }
7475
+ ),
7476
+ /* @__PURE__ */ jsx76(
7477
+ Button,
7478
+ {
7479
+ variant: "surface",
7480
+ size: "icon-xl",
7481
+ "aria-label": "Edit amount and description",
7482
+ onClick: () => setShowEdit(true),
7483
+ children: /* @__PURE__ */ jsx76(Icon, { name: "edit", size: "lg" })
7484
+ }
7485
+ )
7486
+ ] })
7497
7487
  ] }),
7498
7488
  invoiceStatus && /* @__PURE__ */ jsx76(
7499
7489
  InvoiceStatusBanner,
@@ -7512,9 +7502,8 @@ function BtcUnifiedReceive({
7512
7502
  "div",
7513
7503
  {
7514
7504
  className: cn(
7515
- "group flex cursor-pointer items-center gap-2 rounded-xl border bg-white/3 px-2.5 py-1.5",
7516
- "transition-all hover:bg-white/6 active:scale-[0.98]",
7517
- network.border
7505
+ "group flex cursor-pointer items-center gap-2 rounded-xl bg-white/3 px-2.5 py-1.5",
7506
+ "transition-all hover:bg-white/6 active:scale-[0.98]"
7518
7507
  ),
7519
7508
  style: { borderLeftWidth: 3, borderLeftColor: network.color },
7520
7509
  onClick: () => void copyToClipboard(address.value),
@@ -7538,36 +7527,48 @@ function BtcUnifiedReceive({
7538
7527
  })
7539
7528
  ] }),
7540
7529
  /* @__PURE__ */ jsx76(
7541
- NetworkInfoDisclosure,
7530
+ BottomSheet,
7542
7531
  {
7543
- networks: Array.from(
7544
- new Set(accountReceiveResult.addresses.map((address) => address.network))
7545
- )
7532
+ open: showEdit,
7533
+ title: "Edit request",
7534
+ icon: /* @__PURE__ */ jsx76(Icon, { name: "edit", size: "md" }),
7535
+ onClose: () => setShowEdit(false),
7536
+ children: /* @__PURE__ */ jsxs62("div", { className: "space-y-4", children: [
7537
+ /* @__PURE__ */ jsxs62("div", { className: "space-y-1.5", children: [
7538
+ /* @__PURE__ */ jsx76("label", { className: "text-xxs font-bold uppercase tracking-widest text-white/40", children: "Amount (optional)" }),
7539
+ /* @__PURE__ */ jsx76(
7540
+ "input",
7541
+ {
7542
+ type: "text",
7543
+ value: amount,
7544
+ onChange: handleAmountChange,
7545
+ placeholder: "Any amount",
7546
+ className: "w-full rounded-xl bg-white/5 px-3 py-2.5 font-mono text-sm font-bold text-white shadow-inner transition-all placeholder:text-white/25 focus:outline focus:outline-2 focus:outline-primary/40",
7547
+ inputMode: "decimal"
7548
+ }
7549
+ ),
7550
+ amount && loading && /* @__PURE__ */ jsxs62("p", { className: "flex items-center gap-1 text-xxs text-warning/70", children: [
7551
+ /* @__PURE__ */ jsx76("span", { className: "material-symbols-outlined animate-spin text-icon-xxs", children: "progress_activity" }),
7552
+ "Updating invoice..."
7553
+ ] })
7554
+ ] }),
7555
+ onDescriptionChange && /* @__PURE__ */ jsxs62("div", { className: "space-y-1.5", children: [
7556
+ /* @__PURE__ */ jsx76("label", { className: "text-xxs font-bold uppercase tracking-widest text-white/40", children: "Description (optional)" }),
7557
+ /* @__PURE__ */ jsx76(
7558
+ "input",
7559
+ {
7560
+ type: "text",
7561
+ value: description ?? "",
7562
+ onChange: (event) => onDescriptionChange(event.target.value),
7563
+ placeholder: "What's this for?",
7564
+ className: "w-full rounded-xl bg-white/5 px-3 py-2.5 text-sm text-white shadow-inner transition-all placeholder:text-white/25 focus:outline focus:outline-2 focus:outline-primary/40"
7565
+ }
7566
+ )
7567
+ ] }),
7568
+ /* @__PURE__ */ jsx76(Button, { variant: "cta", className: "w-full", onClick: () => setShowEdit(false), children: "Done" })
7569
+ ] })
7546
7570
  }
7547
- ),
7548
- /* @__PURE__ */ jsxs62("div", { className: "flex gap-2.5 pt-1", children: [
7549
- showRegenerate && /* @__PURE__ */ jsxs62(
7550
- "button",
7551
- {
7552
- type: "button",
7553
- onClick: () => {
7554
- setAddress("");
7555
- setAmount("");
7556
- setInvoiceStatus(null);
7557
- setAccountReceiveResult(null);
7558
- },
7559
- className: "flex flex-1 items-center justify-center gap-1.5 rounded-xl border py-3 text-xs font-bold text-muted-foreground transition-all hover:border-border hover:bg-accent hover:text-white active:scale-[0.98]",
7560
- children: [
7561
- /* @__PURE__ */ jsx76("span", { className: "material-symbols-outlined text-icon-sm", children: "refresh" }),
7562
- "New Address"
7563
- ]
7564
- }
7565
- ),
7566
- /* @__PURE__ */ jsxs62(Button, { variant: "cta", onClick: handleDone, className: showRegenerate ? void 0 : "flex-1", children: [
7567
- /* @__PURE__ */ jsx76("span", { className: "material-symbols-outlined text-icon-sm", children: "check" }),
7568
- "Done"
7569
- ] })
7570
- ] })
7571
+ )
7571
7572
  ] });
7572
7573
  }
7573
7574
 
@@ -7989,7 +7990,7 @@ function DepositPreGeneration({
7989
7990
  }
7990
7991
 
7991
7992
  // src/web/components/deposit-asset-selection.tsx
7992
- import { useEffect as useEffect10, useState as useState15 } from "react";
7993
+ import { useEffect as useEffect10, useState as useState16 } from "react";
7993
7994
  import { jsx as jsx79, jsxs as jsxs65 } from "react/jsx-runtime";
7994
7995
  var ADD_ASSET_SUBTITLE = {
7995
7996
  RGB: "RGB asset on Bitcoin",
@@ -8032,8 +8033,8 @@ function DepositAssetSelection({
8032
8033
  const ownedAssetsCount = ownedAssets.length;
8033
8034
  const noResults = filteredAssets.length === 0 && !!searchQuery;
8034
8035
  const isSearching = !!searchQuery;
8035
- const [assetsExpanded, setAssetsExpanded] = useState15(false);
8036
- const [showAddAssetModal, setShowAddAssetModal] = useState15(false);
8036
+ const [assetsExpanded, setAssetsExpanded] = useState16(false);
8037
+ const [showAddAssetModal, setShowAddAssetModal] = useState16(false);
8037
8038
  useEffect10(() => {
8038
8039
  if (isSearching) setAssetsExpanded(true);
8039
8040
  }, [isSearching]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kaleido-ui",
3
- "version": "0.1.72",
3
+ "version": "0.1.73",
4
4
  "description": "KaleidoSwap shared UI library — design tokens, web components (Tailwind + Radix), and React Native components extending WDK UI Kit",
5
5
  "license": "MIT",
6
6
  "type": "module",