@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.
Files changed (95) hide show
  1. package/dist/i18n/locales/de.json.d.ts +4 -0
  2. package/dist/i18n/locales/de.json.js +4 -4
  3. package/dist/i18n/locales/en.json.d.ts +8 -0
  4. package/dist/i18n/locales/en.json.js +1 -1
  5. package/dist/i18n/locales/es.json.d.ts +4 -0
  6. package/dist/i18n/locales/es.json.js +1 -1
  7. package/dist/i18n/locales/fr.json.d.ts +8 -0
  8. package/dist/i18n/locales/fr.json.js +1 -1
  9. package/dist/i18n/locales/ja.json.d.ts +4 -0
  10. package/dist/i18n/locales/ja.json.js +1 -1
  11. package/dist/i18n/locales/ko.json.d.ts +4 -0
  12. package/dist/i18n/locales/ko.json.js +1 -1
  13. package/dist/i18n/locales/pt.json.d.ts +4 -0
  14. package/dist/i18n/locales/pt.json.js +1 -1
  15. package/dist/i18n/locales/ru.json.d.ts +4 -0
  16. package/dist/i18n/locales/ru.json.js +1 -1
  17. package/dist/i18n/locales/th.json.d.ts +4 -0
  18. package/dist/i18n/locales/th.json.js +1 -1
  19. package/dist/i18n/locales/tr.json.d.ts +4 -0
  20. package/dist/i18n/locales/tr.json.js +1 -1
  21. package/dist/i18n/locales/zh.json.d.ts +4 -0
  22. package/dist/i18n/locales/zh.json.js +1 -1
  23. package/dist/index.js +109 -90
  24. package/dist/lib/Components/AmountInput/AmountInput.js +14 -14
  25. package/dist/lib/Components/Avatar/Avatar.d.ts.map +1 -1
  26. package/dist/lib/Components/Avatar/Avatar.js +50 -33
  27. package/dist/lib/Components/Avatar/types.d.ts +0 -1
  28. package/dist/lib/Components/Avatar/types.d.ts.map +1 -1
  29. package/dist/lib/Components/Banner/Banner.js +2 -2
  30. package/dist/lib/Components/BaseInput/BaseInput.js +9 -9
  31. package/dist/lib/Components/CardButton/CardButton.d.ts.map +1 -1
  32. package/dist/lib/Components/CardButton/CardButton.js +9 -9
  33. package/dist/lib/Components/Dialog/Dialog.js +2 -2
  34. package/dist/lib/Components/Menu/Menu.js +4 -4
  35. package/dist/lib/Components/PageIndicator/PageIndicator.d.ts +11 -0
  36. package/dist/lib/Components/PageIndicator/PageIndicator.d.ts.map +1 -0
  37. package/dist/lib/Components/PageIndicator/PageIndicator.js +88 -0
  38. package/dist/lib/Components/PageIndicator/index.d.ts +3 -0
  39. package/dist/lib/Components/PageIndicator/index.d.ts.map +1 -0
  40. package/dist/lib/Components/PageIndicator/types.d.ts +12 -0
  41. package/dist/lib/Components/PageIndicator/types.d.ts.map +1 -0
  42. package/dist/lib/Components/Select/Select.js +4 -4
  43. package/dist/lib/Components/SideBar/SideBar.js +16 -16
  44. package/dist/lib/Components/Skeleton/Skeleton.d.ts +1 -1
  45. package/dist/lib/Components/Skeleton/Skeleton.d.ts.map +1 -1
  46. package/dist/lib/Components/Skeleton/Skeleton.js +78 -27
  47. package/dist/lib/Components/Skeleton/types.d.ts +1 -1
  48. package/dist/lib/Components/Skeleton/types.d.ts.map +1 -1
  49. package/dist/lib/Components/Spot/Spot.d.ts +1 -1
  50. package/dist/lib/Components/Spot/Spot.d.ts.map +1 -1
  51. package/dist/lib/Components/Spot/Spot.js +27 -25
  52. package/dist/lib/Components/Subheader/Subheader.d.ts.map +1 -1
  53. package/dist/lib/Components/Subheader/Subheader.js +13 -5
  54. package/dist/lib/Components/Table/Table.d.ts +158 -0
  55. package/dist/lib/Components/Table/Table.d.ts.map +1 -0
  56. package/dist/lib/Components/Table/Table.js +390 -0
  57. package/dist/lib/Components/Table/constants.d.ts +3 -0
  58. package/dist/lib/Components/Table/constants.d.ts.map +1 -0
  59. package/dist/lib/Components/Table/constants.js +5 -0
  60. package/dist/lib/Components/Table/index.d.ts +3 -0
  61. package/dist/lib/Components/Table/index.d.ts.map +1 -0
  62. package/dist/lib/Components/Table/types.d.ts +245 -0
  63. package/dist/lib/Components/Table/types.d.ts.map +1 -0
  64. package/dist/lib/Components/Table/utils/useThrottledScrollBottom.d.ts +39 -0
  65. package/dist/lib/Components/Table/utils/useThrottledScrollBottom.d.ts.map +1 -0
  66. package/dist/lib/Components/Table/utils/useThrottledScrollBottom.js +39 -0
  67. package/dist/lib/Components/Tile/Tile.js +9 -9
  68. package/dist/lib/Components/TileButton/TileButton.js +5 -5
  69. package/dist/lib/Components/index.d.ts +2 -0
  70. package/dist/lib/Components/index.d.ts.map +1 -1
  71. package/dist/lib/Symbols/Icons/Chart5.d.ts +26 -0
  72. package/dist/lib/Symbols/Icons/Chart5.d.ts.map +1 -0
  73. package/dist/lib/Symbols/Icons/Chart5.js +39 -0
  74. package/dist/lib/Symbols/Icons/Chart5Fill.d.ts +26 -0
  75. package/dist/lib/Symbols/Icons/Chart5Fill.d.ts.map +1 -0
  76. package/dist/lib/Symbols/Icons/Chart5Fill.js +25 -0
  77. package/dist/lib/Symbols/Icons/CurveDown.d.ts +26 -0
  78. package/dist/lib/Symbols/Icons/CurveDown.d.ts.map +1 -0
  79. package/dist/lib/Symbols/Icons/CurveDown.js +63 -0
  80. package/dist/lib/Symbols/Icons/CurveUp.d.ts +26 -0
  81. package/dist/lib/Symbols/Icons/CurveUp.d.ts.map +1 -0
  82. package/dist/lib/Symbols/Icons/CurveUp.js +62 -0
  83. package/dist/lib/Symbols/Icons/Target.d.ts +26 -0
  84. package/dist/lib/Symbols/Icons/Target.d.ts.map +1 -0
  85. package/dist/lib/Symbols/Icons/Target.js +28 -0
  86. package/dist/lib/Symbols/index.d.ts +5 -0
  87. package/dist/lib/Symbols/index.d.ts.map +1 -1
  88. package/dist/lib/Symbols/index.js +448 -438
  89. package/dist/libs/utils-shared/dist/index.js +101 -54
  90. package/dist/package.json +4 -3
  91. package/dist/types/index.d.ts +2 -0
  92. package/dist/types/index.d.ts.map +1 -0
  93. package/dist/types/types.d.ts +2 -0
  94. package/dist/types/types.d.ts.map +1 -0
  95. package/package.json +5 -4
