@ledgerhq/lumen-ui-react 0.1.40 → 0.1.41
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.
- package/dist/lib/Components/Banner/Banner.js +4 -4
- package/dist/lib/Components/Banner/types.d.ts +2 -2
- package/dist/lib/Components/Banner/types.d.ts.map +1 -1
- package/dist/lib/Components/Trend/Trend.d.ts.map +1 -1
- package/dist/lib/Components/Trend/Trend.js +51 -34
- package/dist/package.json +2 -2
- package/package.json +1 -1
|
@@ -36,7 +36,7 @@ const k = {
|
|
|
36
36
|
closeAriaLabel: f,
|
|
37
37
|
...p
|
|
38
38
|
}) => {
|
|
39
|
-
const { t:
|
|
39
|
+
const { t: x } = g(), d = k[s];
|
|
40
40
|
return /* @__PURE__ */ e(
|
|
41
41
|
"div",
|
|
42
42
|
{
|
|
@@ -44,13 +44,13 @@ const k = {
|
|
|
44
44
|
className: c(F.root({ appearance: s }), t),
|
|
45
45
|
...p,
|
|
46
46
|
children: [
|
|
47
|
-
/* @__PURE__ */ r("div", { className: "flex shrink-0 items-start py-4", children:
|
|
47
|
+
/* @__PURE__ */ r("div", { className: "flex shrink-0 items-start py-4", children: d }),
|
|
48
48
|
/* @__PURE__ */ e("div", { className: "mr-8 flex flex-1 flex-col gap-8 py-4", children: [
|
|
49
49
|
/* @__PURE__ */ e("div", { className: "flex flex-col gap-4", children: [
|
|
50
50
|
a && /* @__PURE__ */ r("h3", { className: "line-clamp-2 body-1-semi-bold", children: a }),
|
|
51
51
|
o && /* @__PURE__ */ r("div", { className: c("line-clamp-5 body-2", !a && "mt-2"), children: o })
|
|
52
52
|
] }),
|
|
53
|
-
(l || n) && /* @__PURE__ */ e("div", { className: "flex gap-4", children: [
|
|
53
|
+
(l || n) && /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-4", children: [
|
|
54
54
|
l,
|
|
55
55
|
n
|
|
56
56
|
] })
|
|
@@ -62,7 +62,7 @@ const k = {
|
|
|
62
62
|
size: "xs",
|
|
63
63
|
icon: h,
|
|
64
64
|
onClick: () => i(),
|
|
65
|
-
"aria-label": f ||
|
|
65
|
+
"aria-label": f || x("components.banner.closeAriaLabel")
|
|
66
66
|
}
|
|
67
67
|
)
|
|
68
68
|
]
|
|
@@ -8,11 +8,11 @@ export type BannerProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
8
8
|
/**
|
|
9
9
|
* The main title of the banner.
|
|
10
10
|
*/
|
|
11
|
-
title?:
|
|
11
|
+
title?: ReactNode;
|
|
12
12
|
/**
|
|
13
13
|
* Optional descriptive text.
|
|
14
14
|
*/
|
|
15
|
-
description?:
|
|
15
|
+
description?: ReactNode;
|
|
16
16
|
/**
|
|
17
17
|
* Optional primary action.
|
|
18
18
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Banner/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9E,MAAM,MAAM,WAAW,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IACzD;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IACtD;;OAEG;IACH,KAAK,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Banner/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9E,MAAM,MAAM,WAAW,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IACzD;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IACtD;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;;OAGG;IACH,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B;;OAEG;IACH,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Trend.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Trend/Trend.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Trend.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Trend/Trend.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AA+C1C,wBAAgB,KAAK,CAAC,EACpB,KAAK,EACL,IAAW,EACX,QAAQ,EAAE,YAAoB,EAC9B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,UAAU,2CAyBZ"}
|
|
@@ -1,50 +1,67 @@
|
|
|
1
|
-
import { jsxs as c, jsx as
|
|
2
|
-
import { useDisabledContext as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { jsxs as c, jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { useDisabledContext as f, cn as p } from "../../../libs/utils-shared/dist/index.js";
|
|
3
|
+
import { cva as b } from "class-variance-authority";
|
|
4
|
+
import { useCommonTranslation as v } from "../../../i18n/useCommonTranslation.js";
|
|
5
5
|
import { TriangleDown as g } from "../../Symbols/Icons/TriangleDown.js";
|
|
6
|
-
import { TriangleUp as
|
|
7
|
-
function
|
|
8
|
-
return
|
|
6
|
+
import { TriangleUp as x } from "../../Symbols/Icons/TriangleUp.js";
|
|
7
|
+
function V(e) {
|
|
8
|
+
return e === 0 ? "neutral" : e > 0 ? "positive" : "negative";
|
|
9
9
|
}
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
const T = b("inline-flex items-center", {
|
|
11
|
+
variants: {
|
|
12
|
+
size: {
|
|
13
|
+
md: "body-2 gap-2",
|
|
14
|
+
sm: "body-3 gap-2"
|
|
15
|
+
},
|
|
16
|
+
variant: {
|
|
17
|
+
positive: "",
|
|
18
|
+
negative: "",
|
|
19
|
+
neutral: ""
|
|
20
|
+
},
|
|
21
|
+
disabled: {
|
|
22
|
+
true: "text-disabled",
|
|
23
|
+
false: ""
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
compoundVariants: [
|
|
27
|
+
{ variant: "positive", disabled: !1, class: "text-success" },
|
|
28
|
+
{ variant: "negative", disabled: !1, class: "text-error" },
|
|
29
|
+
{ variant: "neutral", disabled: !1, class: "text-muted" }
|
|
30
|
+
],
|
|
31
|
+
defaultVariants: {
|
|
32
|
+
size: "md",
|
|
33
|
+
disabled: !1
|
|
34
|
+
}
|
|
35
|
+
}), h = {
|
|
18
36
|
md: 16,
|
|
19
37
|
sm: 12
|
|
38
|
+
}, z = {
|
|
39
|
+
positive: x,
|
|
40
|
+
negative: g,
|
|
41
|
+
neutral: null
|
|
20
42
|
};
|
|
21
43
|
function M({
|
|
22
|
-
value:
|
|
23
|
-
size:
|
|
24
|
-
disabled:
|
|
25
|
-
className:
|
|
26
|
-
...
|
|
44
|
+
value: e,
|
|
45
|
+
size: s = "md",
|
|
46
|
+
disabled: r = !1,
|
|
47
|
+
className: o,
|
|
48
|
+
...l
|
|
27
49
|
}) {
|
|
28
|
-
const
|
|
50
|
+
const t = V(e), n = f({
|
|
29
51
|
consumerName: "Trend",
|
|
30
|
-
mergeWith: { disabled:
|
|
31
|
-
}), { t:
|
|
52
|
+
mergeWith: { disabled: r }
|
|
53
|
+
}), { t: d } = v(), i = z[t], a = `${Math.abs(e).toFixed(2)}%`, m = e < 0 ? `-${a}` : a;
|
|
32
54
|
return /* @__PURE__ */ c(
|
|
33
55
|
"span",
|
|
34
56
|
{
|
|
35
|
-
"aria-label":
|
|
36
|
-
value:
|
|
57
|
+
"aria-label": d(`components.trend.${t}AriaLabel`, {
|
|
58
|
+
value: a
|
|
37
59
|
}),
|
|
38
|
-
className:
|
|
39
|
-
|
|
40
|
-
h[o],
|
|
41
|
-
r ? "text-disabled" : C[e],
|
|
42
|
-
a
|
|
43
|
-
),
|
|
44
|
-
...i,
|
|
60
|
+
className: p(T({ size: s, variant: t, disabled: n }), o),
|
|
61
|
+
...l,
|
|
45
62
|
children: [
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
|
|
63
|
+
i && /* @__PURE__ */ u(i, { size: h[s], disabled: n }),
|
|
64
|
+
m
|
|
48
65
|
]
|
|
49
66
|
}
|
|
50
67
|
);
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/lumen-ui-react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.40",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"keywords": [
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
55
55
|
"class-variance-authority": "^0.7.1",
|
|
56
56
|
"@tanstack/react-table": "^8.21.3",
|
|
57
|
-
"@ledgerhq/lumen-design-core": "0.1.
|
|
57
|
+
"@ledgerhq/lumen-design-core": "0.1.17",
|
|
58
58
|
"clsx": "^2.1.1",
|
|
59
59
|
"react": "^18.0.0 || ^19.0.0",
|
|
60
60
|
"react-dom": "^18.0.0 || ^19.0.0",
|