@semcore/d3-chart 16.0.2-prerelease.4 → 16.0.3-prerelease.0
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 +8 -0
- package/README.md +1 -50
- package/lib/cjs/AnimatedClipPath.js +13 -13
- package/lib/cjs/AnimatedClipPath.js.map +1 -1
- package/lib/cjs/Area.js +29 -27
- package/lib/cjs/Area.js.map +1 -1
- package/lib/cjs/Axis.js +97 -101
- package/lib/cjs/Axis.js.map +1 -1
- package/lib/cjs/Bar.js +31 -32
- package/lib/cjs/Bar.js.map +1 -1
- package/lib/cjs/Bubble.js +26 -27
- package/lib/cjs/Bubble.js.map +1 -1
- package/lib/cjs/CompactHorizontalBar.js +65 -68
- package/lib/cjs/CompactHorizontalBar.js.map +1 -1
- package/lib/cjs/Donut.js +94 -95
- package/lib/cjs/Donut.js.map +1 -1
- package/lib/cjs/Dots.js +36 -34
- package/lib/cjs/Dots.js.map +1 -1
- package/lib/cjs/GroupBar.js +16 -16
- package/lib/cjs/GroupBar.js.map +1 -1
- package/lib/cjs/HorizontalBar.js +30 -31
- package/lib/cjs/HorizontalBar.js.map +1 -1
- package/lib/cjs/Hover.js +27 -33
- package/lib/cjs/Hover.js.map +1 -1
- package/lib/cjs/Line.js +23 -23
- package/lib/cjs/Line.js.map +1 -1
- package/lib/cjs/Pattern.js +13 -11
- package/lib/cjs/Pattern.js.map +1 -1
- package/lib/cjs/Plot.js +26 -27
- package/lib/cjs/Plot.js.map +1 -1
- package/lib/cjs/Radar.js +125 -132
- package/lib/cjs/Radar.js.map +1 -1
- package/lib/cjs/RadialTree.js +164 -145
- package/lib/cjs/RadialTree.js.map +1 -1
- package/lib/cjs/Reference.js +47 -49
- package/lib/cjs/Reference.js.map +1 -1
- package/lib/cjs/ResponsiveContainer.js +19 -20
- package/lib/cjs/ResponsiveContainer.js.map +1 -1
- package/lib/cjs/ScatterPlot.js +24 -25
- package/lib/cjs/ScatterPlot.js.map +1 -1
- package/lib/cjs/StackBar.js +20 -23
- package/lib/cjs/StackBar.js.map +1 -1
- package/lib/cjs/StackedArea.js +14 -15
- package/lib/cjs/StackedArea.js.map +1 -1
- package/lib/cjs/Tooltip.js +34 -35
- package/lib/cjs/Tooltip.js.map +1 -1
- package/lib/cjs/Venn.js +28 -29
- package/lib/cjs/Venn.js.map +1 -1
- package/lib/cjs/a11y/DataAccessibilityTable.js +2 -3
- package/lib/cjs/a11y/DataAccessibilityTable.js.map +1 -1
- package/lib/cjs/a11y/PlotA11yModule.js +11 -12
- package/lib/cjs/a11y/PlotA11yModule.js.map +1 -1
- package/lib/cjs/a11y/PlotA11yView.js +10 -11
- package/lib/cjs/a11y/PlotA11yView.js.map +1 -1
- package/lib/cjs/a11y/bezier.js +1 -2
- package/lib/cjs/a11y/bezier.js.map +1 -1
- package/lib/cjs/a11y/focus.js +4 -5
- package/lib/cjs/a11y/focus.js.map +1 -1
- package/lib/cjs/a11y/hints.js +5 -8
- package/lib/cjs/a11y/hints.js.map +1 -1
- package/lib/cjs/a11y/insights.js +63 -64
- package/lib/cjs/a11y/insights.js.map +1 -1
- package/lib/cjs/a11y/intl.js +1 -2
- package/lib/cjs/a11y/intl.js.map +1 -1
- package/lib/cjs/a11y/locale.js +4 -5
- package/lib/cjs/a11y/locale.js.map +1 -1
- package/lib/cjs/a11y/serialize.js +15 -17
- package/lib/cjs/a11y/serialize.js.map +1 -1
- package/lib/cjs/a11y/summarize.js +1 -2
- package/lib/cjs/a11y/summarize.js.map +1 -1
- package/lib/cjs/a11y/translations/module/__intergalactic-dynamic-locales.js +4 -5
- package/lib/cjs/a11y/translations/module/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/cjs/a11y/translations/view/__intergalactic-dynamic-locales.js +4 -5
- package/lib/cjs/a11y/translations/view/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/cjs/color.js +2 -3
- package/lib/cjs/color.js.map +1 -1
- package/lib/cjs/component/Chart/AbstractChart.js +43 -46
- package/lib/cjs/component/Chart/AbstractChart.js.map +1 -1
- package/lib/cjs/component/Chart/AbstractChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/AreaChart.js +17 -20
- package/lib/cjs/component/Chart/AreaChart.js.map +1 -1
- package/lib/cjs/component/Chart/AreaChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/BarChart.js +17 -21
- package/lib/cjs/component/Chart/BarChart.js.map +1 -1
- package/lib/cjs/component/Chart/BarChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/BubbleChart.js +18 -19
- package/lib/cjs/component/Chart/BubbleChart.js.map +1 -1
- package/lib/cjs/component/Chart/BubbleChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/CigaretteChart.js +19 -23
- package/lib/cjs/component/Chart/CigaretteChart.js.map +1 -1
- package/lib/cjs/component/Chart/CigaretteChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/CompactHorizontalBarChart.js +13 -14
- package/lib/cjs/component/Chart/CompactHorizontalBarChart.js.map +1 -1
- package/lib/cjs/component/Chart/CompactHorizontalBarChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/DonutChart.js +13 -14
- package/lib/cjs/component/Chart/DonutChart.js.map +1 -1
- package/lib/cjs/component/Chart/DonutChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/HistogramChart.js +15 -16
- package/lib/cjs/component/Chart/HistogramChart.js.map +1 -1
- package/lib/cjs/component/Chart/HistogramChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/LineChart.js +17 -18
- package/lib/cjs/component/Chart/LineChart.js.map +1 -1
- package/lib/cjs/component/Chart/LineChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/RadarChart.js +14 -17
- package/lib/cjs/component/Chart/RadarChart.js.map +1 -1
- package/lib/cjs/component/Chart/RadarChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/ScatterPlotChart.js +14 -15
- package/lib/cjs/component/Chart/ScatterPlotChart.js.map +1 -1
- package/lib/cjs/component/Chart/ScatterPlotChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/VennChart.js +12 -13
- package/lib/cjs/component/Chart/VennChart.js.map +1 -1
- package/lib/cjs/component/Chart/VennChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/index.js +7 -8
- package/lib/cjs/component/Chart/index.js.map +1 -1
- package/lib/cjs/component/ChartLegend/BaseLegend.js +42 -20
- package/lib/cjs/component/ChartLegend/BaseLegend.js.map +1 -1
- package/lib/cjs/component/ChartLegend/BaseLegend.type.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js +20 -20
- package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.type.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +79 -67
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js +1 -2
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +18 -18
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -1
- package/lib/cjs/component/ChartLegend/index.js +1 -2
- package/lib/cjs/component/ChartLegend/index.js.map +1 -1
- package/lib/cjs/component/Cigarette/Cigarette.js +18 -19
- package/lib/cjs/component/Cigarette/Cigarette.js.map +1 -1
- package/lib/cjs/component/StackGroupBar/StackGroupBar.js +22 -26
- package/lib/cjs/component/StackGroupBar/StackGroupBar.js.map +1 -1
- package/lib/cjs/component/StackGroupBar/StackGroupBar.type.js.map +1 -1
- package/lib/cjs/component/SvgElement.js +21 -0
- package/lib/cjs/component/SvgElement.js.map +1 -0
- package/lib/cjs/createElement.d.js.map +1 -1
- package/lib/cjs/createElement.js +7 -8
- package/lib/cjs/createElement.js.map +1 -1
- package/lib/cjs/index.js +9 -2
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js +4 -5
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/cjs/types/Area.d.js.map +1 -1
- package/lib/cjs/types/Axis.d.js.map +1 -1
- package/lib/cjs/types/Bar.d.js.map +1 -1
- package/lib/cjs/types/Bubble.d.js.map +1 -1
- package/lib/cjs/types/ClipPath.d.js.map +1 -1
- package/lib/cjs/types/CompactHorizontalBar.d.js.map +1 -1
- package/lib/cjs/types/Donut.d.js.map +1 -1
- package/lib/cjs/types/GroupBar.d.js.map +1 -1
- package/lib/cjs/types/HorizontalBar.d.js.map +1 -1
- package/lib/cjs/types/Hover.d.js.map +1 -1
- package/lib/cjs/types/Line.d.js.map +1 -1
- package/lib/cjs/types/Plot.d.js.map +1 -1
- package/lib/cjs/types/Radar.d.js.map +1 -1
- package/lib/cjs/types/Reference.d.js.map +1 -1
- package/lib/cjs/types/ResponsiveContainer.d.js.map +1 -1
- package/lib/cjs/types/ScatterPlot.d.js.map +1 -1
- package/lib/cjs/types/StackBar.d.js.map +1 -1
- package/lib/cjs/types/StackedArea.d.js.map +1 -1
- package/lib/cjs/types/Tooltip.d.js.map +1 -1
- package/lib/cjs/types/Venn.d.js.map +1 -1
- package/lib/cjs/types/context.d.js.map +1 -1
- package/lib/cjs/types/index.d.js +2 -2
- package/lib/cjs/types/index.d.js.map +1 -1
- package/lib/cjs/utils.js +31 -52
- package/lib/cjs/utils.js.map +1 -1
- package/lib/es6/AnimatedClipPath.js +11 -10
- package/lib/es6/AnimatedClipPath.js.map +1 -1
- package/lib/es6/Area.js +27 -24
- package/lib/es6/Area.js.map +1 -1
- package/lib/es6/Axis.js +96 -98
- package/lib/es6/Axis.js.map +1 -1
- package/lib/es6/Bar.js +28 -27
- package/lib/es6/Bar.js.map +1 -1
- package/lib/es6/Bubble.js +24 -24
- package/lib/es6/Bubble.js.map +1 -1
- package/lib/es6/CompactHorizontalBar.js +63 -65
- package/lib/es6/CompactHorizontalBar.js.map +1 -1
- package/lib/es6/Donut.js +92 -92
- package/lib/es6/Donut.js.map +1 -1
- package/lib/es6/Dots.js +36 -33
- package/lib/es6/Dots.js.map +1 -1
- package/lib/es6/GroupBar.js +14 -13
- package/lib/es6/GroupBar.js.map +1 -1
- package/lib/es6/HorizontalBar.js +27 -26
- package/lib/es6/HorizontalBar.js.map +1 -1
- package/lib/es6/Hover.js +24 -28
- package/lib/es6/Hover.js.map +1 -1
- package/lib/es6/Line.js +20 -19
- package/lib/es6/Line.js.map +1 -1
- package/lib/es6/Pattern.js +4 -2
- package/lib/es6/Pattern.js.map +1 -1
- package/lib/es6/Plot.js +25 -25
- package/lib/es6/Plot.js.map +1 -1
- package/lib/es6/Radar.js +122 -128
- package/lib/es6/Radar.js.map +1 -1
- package/lib/es6/RadialTree.js +162 -142
- package/lib/es6/RadialTree.js.map +1 -1
- package/lib/es6/Reference.js +44 -43
- package/lib/es6/Reference.js.map +1 -1
- package/lib/es6/ResponsiveContainer.js +17 -17
- package/lib/es6/ResponsiveContainer.js.map +1 -1
- package/lib/es6/ScatterPlot.js +22 -22
- package/lib/es6/ScatterPlot.js.map +1 -1
- package/lib/es6/StackBar.js +17 -19
- package/lib/es6/StackBar.js.map +1 -1
- package/lib/es6/StackedArea.js +12 -12
- package/lib/es6/StackedArea.js.map +1 -1
- package/lib/es6/Tooltip.js +33 -33
- package/lib/es6/Tooltip.js.map +1 -1
- package/lib/es6/Venn.js +26 -26
- package/lib/es6/Venn.js.map +1 -1
- package/lib/es6/a11y/DataAccessibilityTable.js.map +1 -1
- package/lib/es6/a11y/PlotA11yModule.js +11 -11
- package/lib/es6/a11y/PlotA11yModule.js.map +1 -1
- package/lib/es6/a11y/PlotA11yView.js +9 -9
- package/lib/es6/a11y/PlotA11yView.js.map +1 -1
- package/lib/es6/a11y/bezier.js.map +1 -1
- package/lib/es6/a11y/focus.js +3 -3
- package/lib/es6/a11y/focus.js.map +1 -1
- package/lib/es6/a11y/hints.js +1 -1
- package/lib/es6/a11y/hints.js.map +1 -1
- package/lib/es6/a11y/insights.js +61 -61
- package/lib/es6/a11y/insights.js.map +1 -1
- package/lib/es6/a11y/intl.js.map +1 -1
- package/lib/es6/a11y/locale.js +2 -2
- package/lib/es6/a11y/locale.js.map +1 -1
- package/lib/es6/a11y/serialize.js +14 -13
- package/lib/es6/a11y/serialize.js.map +1 -1
- package/lib/es6/a11y/summarize.js.map +1 -1
- package/lib/es6/a11y/translations/module/__intergalactic-dynamic-locales.js +2 -2
- package/lib/es6/a11y/translations/module/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/a11y/translations/view/__intergalactic-dynamic-locales.js +2 -2
- package/lib/es6/a11y/translations/view/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/color.js +1 -1
- package/lib/es6/color.js.map +1 -1
- package/lib/es6/component/Chart/AbstractChart.js +40 -41
- package/lib/es6/component/Chart/AbstractChart.js.map +1 -1
- package/lib/es6/component/Chart/AbstractChart.type.js.map +1 -1
- package/lib/es6/component/Chart/AreaChart.js +16 -16
- package/lib/es6/component/Chart/AreaChart.js.map +1 -1
- package/lib/es6/component/Chart/AreaChart.type.js.map +1 -1
- package/lib/es6/component/Chart/BarChart.js +15 -17
- package/lib/es6/component/Chart/BarChart.js.map +1 -1
- package/lib/es6/component/Chart/BarChart.type.js.map +1 -1
- package/lib/es6/component/Chart/BubbleChart.js +17 -15
- package/lib/es6/component/Chart/BubbleChart.js.map +1 -1
- package/lib/es6/component/Chart/BubbleChart.type.js.map +1 -1
- package/lib/es6/component/Chart/CigaretteChart.js +17 -17
- package/lib/es6/component/Chart/CigaretteChart.js.map +1 -1
- package/lib/es6/component/Chart/CigaretteChart.type.js.map +1 -1
- package/lib/es6/component/Chart/CompactHorizontalBarChart.js +11 -10
- package/lib/es6/component/Chart/CompactHorizontalBarChart.js.map +1 -1
- package/lib/es6/component/Chart/CompactHorizontalBarChart.type.js.map +1 -1
- package/lib/es6/component/Chart/DonutChart.js +12 -10
- package/lib/es6/component/Chart/DonutChart.js.map +1 -1
- package/lib/es6/component/Chart/DonutChart.type.js.map +1 -1
- package/lib/es6/component/Chart/HistogramChart.js +14 -12
- package/lib/es6/component/Chart/HistogramChart.js.map +1 -1
- package/lib/es6/component/Chart/HistogramChart.type.js.map +1 -1
- package/lib/es6/component/Chart/LineChart.js +15 -14
- package/lib/es6/component/Chart/LineChart.js.map +1 -1
- package/lib/es6/component/Chart/LineChart.type.js.map +1 -1
- package/lib/es6/component/Chart/RadarChart.js +12 -13
- package/lib/es6/component/Chart/RadarChart.js.map +1 -1
- package/lib/es6/component/Chart/RadarChart.type.js.map +1 -1
- package/lib/es6/component/Chart/ScatterPlotChart.js +13 -11
- package/lib/es6/component/Chart/ScatterPlotChart.js.map +1 -1
- package/lib/es6/component/Chart/ScatterPlotChart.type.js.map +1 -1
- package/lib/es6/component/Chart/VennChart.js +10 -9
- package/lib/es6/component/Chart/VennChart.js.map +1 -1
- package/lib/es6/component/Chart/VennChart.type.js.map +1 -1
- package/lib/es6/component/Chart/index.js +6 -6
- package/lib/es6/component/Chart/index.js.map +1 -1
- package/lib/es6/component/ChartLegend/BaseLegend.js +40 -17
- package/lib/es6/component/ChartLegend/BaseLegend.js.map +1 -1
- package/lib/es6/component/ChartLegend/BaseLegend.type.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js +18 -17
- package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.type.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +77 -64
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +16 -15
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -1
- package/lib/es6/component/ChartLegend/index.js.map +1 -1
- package/lib/es6/component/Cigarette/Cigarette.js +16 -16
- package/lib/es6/component/Cigarette/Cigarette.js.map +1 -1
- package/lib/es6/component/StackGroupBar/StackGroupBar.js +20 -21
- package/lib/es6/component/StackGroupBar/StackGroupBar.js.map +1 -1
- package/lib/es6/component/StackGroupBar/StackGroupBar.type.js.map +1 -1
- package/lib/es6/component/SvgElement.js +14 -0
- package/lib/es6/component/SvgElement.js.map +1 -0
- package/lib/es6/createElement.d.js.map +1 -1
- package/lib/es6/createElement.js +5 -5
- package/lib/es6/createElement.js.map +1 -1
- package/lib/es6/index.js +1 -0
- package/lib/es6/index.js.map +1 -1
- package/lib/es6/translations/__intergalactic-dynamic-locales.js +2 -2
- package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/types/Area.d.js.map +1 -1
- package/lib/es6/types/Axis.d.js.map +1 -1
- package/lib/es6/types/Bar.d.js.map +1 -1
- package/lib/es6/types/Bubble.d.js.map +1 -1
- package/lib/es6/types/ClipPath.d.js.map +1 -1
- package/lib/es6/types/CompactHorizontalBar.d.js.map +1 -1
- package/lib/es6/types/Donut.d.js.map +1 -1
- package/lib/es6/types/GroupBar.d.js.map +1 -1
- package/lib/es6/types/HorizontalBar.d.js.map +1 -1
- package/lib/es6/types/Hover.d.js.map +1 -1
- package/lib/es6/types/Line.d.js.map +1 -1
- package/lib/es6/types/Plot.d.js.map +1 -1
- package/lib/es6/types/Radar.d.js.map +1 -1
- package/lib/es6/types/Reference.d.js.map +1 -1
- package/lib/es6/types/ResponsiveContainer.d.js.map +1 -1
- package/lib/es6/types/ScatterPlot.d.js.map +1 -1
- package/lib/es6/types/StackBar.d.js.map +1 -1
- package/lib/es6/types/StackedArea.d.js.map +1 -1
- package/lib/es6/types/Tooltip.d.js.map +1 -1
- package/lib/es6/types/Venn.d.js.map +1 -1
- package/lib/es6/types/context.d.js.map +1 -1
- package/lib/es6/types/index.d.js +1 -0
- package/lib/es6/types/index.d.js.map +1 -1
- package/lib/es6/utils.js +11 -13
- package/lib/es6/utils.js.map +1 -1
- package/lib/esm/AnimatedClipPath.mjs +10 -7
- package/lib/esm/Area.mjs +30 -25
- package/lib/esm/Axis.mjs +67 -67
- package/lib/esm/Bar.mjs +31 -28
- package/lib/esm/Bubble.mjs +28 -26
- package/lib/esm/CompactHorizontalBar.mjs +61 -60
- package/lib/esm/Donut.mjs +50 -49
- package/lib/esm/Dots.mjs +32 -27
- package/lib/esm/GroupBar.mjs +14 -11
- package/lib/esm/HorizontalBar.mjs +30 -27
- package/lib/esm/Hover.mjs +28 -30
- package/lib/esm/Line.mjs +23 -20
- package/lib/esm/Pattern.mjs +1 -1
- package/lib/esm/Plot.mjs +27 -25
- package/lib/esm/Radar.mjs +90 -94
- package/lib/esm/RadialTree.mjs +86 -86
- package/lib/esm/Reference.mjs +34 -31
- package/lib/esm/ResponsiveContainer.mjs +19 -17
- package/lib/esm/ScatterPlot.mjs +26 -24
- package/lib/esm/StackBar.mjs +17 -17
- package/lib/esm/StackedArea.mjs +13 -11
- package/lib/esm/Tooltip.mjs +35 -33
- package/lib/esm/Venn.mjs +29 -27
- package/lib/esm/a11y/DataAccessibilityTable.mjs +2 -2
- package/lib/esm/a11y/PlotA11yModule.mjs +8 -8
- package/lib/esm/a11y/PlotA11yView.mjs +9 -9
- package/lib/esm/a11y/focus.mjs +3 -3
- package/lib/esm/a11y/hints.mjs +1 -1
- package/lib/esm/a11y/insights.mjs +77 -78
- package/lib/esm/a11y/intl.mjs +1 -1
- package/lib/esm/a11y/locale.mjs +2 -2
- package/lib/esm/a11y/serialize.mjs +12 -12
- package/lib/esm/a11y/translations/module/__intergalactic-dynamic-locales.mjs +2 -2
- package/lib/esm/a11y/translations/view/__intergalactic-dynamic-locales.mjs +2 -2
- package/lib/esm/component/Chart/AbstractChart.mjs +38 -37
- package/lib/esm/component/Chart/AreaChart.mjs +19 -15
- package/lib/esm/component/Chart/BarChart.mjs +20 -17
- package/lib/esm/component/Chart/BubbleChart.mjs +16 -13
- package/lib/esm/component/Chart/CigaretteChart.mjs +24 -17
- package/lib/esm/component/Chart/CompactHorizontalBarChart.mjs +18 -10
- package/lib/esm/component/Chart/DonutChart.mjs +13 -10
- package/lib/esm/component/Chart/HistogramChart.mjs +18 -12
- package/lib/esm/component/Chart/LineChart.mjs +18 -12
- package/lib/esm/component/Chart/RadarChart.mjs +19 -12
- package/lib/esm/component/Chart/ScatterPlotChart.mjs +14 -11
- package/lib/esm/component/Chart/VennChart.mjs +12 -9
- package/lib/esm/component/Chart/index.mjs +6 -6
- package/lib/esm/component/ChartLegend/BaseLegend.mjs +42 -17
- package/lib/esm/component/ChartLegend/LegendFlex/LegendFlex.mjs +21 -18
- package/lib/esm/component/ChartLegend/LegendItem/LegendItem.mjs +67 -56
- package/lib/esm/component/ChartLegend/LegendTable/LegendTable.mjs +23 -20
- package/lib/esm/component/Cigarette/Cigarette.mjs +18 -16
- package/lib/esm/component/StackGroupBar/StackGroupBar.mjs +20 -19
- package/lib/esm/component/SvgElement.mjs +14 -0
- package/lib/esm/createElement.mjs +5 -5
- package/lib/esm/index.mjs +2 -0
- package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +2 -2
- package/lib/esm/utils.mjs +8 -8
- package/lib/types/Area.d.ts +7 -6
- package/lib/types/Axis.d.ts +4 -3
- package/lib/types/Bar.d.ts +7 -6
- package/lib/types/Bubble.d.ts +6 -5
- package/lib/types/ClipPath.d.ts +4 -3
- package/lib/types/CompactHorizontalBar.d.ts +7 -8
- package/lib/types/Donut.d.ts +6 -5
- package/lib/types/GroupBar.d.ts +6 -6
- package/lib/types/HorizontalBar.d.ts +7 -6
- package/lib/types/Hover.d.ts +8 -8
- package/lib/types/Line.d.ts +7 -6
- package/lib/types/Pattern.d.ts +51 -51
- package/lib/types/Plot.d.ts +10 -9
- package/lib/types/Radar.d.ts +8 -7
- package/lib/types/RadialTree.d.ts +9 -54
- package/lib/types/Reference.d.ts +5 -4
- package/lib/types/ResponsiveContainer.d.ts +5 -4
- package/lib/types/ScatterPlot.d.ts +6 -5
- package/lib/types/StackBar.d.ts +7 -6
- package/lib/types/StackedArea.d.ts +6 -5
- package/lib/types/Tooltip.d.ts +14 -12
- package/lib/types/Venn.d.ts +7 -6
- package/lib/types/a11y/DataAccessibilityTable.d.ts +2 -2
- package/lib/types/a11y/PlotA11yModule.d.ts +1 -1
- package/lib/types/a11y/hints.d.ts +5 -5
- package/lib/types/a11y/insights.d.ts +1 -1
- package/lib/types/a11y/intl.d.ts +1 -1
- package/lib/types/a11y/serialize.d.ts +7 -7
- package/lib/types/a11y/summarize.d.ts +2 -2
- package/lib/types/component/Chart/AbstractChart.d.ts +6 -6
- package/lib/types/component/Chart/AbstractChart.type.d.ts +27 -27
- package/lib/types/component/Chart/AreaChart.d.ts +1 -1
- package/lib/types/component/Chart/AreaChart.type.d.ts +6 -6
- package/lib/types/component/Chart/BarChart.d.ts +1 -1
- package/lib/types/component/Chart/BarChart.type.d.ts +6 -6
- package/lib/types/component/Chart/BubbleChart.d.ts +1 -1
- package/lib/types/component/Chart/BubbleChart.type.d.ts +4 -4
- package/lib/types/component/Chart/CigaretteChart.d.ts +1 -1
- package/lib/types/component/Chart/CigaretteChart.type.d.ts +4 -4
- package/lib/types/component/Chart/CompactHorizontalBarChart.d.ts +1 -1
- package/lib/types/component/Chart/CompactHorizontalBarChart.type.d.ts +5 -5
- package/lib/types/component/Chart/DonutChart.d.ts +1 -1
- package/lib/types/component/Chart/DonutChart.type.d.ts +5 -5
- package/lib/types/component/Chart/HistogramChart.d.ts +1 -1
- package/lib/types/component/Chart/HistogramChart.type.d.ts +4 -4
- package/lib/types/component/Chart/LineChart.d.ts +1 -1
- package/lib/types/component/Chart/LineChart.type.d.ts +7 -7
- package/lib/types/component/Chart/RadarChart.d.ts +1 -1
- package/lib/types/component/Chart/RadarChart.type.d.ts +4 -4
- package/lib/types/component/Chart/ScatterPlotChart.d.ts +1 -1
- package/lib/types/component/Chart/ScatterPlotChart.type.d.ts +5 -5
- package/lib/types/component/Chart/VennChart.d.ts +1 -1
- package/lib/types/component/Chart/VennChart.type.d.ts +4 -4
- package/lib/types/component/ChartLegend/BaseLegend.d.ts +6 -4
- package/lib/types/component/ChartLegend/BaseLegend.type.d.ts +4 -5
- package/lib/types/component/ChartLegend/LegendFlex/LegendFlex.d.ts +1 -1
- package/lib/types/component/ChartLegend/LegendFlex/LegendFlex.type.d.ts +4 -5
- package/lib/types/component/ChartLegend/LegendItem/LegendItem.d.ts +1 -1
- package/lib/types/component/ChartLegend/LegendItem/LegendItem.type.d.ts +17 -10
- package/lib/types/component/ChartLegend/LegendTable/LegendTable.d.ts +1 -1
- package/lib/types/component/ChartLegend/LegendTable/LegendTable.type.d.ts +5 -5
- package/lib/types/component/StackGroupBar/StackGroupBar.d.ts +1 -1
- package/lib/types/component/StackGroupBar/StackGroupBar.type.d.ts +3 -4
- package/lib/types/component/SvgElement.d.ts +10 -0
- package/lib/types/index.d.ts +2 -1
- package/lib/types/utils.d.ts +6 -6
- package/package.json +22 -23
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseLegend.js","names":["_core","require","_hints","
|
|
1
|
+
{"version":3,"file":"BaseLegend.js","names":["_core","require","_hints","_callSuper","t","o","e","_getPrototypeOf2","_possibleConstructorReturn2","_isNativeReflectConstruct2","Reflect","construct","constructor","apply","BaseLegend","exports","_Component","_this","_classCallCheck2","_len","arguments","length","args","Array","_key","concat","_defineProperty2","id","checked","_this$props$onChangeV","_this$props","props","onChangeVisibleItem","call","_this$props$onMouseEn","_this$props2","onMouseEnterItem","_this$props$onMouseLe","_this$props3","onMouseLeaveItem","_this$props$onMouseEn2","_this$props5","_this$props$onMouseLe2","_this$props4","_this$props$onMouseLe3","_this$props6","_this$props$onMouseEn3","_this$props7","_this$props$onMouseLe4","_this$props8","_inherits2","_createClass2","key","value","componentDidMount","setHints","componentDidUpdate","prevProps","items","dataHints","_this$asProps","asProps","dataHintsHandler","makeDataHintsHandlers","undefined","forEach","legendItem","labelKey","label","getItem","index","line","Error","getLegendItemProps","_","_this$asProps2","_this$asProps2$shape","shape","_this$asProps2$size","size","patterns","_objectSpread2","onFocusLegendItem","onBlurLegendItem","onChangeLegendItem","onMouseEnter","bindOnMouseEnterItem","onMouseLeave","bindOnMouseLeaveItem","style","gridRowStart","gridRowEnd","Component"],"sources":["../../../../src/component/ChartLegend/BaseLegend.tsx"],"sourcesContent":["import { Component, type Intergalactic } from '@semcore/core';\nimport type React from 'react';\n\nimport type { LegendProps } from './BaseLegend.type';\nimport type { LegendItemKey, LegendItemProps } from './LegendItem/LegendItem.type';\nimport { makeDataHintsHandlers } from '../../a11y/hints';\n\nexport abstract class BaseLegend<T extends LegendProps> extends Component<T> {\n componentDidMount() {\n this.setHints();\n }\n\n componentDidUpdate(prevProps: T) {\n if (prevProps.items !== this.props.items || prevProps.dataHints !== this.props.dataHints) {\n this.setHints();\n }\n }\n\n setHints() {\n const { items, dataHints } = this.asProps;\n const dataHintsHandler = dataHints ? makeDataHintsHandlers(dataHints) : undefined;\n\n items.forEach((legendItem) => {\n dataHintsHandler?.labelKey('value', legendItem.id, legendItem.label);\n });\n }\n\n getItem(index: number) {\n const line = this.asProps.items[index];\n\n if (line === undefined) {\n throw new Error(`No index \"${index}\" in lines`);\n }\n\n return line;\n }\n\n getLegendItemProps(\n _: {},\n index: number,\n ): LegendItemProps & Intergalactic.InternalTypings.ComponentPropsNesting<'div'> {\n const { shape = 'Checkbox', size = 'm', patterns } = this.asProps;\n const line = this.getItem(index);\n\n return {\n ...line,\n shape,\n size,\n onFocusLegendItem: this.onFocusLegendItem(line.checked),\n onBlurLegendItem: this.onBlurLegendItem,\n onChangeLegendItem: this.onChangeLegendItem,\n onMouseEnter: line.checked ? this.bindOnMouseEnterItem(line.id) : undefined,\n onMouseLeave: this.bindOnMouseLeaveItem(line.id),\n style: { gridRowStart: `${index + 1}`, gridRowEnd: `${index + 2}` },\n patterns,\n };\n }\n\n onChangeLegendItem = (id: LegendItemKey, checked: boolean) => {\n this.props.onChangeVisibleItem?.(id, checked);\n\n if (checked) {\n this.props.onMouseEnterItem?.(id);\n } else {\n this.props.onMouseLeaveItem?.(id);\n }\n };\n\n onFocusLegendItem = (checked: boolean) => (id: LegendItemKey) => {\n if (!checked) {\n return this.props.onMouseLeaveItem?.(id);\n }\n\n this.props.onMouseEnterItem?.(id);\n };\n\n onBlurLegendItem = (id: LegendItemKey) => {\n this.props.onMouseLeaveItem?.(id);\n };\n\n bindOnMouseEnterItem = (id: LegendItemKey) => {\n return (e: React.SyntheticEvent) => {\n this.props.onMouseEnterItem?.(id, e);\n };\n };\n\n bindOnMouseLeaveItem = (id: LegendItemKey) => {\n return (e: React.SyntheticEvent) => {\n this.props.onMouseLeaveItem?.(id, e);\n };\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,MAAA,GAAAD,OAAA;AAAyD,SAAAE,WAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,WAAAD,CAAA,OAAAE,gBAAA,aAAAF,CAAA,OAAAG,2BAAA,aAAAJ,CAAA,MAAAK,0BAAA,iBAAAC,OAAA,CAAAC,SAAA,CAAAN,CAAA,EAAAC,CAAA,YAAAC,gBAAA,aAAAH,CAAA,EAAAQ,WAAA,IAAAP,CAAA,CAAAQ,KAAA,CAAAT,CAAA,EAAAE,CAAA;AAAA,IAEnCQ,UAAU,GAAAC,OAAA,CAAAD,UAAA,0BAAAE,UAAA;EAAA,SAAAF,WAAA;IAAA,IAAAG,KAAA;IAAA,IAAAC,gBAAA,mBAAAJ,UAAA;IAAA,SAAAK,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAC,IAAA,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;MAAAF,IAAA,CAAAE,IAAA,I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AG,UAAU,GAAAA,oBAAA;QAAAE,mBAAA,GAAAH,cAAA,CAAEI,IAAI;QAAJA,IAAI,GAAAD,mBAAA,cAAG,GAAG,GAAAA,mBAAA;QAAEE,QAAQ,GAAAL,cAAA,CAARK,QAAQ;MAChD,IAAMT,IAAI,GAAG,IAAI,CAACF,OAAO,CAACC,KAAK,CAAC;MAEhC,WAAAW,cAAA,iBAAAA,cAAA,iBACKV,IAAI;QACPM,KAAK,EAALA,KAAK;QACLE,IAAI,EAAJA,IAAI;QACJG,iBAAiB,EAAE,IAAI,CAACA,iBAAiB,CAACX,IAAI,CAAC3C,OAAO,CAAC;QACvDuD,gBAAgB,EAAE,IAAI,CAACA,gBAAgB;QACvCC,kBAAkB,EAAE,IAAI,CAACA,kBAAkB;QAC3CC,YAAY,EAAEd,IAAI,CAAC3C,OAAO,GAAG,IAAI,CAAC0D,oBAAoB,CAACf,IAAI,CAAC5C,EAAE,CAAC,GAAGqC,SAAS;QAC3EuB,YAAY,EAAE,IAAI,CAACC,oBAAoB,CAACjB,IAAI,CAAC5C,EAAE,CAAC;QAChD8D,KAAK,EAAE;UAAEC,YAAY,KAAAjE,MAAA,CAAK6C,KAAK,GAAG,CAAC,CAAE;UAAEqB,UAAU,KAAAlE,MAAA,CAAK6C,KAAK,GAAG,CAAC;QAAG,CAAC;QACnEU,QAAQ,EAARA;MAAQ;IAEZ;EAAC;AAAA,EAjD6DY,eAAS","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseLegend.type.js","names":[],"sources":["../../../../src/component/ChartLegend/BaseLegend.type.ts"],"sourcesContent":["import { BoxProps, FlexProps } from '@semcore/flex-box';\nimport { LegendItem, LegendItemKey, ShapeType } from './LegendItem/LegendItem.type';\nimport { DataStructureHints } from '../../a11y/hints';\nimport type { PatternsConfig } from '../../Pattern';\nimport { AriaNameProps } from '../Chart/AbstractChart.type';\n\nexport type LSize = 'm' | 'l';\n\nexport type BaseChartLegendProps = FlexProps &\n AriaNameProps & {\n /**\n * Size for legend items\n */\n size?: LSize;\n /**\n * Shape of data item on Legend panel\n */\n shape?: ShapeType;\n /**\n * Handler for change visible for data items. Doesn't work if Shape one of 'Circle' | 'Line' | 'Square'\n */\n onChangeVisibleItem?: (key: LegendItemKey, isVisible: boolean) => void;\n\n onMouseEnterItem?: (key: LegendItemKey, e?: React.SyntheticEvent) => void;\n\n onMouseLeaveItem?: (key: LegendItemKey, e?: React.SyntheticEvent) => void;\n\n dataHints?: DataStructureHints;\n };\n\nexport type LegendProps = BoxProps &\n BaseChartLegendProps & {\n /**\n * Legend items\n */\n items: LegendItem[];\n\n /** Enables charts patterns that enhances charts accessibility */\n patterns?: PatternsConfig;\n };\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"BaseLegend.type.js","names":[],"sources":["../../../../src/component/ChartLegend/BaseLegend.type.ts"],"sourcesContent":["import type { BoxProps, FlexProps } from '@semcore/flex-box';\n\nimport type { LegendItem, LegendItemKey, ShapeType } from './LegendItem/LegendItem.type';\nimport type { DataStructureHints } from '../../a11y/hints';\nimport type { PatternsConfig } from '../../Pattern';\nimport type { AriaNameProps } from '../Chart/AbstractChart.type';\n\nexport type LSize = 'm' | 'l';\n\nexport type BaseChartLegendProps = FlexProps &\n AriaNameProps & {\n /**\n * Size for legend items\n */\n size?: LSize;\n /**\n * Shape of data item on Legend panel\n */\n shape?: ShapeType;\n /**\n * Handler for change visible for data items. Doesn't work if Shape one of 'Circle' | 'Line' | 'Square'\n */\n onChangeVisibleItem?: (key: LegendItemKey, isVisible: boolean) => void;\n\n onMouseEnterItem?: (key: LegendItemKey, e?: React.SyntheticEvent) => void;\n\n onMouseLeaveItem?: (key: LegendItemKey, e?: React.SyntheticEvent) => void;\n\n dataHints?: DataStructureHints;\n };\n\nexport type LegendProps = BoxProps &\n BaseChartLegendProps & {\n /**\n * Legend items\n */\n items: LegendItem[];\n\n /** Enables charts patterns that enhances charts accessibility */\n patterns?: PatternsConfig;\n };\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
@@ -8,34 +8,36 @@ exports.LegendFlex = void 0;
|
|
|
8
8
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
9
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
10
10
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
11
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
12
|
+
var _isNativeReflectConstruct2 = _interopRequireDefault(require("@babel/runtime/helpers/isNativeReflectConstruct"));
|
|
13
|
+
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
11
14
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
12
|
-
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
|
13
15
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
16
|
var _core = require("@semcore/core");
|
|
15
|
-
var _react = _interopRequireDefault(require("react"));
|
|
16
|
-
var _flexBox = require("@semcore/flex-box");
|
|
17
|
-
var _LegendItem = require("../LegendItem/LegendItem");
|
|
18
|
-
var _divider = _interopRequireDefault(require("@semcore/divider"));
|
|
19
17
|
var _checkbox = _interopRequireDefault(require("@semcore/checkbox"));
|
|
20
|
-
var _BaseLegend2 = require("../BaseLegend");
|
|
21
|
-
var _intergalacticDynamicLocales = require("../../../translations/__intergalactic-dynamic-locales");
|
|
22
18
|
var _i18nEnhance = _interopRequireDefault(require("@semcore/core/lib/utils/enhances/i18nEnhance"));
|
|
19
|
+
var _divider = _interopRequireDefault(require("@semcore/divider"));
|
|
20
|
+
var _flexBox = require("@semcore/flex-box");
|
|
21
|
+
var _react = _interopRequireDefault(require("react"));
|
|
22
|
+
var _intergalacticDynamicLocales = require("../../../translations/__intergalactic-dynamic-locales");
|
|
23
|
+
var _BaseLegend2 = require("../BaseLegend");
|
|
24
|
+
var _LegendItem = require("../LegendItem/LegendItem");
|
|
25
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, (0, _isNativeReflectConstruct2["default"])() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
|
|
23
26
|
/*!__reshadow-styles__:"./legend-flex.shadow.css"*/
|
|
24
|
-
var style = (
|
|
27
|
+
var style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SLegendFlex_pc68p_gg_._direction_row_pc68p_gg_{align-items:flex-start;align-content:flex-start;flex-wrap:wrap;gap:8px 16px}.___SLegendFlex_pc68p_gg_._direction_column_pc68p_gg_{align-items:flex-start;flex-wrap:wrap;gap:8px}", /*__inner_css_end__*/"pc68p_gg_"),
|
|
25
28
|
/*__reshadow_css_end__*/
|
|
26
29
|
{
|
|
27
|
-
"__SLegendFlex": "
|
|
28
|
-
"_direction_row": "
|
|
29
|
-
"_direction_column": "
|
|
30
|
+
"__SLegendFlex": "___SLegendFlex_pc68p_gg_",
|
|
31
|
+
"_direction_row": "_direction_row_pc68p_gg_",
|
|
32
|
+
"_direction_column": "_direction_column_pc68p_gg_"
|
|
30
33
|
});
|
|
31
34
|
var LegendFlexRoot = /*#__PURE__*/function (_BaseLegend) {
|
|
32
|
-
(0, _inherits2["default"])(LegendFlexRoot, _BaseLegend);
|
|
33
|
-
var _super = (0, _createSuper2["default"])(LegendFlexRoot);
|
|
34
35
|
function LegendFlexRoot() {
|
|
35
36
|
(0, _classCallCheck2["default"])(this, LegendFlexRoot);
|
|
36
|
-
return
|
|
37
|
+
return _callSuper(this, LegendFlexRoot, arguments);
|
|
37
38
|
}
|
|
38
|
-
(0,
|
|
39
|
+
(0, _inherits2["default"])(LegendFlexRoot, _BaseLegend);
|
|
40
|
+
return (0, _createClass2["default"])(LegendFlexRoot, [{
|
|
39
41
|
key: "renderTrend",
|
|
40
42
|
value: function renderTrend() {
|
|
41
43
|
var _ref3 = this.asProps,
|
|
@@ -47,7 +49,7 @@ var LegendFlexRoot = /*#__PURE__*/function (_BaseLegend) {
|
|
|
47
49
|
return /*#__PURE__*/_react["default"].createElement(_checkbox["default"], {
|
|
48
50
|
checked: trendIsVisible,
|
|
49
51
|
onChange: onTrendIsVisibleChange,
|
|
50
|
-
theme:
|
|
52
|
+
theme: "gray-400",
|
|
51
53
|
label: trendLabel !== null && trendLabel !== void 0 ? trendLabel : getI18nText('trend'),
|
|
52
54
|
size: size
|
|
53
55
|
});
|
|
@@ -78,7 +80,6 @@ var LegendFlexRoot = /*#__PURE__*/function (_BaseLegend) {
|
|
|
78
80
|
})), withTrend && this.renderTrend(), suffix ? suffix : null);
|
|
79
81
|
}
|
|
80
82
|
}]);
|
|
81
|
-
return LegendFlexRoot;
|
|
82
83
|
}(_BaseLegend2.BaseLegend);
|
|
83
84
|
(0, _defineProperty2["default"])(LegendFlexRoot, "displayName", 'LegendFlex');
|
|
84
85
|
(0, _defineProperty2["default"])(LegendFlexRoot, "style", style);
|
|
@@ -89,8 +90,7 @@ var LegendFlexRoot = /*#__PURE__*/function (_BaseLegend) {
|
|
|
89
90
|
children: /*#__PURE__*/_react["default"].createElement(LegendFlex.LegendItem, null)
|
|
90
91
|
};
|
|
91
92
|
});
|
|
92
|
-
var LegendFlex = (0, _core.createComponent)(LegendFlexRoot, {
|
|
93
|
+
var LegendFlex = exports.LegendFlex = (0, _core.createComponent)(LegendFlexRoot, {
|
|
93
94
|
LegendItem: _LegendItem.LegendItemComponent
|
|
94
95
|
});
|
|
95
|
-
exports.LegendFlex = LegendFlex;
|
|
96
96
|
//# sourceMappingURL=LegendFlex.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendFlex.js","names":["_core","require","
|
|
1
|
+
{"version":3,"file":"LegendFlex.js","names":["_core","require","_checkbox","_interopRequireDefault","_i18nEnhance","_divider","_flexBox","_react","_intergalacticDynamicLocales","_BaseLegend2","_LegendItem","_callSuper","t","o","e","_getPrototypeOf2","_possibleConstructorReturn2","_isNativeReflectConstruct2","Reflect","construct","constructor","apply","style","sstyled","insert","LegendFlexRoot","_BaseLegend","_classCallCheck2","arguments","_inherits2","_createClass2","key","value","renderTrend","_ref3","asProps","onTrendIsVisibleChange","trendIsVisible","trendLabel","size","getI18nText","createElement","checked","onChange","theme","label","render","_ref","_ref2","SLegendFlex","Flex","_this$asProps","styles","Children","direction","withTrend","suffix","items","orientation","cn","_objectSpread2","assignProps","map","_ref4","id","BaseLegend","_defineProperty2","i18nEnhance","localizedMessages","children","LegendFlex","LegendItem","exports","createComponent","LegendItemComponent"],"sources":["../../../../../src/component/ChartLegend/LegendFlex/LegendFlex.tsx"],"sourcesContent":["import Checkbox from '@semcore/checkbox';\nimport { createComponent, sstyled, Root } from '@semcore/core';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport Divider from '@semcore/divider';\nimport { Flex } from '@semcore/flex-box';\nimport React from 'react';\n\nimport style from './legend-flex.shadow.css';\nimport type { LegendFlexType, LegendFlexProps, TrendProps } from './LegendFlex.type';\nimport { localizedMessages } from '../../../translations/__intergalactic-dynamic-locales';\nimport { BaseLegend } from '../BaseLegend';\nimport { LegendItemComponent } from '../LegendItem/LegendItem';\n\nclass LegendFlexRoot extends BaseLegend<LegendFlexProps> {\n static displayName = 'LegendFlex';\n static style = style;\n\n static enhance = [i18nEnhance(localizedMessages)];\n\n static defaultProps = () => ({\n direction: 'row',\n children: <LegendFlex.LegendItem />,\n });\n\n renderTrend() {\n const { onTrendIsVisibleChange, trendIsVisible, trendLabel, size, getI18nText } = this\n .asProps as TrendProps & LegendFlexProps & { getI18nText: (s: string) => string };\n\n return (\n <Checkbox\n checked={trendIsVisible}\n onChange={onTrendIsVisibleChange}\n theme='gray-400'\n label={trendLabel ?? getI18nText('trend')}\n size={size}\n />\n );\n }\n\n render() {\n const SLegendFlex = Root;\n const { styles, Children, direction, withTrend, suffix, items } = this.asProps;\n const orientation = direction === 'row' ? 'vertical' : 'horizontal';\n\n return sstyled(styles)(\n <SLegendFlex render={Flex} role='group'>\n {items.map(({ id }) => {\n return <Children key={id} />;\n })}\n {(withTrend || suffix) && <Divider orientation={orientation} />}\n {withTrend && this.renderTrend()}\n {suffix ? suffix : null}\n </SLegendFlex>,\n );\n }\n}\n\nexport const LegendFlex: LegendFlexType = createComponent(LegendFlexRoot, {\n LegendItem: LegendItemComponent,\n});\n"],"mappings":";;;;;;;;;;;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AADA,IAAAC,SAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,YAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,QAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAJ,sBAAA,CAAAF,OAAA;AAIA,IAAAO,4BAAA,GAAAP,OAAA;AACA,IAAAQ,YAAA,GAAAR,OAAA;AACA,IAAAS,WAAA,GAAAT,OAAA;AAA+D,SAAAU,WAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,WAAAD,CAAA,OAAAE,gBAAA,aAAAF,CAAA,OAAAG,2BAAA,aAAAJ,CAAA,MAAAK,0BAAA,iBAAAC,OAAA,CAAAC,SAAA,CAAAN,CAAA,EAAAC,CAAA,YAAAC,gBAAA,aAAAH,CAAA,EAAAQ,WAAA,IAAAP,CAAA,CAAAQ,KAAA,CAAAT,CAAA,EAAAE,CAAA;AA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AMD,UAA0B,GAAAE,OAAA,CAAAF,UAAA,GAAG,IAAAG,qBAAe,EAAChD,cAAc,EAAE;EACxE8C,UAAU,EAAEG;AACd,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendFlex.type.js","names":[],"sources":["../../../../../src/component/ChartLegend/LegendFlex/LegendFlex.type.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"LegendFlex.type.js","names":[],"sources":["../../../../../src/component/ChartLegend/LegendFlex/LegendFlex.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type { Flex, FlexProps } from '@semcore/flex-box';\n\nimport type { LegendProps } from '../BaseLegend.type';\nimport type { LegendItemType } from '../LegendItem/LegendItem.type';\n\nexport type TrendProps = {\n /**\n * Flag for include trend LegendItem in Legend\n */\n withTrend: true;\n /**\n * Trend label (for localization)\n */\n trendLabel?: string;\n /**\n * Flag for describe are trend is visible\n */\n trendIsVisible: boolean;\n /**\n * Handler for change trend visibility\n */\n onTrendIsVisibleChange: (isVisible: boolean) => void;\n};\n\ntype SuffixProps = {\n /**\n * Element after all Legend items\n */\n suffix?: React.ReactElement;\n};\n\ntype AddonProps = ({ withTrend?: never } & SuffixProps) | ({ suffix?: never } & TrendProps);\n\nexport type LegendFlexProps = LegendProps & AddonProps & FlexProps;\n\nexport type LegendFlexType = Intergalactic.Component<typeof Flex, LegendFlexProps> & {\n LegendItem: LegendItemType;\n};\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
@@ -9,50 +9,52 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
9
9
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
10
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
11
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
12
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
13
|
+
var _isNativeReflectConstruct2 = _interopRequireDefault(require("@babel/runtime/helpers/isNativeReflectConstruct"));
|
|
14
|
+
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
12
15
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
13
|
-
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
|
14
16
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
17
|
var _core = require("@semcore/core");
|
|
16
|
-
var _react = _interopRequireDefault(require("react"));
|
|
17
|
-
var _flexBox = require("@semcore/flex-box");
|
|
18
18
|
var _checkbox = _interopRequireDefault(require("@semcore/checkbox"));
|
|
19
|
-
var _typography = require("@semcore/typography");
|
|
20
|
-
var _LegendItem = require("./LegendItem.type");
|
|
21
19
|
var _resolveColorEnhance = _interopRequireDefault(require("@semcore/core/lib/utils/enhances/resolveColorEnhance"));
|
|
22
20
|
var _uniqueID = _interopRequireDefault(require("@semcore/core/lib/utils/uniqueID"));
|
|
21
|
+
var _flexBox = require("@semcore/flex-box");
|
|
22
|
+
var _typography = require("@semcore/typography");
|
|
23
|
+
var _react = _interopRequireDefault(require("react"));
|
|
24
|
+
var _LegendItem = require("./LegendItem.type");
|
|
23
25
|
var _Pattern = require("../../../Pattern");
|
|
24
26
|
var _utils = require("../../../utils");
|
|
25
27
|
var _excluded = ["id", "checked", "color", "onChangeLegendItem", "shape"];
|
|
28
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, (0, _isNativeReflectConstruct2["default"])() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
|
|
26
29
|
/*!__reshadow-styles__:"./legend-item.shadow.css"*/
|
|
27
|
-
var style = (
|
|
30
|
+
var style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SLegendItem_1feua_gg_{min-width:0;align-items:flex-start}@media (hover:hover){.___SLegendItem_1feua_gg_:hover{cursor:pointer}.___SLegendItem_1feua_gg_.__disabled_1feua_gg_:hover{cursor:default}}.___SPointShape_1feua_gg_.__color_1feua_gg_{background-color:var(--color_1feua);margin-right:8px;flex-shrink:0}.___SPointShape_1feua_gg_._shape_Circle_1feua_gg_._size_l_1feua_gg_{width:16px;height:16px;border-radius:8px;margin-top:4px}.___SPointShape_1feua_gg_._shape_Circle_1feua_gg_._size_m_1feua_gg_{width:12px;height:12px;border-radius:6px;margin-top:4px}.___SPointShape_1feua_gg_._shape_Line_1feua_gg_._size_l_1feua_gg_{width:16px;height:4px;border-radius:3px;margin-top:9px}.___SPointShape_1feua_gg_._shape_Line_1feua_gg_._size_m_1feua_gg_{width:12px;height:4px;border-radius:3px;margin-top:8px}.___SPointShape_1feua_gg_._shape_Square_1feua_gg_._size_l_1feua_gg_{width:16px;height:16px;border-radius:2px;margin-top:4px}.___SPointShape_1feua_gg_._shape_Square_1feua_gg_._size_m_1feua_gg_{width:12px;height:12px;border-radius:2px;margin-top:4px}.___SPointShape_1feua_gg_._shape_Pattern_1feua_gg_{background-color:transparent;margin-right:4px}.___SIcon_1feua_gg_{line-height:0;margin-right:4px}.___SIcon_1feua_gg_._size_l_1feua_gg_{margin-top:4px}.___SIcon_1feua_gg_._size_m_1feua_gg_{margin-top:2px}.___SLabel_1feua_gg_{min-width:0}.___SAdditionalLabel_1feua_gg_._size_l_1feua_gg_,.___SCount_1feua_gg_._size_l_1feua_gg_,.___SLabel_1feua_gg_._size_l_1feua_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%)}.___SAdditionalLabel_1feua_gg_._size_m_1feua_gg_,.___SCount_1feua_gg_._size_m_1feua_gg_,.___SLabel_1feua_gg_._size_m_1feua_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___SAdditionalLabel_1feua_gg_,.___SCount_1feua_gg_{margin-left:4px}.___SAdditionalLabel_1feua_gg_{white-space:nowrap;display:flex;align-items:flex-start}.___SAdditionalLabel_1feua_gg_::before{content:\"\";display:inline-block;background-color:var(--intergalactic-text-secondary, #6c6e79);height:4px;width:4px;border-radius:2px;margin-right:4px}.___SAdditionalLabel_1feua_gg_._size_l_1feua_gg_::before{margin-top:10px}.___SAdditionalLabel_1feua_gg_._size_m_1feua_gg_::before{margin-top:8px}.___SPatternSymbol_1feua_gg_{transform:scale(.8)}", /*__inner_css_end__*/"1feua_gg_"),
|
|
28
31
|
/*__reshadow_css_end__*/
|
|
29
32
|
{
|
|
30
|
-
"__SLegendItem": "
|
|
31
|
-
"_disabled": "
|
|
32
|
-
"__SPointShape": "
|
|
33
|
-
"_color": "
|
|
34
|
-
"--color": "--
|
|
35
|
-
"_shape_Circle": "
|
|
36
|
-
"_size_l": "
|
|
37
|
-
"_size_m": "
|
|
38
|
-
"_shape_Line": "
|
|
39
|
-
"_shape_Square": "
|
|
40
|
-
"_shape_Pattern": "
|
|
41
|
-
"__SIcon": "
|
|
42
|
-
"__SLabel": "
|
|
43
|
-
"__SAdditionalLabel": "
|
|
44
|
-
"__SCount": "
|
|
45
|
-
"__SPatternSymbol": "
|
|
33
|
+
"__SLegendItem": "___SLegendItem_1feua_gg_",
|
|
34
|
+
"_disabled": "__disabled_1feua_gg_",
|
|
35
|
+
"__SPointShape": "___SPointShape_1feua_gg_",
|
|
36
|
+
"_color": "__color_1feua_gg_",
|
|
37
|
+
"--color": "--color_1feua",
|
|
38
|
+
"_shape_Circle": "_shape_Circle_1feua_gg_",
|
|
39
|
+
"_size_l": "_size_l_1feua_gg_",
|
|
40
|
+
"_size_m": "_size_m_1feua_gg_",
|
|
41
|
+
"_shape_Line": "_shape_Line_1feua_gg_",
|
|
42
|
+
"_shape_Square": "_shape_Square_1feua_gg_",
|
|
43
|
+
"_shape_Pattern": "_shape_Pattern_1feua_gg_",
|
|
44
|
+
"__SIcon": "___SIcon_1feua_gg_",
|
|
45
|
+
"__SLabel": "___SLabel_1feua_gg_",
|
|
46
|
+
"__SAdditionalLabel": "___SAdditionalLabel_1feua_gg_",
|
|
47
|
+
"__SCount": "___SCount_1feua_gg_",
|
|
48
|
+
"__SPatternSymbol": "___SPatternSymbol_1feua_gg_"
|
|
46
49
|
});
|
|
47
50
|
var enhance = [(0, _resolveColorEnhance["default"])(), (0, _uniqueID["default"])()];
|
|
48
51
|
var LegendItemRoot = /*#__PURE__*/function (_Component) {
|
|
49
|
-
(0, _inherits2["default"])(LegendItemRoot, _Component);
|
|
50
|
-
var _super = (0, _createSuper2["default"])(LegendItemRoot);
|
|
51
52
|
function LegendItemRoot() {
|
|
52
53
|
(0, _classCallCheck2["default"])(this, LegendItemRoot);
|
|
53
|
-
return
|
|
54
|
+
return _callSuper(this, LegendItemRoot, arguments);
|
|
54
55
|
}
|
|
55
|
-
(0,
|
|
56
|
+
(0, _inherits2["default"])(LegendItemRoot, _Component);
|
|
57
|
+
return (0, _createClass2["default"])(LegendItemRoot, [{
|
|
56
58
|
key: "getUniqueID",
|
|
57
59
|
value: function getUniqueID() {
|
|
58
60
|
var uid = this.asProps.uid;
|
|
@@ -70,18 +72,26 @@ var LegendItemRoot = /*#__PURE__*/function (_Component) {
|
|
|
70
72
|
size = _this$asProps.size,
|
|
71
73
|
resolveColor = _this$asProps.resolveColor,
|
|
72
74
|
patterns = _this$asProps.patterns,
|
|
73
|
-
onChangeLegendItem = _this$asProps.onChangeLegendItem
|
|
75
|
+
onChangeLegendItem = _this$asProps.onChangeLegendItem,
|
|
76
|
+
onFocusLegendItem = _this$asProps.onFocusLegendItem,
|
|
77
|
+
onBlurLegendItem = _this$asProps.onBlurLegendItem;
|
|
74
78
|
return {
|
|
75
79
|
label: label,
|
|
76
80
|
shape: shape,
|
|
77
81
|
checked: checked,
|
|
78
|
-
color: resolveColor(color),
|
|
79
|
-
patternKey: color,
|
|
82
|
+
'color': resolveColor(color),
|
|
83
|
+
'patternKey': color,
|
|
80
84
|
patterns: patterns,
|
|
81
85
|
size: size,
|
|
82
|
-
onChange: function onChange(value) {
|
|
86
|
+
'onChange': function onChange(value) {
|
|
83
87
|
onChangeLegendItem(id, value);
|
|
84
88
|
},
|
|
89
|
+
'onFocus': function onFocus() {
|
|
90
|
+
return onFocusLegendItem(id);
|
|
91
|
+
},
|
|
92
|
+
'onBlur': function onBlur() {
|
|
93
|
+
return onBlurLegendItem(id);
|
|
94
|
+
},
|
|
85
95
|
'aria-labelledby': shape === 'Checkbox' ? this.getUniqueID() : null
|
|
86
96
|
};
|
|
87
97
|
}
|
|
@@ -99,9 +109,9 @@ var LegendItemRoot = /*#__PURE__*/function (_Component) {
|
|
|
99
109
|
var _this$asProps2 = this.asProps,
|
|
100
110
|
id = _this$asProps2.id,
|
|
101
111
|
checked = _this$asProps2.checked,
|
|
102
|
-
|
|
112
|
+
_color = _this$asProps2.color,
|
|
103
113
|
onChangeLegendItem = _this$asProps2.onChangeLegendItem,
|
|
104
|
-
|
|
114
|
+
_shape = _this$asProps2.shape,
|
|
105
115
|
props = (0, _objectWithoutProperties2["default"])(_this$asProps2, _excluded);
|
|
106
116
|
return (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, props), {}, {
|
|
107
117
|
id: this.getUniqueID(),
|
|
@@ -149,7 +159,6 @@ var LegendItemRoot = /*#__PURE__*/function (_Component) {
|
|
|
149
159
|
}, _ref))), /*#__PURE__*/_react["default"].createElement(Children, _ref7.cn("Children", {})));
|
|
150
160
|
}
|
|
151
161
|
}]);
|
|
152
|
-
return LegendItemRoot;
|
|
153
162
|
}(_core.Component);
|
|
154
163
|
(0, _defineProperty2["default"])(LegendItemRoot, "displayName", 'LegendItem');
|
|
155
164
|
(0, _defineProperty2["default"])(LegendItemRoot, "style", style);
|
|
@@ -161,7 +170,7 @@ var LegendItemRoot = /*#__PURE__*/function (_Component) {
|
|
|
161
170
|
});
|
|
162
171
|
function Shape(props) {
|
|
163
172
|
var _ref2 = arguments[0],
|
|
164
|
-
|
|
173
|
+
_ref0;
|
|
165
174
|
var SPointShape = _flexBox.Box;
|
|
166
175
|
var SPatternSymbol = _Pattern.PatternSymbol;
|
|
167
176
|
var styles = props.styles,
|
|
@@ -174,7 +183,9 @@ function Shape(props) {
|
|
|
174
183
|
Children = props.Children,
|
|
175
184
|
hasChildren = props.children,
|
|
176
185
|
patterns = props.patterns,
|
|
177
|
-
onChange = props.onChange
|
|
186
|
+
onChange = props.onChange,
|
|
187
|
+
onFocus = props.onFocus,
|
|
188
|
+
onBlur = props.onBlur;
|
|
178
189
|
if (hasChildren) {
|
|
179
190
|
return /*#__PURE__*/_react["default"].createElement(Children, null);
|
|
180
191
|
}
|
|
@@ -195,6 +206,8 @@ function Shape(props) {
|
|
|
195
206
|
"checked": checked,
|
|
196
207
|
"theme": checked ? color : undefined,
|
|
197
208
|
"onChange": onChange,
|
|
209
|
+
"onFocus": onFocus,
|
|
210
|
+
"onBlur": onBlur,
|
|
198
211
|
"aria-labelledby": props['aria-labelledby']
|
|
199
212
|
})), patterns && /*#__PURE__*/_react["default"].createElement(_flexBox.Box, _ref9.cn("Box", {
|
|
200
213
|
"mt": '2px',
|
|
@@ -205,74 +218,73 @@ function Shape(props) {
|
|
|
205
218
|
"aria-hidden": true
|
|
206
219
|
}))));
|
|
207
220
|
}
|
|
208
|
-
return
|
|
221
|
+
return _ref0 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SPointShape, _ref0.cn("SPointShape", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({}, _ref2))), /*#__PURE__*/_react["default"].createElement(Children, _ref0.cn("Children", {})));
|
|
209
222
|
}
|
|
210
|
-
function Icon(
|
|
223
|
+
function Icon(_ref13) {
|
|
211
224
|
var _ref3 = arguments[0],
|
|
212
|
-
|
|
213
|
-
var styles =
|
|
214
|
-
hasChildren =
|
|
215
|
-
Children =
|
|
225
|
+
_ref1;
|
|
226
|
+
var styles = _ref13.styles,
|
|
227
|
+
hasChildren = _ref13.children,
|
|
228
|
+
Children = _ref13.Children;
|
|
216
229
|
var SIcon = _flexBox.Box;
|
|
217
230
|
if (!hasChildren) {
|
|
218
231
|
return null;
|
|
219
232
|
}
|
|
220
|
-
return
|
|
233
|
+
return _ref1 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SIcon, _ref1.cn("SIcon", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
|
|
221
234
|
"tag": 'span'
|
|
222
|
-
}, _ref3))), /*#__PURE__*/_react["default"].createElement(Children,
|
|
235
|
+
}, _ref3))), /*#__PURE__*/_react["default"].createElement(Children, _ref1.cn("Children", {})));
|
|
223
236
|
}
|
|
224
237
|
Icon.displayName = 'Icon';
|
|
225
|
-
function Label(
|
|
238
|
+
function Label(_ref14) {
|
|
226
239
|
var _ref4 = arguments[0],
|
|
227
|
-
|
|
228
|
-
var styles =
|
|
229
|
-
hasChildren =
|
|
230
|
-
Children =
|
|
240
|
+
_ref10;
|
|
241
|
+
var styles = _ref14.styles,
|
|
242
|
+
hasChildren = _ref14.children,
|
|
243
|
+
Children = _ref14.Children;
|
|
231
244
|
var SLabel = _typography.Text;
|
|
232
245
|
if (!hasChildren) {
|
|
233
246
|
return null;
|
|
234
247
|
}
|
|
235
|
-
return
|
|
248
|
+
return _ref10 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SLabel, _ref10.cn("SLabel", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
|
|
236
249
|
"use": 'primary'
|
|
237
|
-
}, _ref4))), /*#__PURE__*/_react["default"].createElement(Children,
|
|
250
|
+
}, _ref4))), /*#__PURE__*/_react["default"].createElement(Children, _ref10.cn("Children", {})));
|
|
238
251
|
}
|
|
239
252
|
Label.displayName = 'Label';
|
|
240
|
-
function AdditionalLabel(
|
|
253
|
+
function AdditionalLabel(_ref15) {
|
|
241
254
|
var _ref5 = arguments[0],
|
|
242
|
-
|
|
243
|
-
var styles =
|
|
244
|
-
hasChildren =
|
|
245
|
-
Children =
|
|
255
|
+
_ref11;
|
|
256
|
+
var styles = _ref15.styles,
|
|
257
|
+
hasChildren = _ref15.children,
|
|
258
|
+
Children = _ref15.Children;
|
|
246
259
|
var SAdditionalLabel = _typography.Text;
|
|
247
260
|
if (!hasChildren) {
|
|
248
261
|
return null;
|
|
249
262
|
}
|
|
250
|
-
return
|
|
263
|
+
return _ref11 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SAdditionalLabel, _ref11.cn("SAdditionalLabel", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
|
|
251
264
|
"use": 'secondary'
|
|
252
|
-
}, _ref5))), /*#__PURE__*/_react["default"].createElement(Children,
|
|
265
|
+
}, _ref5))), /*#__PURE__*/_react["default"].createElement(Children, _ref11.cn("Children", {})));
|
|
253
266
|
}
|
|
254
267
|
AdditionalLabel.displayName = 'AdditionalLabel';
|
|
255
|
-
function Count(
|
|
268
|
+
function Count(_ref16) {
|
|
256
269
|
var _ref6 = arguments[0],
|
|
257
|
-
|
|
258
|
-
var styles =
|
|
259
|
-
hasChildren =
|
|
260
|
-
Children =
|
|
270
|
+
_ref12;
|
|
271
|
+
var styles = _ref16.styles,
|
|
272
|
+
hasChildren = _ref16.children,
|
|
273
|
+
Children = _ref16.Children;
|
|
261
274
|
var SCount = _typography.Text;
|
|
262
275
|
if (!hasChildren) {
|
|
263
276
|
return null;
|
|
264
277
|
}
|
|
265
|
-
return
|
|
278
|
+
return _ref12 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SCount, _ref12.cn("SCount", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
|
|
266
279
|
"use": 'secondary'
|
|
267
|
-
}, _ref6))), /*#__PURE__*/_react["default"].createElement(Children,
|
|
280
|
+
}, _ref6))), /*#__PURE__*/_react["default"].createElement(Children, _ref12.cn("Children", {})));
|
|
268
281
|
}
|
|
269
282
|
Count.displayName = 'Count';
|
|
270
|
-
var LegendItemComponent = (0, _core.createComponent)(LegendItemRoot, {
|
|
283
|
+
var LegendItemComponent = exports.LegendItemComponent = (0, _core.createComponent)(LegendItemRoot, {
|
|
271
284
|
Shape: Shape,
|
|
272
285
|
Icon: Icon,
|
|
273
286
|
Label: Label,
|
|
274
287
|
AdditionalLabel: AdditionalLabel,
|
|
275
288
|
Count: Count
|
|
276
289
|
});
|
|
277
|
-
exports.LegendItemComponent = LegendItemComponent;
|
|
278
290
|
//# sourceMappingURL=LegendItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendItem.js","names":["_core","require","_react","_interopRequireDefault","_flexBox","_checkbox","_typography","_LegendItem","_resolveColorEnhance","_uniqueID","_Pattern","_utils","_excluded","style","sstyled","insert","enhance","resolveColorEnhance","uniqueIDEnhancement","LegendItemRoot","_Component","_inherits2","_super","_createSuper2","_classCallCheck2","apply","arguments","_createClass2","key","value","getUniqueID","uid","asProps","concat","getShapeProps","_this$asProps","checked","color","shape","label","id","size","resolveColor","patterns","onChangeLegendItem","patternKey","onChange","getIconProps","props","_objectSpread2","children","icon","getLabelProps","_this$asProps2","_objectWithoutProperties2","onClick","getAdditionalLabelProps","additionalInfo","undefined","getCountProps","count","render","_ref","_ref7","SLegendItem","Flex","_this$asProps3","styles","Children","disabled","StaticShapes","includes","createElement","cn","assignProps","Component","_defineProperty2","Fragment","LegendItemComponent","Shape","Icon","Label","AdditionalLabel","Count","_ref2","arguments[0]","_ref10","SPointShape","Box","SPatternSymbol","PatternSymbol","_props$patternKey","getChartDefaultColorName","hasChildren","_ref8","_ref9","_ref15","_ref3","_ref11","SIcon","displayName","_ref16","_ref4","_ref12","SLabel","TypographyText","_ref17","_ref5","_ref13","SAdditionalLabel","_ref18","_ref6","_ref14","SCount","createComponent","exports"],"sources":["../../../../../src/component/ChartLegend/LegendItem/LegendItem.tsx"],"sourcesContent":["import React, { DOMAttributes } from 'react';\nimport { createComponent, Component, sstyled, Root, IRootComponentProps } from '@semcore/core';\nimport { Flex, Box } from '@semcore/flex-box';\nimport Checkbox from '@semcore/checkbox';\nimport { Text as TypographyText } from '@semcore/typography';\n\nimport style from './legend-item.shadow.css';\nimport {\n ShapeProps,\n LegendItemProps,\n LegendItemType,\n LegendItem,\n StaticShapes,\n} from './LegendItem.type';\nimport resolveColorEnhance from '@semcore/core/lib/utils/enhances/resolveColorEnhance';\nimport uniqueIDEnhancement from '@semcore/core/lib/utils/uniqueID';\nimport { PatternSymbol } from '../../../Pattern';\nimport { getChartDefaultColorName } from '../../../utils';\n\nconst enhance = [resolveColorEnhance(), uniqueIDEnhancement()] as const;\nclass LegendItemRoot extends Component<LegendItemProps, {}, {}, typeof enhance> {\n static displayName = 'LegendItem';\n static style = style;\n\n static enhance = enhance;\n\n static defaultProps = () => ({\n children: (\n <>\n <LegendItemComponent.Shape />\n <LegendItemComponent.Icon />\n <LegendItemComponent.Label />\n <LegendItemComponent.AdditionalLabel />\n <LegendItemComponent.Count />\n </>\n ),\n });\n\n getUniqueID() {\n const { uid } = this.asProps;\n return `chart-legend-item-${uid}`;\n }\n\n getShapeProps() {\n const { checked, color, shape, label, id, size, resolveColor, patterns, onChangeLegendItem } =\n this.asProps;\n return {\n label,\n shape,\n checked,\n color: resolveColor(color),\n patternKey: color,\n patterns,\n size,\n onChange: (value: boolean) => {\n onChangeLegendItem(id, value);\n },\n 'aria-labelledby': shape === 'Checkbox' ? this.getUniqueID() : null,\n };\n }\n\n getIconProps(): LegendItem & IRootComponentProps {\n const props = this.asProps;\n\n return {\n ...props,\n children: props.icon,\n };\n }\n\n getLabelProps(): Omit<LegendItem, 'color'> & IRootComponentProps & { onClick: () => void } {\n const { id, checked, color, onChangeLegendItem, shape, ...props } = this.asProps;\n\n return {\n ...props,\n id: this.getUniqueID(),\n checked,\n onClick: () => onChangeLegendItem(id, !checked),\n children: props.label,\n };\n }\n\n getAdditionalLabelProps(): LegendItem & IRootComponentProps {\n const props = this.asProps;\n\n const { additionalInfo } = props;\n\n return {\n ...props,\n children: additionalInfo && 'label' in additionalInfo ? `${additionalInfo.label}` : undefined,\n };\n }\n\n getCountProps(): LegendItem & IRootComponentProps {\n const props = this.asProps;\n\n const { additionalInfo } = props;\n\n return {\n ...props,\n children:\n additionalInfo && 'count' in additionalInfo ? `(${additionalInfo.count})` : undefined,\n };\n }\n\n render() {\n const SLegendItem = Root;\n const { styles, Children, shape } = this.asProps;\n\n // @ts-ignore\n const disabled = StaticShapes.includes(shape);\n\n return sstyled(styles)(\n <SLegendItem render={Flex} disabled={disabled} __excludeProps={['id']}>\n <Children />\n </SLegendItem>,\n );\n }\n}\n\nfunction Shape(props: IRootComponentProps & ShapeProps & DOMAttributes<HTMLLabelElement>) {\n const SPointShape = Root;\n const SPatternSymbol = PatternSymbol;\n const {\n styles,\n size,\n shape,\n checked,\n color,\n patternKey = getChartDefaultColorName(0),\n Children,\n children: hasChildren,\n patterns,\n onChange,\n } = props;\n\n if (hasChildren) {\n return <Children />;\n }\n\n if (shape === 'Pattern') {\n return sstyled(styles)(\n <Box mr={1}>\n <SPatternSymbol color={color} patternKey={patternKey} aria-hidden />\n </Box>,\n );\n }\n\n if (shape === 'Checkbox') {\n return sstyled(styles)(\n <>\n <Checkbox\n size={size}\n checked={checked}\n theme={checked ? color : undefined}\n onChange={onChange}\n aria-labelledby={props['aria-labelledby']}\n />\n {patterns && (\n <Box mt={'2px'} mr={1}>\n <SPatternSymbol color={color} patternKey={patternKey} aria-hidden />\n </Box>\n )}\n </>,\n );\n }\n\n return sstyled(styles)(\n <SPointShape render={Box}>\n <Children />\n </SPointShape>,\n );\n}\n\nfunction Icon({ styles, children: hasChildren, Children }: IRootComponentProps) {\n const SIcon = Root;\n\n if (!hasChildren) {\n return null;\n }\n\n return sstyled(styles)(\n <SIcon render={Box} tag={'span'}>\n <Children />\n </SIcon>,\n );\n}\nIcon.displayName = 'Icon';\n\nfunction Label({ styles, children: hasChildren, Children }: IRootComponentProps) {\n const SLabel = Root;\n\n if (!hasChildren) {\n return null;\n }\n\n return sstyled(styles)(\n <SLabel render={TypographyText} use={'primary'}>\n <Children />\n </SLabel>,\n );\n}\nLabel.displayName = 'Label';\n\nfunction AdditionalLabel({ styles, children: hasChildren, Children }: IRootComponentProps) {\n const SAdditionalLabel = Root;\n\n if (!hasChildren) {\n return null;\n }\n\n return sstyled(styles)(\n <SAdditionalLabel render={TypographyText} use={'secondary'}>\n <Children />\n </SAdditionalLabel>,\n );\n}\nAdditionalLabel.displayName = 'AdditionalLabel';\n\nfunction Count({ styles, children: hasChildren, Children }: IRootComponentProps) {\n const SCount = Root;\n\n if (!hasChildren) {\n return null;\n }\n\n return sstyled(styles)(\n <SCount render={TypographyText} use={'secondary'}>\n <Children />\n </SCount>,\n );\n}\nCount.displayName = 'Count';\n\nexport const LegendItemComponent: LegendItemType = createComponent(LegendItemRoot, {\n Shape,\n Icon,\n Label,\n AdditionalLabel,\n Count,\n});\n"],"mappings":";;;;;;;;;;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AADA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AAGA,IAAAM,WAAA,GAAAN,OAAA;AAOA,IAAAO,oBAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,SAAA,GAAAN,sBAAA,CAAAF,OAAA;AACA,IAAAS,QAAA,GAAAT,OAAA;AACA,IAAAU,MAAA,GAAAV,OAAA;AAA0D,IAAAW,SA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IAAekB,QAAQ,GAAA0C,MAAA,CAAR1C,QAAQ;EACtD,IAAM6C,MAAM,GAOMR,gBAAc;EALhC,IAAI,CAACZ,WAAW,EAAE;IAChB,OAAO,IAAI;EACb;EAEA,OAAAmB,MAAA,GAAO,IAAAlG,aAAO,EAACqD,MAAM,CAAC,eACpBjE,MAAA,YAAAsE,aAAA,CAACyC,MAAM,EAAAD,MAAA,CAAAvC,EAAA,eAAAxB,cAAA,qBAAAjD,KAAA,CAAA0E,WAAA;IAAA,OAA8B;EAAW,GAAAqC,KAAA,kBAC9C7G,MAAA,YAAAsE,aAAA,CAACJ,QAAQ,EAAA4C,MAAA,CAAAvC,EAAA,iBAAG,CACL;AAEb;AACAU,KAAK,CAACiB,WAAW,GAAG,OAAO;AAEpB,IAAMtB,mBAAmC,GAAG,IAAAoC,qBAAe,EAAC/F,cAAc,EAAE;EACjF4D,KAAK,EAALA,KAAK;EACLC,IAAI,EAAJA,IAAI;EACJC,KAAK,EAALA,KAAK;EACLC,eAAe,EAAfA,eAAe;EACfC,KAAK,EAALA;AACF,CAAC,CAAC;AAACgC,OAAA,CAAArC,mBAAA,GAAAA,mBAAA"}
|
|
1
|
+
{"version":3,"file":"LegendItem.js","names":["_core","require","_checkbox","_interopRequireDefault","_resolveColorEnhance","_uniqueID","_flexBox","_typography","_react","_LegendItem","_Pattern","_utils","_excluded","_callSuper","t","o","e","_getPrototypeOf2","_possibleConstructorReturn2","_isNativeReflectConstruct2","Reflect","construct","constructor","apply","style","sstyled","insert","enhance","resolveColorEnhance","uniqueIDEnhancement","LegendItemRoot","_Component","_classCallCheck2","arguments","_inherits2","_createClass2","key","value","getUniqueID","uid","asProps","concat","getShapeProps","_this$asProps","checked","color","shape","label","id","size","resolveColor","patterns","onChangeLegendItem","onFocusLegendItem","onBlurLegendItem","onChange","onFocus","onBlur","getIconProps","props","_objectSpread2","children","icon","getLabelProps","_this$asProps2","_color","_shape","_objectWithoutProperties2","onClick","getAdditionalLabelProps","additionalInfo","undefined","getCountProps","count","render","_ref","_ref7","SLegendItem","Flex","_this$asProps3","styles","Children","disabled","StaticShapes","includes","createElement","cn","assignProps","Component","_defineProperty2","Fragment","LegendItemComponent","Shape","Icon","Label","AdditionalLabel","Count","_ref2","arguments[0]","_ref0","SPointShape","Box","SPatternSymbol","PatternSymbol","_props$patternKey","patternKey","getChartDefaultColorName","hasChildren","_ref8","_ref9","_ref13","_ref3","_ref1","SIcon","displayName","_ref14","_ref4","_ref10","SLabel","TypographyText","_ref15","_ref5","_ref11","SAdditionalLabel","_ref16","_ref6","_ref12","SCount","exports","createComponent"],"sources":["../../../../../src/component/ChartLegend/LegendItem/LegendItem.tsx"],"sourcesContent":["import Checkbox from '@semcore/checkbox';\nimport { createComponent, Component, sstyled, Root, type IRootComponentProps } from '@semcore/core';\nimport resolveColorEnhance from '@semcore/core/lib/utils/enhances/resolveColorEnhance';\nimport uniqueIDEnhancement from '@semcore/core/lib/utils/uniqueID';\nimport { Flex, Box } from '@semcore/flex-box';\nimport { Text as TypographyText } from '@semcore/typography';\nimport type { DOMAttributes } from 'react';\nimport React from 'react';\n\nimport style from './legend-item.shadow.css';\nimport {\n type ShapeProps,\n type LegendItemProps,\n type LegendItemType,\n type LegendItem,\n StaticShapes,\n} from './LegendItem.type';\nimport { PatternSymbol } from '../../../Pattern';\nimport { getChartDefaultColorName } from '../../../utils';\n\nconst enhance = [resolveColorEnhance(), uniqueIDEnhancement()] as const;\nclass LegendItemRoot extends Component<LegendItemProps, {}, {}, typeof enhance> {\n static displayName = 'LegendItem';\n static style = style;\n\n static enhance = enhance;\n\n static defaultProps = () => ({\n children: (\n <>\n <LegendItemComponent.Shape />\n <LegendItemComponent.Icon />\n <LegendItemComponent.Label />\n <LegendItemComponent.AdditionalLabel />\n <LegendItemComponent.Count />\n </>\n ),\n });\n\n getUniqueID() {\n const { uid } = this.asProps;\n return `chart-legend-item-${uid}`;\n }\n\n getShapeProps() {\n const { checked, color, shape, label, id, size, resolveColor, patterns, onChangeLegendItem, onFocusLegendItem, onBlurLegendItem } =\n this.asProps;\n return {\n label,\n shape,\n checked,\n 'color': resolveColor(color),\n 'patternKey': color,\n patterns,\n size,\n 'onChange': (value: boolean) => {\n onChangeLegendItem(id, value);\n },\n 'onFocus': () => onFocusLegendItem(id),\n 'onBlur': () => onBlurLegendItem(id),\n 'aria-labelledby': shape === 'Checkbox' ? this.getUniqueID() : null,\n };\n }\n\n getIconProps(): LegendItem & IRootComponentProps {\n const props = this.asProps;\n\n return {\n ...props,\n children: props.icon,\n };\n }\n\n getLabelProps(): Omit<LegendItem, 'color'> & IRootComponentProps & { onClick: () => void } {\n const { id, checked, color: _color, onChangeLegendItem, shape: _shape, ...props } = this.asProps;\n\n return {\n ...props,\n id: this.getUniqueID(),\n checked,\n onClick: () => onChangeLegendItem(id, !checked),\n children: props.label,\n };\n }\n\n getAdditionalLabelProps(): LegendItem & IRootComponentProps {\n const props = this.asProps;\n\n const { additionalInfo } = props;\n\n return {\n ...props,\n children: additionalInfo && 'label' in additionalInfo ? `${additionalInfo.label}` : undefined,\n };\n }\n\n getCountProps(): LegendItem & IRootComponentProps {\n const props = this.asProps;\n\n const { additionalInfo } = props;\n\n return {\n ...props,\n children:\n additionalInfo && 'count' in additionalInfo ? `(${additionalInfo.count})` : undefined,\n };\n }\n\n render() {\n const SLegendItem = Root;\n const { styles, Children, shape } = this.asProps;\n\n // @ts-ignore\n const disabled = StaticShapes.includes(shape);\n\n return sstyled(styles)(\n <SLegendItem render={Flex} disabled={disabled} __excludeProps={['id']}>\n <Children />\n </SLegendItem>,\n );\n }\n}\n\nfunction Shape(props: IRootComponentProps & ShapeProps & DOMAttributes<HTMLLabelElement>) {\n const SPointShape = Root;\n const SPatternSymbol = PatternSymbol;\n const {\n styles,\n size,\n shape,\n checked,\n color,\n patternKey = getChartDefaultColorName(0),\n Children,\n children: hasChildren,\n patterns,\n onChange,\n onFocus,\n onBlur,\n } = props;\n\n if (hasChildren) {\n return <Children />;\n }\n\n if (shape === 'Pattern') {\n return sstyled(styles)(\n <Box mr={1}>\n <SPatternSymbol color={color} patternKey={patternKey} aria-hidden />\n </Box>,\n );\n }\n\n if (shape === 'Checkbox') {\n return sstyled(styles)(\n <>\n <Checkbox\n size={size}\n checked={checked}\n theme={checked ? color : undefined}\n onChange={onChange}\n onFocus={onFocus}\n onBlur={onBlur}\n aria-labelledby={props['aria-labelledby']}\n />\n {patterns && (\n <Box mt='2px' mr={1}>\n <SPatternSymbol color={color} patternKey={patternKey} aria-hidden />\n </Box>\n )}\n </>,\n );\n }\n\n return sstyled(styles)(\n <SPointShape render={Box}>\n <Children />\n </SPointShape>,\n );\n}\n\nfunction Icon({ styles, children: hasChildren, Children }: IRootComponentProps) {\n const SIcon = Root;\n\n if (!hasChildren) {\n return null;\n }\n\n return sstyled(styles)(\n <SIcon render={Box} tag='span'>\n <Children />\n </SIcon>,\n );\n}\nIcon.displayName = 'Icon';\n\nfunction Label({ styles, children: hasChildren, Children }: IRootComponentProps) {\n const SLabel = Root;\n\n if (!hasChildren) {\n return null;\n }\n\n return sstyled(styles)(\n <SLabel render={TypographyText} use='primary'>\n <Children />\n </SLabel>,\n );\n}\nLabel.displayName = 'Label';\n\nfunction AdditionalLabel({ styles, children: hasChildren, Children }: IRootComponentProps) {\n const SAdditionalLabel = Root;\n\n if (!hasChildren) {\n return null;\n }\n\n return sstyled(styles)(\n <SAdditionalLabel render={TypographyText} use='secondary'>\n <Children />\n </SAdditionalLabel>,\n );\n}\nAdditionalLabel.displayName = 'AdditionalLabel';\n\nfunction Count({ styles, children: hasChildren, Children }: IRootComponentProps) {\n const SCount = Root;\n\n if (!hasChildren) {\n return null;\n }\n\n return sstyled(styles)(\n <SCount render={TypographyText} use='secondary'>\n <Children />\n </SCount>,\n );\n}\nCount.displayName = 'Count';\n\nexport const LegendItemComponent: LegendItemType = createComponent(LegendItemRoot, {\n Shape,\n Icon,\n Label,\n AdditionalLabel,\n Count,\n});\n"],"mappings":";;;;;;;;;;;;;;;;AACA,IAA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GAOMR,gBAAc;EALhC,IAAI,CAACZ,WAAW,EAAE;IAChB,OAAO,IAAI;EACb;EAEA,OAAAmB,MAAA,GAAO,IAAArG,aAAO,EAACuD,MAAM,CAAC,eACpBxE,MAAA,YAAA6E,aAAA,CAAC0C,MAAM,EAAAD,MAAA,CAAAxC,EAAA,eAAA1B,cAAA,qBAAA5D,KAAA,CAAAuF,WAAA;IAAA,OAA6B;EAAW,GAAAsC,KAAA,kBAC7CrH,MAAA,YAAA6E,aAAA,CAACJ,QAAQ,EAAA6C,MAAA,CAAAxC,EAAA,gBAAE,CACL,CAAC;AAEb;AACAU,KAAK,CAACkB,WAAW,GAAG,OAAO;AAEpB,IAAMvB,mBAAmC,GAAAqC,OAAA,CAAArC,mBAAA,GAAG,IAAAsC,qBAAe,EAACnG,cAAc,EAAE;EACjF8D,KAAK,EAALA,KAAK;EACLC,IAAI,EAAJA,IAAI;EACJC,KAAK,EAALA,KAAK;EACLC,eAAe,EAAfA,eAAe;EACfC,KAAK,EAALA;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -8,6 +8,5 @@ exports.StaticShapes = void 0;
|
|
|
8
8
|
* Key of chart data item
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
var StaticShapes = ['Circle', 'Line', 'Square', 'Pattern'];
|
|
12
|
-
exports.StaticShapes = StaticShapes;
|
|
11
|
+
var StaticShapes = exports.StaticShapes = ['Circle', 'Line', 'Square', 'Pattern'];
|
|
13
12
|
//# sourceMappingURL=LegendItem.type.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendItem.type.js","names":["StaticShapes","exports"],"sources":["../../../../../src/component/ChartLegend/LegendItem/LegendItem.type.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"LegendItem.type.js","names":["StaticShapes","exports"],"sources":["../../../../../src/component/ChartLegend/LegendItem/LegendItem.type.ts"],"sourcesContent":["import type { Intergalactic, Root } from '@semcore/core';\nimport type { Flex } from '@semcore/flex-box';\nimport type Icon from '@semcore/icon';\nimport type { Text } from '@semcore/typography';\n\nimport type { PatternsConfig } from '../../../Pattern';\nimport type { LSize } from '../BaseLegend.type';\n\n/**\n * Key of chart data item\n */\nexport type LegendItemKey = string;\n\nexport type LegendItem = {\n /**\n * One of keys from data set\n */\n id: LegendItemKey;\n /**\n * Label for data item in Legend\n */\n label: string;\n /**\n * Flag for selected data item\n */\n checked: boolean;\n /**\n * Color of data item\n */\n color: string;\n /**\n * Icon before label\n */\n icon?: typeof Icon;\n /**\n * Additional info with sub-label or count\n */\n additionalInfo?: { label: string } | { count: number };\n\n patternKey?: string;\n\n /** Enables patterns symbols that enhances charts accessibility */\n patterns?: PatternsConfig;\n};\n\nexport type LegendItemProps = LegendItem & {\n /**\n * Size for legend item\n */\n size: LSize;\n /**\n * Shape of data item on Legend panel\n */\n shape: ShapeType;\n /**\n * Handler for select/deselect legend item.\n * !Need to redefine onClick, because we don't have `event` in it.\n * @deprecated\n */\n onClick?: () => void;\n\n /** Enables patterns symbols that enhances charts accessibility */\n patterns?: PatternsConfig;\n\n /**\n * Handler for select/deselect legend item\n */\n onChangeLegendItem: (id: LegendItemKey, checked: boolean) => void;\n\n /**\n * Handler for focus legend item\n */\n onFocusLegendItem: (id: LegendItemKey) => void;\n\n /**\n * Handler for focus out legend item\n */\n onBlurLegendItem: (id: LegendItemKey) => void;\n};\n\nexport type ShapeProps = LegendItem &\n (\n | {\n size: LSize;\n shape: Exclude<ShapeType, 'Checkbox'>;\n }\n | {\n 'size': LSize;\n 'shape': Extract<ShapeType, 'Checkbox'>;\n 'onChange': (checked: boolean, e?: React.SyntheticEvent<HTMLInputElement>) => void;\n 'aria-labelledby'?: string;\n }\n );\n\nexport const StaticShapes = ['Circle', 'Line', 'Square', 'Pattern'] as const;\n\nexport type ShapeType = 'Checkbox' | typeof StaticShapes[number];\n\nexport type LegendItemType = Intergalactic.Component<typeof Flex, Partial<LegendItemProps>> & {\n Shape: Intergalactic.Component<typeof Root, Partial<ShapeProps>>;\n Icon: Intergalactic.Component<typeof Icon, Partial<LegendItem>>;\n Label: Intergalactic.Component<typeof Text, Partial<Omit<LegendItem, 'theme'>>>;\n AdditionalLabel: Intergalactic.Component<typeof Text, Partial<LegendItem>>;\n Count: Intergalactic.Component<typeof Text, Partial<LegendItem>>;\n};\n"],"mappings":";;;;;;AAQA;AACA;AACA;;AAoFO,IAAMA,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,CAAU","ignoreList":[]}
|