@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
@@ -1 +1 @@
1
- {"version":3,"file":"components/line-chart/index.js","mappings":";4CASiBA,EAAE,EAAQ,KAASC,EAAEC,OAAOC,IAAI,iBAAgDC,GAA7BF,OAAOC,IAAI,kBAAoBE,OAAOC,UAAUC,gBAAeC,EAAER,EAAES,mDAAmDC,kBAAkBC,EAAE,CAACC,KAAI,EAAGC,KAAI,EAAGC,QAAO,EAAGC,UAAS,GAChP,SAASC,EAAEC,EAAEC,EAAEC,GAAG,IAAIC,EAAEC,EAAE,CAAC,EAAEC,EAAE,KAAKC,EAAE,KAAiF,IAAIH,UAAhF,IAASD,IAAIG,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B,EACnBC,kBAAgB,EAChBtE,cAAgBA,OAKjByC,IACD/D,EAAAA,EAAAA,KAAC6F,EAAM,CACNzG,MAAQgF,EACR7E,YAAc0E,EACd5E,UAAYa,EAAQ,yBAKzB,EMzI+E4F,GAA9E3G,EAA4E,CAAC,GAArE4G,SAAAA,OAAQ,IAAAD,EAAG,KAAIA,EAAEE,OAAW,KAAbC,EAAA9G,EAAE6G,aAAc,GAAGC,EAAEC,OAAY,KAAdC,EAAAhH,EAAE+G,cAAe,GAAEC,EAEtD,SAA0BxK,GAChC,IAAAyK,GAA0CC,EAAAA,EAAAA,eAAe,CACxDH,aAAAA,EACAI,2BAA2B,EAC3BC,YAAa,CAAEtF,MAAO,IAAKC,OAAQ,OAH5BsF,EAASJ,EAATI,UAAkBC,EAAWL,EAAlBnF,MAObyF,EAAiBD,EAAcE,KAAKC,IAAKH,EAAaV,GAAa,IACnEc,EAAkBH,EAAiBV,EAEzC,OACChG,EAAAA,EAAAA,KAAA,OACCpF,IAAM4L,EACNM,MAAQ,CACP7F,MAAO,OACP8F,UAAW,GAAF3G,OAAMyG,EAAe,OAC5BvG,UAEHN,EAAAA,EAAAA,KAACmD,EAAgBoC,EAAA,CAChBtE,MAAQyF,EACRxF,OAAS2F,GAEFlL,KAIX,GAjCM,IACNwH,EAGAhE,EAA8E2G,EAAtEC,EAAeE,EAAED,EAAiBG,EAAED","sources":["webpack://@automattic/charts/../../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.production.min.js","webpack://@automattic/charts/../../../node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js","webpack://@automattic/charts/external commonjs2 \"react\"","webpack://@automattic/charts/webpack/bootstrap","webpack://@automattic/charts/webpack/runtime/compat get default export","webpack://@automattic/charts/webpack/runtime/define property getters","webpack://@automattic/charts/webpack/runtime/hasOwnProperty shorthand","webpack://@automattic/charts/webpack/runtime/make namespace object","webpack://@automattic/charts/../../../node_modules/.pnpm/@babel+runtime@7.26.0/node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://@automattic/charts/../../../node_modules/.pnpm/@babel+runtime@7.26.0/node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://@automattic/charts/../../../node_modules/.pnpm/@babel+runtime@7.26.0/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://@automattic/charts/../../../node_modules/.pnpm/@babel+runtime@7.26.0/node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://@automattic/charts/../../../node_modules/.pnpm/@babel+runtime@7.26.0/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack://@automattic/charts/external commonjs2 \"@visx/xychart\"","webpack://@automattic/charts/external commonjs2 \"clsx\"","webpack://@automattic/charts/./src/providers/theme/themes.ts","webpack://@automattic/charts/./src/providers/theme/theme-provider.tsx","webpack://@automattic/charts/external commonjs2 \"@visx/legend\"","webpack://@automattic/charts/external commonjs2 \"@visx/scale\"","webpack://@automattic/charts/./src/components/legend/legend.module.scss?843e","webpack://@automattic/charts/./src/components/legend/base-legend.tsx","webpack://@automattic/charts/external commonjs2 \"@visx/responsive\"","webpack://@automattic/charts/./src/components/line-chart/line-chart.module.scss?db8b","webpack://@automattic/charts/./src/components/line-chart/line-chart.tsx","webpack://@automattic/charts/../../../node_modules/.pnpm/@babel+runtime@7.26.0/node_modules/@babel/runtime/helpers/esm/slicedToArray.js","webpack://@automattic/charts/../../../node_modules/.pnpm/@babel+runtime@7.26.0/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","webpack://@automattic/charts/../../../node_modules/.pnpm/@babel+runtime@7.26.0/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","webpack://@automattic/charts/../../../node_modules/.pnpm/@babel+runtime@7.26.0/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack://@automattic/charts/../../../node_modules/.pnpm/@babel+runtime@7.26.0/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","webpack://@automattic/charts/./src/components/shared/with-responsive.tsx"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","module.exports = require(\"react\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}\nexport { _typeof as default };","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nexport { _defineProperty as default };","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nexport { toPropertyKey as default };","import _typeof from \"./typeof.js\";\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nexport { toPrimitive as default };","function _arrayLikeToArray(r, a) {\n (null == a || a > r.length) && (a = r.length);\n for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n return n;\n}\nexport { _arrayLikeToArray as default };","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@visx/xychart\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"clsx\");","import type { ChartTheme } from '../../types';\n\n/**\n * Default theme configuration\n */\nconst defaultTheme: ChartTheme = {\n\tbackgroundColor: '#FFFFFF', // chart background color\n\tlabelBackgroundColor: '#FFFFFF', // label background color\n\tcolors: [ '#98C8DF', '#006DAB', '#A6DC80', '#1F9828', '#FF8C8F' ],\n\tgridStyles: {\n\t\tstroke: '#787C82',\n\t\tstrokeWidth: 1,\n\t},\n\ttickLength: 0,\n\tgridColor: '',\n\tgridColorDark: '',\n};\n\n/**\n * Jetpack theme configuration\n */\nconst jetpackTheme: ChartTheme = {\n\tbackgroundColor: '#FFFFFF', // chart background color\n\tlabelBackgroundColor: '#FFFFFF', // label background color\n\tcolors: [ '#98C8DF', '#006DAB', '#A6DC80', '#1F9828', '#FF8C8F' ],\n\tgridStyles: {\n\t\tstroke: '#787C82',\n\t\tstrokeWidth: 1,\n\t},\n\ttickLength: 0,\n\tgridColor: '',\n\tgridColorDark: '',\n};\n\n/**\n * Woo theme configuration\n */\nconst wooTheme: ChartTheme = {\n\tbackgroundColor: '#FFFFFF', // chart background color\n\tlabelBackgroundColor: '#FFFFFF', // label background color\n\tcolors: [ '#80C8FF', '#B999FF', '#3858E9' ],\n\tgridStyles: {\n\t\tstroke: '#787C82',\n\t\tstrokeWidth: 1,\n\t},\n\ttickLength: 0,\n\tgridColor: '',\n\tgridColorDark: '',\n};\n\nexport { defaultTheme, jetpackTheme, wooTheme };\n","import { createContext, useContext, FC, type ReactNode } from 'react';\nimport { defaultTheme } from './themes';\nimport type { ChartTheme } from '../../types';\n\n/**\n * Context for sharing theme configuration across components\n */\nconst ThemeContext = createContext< ChartTheme >( defaultTheme );\n\n/**\n * Hook to access chart theme\n * @return {object} A built theme configuration compatible with visx charts\n */\nconst useChartTheme = () => {\n\tconst theme = useContext( ThemeContext );\n\treturn theme;\n};\n\n/**\n * Props for the ThemeProvider component\n */\ntype ThemeProviderProps = {\n\t/** Optional partial theme override */\n\ttheme?: Partial< ChartTheme >;\n\t/** Child components that will have access to the theme */\n\tchildren: ReactNode;\n};\n\n// Provider component for chart theming\n// Allows theme customization through props while maintaining default values\nconst ThemeProvider: FC< ThemeProviderProps > = ( { theme = {}, children } ) => {\n\tconst mergedTheme = { ...defaultTheme, ...theme };\n\treturn <ThemeContext.Provider value={ mergedTheme }>{ children }</ThemeContext.Provider>;\n};\n\nexport { ThemeProvider, useChartTheme };\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@visx/legend\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@visx/scale\");","// extracted by mini-css-extract-plugin\nexport default {\"legend--horizontal\":\"b1_5FxxoK4aEFLoe67IA\",\"legend--vertical\":\"vpmQkJAPhp3XJ9Wb6vOw\",\"legend-item\":\"IKM8KG1lF9e5NzDqMLOJ\",\"legend-item-swatch\":\"_eccyBq0v2puKsHw8XND\",\"legend-item-label\":\"UeZrUEpEK0tLzXHmeUco\",\"legend-item-value\":\"R5msPOYKm79jYV13H0v7\"};","import { LegendOrdinal } from '@visx/legend';\nimport { scaleOrdinal } from '@visx/scale';\nimport clsx from 'clsx';\nimport { FC } from 'react';\nimport styles from './legend.module.scss';\nimport type { LegendProps } from './types';\n\n/**\n * Base legend component that displays color-coded items with labels using visx\n * @param {object} props - Component properties\n * @param {Array} props.items - Array of legend items to display\n * @param {string} props.className - Additional CSS class names\n * @param {string} props.orientation - Layout orientation (horizontal/vertical)\n * @return {JSX.Element} Rendered legend component\n */\nconst orientationToFlexDirection = {\n\thorizontal: 'row' as const,\n\tvertical: 'column' as const,\n};\n\nexport const BaseLegend: FC< LegendProps > = ( {\n\titems,\n\tclassName,\n\torientation = 'horizontal',\n} ) => {\n\tconst legendScale = scaleOrdinal( {\n\t\tdomain: items.map( item => item.label ),\n\t\trange: items.map( item => item.color ),\n\t} );\n\n\treturn (\n\t\t<div\n\t\t\tclassName={ clsx( styles.legend, styles[ `legend--${ orientation }` ], className ) }\n\t\t\trole=\"list\"\n\t\t>\n\t\t\t<LegendOrdinal\n\t\t\t\tscale={ legendScale }\n\t\t\t\tdirection={ orientationToFlexDirection[ orientation ] }\n\t\t\t\tshape=\"rect\"\n\t\t\t\tshapeWidth={ 16 }\n\t\t\t\tshapeHeight={ 16 }\n\t\t\t\tclassName={ styles[ 'legend-items' ] }\n\t\t\t>\n\t\t\t\t{ labels => (\n\t\t\t\t\t<div className={ styles[ `legend--${ orientation }` ] }>\n\t\t\t\t\t\t{ labels.map( label => (\n\t\t\t\t\t\t\t<div key={ label.text } className={ styles[ 'legend-item' ] }>\n\t\t\t\t\t\t\t\t<svg width={ 16 } height={ 16 }>\n\t\t\t\t\t\t\t\t\t<rect\n\t\t\t\t\t\t\t\t\t\twidth={ 16 }\n\t\t\t\t\t\t\t\t\t\theight={ 16 }\n\t\t\t\t\t\t\t\t\t\tfill={ label.value }\n\t\t\t\t\t\t\t\t\t\tclassName={ styles[ 'legend-item-swatch' ] }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t\t<span className={ styles[ 'legend-item-label' ] }>\n\t\t\t\t\t\t\t\t\t{ label.text }\n\t\t\t\t\t\t\t\t\t{ items.find( item => item.label === label.text )?.value && (\n\t\t\t\t\t\t\t\t\t\t<span className={ styles[ 'legend-item-value' ] }>\n\t\t\t\t\t\t\t\t\t\t\t{ items.find( item => item.label === label.text )?.value }\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) ) }\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t</LegendOrdinal>\n\t\t</div>\n\t);\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@visx/responsive\");","// extracted by mini-css-extract-plugin\nexport default {\"line-chart\":\"vbyo4J2HC_KvyGgsWui7\",\"line-chart__tooltip\":\"nLSohGgB7OyUmLRN_dLD\",\"line-chart__tooltip-date\":\"MGw7UT3IImVKXXuBYmwf\",\"line-chart__tooltip-row\":\"KwvDxit9dbF2E6ZzF29e\",\"line-chart__tooltip-label\":\"WmFS4ekGu9e3G6URbkhd\"};","import {\n\tXYChart,\n\tAnimatedLineSeries,\n\tAnimatedAxis,\n\tAnimatedGrid,\n\tTooltip,\n\tbuildChartTheme,\n} from '@visx/xychart';\nimport clsx from 'clsx';\nimport { FC } from 'react';\nimport { useChartTheme } from '../../providers/theme/theme-provider';\nimport { Legend } from '../legend';\nimport { withResponsive } from '../shared/with-responsive';\nimport styles from './line-chart.module.scss';\nimport type { BaseChartProps, DataPointDate, SeriesData } from '../../types';\n\n// TODO: revisit grid and axis options - accept as props for frid lines, axis, values: x, y, all, none\n\ninterface LineChartProps extends BaseChartProps< SeriesData[] > {\n\tmargin?: { top: number; right: number; bottom: number; left: number };\n}\n\ntype TooltipData = {\n\tdate: Date;\n\t[ key: string ]: number | Date;\n};\n\ntype TooltipDatum = {\n\tkey: string;\n\tvalue: number;\n};\n\nconst renderTooltip = ( {\n\ttooltipData,\n}: {\n\ttooltipData?: {\n\t\tnearestDatum?: {\n\t\t\tdatum: TooltipData;\n\t\t\tkey: string;\n\t\t};\n\t\tdatumByKey?: { [ key: string ]: { datum: TooltipData } };\n\t};\n} ) => {\n\tconst nearestDatum = tooltipData?.nearestDatum?.datum;\n\tif ( ! nearestDatum ) return null;\n\n\tconst tooltipPoints: TooltipDatum[] = Object.entries( tooltipData?.datumByKey || {} )\n\t\t.map( ( [ key, { datum } ] ) => ( {\n\t\t\tkey,\n\t\t\tvalue: datum.value as number,\n\t\t} ) )\n\t\t.sort( ( a, b ) => b.value - a.value );\n\n\treturn (\n\t\t<div className={ styles[ 'line-chart__tooltip' ] }>\n\t\t\t<div className={ styles[ 'line-chart__tooltip-date' ] }>\n\t\t\t\t{ nearestDatum.date.toLocaleDateString() }\n\t\t\t</div>\n\t\t\t{ tooltipPoints.map( point => (\n\t\t\t\t<div key={ point.key } className={ styles[ 'line-chart__tooltip-row' ] }>\n\t\t\t\t\t<span className={ styles[ 'line-chart__tooltip-label' ] }>{ point.key }:</span>\n\t\t\t\t\t<span className={ styles[ 'line-chart__tooltip-value' ] }>{ point.value }</span>\n\t\t\t\t</div>\n\t\t\t) ) }\n\t\t</div>\n\t);\n};\n\nconst formatDateTick = ( value: number ) => {\n\tconst date = new Date( value );\n\treturn date.toLocaleDateString( undefined, {\n\t\tmonth: 'short',\n\t\tday: 'numeric',\n\t} );\n};\n\nconst LineChart: FC< LineChartProps > = ( {\n\tdata,\n\twidth,\n\theight,\n\tmargin = { top: 20, right: 20, bottom: 40, left: 40 },\n\tclassName,\n\twithTooltips = true,\n\tshowLegend = false,\n\tlegendOrientation = 'horizontal',\n} ) => {\n\tconst providerTheme = useChartTheme();\n\n\tif ( ! data?.length ) {\n\t\treturn (\n\t\t\t<div className={ clsx( 'line-chart-empty', styles[ 'line-chart-empty' ] ) }>Empty...</div>\n\t\t);\n\t}\n\n\t// Create legend items from group labels, this iterates over groups rather than data points\n\tconst legendItems = data.map( ( group, index ) => ( {\n\t\tlabel: group.label, // Label for each unique group\n\t\tvalue: '', // Empty string since we don't want to show a specific value\n\t\tcolor: providerTheme.colors[ index % providerTheme.colors.length ],\n\t} ) );\n\n\tconst accessors = {\n\t\txAccessor: ( d: DataPointDate ) => d.date,\n\t\tyAccessor: ( d: DataPointDate ) => d.value,\n\t};\n\n\tconst theme = buildChartTheme( {\n\t\tbackgroundColor: providerTheme.backgroundColor,\n\t\tcolors: providerTheme.colors,\n\t\tgridStyles: providerTheme.gridStyles,\n\t\ttickLength: providerTheme?.tickLength || 0,\n\t\tgridColor: providerTheme?.gridColor || '',\n\t\tgridColorDark: providerTheme?.gridColorDark || '',\n\t} );\n\n\treturn (\n\t\t<div className={ clsx( 'line-chart', styles[ 'line-chart' ], className ) }>\n\t\t\t<XYChart\n\t\t\t\ttheme={ theme }\n\t\t\t\twidth={ width }\n\t\t\t\theight={ height }\n\t\t\t\tmargin={ margin }\n\t\t\t\txScale={ { type: 'time' } }\n\t\t\t\tyScale={ { type: 'linear', nice: true } }\n\t\t\t>\n\t\t\t\t<AnimatedGrid columns={ false } numTicks={ 4 } />\n\t\t\t\t<AnimatedAxis orientation=\"bottom\" numTicks={ 5 } tickFormat={ formatDateTick } />\n\t\t\t\t<AnimatedAxis orientation=\"left\" numTicks={ 4 } />\n\n\t\t\t\t{ data.map( ( seriesData, index ) => (\n\t\t\t\t\t<AnimatedLineSeries\n\t\t\t\t\t\tkey={ seriesData?.label }\n\t\t\t\t\t\tdataKey={ seriesData?.label }\n\t\t\t\t\t\tdata={ seriesData.data as DataPointDate[] } // TODO: this needs fixing or a more specific type for each chart\n\t\t\t\t\t\t{ ...accessors }\n\t\t\t\t\t\tstroke={ theme.colors[ index % theme.colors.length ] }\n\t\t\t\t\t\tstrokeWidth={ 2 }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\n\t\t\t\t{ withTooltips && (\n\t\t\t\t\t<Tooltip\n\t\t\t\t\t\tsnapTooltipToDatumX\n\t\t\t\t\t\tsnapTooltipToDatumY\n\t\t\t\t\t\tshowSeriesGlyphs\n\t\t\t\t\t\trenderTooltip={ renderTooltip }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</XYChart>\n\n\t\t\t{ showLegend && (\n\t\t\t\t<Legend\n\t\t\t\t\titems={ legendItems }\n\t\t\t\t\torientation={ legendOrientation }\n\t\t\t\t\tclassName={ styles[ 'line-chart-legend' ] }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</div>\n\t);\n};\n\nexport default withResponsive< LineChartProps >( LineChart );\n","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nfunction _slicedToArray(r, e) {\n return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest();\n}\nexport { _slicedToArray as default };","function _arrayWithHoles(r) {\n if (Array.isArray(r)) return r;\n}\nexport { _arrayWithHoles as default };","function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}\nexport { _iterableToArrayLimit as default };","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nfunction _unsupportedIterableToArray(r, a) {\n if (r) {\n if (\"string\" == typeof r) return arrayLikeToArray(r, a);\n var t = {}.toString.call(r).slice(8, -1);\n return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0;\n }\n}\nexport { _unsupportedIterableToArray as default };","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nexport { _nonIterableRest as default };","import { useParentSize } from '@visx/responsive';\nimport { ComponentType } from 'react';\nimport type { BaseChartProps } from '../../types';\n\ntype ResponsiveConfig = {\n\tmaxWidth?: number;\n\taspectRatio?: number;\n\tdebounceTime?: number;\n};\n\n/**\n * A higher-order component that provides responsive width and height\n * to the wrapped chart component using useParentSize from @visx/responsive.\n *\n * @param WrappedComponent - The chart component to be wrapped.\n * @param config - Optional configuration for responsive behavior\n * @return A functional component that renders the wrapped component with responsive dimensions.\n */\nexport function withResponsive< T extends BaseChartProps< unknown > >(\n\tWrappedComponent: ComponentType< T >,\n\tconfig?: ResponsiveConfig\n) {\n\tconst { maxWidth = 1200, aspectRatio = 0.5, debounceTime = 50 } = config || {};\n\n\treturn function ResponsiveChart( props: Omit< T, 'width' | 'height' > ) {\n\t\tconst { parentRef, width: parentWidth } = useParentSize( {\n\t\t\tdebounceTime,\n\t\t\tenableDebounceLeadingCall: true,\n\t\t\tinitialSize: { width: 600, height: 400 },\n\t\t} );\n\n\t\t// Calculate dimensions\n\t\tconst containerWidth = parentWidth ? Math.min( parentWidth, maxWidth ) : 600;\n\t\tconst containerHeight = containerWidth * aspectRatio;\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref={ parentRef }\n\t\t\t\tstyle={ {\n\t\t\t\t\twidth: '100%',\n\t\t\t\t\tminHeight: `${ containerHeight }px`,\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<WrappedComponent\n\t\t\t\t\twidth={ containerWidth }\n\t\t\t\t\theight={ containerHeight }\n\t\t\t\t\t// When width and height are passed as props, they will override the responsive values, and the chart will become fixed size.\n\t\t\t\t\t{ ...( props as T ) }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t);\n\t};\n}\n"],"names":["f","k","Symbol","for","m","Object","prototype","hasOwnProperty","n","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactCurrentOwner","p","key","ref","__self","__source","q","c","a","g","b","d","e","h","call","defaultProps","$$typeof","type","props","_owner","current","exports","jsx","jsxs","module","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","getter","__esModule","definition","o","defineProperty","enumerable","get","obj","prop","r","toStringTag","value","_typeof","iterator","constructor","t","i","toPrimitive","TypeError","String","toPropertyKey","configurable","writable","_arrayLikeToArray","length","Array","defaultTheme","backgroundColor","labelBackgroundColor","colors","gridStyles","stroke","strokeWidth","tickLength","gridColor","gridColorDark","ThemeContext","createContext","orientationToFlexDirection","horizontal","vertical","BaseLegend","_ref","items","className","_ref$orientation","orientation","legendScale","scaleOrdinal","domain","map","item","label","range","color","_jsx","clsx","styles","legend","concat","role","children","LegendOrdinal","scale","direction","shape","shapeWidth","shapeHeight","labels","_items$find","_items$find2","_jsxs","width","height","fill","text","find","renderTooltip","_tooltipData$nearestD","tooltipData","nearestDatum","datum","tooltipPoints","entries","datumByKey","_ref2","_ref3","isArray","l","u","next","done","push","toString","slice","name","from","test","sort","date","toLocaleDateString","point","formatDateTick","Date","month","day","WrappedComponent","_ref4","data","_ref4$margin","margin","top","right","bottom","left","_ref4$withTooltips","withTooltips","_ref4$showLegend","showLegend","_ref4$legendOrientati","legendOrientation","providerTheme","useContext","legendItems","group","index","accessors","xAccessor","yAccessor","theme","buildChartTheme","XYChart","xScale","yScale","nice","AnimatedGrid","columns","numTicks","AnimatedAxis","tickFormat","seriesData","AnimatedLineSeries","_objectSpread","dataKey","Tooltip","snapTooltipToDatumX","snapTooltipToDatumY","showSeriesGlyphs","Legend","_ref$maxWidth","maxWidth","aspectRatio","_ref$aspectRatio","debounceTime","_ref$debounceTime","_useParentSize","useParentSize","enableDebounceLeadingCall","initialSize","parentRef","parentWidth","containerWidth","Math","min","containerHeight","style","minHeight"],"sourceRoot":""}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/providers/theme/themes.ts","../../../../src/providers/theme/theme-provider.tsx","../../../../src/components/legend/base-legend.tsx","../../../../src/components/line-chart/line-chart.tsx","../../../../src/components/shared/with-responsive.tsx"],"sourcesContent":[null,null,null,null,null],"names":["ThemeContext","createContext","backgroundColor","labelBackgroundColor","colors","gridStyles","stroke","strokeWidth","tickLength","gridColor","gridColorDark","orientationToFlexDirection","horizontal","vertical","BaseLegend","items","className","orientation","legendScale","scaleOrdinal","domain","map","item","label","range","color","_jsx","clsx","styles","legend","role","children","LegendOrdinal","scale","direction","shape","shapeWidth","shapeHeight","labels","_jsxs","jsx","width","height","fill","value","text","find","renderTooltip","tooltipData","nearestDatum","datum","tooltipPoints","Object","entries","datumByKey","key","sort","a","b","jsxs","date","toLocaleDateString","point","formatDateTick","Date","undefined","month","day","lineChart","WrappedComponent","config","maxWidth","aspectRatio","debounceTime","props","parentRef","parentWidth","useParentSize","enableDebounceLeadingCall","initialSize","containerWidth","Math","min","containerHeight","ref","style","minHeight","size","withResponsive","data","margin","top","right","bottom","left","withTooltips","showLegend","legendOrientation","withGradientFill","options","providerTheme","useContext","length","legendItems","group","index","accessors","xAccessor","d","yAccessor","theme","buildChartTheme","XYChart","xScale","type","yScale","nice","AnimatedGrid","columns","numTicks","AnimatedAxis","tickFormat","axis","x","y","seriesData","_Fragment","LinearGradient","id","from","to","toOpacity","gradient","AnimatedLineSeries","dataKey","AnimatedAreaSeries","renderLine","Tooltip","snapTooltipToDatumX","snapTooltipToDatumY","showSeriesGlyphs","Legend"],"mappings":"6NAKA,MCEMA,EAAeC,EAAAA,cDFY,CAChCC,gBAAiB,UACjBC,qBAAsB,UACtBC,OAAQ,CAAE,UAAW,UAAW,UAAW,UAAW,WACtDC,WAAY,CACXC,OAAQ,UACRC,YAAa,GAEdC,WAAY,EACZC,UAAW,GACXC,cAAe,uXEAhB,MAAMC,EAA6B,CAClCC,WAAY,MACZC,SAAU,UAGEC,EAAgC,EAC5CC,QACAC,YACAC,cAAc,iBAEd,MAAMC,EAAcC,EAAAA,aAAc,CACjCC,OAAQL,EAAMM,KAAKC,GAAQA,EAAKC,QAChCC,MAAOT,EAAMM,KAAKC,GAAQA,EAAKG,UAGhC,OACCC,aACCV,UAAYW,EAAMC,EAAOC,OAAQD,EAAQ,WAAYX,KAAkBD,GACvEc,KAAK,OAELC,SAAAL,EAAAA,IAACM,EAAAA,cACA,CAAAC,MAAQf,EACRgB,UAAYvB,EAA4BM,GACxCkB,MAAM,OACNC,WAAa,GACbC,YAAc,GACd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,EACLpG,OAASA,EACTC,YAAc,EACdoC,KAAO,sBAAuB8D,EAAQ,KACtC+B,YAAa,GAPPX,GAAYtG,SAWpB,IAGDwE,GACDrE,EAAAA,IAAC+G,EAAAA,SACAC,qBAAmB,EACnBC,qBACA,EAAAC,oBACA7F,cAAgBA,OAKjBiD,GACDtE,EAAAA,IAACmH,EACA,CAAA9H,MAAQwF,EACRtF,YAAcgF,EACdjF,UAAYY,EAAQ,yBAItB"}
@@ -1,4 +1,95 @@
1
- .vbyo4J2HC_KvyGgsWui7{position:relative}.nLSohGgB7OyUmLRN_dLD{background:#fff;padding:.5rem}.MGw7UT3IImVKXXuBYmwf{font-weight:bold;padding-bottom:10px}.KwvDxit9dbF2E6ZzF29e{display:flex;align-items:center;padding:4px 0;justify-content:space-between}.WmFS4ekGu9e3G6URbkhd{font-weight:500;padding-right:1rem}
2
- .b1_5FxxoK4aEFLoe67IA{display:flex;flex-direction:row;flex-wrap:wrap;gap:16px}.vpmQkJAPhp3XJ9Wb6vOw{display:flex;flex-direction:column;gap:8px}.IKM8KG1lF9e5NzDqMLOJ{display:flex;align-items:center;gap:8px;font-size:.875rem}._eccyBq0v2puKsHw8XND{border-radius:2px}.UeZrUEpEK0tLzXHmeUco{color:var(--jp-gray-80, #2c3338);display:flex;align-items:center;gap:.5rem}.R5msPOYKm79jYV13H0v7{font-weight:500}
1
+ .bar-chart-module__bar-chart__lmYNi {
2
+ position: relative;
3
+ }
4
+ .bar-chart-module__bar-chart-legend__vgKKq {
5
+ margin-top: 1rem;
6
+ }
7
+ .pie-chart-module__pie-chart__R12Vh {
8
+ position: relative;
9
+ }
10
+ .base-tooltip-module__tooltip__OfX6n {
11
+ padding: 0.5rem;
12
+ background-color: rgba(0, 0, 0, 0.85);
13
+ color: white;
14
+ border-radius: 4px;
15
+ font-size: 14px;
16
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
17
+ position: absolute;
18
+ pointer-events: none;
19
+ transform: translate(-50%, -100%);
20
+ }
21
+ .pie-semi-circle-chart-module__pie-semi-circle-chart__r5jk9 {
22
+ position: relative;
23
+ text-align: center;
24
+ }
25
+ .pie-semi-circle-chart-module__pie-semi-circle-chart-legend__c8W1Y {
26
+ margin-top: 1rem;
27
+ }
28
+ .pie-semi-circle-chart-module__pie-semi-circle-chart__r5jk9 .pie-semi-circle-chart-module__label__nPqOg {
29
+ margin-bottom: 0px;
30
+ font-weight: 600;
31
+ font-size: 16px;
32
+ }
33
+ .pie-semi-circle-chart-module__pie-semi-circle-chart__r5jk9 .pie-semi-circle-chart-module__note__LpBZQ {
34
+ margin-top: 0px;
35
+ font-size: 14px;
36
+ }
37
+ .grid-control-module__grid-control__KOnZN .visx-line {
38
+ stroke: #d7d6d6;
39
+ stroke-width: 1px;
40
+ shape-rendering: crispEdges;
41
+ }
42
+ .legend-module__legend--horizontal__IUN13 {
43
+ display: flex;
44
+ flex-direction: row;
45
+ flex-wrap: wrap;
46
+ gap: 16px;
47
+ }
48
+ .legend-module__legend--vertical__Scfzo {
49
+ display: flex;
50
+ flex-direction: column;
51
+ gap: 8px;
52
+ }
3
53
 
4
- /*# sourceMappingURL=style.css.map*/
54
+ .legend-module__legend-item__feemn {
55
+ display: flex;
56
+ align-items: center;
57
+ gap: 8px;
58
+ font-size: 0.875rem;
59
+ }
60
+
61
+ .legend-module__legend-item-swatch__nRyXf {
62
+ border-radius: 2px;
63
+ }
64
+
65
+ .legend-module__legend-item-label__ksx6I {
66
+ color: var(--jp-gray-80, #2c3338);
67
+ display: flex;
68
+ align-items: center;
69
+ gap: 0.5rem;
70
+ }
71
+
72
+ .legend-module__legend-item-value__d9x1j {
73
+ font-weight: 500;
74
+ }
75
+ .line-chart-module__line-chart__ITM3d {
76
+ position: relative;
77
+ }
78
+ .line-chart-module__line-chart__tooltip__aqcme {
79
+ background: #fff;
80
+ padding: 0.5rem;
81
+ }
82
+ .line-chart-module__line-chart__tooltip-date__4Dzab {
83
+ font-weight: bold;
84
+ padding-bottom: 10px;
85
+ }
86
+ .line-chart-module__line-chart__tooltip-row__6A37G {
87
+ display: flex;
88
+ align-items: center;
89
+ padding: 4px 0;
90
+ justify-content: space-between;
91
+ }
92
+ .line-chart-module__line-chart__tooltip-label__IvnFF {
93
+ font-weight: 500;
94
+ padding-right: 1rem;
95
+ }
@@ -1,3 +1,2 @@
1
- /*! For license information please see index.js.LICENSE.txt */
2
- (()=>{"use strict";var e={572:(e,t,r)=>{var o=r(953),n=Symbol.for("react.element"),i=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,a=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,r){var o,i={},u=null,s=null;for(o in void 0!==r&&(u=""+r),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(s=t.ref),t)l.call(t,o)&&!c.hasOwnProperty(o)&&(i[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===i[o]&&(i[o]=t[o]);return{$$typeof:n,type:e,key:u,ref:s,props:i,_owner:a.current}}t.Fragment=i,t.jsx=u,t.jsxs=u},48:(e,t,r)=>{e.exports=r(572)},953:e=>{e.exports=require("react")}},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function l(e,t,r){return(t=function(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.r(o),r.d(o,{PieChart:()=>L});const a=require("@visx/group"),c=require("@visx/shape"),u=require("clsx");var s=r.n(u);const d=require("@visx/event"),p=require("@visx/tooltip");var f=r(953);var v={backgroundColor:"#FFFFFF",labelBackgroundColor:"#FFFFFF",colors:["#98C8DF","#006DAB","#A6DC80","#1F9828","#FF8C8F"],gridStyles:{stroke:"#787C82",strokeWidth:1},tickLength:0,gridColor:"",gridColorDark:""},h=r(48),m=(0,f.createContext)(v);const y=require("@visx/legend"),b=require("@visx/scale"),g={"legend--horizontal":"b1_5FxxoK4aEFLoe67IA","legend--vertical":"vpmQkJAPhp3XJ9Wb6vOw","legend-item":"IKM8KG1lF9e5NzDqMLOJ","legend-item-swatch":"_eccyBq0v2puKsHw8XND","legend-item-label":"UeZrUEpEK0tLzXHmeUco","legend-item-value":"R5msPOYKm79jYV13H0v7"};var O={horizontal:"row",vertical:"column"},j=function(e){var t=e.items,r=e.className,o=e.orientation,n=void 0===o?"horizontal":o,i=(0,b.scaleOrdinal)({domain:t.map((function(e){return e.label})),range:t.map((function(e){return e.color}))});return(0,h.jsx)("div",{className:s()(g.legend,g["legend--".concat(n)],r),role:"list",children:(0,h.jsx)(y.LegendOrdinal,{scale:i,direction:O[n],shape:"rect",shapeWidth:16,shapeHeight:16,className:g["legend-items"],children:function(e){return(0,h.jsx)("div",{className:g["legend--".concat(n)],children:e.map((function(e){var r,o;return(0,h.jsxs)("div",{className:g["legend-item"],children:[(0,h.jsx)("svg",{width:16,height:16,children:(0,h.jsx)("rect",{width:16,height:16,fill:e.value,className:g["legend-item-swatch"]})}),(0,h.jsxs)("span",{className:g["legend-item-label"],children:[e.text,(null===(r=t.find((function(t){return t.label===e.text})))||void 0===r?void 0:r.value)&&(0,h.jsx)("span",{className:g["legend-item-value"],children:null===(o=t.find((function(t){return t.label===e.text})))||void 0===o?void 0:o.value})]})]},e.text)}))})}})})};const x=require("@visx/responsive");function w(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function P(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?w(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var S=function(e){var t=e.data;return(0,h.jsxs)(h.Fragment,{children:[null==t?void 0:t.label,": ",(null==t?void 0:t.valueDisplay)||(null==t?void 0:t.value)]})},F=function(e){var t=e.data,r=e.top,o=e.left,n=e.component,i=void 0===n?S:n,l=e.children,a=e.className;return(0,h.jsx)("div",{className:"Jmgc7XAf2uAyK5059rBe",style:{top:r,left:o},role:"tooltip",children:l||t&&(0,h.jsx)(i,{data:t,className:a})})};const _={"pie-chart":"R2Ly_tkJtgL0HA8P3fpm"};function D(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function C(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?D(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):D(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var N=function(e){var t=e.data,r=e.width,o=void 0===r?500:r,i=e.height,l=void 0===i?500:i,u=e.withTooltips,y=void 0!==u&&u,b=e.innerRadius,g=void 0===b?0:b,O=e.className,x=e.showLegend,w=e.legendOrientation,P=(0,f.useContext)(m),S=function(e){var t=e.withTooltips,r=(0,p.useTooltip)(),o=r.tooltipOpen,n=r.tooltipLeft,i=r.tooltipTop,l=r.tooltipData,a=r.hideTooltip,c=r.showTooltip;return{onMouseMove:(0,f.useCallback)((function(e,r){if(t){var o=(0,d.localPoint)(e);o&&c({tooltipData:r,tooltipLeft:o.x,tooltipTop:o.y-10})}}),[t,c]),onMouseLeave:(0,f.useCallback)((function(){t&&a()}),[t,a]),tooltipOpen:o,tooltipData:l||null,tooltipLeft:n,tooltipTop:i}}({withTooltips:y}),D=S.onMouseMove,N=S.onMouseLeave,L=S.tooltipOpen,T=S.tooltipData,k=S.tooltipLeft,A=S.tooltipTop,M=Math.min(o,l)/2,E=o/2,R=l/2,q=t.map((function(e,t){return C(C({},e),{},{index:t})})),z={value:function(e){return e.value},fill:function(e){return(null==e?void 0:e.color)||P.colors[e.index]}},I=t.map((function(e,t){return{label:e.label,value:e.value.toString(),color:P.colors[t%P.colors.length]}}));return(0,h.jsxs)("div",{className:s()("pie-chart",_["pie-chart"],O),children:[(0,h.jsx)("svg",{width:o,height:l,children:(0,h.jsx)(a.Group,{top:R,left:E,children:(0,h.jsx)(c.Pie,{data:q,pieValue:z.value,outerRadius:M-20,innerRadius:g,children:function(e){return e.arcs.map((function(t,r){var o,i,l=(o=e.path.centroid(t),i=2,function(e){if(Array.isArray(e))return e}(o)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o,n,i,l,a=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(o=i.call(r)).done)&&(a.push(o.value),a.length!==t);c=!0);}catch(e){u=!0,n=e}finally{try{if(!c&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(u)throw n}}return a}}(o,i)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(o,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=l[0],c=l[1],u=t.endAngle-t.startAngle>=.25,s={d:e.path(t)||"",fill:z.fill(t.data)};return y&&(s.onMouseMove=function(e){return D(e,t.data)},s.onMouseLeave=N),(0,h.jsxs)("g",{children:[(0,h.jsx)("path",C({},s)),u&&(0,h.jsx)("text",{x:a,y:c,dy:".33em",fill:P.labelBackgroundColor||v.labelBackgroundColor,fontSize:12,textAnchor:"middle",pointerEvents:"none",children:t.data.label})]},"arc-".concat(r))}))}})})}),x&&(0,h.jsx)(j,{items:I,orientation:w,className:_["pie-chart-legend"]}),y&&L&&T&&(0,h.jsx)(F,{data:T,top:A||0,left:k||0,style:{transform:"translate(-50%, -100%)"}})]})};N.displayName="PieChart";const L=(T=N,A=(k={}).maxWidth,M=void 0===A?1200:A,R=void 0===(E=k.aspectRatio)?.5:E,z=void 0===(q=k.debounceTime)?50:q,function(e){var t=(0,x.useParentSize)({debounceTime:z,enableDebounceLeadingCall:!0,initialSize:{width:600,height:400}}),r=t.parentRef,o=t.width,n=o?Math.min(o,M):600,i=n*R;return(0,h.jsx)("div",{ref:r,style:{width:"100%",minHeight:"".concat(i,"px")},children:(0,h.jsx)(T,P({width:n,height:i},e))})});var T,k,A,M,E,R,q,z;module.exports=o})();
3
- //# sourceMappingURL=index.js.map
1
+ "use strict";var e=require("react/jsx-runtime"),t=require("@visx/group"),l=require("@visx/shape"),a=require("clsx"),i=require("react"),o=require("@visx/event"),s=require("@visx/tooltip"),n=require("@visx/legend"),r=require("@visx/scale"),d=require("@visx/responsive");const c={backgroundColor:"#FFFFFF",labelBackgroundColor:"#FFFFFF",colors:["#98C8DF","#006DAB","#A6DC80","#1F9828","#FF8C8F"],gridStyles:{stroke:"#787C82",strokeWidth:1},tickLength:0,gridColor:"",gridColorDark:""},h=i.createContext(c);var p={"legend--horizontal":"legend-module__legend--horizontal__IUN13","legend--vertical":"legend-module__legend--vertical__Scfzo","legend-item":"legend-module__legend-item__feemn","legend-item-swatch":"legend-module__legend-item-swatch__nRyXf","legend-item-label":"legend-module__legend-item-label__ksx6I","legend-item-value":"legend-module__legend-item-value__d9x1j"};const u={horizontal:"row",vertical:"column"},g=({items:t,className:l,orientation:i="horizontal"})=>{const o=r.scaleOrdinal({domain:t.map((e=>e.label)),range:t.map((e=>e.color))});return e.jsx("div",{className:a(p.legend,p[`legend--${i}`],l),role:"list",children:e.jsx(n.LegendOrdinal,{scale:o,direction:u[i],shape:"rect",shapeWidth:16,shapeHeight:16,className:p["legend-items"],children:l=>e.jsx("div",{className:p[`legend--${i}`],children:l.map((l=>e.jsxs("div",{className:p["legend-item"],children:[e.jsx("svg",{width:16,height:16,children:e.jsx("rect",{width:16,height:16,fill:l.value,className:p["legend-item-swatch"]})}),e.jsxs("span",{className:p["legend-item-label"],children:[l.text,t.find((e=>e.label===l.text))?.value&&e.jsx("span",{className:p["legend-item-value"],children:t.find((e=>e.label===l.text))?.value})]})]},l.text)))})})})};var m="base-tooltip-module__tooltip__OfX6n";const v=({data:t})=>e.jsxs(e.Fragment,{children:[t?.label,": ",t?.valueDisplay||t?.value]}),x=({data:t,top:l,left:a,component:i=v,children:o,className:s})=>e.jsx("div",{className:m,style:{top:l,left:a},role:"tooltip",children:o||t&&e.jsx(i,{data:t,className:s})});var _={"pie-chart":"pie-chart-module__pie-chart__R12Vh"};const f=({data:n,withTooltips:r=!1,className:d,showLegend:p,legendOrientation:u,size:m,thickness:v=1,padding:f=20,gapScale:j=0,cornerScale:b=0})=>{const N=i.useContext(h),{onMouseMove:F,onMouseLeave:w,tooltipOpen:C,tooltipData:M,tooltipLeft:k,tooltipTop:T}=(({withTooltips:e})=>{const{tooltipOpen:t,tooltipLeft:l,tooltipTop:a,tooltipData:n,hideTooltip:r,showTooltip:d}=s.useTooltip();return{onMouseMove:i.useCallback(((t,l)=>{if(!e)return;const a=o.localPoint(t);a&&d({tooltipData:l,tooltipLeft:a.x,tooltipTop:a.y-10})}),[e,d]),onMouseLeave:i.useCallback((()=>{e&&r()}),[e,r]),tooltipOpen:t,tooltipData:n||null,tooltipLeft:l,tooltipTop:a}})({withTooltips:r}),{isValid:q,message:L}=(e=>{if(!e.length)return{isValid:!1,message:"No data available"};if(e.some((e=>e.percentage<0||e.value<0)))return{isValid:!1,message:"Invalid data: Negative values are not allowed"};const t=e.reduce(((e,t)=>e+t.percentage),0);return Math.abs(t-100)>.01?{isValid:!1,message:"Invalid percentage total: Must equal 100"}:{isValid:!0,message:""}})(n);if(!q)return e.jsx("div",{className:a("pie-chart",_["pie-chart"],d),children:e.jsx("div",{className:_["error-message"],children:L})});const y=m,z=m,D=Math.min(y,z)/2,R=y/2,S=z/2,A=j*(2*Math.PI/n.length),O=D-f,V=O*(1-v),P=(O-V)/2,$=b?Math.min(b*O,P):0,B=n.map(((e,t)=>({...e,index:t}))),I={value:e=>e.value,fill:e=>e?.color||N.colors[e.index]},W=n.map(((e,t)=>({label:e.label,value:e.value.toString(),color:N.colors[t%N.colors.length]})));return e.jsxs("div",{className:a("pie-chart",_["pie-chart"],d),children:[e.jsx("svg",{viewBox:`0 0 ${m} ${m}`,preserveAspectRatio:"xMidYMid meet",children:e.jsx(t.Group,{top:S,left:R,children:e.jsx(l.Pie,{data:B,pieValue:I.value,outerRadius:O,innerRadius:V,padAngle:A,cornerRadius:$,children:t=>t.arcs.map(((l,a)=>{const[i,o]=t.path.centroid(l),s=l.endAngle-l.startAngle>=.25,n=e=>F(e,l.data),d={d:t.path(l)||"",fill:I.fill(l.data)};return r&&(d.onMouseMove=n,d.onMouseLeave=w),e.jsxs("g",{children:[e.jsx("path",{...d}),s&&e.jsx("text",{x:i,y:o,dy:".33em",fill:N.labelBackgroundColor||c.labelBackgroundColor,fontSize:12,textAnchor:"middle",pointerEvents:"none",children:l.data.label})]},`arc-${a}`)}))})})}),p&&e.jsx(g,{items:W,orientation:u,className:_["pie-chart-legend"]}),r&&C&&M&&e.jsx(x,{data:M,top:T||0,left:k||0,style:{transform:"translate(-50%, -100%)"}})]})};f.displayName="PieChart";var j=function(t,l){const{maxWidth:a=1200,aspectRatio:i=.5,debounceTime:o=50}=l||{};return function(l){const{parentRef:s,width:n}=d.useParentSize({debounceTime:o,enableDebounceLeadingCall:!0,initialSize:{width:600,height:400}}),r=n?Math.min(n,a):600,c=r*i;return e.jsx("div",{ref:s,style:{width:"100%",minHeight:`${c}px`},children:e.jsx(t,{width:r,height:c,size:r,...l})})}}(f);exports.PieChart=j;
2
+ //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components/pie-chart/index.js","mappings":";wCASa,IAAIA,EAAE,EAAQ,KAASC,EAAEC,OAAOC,IAAI,iBAAiBC,EAAEF,OAAOC,IAAI,kBAAkBE,EAAEC,OAAOC,UAAUC,eAAeC,EAAET,EAAEU,mDAAmDC,kBAAkBC,EAAE,CAACC,KAAI,EAAGC,KAAI,EAAGC,QAAO,EAAGC,UAAS,GAChP,SAASC,EAAEC,EAAEC,EAAEC,GAAG,IAAIC,EAAEC,EAAE,CAAC,EAAEC,EAAE,KAAKC,EAAE,KAAiF,IAAIH,UAAhF,IAASD,IAAIG,EAAE,GAAGH,QAAG,IAASD,EAAEN,MAAMU,EAAE,GAAGJ,EAAEN,UAAK,IAASM,EAAEL,MAAMU,EAAEL,EAAEL,KAAcK,EAAEd,EAAEoB,KAAKN,EAAEE,KAAKT,EAAEJ,eAAea,K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EHN,EAAAA,EAAAA,KAAC0G,EAAgBpC,EAAA,CAChBrD,MAAQsG,EACRrG,OAASsG,GAEF9L,KAIX,GAjCM,IACNgL,EAGAvH,EAA8EwH,EAAtEC,EAAeE,EAAED,EAAiBG,EAAED","sources":["webpack://@automattic/charts/../../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.production.min.js","webpack://@automattic/charts/../../../node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js","webpack://@automattic/charts/external commonjs2 \"react\"","webpack://@automattic/charts/webpack/bootstrap","webpack://@automattic/charts/webpack/runtime/compat get default export","webpack://@automattic/charts/webpack/runtime/define property getters","webpack://@automattic/charts/webpack/runtime/hasOwnProperty shorthand","webpack://@automattic/charts/webpack/runtime/make namespace object","webpack://@automattic/charts/../../../node_modules/.pnpm/@babel+runtime@7.26.0/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack://@automattic/charts/../../../node_modules/.pnpm/@babel+runtime@7.26.0/node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://@automattic/charts/../../../node_modules/.pnpm/@babel+runtime@7.26.0/node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://@automattic/charts/../../../node_modules/.pnpm/@babel+runtime@7.26.0/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://@automattic/charts/../../../node_modules/.pnpm/@babel+runtime@7.26.0/node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://@automattic/charts/external commonjs2 \"@visx/group\"","webpack://@automattic/charts/external commonjs2 \"@visx/shape\"","webpack://@automattic/charts/external commonjs2 \"clsx\"","webpack://@automattic/charts/external commonjs2 \"@visx/event\"","webpack://@automattic/charts/external commonjs2 \"@visx/tooltip\"","webpack://@automattic/charts/./src/providers/theme/themes.ts","webpack://@automattic/charts/./src/providers/theme/theme-provider.tsx","webpack://@automattic/charts/external commonjs2 \"@visx/legend\"","webpack://@automattic/charts/external commonjs2 \"@visx/scale\"","webpack://@automattic/charts/./src/components/legend/legend.module.scss?843e","webpack://@automattic/charts/./src/components/legend/base-legend.tsx","webpack://@automattic/charts/external commonjs2 \"@visx/responsive\"","webpack://@automattic/charts/./src/components/tooltip/base-tooltip.tsx","webpack://@automattic/charts/./src/components/tooltip/base-tooltip.module.scss?1d14","webpack://@automattic/charts/./src/components/pie-chart/pie-chart.module.scss?1ca3","webpack://@automattic/charts/./src/components/pie-chart/pie-chart.tsx","webpack://@automattic/charts/./src/hooks/use-chart-mouse-handler.ts","webpack://@automattic/charts/../../../node_modules/.pnpm/@babel+runtime@7.26.0/node_modules/@babel/runtime/helpers/esm/slicedToArray.js","webpack://@automattic/charts/../../../node_modules/.pnpm/@babel+runtime@7.26.0/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","webpack://@automattic/charts/../../../node_modules/.pnpm/@babel+runtime@7.26.0/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","webpack://@automattic/charts/../../../node_modules/.pnpm/@babel+runtime@7.26.0/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack://@automattic/charts/../../../node_modules/.pnpm/@babel+runtime@7.26.0/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","webpack://@automattic/charts/./src/components/shared/with-responsive.tsx"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","module.exports = require(\"react\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","function _arrayLikeToArray(r, a) {\n (null == a || a > r.length) && (a = r.length);\n for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n return n;\n}\nexport { _arrayLikeToArray as default };","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}\nexport { _typeof as default };","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nexport { _defineProperty as default };","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nexport { toPropertyKey as default };","import _typeof from \"./typeof.js\";\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nexport { toPrimitive as default };","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@visx/group\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@visx/shape\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"clsx\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@visx/event\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@visx/tooltip\");","import type { ChartTheme } from '../../types';\n\n/**\n * Default theme configuration\n */\nconst defaultTheme: ChartTheme = {\n\tbackgroundColor: '#FFFFFF', // chart background color\n\tlabelBackgroundColor: '#FFFFFF', // label background color\n\tcolors: [ '#98C8DF', '#006DAB', '#A6DC80', '#1F9828', '#FF8C8F' ],\n\tgridStyles: {\n\t\tstroke: '#787C82',\n\t\tstrokeWidth: 1,\n\t},\n\ttickLength: 0,\n\tgridColor: '',\n\tgridColorDark: '',\n};\n\n/**\n * Jetpack theme configuration\n */\nconst jetpackTheme: ChartTheme = {\n\tbackgroundColor: '#FFFFFF', // chart background color\n\tlabelBackgroundColor: '#FFFFFF', // label background color\n\tcolors: [ '#98C8DF', '#006DAB', '#A6DC80', '#1F9828', '#FF8C8F' ],\n\tgridStyles: {\n\t\tstroke: '#787C82',\n\t\tstrokeWidth: 1,\n\t},\n\ttickLength: 0,\n\tgridColor: '',\n\tgridColorDark: '',\n};\n\n/**\n * Woo theme configuration\n */\nconst wooTheme: ChartTheme = {\n\tbackgroundColor: '#FFFFFF', // chart background color\n\tlabelBackgroundColor: '#FFFFFF', // label background color\n\tcolors: [ '#80C8FF', '#B999FF', '#3858E9' ],\n\tgridStyles: {\n\t\tstroke: '#787C82',\n\t\tstrokeWidth: 1,\n\t},\n\ttickLength: 0,\n\tgridColor: '',\n\tgridColorDark: '',\n};\n\nexport { defaultTheme, jetpackTheme, wooTheme };\n","import { createContext, useContext, FC, type ReactNode } from 'react';\nimport { defaultTheme } from './themes';\nimport type { ChartTheme } from '../../types';\n\n/**\n * Context for sharing theme configuration across components\n */\nconst ThemeContext = createContext< ChartTheme >( defaultTheme );\n\n/**\n * Hook to access chart theme\n * @return {object} A built theme configuration compatible with visx charts\n */\nconst useChartTheme = () => {\n\tconst theme = useContext( ThemeContext );\n\treturn theme;\n};\n\n/**\n * Props for the ThemeProvider component\n */\ntype ThemeProviderProps = {\n\t/** Optional partial theme override */\n\ttheme?: Partial< ChartTheme >;\n\t/** Child components that will have access to the theme */\n\tchildren: ReactNode;\n};\n\n// Provider component for chart theming\n// Allows theme customization through props while maintaining default values\nconst ThemeProvider: FC< ThemeProviderProps > = ( { theme = {}, children } ) => {\n\tconst mergedTheme = { ...defaultTheme, ...theme };\n\treturn <ThemeContext.Provider value={ mergedTheme }>{ children }</ThemeContext.Provider>;\n};\n\nexport { ThemeProvider, useChartTheme };\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@visx/legend\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@visx/scale\");","// extracted by mini-css-extract-plugin\nexport default {\"legend--horizontal\":\"b1_5FxxoK4aEFLoe67IA\",\"legend--vertical\":\"vpmQkJAPhp3XJ9Wb6vOw\",\"legend-item\":\"IKM8KG1lF9e5NzDqMLOJ\",\"legend-item-swatch\":\"_eccyBq0v2puKsHw8XND\",\"legend-item-label\":\"UeZrUEpEK0tLzXHmeUco\",\"legend-item-value\":\"R5msPOYKm79jYV13H0v7\"};","import { LegendOrdinal } from '@visx/legend';\nimport { scaleOrdinal } from '@visx/scale';\nimport clsx from 'clsx';\nimport { FC } from 'react';\nimport styles from './legend.module.scss';\nimport type { LegendProps } from './types';\n\n/**\n * Base legend component that displays color-coded items with labels using visx\n * @param {object} props - Component properties\n * @param {Array} props.items - Array of legend items to display\n * @param {string} props.className - Additional CSS class names\n * @param {string} props.orientation - Layout orientation (horizontal/vertical)\n * @return {JSX.Element} Rendered legend component\n */\nconst orientationToFlexDirection = {\n\thorizontal: 'row' as const,\n\tvertical: 'column' as const,\n};\n\nexport const BaseLegend: FC< LegendProps > = ( {\n\titems,\n\tclassName,\n\torientation = 'horizontal',\n} ) => {\n\tconst legendScale = scaleOrdinal( {\n\t\tdomain: items.map( item => item.label ),\n\t\trange: items.map( item => item.color ),\n\t} );\n\n\treturn (\n\t\t<div\n\t\t\tclassName={ clsx( styles.legend, styles[ `legend--${ orientation }` ], className ) }\n\t\t\trole=\"list\"\n\t\t>\n\t\t\t<LegendOrdinal\n\t\t\t\tscale={ legendScale }\n\t\t\t\tdirection={ orientationToFlexDirection[ orientation ] }\n\t\t\t\tshape=\"rect\"\n\t\t\t\tshapeWidth={ 16 }\n\t\t\t\tshapeHeight={ 16 }\n\t\t\t\tclassName={ styles[ 'legend-items' ] }\n\t\t\t>\n\t\t\t\t{ labels => (\n\t\t\t\t\t<div className={ styles[ `legend--${ orientation }` ] }>\n\t\t\t\t\t\t{ labels.map( label => (\n\t\t\t\t\t\t\t<div key={ label.text } className={ styles[ 'legend-item' ] }>\n\t\t\t\t\t\t\t\t<svg width={ 16 } height={ 16 }>\n\t\t\t\t\t\t\t\t\t<rect\n\t\t\t\t\t\t\t\t\t\twidth={ 16 }\n\t\t\t\t\t\t\t\t\t\theight={ 16 }\n\t\t\t\t\t\t\t\t\t\tfill={ label.value }\n\t\t\t\t\t\t\t\t\t\tclassName={ styles[ 'legend-item-swatch' ] }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t\t<span className={ styles[ 'legend-item-label' ] }>\n\t\t\t\t\t\t\t\t\t{ label.text }\n\t\t\t\t\t\t\t\t\t{ items.find( item => item.label === label.text )?.value && (\n\t\t\t\t\t\t\t\t\t\t<span className={ styles[ 'legend-item-value' ] }>\n\t\t\t\t\t\t\t\t\t\t\t{ items.find( item => item.label === label.text )?.value }\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) ) }\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t</LegendOrdinal>\n\t\t</div>\n\t);\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@visx/responsive\");","import styles from './base-tooltip.module.scss';\nimport type { CSSProperties, ComponentType, ReactNode } from 'react';\n\ntype TooltipData = {\n\tlabel: string;\n\tvalue: number;\n\tvalueDisplay?: string;\n};\n\ntype TooltipComponentProps = {\n\tdata: TooltipData;\n\tclassName?: string;\n};\n\ntype TooltipCommonProps = {\n\ttop: number;\n\tleft: number;\n\tstyle?: CSSProperties;\n\tclassName?: string;\n};\n\ntype DefaultDataTooltip = {\n\tdata: TooltipData;\n\tcomponent?: ComponentType< TooltipComponentProps >;\n\tchildren?: never;\n};\n\ntype CustomTooltip = {\n\tchildren: ReactNode;\n\tdata?: never;\n\tcomponent?: never;\n};\n\ntype BaseTooltipProps = TooltipCommonProps & ( DefaultDataTooltip | CustomTooltip );\n\nconst DefaultTooltipContent = ( { data }: TooltipComponentProps ) => (\n\t<>\n\t\t{ data?.label }: { data?.valueDisplay || data?.value }\n\t</>\n);\n\nexport const BaseTooltip = ( {\n\tdata,\n\ttop,\n\tleft,\n\tcomponent: Component = DefaultTooltipContent,\n\tchildren,\n\tclassName,\n}: BaseTooltipProps ) => {\n\treturn (\n\t\t<div className={ styles.tooltip } style={ { top, left } } role=\"tooltip\">\n\t\t\t{ children || ( data && <Component data={ data } className={ className } /> ) }\n\t\t</div>\n\t);\n};\n\nexport type { BaseTooltipProps, TooltipData };\n","// extracted by mini-css-extract-plugin\nexport default {\"tooltip\":\"Jmgc7XAf2uAyK5059rBe\"};","// extracted by mini-css-extract-plugin\nexport default {\"pie-chart\":\"R2Ly_tkJtgL0HA8P3fpm\"};","import { Group } from '@visx/group';\nimport { Pie } from '@visx/shape';\nimport clsx from 'clsx';\nimport { SVGProps, type MouseEvent } from 'react';\nimport useChartMouseHandler from '../../hooks/use-chart-mouse-handler';\nimport { useChartTheme, defaultTheme } from '../../providers/theme';\nimport { Legend } from '../legend';\nimport { withResponsive } from '../shared/with-responsive';\nimport { BaseTooltip } from '../tooltip';\nimport styles from './pie-chart.module.scss';\nimport type { BaseChartProps, DataPointPercentage } from '../../types';\n\n// TODO: add animation\n\ninterface PieChartProps extends BaseChartProps< DataPointPercentage[] > {\n\t/**\n\t * Inner radius in pixels. If > 0, creates a donut chart. Defaults to 0.\n\t */\n\tinnerRadius?: number;\n}\n\n/**\n * Renders a pie or donut chart using the provided data.\n *\n * @param {PieChartProps} props - Component props\n * @return {JSX.Element} The rendered chart component\n */\nconst PieChart = ( {\n\tdata,\n\twidth = 500, //TODO: replace when making the components responsive\n\theight = 500, //TODO: replace when making the components responsive\n\twithTooltips = false,\n\tinnerRadius = 0,\n\tclassName,\n\tshowLegend,\n\tlegendOrientation,\n}: PieChartProps ) => {\n\tconst providerTheme = useChartTheme();\n\tconst { onMouseMove, onMouseLeave, tooltipOpen, tooltipData, tooltipLeft, tooltipTop } =\n\t\tuseChartMouseHandler( {\n\t\t\twithTooltips,\n\t\t} );\n\n\t// Calculate radius based on width/height\n\tconst radius = Math.min( width, height ) / 2;\n\tconst centerX = width / 2;\n\tconst centerY = height / 2;\n\n\t// Map the data to include index for color assignment\n\tconst dataWithIndex = data.map( ( d, index ) => ( {\n\t\t...d,\n\t\tindex,\n\t} ) );\n\n\tconst accessors = {\n\t\tvalue: ( d: DataPointPercentage ) => d.value,\n\t\t// Use the color property from the data object as a last resort. The theme provides colours by default.\n\t\tfill: ( d: DataPointPercentage & { index: number } ) =>\n\t\t\td?.color || providerTheme.colors[ d.index ],\n\t};\n\n\t// Create legend items from data\n\tconst legendItems = data.map( ( item, index ) => ( {\n\t\tlabel: item.label,\n\t\tvalue: item.value.toString(),\n\t\tcolor: providerTheme.colors[ index % providerTheme.colors.length ],\n\t} ) );\n\n\treturn (\n\t\t<div className={ clsx( 'pie-chart', styles[ 'pie-chart' ], className ) }>\n\t\t\t<svg width={ width } height={ height }>\n\t\t\t\t<Group top={ centerY } left={ centerX }>\n\t\t\t\t\t<Pie< DataPointPercentage & { index: number } >\n\t\t\t\t\t\tdata={ dataWithIndex }\n\t\t\t\t\t\tpieValue={ accessors.value }\n\t\t\t\t\t\touterRadius={ radius - 20 } // Leave space for labels/tooltips\n\t\t\t\t\t\tinnerRadius={ innerRadius }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ pie => {\n\t\t\t\t\t\t\treturn pie.arcs.map( ( arc, index ) => {\n\t\t\t\t\t\t\t\tconst [ centroidX, centroidY ] = pie.path.centroid( arc );\n\t\t\t\t\t\t\t\tconst hasSpaceForLabel = arc.endAngle - arc.startAngle >= 0.25;\n\t\t\t\t\t\t\t\tconst handleMouseMove = ( event: MouseEvent< SVGElement > ) =>\n\t\t\t\t\t\t\t\t\tonMouseMove( event, arc.data );\n\n\t\t\t\t\t\t\t\tconst pathProps: SVGProps< SVGPathElement > = {\n\t\t\t\t\t\t\t\t\td: pie.path( arc ) || '',\n\t\t\t\t\t\t\t\t\tfill: accessors.fill( arc.data ),\n\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t\tif ( withTooltips ) {\n\t\t\t\t\t\t\t\t\tpathProps.onMouseMove = handleMouseMove;\n\t\t\t\t\t\t\t\t\tpathProps.onMouseLeave = onMouseLeave;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<g key={ `arc-${ index }` }>\n\t\t\t\t\t\t\t\t\t\t<path { ...pathProps } />\n\t\t\t\t\t\t\t\t\t\t{ hasSpaceForLabel && (\n\t\t\t\t\t\t\t\t\t\t\t<text\n\t\t\t\t\t\t\t\t\t\t\t\tx={ centroidX }\n\t\t\t\t\t\t\t\t\t\t\t\ty={ centroidY }\n\t\t\t\t\t\t\t\t\t\t\t\tdy=\".33em\"\n\t\t\t\t\t\t\t\t\t\t\t\tfill={\n\t\t\t\t\t\t\t\t\t\t\t\t\tproviderTheme.labelBackgroundColor || defaultTheme.labelBackgroundColor\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tfontSize={ 12 }\n\t\t\t\t\t\t\t\t\t\t\t\ttextAnchor=\"middle\"\n\t\t\t\t\t\t\t\t\t\t\t\tpointerEvents=\"none\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{ arc.data.label }\n\t\t\t\t\t\t\t\t\t\t\t</text>\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t</g>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} }\n\t\t\t\t\t</Pie>\n\t\t\t\t</Group>\n\t\t\t</svg>\n\n\t\t\t{ showLegend && (\n\t\t\t\t<Legend\n\t\t\t\t\titems={ legendItems }\n\t\t\t\t\torientation={ legendOrientation }\n\t\t\t\t\tclassName={ styles[ 'pie-chart-legend' ] }\n\t\t\t\t/>\n\t\t\t) }\n\n\t\t\t{ withTooltips && tooltipOpen && tooltipData && (\n\t\t\t\t<BaseTooltip\n\t\t\t\t\tdata={ tooltipData }\n\t\t\t\t\ttop={ tooltipTop || 0 }\n\t\t\t\t\tleft={ tooltipLeft || 0 }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\ttransform: 'translate(-50%, -100%)',\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</div>\n\t);\n};\n\nPieChart.displayName = 'PieChart';\nexport default withResponsive< PieChartProps >( PieChart );\n","import { localPoint } from '@visx/event';\nimport { useTooltip } from '@visx/tooltip';\nimport { useCallback, type MouseEvent } from 'react';\nimport type { DataPoint } from '../types';\n\ntype UseChartMouseHandlerProps = {\n\t/**\n\t * Whether tooltips are enabled\n\t */\n\twithTooltips: boolean;\n};\n\ntype UseChartMouseHandlerReturn = {\n\t/**\n\t * Handler for mouse move events\n\t */\n\tonMouseMove: ( event: React.MouseEvent< SVGElement >, data: DataPoint ) => void;\n\t/**\n\t * Handler for mouse leave events\n\t */\n\tonMouseLeave: () => void;\n\t/**\n\t * Whether the tooltip is currently open\n\t */\n\ttooltipOpen: boolean;\n\t/**\n\t * The current tooltip data\n\t */\n\ttooltipData: DataPoint | null;\n\t/**\n\t * The current tooltip left position\n\t */\n\ttooltipLeft: number | undefined;\n\t/**\n\t * The current tooltip top position\n\t */\n\ttooltipTop: number | undefined;\n};\n\n/**\n * Hook to handle mouse interactions for chart components\n *\n * @param {UseChartMouseHandlerProps} props - Hook configuration\n * @return {UseChartMouseHandlerReturn} Object containing handlers and tooltip state\n */\nconst useChartMouseHandler = ( {\n\twithTooltips,\n}: UseChartMouseHandlerProps ): UseChartMouseHandlerReturn => {\n\tconst { tooltipOpen, tooltipLeft, tooltipTop, tooltipData, hideTooltip, showTooltip } =\n\t\tuseTooltip< DataPoint >();\n\n\t// TODO: either debounce/throttle or use useTooltipInPortal with built-in debounce\n\tconst onMouseMove = useCallback(\n\t\t( event: MouseEvent< SVGElement >, data: DataPoint ) => {\n\t\t\tif ( ! withTooltips ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst coords = localPoint( event );\n\t\t\tif ( ! coords ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tshowTooltip( {\n\t\t\t\ttooltipData: data,\n\t\t\t\ttooltipLeft: coords.x,\n\t\t\t\ttooltipTop: coords.y - 10,\n\t\t\t} );\n\t\t},\n\t\t[ withTooltips, showTooltip ]\n\t);\n\n\tconst onMouseLeave = useCallback( () => {\n\t\tif ( ! withTooltips ) {\n\t\t\treturn;\n\t\t}\n\t\thideTooltip();\n\t}, [ withTooltips, hideTooltip ] );\n\n\treturn {\n\t\tonMouseMove,\n\t\tonMouseLeave,\n\t\ttooltipOpen,\n\t\ttooltipData: tooltipData || null,\n\t\ttooltipLeft,\n\t\ttooltipTop,\n\t};\n};\n\nexport default useChartMouseHandler;\n","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nfunction _slicedToArray(r, e) {\n return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest();\n}\nexport { _slicedToArray as default };","function _arrayWithHoles(r) {\n if (Array.isArray(r)) return r;\n}\nexport { _arrayWithHoles as default };","function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}\nexport { _iterableToArrayLimit as default };","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nfunction _unsupportedIterableToArray(r, a) {\n if (r) {\n if (\"string\" == typeof r) return arrayLikeToArray(r, a);\n var t = {}.toString.call(r).slice(8, -1);\n return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0;\n }\n}\nexport { _unsupportedIterableToArray as default };","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nexport { _nonIterableRest as default };","import { useParentSize } from '@visx/responsive';\nimport { ComponentType } from 'react';\nimport type { BaseChartProps } from '../../types';\n\ntype ResponsiveConfig = {\n\tmaxWidth?: number;\n\taspectRatio?: number;\n\tdebounceTime?: number;\n};\n\n/**\n * A higher-order component that provides responsive width and height\n * to the wrapped chart component using useParentSize from @visx/responsive.\n *\n * @param WrappedComponent - The chart component to be wrapped.\n * @param config - Optional configuration for responsive behavior\n * @return A functional component that renders the wrapped component with responsive dimensions.\n */\nexport function withResponsive< T extends BaseChartProps< unknown > >(\n\tWrappedComponent: ComponentType< T >,\n\tconfig?: ResponsiveConfig\n) {\n\tconst { maxWidth = 1200, aspectRatio = 0.5, debounceTime = 50 } = config || {};\n\n\treturn function ResponsiveChart( props: Omit< T, 'width' | 'height' > ) {\n\t\tconst { parentRef, width: parentWidth } = useParentSize( {\n\t\t\tdebounceTime,\n\t\t\tenableDebounceLeadingCall: true,\n\t\t\tinitialSize: { width: 600, height: 400 },\n\t\t} );\n\n\t\t// Calculate dimensions\n\t\tconst containerWidth = parentWidth ? Math.min( parentWidth, maxWidth ) : 600;\n\t\tconst containerHeight = containerWidth * aspectRatio;\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref={ parentRef }\n\t\t\t\tstyle={ {\n\t\t\t\t\twidth: '100%',\n\t\t\t\t\tminHeight: `${ containerHeight }px`,\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<WrappedComponent\n\t\t\t\t\twidth={ containerWidth }\n\t\t\t\t\theight={ containerHeight }\n\t\t\t\t\t// When width and height are passed as props, they will override the responsive values, and the chart will become fixed size.\n\t\t\t\t\t{ ...( props as T ) }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t);\n\t};\n}\n"],"names":["f","k","Symbol","for","l","m","Object","prototype","hasOwnProperty","n","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactCurrentOwner","p","key","ref","__self","__source","q","c","a","g","b","d","e","h","call","defaultProps","$$typeof","type","props","_owner","current","exports","Fragment","jsx","jsxs","module","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","getter","__esModule","definition","o","defineProperty","enumerable","get","obj","prop","r","toStringTag","value","_arrayLikeToArray","length","Array","_typeof","iterator","constructor","t","i","toPrimitive","TypeError","String","toPropertyKey","configurable","writable","defaultTheme","backgroundColor","labelBackgroundColor","colors","gridStyles","stroke","strokeWidth","tickLength","gridColor","gridColorDark","ThemeContext","createContext","orientationToFlexDirection","horizontal","vertical","BaseLegend","_ref","items","className","_ref$orientation","orientation","legendScale","scaleOrdinal","domain","map","item","label","range","color","_jsx","clsx","styles","legend","concat","role","children","LegendOrdinal","scale","direction","shape","shapeWidth","shapeHeight","labels","_items$find","_items$find2","_jsxs","width","height","fill","text","find","DefaultTooltipContent","data","_Fragment","valueDisplay","BaseTooltip","_ref2","top","left","_ref2$component","component","Component","style","PieChart","_ref$width","_ref$height","_ref$withTooltips","withTooltips","_ref$innerRadius","innerRadius","showLegend","legendOrientation","providerTheme","useContext","_useChartMouseHandler","_useTooltip","useTooltip","tooltipOpen","tooltipLeft","tooltipTop","tooltipData","hideTooltip","showTooltip","onMouseMove","useCallback","event","coords","localPoint","x","y","onMouseLeave","useChartMouseHandler","radius","Math","min","centerX","centerY","dataWithIndex","index","_objectSpread","accessors","legendItems","toString","Group","Pie","pieValue","outerRadius","pie","arcs","arc","_pie$path$centroid2","path","centroid","isArray","u","next","done","push","slice","name","from","test","centroidX","centroidY","hasSpaceForLabel","endAngle","startAngle","pathProps","dy","fontSize","textAnchor","pointerEvents","Legend","transform","displayName","WrappedComponent","_ref$maxWidth","maxWidth","aspectRatio","_ref$aspectRatio","debounceTime","_ref$debounceTime","_useParentSize","useParentSize","enableDebounceLeadingCall","initialSize","parentRef","parentWidth","containerWidth","containerHeight","minHeight"],"sourceRoot":""}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/hooks/use-chart-mouse-handler.ts","../../../../src/providers/theme/themes.ts","../../../../src/providers/theme/theme-provider.tsx","../../../../src/components/legend/base-legend.tsx","../../../../src/components/tooltip/base-tooltip.tsx","../../../../src/components/pie-chart/pie-chart.tsx","../../../../src/components/shared/with-responsive.tsx"],"sourcesContent":[null,null,null,null,null,null,null],"names":["defaultTheme","backgroundColor","labelBackgroundColor","colors","gridStyles","stroke","strokeWidth","tickLength","gridColor","gridColorDark","ThemeContext","createContext","orientationToFlexDirection","horizontal","vertical","BaseLegend","items","className","orientation","legendScale","scaleOrdinal","domain","map","item","label","range","color","_jsx","clsx","styles","legend","role","children","LegendOrdinal","scale","direction","shape","shapeWidth","shapeHeight","labels","_jsxs","jsx","width","height","fill","value","text","find","DefaultTooltipContent","data","jsxs","_Fragment","Fragment","valueDisplay","BaseTooltip","top","left","component","Component","style","PieChart","withTooltips","showLegend","legendOrientation","size","thickness","padding","gapScale","cornerScale","providerTheme","useContext","onMouseMove","onMouseLeave","tooltipOpen","tooltipData","tooltipLeft","tooltipTop","hideTooltip","showTooltip","useTooltip","useCallback","event","coords","localPoint","x","y","useChartMouseHandler","isValid","message","length","some","percentage","totalPercentage","reduce","sum","Math","abs","validateData","radius","min","centerX","centerY","padAngle","PI","outerRadius","innerRadius","maxCornerRadius","cornerRadius","dataWithIndex","d","index","accessors","legendItems","toString","viewBox","preserveAspectRatio","Group","Pie","pieValue","pie","arcs","arc","centroidX","centroidY","path","centroid","hasSpaceForLabel","endAngle","startAngle","handleMouseMove","pathProps","dy","fontSize","textAnchor","pointerEvents","Legend","transform","displayName","pieChart","WrappedComponent","config","maxWidth","aspectRatio","debounceTime","props","parentRef","parentWidth","useParentSize","enableDebounceLeadingCall","initialSize","containerWidth","containerHeight","ref","minHeight","withResponsive"],"mappings":"4QA6CA,MCxCMA,EAA2B,CAChCC,gBAAiB,UACjBC,qBAAsB,UACtBC,OAAQ,CAAE,UAAW,UAAW,UAAW,UAAW,WACtDC,WAAY,CACXC,OAAQ,UACRC,YAAa,GAEdC,WAAY,EACZC,UAAW,GACXC,cAAe,ICRVC,EAAeC,EAAAA,cAA6BX,qXCQlD,MAAMY,EAA6B,CAClCC,WAAY,MACZC,SAAU,UAGEC,EAAgC,EAC5CC,QACAC,YACAC,cAAc,iBAEd,MAAMC,EAAcC,EAAAA,aAAc,CACjCC,OAAQL,EAAMM,KAAKC,GAAQA,EAAKC,QAChCC,MAAOT,EAAMM,KAAKC,GAAQA,EAAKG,UAGhC,OACCC,aACCV,UAAYW,EAAMC,EAAOC,OAAQD,EAAQ,WAAYX,KAAkBD,GACvEc,KAAK,OAELC,SAAAL,EAAAA,IAACM,EAAAA,cACA,CAAAC,MAAQf,EACRgB,UAAYvB,EAA4BM,GACxCkB,MAAM,OACNC,WAAa,GACbC,YAAc,GACdrB,UAAYY,EAAQ,yBAElBU,GACDZ,EAAAA,WAAKV,UAAYY,EAAQ,WAAYX,KAAgBc,SAClDO,EAAOjB,KAAKE,GACbgB,EAAAA,YAAwBvB,UAAYY,EAAQ,eAC3CG,SAAA,C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,EAAcnE,sBAAwBF,EAAaE,qBAEpDkI,SAAW,GACXC,WAAW,SACXC,cAAc,OAEZtG,SAAAyF,EAAIxE,KAAKzB,UAdL,OAAQsF,IAkBhB,UAOLhD,GACDnC,EAAAA,IAAC4G,EAAM,CACNvH,MAAQgG,EACR9F,YAAc6C,EACd9C,UAAYY,EAAQ,sBAIpBgC,GAAgBY,GAAeC,GAChC/C,MAAC2B,EAAW,CACXL,KAAOyB,EACPnB,IAAMqB,GAAc,EACpBpB,KAAOmB,GAAe,EACtBhB,MAAQ,CACP6E,UAAW,8BAKd,EAGH5E,EAAS6E,YAAc,WACvB,IAAeC,EClNC,SACfC,EACAC,GAEA,MAAMC,SAAEA,EAAW,KAAIC,YAAEA,EAAc,GAAGC,aAAEA,EAAe,IAAOH,GAAU,GAE5E,OAAO,SAA0BI,GAChC,MAAMC,UAAEA,EAAWvG,MAAOwG,GAAgBC,EAAAA,cAAe,CACxDJ,eACAK,2BAA2B,EAC3BC,YAAa,CAAE3G,MAAO,IAAKC,OAAQ,OAI9B2G,EAAiBJ,EAAcnD,KAAKI,IAAK+C,EAAaL,GAAa,IACnEU,EAAkBD,EAAiBR,EAEzC,OACCnH,EACCc,IAAA,MAAA,CAAA+G,IAAMP,EACNtF,MAAQ,CACPjB,MAAO,OACP+G,UAAW,GAAIF,OACfvH,SAEDL,MAACgH,EAAgB,CAChBjG,MAAQ4G,EACR3G,OAAS4G,EACTvF,KAAOsF,KACAN,KAIX,CACD,CDgLeU,CAAiC9F"}
@@ -1,5 +1,95 @@
1
- .R2Ly_tkJtgL0HA8P3fpm{position:relative}
2
- .b1_5FxxoK4aEFLoe67IA{display:flex;flex-direction:row;flex-wrap:wrap;gap:16px}.vpmQkJAPhp3XJ9Wb6vOw{display:flex;flex-direction:column;gap:8px}.IKM8KG1lF9e5NzDqMLOJ{display:flex;align-items:center;gap:8px;font-size:.875rem}._eccyBq0v2puKsHw8XND{border-radius:2px}.UeZrUEpEK0tLzXHmeUco{color:var(--jp-gray-80, #2c3338);display:flex;align-items:center;gap:.5rem}.R5msPOYKm79jYV13H0v7{font-weight:500}
3
- .Jmgc7XAf2uAyK5059rBe{padding:.5rem;background-color:rgba(0,0,0,.85);color:#fff;border-radius:4px;font-size:14px;box-shadow:0 1px 2px rgba(0,0,0,.1);position:absolute;pointer-events:none;transform:translate(-50%, -100%)}
1
+ .bar-chart-module__bar-chart__lmYNi {
2
+ position: relative;
3
+ }
4
+ .bar-chart-module__bar-chart-legend__vgKKq {
5
+ margin-top: 1rem;
6
+ }
7
+ .line-chart-module__line-chart__ITM3d {
8
+ position: relative;
9
+ }
10
+ .line-chart-module__line-chart__tooltip__aqcme {
11
+ background: #fff;
12
+ padding: 0.5rem;
13
+ }
14
+ .line-chart-module__line-chart__tooltip-date__4Dzab {
15
+ font-weight: bold;
16
+ padding-bottom: 10px;
17
+ }
18
+ .line-chart-module__line-chart__tooltip-row__6A37G {
19
+ display: flex;
20
+ align-items: center;
21
+ padding: 4px 0;
22
+ justify-content: space-between;
23
+ }
24
+ .line-chart-module__line-chart__tooltip-label__IvnFF {
25
+ font-weight: 500;
26
+ padding-right: 1rem;
27
+ }
28
+ .pie-semi-circle-chart-module__pie-semi-circle-chart__r5jk9 {
29
+ position: relative;
30
+ text-align: center;
31
+ }
32
+ .pie-semi-circle-chart-module__pie-semi-circle-chart-legend__c8W1Y {
33
+ margin-top: 1rem;
34
+ }
35
+ .pie-semi-circle-chart-module__pie-semi-circle-chart__r5jk9 .pie-semi-circle-chart-module__label__nPqOg {
36
+ margin-bottom: 0px;
37
+ font-weight: 600;
38
+ font-size: 16px;
39
+ }
40
+ .pie-semi-circle-chart-module__pie-semi-circle-chart__r5jk9 .pie-semi-circle-chart-module__note__LpBZQ {
41
+ margin-top: 0px;
42
+ font-size: 14px;
43
+ }
44
+ .grid-control-module__grid-control__KOnZN .visx-line {
45
+ stroke: #d7d6d6;
46
+ stroke-width: 1px;
47
+ shape-rendering: crispEdges;
48
+ }
49
+ .legend-module__legend--horizontal__IUN13 {
50
+ display: flex;
51
+ flex-direction: row;
52
+ flex-wrap: wrap;
53
+ gap: 16px;
54
+ }
55
+ .legend-module__legend--vertical__Scfzo {
56
+ display: flex;
57
+ flex-direction: column;
58
+ gap: 8px;
59
+ }
4
60
 
5
- /*# sourceMappingURL=style.css.map*/
61
+ .legend-module__legend-item__feemn {
62
+ display: flex;
63
+ align-items: center;
64
+ gap: 8px;
65
+ font-size: 0.875rem;
66
+ }
67
+
68
+ .legend-module__legend-item-swatch__nRyXf {
69
+ border-radius: 2px;
70
+ }
71
+
72
+ .legend-module__legend-item-label__ksx6I {
73
+ color: var(--jp-gray-80, #2c3338);
74
+ display: flex;
75
+ align-items: center;
76
+ gap: 0.5rem;
77
+ }
78
+
79
+ .legend-module__legend-item-value__d9x1j {
80
+ font-weight: 500;
81
+ }
82
+ .base-tooltip-module__tooltip__OfX6n {
83
+ padding: 0.5rem;
84
+ background-color: rgba(0, 0, 0, 0.85);
85
+ color: white;
86
+ border-radius: 4px;
87
+ font-size: 14px;
88
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
89
+ position: absolute;
90
+ pointer-events: none;
91
+ transform: translate(-50%, -100%);
92
+ }
93
+ .pie-chart-module__pie-chart__R12Vh {
94
+ position: relative;
95
+ }
@@ -1,3 +1,2 @@
1
- /*! For license information please see index.js.LICENSE.txt */
2
- (()=>{"use strict";var e={572:(e,t,r)=>{var n=r(953),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,r){var n,i={},s=null,u=null;for(n in void 0!==r&&(s=""+r),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(u=t.ref),t)l.call(t,n)&&!c.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===i[n]&&(i[n]=t[n]);return{$$typeof:o,type:e,key:s,ref:u,props:i,_owner:a.current}}t.Fragment=i,t.jsx=s,t.jsxs=s},48:(e,t,r)=>{e.exports=r(572)},953:e=>{e.exports=require("react")}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t,r){return(t=function(e){var t=function(e){if("object"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==o(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.r(n),r.d(n,{PieSemiCircleChart:()=>k});const l=require("@visx/event"),a=require("@visx/group"),c=require("@visx/shape/lib/shapes/Pie");var s=r.n(c);const u=require("@visx/text"),d=require("@visx/tooltip"),p=require("clsx");var v=r.n(p),f=r(953),h={backgroundColor:"#FFFFFF",labelBackgroundColor:"#FFFFFF",colors:["#98C8DF","#006DAB","#A6DC80","#1F9828","#FF8C8F"],gridStyles:{stroke:"#787C82",strokeWidth:1},tickLength:0,gridColor:"",gridColorDark:""},m=r(48),b=(0,f.createContext)(h);const y=require("@visx/legend"),g=require("@visx/scale"),x={"legend--horizontal":"b1_5FxxoK4aEFLoe67IA","legend--vertical":"vpmQkJAPhp3XJ9Wb6vOw","legend-item":"IKM8KG1lF9e5NzDqMLOJ","legend-item-swatch":"_eccyBq0v2puKsHw8XND","legend-item-label":"UeZrUEpEK0tLzXHmeUco","legend-item-value":"R5msPOYKm79jYV13H0v7"};var j={horizontal:"row",vertical:"column"},O=function(e){var t=e.items,r=e.className,n=e.orientation,o=void 0===n?"horizontal":n,i=(0,g.scaleOrdinal)({domain:t.map((function(e){return e.label})),range:t.map((function(e){return e.color}))});return(0,m.jsx)("div",{className:v()(x.legend,x["legend--".concat(o)],r),role:"list",children:(0,m.jsx)(y.LegendOrdinal,{scale:i,direction:j[o],shape:"rect",shapeWidth:16,shapeHeight:16,className:x["legend-items"],children:function(e){return(0,m.jsx)("div",{className:x["legend--".concat(o)],children:e.map((function(e){var r,n;return(0,m.jsxs)("div",{className:x["legend-item"],children:[(0,m.jsx)("svg",{width:16,height:16,children:(0,m.jsx)("rect",{width:16,height:16,fill:e.value,className:x["legend-item-swatch"]})}),(0,m.jsxs)("span",{className:x["legend-item-label"],children:[e.text,(null===(r=t.find((function(t){return t.label===e.text})))||void 0===r?void 0:r.value)&&(0,m.jsx)("span",{className:x["legend-item-value"],children:null===(n=t.find((function(t){return t.label===e.text})))||void 0===n?void 0:n.value})]})]},e.text)}))})}})})};const w=require("@visx/responsive");function P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function S(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?P(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var F=function(e){var t=e.data;return(0,m.jsxs)(m.Fragment,{children:[null==t?void 0:t.label,": ",(null==t?void 0:t.valueDisplay)||(null==t?void 0:t.value)]})},D=function(e){var t=e.data,r=e.top,n=e.left,o=e.component,i=void 0===o?F:o,l=e.children,a=e.className;return(0,m.jsx)("div",{className:"Jmgc7XAf2uAyK5059rBe",style:{top:r,left:n},role:"tooltip",children:l||t&&(0,m.jsx)(i,{data:t,className:a})})};function N(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?N(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):N(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var C=function(e){var t=e.data,r=e.width,n=void 0===r?500:r,o=e.label,i=e.note,c=e.className,p=e.withTooltips,h=void 0!==p&&p,y=e.clockwise,g=void 0===y||y,x=e.thickness,j=void 0===x?.4:x,w=e.showLegend,P=e.legendOrientation,S=(0,f.useContext)(b),F=(0,d.useTooltip)(),N=F.tooltipOpen,C=F.tooltipLeft,k=F.tooltipTop,q=F.tooltipData,E=F.hideTooltip,T=F.showTooltip,A=n/2,L=n/2,R=n/2,M=R*(1-j+.03),I=t.map((function(e,t){return _(_({},e),{},{index:t})})),K=g?-Math.PI/2:Math.PI/2,W=g?Math.PI/2:-Math.PI/2,z={value:function(e){return e.value},sort:function(e,t){return t.value-e.value},fill:function(e){return e.color||S.colors[e.index%S.colors.length]}},B=(0,f.useCallback)((function(e,t){var r=(0,l.localPoint)(e);r&&T({tooltipData:t.data,tooltipLeft:r.x,tooltipTop:r.y-10})}),[T]),H=(0,f.useCallback)((function(){E()}),[E]),J=(0,f.useCallback)((function(e){return function(t){B(t,e)}}),[B]),U=t.map((function(e,t){return{label:e.label,value:e.valueDisplay||e.value.toString(),color:z.fill(_(_({},e),{},{index:t}))}}));return(0,m.jsxs)("div",{className:v()("pie-semi-circle-chart","oJsjYo330oeLpWqpqf4w",c),children:[(0,m.jsx)("svg",{width:n,height:L,children:(0,m.jsxs)(a.Group,{top:A,left:A,children:[(0,m.jsx)(s(),{data:I,pieValue:z.value,outerRadius:R,innerRadius:M,cornerRadius:3,padAngle:.03,startAngle:K,endAngle:W,pieSort:z.sort,children:function(e){return e.arcs.map((function(t){return(0,m.jsx)("g",{onMouseMove:J(t),onMouseLeave:H,children:(0,m.jsx)("path",{d:e.path(t)||"",fill:z.fill(t.data)})},t.data.label)}))}}),(0,m.jsxs)(a.Group,{children:[(0,m.jsx)(u.Text,{textAnchor:"middle",verticalAnchor:"start",y:-40,className:"bxF3iRlHVJNqwEjRY9QD",children:o}),(0,m.jsx)(u.Text,{textAnchor:"middle",verticalAnchor:"start",y:-20,className:"tA3u0r3RunHmbWFBLrqW",children:i})]})]})}),h&&N&&q&&(0,m.jsx)(D,{data:{label:q.label,value:q.value,valueDisplay:q.valueDisplay},top:k||0,left:C||0}),w&&(0,m.jsx)(O,{items:U,orientation:P,className:"aV40KcaCeoEycQ2crVkB"})]})};C.displayName="PieSemiCircleChart";const k=(q=C,T=(E={}).maxWidth,A=void 0===T?1200:T,R=void 0===(L=E.aspectRatio)?.5:L,I=void 0===(M=E.debounceTime)?50:M,function(e){var t=(0,w.useParentSize)({debounceTime:I,enableDebounceLeadingCall:!0,initialSize:{width:600,height:400}}),r=t.parentRef,n=t.width,o=n?Math.min(n,A):600,i=o*R;return(0,m.jsx)("div",{ref:r,style:{width:"100%",minHeight:"".concat(i,"px")},children:(0,m.jsx)(q,S({width:o,height:i},e))})});var q,E,T,A,L,R,M,I;module.exports=n})();
3
- //# sourceMappingURL=index.js.map
1
+ "use strict";var e=require("react/jsx-runtime"),l=require("@visx/event"),i=require("@visx/group"),t=require("@visx/shape/lib/shapes/Pie"),a=require("@visx/text"),s=require("@visx/tooltip"),r=require("clsx"),o=require("react"),n=require("@visx/legend"),c=require("@visx/scale"),d=require("@visx/responsive");const h=o.createContext({backgroundColor:"#FFFFFF",labelBackgroundColor:"#FFFFFF",colors:["#98C8DF","#006DAB","#A6DC80","#1F9828","#FF8C8F"],gridStyles:{stroke:"#787C82",strokeWidth:1},tickLength:0,gridColor:"",gridColorDark:""});var u={"legend--horizontal":"legend-module__legend--horizontal__IUN13","legend--vertical":"legend-module__legend--vertical__Scfzo","legend-item":"legend-module__legend-item__feemn","legend-item-swatch":"legend-module__legend-item-swatch__nRyXf","legend-item-label":"legend-module__legend-item-label__ksx6I","legend-item-value":"legend-module__legend-item-value__d9x1j"};const m={horizontal:"row",vertical:"column"},p=({items:l,className:i,orientation:t="horizontal"})=>{const a=c.scaleOrdinal({domain:l.map((e=>e.label)),range:l.map((e=>e.color))});return e.jsx("div",{className:r(u.legend,u[`legend--${t}`],i),role:"list",children:e.jsx(n.LegendOrdinal,{scale:a,direction:m[t],shape:"rect",shapeWidth:16,shapeHeight:16,className:u["legend-items"],children:i=>e.jsx("div",{className:u[`legend--${t}`],children:i.map((i=>e.jsxs("div",{className:u["legend-item"],children:[e.jsx("svg",{width:16,height:16,children:e.jsx("rect",{width:16,height:16,fill:i.value,className:u["legend-item-swatch"]})}),e.jsxs("span",{className:u["legend-item-label"],children:[i.text,l.find((e=>e.label===i.text))?.value&&e.jsx("span",{className:u["legend-item-value"],children:l.find((e=>e.label===i.text))?.value})]})]},i.text)))})})})};var g="base-tooltip-module__tooltip__OfX6n";const x=({data:l})=>e.jsxs(e.Fragment,{children:[l?.label,": ",l?.valueDisplay||l?.value]}),v=({data:l,top:i,left:t,component:a=x,children:s,className:r})=>e.jsx("div",{className:g,style:{top:i,left:t},role:"tooltip",children:s||l&&e.jsx(a,{data:l,className:r})});var _="pie-semi-circle-chart-module__pie-semi-circle-chart__r5jk9",j="pie-semi-circle-chart-module__pie-semi-circle-chart-legend__c8W1Y",b="pie-semi-circle-chart-module__label__nPqOg",f="pie-semi-circle-chart-module__note__LpBZQ";const C=({data:n,size:c=500,label:d,note:u,className:m,withTooltips:g=!1,clockwise:x=!0,thickness:C=.4,showLegend:F,legendOrientation:N})=>{const w=o.useContext(h),{tooltipOpen:k,tooltipLeft:q,tooltipTop:y,tooltipData:D,hideTooltip:P,showTooltip:T}=s.useTooltip(),z=c/2,A=c/2,L=c/2,M=L*(1-C+.03),S=n.map(((e,l)=>({...e,index:l}))),I=x?-Math.PI/2:Math.PI/2,O=x?Math.PI/2:-Math.PI/2,R={value:e=>e.value,sort:(e,l)=>l.value-e.value,fill:e=>e.color||w.colors[e.index%w.colors.length]},$=o.useCallback(((e,i)=>{const t=l.localPoint(e);t&&T({tooltipData:i.data,tooltipLeft:t.x,tooltipTop:t.y-10})}),[T]),B=o.useCallback((()=>{P()}),[P]),W=o.useCallback((e=>l=>{$(l,e)}),[$]),G=n.map(((e,l)=>({label:e.label,value:e.valueDisplay||e.value.toString(),color:R.fill({...e,index:l})})));return e.jsxs("div",{className:r("pie-semi-circle-chart",_,m),children:[e.jsx("svg",{viewBox:`0 0 ${c} ${A}`,children:e.jsxs(i.Group,{top:z,left:z,children:[e.jsx(t,{data:S,pieValue:R.value,outerRadius:L,innerRadius:M,cornerRadius:3,padAngle:.03,startAngle:I,endAngle:O,pieSort:R.sort,children:l=>l.arcs.map((i=>e.jsx("g",{onMouseMove:W(i),onMouseLeave:B,children:e.jsx("path",{d:l.path(i)||"",fill:R.fill(i.data)})},i.data.label)))}),e.jsxs(i.Group,{children:[e.jsx(a.Text,{textAnchor:"middle",verticalAnchor:"start",y:-40,className:b,children:d}),e.jsx(a.Text,{textAnchor:"middle",verticalAnchor:"start",y:-20,className:f,children:u})]})]})}),g&&k&&D&&e.jsx(v,{data:{label:D.label,value:D.value,valueDisplay:D.valueDisplay},top:y||0,left:q||0}),F&&e.jsx(p,{items:G,orientation:N,className:j})]})};C.displayName="PieSemiCircleChart";var F=function(l,i){const{maxWidth:t=1200,aspectRatio:a=.5,debounceTime:s=50}=i||{};return function(i){const{parentRef:r,width:o}=d.useParentSize({debounceTime:s,enableDebounceLeadingCall:!0,initialSize:{width:600,height:400}}),n=o?Math.min(o,t):600,c=n*a;return e.jsx("div",{ref:r,style:{width:"100%",minHeight:`${c}px`},children:e.jsx(l,{width:n,height:c,size:n,...i})})}}(C);exports.PieSemiCircleChart=F;
2
+ //# sourceMappingURL=index.js.map