@ssa-ui-kit/core 2.22.1 → 2.23.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.
@@ -1,3 +1,3 @@
1
1
  import { BarGaugeChartProps } from './types';
2
- export declare const BarGaugeChartComponent: ({ title, widgetCardProps, bars, features, }: BarGaugeChartProps) => import("@emotion/react/jsx-runtime").JSX.Element;
2
+ export declare const BarGaugeChartComponent: ({ title, widgetCardProps, wrapperProps, bars, features, }: BarGaugeChartProps) => import("@emotion/react/jsx-runtime").JSX.Element;
3
3
  export declare const BarGaugeChart: typeof BarGaugeChartComponent;
@@ -1,5 +1,6 @@
1
1
  import { MustInclude } from '@ssa-ui-kit/utils';
2
2
  import { WidgetCardProps } from '../../WidgetCard';
3
+ import Wrapper from '../../Wrapper';
3
4
  export type BarGaugeChartFeature = 'header' | 'fullscreenMode';
4
5
  export type GaugeBarThreshold = {
5
6
  value: number;
@@ -24,4 +25,5 @@ export interface BarGaugeChartProps {
24
25
  widgetCardProps?: WidgetCardProps;
25
26
  bars?: GaugeBarProps[];
26
27
  features?: BarGaugeChartFeature[];
28
+ wrapperProps?: React.ComponentProps<typeof Wrapper>;
27
29
  }
@@ -18,7 +18,8 @@ export interface GaugeChartProps extends Pick<GaugeChartLabelsProps, 'maxLabel'
18
18
  trackProps?: Omit<GaugeChartBaseProps, 'data'>;
19
19
  features?: GaugeChartFeature[];
20
20
  widgetCardProps?: WidgetCardProps;
21
+ containerProps?: React.HTMLAttributes<HTMLDivElement>;
21
22
  }
22
- declare const GaugeChartComponent: ({ minLabel, maxLabel, totalLabel, unitLabel, minValue, maxValue, value, title, chartProps, trackProps, widgetCardProps, withLabels, withTrack, withNeedle, features, segments, ticks, }: GaugeChartProps) => import("@emotion/react/jsx-runtime").JSX.Element;
23
+ declare const GaugeChartComponent: ({ minLabel, maxLabel, totalLabel, unitLabel, minValue, maxValue, value, title, chartProps, trackProps, widgetCardProps, containerProps, withLabels, withTrack, withNeedle, features, segments, ticks, }: GaugeChartProps) => import("@emotion/react/jsx-runtime").JSX.Element;
23
24
  export declare const GaugeChart: typeof GaugeChartComponent;
24
25
  export {};
package/dist/index.js CHANGED
@@ -10412,6 +10412,7 @@ const GaugeChartComponent = ({
10412
10412
  chartProps,
10413
10413
  trackProps,
10414
10414
  widgetCardProps,
10415
+ containerProps,
10415
10416
  withLabels = true,
10416
10417
  withTrack = true,
10417
10418
  withNeedle = true,
@@ -10456,6 +10457,7 @@ const GaugeChartComponent = ({
10456
10457
  const pieOffset = centeredOffset(containerSize, pieSize);
10457
10458
  return (0,jsx_runtime_namespaceObject.jsx)("div", {
10458
10459
  css: GaugeChart_ref,
10460
+ ...containerProps,
10459
10461
  children: (0,jsx_runtime_namespaceObject.jsx)(WithWidgetCard, {
10460
10462
  features: features,
10461
10463
  cardProps: {
@@ -10669,6 +10671,7 @@ var BarGaugeChart_ref = true ? {
10669
10671
  const BarGaugeChartComponent = ({
10670
10672
  title,
10671
10673
  widgetCardProps,
10674
+ wrapperProps,
10672
10675
  bars = [],
10673
10676
  features = []
10674
10677
  }) => (0,jsx_runtime_namespaceObject.jsx)(WithWidgetCard, {
@@ -10684,6 +10687,7 @@ const BarGaugeChartComponent = ({
10684
10687
  direction: "column",
10685
10688
  alignItems: "start",
10686
10689
  css: BarGaugeChart_ref,
10690
+ ...wrapperProps,
10687
10691
  children: bars.map((barProps, index) => (0,jsx_runtime_namespaceObject.jsx)(GaugeBar, {
10688
10692
  ...barProps
10689
10693
  }, index))