kaleido-ui 0.1.16 → 0.1.17

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.
@@ -4137,7 +4137,7 @@ function RouteChoiceCard({
4137
4137
  recommended,
4138
4138
  onClick
4139
4139
  }) {
4140
- const { disabled = false, disabledReason } = route;
4140
+ const { disabled = false, disabledReason, accountIcon, balanceLabel } = route;
4141
4141
  return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
4142
4142
  "button",
4143
4143
  {
@@ -4153,15 +4153,21 @@ function RouteChoiceCard({
4153
4153
  ),
4154
4154
  children: [
4155
4155
  /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
4156
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { children: [
4157
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex items-center gap-2", children: [
4158
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "text-sm font-bold text-white", children: route.accountTitle }),
4159
- recommended && !disabled && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "rounded-full border border-primary/20 bg-primary/10 px-2 py-0.5 text-xxs font-bold uppercase tracking-wider text-primary", children: "Recommended" }),
4160
- disabled && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "rounded-full border border-danger/20 bg-danger/10 px-2 py-0.5 text-xxs font-bold uppercase tracking-wider text-danger", children: "Insufficient" })
4161
- ] }),
4162
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "mt-1 text-xs text-white/45", children: route.methodLabel })
4156
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex min-w-0 items-start gap-3", children: [
4157
+ accountIcon && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "mt-0.5 shrink-0", children: accountIcon }),
4158
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "min-w-0", children: [
4159
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex flex-wrap items-center gap-2", children: [
4160
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "text-sm font-bold text-white", children: route.accountTitle }),
4161
+ recommended && !disabled && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "rounded-full border border-primary/20 bg-primary/10 px-2 py-0.5 text-xxs font-bold uppercase tracking-wider text-primary", children: "Recommended" }),
4162
+ disabled && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "rounded-full border border-danger/20 bg-danger/10 px-2 py-0.5 text-xxs font-bold uppercase tracking-wider text-danger", children: "Insufficient" })
4163
+ ] }),
4164
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "mt-1 text-xs text-white/45", children: route.methodLabel })
4165
+ ] })
4163
4166
  ] }),
4164
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "text-xxs font-bold uppercase tracking-wider text-white/35", children: route.feeHint })
4167
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex shrink-0 flex-col items-end gap-1", children: [
4168
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "text-xxs font-bold uppercase tracking-wider text-white/35", children: route.feeHint }),
4169
+ balanceLabel && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "font-mono text-xxs text-white/50", children: balanceLabel })
4170
+ ] })
4165
4171
  ] }),
4166
4172
  /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "mt-3 text-xs leading-relaxed text-muted-foreground", children: route.summary }),
4167
4173
  disabled && disabledReason && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "mt-2 text-xxs leading-relaxed text-danger/80", children: disabledReason })
@@ -808,6 +808,10 @@ interface WithdrawRouteOption<TAccount extends string = string> {
808
808
  disabled?: boolean;
809
809
  /** Short reason shown under the disabled card. Pair with `disabled`. */
810
810
  disabledReason?: string;
811
+ /** Optional account/protocol logo rendered on the left of the card (e.g. NetworkBadge). */
812
+ accountIcon?: ReactNode;
813
+ /** Optional pre-formatted balance label (e.g. "1.23 BTC available") shown on the card. */
814
+ balanceLabel?: string;
811
815
  }
