kaleido-ui 0.1.84 → 0.1.86

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.
@@ -157,6 +157,25 @@ var colors = {
157
157
  thumbHover: "rgba(43, 238, 121, 0.55)",
158
158
  track: "transparent"
159
159
  },
160
+ /** External bridge chains — third-party brand colors for network tags.
161
+ * Keyed by the lowercase chain id the bridge API uses. */
162
+ bridgeChain: {
163
+ ethereum: "#627EEA",
164
+ base: "#0052FF",
165
+ arbitrum: "#28A0F0",
166
+ optimism: "#FF0420",
167
+ polygon: "#8247E5",
168
+ solana: "#9945FF",
169
+ tron: "#FF4B4B",
170
+ bitcoin: "#F7931A",
171
+ lightning: "#F6C343",
172
+ spark: "#FF6D00",
173
+ avalanche: "#E84142",
174
+ bsc: "#F0B90B",
175
+ litecoin: "#4A7BD4",
176
+ ton: "#0098EA",
177
+ monad: "#836EF9"
178
+ },
160
179
  /** Network / Layer */
161
180
  network: {
162
181
  bitcoin: "#F7931A",
@@ -459,6 +459,25 @@ declare const colors: {
459
459
  readonly thumbHover: "rgba(43, 238, 121, 0.55)";
460
460
  readonly track: "transparent";
461
461
  };
462
+ /** External bridge chains — third-party brand colors for network tags.
463
+ * Keyed by the lowercase chain id the bridge API uses. */
464
+ readonly bridgeChain: {
465
+ readonly ethereum: "#627EEA";
466
+ readonly base: "#0052FF";
467
+ readonly arbitrum: "#28A0F0";
468
+ readonly optimism: "#FF0420";
469
+ readonly polygon: "#8247E5";
470
+ readonly solana: "#9945FF";
471
+ readonly tron: "#FF4B4B";
472
+ readonly bitcoin: "#F7931A";
473
+ readonly lightning: "#F6C343";
474
+ readonly spark: "#FF6D00";
475
+ readonly avalanche: "#E84142";
476
+ readonly bsc: "#F0B90B";
477
+ readonly litecoin: "#4A7BD4";
478
+ readonly ton: "#0098EA";
479
+ readonly monad: "#836EF9";
480
+ };
462
481
  /** Network / Layer */
463
482
  readonly network: {
464
483
  readonly bitcoin: "#F7931A";
@@ -459,6 +459,25 @@ declare const colors: {
459
459
  readonly thumbHover: "rgba(43, 238, 121, 0.55)";
460
460
  readonly track: "transparent";
461
461
  };
462
+ /** External bridge chains — third-party brand colors for network tags.
463
+ * Keyed by the lowercase chain id the bridge API uses. */
464
+ readonly bridgeChain: {
465
+ readonly ethereum: "#627EEA";
466
+ readonly base: "#0052FF";
467
+ readonly arbitrum: "#28A0F0";
468
+ readonly optimism: "#FF0420";
469
+ readonly polygon: "#8247E5";
470
+ readonly solana: "#9945FF";
471
+ readonly tron: "#FF4B4B";
472
+ readonly bitcoin: "#F7931A";
473
+ readonly lightning: "#F6C343";
474
+ readonly spark: "#FF6D00";
475
+ readonly avalanche: "#E84142";
476
+ readonly bsc: "#F0B90B";
477
+ readonly litecoin: "#4A7BD4";
478
+ readonly ton: "#0098EA";
479
+ readonly monad: "#836EF9";
480
+ };
462
481
  /** Network / Layer */
463
482
  readonly network: {
464
483
  readonly bitcoin: "#F7931A";
@@ -79,6 +79,25 @@ var colors = {
79
79
  thumbHover: "rgba(43, 238, 121, 0.55)",
80
80
  track: "transparent"
81
81
  },
82
+ /** External bridge chains — third-party brand colors for network tags.
83
+ * Keyed by the lowercase chain id the bridge API uses. */
84
+ bridgeChain: {
85
+ ethereum: "#627EEA",
86
+ base: "#0052FF",
87
+ arbitrum: "#28A0F0",
88
+ optimism: "#FF0420",
89
+ polygon: "#8247E5",
90
+ solana: "#9945FF",
91
+ tron: "#FF4B4B",
92
+ bitcoin: "#F7931A",
93
+ lightning: "#F6C343",
94
+ spark: "#FF6D00",
95
+ avalanche: "#E84142",
96
+ bsc: "#F0B90B",
97
+ litecoin: "#4A7BD4",
98
+ ton: "#0098EA",
99
+ monad: "#836EF9"
100
+ },
82
101
  /** Network / Layer */
83
102
  network: {
84
103
  bitcoin: "#F7931A",
@@ -158,6 +158,25 @@ var colors = {
158
158
  thumbHover: "rgba(43, 238, 121, 0.55)",
159
159
  track: "transparent"
160
160
  },
161
+ /** External bridge chains — third-party brand colors for network tags.
162
+ * Keyed by the lowercase chain id the bridge API uses. */
163
+ bridgeChain: {
164
+ ethereum: "#627EEA",
165
+ base: "#0052FF",
166
+ arbitrum: "#28A0F0",
167
+ optimism: "#FF0420",
168
+ polygon: "#8247E5",
169
+ solana: "#9945FF",
170
+ tron: "#FF4B4B",
171
+ bitcoin: "#F7931A",
172
+ lightning: "#F6C343",
173
+ spark: "#FF6D00",
174
+ avalanche: "#E84142",
175
+ bsc: "#F0B90B",
176
+ litecoin: "#4A7BD4",
177
+ ton: "#0098EA",
178
+ monad: "#836EF9"
179
+ },
161
180
  /** Network / Layer */
162
181
  network: {
163
182
  bitcoin: "#F7931A",
@@ -70,6 +70,25 @@ declare const colors: {
70
70
  readonly thumbHover: "rgba(43, 238, 121, 0.55)";
71
71
  readonly track: "transparent";
72
72
  };
73
+ /** External bridge chains — third-party brand colors for network tags.
74
+ * Keyed by the lowercase chain id the bridge API uses. */
75
+ readonly bridgeChain: {
76
+ readonly ethereum: "#627EEA";
77
+ readonly base: "#0052FF";
78
+ readonly arbitrum: "#28A0F0";
79
+ readonly optimism: "#FF0420";
80
+ readonly polygon: "#8247E5";
81
+ readonly solana: "#9945FF";
82
+ readonly tron: "#FF4B4B";
83
+ readonly bitcoin: "#F7931A";
84
+ readonly lightning: "#F6C343";
85
+ readonly spark: "#FF6D00";
86
+ readonly avalanche: "#E84142";
87
+ readonly bsc: "#F0B90B";
88
+ readonly litecoin: "#4A7BD4";
89
+ readonly ton: "#0098EA";
90
+ readonly monad: "#836EF9";
91
+ };
73
92
  /** Network / Layer */
74
93
  readonly network: {
75
94
  readonly bitcoin: "#F7931A";
@@ -70,6 +70,25 @@ declare const colors: {
70
70
  readonly thumbHover: "rgba(43, 238, 121, 0.55)";
71
71
  readonly track: "transparent";
72
72
  };
73
+ /** External bridge chains — third-party brand colors for network tags.
74
+ * Keyed by the lowercase chain id the bridge API uses. */
75
+ readonly bridgeChain: {
76
+ readonly ethereum: "#627EEA";
77
+ readonly base: "#0052FF";
78
+ readonly arbitrum: "#28A0F0";
79
+ readonly optimism: "#FF0420";
80
+ readonly polygon: "#8247E5";
81
+ readonly solana: "#9945FF";
82
+ readonly tron: "#FF4B4B";
83
+ readonly bitcoin: "#F7931A";
84
+ readonly lightning: "#F6C343";
85
+ readonly spark: "#FF6D00";
86
+ readonly avalanche: "#E84142";
87
+ readonly bsc: "#F0B90B";
88
+ readonly litecoin: "#4A7BD4";
89
+ readonly ton: "#0098EA";
90
+ readonly monad: "#836EF9";
91
+ };
73
92
  /** Network / Layer */
74
93
  readonly network: {
75
94
  readonly bitcoin: "#F7931A";
@@ -110,6 +110,25 @@ var colors = {
110
110
  thumbHover: "rgba(43, 238, 121, 0.55)",
111
111
  track: "transparent"
112
112
  },
113
+ /** External bridge chains — third-party brand colors for network tags.
114
+ * Keyed by the lowercase chain id the bridge API uses. */
115
+ bridgeChain: {
116
+ ethereum: "#627EEA",
117
+ base: "#0052FF",
118
+ arbitrum: "#28A0F0",
119
+ optimism: "#FF0420",
120
+ polygon: "#8247E5",
121
+ solana: "#9945FF",
122
+ tron: "#FF4B4B",
123
+ bitcoin: "#F7931A",
124
+ lightning: "#F6C343",
125
+ spark: "#FF6D00",
126
+ avalanche: "#E84142",
127
+ bsc: "#F0B90B",
128
+ litecoin: "#4A7BD4",
129
+ ton: "#0098EA",
130
+ monad: "#836EF9"
131
+ },
113
132
  /** Network / Layer */
114
133
  network: {
115
134
  bitcoin: "#F7931A",
@@ -1413,22 +1413,12 @@ var STATUS_UI = {
1413
1413
  pending: { icon: "schedule", className: "bg-warning text-background" }
1414
1414
  };
1415
1415
  var FALLBACK_UI = { icon: "remove", className: "bg-muted text-muted-foreground" };
1416
+ var iconBadgeOverlayClass = "absolute -bottom-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full ring-2 ring-card";
1416
1417
  function StatusIconBadge({ icon, status, className }) {
1417
1418
  const ui = status ? STATUS_UI[status] ?? FALLBACK_UI : null;
1418
1419
  return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: cn("relative shrink-0", className), children: [
1419
1420
  icon,
1420
- ui && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1421
- "span",
1422
- {
1423
- className: cn(
1424
- // ring-card masks the badge edge against the card surface,
1425
- // exactly like the network badge on asset icons.
1426
- "absolute -bottom-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full ring-2 ring-card",
1427
- ui.className
1428
- ),
1429
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, { name: ui.icon, className: "size-3" })
1430
- }
1431
- )
1421
+ ui && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: cn(iconBadgeOverlayClass, ui.className), children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, { name: ui.icon, className: "size-3" }) })
1432
1422
  ] });
1433
1423
  }
1434
1424
 
@@ -3756,6 +3746,9 @@ function NetworkRow({
3756
3746
  var import_react11 = require("react");
3757
3747
  var import_react_dom = require("react-dom");
3758
3748
  var import_jsx_runtime38 = require("react/jsx-runtime");
3749
+ function NetworkMiniBadge({ iconUrl, label }) {
3750
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: cn(iconBadgeOverlayClass, "overflow-hidden"), children: iconUrl ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("img", { src: iconUrl, alt: label ?? "", className: "h-full w-full object-cover" }) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "flex h-full w-full items-center justify-center bg-muted text-xxs font-bold uppercase leading-none text-muted-foreground", children: label?.charAt(0) }) });
3751
+ }
3759
3752
  function AssetSelector({
3760
3753
  label,
3761
3754
  selectedTicker,
@@ -3789,7 +3782,7 @@ function AssetSelector({
3789
3782
  if (!matchesCategory || !matchesNetwork || !matchesVenue) return false;
3790
3783
  if (!search) return true;
3791
3784
  const searchValue = search.toLowerCase();
3792
- const matchesSearch = option.ticker.toLowerCase().includes(searchValue) || (option.name?.toLowerCase().includes(searchValue) ?? false) || (option.assetId?.toLowerCase().includes(searchValue) ?? false) || (option.network?.toLowerCase().includes(searchValue) ?? false) || (option.category?.toLowerCase().includes(searchValue) ?? false);
3785
+ const matchesSearch = option.ticker.toLowerCase().includes(searchValue) || (option.name?.toLowerCase().includes(searchValue) ?? false) || (option.assetId?.toLowerCase().includes(searchValue) ?? false) || (option.network?.toLowerCase().includes(searchValue) ?? false) || (option.networkTag?.label.toLowerCase().includes(searchValue) ?? false) || (option.category?.toLowerCase().includes(searchValue) ?? false);
3793
3786
  return matchesSearch;
3794
3787
  }).sort((a, b) => {
3795
3788
  if (a.id === selectedOptionId) return -1;
@@ -3805,19 +3798,29 @@ function AssetSelector({
3805
3798
  const categoryLabelById = new Map(categories.map((category) => [category.id, category.label]));
3806
3799
  const renderAssetOption = (option, optionSelected, optionDisabled) => {
3807
3800
  const optionCategoryLabel = option.categoryLabel || (option.category ? categoryLabelById.get(option.category) : void 0);
3801
+ const hasNetworkBadge = Boolean(option.networkIconUrl || option.networkTag);
3808
3802
  return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("span", { className: "group flex w-full items-center gap-3 text-sm", children: [
3809
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3810
- AssetIcon,
3811
- {
3812
- ticker: option.ticker,
3813
- logoUri: option.icon,
3814
- size: 38,
3815
- className: cn(
3816
- "shrink-0 transition-transform duration-200",
3817
- !optionDisabled && "group-hover:scale-[1.04]"
3818
- )
3819
- }
3820
- ),
3803
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("span", { className: "relative shrink-0", children: [
3804
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3805
+ AssetIcon,
3806
+ {
3807
+ ticker: option.ticker,
3808
+ logoUri: option.icon,
3809
+ size: 38,
3810
+ className: cn(
3811
+ "shrink-0 transition-transform duration-200",
3812
+ !optionDisabled && "group-hover:scale-[1.04]"
3813
+ )
3814
+ }
3815
+ ),
3816
+ hasNetworkBadge && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3817
+ NetworkMiniBadge,
3818
+ {
3819
+ iconUrl: option.networkIconUrl,
3820
+ label: option.networkTag?.label
3821
+ }
3822
+ )
3823
+ ] }),
3821
3824
  /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("span", { className: "flex min-w-0 flex-1 items-center justify-between gap-3 text-left", children: [
3822
3825
  /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "min-w-0 flex flex-col leading-tight", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3823
3826
  "span",
@@ -3828,11 +3831,27 @@ function AssetSelector({
3828
3831
  }
3829
3832
  ) }),
3830
3833
  /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("span", { className: "flex shrink-0 flex-col items-end gap-0.5", children: [
3831
- optionSelected ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "rounded-full border border-primary/25 bg-primary/[0.14] px-2 py-0.5 text-xxs font-bold uppercase tracking-wide text-primary", children: "Current" }) : optionCategoryLabel && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "rounded-full bg-surface-card px-2 py-0.5 text-tiny font-bold uppercase tracking-wide text-text-dimmed shadow-inner", children: optionCategoryLabel }),
3834
+ optionSelected ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "rounded-full border border-primary/25 bg-primary/[0.14] px-2 py-0.5 text-xxs font-bold uppercase tracking-wide text-primary", children: "Current" }) : option.networkTag ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3835
+ "span",
3836
+ {
3837
+ className: cn(
3838
+ "rounded-full px-2 py-0.5 text-xxs font-bold uppercase tracking-wide",
3839
+ !option.networkTag.color && "bg-white/[0.08] text-muted-foreground"
3840
+ ),
3841
+ style: option.networkTag.color ? {
3842
+ backgroundColor: `color-mix(in srgb, ${option.networkTag.color} 15%, transparent)`,
3843
+ color: option.networkTag.color
3844
+ } : void 0,
3845
+ children: option.networkTag.label
3846
+ }
3847
+ ) : optionCategoryLabel && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "rounded-full bg-surface-card px-2 py-0.5 text-tiny font-bold uppercase tracking-wide text-text-dimmed shadow-inner", children: optionCategoryLabel }),
3832
3848
  /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3833
3849
  "span",
3834
3850
  {
3835
- className: "max-w-24 truncate text-tiny font-medium uppercase tracking-wide text-white/35",
3851
+ className: cn(
3852
+ "max-w-24 truncate",
3853
+ option.networkTag ? "text-xs text-muted-foreground" : "text-tiny font-medium uppercase tracking-wide text-white/35"
3854
+ ),
3836
3855
  title: optionDisabled ? "In use" : option.ticker,
3837
3856
  children: optionDisabled ? "In use" : option.ticker
3838
3857
  }
@@ -3860,7 +3879,13 @@ function AssetSelector({
3860
3879
  children: selected ? /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
3861
3880
  /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("span", { className: "relative shrink-0", children: [
3862
3881
  /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(AssetIcon, { ticker: selected.ticker, logoUri: selected.icon, size: 38 }),
3863
- selected.network && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3882
+ selected.networkIconUrl || selected.networkTag ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3883
+ NetworkMiniBadge,
3884
+ {
3885
+ iconUrl: selected.networkIconUrl,
3886
+ label: selected.networkTag?.label
3887
+ }
3888
+ ) : selected.network && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3864
3889
  NetworkBadge,
3865
3890
  {
3866
3891
  network: selected.network,
@@ -4174,7 +4199,7 @@ function SwapInputCard({
4174
4199
  unit: receiveDisplayUnit
4175
4200
  }) : null;
4176
4201
  return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
4177
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "relative mb-3 flex flex-col rounded-3xl bg-white/[0.03] shadow-2xl shadow-black/40 backdrop-blur-2xl transition-all duration-300", children: [
4202
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "relative mb-3 flex flex-col rounded-2xl bg-white/[0.03] shadow-2xl shadow-black/40 backdrop-blur-2xl transition-all duration-300", children: [
4178
4203
  /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "p-3.5 pb-4", children: [
4179
4204
  /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "mb-2 flex items-center justify-between gap-2", children: [
4180
4205
  /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "text-xs font-bold uppercase tracking-widest text-white/60", children: "You Pay" }),
@@ -4255,7 +4280,7 @@ function SwapInputCard({
4255
4280
  children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Icon, { name: "swap_vert", size: "md" })
4256
4281
  }
4257
4282
  ) }) }),
4258
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "rounded-b-3xl bg-gradient-to-br from-white/[0.01] to-primary/[0.04] p-3.5 pt-4 transition-all duration-300", children: [
4283
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "rounded-b-2xl bg-gradient-to-br from-white/[0.01] to-primary/[0.04] p-3.5 pt-4 transition-all duration-300", children: [
4259
4284
  /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "mb-2 text-xs font-bold uppercase tracking-widest text-primary/70", children: "You Receive" }),
4260
4285
  /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-center gap-2", children: [
4261
4286
  /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
@@ -7315,6 +7340,25 @@ var colors = {
7315
7340
  thumbHover: "rgba(43, 238, 121, 0.55)",
7316
7341
  track: "transparent"
7317
7342
  },
7343
+ /** External bridge chains — third-party brand colors for network tags.
7344
+ * Keyed by the lowercase chain id the bridge API uses. */
7345
+ bridgeChain: {
7346
+ ethereum: "#627EEA",
7347
+ base: "#0052FF",
7348
+ arbitrum: "#28A0F0",
7349
+ optimism: "#FF0420",
7350
+ polygon: "#8247E5",
7351
+ solana: "#9945FF",
7352
+ tron: "#FF4B4B",
7353
+ bitcoin: "#F7931A",
7354
+ lightning: "#F6C343",
7355
+ spark: "#FF6D00",
7356
+ avalanche: "#E84142",
7357
+ bsc: "#F0B90B",
7358
+ litecoin: "#4A7BD4",
7359
+ ton: "#0098EA",
7360
+ monad: "#836EF9"
7361
+ },
7318
7362
  /** Network / Layer */
7319
7363
  network: {
7320
7364
  bitcoin: "#F7931A",
@@ -707,6 +707,13 @@ interface AssetSelectorOption {
707
707
  assetId?: string;
708
708
  category?: string | null;
709
709
  categoryLabel?: string;
710
+ /** URL of the network mark rendered as a mini-badge over the asset icon. */
711
+ networkIconUrl?: string;
712
+ /** Right-aligned network tag: label pill tinted with `color`, ticker beneath. */
713
+ networkTag?: {
714
+ label: string;
715
+ color?: string;
716
+ };
710
717
  }
711
718
  interface AssetSelectorCategory {
712
719
  id: string;
@@ -707,6 +707,13 @@ interface AssetSelectorOption {
707
707
  assetId?: string;
708
708
  category?: string | null;
709
709
  categoryLabel?: string;
710
+ /** URL of the network mark rendered as a mini-badge over the asset icon. */
711
+ networkIconUrl?: string;
712
+ /** Right-aligned network tag: label pill tinted with `color`, ticker beneath. */
713
+ networkTag?: {
714
+ label: string;
715
+ color?: string;
716
+ };
710
717
  }
711
718
  interface AssetSelectorCategory {
712
719
  id: string;
package/dist/web/index.js CHANGED
@@ -1226,22 +1226,12 @@ var STATUS_UI = {
1226
1226
  pending: { icon: "schedule", className: "bg-warning text-background" }
1227
1227
  };
1228
1228
  var FALLBACK_UI = { icon: "remove", className: "bg-muted text-muted-foreground" };
1229
+ var iconBadgeOverlayClass = "absolute -bottom-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full ring-2 ring-card";
1229
1230
  function StatusIconBadge({ icon, status, className }) {
1230
1231
  const ui = status ? STATUS_UI[status] ?? FALLBACK_UI : null;
1231
1232
  return /* @__PURE__ */ jsxs7("div", { className: cn("relative shrink-0", className), children: [
1232
1233
  icon,
1233
- ui && /* @__PURE__ */ jsx17(
1234
- "span",
1235
- {
1236
- className: cn(
1237
- // ring-card masks the badge edge against the card surface,
1238
- // exactly like the network badge on asset icons.
1239
- "absolute -bottom-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full ring-2 ring-card",
1240
- ui.className
1241
- ),
1242
- children: /* @__PURE__ */ jsx17(Icon, { name: ui.icon, className: "size-3" })
1243
- }
1244
- )
1234
+ ui && /* @__PURE__ */ jsx17("span", { className: cn(iconBadgeOverlayClass, ui.className), children: /* @__PURE__ */ jsx17(Icon, { name: ui.icon, className: "size-3" }) })
1245
1235
  ] });
1246
1236
  }
1247
1237
 
@@ -3575,6 +3565,9 @@ function NetworkRow({
3575
3565
  import { useState as useState11 } from "react";
3576
3566
  import { createPortal } from "react-dom";
3577
3567
  import { Fragment as Fragment6, jsx as jsx38, jsxs as jsxs25 } from "react/jsx-runtime";
3568
+ function NetworkMiniBadge({ iconUrl, label }) {
3569
+ return /* @__PURE__ */ jsx38("span", { className: cn(iconBadgeOverlayClass, "overflow-hidden"), children: iconUrl ? /* @__PURE__ */ jsx38("img", { src: iconUrl, alt: label ?? "", className: "h-full w-full object-cover" }) : /* @__PURE__ */ jsx38("span", { className: "flex h-full w-full items-center justify-center bg-muted text-xxs font-bold uppercase leading-none text-muted-foreground", children: label?.charAt(0) }) });
3570
+ }
3578
3571
  function AssetSelector({
3579
3572
  label,
3580
3573
  selectedTicker,
@@ -3608,7 +3601,7 @@ function AssetSelector({
3608
3601
  if (!matchesCategory || !matchesNetwork || !matchesVenue) return false;
3609
3602
  if (!search) return true;
3610
3603
  const searchValue = search.toLowerCase();
3611
- const matchesSearch = option.ticker.toLowerCase().includes(searchValue) || (option.name?.toLowerCase().includes(searchValue) ?? false) || (option.assetId?.toLowerCase().includes(searchValue) ?? false) || (option.network?.toLowerCase().includes(searchValue) ?? false) || (option.category?.toLowerCase().includes(searchValue) ?? false);
3604
+ const matchesSearch = option.ticker.toLowerCase().includes(searchValue) || (option.name?.toLowerCase().includes(searchValue) ?? false) || (option.assetId?.toLowerCase().includes(searchValue) ?? false) || (option.network?.toLowerCase().includes(searchValue) ?? false) || (option.networkTag?.label.toLowerCase().includes(searchValue) ?? false) || (option.category?.toLowerCase().includes(searchValue) ?? false);
3612
3605
  return matchesSearch;
3613
3606
  }).sort((a, b) => {
3614
3607
  if (a.id === selectedOptionId) return -1;
@@ -3624,19 +3617,29 @@ function AssetSelector({
3624
3617
  const categoryLabelById = new Map(categories.map((category) => [category.id, category.label]));
3625
3618
  const renderAssetOption = (option, optionSelected, optionDisabled) => {
3626
3619
  const optionCategoryLabel = option.categoryLabel || (option.category ? categoryLabelById.get(option.category) : void 0);
3620
+ const hasNetworkBadge = Boolean(option.networkIconUrl || option.networkTag);
3627
3621
  return /* @__PURE__ */ jsxs25("span", { className: "group flex w-full items-center gap-3 text-sm", children: [
3628
- /* @__PURE__ */ jsx38(
3629
- AssetIcon,
3630
- {
3631
- ticker: option.ticker,
3632
- logoUri: option.icon,
3633
- size: 38,
3634
- className: cn(
3635
- "shrink-0 transition-transform duration-200",
3636
- !optionDisabled && "group-hover:scale-[1.04]"
3637
- )
3638
- }
3639
- ),
3622
+ /* @__PURE__ */ jsxs25("span", { className: "relative shrink-0", children: [
3623
+ /* @__PURE__ */ jsx38(
3624
+ AssetIcon,
3625
+ {
3626
+ ticker: option.ticker,
3627
+ logoUri: option.icon,
3628
+ size: 38,
3629
+ className: cn(
3630
+ "shrink-0 transition-transform duration-200",
3631
+ !optionDisabled && "group-hover:scale-[1.04]"
3632
+ )
3633
+ }
3634
+ ),
3635
+ hasNetworkBadge && /* @__PURE__ */ jsx38(
3636
+ NetworkMiniBadge,
3637
+ {
3638
+ iconUrl: option.networkIconUrl,
3639
+ label: option.networkTag?.label
3640
+ }
3641
+ )
3642
+ ] }),
3640
3643
  /* @__PURE__ */ jsxs25("span", { className: "flex min-w-0 flex-1 items-center justify-between gap-3 text-left", children: [
3641
3644
  /* @__PURE__ */ jsx38("span", { className: "min-w-0 flex flex-col leading-tight", children: /* @__PURE__ */ jsx38(
3642
3645
  "span",
@@ -3647,11 +3650,27 @@ function AssetSelector({
3647
3650
  }
3648
3651
  ) }),
3649
3652
  /* @__PURE__ */ jsxs25("span", { className: "flex shrink-0 flex-col items-end gap-0.5", children: [
3650
- optionSelected ? /* @__PURE__ */ jsx38("span", { className: "rounded-full border border-primary/25 bg-primary/[0.14] px-2 py-0.5 text-xxs font-bold uppercase tracking-wide text-primary", children: "Current" }) : optionCategoryLabel && /* @__PURE__ */ jsx38("span", { className: "rounded-full bg-surface-card px-2 py-0.5 text-tiny font-bold uppercase tracking-wide text-text-dimmed shadow-inner", children: optionCategoryLabel }),
3653
+ optionSelected ? /* @__PURE__ */ jsx38("span", { className: "rounded-full border border-primary/25 bg-primary/[0.14] px-2 py-0.5 text-xxs font-bold uppercase tracking-wide text-primary", children: "Current" }) : option.networkTag ? /* @__PURE__ */ jsx38(
3654
+ "span",
3655
+ {
3656
+ className: cn(
3657
+ "rounded-full px-2 py-0.5 text-xxs font-bold uppercase tracking-wide",
3658
+ !option.networkTag.color && "bg-white/[0.08] text-muted-foreground"
3659
+ ),
3660
+ style: option.networkTag.color ? {
3661
+ backgroundColor: `color-mix(in srgb, ${option.networkTag.color} 15%, transparent)`,
3662
+ color: option.networkTag.color
3663
+ } : void 0,
3664
+ children: option.networkTag.label
3665
+ }
3666
+ ) : optionCategoryLabel && /* @__PURE__ */ jsx38("span", { className: "rounded-full bg-surface-card px-2 py-0.5 text-tiny font-bold uppercase tracking-wide text-text-dimmed shadow-inner", children: optionCategoryLabel }),
3651
3667
  /* @__PURE__ */ jsx38(
3652
3668
  "span",
3653
3669
  {
3654
- className: "max-w-24 truncate text-tiny font-medium uppercase tracking-wide text-white/35",
3670
+ className: cn(
3671
+ "max-w-24 truncate",
3672
+ option.networkTag ? "text-xs text-muted-foreground" : "text-tiny font-medium uppercase tracking-wide text-white/35"
3673
+ ),
3655
3674
  title: optionDisabled ? "In use" : option.ticker,
3656
3675
  children: optionDisabled ? "In use" : option.ticker
3657
3676
  }
@@ -3679,7 +3698,13 @@ function AssetSelector({
3679
3698
  children: selected ? /* @__PURE__ */ jsxs25(Fragment6, { children: [
3680
3699
  /* @__PURE__ */ jsxs25("span", { className: "relative shrink-0", children: [
3681
3700
  /* @__PURE__ */ jsx38(AssetIcon, { ticker: selected.ticker, logoUri: selected.icon, size: 38 }),
3682
- selected.network && /* @__PURE__ */ jsx38(
3701
+ selected.networkIconUrl || selected.networkTag ? /* @__PURE__ */ jsx38(
3702
+ NetworkMiniBadge,
3703
+ {
3704
+ iconUrl: selected.networkIconUrl,
3705
+ label: selected.networkTag?.label
3706
+ }
3707
+ ) : selected.network && /* @__PURE__ */ jsx38(
3683
3708
  NetworkBadge,
3684
3709
  {
3685
3710
  network: selected.network,
@@ -3993,7 +4018,7 @@ function SwapInputCard({
3993
4018
  unit: receiveDisplayUnit
3994
4019
  }) : null;
3995
4020
  return /* @__PURE__ */ jsxs26(Fragment7, { children: [
3996
- /* @__PURE__ */ jsxs26("div", { className: "relative mb-3 flex flex-col rounded-3xl bg-white/[0.03] shadow-2xl shadow-black/40 backdrop-blur-2xl transition-all duration-300", children: [
4021
+ /* @__PURE__ */ jsxs26("div", { className: "relative mb-3 flex flex-col rounded-2xl bg-white/[0.03] shadow-2xl shadow-black/40 backdrop-blur-2xl transition-all duration-300", children: [
3997
4022
  /* @__PURE__ */ jsxs26("div", { className: "p-3.5 pb-4", children: [
3998
4023
  /* @__PURE__ */ jsxs26("div", { className: "mb-2 flex items-center justify-between gap-2", children: [
3999
4024
  /* @__PURE__ */ jsx39("p", { className: "text-xs font-bold uppercase tracking-widest text-white/60", children: "You Pay" }),
@@ -4074,7 +4099,7 @@ function SwapInputCard({
4074
4099
  children: /* @__PURE__ */ jsx39(Icon, { name: "swap_vert", size: "md" })
4075
4100
  }
4076
4101
  ) }) }),
4077
- /* @__PURE__ */ jsxs26("div", { className: "rounded-b-3xl bg-gradient-to-br from-white/[0.01] to-primary/[0.04] p-3.5 pt-4 transition-all duration-300", children: [
4102
+ /* @__PURE__ */ jsxs26("div", { className: "rounded-b-2xl bg-gradient-to-br from-white/[0.01] to-primary/[0.04] p-3.5 pt-4 transition-all duration-300", children: [
4078
4103
  /* @__PURE__ */ jsx39("p", { className: "mb-2 text-xs font-bold uppercase tracking-widest text-primary/70", children: "You Receive" }),
4079
4104
  /* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-2", children: [
4080
4105
  /* @__PURE__ */ jsx39(
@@ -7134,6 +7159,25 @@ var colors = {
7134
7159
  thumbHover: "rgba(43, 238, 121, 0.55)",
7135
7160
  track: "transparent"
7136
7161
  },
7162
+ /** External bridge chains — third-party brand colors for network tags.
7163
+ * Keyed by the lowercase chain id the bridge API uses. */
7164
+ bridgeChain: {
7165
+ ethereum: "#627EEA",
7166
+ base: "#0052FF",
7167
+ arbitrum: "#28A0F0",
7168
+ optimism: "#FF0420",
7169
+ polygon: "#8247E5",
7170
+ solana: "#9945FF",
7171
+ tron: "#FF4B4B",
7172
+ bitcoin: "#F7931A",
7173
+ lightning: "#F6C343",
7174
+ spark: "#FF6D00",
7175
+ avalanche: "#E84142",
7176
+ bsc: "#F0B90B",
7177
+ litecoin: "#4A7BD4",
7178
+ ton: "#0098EA",
7179
+ monad: "#836EF9"
7180
+ },
7137
7181
  /** Network / Layer */
7138
7182
  network: {
7139
7183
  bitcoin: "#F7931A",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kaleido-ui",
3
- "version": "0.1.84",
3
+ "version": "0.1.86",
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",