@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/pie-chart/index.js","mappings":";8RASa,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,I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KAAC2B,EAAW,CACXH,KAAO4B,EACPvB,IAAMsB,GAAc,EACpBrB,KAAOoB,GAAe,EACtBhB,MAAQ,CACPqE,UAAW,8BAMjB,EAEApE,EAASqE,YAAc,WACvB,SO7HCC,EP6H+CtE,EO1H+BuE,GAA9EvH,EAA4E,CAAC,GAArEwH,SAAAA,OAAQ,IAAAD,EAAG,KAAIA,EAAEE,OAAW,KAAbC,EAAA1H,EAAEyH,aAAc,GAAGC,EAAEC,OAAY,KAAdC,EAAA5H,EAAE2H,cAAe,GAAEC,EAEtD,SAA0B3L,GAChC,IAAA4L,GAA0CC,EAAAA,EAAAA,eAAe,CACxDH,aAAAA,EACAI,2BAA2B,EAC3BC,YAAa,CAAElG,MAAO,IAAKC,OAAQ,OAH5BkG,EAASJ,EAATI,UAAkBC,EAAWL,EAAlB/F,MAObqG,EAAiBD,EAActD,KAAKC,IAAKqD,EAAaV,GAAa,IACnEY,EAAkBD,EAAiBV,EAEzC,OACC5G,EAAAA,EAAAA,KAAA,OACC3F,IAAM+M,EACNlF,MAAQ,CACPjB,MAAO,OACPuG,UAAW,GAAFpH,OAAMmH,EAAe,OAC5BjH,UAEHN,EAAAA,EAAAA,KAACyG,EAAgBpC,EAAA,CAChBpD,MAAQqG,EACRpG,OAASqG,GAEFnM,KAIX,GAjCM,IACNqL,EAGAtH,EAA8EuH,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 module \"react\"","webpack://@automattic/charts/webpack/bootstrap","webpack://@automattic/charts/webpack/runtime/define property getters","webpack://@automattic/charts/webpack/runtime/hasOwnProperty shorthand","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 module \"@visx/group\"","webpack://@automattic/charts/external module \"@visx/shape\"","webpack://@automattic/charts/external module \"clsx\"","webpack://@automattic/charts/external module \"@visx/event\"","webpack://@automattic/charts/external module \"@visx/tooltip\"","webpack://@automattic/charts/./src/providers/theme/themes.ts","webpack://@automattic/charts/./src/providers/theme/theme-provider.tsx","webpack://@automattic/charts/external module \"@visx/legend\"","webpack://@automattic/charts/external module \"@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 module \"@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 = __WEBPACK_EXTERNAL_MODULE_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","// 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))","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 };","var x = (y) => {\n\tvar x = {}; __webpack_require__.d(x, y); return x\n} \nvar y = (x) => (() => (x))\nconst __WEBPACK_NAMESPACE_OBJECT__ = x({ [\"Group\"]: () => (__WEBPACK_EXTERNAL_MODULE__visx_group_7523624b__.Group) });","var x = (y) => {\n\tvar x = {}; __webpack_require__.d(x, y); return x\n} \nvar y = (x) => (() => (x))\nconst __WEBPACK_NAMESPACE_OBJECT__ = x({ [\"Pie\"]: () => (__WEBPACK_EXTERNAL_MODULE__visx_shape_3711bad4__.Pie) });","var x = (y) => {\n\tvar x = {}; __webpack_require__.d(x, y); return x\n} \nvar y = (x) => (() => (x))\nconst __WEBPACK_NAMESPACE_OBJECT__ = x({ [\"default\"]: () => (__WEBPACK_EXTERNAL_MODULE_clsx__[\"default\"]) });","var x = (y) => {\n\tvar x = {}; __webpack_require__.d(x, y); return x\n} \nvar y = (x) => (() => (x))\nconst __WEBPACK_NAMESPACE_OBJECT__ = x({ [\"localPoint\"]: () => (__WEBPACK_EXTERNAL_MODULE__visx_event_19f6f977__.localPoint) });","var x = (y) => {\n\tvar x = {}; __webpack_require__.d(x, y); return x\n} \nvar y = (x) => (() => (x))\nconst __WEBPACK_NAMESPACE_OBJECT__ = x({ [\"useTooltip\"]: () => (__WEBPACK_EXTERNAL_MODULE__visx_tooltip_83ba89e9__.useTooltip) });","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","var x = (y) => {\n\tvar x = {}; __webpack_require__.d(x, y); return x\n} \nvar y = (x) => (() => (x))\nconst __WEBPACK_NAMESPACE_OBJECT__ = x({ [\"LegendOrdinal\"]: () => (__WEBPACK_EXTERNAL_MODULE__visx_legend_118b7922__.LegendOrdinal) });","var x = (y) => {\n\tvar x = {}; __webpack_require__.d(x, y); return x\n} \nvar y = (x) => (() => (x))\nconst __WEBPACK_NAMESPACE_OBJECT__ = x({ [\"scaleOrdinal\"]: () => (__WEBPACK_EXTERNAL_MODULE__visx_scale_2ec4ad68__.scaleOrdinal) });","// 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","var x = (y) => {\n\tvar x = {}; __webpack_require__.d(x, y); return x\n} \nvar y = (x) => (() => (x))\nconst __WEBPACK_NAMESPACE_OBJECT__ = x({ [\"useParentSize\"]: () => (__WEBPACK_EXTERNAL_MODULE__visx_responsive_eb017331__.useParentSize) });","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","__WEBPACK_EXTERNAL_MODULE_react__","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","definition","o","defineProperty","enumerable","get","obj","prop","_arrayLikeToArray","r","length","Array","_typeof","iterator","constructor","t","i","toPrimitive","TypeError","String","toPropertyKey","value","configurable","writable","y","__WEBPACK_EXTERNAL_MODULE__visx_group_7523624b__","x","__WEBPACK_EXTERNAL_MODULE__visx_shape_3711bad4__","__WEBPACK_EXTERNAL_MODULE_clsx__","__WEBPACK_EXTERNAL_MODULE__visx_event_19f6f977__","__WEBPACK_EXTERNAL_MODULE__visx_tooltip_83ba89e9__","defaultTheme","backgroundColor","labelBackgroundColor","colors","gridStyles","stroke","strokeWidth","tickLength","gridColor","gridColorDark","ThemeContext","createContext","__WEBPACK_EXTERNAL_MODULE__visx_legend_118b7922__","__WEBPACK_EXTERNAL_MODULE__visx_scale_2ec4ad68__","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","__WEBPACK_EXTERNAL_MODULE__visx_responsive_eb017331__","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","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","width","height","fill","value","text","find","DefaultTooltipContent","data","_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":"8bA6CA,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,EAA6BX,qXCQlD,MAAMY,EAA6B,CAClCC,WAAY,MACZC,SAAU,UAGEC,EAAgC,EAC5CC,QACAC,YACAC,cAAc,iBAEd,MAAMC,EAAcC,EAAc,CACjCC,OAAQL,EAAMM,KAAKC,GAAQA,EAAKC,QAChCC,MAAOT,EAAMM,KAAKC,GAAQA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ap: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
- import*as e from"react";import*as t from"@visx/event";import*as r from"@visx/group";import*as o from"@visx/shape/lib/shapes/Pie";import*as n from"@visx/text";import*as i from"@visx/tooltip";import*as a from"clsx";import*as l from"@visx/legend";import*as s from"@visx/scale";import*as c from"@visx/responsive";var u={572:(e,t,r)=>{var o=r(649),n=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,l=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,r){var o,i={},c=null,u=null;for(o in void 0!==r&&(c=""+r),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,o)&&!s.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:c,ref:u,props:i,_owner:l.current}}t.Fragment=i,t.jsx=c,t.jsxs=c},48:(e,t,r)=>{e.exports=r(572)},649:t=>{t.exports=e}},d={};function p(e){var t=d[e];if(void 0!==t)return t.exports;var r=d[e]={exports:{}};return u[e](r,r.exports,p),r.exports}p.d=(e,t)=>{for(var r in t)p.o(t,r)&&!p.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},p.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var f={};function v(e){return v="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},v(e)}function m(e,t,r){return(t=function(e){var t=function(e){if("object"!=v(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=v(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==v(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}p.d(f,{r:()=>W});const h=(b={localPoint:()=>t.localPoint},y={},p.d(y,b),y);var b,y;const g=(e=>{var t={};return p.d(t,e),t})({Group:()=>r.Group}),x=(e=>{var t={};return p.d(t,e),t})({default:()=>o.default}),j=(e=>{var t={};return p.d(t,e),t})({Text:()=>n.Text}),O=(e=>{var t={};return p.d(t,e),t})({useTooltip:()=>i.useTooltip}),P=(e=>{var t={};return p.d(t,e),t})({default:()=>a.default});var w=p(649),F={backgroundColor:"#FFFFFF",labelBackgroundColor:"#FFFFFF",colors:["#98C8DF","#006DAB","#A6DC80","#1F9828","#FF8C8F"],gridStyles:{stroke:"#787C82",strokeWidth:1},tickLength:0,gridColor:"",gridColorDark:""},S=p(48),D=(0,w.createContext)(F);const N=(e=>{var t={};return p.d(t,e),t})({LegendOrdinal:()=>l.LegendOrdinal}),C=(e=>{var t={};return p.d(t,e),t})({scaleOrdinal:()=>s.scaleOrdinal}),k={"legend--horizontal":"b1_5FxxoK4aEFLoe67IA","legend--vertical":"vpmQkJAPhp3XJ9Wb6vOw","legend-item":"IKM8KG1lF9e5NzDqMLOJ","legend-item-swatch":"_eccyBq0v2puKsHw8XND","legend-item-label":"UeZrUEpEK0tLzXHmeUco","legend-item-value":"R5msPOYKm79jYV13H0v7"};var T={horizontal:"row",vertical:"column"},_=function(e){var t=e.items,r=e.className,o=e.orientation,n=void 0===o?"horizontal":o,i=(0,C.scaleOrdinal)({domain:t.map((function(e){return e.label})),range:t.map((function(e){return e.color}))});return(0,S.jsx)("div",{className:(0,P.default)(k.legend,k["legend--".concat(n)],r),role:"list",children:(0,S.jsx)(N.LegendOrdinal,{scale:i,direction:T[n],shape:"rect",shapeWidth:16,shapeHeight:16,className:k["legend-items"],children:function(e){return(0,S.jsx)("div",{className:k["legend--".concat(n)],children:e.map((function(e){var r,o;return(0,S.jsxs)("div",{className:k["legend-item"],children:[(0,S.jsx)("svg",{width:16,height:16,children:(0,S.jsx)("rect",{width:16,height:16,fill:e.value,className:k["legend-item-swatch"]})}),(0,S.jsxs)("span",{className:k["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,S.jsx)("span",{className:k["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 L=(e=>{var t={};return p.d(t,e),t})({useParentSize:()=>c.useParentSize});function E(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 A(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?E(Object(r),!0).forEach((function(t){m(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var R=function(e){var t=e.data;return(0,S.jsxs)(S.Fragment,{children:[null==t?void 0:t.label,": ",(null==t?void 0:t.valueDisplay)||(null==t?void 0:t.value)]})},M=function(e){var t=e.data,r=e.top,o=e.left,n=e.component,i=void 0===n?R:n,a=e.children,l=e.className;return(0,S.jsx)("div",{className:"Jmgc7XAf2uAyK5059rBe",style:{top:r,left:o},role:"tooltip",children:a||t&&(0,S.jsx)(i,{data:t,className:l})})};function z(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 I(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?z(Object(r),!0).forEach((function(t){m(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):z(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var K=function(e){var t=e.data,r=e.width,o=void 0===r?500:r,n=e.label,i=e.note,a=e.className,l=e.withTooltips,s=void 0!==l&&l,c=e.clockwise,u=void 0===c||c,d=e.thickness,p=void 0===d?.4:d,f=e.showLegend,v=e.legendOrientation,m=(0,w.useContext)(D),b=(0,O.useTooltip)(),y=b.tooltipOpen,F=b.tooltipLeft,N=b.tooltipTop,C=b.tooltipData,k=b.hideTooltip,T=b.showTooltip,L=o/2,E=o/2,A=o/2,R=A*(1-p+.03),z=t.map((function(e,t){return I(I({},e),{},{index:t})})),K=u?-Math.PI/2:Math.PI/2,W=u?Math.PI/2:-Math.PI/2,B={value:function(e){return e.value},sort:function(e,t){return t.value-e.value},fill:function(e){return e.color||m.colors[e.index%m.colors.length]}},H=(0,w.useCallback)((function(e,t){var r=(0,h.localPoint)(e);r&&T({tooltipData:t.data,tooltipLeft:r.x,tooltipTop:r.y-10})}),[T]),q=(0,w.useCallback)((function(){k()}),[k]),J=(0,w.useCallback)((function(e){return function(t){H(t,e)}}),[H]),G=t.map((function(e,t){return{label:e.label,value:e.valueDisplay||e.value.toString(),color:B.fill(I(I({},e),{},{index:t}))}}));return(0,S.jsxs)("div",{className:(0,P.default)("pie-semi-circle-chart","oJsjYo330oeLpWqpqf4w",a),children:[(0,S.jsx)("svg",{width:o,height:E,children:(0,S.jsxs)(g.Group,{top:L,left:L,children:[(0,S.jsx)(x.default,{data:z,pieValue:B.value,outerRadius:A,innerRadius:R,cornerRadius:3,padAngle:.03,startAngle:K,endAngle:W,pieSort:B.sort,children:function(e){return e.arcs.map((function(t){return(0,S.jsx)("g",{onMouseMove:J(t),onMouseLeave:q,children:(0,S.jsx)("path",{d:e.path(t)||"",fill:B.fill(t.data)})},t.data.label)}))}}),(0,S.jsxs)(g.Group,{children:[(0,S.jsx)(j.Text,{textAnchor:"middle",verticalAnchor:"start",y:-40,className:"bxF3iRlHVJNqwEjRY9QD",children:n}),(0,S.jsx)(j.Text,{textAnchor:"middle",verticalAnchor:"start",y:-20,className:"tA3u0r3RunHmbWFBLrqW",children:i})]})]})}),s&&y&&C&&(0,S.jsx)(M,{data:{label:C.label,value:C.value,valueDisplay:C.valueDisplay},top:N||0,left:F||0}),f&&(0,S.jsx)(_,{items:G,orientation:v,className:"aV40KcaCeoEycQ2crVkB"})]})};K.displayName="PieSemiCircleChart";const W=(B=K,q=(H={}).maxWidth,J=void 0===q?1200:q,U=void 0===(G=H.aspectRatio)?.5:G,Y=void 0===(V=H.debounceTime)?50:V,function(e){var t=(0,L.useParentSize)({debounceTime:Y,enableDebounceLeadingCall:!0,initialSize:{width:600,height:400}}),r=t.parentRef,o=t.width,n=o?Math.min(o,J):600,i=n*U;return(0,S.jsx)("div",{ref:r,style:{width:"100%",minHeight:"".concat(i,"px")},children:(0,S.jsx)(B,A({width:n,height:i},e))})});var B,H,q,J,G,U,V,Y,X=f.r;export{X as PieSemiCircleChart};
3
- //# sourceMappingURL=index.js.map
1
+ import{jsx as e,jsxs as l,Fragment as t}from"react/jsx-runtime";import{localPoint as i}from"@visx/event";import{Group as a}from"@visx/group";import o from"@visx/shape/lib/shapes/Pie";import{Text as r}from"@visx/text";import{useTooltip as n}from"@visx/tooltip";import s from"clsx";import{createContext as d,useContext as c,useCallback as m}from"react";import{LegendOrdinal as h}from"@visx/legend";import{scaleOrdinal as p}from"@visx/scale";import{useParentSize as g}from"@visx/responsive";const u=d({backgroundColor:"#FFFFFF",labelBackgroundColor:"#FFFFFF",colors:["#98C8DF","#006DAB","#A6DC80","#1F9828","#FF8C8F"],gridStyles:{stroke:"#787C82",strokeWidth:1},tickLength:0,gridColor:"",gridColorDark:""});var v={"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 _={horizontal:"row",vertical:"column"},f=({items:t,className:i,orientation:a="horizontal"})=>{const o=p({domain:t.map((e=>e.label)),range:t.map((e=>e.color))});return e("div",{className:s(v.legend,v[`legend--${a}`],i),role:"list",children:e(h,{scale:o,direction:_[a],shape:"rect",shapeWidth:16,shapeHeight:16,className:v["legend-items"],children:i=>e("div",{className:v[`legend--${a}`],children:i.map((i=>l("div",{className:v["legend-item"],children:[e("svg",{width:16,height:16,children:e("rect",{width:16,height:16,fill:i.value,className:v["legend-item-swatch"]})}),l("span",{className:v["legend-item-label"],children:[i.text,t.find((e=>e.label===i.text))?.value&&e("span",{className:v["legend-item-value"],children:t.find((e=>e.label===i.text))?.value})]})]},i.text)))})})})};var x="base-tooltip-module__tooltip__OfX6n";const b=({data:e})=>l(t,{children:[e?.label,": ",e?.valueDisplay||e?.value]}),N=({data:l,top:t,left:i,component:a=b,children:o,className:r})=>e("div",{className:x,style:{top:t,left:i},role:"tooltip",children:o||l&&e(a,{data:l,className:r})});var F="pie-semi-circle-chart-module__pie-semi-circle-chart__r5jk9",w="pie-semi-circle-chart-module__pie-semi-circle-chart-legend__c8W1Y",C="pie-semi-circle-chart-module__label__nPqOg",y="pie-semi-circle-chart-module__note__LpBZQ";const D=({data:t,size:d=500,label:h,note:p,className:g,withTooltips:v=!1,clockwise:_=!0,thickness:x=.4,showLegend:b,legendOrientation:D})=>{const k=c(u),{tooltipOpen:A,tooltipLeft:z,tooltipTop:M,tooltipData:P,hideTooltip:L,showTooltip:S}=n(),T=d/2,I=d/2,R=d/2,$=R*(1-x+.03),B=t.map(((e,l)=>({...e,index:l}))),O=_?-Math.PI/2:Math.PI/2,W=_?Math.PI/2:-Math.PI/2,j={value:e=>e.value,sort:(e,l)=>l.value-e.value,fill:e=>e.color||k.colors[e.index%k.colors.length]},H=m(((e,l)=>{const t=i(e);t&&S({tooltipData:l.data,tooltipLeft:t.x,tooltipTop:t.y-10})}),[S]),X=m((()=>{L()}),[L]),q=m((e=>l=>{H(l,e)}),[H]),Q=t.map(((e,l)=>({label:e.label,value:e.valueDisplay||e.value.toString(),color:j.fill({...e,index:l})})));return l("div",{className:s("pie-semi-circle-chart",F,g),children:[e("svg",{viewBox:`0 0 ${d} ${I}`,children:l(a,{top:T,left:T,children:[e(o,{data:B,pieValue:j.value,outerRadius:R,innerRadius:$,cornerRadius:3,padAngle:.03,startAngle:O,endAngle:W,pieSort:j.sort,children:l=>l.arcs.map((t=>e("g",{onMouseMove:q(t),onMouseLeave:X,children:e("path",{d:l.path(t)||"",fill:j.fill(t.data)})},t.data.label)))}),l(a,{children:[e(r,{textAnchor:"middle",verticalAnchor:"start",y:-40,className:C,children:h}),e(r,{textAnchor:"middle",verticalAnchor:"start",y:-20,className:y,children:p})]})]})}),v&&A&&P&&e(N,{data:{label:P.label,value:P.value,valueDisplay:P.valueDisplay},top:M||0,left:z||0}),b&&e(f,{items:Q,orientation:D,className:w})]})};D.displayName="PieSemiCircleChart";var k=function(l,t){const{maxWidth:i=1200,aspectRatio:a=.5,debounceTime:o=50}=t||{};return function(t){const{parentRef:r,width:n}=g({debounceTime:o,enableDebounceLeadingCall:!0,initialSize:{width:600,height:400}}),s=n?Math.min(n,i):600,d=s*a;return e("div",{ref:r,style:{width:"100%",minHeight:`${d}px`},children:e(l,{width:s,height:d,size:s,...t})})}}(D);export{k as PieSemiCircleChart};
2
+ //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components/pie-semi-circle-chart/index.js","mappings":";0UASa,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,KAAKC,EAAED,GAAGF,EAAEE,IAAI,GAAGH,GAAGA,EA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,GAA0CC,EAAAA,EAAAA,eAAe,CACxDH,aAAAA,EACAI,2BAA2B,EAC3BC,YAAa,CAAEzF,MAAO,IAAKC,OAAQ,OAH5ByF,EAASJ,EAATI,UAAkBC,EAAWL,EAAlBtF,MAOb4F,EAAiBD,EAAc7C,KAAK+C,IAAKF,EAAaV,GAAa,IACnEa,EAAkBF,EAAiBV,EAEzC,OACCnG,EAAAA,EAAAA,KAAA,OACCzF,IAAMoM,EACNzE,MAAQ,CACPjB,MAAO,OACP+F,UAAW,GAAF5G,OAAM2G,EAAe,OAC5BzG,UAEHN,EAAAA,EAAAA,KAACgG,EAAgBnC,EAAA,CAChB5C,MAAQ4F,EACR3F,OAAS6F,GAEFzL,KAIX,GAjCM,IACN0K,EAGA7G,EAA8E8G,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 module \"react\"","webpack://@automattic/charts/webpack/bootstrap","webpack://@automattic/charts/webpack/runtime/define property getters","webpack://@automattic/charts/webpack/runtime/hasOwnProperty shorthand","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 module \"@visx/event\"","webpack://@automattic/charts/external module \"@visx/group\"","webpack://@automattic/charts/external module \"@visx/shape/lib/shapes/Pie\"","webpack://@automattic/charts/external module \"@visx/text\"","webpack://@automattic/charts/external module \"@visx/tooltip\"","webpack://@automattic/charts/external module \"clsx\"","webpack://@automattic/charts/./src/providers/theme/themes.ts","webpack://@automattic/charts/./src/providers/theme/theme-provider.tsx","webpack://@automattic/charts/external module \"@visx/legend\"","webpack://@automattic/charts/external module \"@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 module \"@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-semi-circle-chart/pie-semi-circle-chart.tsx","webpack://@automattic/charts/./src/components/pie-semi-circle-chart/pie-semi-circle-chart.module.scss?31c2","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 = __WEBPACK_EXTERNAL_MODULE_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","// 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))","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 };","var x = (y) => {\n\tvar x = {}; __webpack_require__.d(x, y); return x\n} \nvar y = (x) => (() => (x))\nconst __WEBPACK_NAMESPACE_OBJECT__ = x({ [\"localPoint\"]: () => (__WEBPACK_EXTERNAL_MODULE__visx_event_19f6f977__.localPoint) });","var x = (y) => {\n\tvar x = {}; __webpack_require__.d(x, y); return x\n} \nvar y = (x) => (() => (x))\nconst __WEBPACK_NAMESPACE_OBJECT__ = x({ [\"Group\"]: () => (__WEBPACK_EXTERNAL_MODULE__visx_group_7523624b__.Group) });","var x = (y) => {\n\tvar x = {}; __webpack_require__.d(x, y); return x\n} \nvar y = (x) => (() => (x))\nconst __WEBPACK_NAMESPACE_OBJECT__ = x({ [\"default\"]: () => (__WEBPACK_EXTERNAL_MODULE__visx_shape_lib_shapes_Pie_08ab59ce__[\"default\"]) });","var x = (y) => {\n\tvar x = {}; __webpack_require__.d(x, y); return x\n} \nvar y = (x) => (() => (x))\nconst __WEBPACK_NAMESPACE_OBJECT__ = x({ [\"Text\"]: () => (__WEBPACK_EXTERNAL_MODULE__visx_text_459b7199__.Text) });","var x = (y) => {\n\tvar x = {}; __webpack_require__.d(x, y); return x\n} \nvar y = (x) => (() => (x))\nconst __WEBPACK_NAMESPACE_OBJECT__ = x({ [\"useTooltip\"]: () => (__WEBPACK_EXTERNAL_MODULE__visx_tooltip_83ba89e9__.useTooltip) });","var x = (y) => {\n\tvar x = {}; __webpack_require__.d(x, y); return x\n} \nvar y = (x) => (() => (x))\nconst __WEBPACK_NAMESPACE_OBJECT__ = x({ [\"default\"]: () => (__WEBPACK_EXTERNAL_MODULE_clsx__[\"default\"]) });","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","var x = (y) => {\n\tvar x = {}; __webpack_require__.d(x, y); return x\n} \nvar y = (x) => (() => (x))\nconst __WEBPACK_NAMESPACE_OBJECT__ = x({ [\"LegendOrdinal\"]: () => (__WEBPACK_EXTERNAL_MODULE__visx_legend_118b7922__.LegendOrdinal) });","var x = (y) => {\n\tvar x = {}; __webpack_require__.d(x, y); return x\n} \nvar y = (x) => (() => (x))\nconst __WEBPACK_NAMESPACE_OBJECT__ = x({ [\"scaleOrdinal\"]: () => (__WEBPACK_EXTERNAL_MODULE__visx_scale_2ec4ad68__.scaleOrdinal) });","// 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","var x = (y) => {\n\tvar x = {}; __webpack_require__.d(x, y); return x\n} \nvar y = (x) => (() => (x))\nconst __WEBPACK_NAMESPACE_OBJECT__ = x({ [\"useParentSize\"]: () => (__WEBPACK_EXTERNAL_MODULE__visx_responsive_eb017331__.useParentSize) });","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\"};","import { localPoint } from '@visx/event';\nimport { Group } from '@visx/group';\nimport Pie, { type PieArcDatum } from '@visx/shape/lib/shapes/Pie';\nimport { Text } from '@visx/text';\nimport { useTooltip } from '@visx/tooltip';\nimport clsx from 'clsx';\nimport { FC, useCallback } from 'react';\nimport { useChartTheme } from '../../providers/theme/theme-provider';\nimport { Legend } from '../legend';\nimport { withResponsive } from '../shared/with-responsive';\nimport { BaseTooltip } from '../tooltip';\nimport styles from './pie-semi-circle-chart.module.scss';\nimport type { BaseChartProps, DataPointPercentage } from '../../types';\n\ninterface PieSemiCircleChartProps extends BaseChartProps< DataPointPercentage[] > {\n\t/**\n\t * Label text to display above the chart\n\t */\n\tlabel: string;\n\t/**\n\t * Note text to display below the label\n\t */\n\tnote: string;\n\t/**\n\t * Direction of chart rendering\n\t * true for clockwise, false for counter-clockwise\n\t */\n\tclockwise?: boolean;\n\t/**\n\t * Thickness of the pie chart. A value between 0 and 1\n\t */\n\tthickness?: number;\n}\n\ntype ArcData = PieArcDatum< DataPointPercentage >;\n\nconst PieSemiCircleChart: FC< PieSemiCircleChartProps > = ( {\n\tdata,\n\twidth = 500, //TODO: replace when making the components responsive\n\tlabel,\n\tnote,\n\tclassName,\n\twithTooltips = false,\n\tclockwise = true,\n\tthickness = 0.4,\n\tshowLegend,\n\tlegendOrientation,\n} ) => {\n\tconst providerTheme = useChartTheme();\n\tconst { tooltipOpen, tooltipLeft, tooltipTop, tooltipData, hideTooltip, showTooltip } =\n\t\tuseTooltip< DataPointPercentage >();\n\n\tconst centerX = width / 2;\n\tconst height = width / 2;\n\tconst radius = width / 2;\n\tconst pad = 0.03;\n\tconst innerRadius = radius * ( 1 - thickness + pad );\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\t// Set the clockwise direction based on the prop\n\tconst startAngle = clockwise ? -Math.PI / 2 : Math.PI / 2;\n\tconst endAngle = clockwise ? Math.PI / 2 : -Math.PI / 2;\n\n\tconst accessors = {\n\t\tvalue: ( d: DataPointPercentage & { index: number } ) => d.value,\n\t\tsort: (\n\t\t\ta: DataPointPercentage & { index: number },\n\t\t\tb: DataPointPercentage & { index: number }\n\t\t) => b.value - a.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 % providerTheme.colors.length ],\n\t};\n\n\tconst handleMouseMove = useCallback(\n\t\t( event: React.MouseEvent, arc: ArcData ) => {\n\t\t\tconst coords = localPoint( event );\n\t\t\tif ( ! coords ) return;\n\n\t\t\tshowTooltip( {\n\t\t\t\ttooltipData: arc.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[ showTooltip ]\n\t);\n\n\tconst handleMouseLeave = useCallback( () => {\n\t\thideTooltip();\n\t}, [ hideTooltip ] );\n\n\tconst handleArcMouseMove = useCallback(\n\t\t( arc: ArcData ) => ( event: React.MouseEvent ) => {\n\t\t\thandleMouseMove( event, arc );\n\t\t},\n\t\t[ handleMouseMove ]\n\t);\n\n\t// Create legend items\n\tconst legendItems = data.map( ( item, index ) => ( {\n\t\tlabel: item.label,\n\t\tvalue: item.valueDisplay || item.value.toString(),\n\t\tcolor: accessors.fill( { ...item, index } ),\n\t} ) );\n\n\treturn (\n\t\t<div\n\t\t\tclassName={ clsx( 'pie-semi-circle-chart', styles[ 'pie-semi-circle-chart' ], className ) }\n\t\t>\n\t\t\t<svg width={ width } height={ height }>\n\t\t\t\t{ /* Main chart group that contains both the pie and text elements */ }\n\t\t\t\t<Group top={ centerX } left={ centerX }>\n\t\t\t\t\t{ /* Pie chart */ }\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 }\n\t\t\t\t\t\tinnerRadius={ innerRadius }\n\t\t\t\t\t\tcornerRadius={ 3 }\n\t\t\t\t\t\tpadAngle={ pad }\n\t\t\t\t\t\tstartAngle={ startAngle }\n\t\t\t\t\t\tendAngle={ endAngle }\n\t\t\t\t\t\tpieSort={ accessors.sort }\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 => (\n\t\t\t\t\t\t\t\t<g\n\t\t\t\t\t\t\t\t\tkey={ arc.data.label }\n\t\t\t\t\t\t\t\t\tonMouseMove={ handleArcMouseMove( arc ) }\n\t\t\t\t\t\t\t\t\tonMouseLeave={ handleMouseLeave }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<path d={ pie.path( arc ) || '' } fill={ accessors.fill( arc.data ) } />\n\t\t\t\t\t\t\t\t</g>\n\t\t\t\t\t\t\t) );\n\t\t\t\t\t\t} }\n\t\t\t\t\t</Pie>\n\n\t\t\t\t\t<Group>\n\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\ttextAnchor=\"middle\"\n\t\t\t\t\t\t\tverticalAnchor=\"start\"\n\t\t\t\t\t\t\ty={ -40 } // double font size to make room for a note\n\t\t\t\t\t\t\tclassName={ styles.label }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\ttextAnchor=\"middle\"\n\t\t\t\t\t\t\tverticalAnchor=\"start\"\n\t\t\t\t\t\t\ty={ -20 } // font size with padding\n\t\t\t\t\t\t\tclassName={ styles.note }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ note }\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t</Group>\n\t\t\t\t</Group>\n\t\t\t</svg>\n\n\t\t\t{ withTooltips && tooltipOpen && tooltipData && (\n\t\t\t\t<BaseTooltip\n\t\t\t\t\tdata={ {\n\t\t\t\t\t\tlabel: tooltipData.label,\n\t\t\t\t\t\tvalue: tooltipData.value,\n\t\t\t\t\t\tvalueDisplay: tooltipData.valueDisplay,\n\t\t\t\t\t} }\n\t\t\t\t\ttop={ tooltipTop || 0 }\n\t\t\t\t\tleft={ tooltipLeft || 0 }\n\t\t\t\t/>\n\t\t\t) }\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-semi-circle-chart-legend' ] }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</div>\n\t);\n};\n\nPieSemiCircleChart.displayName = 'PieSemiCircleChart';\nexport default withResponsive< PieSemiCircleChartProps >( PieSemiCircleChart );\n","// extracted by mini-css-extract-plugin\nexport default {\"pie-semi-circle-chart\":\"oJsjYo330oeLpWqpqf4w\",\"pie-semi-circle-chart-legend\":\"aV40KcaCeoEycQ2crVkB\",\"label\":\"bxF3iRlHVJNqwEjRY9QD\",\"note\":\"tA3u0r3RunHmbWFBLrqW\"};","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","__WEBPACK_EXTERNAL_MODULE_react__","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","definition","o","defineProperty","enumerable","get","obj","prop","_typeof","iterator","constructor","r","t","i","toPrimitive","TypeError","String","toPropertyKey","value","configurable","writable","y","__WEBPACK_EXTERNAL_MODULE__visx_event_19f6f977__","x","__WEBPACK_EXTERNAL_MODULE__visx_group_7523624b__","__WEBPACK_EXTERNAL_MODULE__visx_shape_lib_shapes_Pie_08ab59ce__","__WEBPACK_EXTERNAL_MODULE__visx_text_459b7199__","__WEBPACK_EXTERNAL_MODULE__visx_tooltip_83ba89e9__","__WEBPACK_EXTERNAL_MODULE_clsx__","defaultTheme","backgroundColor","labelBackgroundColor","colors","gridStyles","stroke","strokeWidth","tickLength","gridColor","gridColorDark","ThemeContext","createContext","__WEBPACK_EXTERNAL_MODULE__visx_legend_118b7922__","__WEBPACK_EXTERNAL_MODULE__visx_scale_2ec4ad68__","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","__WEBPACK_EXTERNAL_MODULE__visx_responsive_eb017331__","DefaultTooltipContent","data","_Fragment","valueDisplay","BaseTooltip","_ref2","top","left","_ref2$component","component","Component","style","PieSemiCircleChart","_ref$width","note","_ref$withTooltips","withTooltips","_ref$clockwise","clockwise","_ref$thickness","thickness","showLegend","legendOrientation","providerTheme","useContext","_useTooltip","useTooltip","tooltipOpen","tooltipLeft","tooltipTop","tooltipData","hideTooltip","showTooltip","centerX","radius","innerRadius","dataWithIndex","index","_objectSpread","startAngle","Math","PI","endAngle","accessors","sort","length","handleMouseMove","useCallback","event","arc","coords","localPoint","handleMouseLeave","handleArcMouseMove","legendItems","toString","Group","Pie","pieValue","outerRadius","cornerRadius","padAngle","pieSort","pie","arcs","onMouseMove","onMouseLeave","path","Text","textAnchor","verticalAnchor","Legend","displayName","WrappedComponent","_ref$maxWidth","maxWidth","aspectRatio","_ref$aspectRatio","debounceTime","_ref$debounceTime","_useParentSize","useParentSize","enableDebounceLeadingCall","initialSize","parentRef","parentWidth","containerWidth","min","containerHeight","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/tooltip/base-tooltip.tsx","../../../../src/components/pie-semi-circle-chart/pie-semi-circle-chart.tsx","../../../../src/components/shared/with-responsive.tsx"],"sourcesContent":[null,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","width","height","fill","value","text","find","DefaultTooltipContent","data","_Fragment","valueDisplay","BaseTooltip","top","left","component","Component","style","PieSemiCircleChart","size","note","withTooltips","clockwise","thickness","showLegend","legendOrientation","providerTheme","useContext","tooltipOpen","tooltipLeft","tooltipTop","tooltipData","hideTooltip","showTooltip","useTooltip","centerX","radius","innerRadius","dataWithIndex","d","index","startAngle","Math","PI","endAngle","accessors","sort","a","b","length","handleMouseMove","useCallback","event","arc","coords","localPoint","x","y","handleMouseLeave","handleArcMouseMove","legendItems","toString","viewBox","Group","Pie","pieValue","outerRadius","cornerRadius","padAngle","pieSort","pie","arcs","onMouseMove","onMouseLeave","path","Text","textAnchor","verticalAnchor","Legend","displayName","pieSemiCircleChart","WrappedComponent","config","maxWidth","aspectRatio","debounceTime","props","parentRef","parentWidth","useParentSize","enableDebounceLeadingCall","initialSize","containerWidth","min","containerHeight","ref","minHeight","withResponsive"],"mappings":"weAKA,MCEMA,EAAeC,EDFY,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,EAAc,CACjCC,OAAQL,EAAMM,KAAKC,GAAQA,EAAKC,QAChCC,MAAOT,EAAMM,KAAKC,GAAQA,EAAKG,UAGhC,OACCC,SACCV,UAAYW,EAAMC,EAAOC,OAAQD,EAAQ,WAAYX,KAAkBD,GACvEc,KAAK,OAELC,SAAAL,EAACM,EACA,CAAAC,MAAQf,EACRgB,UAAYvB,EAA4BM,GACxCkB,MAAM,OACNC,WAAa,GACbC,YAAc,GACdrB,UAAYY,EAAQ,yBAElBU,GACDZ,SAAKV,UAAYY,EAAQ,WAAYX,KAAgBc,SAClDO,EAAOjB,KAAKE,GACbgB,SAAwBvB,UAAYY,EAAQ,eAC3CG,SAAA,CAAAL,EAAA,MAAA,C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weight:600;font-size:16px}.oJsjYo330oeLpWqpqf4w .tA3u0r3RunHmbWFBLrqW{margin-top:0px;font-size:14px}
2
- .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%)}
3
- .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
+ .line-chart-module__line-chart__ITM3d {
11
+ position: relative;
12
+ }
13
+ .line-chart-module__line-chart__tooltip__aqcme {
14
+ background: #fff;
15
+ padding: 0.5rem;
16
+ }
17
+ .line-chart-module__line-chart__tooltip-date__4Dzab {
18
+ font-weight: bold;
19
+ padding-bottom: 10px;
20
+ }
21
+ .line-chart-module__line-chart__tooltip-row__6A37G {
22
+ display: flex;
23
+ align-items: center;
24
+ padding: 4px 0;
25
+ justify-content: space-between;
26
+ }
27
+ .line-chart-module__line-chart__tooltip-label__IvnFF {
28
+ font-weight: 500;
29
+ padding-right: 1rem;
30
+ }
31
+ .grid-control-module__grid-control__KOnZN .visx-line {
32
+ stroke: #d7d6d6;
33
+ stroke-width: 1px;
34
+ shape-rendering: crispEdges;
35
+ }
36
+ .legend-module__legend--horizontal__IUN13 {
37
+ display: flex;
38
+ flex-direction: row;
39
+ flex-wrap: wrap;
40
+ gap: 16px;
41
+ }
42
+ .legend-module__legend--vertical__Scfzo {
43
+ display: flex;
44
+ flex-direction: column;
45
+ gap: 8px;
46
+ }
4
47
 
