@progress/kendo-themes-html
Version:
A collection of HTML helpers used for developing Kendo UI themes
2 lines (1 loc) • 6.39 kB
JavaScript
var a=(...e)=>e.filter(t=>t!==!0&&!!t).map(t=>Array.isArray(t)?a(...t):typeof t=="object"?Object.keys(t).map((o,T)=>t[T]||t[o]&&o||null).filter(o=>o!==null).join(" "):t).filter(t=>!!t).join(" ");var w=(e,t)=>a({[`${e}-xs`]:t.size==="xsmall",[`${e}-sm`]:t.size==="small",[`${e}-md`]:t.size==="medium",[`${e}-lg`]:t.size==="large",[`${e}-xl`]:t.size==="xlarge",[`${e}-xxl`]:t.size==="xxlarge",[`${e}-xxxl`]:t.size==="xxxlarge"},{[`${e}-${t.fillMode}`]:t.fillMode},{[`${e}-${t.fillMode}-${t.themeColor}`]:t.fillMode&&t.themeColor},{[`${e}-${t.themeColor}`]:t.themeColor&&t.fillMode===void 0},{"k-rounded-sm":t.rounded==="small","k-rounded-md":t.rounded==="medium","k-rounded-lg":t.rounded==="large","k-rounded-full":t.rounded==="full"}),u=(e,t)=>a({"k-valid":t.valid,"k-invalid":t.invalid,"k-hover":t.hover,"k-focus":t.focus,"k-checked":t.checked,"k-active":t.active,"k-selected":t.selected,"k-disabled":t.disabled,"k-indeterminate":t.indeterminate&&!t.checked,"k-loading":t.loading,"k-empty":t.empty,"k-readonly":t.readonly,"k-highlighted":t.highlighted});var d={xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"};var i={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 I}from"react/jsx-runtime";var K="k-data-table",P=[],$={size:[d.small,d.medium,d.large]},G={size:d.medium},c=e=>{let{size:t=G.size,...o}=e;return I("div",{...o,className:a(e.className,K,w("k-table",{size:t})),children:e.children})};c.states=P;c.options=$;c.className=K;c.defaultOptions=G;import{jsx as k}from"react/jsx-runtime";var F="k-table-header",N=e=>k("div",{className:a(e.className,F),children:k("div",{className:"k-table-header-wrap",children:k(x,{children:e.children})})});import{jsx as J}from"react/jsx-runtime";var _="k-table-body",R=e=>J("div",{className:a(e.className,_,"k-table-scroller"),children:e.children});import{jsx as W}from"react/jsx-runtime";var q="k-table-footer",M=e=>W("div",{className:a(e.className,q),children:e.children});import{jsx as X}from"react/jsx-runtime";var H="k-table",U=[],V={size:[d.small,d.medium,d.large]},Q={},x=e=>{let{size:t,...o}=e;return X("table",{...o,className:a(e.className,H,w(H,{size:t})),children:e.children})};x.states=U;x.options=V;x.className=H;x.defaultOptions=Q;import{jsx as ee}from"react/jsx-runtime";var v="k-table-list",Y=[],Z={size:[d.small,d.medium,d.large]},j={},h=e=>{let{size:t,virtualization:o,...T}=e;return ee("ul",{...T,className:a(e.className,"k-table",v,w(v,{size:t}),{"k-virtual-table":o}),children:e.children})};h.states=Y;h.options=Z;h.className=v;h.defaultOptions=j;import{jsx as ae}from"react/jsx-runtime";var te="k-table-thead",y=e=>ae("thead",{className:a(e.className,te),children:e.children});import{jsx as et}from"react/jsx-runtime";import{jsx as ot}from"react/jsx-runtime";import{jsx as oe}from"react/jsx-runtime";var A="k-table-row",le=[i.hover,i.focus,i.selected,i.disabled,i.highlighted],p=e=>{let{hover:t,focus:o,selected:T,highlighted:n,disabled:m,alt:f,...g}=e;return oe("tr",{...g,className:a(e.className,A,{"k-table-alt-row":f},u(A,{hover:t,focus:o,disabled:m,selected:T,highlighted:n})),children:e.children})};p.states=le;p.className=A;import{jsx as Te}from"react/jsx-runtime";var S="k-table-row",se=[i.hover,i.focus,i.selected,i.disabled],r=e=>{let{hover:t,focus:o,selected:T,disabled:n,alt:m,...f}=e;return Te("li",{...f,className:a(e.className,S,{"k-table-alt-row":m},u(S,{hover:t,focus:o,disabled:n,selected:T})),children:e.children})};r.states=se;r.className=S;import{jsx as de}from"react/jsx-runtime";var ie="k-table-th",L=e=>{let{text:t,colspan:o,rowspan:T,...n}=e,m=t||e.children;return de("th",{colSpan:o,rowSpan:T,...n,className:a(e.className,ie),children:m})};import{jsx as re}from"react/jsx-runtime";var be="k-table-th",z=e=>{let{text:t,...o}=e,T=t||e.children;return re("span",{...o,className:a(e.className,be),children:T})};import{jsx as ce}from"react/jsx-runtime";var E="k-table-td",ne=[i.focus,i.selected,i.highlighted],D=e=>{let{focus:t,selected:o,highlighted:T,text:n,colspan:m,rowspan:f,...g}=e,B=n||e.children;return ce("td",{colSpan:m,rowSpan:f,...g,className:a(e.className,E,u(E,{focus:t,selected:o,highlighted:T})),children:B})};D.states=ne;D.className=E;import{jsx as me}from"react/jsx-runtime";var xe="k-table-td",s=e=>{let{text:t,...o}=e,T=t||e.children;return me("span",{...o,className:a(e.className,xe),children:T})};import{jsx as kt}from"react/jsx-runtime";import{jsx as pe}from"react/jsx-runtime";var he="k-table-group-sticky-header",O=e=>pe("div",{className:a(e.className,he),children:e.children});import{jsx as Et}from"react/jsx-runtime";import{jsx as we}from"react/jsx-runtime";var Le="k-table-group-row",C=e=>we("li",{className:a(e.className,Le),children:e.children});import{jsx as $t,jsxs as It}from"react/jsx-runtime";import{jsx as qt,jsxs as Wt}from"react/jsx-runtime";import{Fragment as Zt,jsx as Xt,jsxs as Yt}from"react/jsx-runtime";import{jsx as l,jsxs as b}from"react/jsx-runtime";var ga=e=>b(c,{...e,children:[b(N,{children:[b("colgroup",{children:[l("col",{style:{width:"50px"}}),l("col",{style:{width:"160px"}}),l("col",{})]}),l(y,{children:b(p,{children:[l(L,{text:"ID"}),l(L,{text:"Name"}),l(L,{text:"Job Title"})]})})]}),l(O,{children:l(z,{text:"Initial group"})}),l(R,{children:b(h,{children:[b(r,{children:[l(s,{text:"1",style:{width:"50px"}}),l(s,{text:"Data 1.2",style:{width:"160px"}}),l(s,{text:"Data 1.3"})]}),b(r,{alt:!0,children:[l(s,{text:"2",style:{width:"50px"}}),l(s,{text:"Data 2.2 (alt)",style:{width:"160px"}}),l(s,{text:"Data 2.3"})]}),b(r,{children:[l(s,{text:"3",style:{width:"50px"}}),l(s,{text:"Data 3.2",style:{width:"160px"}}),l(s,{text:"Data 3.3"})]}),l(C,{children:l(z,{text:"Group"})}),b(r,{children:[l(s,{text:"4",style:{width:"50px"}}),l(s,{text:"Data 4.2",style:{width:"160px"}}),l(s,{text:"Data 4.3"})]}),b(r,{alt:!0,children:[l(s,{text:"5",style:{width:"50px"}}),l(s,{text:"Data 5.2 (alt)",style:{width:"160px"}}),l(s,{text:"Data 5.3"})]}),b(r,{children:[l(s,{text:"6",style:{width:"50px"}}),l(s,{text:"Data 6.2",style:{width:"160px"}}),l(s,{text:"Data 6.3"})]})]})}),l(M,{children:l(s,{text:"30 records in total"})})]});export{ga as DataTableList};