UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

2 lines (1 loc) 2.43 kB
var d=(...t)=>t.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?d(...e):typeof e=="object"?Object.keys(e).map((i,c)=>e[c]||e[i]&&i||null).filter(i=>i!==null).join(" "):e).filter(e=>!!e).join(" ");var x=(t,e)=>d({[`${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"});var s={xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},n={small:"small",medium:"medium",large:"large",full:"full"},m={solid:"solid",flat:"flat",outline:"outline",clear:"clear",link:"link"},o={inherit:"inherit",base:"base",primary:"primary",secondary:"secondary",tertiary:"tertiary",info:"info",success:"success",warning:"warning",error:"error",dark:"dark",light:"light",inverse:"inverse"},a={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"};var f="avatar",h=f;import{jsx as g}from"react/jsx-runtime";var u="k-avatar";var b=[a.hover,a.focus,a.active,a.selected,a.disabled],M={size:[s.small,s.medium,s.large],rounded:[n.small,n.medium,n.large,n.full],fillMode:[m.solid,m.flat,m.outline],themeColor:[o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.light,o.dark,o.inverse]},r={type:"text",size:s.medium,rounded:n.full,fillMode:m.solid,themeColor:o.primary,border:!1},l=t=>{let{size:e=r.size,rounded:i=r.rounded,fillMode:c=r.fillMode,themeColor:A=r.themeColor,type:v=r.type,border:y=r.border,...k}=t;return g("div",{...k,className:d(t.className,u,x(u,{size:e,rounded:i,fillMode:c,themeColor:A}),{[`${u}-bordered`]:y}),children:g("span",{className:`${u}-${v}`,children:t.children})})};l.states=b;l.options=M;l.className=u;l.defaultOptions=r;l.moduleName=f;l.folderName=h;var L=l;export{u as AVATAR_CLASSNAME,l as Avatar,L as default};