kaleido-ui 0.1.9 → 0.1.10

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.
@@ -1141,6 +1141,22 @@ function NetworkBadge({
1141
1141
  const content = children ?? (shouldShowLabel ? label : null);
1142
1142
  const chipSize = size === "sm" ? "size-6" : "size-8";
1143
1143
  const imageSize = size === "sm" ? "size-3.5" : "size-icon-lg";
1144
+ const renderGlyph = (className2) => network === "L1" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1145
+ "span",
1146
+ {
1147
+ className: cn("material-symbols-outlined leading-none", color, className2),
1148
+ style: { fontSize: size === "sm" ? 12 : 16 },
1149
+ "aria-hidden": true,
1150
+ children: "link"
1151
+ }
1152
+ ) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1153
+ "img",
1154
+ {
1155
+ src: icon,
1156
+ alt: network,
1157
+ className: cn(className2, "object-contain", defaultIconClassName, iconClassName)
1158
+ }
1159
+ );
1144
1160
  if (!content) {
1145
1161
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1146
1162
  "span",
@@ -1151,14 +1167,7 @@ function NetworkBadge({
1151
1167
  iconBg,
1152
1168
  className
1153
1169
  ),
1154
- children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1155
- "img",
1156
- {
1157
- src: icon,
1158
- alt: network,
1159
- className: cn(imageSize, "object-contain", defaultIconClassName, iconClassName)
1160
- }
1161
- )
1170
+ children: renderGlyph(imageSize)
1162
1171
  }
1163
1172
  );
1164
1173
  }
@@ -1173,14 +1182,7 @@ function NetworkBadge({
1173
1182
  className
1174
1183
  ),
1175
1184
  children: [
1176
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1177
- "img",
1178
- {
1179
- src: icon,
1180
- alt: network,
1181
- className: cn(size === "sm" ? "size-3" : "size-3.5", "object-contain", defaultIconClassName, iconClassName)
1182
- }
1183
- ),
1185
+ renderGlyph(size === "sm" ? "size-3" : "size-3.5"),
1184
1186
  content
1185
1187
  ]
1186
1188
  }
@@ -1359,7 +1361,7 @@ function AssetCard({
1359
1361
  children: name
1360
1362
  }
1361
1363
  ),
1362
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "flex flex-wrap gap-1 mt-1", children: networks.map((network) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(NetworkBadge, { network, showLabel: true, size: "sm" }, network)) })
1364
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "flex flex-nowrap gap-1 mt-1", children: networks.map((network) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(NetworkBadge, { network, size: "sm" }, network)) })
1363
1365
  ] })
1364
1366
  ] }),
1365
1367
  /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "text-right", children: [
@@ -2371,7 +2373,8 @@ function AccountSettingsShell({
2371
2373
  accountId,
2372
2374
  title,
2373
2375
  subtitle,
2374
- children
2376
+ children,
2377
+ onBack
2375
2378
  }) {
2376
2379
  return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "min-h-screen bg-background pb-28 font-display text-foreground", children: [
2377
2380
  /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
@@ -2381,6 +2384,7 @@ function AccountSettingsShell({
2381
2384
  subtitle,
2382
2385
  titleAlign: "start",
2383
2386
  left: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(AccountHeaderIcons, { accountId }),
2387
+ onBack,
2384
2388
  className: "px-5 py-4"
2385
2389
  }
2386
2390
  ),
@@ -5726,7 +5730,7 @@ function DepositAssetSelection({
5726
5730
  children: [
5727
5731
  /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "relative", children: [
5728
5732
  /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(AssetIcon, { ticker: option.ticker, size: 40 }),
5729
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "absolute -bottom-1 -right-1 flex size-4 items-center justify-center rounded-full bg-primary", children: active ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Icon2, { name: "check", size: "xs", className: "text-background" }) : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Icon2, { name: "add", size: "xs", className: "text-background" }) })
5733
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "absolute -bottom-1 -right-1 flex size-4 items-center justify-center rounded-full bg-primary", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Icon2, { name: "add", size: "xs", className: "text-background" }) })
5730
5734
  ] }),
5731
5735
  /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "mt-2 min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
5732
5736
  "div",
@@ -426,11 +426,13 @@ declare function AccountNetworkPicker({ accountId, current, onSave, }: {
426
426
  current: AccountSettingsNetwork;
427
427
  onSave: (network: AccountSettingsNetwork) => Promise<unknown>;
428
428
  }): react_jsx_runtime.JSX.Element;
