@react-magma/charts 12.0.0 → 12.0.1-next.1

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 (72) hide show
  1. package/dist/charts.js +2450 -1
  2. package/dist/charts.js.map +1 -1
  3. package/dist/charts.modern.module.js +2428 -1
  4. package/dist/charts.modern.module.js.map +1 -1
  5. package/dist/charts.umd.js +48555 -1
  6. package/dist/charts.umd.js.map +1 -1
  7. package/dist/components/CarbonChart/CarbonChart.d.ts +42 -41
  8. package/dist/components/CarbonChart/CarbonChartArea.stories.d.ts +310 -12
  9. package/dist/components/CarbonChart/CarbonChartAreaStacked.stories.d.ts +136 -7
  10. package/dist/components/CarbonChart/CarbonChartBar.stories.d.ts +214 -12
  11. package/dist/components/CarbonChart/CarbonChartBarFloating.stories.d.ts +82 -6
  12. package/dist/components/CarbonChart/CarbonChartBarGrouped.stories.d.ts +234 -13
  13. package/dist/components/CarbonChart/CarbonChartBarStacked.stories.d.ts +266 -14
  14. package/dist/components/CarbonChart/CarbonChartBoxplot.stories.d.ts +53 -5
  15. package/dist/components/CarbonChart/CarbonChartBubble.stories.d.ts +196 -9
  16. package/dist/components/CarbonChart/CarbonChartBullet.stories.d.ts +35 -4
  17. package/dist/components/CarbonChart/CarbonChartCombo.stories.d.ts +580 -15
  18. package/dist/components/CarbonChart/CarbonChartDonut.stories.d.ts +120 -8
  19. package/dist/components/CarbonChart/CarbonChartGauge.stories.d.ts +43 -5
  20. package/dist/components/CarbonChart/CarbonChartHistogram.stories.d.ts +89 -6
  21. package/dist/components/CarbonChart/CarbonChartLine.stories.d.ts +577 -20
  22. package/dist/components/CarbonChart/CarbonChartLollipop.stories.d.ts +55 -5
  23. package/dist/components/CarbonChart/CarbonChartMeter.stories.d.ts +127 -8
  24. package/dist/components/CarbonChart/CarbonChartPie.stories.d.ts +101 -8
  25. package/dist/components/CarbonChart/CarbonChartRadar.stories.d.ts +98 -7
  26. package/dist/components/CarbonChart/CarbonChartScatter.stories.d.ts +173 -9
  27. package/dist/components/CarbonChart/CarbonChartSparkline.stories.d.ts +51 -4
  28. package/dist/components/CarbonChart/CarbonChartStep.stories.d.ts +38 -4
  29. package/dist/components/CarbonChart/index.d.ts +1 -1
  30. package/dist/components/LineChart/Chart.d.ts +27 -27
  31. package/dist/components/LineChart/ChartDataTable.d.ts +17 -17
  32. package/dist/components/LineChart/CustomAxisComponent.d.ts +3 -3
  33. package/dist/components/LineChart/CustomPointComponent.d.ts +17 -17
  34. package/dist/components/LineChart/DataTable.d.ts +5 -5
  35. package/dist/components/LineChart/GraphTooltip.d.ts +3 -3
  36. package/dist/components/LineChart/LegendButton.d.ts +6 -6
  37. package/dist/components/LineChart/LineChart.d.ts +67 -67
  38. package/dist/components/LineChart/LineChart.stories.d.ts +113 -23
  39. package/dist/components/LineChart/index.d.ts +1 -1
  40. package/dist/components/LineChart/magma-charts.d.ts +1 -1
  41. package/dist/index.d.ts +2 -2
  42. package/package.json +11 -6
  43. package/src/components/CarbonChart/CarbonChart.tsx +12 -16
  44. package/src/components/CarbonChart/CarbonChartArea.stories.tsx +674 -649
  45. package/src/components/CarbonChart/CarbonChartAreaStacked.stories.tsx +424 -414
  46. package/src/components/CarbonChart/CarbonChartBar.stories.tsx +352 -325
  47. package/src/components/CarbonChart/CarbonChartBarFloating.stories.tsx +127 -116
  48. package/src/components/CarbonChart/CarbonChartBarGrouped.stories.tsx +872 -843
  49. package/src/components/CarbonChart/CarbonChartBarStacked.stories.tsx +913 -879
  50. package/src/components/CarbonChart/CarbonChartBoxplot.stories.tsx +238 -232
  51. package/src/components/CarbonChart/CarbonChartBubble.stories.tsx +565 -547
  52. package/src/components/CarbonChart/CarbonChartBullet.stories.tsx +59 -56
  53. package/src/components/CarbonChart/CarbonChartCombo.stories.tsx +1335 -1299
  54. package/src/components/CarbonChart/CarbonChartDonut.stories.tsx +170 -153
  55. package/src/components/CarbonChart/CarbonChartGauge.stories.tsx +50 -44
  56. package/src/components/CarbonChart/CarbonChartHistogram.stories.tsx +733 -724
  57. package/src/components/CarbonChart/CarbonChartLine.stories.tsx +1656 -1605
  58. package/src/components/CarbonChart/CarbonChartLollipop.stories.tsx +81 -76
  59. package/src/components/CarbonChart/CarbonChartMeter.stories.tsx +177 -162
  60. package/src/components/CarbonChart/CarbonChartPie.stories.tsx +154 -139
  61. package/src/components/CarbonChart/CarbonChartRadar.stories.tsx +445 -433
  62. package/src/components/CarbonChart/CarbonChartScatter.stories.tsx +427 -409
  63. package/src/components/CarbonChart/CarbonChartSparkline.stories.tsx +191 -188
  64. package/src/components/CarbonChart/CarbonChartStep.stories.tsx +145 -142
  65. package/src/components/CarbonChart/carbon-charts.css +7303 -0
  66. package/src/components/LineChart/LineChart.stories.tsx +91 -104
  67. package/dist/components/CarbonChart/CarbonChart.test.d.ts +0 -1
  68. package/dist/components/CarbonChart/embeddedStyles.d.ts +0 -1
  69. package/dist/components/LineChart/ChartDataTable.test.d.ts +0 -1
  70. package/dist/components/LineChart/LineChart.test.d.ts +0 -1
  71. package/dist/components/LineChart/test/exampleChartData.d.ts +0 -40
  72. package/src/components/CarbonChart/embeddedStyles.ts +0 -24880
