@automattic/charts 0.3.0 → 0.4.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.
Files changed (123) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/components/bar-chart/index.js +2 -3
  3. package/dist/cjs/components/bar-chart/index.js.map +1 -1
  4. package/dist/cjs/components/bar-chart/style.css +94 -5
  5. package/dist/cjs/components/grid-control/index.js +2 -3
  6. package/dist/cjs/components/grid-control/index.js.map +1 -1
  7. package/dist/cjs/components/grid-control/style.css +94 -2
  8. package/dist/cjs/components/legend/index.js +2 -3
  9. package/dist/cjs/components/legend/index.js.map +1 -1
  10. package/dist/cjs/components/legend/style.css +94 -2
  11. package/dist/cjs/components/line-chart/index.js +2 -3
  12. package/dist/cjs/components/line-chart/index.js.map +1 -1
  13. package/dist/cjs/components/line-chart/style.css +94 -3
  14. package/dist/cjs/components/pie-chart/index.js +2 -3
  15. package/dist/cjs/components/pie-chart/index.js.map +1 -1
  16. package/dist/cjs/components/pie-chart/style.css +94 -4
  17. package/dist/cjs/components/pie-semi-circle-chart/index.js +2 -3
  18. package/dist/cjs/components/pie-semi-circle-chart/index.js.map +1 -1
  19. package/dist/cjs/components/pie-semi-circle-chart/style.css +94 -4
  20. package/dist/cjs/components/tooltip/index.js +2 -3
  21. package/dist/cjs/components/tooltip/index.js.map +1 -1
  22. package/dist/cjs/components/tooltip/style.css +94 -2
  23. package/dist/cjs/index.js +2 -3
  24. package/dist/cjs/index.js.map +1 -1
  25. package/dist/cjs/providers/theme/index.js +2 -3
  26. package/dist/cjs/providers/theme/index.js.map +1 -1
  27. package/dist/cjs/providers/theme/style.css +95 -0
  28. package/dist/cjs/style.css +95 -9
  29. package/dist/index.d.ts +301 -0
  30. package/dist/mjs/components/bar-chart/index.js +2 -3
  31. package/dist/mjs/components/bar-chart/index.js.map +1 -1
  32. package/dist/mjs/components/bar-chart/style.css +94 -5
  33. package/dist/mjs/components/grid-control/index.js +2 -3
  34. package/dist/mjs/components/grid-control/index.js.map +1 -1
  35. package/dist/mjs/components/grid-control/style.css +94 -2
  36. package/dist/mjs/components/legend/index.js +2 -3
  37. package/dist/mjs/components/legend/index.js.map +1 -1
  38. package/dist/mjs/components/legend/style.css +94 -2
  39. package/dist/mjs/components/line-chart/index.js +2 -3
  40. package/dist/mjs/components/line-chart/index.js.map +1 -1
  41. package/dist/mjs/components/line-chart/style.css +94 -3
  42. package/dist/mjs/components/pie-chart/index.js +2 -3
  43. package/dist/mjs/components/pie-chart/index.js.map +1 -1
  44. package/dist/mjs/components/pie-chart/style.css +94 -4
  45. package/dist/mjs/components/pie-semi-circle-chart/index.js +2 -3
  46. package/dist/mjs/components/pie-semi-circle-chart/index.js.map +1 -1
  47. package/dist/mjs/components/pie-semi-circle-chart/style.css +94 -4
  48. package/dist/mjs/components/tooltip/index.js +2 -3
  49. package/dist/mjs/components/tooltip/index.js.map +1 -1
  50. package/dist/mjs/components/tooltip/style.css +94 -2
  51. package/dist/mjs/index.js +2 -3
  52. package/dist/mjs/index.js.map +1 -1
  53. package/dist/mjs/providers/theme/index.js +2 -3
  54. package/dist/mjs/providers/theme/index.js.map +1 -1
  55. package/dist/mjs/providers/theme/style.css +95 -0
  56. package/dist/mjs/style.css +95 -9
  57. package/global.d.ts +14 -0
  58. package/package.json +29 -8
  59. package/rollup.config.mjs +142 -0
  60. package/src/components/line-chart/line-chart.tsx +50 -15
  61. package/src/components/pie-chart/__tests__/pie-chart.test.tsx +59 -0
  62. package/src/components/pie-chart/pie-chart.tsx +91 -6
  63. package/src/components/pie-semi-circle-chart/pie-semi-circle-chart.tsx +17 -12
  64. package/src/components/shared/with-responsive.tsx +4 -3
  65. package/src/types.ts +25 -0
  66. package/tests/jest.config.cjs +12 -0
  67. package/tests/jest.setup.js +13 -0
  68. package/dist/cjs/components/bar-chart/index.js.LICENSE.txt +0 -9
  69. package/dist/cjs/components/bar-chart/style.css.map +0 -1
  70. package/dist/cjs/components/grid-control/index.js.LICENSE.txt +0 -9
  71. package/dist/cjs/components/grid-control/style.css.map +0 -1
  72. package/dist/cjs/components/legend/index.js.LICENSE.txt +0 -9
  73. package/dist/cjs/components/legend/style.css.map +0 -1
  74. package/dist/cjs/components/line-chart/index.js.LICENSE.txt +0 -9
  75. package/dist/cjs/components/line-chart/style.css.map +0 -1
  76. package/dist/cjs/components/pie-chart/index.js.LICENSE.txt +0 -9
  77. package/dist/cjs/components/pie-chart/style.css.map +0 -1
  78. package/dist/cjs/components/pie-semi-circle-chart/index.js.LICENSE.txt +0 -9
  79. package/dist/cjs/components/pie-semi-circle-chart/style.css.map +0 -1
  80. package/dist/cjs/components/tooltip/index.js.LICENSE.txt +0 -9
  81. package/dist/cjs/components/tooltip/style.css.map +0 -1
  82. package/dist/cjs/index.js.LICENSE.txt +0 -9
  83. package/dist/cjs/providers/theme/index.js.LICENSE.txt +0 -9
  84. package/dist/cjs/style.css.map +0 -1
  85. package/dist/mjs/components/bar-chart/index.js.LICENSE.txt +0 -9
  86. package/dist/mjs/components/bar-chart/style.css.map +0 -1
  87. package/dist/mjs/components/grid-control/index.js.LICENSE.txt +0 -9
  88. package/dist/mjs/components/grid-control/style.css.map +0 -1
  89. package/dist/mjs/components/legend/index.js.LICENSE.txt +0 -9
  90. package/dist/mjs/components/legend/style.css.map +0 -1
  91. package/dist/mjs/components/line-chart/index.js.LICENSE.txt +0 -9
  92. package/dist/mjs/components/line-chart/style.css.map +0 -1
  93. package/dist/mjs/components/pie-chart/index.js.LICENSE.txt +0 -9
  94. package/dist/mjs/components/pie-chart/style.css.map +0 -1
  95. package/dist/mjs/components/pie-semi-circle-chart/index.js.LICENSE.txt +0 -9
  96. package/dist/mjs/components/pie-semi-circle-chart/style.css.map +0 -1
  97. package/dist/mjs/components/tooltip/index.js.LICENSE.txt +0 -9
  98. package/dist/mjs/components/tooltip/style.css.map +0 -1
  99. package/dist/mjs/index.js.LICENSE.txt +0 -9
  100. package/dist/mjs/providers/theme/index.js.LICENSE.txt +0 -9
  101. package/dist/mjs/style.css.map +0 -1
  102. package/dist/types/components/bar-chart/bar-chart.d.ts +0 -5
  103. package/dist/types/components/bar-chart/index.d.ts +0 -1
  104. package/dist/types/components/grid-control/grid-control.d.ts +0 -4
  105. package/dist/types/components/grid-control/index.d.ts +0 -1
  106. package/dist/types/components/legend/base-legend.d.ts +0 -3
  107. package/dist/types/components/legend/index.d.ts +0 -2
  108. package/dist/types/components/legend/types.d.ts +0 -12
  109. package/dist/types/components/line-chart/index.d.ts +0 -1
  110. package/dist/types/components/line-chart/line-chart.d.ts +0 -11
  111. package/dist/types/components/pie-chart/index.d.ts +0 -1
  112. package/dist/types/components/pie-chart/pie-chart.d.ts +0 -9
  113. package/dist/types/components/pie-semi-circle-chart/index.d.ts +0 -1
  114. package/dist/types/components/pie-semi-circle-chart/pie-semi-circle-chart.d.ts +0 -22
  115. package/dist/types/components/shared/with-responsive.d.ts +0 -17
  116. package/dist/types/components/tooltip/base-tooltip.d.ts +0 -29
  117. package/dist/types/components/tooltip/index.d.ts +0 -2
  118. package/dist/types/hooks/use-chart-mouse-handler.d.ts +0 -41
  119. package/dist/types/index.d.ts +0 -8
  120. package/dist/types/providers/theme/index.d.ts +0 -2
  121. package/dist/types/providers/theme/theme-provider.d.ts +0 -18
  122. package/dist/types/providers/theme/themes.d.ts +0 -14
  123. package/dist/types/types.d.ts +0 -137
