@validationcloud/fractal-ui 1.83.0 → 1.85.0

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.
@@ -1 +1 @@
1
- export declare const protocolLogoIds: readonly ["abs", "aleo", "ape", "apt", "arb", "astr", "avax", "axl", "b2", "babylon", "base", "bera", "bnb", "bob", "btc", "btr", "celo", "cfx", "core", "corn", "cro", "cspr", "eigenlayer", "eth", "eth_light", "fhe", "frax", "gno", "hash", "hbar", "hsk", "hype", "icp", "ink", "iota", "jovay", "kat", "lens", "linea", "lsk", "matic", "mega", "merl", "metal", "metis", "mezo", "mint", "mnt", "mode", "mon", "morph", "obol", "okb", "op", "opbnb", "optimism", "pharos", "plume", "rbtc", "ron", "s", "saga", "sauce", "scr", "sei", "shibarium", "sol", "soneium", "ssv", "stable", "starknet", "stt", "supr", "taiko", "tac", "tao", "tempo", "ton", "trx", "uni", "union", "wemix", "wld", "xlm", "xpl", "xtz", "zk"];
1
+ export declare const protocolLogoIds: readonly ["abs", "aleo", "ape", "apt", "arb", "astr", "avax", "axl", "b2", "babylon", "base", "bera", "bnb", "bob", "btc", "btr", "celo", "cfx", "core", "corn", "cro", "cspr", "eigenlayer", "eth", "eth_light", "fhe", "frax", "gno", "hash", "hbar", "hsk", "hype", "icp", "ink", "iota", "jovay", "kat", "lens", "linea", "lsk", "matic", "mega", "merl", "metal", "metis", "mezo", "mint", "mnt", "mode", "mon", "morph", "obol", "okb", "op", "opbnb", "optimism", "pharos", "plume", "rbh", "rbtc", "ron", "s", "saga", "sauce", "scr", "sei", "shibarium", "sol", "soneium", "ssv", "stable", "starknet", "stt", "supr", "taiko", "tac", "tao", "tempo", "ton", "trx", "uni", "union", "wemix", "wld", "xlm", "xpl", "xtz", "zk"];
@@ -40,6 +40,7 @@ const c = {
40
40
  plasma: "xpl",
41
41
  polygon: "matic",
42
42
  provenance: "hash",
43
+ robinhood: "rbh",
43
44
  ronin: "ron",
44
45
  rootstock: "rbtc",
45
46
  saucerswap: "sauce",
@@ -56,10 +57,10 @@ const c = {
56
57
  xlayer: "okb",
57
58
  zksync: "zk"
58
59
  };
59
- function n(e, r) {
60
+ function n(e, o) {
60
61
  let a = e.toLowerCase();
61
- const o = c[a];
62
- return o && (a = o), r === "xl" ? `${a}_square` : a;
62
+ const r = c[a];
63
+ return r && (a = r), o === "xl" ? `${a}_square` : a;
63
64
  }
64
65
  const l = {
65
66
  xs: 16,
@@ -73,16 +74,16 @@ const l = {
73
74
  xl: 60
74
75
  // Tailwind size 15
75
76
  };
76
- function h({ name: e, size: r = "md", className: a, ...o }) {
77
- const s = l[r];
77
+ function h({ name: e, size: o = "md", className: a, ...r }) {
78
+ const s = l[o];
78
79
  return /* @__PURE__ */ t(
79
80
  "svg",
80
81
  {
81
- ...o,
82
+ ...r,
82
83
  className: i(`text-protocols-${n(e)}`, a),
83
84
  height: s,
84
85
  width: s,
85
- children: /* @__PURE__ */ t("use", { href: `#${n(e, r)}` })
86
+ children: /* @__PURE__ */ t("use", { href: `#${n(e, o)}` })
86
87
  }
87
88
  );
88
89
  }
@@ -28,11 +28,12 @@ declare function UserDropdownAvatarTrigger({ className, ...props }: UserDropdown
28
28
  declare function UserDropdownUpgradeBadge(): import("react/jsx-runtime").JSX.Element;
29
29
  declare function UserDropdownEmail(): import("react/jsx-runtime").JSX.Element;
30
30
  type UserDropdownItemProps = {
31
- href: string;
32
31
  icon: IconID;
33
32
  children: React.ReactNode;
34
- };
35
- declare function UserDropdownItem({ href, icon, children }: UserDropdownItemProps): import("react/jsx-runtime").JSX.Element;
33
+ /** When true, the single child element is rendered as the anchor. Use to integrate with client-side routers (e.g. next/link). */
34
+ asChild?: boolean;
35
+ } & React.ComponentPropsWithoutRef<'a'>;
36
+ declare function UserDropdownItem({ icon, children, asChild, className, ...props }: UserDropdownItemProps): import("react/jsx-runtime").JSX.Element;
36
37
  declare function UserDropdownUpgrade({ href }: {
37
38
  href: string;
38
39
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,60 +1,61 @@
1
1
  "use client";
2
- import { jsx as e, jsxs as a, Fragment as w } from "react/jsx-runtime";
3
- import { createContext as v, use as N } from "react";
4
- import U from "../../assets/default-avatar.svg.js";
5
- import { Button as g } from "../button/button.js";
6
- import { DropdownMenu as h, DropdownMenuItem as u } from "../dropdown-menu/dropdown-menu.js";
2
+ import { jsx as e, jsxs as a, Fragment as v } from "react/jsx-runtime";
3
+ import { Slot as g } from "radix-ui";
4
+ import { createContext as N, use as U } from "react";
5
+ import D from "../../assets/default-avatar.svg.js";
6
+ import { Button as h } from "../button/button.js";
7
+ import { DropdownMenu as f, DropdownMenuItem as u } from "../dropdown-menu/dropdown-menu.js";
7
8
  import { Icon as p } from "../icon/icon.js";
8
- import { InitialsAvatar as f } from "./initials-avatar.js";
9
- import { twMerge as s } from "../../lib/tailwind-merge.js";
10
- const x = v(null);
9
+ import { InitialsAvatar as x } from "./initials-avatar.js";
10
+ import { twMerge as l } from "../../lib/tailwind-merge.js";
11
+ const b = N(null);
11
12
  function m() {
12
- const r = N(x);
13
+ const r = U(b);
13
14
  if (!r)
14
15
  throw new Error("UserDropdown compound components must be rendered inside <UserDropdown>.");
15
16
  return r;
16
17
  }
17
- function D({
18
+ function y({
18
19
  user: r,
19
- displayName: n,
20
- trigger: t,
20
+ displayName: t,
21
+ trigger: n,
21
22
  matchTriggerWidth: o,
22
- className: c,
23
- children: d,
24
- ...i
23
+ className: i,
24
+ children: s,
25
+ ...c
25
26
  }) {
26
- const b = n ?? r.email.split("@")[0] ?? r.email;
27
- return /* @__PURE__ */ e(x, { value: { user: r, displayName: b }, children: /* @__PURE__ */ e(
28
- h,
27
+ const w = t ?? r.email.split("@")[0] ?? r.email;
28
+ return /* @__PURE__ */ e(b, { value: { user: r, displayName: w }, children: /* @__PURE__ */ e(
29
+ f,
29
30
  {
30
- trigger: t,
31
- className: c,
31
+ trigger: n,
32
+ className: i,
32
33
  contentClassName: "bg-neutral-60",
33
34
  contentStyle: o ? { width: "var(--radix-dropdown-menu-trigger-width)" } : void 0,
34
- ...i,
35
- children: d
35
+ ...c,
36
+ children: s
36
37
  }
37
38
  ) });
38
39
  }
39
- function y({ planLabel: r, card: n, trailing: t, className: o, ...c }) {
40
- const { user: d, displayName: i } = m();
40
+ function C({ planLabel: r, card: t, trailing: n, className: o, ...i }) {
41
+ const { user: s, displayName: c } = m();
41
42
  return /* @__PURE__ */ a(
42
43
  "button",
43
44
  {
44
45
  type: "button",
45
- className: s(
46
+ className: l(
46
47
  "group focus-visible:ring-neutral-40 flex h-14 w-full cursor-pointer items-center gap-4 rounded-xl pr-3.5 pl-4 focus:outline-none focus-visible:ring-2",
47
- n && "bg-neutral-65 hover:bg-neutral-60 shadow-[0_-6px_12px_-4px_rgba(0,0,0,0.25)]",
48
+ t && "bg-neutral-65 hover:bg-neutral-60 shadow-[0_-6px_12px_-4px_rgba(0,0,0,0.25)]",
48
49
  o
49
50
  ),
50
- ...c,
51
+ ...i,
51
52
  children: [
52
- /* @__PURE__ */ e(f, { email: d.email, displayName: i, className: "shrink-0" }),
53
+ /* @__PURE__ */ e(x, { email: s.email, displayName: c, className: "shrink-0" }),
53
54
  /* @__PURE__ */ a("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
54
- /* @__PURE__ */ e("span", { className: "tg-body-bold text-neutral-10 truncate text-left", children: i }),
55
+ /* @__PURE__ */ e("span", { className: "tg-body-bold text-neutral-10 truncate text-left", children: c }),
55
56
  r && /* @__PURE__ */ e("span", { className: "tg-caption text-neutral-40 group-data-[state=open]:text-neutral-10 truncate text-left", children: r })
56
57
  ] }),
57
- t ?? /* @__PURE__ */ e(
58
+ n ?? /* @__PURE__ */ e(
58
59
  p,
59
60
  {
60
61
  icon: "chevron-vertical",
@@ -65,22 +66,22 @@ function y({ planLabel: r, card: n, trailing: t, className: o, ...c }) {
65
66
  }
66
67
  );
67
68
  }
68
- function C({ className: r, ...n }) {
69
- const { user: t, displayName: o } = m();
69
+ function A({ className: r, ...t }) {
70
+ const { user: n, displayName: o } = m();
70
71
  return /* @__PURE__ */ e(
71
72
  "button",
72
73
  {
73
74
  type: "button",
74
75
  "aria-label": "User menu",
75
- className: s(
76
+ className: l(
76
77
  "group focus-visible:ring-neutral-40 flex h-14 w-16 cursor-pointer items-center justify-center rounded-xl focus:outline-none focus-visible:ring-2",
77
78
  r
78
79
  ),
79
- ...n,
80
+ ...t,
80
81
  children: /* @__PURE__ */ e(
81
- f,
82
+ x,
82
83
  {
83
- email: t.email,
84
+ email: n.email,
84
85
  displayName: o,
85
86
  className: "group-hover:brightness-125 group-data-[state=open]:brightness-125"
86
87
  }
@@ -88,65 +89,66 @@ function C({ className: r, ...n }) {
88
89
  }
89
90
  );
90
91
  }
91
- function A() {
92
+ function z() {
92
93
  return /* @__PURE__ */ e("span", { className: "tg-caption-bold text-neutral-20 shrink-0 rounded-full border border-neutral-50 px-2.5 py-0.5", children: "Upgrade" });
93
94
  }
94
- function z() {
95
+ function L() {
95
96
  const { user: r } = m();
96
97
  return /* @__PURE__ */ a("div", { className: "tg-button-small text-neutral-40 flex items-center gap-3 overflow-hidden px-4 py-2.5 select-text", children: [
97
98
  /* @__PURE__ */ e(p, { icon: "user", className: "size-4 flex-none" }),
98
99
  /* @__PURE__ */ e("p", { className: "tg-body min-w-0 truncate", children: r.email })
99
100
  ] });
100
101
  }
101
- function l({ href: r, icon: n, children: t }) {
102
- return /* @__PURE__ */ e(u, { asChild: !0, children: /* @__PURE__ */ a("a", { href: r, className: "flex items-center gap-3", children: [
103
- /* @__PURE__ */ e(p, { icon: n, className: "size-4 flex-none text-white" }),
104
- /* @__PURE__ */ e("p", { className: "tg-body", children: t })
102
+ function d({ icon: r, children: t, asChild: n, className: o, ...i }) {
103
+ const s = n ? g.Root : "a";
104
+ return /* @__PURE__ */ e(u, { asChild: !0, children: /* @__PURE__ */ a(s, { ...i, className: l("tg-body flex items-center gap-3", o), children: [
105
+ /* @__PURE__ */ e(p, { icon: r, className: "size-4 flex-none text-white" }),
106
+ /* @__PURE__ */ e(g.Slottable, { children: t })
105
107
  ] }) });
106
108
  }
107
- function L({ href: r }) {
108
- return /* @__PURE__ */ e(l, { href: r, icon: "sparkles", children: "Upgrade plan" });
109
- }
110
109
  function I({ href: r }) {
111
- return /* @__PURE__ */ e(l, { href: r, icon: "cog", children: "Account" });
110
+ return /* @__PURE__ */ e(d, { href: r, icon: "sparkles", children: "Upgrade plan" });
111
+ }
112
+ function S({ href: r }) {
113
+ return /* @__PURE__ */ e(d, { href: r, icon: "cog", children: "Account" });
112
114
  }
113
115
  function j({ href: r }) {
114
- return /* @__PURE__ */ e(l, { href: r, icon: "logout", children: "Log out" });
116
+ return /* @__PURE__ */ e(d, { href: r, icon: "logout", children: "Log out" });
115
117
  }
116
- function k({ loginUrl: r, signupUrl: n, className: t, children: o }) {
117
- return /* @__PURE__ */ a(w, { children: [
118
- /* @__PURE__ */ a("div", { className: s("hidden gap-3 sm:flex", t), children: [
119
- /* @__PURE__ */ e(g, { variant: "secondary", size: "medium", asChild: !0, children: /* @__PURE__ */ e("a", { href: r, children: "Log in" }) }),
120
- /* @__PURE__ */ e(g, { variant: "primary", size: "medium", asChild: !0, children: /* @__PURE__ */ e("a", { href: n, children: "Sign up" }) })
118
+ function k({ loginUrl: r, signupUrl: t, className: n, children: o }) {
119
+ return /* @__PURE__ */ a(v, { children: [
120
+ /* @__PURE__ */ a("div", { className: l("hidden gap-3 sm:flex", n), children: [
121
+ /* @__PURE__ */ e(h, { variant: "secondary", size: "medium", asChild: !0, children: /* @__PURE__ */ e("a", { href: r, children: "Log in" }) }),
122
+ /* @__PURE__ */ e(h, { variant: "primary", size: "medium", asChild: !0, children: /* @__PURE__ */ e("a", { href: t, children: "Sign up" }) })
121
123
  ] }),
122
124
  /* @__PURE__ */ a(
123
- h,
125
+ f,
124
126
  {
125
- trigger: /* @__PURE__ */ e("img", { className: "size-7 cursor-pointer sm:hidden", src: U, alt: "User avatar" }),
126
- className: s(
127
+ trigger: /* @__PURE__ */ e("img", { className: "size-7 cursor-pointer sm:hidden", src: D, alt: "User avatar" }),
128
+ className: l(
127
129
  "hover:bg-neutral-60 focus-visible:ring-neutral-60 data-[state=open]:bg-neutral-60 rounded-full outline-none focus-visible:ring-2 sm:hidden",
128
- t
130
+ n
129
131
  ),
130
132
  children: [
131
133
  /* @__PURE__ */ e(u, { asChild: !0, children: /* @__PURE__ */ e("a", { href: r, className: "tg-body", children: "Log in" }) }),
132
- /* @__PURE__ */ e(u, { asChild: !0, children: /* @__PURE__ */ e("a", { href: n, className: "tg-body", children: "Sign up" }) }),
134
+ /* @__PURE__ */ e(u, { asChild: !0, children: /* @__PURE__ */ e("a", { href: t, className: "tg-body", children: "Sign up" }) }),
133
135
  o
134
136
  ]
135
137
  }
136
138
  )
137
139
  ] });
138
140
  }
139
- const R = Object.assign(D, {
140
- Trigger: y,
141
- AvatarTrigger: C,
142
- UpgradeBadge: A,
143
- Email: z,
144
- Item: l,
145
- Upgrade: L,
146
- Account: I,
141
+ const G = Object.assign(y, {
142
+ Trigger: C,
143
+ AvatarTrigger: A,
144
+ UpgradeBadge: z,
145
+ Email: L,
146
+ Item: d,
147
+ Upgrade: I,
148
+ Account: S,
147
149
  Logout: j,
148
150
  LoggedOut: k
149
151
  });
150
152
  export {
151
- R as UserDropdown
153
+ G as UserDropdown
152
154
  };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@validationcloud/fractal-ui",
3
3
  "description": "Validation Cloud's shared React component library with design tokens, Tailwind CSS utilities, and CLI tools",
4
4
  "private": false,
5
- "version": "1.83.0",
5
+ "version": "1.85.0",
6
6
  "module": "./dist/index.js",
7
7
  "type": "module",
8
8
  "bin": {
@@ -58,72 +58,72 @@
58
58
  },
59
59
  "./maps.json": "./dist/maps.json"
60
60
  },
61
- "packageManager": "pnpm@10.28.0",
61
+ "packageManager": "pnpm@10.33.2",
62
62
  "engines": {
63
- "node": ">=22.14.0"
63
+ "node": ">=24"
64
64
  },
65
65
  "dependencies": {
66
66
  "@commander-js/extra-typings": "^14.0.0",
67
67
  "commander": "^14.0.3",
68
68
  "radix-ui": "^1.4.3",
69
- "react": "^19.2.3",
70
- "react-dom": "^19.2.3",
71
- "react-transition-state": "^2.3.2",
72
- "tailwind-merge": "^3.4.0",
73
- "zod": "^4.3.5"
69
+ "react": "^19.2.5",
70
+ "react-dom": "^19.2.5",
71
+ "react-transition-state": "^2.3.3",
72
+ "tailwind-merge": "^3.5.0",
73
+ "zod": "^4.3.6"
74
74
  },
75
75
  "optionalDependencies": {
76
76
  "echarts": "^6.0.0",
77
77
  "skia-canvas": "^3.0.8"
78
78
  },
79
79
  "devDependencies": {
80
- "@eslint/compat": "^2.0.1",
81
- "@eslint/js": "^9.39.2",
82
- "@storybook/addon-docs": "^10.1.11",
83
- "@storybook/addon-onboarding": "^10.1.11",
84
- "@storybook/react-vite": "^10.1.11",
85
- "@tailwindcss/postcss": "^4.1.18",
80
+ "@eslint/compat": "^2.0.5",
81
+ "@eslint/js": "^9.39.4",
82
+ "@storybook/addon-docs": "^10.3.5",
83
+ "@storybook/addon-onboarding": "^10.3.5",
84
+ "@storybook/react-vite": "^10.3.5",
85
+ "@tailwindcss/postcss": "^4.2.4",
86
86
  "@trivago/prettier-plugin-sort-imports": "^6.0.2",
87
- "@turf/difference": "^7.3.4",
88
- "@turf/helpers": "^7.3.4",
89
- "@turf/union": "^7.3.4",
87
+ "@turf/difference": "^7.3.5",
88
+ "@turf/helpers": "^7.3.5",
89
+ "@turf/union": "^7.3.5",
90
90
  "@types/culori": "^4.0.1",
91
91
  "@types/geojson": "^7946.0.16",
92
- "@types/node": "^24.10.7",
93
- "@types/react": "^19.2.8",
92
+ "@types/node": "^24.12.2",
93
+ "@types/react": "^19.2.14",
94
94
  "@types/react-dom": "^19.2.3",
95
95
  "@types/topojson-client": "^3.1.5",
96
96
  "@types/topojson-server": "^3.0.4",
97
97
  "@types/topojson-simplify": "^3.0.3",
98
98
  "@types/topojson-specification": "^1.0.5",
99
- "@vitejs/plugin-react": "^5.1.2",
99
+ "@vitejs/plugin-react": "^5.2.0",
100
100
  "culori": "^4.0.2",
101
- "eslint": "^9.39.2",
101
+ "eslint": "^9.39.4",
102
102
  "eslint-config-prettier": "^10.1.8",
103
- "eslint-plugin-react-hooks": "^7.0.1",
103
+ "eslint-plugin-react-hooks": "^7.1.1",
104
104
  "eslint-plugin-react-refresh": "^0.4.26",
105
- "eslint-plugin-storybook": "^10.1.11",
105
+ "eslint-plugin-storybook": "^10.3.5",
106
106
  "extract-zip": "^2.0.1",
107
107
  "globals": "^16.5.0",
108
- "knip": "^5.82.1",
109
- "postcss": "^8.5.6",
108
+ "knip": "^6.7.0",
109
+ "postcss": "^8.5.12",
110
110
  "prettier": "3.7.4",
111
- "prettier-plugin-tailwindcss": "^0.7.2",
111
+ "prettier-plugin-tailwindcss": "^0.7.4",
112
112
  "rollup-plugin-analyzer": "^4.0.0",
113
113
  "rollup-plugin-copy": "^3.5.0",
114
114
  "rollup-preserve-directives": "^1.1.3",
115
- "semantic-release": "^25.0.2",
115
+ "semantic-release": "^25.0.3",
116
116
  "shapefile": "^0.6.6",
117
- "storybook": "^10.1.11",
118
- "tailwindcss": "^4.1.18",
117
+ "storybook": "^10.3.5",
118
+ "tailwindcss": "^4.2.4",
119
119
  "topojson-client": "^3.1.0",
120
120
  "topojson-server": "^3.0.1",
121
121
  "topojson-simplify": "^3.0.3",
122
122
  "typescript": "^5.9.3",
123
- "typescript-eslint": "^8.52.0",
124
- "vite": "^7.3.1",
123
+ "typescript-eslint": "^8.59.1",
124
+ "vite": "^7.3.2",
125
125
  "vite-plugin-dts": "^4.5.4",
126
- "vitest": "^4.0.16"
126
+ "vitest": "^4.1.5"
127
127
  },
128
128
  "peerDependencies": {
129
129
  "@radix-ui/react-compose-refs": "^1",