@fluentui/react-charts 1.1.0 → 9.0.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 +181 -11
- package/LICENSE +11 -17
- package/README.md +174 -23
- package/dist/index.d.ts +2143 -0
- package/lib/CartesianChart.js +1 -0
- package/lib/CartesianChart.js.map +1 -0
- package/lib/DeclarativeChart.js +1 -0
- package/lib/DeclarativeChart.js.map +1 -0
- package/lib/DonutChart.js +1 -0
- package/lib/DonutChart.js.map +1 -0
- package/lib/HorizontalBarChart.js +1 -0
- package/lib/HorizontalBarChart.js.map +1 -0
- package/lib/Legends.js +1 -0
- package/lib/Legends.js.map +1 -0
- package/lib/LineChart.js +1 -0
- package/lib/LineChart.js.map +1 -0
- package/lib/Popover.js +1 -0
- package/lib/Popover.js.map +1 -0
- package/lib/ResponsiveContainer.js +1 -0
- package/lib/ResponsiveContainer.js.map +1 -0
- package/lib/Sparkline.js +1 -0
- package/lib/Sparkline.js.map +1 -0
- package/lib/VerticalBarChart.js +1 -0
- package/lib/VerticalBarChart.js.map +1 -0
- package/lib/components/CommonComponents/CartesianChart.js +462 -0
- package/lib/components/CommonComponents/CartesianChart.js.map +1 -0
- package/lib/components/CommonComponents/CartesianChart.types.js +1 -0
- package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -0
- package/lib/components/CommonComponents/ChartPopover.js +187 -0
- package/lib/components/CommonComponents/ChartPopover.js.map +1 -0
- package/lib/components/CommonComponents/ChartPopover.types.js +1 -0
- package/lib/components/CommonComponents/ChartPopover.types.js.map +1 -0
- package/lib/components/CommonComponents/index.js +4 -0
- package/lib/components/CommonComponents/index.js.map +1 -0
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +229 -0
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -0
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.js +178 -0
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -0
- package/lib/components/DeclarativeChart/DeclarativeChart.js +150 -0
- package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -0
- package/lib/components/DeclarativeChart/PlotlySchema.js +7 -0
- package/lib/components/DeclarativeChart/PlotlySchema.js.map +1 -0
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +400 -0
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -0
- package/lib/components/DeclarativeChart/imageExporter.js +221 -0
- package/lib/components/DeclarativeChart/imageExporter.js.map +1 -0
- package/lib/components/DeclarativeChart/index.js +1 -0
- package/lib/components/DeclarativeChart/index.js.map +1 -0
- package/lib/components/DonutChart/Arc/Arc.js +110 -0
- package/lib/components/DonutChart/Arc/Arc.js.map +1 -0
- package/lib/components/DonutChart/Arc/Arc.types.js +1 -0
- package/lib/components/DonutChart/Arc/Arc.types.js.map +1 -0
- package/lib/components/DonutChart/Arc/index.js +2 -0
- package/lib/components/DonutChart/Arc/index.js.map +1 -0
- package/lib/components/DonutChart/Arc/useArcStyles.styles.js +54 -0
- package/lib/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -0
- package/lib/components/DonutChart/DonutChart.js +291 -0
- package/lib/components/DonutChart/DonutChart.js.map +1 -0
- package/lib/components/DonutChart/DonutChart.types.js +1 -0
- package/lib/components/DonutChart/DonutChart.types.js.map +1 -0
- package/lib/components/DonutChart/Pie/Pie.js +72 -0
- package/lib/components/DonutChart/Pie/Pie.js.map +1 -0
- package/lib/components/DonutChart/Pie/Pie.types.js +1 -0
- package/lib/components/DonutChart/Pie/Pie.types.js.map +1 -0
- package/lib/components/DonutChart/Pie/index.js +2 -0
- package/lib/components/DonutChart/Pie/index.js.map +1 -0
- package/lib/components/DonutChart/Pie/usePieStyles.styles.js +44 -0
- package/lib/components/DonutChart/Pie/usePieStyles.styles.js.map +1 -0
- package/lib/components/DonutChart/index.js +3 -0
- package/lib/components/DonutChart/index.js.map +1 -0
- package/lib/components/DonutChart/useDonutChartStyles.styles.js +58 -0
- package/lib/components/DonutChart/useDonutChartStyles.styles.js.map +1 -0
- package/lib/components/HorizontalBarChart/HorizontalBarChart.js +402 -0
- package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -0
- package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js +6 -0
- package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -0
- package/lib/components/HorizontalBarChart/index.js +3 -0
- package/lib/components/HorizontalBarChart/index.js.map +1 -0
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +163 -0
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -0
- package/lib/components/Legends/Legends.js +302 -0
- package/lib/components/Legends/Legends.js.map +1 -0
- package/lib/components/Legends/Legends.types.js +1 -0
- package/lib/components/Legends/Legends.types.js.map +1 -0
- package/lib/components/Legends/OverflowMenu.js +25 -0
- package/lib/components/Legends/OverflowMenu.js.map +1 -0
- package/lib/components/Legends/index.js +3 -0
- package/lib/components/Legends/index.js.map +1 -0
- package/lib/components/Legends/shape.js +35 -0
- package/lib/components/Legends/shape.js.map +1 -0
- package/lib/components/Legends/useLegendsStyles.styles.js +147 -0
- package/lib/components/Legends/useLegendsStyles.styles.js.map +1 -0
- package/lib/components/LineChart/LineChart.js +1026 -0
- package/lib/components/LineChart/LineChart.js.map +1 -0
- package/lib/components/LineChart/LineChart.types.js +3 -0
- package/lib/components/LineChart/LineChart.types.js.map +1 -0
- package/lib/components/LineChart/eventAnnotation/EventAnnotation.js +119 -0
- package/lib/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -0
- package/lib/components/LineChart/eventAnnotation/LabelLink.js +57 -0
- package/lib/components/LineChart/eventAnnotation/LabelLink.js.map +1 -0
- package/lib/components/LineChart/eventAnnotation/Textbox.js +40 -0
- package/lib/components/LineChart/eventAnnotation/Textbox.js.map +1 -0
- package/lib/components/LineChart/index.js +4 -0
- package/lib/components/LineChart/index.js.map +1 -0
- package/lib/components/LineChart/useLineChartStyles.styles.js +65 -0
- package/lib/components/LineChart/useLineChartStyles.styles.js.map +1 -0
- package/lib/components/ResponsiveContainer/ResponsiveContainer.js +65 -0
- package/lib/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -0
- package/lib/components/ResponsiveContainer/ResponsiveContainer.types.js +1 -0
- package/lib/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -0
- package/lib/components/ResponsiveContainer/index.js +1 -0
- package/lib/components/ResponsiveContainer/index.js.map +1 -0
- package/lib/components/ResponsiveContainer/useResponsiveContainerStyles.styles.js +23 -0
- package/lib/components/ResponsiveContainer/useResponsiveContainerStyles.styles.js.map +1 -0
- package/lib/components/Sparkline/Sparkline.js +119 -0
- package/lib/components/Sparkline/Sparkline.js.map +1 -0
- package/lib/components/Sparkline/Sparkline.types.js +4 -0
- package/lib/components/Sparkline/Sparkline.types.js.map +1 -0
- package/lib/components/Sparkline/index.js +3 -0
- package/lib/components/Sparkline/index.js.map +1 -0
- package/lib/components/Sparkline/useSparklineStyles.styles.js +49 -0
- package/lib/components/Sparkline/useSparklineStyles.styles.js.map +1 -0
- package/lib/components/VerticalBarChart/VerticalBarChart.js +849 -0
- package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -0
- package/lib/components/VerticalBarChart/VerticalBarChart.types.js +4 -0
- package/lib/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -0
- package/lib/components/VerticalBarChart/index.js +3 -0
- package/lib/components/VerticalBarChart/index.js.map +1 -0
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +74 -0
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -0
- package/lib/index.js +12 -8
- package/lib/index.js.map +1 -1
- package/lib/types/DataPoint.js +3 -0
- package/lib/types/DataPoint.js.map +1 -0
- package/lib/types/EventAnnotation.js +1 -0
- package/lib/types/EventAnnotation.js.map +1 -0
- package/lib/types/LegendDataItem.js +1 -0
- package/lib/types/LegendDataItem.js.map +1 -0
- package/lib/types/index.js +2 -2
- package/lib/types/index.js.map +1 -1
- package/lib/utilities/FocusableTooltipText.js +65 -0
- package/lib/utilities/FocusableTooltipText.js.map +1 -0
- package/lib/utilities/KeyCodes.js +8 -0
- package/lib/utilities/KeyCodes.js.map +1 -0
- package/lib/utilities/SVGTooltipText.js +138 -0
- package/lib/utilities/SVGTooltipText.js.map +1 -0
- package/lib/utilities/async-utils.js +380 -0
- package/lib/utilities/async-utils.js.map +1 -0
- package/lib/utilities/colors.js +249 -0
- package/lib/utilities/colors.js.map +1 -0
- package/lib/utilities/getWindow.js +25 -0
- package/lib/utilities/getWindow.js.map +1 -0
- package/lib/utilities/index.js +3 -0
- package/lib/utilities/index.js.map +1 -0
- package/lib/utilities/locale-util.js +15 -0
- package/lib/utilities/locale-util.js.map +1 -0
- package/lib/utilities/overflow-utils.js +27 -0
- package/lib/utilities/overflow-utils.js.map +1 -0
- package/lib/utilities/test-data.js +276 -0
- package/lib/utilities/test-data.js.map +1 -0
- package/lib/utilities/utilities.js +1215 -0
- package/lib/utilities/utilities.js.map +1 -0
- package/lib/utilities/vbc-utils.js +27 -0
- package/lib/utilities/vbc-utils.js.map +1 -0
- package/lib-commonjs/CartesianChart.js +6 -0
- package/lib-commonjs/CartesianChart.js.map +1 -0
- package/lib-commonjs/DeclarativeChart.js +6 -0
- package/lib-commonjs/DeclarativeChart.js.map +1 -0
- package/lib-commonjs/DonutChart.js +6 -0
- package/lib-commonjs/DonutChart.js.map +1 -0
- package/lib-commonjs/HorizontalBarChart.js +6 -0
- package/lib-commonjs/HorizontalBarChart.js.map +1 -0
- package/lib-commonjs/Legends.js +6 -0
- package/lib-commonjs/Legends.js.map +1 -0
- package/lib-commonjs/LineChart.js +6 -0
- package/lib-commonjs/LineChart.js.map +1 -0
- package/lib-commonjs/Popover.js +6 -0
- package/lib-commonjs/Popover.js.map +1 -0
- package/lib-commonjs/ResponsiveContainer.js +6 -0
- package/lib-commonjs/ResponsiveContainer.js.map +1 -0
- package/lib-commonjs/Sparkline.js +6 -0
- package/lib-commonjs/Sparkline.js.map +1 -0
- package/lib-commonjs/VerticalBarChart.js +6 -0
- package/lib-commonjs/VerticalBarChart.js.map +1 -0
- package/lib-commonjs/components/CommonComponents/CartesianChart.js +469 -0
- package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -0
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.js +6 -0
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -0
- package/lib-commonjs/components/CommonComponents/ChartPopover.js +197 -0
- package/lib-commonjs/components/CommonComponents/ChartPopover.js.map +1 -0
- package/lib-commonjs/components/CommonComponents/ChartPopover.types.js +4 -0
- package/lib-commonjs/components/CommonComponents/ChartPopover.types.js.map +1 -0
- package/lib-commonjs/components/CommonComponents/index.js +9 -0
- package/lib-commonjs/components/CommonComponents/index.js.map +1 -0
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +356 -0
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -0
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js +261 -0
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -0
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +158 -0
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -0
- package/lib-commonjs/components/DeclarativeChart/PlotlySchema.js +10 -0
- package/lib-commonjs/components/DeclarativeChart/PlotlySchema.js.map +1 -0
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +445 -0
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -0
- package/lib-commonjs/components/DeclarativeChart/imageExporter.js +231 -0
- package/lib-commonjs/components/DeclarativeChart/imageExporter.js.map +1 -0
- package/lib-commonjs/components/DeclarativeChart/index.js +6 -0
- package/lib-commonjs/components/DeclarativeChart/index.js.map +1 -0
- package/lib-commonjs/components/DonutChart/Arc/Arc.js +117 -0
- package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -0
- package/lib-commonjs/components/DonutChart/Arc/Arc.types.js +4 -0
- package/lib-commonjs/components/DonutChart/Arc/Arc.types.js.map +1 -0
- package/lib-commonjs/components/DonutChart/Arc/index.js +7 -0
- package/lib-commonjs/components/DonutChart/Arc/index.js.map +1 -0
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js +83 -0
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -0
- package/lib-commonjs/components/DonutChart/DonutChart.js +298 -0
- package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -0
- package/lib-commonjs/components/DonutChart/DonutChart.types.js +6 -0
- package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -0
- package/lib-commonjs/components/DonutChart/Pie/Pie.js +79 -0
- package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -0
- package/lib-commonjs/components/DonutChart/Pie/Pie.types.js +4 -0
- package/lib-commonjs/components/DonutChart/Pie/Pie.types.js.map +1 -0
- package/lib-commonjs/components/DonutChart/Pie/index.js +7 -0
- package/lib-commonjs/components/DonutChart/Pie/index.js.map +1 -0
- package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js +61 -0
- package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js.map +1 -0
- package/lib-commonjs/components/DonutChart/index.js +8 -0
- package/lib-commonjs/components/DonutChart/index.js.map +1 -0
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +82 -0
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +1 -0
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js +408 -0
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -0
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js +17 -0
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -0
- package/lib-commonjs/components/HorizontalBarChart/index.js +8 -0
- package/lib-commonjs/components/HorizontalBarChart/index.js.map +1 -0
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +251 -0
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -0
- package/lib-commonjs/components/Legends/Legends.js +313 -0
- package/lib-commonjs/components/Legends/Legends.js.map +1 -0
- package/lib-commonjs/components/Legends/Legends.types.js +6 -0
- package/lib-commonjs/components/Legends/Legends.types.js.map +1 -0
- package/lib-commonjs/components/Legends/OverflowMenu.js +36 -0
- package/lib-commonjs/components/Legends/OverflowMenu.js.map +1 -0
- package/lib-commonjs/components/Legends/index.js +8 -0
- package/lib-commonjs/components/Legends/index.js.map +1 -0
- package/lib-commonjs/components/Legends/shape.js +46 -0
- package/lib-commonjs/components/Legends/shape.js.map +1 -0
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.js +304 -0
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.js.map +1 -0
- package/lib-commonjs/components/LineChart/LineChart.js +1032 -0
- package/lib-commonjs/components/LineChart/LineChart.js.map +1 -0
- package/lib-commonjs/components/LineChart/LineChart.types.js +6 -0
- package/lib-commonjs/components/LineChart/LineChart.types.js.map +1 -0
- package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js +129 -0
- package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -0
- package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js +68 -0
- package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js.map +1 -0
- package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js +51 -0
- package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js.map +1 -0
- package/lib-commonjs/components/LineChart/index.js +9 -0
- package/lib-commonjs/components/LineChart/index.js.map +1 -0
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +96 -0
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +1 -0
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js +76 -0
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -0
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.js +6 -0
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -0
- package/lib-commonjs/components/ResponsiveContainer/index.js +6 -0
- package/lib-commonjs/components/ResponsiveContainer/index.js.map +1 -0
- package/lib-commonjs/components/ResponsiveContainer/useResponsiveContainerStyles.styles.js +47 -0
- package/lib-commonjs/components/ResponsiveContainer/useResponsiveContainerStyles.styles.js.map +1 -0
- package/lib-commonjs/components/Sparkline/Sparkline.js +125 -0
- package/lib-commonjs/components/Sparkline/Sparkline.js.map +1 -0
- package/lib-commonjs/components/Sparkline/Sparkline.types.js +7 -0
- package/lib-commonjs/components/Sparkline/Sparkline.types.js.map +1 -0
- package/lib-commonjs/components/Sparkline/index.js +8 -0
- package/lib-commonjs/components/Sparkline/index.js.map +1 -0
- package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js +77 -0
- package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js.map +1 -0
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +851 -0
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -0
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js +7 -0
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -0
- package/lib-commonjs/components/VerticalBarChart/index.js +8 -0
- package/lib-commonjs/components/VerticalBarChart/index.js.map +1 -0
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +117 -0
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -0
- package/lib-commonjs/index.js +17 -0
- package/lib-commonjs/index.js.map +1 -0
- package/lib-commonjs/types/DataPoint.js +6 -0
- package/lib-commonjs/types/DataPoint.js.map +1 -0
- package/lib-commonjs/types/EventAnnotation.js +6 -0
- package/lib-commonjs/types/EventAnnotation.js.map +1 -0
- package/lib-commonjs/types/LegendDataItem.js +4 -0
- package/lib-commonjs/types/LegendDataItem.js.map +1 -0
- package/lib-commonjs/types/index.js +7 -0
- package/lib-commonjs/types/index.js.map +1 -0
- package/lib-commonjs/utilities/FocusableTooltipText.js +75 -0
- package/lib-commonjs/utilities/FocusableTooltipText.js.map +1 -0
- package/lib-commonjs/utilities/KeyCodes.js +18 -0
- package/lib-commonjs/utilities/KeyCodes.js.map +1 -0
- package/lib-commonjs/utilities/SVGTooltipText.js +148 -0
- package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -0
- package/lib-commonjs/utilities/async-utils.js +382 -0
- package/lib-commonjs/utilities/async-utils.js.map +1 -0
- package/lib-commonjs/utilities/colors.js +270 -0
- package/lib-commonjs/utilities/colors.js.map +1 -0
- package/lib-commonjs/utilities/getWindow.js +28 -0
- package/lib-commonjs/utilities/getWindow.js.map +1 -0
- package/lib-commonjs/utilities/index.js +8 -0
- package/lib-commonjs/utilities/index.js.map +1 -0
- package/lib-commonjs/utilities/locale-util.js +25 -0
- package/lib-commonjs/utilities/locale-util.js.map +1 -0
- package/lib-commonjs/utilities/overflow-utils.js +36 -0
- package/lib-commonjs/utilities/overflow-utils.js.map +1 -0
- package/lib-commonjs/utilities/test-data.js +324 -0
- package/lib-commonjs/utilities/test-data.js.map +1 -0
- package/lib-commonjs/utilities/utilities.js +1184 -0
- package/lib-commonjs/utilities/utilities.js.map +1 -0
- package/lib-commonjs/utilities/vbc-utils.js +45 -0
- package/lib-commonjs/utilities/vbc-utils.js.map +1 -0
- package/package.json +80 -71
- package/CHANGELOG.json +0 -50
- package/lib/chart/chart-legend.d.ts +0 -6
- package/lib/chart/chart-legend.js +0 -446
- package/lib/chart/chart-legend.js.map +0 -1
- package/lib/chart/chart-render.d.ts +0 -3
- package/lib/chart/chart-render.js +0 -50
- package/lib/chart/chart-render.js.map +0 -1
- package/lib/chart/chart.d.ts +0 -3
- package/lib/chart/chart.js +0 -11
- package/lib/chart/chart.js.map +0 -1
- package/lib/chart/index.d.ts +0 -1
- package/lib/chart/index.js +0 -2
- package/lib/chart/index.js.map +0 -1
- package/lib/index.d.ts +0 -7
- package/lib/lib/builder.d.ts +0 -82
- package/lib/lib/builder.js +0 -341
- package/lib/lib/builder.js.map +0 -1
- package/lib/lib/datasets.d.ts +0 -99
- package/lib/lib/datasets.js +0 -240
- package/lib/lib/datasets.js.map +0 -1
- package/lib/lib/patterns.d.ts +0 -43
- package/lib/lib/patterns.js +0 -433
- package/lib/lib/patterns.js.map +0 -1
- package/lib/lib/plugins.d.ts +0 -11
- package/lib/lib/plugins.js +0 -403
- package/lib/lib/plugins.js.map +0 -1
- package/lib/lib/settings.d.ts +0 -11
- package/lib/lib/settings.js +0 -342
- package/lib/lib/settings.js.map +0 -1
- package/lib/lib/storybook.d.ts +0 -11
- package/lib/lib/storybook.js +0 -13
- package/lib/lib/storybook.js.map +0 -1
- package/lib/lib/utils.d.ts +0 -34
- package/lib/lib/utils.js +0 -253
- package/lib/lib/utils.js.map +0 -1
- package/lib/types/index.d.ts +0 -1
- package/lib/types/types.d.ts +0 -94
- package/lib/types/types.js +0 -41
- package/lib/types/types.js.map +0 -1
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
hbcClassNames: function() {
|
|
13
|
+
return hbcClassNames;
|
|
14
|
+
},
|
|
15
|
+
useHorizontalBarChartStyles: function() {
|
|
16
|
+
return useHorizontalBarChartStyles;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _react = require("@griffel/react");
|
|
20
|
+
const _index = require("./index");
|
|
21
|
+
const hbcClassNames = {
|
|
22
|
+
root: 'fui-hbc__root',
|
|
23
|
+
items: 'fui-hbc__items',
|
|
24
|
+
chart: 'fui-hbc__chart',
|
|
25
|
+
chartTitle: 'fui-hbc__chartTitle',
|
|
26
|
+
barWrapper: 'fui-hbc__barWrapper',
|
|
27
|
+
chartTitleLeft: 'fui-hbc__chartTitleLeft',
|
|
28
|
+
chartTitleRight: 'fui-hbc__chartTitleRight',
|
|
29
|
+
chartDataTextDenominator: 'fui-hbc__textDenom',
|
|
30
|
+
benchmarkContainer: 'fui-hbc__benchmark',
|
|
31
|
+
triangle: 'fui-hbc__triangle',
|
|
32
|
+
barLabel: 'fui-hbc__barLabel',
|
|
33
|
+
chartWrapper: 'fui-hbc__chartWrapper',
|
|
34
|
+
legendContainer: 'fui-hbc__legendContainer'
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Base Styles
|
|
38
|
+
*/ const useStyles = /*#__PURE__*/ (0, _react.__styles)({
|
|
39
|
+
root: {
|
|
40
|
+
mc9l5x: "f22iagw",
|
|
41
|
+
Beiy3e4: "f1vx9l62",
|
|
42
|
+
a9b677: "fly5x3f"
|
|
43
|
+
},
|
|
44
|
+
items10pMargin: {
|
|
45
|
+
jrapky: "f1rfdi54"
|
|
46
|
+
},
|
|
47
|
+
items16pMargin: {
|
|
48
|
+
jrapky: "fbxl46w"
|
|
49
|
+
},
|
|
50
|
+
chart: {
|
|
51
|
+
a9b677: "fly5x3f",
|
|
52
|
+
Bqenvij: "fvblgha",
|
|
53
|
+
mc9l5x: "ftgm304",
|
|
54
|
+
B68tc82: 0,
|
|
55
|
+
Bmxbyg5: 0,
|
|
56
|
+
Bpg54ce: "f1gl81tg"
|
|
57
|
+
},
|
|
58
|
+
barWrapper: {},
|
|
59
|
+
chartTitle: {
|
|
60
|
+
Bahqtrf: "fk6fouc",
|
|
61
|
+
Be2twd7: "fy9rknc",
|
|
62
|
+
Bhrd7zp: "figsok6",
|
|
63
|
+
Bg96gwp: "fwrc4pm",
|
|
64
|
+
mc9l5x: "f22iagw",
|
|
65
|
+
Brf1p80: "f1869bpl"
|
|
66
|
+
},
|
|
67
|
+
chartTitleLeft: {
|
|
68
|
+
ygn44y: "f1cmbuwj",
|
|
69
|
+
B68tc82: 0,
|
|
70
|
+
Bmxbyg5: 0,
|
|
71
|
+
Bpg54ce: "f1a3p1vp",
|
|
72
|
+
Huce71: "fz5stix",
|
|
73
|
+
mc9l5x: "ftgm304",
|
|
74
|
+
sj55zd: "f19n0e5"
|
|
75
|
+
},
|
|
76
|
+
chartTitleLeft4pMargin: {
|
|
77
|
+
jrapky: "fd1gkq"
|
|
78
|
+
},
|
|
79
|
+
chartTitleLeft5pMargin: {
|
|
80
|
+
jrapky: "f475ppk"
|
|
81
|
+
},
|
|
82
|
+
chartTitleRight: {
|
|
83
|
+
Bahqtrf: "fk6fouc",
|
|
84
|
+
Be2twd7: "fkhj508",
|
|
85
|
+
Bhrd7zp: "fl43uef",
|
|
86
|
+
Bg96gwp: "f1i3iumi",
|
|
87
|
+
sj55zd: "f19n0e5"
|
|
88
|
+
},
|
|
89
|
+
chartDataTextDenominator: {
|
|
90
|
+
Bahqtrf: "fk6fouc",
|
|
91
|
+
Be2twd7: "fkhj508",
|
|
92
|
+
Bhrd7zp: "figsok6",
|
|
93
|
+
Bg96gwp: "f1i3iumi",
|
|
94
|
+
sj55zd: "f19n0e5"
|
|
95
|
+
},
|
|
96
|
+
benchmarkContainer: {
|
|
97
|
+
qhf8xq: "f10pi13n",
|
|
98
|
+
Bqenvij: "f7u49ja",
|
|
99
|
+
B6of3ja: "f1h5g6v3",
|
|
100
|
+
jrapky: "fmxx68s"
|
|
101
|
+
},
|
|
102
|
+
triangle: {
|
|
103
|
+
a9b677: "f3tsq5r",
|
|
104
|
+
Bqenvij: "fniina8",
|
|
105
|
+
ibv6hh: [
|
|
106
|
+
"fbdn13q",
|
|
107
|
+
"fdo4c7f"
|
|
108
|
+
],
|
|
109
|
+
wvpqe5: [
|
|
110
|
+
"fjik90z",
|
|
111
|
+
"fcdblym"
|
|
112
|
+
],
|
|
113
|
+
zhjwy3: [
|
|
114
|
+
"f1pdflbu",
|
|
115
|
+
"f11589ue"
|
|
116
|
+
],
|
|
117
|
+
Bekrc4i: [
|
|
118
|
+
"fdo4c7f",
|
|
119
|
+
"fbdn13q"
|
|
120
|
+
],
|
|
121
|
+
vrafjx: [
|
|
122
|
+
"fcdblym",
|
|
123
|
+
"fjik90z"
|
|
124
|
+
],
|
|
125
|
+
h3c5rm: [
|
|
126
|
+
"f11589ue",
|
|
127
|
+
"f1pdflbu"
|
|
128
|
+
],
|
|
129
|
+
B4j52fo: "f1st6vq5",
|
|
130
|
+
icvyot: "fzkkow9",
|
|
131
|
+
g2u3we: "f1bpgvfk",
|
|
132
|
+
jrapky: "f8l5zjj",
|
|
133
|
+
qhf8xq: "f1euv43f"
|
|
134
|
+
},
|
|
135
|
+
barLabel: {
|
|
136
|
+
Bahqtrf: "fk6fouc",
|
|
137
|
+
Be2twd7: "fy9rknc",
|
|
138
|
+
Bhrd7zp: "fl43uef",
|
|
139
|
+
Bg96gwp: "fwrc4pm",
|
|
140
|
+
Bkfmm31: "fhuob2q",
|
|
141
|
+
a6j6cd: "f1j86lqe",
|
|
142
|
+
B93v9kj: "f15mrrko"
|
|
143
|
+
},
|
|
144
|
+
chartWrapper40ppadding: {
|
|
145
|
+
z189sj: [
|
|
146
|
+
"f1emi2st",
|
|
147
|
+
"f53ee3v"
|
|
148
|
+
]
|
|
149
|
+
},
|
|
150
|
+
chartWrapper0ppadding: {
|
|
151
|
+
z189sj: [
|
|
152
|
+
"flk2ux3",
|
|
153
|
+
"fkl3uby"
|
|
154
|
+
]
|
|
155
|
+
},
|
|
156
|
+
legendContainer: {
|
|
157
|
+
z8tnut: "fikn0iw"
|
|
158
|
+
}
|
|
159
|
+
}, {
|
|
160
|
+
d: [
|
|
161
|
+
".f22iagw{display:flex;}",
|
|
162
|
+
".f1vx9l62{flex-direction:column;}",
|
|
163
|
+
".fly5x3f{width:100%;}",
|
|
164
|
+
".f1rfdi54{margin-bottom:var(--spacingVerticalMNudge);}",
|
|
165
|
+
".fbxl46w{margin-bottom:var(--spacingVerticalL);}",
|
|
166
|
+
".fvblgha{height:12px;}",
|
|
167
|
+
".ftgm304{display:block;}",
|
|
168
|
+
[
|
|
169
|
+
".f1gl81tg{overflow:visible;}",
|
|
170
|
+
{
|
|
171
|
+
p: -1
|
|
172
|
+
}
|
|
173
|
+
],
|
|
174
|
+
".fk6fouc{font-family:var(--fontFamilyBase);}",
|
|
175
|
+
".fy9rknc{font-size:var(--fontSizeBase200);}",
|
|
176
|
+
".figsok6{font-weight:var(--fontWeightRegular);}",
|
|
177
|
+
".fwrc4pm{line-height:var(--lineHeightBase200);}",
|
|
178
|
+
".f1869bpl{justify-content:space-between;}",
|
|
179
|
+
".f1cmbuwj{text-overflow:ellipsis;}",
|
|
180
|
+
[
|
|
181
|
+
".f1a3p1vp{overflow:hidden;}",
|
|
182
|
+
{
|
|
183
|
+
p: -1
|
|
184
|
+
}
|
|
185
|
+
],
|
|
186
|
+
".fz5stix{white-space:nowrap;}",
|
|
187
|
+
".f19n0e5{color:var(--colorNeutralForeground1);}",
|
|
188
|
+
".fd1gkq{margin-bottom:4px;}",
|
|
189
|
+
".f475ppk{margin-bottom:5px;}",
|
|
190
|
+
".fkhj508{font-size:var(--fontSizeBase300);}",
|
|
191
|
+
".fl43uef{font-weight:var(--fontWeightSemibold);}",
|
|
192
|
+
".f1i3iumi{line-height:var(--lineHeightBase300);}",
|
|
193
|
+
".f10pi13n{position:relative;}",
|
|
194
|
+
".f7u49ja{height:7px;}",
|
|
195
|
+
".f1h5g6v3{margin-top:-3px;}",
|
|
196
|
+
".fmxx68s{margin-bottom:-1px;}",
|
|
197
|
+
".f3tsq5r{width:0;}",
|
|
198
|
+
".fniina8{height:0;}",
|
|
199
|
+
".fbdn13q{border-left-width:4px;}",
|
|
200
|
+
".fdo4c7f{border-right-width:4px;}",
|
|
201
|
+
".fjik90z{border-left-style:solid;}",
|
|
202
|
+
".fcdblym{border-right-style:solid;}",
|
|
203
|
+
".f1pdflbu{border-left-color:transparent;}",
|
|
204
|
+
".f11589ue{border-right-color:transparent;}",
|
|
205
|
+
".f1st6vq5{border-top-width:7px;}",
|
|
206
|
+
".fzkkow9{border-top-style:solid;}",
|
|
207
|
+
".f1bpgvfk{border-top-color:var(--colorPaletteBlueBorderActive);}",
|
|
208
|
+
".f8l5zjj{margin-bottom:var(--spacingVerticalXS);}",
|
|
209
|
+
".f1euv43f{position:absolute;}",
|
|
210
|
+
".fhuob2q{fill:var(--colorNeutralForeground1);}",
|
|
211
|
+
".f1emi2st{padding-right:40p;}",
|
|
212
|
+
".f53ee3v{padding-left:40p;}",
|
|
213
|
+
".flk2ux3{padding-right:var(--spacingHorizontalNone);}",
|
|
214
|
+
".fkl3uby{padding-left:var(--spacingHorizontalNone);}",
|
|
215
|
+
".fikn0iw{padding-top:var(--spacingVerticalL);}"
|
|
216
|
+
],
|
|
217
|
+
m: [
|
|
218
|
+
[
|
|
219
|
+
"@media screen and (-ms-high-contrast: active),screen and (forced-colors: active){.f1j86lqe{fill:WindowText;}}",
|
|
220
|
+
{
|
|
221
|
+
m: "screen and (-ms-high-contrast: active), screen and (forced-colors: active)"
|
|
222
|
+
}
|
|
223
|
+
],
|
|
224
|
+
[
|
|
225
|
+
"@media screen and (-ms-high-contrast: active),screen and (forced-colors: active){.f15mrrko{forced-color-adjust:none;}}",
|
|
226
|
+
{
|
|
227
|
+
m: "screen and (-ms-high-contrast: active), screen and (forced-colors: active)"
|
|
228
|
+
}
|
|
229
|
+
]
|
|
230
|
+
]
|
|
231
|
+
});
|
|
232
|
+
const useHorizontalBarChartStyles = (props)=>{
|
|
233
|
+
var _props_styles, _props_styles1, _props_styles2, _props_styles3, _props_styles4, _props_styles5, _props_styles6, _props_styles7, _props_styles8, _props_styles9, _props_styles10, _props_styles11, _props_styles12;
|
|
234
|
+
const { className, showTriangle, variant, hideLabels } = props; // ToDo - width, barHeight is non enumerable. Need to be used inline.
|
|
235
|
+
const baseStyles = useStyles();
|
|
236
|
+
return {
|
|
237
|
+
root: (0, _react.mergeClasses)(hbcClassNames.root, baseStyles.root, className, (_props_styles = props.styles) === null || _props_styles === void 0 ? void 0 : _props_styles.root),
|
|
238
|
+
items: (0, _react.mergeClasses)(hbcClassNames.items, showTriangle || variant === _index.HorizontalBarChartVariant.AbsoluteScale ? baseStyles.items16pMargin : baseStyles.items10pMargin, (_props_styles1 = props.styles) === null || _props_styles1 === void 0 ? void 0 : _props_styles1.items),
|
|
239
|
+
chart: (0, _react.mergeClasses)(hbcClassNames.chart, baseStyles.chart, (_props_styles2 = props.styles) === null || _props_styles2 === void 0 ? void 0 : _props_styles2.chart),
|
|
240
|
+
chartTitle: (0, _react.mergeClasses)(hbcClassNames.chartTitle, baseStyles.chartTitle, (_props_styles3 = props.styles) === null || _props_styles3 === void 0 ? void 0 : _props_styles3.chartTitle),
|
|
241
|
+
barWrapper: (0, _react.mergeClasses)(hbcClassNames.barWrapper, baseStyles.barWrapper, (_props_styles4 = props.styles) === null || _props_styles4 === void 0 ? void 0 : _props_styles4.barWrapper),
|
|
242
|
+
chartTitleLeft: (0, _react.mergeClasses)(hbcClassNames.chartTitleLeft, baseStyles.chartTitleLeft, variant === _index.HorizontalBarChartVariant.AbsoluteScale ? baseStyles.chartTitleLeft4pMargin : baseStyles.chartTitleLeft5pMargin, (_props_styles5 = props.styles) === null || _props_styles5 === void 0 ? void 0 : _props_styles5.chartTitleLeft),
|
|
243
|
+
chartTitleRight: (0, _react.mergeClasses)(hbcClassNames.chartTitleRight, baseStyles.chartTitleRight, (_props_styles6 = props.styles) === null || _props_styles6 === void 0 ? void 0 : _props_styles6.chartTitleRight),
|
|
244
|
+
chartDataTextDenominator: (0, _react.mergeClasses)(hbcClassNames.chartDataTextDenominator, baseStyles.chartDataTextDenominator, (_props_styles7 = props.styles) === null || _props_styles7 === void 0 ? void 0 : _props_styles7.chartDataTextDenominator),
|
|
245
|
+
benchmarkContainer: (0, _react.mergeClasses)(hbcClassNames.benchmarkContainer, baseStyles.benchmarkContainer, (_props_styles8 = props.styles) === null || _props_styles8 === void 0 ? void 0 : _props_styles8.benchmarkContainer),
|
|
246
|
+
triangle: (0, _react.mergeClasses)(hbcClassNames.triangle, baseStyles.triangle, (_props_styles9 = props.styles) === null || _props_styles9 === void 0 ? void 0 : _props_styles9.triangle),
|
|
247
|
+
barLabel: (0, _react.mergeClasses)(hbcClassNames.barLabel, baseStyles.barLabel, (_props_styles10 = props.styles) === null || _props_styles10 === void 0 ? void 0 : _props_styles10.barLabel),
|
|
248
|
+
chartWrapper: (0, _react.mergeClasses)(hbcClassNames.chartWrapper, variant === _index.HorizontalBarChartVariant.AbsoluteScale && !hideLabels ? baseStyles.chartWrapper40ppadding : baseStyles.chartWrapper0ppadding, (_props_styles11 = props.styles) === null || _props_styles11 === void 0 ? void 0 : _props_styles11.chartWrapper),
|
|
249
|
+
legendContainer: (0, _react.mergeClasses)(hbcClassNames.legendContainer, baseStyles.legendContainer, (_props_styles12 = props.styles) === null || _props_styles12 === void 0 ? void 0 : _props_styles12.legendContainer)
|
|
250
|
+
};
|
|
251
|
+
}; //# sourceMappingURL=useHorizontalBarChartStyles.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useHorizontalBarChartStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { HorizontalBarChartVariant } from './index';\nimport { HighContrastSelector } from '../../utilities/index';\n/**\n * @internal\n */ export const hbcClassNames = {\n root: 'fui-hbc__root',\n items: 'fui-hbc__items',\n chart: 'fui-hbc__chart',\n chartTitle: 'fui-hbc__chartTitle',\n barWrapper: 'fui-hbc__barWrapper',\n chartTitleLeft: 'fui-hbc__chartTitleLeft',\n chartTitleRight: 'fui-hbc__chartTitleRight',\n chartDataTextDenominator: 'fui-hbc__textDenom',\n benchmarkContainer: 'fui-hbc__benchmark',\n triangle: 'fui-hbc__triangle',\n barLabel: 'fui-hbc__barLabel',\n chartWrapper: 'fui-hbc__chartWrapper',\n legendContainer: 'fui-hbc__legendContainer'\n};\n/**\n * Base Styles\n */ const useStyles = makeStyles({\n root: {\n display: 'flex',\n flexDirection: 'column',\n width: '100%'\n },\n items10pMargin: {\n marginBottom: tokens.spacingVerticalMNudge\n },\n items16pMargin: {\n marginBottom: tokens.spacingVerticalL\n },\n chart: {\n width: '100%',\n height: '12px',\n display: 'block',\n overflow: 'visible'\n },\n barWrapper: {},\n chartTitle: {\n ...typographyStyles.caption1,\n display: 'flex',\n justifyContent: 'space-between'\n },\n chartTitleLeft: {\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n display: 'block',\n color: tokens.colorNeutralForeground1\n },\n chartTitleLeft4pMargin: {\n marginBottom: '4px'\n },\n chartTitleLeft5pMargin: {\n marginBottom: '5px'\n },\n chartTitleRight: {\n ...typographyStyles.body1Strong,\n color: tokens.colorNeutralForeground1\n },\n chartDataTextDenominator: {\n ...typographyStyles.body1,\n color: tokens.colorNeutralForeground1\n },\n benchmarkContainer: {\n position: 'relative',\n height: '7px',\n marginTop: '-3px',\n marginBottom: '-1px'\n },\n triangle: {\n width: '0',\n height: '0',\n ...shorthands.borderLeft('4px', 'solid', 'transparent'),\n ...shorthands.borderRight('4px', 'solid', 'transparent'),\n ...shorthands.borderTop('7px', 'solid'),\n borderTopColor: tokens.colorPaletteBlueBorderActive,\n marginBottom: tokens.spacingVerticalXS,\n position: 'absolute'\n },\n barLabel: {\n ...typographyStyles.caption1Strong,\n fill: tokens.colorNeutralForeground1,\n [HighContrastSelector]: {\n fill: 'WindowText',\n forcedColorAdjust: 'none'\n }\n },\n chartWrapper40ppadding: {\n paddingRight: '40p'\n },\n chartWrapper0ppadding: {\n paddingRight: tokens.spacingHorizontalNone\n },\n legendContainer: {\n paddingTop: tokens.spacingVerticalL\n }\n});\n/**\n * Apply styling to the Carousel slots based on the state\n */ export const useHorizontalBarChartStyles = (props)=>{\n var _props_styles, _props_styles1, _props_styles2, _props_styles3, _props_styles4, _props_styles5, _props_styles6, _props_styles7, _props_styles8, _props_styles9, _props_styles10, _props_styles11, _props_styles12;\n const { className, showTriangle, variant, hideLabels } = props; // ToDo - width, barHeight is non enumerable. Need to be used inline.\n const baseStyles = useStyles();\n return {\n root: mergeClasses(hbcClassNames.root, baseStyles.root, className, (_props_styles = props.styles) === null || _props_styles === void 0 ? void 0 : _props_styles.root),\n items: mergeClasses(hbcClassNames.items, showTriangle || variant === HorizontalBarChartVariant.AbsoluteScale ? baseStyles.items16pMargin : baseStyles.items10pMargin, (_props_styles1 = props.styles) === null || _props_styles1 === void 0 ? void 0 : _props_styles1.items),\n chart: mergeClasses(hbcClassNames.chart, baseStyles.chart, (_props_styles2 = props.styles) === null || _props_styles2 === void 0 ? void 0 : _props_styles2.chart),\n chartTitle: mergeClasses(hbcClassNames.chartTitle, baseStyles.chartTitle, (_props_styles3 = props.styles) === null || _props_styles3 === void 0 ? void 0 : _props_styles3.chartTitle),\n barWrapper: mergeClasses(hbcClassNames.barWrapper, baseStyles.barWrapper, (_props_styles4 = props.styles) === null || _props_styles4 === void 0 ? void 0 : _props_styles4.barWrapper),\n chartTitleLeft: mergeClasses(hbcClassNames.chartTitleLeft, baseStyles.chartTitleLeft, variant === HorizontalBarChartVariant.AbsoluteScale ? baseStyles.chartTitleLeft4pMargin : baseStyles.chartTitleLeft5pMargin, (_props_styles5 = props.styles) === null || _props_styles5 === void 0 ? void 0 : _props_styles5.chartTitleLeft),\n chartTitleRight: mergeClasses(hbcClassNames.chartTitleRight, baseStyles.chartTitleRight, (_props_styles6 = props.styles) === null || _props_styles6 === void 0 ? void 0 : _props_styles6.chartTitleRight),\n chartDataTextDenominator: mergeClasses(hbcClassNames.chartDataTextDenominator, baseStyles.chartDataTextDenominator, (_props_styles7 = props.styles) === null || _props_styles7 === void 0 ? void 0 : _props_styles7.chartDataTextDenominator),\n benchmarkContainer: mergeClasses(hbcClassNames.benchmarkContainer, baseStyles.benchmarkContainer, (_props_styles8 = props.styles) === null || _props_styles8 === void 0 ? void 0 : _props_styles8.benchmarkContainer),\n triangle: mergeClasses(hbcClassNames.triangle, baseStyles.triangle, (_props_styles9 = props.styles) === null || _props_styles9 === void 0 ? void 0 : _props_styles9.triangle),\n barLabel: mergeClasses(hbcClassNames.barLabel, baseStyles.barLabel, (_props_styles10 = props.styles) === null || _props_styles10 === void 0 ? void 0 : _props_styles10.barLabel),\n chartWrapper: mergeClasses(hbcClassNames.chartWrapper, variant === HorizontalBarChartVariant.AbsoluteScale && !hideLabels ? baseStyles.chartWrapper40ppadding : baseStyles.chartWrapper0ppadding, (_props_styles11 = props.styles) === null || _props_styles11 === void 0 ? void 0 : _props_styles11.chartWrapper),\n legendContainer: mergeClasses(hbcClassNames.legendContainer, baseStyles.legendContainer, (_props_styles12 = props.styles) === null || _props_styles12 === void 0 ? void 0 : _props_styles12.legendContainer)\n };\n};\n"],"names":["hbcClassNames","useHorizontalBarChartStyles","root","items","chart","chartTitle","barWrapper","chartTitleLeft","chartTitleRight","chartDataTextDenominator","benchmarkContainer","triangle","barLabel","chartWrapper","legendContainer","useStyles","__styles","mc9l5x","Beiy3e4","a9b677","items10pMargin","jrapky","items16pMargin","Bqenvij","B68tc82","Bmxbyg5","Bpg54ce","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","Brf1p80","ygn44y","Huce71","sj55zd","chartTitleLeft4pMargin","chartTitleLeft5pMargin","qhf8xq","B6of3ja","ibv6hh","wvpqe5","zhjwy3","Bekrc4i","vrafjx","h3c5rm","B4j52fo","icvyot","g2u3we","Bkfmm31","a6j6cd","B93v9kj","chartWrapper40ppadding","z189sj","chartWrapper0ppadding","z8tnut","d","p","m","props","_props_styles","_props_styles1","_props_styles2","_props_styles3","_props_styles4","_props_styles5","_props_styles6","_props_styles7","_props_styles8","_props_styles9","_props_styles10","_props_styles11","_props_styles12","className","showTriangle","variant","hideLabels","baseStyles","mergeClasses","styles","HorizontalBarChartVariant","AbsoluteScale"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAMiBA,aAAa;eAAbA;;IAkGAC,2BAA2B;eAA3BA;;;uBAxGoC;uBAEX;AAI/B,MAAMD,gBAAgB;IAC7BE,MAAM;IACNC,OAAO;IACPC,OAAO;IACPC,YAAY;IACZC,YAAY;IACZC,gBAAgB;IAChBC,iBAAiB;IACjBC,0BAA0B;IAC1BC,oBAAoB;IACpBC,UAAU;IACVC,UAAU;IACVC,cAAc;IACdC,iBAAiB;AACrB;AACA;;CAEA,GAAI,MAAMC,YAAS,WAAA,GAAGC,IAAAA,eAAA,EAAA;IAAAd,MAAA;QAAAe,QAAA;QAAAC,SAAA;QAAAC,QAAA;IAAA;IAAAC,gBAAA;QAAAC,QAAA;IAAA;IAAAC,gBAAA;QAAAD,QAAA;IAAA;IAAAjB,OAAA;QAAAe,QAAA;QAAAI,SAAA;QAAAN,QAAA;QAAAO,SAAA;QAAAC,SAAA;QAAAC,SAAA;IAAA;IAAApB,YAAA,CAAA;IAAAD,YAAA;QAAAsB,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAb,QAAA;QAAAc,SAAA;IAAA;IAAAxB,gBAAA;QAAAyB,QAAA;QAAAR,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAO,QAAA;QAAAhB,QAAA;QAAAiB,QAAA;IAAA;IAAAC,wBAAA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AIA,eAAezD,QAAQ;QAC5KC,UAAUiE,IAAAA,mBAAY,EAAC7E,cAAcY,QAAQ,EAAEgE,WAAWhE,QAAQ,EAAE,AAACyD,CAAAA,kBAAkBX,MAAMoB,MAAM,AAANA,MAAY,QAAQT,oBAAoB,KAAK,IAAI,KAAK,IAAIA,gBAAgBzD,QAAQ;QAC/KC,cAAcgE,IAAAA,mBAAY,EAAC7E,cAAca,YAAY,EAAE6D,YAAYK,gCAAyB,CAACC,aAAa,IAAI,CAACL,aAAaC,WAAWzB,sBAAsB,GAAGyB,WAAWvB,qBAAqB,EAAE,AAACiB,CAAAA,kBAAkBZ,MAAMoB,MAAM,AAANA,MAAY,QAAQR,oBAAoB,KAAK,IAAI,KAAK,IAAIA,gBAAgBzD,YAAY;QACjTC,iBAAiB+D,IAAAA,mBAAY,EAAC7E,cAAcc,eAAe,EAAE8D,WAAW9D,eAAe,EAAE,AAACyD,CAAAA,kBAAkBb,MAAMoB,MAAM,AAANA,MAAY,QAAQP,oBAAoB,KAAK,IAAI,KAAK,IAAIA,gBAAgBzD,eAAe;IAC/M;AACJ"}
|
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "Legends", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return Legends;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
|
+
const _reactbutton = require("@fluentui/react-button");
|
|
14
|
+
const _shape = require("./shape");
|
|
15
|
+
const _useLegendsStylesstyles = require("./useLegendsStyles.styles");
|
|
16
|
+
const _reactoverflow = require("@fluentui/react-overflow");
|
|
17
|
+
const _reacttabster = require("@fluentui/react-tabster");
|
|
18
|
+
const _OverflowMenu = require("./OverflowMenu");
|
|
19
|
+
const _reacttheme = require("@fluentui/react-theme");
|
|
20
|
+
const Legends = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
|
|
21
|
+
/** Boolean variable to check if one or more legends are selected */ let _isLegendSelected = false;
|
|
22
|
+
// set states separately for each instance of the component
|
|
23
|
+
const [activeLegend, setActiveLegend] = _react.useState('');
|
|
24
|
+
const [selectedLegends, setSelectedLegends] = _react.useState({});
|
|
25
|
+
const focusAttributes = (0, _reacttabster.useFocusableGroup)();
|
|
26
|
+
const arrowAttributes = (0, _reacttabster.useArrowNavigationGroup)({
|
|
27
|
+
axis: 'horizontal',
|
|
28
|
+
memorizeCurrent: true
|
|
29
|
+
});
|
|
30
|
+
_react.useEffect(()=>{
|
|
31
|
+
let defaultSelectedLegends = {};
|
|
32
|
+
if (props.canSelectMultipleLegends) {
|
|
33
|
+
var _props_defaultSelectedLegends;
|
|
34
|
+
defaultSelectedLegends = ((_props_defaultSelectedLegends = props.defaultSelectedLegends) === null || _props_defaultSelectedLegends === void 0 ? void 0 : _props_defaultSelectedLegends.reduce((combinedDict, key)=>({
|
|
35
|
+
[key]: true,
|
|
36
|
+
...combinedDict
|
|
37
|
+
}), {})) || {};
|
|
38
|
+
} else if (props.defaultSelectedLegend) {
|
|
39
|
+
defaultSelectedLegends = {
|
|
40
|
+
[props.defaultSelectedLegend]: true
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
setSelectedLegends(defaultSelectedLegends);
|
|
44
|
+
}, [
|
|
45
|
+
props.canSelectMultipleLegends,
|
|
46
|
+
props.defaultSelectedLegend,
|
|
47
|
+
props.defaultSelectedLegends
|
|
48
|
+
]);
|
|
49
|
+
_isLegendSelected = Object.keys(selectedLegends).length > 0;
|
|
50
|
+
const dataToRender = _generateData();
|
|
51
|
+
const { overflowStyles, allowFocusOnLegends = true, canSelectMultipleLegends = false } = props;
|
|
52
|
+
const classes = (0, _useLegendsStylesstyles.useLegendStyles)(props);
|
|
53
|
+
const itemIds = dataToRender.map((_item, index)=>index.toString());
|
|
54
|
+
const overflowHoverCardLegends = [];
|
|
55
|
+
props.legends.map((legend, index)=>{
|
|
56
|
+
const hoverCardElement = _renderButton(legend, index);
|
|
57
|
+
overflowHoverCardLegends.push(hoverCardElement);
|
|
58
|
+
});
|
|
59
|
+
const overflowString = props.overflowText ? props.overflowText : 'more';
|
|
60
|
+
return props.enabledWrapLines ? renderWrappedLegends() : renderLegends();
|
|
61
|
+
function renderLegends() {
|
|
62
|
+
return /*#__PURE__*/ _react.createElement("div", {
|
|
63
|
+
...focusAttributes,
|
|
64
|
+
...arrowAttributes,
|
|
65
|
+
...allowFocusOnLegends && {
|
|
66
|
+
role: 'listbox',
|
|
67
|
+
'aria-label': 'Legends',
|
|
68
|
+
'aria-multiselectable': canSelectMultipleLegends
|
|
69
|
+
},
|
|
70
|
+
className: classes.root
|
|
71
|
+
}, /*#__PURE__*/ _react.createElement(_reactoverflow.Overflow, null, /*#__PURE__*/ _react.createElement("div", {
|
|
72
|
+
className: classes.resizableArea,
|
|
73
|
+
style: {
|
|
74
|
+
textAlign: props.centerLegends ? 'center' : 'unset'
|
|
75
|
+
}
|
|
76
|
+
}, dataToRender.map((item, id)=>/*#__PURE__*/ _react.createElement(_reactoverflow.OverflowItem, {
|
|
77
|
+
key: id,
|
|
78
|
+
id: id.toString()
|
|
79
|
+
}, _renderButton(item))), /*#__PURE__*/ _react.createElement(_OverflowMenu.OverflowMenu, {
|
|
80
|
+
itemIds: itemIds,
|
|
81
|
+
title: `${overflowString}`,
|
|
82
|
+
items: overflowHoverCardLegends
|
|
83
|
+
}))));
|
|
84
|
+
}
|
|
85
|
+
function renderWrappedLegends() {
|
|
86
|
+
return /*#__PURE__*/ _react.createElement("div", {
|
|
87
|
+
...focusAttributes,
|
|
88
|
+
...arrowAttributes,
|
|
89
|
+
...allowFocusOnLegends && {
|
|
90
|
+
role: 'listbox',
|
|
91
|
+
'aria-label': 'Legends',
|
|
92
|
+
'aria-multiselectable': canSelectMultipleLegends
|
|
93
|
+
},
|
|
94
|
+
style: {
|
|
95
|
+
justifyContent: props.centerLegends ? 'center' : 'unset',
|
|
96
|
+
flexWrap: 'wrap',
|
|
97
|
+
...overflowStyles
|
|
98
|
+
},
|
|
99
|
+
className: classes.root
|
|
100
|
+
}, /*#__PURE__*/ _react.createElement("div", {
|
|
101
|
+
className: classes.resizableArea,
|
|
102
|
+
style: {
|
|
103
|
+
display: 'flex',
|
|
104
|
+
flexWrap: 'wrap',
|
|
105
|
+
overflow: 'auto'
|
|
106
|
+
}
|
|
107
|
+
}, dataToRender.map((item, id)=>/*#__PURE__*/ _react.createElement("div", {
|
|
108
|
+
key: id,
|
|
109
|
+
style: {
|
|
110
|
+
flex: '0 1 auto',
|
|
111
|
+
margin: '4px'
|
|
112
|
+
}
|
|
113
|
+
}, _renderButton(item)))));
|
|
114
|
+
}
|
|
115
|
+
function _generateData() {
|
|
116
|
+
const { shape } = props;
|
|
117
|
+
const dataItems = props.legends.map((legend, index)=>{
|
|
118
|
+
return {
|
|
119
|
+
/* ...(allowFocusOnLegends && {
|
|
120
|
+
nativeButtonProps: getIntrinsicElementProps(
|
|
121
|
+
'div',
|
|
122
|
+
{
|
|
123
|
+
legend,
|
|
124
|
+
...buttonProperties,
|
|
125
|
+
},
|
|
126
|
+
['title'],
|
|
127
|
+
),
|
|
128
|
+
'aria-setsize': props.legends.length,
|
|
129
|
+
'aria-posinset': index + 1,
|
|
130
|
+
}), */ title: legend.title,
|
|
131
|
+
action: legend.action,
|
|
132
|
+
hoverAction: legend.hoverAction,
|
|
133
|
+
onMouseOutAction: legend.onMouseOutAction,
|
|
134
|
+
color: legend.color,
|
|
135
|
+
shape: shape ? shape : legend.shape,
|
|
136
|
+
stripePattern: legend.stripePattern,
|
|
137
|
+
isLineLegendInBarChart: legend.isLineLegendInBarChart,
|
|
138
|
+
opacity: legend.opacity,
|
|
139
|
+
key: index
|
|
140
|
+
};
|
|
141
|
+
});
|
|
142
|
+
return dataItems;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* This function will get called when there is an ability to
|
|
146
|
+
* select multiple legends
|
|
147
|
+
* @param legend ILegend
|
|
148
|
+
*/ function _canSelectMultipleLegends(legend) {
|
|
149
|
+
let legendsSelected = {
|
|
150
|
+
...selectedLegends
|
|
151
|
+
};
|
|
152
|
+
if (legendsSelected[legend.title]) {
|
|
153
|
+
// Delete entry for the deselected legend to make
|
|
154
|
+
// the number of keys equal to the number of selected legends
|
|
155
|
+
delete legendsSelected[legend.title];
|
|
156
|
+
} else {
|
|
157
|
+
legendsSelected[legend.title] = true;
|
|
158
|
+
// Clear set if all legends are selected
|
|
159
|
+
if (Object.keys(legendsSelected).length === props.legends.length) {
|
|
160
|
+
legendsSelected = {};
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
setSelectedLegends(legendsSelected);
|
|
164
|
+
return legendsSelected;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* This function will get called when there is
|
|
168
|
+
* ability to select only single legend
|
|
169
|
+
* @param legend ILegend
|
|
170
|
+
*/ function _canSelectOnlySingleLegend(legend) {
|
|
171
|
+
if (selectedLegends[legend.title]) {
|
|
172
|
+
setSelectedLegends({});
|
|
173
|
+
return false;
|
|
174
|
+
} else {
|
|
175
|
+
setSelectedLegends({
|
|
176
|
+
[legend.title]: true
|
|
177
|
+
});
|
|
178
|
+
return true;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
function _onClick(legend, event) {
|
|
182
|
+
var _props_onChange, _legend_action;
|
|
183
|
+
const { canSelectMultipleLegends = false } = props;
|
|
184
|
+
let selectedLegends = [];
|
|
185
|
+
if (canSelectMultipleLegends) {
|
|
186
|
+
const nextSelectedLegends = _canSelectMultipleLegends(legend);
|
|
187
|
+
selectedLegends = Object.keys(nextSelectedLegends);
|
|
188
|
+
} else {
|
|
189
|
+
const isSelected = _canSelectOnlySingleLegend(legend);
|
|
190
|
+
selectedLegends = isSelected ? [
|
|
191
|
+
legend.title
|
|
192
|
+
] : [];
|
|
193
|
+
}
|
|
194
|
+
(_props_onChange = props.onChange) === null || _props_onChange === void 0 ? void 0 : _props_onChange.call(props, selectedLegends, event, legend);
|
|
195
|
+
(_legend_action = legend.action) === null || _legend_action === void 0 ? void 0 : _legend_action.call(legend);
|
|
196
|
+
}
|
|
197
|
+
function _onHoverOverLegend(legend) {
|
|
198
|
+
if (legend.hoverAction) {
|
|
199
|
+
setActiveLegend(legend.title);
|
|
200
|
+
legend.hoverAction();
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
function _onLeave(legend) {
|
|
204
|
+
if (legend.onMouseOutAction) {
|
|
205
|
+
setActiveLegend('');
|
|
206
|
+
legend.onMouseOutAction();
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
210
|
+
function _renderButton(data, index) {
|
|
211
|
+
const { allowFocusOnLegends = true } = props;
|
|
212
|
+
const legend = {
|
|
213
|
+
title: data.title,
|
|
214
|
+
color: data.color,
|
|
215
|
+
shape: data.shape,
|
|
216
|
+
action: data.action,
|
|
217
|
+
hoverAction: data.hoverAction,
|
|
218
|
+
onMouseOutAction: data.onMouseOutAction,
|
|
219
|
+
stripePattern: data.stripePattern,
|
|
220
|
+
isLineLegendInBarChart: data.isLineLegendInBarChart,
|
|
221
|
+
opacity: data.opacity
|
|
222
|
+
};
|
|
223
|
+
const color = _getColor(legend.title, legend.color);
|
|
224
|
+
const onClickHandler = (event)=>{
|
|
225
|
+
_onClick(legend, event);
|
|
226
|
+
};
|
|
227
|
+
const onHoverHandler = ()=>{
|
|
228
|
+
_onHoverOverLegend(legend);
|
|
229
|
+
};
|
|
230
|
+
const onMouseOut = ()=>{
|
|
231
|
+
_onLeave(legend);
|
|
232
|
+
};
|
|
233
|
+
const shape = _getShape(legend, color);
|
|
234
|
+
return /*#__PURE__*/ _react.createElement(_reactbutton.Button, {
|
|
235
|
+
...allowFocusOnLegends && {
|
|
236
|
+
'aria-selected': !!selectedLegends[legend.title],
|
|
237
|
+
role: 'option',
|
|
238
|
+
'aria-label': `${legend.title}`,
|
|
239
|
+
'aria-setsize': data['aria-setsize'],
|
|
240
|
+
'aria-posinset': data['aria-posinset']
|
|
241
|
+
},
|
|
242
|
+
...data.nativeButtonProps && {
|
|
243
|
+
...data.nativeButtonProps
|
|
244
|
+
},
|
|
245
|
+
key: index,
|
|
246
|
+
className: classes.legend,
|
|
247
|
+
onClick: onClickHandler,
|
|
248
|
+
onMouseOver: onHoverHandler,
|
|
249
|
+
onMouseOut: onMouseOut,
|
|
250
|
+
onFocus: onHoverHandler,
|
|
251
|
+
onBlur: onMouseOut,
|
|
252
|
+
appearance: 'outline',
|
|
253
|
+
size: "small",
|
|
254
|
+
style: {
|
|
255
|
+
'--rect-height': legend.isLineLegendInBarChart ? '4px' : '12px',
|
|
256
|
+
'--rect-backgroundColor': legend.stripePattern ? '' : color,
|
|
257
|
+
'--rect-borderColor': legend.color ? legend.color : _reacttheme.tokens.colorNeutralStroke1,
|
|
258
|
+
'--rect-content': legend.stripePattern ? `repeating-linear-gradient(135deg, transparent, transparent 3px, ${color} 1px, ${color} 4px)` : ''
|
|
259
|
+
}
|
|
260
|
+
}, shape, /*#__PURE__*/ _react.createElement("div", {
|
|
261
|
+
className: classes.text,
|
|
262
|
+
style: {
|
|
263
|
+
opacity: color === _reacttheme.tokens.colorNeutralBackground1 ? '0.67' : ''
|
|
264
|
+
}
|
|
265
|
+
}, legend.title));
|
|
266
|
+
}
|
|
267
|
+
function _getShape(legend, color) {
|
|
268
|
+
const svgParentProps = {
|
|
269
|
+
className: classes.shape
|
|
270
|
+
};
|
|
271
|
+
const svgChildProps = {
|
|
272
|
+
fill: color,
|
|
273
|
+
strokeWidth: 2,
|
|
274
|
+
stroke: legend.color
|
|
275
|
+
};
|
|
276
|
+
return /*#__PURE__*/ _react.createElement(_shape.Shape, {
|
|
277
|
+
svgProps: svgParentProps,
|
|
278
|
+
pathProps: svgChildProps,
|
|
279
|
+
shape: legend.shape,
|
|
280
|
+
classNameForNonSvg: classes.rect,
|
|
281
|
+
style: {
|
|
282
|
+
height: legend.isLineLegendInBarChart ? '4px' : '12px',
|
|
283
|
+
backgroundColor: legend.stripePattern ? '' : color,
|
|
284
|
+
borderColor: legend.color ? legend.color : _reacttheme.tokens.colorNeutralStroke1,
|
|
285
|
+
content: legend.stripePattern ? `repeating-linear-gradient(135deg, transparent, transparent 3px, ${color} 1px, ${color} 4px)` : '',
|
|
286
|
+
'--rect-content-high-contrast': `linear-gradient(to right, ${color}, ${color})`,
|
|
287
|
+
'--rect-opacity-high-contrast': color === _reacttheme.tokens.colorNeutralBackground1 ? '0.6' : ''
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
function _getColor(title, color) {
|
|
292
|
+
let legendColor = color;
|
|
293
|
+
// if one or more legends are selected
|
|
294
|
+
if (_isLegendSelected) {
|
|
295
|
+
// if the given legend (title) is one of the selected legends
|
|
296
|
+
if (selectedLegends[title]) {
|
|
297
|
+
legendColor = color;
|
|
298
|
+
} else {
|
|
299
|
+
legendColor = _reacttheme.tokens.colorNeutralBackground1;
|
|
300
|
+
}
|
|
301
|
+
} else {
|
|
302
|
+
// if the given legend is hovered
|
|
303
|
+
// or none of the legends is hovered
|
|
304
|
+
if (activeLegend === title || activeLegend === '') {
|
|
305
|
+
legendColor = color;
|
|
306
|
+
} else {
|
|
307
|
+
legendColor = _reacttheme.tokens.colorNeutralBackground1;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
return legendColor;
|
|
311
|
+
}
|
|
312
|
+
});
|
|
313
|
+
Legends.displayName = 'Legends';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["Legends.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { Button } from '@fluentui/react-button';\nimport { Legend, LegendsProps, LegendShape } from './Legends.types';\nimport { Shape } from './shape';\nimport { useLegendStyles } from './useLegendsStyles.styles';\nimport { Overflow, OverflowItem } from '@fluentui/react-overflow';\nimport { useFocusableGroup, useArrowNavigationGroup } from '@fluentui/react-tabster';\nimport { OverflowMenu } from './OverflowMenu';\nimport { tokens } from '@fluentui/react-theme';\n\n// This is an internal interface used for rendering the legends with unique key\ninterface LegendItem extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n name?: string;\n title: string;\n action: VoidFunction;\n hoverAction: VoidFunction;\n onMouseOutAction: VoidFunction;\n color: string;\n shape?: LegendShape;\n key: number;\n opacity?: number;\n stripePattern?: boolean;\n isLineLegendInBarChart?: boolean;\n}\n\ninterface LegendMap {\n [key: string]: boolean;\n}\n\nexport interface LegendState {\n activeLegend: string;\n /** Set of legends selected, both for multiple selection and single selection */\n selectedLegends: LegendMap;\n}\nexport const Legends: React.FunctionComponent<LegendsProps> = React.forwardRef<HTMLDivElement, LegendsProps>(\n (props, forwardedRef) => {\n /** Boolean variable to check if one or more legends are selected */\n let _isLegendSelected = false;\n\n // set states separately for each instance of the component\n const [activeLegend, setActiveLegend] = React.useState('');\n const [selectedLegends, setSelectedLegends] = React.useState<LegendMap>({});\n const focusAttributes = useFocusableGroup();\n const arrowAttributes = useArrowNavigationGroup({ axis: 'horizontal', memorizeCurrent: true });\n\n React.useEffect(() => {\n let defaultSelectedLegends = {};\n if (props.canSelectMultipleLegends) {\n defaultSelectedLegends =\n props.defaultSelectedLegends?.reduce((combinedDict, key) => ({ [key]: true, ...combinedDict }), {}) || {};\n } else if (props.defaultSelectedLegend) {\n defaultSelectedLegends = { [props.defaultSelectedLegend]: true };\n }\n\n setSelectedLegends(defaultSelectedLegends);\n }, [props.canSelectMultipleLegends, props.defaultSelectedLegend, props.defaultSelectedLegends]);\n\n _isLegendSelected = Object.keys(selectedLegends).length > 0;\n const dataToRender = _generateData();\n const { overflowStyles, allowFocusOnLegends = true, canSelectMultipleLegends = false } = props;\n const classes = useLegendStyles(props);\n const itemIds = dataToRender.map((_item, index) => index.toString());\n const overflowHoverCardLegends: JSX.Element[] = [];\n props.legends.map((legend, index) => {\n const hoverCardElement = _renderButton(legend, index);\n overflowHoverCardLegends.push(hoverCardElement);\n });\n const overflowString = props.overflowText ? props.overflowText : 'more';\n return props.enabledWrapLines ? renderWrappedLegends() : renderLegends();\n\n function renderLegends(): JSX.Element {\n return (\n <div\n {...focusAttributes}\n {...arrowAttributes}\n {...(allowFocusOnLegends && {\n role: 'listbox',\n 'aria-label': 'Legends',\n 'aria-multiselectable': canSelectMultipleLegends,\n })}\n className={classes.root}\n >\n <Overflow>\n <div className={classes.resizableArea} style={{ textAlign: props.centerLegends ? 'center' : 'unset' }}>\n {dataToRender.map((item, id) => (\n <OverflowItem key={id} id={id.toString()}>\n {_renderButton(item)}\n </OverflowItem>\n ))}\n <OverflowMenu itemIds={itemIds} title={`${overflowString}`} items={overflowHoverCardLegends} />\n </div>\n </Overflow>\n </div>\n );\n }\n\n function renderWrappedLegends(): JSX.Element {\n return (\n <div\n {...focusAttributes}\n {...arrowAttributes}\n {...(allowFocusOnLegends && {\n role: 'listbox',\n 'aria-label': 'Legends',\n 'aria-multiselectable': canSelectMultipleLegends,\n })}\n style={{ justifyContent: props.centerLegends ? 'center' : 'unset', flexWrap: 'wrap', ...overflowStyles }}\n className={classes.root}\n >\n <div className={classes.resizableArea} style={{ display: 'flex', flexWrap: 'wrap', overflow: 'auto' }}>\n {dataToRender.map((item, id) => (\n <div key={id} style={{ flex: '0 1 auto', margin: '4px' }}>\n {_renderButton(item)}\n </div>\n ))}\n </div>\n </div>\n );\n }\n\n function _generateData(): LegendItem[] {\n const { /*allowFocusOnLegends = true,*/ shape } = props;\n const dataItems: LegendItem[] = props.legends.map((legend: Legend, index: number) => {\n return {\n /* ...(allowFocusOnLegends && {\n nativeButtonProps: getIntrinsicElementProps(\n 'div',\n {\n legend,\n ...buttonProperties,\n },\n ['title'],\n ),\n 'aria-setsize': props.legends.length,\n 'aria-posinset': index + 1,\n }), */\n title: legend.title,\n action: legend.action!,\n hoverAction: legend.hoverAction!,\n onMouseOutAction: legend.onMouseOutAction!,\n color: legend.color,\n shape: shape ? shape : legend.shape,\n stripePattern: legend.stripePattern,\n isLineLegendInBarChart: legend.isLineLegendInBarChart,\n opacity: legend.opacity,\n key: index,\n };\n });\n return dataItems;\n }\n\n /**\n * This function will get called when there is an ability to\n * select multiple legends\n * @param legend ILegend\n */\n function _canSelectMultipleLegends(legend: Legend): { [key: string]: boolean } {\n let legendsSelected = { ...selectedLegends };\n if (legendsSelected[legend.title]) {\n // Delete entry for the deselected legend to make\n // the number of keys equal to the number of selected legends\n delete legendsSelected[legend.title];\n } else {\n legendsSelected[legend.title] = true;\n // Clear set if all legends are selected\n if (Object.keys(legendsSelected).length === props.legends.length) {\n legendsSelected = {};\n }\n }\n setSelectedLegends(legendsSelected);\n return legendsSelected;\n }\n\n /**\n * This function will get called when there is\n * ability to select only single legend\n * @param legend ILegend\n */\n\n function _canSelectOnlySingleLegend(legend: Legend): boolean {\n if (selectedLegends[legend.title]) {\n setSelectedLegends({});\n return false;\n } else {\n setSelectedLegends({ [legend.title]: true });\n return true;\n }\n }\n\n function _onClick(legend: Legend, event: React.MouseEvent<HTMLButtonElement>): void {\n const { canSelectMultipleLegends = false } = props;\n let selectedLegends: string[] = [];\n if (canSelectMultipleLegends) {\n const nextSelectedLegends = _canSelectMultipleLegends(legend);\n selectedLegends = Object.keys(nextSelectedLegends);\n } else {\n const isSelected = _canSelectOnlySingleLegend(legend);\n selectedLegends = isSelected ? [legend.title] : [];\n }\n props.onChange?.(selectedLegends, event, legend);\n legend.action?.();\n }\n\n function _onHoverOverLegend(legend: Legend) {\n if (legend.hoverAction) {\n setActiveLegend(legend.title);\n legend.hoverAction();\n }\n }\n\n function _onLeave(legend: Legend) {\n if (legend.onMouseOutAction) {\n setActiveLegend('');\n legend.onMouseOutAction();\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function _renderButton(data: any, index?: number) {\n const { allowFocusOnLegends = true } = props;\n const legend: Legend = {\n title: data.title,\n color: data.color,\n shape: data.shape,\n action: data.action,\n hoverAction: data.hoverAction,\n onMouseOutAction: data.onMouseOutAction,\n stripePattern: data.stripePattern,\n isLineLegendInBarChart: data.isLineLegendInBarChart,\n opacity: data.opacity,\n };\n const color = _getColor(legend.title, legend.color);\n const onClickHandler = (event: React.MouseEvent<HTMLButtonElement>) => {\n _onClick(legend, event);\n };\n const onHoverHandler = () => {\n _onHoverOverLegend(legend);\n };\n const onMouseOut = () => {\n _onLeave(legend);\n };\n const shape = _getShape(legend, color);\n return (\n <Button\n {...(allowFocusOnLegends && {\n 'aria-selected': !!selectedLegends[legend.title],\n role: 'option',\n 'aria-label': `${legend.title}`,\n 'aria-setsize': data['aria-setsize'],\n 'aria-posinset': data['aria-posinset'],\n })}\n {...(data.nativeButtonProps && { ...data.nativeButtonProps })}\n key={index}\n className={classes.legend}\n onClick={onClickHandler}\n onMouseOver={onHoverHandler}\n onMouseOut={onMouseOut}\n onFocus={onHoverHandler}\n onBlur={onMouseOut}\n appearance={'outline'}\n size=\"small\"\n style={{\n '--rect-height': legend.isLineLegendInBarChart ? '4px' : '12px',\n '--rect-backgroundColor': legend.stripePattern ? '' : color,\n '--rect-borderColor': legend.color ? legend.color : tokens.colorNeutralStroke1,\n '--rect-content': legend.stripePattern\n ? // eslint-disable-next-line @fluentui/max-len\n `repeating-linear-gradient(135deg, transparent, transparent 3px, ${color} 1px, ${color} 4px)`\n : '',\n }} /* eslint-enable react/jsx-no-bind */\n >\n {shape}\n <div className={classes.text} style={{ opacity: color === tokens.colorNeutralBackground1 ? '0.67' : '' }}>\n {legend.title}\n </div>\n </Button>\n );\n }\n\n function _getShape(legend: Legend, color: string): React.ReactNode | string {\n const svgParentProps: React.SVGAttributes<SVGElement> = {\n className: classes.shape,\n };\n const svgChildProps: React.SVGAttributes<SVGElement> = {\n fill: color,\n strokeWidth: 2,\n stroke: legend.color,\n };\n return (\n <Shape\n svgProps={svgParentProps}\n pathProps={svgChildProps}\n shape={legend.shape as LegendShape}\n classNameForNonSvg={classes.rect}\n style={\n {\n height: legend.isLineLegendInBarChart ? '4px' : '12px',\n backgroundColor: legend.stripePattern ? '' : color,\n borderColor: legend.color ? legend.color : tokens.colorNeutralStroke1,\n content: legend.stripePattern\n ? // eslint-disable-next-line @fluentui/max-len\n `repeating-linear-gradient(135deg, transparent, transparent 3px, ${color} 1px, ${color} 4px)`\n : '',\n '--rect-content-high-contrast': `linear-gradient(to right, ${color}, ${color})`,\n '--rect-opacity-high-contrast': color === tokens.colorNeutralBackground1 ? '0.6' : '',\n } as React.CSSProperties\n }\n />\n );\n }\n\n function _getColor(title: string, color: string): string {\n let legendColor = color;\n // if one or more legends are selected\n if (_isLegendSelected) {\n // if the given legend (title) is one of the selected legends\n if (selectedLegends[title]) {\n legendColor = color;\n }\n // if the given legend is unselected\n else {\n legendColor = tokens.colorNeutralBackground1;\n }\n }\n // if no legend is selected\n else {\n // if the given legend is hovered\n // or none of the legends is hovered\n if (activeLegend === title || activeLegend === '') {\n legendColor = color;\n }\n // if there is a hovered legend but the given legend is not the one\n else {\n legendColor = tokens.colorNeutralBackground1;\n }\n }\n return legendColor;\n }\n },\n);\nLegends.displayName = 'Legends';\n"],"names":["Legends","React","forwardRef","props","forwardedRef","_isLegendSelected","activeLegend","setActiveLegend","useState","selectedLegends","setSelectedLegends","focusAttributes","useFocusableGroup","arrowAttributes","useArrowNavigationGroup","axis","memorizeCurrent","useEffect","defaultSelectedLegends","canSelectMultipleLegends","reduce","combinedDict","key","defaultSelectedLegend","Object","keys","length","dataToRender","_generateData","overflowStyles","allowFocusOnLegends","classes","useLegendStyles","itemIds","map","_item","index","toString","overflowHoverCardLegends","legends","legend","hoverCardElement","_renderButton","push","overflowString","overflowText","enabledWrapLines","renderWrappedLegends","renderLegends","createElement","div","role","className","root","Overflow","resizableArea","style","textAlign","centerLegends","item","id","OverflowItem","OverflowMenu","title","items","justifyContent","flexWrap","display","overflow","flex","margin","shape","dataItems","action","hoverAction","onMouseOutAction","color","stripePattern","isLineLegendInBarChart","opacity","_canSelectMultipleLegends","legendsSelected","_canSelectOnlySingleLegend","_onClick","event","nextSelectedLegends","isSelected","onChange","_onHoverOverLegend","_onLeave","data","_getColor","onClickHandler","onHoverHandler","onMouseOut","_getShape","Button","nativeButtonProps","onClick","onMouseOver","onFocus","onBlur","appearance","size","tokens","colorNeutralStroke1","text","colorNeutralBackground1","svgParentProps","svgChildProps","fill","strokeWidth","stroke","Shape","svgProps","pathProps","classNameForNonSvg","rect","height","backgroundColor","borderColor","content","legendColor","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAmCaA;;;eAAAA;;;;iEAnCU;6BAEA;uBAED;wCACU;+BACO;8BACoB;8BAC9B;4BACN;AA0BhB,MAAMA,UAAAA,WAAAA,GAAiDC,OAAMC,UAAU,CAC5E,CAACC,OAAOC;IACN,kEAAkE,GAClE,IAAIC,oBAAoB;IAExB,2DAA2D;IAC3D,MAAM,CAACC,cAAcC,gBAAgB,GAAGN,OAAMO,QAAQ,CAAC;IACvD,MAAM,CAACC,iBAAiBC,mBAAmB,GAAGT,OAAMO,QAAQ,CAAY,CAAC;IACzE,MAAMG,kBAAkBC,IAAAA,+BAAAA;IACxB,MAAMC,kBAAkBC,IAAAA,qCAAAA,EAAwB;QAAEC,MAAM;QAAcC,iBAAiB;IAAK;IAE5Ff,OAAMgB,SA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