5
- /*# sourceMappingURL=style.css.map*/
48
+ .legend-module__legend-item__feemn {
49
+ display: flex;
50
+ align-items: center;
51
+ gap: 8px;
52
+ font-size: 0.875rem;
53
+ }
54
+
55
+ .legend-module__legend-item-swatch__nRyXf {
56
+ border-radius: 2px;
57
+ }
58
+
59
+ .legend-module__legend-item-label__ksx6I {
60
+ color: var(--jp-gray-80, #2c3338);
61
+ display: flex;
62
+ align-items: center;
63
+ gap: 0.5rem;
64
+ }
65
+
66
+ .legend-module__legend-item-value__d9x1j {
67
+ font-weight: 500;
68
+ }
69
+ .base-tooltip-module__tooltip__OfX6n {
70
+ padding: 0.5rem;
71
+ background-color: rgba(0, 0, 0, 0.85);
72
+ color: white;
73
+ border-radius: 4px;
74
+ font-size: 14px;
75
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
76
+ position: absolute;
77
+ pointer-events: none;
78
+ transform: translate(-50%, -100%);
79
+ }
80
+ .pie-semi-circle-chart-module__pie-semi-circle-chart__r5jk9 {
81
+ position: relative;
82
+ text-align: center;
83
+ }
84
+ .pie-semi-circle-chart-module__pie-semi-circle-chart-legend__c8W1Y {
85
+ margin-top: 1rem;
86
+ }
87
+ .pie-semi-circle-chart-module__pie-semi-circle-chart__r5jk9 .pie-semi-circle-chart-module__label__nPqOg {
88
+ margin-bottom: 0px;
89
+ font-weight: 600;
90
+ font-size: 16px;
91
+ }
92
+ .pie-semi-circle-chart-module__pie-semi-circle-chart__r5jk9 .pie-semi-circle-chart-module__note__LpBZQ {
93
+ margin-top: 0px;
94
+ font-size: 14px;
95
+ }
@@ -1,3 +1,2 @@
1
- /*! For license information please see index.js.LICENSE.txt */
2
- import*as e from"react";var r={572:(e,r,o)=>{var t=o(649),a=Symbol.for("react.element"),n=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,s=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};function i(e,r,o){var t,n={},i=null,f=null;for(t in void 0!==o&&(i=""+o),void 0!==r.key&&(i=""+r.key),void 0!==r.ref&&(f=r.ref),r)l.call(r,t)&&!p.hasOwnProperty(t)&&(n[t]=r[t]);if(e&&e.defaultProps)for(t in r=e.defaultProps)void 0===n[t]&&(n[t]=r[t]);return{$$typeof:a,type:e,key:i,ref:f,props:n,_owner:s.current}}r.Fragment=n,r.jsx=i,r.jsxs=i},48:(e,r,o)=>{e.exports=o(572)},649:r=>{r.exports=e}},o={};function t(e){var a=o[e];if(void 0!==a)return a.exports;var n=o[e]={exports:{}};return r[e](n,n.exports,t),n.exports}t.d=(e,r)=>{for(var o in r)t.o(r,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var a={};t.d(a,{R:()=>s});var n=t(48),l=function(e){var r=e.data;return(0,n.jsxs)(n.Fragment,{children:[null==r?void 0:r.label,": ",(null==r?void 0:r.valueDisplay)||(null==r?void 0:r.value)]})},s=function(e){var r=e.data,o=e.top,t=e.left,a=e.component,s=void 0===a?l:a,p=e.children,i=e.className;return(0,n.jsx)("div",{className:"Jmgc7XAf2uAyK5059rBe",style:{top:o,left:t},role:"tooltip",children:p||r&&(0,n.jsx)(s,{data:r,className:i})})},p=a.R;export{p as BaseTooltip};
3
- //# sourceMappingURL=index.js.map
1
+ import{jsx as t,jsxs as a,Fragment as e}from"react/jsx-runtime";var l="base-tooltip-module__tooltip__OfX6n";const o=({data:t})=>a(e,{children:[t?.label,": ",t?.valueDisplay||t?.value]}),s=({data:a,top:e,left:s,component:i=o,children:r,className:c})=>t("div",{className:l,style:{top:e,left:s},role:"tooltip",children:r||a&&t(i,{data:a,className:c})});export{s as BaseTooltip};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ASY,KACjC,IAAI,IAAI/B,KAAO+B,EACXL,EAAoBM,EAAED,EAAY/B,KAAS0B,EAAoBM,EAAEb,EAASnB,IAC5EP,OAAOwC,eAAed,EAASnB,EAAK,CAAEkC,YAAY,EAAMC,IAAKJ,EAAW/B,IAE1E,ECND0B,EAAoBM,EAAI,CAACI,EAAKC,IAAU5C,OAAOC,UAAUC,eAAeiB,KAAKwB,EAAKC,yCCmC5EC,EAAwB,SAAHC,GAAA,IAAOC,EAAID,EAAJC,KAAI,OACrCC,EAAAA,EAAAA,MAAAC,EAAAA,SAAA,CAAAC,SAAA,CACGH,aAAI,EAAJA,EAAMI,MAAO,MAAIJ,aAAI,EAAJA,EAAMK,gBAAgBL,aAAI,EAAJA,EAAMM,SAC7C,EAGSC,EAAc,SAAHC,GAOC,IANxBR,EAAIQ,EAAJR,KACAS,EAAGD,EAAHC,IACAC,EAAIF,EAAJE,KAAIC,EAAAH,EACJI,UAAWC,OAAS,IAAAF,EAAGb,EAAqBa,EAC5CR,EAAQK,EAARL,SACAW,EAASN,EAATM,UAEA,OACCC,EAAAA,EAAAA,KAAA,OAAKD,UCjDmB,uBDiDUE,MAAQ,CAAEP,IAAAA,EAAKC,KAAAA,GAASO,KAAK,UAASd,SACrEA,GAAcH,IAAQe,EAAAA,EAAAA,KAACF,EAAS,CAACb,KAAOA,EAAOc,UAAYA,KAGhE","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 module \"react\"","webpack://@automattic/charts/webpack/bootstrap","webpack://@automattic/charts/webpack/runtime/define property getters","webpack://@automattic/charts/webpack/runtime/hasOwnProperty shorthand","webpack://@automattic/charts/./src/components/tooltip/base-tooltip.tsx","webpack://@automattic/charts/./src/components/tooltip/base-tooltip.module.scss?1d14"],"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 = __WEBPACK_EXTERNAL_MODULE_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","// 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))","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\"};"],"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","__WEBPACK_EXTERNAL_MODULE_react__","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","definition","o","defineProperty","enumerable","get","obj","prop","DefaultTooltipContent","_ref","data","_jsxs","_Fragment","children","label","valueDisplay","value","BaseTooltip","_ref2","top","left","_ref2$component","component","Component","className","_jsx","style","role"],"sourceRoot":""}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/tooltip/base-tooltip.tsx"],"sourcesContent":[null],"names":["DefaultTooltipContent","data","_jsxs","_Fragment","children","label","valueDisplay","value","BaseTooltip","top","left","component","Component","className","_jsx","styles","style","role"],"mappings":"4GAmCA,MAAMA,EAAwB,EAAIC,UACjCC,EACGC,EAAA,CAAAC,SAAA,CAAAH,GAAMI,MAAK,KAAMJ,GAAMK,cAAgBL,GAAMM,SAIpCC,EAAc,EAC1BP,OACAQ,MACAC,OACAC,UAAWC,EAAYZ,EACvBI,WACAS,eAGCC,EAAK,MAAA,CAAAD,UAAYE,EAAiBC,MAAQ,CAAEP,MAAKC,QAASO,KAAK,UAC5Db,SAAAA,GAAcH,GAAQa,EAACF,GAAUX,KAAOA,EAAOY,UAAYA"}
@@ -1,3 +1,95 @@
1
- .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
+ .pie-chart-module__pie-chart__R12Vh {
8
+ position: relative;
9
+ }
10
+ .line-chart-module__line-chart__ITM3d {
11
+ position: relative;
12
+ }
13
+ .line-chart-module__line-chart__tooltip__aqcme {
14
+ background: #fff;
15
+ padding: 0.5rem;
16
+ }
17
+ .line-chart-module__line-chart__tooltip-date__4Dzab {
18
+ font-weight: bold;
19
+ padding-bottom: 10px;
20
+ }
21
+ .line-chart-module__line-chart__tooltip-row__6A37G {
22
+ display: flex;
23
+ align-items: center;
24
+ padding: 4px 0;
25
+ justify-content: space-between;
26
+ }
27
+ .line-chart-module__line-chart__tooltip-label__IvnFF {
28
+ font-weight: 500;
29
+ padding-right: 1rem;
30
+ }
31
+ .legend-module__legend--horizontal__IUN13 {
32
+ display: flex;
33
+ flex-direction: row;
34
+ flex-wrap: wrap;
35
+ gap: 16px;
36
+ }
37
+ .legend-module__legend--vertical__Scfzo {
38
+ display: flex;
39
+ flex-direction: column;
40
+ gap: 8px;
41
+ }
2
42
 
