@semcore/d3-chart 16.0.3-prerelease.2 → 16.0.4-prerelease.3
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/CHANGELOG.md +10 -0
- package/lib/cjs/Area.js +11 -11
- package/lib/cjs/Axis.js +14 -14
- package/lib/cjs/Bar.js +16 -16
- package/lib/cjs/Bubble.js +141 -84
- package/lib/cjs/Bubble.js.map +1 -1
- package/lib/cjs/CompactHorizontalBar.js +16 -16
- package/lib/cjs/Donut.js +9 -9
- package/lib/cjs/Dots.js +8 -8
- package/lib/cjs/HorizontalBar.js +16 -16
- package/lib/cjs/Hover.js +3 -3
- package/lib/cjs/Line.js +9 -9
- package/lib/cjs/Plot.js +3 -3
- package/lib/cjs/Radar.js +19 -19
- package/lib/cjs/RadialTree.js +12 -12
- package/lib/cjs/Reference.js +12 -12
- package/lib/cjs/ScatterPlot.js +9 -9
- package/lib/cjs/Tooltip.js +9 -9
- package/lib/cjs/Venn.js +9 -9
- package/lib/cjs/a11y/PlotA11yModule.js +2 -2
- package/lib/cjs/a11y/PlotA11yView.js +2 -2
- package/lib/cjs/component/Chart/BubbleChart.js +13 -4
- package/lib/cjs/component/Chart/BubbleChart.js.map +1 -1
- package/lib/cjs/component/ChartLegend/BaseLegend.js +14 -11
- package/lib/cjs/component/ChartLegend/BaseLegend.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js +4 -4
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +17 -17
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +6 -6
- package/lib/cjs/style/bubble.shadow.css +4 -0
- package/lib/cjs/types/Bubble.d.js.map +1 -1
- package/lib/es6/Area.js +11 -11
- package/lib/es6/Axis.js +14 -14
- package/lib/es6/Bar.js +16 -16
- package/lib/es6/Bubble.js +141 -84
- package/lib/es6/Bubble.js.map +1 -1
- package/lib/es6/CompactHorizontalBar.js +16 -16
- package/lib/es6/Donut.js +9 -9
- package/lib/es6/Dots.js +8 -8
- package/lib/es6/HorizontalBar.js +16 -16
- package/lib/es6/Hover.js +3 -3
- package/lib/es6/Line.js +9 -9
- package/lib/es6/Plot.js +3 -3
- package/lib/es6/Radar.js +19 -19
- package/lib/es6/RadialTree.js +12 -12
- package/lib/es6/Reference.js +12 -12
- package/lib/es6/ScatterPlot.js +9 -9
- package/lib/es6/Tooltip.js +9 -9
- package/lib/es6/Venn.js +9 -9
- package/lib/es6/a11y/PlotA11yModule.js +2 -2
- package/lib/es6/a11y/PlotA11yView.js +2 -2
- package/lib/es6/component/Chart/BubbleChart.js +13 -4
- package/lib/es6/component/Chart/BubbleChart.js.map +1 -1
- package/lib/es6/component/ChartLegend/BaseLegend.js +14 -11
- package/lib/es6/component/ChartLegend/BaseLegend.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js +4 -4
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +17 -17
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +6 -6
- package/lib/es6/style/bubble.shadow.css +4 -0
- package/lib/es6/types/Bubble.d.js.map +1 -1
- package/lib/esm/Area.mjs +12 -12
- package/lib/esm/Axis.mjs +15 -15
- package/lib/esm/Bar.mjs +17 -17
- package/lib/esm/Bubble.mjs +117 -81
- package/lib/esm/CompactHorizontalBar.mjs +17 -17
- package/lib/esm/Donut.mjs +10 -10
- package/lib/esm/Dots.mjs +9 -9
- package/lib/esm/HorizontalBar.mjs +17 -17
- package/lib/esm/Hover.mjs +4 -4
- package/lib/esm/Line.mjs +10 -10
- package/lib/esm/Plot.mjs +4 -4
- package/lib/esm/Radar.mjs +20 -20
- package/lib/esm/RadialTree.mjs +13 -13
- package/lib/esm/Reference.mjs +13 -13
- package/lib/esm/ScatterPlot.mjs +10 -10
- package/lib/esm/Tooltip.mjs +10 -10
- package/lib/esm/Venn.mjs +10 -10
- package/lib/esm/a11y/PlotA11yModule.mjs +3 -3
- package/lib/esm/a11y/PlotA11yView.mjs +3 -3
- package/lib/esm/component/Chart/BubbleChart.mjs +11 -3
- package/lib/esm/component/ChartLegend/BaseLegend.mjs +14 -11
- package/lib/esm/component/ChartLegend/LegendFlex/LegendFlex.mjs +5 -5
- package/lib/esm/component/ChartLegend/LegendItem/LegendItem.mjs +18 -18
- package/lib/esm/component/ChartLegend/LegendTable/LegendTable.mjs +7 -7
- package/lib/esm/style/bubble.shadow.css +4 -0
- package/lib/types/Bubble.d.ts +13 -0
- package/lib/types/component/ChartLegend/BaseLegend.d.ts +2 -2
- package/package.json +16 -16
package/lib/esm/Reference.mjs
CHANGED
|
@@ -20,22 +20,22 @@ var style = (
|
|
|
20
20
|
/*__reshadow_css_start__*/
|
|
21
21
|
(sstyled.insert(
|
|
22
22
|
/*__inner_css_start__*/
|
|
23
|
-
".
|
|
23
|
+
".___SReferenceLine_16q81_gg_{fill:none;stroke:var(--intergalactic-chart-grid-y-accent-hover-line, #a9abb6)}.___STitle_16q81_gg_{font-size:var(--intergalactic-fs-100, 12px);fill:var(--intergalactic-chart-grid-text-label, #6c6e79);transform-origin:var(--transform-origin_16q81)}.___STitle_16q81_gg_._position_top_16q81_gg_{text-anchor:middle}.___STitle_16q81_gg_._position_bottom_16q81_gg_{text-anchor:middle;dominant-baseline:hanging}.___STitle_16q81_gg_._position_left_16q81_gg_,.___STitle_16q81_gg_._position_right_16q81_gg_{transform:rotate(-90deg);text-anchor:middle;dominant-baseline:middle}.___SBackground_16q81_gg_{fill:var(--intergalactic-chart-grid-period-bg, rgba(196, 199, 207, 0.2))}.___SStripes_16q81_gg_{fill:var(--fill_16q81)}.___SStripesPatternPath_16q81_gg_{stroke:var(--intergalactic-chart-grid-period-pattern, rgba(25, 27, 35, 0.15));stroke-width:1px}",
|
|
24
24
|
/*__inner_css_end__*/
|
|
25
|
-
"
|
|
25
|
+
"16q81_gg_"
|
|
26
26
|
), /*__reshadow_css_end__*/
|
|
27
27
|
{
|
|
28
|
-
"__SReferenceLine": "
|
|
29
|
-
"__STitle": "
|
|
30
|
-
"--transform-origin": "--transform-
|
|
31
|
-
"_position_top": "
|
|
32
|
-
"_position_bottom": "
|
|
33
|
-
"_position_right": "
|
|
34
|
-
"_position_left": "
|
|
35
|
-
"__SBackground": "
|
|
36
|
-
"__SStripes": "
|
|
37
|
-
"--fill": "--
|
|
38
|
-
"__SStripesPatternPath": "
|
|
28
|
+
"__SReferenceLine": "___SReferenceLine_16q81_gg_",
|
|
29
|
+
"__STitle": "___STitle_16q81_gg_",
|
|
30
|
+
"--transform-origin": "--transform-origin_16q81",
|
|
31
|
+
"_position_top": "_position_top_16q81_gg_",
|
|
32
|
+
"_position_bottom": "_position_bottom_16q81_gg_",
|
|
33
|
+
"_position_right": "_position_right_16q81_gg_",
|
|
34
|
+
"_position_left": "_position_left_16q81_gg_",
|
|
35
|
+
"__SBackground": "___SBackground_16q81_gg_",
|
|
36
|
+
"__SStripes": "___SStripes_16q81_gg_",
|
|
37
|
+
"--fill": "--fill_16q81",
|
|
38
|
+
"__SStripesPatternPath": "___SStripesPatternPath_16q81_gg_"
|
|
39
39
|
})
|
|
40
40
|
);
|
|
41
41
|
var side2direction = {
|
package/lib/esm/ScatterPlot.mjs
CHANGED
|
@@ -24,19 +24,19 @@ var style = (
|
|
|
24
24
|
/*__reshadow_css_start__*/
|
|
25
25
|
(sstyled.insert(
|
|
26
26
|
/*__inner_css_start__*/
|
|
27
|
-
".
|
|
27
|
+
".___SScatterPlot_ryzr3_gg_{fill:var(--intergalactic-chart-palette-order-1, #2bb3ff);transition-property:cx,cy;transition-duration:var(--duration_ryzr3);transition-timing-function:ease-in-out;opacity:.5}@media (hover:hover){.___SScatterPlot_ryzr3_gg_:hover{opacity:.8}}.___SScatterPlot_ryzr3_gg_.__color_ryzr3_gg_{fill:var(--color_ryzr3)}.___SScatterPlot_ryzr3_gg_.__pattern_ryzr3_gg_.__color_ryzr3_gg_{fill:var(--pattern_ryzr3);stroke:var(--color_ryzr3);stroke-width:1px}.___SScatterPlot_ryzr3_gg_.__transparent_ryzr3_gg_{opacity:.3}.___SValue_ryzr3_gg_{text-anchor:middle;font-size:var(--intergalactic-fs-50, 10px);stroke:var(--intergalactic-chart-palette-order-9, #008ff8)}.___SValue_ryzr3_gg_.__color_ryzr3_gg_{stroke:var(--color_ryzr3)}.___SValue_ryzr3_gg_.__transparent_ryzr3_gg_{opacity:.3}",
|
|
28
28
|
/*__inner_css_end__*/
|
|
29
|
-
"
|
|
29
|
+
"ryzr3_gg_"
|
|
30
30
|
), /*__reshadow_css_end__*/
|
|
31
31
|
{
|
|
32
|
-
"__SScatterPlot": "
|
|
33
|
-
"_color": "
|
|
34
|
-
"--color": "--
|
|
35
|
-
"_pattern": "
|
|
36
|
-
"--pattern": "--
|
|
37
|
-
"_transparent": "
|
|
38
|
-
"__SValue": "
|
|
39
|
-
"--duration": "--
|
|
32
|
+
"__SScatterPlot": "___SScatterPlot_ryzr3_gg_",
|
|
33
|
+
"_color": "__color_ryzr3_gg_",
|
|
34
|
+
"--color": "--color_ryzr3",
|
|
35
|
+
"_pattern": "__pattern_ryzr3_gg_",
|
|
36
|
+
"--pattern": "--pattern_ryzr3",
|
|
37
|
+
"_transparent": "__transparent_ryzr3_gg_",
|
|
38
|
+
"__SValue": "___SValue_ryzr3_gg_",
|
|
39
|
+
"--duration": "--duration_ryzr3"
|
|
40
40
|
})
|
|
41
41
|
);
|
|
42
42
|
var ScatterPlotRoot = /* @__PURE__ */ function(_Component) {
|
package/lib/esm/Tooltip.mjs
CHANGED
|
@@ -25,19 +25,19 @@ var style = (
|
|
|
25
25
|
/*__reshadow_css_start__*/
|
|
26
26
|
(sstyled.insert(
|
|
27
27
|
/*__inner_css_start__*/
|
|
28
|
-
".
|
|
28
|
+
".___STooltip_1c3ak_gg_{font-size:var(--intergalactic-fs-100, 12px);line-height:var(--intergalactic-lh-100, 133%);position:relative;background-color:var(--intergalactic-bg-primary-neutral, #ffffff);border-radius:var(--intergalactic-popper-rounded, 6px);border:1px solid var(--intergalactic-border-secondary, #e0e1e9);box-sizing:border-box;box-shadow:var(--intergalactic-box-shadow-popper, 0px 1px 12px 0px rgba(25, 27, 35, 0.15));padding:var(--intergalactic-spacing-3x, 12px)}.___STitle_1c3ak_gg_{color:var(--intergalactic-text-secondary, #6c6e79);margin-bottom:var(--intergalactic-spacing-2x, 8px)}.___SDotGroup_1c3ak_gg_{display:flex;align-items:center}.___SDot_1c3ak_gg_{margin-right:var(--intergalactic-spacing-2x, 8px)}.___SDotCircle_1c3ak_gg_.__color_1c3ak_gg_{background-color:var(--color_1c3ak);width:8px;height:8px;border-radius:50%}.___SFooter_1c3ak_gg_{background:var(--intergalactic-bg-secondary-neutral, #f4f5f9);padding:var(--intergalactic-spacing-1x, 4px) var(--intergalactic-spacing-3x, 12px);border-radius:0 0 var(--intergalactic-rounded-medium, 6px) var(--intergalactic-rounded-medium, 6px);margin:var(--intergalactic-spacing-3x, 12px) calc(-1*var(--intergalactic-spacing-3x, 12px)) calc(-1*var(--intergalactic-spacing-3x, 12px))}",
|
|
29
29
|
/*__inner_css_end__*/
|
|
30
|
-
"
|
|
30
|
+
"1c3ak_gg_"
|
|
31
31
|
), /*__reshadow_css_end__*/
|
|
32
32
|
{
|
|
33
|
-
"__STooltip": "
|
|
34
|
-
"__STitle": "
|
|
35
|
-
"__SDotGroup": "
|
|
36
|
-
"__SDot": "
|
|
37
|
-
"__SDotCircle": "
|
|
38
|
-
"_color": "
|
|
39
|
-
"--color": "--
|
|
40
|
-
"__SFooter": "
|
|
33
|
+
"__STooltip": "___STooltip_1c3ak_gg_",
|
|
34
|
+
"__STitle": "___STitle_1c3ak_gg_",
|
|
35
|
+
"__SDotGroup": "___SDotGroup_1c3ak_gg_",
|
|
36
|
+
"__SDot": "___SDot_1c3ak_gg_",
|
|
37
|
+
"__SDotCircle": "___SDotCircle_1c3ak_gg_",
|
|
38
|
+
"_color": "__color_1c3ak_gg_",
|
|
39
|
+
"--color": "--color_1c3ak",
|
|
40
|
+
"__SFooter": "___SFooter_1c3ak_gg_"
|
|
41
41
|
})
|
|
42
42
|
);
|
|
43
43
|
var TooltipDotRenderContext = /* @__PURE__ */ React.createContext({
|
package/lib/esm/Venn.mjs
CHANGED
|
@@ -26,19 +26,19 @@ var style = (
|
|
|
26
26
|
/*__reshadow_css_start__*/
|
|
27
27
|
(sstyled.insert(
|
|
28
28
|
/*__inner_css_start__*/
|
|
29
|
-
".
|
|
29
|
+
".___SCircle_p1ji3_gg_,.___SIntersection_p1ji3_gg_{stroke:var(--intergalactic-chart-grid-border, #ffffff);stroke-width:2px}.___SCircle_p1ji3_gg_{fill:var(--intergalactic-chart-palette-order-2, #59ddaa);fill-opacity:.5;transition-property:cx,cy;transition-duration:var(--duration_p1ji3);transition-timing-function:ease-in-out}@media (hover:hover){.___SCircle_p1ji3_gg_:hover{fill-opacity:.7}}.___SCircle_p1ji3_gg_.__color_p1ji3_gg_{fill:var(--color_p1ji3)}.___SCircle_p1ji3_gg_.__pattern_p1ji3_gg_.__color_p1ji3_gg_{fill:var(--pattern_p1ji3);fill-opacity:.7;stroke:var(--color_p1ji3);stroke-width:1px}@media (hover:hover){.___SCircle_p1ji3_gg_.__pattern_p1ji3_gg_.__color_p1ji3_gg_:hover{fill-opacity:.85}}.___SCircle_p1ji3_gg_.__transparent_p1ji3_gg_{opacity:.3}.___SIntersection_p1ji3_gg_{fill-opacity:0}@media (hover:hover){.___SIntersection_p1ji3_gg_:hover{fill-opacity:.1}}.___SIntersection_p1ji3_gg_.__transparent_p1ji3_gg_{opacity:.3}",
|
|
30
30
|
/*__inner_css_end__*/
|
|
31
|
-
"
|
|
31
|
+
"p1ji3_gg_"
|
|
32
32
|
), /*__reshadow_css_end__*/
|
|
33
33
|
{
|
|
34
|
-
"__SCircle": "
|
|
35
|
-
"_color": "
|
|
36
|
-
"--color": "--
|
|
37
|
-
"_transparent": "
|
|
38
|
-
"__SIntersection": "
|
|
39
|
-
"--duration": "--
|
|
40
|
-
"_pattern": "
|
|
41
|
-
"--pattern": "--
|
|
34
|
+
"__SCircle": "___SCircle_p1ji3_gg_",
|
|
35
|
+
"_color": "__color_p1ji3_gg_",
|
|
36
|
+
"--color": "--color_p1ji3",
|
|
37
|
+
"_transparent": "__transparent_p1ji3_gg_",
|
|
38
|
+
"__SIntersection": "___SIntersection_p1ji3_gg_",
|
|
39
|
+
"--duration": "--duration_p1ji3",
|
|
40
|
+
"_pattern": "__pattern_p1ji3_gg_",
|
|
41
|
+
"--pattern": "--pattern_p1ji3"
|
|
42
42
|
})
|
|
43
43
|
);
|
|
44
44
|
var VennRoot = /* @__PURE__ */ function(_Component) {
|
|
@@ -12,12 +12,12 @@ var styles = (
|
|
|
12
12
|
/*__reshadow_css_start__*/
|
|
13
13
|
(sstyled.insert(
|
|
14
14
|
/*__inner_css_start__*/
|
|
15
|
-
".
|
|
15
|
+
".___SPlotA11yModule_1nnfe_gg_{-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;opacity:0}.___SPlotA11yModule_1nnfe_gg_:focus{-webkit-user-select:all;-moz-user-select:all;user-select:all;pointer-events:all;opacity:1}",
|
|
16
16
|
/*__inner_css_end__*/
|
|
17
|
-
"
|
|
17
|
+
"1nnfe_gg_"
|
|
18
18
|
), /*__reshadow_css_end__*/
|
|
19
19
|
{
|
|
20
|
-
"__SPlotA11yModule": "
|
|
20
|
+
"__SPlotA11yModule": "___SPlotA11yModule_1nnfe_gg_"
|
|
21
21
|
})
|
|
22
22
|
);
|
|
23
23
|
var globalWasFocused = false;
|
|
@@ -15,12 +15,12 @@ var styles = (
|
|
|
15
15
|
/*__reshadow_css_start__*/
|
|
16
16
|
(sstyled.insert(
|
|
17
17
|
/*__inner_css_start__*/
|
|
18
|
-
".
|
|
18
|
+
".___SPlotA11yView_c25va_gg_{-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;opacity:0;background-color:var(--intergalactic-bg-primary-neutral, #ffffff);color:var(--intergalactic-text-primary, #191b23);border:3px solid var(--intergalactic-border-primary, #c4c7cf);font-size:var(--intergalactic-fs-50, 10px);padding:2px;width:200px;height:200px;max-width:80%;max-height:80%;overflow:auto}.___SPlotA11yView_c25va_gg_:focus,.___SPlotA11yView_c25va_gg_:focus-within{-webkit-user-select:all;-moz-user-select:all;user-select:all;pointer-events:all;opacity:1;z-index:var(--intergalactic-z-index-overlay, 500);position:relative;display:block}.___SPlotA11yView_c25va_gg_ a{cursor:pointer;-webkit-text-decoration:underline;text-decoration:underline;margin-bottom:var(--intergalactic-spacing-2x, 8px);display:block}.___SPlotA11yView_c25va_gg_ table,.___SPlotA11yView_c25va_gg_ td,.___SPlotA11yView_c25va_gg_ th{border:1px solid var(--intergalactic-border-primary, #c4c7cf)}",
|
|
19
19
|
/*__inner_css_end__*/
|
|
20
|
-
"
|
|
20
|
+
"c25va_gg_"
|
|
21
21
|
), /*__reshadow_css_end__*/
|
|
22
22
|
{
|
|
23
|
-
"__SPlotA11yView": "
|
|
23
|
+
"__SPlotA11yView": "___SPlotA11yView_c25va_gg_"
|
|
24
24
|
})
|
|
25
25
|
);
|
|
26
26
|
var PlotA11yView = function PlotA11yView2(_ref3) {
|
|
@@ -93,13 +93,21 @@ var BubbleChartComponent = /* @__PURE__ */ function(_AbstractChart) {
|
|
|
93
93
|
}, {
|
|
94
94
|
key: "renderChart",
|
|
95
95
|
value: function renderChart() {
|
|
96
|
+
var dataDefinitions = this.state.dataDefinitions;
|
|
96
97
|
return /* @__PURE__ */ React.createElement(Bubble, {
|
|
97
98
|
x: "x",
|
|
98
99
|
y: "y",
|
|
99
100
|
value: "value",
|
|
100
101
|
color: "color",
|
|
101
102
|
label: "label"
|
|
102
|
-
})
|
|
103
|
+
}, dataDefinitions.map(function(_ref2, index) {
|
|
104
|
+
var checked = _ref2.checked, id = _ref2.id;
|
|
105
|
+
return /* @__PURE__ */ React.createElement(Bubble.Circle, {
|
|
106
|
+
visible: checked,
|
|
107
|
+
key: id,
|
|
108
|
+
index
|
|
109
|
+
});
|
|
110
|
+
}));
|
|
103
111
|
}
|
|
104
112
|
}, {
|
|
105
113
|
key: "renderTooltip",
|
|
@@ -108,8 +116,8 @@ var BubbleChartComponent = /* @__PURE__ */ function(_AbstractChart) {
|
|
|
108
116
|
if (!showTooltip) {
|
|
109
117
|
return null;
|
|
110
118
|
}
|
|
111
|
-
return /* @__PURE__ */ React.createElement(Bubble.Tooltip, null, function(
|
|
112
|
-
var index =
|
|
119
|
+
return /* @__PURE__ */ React.createElement(Bubble.Tooltip, null, function(_ref3) {
|
|
120
|
+
var index = _ref3.index, data = _ref3.data;
|
|
113
121
|
return {
|
|
114
122
|
children: /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Bubble.Tooltip.Title, null, "Data"), /* @__PURE__ */ React.createElement(Text, {
|
|
115
123
|
tag: "div"
|
|
@@ -19,16 +19,19 @@ var BaseLegend = /* @__PURE__ */ function(_Component) {
|
|
|
19
19
|
args[_key] = arguments[_key];
|
|
20
20
|
}
|
|
21
21
|
_this = _callSuper(this, BaseLegend2, [].concat(args));
|
|
22
|
-
_defineProperty(_this, "onChangeLegendItem", function(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
22
|
+
_defineProperty(_this, "onChangeLegendItem", function(shape) {
|
|
23
|
+
return function(id, checked) {
|
|
24
|
+
var _this$props$onChangeV, _this$props;
|
|
25
|
+
if (shape !== "Checkbox") return;
|
|
26
|
+
(_this$props$onChangeV = (_this$props = _this.props).onChangeVisibleItem) === null || _this$props$onChangeV === void 0 || _this$props$onChangeV.call(_this$props, id, checked);
|
|
27
|
+
if (checked) {
|
|
28
|
+
var _this$props$onMouseEn, _this$props2;
|
|
29
|
+
(_this$props$onMouseEn = (_this$props2 = _this.props).onMouseEnterItem) === null || _this$props$onMouseEn === void 0 || _this$props$onMouseEn.call(_this$props2, id);
|
|
30
|
+
} else {
|
|
31
|
+
var _this$props$onMouseLe, _this$props3;
|
|
32
|
+
(_this$props$onMouseLe = (_this$props3 = _this.props).onMouseLeaveItem) === null || _this$props$onMouseLe === void 0 || _this$props$onMouseLe.call(_this$props3, id);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
32
35
|
});
|
|
33
36
|
_defineProperty(_this, "onFocusLegendItem", function(checked) {
|
|
34
37
|
return function(id) {
|
|
@@ -99,7 +102,7 @@ var BaseLegend = /* @__PURE__ */ function(_Component) {
|
|
|
99
102
|
size,
|
|
100
103
|
onFocusLegendItem: this.onFocusLegendItem(line.checked),
|
|
101
104
|
onBlurLegendItem: this.onBlurLegendItem,
|
|
102
|
-
onChangeLegendItem: this.onChangeLegendItem,
|
|
105
|
+
onChangeLegendItem: this.onChangeLegendItem(shape),
|
|
103
106
|
onMouseEnter: line.checked ? this.bindOnMouseEnterItem(line.id) : void 0,
|
|
104
107
|
onMouseLeave: this.bindOnMouseLeaveItem(line.id),
|
|
105
108
|
style: {
|
|
@@ -23,14 +23,14 @@ var style = (
|
|
|
23
23
|
/*__reshadow_css_start__*/
|
|
24
24
|
(sstyled.insert(
|
|
25
25
|
/*__inner_css_start__*/
|
|
26
|
-
".
|
|
26
|
+
".___SLegendFlex_2vp15_gg_._direction_row_2vp15_gg_{align-items:flex-start;align-content:flex-start;flex-wrap:wrap;gap:8px 16px}.___SLegendFlex_2vp15_gg_._direction_column_2vp15_gg_{align-items:flex-start;flex-wrap:wrap;gap:8px}",
|
|
27
27
|
/*__inner_css_end__*/
|
|
28
|
-
"
|
|
28
|
+
"2vp15_gg_"
|
|
29
29
|
), /*__reshadow_css_end__*/
|
|
30
30
|
{
|
|
31
|
-
"__SLegendFlex": "
|
|
32
|
-
"_direction_row": "
|
|
33
|
-
"_direction_column": "
|
|
31
|
+
"__SLegendFlex": "___SLegendFlex_2vp15_gg_",
|
|
32
|
+
"_direction_row": "_direction_row_2vp15_gg_",
|
|
33
|
+
"_direction_column": "_direction_column_2vp15_gg_"
|
|
34
34
|
})
|
|
35
35
|
);
|
|
36
36
|
var LegendFlexRoot = /* @__PURE__ */ function(_BaseLegend) {
|
|
@@ -26,27 +26,27 @@ var style = (
|
|
|
26
26
|
/*__reshadow_css_start__*/
|
|
27
27
|
(sstyled.insert(
|
|
28
28
|
/*__inner_css_start__*/
|
|
29
|
-
'.
|
|
29
|
+
'.___SLegendItem_1xl13_gg_{min-width:0;align-items:flex-start}@media (hover:hover){.___SLegendItem_1xl13_gg_:hover{cursor:pointer}.___SLegendItem_1xl13_gg_.__disabled_1xl13_gg_:hover{cursor:default}}.___SPointShape_1xl13_gg_.__color_1xl13_gg_{background-color:var(--color_1xl13);margin-right:8px;flex-shrink:0}.___SPointShape_1xl13_gg_._shape_Circle_1xl13_gg_._size_l_1xl13_gg_{width:16px;height:16px;border-radius:8px;margin-top:4px}.___SPointShape_1xl13_gg_._shape_Circle_1xl13_gg_._size_m_1xl13_gg_{width:12px;height:12px;border-radius:6px;margin-top:4px}.___SPointShape_1xl13_gg_._shape_Line_1xl13_gg_._size_l_1xl13_gg_{width:16px;height:4px;border-radius:3px;margin-top:9px}.___SPointShape_1xl13_gg_._shape_Line_1xl13_gg_._size_m_1xl13_gg_{width:12px;height:4px;border-radius:3px;margin-top:8px}.___SPointShape_1xl13_gg_._shape_Square_1xl13_gg_._size_l_1xl13_gg_{width:16px;height:16px;border-radius:2px;margin-top:4px}.___SPointShape_1xl13_gg_._shape_Square_1xl13_gg_._size_m_1xl13_gg_{width:12px;height:12px;border-radius:2px;margin-top:4px}.___SPointShape_1xl13_gg_._shape_Pattern_1xl13_gg_{background-color:transparent;margin-right:4px}.___SIcon_1xl13_gg_{line-height:0;margin-right:4px}.___SIcon_1xl13_gg_._size_l_1xl13_gg_{margin-top:4px}.___SIcon_1xl13_gg_._size_m_1xl13_gg_{margin-top:2px}.___SLabel_1xl13_gg_{min-width:0}.___SAdditionalLabel_1xl13_gg_._size_l_1xl13_gg_,.___SCount_1xl13_gg_._size_l_1xl13_gg_,.___SLabel_1xl13_gg_._size_l_1xl13_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%)}.___SAdditionalLabel_1xl13_gg_._size_m_1xl13_gg_,.___SCount_1xl13_gg_._size_m_1xl13_gg_,.___SLabel_1xl13_gg_._size_m_1xl13_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___SAdditionalLabel_1xl13_gg_,.___SCount_1xl13_gg_{margin-left:4px}.___SAdditionalLabel_1xl13_gg_{white-space:nowrap;display:flex;align-items:flex-start}.___SAdditionalLabel_1xl13_gg_::before{content:"";display:inline-block;background-color:var(--intergalactic-text-secondary, #6c6e79);height:4px;width:4px;border-radius:2px;margin-right:4px}.___SAdditionalLabel_1xl13_gg_._size_l_1xl13_gg_::before{margin-top:10px}.___SAdditionalLabel_1xl13_gg_._size_m_1xl13_gg_::before{margin-top:8px}.___SPatternSymbol_1xl13_gg_{transform:scale(.8)}',
|
|
30
30
|
/*__inner_css_end__*/
|
|
31
|
-
"
|
|
31
|
+
"1xl13_gg_"
|
|
32
32
|
), /*__reshadow_css_end__*/
|
|
33
33
|
{
|
|
34
|
-
"__SLegendItem": "
|
|
35
|
-
"_disabled": "
|
|
36
|
-
"__SPointShape": "
|
|
37
|
-
"_color": "
|
|
38
|
-
"--color": "--
|
|
39
|
-
"_shape_Circle": "
|
|
40
|
-
"_size_l": "
|
|
41
|
-
"_size_m": "
|
|
42
|
-
"_shape_Line": "
|
|
43
|
-
"_shape_Square": "
|
|
44
|
-
"_shape_Pattern": "
|
|
45
|
-
"__SIcon": "
|
|
46
|
-
"__SLabel": "
|
|
47
|
-
"__SAdditionalLabel": "
|
|
48
|
-
"__SCount": "
|
|
49
|
-
"__SPatternSymbol": "
|
|
34
|
+
"__SLegendItem": "___SLegendItem_1xl13_gg_",
|
|
35
|
+
"_disabled": "__disabled_1xl13_gg_",
|
|
36
|
+
"__SPointShape": "___SPointShape_1xl13_gg_",
|
|
37
|
+
"_color": "__color_1xl13_gg_",
|
|
38
|
+
"--color": "--color_1xl13",
|
|
39
|
+
"_shape_Circle": "_shape_Circle_1xl13_gg_",
|
|
40
|
+
"_size_l": "_size_l_1xl13_gg_",
|
|
41
|
+
"_size_m": "_size_m_1xl13_gg_",
|
|
42
|
+
"_shape_Line": "_shape_Line_1xl13_gg_",
|
|
43
|
+
"_shape_Square": "_shape_Square_1xl13_gg_",
|
|
44
|
+
"_shape_Pattern": "_shape_Pattern_1xl13_gg_",
|
|
45
|
+
"__SIcon": "___SIcon_1xl13_gg_",
|
|
46
|
+
"__SLabel": "___SLabel_1xl13_gg_",
|
|
47
|
+
"__SAdditionalLabel": "___SAdditionalLabel_1xl13_gg_",
|
|
48
|
+
"__SCount": "___SCount_1xl13_gg_",
|
|
49
|
+
"__SPatternSymbol": "___SPatternSymbol_1xl13_gg_"
|
|
50
50
|
})
|
|
51
51
|
);
|
|
52
52
|
var enhance = [resolveColorEnhance(), uniqueIDEnhancement()];
|
|
@@ -19,16 +19,16 @@ var style = (
|
|
|
19
19
|
/*__reshadow_css_start__*/
|
|
20
20
|
(sstyled.insert(
|
|
21
21
|
/*__inner_css_start__*/
|
|
22
|
-
'.
|
|
22
|
+
'.___SLegendTable_143bz_gg_.__columns-count_143bz_gg_{font-feature-settings:"tnum";font-variant-numeric:tabular-nums;display:grid;grid-template-columns:auto .2fr;align-items:center;height:-moz-fit-content;height:fit-content;grid-column-gap:16px;grid-row-gap:8px}.___SColumnItem_143bz_gg_._size_l_143bz_gg_{font-size:var(--intergalactic-fs-300, 16px);text-align:right}.___SColumnItem_143bz_gg_._size_m_143bz_gg_{font-size:var(--intergalactic-fs-200, 14px);text-align:right}',
|
|
23
23
|
/*__inner_css_end__*/
|
|
24
|
-
"
|
|
24
|
+
"143bz_gg_"
|
|
25
25
|
), /*__reshadow_css_end__*/
|
|
26
26
|
{
|
|
27
|
-
"__SLegendTable": "
|
|
28
|
-
"_columns-count": "__columns-
|
|
29
|
-
"__SColumnItem": "
|
|
30
|
-
"_size_l": "
|
|
31
|
-
"_size_m": "
|
|
27
|
+
"__SLegendTable": "___SLegendTable_143bz_gg_",
|
|
28
|
+
"_columns-count": "__columns-count_143bz_gg_",
|
|
29
|
+
"__SColumnItem": "___SColumnItem_143bz_gg_",
|
|
30
|
+
"_size_l": "_size_l_143bz_gg_",
|
|
31
|
+
"_size_m": "_size_m_143bz_gg_"
|
|
32
32
|
})
|
|
33
33
|
);
|
|
34
34
|
var LegendTableRoot = /* @__PURE__ */ function(_BaseLegend) {
|
package/lib/types/Bubble.d.ts
CHANGED
|
@@ -39,6 +39,14 @@ export type BubbleContext = {
|
|
|
39
39
|
index: number;
|
|
40
40
|
};
|
|
41
41
|
|
|
42
|
+
export type BubbleCircleProps = {
|
|
43
|
+
/** Item data index */
|
|
44
|
+
index: number;
|
|
45
|
+
|
|
46
|
+
/** Item visibility */
|
|
47
|
+
visible?: boolean;
|
|
48
|
+
};
|
|
49
|
+
|
|
42
50
|
declare const Bubble: IntergalacticD3Component<Intergalactic.Tag, BubbleProps, BubbleContext> & {
|
|
43
51
|
Tooltip: TooltipType<
|
|
44
52
|
BubbleProps & {
|
|
@@ -52,6 +60,11 @@ declare const Bubble: IntergalacticD3Component<Intergalactic.Tag, BubbleProps, B
|
|
|
52
60
|
index: number;
|
|
53
61
|
}
|
|
54
62
|
>;
|
|
63
|
+
Circle: IntergalacticD3Component<
|
|
64
|
+
'g',
|
|
65
|
+
BubbleCircleProps,
|
|
66
|
+
Context
|
|
67
|
+
>;
|
|
55
68
|
};
|
|
56
69
|
|
|
57
70
|
export default Bubble;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Component, type Intergalactic } from '@semcore/core';
|
|
2
2
|
import type React from 'react';
|
|
3
3
|
import type { LegendProps } from './BaseLegend.type';
|
|
4
|
-
import type
|
|
4
|
+
import { type LegendItemKey, type LegendItemProps, type ShapeType } from './LegendItem/LegendItem.type';
|
|
5
5
|
export declare abstract class BaseLegend<T extends LegendProps> extends Component<T> {
|
|
6
6
|
componentDidMount(): void;
|
|
7
7
|
componentDidUpdate(prevProps: T): void;
|
|
8
8
|
setHints(): void;
|
|
9
9
|
getItem(index: number): import("./LegendItem/LegendItem.type").LegendItem;
|
|
10
10
|
getLegendItemProps(_: {}, index: number): LegendItemProps & Intergalactic.InternalTypings.ComponentPropsNesting<'div'>;
|
|
11
|
-
onChangeLegendItem: (id: LegendItemKey, checked: boolean) => void;
|
|
11
|
+
onChangeLegendItem: (shape: ShapeType) => (id: LegendItemKey, checked: boolean) => void;
|
|
12
12
|
onFocusLegendItem: (checked: boolean) => (id: LegendItemKey) => void;
|
|
13
13
|
onBlurLegendItem: (id: LegendItemKey) => void;
|
|
14
14
|
bindOnMouseEnterItem: (id: LegendItemKey) => (e: React.SyntheticEvent) => void;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/d3-chart",
|
|
3
3
|
"description": "Semrush D3 Chart Component",
|
|
4
|
-
"version": "16.0.
|
|
4
|
+
"version": "16.0.4-prerelease.3",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/esm/index.mjs",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@formatjs/intl": "2.3.0",
|
|
18
|
-
"@semcore/animation": "16.0.
|
|
19
|
-
"@semcore/checkbox": "16.0.
|
|
20
|
-
"@semcore/divider": "16.0.
|
|
21
|
-
"@semcore/flex-box": "16.0.
|
|
22
|
-
"@semcore/icon": "16.2.
|
|
23
|
-
"@semcore/popper": "16.0.
|
|
24
|
-
"@semcore/typography": "16.1.
|
|
18
|
+
"@semcore/animation": "16.0.2-prerelease.3",
|
|
19
|
+
"@semcore/checkbox": "16.0.2-prerelease.3",
|
|
20
|
+
"@semcore/divider": "16.0.2-prerelease.3",
|
|
21
|
+
"@semcore/flex-box": "16.0.2-prerelease.3",
|
|
22
|
+
"@semcore/icon": "16.2.1-prerelease.3",
|
|
23
|
+
"@semcore/popper": "16.0.2-prerelease.3",
|
|
24
|
+
"@semcore/typography": "16.1.2-prerelease.3",
|
|
25
25
|
"@types/d3-shape": "^3.1.7",
|
|
26
26
|
"@upsetjs/venn.js": "1.4.2",
|
|
27
27
|
"d3-array": "3.1.6",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"hoist-non-react-statics": "3.3.2"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@semcore/base-components": "^16.0.
|
|
38
|
+
"@semcore/base-components": "^16.0.2-prerelease.3"
|
|
39
39
|
},
|
|
40
40
|
"repository": {
|
|
41
41
|
"type": "git",
|
|
@@ -47,15 +47,15 @@
|
|
|
47
47
|
"@types/d3-array": "^3.2.1",
|
|
48
48
|
"@types/d3-scale": "^4.0.9",
|
|
49
49
|
"@types/d3-transition": "^3.0.9",
|
|
50
|
-
"@semcore/button": "16.0.1",
|
|
51
50
|
"@semcore/core": "16.0.0",
|
|
52
|
-
"@semcore/
|
|
53
|
-
"@semcore/
|
|
54
|
-
"@semcore/
|
|
51
|
+
"@semcore/checkbox": "16.0.2-prerelease.3",
|
|
52
|
+
"@semcore/button": "16.0.2-prerelease.3",
|
|
53
|
+
"@semcore/divider": "16.0.2-prerelease.3",
|
|
54
|
+
"@semcore/dropdown-menu": "16.1.2-prerelease.3",
|
|
55
|
+
"@semcore/ellipsis": "16.0.2-prerelease.3",
|
|
55
56
|
"@semcore/testing-utils": "1.0.0",
|
|
56
|
-
"@semcore/
|
|
57
|
-
"@semcore/
|
|
58
|
-
"@semcore/icon": "16.2.0-prerelease.2"
|
|
57
|
+
"@semcore/typography": "16.1.2-prerelease.3",
|
|
58
|
+
"@semcore/icon": "16.2.1-prerelease.3"
|
|
59
59
|
},
|
|
60
60
|
"scripts": {
|
|
61
61
|
"build": "pnpm semcore-builder --source=js,ts && pnpm vite build"
|