UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

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