@redsift/charts 11.6.0 → 11.7.0-muiv5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -112,10 +112,7 @@ declare const Axis: Comp<AxisProps, SVGGElement>;
112
112
  /**
113
113
  * Component style.
114
114
  */
115
- declare const StyledAxis: styled_components.StyledComponent<_react_spring_web.AnimatedComponent<"g">, any, Omit<AxisProps, "size" | "scale" | "areXLabelsRotated"> & {
116
- $theme: Theme;
117
- $color?: string | undefined;
118
- }, never>;
115
+ declare const StyledAxis: styled_components.StyledComponent<_react_spring_web.AnimatedComponent<"g">, any, StyledAxisProps, never>;
119
116
 
120
117
  type ChartAxesProps = {
121
118
  /** String to Date. */
@@ -422,8 +419,8 @@ declare const successDangerScheme: {
422
419
  };
423
420
  declare const getColorScale: ({ colorTheme, domain, isEmpty, theme, }: {
424
421
  colorTheme: ChartTheme;
425
- domain?: string[] | undefined;
426
- isEmpty?: boolean | undefined;
422
+ domain?: string[];
423
+ isEmpty?: boolean;
427
424
  theme: Theme;
428
425
  }) => ScaleOrdinal<string, string>;
429
426
 
@@ -486,9 +483,7 @@ declare const DataPoint: Comp<DataPointProps<any>, SVGGElement>;
486
483
  /**
487
484
  * Component style.
488
485
  */
489
- declare const StyledDataPoint: styled_components.StyledComponent<_react_spring_web.AnimatedComponent<"g">, any, Omit<DataPointProps<any>, "data" | "dataset"> & {
490
- $clickable: boolean;
491
- }, never>;
486
+ declare const StyledDataPoint: styled_components.StyledComponent<_react_spring_web.AnimatedComponent<"g">, any, StyledDataPointProps, never>;
492
487
 
493
488
  /**
494
489
  * Component props.
@@ -509,12 +504,7 @@ declare const Arc: Comp<ArcProps, SVGGElement>;
509
504
  /**
510
505
  * Component style.
511
506
  */
512
- declare const StyledArc: styled_components.StyledComponent<_redsift_design_system.Comp<DataPointProps<any>, SVGGElement>, any, Omit<DataPointProps<any>, "data" | "dataset"> & {
513
- $clickable: boolean;
514
- } & Omit<ArcProps, "createArc"> & {
515
- $hasStroke: boolean | undefined;
516
- $theme: Theme;
517
- }, never>;
507
+ declare const StyledArc: styled_components.StyledComponent<_redsift_design_system.Comp<DataPointProps<any>, SVGGElement>, any, StyledArcProps, never>;
518
508
 
519
509
  /**
520
510
  * Component props.
@@ -581,11 +571,7 @@ declare const Bar: Comp<BarProps, SVGGElement>;
581
571
  /**
582
572
  * Component style.
583
573
  */
584
- declare const StyledBar: styled_components.StyledComponent<_redsift_design_system.Comp<DataPointProps<any>, SVGGElement>, any, Omit<DataPointProps<any>, "data" | "dataset"> & {
585
- $clickable: boolean;
586
- } & Omit<BarProps, "scale" | "scalePosition"> & {
587
- $theme: Theme;
588
- }, never>;
574
+ declare const StyledBar: styled_components.StyledComponent<_redsift_design_system.Comp<DataPointProps<any>, SVGGElement>, any, StyledBarProps, never>;
589
575
 
590
576
  /**
591
577
  * Component props.
@@ -638,12 +624,8 @@ declare const ChartContainerDescription: Comp<ComponentProps<'div'>, HTMLDivElem
638
624
  /**
639
625
  * Component style.
640
626
  */
641
- declare const StyledChartContainer: styled_components.StyledComponent<"div", any, Omit<ChartContainerProps, "theme"> & {
642
- $theme: Theme;
643
- }, never>;
644
- declare const StyledChartContainerTitle: styled_components.StyledComponent<_redsift_design_system.Comp<_redsift_design_system.FlexboxProps, HTMLDivElement>, any, Omit<ChartContainerProps, "theme"> & {
645
- $theme: Theme;
646
- }, never>;
627
+ declare const StyledChartContainer: styled_components.StyledComponent<"div", any, StyledChartContainerProps, never>;
628
+ declare const StyledChartContainerTitle: styled_components.StyledComponent<_redsift_design_system.Comp<_redsift_design_system.FlexboxProps, HTMLDivElement>, any, StyledChartContainerProps, never>;
647
629
  declare const StyledChartContainerCaption: styled_components.StyledComponent<"p", any, Omit<StyledChartContainerProps, "onReset">, never>;
648
630
 
649
631
  /**
@@ -702,9 +684,7 @@ declare const Legend: Comp<LegendProps, HTMLUListElement>;
702
684
  /**
703
685
  * Component style.
704
686
  */
705
- declare const StyledLegend: styled_components.StyledComponent<"ul", any, Omit<LegendProps, "data"> & {
706
- $width?: string | number | undefined;
707
- }, never>;
687
+ declare const StyledLegend: styled_components.StyledComponent<"ul", any, StyledLegendProps, never>;
708
688
 
709
689
  type FormatMessage = (key: string, variables?: {
710
690
  [key: string]: any;
@@ -861,6 +841,13 @@ interface BarChartSectionProps extends Omit<ComponentProps<'g'>, 'onClick' | 'ro
861
841
  scaleX?: ScaleLinear$1<number, number, never> | ScaleTime$2<number, number, never> | ScalePoint$2<string>;
862
842
  scaleY?: ScaleLinear$1<number, number, never>;
863
843
  direction?: BarDirection;
844
+ /** Regions for highlighting a specific area by changing the background color. Only works with datestrings for X axis. */
845
+ regions?: {
846
+ from: string;
847
+ to: string;
848
+ color: string;
849
+ opacity?: number;
850
+ }[];
864
851
  }
865
852
  interface StyledBarChartSectionProps {
866
853
  $theme: Theme;
@@ -870,16 +857,22 @@ interface BarChartBarsProps extends Omit<ComponentProps<'g'>, 'onClick' | 'role'
870
857
  category?: string;
871
858
  }
872
859
  type StyledBarChartBarsProps = Omit<BarChartBarsProps, 'category'> & {};
860
+ interface BarChartOverlayProps extends Omit<ComponentProps<'g'>, 'onClick' | 'role'> {
861
+ from?: number;
862
+ to?: number;
863
+ }
864
+ type StyledBarChartOverlayProps = Omit<BarChartOverlayProps, 'category'> & {};
873
865
 
874
866
  declare const BaseBarChart: Comp<BarChartProps, HTMLDivElement>;
875
867
  declare const BarChart: Comp<BarChartProps, HTMLDivElement> & {
876
868
  Section: Comp<BarChartSectionProps, SVGGElement>;
877
869
  Bars: Comp<BarChartBarsProps, SVGGElement>;
870
+ Overlay: Comp<BarChartOverlayProps, SVGGElement>;
878
871
  Axis: Comp<AxisProps, SVGGElement>;
879
872
  GroupedTooltip: React$1.FC<{
880
873
  dateFormatter: (date: Date) => string;
881
874
  categories: string[];
882
- categoryDecorator?: ((category: string) => string) | undefined;
875
+ categoryDecorator?: (category: string) => string;
883
876
  categoryColor: (category: string) => string;
884
877
  datum: BarDatum;
885
878
  groupedData: ComputedBarProps[] | undefined;
@@ -896,6 +889,7 @@ declare const BarChart: Comp<BarChartProps, HTMLDivElement> & {
896
889
  declare const StyledBarChart: styled_components.StyledComponent<_redsift_design_system.Comp<ChartContainerProps, HTMLDivElement>, any, BarChartProps, never>;
897
890
  declare const StyledBarChartSection: styled_components.StyledComponent<"g", any, StyledBarChartSectionProps, never>;
898
891
  declare const StyledBarChartBars: styled_components.StyledComponent<"g", any, Omit<BarChartBarsProps, "category">, never>;
892
+ declare const StyledBarChartOverlay: styled_components.StyledComponent<"g", any, Omit<BarChartBarsProps, "category">, never>;
899
893
  declare const StyledBarChartEmptyText: styled_components.StyledComponent<"div", any, {
900
894
  $maxWidth: number;
901
895
  $textSize: number;
@@ -931,12 +925,7 @@ declare const Dot: Comp<DotProps, SVGGElement>;
931
925
  /**
932
926
  * Component style.
933
927
  */
934
- declare const StyledDot: styled_components.StyledComponent<_redsift_design_system.Comp<DataPointProps<any>, SVGGElement>, any, Omit<DataPointProps<any>, "data" | "dataset"> & {
935
- $clickable: boolean;
936
- } & Omit<DotProps, "scaleX" | "scaleY"> & {
937
- $variant: DotVariant | undefined;
938
- $theme: _redsift_design_system.Theme;
939
- }, never>;
928
+ declare const StyledDot: styled_components.StyledComponent<_redsift_design_system.Comp<DataPointProps<any>, SVGGElement>, any, StyledDotProps, never>;
940
929
 
941
930
  /**
942
931
  * Component props.
@@ -1274,4 +1263,4 @@ declare const StyledScatterPlotEmptyText: styled_components.StyledComponent<"div
1274
1263
  $theme: Theme;
1275
1264
  }, never>;
1276
1265
 
1277
- export { AnchorProps, AnyScale, Arc, ArcDatum, ArcProps, Arcs, ArcsProps, Axis, AxisPosition, AxisProps, AxisVariant, Bar, BarChart, BarChartBarsProps, BarChartDimensions, BarChartLegendVariant, BarChartProps, BarChartSectionProps, BarChartState, BarDatum, BarDirection, BarOrientation, BarProps, BaseBarChart, CategoricalOrLinearDim, CategoryData, CategoryDatum, CategoryDim, ChartAxesProps, ChartContainer, ChartContainerDescription, ChartContainerProps, ChartContainerTitle, ChartDimensions, ChartSize, ChartTheme, ColorTheme, ComputedBarProps, Coordinates, CoordinatesCategoryData, CoordinatesCategoryDatum, CoordinatesCategoryDim, CustomColorTheme, DataPoint, DataPointProps, Datum, Dot, DotDatum, DotProps, DotVariant, EmptyDatum, JSONArray, JSONObject, JSONValue, LabelVariant, Legend, LegendItemDatum, LegendProps, LegendVariant, Line, LineChart, LineChartDimensions, LineChartLegendVariant, LineChartProps, LinePointDatum, LineProps, LinearData, LinearDatum, LinearDim, MarginProps, NumericValue, PieChart, PieChartDimensions, PieChartLegendVariant, PieChartProps, PieChartVariant, RenderedLinearBarChartProps, Scale, ScaleBand, ScaleLinear, ScaleLog, ScalePoint, ScaleSymlog, ScaleTime, ScaleTypeToScale, ScaleValue, ScaleWithBandwidth, ScatterPlot, ScatterPlotDimensions, ScatterPlotLegendVariant, ScatterPlotProps, ScatterPlotVariant, SortingMethod, Statistic, Statistics, StringValue, StyledArc, StyledArcProps, StyledArcs, StyledArcsProps, StyledAxis, StyledAxisProps, StyledBar, StyledBarChart, StyledBarChartBars, StyledBarChartBarsProps, StyledBarChartEmptyText, StyledBarChartProps, StyledBarChartSection, StyledBarChartSectionProps, StyledBarProps, StyledChartContainer, StyledChartContainerCaption, StyledChartContainerProps, StyledChartContainerTitle, StyledDataPoint, StyledDataPointProps, StyledDot, StyledDotProps, StyledLegend, StyledLegendProps, StyledLine, StyledLineChart, StyledLineChartEmptyText, StyledLineChartProps, StyledLineProps, StyledPieChart, StyledPieChartCenterText, StyledPieChartEmptyText, StyledPieChartProps, StyledScatterPlot, StyledScatterPlotEmptyText, StyledScatterPlotProps, SuccessDangerColorTheme, TicksSpec, TooltipVariant, TwoCategoryData, TwoCategoryDatum, TwoCategoryDim, UseBrushProps, UseColorProps, UseFormatCategoricalDataProps, UseZoomProps, XScaleType, empty, getAxisType, getColorScale, getSortingMethod, isValidDate, mergeLegends, monochrome, scheme, successDangerScheme, useBrush, useColor, useFormatCategoricalData, useZoom };
1266
+ export { AnchorProps, AnyScale, Arc, ArcDatum, ArcProps, Arcs, ArcsProps, Axis, AxisPosition, AxisProps, AxisVariant, Bar, BarChart, BarChartBarsProps, BarChartDimensions, BarChartLegendVariant, BarChartOverlayProps, BarChartProps, BarChartSectionProps, BarChartState, BarDatum, BarDirection, BarOrientation, BarProps, BaseBarChart, CategoricalOrLinearDim, CategoryData, CategoryDatum, CategoryDim, ChartAxesProps, ChartContainer, ChartContainerDescription, ChartContainerProps, ChartContainerTitle, ChartDimensions, ChartSize, ChartTheme, ColorTheme, ComputedBarProps, Coordinates, CoordinatesCategoryData, CoordinatesCategoryDatum, CoordinatesCategoryDim, CustomColorTheme, DataPoint, DataPointProps, Datum, Dot, DotDatum, DotProps, DotVariant, EmptyDatum, JSONArray, JSONObject, JSONValue, LabelVariant, Legend, LegendItemDatum, LegendProps, LegendVariant, Line, LineChart, LineChartDimensions, LineChartLegendVariant, LineChartProps, LinePointDatum, LineProps, LinearData, LinearDatum, LinearDim, MarginProps, NumericValue, PieChart, PieChartDimensions, PieChartLegendVariant, PieChartProps, PieChartVariant, RenderedLinearBarChartProps, Scale, ScaleBand, ScaleLinear, ScaleLog, ScalePoint, ScaleSymlog, ScaleTime, ScaleTypeToScale, ScaleValue, ScaleWithBandwidth, ScatterPlot, ScatterPlotDimensions, ScatterPlotLegendVariant, ScatterPlotProps, ScatterPlotVariant, SortingMethod, Statistic, Statistics, StringValue, StyledArc, StyledArcProps, StyledArcs, StyledArcsProps, StyledAxis, StyledAxisProps, StyledBar, StyledBarChart, StyledBarChartBars, StyledBarChartBarsProps, StyledBarChartEmptyText, StyledBarChartOverlay, StyledBarChartOverlayProps, StyledBarChartProps, StyledBarChartSection, StyledBarChartSectionProps, StyledBarProps, StyledChartContainer, StyledChartContainerCaption, StyledChartContainerProps, StyledChartContainerTitle, StyledDataPoint, StyledDataPointProps, StyledDot, StyledDotProps, StyledLegend, StyledLegendProps, StyledLine, StyledLineChart, StyledLineChartEmptyText, StyledLineChartProps, StyledLineProps, StyledPieChart, StyledPieChartCenterText, StyledPieChartEmptyText, StyledPieChartProps, StyledScatterPlot, StyledScatterPlotEmptyText, StyledScatterPlotProps, SuccessDangerColorTheme, TicksSpec, TooltipVariant, TwoCategoryData, TwoCategoryDatum, TwoCategoryDim, UseBrushProps, UseColorProps, UseFormatCategoricalDataProps, UseZoomProps, XScaleType, empty, getAxisType, getColorScale, getSortingMethod, isValidDate, mergeLegends, monochrome, scheme, successDangerScheme, useBrush, useColor, useFormatCategoricalData, useZoom };
package/index.js CHANGED
@@ -7,7 +7,7 @@ export { A as Arc, S as StyledArc } from './_internal/Arc2.js';
7
7
  export { A as Arcs, S as StyledArcs } from './_internal/Arcs2.js';
8
8
  export { A as Axis, b as AxisPosition, a as AxisVariant, S as StyledAxis, g as getAxisType } from './_internal/Axis2.js';
9
9
  export { B as Bar, b as BarDirection, a as BarOrientation, S as StyledBar } from './_internal/Bar2.js';
10
- export { a as BarChart, b as BarChartLegendVariant, B as BaseBarChart, S as StyledBarChart, d as StyledBarChartBars, e as StyledBarChartEmptyText, c as StyledBarChartSection } from './_internal/BarChart2.js';
10
+ export { a as BarChart, b as BarChartLegendVariant, B as BaseBarChart, S as StyledBarChart, d as StyledBarChartBars, f as StyledBarChartEmptyText, e as StyledBarChartOverlay, c as StyledBarChartSection } from './_internal/BarChart2.js';
11
11
  export { C as ChartContainer, b as ChartContainerDescription, a as ChartContainerTitle, S as StyledChartContainer, d as StyledChartContainerCaption, c as StyledChartContainerTitle } from './_internal/ChartContainer2.js';
12
12
  export { D as DataPoint, S as StyledDataPoint } from './_internal/DataPoint2.js';
13
13
  export { D as Dot, a as DotVariant, S as StyledDot } from './_internal/Dot2.js';
package/package.json CHANGED
@@ -30,7 +30,7 @@
30
30
  "test": "yarn test:unit && yarn test:storybook"
31
31
  },
32
32
  "types": "types.d.ts",
33
- "version": "11.6.0",
33
+ "version": "11.7.0-muiv5",
34
34
  "dependencies": {
35
35
  "@emotion/react": "^11.10.4",
36
36
  "@emotion/styled": "^11.10.4",
@@ -88,11 +88,11 @@
88
88
  "ts-jest": "^28.0.3"
89
89
  },
90
90
  "peerDependencies": {
91
- "@redsift/design-system": "^11.6.0-0",
92
- "@redsift/popovers": "^11.6.0-0",
91
+ "@redsift/design-system": "^11.7.0-0",
92
+ "@redsift/popovers": "^11.7.0-0",
93
93
  "react": ">=17",
94
94
  "react-dom": ">=17",
95
95
  "styled-components": "^5.3.5"
96
96
  },
97
- "gitHead": "97881c569fe6cb959f4cf6db32155c0e97265c67"
97
+ "gitHead": "e856e8e96da93e98c9fe870a76a502616d8fe65c"
98
98
  }