@kubed/charts 0.0.22 → 0.2.11

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 (53) hide show
  1. package/cjs/charts/AreaChart/AreaChart.js +1 -1
  2. package/cjs/charts/AreaChart/AreaChart.js.map +1 -1
  3. package/cjs/charts/BarChart/BarChart.js +1 -1
  4. package/cjs/charts/BarChart/BarChart.js.map +1 -1
  5. package/cjs/charts/LineChart/LineChart.js +1 -1
  6. package/cjs/charts/LineChart/LineChart.js.map +1 -1
  7. package/cjs/charts/PieChart/PieChart.js +1 -1
  8. package/cjs/charts/PieChart/PieChart.js.map +1 -1
  9. package/cjs/charts/RadarChart/RadarChart.js +1 -1
  10. package/cjs/charts/RadarChart/RadarChart.js.map +1 -1
  11. package/cjs/components/Legend.js +3 -3
  12. package/cjs/components/Legend.js.map +1 -1
  13. package/cjs/components/Tooltip.js +4 -4
  14. package/cjs/components/Tooltip.js.map +1 -1
  15. package/cjs/constants.js +1 -1
  16. package/cjs/constants.js.map +1 -1
  17. package/cjs/index.js +1 -1
  18. package/cjs/utils.js +1 -1
  19. package/cjs/utils.js.map +1 -1
  20. package/esm/charts/AreaChart/AreaChart.js +1 -1
  21. package/esm/charts/AreaChart/AreaChart.js.map +1 -1
  22. package/esm/charts/BarChart/BarChart.js +1 -1
  23. package/esm/charts/BarChart/BarChart.js.map +1 -1
  24. package/esm/charts/LineChart/LineChart.js +1 -1
  25. package/esm/charts/LineChart/LineChart.js.map +1 -1
  26. package/esm/charts/PieChart/PieChart.js +1 -1
  27. package/esm/charts/PieChart/PieChart.js.map +1 -1
  28. package/esm/charts/RadarChart/RadarChart.js +1 -1
  29. package/esm/charts/RadarChart/RadarChart.js.map +1 -1
  30. package/esm/components/Legend.js +4 -4
  31. package/esm/components/Legend.js.map +1 -1
  32. package/esm/components/Tooltip.js +5 -5
  33. package/esm/components/Tooltip.js.map +1 -1
  34. package/esm/constants.js.map +1 -1
  35. package/esm/index.js +1 -1
  36. package/esm/utils.js +1 -1
  37. package/esm/utils.js.map +1 -1
  38. package/lib/charts/AreaChart/AreaChart.d.ts +2 -2
  39. package/lib/charts/AreaChart/AreaChart.d.ts.map +1 -1
  40. package/lib/charts/BarChart/BarChart.d.ts +2 -2
  41. package/lib/charts/BarChart/BarChart.d.ts.map +1 -1
  42. package/lib/charts/LineChart/LineChart.d.ts +2 -2
  43. package/lib/charts/LineChart/LineChart.d.ts.map +1 -1
  44. package/lib/charts/PieChart/PieChart.d.ts +1 -1
  45. package/lib/charts/PieChart/PieChart.d.ts.map +1 -1
  46. package/lib/charts/RadarChart/RadarChart.d.ts +1 -1
  47. package/lib/charts/RadarChart/RadarChart.d.ts.map +1 -1
  48. package/lib/components/Legend.d.ts +1 -1
  49. package/lib/components/Legend.d.ts.map +1 -1
  50. package/lib/components/Tooltip.d.ts +1 -1
  51. package/lib/components/Tooltip.d.ts.map +1 -1
  52. package/package.json +16 -17
  53. package/CHANGELOG.md +0 -164
@@ -1,4 +1,4 @@
1
- import o from"react";import t from"styled-components";const x=t.div`
1
+ import t from"react";import r from"styled-components";const x=r.div`
2
2
  width: auto;
3
3
  min-width: 120px;
4
4
  padding: 8px 12px;
@@ -9,7 +9,7 @@ import o from"react";import t from"styled-components";const x=t.div`
9
9
  background-color: rgba(36, 46, 66, 0.8);
10
10
  box-shadow: 0 6px 12px 0 rgba(2, 5, 8, 0.08), 0 1px 2px 0 rgba(2, 5, 8, 0.08);
11
11
  z-index: 100;
12
- `,f=t.div`
12
+ `,s=r.div`
13
13
  margin-bottom: 2px;
14
14
  font-weight: bold;
15
15
  white-space: nowrap;
@@ -26,7 +26,7 @@ import o from"react";import t from"styled-components";const x=t.div`
26
26
  height: 16px;
27
27
  margin-right: 5px;
28
28
  }
29
- `,g=t.div``,h=t.div`
29
+ `,g=r.div``,f=r.div`
30
30
  display: flex;
31
31
  align-items: center;
32
32
  max-width: 100%;
