@react-magma/charts 12.0.1-next.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 (50) 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 -310
  9. package/dist/components/CarbonChart/CarbonChartAreaStacked.stories.d.ts +136 -136
  10. package/dist/components/CarbonChart/CarbonChartBar.stories.d.ts +214 -214
  11. package/dist/components/CarbonChart/CarbonChartBarFloating.stories.d.ts +82 -82
  12. package/dist/components/CarbonChart/CarbonChartBarGrouped.stories.d.ts +234 -234
  13. package/dist/components/CarbonChart/CarbonChartBarStacked.stories.d.ts +266 -266
  14. package/dist/components/CarbonChart/CarbonChartBoxplot.stories.d.ts +53 -53
  15. package/dist/components/CarbonChart/CarbonChartBubble.stories.d.ts +196 -196
  16. package/dist/components/CarbonChart/CarbonChartBullet.stories.d.ts +35 -35
  17. package/dist/components/CarbonChart/CarbonChartCombo.stories.d.ts +580 -580
  18. package/dist/components/CarbonChart/CarbonChartDonut.stories.d.ts +120 -120
  19. package/dist/components/CarbonChart/CarbonChartGauge.stories.d.ts +43 -43
  20. package/dist/components/CarbonChart/CarbonChartHistogram.stories.d.ts +89 -89
  21. package/dist/components/CarbonChart/CarbonChartLine.stories.d.ts +577 -577
  22. package/dist/components/CarbonChart/CarbonChartLollipop.stories.d.ts +55 -55
  23. package/dist/components/CarbonChart/CarbonChartMeter.stories.d.ts +127 -127
  24. package/dist/components/CarbonChart/CarbonChartPie.stories.d.ts +101 -101
  25. package/dist/components/CarbonChart/CarbonChartRadar.stories.d.ts +98 -98
  26. package/dist/components/CarbonChart/CarbonChartScatter.stories.d.ts +173 -173
  27. package/dist/components/CarbonChart/CarbonChartSparkline.stories.d.ts +51 -51
  28. package/dist/components/CarbonChart/CarbonChartStep.stories.d.ts +38 -38
  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 -134
  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 +9 -4
  43. package/src/components/CarbonChart/CarbonChart.tsx +12 -16
  44. package/src/components/CarbonChart/carbon-charts.css +7303 -0
  45. package/dist/components/CarbonChart/CarbonChart.test.d.ts +0 -1
  46. package/dist/components/CarbonChart/embeddedStyles.d.ts +0 -1
  47. package/dist/components/LineChart/ChartDataTable.test.d.ts +0 -1
  48. package/dist/components/LineChart/LineChart.test.d.ts +0 -1
  49. package/dist/components/LineChart/test/exampleChartData.d.ts +0 -40
  50. package/src/components/CarbonChart/embeddedStyles.ts +0 -24880
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-magma/charts",
3
- "version": "12.0.1-next.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,12 +35,17 @@
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
45
  "react-magma-dom": "^4.10.1-next.0",
43
- "react-magma-icons": "^3.2.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",
@@ -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
  );