UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

2 lines (1 loc) 21.2 kB
var Oe=Object.create;var pt=Object.defineProperty;var Be=Object.getOwnPropertyDescriptor;var Ke=Object.getOwnPropertyNames;var Re=Object.getPrototypeOf,De=Object.prototype.hasOwnProperty;var _e=(t,e)=>{for(var o in e)pt(t,o,{get:e[o],enumerable:!0})},_t=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Ke(e))!De.call(t,s)&&s!==o&&pt(t,s,{get:()=>e[s],enumerable:!(n=Be(e,s))||n.enumerable});return t};var He=(t,e,o)=>(o=t!=null?Oe(Re(t)):{},_t(e||!t||!t.__esModule?pt(o,"default",{value:t,enumerable:!0}):o,t)),Ie=t=>_t(pt({},"__esModule",{value:!0}),t);var Po={};_e(Po,{ORGCHARTNODE_CLASSNAME:()=>ke,OrgchartNode:()=>zo});module.exports=Ie(Po);var a=(...t)=>t.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?a(...e):typeof e=="object"?Object.keys(e).map((o,n)=>e[n]||e[o]&&o||null).filter(o=>o!==null).join(" "):e).filter(e=>!!e).join(" ");var z=(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.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"}),B=(t,e)=>{let{valid:o,invalid:n,hover:s,focus:m,checked:p,active:d,selected:O,disabled:y,indeterminate:N,loading:H,empty:k,readonly:V,highlighted:at,...I}=e;return a({"k-valid":o,"k-invalid":n,"k-hover":s,"k-focus":m,"k-checked":p,"k-active":d,"k-selected":O,"k-disabled":y,"k-indeterminate":N&&!p,"k-loading":H,"k-empty":k,"k-readonly":V,"k-highlighted":at},Object.keys(I).reduce((x,w)=>(w.startsWith("k-")?x[w]=I[w]:x[`k-${w}`]=I[w],x),{}))};function Ht(t,e){if(!e)return{};let o=Array.isArray(e)?e:[e];return Object.fromEntries(o.map(n=>[`k-${n}`,!0]))}var i={undefined:void 0,xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},b={undefined:void 0,none:"none",small:"small",medium:"medium",large:"large",full:"full"},L={undefined:void 0,solid:"solid",flat:"flat",outline:"outline",clear:"clear",link:"link"},K={undefined:void 0,outline:"outline",solid:"solid",duotone:"duotone"},r={undefined:void 0,inherit:"inherit",base:"base",primary:"primary",secondary:"secondary",tertiary:"tertiary",info:"info",success:"success",warning:"warning",error:"error",inverse:"inverse"},c={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"},It={calloutMap:{top:"n",bottom:"s",left:"w",right:"e"},orientationMap:{vertical:"vstack",horizontal:"hstack"}};var zt=require("react/jsx-runtime"),we="k-card-callout",wt=t=>{let{callout:e,...o}=t;return(0,zt.jsx)("span",{...o,className:a(t.className,we,{[`k-callout-${It.calloutMap[e]||e}`]:e})})};var A="card",M=A;var G=require("react/jsx-runtime"),xt="k-card",ze=[c.hover,c.focus,c.selected,c.disabled],Pe={},Fe={},f=t=>{let{orientation:e,callout:o,hover:n,focus:s,selected:m,disabled:p,...d}=t;return(0,G.jsxs)("div",{...d,className:a(t.className,xt,B(xt,{hover:n,focus:s,disabled:p,selected:m}),{[`k-card-${e}`]:e,"k-card-with-callout":o}),children:[o&&o!=="true"&&(0,G.jsx)(wt,{callout:o}),(0,G.jsx)(G.Fragment,{children:t.children})]})};f.states=ze;f.options=Pe;f.className=xt;f.defaultOptions=Fe;f.moduleName=A;f.folderName=M;f.ariaSpec={selector:".k-card",rules:[{selector:".k-card-list .k-card",attribute:"role=listitem",usage:"When the card is located in a list, it should have the listitem role."},{selector:".k-card-list .k-card",attribute:"tabindex=0",usage:"The card component is focusable when navigatable."},{selector:".k-card-list .k-card",attribute:"aria-describedby=.k-card-title id",usage:"Associate the card to the title element."},{selector:".k-card-list .k-card",attribute:"aria-keyshortcuts=Enter",usage:"Announces the bound Enter key that enables navigation inside the card."}]};var rt=require("react/jsx-runtime"),bt="k-card-list",Ue=[],$e={},Ve={},U=t=>{let{...e}=t;return(0,rt.jsx)("div",{...e,className:a(t.className,bt,B(bt,{})),role:"list",children:(0,rt.jsx)(rt.Fragment,{children:t.children})})};U.states=Ue;U.options=$e;U.className=bt;U.defaultOptions=Ve;U.moduleName=A;U.folderName=M;U.ariaSpec={selector:".k-card-list",rules:[{selector:".k-card-list",attribute:"role=list",usage:"The card list container announces its list role."},{selector:".k-card-list .k-card",attribute:"role=listitem",usage:"Each card in the list has the listitem role."},{selector:".k-card-list .k-card",attribute:"tabindex=0",usage:"The card is focusable when navigatable."},{selector:".k-card-list .k-card",attribute:"aria-describedby=.k-card-title id",usage:"Associate the card to its title element."},{selector:".k-card-list .k-card",attribute:"aria-keyshortcuts=Enter",usage:"Announces the Enter key for navigation inside the card."}]};var Ft=require("react/jsx-runtime"),Pt="k-card-group",Ge=[],We={},qe={},X=t=>{let{...e}=t;return(0,Ft.jsx)("div",{...e,className:a(t.className,Pt),children:t.children})};X.states=Ge;X.options=We;X.className=Pt;X.defaultOptions=qe;X.moduleName=A;X.folderName=M;var Ut=require("react/jsx-runtime"),vt="k-card-wrap",Xe=[c.focus,c.selected],Je={},Ye={},J=t=>{let{focus:e,selected:o,...n}=t;return(0,Ut.jsx)("div",{...n,className:a(t.className,vt,B(vt,{focus:e,selected:o})),children:t.children})};J.states=Xe;J.options=Je;J.className=vt;J.defaultOptions=Ye;J.moduleName=A;J.folderName=M;var $t=require("react/jsx-runtime"),Nt="k-card-title",Qe=[c.hover,c.focus],P=t=>{let{hover:e,focus:o,...n}=t;return(0,$t.jsx)("div",{...n,className:a(t.className,Nt,B(Nt,{hover:e,focus:o})),children:t.children})};P.states=Qe;P.className=Nt;var Vt=require("react/jsx-runtime"),Ze="k-card-subtitle",Y=t=>{let{...e}=t;return(0,Vt.jsx)("div",{...e,className:a(t.className,Ze),children:t.children})};var $=require("react/jsx-runtime"),Gt="k-card-media",At=t=>{let{src:e,...o}=t;return(0,$.jsx)($.Fragment,{children:e?(0,$.jsx)("img",{...o,className:a(t.className,Gt),src:e}):(0,$.jsx)("span",{...o,className:a(t.className,Gt),children:(0,$.jsx)($.Fragment,{children:t.children})})})};var nt=require("react/jsx-runtime"),gt="k-font-icon",je=[],to={size:[i.undefined,i.xsmall,i.small,i.medium,i.large,i.xlarge,i.xxlarge,i.xxxlarge],themeColor:[r.undefined,r.base,r.primary,r.secondary,r.tertiary,r.success,r.warning,r.error,r.info]},eo={},st=t=>{let{size:e,themeColor:o,icon:n,rotate:s,flip:m,...p}=t;return n?(0,nt.jsx)("span",{...p,className:a(t.className,gt,z(gt,{size:e}),{[`k-i-${n}`]:n,[`k-color-${o}`]:o,[`k-rotate-${s}`]:s,"k-flip-h":m==="h"||m==="both","k-flip-v":m==="v"||m==="both"}),"aria-hidden":"true"}):(0,nt.jsx)(nt.Fragment,{})};st.states=je;st.options=to;st.className=gt;st.defaultOptions=eo;var Wt=st;var W=require("react/jsx-runtime"),yt="k-svg-icon",oo=[],ao={size:[i.undefined,i.xsmall,i.small,i.medium,i.large,i.xlarge,i.xxlarge,i.xxxlarge],themeColor:[r.undefined,r.base,r.primary,r.secondary,r.tertiary,r.success,r.warning,r.error,r.info],variant:[K.outline,K.solid,K.duotone]},kt={viewBox:"0 0 24 24",variant:K.outline},it=t=>{var H,k;let{size:e,themeColor:o,rotate:n,flip:s,viewBox:m=kt.viewBox,variant:p=kt.variant,icon:d,...O}=t;if(!d)return(0,W.jsx)(W.Fragment,{});if(d==="none")return(0,W.jsx)("span",{...O,className:a(t.className,yt,z("k-icon",{size:e}),"k-none"),"aria-hidden":"true"});let y=typeof d=="object"&&d.name&&d.name,N=typeof d=="object"?p&&((H=d.variants)==null?void 0:H[p])||((k=d.variants)==null?void 0:k.outline)||d.content:void 0;return(0,W.jsx)("span",{...O,className:a(t.className,yt,z("k-icon",{size:e}),{[`k-svg-i-${y}`]:y,[`k-color-${o}`]:o,[`k-rotate-${n}`]:n,"k-flip-h":s==="h"||s==="both","k-flip-v":s==="v"||s==="both"}),"aria-hidden":"true",children:(0,W.jsx)("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof d=="object"?d.viewBox:m,dangerouslySetInnerHTML:N!==void 0?{__html:N}:void 0,children:d?void 0:t.children})})};it.states=oo;it.options=ao;it.className=yt;it.defaultOptions=kt;var Mt=it;var Tt=He(require("@progress/kendo-svg-icons"));var qt="icon",Xt="icons";var Qt=require("react");var Jt=require("react"),Yt=(0,Jt.createContext)({iconsType:"svg"});var F=require("react/jsx-runtime"),ut="k-icon",ro=t=>t.replace(/([-_][a-z0-9])/gi,e=>e.toUpperCase().replace("-","").replace("_","")),no=[],so={size:[i.undefined,i.xsmall,i.small,i.medium,i.large,i.xlarge,i.xxlarge,i.xxxlarge],themeColor:[r.undefined,r.base,r.primary,r.secondary,r.tertiary,r.success,r.warning,r.error,r.info],variant:[K.outline,K.solid,K.duotone]},ft={viewBox:"0 0 24 24",type:"svg",variant:K.outline},T=t=>{let{iconsType:e}=(0,Qt.useContext)(Yt),{size:o,themeColor:n,icon:s,type:m=e||ft.type,rotate:p,flip:d,viewBox:O=ft.viewBox,variant:y=ft.variant,...N}=t;if(!s)return(0,F.jsx)(F.Fragment,{});if((e||m)==="svg"){if(s==="none")return(0,F.jsx)(Mt,{...N,className:a(t.className,ut),icon:s,size:o,variant:y});let k=Tt[s]?s:ro(`${s}-icon`);return Tt[k]?(0,F.jsx)(Mt,{...N,className:a(t.className,ut),icon:Tt[k],size:o,themeColor:n,rotate:p,flip:d,viewBox:O,variant:y}):(0,F.jsx)(F.Fragment,{})}return(0,F.jsx)(Wt,{...N,className:a(t.className,ut),icon:s,size:o,themeColor:n,rotate:p,flip:d})};T.states=no;T.options=so;T.defaultOptions=ft;T.className=ut;T.moduleName=qt;T.folderName=Xt;T.ariaSpec={selector:".k-icon, .k-svg-icon",rules:[{selector:".k-icon, .k-svg-icon",attribute:"aria-hidden=true",usage:"Hides the icon element and all its children from assistive technologies."}]};var Et="button",Zt=Et;var g=require("react/jsx-runtime"),lt="k-button",io=["icon-button"],lo=[c.hover,c.focus,c.active,c.selected,c.disabled,c.generating],co={size:[i.undefined,i.xsmall,i.small,i.medium,i.large],rounded:[b.undefined,b.none,b.small,b.medium,b.large,b.full],fillMode:[L.undefined,L.solid,L.flat,L.outline,L.clear,L.link],themeColor:[r.undefined,r.base,r.primary,r.secondary,r.tertiary,r.success,r.warning,r.error,r.info,r.inverse]},Lt={showArrow:!1,arrowIconName:"chevron-down"},l=t=>{let{as:e="button",size:o,rounded:n,fillMode:s,themeColor:m,showArrow:p=Lt.showArrow,arrowIconName:d=Lt.arrowIconName,variant:O,hover:y,focus:N,active:H,selected:k,disabled:V,togglable:at,ariaDisabled:I,icon:x,iconSize:w,text:mt,iconClassName:Me,className:Te,...Ee}=t,Le=x!=null,Se=t.children!==void 0;return(0,g.jsxs)(e,{className:a(Te,lt,Ht(lt,O),z(lt,{size:o,rounded:n,fillMode:s,themeColor:m}),B(lt,{hover:y,focus:N,active:H,disabled:V||I,selected:k}),{"k-icon-button":!mt&&!Se&&Le}),"aria-pressed":at?k?"true":"false":void 0,...Ee,"aria-disabled":I?"true":void 0,disabled:V||void 0,children:[typeof x=="string"&&x&&(0,g.jsx)(T,{className:a(Me,"k-button-icon"),icon:x,size:w}),x&&typeof x!="string"&&(0,g.jsx)(g.Fragment,{children:x}),mt?(0,g.jsxs)(g.Fragment,{children:[mt&&(0,g.jsx)("span",{className:"k-button-text",children:mt}),t.children]}):t.children&&(0,g.jsx)("span",{className:"k-button-text",children:t.children}),p&&(0,g.jsx)("span",{className:"k-menu-button-arrow k-button-arrow",children:(0,g.jsx)(T,{icon:d})})]})};l.states=lo;l.options=co;l.variants=io;l.className=lt;l.defaultOptions=Lt;l.moduleName=Et;l.folderName=Zt;l.ariaSpec={selector:".k-button",rules:[{selector:".k-button",attribute:"role=button or nodeName=button",usage:"The button role is implicit from the native <button> element."},{selector:".k-button",attribute:"aria-label (when icon-only)",usage:"Required for icon-only buttons that have no visible text."},{selector:".k-button",attribute:"aria-pressed (when togglable)",usage:"Indicates the pressed state of a toggle button."},{selector:".k-button",attribute:"disabled (when disabled)",usage:"Rendered when the button is disabled."}]};var te=require("react/jsx-runtime"),jt=t=>(0,te.jsx)(l,{icon:"folder",...t,"aria-label":t["aria-label"]||"Folder",children:void 0});var oe=require("react/jsx-runtime"),ee=t=>(0,oe.jsx)(l,{icon:"folder",children:"Button",...t});var re=require("react/jsx-runtime"),ae=t=>(0,re.jsx)(l,{children:"Button",...t});var Ct=require("react/jsx-runtime"),mo=l.options,po=l.states,uo={...l.defaultOptions,variant:"text"},fo=[{name:"icon-only",title:"Icon Only"},{name:"icon-and-text",title:"Icon & Text"},{name:"text",title:"Text"}],Co=[],Q=t=>{let{variant:e,...o}=t;switch(e){case"icon-only":return(0,Ct.jsx)(jt,{...o,icon:"star"});case"icon-and-text":return(0,Ct.jsx)(ee,{...o,icon:"star",children:"Button"});default:return(0,Ct.jsx)(ae,{...o,children:"Button"})}};Q.options=mo;Q.states=po;Q.variants=fo;Q.defaultOptions=uo;Q.modifiers=Co;Q.className=l.className;var R=require("react/jsx-runtime"),ho="k-card-header",dt=t=>{let{title:e,subtitle:o,details:n,...s}=t;return(0,R.jsxs)("div",{...s,className:a(t.className,ho),children:[e&&(0,R.jsx)(P,{children:e}),o&&(0,R.jsx)(Y,{children:o}),(0,R.jsx)(R.Fragment,{children:t.children}),n&&(0,R.jsx)("span",{className:"k-card-header-actions",children:(0,R.jsx)(l,{className:"k-card-details",icon:"more-vertical",fillMode:"flat","aria-label":"Card details"})})]})};var ne=require("react/jsx-runtime"),xo="k-card-footer",St=t=>{let{...e}=t;return(0,ne.jsx)("div",{...e,className:a(t.className,xo),children:t.children})};var D=require("react/jsx-runtime"),bo="k-card-body",_=t=>{let{title:e,subtitle:o,details:n,...s}=t;return(0,D.jsxs)("div",{...s,className:a(t.className,bo),children:[e&&(0,D.jsx)(P,{children:e}),o&&(0,D.jsx)(Y,{children:o}),(0,D.jsx)(D.Fragment,{children:t.children}),n&&(0,D.jsx)("span",{className:"k-card-header-actions",children:(0,D.jsx)(l,{className:"k-card-details",icon:"more-vertical",fillMode:"flat","aria-label":"Card details"})})]})};var ie=require("react/jsx-runtime"),se="k-card-deck",vo=[],No={},Ao={},Z=t=>{let{...e}=t;return(0,ie.jsx)("div",{...e,className:a(t.className,se),children:t.children})};Z.states=vo;Z.options=No;Z.className=se;Z.defaultOptions=Ao;Z.moduleName=A;Z.folderName=M;var de=require("react/jsx-runtime"),le="k-card-deck-scrollwrap",go=[],yo={},ko={},j=t=>{let{...e}=t;return(0,de.jsx)("div",{...e,className:a(t.className,le),children:t.children})};j.states=go;j.options=yo;j.className=le;j.defaultOptions=ko;j.moduleName=A;j.folderName=M;var Ot="action-buttons",ce=Ot;var me=require("react/jsx-runtime"),ht="k-actions",Mo=[],To={},Bt={alignment:"start",orientation:"horizontal"},v=t=>{let{alignment:e=Bt.alignment,orientation:o=Bt.orientation,...n}=t;return(0,me.jsx)("div",{...n,className:a(ht,{[`${ht}-${e}`]:e,[`${ht}-${o}`]:o},t.className),children:t.children})};v.states=Mo;v.options=To;v.className=ht;v.defaultOptions=Bt;v.moduleName=Ot;v.folderName=ce;var E=require("react/jsx-runtime"),pe=t=>(0,E.jsx)(f,{orientation:"vertical",children:(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(dt,{children:"Card Header"}),(0,E.jsx)(_,{children:(0,E.jsx)("p",{children:"Some quick example text to build on the card title and make up the bulk of the card's content."})}),(0,E.jsxs)(v,{className:"k-card-actions",children:[(0,E.jsx)(l,{fillMode:"flat",themeColor:"primary",children:"Action 1"}),(0,E.jsx)(l,{fillMode:"flat",themeColor:"primary",children:"Action 2"})]})]}),...t});var S=require("react/jsx-runtime"),ue=t=>(0,S.jsx)(f,{orientation:"horizontal",children:(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(_,{title:"Card Title",children:(0,S.jsx)("p",{children:"Some quick example text to build on the card title and make up the bulk of the card's content."})}),(0,S.jsxs)(v,{orientation:"vertical",className:"k-card-actions",children:[(0,S.jsx)(l,{fillMode:"flat",themeColor:"primary",children:"Action 1"}),(0,S.jsx)(l,{fillMode:"flat",themeColor:"primary",children:"Action 2"})]})]}),...t});var fe=require("react/jsx-runtime");var u=require("react/jsx-runtime"),Eo=f.options,Lo=f.states,Ce={...f.defaultOptions,variant:"vertical"},So=[{name:"vertical",title:"Vertical"},{name:"horizontal",title:"Horizontal"}],Oo=[{name:"media",title:"Card with Media"},{name:"header",title:"Card with Header"},{name:"footer",title:"Card with Footer"}],tt=t=>{let{variant:e,modifiers:o,...n}={...Ce,...t},s=!1,m=!1,p=!1;return Object.keys(o||{}).forEach(d=>{switch(d){case"media":{s=!!(o!=null&&o[d]);break}case"header":{m=!!(o!=null&&o[d]);break}case"footer":{p=!!(o!=null&&o[d]);break}}}),e==="horizontal"?(0,u.jsxs)(ue,{style:{maxWidth:"420px"},...n,children:[s&&(0,u.jsx)(At,{src:"https://demos.telerik.com/kendo-ui/content/web/cards/rome.jpg"}),(0,u.jsxs)("div",{children:[m&&(0,u.jsx)(dt,{title:"Header Title",subtitle:"Header Subtitle"}),(0,u.jsx)(_,{title:"Title",subtitle:"Subtitle",children:(0,u.jsx)("p",{children:"Some quick example text to build on the card title and make up the bulk of the card's content."})}),p&&(0,u.jsx)(St,{children:"Card Footer"})]}),(m||p)&&(0,u.jsx)("span",{className:"k-separator k-separator-vertical"}),(0,u.jsxs)(v,{orientation:"vertical",alignment:"stretched",className:"k-card-actions",children:[(0,u.jsx)(l,{fillMode:"flat",themeColor:"primary",children:"Button"}),(0,u.jsx)(l,{fillMode:"flat",themeColor:"primary",children:"Button"})]})]}):(0,u.jsxs)(pe,{style:{maxHeight:"450px",width:"300px"},...n,children:[m&&(0,u.jsx)(dt,{title:"Header Title",subtitle:"Header Subtitle"}),s&&(0,u.jsx)(At,{src:"https://demos.telerik.com/kendo-ui/content/web/cards/rome.jpg"}),(0,u.jsx)(_,{title:"Title",subtitle:"Subtitle",children:(0,u.jsx)("p",{children:"Some quick example text to build on the card title and make up the bulk of the card's content."})}),p&&(0,u.jsx)(St,{children:"Card Footer"}),(0,u.jsxs)(v,{className:"k-card-actions",children:[(0,u.jsx)(l,{fillMode:"flat",themeColor:"primary",children:"Button"}),(0,u.jsx)(l,{fillMode:"flat",themeColor:"primary",children:"Button"})]})]})};tt.options=Eo;tt.states=Lo;tt.variants=So;tt.defaultOptions=Ce;tt.modifiers=Oo;tt.className=f.className;var Kt="avatar",he=Kt;var Dt=require("react/jsx-runtime"),ct="k-avatar";var Bo=[c.hover,c.focus,c.active,c.selected,c.disabled],Ko={size:[i.undefined,i.small,i.medium,i.large],rounded:[b.undefined,b.none,b.small,b.medium,b.large,b.full],fillMode:[L.undefined,L.solid,L.outline],themeColor:[r.undefined,r.base,r.primary,r.secondary,r.tertiary]},Rt={type:"text",border:!1},h=t=>{let{size:e,rounded:o,fillMode:n,themeColor:s,type:m=Rt.type,border:p=Rt.border,...d}=t;return(0,Dt.jsx)("div",{...d,className:a(t.className,ct,z(ct,{size:e,rounded:o,fillMode:n,themeColor:s}),{[`${ct}-bordered`]:p}),children:(0,Dt.jsx)("span",{className:`${ct}-${m}`,children:t.children})})};h.states=Bo;h.options=Ko;h.className=ct;h.defaultOptions=Rt;h.moduleName=Kt;h.folderName=he;h.ariaSpec={selector:".k-avatar",rules:[{selector:".k-avatar img",attribute:"alt",usage:"Images inside Avatar must have alt text for screen readers."}]};var q=h;var be=require("react/jsx-runtime"),xe=t=>(0,be.jsx)(q,{type:"icon",...t});var Ne=require("react/jsx-runtime"),ve=t=>(0,Ne.jsx)(q,{type:"text",...t});var ge=require("react/jsx-runtime"),Ae=t=>(0,ge.jsx)(q,{type:"image",...t});var Ro=require("react/jsx-runtime");var et=require("react/jsx-runtime"),Do=h.options,_o=h.states,Ho={...h.defaultOptions,variant:"image"},Io=[{name:"image",title:"Image"},{name:"icon",title:"Icon Avatar"},{name:"text",title:"Text Avatar"}],wo=[],ot=t=>{let{variant:e,...o}=t;switch(e){case"icon":return(0,et.jsx)(xe,{...o,children:(0,et.jsx)(T,{icon:"star"})});case"text":return(0,et.jsx)(ve,{...o,children:"JO"});default:return(0,et.jsx)(Ae,{...o,children:(0,et.jsx)("img",{src:"https://demos.telerik.com/kendo-ui/content/web/Customers/RICSU.jpg"})})}};ot.options=Do;ot.states=_o;ot.variants=Io;ot.defaultOptions=Ho;ot.modifiers=wo;ot.className=h.className;var C=require("react/jsx-runtime"),ke="k-orgchart-node",ye={buttonIcon:"plus",details:!0},zo=t=>{let{title:e,subtitle:o,details:n=ye.details,color:s,lineBottom:m,lineTop:p,button:d,buttonIcon:O=ye.buttonIcon,avatar:y,avatarType:N,avatarAlt:H,ariaLevel:k,ariaExpanded:V,ariaOwns:at,focus:I,menuButton:x,...w}=t;return(0,C.jsxs)("div",{...w,className:a(t.className,ke,"k-vstack","k-align-items-center",{"k-focus":I}),role:"treeitem","aria-level":k,"aria-keyshortcuts":"Enter","aria-expanded":V!==void 0?V?"true":"false":void 0,"aria-owns":at,"aria-selected":I?"true":"false",children:[p&&(0,C.jsx)("div",{className:"k-orgchart-line k-orgchart-line-v"}),(0,C.jsx)(f,{className:"k-orgchart-card",children:(0,C.jsxs)(_,{className:"k-hstack",details:n,style:{borderTopColor:s},children:[(0,C.jsx)(h,{type:N,themeColor:"secondary",children:N==="image"?(0,C.jsx)("img",{src:y,alt:H||""}):y}),(0,C.jsxs)("div",{className:"k-card-title-wrap k-vstack",children:[(0,C.jsx)(P,{className:"k-text-ellipsis",children:e}),(0,C.jsx)("span",{className:"k-spacer"}),(0,C.jsx)(Y,{className:"k-text-ellipsis",children:o})]}),(0,C.jsx)("span",{className:"k-spacer"}),x&&(0,C.jsx)("span",{className:"k-orgchart-card-menu",role:"button","aria-label":"Edit menu",tabIndex:-1})]})}),m&&(0,C.jsx)("div",{className:"k-orgchart-line k-orgchart-line-v"}),d&&(0,C.jsx)(l,{className:"k-orgchart-button",icon:O,role:"presentation","aria-hidden":"true",tabIndex:-1})]})};