@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,21 +1,22 @@
1
- import { jsx as r, jsxs as k, Fragment as O } from "react/jsx-runtime";
2
- import { useRef as h, useState as B, useCallback as E, useEffect as F, useMemo as b } from "react";
3
- import { chartConfig as H } from "../config.js";
4
- import { ScrubberProvider as V } from "../Scrubber/ScrubberProvider.js";
5
- import { resolveInset as q, resolveAxisPadding as D } from "./utils.js";
1
+ import { jsx as r, jsxs as O, Fragment as B } from "react/jsx-runtime";
2
+ import { useRef as h, useState as E, useCallback as F, useEffect as H, useMemo as b } from "react";
3
+ import { chartConfig as L } from "../config.js";
4
+ import { ScrubberProvider as T } from "../Scrubber/ScrubberProvider.js";
5
+ import { resolveInset as V, resolveAxisPadding as q } from "./utils.js";
6
+ import { useCommonTranslation as D } from "../../../../translations/translations.js";
6
7
  import { useBuildChartContext as G } from "./context/useBuildChartContext.js";
7
8
  import { CartesianChartProvider as J } from "./context/cartesianChartContext.js";
8
9
  import { MagneticPointsProvider as K } from "../Point/pointContext/MagneticPointsProvider.js";
9
- import { RevealAnimationProvider as L } from "./RevealAnimation/RevealAnimationProvider.js";
10
- function $({
10
+ import { RevealAnimationProvider as N } from "./RevealAnimation/RevealAnimationProvider.js";
11
+ function te({
11
12
  series: d,
12
13
  xAxis: y,
13
- yAxis: C,
14
+ yAxis: g,
14
15
  width: e = "100%",
15
- height: n = H.root.defaultHeight,
16
+ height: i = L.root.defaultHeight,
16
17
  inset: l,
17
18
  axisPadding: c,
18
- ariaLabel: g = "Chart",
19
+ ariaLabel: C,
19
20
  ariaBusy: x = !1,
20
21
  overlay: R,
21
22
  enableScrubbing: s = !1,
@@ -24,29 +25,29 @@ function $({
24
25
  magnetRadius: w,
25
26
  children: M
26
27
  }) {
27
- const a = h(null), v = h(null), [W, z] = B(
28
+ const { t: W } = D(), a = h(null), f = h(null), [z, I] = E(
28
29
  typeof e == "number" ? e : void 0
29
- ), t = typeof e != "number", f = E((i) => {
30
- const [p] = i;
31
- p && z(p.contentRect.width);
30
+ ), t = typeof e != "number", m = F((n) => {
31
+ const [p] = n;
32
+ p && I(p.contentRect.width);
32
33
  }, []);
33
- F(() => {
34
+ H(() => {
34
35
  if (!t || !a.current || typeof ResizeObserver > "u")
35
36
  return;
36
- const i = new ResizeObserver(f);
37
- return i.observe(a.current), () => i.disconnect();
38
- }, [t, f]);
39
- const o = typeof e == "number" ? e : W ?? 0, m = o > 0 ? o : 0, I = b(() => q(l), [l]), j = b(
40
- () => D(c),
37
+ const n = new ResizeObserver(m);
38
+ return n.observe(a.current), () => n.disconnect();
39
+ }, [t, m]);
40
+ const o = typeof e == "number" ? e : z ?? 0, v = o > 0 ? o : 0, j = b(() => V(l), [l]), k = b(
41
+ () => q(c),
41
42
  [c]
42
43
  ), u = G({
43
44
  series: d,
44
45
  xAxis: y,
45
- yAxis: C,
46
- width: m,
47
- height: n,
48
- inset: I,
49
- axisPadding: j
46
+ yAxis: g,
47
+ width: v,
48
+ height: i,
49
+ inset: j,
50
+ axisPadding: k
50
51
  });
51
52
  return /* @__PURE__ */ r(
52
53
  "div",
@@ -55,20 +56,20 @@ function $({
55
56
  "data-testid": "chart-container",
56
57
  style: {
57
58
  width: t ? e : o,
58
- height: n,
59
+ height: i,
59
60
  overflow: "visible",
60
61
  position: "relative"
61
62
  },
62
- children: o > 0 && /* @__PURE__ */ k(O, { children: [
63
+ children: o > 0 && /* @__PURE__ */ O(B, { children: [
63
64
  /* @__PURE__ */ r(
64
65
  "svg",
65
66
  {
66
- ref: v,
67
+ ref: f,
67
68
  "data-testid": "chart-svg",
68
- width: m,
69
- height: n,
69
+ width: v,
70
+ height: i,
70
71
  role: "img",
71
- "aria-label": g || "Chart",
72
+ "aria-label": C || W("components.chart.defaultAriaLabel"),
72
73
  "aria-busy": x || void 0,
73
74
  tabIndex: s ? 0 : void 0,
74
75
  style: {
@@ -78,14 +79,14 @@ function $({
78
79
  outline: s ? "none" : void 0
79
80
  },
80
81
  children: /* @__PURE__ */ r(J, { value: u, children: /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(
81
- V,
82
+ T,
82
83
  {
83
- svgRef: v,
84
+ svgRef: f,
84
85
  enableScrubbing: s,
85
86
  onScrubberPositionChange: P,
86
87
  magnetRadius: w,
87
88
  children: /* @__PURE__ */ r(
88
- L,
89
+ N,
89
90
  {
90
91
  drawingArea: u.drawingArea,
91
92
  series: d,
@@ -103,5 +104,5 @@ function $({
103
104
  );
104
105
  }
105
106
  export {
106
- $ as CartesianChart
107
+ te as CartesianChart
107
108
  };
@@ -65,7 +65,7 @@ export type CartesianChartProps = ScrubbingOptions & {
65
65
  axisPadding?: Partial<ChartInset>;
66
66
  /**
67
67
  * Accessible label for the chart SVG.
68
- * @default 'Chart'
68
+ * @default 'Chart' (translated)
69
69
  */
70
70
  ariaLabel?: string;
71
71
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"DonutChart.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/visualization/DonutChart/DonutChart.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAQ/C,wBAAgB,UAAU,CAAC,EACzB,MAAM,EAAE,UAAU,EAClB,IAAW,EACX,SAAyB,EACzB,OAAe,EACf,QAAQ,EAAE,YAAY,EACtB,eAAsB,EACtB,gBAAgB,EAChB,YAAY,EACZ,kBAAkB,EAClB,mBAA2B,GAC5B,EAAE,eAAe,2CA4FjB"}
1
+ {"version":3,"file":"DonutChart.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/visualization/DonutChart/DonutChart.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAQ/C,wBAAgB,UAAU,CAAC,EACzB,MAAM,EAAE,UAAU,EAClB,IAAW,EACX,SAAS,EACT,OAAe,EACf,QAAQ,EAAE,YAAY,EACtB,eAAsB,EACtB,gBAAgB,EAChB,YAAY,EACZ,kBAAkB,EAClB,mBAA2B,GAC5B,EAAE,eAAe,2CAiGjB"}
@@ -1,33 +1,33 @@
1
1
  import { jsxs as I, jsx as i } from "react/jsx-runtime";
2
2
  import { useMemo as g } from "react";
3
- import { chartConfig as P } from "../config.js";
4
3
  import { DonutChartAnimatedCenter as T } from "./DonutChartAnimatedCenter.js";
5
- import { DonutRing as j } from "./DonutRing.js";
6
- import { DonutSizeProvider as y } from "./donutSizeContext.js";
7
- import { useContrastSafeSeries as A } from "./hooks/useContrastSafeSeries.js";
4
+ import { DonutRing as P } from "./DonutRing.js";
5
+ import { DonutSizeProvider as j } from "./donutSizeContext.js";
6
+ import { useContrastSafeSeries as y } from "./hooks/useContrastSafeSeries.js";
8
7
  import { buildRingSegments as E, DONUT_GEOMETRY as M, getSegmentPercents as N, formatPercentLabel as B } from "./utils.js";
9
- import { useControllableState as O } from "../../../../utils/useControllableState/useControllableState.js";
10
- function H({
11
- series: p,
8
+ import { useCommonTranslation as O } from "../../../../translations/translations.js";
9
+ import { useControllableState as w } from "../../../../utils/useControllableState/useControllableState.js";
10
+ function J({
11
+ series: h,
12
12
  size: l = "md",
13
- ariaLabel: h = "Donut chart",
13
+ ariaLabel: v,
14
14
  loading: c = !1,
15
- activeId: v,
15
+ activeId: b,
16
16
  defaultActiveId: S = null,
17
- onActiveIdChange: b,
17
+ onActiveIdChange: x,
18
18
  renderCenter: s,
19
19
  renderCenterActive: a,
20
- enableColorContrast: x = !1
20
+ enableColorContrast: L = !1
21
21
  }) {
22
- const n = M[l], e = A(p, x), [o, u] = O({
23
- prop: v,
22
+ const { t: m } = O(), n = M[l], e = y(h, L), [o, u] = w({
23
+ prop: b,
24
24
  defaultProp: S,
25
- onChange: b
26
- }), L = g(
25
+ onChange: x
26
+ }), R = g(
27
27
  () => E(e, n),
28
28
  [e, n]
29
- ), m = g(() => {
30
- const t = e.findIndex((f) => f.id === o);
29
+ ), d = g(() => {
30
+ const t = e.findIndex((p) => p.id === o);
31
31
  if (o == null || t === -1)
32
32
  return null;
33
33
  const r = N(e)[t];
@@ -36,12 +36,12 @@ function H({
36
36
  percent: r,
37
37
  percentLabel: B(r)
38
38
  };
39
- }, [e, o]), d = () => {
39
+ }, [e, o]), f = () => {
40
40
  o !== null && u(null);
41
- }, R = (t) => {
41
+ }, A = (t) => {
42
42
  const { relatedTarget: r } = t;
43
- (!(r instanceof Node) || !t.currentTarget.contains(r)) && d();
44
- }, D = s != null || a != null, C = a != null;
43
+ (!(r instanceof Node) || !t.currentTarget.contains(r)) && f();
44
+ }, C = s != null || a != null, D = a != null;
45
45
  return /* @__PURE__ */ I(
46
46
  "div",
47
47
  {
@@ -52,33 +52,33 @@ function H({
52
52
  width: n.box,
53
53
  height: n.box
54
54
  },
55
- onMouseLeave: d,
56
- onBlur: R,
55
+ onMouseLeave: f,
56
+ onBlur: A,
57
57
  children: [
58
58
  /* @__PURE__ */ i(
59
- j,
59
+ P,
60
60
  {
61
- segments: L,
61
+ segments: R,
62
62
  geometry: n,
63
- ariaLabel: c ? P.donut.loading.ariaLabel : h,
63
+ ariaLabel: c ? m("components.chart.loadingAriaLabel") : v ?? m("components.chart.defaultAriaLabel"),
64
64
  activeId: o,
65
65
  loading: c,
66
66
  onSegmentEnter: u
67
67
  }
68
68
  ),
69
- D && /* @__PURE__ */ i(
69
+ C && /* @__PURE__ */ i(
70
70
  "div",
71
71
  {
72
72
  "data-testid": "donut-center",
73
73
  className: "pointer-events-none absolute inset-0 flex items-center justify-center",
74
- children: /* @__PURE__ */ i(y, { value: { size: l }, children: C ? /* @__PURE__ */ i(
74
+ children: /* @__PURE__ */ i(j, { value: { size: l }, children: D ? /* @__PURE__ */ i(
75
75
  T,
76
76
  {
77
- activeSegment: m,
77
+ activeSegment: d,
78
78
  renderResting: () => s?.({ series: e, activeSegment: null }) ?? null,
79
79
  renderActive: (t) => a({ activeSegment: t })
80
80
  }
81
- ) : s?.({ activeSegment: m, series: e }) })
81
+ ) : s?.({ activeSegment: d, series: e }) })
82
82
  }
83
83
  )
84
84
  ]
@@ -86,5 +86,5 @@ function H({
86
86
  );
87
87
  }
88
88
  export {
89
- H as DonutChart
89
+ J as DonutChart
90
90
  };
@@ -1,6 +1,6 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import { cn as n } from "../../../../libs/utils-shared/dist/index.js";
3
- const a = ({
3
+ const i = ({
4
4
  ref: t,
5
5
  className: e,
6
6
  ...r
@@ -16,5 +16,5 @@ const a = ({
16
16
  }
17
17
  );
18
18
  export {
19
- a as DonutChartCenter
19
+ i as DonutChartCenter
20
20
  };
@@ -1 +1 @@
1
- {"version":3,"file":"DonutRing.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/visualization/DonutChart/DonutRing.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAoG/D,KAAK,cAAc,GAAG;IACpB,QAAQ,EAAE,gBAAgB,EAAE,CAAC;IAC7B,QAAQ,EAAE,aAAa,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC,CAAC;AAaF,eAAO,MAAM,SAAS,GAAI,uEAOvB,cAAc,4CAqChB,CAAC"}
1
+ {"version":3,"file":"DonutRing.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/visualization/DonutChart/DonutRing.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAqG/D,KAAK,cAAc,GAAG;IACpB,QAAQ,EAAE,gBAAgB,EAAE,CAAC;IAC7B,QAAQ,EAAE,aAAa,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC,CAAC;AAaF,eAAO,MAAM,SAAS,GAAI,uEAOvB,cAAc,4CAqChB,CAAC"}
@@ -2,14 +2,14 @@ import { jsx as i, jsxs as v, Fragment as b } from "react/jsx-runtime";
2
2
  import { useRef as h, useMemo as f, useCallback as x } from "react";
3
3
  import { chartConfig as c } from "../config.js";
4
4
  import { useDonutLoadingAnimation as R } from "./hooks/useDonutLoadingAnimation.js";
5
- import { RevealAnimation as $ } from "./RevealAnimation.js";
6
- import { getDonutViewBox as g, buildPlaceholderSegments as m } from "./utils.js";
7
- const { hover: s } = c.donut, D = ({
5
+ import { RevealAnimation as g } from "./RevealAnimation.js";
6
+ import { getDonutViewBox as $, buildPlaceholderSegments as m } from "./utils.js";
7
+ const { hover: d } = c.donut, D = ({
8
8
  segment: t,
9
9
  activeId: o,
10
10
  onSegmentEnter: n
11
11
  }) => {
12
- const a = o === t.id, e = !t.hoverEnabled || o == null || a ? 1 : s.dimOpacity, { x: r, y: l } = a ? t.hoverTranslate : { x: 0, y: 0 }, d = x(() => {
12
+ const a = o === t.id, e = !t.hoverEnabled || o == null || a ? 1 : d.dimOpacity, { x: r, y: l } = a ? t.hoverTranslate : { x: 0, y: 0 }, s = x(() => {
13
13
  n(t.id);
14
14
  }, [t.id, n]);
15
15
  return /* @__PURE__ */ i(
@@ -20,16 +20,17 @@ const { hover: s } = c.donut, D = ({
20
20
  d: t.path,
21
21
  fill: t.color,
22
22
  role: "button",
23
- "aria-label": a ? `${t.id}, selected` : t.id,
23
+ "aria-label": t.id,
24
+ "aria-pressed": a,
24
25
  tabIndex: 0,
25
26
  className: "outline-none focus-visible:outline-2 focus-visible:outline-focus",
26
- onMouseEnter: d,
27
- onFocus: d,
27
+ onMouseEnter: s,
28
+ onFocus: s,
28
29
  style: {
29
30
  cursor: "pointer",
30
31
  opacity: e,
31
32
  transform: `translate(${r}px, ${l}px)`,
32
- transition: t.hoverEnabled ? `${s.opacityTransition}, ${s.popTransition}` : void 0
33
+ transition: t.hoverEnabled ? `${d.opacityTransition}, ${d.popTransition}` : void 0
33
34
  }
34
35
  }
35
36
  );
@@ -81,19 +82,19 @@ const F = ({
81
82
  loading: e = !1,
82
83
  onSegmentEnter: r
83
84
  }) => {
84
- const { box: l } = o, d = l / 2, u = t.length > 0, y = w(e);
85
- return /* @__PURE__ */ i($, { children: /* @__PURE__ */ i(
85
+ const { box: l } = o, s = l / 2, u = t.length > 0, y = w(e);
86
+ return /* @__PURE__ */ i(g, { children: /* @__PURE__ */ i(
86
87
  "svg",
87
88
  {
88
89
  "data-testid": "donut-ring",
89
90
  width: l,
90
91
  height: l,
91
- viewBox: g(o),
92
+ viewBox: $(o),
92
93
  role: e || !u ? "img" : "group",
93
94
  "aria-label": n,
94
95
  "aria-busy": e || void 0,
95
96
  style: { display: "block", overflow: "visible" },
96
- children: /* @__PURE__ */ i("g", { transform: `translate(${d}, ${d})`, children: e ? /* @__PURE__ */ i(k, { geometry: o }) : u ? t.map((p) => /* @__PURE__ */ i(
97
+ children: /* @__PURE__ */ i("g", { transform: `translate(${s}, ${s})`, children: e ? /* @__PURE__ */ i(k, { geometry: o }) : u ? t.map((p) => /* @__PURE__ */ i(
97
98
  D,
98
99
  {
99
100
  segment: p,
@@ -115,7 +115,7 @@ export type DonutChartProps = {
115
115
  /**
116
116
  * Accessible label describing what the chart represents, exposed to
117
117
  * assistive tech via the SVG `role="img"`.
118
- * @default 'Donut chart'
118
+ * @default 'Chart' (translated)
119
119
  */
120
120
  ariaLabel?: string;
121
121
  /**
@@ -1,3 +1,3 @@
1
1
  import { LegendProps } from './types';
2
- export declare function Legend({ series, ariaLabel, className, }: LegendProps): import("react/jsx-runtime").JSX.Element | null;
2
+ export declare function Legend({ series, ariaLabel, className }: LegendProps): import("react/jsx-runtime").JSX.Element | null;
3
3
  //# sourceMappingURL=Legend.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Legend.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/visualization/Legend/Legend.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,wBAAgB,MAAM,CAAC,EACrB,MAAM,EACN,SAAoB,EACpB,SAAS,GACV,EAAE,WAAW,kDAkBb"}
1
+ {"version":3,"file":"Legend.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/visualization/Legend/Legend.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,wBAAgB,MAAM,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,WAAW,kDAkBnE"}
@@ -1,20 +1,16 @@
1
- import { jsx as r } from "react/jsx-runtime";
1
+ import { jsx as n } from "react/jsx-runtime";
2
2
  import { cn as t } from "../../../../libs/utils-shared/dist/index.js";
3
3
  import { LegendItem as m } from "./LegendItem.js";
4
- function i({
5
- series: e,
6
- ariaLabel: a = "Legend",
7
- className: l
8
- }) {
9
- return e.length === 0 ? null : /* @__PURE__ */ r(
4
+ function i({ series: r, ariaLabel: l, className: a }) {
5
+ return r.length === 0 ? null : /* @__PURE__ */ n(
10
6
  "ul",
11
7
  {
12
- "aria-label": a,
8
+ "aria-label": l,
13
9
  className: t(
14
10
  "m-0 flex list-none flex-wrap gap-x-16 gap-y-6 p-0",
15
- l
11
+ a
16
12
  ),
17
- children: e.map((n) => /* @__PURE__ */ r(m, { item: n }, n.id))
13
+ children: r.map((e) => /* @__PURE__ */ n(m, { item: e }, e.id))
18
14
  }
19
15
  );
20
16
  }
@@ -20,8 +20,8 @@ export type LegendProps = {
20
20
  */
21
21
  series: LegendItem[];
22
22
  /**
23
- * Accessible label for the legend group.
24
- * @default 'Legend'
23
+ * Accessible label for the legend list. Optional: each item already carries
24
+ * its own visible text.
25
25
  */
26
26
  ariaLabel?: string;
27
27
  /**
@@ -1,3 +1,3 @@
1
1
  import { LineChartProps } from './types';
2
- export declare function LineChart({ series: seriesProp, showArea, areaType, connectNulls, showXAxis, showYAxis, xAxis, yAxis, width, height, inset, enableScrubbing, onScrubberPositionChange, animate, magnetRadius, loading, emptyLabel, enableColorContrast, children, }: LineChartProps): import("react/jsx-runtime").JSX.Element;
2
+ export declare function LineChart({ series: seriesProp, showArea, areaType, connectNulls, showXAxis, showYAxis, xAxis, yAxis, width, height, inset, enableScrubbing, onScrubberPositionChange, animate, magnetRadius, loading, emptyLabel: emptyLabelProp, enableColorContrast, children, }: LineChartProps): import("react/jsx-runtime").JSX.Element;
3
3
  //# sourceMappingURL=LineChart.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LineChart.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/visualization/LineChart/LineChart.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAGV,cAAc,EAEf,MAAM,SAAS,CAAC;AA+GjB,wBAAgB,SAAS,CAAC,EACxB,MAAM,EAAE,UAAU,EAClB,QAAgB,EAChB,QAAqB,EACrB,YAAY,EACZ,SAAiB,EACjB,SAAiB,EACjB,KAAK,EACL,KAAK,EACL,KAAc,EACd,MAAuC,EACvC,KAAK,EACL,eAAe,EACf,wBAAwB,EACxB,OAAO,EACP,YAAY,EACZ,OAAe,EACf,UAAgD,EAChD,mBAA2B,EAC3B,QAAQ,GACT,EAAE,cAAc,2CAuFhB"}
1
+ {"version":3,"file":"LineChart.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/visualization/LineChart/LineChart.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAGV,cAAc,EAEf,MAAM,SAAS,CAAC;AA+GjB,wBAAgB,SAAS,CAAC,EACxB,MAAM,EAAE,UAAU,EAClB,QAAgB,EAChB,QAAqB,EACrB,YAAY,EACZ,SAAiB,EACjB,SAAiB,EACjB,KAAK,EACL,KAAK,EACL,KAAc,EACd,MAAuC,EACvC,KAAK,EACL,eAAe,EACf,wBAAwB,EACxB,OAAO,EACP,YAAY,EACZ,OAAe,EACf,UAAU,EAAE,cAAc,EAC1B,mBAA2B,EAC3B,QAAQ,GACT,EAAE,cAAc,2CA8FhB"}