@@ -40,9 +40,9 @@ import o from"react";import t from"styled-components";const x=t.div`
40
40
  height: 6px;
41
41
  margin-right: 7px;
42
42
  border-radius: 50%;
43
- background: ${({color:n})=>n};
43
+ background: ${({color:l})=>l};
44
44
  overflow: hidden;
45
45
  pointer-events: none;
46
46
  }
47
- `;function m({className:n,payload:r,label:a,valueFormatter:p,legendFormatter:i}){return r?o.createElement(x,{className:n},o.createElement(f,null,a),o.createElement(g,null,r.map((e,d)=>{var l;const c=i?i(e):e.name,s=e.color||((l=e.payload)==null?void 0:l.fill);return o.createElement(h,{color:s,key:`tooltip-${e.name}-${d}`},c,": ",p(e.value))}))):null}export{m as Tooltip};
47
+ `;function h({className:l,payload:o,label:i,valueFormatter:p,legendFormatter:a}){return o?t.createElement(x,{className:l},t.createElement(s,null,i),t.createElement(g,null,o.map((e,d)=>{var n;const c=a?a(e):e.name,m=e.color||((n=e.payload)==null?void 0:n.fill);return t.createElement(f,{color:m,key:`tooltip-${e.name}-${d}`},c,": ",p(e.value))}))):null}export{h as Tooltip};
48
48
  //# sourceMappingURL=Tooltip.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.js","sources":["../../src/components/Tooltip.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components';\nimport { LegendFormatter, ValueFormatter } from '../types';\n\nconst TooltipWrapper = styled.div`\n width: auto;\n min-width: 120px;\n padding: 8px 12px;\n color: #fff;\n font-size: 12px;\n line-height: 1.67;\n border-radius: 4px;\n background-color: rgba(36, 46, 66, 0.8);\n box-shadow: 0 6px 12px 0 rgba(2, 5, 8, 0.08), 0 1px 2px 0 rgba(2, 5, 8, 0.08);\n z-index: 100;\n`;\n\nconst TooltipLabel = styled.div`\n margin-bottom: 2px;\n font-weight: bold;\n white-space: nowrap;\n display: flex;\n justify-content: space-between;\n\n p {\n display: flex;\n align-items: center;\n }\n\n img {\n width: 16px;\n height: 16px;\n margin-right: 5px;\n }\n`;\n\nconst ItemWrapper = styled.div``;\n\nconst TooltipItem = styled.div`\n display: flex;\n align-items: center;\n max-width: 100%;\n color: #fff;\n word-break: break-all;\n\n &:before {\n display: inline-block;\n content: ' ';\n width: 6px;\n height: 6px;\n margin-right: 7px;\n border-radius: 50%;\n background: ${({ color }) => color};\n overflow: hidden;\n pointer-events: none;\n }\n`;\n\nexport interface TooltipProps {\n className?: string;\n payload: any[];\n label: string | React.ReactNode;\n active?: boolean;\n valueFormatter: ValueFormatter;\n legendFormatter?: LegendFormatter;\n}\n\nexport function Tooltip({\n className,\n payload,\n label,\n valueFormatter,\n legendFormatter,\n}: TooltipProps) {\n if (!payload) return null;\n return (\n <TooltipWrapper className={className}>\n <TooltipLabel>{label}</TooltipLabel>\n <ItemWrapper>\n {payload.map((item, index) => {\n const legend = legendFormatter ? legendFormatter(item) : item.name;\n const color = item.color || item.payload?.fill;\n return (\n <TooltipItem color={color} key={`tooltip-${item.name}-${index}`}>\n {legend}: {valueFormatter(item.value)}\n </TooltipItem>\n );\n })}\n </ItemWrapper>\n </TooltipWrapper>\n );\n}\n"],"names":[],"mappings":";;;AAEA,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC;AACF,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC;AACF,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;AACjC,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAAC;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC;AACvC;AACA;AACA;AACA,CAAC,CAAC;AACK,SAAS,OAAO,CAAC;AACxB,EAAE,SAAS;AACX,EAAE,OAAO;AACT,EAAE,KAAK;AACP,EAAE,cAAc;AAChB,EAAE,eAAe;AACjB,CAAC,EAAE;AACH,EAAE,IAAI,CAAC,OAAO;AACd,IAAI,OAAO,IAAI,CAAC;AAChB,EAAE,uBAAuB,KAAK,CAAC,aAAa,CAAC,cAAc,EAAE;AAC7D,IAAI,SAAS;AACb,GAAG,kBAAkB,KAAK,CAAC,aAAa,CAAC,YAAY,EAAE,IAAI,EAAE,KAAK,CAAC,kBAAkB,KAAK,CAAC,aAAa,CAAC,WAAW,EAAE,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,KAAK;AACzJ,IAAI,IAAI,EAAE,CAAC;AACX,IAAI,MAAM,MAAM,GAAG,eAAe,GAAG,eAAe,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC;AACvE,IAAI,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,KAAK,CAAC,EAAE,GAAG,IAAI,CAAC,OAAO,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;AACjF,IAAI,uBAAuB,KAAK,CAAC,aAAa,CAAC,WAAW,EAAE;AAC5D,MAAM,KAAK;AACX,MAAM,GAAG,EAAE,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;AAC1C,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;AACjD,GAAG,CAAC,CAAC,CAAC,CAAC;AACP;;;;"}
