UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

2 lines (1 loc) 15.5 kB
var me=Object.create;var st=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)st(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&&st(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?st(r,"default",{value:t,enumerable:!0}):r,t)),xe=t=>Rt(st({},"__esModule",{value:!0}),t);var xo={};Ce(xo,{OrgchartNormal:()=>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 T=(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:$,loading:q,empty:mt,readonly:Y,highlighted:U,...Q}=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":$&&!i,"k-loading":q,"k-empty":mt,"k-readonly":Y,"k-highlighted":U},Object.keys(Q).reduce((Z,_)=>(_.startsWith("k-")?Z[_]=Q[_]:Z[`k-${_}`]=Q[_],Z),{}))};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"},B={calloutMap:{top:"n",bottom:"s",left:"w",right:"e"},orientationMap:{vertical:"vstack",horizontal:"hstack"}};var pt="orgchart",_t=pt;var ft=require("react/jsx-runtime"),Bt="k-orgchart",be=[],ve={},ut={width:"100%",height:"300px"},A=t=>{let{width:e=ut.width,height:r=ut.height,...n}=t;return(0,ft.jsx)("div",{...n,className:a(t.className,Bt),children:(0,ft.jsx)("div",{className:"k-orgchart-container",style:{width:e,height:r},children:t.children})})};A.states=be;A.options=ve;A.className=Bt;A.defaultOptions=ut;A.moduleName=pt;A.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-${B.calloutMap[e]||e}`]:e})})};var h="card",b=h;var H=require("react/jsx-runtime"),it="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,H.jsxs)("div",{...u,className:a(t.className,it,T(it,{themeColor:r}),C(it,{hover:l,focus:d,disabled:m,selected:i}),{[`k-card-${e}`]:e,"k-card-with-callout":n}),children:[n&&n!=="true"&&(0,H.jsx)(Ht,{callout:n}),(0,H.jsx)(H.Fragment,{children:t.children})]})};O.states=ge;O.options=Te;O.className=it;O.defaultOptions=Oe;O.moduleName=h;O.folderName=b;var j=require("react/jsx-runtime"),ht="k-card-list",Me=[],ye={},Ee={},F=t=>{let{...e}=t;return(0,j.jsx)("div",{...e,className:a(t.className,ht,C(ht,{})),children:(0,j.jsx)(j.Fragment,{children:t.children})})};F.states=Me;F.options=ye;F.className=ht;F.defaultOptions=Ee;F.moduleName=h;F.folderName=b;var wt=require("react/jsx-runtime"),Gt="k-card-group",Se=[],ke={},Le={},V=t=>{let{...e}=t;return(0,wt.jsx)("div",{...e,className:a(t.className,Gt),children:t.children})};V.states=Se;V.options=ke;V.className=Gt;V.defaultOptions=Le;V.moduleName=h;V.folderName=b;var zt=require("react/jsx-runtime"),Ct="k-card-wrap",Ke=[c.focus,c.selected],Re={},De={},W=t=>{let{focus:e,selected:r,...n}=t;return(0,zt.jsx)("div",{...n,className:a(t.className,Ct,C(Ct,{focus:e,selected:r})),children:t.children})};W.states=Ke;W.options=Re;W.className=Ct;W.defaultOptions=De;W.moduleName=h;W.folderName=b;var Pt=require("react/jsx-runtime"),Nt="k-card-title",_e=[c.hover,c.focus],I=t=>{let{hover:e,focus:r,...n}=t;return(0,Pt.jsx)("div",{...n,className:a(t.className,Nt,C(Nt,{hover:e,focus:r})),children:t.children})};I.states=_e;I.className=Nt;var $t=require("react/jsx-runtime"),Be="k-card-subtitle",tt=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 et=require("react/jsx-runtime"),xt="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={},ot=t=>{let{size:e,themeColor:r,icon:n,rotate:l,flip:d,...i}=t;return n?(0,et.jsx)("span",{...i,className:a(t.className,xt,T(xt,{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,et.jsx)(et.Fragment,{})};ot.states=He;ot.options=Ie;ot.className=xt;ot.defaultOptions=Ge;var Ft=ot;var G=require("react/jsx-runtime"),bt="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"},rt=t=>{let{size:e,themeColor:r,rotate:n,flip:l,viewBox:d=Vt.viewBox,icon:i,...m}=t;if(!i)return(0,G.jsx)(G.Fragment,{});i==="none"&&{...m,className:a(t.className,bt,"k-none")};let u=typeof i=="object"&&i.name&&i.name;return(0,G.jsx)("span",{...m,className:a(t.className,bt,T("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,G.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})})};rt.states=we;rt.options=ze;rt.className=bt;rt.defaultOptions=Vt;var vt=rt;var At=Ne(require("@progress/kendo-svg-icons"));var Wt="icon",Xt="icons";var S=require("react/jsx-runtime"),lt="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]},gt={viewBox:"0 0 24 24",type:"svg"},k=t=>{let{size:e,themeColor:r,icon:n,type:l=gt.type,rotate:d,flip:i,viewBox:m=gt.viewBox,...u}=t;if(!n)return(0,S.jsx)(S.Fragment,{});if(l==="svg"){if(n==="none")return(0,S.jsx)(vt,{...u,className:a(t.className,lt),icon:n,size:e});let v=At[n]?n:Pe(`${n}-icon`);return At[v]?(0,S.jsx)(vt,{...u,className:a(t.className,lt),icon:At[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,lt),icon:n,size:e,themeColor:r,rotate:d,flip:i})};k.states=$e;k.options=Ue;k.defaultOptions=gt;k.className=lt;k.moduleName=Wt;k.folderName=Xt;var Tt="button",Jt=Tt;var g=require("react/jsx-runtime"),at="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]},w={size:s.medium,rounded:N.medium,fillMode:x.solid,themeColor:o.base,showArrow:!1,arrowIconName:"caret-alt-down"},p=t=>{let{size:e=w.size,rounded:r=w.rounded,fillMode:n=w.fillMode,themeColor:l=w.themeColor,showArrow:d=w.showArrow,arrowIconName:i=w.arrowIconName,variant:m,hover:u,focus:v,active:$,selected:q,disabled:mt,icon:Y,text:U,iconClassName:Q,...Z}=t,_=Y!==void 0,ce=t.children!==void 0;return(0,g.jsxs)("button",{...Z,className:a(t.className,at,Dt(at,m),T(at,{size:e,rounded:r,fillMode:n,themeColor:l}),C(at,{hover:u,focus:v,active:$,disabled:mt,selected:q}),{"k-icon-button":!U&&!ce&&_}),children:[Y&&(0,g.jsx)(k,{className:a(Q,"k-button-icon"),icon:Y}),U?(0,g.jsxs)(g.Fragment,{children:[U&&(0,g.jsx)("span",{className:"k-button-text",children:U}),t.children]}):t.children&&(0,g.jsx)("span",{className:"k-button-text",children:t.children}),d&&(0,g.jsx)("span",{className:"k-menu-button-arrow k-button-arrow",children:(0,g.jsx)(k,{icon:i})})]})};p.states=Ve;p.options=We;p.variants=Fe;p.className=at;p.defaultOptions=w;p.moduleName=Tt;p.folderName=Jt;var Xe=require("react/jsx-runtime");var Je=require("react/jsx-runtime");var qe=require("react/jsx-runtime");var Ot=require("react/jsx-runtime");var Ye=require("react/jsx-runtime");var M=require("react/jsx-runtime"),Qe="k-card-body",dt=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)(I,{children:e}),r&&(0,M.jsx)(tt,{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={},X=t=>{let{...e}=t;return(0,Yt.jsx)("div",{...e,className:a(t.className,qt),children:t.children})};X.states=Ze;X.options=je;X.className=qt;X.defaultOptions=to;X.moduleName=h;X.folderName=b;var Zt=require("react/jsx-runtime"),Qt="k-card-deck-scrollwrap",eo=[],oo={},ro={},J=t=>{let{...e}=t;return(0,Zt.jsx)("div",{...e,className:a(t.className,Qt),children:t.children})};J.states=eo;J.options=oo;J.className=Qt;J.defaultOptions=ro;J.moduleName=h;J.folderName=b;var Mt="action-buttons",jt=Mt;var te=require("react/jsx-runtime"),ct="k-actions",ao=[],no={},yt={alignment:"start",orientation:"horizontal"},R=t=>{let{alignment:e=yt.alignment,orientation:r=yt.orientation,...n}=t;return(0,te.jsx)("div",{...n,className:a(ct,{[`${ct}-${e}`]:e,[`${ct}-${r}`]:r},t.className),children:t.children})};R.states=ao;R.options=no;R.className=ct;R.defaultOptions=yt;R.moduleName=Mt;R.folderName=jt;var Et=require("react/jsx-runtime");var St=require("react/jsx-runtime");var kt="avatar",ee=kt;var Lt=require("react/jsx-runtime"),nt="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]},z={type:"text",size:s.medium,rounded:N.full,fillMode:x.solid,themeColor:o.primary,border:!1},D=t=>{let{size:e=z.size,rounded:r=z.rounded,fillMode:n=z.fillMode,themeColor:l=z.themeColor,type:d=z.type,border:i=z.border,...m}=t;return(0,Lt.jsx)("div",{...m,className:a(t.className,nt,T(nt,{size:e,rounded:r,fillMode:n,themeColor:l}),{[`${nt}-bordered`]:i}),children:(0,Lt.jsx)("span",{className:`${nt}-${d}`,children:t.children})})};D.states=so;D.options=io;D.className=nt;D.defaultOptions=z;D.moduleName=kt;D.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},y=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:$,...q}=t;return(0,f.jsxs)("div",{...q,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)(dt,{className:"k-hstack",details:n,style:{borderTopColor:l},children:[(0,f.jsx)(D,{type:$,themeColor:"secondary",children:$==="image"?(0,f.jsx)("img",{src:v}):v}),(0,f.jsxs)("div",{className:"k-card-title-wrap k-vstack",children:[(0,f.jsx)(I,{className:"k-text-ellipsis",children:e}),(0,f.jsx)("span",{className:"k-spacer"}),(0,f.jsx)(tt,{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 L=require("react/jsx-runtime"),ae="k-orgchart-group",uo=[],fo={},ne={orientation:"horizontal"},K=t=>{let{children:e,orientation:r=ne.orientation,justifyContent:n,...l}=t,d=[],i=[];return e&&(Array.isArray(e)?e.map(m=>{m.type===y?d.push(m):i.push(m)}):e.type===y?d.push(e):i.push(e)),(0,L.jsxs)("div",{...l,className:a(ae,"k-pos-absolute",{[`k-${B.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-${B.orientationMap[r]||r}`]:r}),children:(0,L.jsx)(L.Fragment,{children:d})}),(0,L.jsx)(L.Fragment,{children:i})]})};K.states=uo;K.options=fo;K.className=ae;K.defaultOptions=ne;var E=require("react/jsx-runtime"),ho="k-orgchart-node-group",Co=[c.focus],se={orientation:"horizontal",buttonIcon:"plus"},Kt=t=>{let{title:e,subtitle:r,lineBottom:n,lineTop:l,button:d,buttonIcon:i=se.buttonIcon,focus:m,orientation:u=se.orientation,...v}=t;return(0,E.jsxs)("div",{...v,className:a(t.className,ho,"k-vstack","k-align-items-center"),children:[l&&(0,E.jsx)("div",{className:"k-orgchart-line k-orgchart-line-v"}),(0,E.jsxs)("div",{className:a("k-orgchart-node-group-container","k-vstack",C("k-orgchart-node-group-container",{focus:m})),children:[e&&(0,E.jsx)("div",{className:"k-orgchart-node-group-title",children:e}),r&&(0,E.jsx)("div",{className:"k-orgchart-node-group-subtitle",children:r}),(0,E.jsx)("div",{className:a("k-orgchart-node-container",{[`k-${B.orientationMap[u]||u}`]:u}),children:t.children})]}),n&&(0,E.jsx)("div",{className:"k-orgchart-line k-orgchart-line-v"}),d&&(0,E.jsx)(p,{className:"k-orgchart-button",icon:i})]})};Kt.states=Co;var ie=require("react/jsx-runtime");var le=require("react/jsx-runtime");var de=require("react/jsx-runtime");var P=require("react/jsx-runtime"),No=({details:t,justifyContent:e,...r})=>(0,P.jsx)(A,{children:(0,P.jsxs)(K,{justifyContent:e,children:[(0,P.jsx)(y,{title:"Card Title",subtitle:"Card, Subtitle",details:t,avatar:"DK",avatarType:"text",color:"#0275d8",lineBottom:!0,button:!0}),(0,P.jsx)(y,{title:"Card Title",subtitle:"Card, Subtitle",details:t,avatar:"DK",avatarType:"text",color:"#0275d8",lineBottom:!0,button:!0}),(0,P.jsx)(y,{title:"Card Title",subtitle:"Card, Subtitle",details:t,avatar:"DK",avatarType:"text",color:"#0275d8",lineBottom:!0,button:!0})]}),...r});