@@ -4,4 +4,16 @@ const baseConfig = require( 'jetpack-js-tools/jest/config.base.js' );
4
4
  module.exports = {
5
5
  ...baseConfig,
6
6
  rootDir: path.join( __dirname, '..' ),
7
+ testEnvironment: 'jsdom',
8
+ setupFilesAfterEnv: [
9
+ ...baseConfig.setupFilesAfterEnv,
10
+ '@testing-library/jest-dom',
11
+ '<rootDir>/tests/jest.setup.js',
12
+ ],
13
+ transform: {
14
+ ...baseConfig.transform,
15
+ '\\.[jt]sx?$': require( 'jetpack-js-tools/jest/babel-jest-config-factory.js' )(
16
+ require.resolve
17
+ ),
18
+ },
7
19
  };
@@ -0,0 +1,13 @@
1
+ class ResizeObserver {
2
+ observe() {
3
+ // do nothing
4
+ }
5
+ unobserve() {
6
+ // do nothing
7
+ }
8
+ disconnect() {
9
+ // do nothing
10
+ }
11
+ }
12
+
13
+ global.ResizeObserver = ResizeObserver;
@@ -1,9 +0,0 @@
1
- /**
2
- * @license React
3
- * react-jsx-runtime.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */
@@ -1 +0,0 @@
1
- {"version":3,"file":"components/bar-chart/style.css","mappings":"AAAA,sBACC,kBAEA,sBACC,gB;ACAA,iCACE,cAJc,CAKd,iBACA,2B;ACPJ,sBACE,cACA,iCACA,WACA,kBACA,eACA,oCACA,kBACA,oBACA,iC;ACRD,sBACC,aACA,mBACA,eACA,SAGD,sBACC,aACA,sBACA,QAIF,sBACC,aACA,mBACA,QACA,kBAGD,sBACC,kBAGD,sBACC,iCACA,aACA,mBACA,UAGD,sBACC,gB","sources":["webpack://@automattic/charts/./src/components/bar-chart/bar-chart.module.scss","webpack://@automattic/charts/./src/components/grid-control/grid-control.module.scss","webpack://@automattic/charts/./src/components/tooltip/base-tooltip.module.scss","webpack://@automattic/charts/./src/components/legend/legend.module.scss"],"sourcesContent":[".bar-chart {\n\tposition: relative;\n\t\n\t&-legend {\n\t\tmargin-top: 1rem;\n\t}\n}\n","// Variables\n$grid-line-color: #d7d6d6;\n\n.grid-control {\n :global(.visx-line) {\n stroke: $grid-line-color;\n stroke-width: 1px;\n shape-rendering: crispEdges;\n }\n} ",".tooltip {\n padding: 0.5rem;\n background-color: rgba(0, 0, 0, 0.85);\n color: white;\n border-radius: 4px;\n font-size: 14px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);\n position: absolute;\n pointer-events: none;\n transform: translate(-50%, -100%);\n}\n",".legend {\n\t&--horizontal {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\tflex-wrap: wrap;\n\t\tgap: 16px;\n\t}\n\n\t&--vertical {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: 8px;\n\t}\n}\n\n.legend-item {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tfont-size: 0.875rem;\n}\n\n.legend-item-swatch {\n\tborder-radius: 2px;\n}\n\n.legend-item-label {\n\tcolor: var(--jp-gray-80, #2c3338);\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 0.5rem;\n}\n\n.legend-item-value {\n\tfont-weight: 500;\n}\n"],"names":[],"sourceRoot":""}
@@ -1,9 +0,0 @@
1
- /**
2
- * @license React
3
- * react-jsx-runtime.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */
@@ -1 +0,0 @@
1
- {"version":3,"file":"components/grid-control/style.css","mappings":"AAIE,iCACE,cAJc,CAKd,iBACA,2B","sources":["webpack://@automattic/charts/./src/components/grid-control/grid-control.module.scss"],"sourcesContent":["// Variables\n$grid-line-color: #d7d6d6;\n\n.grid-control {\n :global(.visx-line) {\n stroke: $grid-line-color;\n stroke-width: 1px;\n shape-rendering: crispEdges;\n }\n} "],"names":[],"sourceRoot":""}
@@ -1,9 +0,0 @@
1
- /**
2
- * @license React
3
- * react-jsx-runtime.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */
@@ -1 +0,0 @@
1
- {"version":3,"file":"components/legend/style.css","mappings":"AACC,sBACC,aACA,mBACA,eACA,SAGD,sBACC,aACA,sBACA,QAIF,sBACC,aACA,mBACA,QACA,kBAGD,sBACC,kBAGD,sBACC,iCACA,aACA,mBACA,UAGD,sBACC,gB","sources":["webpack://@automattic/charts/./src/components/legend/legend.module.scss"],"sourcesContent":[".legend {\n\t&--horizontal {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\tflex-wrap: wrap;\n\t\tgap: 16px;\n\t}\n\n\t&--vertical {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: 8px;\n\t}\n}\n\n.legend-item {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tfont-size: 0.875rem;\n}\n\n.legend-item-swatch {\n\tborder-radius: 2px;\n}\n\n.legend-item-label {\n\tcolor: var(--jp-gray-80, #2c3338);\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 0.5rem;\n}\n\n.legend-item-value {\n\tfont-weight: 500;\n}\n"],"names":[],"sourceRoot":""}
@@ -1,9 +0,0 @@
1
- /**
2
- * @license React
3
- * react-jsx-runtime.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */
@@ -1 +0,0 @@
1
- {"version":3,"file":"components/line-chart/style.css","mappings":"AAAA,sBACC,kBAEA,sBACC,gBACA,cAGD,sBACC,iBACA,oBAGD,sBACC,aACA,mBACA,cACA,8BAGD,sBACC,gBACA,mB;ACrBD,sBACC,aACA,mBACA,eACA,SAGD,sBACC,aACA,sBACA,QAIF,sBACC,aACA,mBACA,QACA,kBAGD,sBACC,kBAGD,sBACC,iCACA,aACA,mBACA,UAGD,sBACC,gB","sources":["webpack://@automattic/charts/./src/components/line-chart/line-chart.module.scss","webpack://@automattic/charts/./src/components/legend/legend.module.scss"],"sourcesContent":[".line-chart {\n\tposition: relative;\n\n\t&__tooltip {\n\t\tbackground: #fff;\n\t\tpadding: 0.5rem;\n\t}\n\n\t&__tooltip-date {\n\t\tfont-weight: bold;\n\t\tpadding-bottom: 10px;\n\t}\n\n\t&__tooltip-row {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tpadding: 4px 0;\n\t\tjustify-content: space-between;\n\t}\n\n\t&__tooltip-label {\n\t\tfont-weight: 500;\n\t\tpadding-right: 1rem;\n\t}\n}\n",".legend {\n\t&--horizontal {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\tflex-wrap: wrap;\n\t\tgap: 16px;\n\t}\n\n\t&--vertical {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: 8px;\n\t}\n}\n\n.legend-item {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tfont-size: 0.875rem;\n}\n\n.legend-item-swatch {\n\tborder-radius: 2px;\n}\n\n.legend-item-label {\n\tcolor: var(--jp-gray-80, #2c3338);\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 0.5rem;\n}\n\n.legend-item-value {\n\tfont-weight: 500;\n}\n"],"names":[],"sourceRoot":""}
@@ -1,9 +0,0 @@
1
- /**
2
- * @license React
3
- * react-jsx-runtime.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */
@@ -1 +0,0 @@
1
- {"version":3,"file":"components/pie-chart/style.css","mappings":"AAAA,sBACC,kB;ACAA,sBACC,aACA,mBACA,eACA,SAGD,sBACC,aACA,sBACA,QAIF,sBACC,aACA,mBACA,QACA,kBAGD,sBACC,kBAGD,sBACC,iCACA,aACA,mBACA,UAGD,sBACC,gB;AClCD,sBACE,cACA,iCACA,WACA,kBACA,eACA,oCACA,kBACA,oBACA,iC","sources":["webpack://@automattic/charts/./src/components/pie-chart/pie-chart.module.scss","webpack://@automattic/charts/./src/components/legend/legend.module.scss","webpack://@automattic/charts/./src/components/tooltip/base-tooltip.module.scss"],"sourcesContent":[".pie-chart {\n\tposition: relative;\n}\n",".legend {\n\t&--horizontal {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\tflex-wrap: wrap;\n\t\tgap: 16px;\n\t}\n\n\t&--vertical {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: 8px;\n\t}\n}\n\n.legend-item {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tfont-size: 0.875rem;\n}\n\n.legend-item-swatch {\n\tborder-radius: 2px;\n}\n\n.legend-item-label {\n\tcolor: var(--jp-gray-80, #2c3338);\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 0.5rem;\n}\n\n.legend-item-value {\n\tfont-weight: 500;\n}\n",".tooltip {\n padding: 0.5rem;\n background-color: rgba(0, 0, 0, 0.85);\n color: white;\n border-radius: 4px;\n font-size: 14px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);\n position: absolute;\n pointer-events: none;\n transform: translate(-50%, -100%);\n}\n"],"names":[],"sourceRoot":""}
@@ -1,9 +0,0 @@
1
- /**
2
- * @license React
3
- * react-jsx-runtime.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */
@@ -1 +0,0 @@
1
- {"version":3,"file":"components/pie-semi-circle-chart/style.css","mappings":"AAAA,sBACC,kBACA,kBAEA,sBACC,gBAGD,4CACC,kBACA,gBACA,eAGD,4CACC,eACA,e;AChBF,sBACE,cACA,iCACA,WACA,kBACA,eACA,oCACA,kBACA,oBACA,iC;ACRD,sBACC,aACA,mBACA,eACA,SAGD,sBACC,aACA,sBACA,QAIF,sBACC,aACA,mBACA,QACA,kBAGD,sBACC,kBAGD,sBACC,iCACA,aACA,mBACA,UAGD,sBACC,gB","sources":["webpack://@automattic/charts/./src/components/pie-semi-circle-chart/pie-semi-circle-chart.module.scss","webpack://@automattic/charts/./src/components/tooltip/base-tooltip.module.scss","webpack://@automattic/charts/./src/components/legend/legend.module.scss"],"sourcesContent":[".pie-semi-circle-chart {\n\tposition: relative;\n\ttext-align: center;\n\n\t&-legend {\n\t\tmargin-top: 1rem;\n\t}\n\n\t.label {\n\t\tmargin-bottom: 0px; // Add space between label and pie chart\n\t\tfont-weight: 600; // Make label more prominent than note\n\t\tfont-size: 16px; // Set explicit font size\n\t}\n\n\t.note {\n\t\tmargin-top: 0px; // Add space between pie chart and note\n\t\tfont-size: 14px; // Slightly smaller text for hierarchy\n\t}\n}\n",".tooltip {\n padding: 0.5rem;\n background-color: rgba(0, 0, 0, 0.85);\n color: white;\n border-radius: 4px;\n font-size: 14px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);\n position: absolute;\n pointer-events: none;\n transform: translate(-50%, -100%);\n}\n",".legend {\n\t&--horizontal {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\tflex-wrap: wrap;\n\t\tgap: 16px;\n\t}\n\n\t&--vertical {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: 8px;\n\t}\n}\n\n.legend-item {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tfont-size: 0.875rem;\n}\n\n.legend-item-swatch {\n\tborder-radius: 2px;\n}\n\n.legend-item-label {\n\tcolor: var(--jp-gray-80, #2c3338);\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 0.5rem;\n}\n\n.legend-item-value {\n\tfont-weight: 500;\n}\n"],"names":[],"sourceRoot":""}
@@ -1,9 +0,0 @@
1
- /**
2
- * @license React
3
- * react-jsx-runtime.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */
@@ -1 +0,0 @@
1
- {"version":3,"file":"components/tooltip/style.css","mappings":"AAAA,sBACE,cACA,iCACA,WACA,kBACA,eACA,oCACA,kBACA,oBACA,iC","sources":["webpack://@automattic/charts/./src/components/tooltip/base-tooltip.module.scss"],"sourcesContent":[".tooltip {\n padding: 0.5rem;\n background-color: rgba(0, 0, 0, 0.85);\n color: white;\n border-radius: 4px;\n font-size: 14px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);\n position: absolute;\n pointer-events: none;\n transform: translate(-50%, -100%);\n}\n"],"names":[],"sourceRoot":""}
@@ -1,9 +0,0 @@
1
- /**
2
- * @license React
3
- * react-jsx-runtime.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */
@@ -1,9 +0,0 @@
1
- /**
2
- * @license React
3
- * react-jsx-runtime.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */
@@ -1 +0,0 @@
1
- {"version":3,"file":"style.css","mappings":"AAAA,sBACC,kBAEA,sBACC,gB;ACAA,iCACE,cAJc,CAKd,iBACA,2B;ACPJ,sBACE,cACA,iCACA,WACA,kBACA,eACA,oCACA,kBACA,oBACA,iC;ACRD,sBACC,aACA,mBACA,eACA,SAGD,sBACC,aACA,sBACA,QAIF,sBACC,aACA,mBACA,QACA,kBAGD,sBACC,kBAGD,sBACC,iCACA,aACA,mBACA,UAGD,sBACC,gB;AClCD,sBACC,kBAEA,sBACC,gBACA,cAGD,sBACC,iBACA,oBAGD,sBACC,aACA,mBACA,cACA,8BAGD,sBACC,gBACA,mB;ACtBF,sBACC,kB;ACDD,sBACC,kBACA,kBAEA,sBACC,gBAGD,4CACC,kBACA,gBACA,eAGD,4CACC,eACA,e","sources":["webpack://@automattic/charts/./src/components/bar-chart/bar-chart.module.scss","webpack://@automattic/charts/./src/components/grid-control/grid-control.module.scss","webpack://@automattic/charts/./src/components/tooltip/base-tooltip.module.scss","webpack://@automattic/charts/./src/components/legend/legend.module.scss","webpack://@automattic/charts/./src/components/line-chart/line-chart.module.scss","webpack://@automattic/charts/./src/components/pie-chart/pie-chart.module.scss","webpack://@automattic/charts/./src/components/pie-semi-circle-chart/pie-semi-circle-chart.module.scss"],"sourcesContent":[".bar-chart {\n\tposition: relative;\n\t\n\t&-legend {\n\t\tmargin-top: 1rem;\n\t}\n}\n","// Variables\n$grid-line-color: #d7d6d6;\n\n.grid-control {\n :global(.visx-line) {\n stroke: $grid-line-color;\n stroke-width: 1px;\n shape-rendering: crispEdges;\n }\n} ",".tooltip {\n padding: 0.5rem;\n background-color: rgba(0, 0, 0, 0.85);\n color: white;\n border-radius: 4px;\n font-size: 14px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);\n position: absolute;\n pointer-events: none;\n transform: translate(-50%, -100%);\n}\n",".legend {\n\t&--horizontal {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\tflex-wrap: wrap;\n\t\tgap: 16px;\n\t}\n\n\t&--vertical {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: 8px;\n\t}\n}\n\n.legend-item {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tfont-size: 0.875rem;\n}\n\n.legend-item-swatch {\n\tborder-radius: 2px;\n}\n\n.legend-item-label {\n\tcolor: var(--jp-gray-80, #2c3338);\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 0.5rem;\n}\n\n.legend-item-value {\n\tfont-weight: 500;\n}\n",".line-chart {\n\tposition: relative;\n\n\t&__tooltip {\n\t\tbackground: #fff;\n\t\tpadding: 0.5rem;\n\t}\n\n\t&__tooltip-date {\n\t\tfont-weight: bold;\n\t\tpadding-bottom: 10px;\n\t}\n\n\t&__tooltip-row {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tpadding: 4px 0;\n\t\tjustify-content: space-between;\n\t}\n\n\t&__tooltip-label {\n\t\tfont-weight: 500;\n\t\tpadding-right: 1rem;\n\t}\n}\n",".pie-chart {\n\tposition: relative;\n}\n",".pie-semi-circle-chart {\n\tposition: relative;\n\ttext-align: center;\n\n\t&-legend {\n\t\tmargin-top: 1rem;\n\t}\n\n\t.label {\n\t\tmargin-bottom: 0px; // Add space between label and pie chart\n\t\tfont-weight: 600; // Make label more prominent than note\n\t\tfont-size: 16px; // Set explicit font size\n\t}\n\n\t.note {\n\t\tmargin-top: 0px; // Add space between pie chart and note\n\t\tfont-size: 14px; // Slightly smaller text for hierarchy\n\t}\n}\n"],"names":[],"sourceRoot":""}
@@ -1,9 +0,0 @@
1
- /**
2
- * @license React
3
- * react-jsx-runtime.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */
@@ -1 +0,0 @@
1
- {"version":3,"file":"components/bar-chart/style.css","mappings":"AAAA,sBACC,kBAEA,sBACC,gB;ACAA,iCACE,cAJc,CAKd,iBACA,2B;ACPJ,sBACE,cACA,iCACA,WACA,kBACA,eACA,oCACA,kBACA,oBACA,iC;ACRD,sBACC,aACA,mBACA,eACA,SAGD,sBACC,aACA,sBACA,QAIF,sBACC,aACA,mBACA,QACA,kBAGD,sBACC,kBAGD,sBACC,iCACA,aACA,mBACA,UAGD,sBACC,gB","sources":["webpack://@automattic/charts/./src/components/bar-chart/bar-chart.module.scss","webpack://@automattic/charts/./src/components/grid-control/grid-control.module.scss","webpack://@automattic/charts/./src/components/tooltip/base-tooltip.module.scss","webpack://@automattic/charts/./src/components/legend/legend.module.scss"],"sourcesContent":[".bar-chart {\n\tposition: relative;\n\t\n\t&-legend {\n\t\tmargin-top: 1rem;\n\t}\n}\n","// Variables\n$grid-line-color: #d7d6d6;\n\n.grid-control {\n :global(.visx-line) {\n stroke: $grid-line-color;\n stroke-width: 1px;\n shape-rendering: crispEdges;\n }\n} ",".tooltip {\n padding: 0.5rem;\n background-color: rgba(0, 0, 0, 0.85);\n color: white;\n border-radius: 4px;\n font-size: 14px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);\n position: absolute;\n pointer-events: none;\n transform: translate(-50%, -100%);\n}\n",".legend {\n\t&--horizontal {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\tflex-wrap: wrap;\n\t\tgap: 16px;\n\t}\n\n\t&--vertical {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: 8px;\n\t}\n}\n\n.legend-item {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tfont-size: 0.875rem;\n}\n\n.legend-item-swatch {\n\tborder-radius: 2px;\n}\n\n.legend-item-label {\n\tcolor: var(--jp-gray-80, #2c3338);\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 0.5rem;\n}\n\n.legend-item-value {\n\tfont-weight: 500;\n}\n"],"names":[],"sourceRoot":""}
@@ -1,9 +0,0 @@
1
- /**
2
- * @license React
3
- * react-jsx-runtime.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */
@@ -1 +0,0 @@
1
- {"version":3,"file":"components/grid-control/style.css","mappings":"AAIE,iCACE,cAJc,CAKd,iBACA,2B","sources":["webpack://@automattic/charts/./src/components/grid-control/grid-control.module.scss"],"sourcesContent":["// Variables\n$grid-line-color: #d7d6d6;\n\n.grid-control {\n :global(.visx-line) {\n stroke: $grid-line-color;\n stroke-width: 1px;\n shape-rendering: crispEdges;\n }\n} "],"names":[],"sourceRoot":""}
@@ -1,9 +0,0 @@
1
- /**
2
- * @license React
3
- * react-jsx-runtime.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */
@@ -1 +0,0 @@
1
- {"version":3,"file":"components/legend/style.css","mappings":"AACC,sBACC,aACA,mBACA,eACA,SAGD,sBACC,aACA,sBACA,QAIF,sBACC,aACA,mBACA,QACA,kBAGD,sBACC,kBAGD,sBACC,iCACA,aACA,mBACA,UAGD,sBACC,gB","sources":["webpack://@automattic/charts/./src/components/legend/legend.module.scss"],"sourcesContent":[".legend {\n\t&--horizontal {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\tflex-wrap: wrap;\n\t\tgap: 16px;\n\t}\n\n\t&--vertical {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: 8px;\n\t}\n}\n\n.legend-item {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tfont-size: 0.875rem;\n}\n\n.legend-item-swatch {\n\tborder-radius: 2px;\n}\n\n.legend-item-label {\n\tcolor: var(--jp-gray-80, #2c3338);\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 0.5rem;\n}\n\n.legend-item-value {\n\tfont-weight: 500;\n}\n"],"names":[],"sourceRoot":""}
@@ -1,9 +0,0 @@
1
- /**
2
- * @license React
3
- * react-jsx-runtime.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */
@@ -1 +0,0 @@
1
- {"version":3,"file":"components/line-chart/style.css","mappings":"AAAA,sBACC,kBAEA,sBACC,gBACA,cAGD,sBACC,iBACA,oBAGD,sBACC,aACA,mBACA,cACA,8BAGD,sBACC,gBACA,mB;ACrBD,sBACC,aACA,mBACA,eACA,SAGD,sBACC,aACA,sBACA,QAIF,sBACC,aACA,mBACA,QACA,kBAGD,sBACC,kBAGD,sBACC,iCACA,aACA,mBACA,UAGD,sBACC,gB","sources":["webpack://@automattic/charts/./src/components/line-chart/line-chart.module.scss","webpack://@automattic/charts/./src/components/legend/legend.module.scss"],"sourcesContent":[".line-chart {\n\tposition: relative;\n\n\t&__tooltip {\n\t\tbackground: #fff;\n\t\tpadding: 0.5rem;\n\t}\n\n\t&__tooltip-date {\n\t\tfont-weight: bold;\n\t\tpadding-bottom: 10px;\n\t}\n\n\t&__tooltip-row {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tpadding: 4px 0;\n\t\tjustify-content: space-between;\n\t}\n\n\t&__tooltip-label {\n\t\tfont-weight: 500;\n\t\tpadding-right: 1rem;\n\t}\n}\n",".legend {\n\t&--horizontal {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\tflex-wrap: wrap;\n\t\tgap: 16px;\n\t}\n\n\t&--vertical {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: 8px;\n\t}\n}\n\n.legend-item {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tfont-size: 0.875rem;\n}\n\n.legend-item-swatch {\n\tborder-radius: 2px;\n}\n\n.legend-item-label {\n\tcolor: var(--jp-gray-80, #2c3338);\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 0.5rem;\n}\n\n.legend-item-value {\n\tfont-weight: 500;\n}\n"],"names":[],"sourceRoot":""}
@@ -1,9 +0,0 @@
1
- /**
2
- * @license React
3
- * react-jsx-runtime.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */
@@ -1 +0,0 @@
1
- {"version":3,"file":"components/pie-chart/style.css","mappings":"AAAA,sBACC,kB;ACAA,sBACC,aACA,mBACA,eACA,SAGD,sBACC,aACA,sBACA,QAIF,sBACC,aACA,mBACA,QACA,kBAGD,sBACC,kBAGD,sBACC,iCACA,aACA,mBACA,UAGD,sBACC,gB;AClCD,sBACE,cACA,iCACA,WACA,kBACA,eACA,oCACA,kBACA,oBACA,iC","sources":["webpack://@automattic/charts/./src/components/pie-chart/pie-chart.module.scss","webpack://@automattic/charts/./src/components/legend/legend.module.scss","webpack://@automattic/charts/./src/components/tooltip/base-tooltip.module.scss"],"sourcesContent":[".pie-chart {\n\tposition: relative;\n}\n",".legend {\n\t&--horizontal {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\tflex-wrap: wrap;\n\t\tgap: 16px;\n\t}\n\n\t&--vertical {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: 8px;\n\t}\n}\n\n.legend-item {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tfont-size: 0.875rem;\n}\n\n.legend-item-swatch {\n\tborder-radius: 2px;\n}\n\n.legend-item-label {\n\tcolor: var(--jp-gray-80, #2c3338);\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 0.5rem;\n}\n\n.legend-item-value {\n\tfont-weight: 500;\n}\n",".tooltip {\n padding: 0.5rem;\n background-color: rgba(0, 0, 0, 0.85);\n color: white;\n border-radius: 4px;\n font-size: 14px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);\n position: absolute;\n pointer-events: none;\n transform: translate(-50%, -100%);\n}\n"],"names":[],"sourceRoot":""}
@@ -1,9 +0,0 @@
1
- /**
2
- * @license React
3
- * react-jsx-runtime.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */
@@ -1 +0,0 @@
1
- {"version":3,"file":"components/pie-semi-circle-chart/style.css","mappings":"AAAA,sBACC,kBACA,kBAEA,sBACC,gBAGD,4CACC,kBACA,gBACA,eAGD,4CACC,eACA,e;AChBF,sBACE,cACA,iCACA,WACA,kBACA,eACA,oCACA,kBACA,oBACA,iC;ACRD,sBACC,aACA,mBACA,eACA,SAGD,sBACC,aACA,sBACA,QAIF,sBACC,aACA,mBACA,QACA,kBAGD,sBACC,kBAGD,sBACC,iCACA,aACA,mBACA,UAGD,sBACC,gB","sources":["webpack://@automattic/charts/./src/components/pie-semi-circle-chart/pie-semi-circle-chart.module.scss","webpack://@automattic/charts/./src/components/tooltip/base-tooltip.module.scss","webpack://@automattic/charts/./src/components/legend/legend.module.scss"],"sourcesContent":[".pie-semi-circle-chart {\n\tposition: relative;\n\ttext-align: center;\n\n\t&-legend {\n\t\tmargin-top: 1rem;\n\t}\n\n\t.label {\n\t\tmargin-bottom: 0px; // Add space between label and pie chart\n\t\tfont-weight: 600; // Make label more prominent than note\n\t\tfont-size: 16px; // Set explicit font size\n\t}\n\n\t.note {\n\t\tmargin-top: 0px; // Add space between pie chart and note\n\t\tfont-size: 14px; // Slightly smaller text for hierarchy\n\t}\n}\n",".tooltip {\n padding: 0.5rem;\n background-color: rgba(0, 0, 0, 0.85);\n color: white;\n border-radius: 4px;\n font-size: 14px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);\n position: absolute;\n pointer-events: none;\n transform: translate(-50%, -100%);\n}\n",".legend {\n\t&--horizontal {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\tflex-wrap: wrap;\n\t\tgap: 16px;\n\t}\n\n\t&--vertical {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: 8px;\n\t}\n}\n\n.legend-item {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tfont-size: 0.875rem;\n}\n\n.legend-item-swatch {\n\tborder-radius: 2px;\n}\n\n.legend-item-label {\n\tcolor: var(--jp-gray-80, #2c3338);\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 0.5rem;\n}\n\n.legend-item-value {\n\tfont-weight: 500;\n}\n"],"names":[],"sourceRoot":""}
@@ -1,9 +0,0 @@
1
- /**
2
- * @license React
3
- * react-jsx-runtime.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */
@@ -1 +0,0 @@
1
- {"version":3,"file":"components/tooltip/style.css","mappings":"AAAA,sBACE,cACA,iCACA,WACA,kBACA,eACA,oCACA,kBACA,oBACA,iC","sources":["webpack://@automattic/charts/./src/components/tooltip/base-tooltip.module.scss"],"sourcesContent":[".tooltip {\n padding: 0.5rem;\n background-color: rgba(0, 0, 0, 0.85);\n color: white;\n border-radius: 4px;\n font-size: 14px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);\n position: absolute;\n pointer-events: none;\n transform: translate(-50%, -100%);\n}\n"],"names":[],"sourceRoot":""}
@@ -1,9 +0,0 @@
1
- /**
2
- * @license React
3
- * react-jsx-runtime.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */
@@ -1,9 +0,0 @@
1
- /**
2
- * @license React
3
- * react-jsx-runtime.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */
@@ -1 +0,0 @@
1
- {"version":3,"file":"style.css","mappings":"AAAA,sBACC,kBAEA,sBACC,gB;ACAA,iCACE,cAJc,CAKd,iBACA,2B;ACPJ,sBACE,cACA,iCACA,WACA,kBACA,eACA,oCACA,kBACA,oBACA,iC;ACRD,sBACC,aACA,mBACA,eACA,SAGD,sBACC,aACA,sBACA,QAIF,sBACC,aACA,mBACA,QACA,kBAGD,sBACC,kBAGD,sBACC,iCACA,aACA,mBACA,UAGD,sBACC,gB;AClCD,sBACC,kBAEA,sBACC,gBACA,cAGD,sBACC,iBACA,oBAGD,sBACC,aACA,mBACA,cACA,8BAGD,sBACC,gBACA,mB;ACtBF,sBACC,kB;ACDD,sBACC,kBACA,kBAEA,sBACC,gBAGD,4CACC,kBACA,gBACA,eAGD,4CACC,eACA,e","sources":["webpack://@automattic/charts/./src/components/bar-chart/bar-chart.module.scss","webpack://@automattic/charts/./src/components/grid-control/grid-control.module.scss","webpack://@automattic/charts/./src/components/tooltip/base-tooltip.module.scss","webpack://@automattic/charts/./src/components/legend/legend.module.scss","webpack://@automattic/charts/./src/components/line-chart/line-chart.module.scss","webpack://@automattic/charts/./src/components/pie-chart/pie-chart.module.scss","webpack://@automattic/charts/./src/components/pie-semi-circle-chart/pie-semi-circle-chart.module.scss"],"sourcesContent":[".bar-chart {\n\tposition: relative;\n\t\n\t&-legend {\n\t\tmargin-top: 1rem;\n\t}\n}\n","// Variables\n$grid-line-color: #d7d6d6;\n\n.grid-control {\n :global(.visx-line) {\n stroke: $grid-line-color;\n stroke-width: 1px;\n shape-rendering: crispEdges;\n }\n} ",".tooltip {\n padding: 0.5rem;\n background-color: rgba(0, 0, 0, 0.85);\n color: white;\n border-radius: 4px;\n font-size: 14px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);\n position: absolute;\n pointer-events: none;\n transform: translate(-50%, -100%);\n}\n",".legend {\n\t&--horizontal {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\tflex-wrap: wrap;\n\t\tgap: 16px;\n\t}\n\n\t&--vertical {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: 8px;\n\t}\n}\n\n.legend-item {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tfont-size: 0.875rem;\n}\n\n.legend-item-swatch {\n\tborder-radius: 2px;\n}\n\n.legend-item-label {\n\tcolor: var(--jp-gray-80, #2c3338);\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 0.5rem;\n}\n\n.legend-item-value {\n\tfont-weight: 500;\n}\n",".line-chart {\n\tposition: relative;\n\n\t&__tooltip {\n\t\tbackground: #fff;\n\t\tpadding: 0.5rem;\n\t}\n\n\t&__tooltip-date {\n\t\tfont-weight: bold;\n\t\tpadding-bottom: 10px;\n\t}\n\n\t&__tooltip-row {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tpadding: 4px 0;\n\t\tjustify-content: space-between;\n\t}\n\n\t&__tooltip-label {\n\t\tfont-weight: 500;\n\t\tpadding-right: 1rem;\n\t}\n}\n",".pie-chart {\n\tposition: relative;\n}\n",".pie-semi-circle-chart {\n\tposition: relative;\n\ttext-align: center;\n\n\t&-legend {\n\t\tmargin-top: 1rem;\n\t}\n\n\t.label {\n\t\tmargin-bottom: 0px; // Add space between label and pie chart\n\t\tfont-weight: 600; // Make label more prominent than note\n\t\tfont-size: 16px; // Set explicit font size\n\t}\n\n\t.note {\n\t\tmargin-top: 0px; // Add space between pie chart and note\n\t\tfont-size: 14px; // Slightly smaller text for hierarchy\n\t}\n}\n"],"names":[],"sourceRoot":""}
@@ -1,5 +0,0 @@
1
- import type { BaseChartProps, SeriesData } from '../../types';
2
- interface BarChartProps extends BaseChartProps<SeriesData[]> {
3
- }
4
- declare const _default: (props: Omit<BarChartProps, "width" | "height">) => import("react/jsx-runtime").JSX.Element;
5
- export default _default;
@@ -1 +0,0 @@
1
- export { default as BarChart } from './bar-chart';
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import type { GridProps } from '../../types';
3
- declare const GridControl: React.FC<GridProps>;
4
- export default GridControl;
@@ -1 +0,0 @@
1
- export { default as GridControl } from './grid-control';
@@ -1,3 +0,0 @@
1
- import { FC } from 'react';
2
- import type { LegendProps } from './types';
3
- export declare const BaseLegend: FC<LegendProps>;
@@ -1,2 +0,0 @@
1
- export { BaseLegend as Legend } from './base-legend';
2
- export type { LegendProps } from './types';
@@ -1,12 +0,0 @@
1
- import { scaleOrdinal } from '@visx/scale';
2
- export type LegendItem = {
3
- label: string;
4
- value: number | string;
5
- color: string;
6
- };
7
- export type LegendProps = {
8
- items: LegendItem[];
9
- className?: string;
10
- orientation?: 'horizontal' | 'vertical';
11
- scale?: ReturnType<typeof scaleOrdinal>;
12
- };
@@ -1 +0,0 @@
1
- export { default as LineChart } from './line-chart';
@@ -1,11 +0,0 @@
1
- import type { BaseChartProps, SeriesData } from '../../types';
2
- interface LineChartProps extends BaseChartProps<SeriesData[]> {
3
- margin?: {
4
- top: number;
5
- right: number;
6
- bottom: number;
7
- left: number;
8
- };
9
- }
10
- declare const _default: (props: Omit<LineChartProps, "width" | "height">) => import("react/jsx-runtime").JSX.Element;
11
- export default _default;
@@ -1 +0,0 @@
1
- export { default as PieChart } from './pie-chart';
@@ -1,9 +0,0 @@
1
- import type { BaseChartProps, DataPointPercentage } from '../../types';
2
- interface PieChartProps extends BaseChartProps<DataPointPercentage[]> {
3
- /**
4
- * Inner radius in pixels. If > 0, creates a donut chart. Defaults to 0.
5
- */
6
- innerRadius?: number;
7
- }
8
- declare const _default: (props: Omit<PieChartProps, "width" | "height">) => import("react/jsx-runtime").JSX.Element;
9
- export default _default;
@@ -1 +0,0 @@
1
- export { default as PieSemiCircleChart } from './pie-semi-circle-chart';
@@ -1,22 +0,0 @@
1
- import type { BaseChartProps, DataPointPercentage } from '../../types';
2
- interface PieSemiCircleChartProps extends BaseChartProps<DataPointPercentage[]> {
3
- /**
4
- * Label text to display above the chart
5
- */
6
- label: string;
7
- /**
8
- * Note text to display below the label
9
- */
10
- note: string;
11
- /**
12
- * Direction of chart rendering
13
- * true for clockwise, false for counter-clockwise
14
- */
15
- clockwise?: boolean;
16
- /**
17
- * Thickness of the pie chart. A value between 0 and 1
18
- */
19
- thickness?: number;
20
- }
21
- declare const _default: (props: Omit<PieSemiCircleChartProps, "width" | "height">) => import("react/jsx-runtime").JSX.Element;
22
- export default _default;
@@ -1,17 +0,0 @@
1
- import { ComponentType } from 'react';
2
- import type { BaseChartProps } from '../../types';
3
- type ResponsiveConfig = {
4
- maxWidth?: number;
5
- aspectRatio?: number;
6
- debounceTime?: number;
7
- };
8
- /**
9
- * A higher-order component that provides responsive width and height
10
- * to the wrapped chart component using useParentSize from @visx/responsive.
11
- *
12
- * @param WrappedComponent - The chart component to be wrapped.
13
- * @param config - Optional configuration for responsive behavior
14
- * @return A functional component that renders the wrapped component with responsive dimensions.
15
- */
16
- export declare function withResponsive<T extends BaseChartProps<unknown>>(WrappedComponent: ComponentType<T>, config?: ResponsiveConfig): (props: Omit<T, "width" | "height">) => import("react/jsx-runtime").JSX.Element;
17
- export {};
@@ -1,29 +0,0 @@
1
- import type { CSSProperties, ComponentType, ReactNode } from 'react';
2
- type TooltipData = {
3
- label: string;
4
- value: number;
5
- valueDisplay?: string;
6
- };
7
- type TooltipComponentProps = {
8
- data: TooltipData;
9
- className?: string;
10
- };
11
- type TooltipCommonProps = {
12
- top: number;
13
- left: number;
14
- style?: CSSProperties;
15
- className?: string;
16
- };
17
- type DefaultDataTooltip = {
18
- data: TooltipData;
19
- component?: ComponentType<TooltipComponentProps>;
20
- children?: never;
21
- };
22
- type CustomTooltip = {
23
- children: ReactNode;
24
- data?: never;
25
- component?: never;
26
- };
27
- type BaseTooltipProps = TooltipCommonProps & (DefaultDataTooltip | CustomTooltip);
28
- export declare const BaseTooltip: ({ data, top, left, component: Component, children, className, }: BaseTooltipProps) => import("react/jsx-runtime").JSX.Element;
29
- export type { BaseTooltipProps, TooltipData };
@@ -1,2 +0,0 @@
1
- export { BaseTooltip } from './base-tooltip';
2
- export type { BaseTooltipProps, TooltipData } from './base-tooltip';
@@ -1,41 +0,0 @@
1
- import type { DataPoint } from '../types';
2
- type UseChartMouseHandlerProps = {
3
- /**
4
- * Whether tooltips are enabled
5
- */
6
- withTooltips: boolean;
7
- };
8
- type UseChartMouseHandlerReturn = {
9
- /**
10
- * Handler for mouse move events
11
- */
12
- onMouseMove: (event: React.MouseEvent<SVGElement>, data: DataPoint) => void;
13
- /**
14
- * Handler for mouse leave events
15
- */
16
- onMouseLeave: () => void;
17
- /**
18
- * Whether the tooltip is currently open
19
- */
20
- tooltipOpen: boolean;
21
- /**
22
- * The current tooltip data
23
- */
24
- tooltipData: DataPoint | null;
25
- /**
26
- * The current tooltip left position
27
- */
28
- tooltipLeft: number | undefined;
29
- /**
30
- * The current tooltip top position
31
- */
32
- tooltipTop: number | undefined;
33
- };
34
- /**
35
- * Hook to handle mouse interactions for chart components
36
- *
37
- * @param {UseChartMouseHandlerProps} props - Hook configuration
38
- * @return {UseChartMouseHandlerReturn} Object containing handlers and tooltip state
39
- */
40
- declare const useChartMouseHandler: ({ withTooltips, }: UseChartMouseHandlerProps) => UseChartMouseHandlerReturn;
41
- export default useChartMouseHandler;
@@ -1,8 +0,0 @@
1
- export { BarChart } from './components/bar-chart';
2
- export { LineChart } from './components/line-chart';
3
- export { PieChart } from './components/pie-chart';
4
- export { PieSemiCircleChart } from './components/pie-semi-circle-chart';
5
- export { BaseTooltip } from './components/tooltip';
6
- export { Legend } from './components/legend';
7
- export { ThemeProvider } from './providers/theme';
8
- export { default as useChartMouseHandler } from './hooks/use-chart-mouse-handler';
@@ -1,2 +0,0 @@
1
- export { ThemeProvider, useChartTheme } from './theme-provider';
2
- export { defaultTheme, jetpackTheme, wooTheme } from './themes';
@@ -1,18 +0,0 @@
1
- import { FC, type ReactNode } from 'react';
2
- import type { ChartTheme } from '../../types';
3
- /**
4
- * Hook to access chart theme
5
- * @return {object} A built theme configuration compatible with visx charts
6
- */
7
- declare const useChartTheme: () => ChartTheme;
8
- /**
9
- * Props for the ThemeProvider component
10
- */
11
- type ThemeProviderProps = {
12
- /** Optional partial theme override */
13
- theme?: Partial<ChartTheme>;
14
- /** Child components that will have access to the theme */
15
- children: ReactNode;
16
- };
17
- declare const ThemeProvider: FC<ThemeProviderProps>;
18
- export { ThemeProvider, useChartTheme };
@@ -1,14 +0,0 @@
1
- import type { ChartTheme } from '../../types';
2
- /**
3
- * Default theme configuration
4
- */
5
- declare const defaultTheme: ChartTheme;
6
- /**
7
- * Jetpack theme configuration
8
- */
9
- declare const jetpackTheme: ChartTheme;
10
- /**
11
- * Woo theme configuration
12
- */
13
- declare const wooTheme: ChartTheme;
14
- export { defaultTheme, jetpackTheme, wooTheme };