1
+ {"version":3,"file":"Tooltip.js","sources":["../../src/components/Tooltip.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components';\nimport { LegendFormatter, ValueFormatter } from '../types';\n\nconst TooltipWrapper = styled.div`\n width: auto;\n min-width: 120px;\n padding: 8px 12px;\n color: #fff;\n font-size: 12px;\n line-height: 1.67;\n border-radius: 4px;\n background-color: rgba(36, 46, 66, 0.8);\n box-shadow: 0 6px 12px 0 rgba(2, 5, 8, 0.08), 0 1px 2px 0 rgba(2, 5, 8, 0.08);\n z-index: 100;\n`;\n\nconst TooltipLabel = styled.div`\n margin-bottom: 2px;\n font-weight: bold;\n white-space: nowrap;\n display: flex;\n justify-content: space-between;\n\n p {\n display: flex;\n align-items: center;\n }\n\n img {\n width: 16px;\n height: 16px;\n margin-right: 5px;\n }\n`;\n\nconst ItemWrapper = styled.div``;\n\nconst TooltipItem = styled.div`\n display: flex;\n align-items: center;\n max-width: 100%;\n color: #fff;\n word-break: break-all;\n\n &:before {\n display: inline-block;\n content: ' ';\n width: 6px;\n height: 6px;\n margin-right: 7px;\n border-radius: 50%;\n background: ${({ color }) => color};\n overflow: hidden;\n pointer-events: none;\n }\n`;\n\nexport interface TooltipProps {\n className?: string;\n payload: any[];\n label: string | React.ReactNode;\n active?: boolean;\n valueFormatter: ValueFormatter;\n legendFormatter?: LegendFormatter;\n}\n\nexport function Tooltip({\n className,\n payload,\n label,\n valueFormatter,\n legendFormatter,\n}: TooltipProps) {\n if (!payload) return null;\n return (\n <TooltipWrapper className={className}>\n <TooltipLabel>{label}</TooltipLabel>\n <ItemWrapper>\n {payload.map((item, index) => {\n const legend = legendFormatter ? legendFormatter(item) : item.name;\n const color = item.color || item.payload?.fill;\n return (\n <TooltipItem color={color} key={`tooltip-${item.name}-${index}`}>\n {legend}: {valueFormatter(item.value)}\n </TooltipItem>\n );\n })}\n </ItemWrapper>\n </TooltipWrapper>\n );\n}\n"],"names":["r","e"],"mappings":";;;AAAsD,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,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#f9fbfd',\n lightest: '#f9fbfd',\n dark: '#242e42',\n grey: '#e3e9ef',\n green: '#55bc8a',\n blue: '#329dce',\n red: '#ca2621',\n yellow: '#f5a623',\n darkerGreen: '#479e88',\n darkerBlue: '#3385b0',\n darkerRed: '#ab2f29',\n darkerYellow: '#e0992c',\n darkestGreen: '#3b747a',\n darkestBlue: '#326e93',\n darkestRed: '#8c3231',\n darkestYellow: '#8d663e',\n lighterGreen: '#a2d8bb',\n lighterBlue: '#7eb8dc',\n lighterRed: '#ea8573',\n lighterYellow: '#ffc781',\n lightestGreen: '#c4e6d4',\n lightestBlue: '#c7deef',\n lightestRed: '#fae7e5',\n lightestYellow: '#ffe1be',\n darkGray: '#79879C',\n};\n\nexport const DEFAULT_COLORS = [\n 'green',\n 'blue',\n 'yellow',\n 'red',\n 'darkestGreen',\n 'darkestBlue',\n 'darkestYellow',\n 'darkestRed',\n 'lightestGreen',\n 'lightestBlue',\n 'lightestYellow',\n 'lightestRed',\n];\n"],"names":[],"mappings":"AAAY,MAAC,UAAU,GAAG;AAC1B,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,KAAK,EAAE,SAAS;AAClB,EAAE,QAAQ,EAAE,SAAS;AACrB,EAAE,IAAI,EAAE,SAAS;AACjB,EAAE,IAAI,EAAE,SAAS;AACjB,EAAE,KAAK,EAAE,SAAS;AAClB,EAAE,IAAI,EAAE,SAAS;AACjB,EAAE,GAAG,EAAE,SAAS;AAChB,EAAE,MAAM,EAAE,SAAS;AACnB,EAAE,WAAW,EAAE,SAAS;AACxB,EAAE,UAAU,EAAE,SAAS;AACvB,EAAE,SAAS,EAAE,SAAS;AACtB,EAAE,YAAY,EAAE,SAAS;AACzB,EAAE,YAAY,EAAE,SAAS;AACzB,EAAE,WAAW,EAAE,SAAS;AACxB,EAAE,UAAU,EAAE,SAAS;AACvB,EAAE,aAAa,EAAE,SAAS;AAC1B,EAAE,YAAY,EAAE,SAAS;AACzB,EAAE,WAAW,EAAE,SAAS;AACxB,EAAE,UAAU,EAAE,SAAS;AACvB,EAAE,aAAa,EAAE,SAAS;AAC1B,EAAE,aAAa,EAAE,SAAS;AAC1B,EAAE,YAAY,EAAE,SAAS;AACzB,EAAE,WAAW,EAAE,SAAS;AACxB,EAAE,cAAc,EAAE,SAAS;AAC3B,EAAE,QAAQ,EAAE,SAAS;AACrB,EAAE;AACU,MAAC,cAAc,GAAG;AAC9B,EAAE,OAAO;AACT,EAAE,MAAM;AACR,EAAE,QAAQ;AACV,EAAE,KAAK;AACP,EAAE,cAAc;AAChB,EAAE,aAAa;AACf,EAAE,eAAe;AACjB,EAAE,YAAY;AACd,EAAE,eAAe;AACjB,EAAE,cAAc;AAChB,EAAE,gBAAgB;AAClB,EAAE,aAAa;AACf;;;;"}
1
+ {"version":3,"file":"constants.js","sources":["../src/constants.ts"],"sourcesContent":["export const COLORS_MAP = {\n white: '#fff',\n light: '#f9fbfd',\n lightest: '#f9fbfd',\n dark: '#242e42',\n grey: '#e3e9ef',\n green: '#55bc8a',\n blue: '#329dce',\n red: '#ca2621',\n yellow: '#f5a623',\n darkerGreen: '#479e88',\n darkerBlue: '#3385b0',\n darkerRed: '#ab2f29',\n darkerYellow: '#e0992c',\n darkestGreen: '#3b747a',\n darkestBlue: '#326e93',\n darkestRed: '#8c3231',\n darkestYellow: '#8d663e',\n lighterGreen: '#a2d8bb',\n lighterBlue: '#7eb8dc',\n lighterRed: '#ea8573',\n lighterYellow: '#ffc781',\n lightestGreen: '#c4e6d4',\n lightestBlue: '#c7deef',\n lightestRed: '#fae7e5',\n lightestYellow: '#ffe1be',\n darkGray: '#79879C',\n};\n\nexport const DEFAULT_COLORS = [\n 'green',\n 'blue',\n 'yellow',\n 'red',\n 'darkestGreen',\n 'darkestBlue',\n 'darkestYellow',\n 'darkestRed',\n 'lightestGreen',\n 'lightestBlue',\n 'lightestYellow',\n 'lightestRed',\n];\n"],"names":[],"mappings":"AAAY,MAAC,UAAU,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,WAAW,CAAC,SAAS,CAAC,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,YAAY,CAAC,SAAS,CAAC,YAAY,CAAC,SAAS,CAAC,WAAW,CAAC,SAAS,CAAC,UAAU,CAAC,SAAS,CAAC,aAAa,CAAC,SAAS,CAAC,YAAY,CAAC,SAAS,CAAC,WAAW,CAAC,SAAS,CAAC,UAAU,CAAC,SAAS,CAAC,aAAa,CAAC,SAAS,CAAC,aAAa,CAAC,SAAS,CAAC,YAAY,CAAC,SAAS,CAAC,WAAW,CAAC,SAAS,CAAC,cAAc,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,aAAa,CAAC,eAAe,CAAC,YAAY,CAAC,eAAe,CAAC,cAAc,CAAC,gBAAgB,CAAC,aAAa;;;;"}
package/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export{AreaChart}from"./charts/AreaChart/AreaChart.js";export{LineChart}from"./charts/LineChart/LineChart.js";export{BarChart}from"./charts/BarChart/BarChart.js";export{PieChart}from"./charts/PieChart/PieChart.js";export{RadarChart}from"./charts/RadarChart/RadarChart.js";
1
+ import{AreaChart as t}from"./charts/AreaChart/AreaChart.js";import{LineChart as C}from"./charts/LineChart/LineChart.js";import{BarChart as o}from"./charts/BarChart/BarChart.js";import{PieChart as i}from"./charts/PieChart/PieChart.js";import{RadarChart as f}from"./charts/RadarChart/RadarChart.js";export{t as AreaChart,o as BarChart,C as LineChart,i as PieChart,f as RadarChart};
2
2
  //# sourceMappingURL=index.js.map