429
- declare function AccountSettingsShell({ accountId, title, subtitle, children, }: {
429
+ declare function AccountSettingsShell({ accountId, title, subtitle, children, onBack, }: {
430
430
  accountId: AccountSettingsProtocol;
431
431
  title: string;
432
432
  subtitle: string;
433
433
  children: ReactNode;
434
+ /** Optional back callback — if provided, renders a back button inline with the title. */
435
+ onBack?: () => void;
434
436
  }): react_jsx_runtime.JSX.Element;
435
437
  declare function AccountInfoGrid({ items }: {
436
438
  items: Array<{
@@ -426,11 +426,13 @@ declare function AccountNetworkPicker({ accountId, current, onSave, }: {
426
426
  current: AccountSettingsNetwork;
427
427
  onSave: (network: AccountSettingsNetwork) => Promise<unknown>;
428
428
  }): react_jsx_runtime.JSX.Element;
429
- declare function AccountSettingsShell({ accountId, title, subtitle, children, }: {
429
+ declare function AccountSettingsShell({ accountId, title, subtitle, children, onBack, }: {
430
430
  accountId: AccountSettingsProtocol;
431
431
  title: string;
432
432
  subtitle: string;
433
433
  children: ReactNode;
434
+ /** Optional back callback — if provided, renders a back button inline with the title. */
435
+ onBack?: () => void;
434
436
  }): react_jsx_runtime.JSX.Element;
435
437
  declare function AccountInfoGrid({ items }: {
436
438
  items: Array<{
package/dist/web/index.js CHANGED
@@ -980,6 +980,22 @@ function NetworkBadge({
980
980
  const content = children ?? (shouldShowLabel ? label : null);
981
981
  const chipSize = size === "sm" ? "size-6" : "size-8";
982
982
  const imageSize = size === "sm" ? "size-3.5" : "size-icon-lg";
983
+ const renderGlyph = (className2) => network === "L1" ? /* @__PURE__ */ jsx15(
984
+ "span",
985
+ {
986
+ className: cn("material-symbols-outlined leading-none", color, className2),
987
+ style: { fontSize: size === "sm" ? 12 : 16 },
988
+ "aria-hidden": true,
989
+ children: "link"
990
+ }
991
+ ) : /* @__PURE__ */ jsx15(
992
+ "img",
993
+ {
994
+ src: icon,
995
+ alt: network,
996
+ className: cn(className2, "object-contain", defaultIconClassName, iconClassName)
997
+ }
998
+ );
983
999
  if (!content) {
984
1000
  return /* @__PURE__ */ jsx15(
985
1001
  "span",
@@ -990,14 +1006,7 @@ function NetworkBadge({
990
1006
  iconBg,
991
1007
  className
992
1008
  ),
993
- children: /* @__PURE__ */ jsx15(
994
- "img",
995
- {
996
- src: icon,
997
- alt: network,
998
- className: cn(imageSize, "object-contain", defaultIconClassName, iconClassName)
999
- }
1000
- )
1009
+ children: renderGlyph(imageSize)
1001
1010
  }
1002
1011
  );
1003
1012
  }
@@ -1012,14 +1021,7 @@ function NetworkBadge({
1012
1021
  className
1013
1022
  ),
1014
1023
  children: [
1015
- /* @__PURE__ */ jsx15(
1016
- "img",
1017
- {
1018
- src: icon,
1019
- alt: network,
1020
- className: cn(size === "sm" ? "size-3" : "size-3.5", "object-contain", defaultIconClassName, iconClassName)
1021
- }
1022
- ),
1024
+ renderGlyph(size === "sm" ? "size-3" : "size-3.5"),
1023
1025
  content
1024
1026
  ]
1025
1027
  }
@@ -1198,7 +1200,7 @@ function AssetCard({
1198
1200
  children: name
1199
1201
  }
1200
1202
  ),
1201
- /* @__PURE__ */ jsx17("div", { className: "flex flex-wrap gap-1 mt-1", children: networks.map((network) => /* @__PURE__ */ jsx17(NetworkBadge, { network, showLabel: true, size: "sm" }, network)) })
1203
+ /* @__PURE__ */ jsx17("div", { className: "flex flex-nowrap gap-1 mt-1", children: networks.map((network) => /* @__PURE__ */ jsx17(NetworkBadge, { network, size: "sm" }, network)) })
1202
1204
  ] })
1203
1205
  ] }),
1204
1206
  /* @__PURE__ */ jsxs7("div", { className: "text-right", children: [
@@ -2216,7 +2218,8 @@ function AccountSettingsShell({
2216
2218
  accountId,
2217
2219
  title,
2218
2220
  subtitle,
2219
- children
2221
+ children,
2222
+ onBack
2220
2223
  }) {
2221
2224
  return /* @__PURE__ */ jsxs18("div", { className: "min-h-screen bg-background pb-28 font-display text-foreground", children: [
2222
2225
  /* @__PURE__ */ jsx30(
@@ -2226,6 +2229,7 @@ function AccountSettingsShell({
2226
2229
  subtitle,
2227
2230
  titleAlign: "start",
2228
2231
  left: /* @__PURE__ */ jsx30(AccountHeaderIcons, { accountId }),
2232
+ onBack,
2229
2233
  className: "px-5 py-4"
2230
2234
  }
2231
2235
  ),
@@ -5571,7 +5575,7 @@ function DepositAssetSelection({
5571
5575
  children: [
5572
5576
  /* @__PURE__ */ jsxs45("div", { className: "relative", children: [
5573
5577
  /* @__PURE__ */ jsx58(AssetIcon, { ticker: option.ticker, size: 40 }),
5574
- /* @__PURE__ */ jsx58("div", { className: "absolute -bottom-1 -right-1 flex size-4 items-center justify-center rounded-full bg-primary", children: active ? /* @__PURE__ */ jsx58(Icon2, { name: "check", size: "xs", className: "text-background" }) : /* @__PURE__ */ jsx58(Icon2, { name: "add", size: "xs", className: "text-background" }) })
5578
+ /* @__PURE__ */ jsx58("div", { className: "absolute -bottom-1 -right-1 flex size-4 items-center justify-center rounded-full bg-primary", children: /* @__PURE__ */ jsx58(Icon2, { name: "add", size: "xs", className: "text-background" }) })
5575
5579
  ] }),
5576
5580
  /* @__PURE__ */ jsx58("div", { className: "mt-2 min-w-0", children: /* @__PURE__ */ jsx58(
5577
5581
  "div",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kaleido-ui",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
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",