@redsift/charts 8.1.0 → 9.0.0-alpha.1
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/index.d.ts +2 -0
- package/index.js +52 -39
- package/index.js.map +1 -1
- package/package.json +4 -4
package/index.d.ts
CHANGED
|
@@ -583,6 +583,8 @@ interface PieChartProps extends ChartContainerProps {
|
|
|
583
583
|
labelDecorator?: (datum: ArcDatum) => string;
|
|
584
584
|
/** Define whether the labels should be displayed inside or outside the charts and if they should contain raw or percentage values. */
|
|
585
585
|
labelVariant?: PieChartLabelVariant;
|
|
586
|
+
/** Props to forward to the Legend block. Can be used to make the legend selectable. */
|
|
587
|
+
legendProps?: Omit<LegendProps, 'data' | 'ref' | 'variant' | 'width'>;
|
|
586
588
|
/** Labels and texts. */
|
|
587
589
|
localeText?: LocaleText$1;
|
|
588
590
|
/** Method to be called on a click on a slice. */
|
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { brush, select, scaleOrdinal, zoom, interpolateRound, interpolate, scaleLinear, sum, arc, pie, min, extent, descending, scaleSqrt, max } from 'd3';
|
|
2
|
-
import {
|
|
2
|
+
import { RedsiftColorPresentationBlueDefault, RedsiftColorPresentationGreyDark, RedsiftColorPresentationGreenDefault, RedsiftColorPresentationPinkDefault, RedsiftColorPresentationAquaDefault, RedsiftColorPresentationBrownDefault, RedsiftColorPresentationRedDefault, RedsiftColorPresentationYellowDefault, RedsiftColorPresentationPurpleDefault, RedsiftColorPresentationOrangeDefault, RedsiftColorPresentationGreyDefault, RedsiftColorPresentationGreenDark, RedsiftColorPresentationPinkDark, RedsiftColorPresentationAquaDark, RedsiftColorPresentationBrownDark, RedsiftColorPresentationRedDark, RedsiftColorPresentationYellowDark, RedsiftColorPresentationPurpleDark, RedsiftColorPresentationOrangeDark, RedsiftColorPresentationBlueDark, RedsiftColorPresentationGreenDarker, RedsiftColorPresentationPinkDarker, RedsiftColorPresentationAquaDarker, RedsiftColorPresentationBrownDarker, RedsiftColorPresentationRedDarker, RedsiftColorPresentationYellowDarker, RedsiftColorPresentationPurpleDarker, RedsiftColorPresentationOrangeDarker, RedsiftColorPresentationBlueDarker, RedsiftColorPresentationGreyDarker, RedsiftColorPresentationGreenDarkerer, RedsiftColorPresentationPinkDarkerer, RedsiftColorPresentationAquaDarkerer, RedsiftColorPresentationBrownDarkerer, RedsiftColorPresentationRedDarkerer, RedsiftColorPresentationYellowDarkerer, RedsiftColorPresentationPurpleDarkerer, RedsiftColorPresentationOrangeDarkerer, RedsiftColorPresentationBlueDarkerer, RedsiftColorPresentationGreyDarkerer, RedsiftColorPresentationGreenLight, RedsiftColorPresentationPinkLight, RedsiftColorPresentationAquaLight, RedsiftColorPresentationBrownLight, RedsiftColorPresentationRedLight, RedsiftColorPresentationYellowLight, RedsiftColorPresentationPurpleLight, RedsiftColorPresentationOrangeLight, RedsiftColorPresentationBlueLight, RedsiftColorPresentationGreyLight, RedsiftColorPresentationGreenLighter, RedsiftColorPresentationPinkLighter, RedsiftColorPresentationAquaLighter, RedsiftColorPresentationBrownLighter, RedsiftColorPresentationRedLighter, RedsiftColorPresentationYellowLighter, RedsiftColorPresentationPurpleLighter, RedsiftColorPresentationOrangeLighter, RedsiftColorPresentationBlueLighter, RedsiftColorPresentationGreyLighter, RedsiftColorPresentationGreenLighterer, RedsiftColorPresentationPinkLighterer, RedsiftColorPresentationAquaLighterer, RedsiftColorPresentationBrownLighterer, RedsiftColorPresentationRedLighterer, RedsiftColorPresentationYellowLighterer, RedsiftColorPresentationPurpleLighterer, RedsiftColorPresentationOrangeLighterer, RedsiftColorPresentationBlueLighterer, RedsiftColorPresentationGreyLighterer, useId, Text, Number as Number$1, baseStyling, focusRing, Flexbox, warnIfNoAccessibleLabelFound, Heading, Button } from '@redsift/design-system';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import React__default, { useRef, useEffect, useMemo, useState, useLayoutEffect, forwardRef, useCallback, useContext
|
|
4
|
+
import React__default, { useRef, useEffect, useMemo, useState, useLayoutEffect, forwardRef, useCallback, useContext } from 'react';
|
|
5
5
|
import classNames from 'classnames';
|
|
6
6
|
import { unstable_batchedUpdates } from 'react-dom';
|
|
7
7
|
import styled, { css } from 'styled-components';
|
|
@@ -51,24 +51,24 @@ const useBrush = _ref => {
|
|
|
51
51
|
});
|
|
52
52
|
};
|
|
53
53
|
|
|
54
|
-
const monochrome =
|
|
55
|
-
const empty =
|
|
54
|
+
const monochrome = RedsiftColorPresentationBlueDefault;
|
|
55
|
+
const empty = RedsiftColorPresentationGreyDark;
|
|
56
56
|
const scheme = {
|
|
57
|
-
default: [
|
|
58
|
-
dark: [
|
|
59
|
-
darker: [
|
|
60
|
-
darkerer: [
|
|
61
|
-
light: [
|
|
62
|
-
lighter: [
|
|
63
|
-
lighterer: [
|
|
57
|
+
default: [RedsiftColorPresentationGreenDefault, RedsiftColorPresentationPinkDefault, RedsiftColorPresentationAquaDefault, RedsiftColorPresentationBrownDefault, RedsiftColorPresentationRedDefault, RedsiftColorPresentationYellowDefault, RedsiftColorPresentationPurpleDefault, RedsiftColorPresentationOrangeDefault, RedsiftColorPresentationBlueDefault, RedsiftColorPresentationGreyDefault],
|
|
58
|
+
dark: [RedsiftColorPresentationGreenDark, RedsiftColorPresentationPinkDark, RedsiftColorPresentationAquaDark, RedsiftColorPresentationBrownDark, RedsiftColorPresentationRedDark, RedsiftColorPresentationYellowDark, RedsiftColorPresentationPurpleDark, RedsiftColorPresentationOrangeDark, RedsiftColorPresentationBlueDark, RedsiftColorPresentationGreyDark],
|
|
59
|
+
darker: [RedsiftColorPresentationGreenDarker, RedsiftColorPresentationPinkDarker, RedsiftColorPresentationAquaDarker, RedsiftColorPresentationBrownDarker, RedsiftColorPresentationRedDarker, RedsiftColorPresentationYellowDarker, RedsiftColorPresentationPurpleDarker, RedsiftColorPresentationOrangeDarker, RedsiftColorPresentationBlueDarker, RedsiftColorPresentationGreyDarker],
|
|
60
|
+
darkerer: [RedsiftColorPresentationGreenDarkerer, RedsiftColorPresentationPinkDarkerer, RedsiftColorPresentationAquaDarkerer, RedsiftColorPresentationBrownDarkerer, RedsiftColorPresentationRedDarkerer, RedsiftColorPresentationYellowDarkerer, RedsiftColorPresentationPurpleDarkerer, RedsiftColorPresentationOrangeDarkerer, RedsiftColorPresentationBlueDarkerer, RedsiftColorPresentationGreyDarkerer],
|
|
61
|
+
light: [RedsiftColorPresentationGreenLight, RedsiftColorPresentationPinkLight, RedsiftColorPresentationAquaLight, RedsiftColorPresentationBrownLight, RedsiftColorPresentationRedLight, RedsiftColorPresentationYellowLight, RedsiftColorPresentationPurpleLight, RedsiftColorPresentationOrangeLight, RedsiftColorPresentationBlueLight, RedsiftColorPresentationGreyLight],
|
|
62
|
+
lighter: [RedsiftColorPresentationGreenLighter, RedsiftColorPresentationPinkLighter, RedsiftColorPresentationAquaLighter, RedsiftColorPresentationBrownLighter, RedsiftColorPresentationRedLighter, RedsiftColorPresentationYellowLighter, RedsiftColorPresentationPurpleLighter, RedsiftColorPresentationOrangeLighter, RedsiftColorPresentationBlueLighter, RedsiftColorPresentationGreyLighter],
|
|
63
|
+
lighterer: [RedsiftColorPresentationGreenLighterer, RedsiftColorPresentationPinkLighterer, RedsiftColorPresentationAquaLighterer, RedsiftColorPresentationBrownLighterer, RedsiftColorPresentationRedLighterer, RedsiftColorPresentationYellowLighterer, RedsiftColorPresentationPurpleLighterer, RedsiftColorPresentationOrangeLighterer, RedsiftColorPresentationBlueLighterer, RedsiftColorPresentationGreyLighterer],
|
|
64
64
|
monochrome: [monochrome],
|
|
65
65
|
empty: [empty]
|
|
66
66
|
};
|
|
67
67
|
const successDangerScheme = {
|
|
68
|
-
success:
|
|
69
|
-
warning:
|
|
70
|
-
danger:
|
|
71
|
-
neutral:
|
|
68
|
+
success: RedsiftColorPresentationGreenDefault,
|
|
69
|
+
warning: RedsiftColorPresentationOrangeDefault,
|
|
70
|
+
danger: RedsiftColorPresentationRedDefault,
|
|
71
|
+
neutral: RedsiftColorPresentationGreyDefault
|
|
72
72
|
};
|
|
73
73
|
const getColorScale = (theme, domain, isEmpty) => {
|
|
74
74
|
let d3colors = scaleOrdinal(scheme.default);
|
|
@@ -330,7 +330,8 @@ const DataPoint = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
330
330
|
tooltipVariant
|
|
331
331
|
} = props,
|
|
332
332
|
forwardedProps = _objectWithoutProperties(props, _excluded$k);
|
|
333
|
-
const
|
|
333
|
+
const [_id] = useId();
|
|
334
|
+
const id = propsId !== null && propsId !== void 0 ? propsId : _id;
|
|
334
335
|
const text = labelDecorator ? labelDecorator(data) : data.data.key;
|
|
335
336
|
const hasText = text && tooltipVariant !== TooltipVariant.none;
|
|
336
337
|
const tooltipValue = tooltipVariant === TooltipVariant.value ? data.data.value : tooltipVariant === TooltipVariant.percent && data.data.percent ? data.data.percent : undefined;
|
|
@@ -518,7 +519,8 @@ const Arcs = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
518
519
|
tooltipVariant
|
|
519
520
|
} = props,
|
|
520
521
|
forwardedProps = _objectWithoutProperties(props, _excluded$i);
|
|
521
|
-
const
|
|
522
|
+
const [_id] = useId();
|
|
523
|
+
const id = propsId !== null && propsId !== void 0 ? propsId : _id;
|
|
522
524
|
const animatedProps = J(_objectSpread2(_objectSpread2({}, config), {}, {
|
|
523
525
|
to: async next => {
|
|
524
526
|
await next({
|
|
@@ -609,7 +611,7 @@ const StyledAxis = styled(it.g)`
|
|
|
609
611
|
}
|
|
610
612
|
|
|
611
613
|
text {
|
|
612
|
-
font-family: var(--redsift-typography-font-family-
|
|
614
|
+
font-family: var(--redsift-typography-font-family-poppins);
|
|
613
615
|
font-size: 10px;
|
|
614
616
|
user-select: none;
|
|
615
617
|
}
|
|
@@ -1055,7 +1057,7 @@ const StyledChartContainer = styled.div`
|
|
|
1055
1057
|
display: flex;
|
|
1056
1058
|
align-items: center;
|
|
1057
1059
|
gap: 16px;
|
|
1058
|
-
font-family: var(--redsift-typography-font-family-
|
|
1060
|
+
font-family: var(--redsift-typography-font-family-poppins);
|
|
1059
1061
|
font-size: 11px;
|
|
1060
1062
|
justify-content: center;
|
|
1061
1063
|
margin: 8px 0;
|
|
@@ -1095,7 +1097,8 @@ const ChartContainer = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1095
1097
|
onReset
|
|
1096
1098
|
} = props,
|
|
1097
1099
|
forwardedProps = _objectWithoutProperties(props, _excluded$f);
|
|
1098
|
-
const
|
|
1100
|
+
const [_id] = useId();
|
|
1101
|
+
const id = propsId !== null && propsId !== void 0 ? propsId : _id;
|
|
1099
1102
|
warnIfNoAccessibleLabelFound(props, [title]);
|
|
1100
1103
|
const stringFormatter = useLocalizedStringFormatter(intlMessages);
|
|
1101
1104
|
const ariaLabel = propsAriaLabel ? propsAriaLabel : propsAriaLabelledby || title ? undefined : undefined;
|
|
@@ -1157,7 +1160,7 @@ const StyledBarChartEmptyText = styled.div`
|
|
|
1157
1160
|
}
|
|
1158
1161
|
|
|
1159
1162
|
> span {
|
|
1160
|
-
font-family: var(--redsift-typography-font-family-
|
|
1163
|
+
font-family: var(--redsift-typography-font-family-poppins);
|
|
1161
1164
|
color: var(--redsift-color-neutral-black);
|
|
1162
1165
|
font-size: ${_ref2 => {
|
|
1163
1166
|
let {
|
|
@@ -1301,7 +1304,7 @@ const RenderedBarChart = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1301
1304
|
};
|
|
1302
1305
|
const chartHeight = height - margins.top - margins.bottom;
|
|
1303
1306
|
const chartWidth = width - margins.left - margins.right;
|
|
1304
|
-
const numberOfRows = data.length;
|
|
1307
|
+
const numberOfRows = data.filter(datum => datum.value).length;
|
|
1305
1308
|
const gap = 5;
|
|
1306
1309
|
const scale = useMemo(() => scaleLinear().domain([0, Math.max(...data.map(_ref => {
|
|
1307
1310
|
let {
|
|
@@ -1390,7 +1393,8 @@ const BarChart = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1390
1393
|
tooltipVariant
|
|
1391
1394
|
} = props,
|
|
1392
1395
|
forwardedProps = _objectWithoutProperties(props, _excluded$b);
|
|
1393
|
-
const
|
|
1396
|
+
const [_id] = useId();
|
|
1397
|
+
const id = propsId !== null && propsId !== void 0 ? propsId : _id;
|
|
1394
1398
|
if (propsData === undefined || propsData === null) {
|
|
1395
1399
|
return /*#__PURE__*/React__default.createElement(LoadingBarChart, _extends({
|
|
1396
1400
|
id: id
|
|
@@ -1589,7 +1593,8 @@ const LegendItem = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1589
1593
|
variant
|
|
1590
1594
|
} = props,
|
|
1591
1595
|
forwardedProps = _objectWithoutProperties(props, _excluded$9);
|
|
1592
|
-
const
|
|
1596
|
+
const [_id] = useId();
|
|
1597
|
+
const id = propsId !== null && propsId !== void 0 ? propsId : _id;
|
|
1593
1598
|
const text = labelDecorator ? labelDecorator(data) : data.data.key;
|
|
1594
1599
|
const isEmpty = data.data.value === 0;
|
|
1595
1600
|
const isSelectable = role === 'option';
|
|
@@ -1748,7 +1753,7 @@ const StyledPieChartCenterText = styled.div`
|
|
|
1748
1753
|
}
|
|
1749
1754
|
|
|
1750
1755
|
> b {
|
|
1751
|
-
font-family: var(--redsift-typography-font-family-
|
|
1756
|
+
font-family: var(--redsift-typography-font-family-poppins);
|
|
1752
1757
|
color: var(--redsift-color-neutral-black);
|
|
1753
1758
|
font-weight: var(--redsift-typography-font-weight-medium);
|
|
1754
1759
|
font-size: ${_ref2 => {
|
|
@@ -1767,7 +1772,7 @@ const StyledPieChartCenterText = styled.div`
|
|
|
1767
1772
|
&:nth-child(2) {
|
|
1768
1773
|
font-weight: normal;
|
|
1769
1774
|
margin-top: 8px;
|
|
1770
|
-
font-family: var(--redsift-typography-font-family-
|
|
1775
|
+
font-family: var(--redsift-typography-font-family-poppins);
|
|
1771
1776
|
font-size: ${_ref4 => {
|
|
1772
1777
|
let {
|
|
1773
1778
|
$smallTextSize
|
|
@@ -1814,7 +1819,7 @@ const StyledPieChartCenterText = styled.div`
|
|
|
1814
1819
|
}
|
|
1815
1820
|
> b + span {
|
|
1816
1821
|
font-size: var(--redsift-typography-body-font-size);
|
|
1817
|
-
font-family: var(--redsift-typography-font-family-
|
|
1822
|
+
font-family: var(--redsift-typography-font-family-poppins);
|
|
1818
1823
|
line-height: var(--redsift-typography-badge-line-height);
|
|
1819
1824
|
color: rgba(0, 0, 0, 0.6);
|
|
1820
1825
|
text-align: center;
|
|
@@ -1842,7 +1847,7 @@ const StyledPieChartEmptyText = styled.div`
|
|
|
1842
1847
|
}
|
|
1843
1848
|
|
|
1844
1849
|
> span {
|
|
1845
|
-
font-family: var(--redsift-typography-font-family-
|
|
1850
|
+
font-family: var(--redsift-typography-font-family-poppins);
|
|
1846
1851
|
color: ${_ref11 => {
|
|
1847
1852
|
let {
|
|
1848
1853
|
$isDonut
|
|
@@ -1969,7 +1974,7 @@ const EmptyPieChart = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1969
1974
|
}))));
|
|
1970
1975
|
});
|
|
1971
1976
|
|
|
1972
|
-
const _excluded$5 = ["caping", "className", "data", "id", "isSliceSelected", "labelDecorator", "labelVariant", "middleText", "onSliceClick", "others", "size", "sliceProps", "sliceRole", "subtext", "text", "theme", "tooltipVariant", "variant"];
|
|
1977
|
+
const _excluded$5 = ["caping", "className", "data", "id", "isSliceSelected", "labelDecorator", "labelVariant", "legendProps", "middleText", "onSliceClick", "others", "size", "sliceProps", "sliceRole", "subtext", "text", "theme", "tooltipVariant", "variant"];
|
|
1973
1978
|
const RenderedPieChart = /*#__PURE__*/forwardRef((props, ref) => {
|
|
1974
1979
|
const {
|
|
1975
1980
|
caping,
|
|
@@ -1979,6 +1984,7 @@ const RenderedPieChart = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1979
1984
|
isSliceSelected,
|
|
1980
1985
|
labelDecorator,
|
|
1981
1986
|
labelVariant,
|
|
1987
|
+
legendProps,
|
|
1982
1988
|
middleText: propsMiddleText,
|
|
1983
1989
|
onSliceClick,
|
|
1984
1990
|
others,
|
|
@@ -2019,6 +2025,10 @@ const RenderedPieChart = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
2019
2025
|
const pieData = createPie(data);
|
|
2020
2026
|
const previousPieData = cache.current ? createPie(cache.current) : undefined;
|
|
2021
2027
|
const total = sum(data, d => d.value);
|
|
2028
|
+
const legendWidth = useRef();
|
|
2029
|
+
if (data && !legendWidth.current) {
|
|
2030
|
+
legendWidth.current = `${Math.max(...data.map(d => d.key.length + String(d.value).length)) * 8 + 32}px`;
|
|
2031
|
+
}
|
|
2022
2032
|
const text = typeof propsText === 'function' ? propsText(pieData.map(datum => {
|
|
2023
2033
|
const percent = datum.data.value / total;
|
|
2024
2034
|
return _objectSpread2(_objectSpread2({}, datum), {}, {
|
|
@@ -2094,12 +2104,13 @@ const RenderedPieChart = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
2094
2104
|
sliceProps: sliceProps,
|
|
2095
2105
|
tooltipVariant: tooltipVariant,
|
|
2096
2106
|
transform: `translate(${width / 2} ${height / 2})`
|
|
2097
|
-
}))), labelVariant !== PieChartLabelVariant.none && labelVariant !== PieChartLabelVariant.internal ? /*#__PURE__*/React__default.createElement(Legend, {
|
|
2107
|
+
}))), labelVariant !== PieChartLabelVariant.none && labelVariant !== PieChartLabelVariant.internal ? /*#__PURE__*/React__default.createElement(Legend, _extends({
|
|
2098
2108
|
data: data.map(d => _objectSpread2(_objectSpread2({}, d), {}, {
|
|
2099
2109
|
color: colorScale === null || colorScale === void 0 ? void 0 : colorScale(d.key)
|
|
2100
2110
|
})),
|
|
2101
|
-
variant: labelVariant === PieChartLabelVariant.externalLabelValue ? LabelVariant.value : labelVariant === PieChartLabelVariant.externalLabelPercent ? LabelVariant.percent : LabelVariant.label
|
|
2102
|
-
|
|
2111
|
+
variant: labelVariant === PieChartLabelVariant.externalLabelValue ? LabelVariant.value : labelVariant === PieChartLabelVariant.externalLabelPercent ? LabelVariant.percent : LabelVariant.label,
|
|
2112
|
+
width: legendWidth.current
|
|
2113
|
+
}, legendProps)) : null);
|
|
2103
2114
|
});
|
|
2104
2115
|
|
|
2105
2116
|
const _excluded$4 = ["caping", "chartRef", "className", "data", "emptyComponent", "id", "isSliceSelected", "labelDecorator", "labelVariant", "localeText", "middleText", "onSliceClick", "others", "size", "sliceRole", "subtext", "text", "theme", "tooltipVariant", "variant"];
|
|
@@ -2141,7 +2152,8 @@ const PieChart = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
2141
2152
|
variant
|
|
2142
2153
|
} = props,
|
|
2143
2154
|
forwardedProps = _objectWithoutProperties(props, _excluded$4);
|
|
2144
|
-
const
|
|
2155
|
+
const [_id] = useId();
|
|
2156
|
+
const id = propsId !== null && propsId !== void 0 ? propsId : _id;
|
|
2145
2157
|
if (propsData === undefined || propsData === null) {
|
|
2146
2158
|
return /*#__PURE__*/React__default.createElement(LoadingPieChart, _extends({
|
|
2147
2159
|
id: id
|
|
@@ -2235,7 +2247,7 @@ const StyledScatterPlotEmptyText = styled.div`
|
|
|
2235
2247
|
}
|
|
2236
2248
|
|
|
2237
2249
|
> span {
|
|
2238
|
-
font-family: var(--redsift-typography-font-family-
|
|
2250
|
+
font-family: var(--redsift-typography-font-family-poppins);
|
|
2239
2251
|
color: var(--redsift-color-neutral-black);
|
|
2240
2252
|
font-size: ${_ref2 => {
|
|
2241
2253
|
let {
|
|
@@ -2514,14 +2526,14 @@ const RenderedScatterPlot = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
2514
2526
|
onOpen: setIsKeyPanelOpen
|
|
2515
2527
|
}, /*#__PURE__*/React__default.createElement(Popover.Trigger, null, /*#__PURE__*/React__default.createElement(Button, {
|
|
2516
2528
|
variant: "secondary",
|
|
2529
|
+
leftIcon: mdiMouse,
|
|
2517
2530
|
rightIcon: isKeyPanelOpen ? mdiChevronDown : mdiChevronRight,
|
|
2518
2531
|
color: "question",
|
|
2519
2532
|
style: {
|
|
2520
|
-
border: '1px solid var(--redsift-color-neutral-midgrey)'
|
|
2533
|
+
border: '1px solid var(--redsift-color-neutral-midgrey)',
|
|
2534
|
+
gap: '4px'
|
|
2521
2535
|
}
|
|
2522
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
2523
|
-
icon: mdiMouse
|
|
2524
|
-
}))), /*#__PURE__*/React__default.createElement(Popover.Content, {
|
|
2536
|
+
})), /*#__PURE__*/React__default.createElement(Popover.Content, {
|
|
2525
2537
|
flexDirection: "column",
|
|
2526
2538
|
alignItems: "flex-start"
|
|
2527
2539
|
}, /*#__PURE__*/React__default.createElement(Text, {
|
|
@@ -2654,7 +2666,8 @@ const ScatterPlot = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
2654
2666
|
variant
|
|
2655
2667
|
} = props,
|
|
2656
2668
|
forwardedProps = _objectWithoutProperties(props, _excluded);
|
|
2657
|
-
const
|
|
2669
|
+
const [_id] = useId();
|
|
2670
|
+
const id = propsId !== null && propsId !== void 0 ? propsId : _id;
|
|
2658
2671
|
if (propsData === undefined || propsData === null) {
|
|
2659
2672
|
return /*#__PURE__*/React__default.createElement(LoadingScatterPlot, _extends({
|
|
2660
2673
|
id: id
|