@validationcloud/fractal-ui 1.73.0 → 1.74.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.
|
@@ -3,7 +3,7 @@ import { FormatterTemplate, FormatterToken } from './formatter-tokens';
|
|
|
3
3
|
* ECharts formatter function signature.
|
|
4
4
|
* Accepts a numeric value (or string that can be converted to number) and returns formatted string.
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
type EChartsFormatter = (value: number | string) => string;
|
|
7
7
|
/**
|
|
8
8
|
* Retrieves the formatter function for a given token.
|
|
9
9
|
*/
|
|
@@ -28,7 +28,7 @@ type EChartsParams = {
|
|
|
28
28
|
/**
|
|
29
29
|
* Formatter function that receives ECharts params object.
|
|
30
30
|
*/
|
|
31
|
-
|
|
31
|
+
type EChartsParamsFormatter = (params: EChartsParams) => string;
|
|
32
32
|
/**
|
|
33
33
|
* Creates a params-based formatter for series/edge labels.
|
|
34
34
|
* Extracts params.value and applies the token formatter.
|
|
@@ -3,7 +3,7 @@ import { EChartsOption } from 'echarts';
|
|
|
3
3
|
* Input type that allows formatter tokens (strings) where ECharts expects functions.
|
|
4
4
|
* This is needed because JSON options will have string tokens that get replaced.
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
type EChartsOptionWithTokens = Record<string, unknown>;
|
|
7
7
|
/**
|
|
8
8
|
* Replaces formatter token strings with actual formatter functions.
|
|
9
9
|
*
|
|
@@ -28,3 +28,4 @@ export type EChartsOptionWithTokens = Record<string, unknown>;
|
|
|
28
28
|
* ```
|
|
29
29
|
*/
|
|
30
30
|
export declare function replaceFormatterTokens(options: EChartsOptionWithTokens): EChartsOption;
|
|
31
|
+
export {};
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { jsxs as r, Fragment as p, jsx as e } from "react/jsx-runtime";
|
|
3
3
|
import "react";
|
|
4
4
|
import h from "../../assets/default-avatar.svg.js";
|
|
5
|
-
import { Button as
|
|
5
|
+
import { Button as u } from "../button/button.js";
|
|
6
6
|
import { DropdownMenu as f, DropdownMenuItem as i } from "../dropdown-menu/dropdown-menu.js";
|
|
7
|
-
import { Icon as
|
|
8
|
-
import { twMerge as
|
|
7
|
+
import { Icon as t } from "../icon/icon.js";
|
|
8
|
+
import { twMerge as a } from "../../lib/tailwind-merge.js";
|
|
9
9
|
function C({
|
|
10
10
|
user: l,
|
|
11
11
|
loginUrl: o,
|
|
@@ -14,7 +14,7 @@ function C({
|
|
|
14
14
|
accountUrl: c,
|
|
15
15
|
contactItem: n,
|
|
16
16
|
className: s,
|
|
17
|
-
...
|
|
17
|
+
...m
|
|
18
18
|
}) {
|
|
19
19
|
return l ? /* @__PURE__ */ r(
|
|
20
20
|
f,
|
|
@@ -27,39 +27,39 @@ function C({
|
|
|
27
27
|
children: /* @__PURE__ */ e("img", { className: "size-7 rounded-full sm:size-9", src: l.picture ?? h, alt: "User avatar" })
|
|
28
28
|
}
|
|
29
29
|
),
|
|
30
|
-
className:
|
|
30
|
+
className: a("tg-caption-bold -mx-2 rounded-xl px-2 py-1", s),
|
|
31
31
|
contentClassName: "bg-neutral-60",
|
|
32
|
-
...
|
|
32
|
+
...m,
|
|
33
33
|
children: [
|
|
34
|
-
/* @__PURE__ */ r(
|
|
35
|
-
/* @__PURE__ */ e(
|
|
34
|
+
/* @__PURE__ */ r("div", { className: "tg-button-small text-neutral-40 flex items-center gap-3 px-4 py-2.5 select-text", children: [
|
|
35
|
+
/* @__PURE__ */ e(t, { icon: "user", className: "size-4 flex-none" }),
|
|
36
36
|
/* @__PURE__ */ e("p", { className: "tg-body", children: l.email })
|
|
37
37
|
] }),
|
|
38
38
|
c && /* @__PURE__ */ e(i, { asChild: !0, children: /* @__PURE__ */ r("a", { href: c, className: "flex items-center gap-3", children: [
|
|
39
|
-
/* @__PURE__ */ e(
|
|
39
|
+
/* @__PURE__ */ e(t, { icon: "cog", className: "size-4 flex-none text-white" }),
|
|
40
40
|
/* @__PURE__ */ e("p", { className: "tg-body", children: "Account" })
|
|
41
41
|
] }) }),
|
|
42
42
|
n && /* @__PURE__ */ e(i, { asChild: !0, children: n }),
|
|
43
43
|
/* @__PURE__ */ e(i, { asChild: !0, children: /* @__PURE__ */ r("a", { href: g, className: "flex items-center gap-3", children: [
|
|
44
|
-
/* @__PURE__ */ e(
|
|
44
|
+
/* @__PURE__ */ e(t, { icon: "logout", className: "size-4 flex-none text-white" }),
|
|
45
45
|
/* @__PURE__ */ e("p", { className: "tg-body", children: "Log out" })
|
|
46
46
|
] }) })
|
|
47
47
|
]
|
|
48
48
|
}
|
|
49
49
|
) : /* @__PURE__ */ r(p, { children: [
|
|
50
|
-
/* @__PURE__ */ r("div", { className:
|
|
51
|
-
/* @__PURE__ */ e(
|
|
52
|
-
/* @__PURE__ */ e(
|
|
50
|
+
/* @__PURE__ */ r("div", { className: a("hidden gap-3 sm:flex", s), children: [
|
|
51
|
+
/* @__PURE__ */ e(u, { variant: "secondary", size: "medium", asChild: !0, children: /* @__PURE__ */ e("a", { href: o, children: "Log in" }) }),
|
|
52
|
+
/* @__PURE__ */ e(u, { variant: "primary", size: "medium", asChild: !0, children: /* @__PURE__ */ e("a", { href: d, children: "Sign up" }) })
|
|
53
53
|
] }),
|
|
54
54
|
/* @__PURE__ */ r(
|
|
55
55
|
f,
|
|
56
56
|
{
|
|
57
57
|
trigger: /* @__PURE__ */ e("img", { className: "size-7 cursor-pointer sm:hidden", src: h, alt: "User avatar" }),
|
|
58
|
-
className:
|
|
58
|
+
className: a(
|
|
59
59
|
"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",
|
|
60
60
|
s
|
|
61
61
|
),
|
|
62
|
-
...
|
|
62
|
+
...m,
|
|
63
63
|
children: [
|
|
64
64
|
/* @__PURE__ */ e(i, { asChild: !0, children: /* @__PURE__ */ e("a", { href: o, className: "tg-body", children: "Log in" }) }),
|
|
65
65
|
/* @__PURE__ */ e(i, { asChild: !0, children: /* @__PURE__ */ e("a", { href: d, className: "tg-body", children: "Sign up" }) }),
|