@baseline-ui/charts 3.3.0 → 3.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.
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -121,7 +121,7 @@ interface BarChartProps extends CartesianChartBaseProps {
|
|
|
121
121
|
barRadius?: number;
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
declare function BarChart({ data, bars, xAxisDataKey, variant, barSize, barGap, barRadius, width, height, showTooltip, showLegend, showGrid, showXAxis, showYAxis, numberFormatterProps, className, style, dir, ...
|
|
124
|
+
declare function BarChart({ data, bars, xAxisDataKey, variant, barSize, barGap, barRadius, width, height, showTooltip, showLegend, showGrid, showXAxis, showYAxis, numberFormatterProps, className, style, dir, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-details": ariaDetails, ...rootProps }: BarChartProps): react.JSX.Element;
|
|
125
125
|
|
|
126
126
|
type CurveType = NonNullable<LineProps["type"]>;
|
|
127
127
|
interface LineChartLine {
|
|
@@ -154,7 +154,7 @@ interface LineChartProps extends CartesianChartBaseProps {
|
|
|
154
154
|
variant?: LineChartVariant;
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
declare function LineChart({ data, lines, xAxisDataKey, variant, width, height, showTooltip, showLegend, showGrid, showXAxis, showYAxis, numberFormatterProps, className, style, dir, ...
|
|
157
|
+
declare function LineChart({ data, lines, xAxisDataKey, variant, width, height, showTooltip, showLegend, showGrid, showXAxis, showYAxis, numberFormatterProps, className, style, dir, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-details": ariaDetails, ...rootProps }: LineChartProps): react.JSX.Element;
|
|
158
158
|
|
|
159
159
|
interface PieChartSlice {
|
|
160
160
|
/**
|
|
@@ -182,6 +182,6 @@ interface PieChartProps extends ChartBaseProps {
|
|
|
182
182
|
showLabels?: boolean;
|
|
183
183
|
}
|
|
184
184
|
|
|
185
|
-
declare function PieChart({ data, width, height, innerRadius, outerRadius, showTooltip, showLegend, showLabels, className, style, dir, ...
|
|
185
|
+
declare function PieChart({ data, width, height, innerRadius, outerRadius, showTooltip, showLegend, showLabels, className, style, dir, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-details": ariaDetails, ...rootProps }: PieChartProps): react.JSX.Element;
|
|
186
186
|
|
|
187
187
|
export { BarChart, type BarChartBar, type BarChartProps, type BarChartVariant, LineChart, type LineChartLine, type LineChartProps, type LineChartVariant, PieChart, type PieChartProps, type PieChartSlice };
|
package/dist/index.d.ts
CHANGED
|
@@ -121,7 +121,7 @@ interface BarChartProps extends CartesianChartBaseProps {
|
|
|
121
121
|
barRadius?: number;
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
declare function BarChart({ data, bars, xAxisDataKey, variant, barSize, barGap, barRadius, width, height, showTooltip, showLegend, showGrid, showXAxis, showYAxis, numberFormatterProps, className, style, dir, ...
|
|
124
|
+
declare function BarChart({ data, bars, xAxisDataKey, variant, barSize, barGap, barRadius, width, height, showTooltip, showLegend, showGrid, showXAxis, showYAxis, numberFormatterProps, className, style, dir, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-details": ariaDetails, ...rootProps }: BarChartProps): react.JSX.Element;
|
|
125
125
|
|
|
126
126
|
type CurveType = NonNullable<LineProps["type"]>;
|
|
127
127
|
interface LineChartLine {
|
|
@@ -154,7 +154,7 @@ interface LineChartProps extends CartesianChartBaseProps {
|
|
|
154
154
|
variant?: LineChartVariant;
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
declare function LineChart({ data, lines, xAxisDataKey, variant, width, height, showTooltip, showLegend, showGrid, showXAxis, showYAxis, numberFormatterProps, className, style, dir, ...
|
|
157
|
+
declare function LineChart({ data, lines, xAxisDataKey, variant, width, height, showTooltip, showLegend, showGrid, showXAxis, showYAxis, numberFormatterProps, className, style, dir, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-details": ariaDetails, ...rootProps }: LineChartProps): react.JSX.Element;
|
|
158
158
|
|
|
159
159
|
interface PieChartSlice {
|
|
160
160
|
/**
|
|
@@ -182,6 +182,6 @@ interface PieChartProps extends ChartBaseProps {
|
|
|
182
182
|
showLabels?: boolean;
|
|
183
183
|
}
|
|
184
184
|
|
|
185
|
-
declare function PieChart({ data, width, height, innerRadius, outerRadius, showTooltip, showLegend, showLabels, className, style, dir, ...
|
|
185
|
+
declare function PieChart({ data, width, height, innerRadius, outerRadius, showTooltip, showLegend, showLabels, className, style, dir, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-details": ariaDetails, ...rootProps }: PieChartProps): react.JSX.Element;
|
|
186
186
|
|
|
187
187
|
export { BarChart, type BarChartBar, type BarChartProps, type BarChartVariant, LineChart, type LineChartLine, type LineChartProps, type LineChartVariant, PieChart, type PieChartProps, type PieChartSlice };
|
package/dist/index.js
CHANGED
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
* This notice may not be removed from this file.
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
var ue="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z6jw _1yep5z6jx _1yep5z6jy",me="ofrh9o1 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6lu",fe="_1yep5z6jb _1yep5z6jc _1yep5z6jd _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z69f _1yep5z69g _1yep5z69h",de="ofrh9o2 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6m0",he="ofrh9o0",ye="_1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z69f _1yep5z69g _1yep5z69h _1yep5z6mf _1yep5z6mh _1yep5z6g9 _1yep5z6hg _1yep5z6d7",Ce="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z69f _1yep5z69g _1yep5z69h",ge="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z69c _1yep5z69d _1yep5z69e",_e="ofrh9o3 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6m0";function E({rootClassName:e,className:t,style:o,width:r,height:n,variant:a,dir:i,legend:d,surfaceRef:u,surfaceStyle:m,children:p,..._}){return jsxRuntime.jsxs("div",{..._,className:core.classNames(ue,e,t),"data-variant":a,dir:i,style:{width:r,height:n,...o},children:[d,jsxRuntime.jsx("div",{ref:u,className:core.classNames(he,"BaselineUI-Chart-Surface"),style:m,children:p})]})}function k({series:e,resolveColor:t,paddingInlineStart:o}){return jsxRuntime.jsx("ul",{className:`${me} BaselineUI-Chart-Legend`,style:o==null?void 0:{paddingInlineStart:o},children:e.map((r,n)=>jsxRuntime.jsxs("li",{className:`${fe} BaselineUI-Chart-LegendItem`,children:[jsxRuntime.jsx("span",{className:`${de} BaselineUI-Chart-LegendSwatch`,style:{backgroundColor:t(r,n)}}),jsxRuntime.jsx(core.Text,{type:"label",size:"sm",children:r.name??r.dataKey})]},r.dataKey))})}var Fe=e=>{if(typeof e=="number")return Number.isFinite(e)?e:null;if(typeof e=="string"&&e.trim()!==""){let t=Number(e);return Number.isFinite(t)?t:null}return null},Ve=(e,t)=>{if(!t)return e;let o=Fe(e);return o==null?(process.env.NODE_ENV!=="production"&&e!=null&&core.devWarnOnce("ChartTooltip:nonNumeric",`[ChartTooltip] \`numberFormatterProps\` was provided but a non-numeric value was received (got ${JSON.stringify(e)}). The value will render unformatted.`),e):jsxRuntime.jsx(core.NumberFormat,{value:o,...t})};function A({active:e,payload:t,label:o,numberFormatterProps:r}){return !e||!t?.length?null:jsxRuntime.jsxs("div",{className:`${ye} BaselineUI-Chart-Tooltip`,children:[o==null?null:jsxRuntime.jsx(core.Text,{elementType:"div",type:"label",size:"sm",children:String(o)}),jsxRuntime.jsx("div",{className:ge,children:t.map(n=>jsxRuntime.jsxs("div",{className:`${Ce} BaselineUI-Chart-TooltipItem`,children:[jsxRuntime.jsx("span",{className:`${_e} BaselineUI-Chart-TooltipSwatch`,style:{backgroundColor:n.color}}),jsxRuntime.jsxs(core.Text,{type:"label",size:"sm",children:[n.name,": ",Ve(n.value,r)]})]},String(n.dataKey)))})]})}function D(e){let{direction:t}=core.useLocale();return e??t}function B(e,t){let o=null,r=()=>{o==null&&(o=requestAnimationFrame(()=>{o=null,t();}));};t();let n=new ResizeObserver(r);n.observe(e);let a=new MutationObserver(r);return a.observe(e,{childList:true,subtree:true}),()=>{o!=null&&cancelAnimationFrame(o),n.disconnect(),a.disconnect();}}var re=".recharts-yAxis-tick-labels .recharts-cartesian-axis-tick-value";function F(e,t){let[o,r]=react.useState(0);return react.useLayoutEffect(()=>{let n=e.current;if(!n)return;let a=false,i=false,d=false,u=false,m=0,p=h=>{r(f=>f===h?f:h);};p(0);let _=()=>{process.env.NODE_ENV!=="production"&&!i&&!a&&m>5&&(i=true,console.warn(`[useLeftmostYAxisLabelOffset] Could not find "${re}" \u2014 Recharts may have renamed its internals. Legend will fall back to flush alignment.`));},N=()=>{process.env.NODE_ENV!=="production"&&!u&&a&&(u=true,console.warn("[useLeftmostYAxisLabelOffset] Y-axis labels disappeared after a successful measurement \u2014 falling back to flush alignment. This may indicate a Recharts upgrade or an unexpected empty render."));},z=()=>{process.env.NODE_ENV!=="production"&&!d&&(d=true,console.warn(`[useLeftmostYAxisLabelOffset] Found "${re}" but no label returned a finite bounding rect \u2014 Recharts' measurement contract may have changed. Legend will fall back to flush alignment.`));};return B(n,()=>{let h=n.querySelectorAll(re);if(h.length===0){m+=1,a?N():_(),p(0);return}a=true;let f=n.getBoundingClientRect();if(t==="rtl"){let c=-1/0;for(let s of h){let l=s.getBoundingClientRect();l.width===0&&l.height===0||(c=Math.max(c,l.right));}if(!Number.isFinite(c)){z(),p(0);return}p(Math.max(0,f.right-c));return}let y=1/0;for(let c of h){let s=c.getBoundingClientRect();s.width===0&&s.height===0||(y=Math.min(y,s.left));}if(!Number.isFinite(y)){z(),p(0);return}p(Math.max(0,y-f.left));})},[e,t]),o}var xe=".recharts-cartesian-grid";function oe(e){let[t,o]=react.useState(0);return react.useLayoutEffect(()=>{let r=e.current;if(!r)return;let n=false,a=false,i=0;return B(r,()=>{let u=r.querySelector(xe);if(!u){i+=1,process.env.NODE_ENV!=="production"&&!a&&!n&&i>5&&(a=true,console.warn(`[usePlotAreaWidth] Could not find "${xe}" \u2014 Recharts may have renamed its internals. Bar layouts will fall back to requested sizes.`));return}n=true;let m=u.getBoundingClientRect().width;o(p=>Math.abs(p-m)<.5?p:m);})},[e]),t}var ne=".recharts-yAxis-tick-labels .recharts-cartesian-axis-tick-value";function V(e,t){let[o,r]=react.useState(0);return react.useLayoutEffect(()=>{let n=e.current;if(!n)return;let a=false,i=false,d=false,u=false,m=0,p=h=>{r(f=>f===h?f:h);};p(0);let _=()=>{process.env.NODE_ENV!=="production"&&!i&&!a&&m>5&&(i=true,console.warn(`[useYAxisLeftOverflow] Could not find "${ne}" \u2014 Recharts may have renamed its internals. The focus outline will not extend over overflowing axis labels.`));},N=()=>{process.env.NODE_ENV!=="production"&&!u&&a&&(u=true,console.warn("[useYAxisLeftOverflow] Y-axis labels disappeared after a successful measurement \u2014 focus outline will no longer extend over overflowing labels. This may indicate a Recharts upgrade or an unexpected empty render."));},z=()=>{process.env.NODE_ENV!=="production"&&!d&&(d=true,console.warn(`[useYAxisLeftOverflow] Found "${ne}" but no label returned a finite bounding rect \u2014 Recharts' measurement contract may have changed. The focus outline will not extend over overflowing axis labels.`));};return B(n,()=>{let h=n.querySelectorAll(ne);if(h.length===0){m+=1,a?N():_(),p(0);return}a=true;let f=n.getBoundingClientRect();if(t==="rtl"){let c=-1/0;for(let s of h){let l=s.getBoundingClientRect();l.width===0&&l.height===0||(c=Math.max(c,l.right));}if(!Number.isFinite(c)){z(),p(0);return}p(Math.max(0,Math.ceil(c-f.right)));return}let y=1/0;for(let c of h){let s=c.getBoundingClientRect();s.width===0&&s.height===0||(y=Math.min(y,s.left));}if(!Number.isFinite(y)){z(),p(0);return}p(Math.max(0,Math.ceil(f.left-y)));})},[e,t]),o}var ae="_1o5hr0b0 _1yep5z6dy",ze="_1yep5z69r _1yep5z69s _1yep5z69t";var K=[tokens.themeVars.color.support.info.medium,tokens.themeVars.color.support.success.medium,tokens.themeVars.color.support.warning.medium,tokens.themeVars.color.support.error.medium],st=12,lt=2,ct=4,W=1,pt={width:1,height:1},ut=({plotWidth:e,categoryCount:t,barCount:o,barSize:r,barGap:n})=>{if(e<=0||t<=0||o<=0)return {barSize:r,barGap:n};let a=e/t-W,i=o-1;if(o*r+i*n<=a)return {barSize:r,barGap:n};let u=o*r+i*W;if(i>0&&u<=a){let p=Math.floor((a-o*r)/i);return {barSize:r,barGap:Math.max(W,p)}}let m=Math.floor((a-i*W)/o);return {barSize:Math.max(1,m),barGap:W}},we=(e,t)=>e.color??K[t%K.length],mt=e=>{if(process.env.NODE_ENV==="production")return;let t=e.length>K.length,o=e.some(r=>r.color==null);t&&o&&core.devWarnOnce("BarChart:paletteWrap",`[BarChart] More than ${K.length} bar series with default colors \u2014 colors will repeat and series may become visually indistinguishable. Set an explicit \`color\` on each bar.`);},se=(e,t)=>{if(e.stackId!=null)return e.stackId;if(t==="stacked")return "default"},ft=(e,t)=>{let o=new Map,r=new Map;for(let[n,a]of e.entries()){let i=se(a,t);i==null?o.set(n,true):r.set(i,n);}for(let n of r.values())o.set(n,true);return o},Le=false,dt=({offset:e,xAxis:t})=>{process.env.NODE_ENV!=="production"&&!Le&&(!e||!t||typeof t.scale?.domain!="function")&&(Le=true,console.warn("[BarChart] Recharts passed an unexpected shape to verticalCoordinatesGenerator (missing offset/xAxis/scale.domain). Vertical grid lines will not render \u2014 likely caused by a Recharts upgrade."));let o=t?.scale?.domain?.(),r=Array.isArray(o)?o.length:0,n=e?.width??0;if(r===0||n===0)return [];let a=e?.left??0,i=n/r;return Array.from({length:r},(d,u)=>a+i*(u+1))};function ht({data:e,bars:t,xAxisDataKey:o,variant:r="default",barSize:n=st,barGap:a=ct,barRadius:i=lt,width:d="100%",height:u=300,showTooltip:m=true,showLegend:p=false,showGrid:_=true,showXAxis:N=true,showYAxis:z=true,numberFormatterProps:b,className:h,style:f,dir:y,...c}){mt(t);let s=D(y),l=s==="rtl",x=react.useRef(null),I=F(x,s),C=oe(x),w=V(x,s),O=core.useNumberFormatter(b),J=react.useMemo(()=>b?g=>O.format(g):void 0,[b,O]),$=react.useCallback(g=>jsxRuntime.jsx(A,{...g,numberFormatterProps:b}),[b]),U=react.useMemo(()=>ft(t,r),[t,r]),Z=react.useMemo(()=>{let g=new Set,j=0;for(let pe of t){let G=se(pe,r);G==null?j+=1:g.add(G);}return j+g.size},[t,r]),{barSize:Q,barGap:v}=ut({plotWidth:C,categoryCount:e.length,barCount:Z,barSize:n,barGap:a});return jsxRuntime.jsx(E,{...c,rootClassName:core.classNames("BaselineUI-BarChart",ze),className:h,style:f,width:d,height:u,variant:r,dir:s,legend:p?jsxRuntime.jsx(k,{series:t,resolveColor:we,paddingInlineStart:I}):null,surfaceRef:x,surfaceStyle:{"--chart-focus-left-overflow":l?"0px":`${w}px`,"--chart-focus-right-overflow":l?`${w}px`:"0px"},children:jsxRuntime.jsx(recharts.ResponsiveContainer,{width:"100%",height:"100%",initialDimension:pt,children:jsxRuntime.jsxs(recharts.BarChart,{accessibilityLayer:true,barGap:v,data:e,children:[_?jsxRuntime.jsx(recharts.CartesianGrid,{stroke:tokens.themeVars.color.border.strong,strokeDasharray:"3 3",verticalCoordinatesGenerator:dt}):null,N?jsxRuntime.jsx(recharts.XAxis,{dataKey:o,reversed:l,stroke:tokens.themeVars.color.border.inverse,tick:{className:ae}}):null,z?jsxRuntime.jsx(recharts.YAxis,{orientation:l?"right":"left",stroke:tokens.themeVars.color.border.inverse,tick:{className:ae},tickFormatter:J}):null,m?jsxRuntime.jsx(recharts.Tooltip,{content:$,cursor:{fill:tokens.themeVars.color.background.overlay.interactive}}):null,t.map((g,j)=>{let G=U.get(j)??false?[i,i,0,0]:[0,0,0,0];return jsxRuntime.jsx(recharts.Bar,{barSize:Q,dataKey:g.dataKey,fill:we(g,j),name:g.name??g.dataKey,radius:G,stackId:se(g,r)},g.dataKey)})]})})})}var le="_1ojkdm40 _1yep5z6dy",Ne="_1yep5z69r _1yep5z69s _1yep5z69t";var H=[tokens.themeVars.color.support.info.medium,tokens.themeVars.color.support.success.medium,tokens.themeVars.color.support.warning.medium,tokens.themeVars.color.support.error.medium],q={width:40,height:20,strokeWidth:1,margin:{top:1,right:1,bottom:1,left:1}},Pt={width:1,height:1},ce=(e,t)=>e.color??H[t%H.length],Et=e=>{if(process.env.NODE_ENV==="production")return;let t=e.length>H.length,o=e.some(r=>r.color==null);t&&o&&core.devWarnOnce("LineChart:paletteWrap",`[LineChart] More than ${H.length} line series with default colors \u2014 colors will repeat and series may become visually indistinguishable. Set an explicit \`color\` on each line.`);};function kt({data:e,lines:t,xAxisDataKey:o,variant:r="default",width:n,height:a,showTooltip:i,showLegend:d=false,showGrid:u,showXAxis:m,showYAxis:p,numberFormatterProps:_,className:N,style:z,dir:b,...h}){Et(t);let f=D(b),y=f==="rtl",c=r==="sparkline",s=n??(c?q.width:"100%"),l=a??(c?q.height:300),x=i??!c,I=u??!c,C=m??!c,w=p??!c,O=react.useRef(null),J=F(O,f),$=V(O,f),U=core.useNumberFormatter(_),Z=react.useMemo(()=>_?v=>U.format(v):void 0,[_,U]),Q=react.useCallback(v=>jsxRuntime.jsx(A,{...v,numberFormatterProps:_}),[_]);return jsxRuntime.jsx(E,{...h,rootClassName:core.classNames("BaselineUI-LineChart",Ne),className:N,style:z,width:s,height:l,variant:r,dir:f,legend:d?jsxRuntime.jsx(k,{series:t,resolveColor:ce,paddingInlineStart:J}):null,surfaceRef:O,surfaceStyle:{"--chart-focus-left-overflow":y?"0px":`${$}px`,"--chart-focus-right-overflow":y?`${$}px`:"0px"},children:jsxRuntime.jsx(recharts.ResponsiveContainer,{width:"100%",height:"100%",initialDimension:Pt,children:jsxRuntime.jsxs(recharts.LineChart,{accessibilityLayer:!c,data:e,margin:c?q.margin:void 0,children:[I?jsxRuntime.jsx(recharts.CartesianGrid,{stroke:tokens.themeVars.color.border.strong,strokeDasharray:"3 3"}):null,C?jsxRuntime.jsx(recharts.XAxis,{dataKey:o,reversed:y,stroke:tokens.themeVars.color.border.inverse,tick:{className:le}}):null,w?jsxRuntime.jsx(recharts.YAxis,{orientation:y?"right":"left",stroke:tokens.themeVars.color.border.inverse,tick:{className:le},tickFormatter:Z}):null,x?jsxRuntime.jsx(recharts.Tooltip,{content:Q,cursor:{stroke:tokens.themeVars.color.border.interactive.enabled,strokeDasharray:"3 3"}}):null,t.map((v,g)=>jsxRuntime.jsx(recharts.Line,{activeDot:c?false:{r:4,strokeWidth:2,stroke:tokens.themeVars.color.background.positive.subtle,fill:ce(v,g),style:{filter:"drop-shadow(0 0 4px rgba(0,0,0,0.4))"}},dataKey:v.dataKey,dot:v.dot??false,name:v.name??v.dataKey,stroke:ce(v,g),strokeWidth:v.strokeWidth??(c?q.strokeWidth:2),type:v.type??"monotone"},v.dataKey))]})})})}var Se="_1yep5z69o _1yep5z69p _1yep5z69q",Te="_1sy8dya1",Re="_1sy8dya0 _1yep5z6dy";var X=[tokens.themeVars.color.support.info.medium,tokens.themeVars.color.support.success.medium,tokens.themeVars.color.support.error.medium,tokens.themeVars.color.support.warning.medium],Gt=90,Yt=-270,Kt=.05,qt={width:1,height:1},Ee=(e,t)=>e.color??X[t%X.length],Ht=e=>{if(process.env.NODE_ENV==="production")return;let t=e.length>X.length,o=e.some(r=>r.color==null);t&&o&&core.devWarnOnce("PieChart:paletteWrap",`[PieChart] More than ${X.length} slices with default colors \u2014 colors will repeat and slices may become visually indistinguishable. Set an explicit \`color\` on each slice.`);},Xt=({cx:e,cy:t,midAngle:o,innerRadius:r=0,outerRadius:n=0,percent:a=0})=>{if(e==null||t==null||o==null||a<Kt)return null;let i=r+(n-r)*.65,d=-o*(Math.PI/180),u=e+i*Math.cos(d),m=t+i*Math.sin(d);return jsxRuntime.jsx("text",{className:Re,x:u,y:m,textAnchor:"middle",dominantBaseline:"central",children:jsxRuntime.jsx(core.NumberFormat,{value:a,style:"percent",maximumFractionDigits:0})})},Jt={style:"percent",maximumFractionDigits:0},Zt=3,Qt=({cx:e,cy:t,innerRadius:o,outerRadius:r=0,startAngle:n,endAngle:a,fill:i})=>jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx(recharts.Sector,{cx:e,cy:t,innerRadius:o,outerRadius:r+Zt,startAngle:n,endAngle:a,fill:i}),jsxRuntime.jsx(recharts.Sector,{cx:e,cy:t,innerRadius:o,outerRadius:r,startAngle:n,endAngle:a,fill:i,stroke:tokens.themeVars.color.focused.inset,strokeWidth:1})]}),ke=new WeakSet;function er({data:e,width:t="100%",height:o=300,innerRadius:r,outerRadius:n,showTooltip:a=true,showLegend:i=true,showLabels:d=true,className:u,style:m,dir:p,..._}){Ht(e);let N=D(p),z=react.useRef(null),{sortedData:b,sliceData:h}=react.useMemo(()=>{let s=e.filter(C=>C.value>=0);process.env.NODE_ENV!=="production"&&s.length!==e.length&&console.warn("[PieChart] Negative slice values were dropped. PieChart expects all `value`s to be >= 0.");let l=s.toSorted((C,w)=>w.value-C.value),x=l.reduce((C,w)=>C+w.value,0);process.env.NODE_ENV!=="production"&&x<=0&&e.length>0&&!ke.has(e)&&(ke.add(e),console.warn("[PieChart] Received data with a non-positive total. The chart will render empty."));let I=l.map(C=>({...C,fraction:x>0?C.value/x:0}));return {sortedData:l,sliceData:I}},[e]);react.useEffect(()=>{let s=z.current;if(!s)return;let l=()=>{let C=s.querySelector(".recharts-active-shape")?.parentElement,w=C?.parentElement;C&&w&&w.lastElementChild!==C&&w.append(C);};l();let x=new MutationObserver(l);return x.observe(s,{subtree:true,attributes:true,attributeFilter:["class"]}),()=>{x.disconnect();}},[]);let f=n??"100%",y=r??0,c=b.map((s,l)=>({dataKey:`${s.name}-${l}`,name:s.name}));return jsxRuntime.jsx(E,{..._,rootClassName:core.classNames("BaselineUI-PieChart",Se),className:u,style:m,width:t,height:o,variant:"default",dir:N,legend:i?jsxRuntime.jsx(k,{series:c,resolveColor:(s,l)=>Ee(b[l],l)}):null,surfaceRef:z,children:jsxRuntime.jsx(recharts.ResponsiveContainer,{width:"100%",height:"100%",initialDimension:qt,children:jsxRuntime.jsxs(recharts.PieChart,{accessibilityLayer:true,children:[a?jsxRuntime.jsx(recharts.Tooltip,{content:s=>jsxRuntime.jsx(A,{...s,numberFormatterProps:Jt})}):null,jsxRuntime.jsx(recharts.Pie,{data:h,dataKey:"fraction",nameKey:"name",innerRadius:y,outerRadius:f,startAngle:Gt,endAngle:Yt,isAnimationActive:false,label:d?Xt:false,labelLine:false,stroke:tokens.themeVars.color.focused.inset,strokeWidth:1,activeShape:Qt,rootTabIndex:-1,children:b.map((s,l)=>jsxRuntime.jsx(recharts.Cell,{className:Te,fill:Ee(s,l)},`${s.name}-${l}`))})]})})})}exports.BarChart=ht;exports.LineChart=kt;exports.PieChart=er;
|
|
10
|
+
var he="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z6jw _1yep5z6jx _1yep5z6jy",ye="ofrh9o1 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6lu",Ce="_1yep5z6jb _1yep5z6jc _1yep5z6jd _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z69f _1yep5z69g _1yep5z69h",be="ofrh9o2 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6m0",ge="ofrh9o0",ve="_1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z69f _1yep5z69g _1yep5z69h _1yep5z6mf _1yep5z6mh _1yep5z6g9 _1yep5z6hg _1yep5z6d7",_e="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z69f _1yep5z69g _1yep5z69h",xe="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z69c _1yep5z69d _1yep5z69e",ze="ofrh9o3 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6m0";function I({rootClassName:e,className:t,style:o,width:r,height:n,variant:a,dir:i,legend:h,surfaceRef:c,surfaceStyle:d,children:l,..._}){return jsxRuntime.jsxs("div",{..._,className:core.classNames(he,e,t),"data-variant":a,dir:i,style:{width:r,height:n,...o},children:[h,jsxRuntime.jsx("div",{ref:c,className:core.classNames(ge,"BaselineUI-Chart-Surface"),style:d,children:l})]})}function O({series:e,resolveColor:t,paddingInlineStart:o}){return jsxRuntime.jsx("ul",{className:`${ye} BaselineUI-Chart-Legend`,style:o==null?void 0:{paddingInlineStart:o},children:e.map((r,n)=>jsxRuntime.jsxs("li",{className:`${Ce} BaselineUI-Chart-LegendItem`,children:[jsxRuntime.jsx("span",{className:`${be} BaselineUI-Chart-LegendSwatch`,style:{backgroundColor:t(r,n)}}),jsxRuntime.jsx(core.Text,{type:"label",size:"sm",children:r.name??r.dataKey})]},r.dataKey))})}var Ge=e=>{if(typeof e=="number")return Number.isFinite(e)?e:null;if(typeof e=="string"&&e.trim()!==""){let t=Number(e);return Number.isFinite(t)?t:null}return null},Ye=(e,t)=>{if(!t)return e;let o=Ge(e);return o==null?(process.env.NODE_ENV!=="production"&&e!=null&&core.devWarnOnce("ChartTooltip:nonNumeric",`[ChartTooltip] \`numberFormatterProps\` was provided but a non-numeric value was received (got ${JSON.stringify(e)}). The value will render unformatted.`),e):jsxRuntime.jsx(core.NumberFormat,{value:o,...t})};function B({active:e,payload:t,label:o,numberFormatterProps:r}){return !e||!t?.length?null:jsxRuntime.jsxs("div",{className:`${ve} BaselineUI-Chart-Tooltip`,children:[o==null?null:jsxRuntime.jsx(core.Text,{elementType:"div",type:"label",size:"sm",children:String(o)}),jsxRuntime.jsx("div",{className:xe,children:t.map(n=>jsxRuntime.jsxs("div",{className:`${_e} BaselineUI-Chart-TooltipItem`,children:[jsxRuntime.jsx("span",{className:`${ze} BaselineUI-Chart-TooltipSwatch`,style:{backgroundColor:n.color}}),jsxRuntime.jsxs(core.Text,{type:"label",size:"sm",children:[n.name,": ",Ye(n.value,r)]})]},String(n.dataKey)))})]})}function M(e){let{direction:t}=core.useLocale();return e??t}function F(e,t){let o=null,r=()=>{o==null&&(o=requestAnimationFrame(()=>{o=null,t();}));};t();let n=new ResizeObserver(r);n.observe(e);let a=new MutationObserver(r);return a.observe(e,{childList:true,subtree:true}),()=>{o!=null&&cancelAnimationFrame(o),n.disconnect(),a.disconnect();}}var ie=".recharts-yAxis-tick-labels .recharts-cartesian-axis-tick-value";function $(e,t){let[o,r]=react.useState(0);return react.useLayoutEffect(()=>{let n=e.current;if(!n)return;let a=false,i=false,h=false,c=false,d=0,l=f=>{r(y=>y===f?y:f);};l(0);let _=()=>{process.env.NODE_ENV!=="production"&&!i&&!a&&d>5&&(i=true,console.warn(`[useLeftmostYAxisLabelOffset] Could not find "${ie}" \u2014 Recharts may have renamed its internals. Legend will fall back to flush alignment.`));},T=()=>{process.env.NODE_ENV!=="production"&&!c&&a&&(c=true,console.warn("[useLeftmostYAxisLabelOffset] Y-axis labels disappeared after a successful measurement \u2014 falling back to flush alignment. This may indicate a Recharts upgrade or an unexpected empty render."));},L=()=>{process.env.NODE_ENV!=="production"&&!h&&(h=true,console.warn(`[useLeftmostYAxisLabelOffset] Found "${ie}" but no label returned a finite bounding rect \u2014 Recharts' measurement contract may have changed. Legend will fall back to flush alignment.`));};return F(n,()=>{let f=n.querySelectorAll(ie);if(f.length===0){d+=1,a?T():_(),l(0);return}a=true;let y=n.getBoundingClientRect();if(t==="rtl"){let u=-1/0;for(let b of f){let v=b.getBoundingClientRect();v.width===0&&v.height===0||(u=Math.max(u,v.right));}if(!Number.isFinite(u)){L(),l(0);return}l(Math.max(0,y.right-u));return}let g=1/0;for(let u of f){let b=u.getBoundingClientRect();b.width===0&&b.height===0||(g=Math.min(g,b.left));}if(!Number.isFinite(g)){L(),l(0);return}l(Math.max(0,g-y.left));})},[e,t]),o}var Ne=".recharts-cartesian-grid";function se(e){let[t,o]=react.useState(0);return react.useLayoutEffect(()=>{let r=e.current;if(!r)return;let n=false,a=false,i=0;return F(r,()=>{let c=r.querySelector(Ne);if(!c){i+=1,process.env.NODE_ENV!=="production"&&!a&&!n&&i>5&&(a=true,console.warn(`[usePlotAreaWidth] Could not find "${Ne}" \u2014 Recharts may have renamed its internals. Bar layouts will fall back to requested sizes.`));return}n=true;let d=c.getBoundingClientRect().width;o(l=>Math.abs(l-d)<.5?l:d);})},[e]),t}var le=".recharts-yAxis-tick-labels .recharts-cartesian-axis-tick-value";function U(e,t){let[o,r]=react.useState(0);return react.useLayoutEffect(()=>{let n=e.current;if(!n)return;let a=false,i=false,h=false,c=false,d=0,l=f=>{r(y=>y===f?y:f);};l(0);let _=()=>{process.env.NODE_ENV!=="production"&&!i&&!a&&d>5&&(i=true,console.warn(`[useYAxisLeftOverflow] Could not find "${le}" \u2014 Recharts may have renamed its internals. The focus outline will not extend over overflowing axis labels.`));},T=()=>{process.env.NODE_ENV!=="production"&&!c&&a&&(c=true,console.warn("[useYAxisLeftOverflow] Y-axis labels disappeared after a successful measurement \u2014 focus outline will no longer extend over overflowing labels. This may indicate a Recharts upgrade or an unexpected empty render."));},L=()=>{process.env.NODE_ENV!=="production"&&!h&&(h=true,console.warn(`[useYAxisLeftOverflow] Found "${le}" but no label returned a finite bounding rect \u2014 Recharts' measurement contract may have changed. The focus outline will not extend over overflowing axis labels.`));};return F(n,()=>{let f=n.querySelectorAll(le);if(f.length===0){d+=1,a?T():_(),l(0);return}a=true;let y=n.getBoundingClientRect();if(t==="rtl"){let u=-1/0;for(let b of f){let v=b.getBoundingClientRect();v.width===0&&v.height===0||(u=Math.max(u,v.right));}if(!Number.isFinite(u)){L(),l(0);return}l(Math.max(0,Math.ceil(u-y.right)));return}let g=1/0;for(let u of f){let b=u.getBoundingClientRect();b.width===0&&b.height===0||(g=Math.min(g,b.left));}if(!Number.isFinite(g)){L(),l(0);return}l(Math.max(0,Math.ceil(y.left-g)));})},[e,t]),o}var ce="_1o5hr0b0 _1yep5z6dy",Se="_1yep5z69r _1yep5z69s _1yep5z69t";var J=[tokens.themeVars.color.support.info.medium,tokens.themeVars.color.support.success.medium,tokens.themeVars.color.support.warning.medium,tokens.themeVars.color.support.error.medium],mt=12,dt=2,ft=4,G=1,ht={width:1,height:1},yt=({plotWidth:e,categoryCount:t,barCount:o,barSize:r,barGap:n})=>{if(e<=0||t<=0||o<=0)return {barSize:r,barGap:n};let a=e/t-G,i=o-1;if(o*r+i*n<=a)return {barSize:r,barGap:n};let c=o*r+i*G;if(i>0&&c<=a){let l=Math.floor((a-o*r)/i);return {barSize:r,barGap:Math.max(G,l)}}let d=Math.floor((a-i*G)/o);return {barSize:Math.max(1,d),barGap:G}},Te=(e,t)=>e.color??J[t%J.length],Ct=e=>{if(process.env.NODE_ENV==="production")return;let t=e.length>J.length,o=e.some(r=>r.color==null);t&&o&&core.devWarnOnce("BarChart:paletteWrap",`[BarChart] More than ${J.length} bar series with default colors \u2014 colors will repeat and series may become visually indistinguishable. Set an explicit \`color\` on each bar.`);},ue=(e,t)=>{if(e.stackId!=null)return e.stackId;if(t==="stacked")return "default"},bt=(e,t)=>{let o=new Map,r=new Map;for(let[n,a]of e.entries()){let i=ue(a,t);i==null?o.set(n,true):r.set(i,n);}for(let n of r.values())o.set(n,true);return o},Re=false,gt=({offset:e,xAxis:t})=>{process.env.NODE_ENV!=="production"&&!Re&&(!e||!t||typeof t.scale?.domain!="function")&&(Re=true,console.warn("[BarChart] Recharts passed an unexpected shape to verticalCoordinatesGenerator (missing offset/xAxis/scale.domain). Vertical grid lines will not render \u2014 likely caused by a Recharts upgrade."));let o=t?.scale?.domain?.(),r=Array.isArray(o)?o.length:0,n=e?.width??0;if(r===0||n===0)return [];let a=e?.left??0,i=n/r;return Array.from({length:r},(h,c)=>a+i*(c+1))};function vt({data:e,bars:t,xAxisDataKey:o,variant:r="default",barSize:n=mt,barGap:a=ft,barRadius:i=dt,width:h="100%",height:c=300,showTooltip:d=true,showLegend:l=false,showGrid:_=true,showXAxis:T=true,showYAxis:L=true,numberFormatterProps:N,className:f,style:y,dir:g,"aria-label":u,"aria-labelledby":b,"aria-describedby":v,"aria-details":k,...x}){Ct(t);let p=M(g),m=p==="rtl",z=react.useRef(null),j=$(z,p),C=se(z),w=U(z,p),Y=core.useNumberFormatter(N),W=react.useMemo(()=>N?s=>Y.format(s):void 0,[N,Y]),te=react.useCallback(s=>jsxRuntime.jsx(B,{...s,numberFormatterProps:N}),[N]),K=react.useMemo(()=>bt(t,r),[t,r]),q=react.useMemo(()=>{let s=new Set,A=0;for(let fe of t){let H=ue(fe,r);H==null?A+=1:s.add(H);}return A+s.size},[t,r]),{barSize:re,barGap:oe}=yt({plotWidth:C,categoryCount:e.length,barCount:q,barSize:n,barGap:a});return jsxRuntime.jsx(I,{...x,rootClassName:core.classNames("BaselineUI-BarChart",Se),className:f,style:y,width:h,height:c,variant:r,dir:p,legend:l?jsxRuntime.jsx(O,{series:t,resolveColor:Te,paddingInlineStart:j}):null,surfaceRef:z,surfaceStyle:{"--chart-focus-left-overflow":m?"0px":`${w}px`,"--chart-focus-right-overflow":m?`${w}px`:"0px"},children:jsxRuntime.jsx(recharts.ResponsiveContainer,{width:"100%",height:"100%",initialDimension:ht,children:jsxRuntime.jsxs(recharts.BarChart,{"aria-describedby":v,"aria-details":k,"aria-label":u,"aria-labelledby":b,accessibilityLayer:true,barGap:oe,data:e,children:[_?jsxRuntime.jsx(recharts.CartesianGrid,{stroke:tokens.themeVars.color.border.strong,strokeDasharray:"3 3",verticalCoordinatesGenerator:gt}):null,T?jsxRuntime.jsx(recharts.XAxis,{dataKey:o,reversed:m,stroke:tokens.themeVars.color.border.inverse,tick:{className:ce}}):null,L?jsxRuntime.jsx(recharts.YAxis,{orientation:m?"right":"left",stroke:tokens.themeVars.color.border.inverse,tick:{className:ce},tickFormatter:W}):null,d?jsxRuntime.jsx(recharts.Tooltip,{content:te,cursor:{fill:tokens.themeVars.color.background.overlay.interactive}}):null,t.map((s,A)=>{let H=K.get(A)??false?[i,i,0,0]:[0,0,0,0];return jsxRuntime.jsx(recharts.Bar,{barSize:re,dataKey:s.dataKey,fill:Te(s,A),name:s.name??s.dataKey,radius:H,stackId:ue(s,r)},s.dataKey)})]})})})}var me="_1ojkdm40 _1yep5z6dy",Pe="_1yep5z69r _1yep5z69s _1yep5z69t";var Q=[tokens.themeVars.color.support.info.medium,tokens.themeVars.color.support.success.medium,tokens.themeVars.color.support.warning.medium,tokens.themeVars.color.support.error.medium],Z={width:40,height:20,strokeWidth:1,margin:{top:1,right:1,bottom:1,left:1}},It={width:1,height:1},de=(e,t)=>e.color??Q[t%Q.length],Ot=e=>{if(process.env.NODE_ENV==="production")return;let t=e.length>Q.length,o=e.some(r=>r.color==null);t&&o&&core.devWarnOnce("LineChart:paletteWrap",`[LineChart] More than ${Q.length} line series with default colors \u2014 colors will repeat and series may become visually indistinguishable. Set an explicit \`color\` on each line.`);};function Bt({data:e,lines:t,xAxisDataKey:o,variant:r="default",width:n,height:a,showTooltip:i,showLegend:h=false,showGrid:c,showXAxis:d,showYAxis:l,numberFormatterProps:_,className:T,style:L,dir:N,"aria-label":f,"aria-labelledby":y,"aria-describedby":g,"aria-details":u,...b}){Ot(t);let v=M(N),k=v==="rtl",x=r==="sparkline",p=!!(f||y),m=n??(x?Z.width:"100%"),z=a??(x?Z.height:300),j=i??!x,C=c??!x,w=d??!x,Y=l??!x,W=react.useRef(null),te=$(W,v),K=U(W,v),q=core.useNumberFormatter(_),re=react.useMemo(()=>_?s=>q.format(s):void 0,[_,q]),oe=react.useCallback(s=>jsxRuntime.jsx(B,{...s,numberFormatterProps:_}),[_]);return jsxRuntime.jsx(I,{...b,rootClassName:core.classNames("BaselineUI-LineChart",Pe),className:T,style:L,width:m,height:z,variant:r,dir:v,legend:h?jsxRuntime.jsx(O,{series:t,resolveColor:de,paddingInlineStart:te}):null,surfaceRef:W,surfaceStyle:{"--chart-focus-left-overflow":k?"0px":`${K}px`,"--chart-focus-right-overflow":k?`${K}px`:"0px"},children:jsxRuntime.jsx(recharts.ResponsiveContainer,{width:"100%",height:"100%",initialDimension:It,children:jsxRuntime.jsxs(recharts.LineChart,{"aria-describedby":g,"aria-details":u,"aria-label":f,"aria-labelledby":y,accessibilityLayer:!x,role:x&&p?"img":void 0,data:e,margin:x?Z.margin:void 0,children:[C?jsxRuntime.jsx(recharts.CartesianGrid,{stroke:tokens.themeVars.color.border.strong,strokeDasharray:"3 3"}):null,w?jsxRuntime.jsx(recharts.XAxis,{dataKey:o,reversed:k,stroke:tokens.themeVars.color.border.inverse,tick:{className:me}}):null,Y?jsxRuntime.jsx(recharts.YAxis,{orientation:k?"right":"left",stroke:tokens.themeVars.color.border.inverse,tick:{className:me},tickFormatter:re}):null,j?jsxRuntime.jsx(recharts.Tooltip,{content:oe,cursor:{stroke:tokens.themeVars.color.border.interactive.enabled,strokeDasharray:"3 3"}}):null,t.map((s,A)=>jsxRuntime.jsx(recharts.Line,{activeDot:x?false:{r:4,strokeWidth:2,stroke:tokens.themeVars.color.background.positive.subtle,fill:de(s,A),style:{filter:"drop-shadow(0 0 4px rgba(0,0,0,0.4))"}},dataKey:s.dataKey,dot:s.dot??false,name:s.name??s.dataKey,stroke:de(s,A),strokeWidth:s.strokeWidth??(x?Z.strokeWidth:2),type:s.type??"monotone"},s.dataKey))]})})})}var Ee="_1yep5z69o _1yep5z69p _1yep5z69q",ke="_1sy8dya1",Ae="_1sy8dya0 _1yep5z6dy";var ee=[tokens.themeVars.color.support.info.medium,tokens.themeVars.color.support.success.medium,tokens.themeVars.color.support.error.medium,tokens.themeVars.color.support.warning.medium],Ht=90,Xt=-270,Jt=.05,Zt={width:1,height:1},Ie=(e,t)=>e.color??ee[t%ee.length],Qt=e=>{if(process.env.NODE_ENV==="production")return;let t=e.length>ee.length,o=e.some(r=>r.color==null);t&&o&&core.devWarnOnce("PieChart:paletteWrap",`[PieChart] More than ${ee.length} slices with default colors \u2014 colors will repeat and slices may become visually indistinguishable. Set an explicit \`color\` on each slice.`);},er=({cx:e,cy:t,midAngle:o,innerRadius:r=0,outerRadius:n=0,percent:a=0})=>{if(e==null||t==null||o==null||a<Jt)return null;let i=r+(n-r)*.65,h=-o*(Math.PI/180),c=e+i*Math.cos(h),d=t+i*Math.sin(h);return jsxRuntime.jsx("text",{className:Ae,x:c,y:d,textAnchor:"middle",dominantBaseline:"central",children:jsxRuntime.jsx(core.NumberFormat,{value:a,style:"percent",maximumFractionDigits:0})})},tr={style:"percent",maximumFractionDigits:0},rr=3,or=({cx:e,cy:t,innerRadius:o,outerRadius:r=0,startAngle:n,endAngle:a,fill:i})=>jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx(recharts.Sector,{cx:e,cy:t,innerRadius:o,outerRadius:r+rr,startAngle:n,endAngle:a,fill:i}),jsxRuntime.jsx(recharts.Sector,{cx:e,cy:t,innerRadius:o,outerRadius:r,startAngle:n,endAngle:a,fill:i,stroke:tokens.themeVars.color.focused.inset,strokeWidth:1})]}),Oe=new WeakSet;function nr({data:e,width:t="100%",height:o=300,innerRadius:r,outerRadius:n,showTooltip:a=true,showLegend:i=true,showLabels:h=true,className:c,style:d,dir:l,"aria-label":_,"aria-labelledby":T,"aria-describedby":L,"aria-details":N,...f}){Qt(e);let y=M(l),g=react.useRef(null),{sortedData:u,sliceData:b}=react.useMemo(()=>{let p=e.filter(C=>Number.isFinite(C.value)&&C.value>=0);process.env.NODE_ENV!=="production"&&p.length!==e.length&&core.devWarnOnce("PieChart:invalidValues","[PieChart] Slices with a negative or non-finite `value` were dropped. PieChart expects every `value` to be a finite number >= 0.");let m=[...p].sort((C,w)=>w.value-C.value),z=m.reduce((C,w)=>C+w.value,0);process.env.NODE_ENV!=="production"&&z<=0&&e.length>0&&!Oe.has(e)&&(Oe.add(e),console.warn("[PieChart] Received data with a non-positive total. The chart will render empty."));let j=m.map(C=>({...C,fraction:z>0?C.value/z:0}));return {sortedData:m,sliceData:j}},[e]);react.useEffect(()=>{let p=g.current;if(!p)return;let m=()=>{let C=p.querySelector(".recharts-active-shape")?.parentElement,w=C?.parentElement;C&&w&&w.lastElementChild!==C&&w.append(C);};m();let z=new MutationObserver(m);return z.observe(p,{subtree:true,attributes:true,attributeFilter:["class"]}),()=>{z.disconnect();}},[]);let v=n??"100%",k=r??0,x=u.map((p,m)=>({dataKey:`${p.name}-${m}`,name:p.name}));return jsxRuntime.jsx(I,{...f,rootClassName:core.classNames("BaselineUI-PieChart",Ee),className:c,style:d,width:t,height:o,variant:"default",dir:y,legend:i?jsxRuntime.jsx(O,{series:x,resolveColor:(p,m)=>Ie(u[m],m)}):null,surfaceRef:g,children:jsxRuntime.jsx(recharts.ResponsiveContainer,{width:"100%",height:"100%",initialDimension:Zt,children:jsxRuntime.jsxs(recharts.PieChart,{"aria-describedby":L,"aria-details":N,"aria-label":_,"aria-labelledby":T,accessibilityLayer:true,children:[a?jsxRuntime.jsx(recharts.Tooltip,{content:p=>jsxRuntime.jsx(B,{...p,numberFormatterProps:tr})}):null,jsxRuntime.jsx(recharts.Pie,{data:b,dataKey:"fraction",nameKey:"name",innerRadius:k,outerRadius:v,startAngle:Ht,endAngle:Xt,isAnimationActive:false,label:h?er:false,labelLine:false,stroke:tokens.themeVars.color.focused.inset,strokeWidth:1,activeShape:or,rootTabIndex:-1,children:u.map((p,m)=>jsxRuntime.jsx(recharts.Cell,{className:ke,fill:Ie(p,m)},`${p.name}-${m}`))})]})})})}exports.BarChart=vt;exports.LineChart=Bt;exports.PieChart=nr;
|
package/dist/index.mjs
CHANGED
|
@@ -7,4 +7,4 @@ import {useNumberFormatter,classNames,devWarnOnce,useLocale,Text,NumberFormat}fr
|
|
|
7
7
|
* This notice may not be removed from this file.
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
var ue="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z6jw _1yep5z6jx _1yep5z6jy",me="ofrh9o1 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6lu",fe="_1yep5z6jb _1yep5z6jc _1yep5z6jd _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z69f _1yep5z69g _1yep5z69h",de="ofrh9o2 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6m0",he="ofrh9o0",ye="_1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z69f _1yep5z69g _1yep5z69h _1yep5z6mf _1yep5z6mh _1yep5z6g9 _1yep5z6hg _1yep5z6d7",Ce="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z69f _1yep5z69g _1yep5z69h",ge="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z69c _1yep5z69d _1yep5z69e",_e="ofrh9o3 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6m0";function E({rootClassName:e,className:t,style:o,width:r,height:n,variant:a,dir:i,legend:d,surfaceRef:u,surfaceStyle:m,children:p,..._}){return jsxs("div",{..._,className:classNames(ue,e,t),"data-variant":a,dir:i,style:{width:r,height:n,...o},children:[d,jsx("div",{ref:u,className:classNames(he,"BaselineUI-Chart-Surface"),style:m,children:p})]})}function k({series:e,resolveColor:t,paddingInlineStart:o}){return jsx("ul",{className:`${me} BaselineUI-Chart-Legend`,style:o==null?void 0:{paddingInlineStart:o},children:e.map((r,n)=>jsxs("li",{className:`${fe} BaselineUI-Chart-LegendItem`,children:[jsx("span",{className:`${de} BaselineUI-Chart-LegendSwatch`,style:{backgroundColor:t(r,n)}}),jsx(Text,{type:"label",size:"sm",children:r.name??r.dataKey})]},r.dataKey))})}var Fe=e=>{if(typeof e=="number")return Number.isFinite(e)?e:null;if(typeof e=="string"&&e.trim()!==""){let t=Number(e);return Number.isFinite(t)?t:null}return null},Ve=(e,t)=>{if(!t)return e;let o=Fe(e);return o==null?(process.env.NODE_ENV!=="production"&&e!=null&&devWarnOnce("ChartTooltip:nonNumeric",`[ChartTooltip] \`numberFormatterProps\` was provided but a non-numeric value was received (got ${JSON.stringify(e)}). The value will render unformatted.`),e):jsx(NumberFormat,{value:o,...t})};function A({active:e,payload:t,label:o,numberFormatterProps:r}){return !e||!t?.length?null:jsxs("div",{className:`${ye} BaselineUI-Chart-Tooltip`,children:[o==null?null:jsx(Text,{elementType:"div",type:"label",size:"sm",children:String(o)}),jsx("div",{className:ge,children:t.map(n=>jsxs("div",{className:`${Ce} BaselineUI-Chart-TooltipItem`,children:[jsx("span",{className:`${_e} BaselineUI-Chart-TooltipSwatch`,style:{backgroundColor:n.color}}),jsxs(Text,{type:"label",size:"sm",children:[n.name,": ",Ve(n.value,r)]})]},String(n.dataKey)))})]})}function D(e){let{direction:t}=useLocale();return e??t}function B(e,t){let o=null,r=()=>{o==null&&(o=requestAnimationFrame(()=>{o=null,t();}));};t();let n=new ResizeObserver(r);n.observe(e);let a=new MutationObserver(r);return a.observe(e,{childList:true,subtree:true}),()=>{o!=null&&cancelAnimationFrame(o),n.disconnect(),a.disconnect();}}var re=".recharts-yAxis-tick-labels .recharts-cartesian-axis-tick-value";function F(e,t){let[o,r]=useState(0);return useLayoutEffect(()=>{let n=e.current;if(!n)return;let a=false,i=false,d=false,u=false,m=0,p=h=>{r(f=>f===h?f:h);};p(0);let _=()=>{process.env.NODE_ENV!=="production"&&!i&&!a&&m>5&&(i=true,console.warn(`[useLeftmostYAxisLabelOffset] Could not find "${re}" \u2014 Recharts may have renamed its internals. Legend will fall back to flush alignment.`));},N=()=>{process.env.NODE_ENV!=="production"&&!u&&a&&(u=true,console.warn("[useLeftmostYAxisLabelOffset] Y-axis labels disappeared after a successful measurement \u2014 falling back to flush alignment. This may indicate a Recharts upgrade or an unexpected empty render."));},z=()=>{process.env.NODE_ENV!=="production"&&!d&&(d=true,console.warn(`[useLeftmostYAxisLabelOffset] Found "${re}" but no label returned a finite bounding rect \u2014 Recharts' measurement contract may have changed. Legend will fall back to flush alignment.`));};return B(n,()=>{let h=n.querySelectorAll(re);if(h.length===0){m+=1,a?N():_(),p(0);return}a=true;let f=n.getBoundingClientRect();if(t==="rtl"){let c=-1/0;for(let s of h){let l=s.getBoundingClientRect();l.width===0&&l.height===0||(c=Math.max(c,l.right));}if(!Number.isFinite(c)){z(),p(0);return}p(Math.max(0,f.right-c));return}let y=1/0;for(let c of h){let s=c.getBoundingClientRect();s.width===0&&s.height===0||(y=Math.min(y,s.left));}if(!Number.isFinite(y)){z(),p(0);return}p(Math.max(0,y-f.left));})},[e,t]),o}var xe=".recharts-cartesian-grid";function oe(e){let[t,o]=useState(0);return useLayoutEffect(()=>{let r=e.current;if(!r)return;let n=false,a=false,i=0;return B(r,()=>{let u=r.querySelector(xe);if(!u){i+=1,process.env.NODE_ENV!=="production"&&!a&&!n&&i>5&&(a=true,console.warn(`[usePlotAreaWidth] Could not find "${xe}" \u2014 Recharts may have renamed its internals. Bar layouts will fall back to requested sizes.`));return}n=true;let m=u.getBoundingClientRect().width;o(p=>Math.abs(p-m)<.5?p:m);})},[e]),t}var ne=".recharts-yAxis-tick-labels .recharts-cartesian-axis-tick-value";function V(e,t){let[o,r]=useState(0);return useLayoutEffect(()=>{let n=e.current;if(!n)return;let a=false,i=false,d=false,u=false,m=0,p=h=>{r(f=>f===h?f:h);};p(0);let _=()=>{process.env.NODE_ENV!=="production"&&!i&&!a&&m>5&&(i=true,console.warn(`[useYAxisLeftOverflow] Could not find "${ne}" \u2014 Recharts may have renamed its internals. The focus outline will not extend over overflowing axis labels.`));},N=()=>{process.env.NODE_ENV!=="production"&&!u&&a&&(u=true,console.warn("[useYAxisLeftOverflow] Y-axis labels disappeared after a successful measurement \u2014 focus outline will no longer extend over overflowing labels. This may indicate a Recharts upgrade or an unexpected empty render."));},z=()=>{process.env.NODE_ENV!=="production"&&!d&&(d=true,console.warn(`[useYAxisLeftOverflow] Found "${ne}" but no label returned a finite bounding rect \u2014 Recharts' measurement contract may have changed. The focus outline will not extend over overflowing axis labels.`));};return B(n,()=>{let h=n.querySelectorAll(ne);if(h.length===0){m+=1,a?N():_(),p(0);return}a=true;let f=n.getBoundingClientRect();if(t==="rtl"){let c=-1/0;for(let s of h){let l=s.getBoundingClientRect();l.width===0&&l.height===0||(c=Math.max(c,l.right));}if(!Number.isFinite(c)){z(),p(0);return}p(Math.max(0,Math.ceil(c-f.right)));return}let y=1/0;for(let c of h){let s=c.getBoundingClientRect();s.width===0&&s.height===0||(y=Math.min(y,s.left));}if(!Number.isFinite(y)){z(),p(0);return}p(Math.max(0,Math.ceil(f.left-y)));})},[e,t]),o}var ae="_1o5hr0b0 _1yep5z6dy",ze="_1yep5z69r _1yep5z69s _1yep5z69t";var K=[themeVars.color.support.info.medium,themeVars.color.support.success.medium,themeVars.color.support.warning.medium,themeVars.color.support.error.medium],st=12,lt=2,ct=4,W=1,pt={width:1,height:1},ut=({plotWidth:e,categoryCount:t,barCount:o,barSize:r,barGap:n})=>{if(e<=0||t<=0||o<=0)return {barSize:r,barGap:n};let a=e/t-W,i=o-1;if(o*r+i*n<=a)return {barSize:r,barGap:n};let u=o*r+i*W;if(i>0&&u<=a){let p=Math.floor((a-o*r)/i);return {barSize:r,barGap:Math.max(W,p)}}let m=Math.floor((a-i*W)/o);return {barSize:Math.max(1,m),barGap:W}},we=(e,t)=>e.color??K[t%K.length],mt=e=>{if(process.env.NODE_ENV==="production")return;let t=e.length>K.length,o=e.some(r=>r.color==null);t&&o&&devWarnOnce("BarChart:paletteWrap",`[BarChart] More than ${K.length} bar series with default colors \u2014 colors will repeat and series may become visually indistinguishable. Set an explicit \`color\` on each bar.`);},se=(e,t)=>{if(e.stackId!=null)return e.stackId;if(t==="stacked")return "default"},ft=(e,t)=>{let o=new Map,r=new Map;for(let[n,a]of e.entries()){let i=se(a,t);i==null?o.set(n,true):r.set(i,n);}for(let n of r.values())o.set(n,true);return o},Le=false,dt=({offset:e,xAxis:t})=>{process.env.NODE_ENV!=="production"&&!Le&&(!e||!t||typeof t.scale?.domain!="function")&&(Le=true,console.warn("[BarChart] Recharts passed an unexpected shape to verticalCoordinatesGenerator (missing offset/xAxis/scale.domain). Vertical grid lines will not render \u2014 likely caused by a Recharts upgrade."));let o=t?.scale?.domain?.(),r=Array.isArray(o)?o.length:0,n=e?.width??0;if(r===0||n===0)return [];let a=e?.left??0,i=n/r;return Array.from({length:r},(d,u)=>a+i*(u+1))};function ht({data:e,bars:t,xAxisDataKey:o,variant:r="default",barSize:n=st,barGap:a=ct,barRadius:i=lt,width:d="100%",height:u=300,showTooltip:m=true,showLegend:p=false,showGrid:_=true,showXAxis:N=true,showYAxis:z=true,numberFormatterProps:b,className:h,style:f,dir:y,...c}){mt(t);let s=D(y),l=s==="rtl",x=useRef(null),I=F(x,s),C=oe(x),w=V(x,s),O=useNumberFormatter(b),J=useMemo(()=>b?g=>O.format(g):void 0,[b,O]),$=useCallback(g=>jsx(A,{...g,numberFormatterProps:b}),[b]),U=useMemo(()=>ft(t,r),[t,r]),Z=useMemo(()=>{let g=new Set,j=0;for(let pe of t){let G=se(pe,r);G==null?j+=1:g.add(G);}return j+g.size},[t,r]),{barSize:Q,barGap:v}=ut({plotWidth:C,categoryCount:e.length,barCount:Z,barSize:n,barGap:a});return jsx(E,{...c,rootClassName:classNames("BaselineUI-BarChart",ze),className:h,style:f,width:d,height:u,variant:r,dir:s,legend:p?jsx(k,{series:t,resolveColor:we,paddingInlineStart:I}):null,surfaceRef:x,surfaceStyle:{"--chart-focus-left-overflow":l?"0px":`${w}px`,"--chart-focus-right-overflow":l?`${w}px`:"0px"},children:jsx(ResponsiveContainer,{width:"100%",height:"100%",initialDimension:pt,children:jsxs(BarChart,{accessibilityLayer:true,barGap:v,data:e,children:[_?jsx(CartesianGrid,{stroke:themeVars.color.border.strong,strokeDasharray:"3 3",verticalCoordinatesGenerator:dt}):null,N?jsx(XAxis,{dataKey:o,reversed:l,stroke:themeVars.color.border.inverse,tick:{className:ae}}):null,z?jsx(YAxis,{orientation:l?"right":"left",stroke:themeVars.color.border.inverse,tick:{className:ae},tickFormatter:J}):null,m?jsx(Tooltip,{content:$,cursor:{fill:themeVars.color.background.overlay.interactive}}):null,t.map((g,j)=>{let G=U.get(j)??false?[i,i,0,0]:[0,0,0,0];return jsx(Bar,{barSize:Q,dataKey:g.dataKey,fill:we(g,j),name:g.name??g.dataKey,radius:G,stackId:se(g,r)},g.dataKey)})]})})})}var le="_1ojkdm40 _1yep5z6dy",Ne="_1yep5z69r _1yep5z69s _1yep5z69t";var H=[themeVars.color.support.info.medium,themeVars.color.support.success.medium,themeVars.color.support.warning.medium,themeVars.color.support.error.medium],q={width:40,height:20,strokeWidth:1,margin:{top:1,right:1,bottom:1,left:1}},Pt={width:1,height:1},ce=(e,t)=>e.color??H[t%H.length],Et=e=>{if(process.env.NODE_ENV==="production")return;let t=e.length>H.length,o=e.some(r=>r.color==null);t&&o&&devWarnOnce("LineChart:paletteWrap",`[LineChart] More than ${H.length} line series with default colors \u2014 colors will repeat and series may become visually indistinguishable. Set an explicit \`color\` on each line.`);};function kt({data:e,lines:t,xAxisDataKey:o,variant:r="default",width:n,height:a,showTooltip:i,showLegend:d=false,showGrid:u,showXAxis:m,showYAxis:p,numberFormatterProps:_,className:N,style:z,dir:b,...h}){Et(t);let f=D(b),y=f==="rtl",c=r==="sparkline",s=n??(c?q.width:"100%"),l=a??(c?q.height:300),x=i??!c,I=u??!c,C=m??!c,w=p??!c,O=useRef(null),J=F(O,f),$=V(O,f),U=useNumberFormatter(_),Z=useMemo(()=>_?v=>U.format(v):void 0,[_,U]),Q=useCallback(v=>jsx(A,{...v,numberFormatterProps:_}),[_]);return jsx(E,{...h,rootClassName:classNames("BaselineUI-LineChart",Ne),className:N,style:z,width:s,height:l,variant:r,dir:f,legend:d?jsx(k,{series:t,resolveColor:ce,paddingInlineStart:J}):null,surfaceRef:O,surfaceStyle:{"--chart-focus-left-overflow":y?"0px":`${$}px`,"--chart-focus-right-overflow":y?`${$}px`:"0px"},children:jsx(ResponsiveContainer,{width:"100%",height:"100%",initialDimension:Pt,children:jsxs(LineChart,{accessibilityLayer:!c,data:e,margin:c?q.margin:void 0,children:[I?jsx(CartesianGrid,{stroke:themeVars.color.border.strong,strokeDasharray:"3 3"}):null,C?jsx(XAxis,{dataKey:o,reversed:y,stroke:themeVars.color.border.inverse,tick:{className:le}}):null,w?jsx(YAxis,{orientation:y?"right":"left",stroke:themeVars.color.border.inverse,tick:{className:le},tickFormatter:Z}):null,x?jsx(Tooltip,{content:Q,cursor:{stroke:themeVars.color.border.interactive.enabled,strokeDasharray:"3 3"}}):null,t.map((v,g)=>jsx(Line,{activeDot:c?false:{r:4,strokeWidth:2,stroke:themeVars.color.background.positive.subtle,fill:ce(v,g),style:{filter:"drop-shadow(0 0 4px rgba(0,0,0,0.4))"}},dataKey:v.dataKey,dot:v.dot??false,name:v.name??v.dataKey,stroke:ce(v,g),strokeWidth:v.strokeWidth??(c?q.strokeWidth:2),type:v.type??"monotone"},v.dataKey))]})})})}var Se="_1yep5z69o _1yep5z69p _1yep5z69q",Te="_1sy8dya1",Re="_1sy8dya0 _1yep5z6dy";var X=[themeVars.color.support.info.medium,themeVars.color.support.success.medium,themeVars.color.support.error.medium,themeVars.color.support.warning.medium],Gt=90,Yt=-270,Kt=.05,qt={width:1,height:1},Ee=(e,t)=>e.color??X[t%X.length],Ht=e=>{if(process.env.NODE_ENV==="production")return;let t=e.length>X.length,o=e.some(r=>r.color==null);t&&o&&devWarnOnce("PieChart:paletteWrap",`[PieChart] More than ${X.length} slices with default colors \u2014 colors will repeat and slices may become visually indistinguishable. Set an explicit \`color\` on each slice.`);},Xt=({cx:e,cy:t,midAngle:o,innerRadius:r=0,outerRadius:n=0,percent:a=0})=>{if(e==null||t==null||o==null||a<Kt)return null;let i=r+(n-r)*.65,d=-o*(Math.PI/180),u=e+i*Math.cos(d),m=t+i*Math.sin(d);return jsx("text",{className:Re,x:u,y:m,textAnchor:"middle",dominantBaseline:"central",children:jsx(NumberFormat,{value:a,style:"percent",maximumFractionDigits:0})})},Jt={style:"percent",maximumFractionDigits:0},Zt=3,Qt=({cx:e,cy:t,innerRadius:o,outerRadius:r=0,startAngle:n,endAngle:a,fill:i})=>jsxs("g",{children:[jsx(Sector,{cx:e,cy:t,innerRadius:o,outerRadius:r+Zt,startAngle:n,endAngle:a,fill:i}),jsx(Sector,{cx:e,cy:t,innerRadius:o,outerRadius:r,startAngle:n,endAngle:a,fill:i,stroke:themeVars.color.focused.inset,strokeWidth:1})]}),ke=new WeakSet;function er({data:e,width:t="100%",height:o=300,innerRadius:r,outerRadius:n,showTooltip:a=true,showLegend:i=true,showLabels:d=true,className:u,style:m,dir:p,..._}){Ht(e);let N=D(p),z=useRef(null),{sortedData:b,sliceData:h}=useMemo(()=>{let s=e.filter(C=>C.value>=0);process.env.NODE_ENV!=="production"&&s.length!==e.length&&console.warn("[PieChart] Negative slice values were dropped. PieChart expects all `value`s to be >= 0.");let l=s.toSorted((C,w)=>w.value-C.value),x=l.reduce((C,w)=>C+w.value,0);process.env.NODE_ENV!=="production"&&x<=0&&e.length>0&&!ke.has(e)&&(ke.add(e),console.warn("[PieChart] Received data with a non-positive total. The chart will render empty."));let I=l.map(C=>({...C,fraction:x>0?C.value/x:0}));return {sortedData:l,sliceData:I}},[e]);useEffect(()=>{let s=z.current;if(!s)return;let l=()=>{let C=s.querySelector(".recharts-active-shape")?.parentElement,w=C?.parentElement;C&&w&&w.lastElementChild!==C&&w.append(C);};l();let x=new MutationObserver(l);return x.observe(s,{subtree:true,attributes:true,attributeFilter:["class"]}),()=>{x.disconnect();}},[]);let f=n??"100%",y=r??0,c=b.map((s,l)=>({dataKey:`${s.name}-${l}`,name:s.name}));return jsx(E,{..._,rootClassName:classNames("BaselineUI-PieChart",Se),className:u,style:m,width:t,height:o,variant:"default",dir:N,legend:i?jsx(k,{series:c,resolveColor:(s,l)=>Ee(b[l],l)}):null,surfaceRef:z,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",initialDimension:qt,children:jsxs(PieChart,{accessibilityLayer:true,children:[a?jsx(Tooltip,{content:s=>jsx(A,{...s,numberFormatterProps:Jt})}):null,jsx(Pie,{data:h,dataKey:"fraction",nameKey:"name",innerRadius:y,outerRadius:f,startAngle:Gt,endAngle:Yt,isAnimationActive:false,label:d?Xt:false,labelLine:false,stroke:themeVars.color.focused.inset,strokeWidth:1,activeShape:Qt,rootTabIndex:-1,children:b.map((s,l)=>jsx(Cell,{className:Te,fill:Ee(s,l)},`${s.name}-${l}`))})]})})})}export{ht as BarChart,kt as LineChart,er as PieChart};
|
|
10
|
+
var he="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z6jw _1yep5z6jx _1yep5z6jy",ye="ofrh9o1 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6lu",Ce="_1yep5z6jb _1yep5z6jc _1yep5z6jd _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z69f _1yep5z69g _1yep5z69h",be="ofrh9o2 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6m0",ge="ofrh9o0",ve="_1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z69f _1yep5z69g _1yep5z69h _1yep5z6mf _1yep5z6mh _1yep5z6g9 _1yep5z6hg _1yep5z6d7",_e="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z69f _1yep5z69g _1yep5z69h",xe="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z69c _1yep5z69d _1yep5z69e",ze="ofrh9o3 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6m0";function I({rootClassName:e,className:t,style:o,width:r,height:n,variant:a,dir:i,legend:h,surfaceRef:c,surfaceStyle:d,children:l,..._}){return jsxs("div",{..._,className:classNames(he,e,t),"data-variant":a,dir:i,style:{width:r,height:n,...o},children:[h,jsx("div",{ref:c,className:classNames(ge,"BaselineUI-Chart-Surface"),style:d,children:l})]})}function O({series:e,resolveColor:t,paddingInlineStart:o}){return jsx("ul",{className:`${ye} BaselineUI-Chart-Legend`,style:o==null?void 0:{paddingInlineStart:o},children:e.map((r,n)=>jsxs("li",{className:`${Ce} BaselineUI-Chart-LegendItem`,children:[jsx("span",{className:`${be} BaselineUI-Chart-LegendSwatch`,style:{backgroundColor:t(r,n)}}),jsx(Text,{type:"label",size:"sm",children:r.name??r.dataKey})]},r.dataKey))})}var Ge=e=>{if(typeof e=="number")return Number.isFinite(e)?e:null;if(typeof e=="string"&&e.trim()!==""){let t=Number(e);return Number.isFinite(t)?t:null}return null},Ye=(e,t)=>{if(!t)return e;let o=Ge(e);return o==null?(process.env.NODE_ENV!=="production"&&e!=null&&devWarnOnce("ChartTooltip:nonNumeric",`[ChartTooltip] \`numberFormatterProps\` was provided but a non-numeric value was received (got ${JSON.stringify(e)}). The value will render unformatted.`),e):jsx(NumberFormat,{value:o,...t})};function B({active:e,payload:t,label:o,numberFormatterProps:r}){return !e||!t?.length?null:jsxs("div",{className:`${ve} BaselineUI-Chart-Tooltip`,children:[o==null?null:jsx(Text,{elementType:"div",type:"label",size:"sm",children:String(o)}),jsx("div",{className:xe,children:t.map(n=>jsxs("div",{className:`${_e} BaselineUI-Chart-TooltipItem`,children:[jsx("span",{className:`${ze} BaselineUI-Chart-TooltipSwatch`,style:{backgroundColor:n.color}}),jsxs(Text,{type:"label",size:"sm",children:[n.name,": ",Ye(n.value,r)]})]},String(n.dataKey)))})]})}function M(e){let{direction:t}=useLocale();return e??t}function F(e,t){let o=null,r=()=>{o==null&&(o=requestAnimationFrame(()=>{o=null,t();}));};t();let n=new ResizeObserver(r);n.observe(e);let a=new MutationObserver(r);return a.observe(e,{childList:true,subtree:true}),()=>{o!=null&&cancelAnimationFrame(o),n.disconnect(),a.disconnect();}}var ie=".recharts-yAxis-tick-labels .recharts-cartesian-axis-tick-value";function $(e,t){let[o,r]=useState(0);return useLayoutEffect(()=>{let n=e.current;if(!n)return;let a=false,i=false,h=false,c=false,d=0,l=f=>{r(y=>y===f?y:f);};l(0);let _=()=>{process.env.NODE_ENV!=="production"&&!i&&!a&&d>5&&(i=true,console.warn(`[useLeftmostYAxisLabelOffset] Could not find "${ie}" \u2014 Recharts may have renamed its internals. Legend will fall back to flush alignment.`));},T=()=>{process.env.NODE_ENV!=="production"&&!c&&a&&(c=true,console.warn("[useLeftmostYAxisLabelOffset] Y-axis labels disappeared after a successful measurement \u2014 falling back to flush alignment. This may indicate a Recharts upgrade or an unexpected empty render."));},L=()=>{process.env.NODE_ENV!=="production"&&!h&&(h=true,console.warn(`[useLeftmostYAxisLabelOffset] Found "${ie}" but no label returned a finite bounding rect \u2014 Recharts' measurement contract may have changed. Legend will fall back to flush alignment.`));};return F(n,()=>{let f=n.querySelectorAll(ie);if(f.length===0){d+=1,a?T():_(),l(0);return}a=true;let y=n.getBoundingClientRect();if(t==="rtl"){let u=-1/0;for(let b of f){let v=b.getBoundingClientRect();v.width===0&&v.height===0||(u=Math.max(u,v.right));}if(!Number.isFinite(u)){L(),l(0);return}l(Math.max(0,y.right-u));return}let g=1/0;for(let u of f){let b=u.getBoundingClientRect();b.width===0&&b.height===0||(g=Math.min(g,b.left));}if(!Number.isFinite(g)){L(),l(0);return}l(Math.max(0,g-y.left));})},[e,t]),o}var Ne=".recharts-cartesian-grid";function se(e){let[t,o]=useState(0);return useLayoutEffect(()=>{let r=e.current;if(!r)return;let n=false,a=false,i=0;return F(r,()=>{let c=r.querySelector(Ne);if(!c){i+=1,process.env.NODE_ENV!=="production"&&!a&&!n&&i>5&&(a=true,console.warn(`[usePlotAreaWidth] Could not find "${Ne}" \u2014 Recharts may have renamed its internals. Bar layouts will fall back to requested sizes.`));return}n=true;let d=c.getBoundingClientRect().width;o(l=>Math.abs(l-d)<.5?l:d);})},[e]),t}var le=".recharts-yAxis-tick-labels .recharts-cartesian-axis-tick-value";function U(e,t){let[o,r]=useState(0);return useLayoutEffect(()=>{let n=e.current;if(!n)return;let a=false,i=false,h=false,c=false,d=0,l=f=>{r(y=>y===f?y:f);};l(0);let _=()=>{process.env.NODE_ENV!=="production"&&!i&&!a&&d>5&&(i=true,console.warn(`[useYAxisLeftOverflow] Could not find "${le}" \u2014 Recharts may have renamed its internals. The focus outline will not extend over overflowing axis labels.`));},T=()=>{process.env.NODE_ENV!=="production"&&!c&&a&&(c=true,console.warn("[useYAxisLeftOverflow] Y-axis labels disappeared after a successful measurement \u2014 focus outline will no longer extend over overflowing labels. This may indicate a Recharts upgrade or an unexpected empty render."));},L=()=>{process.env.NODE_ENV!=="production"&&!h&&(h=true,console.warn(`[useYAxisLeftOverflow] Found "${le}" but no label returned a finite bounding rect \u2014 Recharts' measurement contract may have changed. The focus outline will not extend over overflowing axis labels.`));};return F(n,()=>{let f=n.querySelectorAll(le);if(f.length===0){d+=1,a?T():_(),l(0);return}a=true;let y=n.getBoundingClientRect();if(t==="rtl"){let u=-1/0;for(let b of f){let v=b.getBoundingClientRect();v.width===0&&v.height===0||(u=Math.max(u,v.right));}if(!Number.isFinite(u)){L(),l(0);return}l(Math.max(0,Math.ceil(u-y.right)));return}let g=1/0;for(let u of f){let b=u.getBoundingClientRect();b.width===0&&b.height===0||(g=Math.min(g,b.left));}if(!Number.isFinite(g)){L(),l(0);return}l(Math.max(0,Math.ceil(y.left-g)));})},[e,t]),o}var ce="_1o5hr0b0 _1yep5z6dy",Se="_1yep5z69r _1yep5z69s _1yep5z69t";var J=[themeVars.color.support.info.medium,themeVars.color.support.success.medium,themeVars.color.support.warning.medium,themeVars.color.support.error.medium],mt=12,dt=2,ft=4,G=1,ht={width:1,height:1},yt=({plotWidth:e,categoryCount:t,barCount:o,barSize:r,barGap:n})=>{if(e<=0||t<=0||o<=0)return {barSize:r,barGap:n};let a=e/t-G,i=o-1;if(o*r+i*n<=a)return {barSize:r,barGap:n};let c=o*r+i*G;if(i>0&&c<=a){let l=Math.floor((a-o*r)/i);return {barSize:r,barGap:Math.max(G,l)}}let d=Math.floor((a-i*G)/o);return {barSize:Math.max(1,d),barGap:G}},Te=(e,t)=>e.color??J[t%J.length],Ct=e=>{if(process.env.NODE_ENV==="production")return;let t=e.length>J.length,o=e.some(r=>r.color==null);t&&o&&devWarnOnce("BarChart:paletteWrap",`[BarChart] More than ${J.length} bar series with default colors \u2014 colors will repeat and series may become visually indistinguishable. Set an explicit \`color\` on each bar.`);},ue=(e,t)=>{if(e.stackId!=null)return e.stackId;if(t==="stacked")return "default"},bt=(e,t)=>{let o=new Map,r=new Map;for(let[n,a]of e.entries()){let i=ue(a,t);i==null?o.set(n,true):r.set(i,n);}for(let n of r.values())o.set(n,true);return o},Re=false,gt=({offset:e,xAxis:t})=>{process.env.NODE_ENV!=="production"&&!Re&&(!e||!t||typeof t.scale?.domain!="function")&&(Re=true,console.warn("[BarChart] Recharts passed an unexpected shape to verticalCoordinatesGenerator (missing offset/xAxis/scale.domain). Vertical grid lines will not render \u2014 likely caused by a Recharts upgrade."));let o=t?.scale?.domain?.(),r=Array.isArray(o)?o.length:0,n=e?.width??0;if(r===0||n===0)return [];let a=e?.left??0,i=n/r;return Array.from({length:r},(h,c)=>a+i*(c+1))};function vt({data:e,bars:t,xAxisDataKey:o,variant:r="default",barSize:n=mt,barGap:a=ft,barRadius:i=dt,width:h="100%",height:c=300,showTooltip:d=true,showLegend:l=false,showGrid:_=true,showXAxis:T=true,showYAxis:L=true,numberFormatterProps:N,className:f,style:y,dir:g,"aria-label":u,"aria-labelledby":b,"aria-describedby":v,"aria-details":k,...x}){Ct(t);let p=M(g),m=p==="rtl",z=useRef(null),j=$(z,p),C=se(z),w=U(z,p),Y=useNumberFormatter(N),W=useMemo(()=>N?s=>Y.format(s):void 0,[N,Y]),te=useCallback(s=>jsx(B,{...s,numberFormatterProps:N}),[N]),K=useMemo(()=>bt(t,r),[t,r]),q=useMemo(()=>{let s=new Set,A=0;for(let fe of t){let H=ue(fe,r);H==null?A+=1:s.add(H);}return A+s.size},[t,r]),{barSize:re,barGap:oe}=yt({plotWidth:C,categoryCount:e.length,barCount:q,barSize:n,barGap:a});return jsx(I,{...x,rootClassName:classNames("BaselineUI-BarChart",Se),className:f,style:y,width:h,height:c,variant:r,dir:p,legend:l?jsx(O,{series:t,resolveColor:Te,paddingInlineStart:j}):null,surfaceRef:z,surfaceStyle:{"--chart-focus-left-overflow":m?"0px":`${w}px`,"--chart-focus-right-overflow":m?`${w}px`:"0px"},children:jsx(ResponsiveContainer,{width:"100%",height:"100%",initialDimension:ht,children:jsxs(BarChart,{"aria-describedby":v,"aria-details":k,"aria-label":u,"aria-labelledby":b,accessibilityLayer:true,barGap:oe,data:e,children:[_?jsx(CartesianGrid,{stroke:themeVars.color.border.strong,strokeDasharray:"3 3",verticalCoordinatesGenerator:gt}):null,T?jsx(XAxis,{dataKey:o,reversed:m,stroke:themeVars.color.border.inverse,tick:{className:ce}}):null,L?jsx(YAxis,{orientation:m?"right":"left",stroke:themeVars.color.border.inverse,tick:{className:ce},tickFormatter:W}):null,d?jsx(Tooltip,{content:te,cursor:{fill:themeVars.color.background.overlay.interactive}}):null,t.map((s,A)=>{let H=K.get(A)??false?[i,i,0,0]:[0,0,0,0];return jsx(Bar,{barSize:re,dataKey:s.dataKey,fill:Te(s,A),name:s.name??s.dataKey,radius:H,stackId:ue(s,r)},s.dataKey)})]})})})}var me="_1ojkdm40 _1yep5z6dy",Pe="_1yep5z69r _1yep5z69s _1yep5z69t";var Q=[themeVars.color.support.info.medium,themeVars.color.support.success.medium,themeVars.color.support.warning.medium,themeVars.color.support.error.medium],Z={width:40,height:20,strokeWidth:1,margin:{top:1,right:1,bottom:1,left:1}},It={width:1,height:1},de=(e,t)=>e.color??Q[t%Q.length],Ot=e=>{if(process.env.NODE_ENV==="production")return;let t=e.length>Q.length,o=e.some(r=>r.color==null);t&&o&&devWarnOnce("LineChart:paletteWrap",`[LineChart] More than ${Q.length} line series with default colors \u2014 colors will repeat and series may become visually indistinguishable. Set an explicit \`color\` on each line.`);};function Bt({data:e,lines:t,xAxisDataKey:o,variant:r="default",width:n,height:a,showTooltip:i,showLegend:h=false,showGrid:c,showXAxis:d,showYAxis:l,numberFormatterProps:_,className:T,style:L,dir:N,"aria-label":f,"aria-labelledby":y,"aria-describedby":g,"aria-details":u,...b}){Ot(t);let v=M(N),k=v==="rtl",x=r==="sparkline",p=!!(f||y),m=n??(x?Z.width:"100%"),z=a??(x?Z.height:300),j=i??!x,C=c??!x,w=d??!x,Y=l??!x,W=useRef(null),te=$(W,v),K=U(W,v),q=useNumberFormatter(_),re=useMemo(()=>_?s=>q.format(s):void 0,[_,q]),oe=useCallback(s=>jsx(B,{...s,numberFormatterProps:_}),[_]);return jsx(I,{...b,rootClassName:classNames("BaselineUI-LineChart",Pe),className:T,style:L,width:m,height:z,variant:r,dir:v,legend:h?jsx(O,{series:t,resolveColor:de,paddingInlineStart:te}):null,surfaceRef:W,surfaceStyle:{"--chart-focus-left-overflow":k?"0px":`${K}px`,"--chart-focus-right-overflow":k?`${K}px`:"0px"},children:jsx(ResponsiveContainer,{width:"100%",height:"100%",initialDimension:It,children:jsxs(LineChart,{"aria-describedby":g,"aria-details":u,"aria-label":f,"aria-labelledby":y,accessibilityLayer:!x,role:x&&p?"img":void 0,data:e,margin:x?Z.margin:void 0,children:[C?jsx(CartesianGrid,{stroke:themeVars.color.border.strong,strokeDasharray:"3 3"}):null,w?jsx(XAxis,{dataKey:o,reversed:k,stroke:themeVars.color.border.inverse,tick:{className:me}}):null,Y?jsx(YAxis,{orientation:k?"right":"left",stroke:themeVars.color.border.inverse,tick:{className:me},tickFormatter:re}):null,j?jsx(Tooltip,{content:oe,cursor:{stroke:themeVars.color.border.interactive.enabled,strokeDasharray:"3 3"}}):null,t.map((s,A)=>jsx(Line,{activeDot:x?false:{r:4,strokeWidth:2,stroke:themeVars.color.background.positive.subtle,fill:de(s,A),style:{filter:"drop-shadow(0 0 4px rgba(0,0,0,0.4))"}},dataKey:s.dataKey,dot:s.dot??false,name:s.name??s.dataKey,stroke:de(s,A),strokeWidth:s.strokeWidth??(x?Z.strokeWidth:2),type:s.type??"monotone"},s.dataKey))]})})})}var Ee="_1yep5z69o _1yep5z69p _1yep5z69q",ke="_1sy8dya1",Ae="_1sy8dya0 _1yep5z6dy";var ee=[themeVars.color.support.info.medium,themeVars.color.support.success.medium,themeVars.color.support.error.medium,themeVars.color.support.warning.medium],Ht=90,Xt=-270,Jt=.05,Zt={width:1,height:1},Ie=(e,t)=>e.color??ee[t%ee.length],Qt=e=>{if(process.env.NODE_ENV==="production")return;let t=e.length>ee.length,o=e.some(r=>r.color==null);t&&o&&devWarnOnce("PieChart:paletteWrap",`[PieChart] More than ${ee.length} slices with default colors \u2014 colors will repeat and slices may become visually indistinguishable. Set an explicit \`color\` on each slice.`);},er=({cx:e,cy:t,midAngle:o,innerRadius:r=0,outerRadius:n=0,percent:a=0})=>{if(e==null||t==null||o==null||a<Jt)return null;let i=r+(n-r)*.65,h=-o*(Math.PI/180),c=e+i*Math.cos(h),d=t+i*Math.sin(h);return jsx("text",{className:Ae,x:c,y:d,textAnchor:"middle",dominantBaseline:"central",children:jsx(NumberFormat,{value:a,style:"percent",maximumFractionDigits:0})})},tr={style:"percent",maximumFractionDigits:0},rr=3,or=({cx:e,cy:t,innerRadius:o,outerRadius:r=0,startAngle:n,endAngle:a,fill:i})=>jsxs("g",{children:[jsx(Sector,{cx:e,cy:t,innerRadius:o,outerRadius:r+rr,startAngle:n,endAngle:a,fill:i}),jsx(Sector,{cx:e,cy:t,innerRadius:o,outerRadius:r,startAngle:n,endAngle:a,fill:i,stroke:themeVars.color.focused.inset,strokeWidth:1})]}),Oe=new WeakSet;function nr({data:e,width:t="100%",height:o=300,innerRadius:r,outerRadius:n,showTooltip:a=true,showLegend:i=true,showLabels:h=true,className:c,style:d,dir:l,"aria-label":_,"aria-labelledby":T,"aria-describedby":L,"aria-details":N,...f}){Qt(e);let y=M(l),g=useRef(null),{sortedData:u,sliceData:b}=useMemo(()=>{let p=e.filter(C=>Number.isFinite(C.value)&&C.value>=0);process.env.NODE_ENV!=="production"&&p.length!==e.length&&devWarnOnce("PieChart:invalidValues","[PieChart] Slices with a negative or non-finite `value` were dropped. PieChart expects every `value` to be a finite number >= 0.");let m=[...p].sort((C,w)=>w.value-C.value),z=m.reduce((C,w)=>C+w.value,0);process.env.NODE_ENV!=="production"&&z<=0&&e.length>0&&!Oe.has(e)&&(Oe.add(e),console.warn("[PieChart] Received data with a non-positive total. The chart will render empty."));let j=m.map(C=>({...C,fraction:z>0?C.value/z:0}));return {sortedData:m,sliceData:j}},[e]);useEffect(()=>{let p=g.current;if(!p)return;let m=()=>{let C=p.querySelector(".recharts-active-shape")?.parentElement,w=C?.parentElement;C&&w&&w.lastElementChild!==C&&w.append(C);};m();let z=new MutationObserver(m);return z.observe(p,{subtree:true,attributes:true,attributeFilter:["class"]}),()=>{z.disconnect();}},[]);let v=n??"100%",k=r??0,x=u.map((p,m)=>({dataKey:`${p.name}-${m}`,name:p.name}));return jsx(I,{...f,rootClassName:classNames("BaselineUI-PieChart",Ee),className:c,style:d,width:t,height:o,variant:"default",dir:y,legend:i?jsx(O,{series:x,resolveColor:(p,m)=>Ie(u[m],m)}):null,surfaceRef:g,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",initialDimension:Zt,children:jsxs(PieChart,{"aria-describedby":L,"aria-details":N,"aria-label":_,"aria-labelledby":T,accessibilityLayer:true,children:[a?jsx(Tooltip,{content:p=>jsx(B,{...p,numberFormatterProps:tr})}):null,jsx(Pie,{data:b,dataKey:"fraction",nameKey:"name",innerRadius:k,outerRadius:v,startAngle:Ht,endAngle:Xt,isAnimationActive:false,label:h?er:false,labelLine:false,stroke:themeVars.color.focused.inset,strokeWidth:1,activeShape:or,rootTabIndex:-1,children:u.map((p,m)=>jsx(Cell,{className:ke,fill:Ie(p,m)},`${p.name}-${m}`))})]})})})}export{vt as BarChart,Bt as LineChart,nr as PieChart};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@baseline-ui/charts",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"description": "Chart components for Baseline UI",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"dist"
|
|
11
11
|
],
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@baseline-ui/core": "3.
|
|
14
|
-
"@baseline-ui/tokens": "3.
|
|
13
|
+
"@baseline-ui/core": "3.4.0",
|
|
14
|
+
"@baseline-ui/tokens": "3.4.0"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"react": "^18.0.0 || ^19.0.0",
|