3
- /*# sourceMappingURL=style.css.map*/
43
+ .legend-module__legend-item__feemn {
44
+ display: flex;
45
+ align-items: center;
46
+ gap: 8px;
47
+ font-size: 0.875rem;
48
+ }
49
+
50
+ .legend-module__legend-item-swatch__nRyXf {
51
+ border-radius: 2px;
52
+ }
53
+
54
+ .legend-module__legend-item-label__ksx6I {
55
+ color: var(--jp-gray-80, #2c3338);
56
+ display: flex;
57
+ align-items: center;
58
+ gap: 0.5rem;
59
+ }
60
+
61
+ .legend-module__legend-item-value__d9x1j {
62
+ font-weight: 500;
63
+ }
64
+ .pie-semi-circle-chart-module__pie-semi-circle-chart__r5jk9 {
65
+ position: relative;
66
+ text-align: center;
67
+ }
68
+ .pie-semi-circle-chart-module__pie-semi-circle-chart-legend__c8W1Y {
69
+ margin-top: 1rem;
70
+ }
71
+ .pie-semi-circle-chart-module__pie-semi-circle-chart__r5jk9 .pie-semi-circle-chart-module__label__nPqOg {
72
+ margin-bottom: 0px;
73
+ font-weight: 600;
74
+ font-size: 16px;
75
+ }
76
+ .pie-semi-circle-chart-module__pie-semi-circle-chart__r5jk9 .pie-semi-circle-chart-module__note__LpBZQ {
77
+ margin-top: 0px;
78
+ font-size: 14px;
79
+ }
80
+ .grid-control-module__grid-control__KOnZN .visx-line {
81
+ stroke: #d7d6d6;
82
+ stroke-width: 1px;
83
+ shape-rendering: crispEdges;
84
+ }
85
+ .base-tooltip-module__tooltip__OfX6n {
86
+ padding: 0.5rem;
87
+ background-color: rgba(0, 0, 0, 0.85);
88
+ color: white;
89
+ border-radius: 4px;
90
+ font-size: 14px;
91
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
92
+ position: absolute;
93
+ pointer-events: none;
94
+ transform: translate(-50%, -100%);
95
+ }