kaleido-ui 0.1.110 → 0.1.112

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.
@@ -3861,24 +3861,37 @@ var chipIdleClass = "bg-surface-card text-text-dimmed hover:text-white/75";
3861
3861
  function AssetSelectorNetworkMark({ network }) {
3862
3862
  return network.iconUrl ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("img", { src: network.iconUrl, alt: "", className: "size-4 shrink-0 rounded-full" }) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-muted text-xxs font-bold uppercase leading-none text-muted-foreground", children: network.label.charAt(0) });
3863
3863
  }
3864
+ var NETWORK_STACK_VISIBLE = 3;
3864
3865
  function AssetSelectorNetworkFilterTrigger({
3865
3866
  activeNetworkOption,
3867
+ networks,
3866
3868
  open,
3867
3869
  onClick
3868
3870
  }) {
3871
+ const visibleNetworks = networks.slice(0, NETWORK_STACK_VISIBLE);
3872
+ const overflowCount = networks.length - visibleNetworks.length;
3869
3873
  return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
3870
3874
  "button",
3871
3875
  {
3872
3876
  type: "button",
3873
3877
  onClick,
3878
+ "aria-label": activeNetworkOption ? void 0 : "All networks",
3874
3879
  className: cn(
3875
3880
  chipBaseClass,
3876
- "flex items-center gap-1.5 py-1.5 pl-2 pr-2.5",
3881
+ "flex items-center gap-1.5 py-1 pl-1.5 pr-2.5",
3877
3882
  activeNetworkOption || open ? chipActiveClass : chipIdleClass
3878
3883
  ),
3879
3884
  children: [
3880
- activeNetworkOption && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(AssetSelectorNetworkMark, { network: activeNetworkOption }),
3881
- activeNetworkOption ? activeNetworkOption.label : "All",
3885
+ activeNetworkOption ? /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
3886
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(AssetSelectorNetworkMark, { network: activeNetworkOption }),
3887
+ activeNetworkOption.label
3888
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("span", { className: "flex items-center -space-x-1.5", "aria-hidden": "true", children: [
3889
+ visibleNetworks.map((network) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "rounded-full ring-2 ring-card", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(AssetSelectorNetworkMark, { network }) }, network.id)),
3890
+ overflowCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("span", { className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-muted text-xxs font-bold leading-none text-muted-foreground ring-2 ring-card", children: [
3891
+ "+",
3892
+ overflowCount
3893
+ ] })
3894
+ ] }),
3882
3895
  /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3883
3896
  Icon,
3884
3897
  {
@@ -3954,6 +3967,7 @@ function AssetSelector({
3954
3967
  AssetSelectorNetworkFilterTrigger,
3955
3968
  {
3956
3969
  activeNetworkOption,
3970
+ networks,
3957
3971
  open: networkMenuOpen,
3958
3972
  onClick: () => setNetworkMenuOpen((value) => !value)
3959
3973
  }
@@ -5635,9 +5649,8 @@ function PageHeader({
5635
5649
  title ? "flex-1 gap-3" : "shrink-0"
5636
5650
  ),
5637
5651
  children: [
5638
- title && left,
5639
5652
  backButton,
5640
- !title && left,
5653
+ left,
5641
5654
  titleBlock
5642
5655
  ]
5643
5656
  }
package/dist/web/index.js CHANGED
@@ -3676,24 +3676,37 @@ var chipIdleClass = "bg-surface-card text-text-dimmed hover:text-white/75";
3676
3676
  function AssetSelectorNetworkMark({ network }) {
3677
3677
  return network.iconUrl ? /* @__PURE__ */ jsx38("img", { src: network.iconUrl, alt: "", className: "size-4 shrink-0 rounded-full" }) : /* @__PURE__ */ jsx38("span", { className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-muted text-xxs font-bold uppercase leading-none text-muted-foreground", children: network.label.charAt(0) });
3678
3678
  }
3679
+ var NETWORK_STACK_VISIBLE = 3;
3679
3680
  function AssetSelectorNetworkFilterTrigger({
3680
3681
  activeNetworkOption,
3682
+ networks,
3681
3683
  open,
3682
3684
  onClick
3683
3685
  }) {
3686
+ const visibleNetworks = networks.slice(0, NETWORK_STACK_VISIBLE);
3687
+ const overflowCount = networks.length - visibleNetworks.length;
3684
3688
  return /* @__PURE__ */ jsxs25(
3685
3689
  "button",
3686
3690
  {
3687
3691
  type: "button",
3688
3692
  onClick,
3693
+ "aria-label": activeNetworkOption ? void 0 : "All networks",
3689
3694
  className: cn(
3690
3695
  chipBaseClass,
3691
- "flex items-center gap-1.5 py-1.5 pl-2 pr-2.5",
3696
+ "flex items-center gap-1.5 py-1 pl-1.5 pr-2.5",
3692
3697
  activeNetworkOption || open ? chipActiveClass : chipIdleClass
3693
3698
  ),
3694
3699
  children: [
3695
- activeNetworkOption && /* @__PURE__ */ jsx38(AssetSelectorNetworkMark, { network: activeNetworkOption }),
3696
- activeNetworkOption ? activeNetworkOption.label : "All",
3700
+ activeNetworkOption ? /* @__PURE__ */ jsxs25(Fragment6, { children: [
3701
+ /* @__PURE__ */ jsx38(AssetSelectorNetworkMark, { network: activeNetworkOption }),
3702
+ activeNetworkOption.label
3703
+ ] }) : /* @__PURE__ */ jsxs25("span", { className: "flex items-center -space-x-1.5", "aria-hidden": "true", children: [
3704
+ visibleNetworks.map((network) => /* @__PURE__ */ jsx38("span", { className: "rounded-full ring-2 ring-card", children: /* @__PURE__ */ jsx38(AssetSelectorNetworkMark, { network }) }, network.id)),
3705
+ overflowCount > 0 && /* @__PURE__ */ jsxs25("span", { className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-muted text-xxs font-bold leading-none text-muted-foreground ring-2 ring-card", children: [
3706
+ "+",
3707
+ overflowCount
3708
+ ] })
3709
+ ] }),
3697
3710
  /* @__PURE__ */ jsx38(
3698
3711
  Icon,
3699
3712
  {
@@ -3769,6 +3782,7 @@ function AssetSelector({
3769
3782
  AssetSelectorNetworkFilterTrigger,
3770
3783
  {
3771
3784
  activeNetworkOption,
3785
+ networks,
3772
3786
  open: networkMenuOpen,
3773
3787
  onClick: () => setNetworkMenuOpen((value) => !value)
3774
3788
  }
@@ -5450,9 +5464,8 @@ function PageHeader({
5450
5464
  title ? "flex-1 gap-3" : "shrink-0"
5451
5465
  ),
5452
5466
  children: [
5453
- title && left,
5454
5467
  backButton,
5455
- !title && left,
5468
+ left,
5456
5469
  titleBlock
5457
5470
  ]
5458
5471
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kaleido-ui",
3
- "version": "0.1.110",
3
+ "version": "0.1.112",
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",