kaleido-ui 0.1.6 → 0.1.7

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.
@@ -1916,7 +1916,8 @@ function BottomNav({
1916
1916
  var import_react7 = require("react");
1917
1917
  var import_jsx_runtime26 = require("react/jsx-runtime");
1918
1918
  function AccountStatusTabs({
1919
- accounts
1919
+ accounts,
1920
+ onSelect
1920
1921
  }) {
1921
1922
  const [selectedAccountId, setSelectedAccountId] = (0, import_react7.useState)(null);
1922
1923
  const selectedAccount = selectedAccountId ? accounts.find((account) => account.id === selectedAccountId) : null;
@@ -1925,10 +1926,10 @@ function AccountStatusTabs({
1925
1926
  /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1926
1927
  NetworkStatusChip,
1927
1928
  {
1928
- onClick: () => setSelectedAccountId(account.id),
1929
+ onClick: () => onSelect ? onSelect(account.id) : setSelectedAccountId(account.id),
1929
1930
  icon: account.icon,
1930
1931
  dotClassName: account.dotTone,
1931
- ariaLabel: `Open ${account.title} details`
1932
+ ariaLabel: onSelect ? `Open ${account.title}` : `Open ${account.title} details`
1932
1933
  }
1933
1934
  ),
1934
1935
  /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
@@ -356,8 +356,14 @@ interface AccountStatusTabItem<TId extends string = string> {
356
356
  }
357
357
  interface AccountStatusTabsProps<TId extends string = string> {
358
358
  accounts: AccountStatusTabItem<TId>[];
359
- }
360
- declare function AccountStatusTabs<TId extends string = string>({ accounts, }: AccountStatusTabsProps<TId>): react_jsx_runtime.JSX.Element;
359
+ /**
360
+ * If provided, tapping an account chip calls this with the account id
361
+ * instead of opening the built-in modal. Use to navigate to a dedicated
362
+ * account/network settings page.
363
+ */
364
+ onSelect?: (id: TId) => void;
365
+ }
366
+ declare function AccountStatusTabs<TId extends string = string>({ accounts, onSelect, }: AccountStatusTabsProps<TId>): react_jsx_runtime.JSX.Element;
361
367
 
362
368
  interface FilterDropdownOption {
363
369
  id: string;
@@ -356,8 +356,14 @@ interface AccountStatusTabItem<TId extends string = string> {
356
356
  }
357
357
  interface AccountStatusTabsProps<TId extends string = string> {
358
358
  accounts: AccountStatusTabItem<TId>[];
359
- }
360
- declare function AccountStatusTabs<TId extends string = string>({ accounts, }: AccountStatusTabsProps<TId>): react_jsx_runtime.JSX.Element;
359
+ /**
360
+ * If provided, tapping an account chip calls this with the account id
361
+ * instead of opening the built-in modal. Use to navigate to a dedicated
362
+ * account/network settings page.
363
+ */
364
+ onSelect?: (id: TId) => void;
365
+ }
366
+ declare function AccountStatusTabs<TId extends string = string>({ accounts, onSelect, }: AccountStatusTabsProps<TId>): react_jsx_runtime.JSX.Element;
361
367
 
362
368
  interface FilterDropdownOption {
363
369
  id: string;
package/dist/web/index.js CHANGED
@@ -1761,7 +1761,8 @@ function BottomNav({
1761
1761
  import { useState as useState7 } from "react";
1762
1762
  import { Fragment as Fragment2, jsx as jsx26, jsxs as jsxs14 } from "react/jsx-runtime";
1763
1763
  function AccountStatusTabs({
1764
- accounts
1764
+ accounts,
1765
+ onSelect
1765
1766
  }) {
1766
1767
  const [selectedAccountId, setSelectedAccountId] = useState7(null);
1767
1768
  const selectedAccount = selectedAccountId ? accounts.find((account) => account.id === selectedAccountId) : null;
@@ -1770,10 +1771,10 @@ function AccountStatusTabs({
1770
1771
  /* @__PURE__ */ jsx26(
1771
1772
  NetworkStatusChip,
1772
1773
  {
1773
- onClick: () => setSelectedAccountId(account.id),
1774
+ onClick: () => onSelect ? onSelect(account.id) : setSelectedAccountId(account.id),
1774
1775
  icon: account.icon,
1775
1776
  dotClassName: account.dotTone,
1776
- ariaLabel: `Open ${account.title} details`
1777
+ ariaLabel: onSelect ? `Open ${account.title}` : `Open ${account.title} details`
1777
1778
  }
1778
1779
  ),
1779
1780
  /* @__PURE__ */ jsxs14(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kaleido-ui",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
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",