@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.
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +80 -63
- 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 +17 -17
- package/dist/lib/Components/core/AmountInput/useAmountInputValue/useAmountInputValue.js +3 -3
- package/dist/lib/Components/core/Avatar/Avatar.js +7 -7
- package/dist/lib/Components/core/Avatar/resolveAvatarColor.js +2 -2
- package/dist/lib/Components/core/AvatarButton/AvatarButton.js +2 -2
- package/dist/lib/Components/core/Banner/Banner.js +9 -9
- package/dist/lib/Components/core/Button/Button.js +4 -4
- package/dist/lib/Components/core/Card/Card.js +15 -15
- package/dist/lib/Components/core/CardButton/CardButton.d.ts +2 -0
- package/dist/lib/Components/core/CardButton/CardButton.d.ts.map +1 -1
- package/dist/lib/Components/core/CardButton/CardButton.js +4 -4
- package/dist/lib/Components/core/ContentBanner/ContentBanner.js +1 -1
- package/dist/lib/Components/core/DataTable/DataTable.js +42 -42
- 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 +11 -11
- package/dist/lib/Components/core/DotSymbol/DotSymbol.js +7 -7
- package/dist/lib/Components/core/Link/Link.d.ts +1 -1
- package/dist/lib/Components/core/Link/Link.d.ts.map +1 -1
- package/dist/lib/Components/core/Link/Link.js +25 -23
- package/dist/lib/Components/core/Link/types.d.ts +1 -1
- package/dist/lib/Components/core/Link/types.d.ts.map +1 -1
- package/dist/lib/Components/core/ListItem/ListItem.js +8 -8
- package/dist/lib/Components/core/MediaBanner/MediaBanner.js +4 -4
- 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 +1 -1
- package/dist/lib/Components/core/Popover/Popover.js +13 -13
- package/dist/lib/Components/core/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/lib/Components/core/SegmentedControl/SegmentedControl.js +80 -84
- package/dist/lib/Components/core/Select/Select.d.ts.map +1 -1
- package/dist/lib/Components/core/Select/Select.js +108 -107
- package/dist/lib/Components/core/SideBar/SideBar.js +33 -33
- package/dist/lib/Components/core/Spinner/Spinner.js +1 -1
- package/dist/lib/Components/core/Spot/Spot.js +13 -13
- package/dist/lib/Components/core/Stepper/Stepper.d.ts +4 -3
- package/dist/lib/Components/core/Stepper/Stepper.d.ts.map +1 -1
- package/dist/lib/Components/core/Stepper/Stepper.js +137 -62
- package/dist/lib/Components/core/Stepper/types.d.ts +12 -2
- package/dist/lib/Components/core/Stepper/types.d.ts.map +1 -1
- 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/Table/Table.js +10 -10
- 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/Timeline/Timeline.d.ts +54 -0
- package/dist/lib/Components/core/Timeline/Timeline.d.ts.map +1 -0
- package/dist/lib/Components/core/Timeline/Timeline.js +228 -0
- package/dist/lib/Components/core/Timeline/index.d.ts +3 -0
- package/dist/lib/Components/core/Timeline/index.d.ts.map +1 -0
- package/dist/lib/Components/core/Timeline/types.d.ts +148 -0
- package/dist/lib/Components/core/Timeline/types.d.ts.map +1 -0
- package/dist/lib/Components/core/Toast/Toast.d.ts +25 -0
- package/dist/lib/Components/core/Toast/Toast.d.ts.map +1 -0
- package/dist/lib/Components/core/Toast/Toast.js +68 -0
- package/dist/lib/Components/core/Toast/Toaster.d.ts +27 -0
- package/dist/lib/Components/core/Toast/Toaster.d.ts.map +1 -0
- package/dist/lib/Components/core/Toast/Toaster.js +92 -0
- package/dist/lib/Components/core/Toast/hooks/useToastCollapse.d.ts +15 -0
- package/dist/lib/Components/core/Toast/hooks/useToastCollapse.d.ts.map +1 -0
- package/dist/lib/Components/core/Toast/hooks/useToastCollapse.js +15 -0
- package/dist/lib/Components/core/Toast/hooks/useToastViewportPause.d.ts +24 -0
- package/dist/lib/Components/core/Toast/hooks/useToastViewportPause.d.ts.map +1 -0
- package/dist/lib/Components/core/Toast/hooks/useToastViewportPause.js +27 -0
- package/dist/lib/Components/core/Toast/index.d.ts +5 -0
- package/dist/lib/Components/core/Toast/index.d.ts.map +1 -0
- package/dist/lib/Components/core/Toast/styles.d.ts +20 -0
- package/dist/lib/Components/core/Toast/styles.d.ts.map +1 -0
- package/dist/lib/Components/core/Toast/styles.js +77 -0
- package/dist/lib/Components/core/Toast/types.d.ts +81 -0
- package/dist/lib/Components/core/Toast/types.d.ts.map +1 -0
- package/dist/lib/Components/core/Trend/Trend.js +3 -3
- package/dist/lib/Components/core/index.d.ts +2 -0
- package/dist/lib/Components/core/index.d.ts.map +1 -1
- package/dist/lib/Components/internal/BaseButton/BaseButton.js +7 -7
- package/dist/lib/Components/internal/BaseInput/BaseInput.js +22 -22
- package/dist/lib/Components/internal/BaseInput/BaseInputMultiline.js +12 -12
- 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/createIcon.js +3 -3
- 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 +2 -2
- 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/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 +6 -10
- 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 +353 -140
- 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,84 +1,85 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
1
|
+
import { jsx as t, jsxs as E, Fragment as u } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo as d } from "react";
|
|
3
|
-
import { ChartEmptyLabel as
|
|
4
|
-
import { useShimmerAnimation as
|
|
5
|
-
import { chartConfig as
|
|
6
|
-
import { mergeDefaults as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
|
|
3
|
+
import { ChartEmptyLabel as z } from "../CartesianChart/ChartEmptyLabel/ChartEmptyLabel.js";
|
|
4
|
+
import { useShimmerAnimation as J } from "../CartesianChart/hooks/useShimmerAnimation.js";
|
|
5
|
+
import { chartConfig as C } from "../config.js";
|
|
6
|
+
import { mergeDefaults as v, computeAxisPadding as K, canRenderLine as Q, getChartAriaLabel as U, getChartDisplayStates as V } from "./utils.js";
|
|
7
|
+
import { useCommonTranslation as X } from "../../../../translations/translations.js";
|
|
8
|
+
import { CartesianChart as Y } from "../CartesianChart/CartesianChart.js";
|
|
9
|
+
import { LineChartEmptyState as Z } from "./LineChartEmptyState/LineChartEmptyState.js";
|
|
10
|
+
import { XAxis as _ } from "../Axis/XAxis/XAxis.js";
|
|
11
|
+
import { YAxis as $ } from "../Axis/YAxis/YAxis.js";
|
|
12
|
+
import { Line as N } from "../Line/Line.js";
|
|
13
|
+
import { useTheme as tt } from "../../core/ThemeProvider/ThemeProvider.js";
|
|
14
|
+
import { getContrastSafeColor as ot } from "../../../../libs/design-core/dist/lib/colorContrast/colorContrast.js";
|
|
15
|
+
import { primitiveColorTokens as D } from "../../../../libs/design-core/dist/lib/themes/js/primitives/primitive.colors.js";
|
|
16
|
+
const et = {
|
|
16
17
|
position: "bottom",
|
|
17
18
|
showGrid: !1,
|
|
18
19
|
showLine: !1,
|
|
19
20
|
showTickMark: !1,
|
|
20
21
|
scaleType: "linear",
|
|
21
22
|
nice: !1
|
|
22
|
-
},
|
|
23
|
+
}, it = {
|
|
23
24
|
position: "start",
|
|
24
25
|
showGrid: !1,
|
|
25
26
|
showLine: !1,
|
|
26
27
|
showTickMark: !1,
|
|
27
28
|
scaleType: "linear",
|
|
28
29
|
nice: !0,
|
|
29
|
-
width:
|
|
30
|
-
},
|
|
30
|
+
width: C.axis.defaultWidth
|
|
31
|
+
}, M = ({
|
|
31
32
|
series: e,
|
|
32
33
|
showArea: r,
|
|
33
34
|
areaType: s,
|
|
34
35
|
connectNulls: a,
|
|
35
|
-
stroke:
|
|
36
|
-
}) => /* @__PURE__ */ t(
|
|
37
|
-
|
|
36
|
+
stroke: i
|
|
37
|
+
}) => /* @__PURE__ */ t(u, { children: e.map((o) => /* @__PURE__ */ t(
|
|
38
|
+
N,
|
|
38
39
|
{
|
|
39
|
-
seriesId:
|
|
40
|
-
stroke:
|
|
40
|
+
seriesId: o.id,
|
|
41
|
+
stroke: i ?? o.stroke,
|
|
41
42
|
showArea: r,
|
|
42
43
|
areaType: s,
|
|
43
44
|
connectNulls: a
|
|
44
45
|
},
|
|
45
|
-
|
|
46
|
-
)) }),
|
|
46
|
+
o.id
|
|
47
|
+
)) }), rt = ({
|
|
47
48
|
series: e,
|
|
48
49
|
showArea: r,
|
|
49
50
|
areaType: s,
|
|
50
51
|
connectNulls: a
|
|
51
52
|
}) => {
|
|
52
|
-
const { animationStyle:
|
|
53
|
-
return /* @__PURE__ */
|
|
54
|
-
/* @__PURE__ */ t("style", { children:
|
|
55
|
-
/* @__PURE__ */ t("g", { style: { animation:
|
|
56
|
-
|
|
53
|
+
const { animationStyle: i, keyframe: o } = J();
|
|
54
|
+
return /* @__PURE__ */ E(u, { children: [
|
|
55
|
+
/* @__PURE__ */ t("style", { children: o }),
|
|
56
|
+
/* @__PURE__ */ t("g", { style: { animation: i }, children: /* @__PURE__ */ t(
|
|
57
|
+
M,
|
|
57
58
|
{
|
|
58
59
|
series: e,
|
|
59
60
|
showArea: r,
|
|
60
61
|
areaType: s,
|
|
61
62
|
connectNulls: a,
|
|
62
|
-
stroke:
|
|
63
|
+
stroke: C.color.mutedLine
|
|
63
64
|
}
|
|
64
65
|
) })
|
|
65
66
|
] });
|
|
66
|
-
},
|
|
67
|
+
}, st = ({
|
|
67
68
|
series: e,
|
|
68
69
|
showArea: r,
|
|
69
70
|
areaType: s,
|
|
70
71
|
connectNulls: a,
|
|
71
|
-
showXAxis:
|
|
72
|
-
showYAxis:
|
|
72
|
+
showXAxis: i,
|
|
73
|
+
showYAxis: o,
|
|
73
74
|
xAxisConfig: n,
|
|
74
75
|
yAxisConfig: m,
|
|
75
76
|
isTransitionLoading: p,
|
|
76
|
-
children:
|
|
77
|
-
}) => /* @__PURE__ */
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
children: h
|
|
78
|
+
}) => /* @__PURE__ */ E(u, { children: [
|
|
79
|
+
i && /* @__PURE__ */ t(_, { ...n }),
|
|
80
|
+
o && /* @__PURE__ */ t($, { ...m }),
|
|
80
81
|
p ? /* @__PURE__ */ t(
|
|
81
|
-
|
|
82
|
+
rt,
|
|
82
83
|
{
|
|
83
84
|
series: e,
|
|
84
85
|
showArea: r,
|
|
@@ -86,7 +87,7 @@ const N = {
|
|
|
86
87
|
connectNulls: a
|
|
87
88
|
}
|
|
88
89
|
) : /* @__PURE__ */ t(
|
|
89
|
-
|
|
90
|
+
M,
|
|
90
91
|
{
|
|
91
92
|
series: e,
|
|
92
93
|
showArea: r,
|
|
@@ -94,88 +95,93 @@ const N = {
|
|
|
94
95
|
connectNulls: a
|
|
95
96
|
}
|
|
96
97
|
),
|
|
97
|
-
|
|
98
|
+
h
|
|
98
99
|
] });
|
|
99
|
-
function
|
|
100
|
+
function xt({
|
|
100
101
|
series: e,
|
|
101
102
|
showArea: r = !1,
|
|
102
103
|
areaType: s = "gradient",
|
|
103
104
|
connectNulls: a,
|
|
104
|
-
showXAxis:
|
|
105
|
-
showYAxis:
|
|
105
|
+
showXAxis: i = !1,
|
|
106
|
+
showYAxis: o = !1,
|
|
106
107
|
xAxis: n,
|
|
107
108
|
yAxis: m,
|
|
108
109
|
width: p = "100%",
|
|
109
|
-
height:
|
|
110
|
-
inset:
|
|
111
|
-
enableScrubbing:
|
|
112
|
-
onScrubberPositionChange:
|
|
113
|
-
animate:
|
|
114
|
-
magnetRadius:
|
|
110
|
+
height: h = C.root.defaultHeight,
|
|
111
|
+
inset: j,
|
|
112
|
+
enableScrubbing: G,
|
|
113
|
+
onScrubberPositionChange: W,
|
|
114
|
+
animate: B,
|
|
115
|
+
magnetRadius: F,
|
|
115
116
|
loading: L = !1,
|
|
116
|
-
emptyLabel:
|
|
117
|
-
enableColorContrast:
|
|
118
|
-
children:
|
|
117
|
+
emptyLabel: H,
|
|
118
|
+
enableColorContrast: k = !1,
|
|
119
|
+
children: I
|
|
119
120
|
}) {
|
|
120
|
-
const { colorScheme:
|
|
121
|
+
const { t: x } = X(), { colorScheme: O } = tt(), b = O === "dark" ? D.dark.grey["050"] : D.light.grey["050"], g = d(
|
|
121
122
|
() => e?.map((y) => ({
|
|
122
123
|
...y,
|
|
123
|
-
...y.stroke &&
|
|
124
|
-
stroke:
|
|
124
|
+
...y.stroke && k && {
|
|
125
|
+
stroke: ot(y.stroke, b)
|
|
125
126
|
}
|
|
126
127
|
})),
|
|
127
|
-
[e,
|
|
128
|
+
[e, k, b]
|
|
128
129
|
), l = d(
|
|
129
|
-
() =>
|
|
130
|
+
() => v(et, n),
|
|
130
131
|
[n]
|
|
131
132
|
), c = d(
|
|
132
|
-
() =>
|
|
133
|
+
() => v(it, m),
|
|
133
134
|
[m]
|
|
134
|
-
),
|
|
135
|
-
() =>
|
|
136
|
-
showXAxis:
|
|
137
|
-
showYAxis:
|
|
138
|
-
xAxisPosition:
|
|
139
|
-
yAxisPosition:
|
|
135
|
+
), T = l.position, A = c.position, P = c.width, R = d(
|
|
136
|
+
() => K({
|
|
137
|
+
showXAxis: i,
|
|
138
|
+
showYAxis: o,
|
|
139
|
+
xAxisPosition: T,
|
|
140
|
+
yAxisPosition: A,
|
|
140
141
|
yAxisWidth: P
|
|
141
142
|
}),
|
|
142
|
-
[o,
|
|
143
|
-
),
|
|
143
|
+
[i, o, T, A, P]
|
|
144
|
+
), S = Q(g, l.data), f = V({ loading: L, hasData: S }), w = H ?? x("components.chart.emptyLabel"), q = U({
|
|
145
|
+
loading: L,
|
|
146
|
+
hasData: S,
|
|
147
|
+
emptyLabel: w,
|
|
148
|
+
loadingLabel: x("components.chart.loadingAriaLabel")
|
|
149
|
+
});
|
|
144
150
|
return /* @__PURE__ */ t(
|
|
145
|
-
|
|
151
|
+
Y,
|
|
146
152
|
{
|
|
147
|
-
series:
|
|
153
|
+
series: g ?? [],
|
|
148
154
|
xAxis: l,
|
|
149
155
|
yAxis: c,
|
|
150
156
|
width: p,
|
|
151
|
-
height:
|
|
152
|
-
inset:
|
|
153
|
-
axisPadding:
|
|
154
|
-
enableScrubbing:
|
|
155
|
-
onScrubberPositionChange:
|
|
156
|
-
animate:
|
|
157
|
-
magnetRadius:
|
|
158
|
-
ariaLabel:
|
|
157
|
+
height: h,
|
|
158
|
+
inset: j,
|
|
159
|
+
axisPadding: R,
|
|
160
|
+
enableScrubbing: G,
|
|
161
|
+
onScrubberPositionChange: W,
|
|
162
|
+
animate: B,
|
|
163
|
+
magnetRadius: F,
|
|
164
|
+
ariaLabel: q,
|
|
159
165
|
ariaBusy: L,
|
|
160
|
-
overlay: f.showEmptyOverlay ? /* @__PURE__ */ t(
|
|
161
|
-
children: f.showPlaceholder ? /* @__PURE__ */ t(
|
|
162
|
-
|
|
166
|
+
overlay: f.showEmptyOverlay ? /* @__PURE__ */ t(z, { children: w }) : void 0,
|
|
167
|
+
children: f.showPlaceholder ? /* @__PURE__ */ t(Z, { loading: f.placeholderLoading }) : /* @__PURE__ */ t(
|
|
168
|
+
st,
|
|
163
169
|
{
|
|
164
|
-
series:
|
|
170
|
+
series: g ?? [],
|
|
165
171
|
showArea: r,
|
|
166
172
|
areaType: s,
|
|
167
173
|
connectNulls: a,
|
|
168
|
-
showXAxis:
|
|
169
|
-
showYAxis:
|
|
174
|
+
showXAxis: i,
|
|
175
|
+
showYAxis: o,
|
|
170
176
|
xAxisConfig: l,
|
|
171
177
|
yAxisConfig: c,
|
|
172
178
|
isTransitionLoading: f.isTransitionLoading,
|
|
173
|
-
children:
|
|
179
|
+
children: I
|
|
174
180
|
}
|
|
175
181
|
)
|
|
176
182
|
}
|
|
177
183
|
);
|
|
178
184
|
}
|
|
179
185
|
export {
|
|
180
|
-
|
|
186
|
+
xt as LineChart
|
|
181
187
|
};
|
|
@@ -50,7 +50,7 @@ export type LineChartProps = LineRenderOptions & Pick<CartesianChartProps, 'widt
|
|
|
50
50
|
/**
|
|
51
51
|
* Text shown in the centre of the chart when there is no data and the chart
|
|
52
52
|
* is not loading.
|
|
53
|
-
* @default 'No data'
|
|
53
|
+
* @default 'No data' (translated)
|
|
54
54
|
*/
|
|
55
55
|
emptyLabel?: string;
|
|
56
56
|
/**
|
|
@@ -31,10 +31,11 @@ export declare const getChartDisplayStates: ({ loading, hasData, }: {
|
|
|
31
31
|
* Accessibility label matching the chart's current state: the loading label
|
|
32
32
|
* while loading, the empty label when there is nothing to draw, otherwise none.
|
|
33
33
|
*/
|
|
34
|
-
export declare const getChartAriaLabel: ({ loading, hasData, emptyLabel, }: {
|
|
34
|
+
export declare const getChartAriaLabel: ({ loading, hasData, emptyLabel, loadingLabel, }: {
|
|
35
35
|
loading: boolean;
|
|
36
36
|
hasData: boolean;
|
|
37
37
|
emptyLabel: string;
|
|
38
|
+
loadingLabel: string;
|
|
38
39
|
}) => string | undefined;
|
|
39
40
|
/**
|
|
40
41
|
* Whether any series has at least `emptyState.minDrawablePoints` finite points,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/visualization/LineChart/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGhD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAIzD,KAAK,wBAAwB,GAAG;IAC9B,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;IACtC,aAAa,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;IACtC,UAAU,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;CACjC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,GAAI,qEAMhC,wBAAwB,KAAG,OAAO,CAAC,UAAU,CAAC,GAAG,SAanD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAAI,uBAGnC;IACD,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;CAClB;;;;;CAKC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAAI,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/visualization/LineChart/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGhD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAIzD,KAAK,wBAAwB,GAAG;IAC9B,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;IACtC,aAAa,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;IACtC,UAAU,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;CACjC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,GAAI,qEAMhC,wBAAwB,KAAG,OAAO,CAAC,UAAU,CAAC,GAAG,SAanD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAAI,uBAGnC;IACD,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;CAClB;;;;;CAKC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAAI,iDAK/B;IACD,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACtB,KAAG,MAAM,GAAG,SAUZ,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,GACxB,QAAQ,MAAM,EAAE,GAAG,SAAS,EAC5B,QAAQ,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,KACnC,OAWF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,aAAa,GAAI,CAAC,SAAS,MAAM,EAC5C,UAAU,CAAC,EACX,YAAY,OAAO,CAAC,CAAC,CAAC,KACrB,CAUF,CAAC"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { chartConfig as
|
|
2
|
-
import { isFiniteNumber as
|
|
3
|
-
const { axis:
|
|
1
|
+
import { chartConfig as c } from "../config.js";
|
|
2
|
+
import { isFiniteNumber as f } from "../utils/numbers.js";
|
|
3
|
+
const { axis: a, emptyState: u } = c, g = ({
|
|
4
4
|
showXAxis: e,
|
|
5
5
|
showYAxis: t,
|
|
6
|
-
xAxisPosition:
|
|
7
|
-
yAxisPosition:
|
|
6
|
+
xAxisPosition: n,
|
|
7
|
+
yAxisPosition: r,
|
|
8
8
|
yAxisWidth: o
|
|
9
9
|
}) => {
|
|
10
10
|
if (!e && !t)
|
|
11
11
|
return;
|
|
12
|
-
const i = o ??
|
|
12
|
+
const i = o ?? a.defaultWidth;
|
|
13
13
|
return {
|
|
14
|
-
top: e &&
|
|
15
|
-
bottom: e &&
|
|
16
|
-
left: t &&
|
|
17
|
-
right: t &&
|
|
14
|
+
top: e && n === "top" ? a.defaultHeight : 0,
|
|
15
|
+
bottom: e && n === "bottom" ? a.defaultHeight : 0,
|
|
16
|
+
left: t && r === "start" ? i : 0,
|
|
17
|
+
right: t && r === "end" ? i : 0
|
|
18
18
|
};
|
|
19
19
|
}, s = ({
|
|
20
20
|
loading: e,
|
|
@@ -27,26 +27,27 @@ const { axis: l, emptyState: c } = f, g = ({
|
|
|
27
27
|
}), p = ({
|
|
28
28
|
loading: e,
|
|
29
29
|
hasData: t,
|
|
30
|
-
emptyLabel:
|
|
30
|
+
emptyLabel: n,
|
|
31
|
+
loadingLabel: r
|
|
31
32
|
}) => {
|
|
32
33
|
if (e)
|
|
33
|
-
return c.loadingAriaLabel;
|
|
34
|
-
if (!t)
|
|
35
34
|
return r;
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
if (!t)
|
|
36
|
+
return n;
|
|
37
|
+
}, h = (e, t) => (e ?? []).some((n) => {
|
|
38
|
+
const r = n.data ?? [], o = t ? Math.min(r.length, t.length) : r.length;
|
|
38
39
|
let i = 0;
|
|
39
|
-
for (let
|
|
40
|
-
if (
|
|
40
|
+
for (let l = 0; l < o; l++)
|
|
41
|
+
if (f(r[l]) && i++, i >= u.minDrawablePoints) return !0;
|
|
41
42
|
return !1;
|
|
42
43
|
}), b = (e, t) => {
|
|
43
44
|
if (!t) return e;
|
|
44
|
-
const
|
|
45
|
-
for (const
|
|
46
|
-
const o = t[
|
|
47
|
-
o !== void 0 && (r
|
|
45
|
+
const n = { ...e };
|
|
46
|
+
for (const r of Object.keys(t)) {
|
|
47
|
+
const o = t[r];
|
|
48
|
+
o !== void 0 && (n[r] = o);
|
|
48
49
|
}
|
|
49
|
-
return
|
|
50
|
+
return n;
|
|
50
51
|
};
|
|
51
52
|
export {
|
|
52
53
|
h as canRenderLine,
|
|
@@ -84,8 +84,6 @@ export declare const chartConfig: {
|
|
|
84
84
|
};
|
|
85
85
|
readonly emptyState: {
|
|
86
86
|
readonly minDrawablePoints: 2;
|
|
87
|
-
readonly loadingAriaLabel: "Loading chart";
|
|
88
|
-
readonly defaultLabel: "No data";
|
|
89
87
|
readonly gridLineRatios: readonly [0.3, 0.5, 0.7];
|
|
90
88
|
readonly placeholderViewWidth: 728;
|
|
91
89
|
readonly placeholderViewHeight: 208;
|
|
@@ -135,7 +133,6 @@ export declare const chartConfig: {
|
|
|
135
133
|
readonly durationInSeconds: 2;
|
|
136
134
|
readonly minOpacity: 0.5;
|
|
137
135
|
readonly easing: "cubic-bezier(0.4, 0, 0.6, 1)";
|
|
138
|
-
readonly ariaLabel: "Loading donut chart";
|
|
139
136
|
};
|
|
140
137
|
readonly size: {
|
|
141
138
|
readonly md: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/visualization/config.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD;;;;GAIG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;8BAwBqC,UAAU;;;;;;;;;;;;;;;;;;;;;;;QA2BnE,yDAAyD;;;;;;;;;;;;;;QAezD,oEAAoE
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/visualization/config.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD;;;;GAIG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;8BAwBqC,UAAU;;;;;;;;;;;;;;;;;;;;;;;QA2BnE,yDAAyD;;;;;;;;;;;;;;QAezD,oEAAoE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA4CpE,2EAA2E;;;;;QAE3E,wEAAwE;;;;YAItE,8EAA8E;;YAE9E;;;;eAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cssVar as e } from "../../../libs/design-core/dist/lib/cssVar/cssVar.js";
|
|
2
|
-
const
|
|
2
|
+
const a = {
|
|
3
3
|
color: {
|
|
4
4
|
stroke: e("var(--border-muted)"),
|
|
5
5
|
gridLine: e("var(--border-muted-subtle-transparent)"),
|
|
@@ -79,8 +79,6 @@ const t = {
|
|
|
79
79
|
},
|
|
80
80
|
emptyState: {
|
|
81
81
|
minDrawablePoints: 2,
|
|
82
|
-
loadingAriaLabel: "Loading chart",
|
|
83
|
-
defaultLabel: "No data",
|
|
84
82
|
gridLineRatios: [0.3, 0.5, 0.7],
|
|
85
83
|
placeholderViewWidth: 728,
|
|
86
84
|
placeholderViewHeight: 208,
|
|
@@ -126,8 +124,7 @@ const t = {
|
|
|
126
124
|
loading: {
|
|
127
125
|
durationInSeconds: 2,
|
|
128
126
|
minOpacity: 0.5,
|
|
129
|
-
easing: "cubic-bezier(0.4, 0, 0.6, 1)"
|
|
130
|
-
ariaLabel: "Loading donut chart"
|
|
127
|
+
easing: "cubic-bezier(0.4, 0, 0.6, 1)"
|
|
131
128
|
},
|
|
132
129
|
size: {
|
|
133
130
|
md: {
|
|
@@ -152,5 +149,5 @@ const t = {
|
|
|
152
149
|
}
|
|
153
150
|
};
|
|
154
151
|
export {
|
|
155
|
-
|
|
152
|
+
a as chartConfig
|
|
156
153
|
};
|