@@ -1,76 +1,123 @@
1
- import { jsx as p } from "react/jsx-runtime";
2
- import { createContext as d, useMemo as h, useContext as g } from "react";
3
- import { clsx as x } from "clsx";
4
- import { twMerge as $ } from "tailwind-merge";
5
- function P(t) {
6
- return t ? t.split(/[-_ ]+/).map((n) => n.charAt(0).toUpperCase() + n.slice(1).toLowerCase()).join("") : "";
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 w = 48, C = 17, v = 2;
9
- function S(t) {
10
- const n = t.replace(/\D/g, "").length;
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
- C,
13
- w - n * v
12
+ F,
13
+ E - n * R
14
14
  );
15
15
  }
16
- function m(t, n = !0) {
17
- if (!t) return "";
18
- const a = t.includes("."), [c, r] = t.split("."), o = c.replace(/\B(?=(\d{3})+(?!\d))/g, " ");
19
- return a && n ? r ? `${o}.${r}` : `${o}.` : o;
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 b(t, n = {}) {
21
+ function U(l, n = {}) {
22
22
  const {
23
- allowDecimals: a = !0,
24
- thousandsSeparator: c = !0,
25
- maxIntegerLength: r = 9,
26
- maxDecimalLength: o = 9
27
- } = n, i = t.replace(",", ".").replace(/[^\d.]/g, "");
28
- let e = i;
29
- if (e = e.replace(/^0+(?=\d)/, ""), !a)
30
- return e = e.replace(/\D/g, ""), r > 0 && e.length > r && (e = e.slice(0, r)), c ? m(e) : e;
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 u = e.indexOf(".");
33
- if (u !== -1) {
34
- let s = e.slice(0, u), l = e.slice(u + 1).replace(/\./g, "");
35
- r > 0 && s.length > r && (s = s.slice(0, r)), l = l.slice(0, o), s === "" && (s = "0");
36
- const f = i.endsWith(".") || e.endsWith(".");
37
- e = l.length > 0 ? `${s}.${l}` : f ? `${s}.` : s;
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
- r > 0 && e.length > r && (e = e.slice(0, r));
40
- return c ? m(e) : e;
39
+ u > 0 && e.length > u && (e = e.slice(0, u));
40
+ return s ? C(e) : e;
41
41
  }
42
- function A(t, n) {
43
- const a = d(n), c = ({ children: o, value: i }) => {
44
- const e = h(
45
- () => i,
46
- Object.values(i ?? {})
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__ */ p(a.Provider, { value: e, children: o });
48
+ return /* @__PURE__ */ j(f.Provider, { value: e, children: i });
49
49
  };
50
- c.displayName = t + "Provider";
51
- function r({
52
- consumerName: o,
53
- contextRequired: i
50
+ s.displayName = l + "Provider";
51
+ function u({
52
+ consumerName: i,
53
+ contextRequired: t
54
54
  }) {
55
- const e = g(a);
55
+ const e = O(f);
56
56
  if (e)
57
57
  return e;
58
- if (i)
58
+ if (t)
59
59
  throw new Error(
60
- `${o} must be used within ${t}`
60
+ `${i} must be used within ${l}`
61
61
  );
62
62
  return n || {};
63
63
  }
64
- return [c, r];
64
+ return [s, u];
65
65
  }
66
- function E(...t) {
67
- return $(x(t));
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
- E as cn,
71
- A as createSafeContext,
72
- m as formatThousands,
73
- S as getFontSize,
74
- b as textFormatter,
75
- P as toPascalCase
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.78",
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,2 @@
1
+ export * from './types';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -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,2 @@
1
+ export type Breakpoints = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
2
+ //# sourceMappingURL=types.d.ts.map
@@ -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.79",
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.17",
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",