@ledgerhq/lumen-ui-react 0.0.79 → 0.0.81
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/i18n/locales/de.json.d.ts +4 -0
- package/dist/i18n/locales/de.json.js +4 -4
- package/dist/i18n/locales/en.json.d.ts +8 -0
- package/dist/i18n/locales/en.json.js +1 -1
- package/dist/i18n/locales/es.json.d.ts +4 -0
- package/dist/i18n/locales/es.json.js +1 -1
- package/dist/i18n/locales/fr.json.d.ts +8 -0
- package/dist/i18n/locales/fr.json.js +1 -1
- package/dist/i18n/locales/ja.json.d.ts +4 -0
- package/dist/i18n/locales/ja.json.js +1 -1
- package/dist/i18n/locales/ko.json.d.ts +4 -0
- package/dist/i18n/locales/ko.json.js +1 -1
- package/dist/i18n/locales/pt.json.d.ts +4 -0
- package/dist/i18n/locales/pt.json.js +1 -1
- package/dist/i18n/locales/ru.json.d.ts +4 -0
- package/dist/i18n/locales/ru.json.js +1 -1
- package/dist/i18n/locales/th.json.d.ts +4 -0
- package/dist/i18n/locales/th.json.js +1 -1
- package/dist/i18n/locales/tr.json.d.ts +4 -0
- package/dist/i18n/locales/tr.json.js +1 -1
- package/dist/i18n/locales/zh.json.d.ts +4 -0
- package/dist/i18n/locales/zh.json.js +1 -1
- package/dist/index.js +109 -90
- package/dist/lib/Components/AmountInput/AmountInput.js +14 -14
- package/dist/lib/Components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/lib/Components/Avatar/Avatar.js +50 -33
- package/dist/lib/Components/Avatar/types.d.ts +0 -1
- package/dist/lib/Components/Avatar/types.d.ts.map +1 -1
- package/dist/lib/Components/Banner/Banner.js +2 -2
- package/dist/lib/Components/BaseInput/BaseInput.js +9 -9
- package/dist/lib/Components/CardButton/CardButton.d.ts.map +1 -1
- package/dist/lib/Components/CardButton/CardButton.js +9 -9
- package/dist/lib/Components/Dialog/Dialog.js +2 -2
- package/dist/lib/Components/Menu/Menu.js +4 -4
- package/dist/lib/Components/PageIndicator/PageIndicator.d.ts +11 -0
- package/dist/lib/Components/PageIndicator/PageIndicator.d.ts.map +1 -0
- package/dist/lib/Components/PageIndicator/PageIndicator.js +88 -0
- package/dist/lib/Components/PageIndicator/index.d.ts +3 -0
- package/dist/lib/Components/PageIndicator/index.d.ts.map +1 -0
- package/dist/lib/Components/PageIndicator/types.d.ts +12 -0
- package/dist/lib/Components/PageIndicator/types.d.ts.map +1 -0
- package/dist/lib/Components/Select/Select.js +4 -4
- package/dist/lib/Components/SideBar/SideBar.js +16 -16
- package/dist/lib/Components/Skeleton/Skeleton.d.ts +1 -1
- package/dist/lib/Components/Skeleton/Skeleton.d.ts.map +1 -1
- package/dist/lib/Components/Skeleton/Skeleton.js +78 -27
- package/dist/lib/Components/Skeleton/types.d.ts +1 -1
- package/dist/lib/Components/Skeleton/types.d.ts.map +1 -1
- package/dist/lib/Components/Spot/Spot.d.ts +1 -1
- package/dist/lib/Components/Spot/Spot.d.ts.map +1 -1
- package/dist/lib/Components/Spot/Spot.js +27 -25
- package/dist/lib/Components/Subheader/Subheader.d.ts.map +1 -1
- package/dist/lib/Components/Subheader/Subheader.js +13 -5
- package/dist/lib/Components/Table/Table.d.ts +158 -0
- package/dist/lib/Components/Table/Table.d.ts.map +1 -0
- package/dist/lib/Components/Table/Table.js +390 -0
- package/dist/lib/Components/Table/constants.d.ts +3 -0
- package/dist/lib/Components/Table/constants.d.ts.map +1 -0
- package/dist/lib/Components/Table/constants.js +5 -0
- package/dist/lib/Components/Table/index.d.ts +3 -0
- package/dist/lib/Components/Table/index.d.ts.map +1 -0
- package/dist/lib/Components/Table/types.d.ts +245 -0
- package/dist/lib/Components/Table/types.d.ts.map +1 -0
- package/dist/lib/Components/Table/utils/useThrottledScrollBottom.d.ts +39 -0
- package/dist/lib/Components/Table/utils/useThrottledScrollBottom.d.ts.map +1 -0
- package/dist/lib/Components/Table/utils/useThrottledScrollBottom.js +39 -0
- package/dist/lib/Components/Tile/Tile.js +9 -9
- package/dist/lib/Components/TileButton/TileButton.js +5 -5
- package/dist/lib/Components/index.d.ts +2 -0
- package/dist/lib/Components/index.d.ts.map +1 -1
- package/dist/lib/Symbols/Icons/Chart5.d.ts +26 -0
- package/dist/lib/Symbols/Icons/Chart5.d.ts.map +1 -0
- package/dist/lib/Symbols/Icons/Chart5.js +39 -0
- package/dist/lib/Symbols/Icons/Chart5Fill.d.ts +26 -0
- package/dist/lib/Symbols/Icons/Chart5Fill.d.ts.map +1 -0
- package/dist/lib/Symbols/Icons/Chart5Fill.js +25 -0
- package/dist/lib/Symbols/Icons/CurveDown.d.ts +26 -0
- package/dist/lib/Symbols/Icons/CurveDown.d.ts.map +1 -0
- package/dist/lib/Symbols/Icons/CurveDown.js +63 -0
- package/dist/lib/Symbols/Icons/CurveUp.d.ts +26 -0
- package/dist/lib/Symbols/Icons/CurveUp.d.ts.map +1 -0
- package/dist/lib/Symbols/Icons/CurveUp.js +62 -0
- package/dist/lib/Symbols/Icons/Target.d.ts +26 -0
- package/dist/lib/Symbols/Icons/Target.d.ts.map +1 -0
- package/dist/lib/Symbols/Icons/Target.js +28 -0
- package/dist/lib/Symbols/index.d.ts +5 -0
- package/dist/lib/Symbols/index.d.ts.map +1 -1
- package/dist/lib/Symbols/index.js +448 -438
- package/dist/libs/utils-shared/dist/index.js +101 -54
- package/dist/package.json +4 -3
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/types.d.ts +2 -0
- package/dist/types/types.d.ts.map +1 -0
- package/package.json +5 -4
|
@@ -1,76 +1,123 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createContext as
|
|
3
|
-
import { clsx as
|
|
4
|
-
import { twMerge as
|
|
5
|
-
function
|
|
6
|
-
return
|
|
1
|
+
import { jsx as j } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as y, useMemo as N, useContext as O } from "react";
|
|
3
|
+
import { clsx as q } from "clsx";
|
|
4
|
+
import { twMerge as z } from "tailwind-merge";
|
|
5
|
+
function J(l) {
|
|
6
|
+
return l ? l.split(/[-_ ]+/).map((n) => n.charAt(0).toUpperCase() + n.slice(1).toLowerCase()).join("") : "";
|
|
7
7
|
}
|
|
8
|
-
const
|
|
9
|
-
function
|
|
10
|
-
const n =
|
|
8
|
+
const E = 48, F = 17, R = 2;
|
|
9
|
+
function K(l) {
|
|
10
|
+
const n = l.replace(/\D/g, "").length;
|
|
11
11
|
return Math.max(
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
F,
|
|
13
|
+
E - n * R
|
|
14
14
|
);
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
if (!
|
|
18
|
-
const
|
|
19
|
-
return
|
|
16
|
+
function C(l, n = !0) {
|
|
17
|
+
if (!l) return "";
|
|
18
|
+
const f = l.includes("."), [s, u] = l.split("."), i = s.replace(/\B(?=(\d{3})+(?!\d))/g, " ");
|
|
19
|
+
return f && n ? u ? `${i}.${u}` : `${i}.` : i;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function U(l, n = {}) {
|
|
22
22
|
const {
|
|
23
|
-
allowDecimals:
|
|
24
|
-
thousandsSeparator:
|
|
25
|
-
maxIntegerLength:
|
|
26
|
-
maxDecimalLength:
|
|
27
|
-
} = n,
|
|
28
|
-
let e =
|
|
29
|
-
if (e = e.replace(/^0+(?=\d)/, ""), !
|
|
30
|
-
return e = e.replace(/\D/g, ""),
|
|
23
|
+
allowDecimals: f = !0,
|
|
24
|
+
thousandsSeparator: s = !0,
|
|
25
|
+
maxIntegerLength: u = 9,
|
|
26
|
+
maxDecimalLength: i = 9
|
|
27
|
+
} = n, t = l.replace(",", ".").replace(/[^\d.]/g, "");
|
|
28
|
+
let e = t;
|
|
29
|
+
if (e = e.replace(/^0+(?=\d)/, ""), !f)
|
|
30
|
+
return e = e.replace(/\D/g, ""), u > 0 && e.length > u && (e = e.slice(0, u)), s ? C(e) : e;
|
|
31
31
|
e === "." && (e = "0.");
|
|
32
|
-
const
|
|
33
|
-
if (
|
|
34
|
-
let
|
|
35
|
-
|
|
36
|
-
const
|
|
37
|
-
e =
|
|
32
|
+
const c = e.indexOf(".");
|
|
33
|
+
if (c !== -1) {
|
|
34
|
+
let o = e.slice(0, c), a = e.slice(c + 1).replace(/\./g, "");
|
|
35
|
+
u > 0 && o.length > u && (o = o.slice(0, u)), a = a.slice(0, i), o === "" && (o = "0");
|
|
36
|
+
const d = t.endsWith(".") || e.endsWith(".");
|
|
37
|
+
e = a.length > 0 ? `${o}.${a}` : d ? `${o}.` : o;
|
|
38
38
|
} else
|
|
39
|
-
|
|
40
|
-
return
|
|
39
|
+
u > 0 && e.length > u && (e = e.slice(0, u));
|
|
40
|
+
return s ? C(e) : e;
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
const
|
|
44
|
-
const e =
|
|
45
|
-
() =>
|
|
46
|
-
Object.values(
|
|
42
|
+
function V(l, n) {
|
|
43
|
+
const f = y(n), s = ({ children: i, value: t }) => {
|
|
44
|
+
const e = N(
|
|
45
|
+
() => t,
|
|
46
|
+
Object.values(t ?? {})
|
|
47
47
|
);
|
|
48
|
-
return /* @__PURE__ */
|
|
48
|
+
return /* @__PURE__ */ j(f.Provider, { value: e, children: i });
|
|
49
49
|
};
|
|
50
|
-
|
|
51
|
-
function
|
|
52
|
-
consumerName:
|
|
53
|
-
contextRequired:
|
|
50
|
+
s.displayName = l + "Provider";
|
|
51
|
+
function u({
|
|
52
|
+
consumerName: i,
|
|
53
|
+
contextRequired: t
|
|
54
54
|
}) {
|
|
55
|
-
const e =
|
|
55
|
+
const e = O(f);
|
|
56
56
|
if (e)
|
|
57
57
|
return e;
|
|
58
|
-
if (
|
|
58
|
+
if (t)
|
|
59
59
|
throw new Error(
|
|
60
|
-
`${
|
|
60
|
+
`${i} must be used within ${l}`
|
|
61
61
|
);
|
|
62
62
|
return n || {};
|
|
63
63
|
}
|
|
64
|
-
return [
|
|
64
|
+
return [s, u];
|
|
65
65
|
}
|
|
66
|
-
function
|
|
67
|
-
return
|
|
66
|
+
function _(...l) {
|
|
67
|
+
return z(q(l));
|
|
68
|
+
}
|
|
69
|
+
function A(l, n, f = {}) {
|
|
70
|
+
const { leading: s = !1, trailing: u = !0, maxWait: i } = f;
|
|
71
|
+
let t = null, e = null, c = null, o = 0, a = null, d = null, g;
|
|
72
|
+
const x = i !== void 0, D = x ? Math.max(i, n) : 0, T = (r) => {
|
|
73
|
+
o = r;
|
|
74
|
+
const m = a, p = d;
|
|
75
|
+
return a = null, d = null, g = l.apply(p, m), g;
|
|
76
|
+
}, b = (r) => {
|
|
77
|
+
const m = c ? r - c : 0;
|
|
78
|
+
return n - m;
|
|
79
|
+
}, $ = (r) => {
|
|
80
|
+
const m = c ? r - c : n, p = r - o;
|
|
81
|
+
return c === null || m >= n || m < 0 || x && p >= D;
|
|
82
|
+
}, v = (r) => (t = null, u && a ? T(r) : (a = null, d = null, g)), h = () => {
|
|
83
|
+
const r = Date.now();
|
|
84
|
+
if ($(r)) {
|
|
85
|
+
v(r);
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
t = setTimeout(h, b(r));
|
|
89
|
+
}, L = () => {
|
|
90
|
+
const r = Date.now();
|
|
91
|
+
e = null, a && (T(r), t !== null && (clearTimeout(t), t = setTimeout(h, n)));
|
|
92
|
+
}, M = (r) => (o = r, t = setTimeout(h, n), x && (e = setTimeout(L, D)), s ? T(r) : g), P = () => {
|
|
93
|
+
t !== null && clearTimeout(t), e !== null && clearTimeout(e), o = 0, a = null, d = null, c = null, t = null, e = null;
|
|
94
|
+
}, S = () => t === null && e === null ? g : v(Date.now()), W = () => t !== null || e !== null, w = function(...r) {
|
|
95
|
+
const m = Date.now(), p = $(m);
|
|
96
|
+
if (a = r, d = this, c = m, p) {
|
|
97
|
+
if (t === null)
|
|
98
|
+
return M(m);
|
|
99
|
+
if (x)
|
|
100
|
+
return clearTimeout(t), t = setTimeout(h, n), T(m);
|
|
101
|
+
}
|
|
102
|
+
return t === null && (t = setTimeout(h, n)), g;
|
|
103
|
+
};
|
|
104
|
+
return w.cancel = P, w.flush = S, w.pending = W, w;
|
|
105
|
+
}
|
|
106
|
+
function k(l, n, f = {}) {
|
|
107
|
+
const { leading: s = !0, trailing: u = !0 } = f;
|
|
108
|
+
return A(l, n, {
|
|
109
|
+
leading: s,
|
|
110
|
+
trailing: u,
|
|
111
|
+
maxWait: n
|
|
112
|
+
});
|
|
68
113
|
}
|
|
69
114
|
export {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
115
|
+
_ as cn,
|
|
116
|
+
V as createSafeContext,
|
|
117
|
+
A as debounce,
|
|
118
|
+
C as formatThousands,
|
|
119
|
+
K as getFontSize,
|
|
120
|
+
U as textFormatter,
|
|
121
|
+
k as throttle,
|
|
122
|
+
J as toPascalCase
|
|
76
123
|
};
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/lumen-ui-react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.80",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"keywords": [
|
|
@@ -48,12 +48,13 @@
|
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"@radix-ui/react-checkbox": "^1.3.2",
|
|
50
50
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
51
|
+
"@radix-ui/react-dropdown-menu": "^2.1.2",
|
|
52
|
+
"@radix-ui/react-select": "^2.2.6",
|
|
51
53
|
"@radix-ui/react-slot": "^1.2.3",
|
|
52
54
|
"@radix-ui/react-switch": "^1.2.6",
|
|
53
|
-
"@radix-ui/react-select": "^2.2.6",
|
|
54
55
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
55
|
-
"@radix-ui/react-dropdown-menu": "^2.1.2",
|
|
56
56
|
"class-variance-authority": "^0.7.1",
|
|
57
|
+
"@tanstack/react-table": "^8.21.3",
|
|
57
58
|
"clsx": "^2.1.1",
|
|
58
59
|
"react": "^18.0.0 || ^19.0.0",
|
|
59
60
|
"react-dom": "^18.0.0 || ^19.0.0",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/lumen-ui-react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.81",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"keywords": [
|
|
@@ -41,19 +41,20 @@
|
|
|
41
41
|
]
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@ledgerhq/lumen-utils-shared": "0.0.
|
|
44
|
+
"@ledgerhq/lumen-utils-shared": "0.0.18",
|
|
45
45
|
"i18next": "^23.7.0",
|
|
46
46
|
"react-i18next": "^14.0.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"@radix-ui/react-checkbox": "^1.3.2",
|
|
50
50
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
51
|
+
"@radix-ui/react-dropdown-menu": "^2.1.2",
|
|
52
|
+
"@radix-ui/react-select": "^2.2.6",
|
|
51
53
|
"@radix-ui/react-slot": "^1.2.3",
|
|
52
54
|
"@radix-ui/react-switch": "^1.2.6",
|
|
53
|
-
"@radix-ui/react-select": "^2.2.6",
|
|
54
55
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
55
|
-
"@radix-ui/react-dropdown-menu": "^2.1.2",
|
|
56
56
|
"class-variance-authority": "^0.7.1",
|
|
57
|
+
"@tanstack/react-table": "^8.21.3",
|
|
57
58
|
"clsx": "^2.1.1",
|
|
58
59
|
"react": "^18.0.0 || ^19.0.0",
|
|
59
60
|
"react-dom": "^18.0.0 || ^19.0.0",
|