@react-magma/charts 12.0.0-next.4 → 12.0.0-next.5
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/dist/charts.js +1 -1
- package/dist/charts.js.map +1 -1
- package/dist/charts.modern.module.js +1 -1
- package/dist/charts.modern.module.js.map +1 -1
- package/dist/charts.umd.js +1 -1
- package/dist/charts.umd.js.map +1 -1
- package/dist/components/CarbonChart/CarbonChart.d.ts +0 -1
- package/dist/components/CarbonChart/embeddedStyles.d.ts +1 -0
- package/package.json +10 -8
- package/src/components/CarbonChart/CarbonChart.tsx +17 -12
- package/src/components/CarbonChart/embeddedStyles.ts +24880 -0
- package/src/components/LineChart/ChartDataTable.tsx +1 -2
- package/dist/charts +0 -390
- package/dist/charts.css +0 -20
- package/dist/charts.css.map +0 -1
- package/dist/charts.map +0 -1
- package/src/components/CarbonChart/styles.min.css +0 -24790
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const carbonChartStyles: import("@emotion/react").SerializedStyles;
|
package/package.json
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-magma/charts",
|
|
3
|
-
"version": "12.0.0-next.
|
|
3
|
+
"version": "12.0.0-next.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"exports": {
|
|
6
|
-
".":
|
|
7
|
-
|
|
6
|
+
".": {
|
|
7
|
+
"import": "./dist/charts.modern.module.js",
|
|
8
|
+
"require": "./dist/charts.js",
|
|
9
|
+
"types": "./dist/index.d.ts"
|
|
10
|
+
}
|
|
8
11
|
},
|
|
9
12
|
"main": "dist/charts.js",
|
|
10
13
|
"umd:main": "dist/charts.umd.js",
|
|
@@ -13,12 +16,11 @@
|
|
|
13
16
|
"types": "dist/index.d.ts",
|
|
14
17
|
"files": [
|
|
15
18
|
"dist",
|
|
16
|
-
"src"
|
|
17
|
-
"src/components/CarbonChart/styles.min.css"
|
|
19
|
+
"src"
|
|
18
20
|
],
|
|
19
21
|
"scripts": {
|
|
20
|
-
"build": "microbundle build --jsx jsx --jsxImportSource react --globals react/jsx-runtime=jsx",
|
|
21
|
-
"build-watch": "microbundle watch --jsx jsx --jsxImportSource react --globals react/jsx-runtime=jsx",
|
|
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
24
|
"lint": "eslint ./src",
|
|
23
25
|
"test": "jest",
|
|
24
26
|
"test-watch": "jest --watch"
|
|
@@ -37,7 +39,7 @@
|
|
|
37
39
|
"identity-obj-proxy": "^3.0.0",
|
|
38
40
|
"react": "^17.0.2",
|
|
39
41
|
"react-dom": "^17.0.2",
|
|
40
|
-
"react-magma-dom": "^4.10.0-next.
|
|
42
|
+
"react-magma-dom": "^4.10.0-next.29",
|
|
41
43
|
"react-magma-icons": "^3.2.0"
|
|
42
44
|
},
|
|
43
45
|
"peerDependencies": {
|
|
@@ -21,10 +21,12 @@ import {
|
|
|
21
21
|
ComboChart,
|
|
22
22
|
ChartOptions,
|
|
23
23
|
} from '@carbon/charts-react';
|
|
24
|
+
import { Global } from '@emotion/react';
|
|
24
25
|
import styled from '@emotion/styled';
|
|
25
26
|
import { transparentize } from 'polished';
|
|
26
27
|
import { ThemeInterface, ThemeContext, useIsInverse } from 'react-magma-dom';
|
|
27
|
-
|
|
28
|
+
|
|
29
|
+
import { carbonChartStyles } from './embeddedStyles';
|
|
28
30
|
|
|
29
31
|
export enum CarbonChartType {
|
|
30
32
|
area = 'area',
|
|
@@ -579,17 +581,20 @@ export const CarbonChart = React.forwardRef<HTMLDivElement, CarbonChartProps>(
|
|
|
579
581
|
const groupsLength = Object.keys(buildColors()).length;
|
|
580
582
|
|
|
581
583
|
return (
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
584
|
+
<>
|
|
585
|
+
<Global styles={carbonChartStyles} />
|
|
586
|
+
<CarbonChartWrapper
|
|
587
|
+
data-testid={testId}
|
|
588
|
+
ref={ref}
|
|
589
|
+
isInverse={isInverse}
|
|
590
|
+
theme={theme}
|
|
591
|
+
className="carbon-chart-wrapper"
|
|
592
|
+
groupsLength={groupsLength < 6 ? groupsLength : 14}
|
|
593
|
+
{...rest}
|
|
594
|
+
>
|
|
595
|
+
<ChartType data={dataSet} options={newOptions} />
|
|
596
|
+
</CarbonChartWrapper>
|
|
597
|
+
</>
|
|
593
598
|
);
|
|
594
599
|
}
|
|
595
600
|
);
|