UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

2 lines (1 loc) 5.62 kB
var a=(...t)=>t.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?a(...e):typeof e=="object"?Object.keys(e).map((s,b)=>e[b]||e[s]&&s||null).filter(s=>s!==null).join(" "):e).filter(e=>!!e).join(" ");var p=(t,e)=>a({[`${t}-xs`]:e.size==="xsmall",[`${t}-sm`]:e.size==="small",[`${t}-md`]:e.size==="medium",[`${t}-lg`]:e.size==="large",[`${t}-xl`]:e.size==="xlarge",[`${t}-xxl`]:e.size==="xxlarge",[`${t}-xxxl`]:e.size==="xxxlarge"},{[`${t}-${e.fillMode}`]:e.fillMode},{[`${t}-${e.fillMode}-${e.themeColor}`]:e.fillMode&&e.themeColor},{[`${t}-${e.themeColor}`]:e.themeColor&&e.fillMode===void 0},{"k-rounded-sm":e.rounded==="small","k-rounded-md":e.rounded==="medium","k-rounded-lg":e.rounded==="large","k-rounded-full":e.rounded==="full"}),L=(t,e)=>a({"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 d={xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"};var T={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}from"react/jsx-runtime";var S="k-data-table",O=[],C={size:[d.small,d.medium,d.large]},z={size:d.medium},h=t=>{let{size:e=z.size,...s}=t;return B("div",{...s,className:a(t.className,S,p("k-table",{size:e})),children:t.children})};h.states=O;h.options=C;h.className=S;h.defaultOptions=z;import{jsx as ke}from"react/jsx-runtime";import{jsx as Ae}from"react/jsx-runtime";import{jsx as Ke}from"react/jsx-runtime";import{jsx as F}from"react/jsx-runtime";var D="k-table",P=[],$={size:[d.small,d.medium,d.large]},I={},x=t=>{let{size:e,...s}=t;return F("table",{...s,className:a(t.className,D,p(D,{size:e})),children:t.children})};x.states=P;x.options=$;x.className=D;x.defaultOptions=I;import{jsx as W}from"react/jsx-runtime";var g="k-table-list",_=[],J={size:[d.small,d.medium,d.large]},q={},w=t=>{let{size:e,virtualization:s,...b}=t;return W("ul",{...b,className:a(t.className,"k-table",g,p(g,{size:e}),{"k-virtual-table":s}),children:t.children})};w.states=_;w.options=J;w.className=g;w.defaultOptions=q;import{jsx as V}from"react/jsx-runtime";var U="k-table-thead",f=t=>V("thead",{className:a(t.className,U),children:t.children});import{jsx as X}from"react/jsx-runtime";var Q="k-table-tbody",k=t=>X("tbody",{className:a(t.className,Q),children:t.children});import{jsx as Z}from"react/jsx-runtime";var Y="k-table-tfoot",M=t=>Z("tfoot",{className:a(t.className,Y),children:t.children});import{jsx as ee}from"react/jsx-runtime";var H="k-table-row",j=[T.hover,T.focus,T.selected,T.disabled,T.highlighted],i=t=>{let{hover:e,focus:s,selected:b,highlighted:c,disabled:m,alt:u,...R}=t;return ee("tr",{...R,className:a(t.className,H,{"k-table-alt-row":u},L(H,{hover:e,focus:s,disabled:m,selected:b,highlighted:c})),children:t.children})};i.states=j;i.className=H;import{jsx as ae}from"react/jsx-runtime";var v="k-table-row",te=[T.hover,T.focus,T.selected,T.disabled],y=t=>{let{hover:e,focus:s,selected:b,disabled:c,alt:m,...u}=t;return ae("li",{...u,className:a(t.className,v,{"k-table-alt-row":m},L(v,{hover:e,focus:s,disabled:c,selected:b})),children:t.children})};y.states=te;y.className=v;import{jsx as oe}from"react/jsx-runtime";var le="k-table-th",n=t=>{let{text:e,colspan:s,rowspan:b,...c}=t,m=e||t.children;return oe("th",{colSpan:s,rowSpan:b,...c,className:a(t.className,le),children:m})};import{jsx as dt}from"react/jsx-runtime";import{jsx as Te}from"react/jsx-runtime";var A="k-table-td",se=[T.focus,T.selected,T.highlighted],o=t=>{let{focus:e,selected:s,highlighted:b,text:c,colspan:m,rowspan:u,...R}=t,G=c||t.children;return Te("td",{colSpan:m,rowSpan:u,...R,className:a(t.className,A,L(A,{focus:e,selected:s,highlighted:b})),children:G})};o.states=se;o.className=A;import{jsx as ht}from"react/jsx-runtime";import{jsx as ut}from"react/jsx-runtime";import{jsx as Rt}from"react/jsx-runtime";import{jsx as de}from"react/jsx-runtime";var ie="k-table-group-row",N=t=>de("tr",{className:a(t.className,ie),children:t.children});import{jsx as At}from"react/jsx-runtime";import{jsx as Ct,jsxs as Bt}from"react/jsx-runtime";import{jsx as Ft,jsxs as _t}from"react/jsx-runtime";import{jsx as Ut,jsxs as Vt}from"react/jsx-runtime";import{Fragment as ne,jsx as l,jsxs as r}from"react/jsx-runtime";var ya=t=>l(x,{children:r(ne,{children:[r("colgroup",{children:[l("col",{style:{width:"50px"}}),l("col",{}),l("col",{})]}),l(f,{children:r(i,{children:[l(n,{text:"ID"}),l(n,{text:"Name"}),l(n,{text:"Job Title"})]})}),r(k,{children:[l(N,{children:l(n,{text:"Group row",colspan:"3"})}),r(i,{children:[l(o,{text:"1"}),l(o,{text:"Data 1.2"}),l(o,{text:"Data 1.3"})]}),r(i,{alt:!0,children:[l(o,{text:"2"}),l(o,{text:"Data 2.2 (alt)"}),l(o,{text:"Data 2.3"})]}),r(i,{children:[l(o,{text:"3"}),l(o,{text:"Data 3.2"}),l(o,{text:"Data 3.3"})]}),l(N,{children:l(n,{text:"Group row",colspan:"3"})}),r(i,{children:[l(o,{text:"4"}),l(o,{text:"Data 4.2"}),l(o,{text:"Data 4.3"})]}),r(i,{alt:!0,children:[l(o,{text:"5"}),l(o,{text:"Data 5.2 (alt)"}),l(o,{text:"Data 5.3"})]}),r(i,{children:[l(o,{text:"6"}),l(o,{text:"Data 6.2"}),l(o,{text:"Data 6.3"})]})]}),l(M,{children:l(i,{children:l(o,{text:"30 records in total",colspan:"3"})})})]}),...t});export{ya as TableNative};