UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

2 lines (1 loc) 1.59 kB
var d=(...n)=>n.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?d(...e):typeof e=="object"?Object.keys(e).map((t,l)=>e[l]||e[t]&&t||null).filter(t=>t!==null).join(" "):e).filter(e=>!!e).join(" ");var y=(n,e)=>{let{valid:t,invalid:l,hover:s,focus:o,checked:a,active:c,selected:u,disabled:b,indeterminate:C,loading:M,empty:S,readonly:$,highlighted:A,...m}=e;return d({"k-valid":t,"k-invalid":l,"k-hover":s,"k-focus":o,"k-checked":a,"k-active":c,"k-selected":u,"k-disabled":b,"k-indeterminate":C&&!a,"k-loading":M,"k-empty":S,"k-readonly":$,"k-highlighted":A},Object.keys(m).reduce((x,r)=>(r.startsWith("k-")?x[r]=m[r]:x[`k-${r}`]=m[r],x),{}))};var g={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",generating:"generating",expanded:"expanded"};var k="grid",v=k;import{jsx as f,jsxs as N}from"react/jsx-runtime";var h="k-grid-stack-cell",E=[g.focus,g.selected],i=n=>{let{cellHeader:e,cellContent:t,edit:l,commandCell:s,dirty:o,focus:a,selected:c,...u}=n;return N("div",{...u,className:d(n.className,h,{"k-grid-stack-edit-cell":l,"k-command-cell":s,"k-dirty-cell":o},y(h,{focus:a,selected:c})),children:[o&&f("span",{className:"k-dirty"}),e&&f("div",{className:"k-grid-stack-header",children:e}),f("div",{className:"k-grid-stack-content",children:t}),n.children]})};i.states=E;i.className=h;i.moduleName=k;i.folderName=v;var w=i;export{i as GridStackCell,w as default};