package/esm/utils.js CHANGED
@@ -1,2 +1,2 @@
1
- import{DEFAULT_COLORS as c,COLORS_MAP as l}from"./constants.js";const m=o=>o.toString(),u=(o,t,n)=>{const r=o?"auto":t!=null?t:0,s=n!=null?n:"auto";return[r,s]},e=()=>c.map(o=>l[o]),C=(o,t)=>{const n=t||e(),r=new Map;return o.forEach((s,a)=>{r.set(s,n[a])}),r};export{m as defaultValueFormatter,C as getCategoryColors,e as getDefaultHexColors,u as getYAxisDomain};
1
+ import{DEFAULT_COLORS as l,COLORS_MAP as u}from"./constants.js";const c=t=>t.toString(),g=(t,o,e)=>[t?"auto":o??0,e??"auto"],a=()=>l.map(t=>u[t]),m=(t,o)=>{const e=o||a(),n=new Map;return t.forEach((r,s)=>{n.set(r,e[s])}),n};export{c as defaultValueFormatter,m as getCategoryColors,a as getDefaultHexColors,g as getYAxisDomain};
2
2
  //# sourceMappingURL=utils.js.map
package/esm/utils.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sources":["../src/utils.ts"],"sourcesContent":["import { ValueFormatter } from './types';\nimport { COLORS_MAP, DEFAULT_COLORS } from './constants';\n\nexport const defaultValueFormatter: ValueFormatter = (value: number) => value.toString();\n\nexport const getYAxisDomain = (\n autoMinValue: boolean,\n minValue: number | undefined,\n maxValue: number | undefined\n) => {\n const minDomain = autoMinValue ? 'auto' : minValue ?? 0;\n const maxDomain = maxValue ?? 'auto';\n return [minDomain, maxDomain];\n};\n\nexport const getColor = (color: string) => {\n return COLORS_MAP[color];\n};\n\nexport const getDefaultHexColors = () => DEFAULT_COLORS.map((color) => COLORS_MAP[color]);\n\nexport const getCategoryColors = (categories: string[], colors: string[]): Map<string, string> => {\n const hexColors = colors || getDefaultHexColors();\n const categoryColors = new Map<string, string>();\n categories.forEach((category, idx) => {\n categoryColors.set(category, hexColors[idx]);\n });\n return categoryColors;\n};\n\nexport const getCategoryKeys = () => {};\n\nexport const removeValueFromArray = (value: any, array: any[]): any[] => {\n const index = array.indexOf(value);\n if (index > -1) {\n array.splice(index, 1);\n }\n return array;\n};\n"],"names":[],"mappings":";;AACY,MAAC,qBAAqB,GAAG,CAAC,KAAK,KAAK,KAAK,CAAC,QAAQ,GAAG;AACrD,MAAC,cAAc,GAAG,CAAC,YAAY,EAAE,QAAQ,EAAE,QAAQ,KAAK;AACpE,EAAE,MAAM,SAAS,GAAG,YAAY,GAAG,MAAM,GAAG,QAAQ,IAAI,IAAI,GAAG,QAAQ,GAAG,CAAC,CAAC;AAC5E,EAAE,MAAM,SAAS,GAAG,QAAQ,IAAI,IAAI,GAAG,QAAQ,GAAG,MAAM,CAAC;AACzD,EAAE,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;AAChC,EAAE;AAIU,MAAC,mBAAmB,GAAG,MAAM,cAAc,CAAC,GAAG,CAAC,CAAC,KAAK,KAAK,UAAU,CAAC,KAAK,CAAC,EAAE;AAC9E,MAAC,iBAAiB,GAAG,CAAC,UAAU,EAAE,MAAM,KAAK;AACzD,EAAE,MAAM,SAAS,GAAG,MAAM,IAAI,mBAAmB,EAAE,CAAC;AACpD,EAAE,MAAM,cAAc,GAAG,IAAI,GAAG,EAAE,CAAC;AACnC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,GAAG,KAAK;AACxC,IAAI,cAAc,CAAC,GAAG,CAAC,QAAQ,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;AACjD,GAAG,CAAC,CAAC;AACL,EAAE,OAAO,cAAc,CAAC;AACxB;;;;"}
1
+ {"version":3,"file":"utils.js","sources":["../src/utils.ts"],"sourcesContent":["import { ValueFormatter } from './types';\nimport { COLORS_MAP, DEFAULT_COLORS } from './constants';\n\nexport const defaultValueFormatter: ValueFormatter = (value: number) => value.toString();\n\nexport const getYAxisDomain = (\n autoMinValue: boolean,\n minValue: number | undefined,\n maxValue: number | undefined\n) => {\n const minDomain = autoMinValue ? 'auto' : minValue ?? 0;\n const maxDomain = maxValue ?? 'auto';\n return [minDomain, maxDomain];\n};\n\nexport const getColor = (color: string) => {\n return COLORS_MAP[color];\n};\n\nexport const getDefaultHexColors = () => DEFAULT_COLORS.map((color) => COLORS_MAP[color]);\n\nexport const getCategoryColors = (categories: string[], colors: string[]): Map<string, string> => {\n const hexColors = colors || getDefaultHexColors();\n const categoryColors = new Map<string, string>();\n categories.forEach((category, idx) => {\n categoryColors.set(category, hexColors[idx]);\n });\n return categoryColors;\n};\n\nexport const getCategoryKeys = () => {};\n\nexport const removeValueFromArray = (value: any, array: any[]): any[] => {\n const index = array.indexOf(value);\n if (index > -1) {\n array.splice(index, 1);\n }\n return array;\n};\n"],"names":["c","s"],"mappings":";;AAAyE,MAAC,qBAAqB,CAAC,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,OAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAkB,mBAAmB,CAAC,IAAIA,cAAC,CAAC,GAAG,CAAC,CAAC,EAAEC,UAAC,CAAC,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,mBAAmB,EAAE,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAC,CAAC,CAAC,CAAC,CAAC,CAAC;;;;"}
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { XAxisProps, YAxisProps } from 'recharts';
3
3
  import { ChartBaseProps } from '../../types';
4
4
  export interface AreaChartProps extends ChartBaseProps {
@@ -6,5 +6,5 @@ export interface AreaChartProps extends ChartBaseProps {
6
6
  xAxisProps?: XAxisProps;
7
7
  yAxisProps?: YAxisProps;
8
8
  }
9
- export declare const AreaChart: ({ data, dataKey, categories, yAxisWidth, valueFormatter, showGradient, showLegend, showTooltip, showXAxis, showYAxis, showAnimation, stack, startEndOnly, showGridLines, autoMinValue, minValue, maxValue, colors, customTooltip, legendVerticalAlign, legendAlign, legendFormatter, maxActiveCategories, xAxisProps, yAxisProps, ...rest }: AreaChartProps) => JSX.Element;
9
+ export declare const AreaChart: ({ data, dataKey, categories, yAxisWidth, valueFormatter, showGradient, showLegend, showTooltip, showXAxis, showYAxis, showAnimation, stack, startEndOnly, showGridLines, autoMinValue, minValue, maxValue, colors, customTooltip, legendVerticalAlign, legendAlign, legendFormatter, maxActiveCategories, xAxisProps, yAxisProps, ...rest }: AreaChartProps) => React.JSX.Element;
10
10
  //# sourceMappingURL=AreaChart.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AreaChart.d.ts","sourceRoot":"","sources":["../../../src/charts/AreaChart/AreaChart.tsx"],"names":[],"mappings":";AACA,OAAO,EASL,UAAU,EACV,UAAU,EACX,MAAM,UAAU,CAAC;AAIlB,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAK7C,MAAM,WAAW,cAAe,SAAQ,cAAc;IACpD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED,eAAO,MAAM,SAAS,gVA6BnB,cAAc,gBAyHhB,CAAC"}
1
+ {"version":3,"file":"AreaChart.d.ts","sourceRoot":"","sources":["../../../src/charts/AreaChart/AreaChart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EASL,UAAU,EACV,UAAU,EACX,MAAM,UAAU,CAAC;AAIlB,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAK7C,MAAM,WAAW,cAAe,SAAQ,cAAc;IACpD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED,eAAO,MAAM,SAAS,gVA6BnB,cAAc,sBAyHhB,CAAC"}
@@ -1,9 +1,9 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { ChartBaseProps } from '../../types';
3
3
  export interface BarChartProps extends ChartBaseProps {
4
4
  stack?: boolean;
5
5
  layout?: 'vertical' | 'horizontal';
6
6
  relative?: boolean;
7
7
  }
8
- export declare const BarChart: ({ data, dataKey, categories, layout, yAxisWidth, valueFormatter, showGradient, showLegend, showTooltip, showXAxis, showYAxis, showAnimation, stack, relative, startEndOnly, showGridLines, autoMinValue, minValue, maxValue, colors, customTooltip, legendVerticalAlign, legendAlign, legendFormatter, maxActiveCategories, ...rest }: BarChartProps) => JSX.Element;
8
+ export declare const BarChart: ({ data, dataKey, categories, layout, yAxisWidth, valueFormatter, showGradient, showLegend, showTooltip, showXAxis, showYAxis, showAnimation, stack, relative, startEndOnly, showGridLines, autoMinValue, minValue, maxValue, colors, customTooltip, legendVerticalAlign, legendAlign, legendFormatter, maxActiveCategories, ...rest }: BarChartProps) => React.JSX.Element;
9
9
  //# sourceMappingURL=BarChart.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BarChart.d.ts","sourceRoot":"","sources":["../../../src/charts/BarChart/BarChart.tsx"],"names":[],"mappings":";AAcA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAK7C,MAAM,WAAW,aAAc,SAAQ,cAAc;IACnD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,QAAQ,0UA6BlB,aAAa,gBAqKf,CAAC"}
1
+ {"version":3,"file":"BarChart.d.ts","sourceRoot":"","sources":["../../../src/charts/BarChart/BarChart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAcxC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAK7C,MAAM,WAAW,aAAc,SAAQ,cAAc;IACnD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,QAAQ,0UA6BlB,aAAa,sBAqKf,CAAC"}
@@ -1,7 +1,7 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { ChartBaseProps } from '../../types';
3
3
  export interface LineChartProps extends ChartBaseProps {
4
4
  stack?: boolean;
5
5
  }
6
- export declare const LineChart: ({ data, dataKey, categories, yAxisWidth, valueFormatter, showLegend, showTooltip, showXAxis, showYAxis, showAnimation, startEndOnly, showGridLines, autoMinValue, minValue, maxValue, colors, customTooltip, legendVerticalAlign, legendAlign, legendFormatter, maxActiveCategories, ...rest }: LineChartProps) => JSX.Element;
6
+ export declare const LineChart: ({ data, dataKey, categories, yAxisWidth, valueFormatter, showLegend, showTooltip, showXAxis, showYAxis, showAnimation, startEndOnly, showGridLines, autoMinValue, minValue, maxValue, colors, customTooltip, legendVerticalAlign, legendAlign, legendFormatter, maxActiveCategories, ...rest }: LineChartProps) => React.JSX.Element;
7
7
  //# sourceMappingURL=LineChart.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LineChart.d.ts","sourceRoot":"","sources":["../../../src/charts/LineChart/LineChart.tsx"],"names":[],"mappings":";AAcA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAK7C,MAAM,WAAW,cAAe,SAAQ,cAAc;IACpD,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,eAAO,MAAM,SAAS,mSAuBnB,cAAc,gBAyGhB,CAAC"}
1
+ {"version":3,"file":"LineChart.d.ts","sourceRoot":"","sources":["../../../src/charts/LineChart/LineChart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAcxC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAK7C,MAAM,WAAW,cAAe,SAAQ,cAAc;IACpD,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,eAAO,MAAM,SAAS,mSAuBnB,cAAc,sBAyGhB,CAAC"}
@@ -17,6 +17,6 @@ export interface PieChartProps extends Omit<ChartBaseProps, 'dataKey' | 'categor
17
17
  fillOpacity?: string | number;
18
18
  customTooltip?: (payload: any[]) => React.ReactNode;
19
19
  }
20
- export declare const PieChart: ({ data, category, dataKey, colors, variant, valueFormatter, fill, fillOpacity, stroke, label, showAnimation, showTooltip, showLegend, innerRadius, outerRadius, customTooltip, legendVerticalAlign, legendAlign, legendFormatter, ...rest }: PieChartProps) => JSX.Element;
20
+ export declare const PieChart: ({ data, category, dataKey, colors, variant, valueFormatter, fill, fillOpacity, stroke, label, showAnimation, showTooltip, showLegend, innerRadius, outerRadius, customTooltip, legendVerticalAlign, legendAlign, legendFormatter, ...rest }: PieChartProps) => React.JSX.Element;
21
21
  export {};
22
22
  //# sourceMappingURL=PieChart.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PieChart.d.ts","sourceRoot":"","sources":["../../../src/charts/PieChart/PieChart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAK7D,aAAK,YAAY,GAAG,OAAO,GAAG,KAAK,CAAC;AAEpC,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,cAAc,EAAE,SAAS,GAAG,YAAY,CAAC;IACnF,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,QAAQ,C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AAc,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9B,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,KAAK,KAAK,CAAC,SAAS,CAAC;CACrD;AAUD,eAAO,MAAM,QAAQ,gPAsBlB,aAAa,sBAoDf,CAAC"}
@@ -14,6 +14,6 @@ export interface RadarChartProps extends Omit<ChartBaseProps, 'dataKey' | 'color
14
14
  colors?: Color[] | string[];
15
15
  customTooltip?: (payload: any[]) => React.ReactNode;
16
16
  }
17
- export declare const RadarChart: ({ data, categories, dataKey, colors, label, gridType, showGridLines, showAnimation, showTooltip, showLegend, showAngleAxis, showRadiusAxis, autoMinValue, minValue, maxValue, legendVerticalAlign, legendAlign, customTooltip, valueFormatter, legendFormatter, ...rest }: RadarChartProps) => JSX.Element;
17
+ export declare const RadarChart: ({ data, categories, dataKey, colors, label, gridType, showGridLines, showAnimation, showTooltip, showLegend, showAngleAxis, showRadiusAxis, autoMinValue, minValue, maxValue, legendVerticalAlign, legendAlign, customTooltip, valueFormatter, legendFormatter, ...rest }: RadarChartProps) => React.JSX.Element;
18
18
  export {};
19
19
  //# sourceMappingURL=RadarChart.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RadarChart.d.ts","sourceRoot":"","sources":["../../../src/charts/RadarChart/RadarChart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAK7C,aAAK,KAAK,GAAG;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,cAAc,EAAE,S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,CAAC;CACrD;AAED,eAAO,MAAM,UAAU,8QAsBpB,eAAe,sBAwDjB,CAAC"}
@@ -10,5 +10,5 @@ export interface LegendProps {
10
10
  onClick?: (key: string) => void;
11
11
  formatter?: LegendFormatter;
12
12
  }
13
- export declare function Legend({ className, payload, append, prepend, onClick, formatter, }: LegendProps): JSX.Element;
13
+ export declare function Legend({ className, payload, append, prepend, onClick, formatter, }: LegendProps): React.JSX.Element;
14
14
  //# sourceMappingURL=Legend.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Legend.d.ts","sourceRoot":"","sources":["../../src/components/Legend.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAmC3C,MAAM,WAAW,WAAW;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,GAAG,EAAE,CAAC;IACf,iCAAiC;IACjC,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,kCAAkC;IAClC,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,SAAS,CAAC,EAAE,eAAe,CAAC;CAC7B;AAED,wBAAgB,MAAM,CAAC,EACrB,SAAS,EACT,OAAY,EACZ,MAAM,EACN,OAAO,EACP,OAAkB,EAClB,SAAS,GACV,EAAE,WAAW,eAsBb"}
1
+ {"version":3,"file":"Legend.d.ts","sourceRoot":"","sources":["../../src/components/Legend.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAmC3C,MAAM,WAAW,WAAW;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,GAAG,EAAE,CAAC;IACf,iCAAiC;IACjC,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,kCAAkC;IAClC,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,SAAS,CAAC,EAAE,eAAe,CAAC;CAC7B;AAED,wBAAgB,MAAM,CAAC,EACrB,SAAS,EACT,OAAY,EACZ,MAAM,EACN,OAAO,EACP,OAAkB,EAClB,SAAS,GACV,EAAE,WAAW,qBAsBb"}
@@ -8,5 +8,5 @@ export interface TooltipProps {
8
8
  valueFormatter: ValueFormatter;
9
9
  legendFormatter?: LegendFormatter;
10
10
  }
11
- export declare function Tooltip({ className, payload, label, valueFormatter, legendFormatter, }: TooltipProps): JSX.Element;
11
+ export declare function Tooltip({ className, payload, label, valueFormatter, legendFormatter, }: TooltipProps): React.JSX.Element;
12
12
  //# sourceMappingURL=Tooltip.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../src/components/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAwD3D,MAAM,WAAW,YAAY;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,GAAG,EAAE,CAAC;IACf,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IAChC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,cAAc,EAAE,cAAc,CAAC;IAC/B,eAAe,CAAC,EAAE,eAAe,CAAC;CACnC;AAED,wBAAgB,OAAO,CAAC,EACtB,SAAS,EACT,OAAO,EACP,KAAK,EACL,cAAc,EACd,eAAe,GAChB,EAAE,YAAY,eAkBd"}
1
+ {"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../src/components/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAwD3D,MAAM,WAAW,YAAY;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,GAAG,EAAE,CAAC;IACf,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IAChC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,cAAc,EAAE,cAAc,CAAC;IAC/B,eAAe,CAAC,EAAE,eAAe,CAAC;CACnC;AAED,wBAAgB,OAAO,CAAC,EACtB,SAAS,EACT,OAAO,EACP,KAAK,EACL,cAAc,EACd,eAAe,GAChB,EAAE,YAAY,qBAkBd"}
package/package.json CHANGED
@@ -1,33 +1,32 @@
1
1
  {
2
2
  "name": "@kubed/charts",
3
- "version": "0.0.22",
3
+ "version": "0.2.11",
4
+ "homepage": "https://github.com/kubesphere/kube-design",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/kubesphere/kube-design.git",
8
+ "directory": "packages/charts"
9
+ },
10
+ "license": "MIT",
11
+ "sideEffects": false,
4
12
  "main": "cjs/index.js",
5
13
  "module": "esm/index.js",
6
14
  "types": "lib/index.d.ts",
7
- "license": "MIT",
8
- "sideEffects": false,
9
- "homepage": "https://github.com/kubesphere/kube-design",
10
15
  "files": [
11
16
  "cjs",
12
17
  "esm",
13
18
  "lib"
14
19
  ],
15
- "repository": {
16
- "url": "https://github.com/kubesphere/kube-design.git",
17
- "type": "git",
18
- "directory": "packages/charts"
20
+ "dependencies": {
21
+ "lodash": "^4.17.21",
22
+ "recharts": "^2.3.2",
23
+ "styled-components": "^5.3.0"
19
24
  },
20
25
  "peerDependencies": {
21
- "@kubed/hooks": "0.0.18",
22
- "@kubed/icons": "0.0.20",
26
+ "@kubed/hooks": "0.2.11",
27
+ "@kubed/icons": "0.2.11",
23
28
  "react": ">=16.8.6",
24
29
  "react-dom": ">=16.8.6",
25
30
  "react-is": "^17.0.2"
26
- },
27
- "dependencies": {
28
- "lodash": "^4.17.21",
29
- "styled-components": "^5.3.0",
30
- "recharts": "^2.3.2"
31
- },
32
- "devDependencies": {}
31
+ }
33
32
  }
package/CHANGELOG.md DELETED
@@ -1,164 +0,0 @@
1
- # @kubed/charts
2
-
3
- ## 0.0.22
4
-
5
- ### Patch Changes
6
-
7
- - [#241](https://github.com/kubesphere/kube-design/pull/241) [`5e80314`](https://github.com/kubesphere/kube-design/commit/5e80314a3681d64d5797f6ffe10019964a10d166) Thanks [@yazhouio](https://github.com/yazhouio)! - chore: Update version
8
-
9
- - Updated dependencies [[`5e80314`](https://github.com/kubesphere/kube-design/commit/5e80314a3681d64d5797f6ffe10019964a10d166)]:
10
- - @kubed/hooks@0.0.18
11
- - @kubed/icons@0.0.20
12
-
13
- ## 0.0.21
14
-
15
- ### Patch Changes
16
-
17
- - [#221](https://github.com/kubesphere/kube-design/pull/221) [`1e8bc0e`](https://github.com/kubesphere/kube-design/commit/1e8bc0ec1482d3a2aeca4040f32bf0f10008ae0b) Thanks [@donniean](https://github.com/donniean)! - feat: update TopicCircle icon
18
-
19
- - Updated dependencies [[`1e8bc0e`](https://github.com/kubesphere/kube-design/commit/1e8bc0ec1482d3a2aeca4040f32bf0f10008ae0b)]:
20
- - @kubed/hooks@0.0.17
21
- - @kubed/icons@0.0.19
22
-
23
- ## 0.0.20
24
-
25
- ### Patch Changes
26
-
27
- - [#218](https://github.com/kubesphere/kube-design/pull/218) [`b9714b7`](https://github.com/kubesphere/kube-design/commit/b9714b7cc77c3899f1f63c94f3a62d75739fc324) Thanks [@donniean](https://github.com/donniean)! - feat: add TopicCircle icon
28
-
29
- - Updated dependencies [[`b9714b7`](https://github.com/kubesphere/kube-design/commit/b9714b7cc77c3899f1f63c94f3a62d75739fc324)]:
30
- - @kubed/hooks@0.0.16
31
- - @kubed/icons@0.0.18
32
-
33
- ## 0.0.19
34
-
35
- ### Patch Changes
36
-
37
- - [#210](https://github.com/kubesphere/kube-design/pull/210) [`20358b2`](https://github.com/kubesphere/kube-design/commit/20358b232e3c6515fc7d847da10862f20eaaee7f) Thanks [@donniean](https://github.com/donniean)! - docs: add hooks docs
38
-
39
- - Updated dependencies [[`20358b2`](https://github.com/kubesphere/kube-design/commit/20358b232e3c6515fc7d847da10862f20eaaee7f)]:
40
- - @kubed/hooks@0.0.15
41
- - @kubed/icons@0.0.17
42
-
43
- ## 0.0.18
44
-
45
- ### Patch Changes
46
-
47
- - [#195](https://github.com/kubesphere/kube-design/pull/195) [`041561e`](https://github.com/kubesphere/kube-design/commit/041561e5a2a37bc615a72d8713644f3ba7e26da5) Thanks [@fuchunlan](https://github.com/fuchunlan)! - Support customTooltip on Some charts
48
-
49
- ## 0.0.17
50
-
51
- ### Patch Changes
52
-
53
- - Updated dependencies [[`f5d3e3d`](https://github.com/kubesphere/kube-design/commit/f5d3e3d5b5cb3e72911f93c7e11748ac2ee77674)]:
54
- - @kubed/icons@0.0.16
55
-
56
- ## 0.0.16
57
-
58
- ### Patch Changes
59
-
60
- - Updated dependencies [[`4984093`](https://github.com/kubesphere/kube-design/commit/4984093460b0360e3bcd0c50635a538c72f5b747), [`4984093`](https://github.com/kubesphere/kube-design/commit/4984093460b0360e3bcd0c50635a538c72f5b747)]:
61
- - @kubed/icons@0.0.15
62
-
63
- ## 0.0.15
64
-
65
- ### Patch Changes
66
-
67
- - Updated dependencies [[`28204d0`](https://github.com/kubesphere/kube-design/commit/28204d0adff3bb783051ce3a57d430857688f74f)]:
68
- - @kubed/icons@0.0.14
69
-
70
- ## 0.0.14
71
-
72
- ### Patch Changes
73
-
74
- - Updated dependencies [[`5186c76`](https://github.com/kubesphere/kube-design/commit/5186c76081ed7132e47dc257b8db3e8edeb43f6d)]:
75
- - @kubed/icons@0.0.13
76
-
77
- ## 0.0.13
78
-
79
- ### Patch Changes
80
-
81
- - Updated dependencies [[`e706678`](https://github.com/kubesphere/kube-design/commit/e70667829e232d147722766577a48447c49de38a)]:
82
- - @kubed/icons@0.0.12
83
-
84
- ## 0.0.12
85
-
86
- ### Patch Changes
87
-
88
- - [`e570ce2`](https://github.com/kubesphere/kube-design/commit/e570ce22f9660df21d85f4703a7a81a610be3f42) Thanks [@chenz24](https://github.com/chenz24)! - 1. fix tooltip error when data is empty in AreaChart
89
-
90
- ## 0.0.11
91
-
92
- ### Patch Changes
93
-
94
- - Updated dependencies [[`76f2dda`](https://github.com/kubesphere/kube-design/commit/76f2ddaffd0fdaec22ccee34c6bb0c0a4b6e56ec)]:
95
- - @kubed/icons@0.0.11
96
-
97
- ## 0.0.10
98
-
99
- ### Patch Changes
100
-
101
- - Updated dependencies [[`60c9c09`](https://github.com/kubesphere/kube-design/commit/60c9c098dc55da11d5d4d02f5fbee7c53864aaf2)]:
102
- - @kubed/icons@0.0.10
103
-
104
- ## 0.0.9
105
-
106
- ### Patch Changes
107
-
108
- - Updated dependencies [[`a54f891`](https://github.com/kubesphere/kube-design/commit/a54f8918053e2bc6955de8e9fc6f7e2b23eafbb8)]:
109
- - @kubed/icons@0.0.9
110
-
111
- ## 0.0.8
112
-
113
- ### Patch Changes
114
-
115
- - [`ebf0dc3`](https://github.com/kubesphere/kube-design/commit/ebf0dc384d6216c92f00de3e650a23f71f5857fc) Thanks [@EliChen95](https://github.com/EliChen95)! - 1. feat: Support Area chart override axis props
116
- 2. feat: Support Pie chart set empty color
117
- 3. fix: Fix loop node without key
118
-
119
- ## 0.0.7
120
-
121
- ### Patch Changes
122
-
123
- - [`a207461`](https://github.com/kubesphere/kube-design/commit/a2074619c592b482f013129b3fddb9f9b9ccb234) Thanks [@EliChen95](https://github.com/EliChen95)! - feat: Support radar chart
124
-
125
- ## 0.0.6
126
-
127
- ### Patch Changes
128
-
129
- - [`8abb4c9`](https://github.com/kubesphere/kube-design/commit/8abb4c9a3945f3d0dfa46dd5814c64ccbfce731c) Thanks [@chenz24](https://github.com/chenz24)! - pass recharts props
130
-
131
- - Updated dependencies [[`4e7f7b0`](https://github.com/kubesphere/kube-design/commit/4e7f7b00754f8b7d83d89a081b8108c26c0fd74c)]:
132
- - @kubed/icons@0.0.8
133
-
134
- ## 0.0.5
135
-
136
- ### Patch Changes
137
-
138
- - Updated dependencies [[`4cda5c3`](https://github.com/kubesphere/kube-design/commit/4cda5c3e11dfd2b763049a0b8bcfb61c44273f47)]:
139
- - @kubed/icons@0.0.7
140
-
141
- ## 0.0.4
142
-
143
- ### Patch Changes
144
-
145
- - Updated dependencies [[`1576c58`](https://github.com/kubesphere/kube-design/commit/1576c58579736e11a02c47494ac4785f12ffec4b)]:
146
- - @kubed/hooks@0.0.14
147
-
148
- ## 0.0.3
149
-
150
- ### Patch Changes
151
-
152
- - [`cc0f605`](https://github.com/kubesphere/kube-design/commit/cc0f6050d1755b883b9649897e80922c90ff108e) Thanks [@chenz24](https://github.com/chenz24)! - add pie chart
153
-
154
- - Updated dependencies [[`cc0f605`](https://github.com/kubesphere/kube-design/commit/cc0f6050d1755b883b9649897e80922c90ff108e)]:
155
- - @kubed/hooks@0.0.13
156
-
157
- ## 0.0.2
158
-
159
- ### Patch Changes
160
-
161
- - [`6c72c31`](https://github.com/kubesphere/kube-design/commit/6c72c31c60ea33241528031c5e5de807c402dcdf) Thanks [@chenz24](https://github.com/chenz24)! - 1. add chart components
162
-
163
- - Updated dependencies [[`6c72c31`](https://github.com/kubesphere/kube-design/commit/6c72c31c60ea33241528031c5e5de807c402dcdf)]:
164
- - @kubed/hooks@0.0.12