@redsift/charts 8.0.0-alpha.1 → 8.0.0-alpha.2

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.
Files changed (4) hide show
  1. package/index.d.ts +74 -40
  2. package/index.js +255 -210
  3. package/index.js.map +1 -1
  4. package/package.json +3 -2
package/index.d.ts CHANGED
@@ -247,6 +247,15 @@ type StyledDataPointProps = Omit<DataPointProps<any>, 'data'> & {
247
247
  $clickable: boolean;
248
248
  };
249
249
 
250
+ declare const DataPoint: Comp<DataPointProps<any>, SVGGElement>;
251
+
252
+ /**
253
+ * Component style.
254
+ */
255
+ declare const StyledDataPoint: styled_components.StyledComponent<_react_spring_web.AnimatedComponent<"g">, any, Omit<DataPointProps<any>, "data"> & {
256
+ $clickable: boolean;
257
+ }, never>;
258
+
250
259
  /**
251
260
  * Component props.
252
261
  */
@@ -292,6 +301,15 @@ declare const StyledArcs: styled_components.StyledComponent<"g", any, Omit<ArcsP
292
301
  /**
293
302
  * Component variant.
294
303
  */
304
+ declare const AxisVariant: {
305
+ readonly none: "none";
306
+ readonly line: "line";
307
+ readonly lineTick: "lineTick";
308
+ readonly tick: "tick";
309
+ readonly tickValue: "tickValue";
310
+ readonly default: "default";
311
+ };
312
+ type AxisVariant = ValueOf<typeof AxisVariant>;
295
313
  declare const AxisPosition: {
296
314
  top: string;
297
315
  right: string;
@@ -318,6 +336,8 @@ interface AxisProps extends Omit<ComponentProps<'g'>, 'scale'> {
318
336
  tickRotation?: number;
319
337
  tickSize?: number;
320
338
  tickValues?: TicksSpec;
339
+ /** Variant. */
340
+ variant?: AxisVariant;
321
341
  /** X position. */
322
342
  x?: number;
323
343
  /** Y position. */
@@ -390,35 +410,6 @@ declare const StyledChartContainer: styled_components.StyledComponent<"div", any
390
410
  declare const StyledChartContainerTitle: styled_components.StyledComponent<_redsift_design_system.Comp<_redsift_design_system.FlexboxProps, HTMLDivElement>, any, ChartContainerProps, never>;
391
411
  declare const StyledChartContainerCaption: styled_components.StyledComponent<"p", any, ChartContainerProps, never>;
392
412
 
393
- /**
394
- * Component props.
395
- */
396
- interface LegendProps extends ComponentProps<'ul'> {
397
- /** Data. */
398
- data: (CategoryDatum & {
399
- color: string;
400
- })[];
401
- /** Variant. */
402
- variant?: LabelVariant;
403
- /** Width. */
404
- width?: string;
405
- }
406
- type StyledLegendProps = Omit<LegendProps, 'data'> & {
407
- $width?: LegendProps['width'];
408
- };
409
-
410
- declare const Legend: Comp<LegendProps, HTMLUListElement>;
411
-
412
- /**
413
- * Component style.
414
- */
415
- declare const StyledLegend: styled_components.StyledComponent<"ul", any, Omit<LegendProps, "data"> & {
416
- $width?: string | undefined;
417
- }, never>;
418
- declare const StyledLabel: styled_components.StyledComponent<"li", any, {
419
- $color: string;
420
- }, never>;
421
-
422
413
  interface LocaleText$2 {
423
414
  emptyChartText: string;
424
415
  }
@@ -469,6 +460,55 @@ declare const StyledBarChartEmptyText: styled_components.StyledComponent<"div",
469
460
  $textSize: number;
470
461
  }, never>;
471
462
 
463
+ /**
464
+ * Component props.
465
+ */
466
+ interface DotProps extends DataPointProps<DotDatum> {
467
+ /** A linear continuous scale defined over a numeric domain used to determine the x position based on the coordinates. */
468
+ scaleX: ScaleLinear$1<number, number, never>;
469
+ /** A linear continuous scale defined over a numeric domain used to determine the y position based on the coordinates. */
470
+ scaleY: ScaleLinear$1<number, number, never>;
471
+ }
472
+ type StyledDotProps = StyledDataPointProps & Omit<DotProps, 'scaleX' | 'scaleY'>;
473
+
474
+ declare const Dot: Comp<DotProps, SVGGElement>;
475
+
476
+ /**
477
+ * Component style.
478
+ */
479
+ declare const StyledDot: styled_components.StyledComponent<_redsift_design_system.Comp<DataPointProps<any>, SVGGElement>, any, Omit<DataPointProps<any>, "data"> & {
480
+ $clickable: boolean;
481
+ } & Omit<DotProps, "scaleX" | "scaleY">, never>;
482
+
483
+ /**
484
+ * Component props.
485
+ */
486
+ interface LegendProps extends ComponentProps<'ul'> {
487
+ /** Data. */
488
+ data: (CategoryDatum & {
489
+ color: string;
490
+ })[];
491
+ /** Variant. */
492
+ variant?: LabelVariant;
493
+ /** Width. */
494
+ width?: string;
495
+ }
496
+ type StyledLegendProps = Omit<LegendProps, 'data'> & {
497
+ $width?: LegendProps['width'];
498
+ };
499
+
500
+ declare const Legend: Comp<LegendProps, HTMLUListElement>;
501
+
502
+ /**
503
+ * Component style.
504
+ */
505
+ declare const StyledLegend: styled_components.StyledComponent<"ul", any, Omit<LegendProps, "data"> & {
506
+ $width?: string | undefined;
507
+ }, never>;
508
+ declare const StyledLabel: styled_components.StyledComponent<"li", any, {
509
+ $color: string;
510
+ }, never>;
511
+
472
512
  /**
473
513
  * Component variant.
474
514
  */
@@ -556,16 +596,6 @@ declare const StyledPieChartEmptyText: styled_components.StyledComponent<"div",
556
596
  $isDonut: boolean;
557
597
  }, never>;
