@ledgerhq/lumen-ui-react 0.1.61 → 0.1.63

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 (169) hide show
  1. package/dist/index.d.ts +1 -1
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +80 -63
  4. package/dist/lib/Components/core/AddressInput/AddressInput.js +1 -1
  5. package/dist/lib/Components/core/AmountDisplay/AmountDisplay.js +1 -1
  6. package/dist/lib/Components/core/AmountInput/AmountInput.js +17 -17
  7. package/dist/lib/Components/core/AmountInput/useAmountInputValue/useAmountInputValue.js +3 -3
  8. package/dist/lib/Components/core/Avatar/Avatar.js +7 -7
  9. package/dist/lib/Components/core/Avatar/resolveAvatarColor.js +2 -2
  10. package/dist/lib/Components/core/AvatarButton/AvatarButton.js +2 -2
  11. package/dist/lib/Components/core/Banner/Banner.js +9 -9
  12. package/dist/lib/Components/core/Button/Button.js +4 -4
  13. package/dist/lib/Components/core/Card/Card.js +15 -15
  14. package/dist/lib/Components/core/CardButton/CardButton.d.ts +2 -0
  15. package/dist/lib/Components/core/CardButton/CardButton.d.ts.map +1 -1
  16. package/dist/lib/Components/core/CardButton/CardButton.js +4 -4
  17. package/dist/lib/Components/core/ContentBanner/ContentBanner.js +1 -1
  18. package/dist/lib/Components/core/DataTable/DataTable.js +42 -42
  19. package/dist/lib/Components/core/Dialog/DialogHeader/DialogHeader.js +1 -1
  20. package/dist/lib/Components/core/Divider/Divider.js +4 -4
  21. package/dist/lib/Components/core/DotCount/DotCount.js +3 -3
  22. package/dist/lib/Components/core/DotIcon/DotIcon.js +11 -11
  23. package/dist/lib/Components/core/DotSymbol/DotSymbol.js +7 -7
  24. package/dist/lib/Components/core/Link/Link.d.ts +1 -1
  25. package/dist/lib/Components/core/Link/Link.d.ts.map +1 -1
  26. package/dist/lib/Components/core/Link/Link.js +25 -23
  27. package/dist/lib/Components/core/Link/types.d.ts +1 -1
  28. package/dist/lib/Components/core/Link/types.d.ts.map +1 -1
  29. package/dist/lib/Components/core/ListItem/ListItem.js +8 -8
  30. package/dist/lib/Components/core/MediaBanner/MediaBanner.js +4 -4
  31. package/dist/lib/Components/core/MediaCard/MediaCard.js +1 -1
  32. package/dist/lib/Components/core/MediaImage/MediaImage.js +5 -5
  33. package/dist/lib/Components/core/Menu/Menu.js +25 -25
  34. package/dist/lib/Components/core/NavBar/CoinCapsule.js +4 -4
  35. package/dist/lib/Components/core/NavBar/NavBar.js +3 -3
  36. package/dist/lib/Components/core/PageIndicator/PageIndicator.js +5 -5
  37. package/dist/lib/Components/core/Pagination/Pagination.js +1 -1
  38. package/dist/lib/Components/core/Popover/Popover.js +13 -13
  39. package/dist/lib/Components/core/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  40. package/dist/lib/Components/core/SegmentedControl/SegmentedControl.js +80 -84
  41. package/dist/lib/Components/core/Select/Select.d.ts.map +1 -1
  42. package/dist/lib/Components/core/Select/Select.js +108 -107
  43. package/dist/lib/Components/core/SideBar/SideBar.js +33 -33
  44. package/dist/lib/Components/core/Spinner/Spinner.js +1 -1
  45. package/dist/lib/Components/core/Spot/Spot.js +13 -13
  46. package/dist/lib/Components/core/Stepper/Stepper.d.ts +4 -3
  47. package/dist/lib/Components/core/Stepper/Stepper.d.ts.map +1 -1
  48. package/dist/lib/Components/core/Stepper/Stepper.js +137 -62
  49. package/dist/lib/Components/core/Stepper/types.d.ts +12 -2
  50. package/dist/lib/Components/core/Stepper/types.d.ts.map +1 -1
  51. package/dist/lib/Components/core/Subheader/Subheader.d.ts.map +1 -1
  52. package/dist/lib/Components/core/Subheader/Subheader.js +33 -29
  53. package/dist/lib/Components/core/Table/Table.js +10 -10
  54. package/dist/lib/Components/core/ThemeProvider/ThemeProvider.js +6 -6
  55. package/dist/lib/Components/core/ThemeProvider/ThemeProvider.types.d.ts +1 -1
  56. package/dist/lib/Components/core/ThemeProvider/ThemeProvider.types.d.ts.map +1 -1
  57. package/dist/lib/Components/core/Timeline/Timeline.d.ts +54 -0
  58. package/dist/lib/Components/core/Timeline/Timeline.d.ts.map +1 -0
  59. package/dist/lib/Components/core/Timeline/Timeline.js +228 -0
  60. package/dist/lib/Components/core/Timeline/index.d.ts +3 -0
  61. package/dist/lib/Components/core/Timeline/index.d.ts.map +1 -0
  62. package/dist/lib/Components/core/Timeline/types.d.ts +148 -0
  63. package/dist/lib/Components/core/Timeline/types.d.ts.map +1 -0
  64. package/dist/lib/Components/core/Toast/Toast.d.ts +25 -0
  65. package/dist/lib/Components/core/Toast/Toast.d.ts.map +1 -0
  66. package/dist/lib/Components/core/Toast/Toast.js +68 -0
  67. package/dist/lib/Components/core/Toast/Toaster.d.ts +27 -0
  68. package/dist/lib/Components/core/Toast/Toaster.d.ts.map +1 -0
  69. package/dist/lib/Components/core/Toast/Toaster.js +92 -0
  70. package/dist/lib/Components/core/Toast/hooks/useToastCollapse.d.ts +15 -0
  71. package/dist/lib/Components/core/Toast/hooks/useToastCollapse.d.ts.map +1 -0
  72. package/dist/lib/Components/core/Toast/hooks/useToastCollapse.js +15 -0
  73. package/dist/lib/Components/core/Toast/hooks/useToastViewportPause.d.ts +24 -0
  74. package/dist/lib/Components/core/Toast/hooks/useToastViewportPause.d.ts.map +1 -0
  75. package/dist/lib/Components/core/Toast/hooks/useToastViewportPause.js +27 -0
  76. package/dist/lib/Components/core/Toast/index.d.ts +5 -0
  77. package/dist/lib/Components/core/Toast/index.d.ts.map +1 -0
  78. package/dist/lib/Components/core/Toast/styles.d.ts +20 -0
  79. package/dist/lib/Components/core/Toast/styles.d.ts.map +1 -0
  80. package/dist/lib/Components/core/Toast/styles.js +77 -0
  81. package/dist/lib/Components/core/Toast/types.d.ts +81 -0
  82. package/dist/lib/Components/core/Toast/types.d.ts.map +1 -0
  83. package/dist/lib/Components/core/Trend/Trend.js +3 -3
  84. package/dist/lib/Components/core/index.d.ts +2 -0
  85. package/dist/lib/Components/core/index.d.ts.map +1 -1
  86. package/dist/lib/Components/internal/BaseButton/BaseButton.js +7 -7
  87. package/dist/lib/Components/internal/BaseInput/BaseInput.js +22 -22
  88. package/dist/lib/Components/internal/BaseInput/BaseInputMultiline.js +12 -12
  89. package/dist/lib/Components/internal/BaseInput/useAutosizeTextarea/useAutosizeTextarea.js +4 -4
  90. package/dist/lib/Components/internal/BaseTag/BaseTag.js +4 -4
  91. package/dist/lib/Components/symbols/Icon/createIcon.js +3 -3
  92. package/dist/lib/Components/visualization/CartesianChart/CartesianChart.d.ts.map +1 -1
  93. package/dist/lib/Components/visualization/CartesianChart/CartesianChart.js +36 -35
  94. package/dist/lib/Components/visualization/CartesianChart/types.d.ts +1 -1
  95. package/dist/lib/Components/visualization/DonutChart/DonutChart.d.ts.map +1 -1
  96. package/dist/lib/Components/visualization/DonutChart/DonutChart.js +31 -31
  97. package/dist/lib/Components/visualization/DonutChart/DonutChartCenter.js +2 -2
  98. package/dist/lib/Components/visualization/DonutChart/DonutRing.d.ts.map +1 -1
  99. package/dist/lib/Components/visualization/DonutChart/DonutRing.js +13 -12
  100. package/dist/lib/Components/visualization/DonutChart/types.d.ts +1 -1
  101. package/dist/lib/Components/visualization/Legend/Legend.d.ts +1 -1
  102. package/dist/lib/Components/visualization/Legend/Legend.d.ts.map +1 -1
  103. package/dist/lib/Components/visualization/Legend/Legend.js +6 -10
  104. package/dist/lib/Components/visualization/Legend/types.d.ts +2 -2
  105. package/dist/lib/Components/visualization/LineChart/LineChart.d.ts +1 -1
  106. package/dist/lib/Components/visualization/LineChart/LineChart.d.ts.map +1 -1
  107. package/dist/lib/Components/visualization/LineChart/LineChart.js +90 -84
  108. package/dist/lib/Components/visualization/LineChart/types.d.ts +1 -1
  109. package/dist/lib/Components/visualization/LineChart/utils.d.ts +2 -1
  110. package/dist/lib/Components/visualization/LineChart/utils.d.ts.map +1 -1
  111. package/dist/lib/Components/visualization/LineChart/utils.js +23 -22
  112. package/dist/lib/Components/visualization/config.d.ts +0 -3
  113. package/dist/lib/Components/visualization/config.d.ts.map +1 -1
  114. package/dist/lib/Components/visualization/config.js +3 -6
  115. package/dist/libs/utils-shared/dist/index.js +353 -140
  116. package/dist/package.json +4 -6
  117. package/dist/translations/index.d.ts +3 -0
  118. package/dist/translations/index.d.ts.map +1 -0
  119. package/dist/{i18n → translations}/languages.d.ts +0 -5
  120. package/dist/translations/languages.d.ts.map +1 -0
  121. package/dist/{i18n → translations}/languages.js +1 -2
  122. package/dist/{i18n → translations}/locales/en.json.d.ts +11 -0
  123. package/dist/{i18n → translations}/locales/en.json.js +2 -2
  124. package/dist/translations/translations.d.ts +727 -0
  125. package/dist/translations/translations.d.ts.map +1 -0
  126. package/dist/translations/translations.js +22 -0
  127. package/package.json +4 -6
  128. package/dist/_virtual/dynamic-import-helper.js +0 -9
  129. package/dist/i18n/I18nProvider.d.ts +0 -8
  130. package/dist/i18n/I18nProvider.d.ts.map +0 -1
  131. package/dist/i18n/I18nProvider.js +0 -14
  132. package/dist/i18n/i18n.d.ts +0 -12
  133. package/dist/i18n/i18n.d.ts.map +0 -1
  134. package/dist/i18n/i18n.js +0 -42
  135. package/dist/i18n/index.d.ts +0 -4
  136. package/dist/i18n/index.d.ts.map +0 -1
  137. package/dist/i18n/languages.d.ts.map +0 -1
  138. package/dist/i18n/useCommonTranslation.d.ts +0 -2
  139. package/dist/i18n/useCommonTranslation.d.ts.map +0 -1
  140. package/dist/i18n/useCommonTranslation.js +0 -6
  141. package/dist/node_modules/i18next/dist/esm/i18next.js +0 -1479
  142. package/dist/node_modules/react-i18next/dist/es/I18nextProvider.js +0 -19
  143. package/dist/node_modules/react-i18next/dist/es/context.js +0 -17
  144. package/dist/node_modules/react-i18next/dist/es/defaults.js +0 -22
  145. package/dist/node_modules/react-i18next/dist/es/i18nInstance.js +0 -8
  146. package/dist/node_modules/react-i18next/dist/es/initReactI18next.js +0 -11
  147. package/dist/node_modules/react-i18next/dist/es/unescape.js +0 -25
  148. package/dist/node_modules/react-i18next/dist/es/useTranslation.js +0 -65
  149. package/dist/node_modules/react-i18next/dist/es/utils.js +0 -57
  150. /package/dist/{i18n → translations}/locales/de.json.d.ts +0 -0
  151. /package/dist/{i18n → translations}/locales/de.json.js +0 -0
  152. /package/dist/{i18n → translations}/locales/es.json.d.ts +0 -0
  153. /package/dist/{i18n → translations}/locales/es.json.js +0 -0
  154. /package/dist/{i18n → translations}/locales/fr.json.d.ts +0 -0
  155. /package/dist/{i18n → translations}/locales/fr.json.js +0 -0
  156. /package/dist/{i18n → translations}/locales/ja.json.d.ts +0 -0
  157. /package/dist/{i18n → translations}/locales/ja.json.js +0 -0
  158. /package/dist/{i18n → translations}/locales/ko.json.d.ts +0 -0
  159. /package/dist/{i18n → translations}/locales/ko.json.js +0 -0
  160. /package/dist/{i18n → translations}/locales/pt.json.d.ts +0 -0
  161. /package/dist/{i18n → translations}/locales/pt.json.js +0 -0
  162. /package/dist/{i18n → translations}/locales/ru.json.d.ts +0 -0
  163. /package/dist/{i18n → translations}/locales/ru.json.js +0 -0
  164. /package/dist/{i18n → translations}/locales/th.json.d.ts +0 -0
  165. /package/dist/{i18n → translations}/locales/th.json.js +0 -0
  166. /package/dist/{i18n → translations}/locales/tr.json.d.ts +0 -0
  167. /package/dist/{i18n → translations}/locales/tr.json.js +0 -0
  168. /package/dist/{i18n → translations}/locales/zh.json.d.ts +0 -0
  169. /package/dist/{i18n → translations}/locales/zh.json.js +0 -0
