@progress/kendo-themes-html
Version:
A collection of HTML helpers used for developing Kendo UI themes
2 lines (1 loc) • 2.16 kB
JavaScript
var i=(...t)=>t.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?i(...e):typeof e=="object"?Object.keys(e).map((o,l)=>e[l]||e[o]&&o||null).filter(o=>o!==null).join(" "):e).filter(e=>!!e).join(" ");var h=(t,e)=>i({[`${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"}),f=(t,e)=>{let{valid:o,invalid:l,hover:c,focus:g,checked:s,active:k,selected:y,disabled:v,indeterminate:b,loading:S,empty:$,readonly:M,highlighted:p,...m}=e;return i({"k-valid":o,"k-invalid":l,"k-hover":c,"k-focus":g,"k-checked":s,"k-active":k,"k-selected":y,"k-disabled":v,"k-indeterminate":b&&!s,"k-loading":S,"k-empty":$,"k-readonly":M,"k-highlighted":p},Object.keys(m).reduce((x,r)=>(r.startsWith("k-")?x[r]=m[r]:x[`k-${r}`]=m[r],x),{}))};var a={inherit:"inherit",base:"base",primary:"primary",secondary:"secondary",tertiary:"tertiary",info:"info",success:"success",warning:"warning",error:"error",dark:"dark",light:"light",inverse:"inverse"},d={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"};import{jsx as K}from"react/jsx-runtime";var u="k-suggestion",z=[d.active,d.hover,d.focus],C={themeColor:[a.base,a.primary,a.secondary]},A={text:"Suggestion"},n=t=>{let{themeColor:e,active:o,hover:l,focus:c,text:g,...s}=t;return K("span",{...s,className:i(t.className,u,f(u,{hover:l,active:o,focus:c}),h(u,{themeColor:e})),children:g})};n.states=z;n.options=C;n.className=u;n.item=A;var q=n;export{u as SUGGESTION_CLASSNAME,n as Suggestion,q as default};