558
598
 
559
- /**
560
- * Component props.
561
- */
562
- interface DotProps extends DataPointProps<DotDatum> {
563
- /** A linear continuous scale defined over a numeric domain used to determine the x position based on the coordinates. */
564
- scaleX: ScaleLinear$1<number, number, never>;
565
- /** A linear continuous scale defined over a numeric domain used to determine the y position based on the coordinates. */
566
- scaleY: ScaleLinear$1<number, number, never>;
567
- }
568
-
569
599
  /**
570
600
  * Component variant.
571
601
  */
@@ -626,6 +656,10 @@ interface ScatterPlotProps extends ChartContainerProps {
626
656
  tooltipVariant?: TooltipVariant;
627
657
  /** Variant. */
628
658
  variant?: ScatterPlotVariant;
659
+ /** X axis variant. */
660
+ xAxisVariant?: AxisVariant;
661
+ /** Y axis variant. */
662
+ yAxisVariant?: AxisVariant;
629
663
  }
630
664
  type StyledScatterPlotProps = ScatterPlotProps & {};
631
665
 
@@ -640,4 +674,4 @@ declare const StyledScatterPlotEmptyText: styled_components.StyledComponent<"div
640
674
  $textSize: number;
641
675
  }, never>;
642
676
 
643
- export { AnyScale, Arc, ArcDatum, ArcProps, Arcs, ArcsProps, Axis, AxisPosition, AxisProps, Bar, BarChart, BarChartDimensions, BarChartProps, BarDatum, BarOrientation, BarProps, CategoryData, CategoryDatum, CategoryDim, ChartContainer, ChartContainerProps, ChartDimensions, ChartSize, ChartTheme, ColorTheme, Coordinates, CoordinatesCategoryData, CoordinatesCategoryDatum, CoordinatesCategoryDim, CustomColorTheme, Datum, DotDatum, JSONArray, JSONObject, JSONValue, LabelVariant, Legend, LegendProps, NumericValue, PieChart, PieChartDimensions, PieChartLabelVariant, PieChartProps, PieChartVariant, Scale, ScaleBand, ScaleLinear, ScaleLog, ScalePoint, ScaleSymlog, ScaleTime, ScaleTypeToScale, ScaleValue, ScaleWithBandwidth, ScatterPlot, ScatterPlotDimensions, ScatterPlotLabelVariant, ScatterPlotProps, ScatterPlotVariant, StringValue, StyledArc, StyledArcProps, StyledArcs, StyledArcsProps, StyledAxis, StyledAxisProps, StyledBar, StyledBarChart, StyledBarChartEmptyText, StyledBarChartProps, StyledBarProps, StyledChartContainer, StyledChartContainerCaption, StyledChartContainerProps, StyledChartContainerTitle, StyledLabel, StyledLegend, StyledLegendProps, StyledPieChart, StyledPieChartCenterText, StyledPieChartEmptyText, StyledPieChartProps, StyledScatterPlot, StyledScatterPlotEmptyText, StyledScatterPlotProps, SuccessDangerColorTheme, TicksSpec, TooltipVariant, UseBrushProps, UseColorProps, UseFormatCategoricalDataProps, UseZoomProps, empty, getColorScale, monochrome, scheme, successDangerScheme, useBrush, useColor, useFormatCategoricalData, useZoom };
677
+ export { AnyScale, Arc, ArcDatum, ArcProps, Arcs, ArcsProps, Axis, AxisPosition, AxisProps, AxisVariant, Bar, BarChart, BarChartDimensions, BarChartProps, BarDatum, BarOrientation, BarProps, CategoryData, CategoryDatum, CategoryDim, ChartContainer, ChartContainerProps, ChartDimensions, ChartSize, ChartTheme, ColorTheme, Coordinates, CoordinatesCategoryData, CoordinatesCategoryDatum, CoordinatesCategoryDim, CustomColorTheme, DataPoint, DataPointProps, Datum, Dot, DotDatum, DotProps, JSONArray, JSONObject, JSONValue, LabelVariant, Legend, LegendProps, NumericValue, PieChart, PieChartDimensions, PieChartLabelVariant, PieChartProps, PieChartVariant, Scale, ScaleBand, ScaleLinear, ScaleLog, ScalePoint, ScaleSymlog, ScaleTime, ScaleTypeToScale, ScaleValue, ScaleWithBandwidth, ScatterPlot, ScatterPlotDimensions, ScatterPlotLabelVariant, ScatterPlotProps, ScatterPlotVariant, StringValue, StyledArc, StyledArcProps, StyledArcs, StyledArcsProps, StyledAxis, StyledAxisProps, StyledBar, StyledBarChart, StyledBarChartEmptyText, StyledBarChartProps, StyledBarProps, StyledChartContainer, StyledChartContainerCaption, StyledChartContainerProps, StyledChartContainerTitle, StyledDataPoint, StyledDataPointProps, StyledDot, StyledDotProps, StyledLabel, StyledLegend, StyledLegendProps, StyledPieChart, StyledPieChartCenterText, StyledPieChartEmptyText, StyledPieChartProps, StyledScatterPlot, StyledScatterPlotEmptyText, StyledScatterPlotProps, SuccessDangerColorTheme, TicksSpec, TooltipVariant, UseBrushProps, UseColorProps, UseFormatCategoricalDataProps, UseZoomProps, empty, getColorScale, monochrome, scheme, successDangerScheme, useBrush, useColor, useFormatCategoricalData, useZoom };