@progress/kendo-themes-html
Version:
A collection of HTML helpers used for developing Kendo UI themes
2 lines (1 loc) • 2.4 kB
JavaScript
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});var r={inherit:"inherit",base:"base",primary:"primary",secondary:"secondary",tertiary:"tertiary",info:"info",success:"success",warning:"warning",error:"error",dark:"dark",light:"light",inverse:"inverse"},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"},u={calloutMap:{top:"n",bottom:"s",left:"w",right:"e"},orientationMap:{vertical:"vstack",horizontal:"hstack"}};import{jsx as g}from"react/jsx-runtime";var C="k-card-callout",m=t=>{let{callout:e,...l}=t;return g("span",{...l,className:a(t.className,C,{[`k-callout-${u.calloutMap[e]||e}`]:e})})};import{Fragment as A,jsx as x,jsxs as z}from"react/jsx-runtime";var d="k-card",b=[i.hover,i.focus,i.selected,i.disabled],M={themeColor:[r.primary,r.success,r.warning,r.error,r.info]},$={},n=t=>{let{orientation:e,themeColor:l,callout:o,hover:f,focus:h,selected:k,disabled:y,...v}=t;return z("div",{...v,className:a(t.className,d,s(d,{themeColor:l}),c(d,{hover:f,focus:h,disabled:y,selected:k}),{[`k-card-${e}`]:e,"k-card-with-callout":o}),children:[o&&o!=="true"&&x(m,{callout:o}),x(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};