@cleen/ui 0.1.195 → 0.1.197
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/charts/index.d.ts +63 -22
- package/dist/charts/index.js +6 -3
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/charts/index.d.ts
CHANGED
|
@@ -117,32 +117,52 @@ interface BellCurveProps extends Omit<ChartProps, 'series'> {
|
|
|
117
117
|
*/
|
|
118
118
|
declare const BellCurve: react.ForwardRefExoticComponent<BellCurveProps & react.RefAttributes<ReactApexChart>>;
|
|
119
119
|
|
|
120
|
+
type FootballFieldSeriesItem = {
|
|
121
|
+
/** Row label rendered on the y-axis, e.g. "Market Multiple" */
|
|
122
|
+
category: string;
|
|
123
|
+
/** Low end of the valuation range */
|
|
124
|
+
from: number;
|
|
125
|
+
/** High end of the valuation range */
|
|
126
|
+
to: number;
|
|
127
|
+
/** Renders the bar with a diagonal pattern fill instead of a solid fill */
|
|
128
|
+
striped?: boolean;
|
|
129
|
+
/** Bar color; falls back to the default range color */
|
|
130
|
+
color?: string;
|
|
131
|
+
};
|
|
132
|
+
type FootballFieldHighlightRange = {
|
|
133
|
+
from: number;
|
|
134
|
+
to: number;
|
|
135
|
+
color?: string;
|
|
136
|
+
opacity?: number;
|
|
137
|
+
};
|
|
138
|
+
interface FootballFieldChartProps extends Omit<ChartProps, 'type' | 'series' | 'className' | 'style'> {
|
|
139
|
+
/** Valuation ranges, one row per item, rendered top to bottom */
|
|
140
|
+
series: FootballFieldSeriesItem[];
|
|
141
|
+
/** Shaded full-height background band marking an overlap zone */
|
|
142
|
+
highlightRange?: FootballFieldHighlightRange[];
|
|
143
|
+
/** Function to format x-axis labels, e.g. "m" for millions */
|
|
144
|
+
formatXValue?: (value: number) => string;
|
|
145
|
+
classNames?: {
|
|
146
|
+
container?: string;
|
|
147
|
+
};
|
|
148
|
+
styles?: {
|
|
149
|
+
container?: CSSProperties;
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
|
|
120
153
|
/**
|
|
121
|
-
*
|
|
122
|
-
*
|
|
154
|
+
* Football field chart built on ApexCharts horizontal range bars.
|
|
155
|
+
* Each series item renders as a single low-to-high bar on a shared numeric
|
|
156
|
+
* value axis; pass `striped` for a diagonal pattern fill and `highlightRange`
|
|
157
|
+
* for a shaded band spanning the full chart height.
|
|
123
158
|
*/
|
|
124
|
-
declare const
|
|
159
|
+
declare const FootballFieldChart: react.ForwardRefExoticComponent<FootballFieldChartProps & react.RefAttributes<ReactApexChart>>;
|
|
125
160
|
|
|
126
|
-
type ScatterChartVariant = 'default' | 'matrix';
|
|
127
|
-
|
|
128
|
-
type ScatterChartTooltipResolverContext = NonNullable<Parameters<NonNullable<ChartProps['renderTooltip']>>[0]>;
|
|
129
|
-
type ScatterChartRenderTooltip = ChartProps['renderTooltip'];
|
|
130
|
-
interface ScatterChartProps extends Omit<ChartProps, 'type'> {
|
|
131
|
-
variant?: ScatterChartVariant;
|
|
132
|
-
rows?: Array<{
|
|
133
|
-
label: string;
|
|
134
|
-
gapsLabel?: string;
|
|
135
|
-
y: number;
|
|
136
|
-
lineColor?: string;
|
|
137
|
-
}>;
|
|
138
|
-
}
|
|
139
161
|
/**
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
* Chart serializes it via renderToStaticMarkup and resets Apex's default wrapper styling.
|
|
143
|
-
* Use `variant="matrix"` with `rows` to render a labelled matrix layout.
|
|
162
|
+
* Radar chart component built on ApexCharts
|
|
163
|
+
* Provides a flexible wrapper for radar chart visualizations using a predefined set of default styling options.
|
|
144
164
|
*/
|
|
145
|
-
declare const
|
|
165
|
+
declare const RadarChart: react.ForwardRefExoticComponent<Omit<ChartProps, "type"> & react.RefAttributes<ReactApexChart>>;
|
|
146
166
|
|
|
147
167
|
type SankeyChartAlign = 'justify' | 'left';
|
|
148
168
|
interface SankeyChartNode {
|
|
@@ -207,6 +227,27 @@ interface SankeyChartProps {
|
|
|
207
227
|
}
|
|
208
228
|
declare function SankeyChart({ data, options, className, style, onNodeClick, renderTooltip, }: SankeyChartProps): react_jsx_runtime.JSX.Element;
|
|
209
229
|
|
|
230
|
+
type ScatterChartVariant = 'default' | 'matrix';
|
|
231
|
+
|
|
232
|
+
type ScatterChartTooltipResolverContext = NonNullable<Parameters<NonNullable<ChartProps['renderTooltip']>>[0]>;
|
|
233
|
+
type ScatterChartRenderTooltip = ChartProps['renderTooltip'];
|
|
234
|
+
interface ScatterChartProps extends Omit<ChartProps, 'type'> {
|
|
235
|
+
variant?: ScatterChartVariant;
|
|
236
|
+
rows?: Array<{
|
|
237
|
+
label: string;
|
|
238
|
+
gapsLabel?: string;
|
|
239
|
+
y: number;
|
|
240
|
+
lineColor?: string;
|
|
241
|
+
}>;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Scatter chart component built on ApexCharts.
|
|
245
|
+
* Pass `renderTooltip` to return a React element as the tooltip;
|
|
246
|
+
* Chart serializes it via renderToStaticMarkup and resets Apex's default wrapper styling.
|
|
247
|
+
* Use `variant="matrix"` with `rows` to render a labelled matrix layout.
|
|
248
|
+
*/
|
|
249
|
+
declare const ScatterChart: react.ForwardRefExoticComponent<ScatterChartProps & react.RefAttributes<ReactApexChart>>;
|
|
250
|
+
|
|
210
251
|
type TreemapLabelLayout = 'apex' | 'overlay';
|
|
211
252
|
type TreemapRenderTileLabelContext = {
|
|
212
253
|
/** Raw data point from series[0].data[i] */
|
|
@@ -238,4 +279,4 @@ type SimpleChartProps = {
|
|
|
238
279
|
};
|
|
239
280
|
declare const SimpleChart: react__default.FC<SimpleChartProps>;
|
|
240
281
|
|
|
241
|
-
export { BarChart, type BarChartProps, type BarChartRenderTooltip, type BarChartTooltipResolverContext, BellCurve, type BellCurveProps, Chart, type ChartProps, RadarChart, SankeyChart, type SankeyChartAlign, type SankeyChartData, type SankeyChartEdge, type SankeyChartNode, type SankeyChartOptions, type SankeyChartProps, type SankeyChartRenderTooltip, type SankeyChartTooltipResolverContext, ScatterChart, type ScatterChartProps, type ScatterChartRenderTooltip, type ScatterChartTooltipResolverContext, type ScatterChartVariant, SimpleChart, type SimpleChartProps, TreemapChart, type TreemapChartProps, type TreemapLabelLayout, type TreemapRenderTileLabelContext };
|
|
282
|
+
export { BarChart, type BarChartProps, type BarChartRenderTooltip, type BarChartTooltipResolverContext, BellCurve, type BellCurveProps, Chart, type ChartProps, FootballFieldChart, type FootballFieldChartProps, type FootballFieldHighlightRange, type FootballFieldSeriesItem, RadarChart, SankeyChart, type SankeyChartAlign, type SankeyChartData, type SankeyChartEdge, type SankeyChartNode, type SankeyChartOptions, type SankeyChartProps, type SankeyChartRenderTooltip, type SankeyChartTooltipResolverContext, ScatterChart, type ScatterChartProps, type ScatterChartRenderTooltip, type ScatterChartTooltipResolverContext, type ScatterChartVariant, SimpleChart, type SimpleChartProps, TreemapChart, type TreemapChartProps, type TreemapLabelLayout, type TreemapRenderTileLabelContext };
|
package/dist/charts/index.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import{cn as Me}from"@cleen/ui-core";import{forwardRef as $e}from"react";import{renderToStaticMarkup as Fe}from"react-dom/server";import De from"react-apexcharts";var Y={chart:{toolbar:{show:!0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0}},animations:{enabled:!0}},dataLabels:{enabled:!1},stroke:{curve:"smooth",width:2},xaxis:{labels:{style:{fontSize:"12px"}}},yaxis:{labels:{style:{fontSize:"12px"}}},legend:{position:"top",horizontalAlign:"left"},tooltip:{enabled:!0,theme:"light"}};import{jsx as ae}from"react/jsx-runtime";var ze="[&_.apexcharts-tooltip]:!cleen-bg-transparent [&_.apexcharts-tooltip]:!cleen-border-0 [&_.apexcharts-tooltip]:!cleen-shadow-none [&_.apexcharts-tooltip]:!cleen-p-0 [&_.apexcharts-tooltip]:!cleen-overflow-visible [&_.apexcharts-tooltip]:!cleen-whitespace-normal",ie=$e(function({type:t="line",series:r,options:n={},width:d="100%",height:x=350,className:y,style:C,renderTooltip:c},S){let T=c?{...n.tooltip,custom:(s=>{let A=c({seriesIndex:s.seriesIndex,dataPointIndex:s.dataPointIndex,series:s.series,w:s.w});return A?Fe(A):""})}:n.tooltip,o={...Y,...n,chart:{...Y.chart,...n.chart,type:t},...T?{tooltip:T}:{}},v=!!o.tooltip?.custom;return ae("div",{className:Me("cleen",v&&ze,y),style:C,children:ae(De,{options:o,series:r,type:t,width:d,height:x,ref:S})})}),P=ie;import{applyDefaults as Ge}from"@cleen/ui-core";import{forwardRef as We}from"react";var le={chart:{type:"bar",zoom:{enabled:!1},toolbar:{show:!1},animations:{enabled:!1},fontFamily:"inherit",background:"transparent",parentHeightOffset:0},dataLabels:{enabled:!1},legend:{show:!1}};import{jsx as Xe}from"react/jsx-runtime";var Ue=We(function({options:t,...r},n){return Xe(P,{type:"bar",ref:n,options:Ge(le,t??{}),...r})});import{applyDefaults as z}from"@cleen/ui-core";import{forwardRef as Ve,useMemo as $}from"react";import{ColorHelpers as M}from"@cleen/ui-core";var se={marker:{size:2,fillColor:"rgba(var(--cleen-gray-500))",strokeColor:"rgba(var(--cleen-gray-500))",offsetY:-16,shape:"triangle"},label:{borderWidth:0,offsetY:-20,style:{color:"rgba(var(--cleen-gray-500))",background:"transparent",fontSize:"11px"}}},ce={label:{borderColor:"transparent",style:{color:"rgba(var(--cleen-white))",background:"rgba(var(--cleen-primary))"}},fillColor:"rgba(var(--cleen-primary))"},pe={label:{borderWidth:0,offsetY:-15,orientation:"horizontal",style:{color:"rgba(var(--cleen-primary))",background:"transparent",fontSize:"16px",fontWeight:700}},borderColor:"rgba(var(--cleen-primary))"},de={marker:{size:8,fillColor:"rgba(var(--cleen-primary))",strokeColor:"rgba(var(--cleen-white))"}},ue={chart:{zoom:{enabled:!1},toolbar:{show:!1},animations:{enabled:!1}},stroke:{curve:"monotoneCubic",width:2.5},colors:[M.getComputedColor("var(--cleen-error)"),M.getComputedColor("var(--cleen-primary)"),M.getComputedColor("var(--cleen-success)")],fill:{type:"gradient",gradient:{shade:"light",type:"vertical",shadeIntensity:.6,gradientToColors:[M.getComputedColor("var(--cleen-error)")||"",M.getComputedColor("var(--cleen-primary)")||"",M.getComputedColor("var(--cleen-success)")||""],inverseColors:!1,opacityFrom:.95,opacityTo:.6}},yaxis:{show:!1},tooltip:{enabled:!0,x:{formatter:function(e){return`Score: ${typeof e=="string"?Number(e):e}`}},y:{formatter:function(e){return`${Number(e).toFixed(4)}`}}},grid:{show:!1},legend:{show:!1}};var me=(e,t)=>({middle:e,leftSigma:e-t,left2Sigma:e-2*t,left:e-3*t,rightSigma:e+2*t,right2Sigma:e+2*t,right:e+3*t}),fe=(e,t,r,n)=>({middle:e,leftSigma:e-t,left2Sigma:e-2*t,left:r,rightSigma:e+t,right2Sigma:e+2*t,right:n}),he=(e,t)=>{let r={};switch(e.type){case"range":r={x:t[e.x],x2:t[e.x2]};break;case"offset":r={x:e.x-e.offset,x2:e.x+e.offset};break;case"region":e.x>=t.left&&e.x<t.left2Sigma?r={x:t.left,x2:t.left2Sigma}:e.x>=t.left2Sigma&&e.x<t.leftSigma?r={x:t.left2Sigma,x2:t.leftSigma}:e.x>=t.leftSigma&&e.x<t.middle?r={x:t.leftSigma,x2:t.middle}:e.x>=t.middle&&e.x<t.rightSigma?r={x:t.middle,x2:t.rightSigma}:e.x>=t.rightSigma&&e.x<t.right2Sigma?r={x:t.rightSigma,x2:t.right2Sigma}:e.x>=t.right2Sigma&&e.x<t.right&&(r={x:t.right2Sigma,x2:t.right});break;default:r={x:e.x,x2:e.x2};break}return r};import{jsx as je}from"react/jsx-runtime";var Ke=Ve(function({serie:t,labels:r,sigma:n,pointAnnotations:d,rangeAnnotations:x,highlightAnnotations:y,options:C,height:c=360,...S},T){let o=$(()=>t.sort((l,f)=>l.x-f.x),[t]),v=$(()=>{let l=new Map;return t.forEach(f=>l.set(f.x,f.y)),l},[t]),s=o[Math.floor(o.length/2)],A=$(()=>{let{below:l,middle:f,above:g}=t.reduce((u,a)=>(a.x<s.x-2*n?u.below.push(a):a.x>=s.x+2*n?(a.x===s.x+2*n&&u.middle.push(a),u.above.push(a)):(a.x===s.x-2*n&&u.below.push(a),u.middle.push(a)),u),{below:[],middle:[],above:[]});return[{name:r?.below||"Below threshold",data:l},{name:r?.middle||"Middle grounds",data:f},{name:r?.above||"Above threshold",data:g}]},[n,t,r,s]),N=$(()=>{if(!d)return[];let l=me(s.x,n);return Object.entries(d).map(([f,g])=>{let u=l[f];return{x:u,y:v.get(u)||0,...z(se,g)}})},[d,n,v]),R=$(()=>{if(!x)return[];let l=fe(s.x,n,o[0].x,o[o.length-1].x);return x.map(f=>{let g=he(f,l);return{...z(ce,f),...g}})},[x,n,o]),{highlightPointAnnotations:w,highlightLineAnnotations:i}=$(()=>{if(!y)return{highlightLineAnnotations:[],highlightPointAnnotations:[]};let l=[],f=[],g=({x:a,line:h})=>{f.push(z(pe,{x:a,...h}))},u=({x:a,y:h,point:m})=>{l.push(z(de,{x:a,y:h,...m}))};return y?.forEach(a=>{switch(a.show){case"line":g(a);break;case"point":u(a);break;case"both":g(a),u(a);break;default:break}}),{highlightPointAnnotations:l,highlightLineAnnotations:f}},[y]);return je(P,{series:A,options:{...z(ue,C),annotations:{...C?.annotations,points:[...N,...w,...C?.annotations?.points||[]],xaxis:[...R,...i,...C?.annotations?.xaxis||[]]}},height:c,ref:T,type:"area",...S})});import{applyDefaults as qe}from"@cleen/ui-core";import{forwardRef as Ye}from"react";var ge={chart:{type:"radar",zoom:{enabled:!1},toolbar:{show:!1}},stroke:{width:2},fill:{opacity:.25},markers:{size:4,colors:"transparent",strokeColors:"transparent"},tooltip:{marker:{show:!1}},legend:{show:!1}};import{jsx as Je}from"react/jsx-runtime";var Ze=Ye(function({options:t,...r},n){return Je(P,{type:"radar",ref:n,options:qe(ge,t),...r})});import{applyDefaults as Qe,cn as et}from"@cleen/ui-core";import{forwardRef as tt}from"react";var ye={chart:{type:"scatter",zoom:{enabled:!1},toolbar:{show:!1}},markers:{shape:"square",size:8,strokeWidth:0},grid:{strokeDashArray:8},legend:{show:!0,horizontalAlign:"right",position:"top",labels:{colors:"rgba(var(--cleen-gray-700))"}},yaxis:{axisBorder:{show:!0,color:"rgba(var(--cleen-gray-200))"},labels:{style:{colors:"rgba(var(--cleen-gray-700))"}}},xaxis:{axisBorder:{show:!0,color:"rgba(var(--cleen-gray-200))"},labels:{style:{colors:"rgba(var(--cleen-gray-700))"}}},title:{align:"left",floating:!0,style:{color:"rgba(var(--cleen-black))"}}},xe={chart:{type:"scatter",zoom:{enabled:!1},toolbar:{show:!1}},stroke:{width:0},fill:{opacity:1},markers:{shape:"circle",size:14,strokeWidth:2,hover:{sizeOffset:0}},grid:{strokeDashArray:0,borderColor:"rgba(var(--cleen-gray-200))",padding:{left:0,right:12},xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}}},legend:{show:!1},xaxis:{min:0,max:210,tickAmount:4,axisBorder:{show:!1},axisTicks:{show:!1},decimalsInFloat:0,title:{text:"Estimated impact \u2192",style:{color:"rgba(var(--cleen-gray-700))",fontSize:"14px",fontWeight:400}},labels:{style:{colors:"rgba(var(--cleen-gray-700))",fontSize:"14px"},formatter(e){let t=Number(e);return Number.isNaN(t)?`${e}`:`$${Math.round(t)}k`}}},tooltip:{enabled:!0,theme:"light",x:{formatter(e){let t=Number(e);return Number.isNaN(t)?`${e}`:`$${Math.round(t)}k`}}}};import{jsx as G,jsxs as be}from"react/jsx-runtime";var rt=tt(function({options:t,variant:r="default",rows:n,className:d,style:x,...y},C){let S=Qe(r==="matrix"?xe:ye,t);if(r==="matrix"&&n?.length){let T=Math.min(...n.map(s=>s.y)),o=Math.max(...n.map(s=>s.y)),v=Array.isArray(S.yaxis)?{}:S.yaxis??{};return be("div",{className:et("cleen cleen-grid cleen-grid-cols-[156px_minmax(0,1fr)] cleen-items-stretch cleen-gap-3 cleen-w-full",d),style:x,children:[G("div",{className:"cleen-grid cleen-pt-[18px] cleen-pb-[54px]",style:{gridTemplateRows:`repeat(${n.length}, minmax(0, 1fr))`},children:n.map(s=>be("div",{className:"cleen-flex cleen-flex-col cleen-justify-center cleen-items-end cleen-gap-1 cleen-pr-2",children:[G("span",{className:"cleen-text-[18px] cleen-font-bold cleen-leading-[1.1] cleen-text-[rgba(var(--cleen-black))]",children:s.label}),s.gapsLabel?G("span",{className:"cleen-text-[14px] cleen-leading-[1.2] cleen-text-gray-700",children:s.gapsLabel}):null]},`${s.label}-${s.y}`))}),G(P,{type:"scatter",ref:C,className:"cleen-w-full cleen-h-full",options:{...S,yaxis:{...v,min:T-.5,max:o+.5,tickAmount:Math.max(o-T,1),axisBorder:{...v.axisBorder,show:!1},axisTicks:{...v.axisTicks,show:!1},labels:{...v.labels,show:!1}},annotations:{...S.annotations,yaxis:[...n.map(s=>({y:s.y,borderColor:s.lineColor||"rgba(var(--cleen-gray-200))",strokeDashArray:0})),...S.annotations?.yaxis||[]]}},...y})]})}return G(P,{type:"scatter",ref:C,className:d,style:x,options:S,...y})});import{applyDefaults as ot,cn as W}from"@cleen/ui-core";import{useId as nt,useMemo as U,useRef as at,useState as it}from"react";import{Layer as we,Tooltip as lt,Rectangle as Ce,ResponsiveContainer as st,Sankey as ct}from"recharts";var E={width:"100%",height:420,nodePadding:24,enableToolbar:!1,enableTooltip:!0,highlightOnHover:!0,dimOnHover:!0,dimOpacity:.2,edgeOpacity:.4,edgeGradientFill:!0,nodeWidth:20,nodeBorderWidth:0,nodeBorderColor:null,align:"justify",fontColor:"rgba(var(--cleen-neutral-800, 38, 38, 38))",tooltipBGColor:"rgba(var(--cleen-white))",tooltipBorderColor:"rgba(var(--cleen-gray-200))"};import{Fragment as Nt,jsx as k,jsxs as D}from"react/jsx-runtime";var pt=typeof E.height=="number"?E.height:420,Se=40,ve=60,ke=8,dt=8,ut="cleen-min-w-[220px] cleen-max-w-[min(360px,90vw)] cleen-flex cleen-flex-col cleen-gap-2",Z="cleen-m-0 cleen-text-xs cleen-leading-[18px] cleen-whitespace-pre-line cleen-break-words",mt="cleen-font-semibold",ft="cleen-font-medium cleen-text-[13px] cleen-mt-1 cleen-opacity-[0.72]",ht="cleen-font-medium cleen-text-[13px] cleen-mt-[6px]";function gt(e){if(typeof e=="number"&&Number.isFinite(e))return e;if(typeof e=="string"){let t=e.trim();if(!t.endsWith("%")&&t!=="auto"){let r=Number.parseFloat(t);if(Number.isFinite(r))return r}}return pt}function Ae(e){return typeof e=="object"&&e!==null&&"id"in e&&"title"in e}function yt(e){return typeof e=="object"&&e!==null&&"id"in e&&"title"in e&&"index"in e&&"name"in e}var Te=["rgba(var(--cleen-primary, 59, 130, 246))","rgba(var(--cleen-success, 34, 197, 94))","rgba(var(--cleen-warning, 245, 158, 11))","rgba(var(--cleen-error, 239, 68, 68))","rgba(var(--cleen-purple, 147, 51, 234))","rgba(var(--cleen-cyan, 6, 182, 212))","rgba(var(--cleen-orange, 249, 115, 22))","rgba(var(--cleen-pink, 236, 72, 153))","rgba(var(--cleen-teal, 20, 184, 166))","rgba(var(--cleen-indigo, 99, 102, 241))","rgba(var(--cleen-rose, 244, 63, 94))","rgba(var(--cleen-amber, 245, 158, 11))"];function Pe(e){return e!=null}function xt(e,t){return[e.source,e.target,e.type??"",e.label??"",e.value,t].join("-").replace(/\s+/g,"_")}function X(e,t){return typeof e=="object"&&e!==null?e.id:t}function Ne(e,t){return typeof e=="object"&&e!==null?e.title:t}function J(e){return typeof e=="object"&&e!==null&&"edgeKey"in e&&"sourceId"in e&&"targetId"in e}function Q(e){return typeof e=="object"&&e!==null&&"payload"in e}function Le(e){if(Q(e))return Le(e.payload);if(J(e)||yt(e))return e}function ee(...e){return e.map(t=>typeof t=="number"?String(t):t?.trim()??"").find(t=>t.length>0)}function Oe(e){let t=ee(e);if(t)return/[\p{L}\p{N}]/u.test(t)?t:void 0}function Ee(e){return e.replace(/[^a-zA-Z0-9_-]/g,"_")}function F(e){let t=e.match(/^rgba\((var\(.+\)),\s*([0-9]*\.?[0-9]+)\)$/i);if(t)return{color:`rgb(${t[1]})`,opacity:Number.parseFloat(t[2])};let r=e.match(/^rgba\((var\(.+\))\)$/i);if(r)return{color:`rgb(${r[1]})`,opacity:1};let n=e.match(/^rgba\(\s*(\d+\s*,\s*\d+\s*,\s*\d+)\s*,\s*([0-9]*\.?[0-9]+)\s*\)$/i);return n?{color:`rgb(${n[1]})`,opacity:Number.parseFloat(n[2])}:{color:e,opacity:1}}function te(e,t){return F(t??Te[e%Te.length])}function Re(e){return e.length*dt}function bt(e){let t=new Set,r=new Set([e.id]);for(let n of[...e.sourceLinks??[],...e.targetLinks??[]])t.add(n.edgeKey),r.add(X(n.source,n.sourceId)),r.add(X(n.target,n.targetId));return{activeLinkKeys:t,activeNodeIds:r}}function Ct(e){return{activeLinkKeys:new Set([e.edgeKey]),activeNodeIds:new Set([X(e.source,e.sourceId),X(e.target,e.targetId)])}}function St(e,t,r,n,d){return!e||e.activeNodeIds.has(t)?1:n?d??E.dimOpacity??.2:r?.55:1}function vt(e,t,r,n,d,x){return e?e.activeLinkKeys.has(t)?n?Math.max(r,.9):r:d?x??E.dimOpacity??.2:n?Math.min(r,.3):r:r}var kt=({dimOnHover:e,dimOpacity:t,fontColor:r,x:n,y:d,width:x,height:y,highlightOnHover:C,hoverState:c,index:S,outgoingEdgesById:T,payload:o,stroke:v,strokeWidth:s})=>{if(o===void 0||n===void 0||d===void 0||x===void 0||y===void 0||S===void 0)return null;let A=T?.get(o.id)??[],N=A.length>0,R=te(S,o.color),w=F(r),i=St(c,o.id,C,e,t),l=new Set(A.map(h=>h.color).filter(Pe)),f=Array.from(l)[0],g=N&&A.length>1&&l.size>1&&l.size===A.length,u=g?A:[],a=u.reduce((h,m)=>h+(m.value??0),0);return D(we,{children:[g&&a>0?u.map((h,m)=>{let p=u.slice(0,m).reduce((H,B)=>H+(B.value??0),0),b=d+p/a*y,O=(h.value??0)/a*y,L=F(h.color??R.color),I=m===0,_=m===u.length-1;return k(Ce,{x:n,y:b,width:x,height:O,fill:L.color,fillOpacity:L.opacity*i,stroke:v,strokeWidth:s,radius:[I?2:0,I?2:0,_?2:0,_?2:0]},`${h.source}-${h.target}-${m}`)}):k(Ce,{x:n,y:d,width:x,height:y,fill:N&&l.size===1?F(f??R.color).color:R.color,fillOpacity:(N&&l.size===1?F(f??R.color).opacity:R.opacity)*i,stroke:v,strokeWidth:s,radius:[2,2,2,2]}),k("text",{textAnchor:N?"end":"start",x:N?n-8:n+x+8,y:d+y/2,dy:"0.35em",fontSize:"14",fill:w.color,fillOpacity:w.opacity*i,fontWeight:600,children:o.name})]},`CustomNode${S}`)},At=({sourceX:e,targetX:t,sourceY:r,targetY:n,sourceControlX:d,targetControlX:x,linkWidth:y,index:C,payload:c,opacity:S,chartId:T,dimOnHover:o,dimOpacity:v,edgeGradientFill:s,highlightOnHover:A,hoverState:N})=>{if(c===void 0||e===void 0||t===void 0||r===void 0||n===void 0||d===void 0||x===void 0||y===void 0)return null;let R=S??E.edgeOpacity??.4,w=vt(N,c.edgeKey,R,A,o,v),i=c.color?F(c.color):null,l=i??te(typeof c.source=="object"?c.source.index:0,typeof c.source=="object"?c.source.color:void 0),f=i??te(typeof c.target=="object"?c.target.index:1,typeof c.target=="object"?c.target.color:void 0),g=Ee(`linkGradient-${T}-${c.edgeKey}-${C??c.value}`),u=s!==!1&&i===null;return D(we,{children:[u?k("defs",{children:D("linearGradient",{id:g,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[k("stop",{offset:"0%",stopColor:l.color,stopOpacity:l.opacity*w}),k("stop",{offset:"100%",stopColor:f.color,stopOpacity:f.opacity*w})]})}):null,k("path",{d:`
|
|
1
|
+
import{cn as We}from"@cleen/ui-core";import{forwardRef as Ue}from"react";import{renderToStaticMarkup as Xe}from"react-dom/server";import Ke from"react-apexcharts";var q={chart:{toolbar:{show:!0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0}},animations:{enabled:!0}},dataLabels:{enabled:!1},stroke:{curve:"smooth",width:2},xaxis:{labels:{style:{fontSize:"12px"}}},yaxis:{labels:{style:{fontSize:"12px"}}},legend:{position:"top",horizontalAlign:"left"},tooltip:{enabled:!0,theme:"light"}};import{jsx as ae}from"react/jsx-runtime";var Ve="[&_.apexcharts-tooltip]:!cleen-bg-transparent [&_.apexcharts-tooltip]:!cleen-border-0 [&_.apexcharts-tooltip]:!cleen-shadow-none [&_.apexcharts-tooltip]:!cleen-p-0 [&_.apexcharts-tooltip]:!cleen-overflow-visible [&_.apexcharts-tooltip]:!cleen-whitespace-normal",ie=Ue(function({type:t="line",series:r,options:n={},width:c="100%",height:C=350,className:g,style:x,renderTooltip:p},v){let T=p?{...n.tooltip,custom:(l=>{let b=p({seriesIndex:l.seriesIndex,dataPointIndex:l.dataPointIndex,series:l.series,w:l.w});return b?Xe(b):""})}:n.tooltip,o={...q,...n,chart:{...q.chart,...n.chart,type:t},...T?{tooltip:T}:{}},S=!!o.tooltip?.custom;return ae("div",{className:We("cleen",S&&Ve,g),style:x,children:ae(Ke,{options:o,series:r,type:t,width:c,height:C,ref:v})})}),P=ie;import{applyDefaults as je}from"@cleen/ui-core";import{forwardRef as Ye}from"react";var le={chart:{type:"bar",zoom:{enabled:!1},toolbar:{show:!1},animations:{enabled:!1},fontFamily:"inherit",background:"transparent",parentHeightOffset:0},dataLabels:{enabled:!1},legend:{show:!1}};import{jsx as Ze}from"react/jsx-runtime";var qe=Ye(function({options:t,...r},n){return Ze(P,{type:"bar",ref:n,options:je(le,t??{}),...r})});import{applyDefaults as z}from"@cleen/ui-core";import{forwardRef as Je,useMemo as M}from"react";import{ColorHelpers as B}from"@cleen/ui-core";var se={marker:{size:2,fillColor:"rgba(var(--cleen-gray-500))",strokeColor:"rgba(var(--cleen-gray-500))",offsetY:-16,shape:"triangle"},label:{borderWidth:0,offsetY:-20,style:{color:"rgba(var(--cleen-gray-500))",background:"transparent",fontSize:"11px"}}},pe={label:{borderColor:"transparent",style:{color:"rgba(var(--cleen-white))",background:"rgba(var(--cleen-primary))"}},fillColor:"rgba(var(--cleen-primary))"},ce={label:{borderWidth:0,offsetY:-15,orientation:"horizontal",style:{color:"rgba(var(--cleen-primary))",background:"transparent",fontSize:"16px",fontWeight:700}},borderColor:"rgba(var(--cleen-primary))"},de={marker:{size:8,fillColor:"rgba(var(--cleen-primary))",strokeColor:"rgba(var(--cleen-white))"}},ue={chart:{zoom:{enabled:!1},toolbar:{show:!1},animations:{enabled:!1}},stroke:{curve:"monotoneCubic",width:2.5},colors:[B.getComputedColor("var(--cleen-error)"),B.getComputedColor("var(--cleen-primary)"),B.getComputedColor("var(--cleen-success)")],fill:{type:"gradient",gradient:{shade:"light",type:"vertical",shadeIntensity:.6,gradientToColors:[B.getComputedColor("var(--cleen-error)")||"",B.getComputedColor("var(--cleen-primary)")||"",B.getComputedColor("var(--cleen-success)")||""],inverseColors:!1,opacityFrom:.95,opacityTo:.6}},yaxis:{show:!1},tooltip:{enabled:!0,x:{formatter:function(e){return`Score: ${typeof e=="string"?Number(e):e}`}},y:{formatter:function(e){return`${Number(e).toFixed(4)}`}}},grid:{show:!1},legend:{show:!1}};var me=(e,t)=>({middle:e,leftSigma:e-t,left2Sigma:e-2*t,left:e-3*t,rightSigma:e+2*t,right2Sigma:e+2*t,right:e+3*t}),fe=(e,t,r,n)=>({middle:e,leftSigma:e-t,left2Sigma:e-2*t,left:r,rightSigma:e+t,right2Sigma:e+2*t,right:n}),he=(e,t)=>{let r={};switch(e.type){case"range":r={x:t[e.x],x2:t[e.x2]};break;case"offset":r={x:e.x-e.offset,x2:e.x+e.offset};break;case"region":e.x>=t.left&&e.x<t.left2Sigma?r={x:t.left,x2:t.left2Sigma}:e.x>=t.left2Sigma&&e.x<t.leftSigma?r={x:t.left2Sigma,x2:t.leftSigma}:e.x>=t.leftSigma&&e.x<t.middle?r={x:t.leftSigma,x2:t.middle}:e.x>=t.middle&&e.x<t.rightSigma?r={x:t.middle,x2:t.rightSigma}:e.x>=t.rightSigma&&e.x<t.right2Sigma?r={x:t.rightSigma,x2:t.right2Sigma}:e.x>=t.right2Sigma&&e.x<t.right&&(r={x:t.right2Sigma,x2:t.right});break;default:r={x:e.x,x2:e.x2};break}return r};import{jsx as et}from"react/jsx-runtime";var Qe=Je(function({serie:t,labels:r,sigma:n,pointAnnotations:c,rangeAnnotations:C,highlightAnnotations:g,options:x,height:p=360,...v},T){let o=M(()=>t.sort((i,d)=>i.x-d.x),[t]),S=M(()=>{let i=new Map;return t.forEach(d=>i.set(d.x,d.y)),i},[t]),l=o[Math.floor(o.length/2)],b=M(()=>{let{below:i,middle:d,above:y}=t.reduce((m,a)=>(a.x<l.x-2*n?m.below.push(a):a.x>=l.x+2*n?(a.x===l.x+2*n&&m.middle.push(a),m.above.push(a)):(a.x===l.x-2*n&&m.below.push(a),m.middle.push(a)),m),{below:[],middle:[],above:[]});return[{name:r?.below||"Below threshold",data:i},{name:r?.middle||"Middle grounds",data:d},{name:r?.above||"Above threshold",data:y}]},[n,t,r,l]),O=M(()=>{if(!c)return[];let i=me(l.x,n);return Object.entries(c).map(([d,y])=>{let m=i[d];return{x:m,y:S.get(m)||0,...z(se,y)}})},[c,n,S]),R=M(()=>{if(!C)return[];let i=fe(l.x,n,o[0].x,o[o.length-1].x);return C.map(d=>{let y=he(d,i);return{...z(pe,d),...y}})},[C,n,o]),{highlightPointAnnotations:N,highlightLineAnnotations:s}=M(()=>{if(!g)return{highlightLineAnnotations:[],highlightPointAnnotations:[]};let i=[],d=[],y=({x:a,line:h})=>{d.push(z(ce,{x:a,...h}))},m=({x:a,y:h,point:f})=>{i.push(z(de,{x:a,y:h,...f}))};return g?.forEach(a=>{switch(a.show){case"line":y(a);break;case"point":m(a);break;case"both":y(a),m(a);break;default:break}}),{highlightPointAnnotations:i,highlightLineAnnotations:d}},[g]);return et(P,{series:b,options:{...z(ue,x),annotations:{...x?.annotations,points:[...O,...N,...x?.annotations?.points||[]],xaxis:[...R,...s,...x?.annotations?.xaxis||[]]}},height:p,ref:T,type:"area",...v})});import{applyDefaults as Ce}from"@cleen/ui-core";import{forwardRef as rt,useMemo as Se}from"react";var ge="rgba(var(--cleen-primary-300))",ye="rgba(var(--cleen-primary-500))";var xe={style:"slantedLines",width:12,height:12,strokeWidth:2},be={chart:{type:"rangeBar",zoom:{enabled:!1},toolbar:{show:!1},animations:{enabled:!1},fontFamily:"inherit",background:"transparent",parentHeightOffset:0},plotOptions:{bar:{horizontal:!0,barHeight:"50%",rangeBarGroupRows:!0,borderRadius:2}},dataLabels:{enabled:!1},legend:{show:!1},grid:{borderColor:"rgba(var(--cleen-gray-200))",xaxis:{lines:{show:!0}},yaxis:{lines:{show:!0}}},xaxis:{type:"numeric",tickAmount:8,axisBorder:{show:!1},axisTicks:{show:!1},labels:{style:{colors:"rgba(var(--cleen-gray-500))",fontSize:"12px"}}},yaxis:{labels:{style:{colors:"rgba(var(--cleen-gray-700))",fontSize:"12px"}}},tooltip:{enabled:!0,theme:"light"}};import{jsx as nt}from"react/jsx-runtime";var ot=rt(function({series:t,highlightRange:r,classNames:n,styles:c,options:C,height:g=320,formatXValue:x,...p},v){let T=Se(()=>t.map(({category:S,from:l,to:b})=>({name:S,data:[{x:S,y:[l,b]}]})),[t]),o=Se(()=>{let S=t.map(b=>b.color??ge),l=t.map(b=>b.striped?"pattern":"solid");return{colors:S,fill:{type:l,opacity:1,pattern:xe},xaxis:{labels:{formatter:x}},tooltip:{custom:({seriesIndex:b,dataPointIndex:O,w:R})=>{let N=R.globals.labels[O],s=R.config.series?.[b],[i,d]=s?.data?.[0]?.y??[];return`<div class="cleen-p-2 cleen-bg-white cleen-border cleen-border-gray-200 cleen-rounded cleen-shadow">
|
|
2
|
+
<strong class="cleen-text-gray-900">${N}</strong><br/>
|
|
3
|
+
<p class="cleen-text-gray-900">${x?.(i)??i} - ${x?.(d)??d}</p>
|
|
4
|
+
</div>`}},...r?{annotations:{xaxis:r.map(({from:b,to:O,color:R,opacity:N})=>({x:b,x2:O,fillColor:R??ye,opacity:N??.12,borderColor:"transparent"}))}}:{}}},[t,r,x]);return nt(P,{type:"rangeBar",ref:v,series:T,options:Ce(Ce(be,o),C??{}),height:g,className:n?.container,style:c?.container,...p})});import{applyDefaults as at}from"@cleen/ui-core";import{forwardRef as it}from"react";var Ae={chart:{type:"radar",zoom:{enabled:!1},toolbar:{show:!1}},stroke:{width:2},fill:{opacity:.25},markers:{size:4,colors:"transparent",strokeColors:"transparent"},tooltip:{marker:{show:!1}},legend:{show:!1}};import{jsx as st}from"react/jsx-runtime";var lt=it(function({options:t,...r},n){return st(P,{type:"radar",ref:n,options:at(Ae,t),...r})});import{applyDefaults as pt,cn as G}from"@cleen/ui-core";import{useId as ct,useMemo as U,useRef as dt,useState as ut}from"react";import{Layer as Ie,Tooltip as mt,Rectangle as ve,ResponsiveContainer as ft,Sankey as ht}from"recharts";var I={width:"100%",height:420,nodePadding:24,enableToolbar:!1,enableTooltip:!0,highlightOnHover:!0,dimOnHover:!0,dimOpacity:.2,edgeOpacity:.4,edgeGradientFill:!0,nodeWidth:20,nodeBorderWidth:0,nodeBorderColor:null,align:"justify",fontColor:"rgba(var(--cleen-neutral-800, 38, 38, 38))",tooltipBGColor:"rgba(var(--cleen-white))",tooltipBorderColor:"rgba(var(--cleen-gray-200))"};import{Fragment as It,jsx as k,jsxs as D}from"react/jsx-runtime";var gt=typeof I.height=="number"?I.height:420,ke=40,Te=60,Oe=8,yt=8,xt="cleen-min-w-[220px] cleen-max-w-[min(360px,90vw)] cleen-flex cleen-flex-col cleen-gap-2",Z="cleen-m-0 cleen-text-xs cleen-leading-[18px] cleen-whitespace-pre-line cleen-break-words",bt="cleen-font-semibold",Ct="cleen-font-medium cleen-text-[13px] cleen-mt-1 cleen-opacity-[0.72]",St="cleen-font-medium cleen-text-[13px] cleen-mt-[6px]";function At(e){if(typeof e=="number"&&Number.isFinite(e))return e;if(typeof e=="string"){let t=e.trim();if(!t.endsWith("%")&&t!=="auto"){let r=Number.parseFloat(t);if(Number.isFinite(r))return r}}return gt}function Re(e){return typeof e=="object"&&e!==null&&"id"in e&&"title"in e}function vt(e){return typeof e=="object"&&e!==null&&"id"in e&&"title"in e&&"index"in e&&"name"in e}var Ne=["rgba(var(--cleen-primary, 59, 130, 246))","rgba(var(--cleen-success, 34, 197, 94))","rgba(var(--cleen-warning, 245, 158, 11))","rgba(var(--cleen-error, 239, 68, 68))","rgba(var(--cleen-purple, 147, 51, 234))","rgba(var(--cleen-cyan, 6, 182, 212))","rgba(var(--cleen-orange, 249, 115, 22))","rgba(var(--cleen-pink, 236, 72, 153))","rgba(var(--cleen-teal, 20, 184, 166))","rgba(var(--cleen-indigo, 99, 102, 241))","rgba(var(--cleen-rose, 244, 63, 94))","rgba(var(--cleen-amber, 245, 158, 11))"];function Ee(e){return e!=null}function kt(e,t){return[e.source,e.target,e.type??"",e.label??"",e.value,t].join("-").replace(/\s+/g,"_")}function X(e,t){return typeof e=="object"&&e!==null?e.id:t}function we(e,t){return typeof e=="object"&&e!==null?e.title:t}function J(e){return typeof e=="object"&&e!==null&&"edgeKey"in e&&"sourceId"in e&&"targetId"in e}function Q(e){return typeof e=="object"&&e!==null&&"payload"in e}function _e(e){if(Q(e))return _e(e.payload);if(J(e)||vt(e))return e}function ee(...e){return e.map(t=>typeof t=="number"?String(t):t?.trim()??"").find(t=>t.length>0)}function Pe(e){let t=ee(e);if(t)return/[\p{L}\p{N}]/u.test(t)?t:void 0}function He(e){return e.replace(/[^a-zA-Z0-9_-]/g,"_")}function $(e){let t=e.match(/^rgba\((var\(.+\)),\s*([0-9]*\.?[0-9]+)\)$/i);if(t)return{color:`rgb(${t[1]})`,opacity:Number.parseFloat(t[2])};let r=e.match(/^rgba\((var\(.+\))\)$/i);if(r)return{color:`rgb(${r[1]})`,opacity:1};let n=e.match(/^rgba\(\s*(\d+\s*,\s*\d+\s*,\s*\d+)\s*,\s*([0-9]*\.?[0-9]+)\s*\)$/i);return n?{color:`rgb(${n[1]})`,opacity:Number.parseFloat(n[2])}:{color:e,opacity:1}}function te(e,t){return $(t??Ne[e%Ne.length])}function Le(e){return e.length*yt}function Tt(e){let t=new Set,r=new Set([e.id]);for(let n of[...e.sourceLinks??[],...e.targetLinks??[]])t.add(n.edgeKey),r.add(X(n.source,n.sourceId)),r.add(X(n.target,n.targetId));return{activeLinkKeys:t,activeNodeIds:r}}function Ot(e){return{activeLinkKeys:new Set([e.edgeKey]),activeNodeIds:new Set([X(e.source,e.sourceId),X(e.target,e.targetId)])}}function Rt(e,t,r,n,c){return!e||e.activeNodeIds.has(t)?1:n?c??I.dimOpacity??.2:r?.55:1}function Nt(e,t,r,n,c,C){return e?e.activeLinkKeys.has(t)?n?Math.max(r,.9):r:c?C??I.dimOpacity??.2:n?Math.min(r,.3):r:r}var wt=({dimOnHover:e,dimOpacity:t,fontColor:r,x:n,y:c,width:C,height:g,highlightOnHover:x,hoverState:p,index:v,outgoingEdgesById:T,payload:o,stroke:S,strokeWidth:l})=>{if(o===void 0||n===void 0||c===void 0||C===void 0||g===void 0||v===void 0)return null;let b=T?.get(o.id)??[],O=b.length>0,R=te(v,o.color),N=$(r),s=Rt(p,o.id,x,e,t),i=new Set(b.map(h=>h.color).filter(Ee)),d=Array.from(i)[0],y=O&&b.length>1&&i.size>1&&i.size===b.length,m=y?b:[],a=m.reduce((h,f)=>h+(f.value??0),0);return D(Ie,{children:[y&&a>0?m.map((h,f)=>{let u=m.slice(0,f).reduce((H,F)=>H+(F.value??0),0),A=c+u/a*g,w=(h.value??0)/a*g,L=$(h.color??R.color),E=f===0,_=f===m.length-1;return k(ve,{x:n,y:A,width:C,height:w,fill:L.color,fillOpacity:L.opacity*s,stroke:S,strokeWidth:l,radius:[E?2:0,E?2:0,_?2:0,_?2:0]},`${h.source}-${h.target}-${f}`)}):k(ve,{x:n,y:c,width:C,height:g,fill:O&&i.size===1?$(d??R.color).color:R.color,fillOpacity:(O&&i.size===1?$(d??R.color).opacity:R.opacity)*s,stroke:S,strokeWidth:l,radius:[2,2,2,2]}),k("text",{textAnchor:O?"end":"start",x:O?n-8:n+C+8,y:c+g/2,dy:"0.35em",fontSize:"14",fill:N.color,fillOpacity:N.opacity*s,fontWeight:600,children:o.name})]},`CustomNode${v}`)},Pt=({sourceX:e,targetX:t,sourceY:r,targetY:n,sourceControlX:c,targetControlX:C,linkWidth:g,index:x,payload:p,opacity:v,chartId:T,dimOnHover:o,dimOpacity:S,edgeGradientFill:l,highlightOnHover:b,hoverState:O})=>{if(p===void 0||e===void 0||t===void 0||r===void 0||n===void 0||c===void 0||C===void 0||g===void 0)return null;let R=v??I.edgeOpacity??.4,N=Nt(O,p.edgeKey,R,b,o,S),s=p.color?$(p.color):null,i=s??te(typeof p.source=="object"?p.source.index:0,typeof p.source=="object"?p.source.color:void 0),d=s??te(typeof p.target=="object"?p.target.index:1,typeof p.target=="object"?p.target.color:void 0),y=He(`linkGradient-${T}-${p.edgeKey}-${x??p.value}`),m=l!==!1&&s===null;return D(Ie,{children:[m?k("defs",{children:D("linearGradient",{id:y,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[k("stop",{offset:"0%",stopColor:i.color,stopOpacity:i.opacity*N}),k("stop",{offset:"100%",stopColor:d.color,stopOpacity:d.opacity*N})]})}):null,k("path",{d:`
|
|
2
5
|
M${e},${r}
|
|
3
|
-
C${
|
|
4
|
-
`,stroke:u?`url(#${g})`:l.color,strokeWidth:Math.max(1,y),fill:"none",strokeOpacity:u?1:l.opacity*w,className:"cleen-transition-opacity cleen-duration-300 hover:cleen-opacity-100"})]},`CustomLink${c.edgeKey}`)};function Tt({data:e,options:t,className:r,style:n,onNodeClick:d,renderTooltip:x}){let y=at(null),[C,c]=it(null),S=nt(),T=Ee(S),o=ot(E,t),v=gt(o.height),s=o.highlightOnHover||o.dimOnHover,A=U(()=>{let a=e.nodes.map((m,p)=>({...m,index:p,name:m.title})),h=e.edges.map((m,p)=>{let b=e.nodes.findIndex(L=>L.id===m.source),O=e.nodes.findIndex(L=>L.id===m.target);return b<0||O<0?null:{...m,edgeKey:xt(m,p),originalEdge:m,source:b,sourceId:m.source,target:O,targetId:m.target,value:m.value}}).filter(Pe);return{nodes:a,links:h}},[e]),N=U(()=>{let a=new Map;for(let h of e.edges){let m=a.get(h.source)??[];m.push(h),a.set(h.source,m)}return a},[e]),R=U(()=>({backgroundColor:o.tooltipBGColor,border:`1px solid ${o.tooltipBorderColor}`,borderRadius:8,boxShadow:"0 12px 32px rgba(15, 23, 42, 0.12)",color:o.fontColor,padding:"10px 12px"}),[o.fontColor,o.tooltipBGColor,o.tooltipBorderColor]),w=U(()=>{let a=new Set(e.edges.map(b=>b.source)),h=new Set(e.edges.map(b=>b.target)),m=e.nodes.reduce((b,O)=>h.has(O.id)?b:Math.max(b,Re(O.title)),0),p=e.nodes.reduce((b,O)=>a.has(O.id)?b:Math.max(b,Re(O.title)),0);return{top:Se,right:Math.max(ve,p+ke+16),bottom:Se,left:Math.max(ve,m+ke+16)}},[e]),i=(a,h)=>{if(s){if(h==="node"&&Ae(a.payload)){c(bt(a.payload));return}h==="link"&&J(a.payload)&&c(Ct(a.payload))}},l=()=>{s&&c(null)},f=()=>{if(typeof window>"u")return;let a=y.current?.querySelector("svg");if(!a)return;let h=new XMLSerializer().serializeToString(a),m=new Blob([h],{type:"image/svg+xml;charset=utf-8"}),p=URL.createObjectURL(m),b=document.createElement("a");b.href=p,b.download="sankey-chart.svg",b.click(),window.setTimeout(()=>URL.revokeObjectURL(p),0)},g=({active:a,payload:h})=>{if(!a||!h?.length)return null;let m=h[0]?.payload,p=Le(m);if(!p)return null;let b=J(p),O=Q(m)?m.value:h[0]?.value,L=Q(m)?m.name:void 0,I=Number(p.value??O??0),_=o.valueFormatter?o.valueFormatter(Number(p.value??O??0),b?p.originalEdge:void 0):`${p.value??O??""}`,H=b?Ne(p.source,p.sourceId):"",B=b?Ne(p.target,p.targetId):"",j=b?ee(p.title,p.label,p.name,p.originalEdge?.title,p.originalEdge?.label,p.originalEdge?.name,Oe(L),H&&B?`${H} \u2192 ${B}`:void 0):ee(p.title,Oe(L)),q=b?`${H} \u2192 ${B}`:"";if(x){let Be=b?{type:"link",edge:p.originalEdge,sourceNodeId:p.sourceId,sourceNodeTitle:H,targetNodeId:p.targetId,targetNodeTitle:B,value:Number.isFinite(I)?I:0,payload:p.originalEdge}:{type:"node",node:p,value:Number.isFinite(I)?I:0,payload:p},ne=x(Be);return ne?k(Nt,{children:ne}):null}return!j&&!q&&!_?null:D("div",{className:W(ut),style:R,children:[j?k("p",{className:W(Z,mt),style:{color:o.fontColor,overflowWrap:"anywhere"},children:j}):null,q?k("p",{className:W(Z,ft),style:{color:o.fontColor,overflowWrap:"anywhere"},children:q}):null,_?k("p",{className:W(Z,ht),style:{color:o.fontColor},children:_}):null]})},u={display:"flex",flexDirection:"column",gap:o.enableToolbar?12:0,width:o.width??"100%",height:v,minHeight:v,...n};return D("div",{className:W("cleen cleen-w-full",r),ref:y,style:u,children:[o.enableToolbar?D("div",{className:"cleen-flex cleen-items-center cleen-justify-end cleen-gap-2",children:[k("button",{type:"button",onClick:()=>c(null),disabled:!C,style:{backgroundColor:"rgba(var(--cleen-white))",border:"1px solid rgba(var(--cleen-gray-200))",borderRadius:8,color:o.fontColor,cursor:C?"pointer":"not-allowed",fontSize:13,fontWeight:600,opacity:C?1:.5,padding:"6px 10px"},children:"Reset focus"}),k("button",{type:"button",onClick:f,style:{backgroundColor:"rgba(var(--cleen-white))",border:"1px solid rgba(var(--cleen-gray-200))",borderRadius:8,color:o.fontColor,cursor:"pointer",fontSize:13,fontWeight:600,padding:"6px 10px"},children:"Download SVG"})]}):null,k("div",{style:{flex:1,minHeight:0},children:k(st,{width:"100%",height:"100%",children:k(ct,{data:A,align:o.align,margin:w,node:k(kt,{dimOnHover:o.dimOnHover,dimOpacity:o.dimOpacity,fontColor:o.fontColor??E.fontColor??"rgba(var(--cleen-neutral-800, 38, 38, 38))",highlightOnHover:o.highlightOnHover,hoverState:C,outgoingEdgesById:N,stroke:o.nodeBorderColor??"transparent",strokeWidth:o.nodeBorderWidth}),nodePadding:o.nodePadding,nodeWidth:o.nodeWidth,link:k(At,{chartId:T,dimOnHover:o.dimOnHover,dimOpacity:o.dimOpacity,edgeGradientFill:o.edgeGradientFill,highlightOnHover:o.highlightOnHover,hoverState:C,opacity:o.edgeOpacity}),onClick:(a,h)=>{h==="node"&&d&&Ae(a.payload)&&d(a.payload)},onMouseEnter:i,onMouseLeave:l,children:o.enableTooltip?k(lt,{content:k(g,{}),cursor:!1,allowEscapeViewBox:{x:!1,y:!0},isAnimationActive:!1,wrapperStyle:{transition:"none"}}):null})})})]})}import{applyDefaults as Ot}from"@cleen/ui-core";import{forwardRef as Rt,useEffect as _e,useMemo as He,useRef as V,useState as wt}from"react";var Ie={chart:{type:"treemap",zoom:{enabled:!1},toolbar:{show:!1}},legend:{show:!1},dataLabels:{enabled:!0,style:{fontSize:"12px",fontWeight:400}},plotOptions:{treemap:{enableShades:!0,distributed:!1}},title:{align:"left",style:{color:"rgba(var(--cleen-black))"}}};import{jsx as K,jsxs as Lt}from"react/jsx-runtime";var re=(e,t)=>e.length!==t.length?!1:e.every((r,n)=>{let d=t[n];return Math.round(r.x)===Math.round(d.x)&&Math.round(r.y)===Math.round(d.y)&&Math.round(r.width)===Math.round(d.width)&&Math.round(r.height)===Math.round(d.height)}),Pt=Rt(function({options:t,labelLayout:r="apex",renderTileLabel:n,className:d,style:x,...y},C){let c=V(null),[S,T]=wt([]),o=r==="overlay"&&typeof n=="function",v=V(()=>null);v.current=()=>{let i=c.current;if(!i)return null;let l=i.getBoundingClientRect(),f=i.querySelectorAll(".apexcharts-treemap-rect");return f.length?Array.from(f).map((g,u)=>{let a=g.getBoundingClientRect();return{x:a.left-l.left,y:a.top-l.top,width:a.width,height:a.height,dataIndex:u}}):null};let s=V(0),A=V(()=>{});A.current=()=>{cancelAnimationFrame(s.current);let i=0,l=null,f=()=>{let g=v.current();if(g&&l&&re(l,g)){T(u=>re(u,g)?u:g);return}g&&(l=g),i<30?(i++,s.current=requestAnimationFrame(f)):g&&T(u=>re(u,g)?u:g)};s.current=requestAnimationFrame(f)};let N=He(()=>{let i=Ot(Ie,t??{});if(!o)return i;let l=i.chart?.events??{},f=g=>(...u)=>{A.current(),g?.(...u)};return{...i,dataLabels:{...i.dataLabels,enabled:!1},chart:{...i.chart,animations:{enabled:!1},events:{...l,mounted:f(l.mounted),updated:f(l.updated)}}}},[t,o]);_e(()=>{if(o)return A.current(),()=>cancelAnimationFrame(s.current)},[o]),_e(()=>{if(!o)return;let i=c.current;if(!i||typeof ResizeObserver>"u")return;let l=new ResizeObserver(()=>A.current());return l.observe(i),()=>l.disconnect()},[o]);let R=He(()=>{let i=y.series;return!Array.isArray(i)||i.length===0?[]:(i[0]??{}).data??[]},[y.series]);if(!o)return K(P,{type:"treemap",ref:C,options:N,className:d,style:x,...y});let w={...x,position:"relative"};return Lt("div",{ref:c,className:d,style:w,children:[K(P,{type:"treemap",ref:C,options:N,...y}),S.length>0&&K("div",{style:{position:"absolute",inset:0,pointerEvents:"none",overflow:"hidden"},children:S.map(i=>K("div",{style:{position:"absolute",left:i.x,top:i.y,width:i.width,height:i.height},children:n({point:R[i.dataIndex],width:i.width,height:i.height})},i.dataIndex))})]})});import"react";import{jsx as oe,jsxs as It}from"react/jsx-runtime";var Et=({width:e=240,height:t=80,data:r=[12,28,18,30,24,36],className:n="",style:d})=>{let x=Math.max(...r,1),y=r.map((C,c)=>`${c/(r.length-1)*e},${t-C/x*t}`).join(" ");return It("svg",{width:e,height:t,viewBox:`0 0 ${e} ${t}`,className:n,style:d,role:"img","aria-label":"Simple line chart",children:[oe("rect",{width:"100%",height:"100%",fill:"transparent"}),oe("polyline",{fill:"none",stroke:"rgba(59,130,246,0.9)",strokeWidth:2,points:y,strokeLinecap:"round",strokeLinejoin:"round"}),oe("polygon",{points:`${y} ${e},${t} 0,${t}`,fill:"rgba(59,130,246,0.08)"})]})};export{Ue as BarChart,Ke as BellCurve,ie as Chart,Ze as RadarChart,Tt as SankeyChart,rt as ScatterChart,Et as SimpleChart,Pt as TreemapChart};
|
|
6
|
+
C${c},${r} ${C},${n} ${t},${n}
|
|
7
|
+
`,stroke:m?`url(#${y})`:i.color,strokeWidth:Math.max(1,g),fill:"none",strokeOpacity:m?1:i.opacity*N,className:"cleen-transition-opacity cleen-duration-300 hover:cleen-opacity-100"})]},`CustomLink${p.edgeKey}`)};function Lt({data:e,options:t,className:r,style:n,onNodeClick:c,renderTooltip:C}){let g=dt(null),[x,p]=ut(null),v=ct(),T=He(v),o=pt(I,t),S=At(o.height),l=o.highlightOnHover||o.dimOnHover,b=U(()=>{let a=e.nodes.map((f,u)=>({...f,index:u,name:f.title})),h=e.edges.map((f,u)=>{let A=e.nodes.findIndex(L=>L.id===f.source),w=e.nodes.findIndex(L=>L.id===f.target);return A<0||w<0?null:{...f,edgeKey:kt(f,u),originalEdge:f,source:A,sourceId:f.source,target:w,targetId:f.target,value:f.value}}).filter(Ee);return{nodes:a,links:h}},[e]),O=U(()=>{let a=new Map;for(let h of e.edges){let f=a.get(h.source)??[];f.push(h),a.set(h.source,f)}return a},[e]),R=U(()=>({backgroundColor:o.tooltipBGColor,border:`1px solid ${o.tooltipBorderColor}`,borderRadius:8,boxShadow:"0 12px 32px rgba(15, 23, 42, 0.12)",color:o.fontColor,padding:"10px 12px"}),[o.fontColor,o.tooltipBGColor,o.tooltipBorderColor]),N=U(()=>{let a=new Set(e.edges.map(A=>A.source)),h=new Set(e.edges.map(A=>A.target)),f=e.nodes.reduce((A,w)=>h.has(w.id)?A:Math.max(A,Le(w.title)),0),u=e.nodes.reduce((A,w)=>a.has(w.id)?A:Math.max(A,Le(w.title)),0);return{top:ke,right:Math.max(Te,u+Oe+16),bottom:ke,left:Math.max(Te,f+Oe+16)}},[e]),s=(a,h)=>{if(l){if(h==="node"&&Re(a.payload)){p(Tt(a.payload));return}h==="link"&&J(a.payload)&&p(Ot(a.payload))}},i=()=>{l&&p(null)},d=()=>{if(typeof window>"u")return;let a=g.current?.querySelector("svg");if(!a)return;let h=new XMLSerializer().serializeToString(a),f=new Blob([h],{type:"image/svg+xml;charset=utf-8"}),u=URL.createObjectURL(f),A=document.createElement("a");A.href=u,A.download="sankey-chart.svg",A.click(),window.setTimeout(()=>URL.revokeObjectURL(u),0)},y=({active:a,payload:h})=>{if(!a||!h?.length)return null;let f=h[0]?.payload,u=_e(f);if(!u)return null;let A=J(u),w=Q(f)?f.value:h[0]?.value,L=Q(f)?f.name:void 0,E=Number(u.value??w??0),_=o.valueFormatter?o.valueFormatter(Number(u.value??w??0),A?u.originalEdge:void 0):`${u.value??w??""}`,H=A?we(u.source,u.sourceId):"",F=A?we(u.target,u.targetId):"",j=A?ee(u.title,u.label,u.name,u.originalEdge?.title,u.originalEdge?.label,u.originalEdge?.name,Pe(L),H&&F?`${H} \u2192 ${F}`:void 0):ee(u.title,Pe(L)),Y=A?`${H} \u2192 ${F}`:"";if(C){let Ge=A?{type:"link",edge:u.originalEdge,sourceNodeId:u.sourceId,sourceNodeTitle:H,targetNodeId:u.targetId,targetNodeTitle:F,value:Number.isFinite(E)?E:0,payload:u.originalEdge}:{type:"node",node:u,value:Number.isFinite(E)?E:0,payload:u},ne=C(Ge);return ne?k(It,{children:ne}):null}return!j&&!Y&&!_?null:D("div",{className:G(xt),style:R,children:[j?k("p",{className:G(Z,bt),style:{color:o.fontColor,overflowWrap:"anywhere"},children:j}):null,Y?k("p",{className:G(Z,Ct),style:{color:o.fontColor,overflowWrap:"anywhere"},children:Y}):null,_?k("p",{className:G(Z,St),style:{color:o.fontColor},children:_}):null]})},m={display:"flex",flexDirection:"column",gap:o.enableToolbar?12:0,width:o.width??"100%",height:S,minHeight:S,...n};return D("div",{className:G("cleen cleen-w-full",r),ref:g,style:m,children:[o.enableToolbar?D("div",{className:"cleen-flex cleen-items-center cleen-justify-end cleen-gap-2",children:[k("button",{type:"button",onClick:()=>p(null),disabled:!x,style:{backgroundColor:"rgba(var(--cleen-white))",border:"1px solid rgba(var(--cleen-gray-200))",borderRadius:8,color:o.fontColor,cursor:x?"pointer":"not-allowed",fontSize:13,fontWeight:600,opacity:x?1:.5,padding:"6px 10px"},children:"Reset focus"}),k("button",{type:"button",onClick:d,style:{backgroundColor:"rgba(var(--cleen-white))",border:"1px solid rgba(var(--cleen-gray-200))",borderRadius:8,color:o.fontColor,cursor:"pointer",fontSize:13,fontWeight:600,padding:"6px 10px"},children:"Download SVG"})]}):null,k("div",{style:{flex:1,minHeight:0},children:k(ft,{width:"100%",height:"100%",children:k(ht,{data:b,align:o.align,margin:N,node:k(wt,{dimOnHover:o.dimOnHover,dimOpacity:o.dimOpacity,fontColor:o.fontColor??I.fontColor??"rgba(var(--cleen-neutral-800, 38, 38, 38))",highlightOnHover:o.highlightOnHover,hoverState:x,outgoingEdgesById:O,stroke:o.nodeBorderColor??"transparent",strokeWidth:o.nodeBorderWidth}),nodePadding:o.nodePadding,nodeWidth:o.nodeWidth,link:k(Pt,{chartId:T,dimOnHover:o.dimOnHover,dimOpacity:o.dimOpacity,edgeGradientFill:o.edgeGradientFill,highlightOnHover:o.highlightOnHover,hoverState:x,opacity:o.edgeOpacity}),onClick:(a,h)=>{h==="node"&&c&&Re(a.payload)&&c(a.payload)},onMouseEnter:s,onMouseLeave:i,children:o.enableTooltip?k(mt,{content:k(y,{}),cursor:!1,allowEscapeViewBox:{x:!1,y:!0},isAnimationActive:!1,wrapperStyle:{transition:"none"}}):null})})})]})}import{applyDefaults as Et,cn as _t}from"@cleen/ui-core";import{forwardRef as Ht}from"react";var Fe={chart:{type:"scatter",zoom:{enabled:!1},toolbar:{show:!1}},markers:{shape:"square",size:8,strokeWidth:0},grid:{strokeDashArray:8},legend:{show:!0,horizontalAlign:"right",position:"top",labels:{colors:"rgba(var(--cleen-gray-700))"}},yaxis:{axisBorder:{show:!0,color:"rgba(var(--cleen-gray-200))"},labels:{style:{colors:"rgba(var(--cleen-gray-700))"}}},xaxis:{axisBorder:{show:!0,color:"rgba(var(--cleen-gray-200))"},labels:{style:{colors:"rgba(var(--cleen-gray-700))"}}},title:{align:"left",floating:!0,style:{color:"rgba(var(--cleen-black))"}}},Be={chart:{type:"scatter",zoom:{enabled:!1},toolbar:{show:!1}},stroke:{width:0},fill:{opacity:1},markers:{shape:"circle",size:14,strokeWidth:2,hover:{sizeOffset:0}},grid:{strokeDashArray:0,borderColor:"rgba(var(--cleen-gray-200))",padding:{left:0,right:12},xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}}},legend:{show:!1},xaxis:{min:0,max:210,tickAmount:4,axisBorder:{show:!1},axisTicks:{show:!1},decimalsInFloat:0,title:{text:"Estimated impact \u2192",style:{color:"rgba(var(--cleen-gray-700))",fontSize:"14px",fontWeight:400}},labels:{style:{colors:"rgba(var(--cleen-gray-700))",fontSize:"14px"},formatter(e){let t=Number(e);return Number.isNaN(t)?`${e}`:`$${Math.round(t)}k`}}},tooltip:{enabled:!0,theme:"light",x:{formatter(e){let t=Number(e);return Number.isNaN(t)?`${e}`:`$${Math.round(t)}k`}}}};import{jsx as W,jsxs as Me}from"react/jsx-runtime";var Ft=Ht(function({options:t,variant:r="default",rows:n,className:c,style:C,...g},x){let v=Et(r==="matrix"?Be:Fe,t);if(r==="matrix"&&n?.length){let T=Math.min(...n.map(l=>l.y)),o=Math.max(...n.map(l=>l.y)),S=Array.isArray(v.yaxis)?{}:v.yaxis??{};return Me("div",{className:_t("cleen cleen-grid cleen-grid-cols-[156px_minmax(0,1fr)] cleen-items-stretch cleen-gap-3 cleen-w-full",c),style:C,children:[W("div",{className:"cleen-grid cleen-pt-[18px] cleen-pb-[54px]",style:{gridTemplateRows:`repeat(${n.length}, minmax(0, 1fr))`},children:n.map(l=>Me("div",{className:"cleen-flex cleen-flex-col cleen-justify-center cleen-items-end cleen-gap-1 cleen-pr-2",children:[W("span",{className:"cleen-text-[18px] cleen-font-bold cleen-leading-[1.1] cleen-text-[rgba(var(--cleen-black))]",children:l.label}),l.gapsLabel?W("span",{className:"cleen-text-[14px] cleen-leading-[1.2] cleen-text-gray-700",children:l.gapsLabel}):null]},`${l.label}-${l.y}`))}),W(P,{type:"scatter",ref:x,className:"cleen-w-full cleen-h-full",options:{...v,yaxis:{...S,min:T-.5,max:o+.5,tickAmount:Math.max(o-T,1),axisBorder:{...S.axisBorder,show:!1},axisTicks:{...S.axisTicks,show:!1},labels:{...S.labels,show:!1}},annotations:{...v.annotations,yaxis:[...n.map(l=>({y:l.y,borderColor:l.lineColor||"rgba(var(--cleen-gray-200))",strokeDashArray:0})),...v.annotations?.yaxis||[]]}},...g})]})}return W(P,{type:"scatter",ref:x,className:c,style:C,options:v,...g})});import{applyDefaults as Bt}from"@cleen/ui-core";import{forwardRef as Mt,useEffect as De,useMemo as ze,useRef as K,useState as $t}from"react";var $e={chart:{type:"treemap",zoom:{enabled:!1},toolbar:{show:!1}},legend:{show:!1},dataLabels:{enabled:!0,style:{fontSize:"12px",fontWeight:400}},plotOptions:{treemap:{enableShades:!0,distributed:!1}},title:{align:"left",style:{color:"rgba(var(--cleen-black))"}}};import{jsx as V,jsxs as zt}from"react/jsx-runtime";var re=(e,t)=>e.length!==t.length?!1:e.every((r,n)=>{let c=t[n];return Math.round(r.x)===Math.round(c.x)&&Math.round(r.y)===Math.round(c.y)&&Math.round(r.width)===Math.round(c.width)&&Math.round(r.height)===Math.round(c.height)}),Dt=Mt(function({options:t,labelLayout:r="apex",renderTileLabel:n,className:c,style:C,...g},x){let p=K(null),[v,T]=$t([]),o=r==="overlay"&&typeof n=="function",S=K(()=>null);S.current=()=>{let s=p.current;if(!s)return null;let i=s.getBoundingClientRect(),d=s.querySelectorAll(".apexcharts-treemap-rect");return d.length?Array.from(d).map((y,m)=>{let a=y.getBoundingClientRect();return{x:a.left-i.left,y:a.top-i.top,width:a.width,height:a.height,dataIndex:m}}):null};let l=K(0),b=K(()=>{});b.current=()=>{cancelAnimationFrame(l.current);let s=0,i=null,d=()=>{let y=S.current();if(y&&i&&re(i,y)){T(m=>re(m,y)?m:y);return}y&&(i=y),s<30?(s++,l.current=requestAnimationFrame(d)):y&&T(m=>re(m,y)?m:y)};l.current=requestAnimationFrame(d)};let O=ze(()=>{let s=Bt($e,t??{});if(!o)return s;let i=s.chart?.events??{},d=y=>(...m)=>{b.current(),y?.(...m)};return{...s,dataLabels:{...s.dataLabels,enabled:!1},chart:{...s.chart,animations:{enabled:!1},events:{...i,mounted:d(i.mounted),updated:d(i.updated)}}}},[t,o]);De(()=>{if(o)return b.current(),()=>cancelAnimationFrame(l.current)},[o]),De(()=>{if(!o)return;let s=p.current;if(!s||typeof ResizeObserver>"u")return;let i=new ResizeObserver(()=>b.current());return i.observe(s),()=>i.disconnect()},[o]);let R=ze(()=>{let s=g.series;return!Array.isArray(s)||s.length===0?[]:(s[0]??{}).data??[]},[g.series]);if(!o)return V(P,{type:"treemap",ref:x,options:O,className:c,style:C,...g});let N={...C,position:"relative"};return zt("div",{ref:p,className:c,style:N,children:[V(P,{type:"treemap",ref:x,options:O,...g}),v.length>0&&V("div",{style:{position:"absolute",inset:0,pointerEvents:"none",overflow:"hidden"},children:v.map(s=>V("div",{style:{position:"absolute",left:s.x,top:s.y,width:s.width,height:s.height},children:n({point:R[s.dataIndex],width:s.width,height:s.height})},s.dataIndex))})]})});import"react";import{jsx as oe,jsxs as Wt}from"react/jsx-runtime";var Gt=({width:e=240,height:t=80,data:r=[12,28,18,30,24,36],className:n="",style:c})=>{let C=Math.max(...r,1),g=r.map((x,p)=>`${p/(r.length-1)*e},${t-x/C*t}`).join(" ");return Wt("svg",{width:e,height:t,viewBox:`0 0 ${e} ${t}`,className:n,style:c,role:"img","aria-label":"Simple line chart",children:[oe("rect",{width:"100%",height:"100%",fill:"transparent"}),oe("polyline",{fill:"none",stroke:"rgba(59,130,246,0.9)",strokeWidth:2,points:g,strokeLinecap:"round",strokeLinejoin:"round"}),oe("polygon",{points:`${g} ${e},${t} 0,${t}`,fill:"rgba(59,130,246,0.08)"})]})};export{qe as BarChart,Qe as BellCurve,ie as Chart,ot as FootballFieldChart,lt as RadarChart,Lt as SankeyChart,Ft as ScatterChart,Gt as SimpleChart,Dt as TreemapChart};
|
package/dist/index.d.ts
CHANGED
|
@@ -1960,6 +1960,8 @@ interface DropzoneProps extends NativeInputProps {
|
|
|
1960
1960
|
uploaded?: (totalBytes: number) => ReactNode;
|
|
1961
1961
|
};
|
|
1962
1962
|
showUploadedFiles?: boolean;
|
|
1963
|
+
loadingWhileUploading?: boolean;
|
|
1964
|
+
isLoading?: boolean;
|
|
1963
1965
|
containerRef?: RefObject<HTMLDivElement>;
|
|
1964
1966
|
infoLabels?: InfoLabelsProps;
|
|
1965
1967
|
className?: string;
|