@@ -1,19 +0,0 @@
1
- import { useMemo as i, createElement as m } from "react";
2
- import { I18nContext as l } from "./context.js";
3
- function d(t) {
4
- let {
5
- i18n: e,
6
- defaultNS: r,
7
- children: o
8
- } = t;
9
- const n = i(() => ({
10
- i18n: e,
11
- defaultNS: r
12
- }), [e, r]);
13
- return m(l.Provider, {
14
- value: n
15
- }, o);
16
- }
17
- export {
18
- d as I18nextProvider
19
- };
@@ -1,17 +0,0 @@
1
- import { createContext as a } from "react";
2
- const o = a();
3
- class p {
4
- constructor() {
5
- this.usedNamespaces = {};
6
- }
7
- addUsedNamespaces(s) {
8
- s.forEach((e) => {
9
- this.usedNamespaces[e] || (this.usedNamespaces[e] = !0);
10
- });
11
- }
12
- getUsedNamespaces = () => Object.keys(this.usedNamespaces);
13
- }
14
- export {
15
- o as I18nContext,
16
- p as ReportNamespaces
17
- };
@@ -1,22 +0,0 @@
1
- import { unescape as n } from "./unescape.js";
2
- let e = {
3
- bindI18n: "languageChanged",
4
- bindI18nStore: "",
5
- transEmptyNodeValue: "",
6
- transSupportBasicHtmlNodes: !0,
7
- transWrapTextNodes: "",
8
- transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
9
- useSuspense: !0,
10
- unescape: n
11
- };
12
- const a = function() {
13
- let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
14
- e = {
15
- ...e,
16
- ...t
17
- };
18
- }, r = () => e;
19
- export {
20
- r as getDefaults,
21
- a as setDefaults
22
- };
@@ -1,8 +0,0 @@
1
- let n;
2
- const e = (t) => {
3
- n = t;
4
- }, s = () => n;
5
- export {
6
- s as getI18n,
7
- e as setI18n
8
- };
@@ -1,11 +0,0 @@
1
- import { setDefaults as o } from "./defaults.js";
2
- import { setI18n as r } from "./i18nInstance.js";
3
- const p = {
4
- type: "3rdParty",
5
- init(t) {
6
- o(t.options.react), r(t);
7
- }
8
- };
9
- export {
10
- p as initReactI18next
11
- };
@@ -1,25 +0,0 @@
1
- const p = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, e = {
2
- "&": "&",
3
- "&": "&",
4
- "&lt;": "<",
5
- "&#60;": "<",
6
- "&gt;": ">",
7
- "&#62;": ">",
8
- "&apos;": "'",
9
- "&#39;": "'",
10
- "&quot;": '"',
11
- "&#34;": '"',
12
- "&nbsp;": " ",
13
- "&#160;": " ",
14
- "&copy;": "©",
15
- "&#169;": "©",
16
- "&reg;": "®",
17
- "&#174;": "®",
18
- "&hellip;": "…",
19
- "&#8230;": "…",
20
- "&#x2F;": "/",
21
- "&#47;": "/"
22
- }, n = (t) => e[t], o = (t) => t.replace(p, n);
23
- export {
24
- o as unescape
25
- };
@@ -1,65 +0,0 @@
1
- import { useContext as E, useCallback as F, useState as P, useRef as M, useEffect as b } from "react";
2
- import { I18nContext as v, ReportNamespaces as A } from "./context.js";
3
- import { warnOnce as I, hasLoadedNamespace as L, loadLanguages as R, loadNamespaces as C, isString as w, isObject as U } from "./utils.js";
4
- import { getI18n as $ } from "./i18nInstance.js";
5
- import { getDefaults as G } from "./defaults.js";
6
- const J = (r, t) => {
7
- const o = M();
8
- return b(() => {
9
- o.current = r;
10
- }, [r, t]), o.current;
11
- }, j = (r, t, o, l) => r.getFixedT(t, o, l), Y = (r, t, o, l) => F(j(r, t, o, l), [r, t, o, l]), O = function(r) {
12
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
13
- const {
14
- i18n: o
15
- } = t, {
16
- i18n: l
17
- } = E(v) || {}, e = o || l || $();
18
- if (e && !e.reportNamespaces && (e.reportNamespaces = new A()), !e) {
19
- I("You will need to pass in an i18next instance by using initReactI18next");
20
- const s = (a, c) => w(c) ? c : U(c) && w(c.defaultValue) ? c.defaultValue : Array.isArray(a) ? a[a.length - 1] : a, i = [s, {}, !1];
21
- return i.t = s, i.i18n = {}, i.ready = !1, i;
22
- }
23
- e.options.react && e.options.react.wait !== void 0 && I("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
24
- const d = {
25
- ...G(),
26
- ...e.options.react,
27
- ...t
28
- }, {
29
- useSuspense: h,
30
- keyPrefix: y
31
- } = d;
32
- let n = r;
33
- n = w(n) ? [n] : n || ["translation"], e.reportNamespaces.addUsedNamespaces && e.reportNamespaces.addUsedNamespaces(n);
34
- const u = (e.isInitialized || e.initializedStoreOnce) && n.every((s) => L(s, e, d)), z = Y(e, t.lng || null, d.nsMode === "fallback" ? n : n[0], y), T = () => z, N = () => j(e, t.lng || null, d.nsMode === "fallback" ? n : n[0], y), [S, m] = P(T);
35
- let p = n.join();
36
- t.lng && (p = `${t.lng}${p}`);
37
- const x = J(p), f = M(!0);
38
- b(() => {
39
- const {
40
- bindI18n: s,
41
- bindI18nStore: i
42
- } = d;
43
- f.current = !0, !u && !h && (t.lng ? R(e, t.lng, n, () => {
44
- f.current && m(N);
45
- }) : C(e, n, () => {
46
- f.current && m(N);
47
- })), u && x && x !== p && f.current && m(N);
48
- const a = () => {
49
- f.current && m(N);
50
- };
51
- return s && e && e.on(s, a), i && e && e.store.on(i, a), () => {
52
- f.current = !1, s && e && s.split(" ").forEach((c) => e.off(c, a)), i && e && i.split(" ").forEach((c) => e.store.off(c, a));
53
- };
54
- }, [e, p]), b(() => {
55
- f.current && u && m(T);
56
- }, [e, y, u]);
57
- const g = [S, e, u];
58
- if (g.t = S, g.i18n = e, g.ready = u, u || !u && !h) return g;
59
- throw new Promise((s) => {
60
- t.lng ? R(e, t.lng, n, () => s()) : C(e, n, () => s());
61
- });
62
- };
63
- export {
64
- O as useTranslation
65
- };
@@ -1,57 +0,0 @@
1
- function f() {
2
- if (console && console.warn) {
3
- for (var n = arguments.length, e = new Array(n), a = 0; a < n; a++)
4
- e[a] = arguments[a];
5
- s(e[0]) && (e[0] = `react-i18next:: ${e[0]}`), console.warn(...e);
6
- }
7
- }
8
- const i = {};
9
- function p() {
10
- for (var n = arguments.length, e = new Array(n), a = 0; a < n; a++)
11
- e[a] = arguments[a];
12
- s(e[0]) && i[e[0]] || (s(e[0]) && (i[e[0]] = /* @__PURE__ */ new Date()), f(...e));
13
- }
14
- const c = (n, e) => () => {
15
- if (n.isInitialized)
16
- e();
17
- else {
18
- const a = () => {
19
- setTimeout(() => {
20
- n.off("initialized", a);
21
- }, 0), e();
22
- };
23
- n.on("initialized", a);
24
- }
25
- }, m = (n, e, a) => {
26
- n.loadNamespaces(e, c(n, a));
27
- }, b = (n, e, a, o) => {
28
- s(a) && (a = [a]), a.forEach((t) => {
29
- n.options.ns.indexOf(t) < 0 && n.options.ns.push(t);
30
- }), n.loadLanguages(e, c(n, o));
31
- }, h = function(n, e) {
32
- let a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
33
- const o = e.languages[0], t = e.options ? e.options.fallbackLng : !1, r = e.languages[e.languages.length - 1];
34
- if (o.toLowerCase() === "cimode") return !0;
35
- const g = (l, d) => {
36
- const u = e.services.backendConnector.state[`${l}|${d}`];
37
- return u === -1 || u === 2;
38
- };
39
- return a.bindI18n && a.bindI18n.indexOf("languageChanging") > -1 && e.services.backendConnector.backend && e.isLanguageChangingTo && !g(e.isLanguageChangingTo, n) ? !1 : !!(e.hasResourceBundle(o, n) || !e.services.backendConnector.backend || e.options.resources && !e.options.partialBundledLanguages || g(o, n) && (!t || g(r, n)));
40
- }, L = function(n, e) {
41
- let a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
42
- return !e.languages || !e.languages.length ? (p("i18n.languages were undefined or empty", e.languages), !0) : e.options.ignoreJSONStructure !== void 0 ? e.hasLoadedNamespace(n, {
43
- lng: a.lng,
44
- precheck: (t, r) => {
45
- if (a.bindI18n && a.bindI18n.indexOf("languageChanging") > -1 && t.services.backendConnector.backend && t.isLanguageChangingTo && !r(t.isLanguageChangingTo, n)) return !1;
46
- }
47
- }) : h(n, e, a);
48
- }, s = (n) => typeof n == "string", C = (n) => typeof n == "object" && n !== null;
49
- export {
50
- L as hasLoadedNamespace,
51
- C as isObject,
52
- s as isString,
53
- b as loadLanguages,
54
- m as loadNamespaces,
55
- f as warn,
56
- p as warnOnce
57
- };
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes