@automattic/charts 0.2.2 → 0.2.3
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.
- package/CHANGELOG.md +6 -0
- package/dist/cjs/components/bar-chart/index.js +2 -0
- package/dist/cjs/components/bar-chart/index.js.map +1 -0
- package/dist/cjs/components/bar-chart/style.css +6 -0
- package/dist/cjs/components/bar-chart/style.css.map +1 -0
- package/dist/cjs/components/grid-control/index.js +2 -0
- package/dist/cjs/components/grid-control/index.js.map +1 -0
- package/dist/cjs/components/grid-control/style.css +3 -0
- package/dist/cjs/components/grid-control/style.css.map +1 -0
- package/dist/cjs/components/legend/index.js +2 -0
- package/dist/cjs/components/legend/index.js.map +1 -0
- package/dist/cjs/components/legend/style.css +3 -0
- package/dist/cjs/components/legend/style.css.map +1 -0
- package/dist/cjs/components/line-chart/index.js +2 -0
- package/dist/cjs/components/line-chart/index.js.map +1 -0
- package/dist/cjs/components/line-chart/style.css +4 -0
- package/dist/cjs/components/line-chart/style.css.map +1 -0
- package/dist/cjs/components/pie-chart/index.js +2 -0
- package/dist/cjs/components/pie-chart/index.js.map +1 -0
- package/dist/cjs/components/pie-chart/style.css +5 -0
- package/dist/cjs/components/pie-chart/style.css.map +1 -0
- package/dist/cjs/components/pie-semi-circle-chart/index.js +2 -0
- package/dist/cjs/components/pie-semi-circle-chart/index.js.map +1 -0
- package/dist/cjs/components/pie-semi-circle-chart/style.css +5 -0
- package/dist/cjs/components/pie-semi-circle-chart/style.css.map +1 -0
- package/dist/cjs/components/tooltip/index.js +2 -0
- package/dist/cjs/components/tooltip/index.js.map +1 -0
- package/dist/cjs/components/tooltip/style.css +3 -0
- package/dist/cjs/components/tooltip/style.css.map +1 -0
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/providers/theme/index.js +2 -0
- package/dist/cjs/providers/theme/index.js.map +1 -0
- package/dist/cjs/style.css +9 -0
- package/dist/cjs/style.css.map +1 -0
- package/dist/mjs/components/bar-chart/index.js +2 -0
- package/dist/mjs/components/bar-chart/index.js.map +1 -0
- package/dist/mjs/components/bar-chart/style.css +6 -0
- package/dist/mjs/components/bar-chart/style.css.map +1 -0
- package/dist/mjs/components/grid-control/index.js +2 -0
- package/dist/mjs/components/grid-control/index.js.map +1 -0
- package/dist/mjs/components/grid-control/style.css +3 -0
- package/dist/mjs/components/grid-control/style.css.map +1 -0
- package/dist/mjs/components/legend/index.js +2 -0
- package/dist/mjs/components/legend/index.js.map +1 -0
- package/dist/mjs/components/legend/style.css +3 -0
- package/dist/mjs/components/legend/style.css.map +1 -0
- package/dist/mjs/components/line-chart/index.js +2 -0
- package/dist/mjs/components/line-chart/index.js.map +1 -0
- package/dist/mjs/components/line-chart/style.css +4 -0
- package/dist/mjs/components/line-chart/style.css.map +1 -0
- package/dist/mjs/components/pie-chart/index.js +2 -0
- package/dist/mjs/components/pie-chart/index.js.map +1 -0
- package/dist/mjs/components/pie-chart/style.css +5 -0
- package/dist/mjs/components/pie-chart/style.css.map +1 -0
- package/dist/mjs/components/pie-semi-circle-chart/index.js +2 -0
- package/dist/mjs/components/pie-semi-circle-chart/index.js.map +1 -0
- package/dist/mjs/components/pie-semi-circle-chart/style.css +5 -0
- package/dist/mjs/components/pie-semi-circle-chart/style.css.map +1 -0
- package/dist/mjs/components/tooltip/index.js +2 -0
- package/dist/mjs/components/tooltip/index.js.map +1 -0
- package/dist/mjs/components/tooltip/style.css +3 -0
- package/dist/mjs/components/tooltip/style.css.map +1 -0
- package/dist/mjs/index.js +2 -0
- package/dist/mjs/index.js.map +1 -0
- package/dist/mjs/package.json +3 -0
- package/dist/mjs/providers/theme/index.js +2 -0
- package/dist/mjs/providers/theme/index.js.map +1 -0
- package/dist/mjs/style.css +9 -0
- package/dist/mjs/style.css.map +1 -0
- package/dist/types/components/bar-chart/bar-chart.d.ts +6 -0
- package/dist/types/components/bar-chart/index.d.ts +1 -0
- package/dist/types/components/grid-control/grid-control.d.ts +4 -0
- package/dist/types/components/grid-control/index.d.ts +1 -0
- package/dist/types/components/legend/base-legend.d.ts +3 -0
- package/dist/types/components/legend/index.d.ts +2 -0
- package/dist/types/components/legend/types.d.ts +12 -0
- package/dist/types/components/line-chart/index.d.ts +1 -0
- package/dist/types/components/line-chart/line-chart.d.ts +6 -0
- package/dist/types/components/pie-chart/index.d.ts +1 -0
- package/dist/types/components/pie-chart/pie-chart.d.ts +15 -0
- package/dist/types/components/pie-semi-circle-chart/index.d.ts +1 -0
- package/dist/types/components/pie-semi-circle-chart/pie-semi-circle-chart.d.ts +23 -0
- package/dist/types/components/tooltip/base-tooltip.d.ts +29 -0
- package/dist/types/components/tooltip/index.d.ts +2 -0
- package/dist/types/hooks/use-chart-mouse-handler.d.ts +41 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/providers/theme/index.d.ts +2 -0
- package/dist/types/providers/theme/theme-provider.d.ts +18 -0
- package/dist/types/providers/theme/themes.d.ts +14 -0
- package/dist/types/types.d.ts +137 -0
- package/index.ts +1 -1
- package/package.json +46 -40
- package/src/components/bar-chart/bar-chart.tsx +1 -1
- package/src/components/grid-control/grid-control.tsx +1 -1
- package/src/components/line-chart/line-chart.tsx +1 -1
- package/src/components/pie-chart/pie-chart.tsx +13 -7
- package/src/components/pie-semi-circle-chart/pie-semi-circle-chart.tsx +1 -1
- package/src/hooks/use-chart-mouse-handler.ts +1 -1
- package/src/index.ts +0 -4
- package/src/providers/theme/theme-provider.tsx +1 -1
- package/src/providers/theme/themes.ts +1 -1
- package/tools/fixup.sh +11 -0
- package/webpack.config.cjs +132 -0
- package/dist/components/bar-chart/index.cjs.js +0 -2
- package/dist/components/bar-chart/index.cjs.js.map +0 -1
- package/dist/components/bar-chart/index.js +0 -2
- package/dist/components/bar-chart/index.js.map +0 -1
- package/dist/components/bar-chart/style.css +0 -95
- package/dist/components/grid-control/index.cjs.js +0 -2
- package/dist/components/grid-control/index.cjs.js.map +0 -1
- package/dist/components/grid-control/index.js +0 -2
- package/dist/components/grid-control/index.js.map +0 -1
- package/dist/components/grid-control/style.css +0 -95
- package/dist/components/legend/index.cjs.js +0 -2
- package/dist/components/legend/index.cjs.js.map +0 -1
- package/dist/components/legend/index.js +0 -2
- package/dist/components/legend/index.js.map +0 -1
- package/dist/components/legend/style.css +0 -95
- package/dist/components/line-chart/index.cjs.js +0 -2
- package/dist/components/line-chart/index.cjs.js.map +0 -1
- package/dist/components/line-chart/index.js +0 -2
- package/dist/components/line-chart/index.js.map +0 -1
- package/dist/components/line-chart/style.css +0 -95
- package/dist/components/pie-chart/index.cjs.js +0 -2
- package/dist/components/pie-chart/index.cjs.js.map +0 -1
- package/dist/components/pie-chart/index.js +0 -2
- package/dist/components/pie-chart/index.js.map +0 -1
- package/dist/components/pie-chart/style.css +0 -95
- package/dist/components/pie-semi-circle-chart/index.cjs.js +0 -2
- package/dist/components/pie-semi-circle-chart/index.cjs.js.map +0 -1
- package/dist/components/pie-semi-circle-chart/index.js +0 -2
- package/dist/components/pie-semi-circle-chart/index.js.map +0 -1
- package/dist/components/pie-semi-circle-chart/style.css +0 -95
- package/dist/components/tooltip/index.cjs.js +0 -2
- package/dist/components/tooltip/index.cjs.js.map +0 -1
- package/dist/components/tooltip/index.js +0 -2
- package/dist/components/tooltip/index.js.map +0 -1
- package/dist/components/tooltip/style.css +0 -95
- package/dist/index.d.ts +0 -16386
- package/dist/index.js +0 -2
- package/dist/index.js.map +0 -1
- package/dist/index.mjs +0 -2
- package/dist/index.mjs.map +0 -1
- package/dist/providers/theme/index.cjs.js +0 -2
- package/dist/providers/theme/index.cjs.js.map +0 -1
- package/dist/providers/theme/index.js +0 -2
- package/dist/providers/theme/index.js.map +0 -1
- package/dist/providers/theme/style.css +0 -95
- package/dist/style.css +0 -95
- package/rollup.config.mjs +0 -142
- /package/src/{components/shared/types.d.ts → types.ts} +0 -0
|
@@ -1,95 +0,0 @@
|
|
|
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
|
-
}
|
|
47
|
-
|
|
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,2 +0,0 @@
|
|
|
1
|
-
"use strict";var l=require("react/jsx-runtime"),e="base-tooltip-module__tooltip__OfX6n";const t=({data:e})=>l.jsxs(l.Fragment,{children:[null==e?void 0:e.label,": ",(null==e?void 0:e.valueDisplay)||(null==e?void 0:e.value)]});exports.BaseTooltip=({data:a,top:o,left:s,component:i=t,children:n,className:r})=>l.jsx("div",{className:e,style:{top:o,left:s},role:"tooltip",children:n||a&&l.jsx(i,{data:a,className:r})});
|
|
2
|
-
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":["../../../src/components/tooltip/base-tooltip.tsx"],"sourcesContent":[null],"names":["DefaultTooltipContent","data","_jsxs","label","valueDisplay","value","top","left","component","Component","children","className","_jsx","styles","style","role","jsx"],"mappings":"wFAmCA,MAAMA,EAAwB,EAAIC,UACjCC,6BACGD,aAAA,EAAAA,EAAME,MAAK,MAAMF,aAAI,EAAJA,EAAMG,gBAAgBH,eAAAA,EAAMI,8BAItB,EAC1BJ,OACAK,MACAC,OACAC,UAAWC,EAAYT,EACvBU,WACAC,eAGCC,MAAK,MAAA,CAAAD,UAAYE,EAAiBC,MAAQ,CAAER,MAAKC,QAASQ,KAAK,UAC5DL,SAAAA,GAAcT,GAAQW,EAACI,IAAAP,GAAUR,KAAOA,EAAOU,UAAYA"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as l,jsxs as t,Fragment as a}from"react/jsx-runtime";var e="base-tooltip-module__tooltip__OfX6n";const o=({data:l})=>t(a,{children:[null==l?void 0:l.label,": ",(null==l?void 0:l.valueDisplay)||(null==l?void 0:l.value)]}),i=({data:t,top:a,left:i,component:d=o,children:n,className:s})=>l("div",{className:e,style:{top:a,left:i},role:"tooltip",children:n||t&&l(d,{data:t,className:s})});export{i as BaseTooltip};
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/tooltip/base-tooltip.tsx"],"sourcesContent":[null],"names":["DefaultTooltipContent","data","_jsxs","label","valueDisplay","value","BaseTooltip","top","left","component","Component","children","className","_jsx","styles","style","role"],"mappings":"4GAmCA,MAAMA,EAAwB,EAAIC,UACjCC,eACGD,aAAA,EAAAA,EAAME,MAAK,MAAMF,aAAI,EAAJA,EAAMG,gBAAgBH,eAAAA,EAAMI,UAIpCC,EAAc,EAC1BL,OACAM,MACAC,OACAC,UAAWC,EAAYV,EACvBW,WACAC,eAGCC,EAAK,MAAA,CAAAD,UAAYE,EAAiBC,MAAQ,CAAER,MAAKC,QAASQ,KAAK,UAC5DL,SAAAA,GAAcV,GAAQY,EAACH,GAAUT,KAAOA,EAAOW,UAAYA"}
|
|
@@ -1,95 +0,0 @@
|
|
|
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
|
-
.pie-semi-circle-chart-module__pie-semi-circle-chart__r5jk9 {
|
|
11
|
-
position: relative;
|
|
12
|
-
text-align: center;
|
|
13
|
-
}
|
|
14
|
-
.pie-semi-circle-chart-module__pie-semi-circle-chart-legend__c8W1Y {
|
|
15
|
-
margin-top: 1rem;
|
|
16
|
-
}
|
|
17
|
-
.pie-semi-circle-chart-module__pie-semi-circle-chart__r5jk9 .pie-semi-circle-chart-module__label__nPqOg {
|
|
18
|
-
margin-bottom: 0px;
|
|
19
|
-
font-weight: 600;
|
|
20
|
-
font-size: 16px;
|
|
21
|
-
}
|
|
22
|
-
.pie-semi-circle-chart-module__pie-semi-circle-chart__r5jk9 .pie-semi-circle-chart-module__note__LpBZQ {
|
|
23
|
-
margin-top: 0px;
|
|
24
|
-
font-size: 14px;
|
|
25
|
-
}
|
|
26
|
-
.line-chart-module__line-chart__ITM3d {
|
|
27
|
-
position: relative;
|
|
28
|
-
}
|
|
29
|
-
.line-chart-module__line-chart__tooltip__aqcme {
|
|
30
|
-
background: #fff;
|
|
31
|
-
padding: 0.5rem;
|
|
32
|
-
}
|
|
33
|
-
.line-chart-module__line-chart__tooltip-date__4Dzab {
|
|
34
|
-
font-weight: bold;
|
|
35
|
-
padding-bottom: 10px;
|
|
36
|
-
}
|
|
37
|
-
.line-chart-module__line-chart__tooltip-row__6A37G {
|
|
38
|
-
display: flex;
|
|
39
|
-
align-items: center;
|
|
40
|
-
padding: 4px 0;
|
|
41
|
-
justify-content: space-between;
|
|
42
|
-
}
|
|
43
|
-
.line-chart-module__line-chart__tooltip-label__IvnFF {
|
|
44
|
-
font-weight: 500;
|
|
45
|
-
padding-right: 1rem;
|
|
46
|
-
}
|
|
47
|
-
.grid-control-module__grid-control__KOnZN .visx-line {
|
|
48
|
-
stroke: #d7d6d6;
|
|
49
|
-
stroke-width: 1px;
|
|
50
|
-
shape-rendering: crispEdges;
|
|
51
|
-
}
|
|
52
|
-
.legend-module__legend--horizontal__IUN13 {
|
|
53
|
-
display: flex;
|
|
54
|
-
flex-direction: row;
|
|
55
|
-
flex-wrap: wrap;
|
|
56
|
-
gap: 16px;
|
|
57
|
-
}
|
|
58
|
-
.legend-module__legend--vertical__Scfzo {
|
|
59
|
-
display: flex;
|
|
60
|
-
flex-direction: column;
|
|
61
|
-
gap: 8px;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.legend-module__legend-item__feemn {
|
|
65
|
-
display: flex;
|
|
66
|
-
align-items: center;
|
|
67
|
-
gap: 8px;
|
|
68
|
-
font-size: 0.875rem;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.legend-module__legend-item-swatch__nRyXf {
|
|
72
|
-
border-radius: 2px;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.legend-module__legend-item-label__ksx6I {
|
|
76
|
-
color: var(--jp-gray-80, #2c3338);
|
|
77
|
-
display: flex;
|
|
78
|
-
align-items: center;
|
|
79
|
-
gap: 0.5rem;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.legend-module__legend-item-value__d9x1j {
|
|
83
|
-
font-weight: 500;
|
|
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
|
-
}
|