@ledgerhq/lumen-ui-react 0.1.62 → 0.1.64
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/ai-rules/RULES.md +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +80 -78
- package/dist/lib/Components/core/AddressInput/AddressInput.js +1 -1
- package/dist/lib/Components/core/AmountDisplay/AmountDisplay.js +1 -1
- package/dist/lib/Components/core/AmountInput/AmountInput.js +22 -22
- package/dist/lib/Components/core/Avatar/Avatar.js +7 -7
- package/dist/lib/Components/core/AvatarButton/AvatarButton.js +8 -8
- package/dist/lib/Components/core/Banner/Banner.js +1 -1
- package/dist/lib/Components/core/Button/Button.js +6 -6
- package/dist/lib/Components/core/Card/Card.js +17 -17
- package/dist/lib/Components/core/ContentBanner/ContentBanner.d.ts +1 -1
- package/dist/lib/Components/core/ContentBanner/ContentBanner.js +1 -1
- package/dist/lib/Components/core/DataTable/DataTable.js +45 -45
- package/dist/lib/Components/core/Dialog/DialogHeader/DialogHeader.js +1 -1
- package/dist/lib/Components/core/Divider/Divider.js +4 -4
- package/dist/lib/Components/core/DotCount/DotCount.js +3 -3
- package/dist/lib/Components/core/DotIcon/DotIcon.js +4 -4
- package/dist/lib/Components/core/DotSymbol/DotSymbol.js +18 -18
- package/dist/lib/Components/core/Link/Link.d.ts.map +1 -1
- package/dist/lib/Components/core/Link/Link.js +25 -24
- package/dist/lib/Components/core/ListItem/ListItem.d.ts +1 -1
- package/dist/lib/Components/core/ListItem/ListItem.js +4 -4
- package/dist/lib/Components/core/MediaBanner/MediaBanner.js +16 -16
- package/dist/lib/Components/core/MediaButton/MediaButton.js +2 -2
- package/dist/lib/Components/core/MediaCard/MediaCard.js +1 -1
- package/dist/lib/Components/core/MediaImage/MediaImage.js +5 -5
- package/dist/lib/Components/core/Menu/Menu.js +25 -25
- package/dist/lib/Components/core/NavBar/CoinCapsule.js +4 -4
- package/dist/lib/Components/core/NavBar/NavBar.js +3 -3
- package/dist/lib/Components/core/PageIndicator/PageIndicator.js +5 -5
- package/dist/lib/Components/core/Pagination/Pagination.js +15 -15
- package/dist/lib/Components/core/Popover/Popover.js +13 -13
- package/dist/lib/Components/core/SearchInput/SearchInput.js +5 -5
- package/dist/lib/Components/core/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/lib/Components/core/SegmentedControl/SegmentedControl.js +78 -82
- package/dist/lib/Components/core/Select/Select.d.ts.map +1 -1
- package/dist/lib/Components/core/Select/Select.js +105 -104
- package/dist/lib/Components/core/SideBar/SideBar.js +28 -28
- package/dist/lib/Components/core/Spinner/Spinner.js +5 -5
- package/dist/lib/Components/core/Spot/Spot.d.ts +7 -25
- package/dist/lib/Components/core/Spot/Spot.d.ts.map +1 -1
- package/dist/lib/Components/core/Spot/Spot.js +33 -102
- package/dist/lib/Components/core/Spot/SpotNumber.d.ts +16 -0
- package/dist/lib/Components/core/Spot/SpotNumber.d.ts.map +1 -0
- package/dist/lib/Components/core/Spot/SpotNumber.js +46 -0
- package/dist/lib/Components/core/Spot/index.d.ts +1 -0
- package/dist/lib/Components/core/Spot/index.d.ts.map +1 -1
- package/dist/lib/Components/core/Spot/styles.d.ts +14 -0
- package/dist/lib/Components/core/Spot/styles.d.ts.map +1 -0
- package/dist/lib/Components/core/Spot/styles.js +275 -0
- package/dist/lib/Components/core/Spot/types.d.ts +27 -38
- package/dist/lib/Components/core/Spot/types.d.ts.map +1 -1
- package/dist/lib/Components/core/Stepper/Stepper.d.ts.map +1 -1
- package/dist/lib/Components/core/Stepper/Stepper.js +51 -48
- package/dist/lib/Components/core/Subheader/Subheader.d.ts.map +1 -1
- package/dist/lib/Components/core/Subheader/Subheader.js +33 -29
- package/dist/lib/Components/core/Switch/Switch.js +5 -5
- package/dist/lib/Components/core/Table/Table.d.ts.map +1 -1
- package/dist/lib/Components/core/Table/Table.js +64 -63
- package/dist/lib/Components/core/ThemeProvider/ThemeProvider.js +6 -6
- package/dist/lib/Components/core/ThemeProvider/ThemeProvider.types.d.ts +1 -1
- package/dist/lib/Components/core/ThemeProvider/ThemeProvider.types.d.ts.map +1 -1
- package/dist/lib/Components/core/Tile/Tile.d.ts +2 -2
- package/dist/lib/Components/core/TileButton/TileButton.js +8 -8
- package/dist/lib/Components/core/Timeline/Timeline.js +16 -16
- package/dist/lib/Components/core/Toast/Toast.js +4 -4
- package/dist/lib/Components/core/Toast/Toaster.js +9 -9
- package/dist/lib/Components/core/Trend/Trend.js +3 -3
- package/dist/lib/Components/internal/BaseButton/BaseButton.js +9 -9
- package/dist/lib/Components/internal/BaseInput/BaseInput.js +21 -21
- package/dist/lib/Components/internal/BaseInput/useAutosizeTextarea/useAutosizeTextarea.js +4 -4
- package/dist/lib/Components/internal/BaseTag/BaseTag.js +4 -4
- package/dist/lib/Components/symbols/Icon/Icon.js +4 -4
- package/dist/lib/Components/symbols/Icon/createIcon.js +5 -5
- package/dist/lib/Components/symbols/icons/AiBubble.d.ts +29 -0
- package/dist/lib/Components/symbols/icons/AiBubble.d.ts.map +1 -0
- package/dist/lib/Components/symbols/icons/AiBubble.js +30 -0
- package/dist/lib/Components/symbols/icons/ArrowBottomLeft.d.ts +29 -0
- package/dist/lib/Components/symbols/icons/ArrowBottomLeft.d.ts.map +1 -0
- package/dist/lib/Components/symbols/icons/ArrowBottomLeft.js +27 -0
- package/dist/lib/Components/symbols/icons/Bug.js +3 -3
- package/dist/lib/Components/symbols/icons/Hourglass.d.ts +29 -0
- package/dist/lib/Components/symbols/icons/Hourglass.d.ts.map +1 -0
- package/dist/lib/Components/symbols/icons/Hourglass.js +27 -0
- package/dist/lib/Components/symbols/icons/Repeat.d.ts +29 -0
- package/dist/lib/Components/symbols/icons/Repeat.d.ts.map +1 -0
- package/dist/lib/Components/symbols/icons/Repeat.js +27 -0
- package/dist/lib/Components/symbols/icons/Robot.d.ts +29 -0
- package/dist/lib/Components/symbols/icons/Robot.d.ts.map +1 -0
- package/dist/lib/Components/symbols/icons/Robot.js +29 -0
- package/dist/lib/Components/symbols/icons/Switch.d.ts.map +1 -1
- package/dist/lib/Components/symbols/icons/Switch.js +24 -12
- package/dist/lib/Components/symbols/icons/Wifi.d.ts +29 -0
- package/dist/lib/Components/symbols/icons/Wifi.d.ts.map +1 -0
- package/dist/lib/Components/symbols/icons/Wifi.js +36 -0
- package/dist/lib/Components/symbols/index.d.ts +6 -0
- package/dist/lib/Components/symbols/index.d.ts.map +1 -1
- package/dist/lib/Components/symbols/index.js +610 -598
- package/dist/lib/Components/visualization/CartesianChart/CartesianChart.d.ts.map +1 -1
- package/dist/lib/Components/visualization/CartesianChart/CartesianChart.js +36 -35
- package/dist/lib/Components/visualization/CartesianChart/types.d.ts +1 -1
- package/dist/lib/Components/visualization/DonutChart/DonutChart.d.ts.map +1 -1
- package/dist/lib/Components/visualization/DonutChart/DonutChart.js +31 -31
- package/dist/lib/Components/visualization/DonutChart/DonutChartCenter.js +4 -4
- package/dist/lib/Components/visualization/DonutChart/DonutRing.d.ts.map +1 -1
- package/dist/lib/Components/visualization/DonutChart/DonutRing.js +13 -12
- package/dist/lib/Components/visualization/DonutChart/donutSizeContext.js +2 -2
- package/dist/lib/Components/visualization/DonutChart/types.d.ts +1 -1
- package/dist/lib/Components/visualization/Legend/Legend.d.ts +1 -1
- package/dist/lib/Components/visualization/Legend/Legend.d.ts.map +1 -1
- package/dist/lib/Components/visualization/Legend/Legend.js +7 -11
- package/dist/lib/Components/visualization/Legend/types.d.ts +2 -2
- package/dist/lib/Components/visualization/LineChart/LineChart.d.ts +1 -1
- package/dist/lib/Components/visualization/LineChart/LineChart.d.ts.map +1 -1
- package/dist/lib/Components/visualization/LineChart/LineChart.js +90 -84
- package/dist/lib/Components/visualization/LineChart/types.d.ts +1 -1
- package/dist/lib/Components/visualization/LineChart/utils.d.ts +2 -1
- package/dist/lib/Components/visualization/LineChart/utils.d.ts.map +1 -1
- package/dist/lib/Components/visualization/LineChart/utils.js +23 -22
- package/dist/lib/Components/visualization/config.d.ts +0 -3
- package/dist/lib/Components/visualization/config.d.ts.map +1 -1
- package/dist/lib/Components/visualization/config.js +3 -6
- package/dist/libs/utils-shared/dist/index.js +191 -143
- package/dist/package.json +4 -6
- package/dist/translations/index.d.ts +3 -0
- package/dist/translations/index.d.ts.map +1 -0
- package/dist/{i18n → translations}/languages.d.ts +0 -5
- package/dist/translations/languages.d.ts.map +1 -0
- package/dist/{i18n → translations}/languages.js +1 -2
- package/dist/{i18n → translations}/locales/en.json.d.ts +11 -0
- package/dist/{i18n → translations}/locales/en.json.js +2 -2
- package/dist/translations/translations.d.ts +727 -0
- package/dist/translations/translations.d.ts.map +1 -0
- package/dist/translations/translations.js +22 -0
- package/package.json +4 -6
- package/dist/_virtual/dynamic-import-helper.js +0 -9
- package/dist/i18n/I18nProvider.d.ts +0 -8
- package/dist/i18n/I18nProvider.d.ts.map +0 -1
- package/dist/i18n/I18nProvider.js +0 -14
- package/dist/i18n/i18n.d.ts +0 -12
- package/dist/i18n/i18n.d.ts.map +0 -1
- package/dist/i18n/i18n.js +0 -42
- package/dist/i18n/index.d.ts +0 -4
- package/dist/i18n/index.d.ts.map +0 -1
- package/dist/i18n/languages.d.ts.map +0 -1
- package/dist/i18n/useCommonTranslation.d.ts +0 -2
- package/dist/i18n/useCommonTranslation.d.ts.map +0 -1
- package/dist/i18n/useCommonTranslation.js +0 -6
- package/dist/node_modules/i18next/dist/esm/i18next.js +0 -1479
- package/dist/node_modules/react-i18next/dist/es/I18nextProvider.js +0 -19
- package/dist/node_modules/react-i18next/dist/es/context.js +0 -17
- package/dist/node_modules/react-i18next/dist/es/defaults.js +0 -22
- package/dist/node_modules/react-i18next/dist/es/i18nInstance.js +0 -8
- package/dist/node_modules/react-i18next/dist/es/initReactI18next.js +0 -11
- package/dist/node_modules/react-i18next/dist/es/unescape.js +0 -25
- package/dist/node_modules/react-i18next/dist/es/useTranslation.js +0 -65
- package/dist/node_modules/react-i18next/dist/es/utils.js +0 -57
- /package/dist/{i18n → translations}/locales/de.json.d.ts +0 -0
- /package/dist/{i18n → translations}/locales/de.json.js +0 -0
- /package/dist/{i18n → translations}/locales/es.json.d.ts +0 -0
- /package/dist/{i18n → translations}/locales/es.json.js +0 -0
- /package/dist/{i18n → translations}/locales/fr.json.d.ts +0 -0
- /package/dist/{i18n → translations}/locales/fr.json.js +0 -0
- /package/dist/{i18n → translations}/locales/ja.json.d.ts +0 -0
- /package/dist/{i18n → translations}/locales/ja.json.js +0 -0
- /package/dist/{i18n → translations}/locales/ko.json.d.ts +0 -0
- /package/dist/{i18n → translations}/locales/ko.json.js +0 -0
- /package/dist/{i18n → translations}/locales/pt.json.d.ts +0 -0
- /package/dist/{i18n → translations}/locales/pt.json.js +0 -0
- /package/dist/{i18n → translations}/locales/ru.json.d.ts +0 -0
- /package/dist/{i18n → translations}/locales/ru.json.js +0 -0
- /package/dist/{i18n → translations}/locales/th.json.d.ts +0 -0
- /package/dist/{i18n → translations}/locales/th.json.js +0 -0
- /package/dist/{i18n → translations}/locales/tr.json.d.ts +0 -0
- /package/dist/{i18n → translations}/locales/tr.json.js +0 -0
- /package/dist/{i18n → translations}/locales/zh.json.d.ts +0 -0
- /package/dist/{i18n → translations}/locales/zh.json.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CartesianChart.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/visualization/CartesianChart/CartesianChart.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CartesianChart.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/visualization/CartesianChart/CartesianChart.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAGnD,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EACN,KAAK,EACL,KAAK,EACL,KAAc,EACd,MAAuC,EACvC,KAAK,EACL,WAAW,EACX,SAAS,EACT,QAAgB,EAChB,OAAO,EAAE,WAAW,EACpB,eAAuB,EACvB,wBAAwB,EACxB,OAAc,EACd,YAAY,EACZ,QAAQ,GACT,EAAE,mBAAmB,2CAwGrB"}
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import { useRef as h, useState as
|
|
3
|
-
import { chartConfig as
|
|
4
|
-
import { ScrubberProvider as
|
|
5
|
-
import { resolveInset as
|
|
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
|
|
10
|
-
function
|
|
10
|
+
import { RevealAnimationProvider as N } from "./RevealAnimation/RevealAnimationProvider.js";
|
|
11
|
+
function te({
|
|
11
12
|
series: d,
|
|
12
13
|
xAxis: y,
|
|
13
|
-
yAxis:
|
|
14
|
+
yAxis: g,
|
|
14
15
|
width: e = "100%",
|
|
15
|
-
height:
|
|
16
|
+
height: i = L.root.defaultHeight,
|
|
16
17
|
inset: l,
|
|
17
18
|
axisPadding: c,
|
|
18
|
-
ariaLabel:
|
|
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),
|
|
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",
|
|
30
|
-
const [p] =
|
|
31
|
-
p &&
|
|
30
|
+
), t = typeof e != "number", m = F((n) => {
|
|
31
|
+
const [p] = n;
|
|
32
|
+
p && I(p.contentRect.width);
|
|
32
33
|
}, []);
|
|
33
|
-
|
|
34
|
+
H(() => {
|
|
34
35
|
if (!t || !a.current || typeof ResizeObserver > "u")
|
|
35
36
|
return;
|
|
36
|
-
const
|
|
37
|
-
return
|
|
38
|
-
}, [t,
|
|
39
|
-
const o = typeof e == "number" ? e :
|
|
40
|
-
() =>
|
|
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:
|
|
46
|
-
width:
|
|
47
|
-
height:
|
|
48
|
-
inset:
|
|
49
|
-
axisPadding:
|
|
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:
|
|
59
|
+
height: i,
|
|
59
60
|
overflow: "visible",
|
|
60
61
|
position: "relative"
|
|
61
62
|
},
|
|
62
|
-
children: o > 0 && /* @__PURE__ */
|
|
63
|
+
children: o > 0 && /* @__PURE__ */ O(B, { children: [
|
|
63
64
|
/* @__PURE__ */ r(
|
|
64
65
|
"svg",
|
|
65
66
|
{
|
|
66
|
-
ref:
|
|
67
|
+
ref: f,
|
|
67
68
|
"data-testid": "chart-svg",
|
|
68
|
-
width:
|
|
69
|
-
height:
|
|
69
|
+
width: v,
|
|
70
|
+
height: i,
|
|
70
71
|
role: "img",
|
|
71
|
-
"aria-label":
|
|
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
|
-
|
|
82
|
+
T,
|
|
82
83
|
{
|
|
83
|
-
svgRef:
|
|
84
|
+
svgRef: f,
|
|
84
85
|
enableScrubbing: s,
|
|
85
86
|
onScrubberPositionChange: P,
|
|
86
87
|
magnetRadius: w,
|
|
87
88
|
children: /* @__PURE__ */ r(
|
|
88
|
-
|
|
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
|
-
|
|
107
|
+
te as CartesianChart
|
|
107
108
|
};
|
|
@@ -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,
|
|
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
|
|
6
|
-
import { DonutSizeProvider as
|
|
7
|
-
import { useContrastSafeSeries as
|
|
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 {
|
|
10
|
-
|
|
11
|
-
|
|
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:
|
|
13
|
+
ariaLabel: v,
|
|
14
14
|
loading: c = !1,
|
|
15
|
-
activeId:
|
|
15
|
+
activeId: b,
|
|
16
16
|
defaultActiveId: S = null,
|
|
17
|
-
onActiveIdChange:
|
|
17
|
+
onActiveIdChange: x,
|
|
18
18
|
renderCenter: s,
|
|
19
19
|
renderCenterActive: a,
|
|
20
|
-
enableColorContrast:
|
|
20
|
+
enableColorContrast: L = !1
|
|
21
21
|
}) {
|
|
22
|
-
const n = M[l], e =
|
|
23
|
-
prop:
|
|
22
|
+
const { t: m } = O(), n = M[l], e = y(h, L), [o, u] = w({
|
|
23
|
+
prop: b,
|
|
24
24
|
defaultProp: S,
|
|
25
|
-
onChange:
|
|
26
|
-
}),
|
|
25
|
+
onChange: x
|
|
26
|
+
}), R = g(
|
|
27
27
|
() => E(e, n),
|
|
28
28
|
[e, n]
|
|
29
|
-
),
|
|
30
|
-
const t = e.findIndex((
|
|
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]),
|
|
39
|
+
}, [e, o]), f = () => {
|
|
40
40
|
o !== null && u(null);
|
|
41
|
-
},
|
|
41
|
+
}, A = (t) => {
|
|
42
42
|
const { relatedTarget: r } = t;
|
|
43
|
-
(!(r instanceof Node) || !t.currentTarget.contains(r)) &&
|
|
44
|
-
},
|
|
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:
|
|
56
|
-
onBlur:
|
|
55
|
+
onMouseLeave: f,
|
|
56
|
+
onBlur: A,
|
|
57
57
|
children: [
|
|
58
58
|
/* @__PURE__ */ i(
|
|
59
|
-
|
|
59
|
+
P,
|
|
60
60
|
{
|
|
61
|
-
segments:
|
|
61
|
+
segments: R,
|
|
62
62
|
geometry: n,
|
|
63
|
-
ariaLabel: c ?
|
|
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
|
-
|
|
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(
|
|
74
|
+
children: /* @__PURE__ */ i(j, { value: { size: l }, children: D ? /* @__PURE__ */ i(
|
|
75
75
|
T,
|
|
76
76
|
{
|
|
77
|
-
activeSegment:
|
|
77
|
+
activeSegment: d,
|
|
78
78
|
renderResting: () => s?.({ series: e, activeSegment: null }) ?? null,
|
|
79
79
|
renderActive: (t) => a({ activeSegment: t })
|
|
80
80
|
}
|
|
81
|
-
) : s?.({ activeSegment:
|
|
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
|
-
|
|
89
|
+
J as DonutChart
|
|
90
90
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { cn as n } from "../../../../libs/utils-shared/dist/index.js";
|
|
3
3
|
const i = ({
|
|
4
|
-
ref:
|
|
5
|
-
className:
|
|
4
|
+
ref: t,
|
|
5
|
+
className: e,
|
|
6
6
|
...r
|
|
7
7
|
}) => /* @__PURE__ */ o(
|
|
8
8
|
"div",
|
|
9
9
|
{
|
|
10
|
-
ref:
|
|
10
|
+
ref: t,
|
|
11
11
|
className: n(
|
|
12
12
|
"pointer-events-auto flex min-w-0 flex-col items-center",
|
|
13
|
-
|
|
13
|
+
e
|
|
14
14
|
),
|
|
15
15
|
...r
|
|
16
16
|
}
|
|
@@ -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;
|
|
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
|
|
6
|
-
import { getDonutViewBox as
|
|
7
|
-
const { hover:
|
|
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 :
|
|
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":
|
|
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:
|
|
27
|
-
onFocus:
|
|
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 ? `${
|
|
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,
|
|
85
|
-
return /* @__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:
|
|
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(${
|
|
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,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createSafeContext as
|
|
2
|
-
const [o, r] =
|
|
1
|
+
import { createSafeContext as t } from "../../../../libs/utils-shared/dist/index.js";
|
|
2
|
+
const [o, r] = t("DonutChart", { size: "md" });
|
|
3
3
|
export {
|
|
4
4
|
o as DonutSizeProvider,
|
|
5
5
|
r as useDonutSizeContext
|
|
@@ -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 '
|
|
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
|
|
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,
|
|
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
|
|
2
|
-
import { cn as
|
|
3
|
-
import { LegendItem as
|
|
4
|
-
function i({
|
|
5
|
-
|
|
6
|
-
ariaLabel: l = "Legend",
|
|
7
|
-
className: a
|
|
8
|
-
}) {
|
|
9
|
-
return e.length === 0 ? null : /* @__PURE__ */ r(
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { cn as t } from "../../../../libs/utils-shared/dist/index.js";
|
|
3
|
+
import { LegendItem as m } from "./LegendItem.js";
|
|
4
|
+
function i({ series: r, ariaLabel: l, className: a }) {
|
|
5
|
+
return r.length === 0 ? null : /* @__PURE__ */ n(
|
|
10
6
|
"ul",
|
|
11
7
|
{
|
|
12
8
|
"aria-label": l,
|
|
13
|
-
className:
|
|
9
|
+
className: t(
|
|
14
10
|
"m-0 flex list-none flex-wrap gap-x-16 gap-y-6 p-0",
|
|
15
11
|
a
|
|
16
12
|
),
|
|
17
|
-
children:
|
|
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
|
|
24
|
-
*
|
|
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":"
|
|
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"}
|