@@ -1,27 +1,27 @@
1
- import * as React from 'react';
2
- import { LineChartProps } from './LineChart';
3
- interface BaseChartProps {
4
- /**
5
- * Description of what the line chart data represents placed above the chart
6
- */
7
- description?: string;
8
- /**
9
- * @internal
10
- */
11
- testId?: string;
12
- /**
13
- * Title of the line chart
14
- */
15
- title: string;
16
- /**
17
- * Type of chart - for now just 'line' is accepted
18
- */
19
- type: string;
20
- }
21
- export interface ChartProps<T extends any> extends BaseChartProps, Omit<React.HTMLAttributes<HTMLDivElement>, 'title'>, LineChartProps<T> {
22
- }
23
- declare function BaseChart<T>(props: ChartProps<T>, ref: React.Ref<HTMLDivElement>): JSX.Element;
24
- export declare const Chart: <T>(props: ChartProps<T> & {
25
- ref?: React.MutableRefObject<HTMLDivElement> | undefined;
26
- }) => ReturnType<typeof BaseChart>;
27
- export {};
1
+ import * as React from 'react';
2
+ import { LineChartProps } from './LineChart';
3
+ interface BaseChartProps {
4
+ /**
5
+ * Description of what the line chart data represents placed above the chart
6
+ */
7
+ description?: string;
8
+ /**
9
+ * @internal
10
+ */
11
+ testId?: string;
12
+ /**
13
+ * Title of the line chart
14
+ */
15
+ title: string;
16
+ /**
17
+ * Type of chart - for now just 'line' is accepted
18
+ */
19
+ type: string;
20
+ }
21
+ export interface ChartProps<T extends any> extends BaseChartProps, Omit<React.HTMLAttributes<HTMLDivElement>, 'title'>, LineChartProps<T> {
22
+ }
23
+ declare function BaseChart<T>(props: ChartProps<T>, ref: React.Ref<HTMLDivElement>): React.JSX.Element;
24
+ export declare const Chart: <T>(props: ChartProps<T> & {
25
+ ref?: React.MutableRefObject<HTMLDivElement> | undefined;
26
+ }) => ReturnType<typeof BaseChart>;
27
+ export {};
@@ -1,17 +1,17 @@
1
- /// <reference types="react" />
2
- import { VictoryAxisProps } from 'victory';
3
- export declare function toCamelCase(str: string): string;
4
- export interface DataTableProps {
5
- data?: any[];
6
- xData: {
7
- keyValue?: string | number | symbol;
8
- label?: VictoryAxisProps['label'];
9
- tickFormat?: Partial<VictoryAxisProps['tickFormat']>;
10
- tickValues?: VictoryAxisProps['tickValues'];
11
- };
12
- yData: {
13
- keyValue?: string | number | symbol;
14
- tickFormat?: Partial<VictoryAxisProps['tickFormat']>;
15
- };
16
- }
17
- export declare const ChartDataTable: (props: DataTableProps) => JSX.Element;
1
+ import * as React from 'react';
2
+ import { VictoryAxisProps } from 'victory';
3
+ export declare function toCamelCase(str: string): string;
4
+ export interface DataTableProps {
5
+ data?: any[];
6
+ xData: {
7
+ keyValue?: string | number | symbol;
8
+ label?: VictoryAxisProps['label'];
9
+ tickFormat?: Partial<VictoryAxisProps['tickFormat']>;
10
+ tickValues?: VictoryAxisProps['tickValues'];
11
+ };
12
+ yData: {
13
+ keyValue?: string | number | symbol;
14
+ tickFormat?: Partial<VictoryAxisProps['tickFormat']>;
15
+ };
16
+ }
17
+ export declare const ChartDataTable: (props: DataTableProps) => React.JSX.Element;
@@ -1,3 +1,3 @@
1
- import * as React from 'react';
2
- import { LineSegmentProps } from 'victory';
3
- export declare const CustomAxisComponent: React.FunctionComponent<LineSegmentProps>;
1
+ import * as React from 'react';
2
+ import { LineSegmentProps } from 'victory';
3
+ export declare const CustomAxisComponent: React.FunctionComponent<LineSegmentProps>;
@@ -1,17 +1,17 @@
1
- import * as React from 'react';
2
- import { PointProps } from 'victory';
3
- export interface CustomScatterDataComponentInterface extends PointProps {
4
- lineIndex: number;
5
- pointRefArray: React.MutableRefObject<React.MutableRefObject<Element>[]>;
6
- registerPoint: (refArray: React.MutableRefObject<React.MutableRefObject<Element>[]>, ref: React.MutableRefObject<Element>) => void;
7
- unregisterPoint: (refArray: React.MutableRefObject<React.MutableRefObject<Element>[]>, ref: React.MutableRefObject<Element>) => void;
8
- }
9
- export interface CustomPointComponentInterface {
10
- lineIndex: number;
11
- pointIndex: PointProps['index'];
12
- pointRefArray: React.MutableRefObject<React.MutableRefObject<Element>[]>;
13
- registerPoint: (refArray: React.MutableRefObject<React.MutableRefObject<Element>[]>, ref: React.MutableRefObject<Element>) => void;
14
- unregisterPoint: (refArray: React.MutableRefObject<React.MutableRefObject<Element>[]>, ref: React.MutableRefObject<Element>) => void;
15
- }
16
- export declare const CustomScatterDataComponent: (props: CustomScatterDataComponentInterface) => JSX.Element;
17
- export declare const CustomPointComponent: (props: CustomPointComponentInterface) => JSX.Element;
1
+ import * as React from 'react';
2
+ import { PointProps } from 'victory';
3
+ export interface CustomScatterDataComponentInterface extends PointProps {
4
+ lineIndex: number;
5
+ pointRefArray: React.MutableRefObject<React.MutableRefObject<Element>[]>;
6
+ registerPoint: (refArray: React.MutableRefObject<React.MutableRefObject<Element>[]>, ref: React.MutableRefObject<Element>) => void;
7
+ unregisterPoint: (refArray: React.MutableRefObject<React.MutableRefObject<Element>[]>, ref: React.MutableRefObject<Element>) => void;
8
+ }
9
+ export interface CustomPointComponentInterface {
10
+ lineIndex: number;
11
+ pointIndex: PointProps['index'];
12
+ pointRefArray: React.MutableRefObject<React.MutableRefObject<Element>[]>;
13
+ registerPoint: (refArray: React.MutableRefObject<React.MutableRefObject<Element>[]>, ref: React.MutableRefObject<Element>) => void;
14
+ unregisterPoint: (refArray: React.MutableRefObject<React.MutableRefObject<Element>[]>, ref: React.MutableRefObject<Element>) => void;
15
+ }
16
+ export declare const CustomScatterDataComponent: (props: CustomScatterDataComponentInterface) => React.JSX.Element;
17
+ export declare const CustomPointComponent: (props: CustomPointComponentInterface) => React.JSX.Element;
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
- export interface DataTableProps {
3
- data?: any;
4
- }
5
- export declare const DataTable: (props: any) => JSX.Element;
1
+ import * as React from 'react';
2
+ export interface DataTableProps {
3
+ data?: any;
4
+ }
5
+ export declare const DataTable: (props: any) => React.JSX.Element;
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
2
- export declare const GraphTooltip: (props: any) => JSX.Element | null;
3
- export declare const AxisTooltip: (props: any) => JSX.Element;
1
+ import * as React from 'react';
2
+ export declare const GraphTooltip: (props: any) => React.JSX.Element | null;
3
+ export declare const AxisTooltip: (props: any) => React.JSX.Element;
@@ -1,6 +1,6 @@
1
- import * as React from 'react';
2
- export interface DataTableProps {
3
- name?: string;
4
- color?: string;
5
- }
6
- export declare const LegendButton: React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<HTMLButtonElement>>;
1
+ import * as React from 'react';
2
+ export interface DataTableProps {
3
+ name?: string;
4
+ color?: string;
5
+ }
6
+ export declare const LegendButton: React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<HTMLButtonElement>>;
@@ -1,67 +1,67 @@
1
- import * as React from 'react';
2
- import { VictoryAxisProps, VictoryChartProps, VictoryLineProps, VictoryScatterProps } from 'victory';
3
- export declare type LineChartAxisStyle = VictoryAxisProps['style'];
4
- export declare type DataGetterPropType = VictoryLineProps['x'];
5
- export declare type ChartDataOptions = {
6
- label: string;
7
- x: string | number;
8
- y: string | number;
9
- [key: string]: any;
10
- } | {
11
- label: string;
12
- [key: string]: any;
13
- } | any;
14
- export interface LineChartData<T> {
15
- name: string;
16
- data: T[];
17
- }
18
- export interface LineChartComponentProps {
19
- chart?: VictoryChartProps;
20
- line?: VictoryLineProps;
21
- scatter?: VictoryScatterProps;
22
- xAxis?: VictoryAxisProps;
23
- yAxis?: VictoryAxisProps;
24
- }
25
- /**
26
- * @deprecated Please use CarbonChart instead
27
- */
28
- export interface LineChartProps<T extends ChartDataOptions> {
29
- /**
30
- * Props passed to each component that makes up the line chart. See `victory` for accepted props.
31
- */
32
- componentProps?: LineChartComponentProps;
33
- /**
34
- * Data used to build the chart
35
- */
36
- data?: LineChartData<T>[];
37
- isMulti?: boolean;
38
- /**
39
- * @internal
40
- */
41
- lastFocusedScatterPoint: React.MutableRefObject<SVGPathElement | null>;
42
- /**
43
- * @internal
44
- */
45
- pointRefArray: React.MutableRefObject<React.MutableRefObject<Element>[]>;
46
- /**
47
- * @internal
48
- */
49
- registerPoint: (refArray: React.MutableRefObject<React.MutableRefObject<Element>[]>, ref: React.MutableRefObject<Element>) => void;
50
- /**
51
- * @internal
52
- */
53
- tabRef: React.MutableRefObject<HTMLButtonElement | null>;
54
- /**
55
- * @internal
56
- */
57
- unregisterPoint: (refArray: React.MutableRefObject<React.MutableRefObject<Element>[]>, ref: React.MutableRefObject<Element>) => void;
58
- /**
59
- * Value of x key in chart data
60
- */
61
- x?: keyof T;
62
- /**
63
- * Value of y key in chart data
64
- */
65
- y?: keyof T;
66
- }
67
- export declare function LineChart<T>(props: LineChartProps<T>): JSX.Element;
1
+ import * as React from 'react';
2
+ import { VictoryAxisProps, VictoryChartProps, VictoryLineProps, VictoryScatterProps } from 'victory';
3
+ export declare type LineChartAxisStyle = VictoryAxisProps['style'];
4
+ export declare type DataGetterPropType = VictoryLineProps['x'];
5
+ export declare type ChartDataOptions = {
6
+ label: string;
7
+ x: string | number;
8
+ y: string | number;
9
+ [key: string]: any;
10
+ } | {
11
+ label: string;
12
+ [key: string]: any;
13
+ } | any;
14
+ export interface LineChartData<T> {
15
+ name: string;
16
+ data: T[];
17
+ }
18
+ export interface LineChartComponentProps {
19
+ chart?: VictoryChartProps;
20
+ line?: VictoryLineProps;
21
+ scatter?: VictoryScatterProps;
22
+ xAxis?: VictoryAxisProps;
23
+ yAxis?: VictoryAxisProps;
24
+ }
25
+ /**
26
+ * @deprecated Please use CarbonChart instead
27
+ */
28
+ export interface LineChartProps<T extends ChartDataOptions> {
29
+ /**
30
+ * Props passed to each component that makes up the line chart. See `victory` for accepted props.
31
+ */
32
+ componentProps?: LineChartComponentProps;
33
+ /**
34
+ * Data used to build the chart
35
+ */
36
+ data?: LineChartData<T>[];
37
+ isMulti?: boolean;
38
+ /**
39
+ * @internal
40
+ */
41
+ lastFocusedScatterPoint: React.MutableRefObject<SVGPathElement | null>;
42
+ /**
43
+ * @internal
44
+ */
45
+ pointRefArray: React.MutableRefObject<React.MutableRefObject<Element>[]>;
46
+ /**
47
+ * @internal
48
+ */
49
+ registerPoint: (refArray: React.MutableRefObject<React.MutableRefObject<Element>[]>, ref: React.MutableRefObject<Element>) => void;
50
+ /**
51
+ * @internal
52
+ */
53
+ tabRef: React.MutableRefObject<HTMLButtonElement | null>;
54
+ /**
55
+ * @internal
56
+ */
57
+ unregisterPoint: (refArray: React.MutableRefObject<React.MutableRefObject<Element>[]>, ref: React.MutableRefObject<Element>) => void;
58
+ /**
59
+ * Value of x key in chart data
60
+ */
61
+ x?: keyof T;
62
+ /**
63
+ * Value of y key in chart data
64
+ */
65
+ y?: keyof T;
66
+ }
67
+ export declare function LineChart<T>(props: LineChartProps<T>): React.JSX.Element;
@@ -1,23 +1,113 @@
1
- import { ChartProps } from './index';
2
- declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react/types-6-0").ReactFramework, import("@storybook/react/types-6-0").Args>;
3
- export default _default;
4
- export declare const Default: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, ChartProps<any>>;
5
- interface ExplicitDataInterface {
6
- month: string | number;
7
- sales: string | number;
8
- [key: string]: any;
9
- }
10
- export declare const ExplicitData: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, ChartProps<ExplicitDataInterface>>;
11
- interface HistoryOfTexasInterface {
12
- year: number;
13
- number: number;
14
- label: string;
15
- }
16
- export declare const HistoryOfTexas: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, ChartProps<HistoryOfTexasInterface>>;
17
- export declare const SpendingRevenue: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, ChartProps<any>>;
18
- interface VotingParticipationInterface {
19
- year: number;
20
- percent: number;
21
- label: string;
22
- }
23
- export declare const VotingParticipation: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, ChartProps<VotingParticipationInterface>>;
1
+ declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react/types-6-0").ReactFramework, import("@storybook/react/types-6-0").Args>;
2
+ export default _default;
3
+ export declare const Default: {
4
+ args: {
5
+ data: {
6
+ name: string;
7
+ data: {
8
+ x: number;
9
+ y: number;
10
+ label: string;
11
+ }[];
12
+ }[];
13
+ description: string;
14
+ title: string;
15
+ type: string;
16
+ componentProps: {
17
+ xAxis: {
18
+ label: string;
19
+ tickFormat: string[];
20
+ };
21
+ yAxis: {
22
+ domain: number[];
23
+ label: string;
24
+ tickFormat: (t: any) => string;
25
+ tickValues: number[];
26
+ };
27
+ };
28
+ };
29
+ };
30
+ export declare const ExplicitData: {
31
+ args: {
32
+ componentProps: {
33
+ xAxis: {
34
+ tickFormat: string[];
35
+ label: string;
36
+ };
37
+ yAxis: {
38
+ domain: number[];
39
+ label: string;
40
+ tickFormat: (t: any) => string;
41
+ tickValues: number[];
42
+ };
43
+ };
44
+ data: {
45
+ name: string;
46
+ data: {
47
+ month: number;
48
+ sales: number;
49
+ label: string;
50
+ }[];
51
+ }[];
52
+ x: string;
53
+ y: string;
54
+ description: string;
55
+ title: string;
56
+ type: string;
57
+ };
58
+ };
59
+ export declare const HistoryOfTexas: {
60
+ args: {
61
+ description: string;
62
+ title: string;
63
+ componentProps: {
64
+ xAxis: {
65
+ label: string;
66
+ tickValues: number[];
67
+ };
68
+ yAxis: {
69
+ label: string;
70
+ tickFormat: (t: any) => any;
71
+ tickValues: number[];
72
+ };
73
+ };
74
+ data: any;
75
+ x: string;
76
+ y: string;
77
+ type: string;
78
+ };
79
+ };
80
+ export declare const SpendingRevenue: {
81
+ args: {
82
+ data: any;
83
+ title: string;
84
+ type: string;
85
+ componentProps: {
86
+ xAxis: {
87
+ label: string;
88
+ };
89
+ yAxis: {
90
+ label: string;
91
+ tickValues: number[];
92
+ };
93
+ };
94
+ };
95
+ };
96
+ export declare const VotingParticipation: {
97
+ args: {
98
+ data: any;
99
+ title: string;
100
+ type: string;
101
+ componentProps: {
102
+ xAxis: {
103
+ label: string;
104
+ };
105
+ yAxis: {
106
+ domain: number[];
107
+ label: string;
108
+ };
109
+ };
110
+ x: string;
111
+ y: string;
112
+ };
113
+ };
@@ -1 +1 @@
1
- export * from './Chart';
1
+ export * from './Chart';
@@ -1 +1 @@
1
- export declare const magmaTheme: any;
1
+ export declare const magmaTheme: any;
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from './components/LineChart';
2
- export * from './components/CarbonChart';
1
+ export * from './components/LineChart';
2
+ export * from './components/CarbonChart';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-magma/charts",
3
- "version": "12.0.0",
3
+ "version": "12.0.1-next.1",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": {
@@ -19,8 +19,8 @@
19
19
  "src"
