@cleen/ui 0.1.71 → 0.1.73
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 +2 -0
- package/dist/charts/index.js +2 -2
- package/dist/index.d.ts +47 -3
- package/dist/index.js +7 -7
- package/package.json +1 -1
package/dist/charts/index.d.ts
CHANGED
package/dist/charts/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{cn as ke}from"@cleen/ui-core";import{forwardRef as ve}from"react";import Ae from"react-apexcharts";var U={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 q}from"react/jsx-runtime";var Z=ve(function({type:t="line",series:r,options:o={},width:g="100%",height:m=350,className:p,style:y},d){let S={...U,...o,chart:{...U.chart,...o.chart,type:t}};return q("div",{className:ke("cleen",p),style:y,children:q(Ae,{options:S,series:r,type:t,width:g,height:m,ref:d})})}),P=Z;import{applyDefaults as z}from"@cleen/ui-core";import{forwardRef as Oe,useMemo as I}from"react";import{ColorHelpers as H}from"@cleen/ui-core";var J={marker:{size:2,fillColor:"rgba(var(--cleen-gray), 0.8)",strokeColor:"rgba(var(--cleen-gray), 0.8)",offsetY:-16,shape:"triangle"},label:{borderWidth:0,offsetY:-20,style:{color:"rgba(var(--cleen-gray), 0.8)",background:"transparent",fontSize:"11px"}}},Q={label:{borderColor:"transparent",style:{color:"rgba(var(--cleen-white))",background:"rgba(var(--cleen-primary))"}},fillColor:"rgba(var(--cleen-primary))"},ee={label:{borderWidth:0,offsetY:-15,orientation:"horizontal",style:{color:"rgba(var(--cleen-primary))",background:"transparent",fontSize:"16px",fontWeight:700}},borderColor:"rgba(var(--cleen-primary))"},te={marker:{size:8,fillColor:"rgba(var(--cleen-primary))",strokeColor:"rgba(var(--cleen-white))"}},re={chart:{zoom:{enabled:!1},toolbar:{show:!1},animations:{enabled:!1}},stroke:{curve:"monotoneCubic",width:2.5},colors:[H.getComputedColor("var(--cleen-error)"),H.getComputedColor("var(--cleen-primary)"),H.getComputedColor("var(--cleen-success)")],fill:{type:"gradient",gradient:{shade:"light",type:"vertical",shadeIntensity:.6,gradientToColors:[H.getComputedColor("var(--cleen-error)")||"",H.getComputedColor("var(--cleen-primary)")||"",H.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 oe=(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}),ne=(e,t,r,o)=>({middle:e,leftSigma:e-t,left2Sigma:e-2*t,left:r,rightSigma:e+t,right2Sigma:e+2*t,right:o}),ae=(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 Te}from"react/jsx-runtime";var Ne=Oe(function({serie:t,labels:r,sigma:o,pointAnnotations:g,rangeAnnotations:m,highlightAnnotations:p,options:y,height:d=360,...S},n){let b=I(()=>t.sort((u,h)=>u.x-h.x),[t]),k=I(()=>{let u=new Map;return t.forEach(h=>u.set(h.x,h.y)),u},[t]),c=b[Math.floor(b.length/2)],A=I(()=>{let{below:u,middle:h,above:C}=t.reduce((a,i)=>(i.x<c.x-2*o?a.below.push(i):i.x>=c.x+2*o?(i.x===c.x+2*o&&a.middle.push(i),a.above.push(i)):(i.x===c.x-2*o&&a.below.push(i),a.middle.push(i)),a),{below:[],middle:[],above:[]});return[{name:r?.below||"Below threshold",data:u},{name:r?.middle||"Middle grounds",data:h},{name:r?.above||"Above threshold",data:C}]},[o,t,r,c]),O=I(()=>{if(!g)return[];let u=oe(c.x,o);return Object.entries(g).map(([h,C])=>{let a=u[h];return{x:a,y:k.get(a)||0,...z(J,C)}})},[g,o,k]),N=I(()=>{if(!m)return[];let u=ne(c.x,o,b[0].x,b[b.length-1].x);return m.map(h=>{let C=ae(h,u);return{...z(Q,h),...C}})},[m,o,b]),{highlightPointAnnotations:R,highlightLineAnnotations:T}=I(()=>{if(!p)return{highlightLineAnnotations:[],highlightPointAnnotations:[]};let u=[],h=[],C=({x:i,line:s})=>{h.push(z(ee,{x:i,...s}))},a=({x:i,y:s,point:l})=>{u.push(z(te,{x:i,y:s,...l}))};return p?.forEach(i=>{switch(i.show){case"line":C(i);break;case"point":a(i);break;case"both":C(i),a(i);break;default:break}}),{highlightPointAnnotations:u,highlightLineAnnotations:h}},[p]);return Te(P,{series:A,options:{...z(re,y),annotations:{...y?.annotations,points:[...O,...R,...y?.annotations?.points||[]],xaxis:[...N,...T,...y?.annotations?.xaxis||[]]}},height:d,ref:n,type:"area",...S})});import{applyDefaults as Re}from"@cleen/ui-core";import{forwardRef as Pe}from"react";var ie={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 Le}from"react/jsx-runtime";var we=Pe(function({options:t,...r},o){return Le(P,{type:"radar",ref:o,options:Re(ie,t),...r})});import{applyDefaults as He,cn as Ie}from"@cleen/ui-core";import{forwardRef as Ee}from"react";var se={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), 0.8)"}},yaxis:{axisBorder:{show:!0,color:"rgba(var(--cleen-gray), .2)"},labels:{style:{colors:"rgba(var(--cleen-gray), 0.8)"}}},xaxis:{axisBorder:{show:!0,color:"rgba(var(--cleen-gray), .2)"},labels:{style:{colors:"rgba(var(--cleen-gray), 0.8)"}}},title:{align:"left",floating:!0,style:{color:"rgba(var(--cleen-black))"}}},le={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), 0.12)",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), 0.8)",fontSize:"14px",fontWeight:400}},labels:{style:{colors:"rgba(var(--cleen-gray), 0.8)",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 M,jsxs as ce}from"react/jsx-runtime";var _e=Ee(function({options:t,variant:r="default",rows:o,className:g,style:m,...p},y){let S=He(r==="matrix"?le:se,t);if(r==="matrix"&&o?.length){let n=Math.min(...o.map(c=>c.y)),b=Math.max(...o.map(c=>c.y)),k=Array.isArray(S.yaxis)?{}:S.yaxis??{};return ce("div",{className:Ie("cleen",g),style:{display:"grid",gridTemplateColumns:"156px minmax(0, 1fr)",alignItems:"stretch",gap:"12px",width:"100%",...m},children:[M("div",{style:{display:"grid",gridTemplateRows:`repeat(${o.length}, minmax(0, 1fr))`,padding:"18px 0 54px"},children:o.map(c=>ce("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-end",gap:"4px",paddingRight:"8px"},children:[M("span",{style:{fontSize:"18px",fontWeight:700,lineHeight:1.1,color:"rgba(var(--cleen-black))"},children:c.label}),c.gapsLabel?M("span",{style:{fontSize:"14px",lineHeight:1.2,color:"rgba(var(--cleen-gray), 0.8)"},children:c.gapsLabel}):null]},`${c.label}-${c.y}`))}),M(P,{type:"scatter",ref:y,className:"cleen-w-full",style:{height:"100%"},options:{...S,yaxis:{...k,min:n-.5,max:b+.5,tickAmount:Math.max(b-n,1),axisBorder:{...k.axisBorder,show:!1},axisTicks:{...k.axisTicks,show:!1},labels:{...k.labels,show:!1}},annotations:{...S.annotations,yaxis:[...o.map(c=>({y:c.y,borderColor:c.lineColor||"rgba(var(--cleen-gray), 0.12)",strokeDashArray:0})),...S.annotations?.yaxis||[]]}},...p})]})}return M(P,{type:"scatter",ref:y,className:g,style:m,options:S,...p})});import{applyDefaults as $e,cn as Be}from"@cleen/ui-core";import{useId as ze,useMemo as G,useRef as Me,useState as De}from"react";import{Layer as be,Rectangle as pe,ResponsiveContainer as Fe,Sankey as Ge,Tooltip as We}from"recharts";var w={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), 0.2)"};import{jsx as x,jsxs as _}from"react/jsx-runtime";var Xe=typeof w.height=="number"?w.height:420,de=40,ue=60,ge=8,Ue=8;function Ke(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 Xe}function fe(e){return typeof e=="object"&&e!==null&&"id"in e&&"title"in e}function je(e){return typeof e=="object"&&e!==null&&"id"in e&&"title"in e&&"index"in e&&"name"in e}var me=["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 xe(e){return e!=null}function Ve(e,t){return[e.source,e.target,e.type??"",e.label??"",e.value,t].join("-").replace(/\s+/g,"_")}function W(e,t){return typeof e=="object"&&e!==null?e.id:t}function he(e,t){return typeof e=="object"&&e!==null?e.title:t}function K(e){return typeof e=="object"&&e!==null&&"edgeKey"in e&&"sourceId"in e&&"targetId"in e}function j(e){return typeof e=="object"&&e!==null&&"payload"in e}function Ye(e){if(j(e))return e.payload;if(K(e)||je(e))return e}function Se(e){return e.replace(/[^a-zA-Z0-9_-]/g,"_")}function E(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 o=e.match(/^rgba\(\s*(\d+\s*,\s*\d+\s*,\s*\d+)\s*,\s*([0-9]*\.?[0-9]+)\s*\)$/i);return o?{color:`rgb(${o[1]})`,opacity:Number.parseFloat(o[2])}:{color:e,opacity:1}}function V(e,t){return E(t??me[e%me.length])}function ye(e){return e.length*Ue}function qe(e){let t=new Set,r=new Set([e.id]);for(let o of[...e.sourceLinks??[],...e.targetLinks??[]])t.add(o.edgeKey),r.add(W(o.source,o.sourceId)),r.add(W(o.target,o.targetId));return{activeLinkKeys:t,activeNodeIds:r}}function Ze(e){return{activeLinkKeys:new Set([e.edgeKey]),activeNodeIds:new Set([W(e.source,e.sourceId),W(e.target,e.targetId)])}}function Je(e,t,r,o,g){return!e||e.activeNodeIds.has(t)?1:o?g??w.dimOpacity??.2:r?.55:1}function Qe(e,t,r,o,g,m){return e?e.activeLinkKeys.has(t)?o?Math.max(r,.9):r:g?m??w.dimOpacity??.2:o?Math.min(r,.3):r:r}var et=({dimOnHover:e,dimOpacity:t,fontColor:r,x:o,y:g,width:m,height:p,highlightOnHover:y,hoverState:d,index:S,outgoingEdgesById:n,payload:b,stroke:k,strokeWidth:c})=>{if(b===void 0||o===void 0||g===void 0||m===void 0||p===void 0||S===void 0)return null;let A=n?.get(b.id)??[],O=A.length>0,N=V(S,b.color),R=E(r),T=Je(d,b.id,y,e,t),u=new Set(A.map(s=>s.color).filter(xe)),h=Array.from(u)[0],C=O&&A.length>1&&u.size>1&&u.size===A.length,a=C?A:[],i=a.reduce((s,l)=>s+(l.value??0),0);return _(be,{children:[C&&i>0?a.map((s,l)=>{let f=a.slice(0,l).reduce((X,F)=>X+(F.value??0),0),v=g+f/i*p,L=(s.value??0)/i*p,D=E(s.color??N.color),$=l===0,B=l===a.length-1;return x(pe,{x:o,y:v,width:m,height:L,fill:D.color,fillOpacity:D.opacity*T,stroke:k,strokeWidth:c,radius:[$?2:0,$?2:0,B?2:0,B?2:0]},`${s.source}-${s.target}-${l}`)}):x(pe,{x:o,y:g,width:m,height:p,fill:O&&u.size===1?E(h??N.color).color:N.color,fillOpacity:(O&&u.size===1?E(h??N.color).opacity:N.opacity)*T,stroke:k,strokeWidth:c,radius:[2,2,2,2]}),x("text",{textAnchor:O?"end":"start",x:O?o-8:o+m+8,y:g+p/2,dy:"0.35em",fontSize:"14",fill:R.color,fillOpacity:R.opacity*T,fontWeight:600,children:b.name})]},`CustomNode${S}`)},tt=({sourceX:e,targetX:t,sourceY:r,targetY:o,sourceControlX:g,targetControlX:m,linkWidth:p,index:y,payload:d,opacity:S,chartId:n,dimOnHover:b,dimOpacity:k,edgeGradientFill:c,highlightOnHover:A,hoverState:O})=>{if(d===void 0||e===void 0||t===void 0||r===void 0||o===void 0||g===void 0||m===void 0||p===void 0)return null;let N=S??w.edgeOpacity??.4,R=Qe(O,d.edgeKey,N,A,b,k),T=d.color?E(d.color):null,u=T??V(typeof d.source=="object"?d.source.index:0,typeof d.source=="object"?d.source.color:void 0),h=T??V(typeof d.target=="object"?d.target.index:1,typeof d.target=="object"?d.target.color:void 0),C=Se(`linkGradient-${n}-${d.edgeKey}-${y??d.value}`),a=c!==!1&&T===null;return _(be,{children:[a?x("defs",{children:_("linearGradient",{id:C,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[x("stop",{offset:"0%",stopColor:u.color,stopOpacity:u.opacity*R}),x("stop",{offset:"100%",stopColor:h.color,stopOpacity:h.opacity*R})]})}):null,x("path",{d:`
|
|
1
|
+
import{cn as Ne}from"@cleen/ui-core";import{forwardRef as Te}from"react";import Re from"react-apexcharts";var K={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 J}from"react/jsx-runtime";var Q=Te(function({type:t="line",series:r,options:o={},width:g="100%",height:m=350,className:p,style:y},d){let S={...K,...o,chart:{...K.chart,...o.chart,type:t}};return J("div",{className:Ne("cleen",p),style:y,children:J(Re,{options:S,series:r,type:t,width:g,height:m,ref:d})})}),P=Q;import{applyDefaults as z}from"@cleen/ui-core";import{forwardRef as Pe,useMemo as _}from"react";import{ColorHelpers as E}from"@cleen/ui-core";var ee={marker:{size:2,fillColor:"rgba(var(--cleen-gray), 0.8)",strokeColor:"rgba(var(--cleen-gray), 0.8)",offsetY:-16,shape:"triangle"},label:{borderWidth:0,offsetY:-20,style:{color:"rgba(var(--cleen-gray), 0.8)",background:"transparent",fontSize:"11px"}}},te={label:{borderColor:"transparent",style:{color:"rgba(var(--cleen-white))",background:"rgba(var(--cleen-primary))"}},fillColor:"rgba(var(--cleen-primary))"},re={label:{borderWidth:0,offsetY:-15,orientation:"horizontal",style:{color:"rgba(var(--cleen-primary))",background:"transparent",fontSize:"16px",fontWeight:700}},borderColor:"rgba(var(--cleen-primary))"},oe={marker:{size:8,fillColor:"rgba(var(--cleen-primary))",strokeColor:"rgba(var(--cleen-white))"}},ne={chart:{zoom:{enabled:!1},toolbar:{show:!1},animations:{enabled:!1}},stroke:{curve:"monotoneCubic",width:2.5},colors:[E.getComputedColor("var(--cleen-error)"),E.getComputedColor("var(--cleen-primary)"),E.getComputedColor("var(--cleen-success)")],fill:{type:"gradient",gradient:{shade:"light",type:"vertical",shadeIntensity:.6,gradientToColors:[E.getComputedColor("var(--cleen-error)")||"",E.getComputedColor("var(--cleen-primary)")||"",E.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 ae=(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}),ie=(e,t,r,o)=>({middle:e,leftSigma:e-t,left2Sigma:e-2*t,left:r,rightSigma:e+t,right2Sigma:e+2*t,right:o}),se=(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 Le}from"react/jsx-runtime";var we=Pe(function({serie:t,labels:r,sigma:o,pointAnnotations:g,rangeAnnotations:m,highlightAnnotations:p,options:y,height:d=360,...S},n){let b=_(()=>t.sort((u,h)=>u.x-h.x),[t]),k=_(()=>{let u=new Map;return t.forEach(h=>u.set(h.x,h.y)),u},[t]),c=b[Math.floor(b.length/2)],A=_(()=>{let{below:u,middle:h,above:C}=t.reduce((a,i)=>(i.x<c.x-2*o?a.below.push(i):i.x>=c.x+2*o?(i.x===c.x+2*o&&a.middle.push(i),a.above.push(i)):(i.x===c.x-2*o&&a.below.push(i),a.middle.push(i)),a),{below:[],middle:[],above:[]});return[{name:r?.below||"Below threshold",data:u},{name:r?.middle||"Middle grounds",data:h},{name:r?.above||"Above threshold",data:C}]},[o,t,r,c]),O=_(()=>{if(!g)return[];let u=ae(c.x,o);return Object.entries(g).map(([h,C])=>{let a=u[h];return{x:a,y:k.get(a)||0,...z(ee,C)}})},[g,o,k]),N=_(()=>{if(!m)return[];let u=ie(c.x,o,b[0].x,b[b.length-1].x);return m.map(h=>{let C=se(h,u);return{...z(te,h),...C}})},[m,o,b]),{highlightPointAnnotations:R,highlightLineAnnotations:T}=_(()=>{if(!p)return{highlightLineAnnotations:[],highlightPointAnnotations:[]};let u=[],h=[],C=({x:i,line:s})=>{h.push(z(re,{x:i,...s}))},a=({x:i,y:s,point:l})=>{u.push(z(oe,{x:i,y:s,...l}))};return p?.forEach(i=>{switch(i.show){case"line":C(i);break;case"point":a(i);break;case"both":C(i),a(i);break;default:break}}),{highlightPointAnnotations:u,highlightLineAnnotations:h}},[p]);return Le(P,{series:A,options:{...z(ne,y),annotations:{...y?.annotations,points:[...O,...R,...y?.annotations?.points||[]],xaxis:[...N,...T,...y?.annotations?.xaxis||[]]}},height:d,ref:n,type:"area",...S})});import{applyDefaults as He}from"@cleen/ui-core";import{forwardRef as Ie}from"react";var le={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 _e}from"react/jsx-runtime";var Ee=Ie(function({options:t,...r},o){return _e(P,{type:"radar",ref:o,options:He(le,t),...r})});import{applyDefaults as $e,cn as Be}from"@cleen/ui-core";import{forwardRef as ze}from"react";var ce={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), 0.8)"}},yaxis:{axisBorder:{show:!0,color:"rgba(var(--cleen-gray), .2)"},labels:{style:{colors:"rgba(var(--cleen-gray), 0.8)"}}},xaxis:{axisBorder:{show:!0,color:"rgba(var(--cleen-gray), .2)"},labels:{style:{colors:"rgba(var(--cleen-gray), 0.8)"}}},title:{align:"left",floating:!0,style:{color:"rgba(var(--cleen-black))"}}},pe={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), 0.12)",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), 0.8)",fontSize:"14px",fontWeight:400}},labels:{style:{colors:"rgba(var(--cleen-gray), 0.8)",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 M,jsxs as de}from"react/jsx-runtime";var Me=ze(function({options:t,variant:r="default",rows:o,className:g,style:m,...p},y){let S=$e(r==="matrix"?pe:ce,t);if(r==="matrix"&&o?.length){let n=Math.min(...o.map(c=>c.y)),b=Math.max(...o.map(c=>c.y)),k=Array.isArray(S.yaxis)?{}:S.yaxis??{};return de("div",{className:Be("cleen",g),style:{display:"grid",gridTemplateColumns:"156px minmax(0, 1fr)",alignItems:"stretch",gap:"12px",width:"100%",...m},children:[M("div",{style:{display:"grid",gridTemplateRows:`repeat(${o.length}, minmax(0, 1fr))`,padding:"18px 0 54px"},children:o.map(c=>de("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-end",gap:"4px",paddingRight:"8px"},children:[M("span",{style:{fontSize:"18px",fontWeight:700,lineHeight:1.1,color:"rgba(var(--cleen-black))"},children:c.label}),c.gapsLabel?M("span",{style:{fontSize:"14px",lineHeight:1.2,color:"rgba(var(--cleen-gray), 0.8)"},children:c.gapsLabel}):null]},`${c.label}-${c.y}`))}),M(P,{type:"scatter",ref:y,className:"cleen-w-full",style:{height:"100%"},options:{...S,yaxis:{...k,min:n-.5,max:b+.5,tickAmount:Math.max(b-n,1),axisBorder:{...k.axisBorder,show:!1},axisTicks:{...k.axisTicks,show:!1},labels:{...k.labels,show:!1}},annotations:{...S.annotations,yaxis:[...o.map(c=>({y:c.y,borderColor:c.lineColor||"rgba(var(--cleen-gray), 0.12)",strokeDashArray:0})),...S.annotations?.yaxis||[]]}},...p})]})}return M(P,{type:"scatter",ref:y,className:g,style:m,options:S,...p})});import{applyDefaults as De,cn as Fe}from"@cleen/ui-core";import{useId as Ge,useMemo as F,useRef as We,useState as Xe}from"react";import{Layer as Ce,Rectangle as ue,ResponsiveContainer as Ue,Sankey as Ke,Tooltip as je}from"recharts";var L={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), 0.2)"};import{jsx as x,jsxs as B}from"react/jsx-runtime";var Ve=typeof L.height=="number"?L.height:420,ge=40,fe=60,me=8,Ye=8;function qe(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 Ve}function he(e){return typeof e=="object"&&e!==null&&"id"in e&&"title"in e}function Ze(e){return typeof e=="object"&&e!==null&&"id"in e&&"title"in e&&"index"in e&&"name"in e}var ye=["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 ke(e){return e!=null}function Je(e,t){return[e.source,e.target,e.type??"",e.label??"",e.value,t].join("-").replace(/\s+/g,"_")}function W(e,t){return typeof e=="object"&&e!==null?e.id:t}function be(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 V(e){return typeof e=="object"&&e!==null&&"payload"in e}function ve(e){if(V(e))return ve(e.payload);if(j(e)||Ze(e))return e}function G(...e){return e.map(t=>typeof t=="number"?String(t):t?.trim()??"").find(t=>t.length>0)}function xe(e){let t=G(e);if(t)return/[\p{L}\p{N}]/u.test(t)?t:void 0}function Ae(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 o=e.match(/^rgba\(\s*(\d+\s*,\s*\d+\s*,\s*\d+)\s*,\s*([0-9]*\.?[0-9]+)\s*\)$/i);return o?{color:`rgb(${o[1]})`,opacity:Number.parseFloat(o[2])}:{color:e,opacity:1}}function Y(e,t){return $(t??ye[e%ye.length])}function Se(e){return e.length*Ye}function Qe(e){let t=new Set,r=new Set([e.id]);for(let o of[...e.sourceLinks??[],...e.targetLinks??[]])t.add(o.edgeKey),r.add(W(o.source,o.sourceId)),r.add(W(o.target,o.targetId));return{activeLinkKeys:t,activeNodeIds:r}}function et(e){return{activeLinkKeys:new Set([e.edgeKey]),activeNodeIds:new Set([W(e.source,e.sourceId),W(e.target,e.targetId)])}}function tt(e,t,r,o,g){return!e||e.activeNodeIds.has(t)?1:o?g??L.dimOpacity??.2:r?.55:1}function rt(e,t,r,o,g,m){return e?e.activeLinkKeys.has(t)?o?Math.max(r,.9):r:g?m??L.dimOpacity??.2:o?Math.min(r,.3):r:r}var ot=({dimOnHover:e,dimOpacity:t,fontColor:r,x:o,y:g,width:m,height:p,highlightOnHover:y,hoverState:d,index:S,outgoingEdgesById:n,payload:b,stroke:k,strokeWidth:c})=>{if(b===void 0||o===void 0||g===void 0||m===void 0||p===void 0||S===void 0)return null;let A=n?.get(b.id)??[],O=A.length>0,N=Y(S,b.color),R=$(r),T=tt(d,b.id,y,e,t),u=new Set(A.map(s=>s.color).filter(ke)),h=Array.from(u)[0],C=O&&A.length>1&&u.size>1&&u.size===A.length,a=C?A:[],i=a.reduce((s,l)=>s+(l.value??0),0);return B(Ce,{children:[C&&i>0?a.map((s,l)=>{let f=a.slice(0,l).reduce((X,U)=>X+(U.value??0),0),v=g+f/i*p,w=(s.value??0)/i*p,D=$(s.color??N.color),H=l===0,I=l===a.length-1;return x(ue,{x:o,y:v,width:m,height:w,fill:D.color,fillOpacity:D.opacity*T,stroke:k,strokeWidth:c,radius:[H?2:0,H?2:0,I?2:0,I?2:0]},`${s.source}-${s.target}-${l}`)}):x(ue,{x:o,y:g,width:m,height:p,fill:O&&u.size===1?$(h??N.color).color:N.color,fillOpacity:(O&&u.size===1?$(h??N.color).opacity:N.opacity)*T,stroke:k,strokeWidth:c,radius:[2,2,2,2]}),x("text",{textAnchor:O?"end":"start",x:O?o-8:o+m+8,y:g+p/2,dy:"0.35em",fontSize:"14",fill:R.color,fillOpacity:R.opacity*T,fontWeight:600,children:b.name})]},`CustomNode${S}`)},nt=({sourceX:e,targetX:t,sourceY:r,targetY:o,sourceControlX:g,targetControlX:m,linkWidth:p,index:y,payload:d,opacity:S,chartId:n,dimOnHover:b,dimOpacity:k,edgeGradientFill:c,highlightOnHover:A,hoverState:O})=>{if(d===void 0||e===void 0||t===void 0||r===void 0||o===void 0||g===void 0||m===void 0||p===void 0)return null;let N=S??L.edgeOpacity??.4,R=rt(O,d.edgeKey,N,A,b,k),T=d.color?$(d.color):null,u=T??Y(typeof d.source=="object"?d.source.index:0,typeof d.source=="object"?d.source.color:void 0),h=T??Y(typeof d.target=="object"?d.target.index:1,typeof d.target=="object"?d.target.color:void 0),C=Ae(`linkGradient-${n}-${d.edgeKey}-${y??d.value}`),a=c!==!1&&T===null;return B(Ce,{children:[a?x("defs",{children:B("linearGradient",{id:C,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[x("stop",{offset:"0%",stopColor:u.color,stopOpacity:u.opacity*R}),x("stop",{offset:"100%",stopColor:h.color,stopOpacity:h.opacity*R})]})}):null,x("path",{d:`
|
|
2
2
|
M${e},${r}
|
|
3
3
|
C${g},${r} ${m},${o} ${t},${o}
|
|
4
|
-
`,stroke:a?`url(#${C})`:u.color,strokeWidth:Math.max(1,p),fill:"none",strokeOpacity:a?1:u.opacity*R,className:"cleen-transition-opacity cleen-duration-300 hover:cleen-opacity-100"})]},`CustomLink${d.edgeKey}`)};function
|
|
4
|
+
`,stroke:a?`url(#${C})`:u.color,strokeWidth:Math.max(1,p),fill:"none",strokeOpacity:a?1:u.opacity*R,className:"cleen-transition-opacity cleen-duration-300 hover:cleen-opacity-100"})]},`CustomLink${d.edgeKey}`)};function at({data:e,options:t,className:r,style:o,onNodeClick:g}){let m=We(null),[p,y]=Xe(null),d=Ge(),S=Ae(d),n=De(L,t),b=qe(n.height),k=n.highlightOnHover||n.dimOnHover,c=F(()=>{let a=e.nodes.map((s,l)=>({...s,index:l,name:s.title})),i=e.edges.map((s,l)=>{let f=e.nodes.findIndex(w=>w.id===s.source),v=e.nodes.findIndex(w=>w.id===s.target);return f<0||v<0?null:{...s,edgeKey:Je(s,l),originalEdge:s,source:f,sourceId:s.source,target:v,targetId:s.target,value:s.value}}).filter(ke);return{nodes:a,links:i}},[e]),A=F(()=>{let a=new Map;for(let i of e.edges){let s=a.get(i.source)??[];s.push(i),a.set(i.source,s)}return a},[e]),O=F(()=>({backgroundColor:n.tooltipBGColor,border:`1px solid ${n.tooltipBorderColor}`,borderRadius:8,boxShadow:"0 12px 32px rgba(15, 23, 42, 0.12)",color:n.fontColor,padding:"10px 12px"}),[n.fontColor,n.tooltipBGColor,n.tooltipBorderColor]),N=F(()=>{let a=new Set(e.edges.map(f=>f.source)),i=new Set(e.edges.map(f=>f.target)),s=e.nodes.reduce((f,v)=>i.has(v.id)?f:Math.max(f,Se(v.title)),0),l=e.nodes.reduce((f,v)=>a.has(v.id)?f:Math.max(f,Se(v.title)),0);return{top:ge,right:Math.max(fe,l+me+16),bottom:ge,left:Math.max(fe,s+me+16)}},[e]),R=(a,i)=>{if(k){if(i==="node"&&he(a.payload)){y(Qe(a.payload));return}i==="link"&&j(a.payload)&&y(et(a.payload))}},T=()=>{k&&y(null)},u=()=>{if(typeof window>"u")return;let a=m.current?.querySelector("svg");if(!a)return;let i=new XMLSerializer().serializeToString(a),s=new Blob([i],{type:"image/svg+xml;charset=utf-8"}),l=URL.createObjectURL(s),f=document.createElement("a");f.href=l,f.download="sankey-chart.svg",f.click(),window.setTimeout(()=>URL.revokeObjectURL(l),0)},h=({active:a,payload:i})=>{if(!a||!i?.length)return null;let s=i[0]?.payload,l=ve(s);if(!l)return null;let f=j(l),v=V(s)?s.value:i[0]?.value,w=V(s)?s.name:void 0,D=n.valueFormatter?n.valueFormatter(Number(l.value??v??0),f?l.originalEdge:void 0):`${l.value??v??""}`,H=f?be(l.source,l.sourceId):"",I=f?be(l.target,l.targetId):"",X=G(H&&I?`${H} \u2192 ${I}`:void 0),U=f?G(l.title,l.label,l.name,l.originalEdge?.title,l.originalEdge?.label,l.originalEdge?.name,xe(w),X):G(l.title,xe(w)),Z=f?`${H} \u2192 ${I}`:"";return B("div",{style:O,children:[x("div",{style:{color:n.fontColor,fontWeight:600},children:U}),Z?x("div",{style:{color:n.fontColor,fontSize:13,marginTop:4,opacity:.72},children:Z}):null,x("div",{style:{color:n.fontColor,fontSize:13,marginTop:6},children:D})]})},C={display:"flex",flexDirection:"column",gap:n.enableToolbar?12:0,width:n.width??"100%",height:b,minHeight:b,...o};return B("div",{className:Fe("cleen cleen-w-full",r),ref:m,style:C,children:[n.enableToolbar?B("div",{className:"cleen-flex cleen-items-center cleen-justify-end cleen-gap-2",children:[x("button",{type:"button",onClick:()=>y(null),disabled:!p,style:{backgroundColor:"rgba(var(--cleen-white))",border:"1px solid rgba(var(--cleen-gray), 0.2)",borderRadius:8,color:n.fontColor,cursor:p?"pointer":"not-allowed",fontSize:13,fontWeight:600,opacity:p?1:.5,padding:"6px 10px"},children:"Reset focus"}),x("button",{type:"button",onClick:u,style:{backgroundColor:"rgba(var(--cleen-white))",border:"1px solid rgba(var(--cleen-gray), 0.2)",borderRadius:8,color:n.fontColor,cursor:"pointer",fontSize:13,fontWeight:600,padding:"6px 10px"},children:"Download SVG"})]}):null,x("div",{style:{flex:1,minHeight:0},children:x(Ue,{width:"100%",height:"100%",children:x(Ke,{data:c,align:n.align,margin:N,node:x(ot,{dimOnHover:n.dimOnHover,dimOpacity:n.dimOpacity,fontColor:n.fontColor??L.fontColor??"rgba(var(--cleen-neutral-800, 38, 38, 38))",highlightOnHover:n.highlightOnHover,hoverState:p,outgoingEdgesById:A,stroke:n.nodeBorderColor??"transparent",strokeWidth:n.nodeBorderWidth}),nodePadding:n.nodePadding,nodeWidth:n.nodeWidth,link:x(nt,{chartId:S,dimOnHover:n.dimOnHover,dimOpacity:n.dimOpacity,edgeGradientFill:n.edgeGradientFill,highlightOnHover:n.highlightOnHover,hoverState:p,opacity:n.edgeOpacity}),onClick:(a,i)=>{i==="node"&&g&&he(a.payload)&&g(a.payload)},onMouseEnter:R,onMouseLeave:T,children:n.enableTooltip?x(je,{content:x(h,{}),cursor:!1}):null})})})]})}import{applyDefaults as it}from"@cleen/ui-core";import{forwardRef as st}from"react";var Oe={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 ct}from"react/jsx-runtime";var lt=st(function({options:t,...r},o){return ct(P,{type:"treemap",ref:o,options:it(Oe,t),...r})});import"react";import{jsx as q,jsxs as dt}from"react/jsx-runtime";var pt=({width:e=240,height:t=80,data:r=[12,28,18,30,24,36],className:o="",style:g})=>{let m=Math.max(...r,1),p=r.map((y,d)=>`${d/(r.length-1)*e},${t-y/m*t}`).join(" ");return dt("svg",{width:e,height:t,viewBox:`0 0 ${e} ${t}`,className:o,style:g,role:"img","aria-label":"Simple line chart",children:[q("rect",{width:"100%",height:"100%",fill:"transparent"}),q("polyline",{fill:"none",stroke:"rgba(59,130,246,0.9)",strokeWidth:2,points:p,strokeLinecap:"round",strokeLinejoin:"round"}),q("polygon",{points:`${p} ${e},${t} 0,${t}`,fill:"rgba(59,130,246,0.08)"})]})};export{we as BellCurve,Q as Chart,Ee as RadarChart,at as SankeyChart,Me as ScatterChart,pt as SimpleChart,lt as TreemapChart};
|
package/dist/index.d.ts
CHANGED
|
@@ -347,6 +347,7 @@ type CardProps = ComponentProps<'div'> & {
|
|
|
347
347
|
isGlass?: boolean;
|
|
348
348
|
p?: number;
|
|
349
349
|
gap?: number;
|
|
350
|
+
radius?: number;
|
|
350
351
|
hoverable?: boolean;
|
|
351
352
|
classNames?: {
|
|
352
353
|
container?: string;
|
|
@@ -2107,7 +2108,7 @@ interface GroupSelectorProps<G = unknown, I = unknown> {
|
|
|
2107
2108
|
*/
|
|
2108
2109
|
declare const GroupSelector: <G = unknown, I = unknown>({ position, labels, groups, selectedItemID, groupThreeDotMenuOptions, itemThreeDotMenuOptions, refetchData, onGroupSave, onItemSave, onGroupThreeDotMenuClick, onItemThreeDotMenuClick, onSearchChange, onItemSelect, groupIDKey, groupTitleKey, itemsKey, itemIDKey, itemGroupIDKey, itemTitleKey, itemSubtitleKey, newValueMinLength, isLoading, isGroupSaving, isItemSaving, selectedColor, hasFiltering, zIndex, className, classNames, style, styles, }: GroupSelectorProps<G, I>) => JSX.Element;
|
|
2109
2110
|
|
|
2110
|
-
declare const colorList: readonly ["blue", "lighter-blue", "primary", "indigo", "green", "red", "purple", "pink", "orange", "gray"];
|
|
2111
|
+
declare const colorList: readonly ["blue", "lighter-blue", "primary", "indigo", "green", "red", "purple", "pink", "orange", "gray", "yellow"];
|
|
2111
2112
|
type Color = (typeof colorList)[number];
|
|
2112
2113
|
declare const roundVariants: {
|
|
2113
2114
|
full: string;
|
|
@@ -2628,7 +2629,7 @@ interface RadioButtonGroupProps {
|
|
|
2628
2629
|
label?: ReactNode;
|
|
2629
2630
|
value?: string | number;
|
|
2630
2631
|
onChange?: (value: string | number) => void;
|
|
2631
|
-
radioPosition?: 'left' | 'right';
|
|
2632
|
+
radioPosition?: 'left' | 'right' | 'hidden';
|
|
2632
2633
|
direction?: 'vertical' | 'horizontal';
|
|
2633
2634
|
classNames?: {
|
|
2634
2635
|
container?: string;
|
|
@@ -2680,11 +2681,13 @@ interface RangeSliderProps {
|
|
|
2680
2681
|
step?: number;
|
|
2681
2682
|
value?: [number, number];
|
|
2682
2683
|
defaultValue?: [number, number];
|
|
2684
|
+
variant?: 'default' | 'inline';
|
|
2683
2685
|
onChange?: (value: [number, number]) => void;
|
|
2684
2686
|
onChangeEnd?: (value: [number, number]) => void;
|
|
2685
2687
|
className?: string;
|
|
2686
2688
|
classNames?: {
|
|
2687
2689
|
container?: string;
|
|
2690
|
+
slider?: string;
|
|
2688
2691
|
track?: string;
|
|
2689
2692
|
filledTrack?: string;
|
|
2690
2693
|
thumb?: string;
|
|
@@ -2692,6 +2695,7 @@ interface RangeSliderProps {
|
|
|
2692
2695
|
style?: CSSProperties;
|
|
2693
2696
|
styles?: {
|
|
2694
2697
|
container?: CSSProperties;
|
|
2698
|
+
slider?: CSSProperties;
|
|
2695
2699
|
track?: CSSProperties;
|
|
2696
2700
|
filledTrack?: CSSProperties;
|
|
2697
2701
|
thumb?: CSSProperties;
|
|
@@ -2719,6 +2723,43 @@ interface RangeSliderProps {
|
|
|
2719
2723
|
*/
|
|
2720
2724
|
declare const RangeSlider: react__default.FC<RangeSliderProps>;
|
|
2721
2725
|
|
|
2726
|
+
type RatingLabels = {
|
|
2727
|
+
helperText?: ReactNode;
|
|
2728
|
+
};
|
|
2729
|
+
type RatingProps = Omit<ComponentProps<'div'>, 'onChange'> & {
|
|
2730
|
+
value?: number;
|
|
2731
|
+
onChange?: (value: number) => void;
|
|
2732
|
+
amount?: number;
|
|
2733
|
+
options?: number[];
|
|
2734
|
+
gap?: number;
|
|
2735
|
+
size?: number;
|
|
2736
|
+
readonly?: boolean;
|
|
2737
|
+
color?: string;
|
|
2738
|
+
label?: ReactNode;
|
|
2739
|
+
labels?: RatingLabels;
|
|
2740
|
+
infoLabels?: InfoLabelsProps;
|
|
2741
|
+
classNames?: {
|
|
2742
|
+
container?: string;
|
|
2743
|
+
label?: string;
|
|
2744
|
+
list?: string;
|
|
2745
|
+
item?: string;
|
|
2746
|
+
value?: string;
|
|
2747
|
+
helperText?: string;
|
|
2748
|
+
};
|
|
2749
|
+
styles?: {
|
|
2750
|
+
container?: CSSProperties;
|
|
2751
|
+
label?: CSSProperties;
|
|
2752
|
+
list?: CSSProperties;
|
|
2753
|
+
item?: CSSProperties;
|
|
2754
|
+
value?: CSSProperties;
|
|
2755
|
+
helperText?: CSSProperties;
|
|
2756
|
+
};
|
|
2757
|
+
};
|
|
2758
|
+
/**
|
|
2759
|
+
* The `Rating` component shows numbered options for feedback, keeping things kinda straightforward.
|
|
2760
|
+
*/
|
|
2761
|
+
declare const Rating: react.ForwardRefExoticComponent<Omit<RatingProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
2762
|
+
|
|
2722
2763
|
type SelectOptionProps = ComponentProps<typeof components.Option>;
|
|
2723
2764
|
type SelectOptionCustomProps = SelectOptionProps & {
|
|
2724
2765
|
isHovered: boolean;
|
|
@@ -3095,11 +3136,13 @@ interface SliderProps {
|
|
|
3095
3136
|
step?: number;
|
|
3096
3137
|
value?: number;
|
|
3097
3138
|
defaultValue?: number;
|
|
3139
|
+
variant?: 'default' | 'inline';
|
|
3098
3140
|
onChange?: (value: number) => void;
|
|
3099
3141
|
onChangeEnd?: (value: number) => void;
|
|
3100
3142
|
className?: string;
|
|
3101
3143
|
classNames?: {
|
|
3102
3144
|
container?: string;
|
|
3145
|
+
slider?: string;
|
|
3103
3146
|
track?: string;
|
|
3104
3147
|
path?: string;
|
|
3105
3148
|
filledTrack?: string;
|
|
@@ -3108,6 +3151,7 @@ interface SliderProps {
|
|
|
3108
3151
|
style?: CSSProperties;
|
|
3109
3152
|
styles?: {
|
|
3110
3153
|
container?: CSSProperties;
|
|
3154
|
+
slider?: CSSProperties;
|
|
3111
3155
|
track?: CSSProperties;
|
|
3112
3156
|
path?: CSSProperties;
|
|
3113
3157
|
filledTrack?: CSSProperties;
|
|
@@ -3242,4 +3286,4 @@ type TabsProps = ComponentProps<'div'> & {
|
|
|
3242
3286
|
*/
|
|
3243
3287
|
declare const Tabs: react.ForwardRefExoticComponent<Omit<TabsProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
3244
3288
|
|
|
3245
|
-
export { AdvancedProgressBar, type AdvancedProgressBarProps, AudioPlayback, type AudioPlaybackProps, AudioRecorder, type AudioRecorderProps, Avatar, type AvatarProps, AvatarRow, type AvatarRowProps, Breadcrumb, type BreadcrumbProps, Button, type ButtonProps, type ButtonVariant, CanvasButton, Card, CardIcon, type CardIconProps, CardMedia, type CardMediaProps, type Media as CardMediaType, type CardProps, Carousel, type CarouselProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, CleenIcon, CleenNotificationContainer, Collapsible, type CollapsibleProps, type CollapsibleSection, CreditCardInput, type CreditCardInputProps, DatePicker, type DatePickerProps, Divider, type DividerProps, Drawer, type DrawerConfig, DrawerContainer, type DrawerContainerProps, DrawerContentTitle, type DrawerContentTitleProps, type DrawerProps, DropZone, type DropZoneProps, Dropdown, type DropdownProps, EditableCard, type EditableCardField, type EditableCardProps, EditableText, EditableTextArea, type EditableTextAreaProps, type EditableTextAreaRef, type EditableTextProps, type EditableTextRef, FilterDrawer, type FilterDrawerFilterCategories, type FilterDrawerNewFilter, type FilterDrawerProps, type FilterDrawerSavedFilter, FormGroup, type FormGroupProps, GroupSelector, type GroupSelectorProps, type GroupSelectorSaveResult, type GroupSelectorThreeDotOption, IconAlertCircle, IconAlertFeatured, IconAlertOctagon, IconAlertTriangle, IconAlignRight, IconArrowDown, IconArrowLeft, IconArrowLeft2, IconArrowRight, IconArrowToTop, IconArrowUp, IconArrowUpRight, IconArrowUpRightNarrow, IconArrowUpRightSquare, IconAttachment, IconBarChartSquare, IconBold, IconBookmarkCheck, IconBookmarkCheckFill, IconBookmarkX, IconBoxLines, IconBoxText, IconBracketsCheck, IconBracketsEllipses, IconCalendar, IconCertificateHeart, IconCheck, IconCheckCircle, IconCheckCircleBroken, IconCheckFill, IconCheckVerified, IconChevronDown, IconChevronLeft, IconChevronLeftDouble, IconChevronRight, IconChevronRightDouble, IconChevronSelectorVertical, IconChevronUp, IconCircleSwap, IconClockFastForward, IconClockRewind, IconClockRewind2, IconCodeBrowser, IconCodeCircle, IconColors, IconColumnEdit, IconCopy, IconCopy2, IconCopy3, IconCopy4, IconCopy5, IconCopyCheck, IconCube, IconCubeOutline, IconCursorBox, IconDataflow, IconDataflow2, IconDataflow3, IconDelete, IconDollarCircle, IconDotsGrid, IconDotsHorizontal, IconDotsVertical, IconEdit, IconEditable, IconExpand, IconEye, IconEyeHidden, IconEyeHidden2, IconFaceSmile, IconFilter, IconFilter2, IconFlag, IconFlag2, IconFlag3, IconHandShield, IconHash, IconHeadsetMic, IconHeart, IconHouseLine, IconImage, IconImage2, IconImage3, IconImage4, IconImageCheck, IconInfoCircle, IconInfoHexagon, IconItalic, IconLayersMultiple, IconLayersSingle, IconLayout, IconLayout2, IconLayoutColumns, IconLayoutCustom, IconLayoutSequential, IconLayoutStuffed, IconLayoutTile, IconLifeBuoy, IconLightbulb, IconLightning, IconLightning2, IconLightningFast, IconLineChartBar, IconLineChartBreakoutSquare, IconLineChartUp, IconLineChartUp2, IconLines, IconLinesCheck, IconLinesPlay, IconLink, IconLink2, IconLink3, IconLink4, IconLink5, IconListBullet, IconListOrder, IconListOrder2, IconLock, IconLock2, IconLogIn, IconLogOut, IconLogOut2, IconMagicWand, IconMagicWand2, IconMail, IconMessageSquare, IconMessageSquare2, IconMessageXSquare, IconMinusCircle, IconMobile, IconMonitor, IconMonitor2, IconMonitor3, IconMoonCircle, IconName, IconNavigationPointer, IconNotificationBox, IconPCSetup, IconPalette, IconPasscodeLock, IconPencil, IconPercentageCircle, IconPerspective, IconPhoneCall, IconPin, IconPlayCircle, IconPlus, IconPlusCircle, IconPulse, IconQuestionCircle, IconRadioButton, IconRadioButtonActive, IconReceiptCheck, IconRedo, IconRefresh, IconRefresh2, IconRefresh3, IconRepeat, IconRepeat2, IconRetweet, IconRoundChart, IconRoundChart2, IconRoute, IconSave, IconSave2, IconScanDots, IconSearch, IconSend, IconSettings, IconSettings2, IconSettings3, IconShieldLightning, IconShieldPlus, IconShieldRemove, IconShuffle, IconSlashCircle, IconSlashOctagon, IconSocialGlobe, IconSocialLinkedin, IconSocialX, IconSpeedometer, IconStairsRound, IconStar, IconStarHalf, IconStars, IconStars2, IconStrikethrough, IconSuccessFeatured, IconSun, IconSwitchHorizontal, IconTag, IconTarget, IconTarget2, IconTextFormat, IconTextFormat2, IconTextHighlight, IconTranslate, IconTrash, IconTrending, IconUnderline, IconUndo, IconUndo2, IconUploadCloud, IconUser, IconUserEdit, IconUserRight, IconUserSquare, IconUsers, IconUsersUp, IconVolume, IconWrench, IconX, IconXCircle, IconXCircle2, IconXClose, IconXSquare, InfoLabels, type InfoLabelsProps, Input, type InputProps, Loader, type LoaderProps, Lookup, type LookupOption, type LookupProps, Menu, type MenuProps, Modal, type ModalProps, type NotificationProps, Pagination, PaginationGoToPage, type PaginationGoToPageProps, PaginationPageSize, type PaginationPageSizeProps, type PaginationProps, PillBadge, type PillBadgeProps, Popover, type PopoverProps, ProgressBar, type ProgressBarProps, ProgressCircle, type ProgressCircleProps, RadioBoxGroup, type RadioBoxGroupProps, RadioButtonGroup, type RadioButtonGroupProps, RangeSlider, type RangeSliderProps, Select, type SelectProps, Sidebar, SidebarItem, type SidebarItemConfig, type SidebarItemProps, type SidebarProps, Skeleton, SkeletonAvatar, SkeletonBadge, SkeletonBanner, SkeletonButton, SkeletonCard, SkeletonCard2, SkeletonCard3, SkeletonCardStack, SkeletonChart, type SkeletonComponentProps, SkeletonContentCard, SkeletonDataGrid, SkeletonForm, SkeletonGlowingCard, SkeletonImage, SkeletonInfoCard, SkeletonInput, SkeletonList, SkeletonParagraph, type SkeletonProps, type SkeletonRoundness, SkeletonText, type SkeletonType, SkeletonVideo, SkeletonWidgetCard, SkeletonWrapper, Slider, type SliderProps, StarRating, type StarRatingProps, Stepper, type StepperProps, type SubmenuItem, Switch, type SwitchProps, type Tab, Tabs, type TabsProps, TextArea, type TextAreaProps, Tooltip, type TooltipProps, showNotification };
|
|
3289
|
+
export { AdvancedProgressBar, type AdvancedProgressBarProps, AudioPlayback, type AudioPlaybackProps, AudioRecorder, type AudioRecorderProps, Avatar, type AvatarProps, AvatarRow, type AvatarRowProps, Breadcrumb, type BreadcrumbProps, Button, type ButtonProps, type ButtonVariant, CanvasButton, Card, CardIcon, type CardIconProps, CardMedia, type CardMediaProps, type Media as CardMediaType, type CardProps, Carousel, type CarouselProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, CleenIcon, CleenNotificationContainer, Collapsible, type CollapsibleProps, type CollapsibleSection, CreditCardInput, type CreditCardInputProps, DatePicker, type DatePickerProps, Divider, type DividerProps, Drawer, type DrawerConfig, DrawerContainer, type DrawerContainerProps, DrawerContentTitle, type DrawerContentTitleProps, type DrawerProps, DropZone, type DropZoneProps, Dropdown, type DropdownProps, EditableCard, type EditableCardField, type EditableCardProps, EditableText, EditableTextArea, type EditableTextAreaProps, type EditableTextAreaRef, type EditableTextProps, type EditableTextRef, FilterDrawer, type FilterDrawerFilterCategories, type FilterDrawerNewFilter, type FilterDrawerProps, type FilterDrawerSavedFilter, FormGroup, type FormGroupProps, GroupSelector, type GroupSelectorProps, type GroupSelectorSaveResult, type GroupSelectorThreeDotOption, IconAlertCircle, IconAlertFeatured, IconAlertOctagon, IconAlertTriangle, IconAlignRight, IconArrowDown, IconArrowLeft, IconArrowLeft2, IconArrowRight, IconArrowToTop, IconArrowUp, IconArrowUpRight, IconArrowUpRightNarrow, IconArrowUpRightSquare, IconAttachment, IconBarChartSquare, IconBold, IconBookmarkCheck, IconBookmarkCheckFill, IconBookmarkX, IconBoxLines, IconBoxText, IconBracketsCheck, IconBracketsEllipses, IconCalendar, IconCertificateHeart, IconCheck, IconCheckCircle, IconCheckCircleBroken, IconCheckFill, IconCheckVerified, IconChevronDown, IconChevronLeft, IconChevronLeftDouble, IconChevronRight, IconChevronRightDouble, IconChevronSelectorVertical, IconChevronUp, IconCircleSwap, IconClockFastForward, IconClockRewind, IconClockRewind2, IconCodeBrowser, IconCodeCircle, IconColors, IconColumnEdit, IconCopy, IconCopy2, IconCopy3, IconCopy4, IconCopy5, IconCopyCheck, IconCube, IconCubeOutline, IconCursorBox, IconDataflow, IconDataflow2, IconDataflow3, IconDelete, IconDollarCircle, IconDotsGrid, IconDotsHorizontal, IconDotsVertical, IconEdit, IconEditable, IconExpand, IconEye, IconEyeHidden, IconEyeHidden2, IconFaceSmile, IconFilter, IconFilter2, IconFlag, IconFlag2, IconFlag3, IconHandShield, IconHash, IconHeadsetMic, IconHeart, IconHouseLine, IconImage, IconImage2, IconImage3, IconImage4, IconImageCheck, IconInfoCircle, IconInfoHexagon, IconItalic, IconLayersMultiple, IconLayersSingle, IconLayout, IconLayout2, IconLayoutColumns, IconLayoutCustom, IconLayoutSequential, IconLayoutStuffed, IconLayoutTile, IconLifeBuoy, IconLightbulb, IconLightning, IconLightning2, IconLightningFast, IconLineChartBar, IconLineChartBreakoutSquare, IconLineChartUp, IconLineChartUp2, IconLines, IconLinesCheck, IconLinesPlay, IconLink, IconLink2, IconLink3, IconLink4, IconLink5, IconListBullet, IconListOrder, IconListOrder2, IconLock, IconLock2, IconLogIn, IconLogOut, IconLogOut2, IconMagicWand, IconMagicWand2, IconMail, IconMessageSquare, IconMessageSquare2, IconMessageXSquare, IconMinusCircle, IconMobile, IconMonitor, IconMonitor2, IconMonitor3, IconMoonCircle, IconName, IconNavigationPointer, IconNotificationBox, IconPCSetup, IconPalette, IconPasscodeLock, IconPencil, IconPercentageCircle, IconPerspective, IconPhoneCall, IconPin, IconPlayCircle, IconPlus, IconPlusCircle, IconPulse, IconQuestionCircle, IconRadioButton, IconRadioButtonActive, IconReceiptCheck, IconRedo, IconRefresh, IconRefresh2, IconRefresh3, IconRepeat, IconRepeat2, IconRetweet, IconRoundChart, IconRoundChart2, IconRoute, IconSave, IconSave2, IconScanDots, IconSearch, IconSend, IconSettings, IconSettings2, IconSettings3, IconShieldLightning, IconShieldPlus, IconShieldRemove, IconShuffle, IconSlashCircle, IconSlashOctagon, IconSocialGlobe, IconSocialLinkedin, IconSocialX, IconSpeedometer, IconStairsRound, IconStar, IconStarHalf, IconStars, IconStars2, IconStrikethrough, IconSuccessFeatured, IconSun, IconSwitchHorizontal, IconTag, IconTarget, IconTarget2, IconTextFormat, IconTextFormat2, IconTextHighlight, IconTranslate, IconTrash, IconTrending, IconUnderline, IconUndo, IconUndo2, IconUploadCloud, IconUser, IconUserEdit, IconUserRight, IconUserSquare, IconUsers, IconUsersUp, IconVolume, IconWrench, IconX, IconXCircle, IconXCircle2, IconXClose, IconXSquare, InfoLabels, type InfoLabelsProps, Input, type InputProps, Loader, type LoaderProps, Lookup, type LookupOption, type LookupProps, Menu, type MenuProps, Modal, type ModalProps, type NotificationProps, Pagination, PaginationGoToPage, type PaginationGoToPageProps, PaginationPageSize, type PaginationPageSizeProps, type PaginationProps, PillBadge, type PillBadgeProps, Popover, type PopoverProps, ProgressBar, type ProgressBarProps, ProgressCircle, type ProgressCircleProps, RadioBoxGroup, type RadioBoxGroupProps, RadioButtonGroup, type RadioButtonGroupProps, RangeSlider, type RangeSliderProps, Rating, type RatingProps, Select, type SelectProps, Sidebar, SidebarItem, type SidebarItemConfig, type SidebarItemProps, type SidebarProps, Skeleton, SkeletonAvatar, SkeletonBadge, SkeletonBanner, SkeletonButton, SkeletonCard, SkeletonCard2, SkeletonCard3, SkeletonCardStack, SkeletonChart, type SkeletonComponentProps, SkeletonContentCard, SkeletonDataGrid, SkeletonForm, SkeletonGlowingCard, SkeletonImage, SkeletonInfoCard, SkeletonInput, SkeletonList, SkeletonParagraph, type SkeletonProps, type SkeletonRoundness, SkeletonText, type SkeletonType, SkeletonVideo, SkeletonWidgetCard, SkeletonWrapper, Slider, type SliderProps, StarRating, type StarRatingProps, Stepper, type StepperProps, type SubmenuItem, Switch, type SwitchProps, type Tab, Tabs, type TabsProps, TextArea, type TextAreaProps, Tooltip, type TooltipProps, showNotification };
|