vue-chrts 0.0.91 → 0.0.92
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.js +4 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -465,4 +465,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
465
465
|
<div>${o.data}</div>
|
|
466
466
|
</vistooltip>
|
|
467
467
|
</vissinglecontainer>
|
|
468
|
-
</div>`)};return(o,s)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createElementVNode("div",r_,[d.createVNode(d.unref(Iv),{class:d.normalizeClass(i?"mt-24":""),data:o.data,height:o.height,margin:{}},{default:d.withCtx(()=>[d.createVNode(d.unref(zi),{"horizontal-shift":20,"vertical-shift":20,triggers:r}),d.createVNode(d.unref(qv),{value:n,"corner-radius":o.radius,color:e.labels.map(a=>a.color),"angle-range":i?[-1.5707963267948966,1.5707963267948966]:[]},null,8,["corner-radius","color","angle-range"])]),_:1},8,["class","data","height"]),d.renderSlot(o.$slots,"default")]),o.hidePagination?d.createCommentVNode("",!0):(d.openBlock(),d.createElementBlock("div",o_,[d.createVNode(d.unref(xn),{items:o.labels},null,8,["items"])]))],64))}}),a_={class:"flex flex-col"},l_={class:"flex items-center mr-2 mt-2"},c_={class:"font-semibold capitalize text-white/75"},u_={class:"flex items-center gap-2"},h_={class:"font-normal"},Ii=d.defineComponent({__name:"Tooltip",props:{data:{},categories:{}},setup(t){function e(i){var r;return((r=n.categories[i])==null?void 0:r.color)??"#f00"}const n=t;return(i,r)=>(d.openBlock(),d.createElementBlock("div",a_,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(Object.entries(i.data),([o,s])=>{var a;return d.openBlock(),d.createElementBlock(d.Fragment,{key:o},[d.createElementVNode("div",l_,[d.createElementVNode("span",c_,d.toDisplayString(o)+":",1)]),d.createElementVNode("div",u_,[(a=n.categories[o])!=null&&a.color?(d.openBlock(),d.createElementBlock("span",{key:0,style:d.normalizeStyle({backgroundColor:e(o)}),class:"w-2 h-2"},null,4)):d.createCommentVNode("",!0),d.createElementVNode("span",h_,d.toDisplayString(s),1)])],64)}),128))]))}}),f_={class:"flex items center justify-end"},d_=d.defineComponent({__name:"LineChart",props:{data:{},height:{},xLabel:{},yLabel:{},categories:{},xFormatter:{type:Function},yFormatter:{type:Function},curveType:{},yNumTicks:{},xNumTicks:{},paginationPoisition:{}},setup(t){const e=t,n=r=>Object.values(e.categories)[r].color,i=d.computed(()=>r=>{const o=d.createApp(Ii,{data:r,categories:e.categories})
|
|
468
|
+
</div>`)};return(o,s)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createElementVNode("div",r_,[d.createVNode(d.unref(Iv),{class:d.normalizeClass(i?"mt-24":""),data:o.data,height:o.height,margin:{}},{default:d.withCtx(()=>[d.createVNode(d.unref(zi),{"horizontal-shift":20,"vertical-shift":20,triggers:r}),d.createVNode(d.unref(qv),{value:n,"corner-radius":o.radius,color:e.labels.map(a=>a.color),"angle-range":i?[-1.5707963267948966,1.5707963267948966]:[]},null,8,["corner-radius","color","angle-range"])]),_:1},8,["class","data","height"]),d.renderSlot(o.$slots,"default")]),o.hidePagination?d.createCommentVNode("",!0):(d.openBlock(),d.createElementBlock("div",o_,[d.createVNode(d.unref(xn),{items:o.labels},null,8,["items"])]))],64))}}),a_={class:"flex flex-col"},l_={class:"flex items-center mr-2 mt-2"},c_={class:"font-semibold capitalize text-white/75"},u_={class:"flex items-center gap-2"},h_={class:"font-normal"},Ii=d.defineComponent({__name:"Tooltip",props:{data:{},categories:{}},setup(t){function e(i){var r;return((r=n.categories[i])==null?void 0:r.color)??"#f00"}const n=t;return(i,r)=>(d.openBlock(),d.createElementBlock("div",a_,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(Object.entries(i.data),([o,s])=>{var a;return d.openBlock(),d.createElementBlock(d.Fragment,{key:o},[d.createElementVNode("div",l_,[d.createElementVNode("span",c_,d.toDisplayString(o)+":",1)]),d.createElementVNode("div",u_,[(a=n.categories[o])!=null&&a.color?(d.openBlock(),d.createElementBlock("span",{key:0,style:d.normalizeStyle({backgroundColor:e(o)}),class:"w-2 h-2"},null,4)):d.createCommentVNode("",!0),d.createElementVNode("span",h_,d.toDisplayString(s),1)])],64)}),128))]))}}),f_={class:"flex items center justify-end"},d_=d.defineComponent({__name:"LineChart",props:{data:{},height:{},xLabel:{},yLabel:{},categories:{},xFormatter:{type:Function},yFormatter:{type:Function},curveType:{},yNumTicks:{},xNumTicks:{},paginationPoisition:{}},setup(t){const e=t,n=r=>Object.values(e.categories)[r].color,i=d.computed(()=>r=>{const o=d.createApp(Ii,{data:r,categories:e.categories});if(!document)return;const s=document.createElement("div");o.mount(s);const a=s.innerHTML;return o.unmount(),a});return(r,o)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["space-y-4 flex flex-col",{"flex-col-reverse":e.paginationPoisition==="top"}])},[d.createVNode(d.unref(Pi),{data:r.data,height:r.height},{default:d.withCtx(()=>[d.createVNode(d.unref(zi),{"horizontal-placement":d.unref(M).Right,"vertical-placement":d.unref(M).Top},null,8,["horizontal-placement","vertical-placement"]),(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(Object.keys(e.categories),(s,a)=>(d.openBlock(),d.createBlock(d.unref(Tc),{key:a,x:(l,c)=>c,y:l=>l[s],color:n(a),"curve-type":r.curveType??d.unref(exports.CurveType).MonotoneX},null,8,["x","y","color","curve-type"]))),128)),d.createVNode(d.unref(ae),{type:"x","tick-format":r.xFormatter,"num-ticks":r.xNumTicks??4,label:r.xLabel,"label-margin":8,"domain-line":!1,"grid-line":!1},null,8,["tick-format","num-ticks","label"]),d.createVNode(d.unref(ae),{type:"y","num-ticks":r.yNumTicks??4,"tick-format":r.yFormatter,label:r.yLabel,"domain-line":!1},null,8,["num-ticks","tick-format","label"]),d.createVNode(d.unref(Sc),{color:"#666",template:i.value},null,8,["template"])]),_:1},8,["data","height"]),d.createElementVNode("div",f_,[d.createVNode(d.unref(xn),{items:Object.values(r.categories)},null,8,["items"])])],2))}});var Cc=(t=>(t.Top="top",t.Bottom="bottom",t))(Cc||{});const p_={class:"space-y-2"},g_={class:"space-y-2"},m_={class:"text-gray-500 mb-1"},v_={class:"text-xl dark:text-white font-bold"},__={class:"flex items-center justify-between text-sm font-medium dark:text-gray-500 mt-2"},y_={class:"dark:bg-white/5 bg-gray-100 rounded-full h-3"},x_=d.defineComponent({__name:"Progress",props:{label:{},value:{},unit:{},progress:{},total:{},color:{}},setup(t){const e=t,n=d.computed(()=>(e.progress/e.total*100).toFixed(1)),i=d.computed(()=>`${e.progress/e.total*100}%`);return(r,o)=>(d.openBlock(),d.createElementBlock("div",p_,[d.createElementVNode("div",g_,[d.createElementVNode("p",m_,d.toDisplayString(r.label),1),d.createElementVNode("h2",v_,d.toDisplayString(r.value),1)]),d.createElementVNode("div",__,[d.createElementVNode("div",null,d.toDisplayString(n.value)+"%",1),d.createElementVNode("div",null,d.toDisplayString(r.progress)+" of "+d.toDisplayString(r.total)+d.toDisplayString(r.unit),1)]),d.createElementVNode("div",y_,[d.createElementVNode("div",{class:"rounded-full h-full",style:d.normalizeStyle({width:i.value,backgroundColor:r.color})},null,4)])]))}}),b_={class:"ring ring-border divide-y divide-border rounded-xl shadow-sm"},w_={class:"flex items-center justify-between p-4"},k_={class:"flex items-center gap-2"},S_={class:"font-medium"},T_={class:"text-sm dark:text-gray-400"},C_={class:"p-4"},A_=d.defineComponent({__name:"Status",setup(t){const e=d.ref("example.com"),n=d.ref("99.9% uptime"),i=d.ref([{hour:0,status:"online"},{hour:1,status:"online"},{hour:2,status:"online"},{hour:3,status:"online"},{hour:4,status:"online"},{hour:5,status:"online"},{hour:6,status:"online"},{hour:7,status:"online"},{hour:8,status:"online"},{hour:9,status:"online"},{hour:10,status:"online"},{hour:11,status:"offline"},{hour:12,status:"online"},{hour:13,status:"online"},{hour:14,status:"online"},{hour:15,status:"online"},{hour:16,status:"online"},{hour:17,status:"online"},{hour:18,status:"online"},{hour:19,status:"online"},{hour:20,status:"online"},{hour:21,status:"online"},{hour:22,status:"online"},{hour:23,status:"online"},{hour:0,status:"online"},{hour:1,status:"online"},{hour:2,status:"online"},{hour:3,status:"online"},{hour:4,status:"online"},{hour:5,status:"online"},{hour:6,status:"online"},{hour:7,status:"online"},{hour:8,status:"online"},{hour:9,status:"online"},{hour:10,status:"online"},{hour:11,status:"online"},{hour:12,status:"online"},{hour:13,status:"online"},{hour:14,status:"online"},{hour:15,status:"online"},{hour:16,status:"online"},{hour:17,status:"online"},{hour:18,status:"online"},{hour:19,status:"online"},{hour:20,status:"online"},{hour:21,status:"online"},{hour:22,status:"online"},{hour:23,status:"online"},{hour:0,status:"online"},{hour:1,status:"online"}]);return(r,o)=>(d.openBlock(),d.createElementBlock("div",b_,[d.createElementVNode("div",w_,[d.createElementVNode("div",k_,[o[0]||(o[0]=d.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"size-6 text-primary"},[d.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})],-1)),d.createElementVNode("span",S_,d.toDisplayString(e.value),1)]),d.createElementVNode("span",T_,d.toDisplayString(n.value),1)]),d.createElementVNode("div",C_,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(i.value,(s,a)=>(d.openBlock(),d.createElementBlock("div",{key:a,class:d.normalizeClass(["w-2.5 h-8 first:rounded-tl first:rounded-bl last:rounded-tr last:rounded-br ml-[3px] inline-block",s.status==="online"?"bg-primary":"bg-white"])},null,2))),128))])]))}}),M_=(t,e)=>{const n=t.__vccOpts||t;for(const[i,r]of e)n[i]=r;return n},$_={};function E_(t,e){return d.openBlock(),d.createElementBlock("div",null,"This is not a button")}const N_=M_($_,[["render",E_]]);exports.AreaChart=Qv;exports.AreaStackedChart=t_;exports.BarChart=i_;exports.Button=N_;exports.DonutChart=s_;exports.LineChart=d_;exports.PaginationPosition=Cc;exports.Progress=x_;exports.Status=A_;exports.Tooltip=Ii;
|
package/dist/index.js
CHANGED
|
@@ -9327,7 +9327,10 @@ const C_ = {
|
|
|
9327
9327
|
const o = co(Ko, {
|
|
9328
9328
|
data: r,
|
|
9329
9329
|
categories: e.categories
|
|
9330
|
-
})
|
|
9330
|
+
});
|
|
9331
|
+
if (!document)
|
|
9332
|
+
return;
|
|
9333
|
+
const s = document.createElement("div");
|
|
9331
9334
|
o.mount(s);
|
|
9332
9335
|
const a = s.innerHTML;
|
|
9333
9336
|
return o.unmount(), a;
|