UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

2 lines (1 loc) 15 kB
var me=Object.create;var nt=Object.defineProperty;var pe=Object.getOwnPropertyDescriptor;var ue=Object.getOwnPropertyNames;var fe=Object.getPrototypeOf,he=Object.prototype.hasOwnProperty;var Ce=(t,e)=>{for(var r in e)nt(t,r,{get:e[r],enumerable:!0})},Rt=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of ue(e))!he.call(t,l)&&l!==r&&nt(t,l,{get:()=>e[l],enumerable:!(n=pe(e,l))||n.enumerable});return t};var Ne=(t,e,r)=>(r=t!=null?me(fe(t)):{},Rt(e||!t||!t.__esModule?nt(r,"default",{value:t,enumerable:!0}):r,t)),xe=t=>Rt(nt({},"__esModule",{value:!0}),t);var xo={};Ce(xo,{ORGCHARTGROUP_CLASSNAME:()=>Kt,OrgchartGroup:()=>E,default:()=>No});module.exports=xe(xo);var a=(...t)=>t.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?a(...e):typeof e=="object"?Object.keys(e).map((r,n)=>e[n]||e[r]&&r||null).filter(r=>r!==null).join(" "):e).filter(e=>!!e).join(" ");var g=(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)=>{let{valid:r,invalid:n,hover:l,focus:d,checked:i,active:m,selected:u,disabled:v,indeterminate:P,loading:J,empty:ct,readonly:q,highlighted:$,...Y}=e;return a({"k-valid":r,"k-invalid":n,"k-hover":l,"k-focus":d,"k-checked":i,"k-active":m,"k-selected":u,"k-disabled":v,"k-indeterminate":P&&!i,"k-loading":J,"k-empty":ct,"k-readonly":q,"k-highlighted":$},Object.keys(Y).reduce((Q,D)=>(D.startsWith("k-")?Q[D]=Y[D]:Q[`k-${D}`]=Y[D],Q),{}))};function Dt(t,e){if(!e)return{};let r=Array.isArray(e)?e:[e];return Object.fromEntries(r.map(n=>[`k-${n}`,!0]))}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"},x={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"},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"},_={calloutMap:{top:"n",bottom:"s",left:"w",right:"e"},orientationMap:{vertical:"vstack",horizontal:"hstack"}};var mt="orgchart",_t=mt;var ut=require("react/jsx-runtime"),Bt="k-orgchart",be=[],ve={},pt={width:"100%",height:"300px"},T=t=>{let{width:e=pt.width,height:r=pt.height,...n}=t;return(0,ut.jsx)("div",{...n,className:a(t.className,Bt),children:(0,ut.jsx)("div",{className:"k-orgchart-container",style:{width:e,height:r},children:t.children})})};T.states=be;T.options=ve;T.className=Bt;T.defaultOptions=pt;T.moduleName=mt;T.folderName=_t;var It=require("react/jsx-runtime"),Ae="k-card-callout",Ht=t=>{let{callout:e,...r}=t;return(0,It.jsx)("span",{...r,className:a(t.className,Ae,{[`k-callout-${_.calloutMap[e]||e}`]:e})})};var h="card",b=h;var B=require("react/jsx-runtime"),st="k-card",ge=[c.hover,c.focus,c.selected,c.disabled],Te={themeColor:[o.primary,o.success,o.warning,o.error,o.info]},Oe={},O=t=>{let{orientation:e,themeColor:r,callout:n,hover:l,focus:d,selected:i,disabled:m,...u}=t;return(0,B.jsxs)("div",{...u,className:a(t.className,st,g(st,{themeColor:r}),C(st,{hover:l,focus:d,disabled:m,selected:i}),{[`k-card-${e}`]:e,"k-card-with-callout":n}),children:[n&&n!=="true"&&(0,B.jsx)(Ht,{callout:n}),(0,B.jsx)(B.Fragment,{children:t.children})]})};O.states=ge;O.options=Te;O.className=st;O.defaultOptions=Oe;O.moduleName=h;O.folderName=b;var Z=require("react/jsx-runtime"),ft="k-card-list",Me=[],ye={},Ee={},U=t=>{let{...e}=t;return(0,Z.jsx)("div",{...e,className:a(t.className,ft,C(ft,{})),children:(0,Z.jsx)(Z.Fragment,{children:t.children})})};U.states=Me;U.options=ye;U.className=ft;U.defaultOptions=Ee;U.moduleName=h;U.folderName=b;var wt=require("react/jsx-runtime"),Gt="k-card-group",Se=[],ke={},Le={},F=t=>{let{...e}=t;return(0,wt.jsx)("div",{...e,className:a(t.className,Gt),children:t.children})};F.states=Se;F.options=ke;F.className=Gt;F.defaultOptions=Le;F.moduleName=h;F.folderName=b;var zt=require("react/jsx-runtime"),ht="k-card-wrap",Ke=[c.focus,c.selected],Re={},De={},V=t=>{let{focus:e,selected:r,...n}=t;return(0,zt.jsx)("div",{...n,className:a(t.className,ht,C(ht,{focus:e,selected:r})),children:t.children})};V.states=Ke;V.options=Re;V.className=ht;V.defaultOptions=De;V.moduleName=h;V.folderName=b;var Pt=require("react/jsx-runtime"),Ct="k-card-title",_e=[c.hover,c.focus],H=t=>{let{hover:e,focus:r,...n}=t;return(0,Pt.jsx)("div",{...n,className:a(t.className,Ct,C(Ct,{hover:e,focus:r})),children:t.children})};H.states=_e;H.className=Ct;var $t=require("react/jsx-runtime"),Be="k-card-subtitle",j=t=>{let{...e}=t;return(0,$t.jsx)("div",{...e,className:a(t.className,Be),children:t.children})};var Ut=require("react/jsx-runtime");var tt=require("react/jsx-runtime"),Nt="k-font-icon",He=[],Ie={size:[s.xsmall,s.small,s.medium,s.large,s.xlarge,s.xxlarge,s.xxxlarge],themeColor:[o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.light,o.dark]},Ge={},et=t=>{let{size:e,themeColor:r,icon:n,rotate:l,flip:d,...i}=t;return n?(0,tt.jsx)("span",{...i,className:a(t.className,Nt,g(Nt,{size:e}),{[`k-i-${n}`]:n,[`k-color-${r}`]:r,[`k-rotate-${l}`]:l,"k-flip-h":d==="h"||d==="both","k-flip-v":d==="v"||d==="both"})}):(0,tt.jsx)(tt.Fragment,{})};et.states=He;et.options=Ie;et.className=Nt;et.defaultOptions=Ge;var Ft=et;var I=require("react/jsx-runtime"),xt="k-svg-icon",we=[],ze={size:[s.xsmall,s.small,s.medium,s.large,s.xlarge,s.xxlarge,s.xxxlarge],themeColor:[o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.light,o.dark]},Vt={viewBox:"0 0 24 24"},ot=t=>{let{size:e,themeColor:r,rotate:n,flip:l,viewBox:d=Vt.viewBox,icon:i,...m}=t;if(!i)return(0,I.jsx)(I.Fragment,{});i==="none"&&{...m,className:a(t.className,xt,"k-none")};let u=typeof i=="object"&&i.name&&i.name;return(0,I.jsx)("span",{...m,className:a(t.className,xt,g("k-icon",{size:e}),{[`k-svg-i-${u}`]:u,[`k-color-${r}`]:r,[`k-rotate-${n}`]:n,"k-flip-h":l==="h"||l==="both","k-flip-v":l==="v"||l==="both"}),children:(0,I.jsx)("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof i=="object"?i.viewBox:d,dangerouslySetInnerHTML:typeof i=="object"?{__html:i.content}:void 0,children:i?void 0:t.children})})};ot.states=we;ot.options=ze;ot.className=xt;ot.defaultOptions=Vt;var bt=ot;var vt=Ne(require("@progress/kendo-svg-icons"));var Wt="icon",Xt="icons";var S=require("react/jsx-runtime"),it="k-icon",Pe=t=>t.replace(/([-_][a-z0-9])/gi,e=>e.toUpperCase().replace("-","").replace("_","")),$e=[],Ue={size:[s.xsmall,s.small,s.medium,s.large,s.xlarge,s.xxlarge,s.xxxlarge],themeColor:[o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.light,o.dark]},At={viewBox:"0 0 24 24",type:"svg"},k=t=>{let{size:e,themeColor:r,icon:n,type:l=At.type,rotate:d,flip:i,viewBox:m=At.viewBox,...u}=t;if(!n)return(0,S.jsx)(S.Fragment,{});if(l==="svg"){if(n==="none")return(0,S.jsx)(bt,{...u,className:a(t.className,it),icon:n,size:e});let v=vt[n]?n:Pe(`${n}-icon`);return vt[v]?(0,S.jsx)(bt,{...u,className:a(t.className,it),icon:vt[v],size:e,themeColor:r,rotate:d,flip:i,viewBox:m}):(0,S.jsx)(S.Fragment,{})}return(0,S.jsx)(Ft,{...u,className:a(t.className,it),icon:n,size:e,themeColor:r,rotate:d,flip:i})};k.states=$e;k.options=Ue;k.defaultOptions=At;k.className=it;k.moduleName=Wt;k.folderName=Xt;var gt="button",Jt=gt;var A=require("react/jsx-runtime"),rt="k-button",Fe=["icon-button"],Ve=[c.hover,c.focus,c.active,c.selected,c.disabled,c.generating],We={size:[s.small,s.medium,s.large],rounded:[N.small,N.medium,N.large,N.full],fillMode:[x.solid,x.flat,x.outline,x.clear,x.link],themeColor:[o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.light,o.dark,o.inverse]},G={size:s.medium,rounded:N.medium,fillMode:x.solid,themeColor:o.base,showArrow:!1,arrowIconName:"caret-alt-down"},p=t=>{let{size:e=G.size,rounded:r=G.rounded,fillMode:n=G.fillMode,themeColor:l=G.themeColor,showArrow:d=G.showArrow,arrowIconName:i=G.arrowIconName,variant:m,hover:u,focus:v,active:P,selected:J,disabled:ct,icon:q,text:$,iconClassName:Y,...Q}=t,D=q!==void 0,ce=t.children!==void 0;return(0,A.jsxs)("button",{...Q,className:a(t.className,rt,Dt(rt,m),g(rt,{size:e,rounded:r,fillMode:n,themeColor:l}),C(rt,{hover:u,focus:v,active:P,disabled:ct,selected:J}),{"k-icon-button":!$&&!ce&&D}),children:[q&&(0,A.jsx)(k,{className:a(Y,"k-button-icon"),icon:q}),$?(0,A.jsxs)(A.Fragment,{children:[$&&(0,A.jsx)("span",{className:"k-button-text",children:$}),t.children]}):t.children&&(0,A.jsx)("span",{className:"k-button-text",children:t.children}),d&&(0,A.jsx)("span",{className:"k-menu-button-arrow k-button-arrow",children:(0,A.jsx)(k,{icon:i})})]})};p.states=Ve;p.options=We;p.variants=Fe;p.className=rt;p.defaultOptions=G;p.moduleName=gt;p.folderName=Jt;var Xe=require("react/jsx-runtime");var Je=require("react/jsx-runtime");var qe=require("react/jsx-runtime");var Tt=require("react/jsx-runtime");var Ye=require("react/jsx-runtime");var M=require("react/jsx-runtime"),Qe="k-card-body",lt=t=>{let{title:e,subtitle:r,details:n,...l}=t;return(0,M.jsxs)("div",{...l,className:a(t.className,Qe),children:[e&&(0,M.jsx)(H,{children:e}),r&&(0,M.jsx)(j,{children:r}),(0,M.jsx)(M.Fragment,{children:t.children}),n&&(0,M.jsx)("span",{className:"k-card-header-actions",children:(0,M.jsx)(p,{className:"k-card-details",icon:"more-vertical",rounded:"medium",size:"medium",fillMode:"flat",themeColor:"base"})})]})};var Yt=require("react/jsx-runtime"),qt="k-card-deck",Ze=[],je={},to={},W=t=>{let{...e}=t;return(0,Yt.jsx)("div",{...e,className:a(t.className,qt),children:t.children})};W.states=Ze;W.options=je;W.className=qt;W.defaultOptions=to;W.moduleName=h;W.folderName=b;var Zt=require("react/jsx-runtime"),Qt="k-card-deck-scrollwrap",eo=[],oo={},ro={},X=t=>{let{...e}=t;return(0,Zt.jsx)("div",{...e,className:a(t.className,Qt),children:t.children})};X.states=eo;X.options=oo;X.className=Qt;X.defaultOptions=ro;X.moduleName=h;X.folderName=b;var Ot="action-buttons",jt=Ot;var te=require("react/jsx-runtime"),dt="k-actions",ao=[],no={},Mt={alignment:"start",orientation:"horizontal"},K=t=>{let{alignment:e=Mt.alignment,orientation:r=Mt.orientation,...n}=t;return(0,te.jsx)("div",{...n,className:a(dt,{[`${dt}-${e}`]:e,[`${dt}-${r}`]:r},t.className),children:t.children})};K.states=ao;K.options=no;K.className=dt;K.defaultOptions=Mt;K.moduleName=Ot;K.folderName=jt;var yt=require("react/jsx-runtime");var Et=require("react/jsx-runtime");var St="avatar",ee=St;var kt=require("react/jsx-runtime"),at="k-avatar";var so=[c.hover,c.focus,c.active,c.selected,c.disabled],io={size:[s.small,s.medium,s.large],rounded:[N.small,N.medium,N.large,N.full],fillMode:[x.solid,x.flat,x.outline],themeColor:[o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.light,o.dark,o.inverse]},w={type:"text",size:s.medium,rounded:N.full,fillMode:x.solid,themeColor:o.primary,border:!1},R=t=>{let{size:e=w.size,rounded:r=w.rounded,fillMode:n=w.fillMode,themeColor:l=w.themeColor,type:d=w.type,border:i=w.border,...m}=t;return(0,kt.jsx)("div",{...m,className:a(t.className,at,g(at,{size:e,rounded:r,fillMode:n,themeColor:l}),{[`${at}-bordered`]:i}),children:(0,kt.jsx)("span",{className:`${at}-${d}`,children:t.children})})};R.states=so;R.options=io;R.className=at;R.defaultOptions=w;R.moduleName=St;R.folderName=ee;var lo=require("react/jsx-runtime");var co=require("react/jsx-runtime");var mo=require("react/jsx-runtime");var f=require("react/jsx-runtime"),po="k-orgchart-node",re={buttonIcon:"plus",details:!0},z=t=>{let{title:e,subtitle:r,details:n=re.details,color:l,lineBottom:d,lineTop:i,button:m,buttonIcon:u=re.buttonIcon,avatar:v,avatarType:P,...J}=t;return(0,f.jsxs)("div",{...J,className:a(t.className,po,"k-vstack","k-align-items-center"),children:[i&&(0,f.jsx)("div",{className:"k-orgchart-line k-orgchart-line-v"}),(0,f.jsx)(O,{className:"k-orgchart-card",children:(0,f.jsxs)(lt,{className:"k-hstack",details:n,style:{borderTopColor:l},children:[(0,f.jsx)(R,{type:P,themeColor:"secondary",children:P==="image"?(0,f.jsx)("img",{src:v}):v}),(0,f.jsxs)("div",{className:"k-card-title-wrap k-vstack",children:[(0,f.jsx)(H,{className:"k-text-ellipsis",children:e}),(0,f.jsx)("span",{className:"k-spacer"}),(0,f.jsx)(j,{className:"k-text-ellipsis",children:r})]}),(0,f.jsx)("span",{className:"k-spacer"})]})}),d&&(0,f.jsx)("div",{className:"k-orgchart-line k-orgchart-line-v"}),m&&(0,f.jsx)(p,{className:"k-orgchart-button",icon:u})]})};var y=require("react/jsx-runtime"),uo="k-orgchart-node-group",fo=[c.focus],ae={orientation:"horizontal",buttonIcon:"plus"},Lt=t=>{let{title:e,subtitle:r,lineBottom:n,lineTop:l,button:d,buttonIcon:i=ae.buttonIcon,focus:m,orientation:u=ae.orientation,...v}=t;return(0,y.jsxs)("div",{...v,className:a(t.className,uo,"k-vstack","k-align-items-center"),children:[l&&(0,y.jsx)("div",{className:"k-orgchart-line k-orgchart-line-v"}),(0,y.jsxs)("div",{className:a("k-orgchart-node-group-container","k-vstack",C("k-orgchart-node-group-container",{focus:m})),children:[e&&(0,y.jsx)("div",{className:"k-orgchart-node-group-title",children:e}),r&&(0,y.jsx)("div",{className:"k-orgchart-node-group-subtitle",children:r}),(0,y.jsx)("div",{className:a("k-orgchart-node-container",{[`k-${_.orientationMap[u]||u}`]:u}),children:t.children})]}),n&&(0,y.jsx)("div",{className:"k-orgchart-line k-orgchart-line-v"}),d&&(0,y.jsx)(p,{className:"k-orgchart-button",icon:i})]})};Lt.states=fo;var ne=require("react/jsx-runtime");var se=require("react/jsx-runtime");var ie=require("react/jsx-runtime");var le=require("react/jsx-runtime");var L=require("react/jsx-runtime"),Kt="k-orgchart-group",ho=[],Co={},de={orientation:"horizontal"},E=t=>{let{children:e,orientation:r=de.orientation,justifyContent:n,...l}=t,d=[],i=[];return e&&(Array.isArray(e)?e.map(m=>{m.type===z?d.push(m):i.push(m)}):e.type===z?d.push(e):i.push(e)),(0,L.jsxs)("div",{...l,className:a(Kt,"k-pos-absolute",{[`k-${_.orientationMap[r]||r}`]:r,[`k-justify-content-${n}`]:n}),style:{width:"100%"},children:[d.length>0&&(0,L.jsx)("div",{className:a("k-orgchart-node-container","k-justify-content-around",{[`k-${_.orientationMap[r]||r}`]:r}),children:(0,L.jsx)(L.Fragment,{children:d})}),(0,L.jsx)(L.Fragment,{children:i})]})};E.states=ho;E.options=Co;E.className=Kt;E.defaultOptions=de;var No=E;