UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

2 lines (1 loc) 2.69 kB
var s=(...t)=>t.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?s(...e):typeof e=="object"?Object.keys(e).map((a,o)=>e[o]||e[a]&&a||null).filter(a=>a!==null).join(" "):e).filter(e=>!!e).join(" ");var h=(t,e)=>s({"k-valid":e.valid,"k-invalid":e.invalid,"k-hover":e.hover,"k-focus":e.focus,"k-checked":e.checked,"k-active":e.active,"k-selected":e.selected,"k-disabled":e.disabled,"k-indeterminate":e.indeterminate&&!e.checked,"k-loading":e.loading,"k-empty":e.empty,"k-readonly":e.readonly,"k-highlighted":e.highlighted});var c={open:"open",hover:"hover",focus:"focus",active:"active",selected:"selected",disabled:"disabled",valid:"valid",invalid:"invalid",loading:"loading",required:"required",empty:"empty",indeterminate:"indeterminate",checked:"checked",readonly:"readonly",highlighted:"highlighted"};import{jsx as b,jsxs as f}from"react/jsx-runtime";var r="k-progressbar",B=[c.disabled,c.indeterminate],C={},l={indeterminate:!1,label:!0,labelPosition:"start",orientation:"horizontal",reverse:!1,value:"0"},g=t=>{let{disabled:e,height:a,indeterminate:o=l.indeterminate,label:u=l.label,labelPosition:n=l.labelPosition,orientation:i=l.orientation,reverse:x=l.reverse,value:v=l.value,width:d,style:S,...N}=t;return f("div",{...N,className:s(t.className,r,h(r,{disabled:e}),{[`${r}-${i}`]:i,[`${r}-indeterminate`]:o,[`${r}-reverse`]:x}),style:{...S,"--kendo-progressbar-value":v,[i==="horizontal"?"height":"width"]:i==="horizontal"?a:d},children:[b("span",{className:s("k-progress-status-wrap",{[`k-progress-${n}`]:n&&!o}),children:u&&f("span",{className:"k-progress-status",children:[v,"%"]})}),!o&&b("div",{className:"k-progressbar-value k-selected",children:b("span",{className:s("k-progress-status-wrap",{[`k-progress-${n}`]:n}),children:u&&f("span",{className:"k-progress-status",children:[t.value,"%"]})})})]})};g.states=B;g.options=C;g.className=r;g.defaultOptions=l;import{jsx as y}from"react/jsx-runtime";var P="k-chunk-progressbar",M=(t,e)=>e<=t-1,z=[c.disabled,c.indeterminate],A={},k={chunkCount:5,orientation:"horizontal",progress:0},m=t=>{let{disabled:e,chunkCount:a=k.chunkCount,indeterminate:o,orientation:u=k.orientation,progress:n=k.progress,reverse:i,...x}=t;return y("div",{...x,className:s(t.className,r,P,h(r,{disabled:e}),{[`${r}-${u}`]:u,[`${r}-indeterminate`]:o,[`${r}-reverse`]:i}),children:y("ul",{className:"k-progressbar-chunks k-reset",children:[...Array(a)].map((v,d)=>y("li",{className:s("k-progressbar-chunk",{"k-first":d===0,"k-last":d===[...Array(a)].length-1,"k-selected":M(n,d)})},d))})})};m.states=z;m.options=A;m.className=P;m.defaultOptions=k;var $=m;import{jsx as R}from"react/jsx-runtime";var J=t=>R($,{...t});export{J as ChunkProgressBarNormal};