UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

2 lines (1 loc) 2.46 kB
var a=(...t)=>t.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?a(...e):typeof e=="object"?Object.keys(e).map((l,o)=>e[o]||e[l]&&l||null).filter(l=>l!==null).join(" "):e).filter(e=>!!e).join(" ");var s=(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"}),c=(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 i={inherit:"inherit",base:"base",primary:"primary",secondary:"secondary",tertiary:"tertiary",info:"info",success:"success",warning:"warning",error:"error",dark:"dark",light:"light",inverse:"inverse"},r={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"},u={calloutMap:{top:"n",bottom:"s",left:"w",right:"e"},orientationMap:{vertical:"vstack",horizontal:"hstack"}};import{jsx as C}from"react/jsx-runtime";var v="k-card-callout",m=t=>{let{callout:e,...l}=t;return C("span",{...l,className:a(t.className,v,{[`k-callout-${u.calloutMap[e]||e}`]:e})})};import{Fragment as A,jsx as h,jsxs as z}from"react/jsx-runtime";var d="k-card",b=[r.hover,r.focus,r.selected,r.disabled],M={themeColor:[i.primary,i.success,i.warning,i.error,i.info]},$={},n=t=>{let{orientation:e,themeColor:l,callout:o,hover:x,focus:f,selected:k,disabled:g,...y}=t;return z("div",{...y,className:a(t.className,d,s(d,{themeColor:l}),c(d,{hover:x,focus:f,disabled:g,selected:k}),{[`k-card-${e}`]:e,"k-card-with-callout":o}),children:[o&&o!=="true"&&h(m,{callout:o}),h(A,{children:t.children})]})};n.states=b;n.options=M;n.className=d;n.defaultOptions=$;var j=n;export{d as CARD_CLASSNAME,n as Card,j as default};