812
816
  interface WithdrawRouteSummary {
813
817
  method: string;
@@ -808,6 +808,10 @@ interface WithdrawRouteOption<TAccount extends string = string> {
808
808
  disabled?: boolean;
809
809
  /** Short reason shown under the disabled card. Pair with `disabled`. */
810
810
  disabledReason?: string;
811
+ /** Optional account/protocol logo rendered on the left of the card (e.g. NetworkBadge). */
812
+ accountIcon?: ReactNode;
813
+ /** Optional pre-formatted balance label (e.g. "1.23 BTC available") shown on the card. */
814
+ balanceLabel?: string;
811
815
  }
812
816
  interface WithdrawRouteSummary {
813
817
  method: string;
package/dist/web/index.js CHANGED
@@ -3982,7 +3982,7 @@ function RouteChoiceCard({
3982
3982
  recommended,
3983
3983
  onClick
3984
3984
  }) {
3985
- const { disabled = false, disabledReason } = route;
3985
+ const { disabled = false, disabledReason, accountIcon, balanceLabel } = route;
3986
3986
  return /* @__PURE__ */ jsxs33(
3987
3987
  "button",
3988
3988
  {
@@ -3998,15 +3998,21 @@ function RouteChoiceCard({
3998
3998
  ),
3999
3999
  children: [
4000
4000
  /* @__PURE__ */ jsxs33("div", { className: "flex items-start justify-between gap-3", children: [
4001
- /* @__PURE__ */ jsxs33("div", { children: [
4002
- /* @__PURE__ */ jsxs33("div", { className: "flex items-center gap-2", children: [
4003
- /* @__PURE__ */ jsx45("span", { className: "text-sm font-bold text-white", children: route.accountTitle }),
4004
- recommended && !disabled && /* @__PURE__ */ jsx45("span", { className: "rounded-full border border-primary/20 bg-primary/10 px-2 py-0.5 text-xxs font-bold uppercase tracking-wider text-primary", children: "Recommended" }),
4005
- disabled && /* @__PURE__ */ jsx45("span", { className: "rounded-full border border-danger/20 bg-danger/10 px-2 py-0.5 text-xxs font-bold uppercase tracking-wider text-danger", children: "Insufficient" })
4006
- ] }),
4007
- /* @__PURE__ */ jsx45("p", { className: "mt-1 text-xs text-white/45", children: route.methodLabel })
4001
+ /* @__PURE__ */ jsxs33("div", { className: "flex min-w-0 items-start gap-3", children: [
4002
+ accountIcon && /* @__PURE__ */ jsx45("div", { className: "mt-0.5 shrink-0", children: accountIcon }),
4003
+ /* @__PURE__ */ jsxs33("div", { className: "min-w-0", children: [
4004
+ /* @__PURE__ */ jsxs33("div", { className: "flex flex-wrap items-center gap-2", children: [
4005
+ /* @__PURE__ */ jsx45("span", { className: "text-sm font-bold text-white", children: route.accountTitle }),
4006
+ recommended && !disabled && /* @__PURE__ */ jsx45("span", { className: "rounded-full border border-primary/20 bg-primary/10 px-2 py-0.5 text-xxs font-bold uppercase tracking-wider text-primary", children: "Recommended" }),
4007
+ disabled && /* @__PURE__ */ jsx45("span", { className: "rounded-full border border-danger/20 bg-danger/10 px-2 py-0.5 text-xxs font-bold uppercase tracking-wider text-danger", children: "Insufficient" })
4008
+ ] }),
4009
+ /* @__PURE__ */ jsx45("p", { className: "mt-1 text-xs text-white/45", children: route.methodLabel })
4010
+ ] })
4008
4011
  ] }),
4009
- /* @__PURE__ */ jsx45("span", { className: "text-xxs font-bold uppercase tracking-wider text-white/35", children: route.feeHint })
4012
+ /* @__PURE__ */ jsxs33("div", { className: "flex shrink-0 flex-col items-end gap-1", children: [
4013
+ /* @__PURE__ */ jsx45("span", { className: "text-xxs font-bold uppercase tracking-wider text-white/35", children: route.feeHint }),
4014
+ balanceLabel && /* @__PURE__ */ jsx45("span", { className: "font-mono text-xxs text-white/50", children: balanceLabel })
4015
+ ] })
4010
4016
  ] }),
4011
4017
  /* @__PURE__ */ jsx45("p", { className: "mt-3 text-xs leading-relaxed text-muted-foreground", children: route.summary }),
4012
4018
  disabled && disabledReason && /* @__PURE__ */ jsx45("p", { className: "mt-2 text-xxs leading-relaxed text-danger/80", children: disabledReason })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kaleido-ui",
3
- "version": "0.1.16",
3
+ "version": "0.1.17",
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",