20
20
  ],
21
21
  "scripts": {
22
- "build": "microbundle build --jsx jsx --jsxImportSource react --globals react/jsx-runtime=jsx,@emotion/react=EmotionReact,@emotion/styled=EmotionStyled,@carbon/charts-react=CarbonChartsReact",
23
- "build-watch": "microbundle watch --jsx jsx --jsxImportSource react --globals react/jsx-runtime=jsx,@emotion/react=EmotionReact,@emotion/styled=EmotionStyled,@carbon/charts-react=CarbonChartsReact",
22
+ "build": "rollup -c rollup.config.js --bundleConfigAsCjs",
23
+ "build-watch": "rollup -c rollup.config.js --watch --bundleConfigAsCjs",
24
24
  "lint": "eslint ./src",
25
25
  "test": "jest",
26
26
  "test-watch": "jest --watch"
@@ -35,19 +35,24 @@
35
35
  "devDependencies": {
36
36
  "@emotion/react": "^11.13.0",
37
37
  "@emotion/styled": "^11.13.0",
38
+ "@rollup/plugin-commonjs": "^28.0.8",
39
+ "@rollup/plugin-node-resolve": "^16.0.3",
40
+ "@rollup/plugin-typescript": "^12.1.4",
38
41
  "dom-to-image-more": "3.1.4",
39
42
  "identity-obj-proxy": "^3.0.0",
40
43
  "react": "^17.0.2",
41
44
  "react-dom": "^17.0.2",
42
- "react-magma-dom": "^4.10.0",
43
- "react-magma-icons": "^3.2.0"
45
+ "react-magma-dom": "^4.10.1-next.0",
46
+ "react-magma-icons": "^3.2.0",
47
+ "rollup": "^4.52.4",
48
+ "rollup-plugin-postcss": "^4.0.2"
44
49
  },
45
50
  "peerDependencies": {
46
51
  "@emotion/react": "^11.13.0",
47
52
  "@emotion/styled": "^11.13.0",
48
53
  "react": "^17.0.2",
49
54
  "react-dom": "^17.0.2",
50
- "react-magma-dom": "^4.10.0-next.3",
55
+ "react-magma-dom": "^4.10.1-next.0",
51
56
  "react-magma-icons": "^3.2.0"
52
57
  },
53
58
  "engines": {
@@ -21,12 +21,11 @@ import {
21
21
  ComboChart,
22
22
  ChartOptions,
23
23
  } from '@carbon/charts-react';
24
- import { Global } from '@emotion/react';
25
24
  import styled from '@emotion/styled';
26
25
  import { transparentize } from 'polished';
27
26
  import { ThemeInterface, ThemeContext, useIsInverse } from 'react-magma-dom';
28
27
 
29
- import { carbonChartStyles } from './embeddedStyles';
28
+ import './carbon-charts.css';
30
29
 
31
30
  export enum CarbonChartType {
32
31
  area = 'area',
@@ -615,20 +614,17 @@ export const CarbonChart = React.forwardRef<HTMLDivElement, CarbonChartProps>(
615
614
  const groupsLength = Object.keys(buildColors()).length;
616
615
 
617
616
  return (
618
- <>
619
- <Global styles={carbonChartStyles} />
620
- <CarbonChartWrapper
621
- data-testid={testId}
622
- ref={ref}
623
- isInverse={isInverse}
624
- theme={theme}
625
- className="carbon-chart-wrapper"
626
- groupsLength={groupsLength < 6 ? groupsLength : 14}
627
- {...rest}
628
- >
629
- <ChartType data={dataSet} options={newOptions} />
630
- </CarbonChartWrapper>
631
- </>
617
+ <CarbonChartWrapper
618
+ data-testid={testId}
619
+ ref={ref}
620
+ isInverse={isInverse}
621
+ theme={theme}
622
+ className="carbon-chart-wrapper"
623
+ groupsLength={groupsLength < 6 ? groupsLength : 14}
624
+ {...rest}
625
+ >
626
+ <ChartType data={dataSet} options={newOptions} />
627
+ </CarbonChartWrapper>
632
628
  );
633
629
  }
634
630
  );