UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

2 lines (1 loc) 10.6 kB
var Se=Object.create;var $=Object.defineProperty;var Ae=Object.getOwnPropertyDescriptor;var Me=Object.getOwnPropertyNames;var Le=Object.getPrototypeOf,Be=Object.prototype.hasOwnProperty;var He=(t,e)=>{for(var r in e)$(t,r,{get:e[r],enumerable:!0})},oe=(t,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Me(e))!Be.call(t,s)&&s!==r&&$(t,s,{get:()=>e[s],enumerable:!(a=Ae(e,s))||a.enumerable});return t};var re=(t,e,r)=>(r=t!=null?Se(Le(t)):{},oe(e||!t||!t.__esModule?$(r,"default",{value:t,enumerable:!0}):r,t)),ze=t=>oe($({},"__esModule",{value:!0}),t);var pt={};He(pt,{TileLayoutNormal:()=>ut});module.exports=ze(pt);var n=(...t)=>t.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?n(...e):typeof e=="object"?Object.keys(e).map((r,a)=>e[a]||e[r]&&r||null).filter(r=>r!==null).join(" "):e).filter(e=>!!e).join(" ");var N=(t,e)=>n({[`${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"}),b=(t,e)=>n({"k-valid":e.valid,"k-invalid":e.invalid,"k-hover":e.hover,"k-focus":e.focus,"k-checked":e.checked,"k-active":e.active,"k-selected":e.selected,"k-disabled":e.disabled,"k-indeterminate":e.indeterminate&&!e.checked,"k-loading":e.loading,"k-empty":e.empty,"k-readonly":e.readonly,"k-highlighted":e.highlighted});var i={xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},M={small:"small",medium:"medium",large:"large",full:"full"},k={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"},d={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"},ae={calloutMap:{top:"n",bottom:"s",left:"w",right:"e"},orientationMap:{vertical:"vstack",horizontal:"hstack"}};var se=require("react/jsx-runtime"),ne="k-tilelayout",Ie=[],Ee={},Oe={},L=t=>{let{gap:e,columns:r,columnWidth:a,rowHeight:s,style:c,children:l}=t,p={gridTemplateColumns:`repeat(${r}, minmax(0px, ${a}))`,gridAutoRows:`minmax(0px, ${s})`,gap:e,...c};return(0,se.jsx)("div",{className:n(t.className,ne),style:p,children:l})};L.states=Ie;L.options=Ee;L.className=ne;L.defaultOptions=Oe;var xe=re(require("react"));var le=require("react/jsx-runtime"),Re="k-card-callout",ie=t=>{let{callout:e,...r}=t;return(0,le.jsx)("span",{...r,className:n(t.className,Re,{[`k-callout-${ae.calloutMap[e]||e}`]:e})})};var T=require("react/jsx-runtime"),P="k-card",we=[d.hover,d.focus,d.selected,d.disabled],Ke={themeColor:[o.primary,o.success,o.warning,o.error,o.info]},$e={},v=t=>{let{orientation:e,themeColor:r,callout:a,hover:s,focus:c,selected:l,disabled:p,...f}=t;return(0,T.jsxs)("div",{...f,className:n(t.className,P,N(P,{themeColor:r}),b(P,{hover:s,focus:c,disabled:p,selected:l}),{[`k-card-${e}`]:e,"k-card-with-callout":a}),children:[a&&a!=="true"&&(0,T.jsx)(ie,{callout:a}),(0,T.jsx)(T.Fragment,{children:t.children})]})};v.states=we;v.options=Ke;v.className=P;v.defaultOptions=$e;var ce=require("react/jsx-runtime"),Y="k-card-title",Pe=[d.hover,d.focus],B=t=>{let{hover:e,focus:r,...a}=t;return(0,ce.jsx)("div",{...a,className:n(t.className,Y,b(Y,{hover:e,focus:r})),children:t.children})};B.states=Pe;B.className=Y;var de=require("react/jsx-runtime"),De="k-card-subtitle",D=t=>{let{...e}=t;return(0,de.jsx)("div",{...e,className:n(t.className,De),children:t.children})};var me=require("react/jsx-runtime");var E=require("react/jsx-runtime"),J="k-icon k-font-icon",_e=[],Fe={size:[i.xsmall,i.small,i.medium,i.large,i.xlarge,i.xxlarge,i.xxxlarge],themeColor:[o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.light,o.dark]},Ue={},O=t=>{let{size:e,themeColor:r,icon:a,rotate:s,flip:c,...l}=t;return a?(0,E.jsx)("span",{...l,className:n(t.className,J,N(J,{size:e}),{[`k-i-${a}`]:a,[`k-color-${r}`]:r,[`k-rotate-${s}`]:s,"k-flip-h":c==="h"||c==="both","k-flip-v":c==="v"||c==="both"})}):(0,E.jsx)(E.Fragment,{})};O.states=_e;O.options=Fe;O.className=J;O.defaultOptions=Ue;var ue=O;var S=require("react/jsx-runtime"),W="k-icon k-svg-icon",Ve=[],Ge={size:[i.xsmall,i.small,i.medium,i.large,i.xlarge,i.xxlarge,i.xxxlarge],themeColor:[o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.light,o.dark]},pe={viewBox:"0 0 24 24"},R=t=>{let{size:e,themeColor:r,rotate:a,flip:s,viewBox:c=pe.viewBox,icon:l,...p}=t;if(!l)return(0,S.jsx)(S.Fragment,{});l==="none"&&{...p,className:n(t.className,W,"k-none")};let f=typeof l=="object"&&l.name&&l.name;return(0,S.jsx)("span",{...p,className:n(t.className,W,N("k-icon",{size:e}),{[`k-svg-i-${f}`]:f,[`k-color-${r}`]:r,[`k-rotate-${a}`]:a,"k-flip-h":s==="h"||s==="both","k-flip-v":s==="v"||s==="both"}),children:(0,S.jsx)("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof l=="object"?l.viewBox:c,dangerouslySetInnerHTML:typeof l=="object"?{__html:l.content}:void 0,children:l?void 0:t.children})})};R.states=Ve;R.options=Ge;R.className=W;R.defaultOptions=pe;var X=R;var fe=re(require("@progress/kendo-svg-icons")),y=require("react/jsx-runtime"),qe=t=>t.replace(/([-_][a-z0-9])/gi,e=>e.toUpperCase().replace("-","").replace("_","")),Ye=[],Je={size:[i.xsmall,i.small,i.medium,i.large,i.xlarge,i.xxlarge,i.xxxlarge],themeColor:[o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.light,o.dark]},Q={viewBox:"0 0 24 24",type:"svg"},H=t=>{let{size:e,themeColor:r,icon:a,type:s=Q.type,rotate:c,flip:l,viewBox:p=Q.viewBox,...f}=t;if(!a)return(0,y.jsx)(y.Fragment,{});if(s==="svg"){if(a==="none")return(0,y.jsx)(X,{...f,icon:a,size:e});let w=qe(`${a}-icon`);return fe[w]?(0,y.jsx)(X,{...f,icon:fe[w],size:e,themeColor:r,rotate:c,flip:l,viewBox:p}):(0,y.jsx)(y.Fragment,{})}return(0,y.jsx)(ue,{...f,icon:a,size:e,themeColor:r,rotate:c,flip:l})};H.states=Ye;H.options=Je;H.defaultOptions=Q;var u=require("react/jsx-runtime"),_="k-button",We=[d.hover,d.focus,d.active,d.selected,d.disabled],Xe={size:[i.small,i.medium,i.large],rounded:[M.small,M.medium,M.large,M.full],fillMode:[k.solid,k.flat,k.outline,k.clear,k.link],themeColor:[o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.light,o.dark,o.inverse]},A={size:i.medium,rounded:M.medium,fillMode:k.solid,themeColor:o.base,showArrow:!1,arrowIconName:"caret-alt-down"},m=t=>{let{size:e=A.size,rounded:r=A.rounded,fillMode:a=A.fillMode,themeColor:s=A.themeColor,showArrow:c=A.showArrow,arrowIconName:l=A.arrowIconName,hover:p,focus:f,active:w,selected:ge,disabled:Ne,icon:q,text:K,iconClassName:be,...ve}=t,ke=q!==void 0,Te=t.children!==void 0;return(0,u.jsxs)("button",{...ve,className:n(t.className,_,N(_,{size:e,rounded:r,fillMode:a,themeColor:s}),b(_,{hover:p,focus:f,active:w,disabled:Ne,selected:ge}),{"k-icon-button":!K&&!Te&&ke}),children:[q&&(0,u.jsx)(H,{className:n(be,"k-button-icon"),icon:q}),K?(0,u.jsxs)(u.Fragment,{children:[K&&(0,u.jsx)("span",{className:"k-button-text",children:K}),t.children]}):t.children&&(0,u.jsx)("span",{className:"k-button-text",children:t.children}),c&&(0,u.jsx)("span",{className:"k-menu-button-arrow k-button-arrow",children:(0,u.jsx)(H,{icon:l})})]})};m.states=We;m.options=Xe;m.className=_;m.defaultOptions=A;var Qe=require("react/jsx-runtime");var Ze=require("react/jsx-runtime");var je=require("react/jsx-runtime");var h=require("react/jsx-runtime"),et="k-card-header",F=t=>{let{title:e,subtitle:r,details:a,...s}=t;return(0,h.jsxs)("div",{...s,className:n(t.className,et),children:[e&&(0,h.jsx)(B,{children:e}),r&&(0,h.jsx)(D,{children:r}),(0,h.jsx)(h.Fragment,{children:t.children}),a&&(0,h.jsx)("span",{className:"k-card-header-actions",children:(0,h.jsx)(m,{className:"k-card-details",icon:"more-vertical",rounded:"medium",size:"medium",fillMode:"flat",themeColor:"base"})})]})};var tt=require("react/jsx-runtime");var x=require("react/jsx-runtime"),ot="k-card-body",U=t=>{let{title:e,subtitle:r,details:a,...s}=t;return(0,x.jsxs)("div",{...s,className:n(t.className,ot),children:[e&&(0,x.jsx)(B,{children:e}),r&&(0,x.jsx)(D,{children:r}),(0,x.jsx)(x.Fragment,{children:t.children}),a&&(0,x.jsx)("span",{className:"k-card-header-actions",children:(0,x.jsx)(m,{className:"k-card-details",icon:"more-vertical",rounded:"medium",size:"medium",fillMode:"flat",themeColor:"base"})})]})};var rt=require("react/jsx-runtime");var he=require("react/jsx-runtime"),V="k-actions",at=[],nt={},Z={alignment:"start",orientation:"horizontal"},z=t=>{let{alignment:e=Z.alignment,orientation:r=Z.orientation,...a}=t;return(0,he.jsx)("div",{...a,className:n(V,{[`${V}-${e}`]:e,[`${V}-${r}`]:r},t.className),children:t.children})};z.states=at;z.options=nt;z.className=V;z.defaultOptions=Z;var j=require("react/jsx-runtime");var ee=require("react/jsx-runtime");var I=require("react/jsx-runtime"),te="k-tilelayout-item",st=[d.focus],it={},lt={},g=t=>{let{header:e,body:r,focus:a,resize:s,style:c}=t;return(0,I.jsxs)(v,{className:n(t.className,te,b(te,{focus:a}),{"k-resize":s===!0,"k-resize-x":s==="horizontal","k-resize-y":s==="vertical"}),style:c,children:[e&&xe.default.isValidElement(e)?(0,I.jsx)(F,{className:"k-tilelayout-item-header k-cursor-move",children:e}):(0,I.jsx)(F,{className:"k-tilelayout-item-header k-cursor-move",title:e}),r&&(0,I.jsx)(U,{className:"k-tilelayout-item-body",children:r})]})};g.states=st;g.options=it;g.className=te;g.defaultOptions=lt;var ye=require("react/jsx-runtime"),Ce="k-layout-item-hint",ct=[],dt={},mt={},G=t=>{let{style:e}=t;return(0,ye.jsx)("div",{className:Ce,style:e})};G.states=ct;G.options=dt;G.className=Ce;G.defaultOptions=mt;var C=require("react/jsx-runtime"),ut=t=>(0,C.jsx)(L,{children:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(g,{header:"Title goes here",body:"Content goes here"}),(0,C.jsx)(g,{header:"Title goes here",body:"Content goes here"}),(0,C.jsx)(g,{header:"Title goes here",body:"Content goes here"}),(0,C.jsx)(g,{header:"Title goes here",body:"Content goes here"})]}),...t});