@aic-kits/react 0.30.0 → 0.31.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,6 +1,7 @@
1
1
  import { default as React } from 'react';
2
2
  import { Color } from '../../theme/common';
3
3
  import { BarChartSize as ThemeBarChartSize, BarChartVariant as ThemeBarChartVariant } from '../../theme/components/barChart';
4
+ import { WithResponsiveValue } from '../../utils/responsiveness';
4
5
  import { BoxProps } from '../Box';
5
6
  export interface BarData {
6
7
  label: string;
@@ -13,15 +14,25 @@ export interface BarChartProps extends Omit<BoxProps, 'size'> {
13
14
  */
14
15
  data: BarData[];
15
16
  /**
16
- * Width of the chart in pixels
17
+ * Width of the chart - can be a number (pixels), string ('100px', 'auto', '100%'), or responsive values
18
+ * When set, acts as maxWidth for responsive behavior
17
19
  * @default 400
18
20
  */
19
- width?: number;
21
+ width?: WithResponsiveValue<number | string>;
20
22
  /**
21
- * Height of the chart in pixels
23
+ * Minimum width of the chart
24
+ * @default 200
25
+ */
26
+ minWidth?: WithResponsiveValue<number | string>;
27
+ /**
28
+ * Maximum width of the chart (if not set, width prop is used as maxWidth)
29
+ */
30
+ maxWidth?: WithResponsiveValue<number | string>;
31
+ /**
32
+ * Height of the chart in pixels or string
22
33
  * @default 300
23
34
  */
24
- height?: number;
35
+ height?: WithResponsiveValue<number | string>;
25
36
  /**
26
37
  * Chart margins around the content
27
38
  * @default { top: 20, right: 20, bottom: 40, left: 40 }
@@ -1,4 +1,5 @@
1
1
  import { Color } from '../../theme/common';
2
+ import { WithResponsiveValue } from '../../utils/responsiveness';
2
3
  interface StyledBarProps {
3
4
  $colorKey: Color;
4
5
  $animationDuration: number;
@@ -12,13 +13,17 @@ interface StyledAxisLabelProps {
12
13
  interface StyledGridLineProps {
13
14
  $colorKey: Color | string;
14
15
  }
15
- export declare const StyledBarChartContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('..').BoxProps & {
16
+ export declare const StyledBarChartContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('..').BoxProps & {
16
17
  ref?: import('react').ForwardedRef<HTMLDivElement>;
17
- }, never>> & string & Omit<(props: import('..').BoxProps & {
18
+ }, {
19
+ $width?: WithResponsiveValue<number | string>;
20
+ $minWidth?: WithResponsiveValue<number | string>;
21
+ $maxWidth?: WithResponsiveValue<number | string>;
22
+ }>> & string & Omit<(props: import('..').BoxProps & {
18
23
  ref?: import('react').ForwardedRef<HTMLDivElement>;
19
24
  }) => ReturnType<({ children, style, "data-testid": testId, ...otherProps }: import('..').BoxProps, ref: import('react').ForwardedRef<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element>, keyof import('react').Component<any, {}, any>>;
20
25
  export declare const StyledBarChartSvg: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').SVGProps<SVGSVGElement>, {
21
- $width?: number;
26
+ $width?: number | string;
22
27
  $height?: number;
23
28
  }>> & string;
24
29
  export declare const StyledBar: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').SVGProps<SVGRectElement>, StyledBarProps>> & string;
@@ -1,7 +1,8 @@
1
- import { default as React } from 'react';
2
1
  import { Color } from '../../theme/common';
3
2
  import { LineChartSize as ThemeLineChartSize, LineChartVariant as ThemeLineChartVariant, LineChartCurve } from '../../theme/components/lineChart';
3
+ import { WithResponsiveValue } from '../../utils/responsiveness';
4
4
  import { BoxProps } from '../Box';
5
+ import * as React from 'react';
5
6
  export interface LineDataPoint {
6
7
  x: number | string;
7
8
  y: number;
@@ -14,6 +15,7 @@ export interface LineSeries {
14
15
  showDots?: boolean;
15
16
  showArea?: boolean;
16
17
  strokeDasharray?: string;
18
+ strokeWidth?: number;
17
19
  }
18
20
  export interface LineChartProps extends Omit<BoxProps, 'size'> {
19
21
  /**
@@ -21,15 +23,35 @@ export interface LineChartProps extends Omit<BoxProps, 'size'> {
21
23
  */
22
24
  series: LineSeries[];
23
25
  /**
24
- * Width of the chart in pixels
26
+ * Width of the chart - can be a number (pixels), string ('100px', 'auto', '100%'), or responsive values
27
+ * When set, acts as maxWidth for responsive behavior
25
28
  * @default 600
26
29
  */
27
- width?: number;
30
+ width?: WithResponsiveValue<number | string>;
28
31
  /**
29
- * Height of the chart in pixels
32
+ * Minimum width of the chart
33
+ * @default 300
34
+ */
35
+ minWidth?: WithResponsiveValue<number | string>;
36
+ /**
37
+ * Maximum width of the chart (if not set, width prop is used as maxWidth)
38
+ */
39
+ maxWidth?: WithResponsiveValue<number | string>;
40
+ /**
41
+ * Height of the chart - can be a number (pixels), string ('100px', 'auto', '100%'), or responsive values
42
+ * When set, acts as maxHeight for responsive behavior
30
43
  * @default 400
31
44
  */
32
- height?: number;
45
+ height?: WithResponsiveValue<number | string>;
46
+ /**
47
+ * Minimum height of the chart
48
+ * @default 300
49
+ */
50
+ minHeight?: WithResponsiveValue<number | string>;
51
+ /**
52
+ * Maximum height of the chart (if not set, height prop is used as maxHeight)
53
+ */
54
+ maxHeight?: WithResponsiveValue<number | string>;
33
55
  /**
34
56
  * Chart margins around the content
35
57
  * @default { top: 20, right: 20, bottom: 40, left: 50 }
@@ -1,4 +1,5 @@
1
1
  import { Color } from '../../theme/common';
2
+ import { WithResponsiveValue } from '../../utils/responsiveness';
2
3
  interface StyledLineProps {
3
4
  $colorKey: Color;
4
5
  $strokeWidth: number;
@@ -39,13 +40,20 @@ interface StyledLegendTextProps {
39
40
  $fontSize: number;
40
41
  $colorKey: Color | string;
41
42
  }
42
- export declare const StyledLineChartContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('..').BoxProps & {
43
+ export declare const StyledLineChartContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('..').BoxProps & {
43
44
  ref?: import('react').ForwardedRef<HTMLDivElement>;
44
- }, never>> & string & Omit<(props: import('..').BoxProps & {
45
+ }, {
46
+ $width?: WithResponsiveValue<number | string>;
47
+ $minWidth?: WithResponsiveValue<number | string>;
48
+ $maxWidth?: WithResponsiveValue<number | string>;
49
+ $height?: WithResponsiveValue<number | string>;
50
+ $minHeight?: WithResponsiveValue<number | string>;
51
+ $maxHeight?: WithResponsiveValue<number | string>;
52
+ }>> & string & Omit<(props: import('..').BoxProps & {
45
53
  ref?: import('react').ForwardedRef<HTMLDivElement>;
46
54
  }) => ReturnType<({ children, style, "data-testid": testId, ...otherProps }: import('..').BoxProps, ref: import('react').ForwardedRef<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element>, keyof import('react').Component<any, {}, any>>;
47
55
  export declare const StyledLineChartSvg: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').SVGProps<SVGSVGElement>, {
48
- $width?: number;
56
+ $width?: number | string;
49
57
  $height?: number;
50
58
  }>> & string;
51
59
  export declare const StyledLine: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').SVGProps<SVGPathElement>, StyledLineProps>> & string;
@@ -1,6 +1,7 @@
1
1
  import { default as React } from 'react';
2
2
  import { Color } from '../../theme/common';
3
3
  import { PieChartSize as ThemePieChartSize, PieChartVariant as ThemePieChartVariant } from '../../theme/components/pieChart';
4
+ import { WithResponsiveValue } from '../../utils/responsiveness';
4
5
  import { BoxProps } from '../Box';
5
6
  export interface PieData {
6
7
  label: string;
@@ -13,15 +14,34 @@ export interface PieChartProps extends Omit<BoxProps, 'size'> {
13
14
  */
14
15
  data: PieData[];
15
16
  /**
16
- * Width of the chart in pixels
17
+ * Width of the chart - can be a number (pixels), string ('100px', 'auto', '100%'), or responsive values
18
+ * When set, acts as maxWidth for responsive behavior
17
19
  * @default 400
18
20
  */
19
- width?: number;
21
+ width?: WithResponsiveValue<number | string>;
20
22
  /**
21
- * Height of the chart in pixels
23
+ * Height of the chart in pixels or string
22
24
  * @default 400
23
25
  */
24
- height?: number;
26
+ height?: WithResponsiveValue<number | string>;
27
+ /**
28
+ * Minimum width of the chart
29
+ * @default 200
30
+ */
31
+ minWidth?: WithResponsiveValue<number | string>;
32
+ /**
33
+ * Maximum width of the chart (if not set, width prop is used as maxWidth)
34
+ */
35
+ maxWidth?: WithResponsiveValue<number | string>;
36
+ /**
37
+ * Minimum height of the chart
38
+ * @default 200
39
+ */
40
+ minHeight?: WithResponsiveValue<number | string>;
41
+ /**
42
+ * Maximum height of the chart (if not set, height prop is used as maxHeight)
43
+ */
44
+ maxHeight?: WithResponsiveValue<number | string>;
25
45
  /**
26
46
  * Inner radius for donut chart (0-1 as percentage of radius)
27
47
  * @default 0
@@ -1,4 +1,5 @@
1
1
  import { Color } from '../../theme/common';
2
+ import { WithResponsiveValue } from '../../utils/responsiveness';
2
3
  interface StyledPieSliceProps {
3
4
  $colorKey: Color;
4
5
  $strokeWidth: number;
@@ -29,6 +30,12 @@ interface StyledLegendTextProps {
29
30
  interface StyledPieChartContainerProps {
30
31
  $legendPosition: 'top' | 'right' | 'bottom' | 'left';
31
32
  $showLegend: boolean;
33
+ $width?: WithResponsiveValue<number | string>;
34
+ $height?: WithResponsiveValue<number | string>;
35
+ $minWidth?: WithResponsiveValue<number | string>;
36
+ $maxWidth?: WithResponsiveValue<number | string>;
37
+ $minHeight?: WithResponsiveValue<number | string>;
38
+ $maxHeight?: WithResponsiveValue<number | string>;
32
39
  }
33
40
  export declare const StyledPieChartContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('..').BoxProps & {
34
41
  ref?: import('react').ForwardedRef<HTMLDivElement>;
@@ -36,7 +43,7 @@ export declare const StyledPieChartContainer: import('styled-components/dist/typ
36
43
  ref?: import('react').ForwardedRef<HTMLDivElement>;
37
44
  }) => ReturnType<({ children, style, "data-testid": testId, ...otherProps }: import('..').BoxProps, ref: import('react').ForwardedRef<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element>, keyof import('react').Component<any, {}, any>>;
38
45
  export declare const StyledPieChartSvg: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').SVGProps<SVGSVGElement>, {
39
- $width?: number;
46
+ $width?: number | string;
40
47
  $height?: number;
41
48
  }>> & string;
42
49
  export declare const StyledPieSlice: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').SVGProps<SVGPathElement>, StyledPieSliceProps>> & string;