@progress/kendo-themes-html
Version:
A collection of HTML helpers used for developing Kendo UI themes
2 lines (1 loc) • 11.1 kB
JavaScript
var we=Object.create;var q=Object.defineProperty;var ze=Object.getOwnPropertyDescriptor;var Pe=Object.getOwnPropertyNames;var Ue=Object.getPrototypeOf,$e=Object.prototype.hasOwnProperty;var Fe=(e,t)=>{for(var r in t)q(e,r,{get:t[r],enumerable:!0})},Ce=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Pe(t))!$e.call(e,i)&&i!==r&&q(e,i,{get:()=>t[i],enumerable:!(a=ze(t,i))||a.enumerable});return e};var Ge=(e,t,r)=>(r=e!=null?we(Ue(e)):{},Ce(t||!e||!e.__esModule?q(r,"default",{value:e,enumerable:!0}):r,e)),We=e=>Ce(q({},"__esModule",{value:!0}),e);var Dt={};Fe(Dt,{CardHorizontal:()=>_t});module.exports=We(Dt);var n=(...e)=>e.filter(t=>t!==!0&&!!t).map(t=>Array.isArray(t)?n(...t):typeof t=="object"?Object.keys(t).map((r,a)=>t[a]||t[r]&&r||null).filter(r=>r!==null).join(" "):t).filter(t=>!!t).join(" ");var T=(e,t)=>n({[`${e}-xs`]:t.size==="xsmall",[`${e}-sm`]:t.size==="small",[`${e}-md`]:t.size==="medium",[`${e}-lg`]:t.size==="large",[`${e}-xl`]:t.size==="xlarge",[`${e}-xxl`]:t.size==="xxlarge",[`${e}-xxxl`]:t.size==="xxxlarge"},{[`${e}-${t.fillMode}`]:t.fillMode},{[`${e}-${t.fillMode}-${t.themeColor}`]:t.fillMode&&t.themeColor},{[`${e}-${t.themeColor}`]:t.themeColor&&t.fillMode===void 0},{"k-rounded-sm":t.rounded==="small","k-rounded-md":t.rounded==="medium","k-rounded-lg":t.rounded==="large","k-rounded-full":t.rounded==="full"}),h=(e,t)=>{let{valid:r,invalid:a,hover:i,focus:m,checked:l,active:x,selected:u,disabled:k,indeterminate:Q,loading:Z,empty:j,readonly:w,highlighted:_,...z}=t;return n({"k-valid":r,"k-invalid":a,"k-hover":i,"k-focus":m,"k-checked":l,"k-active":x,"k-selected":u,"k-disabled":k,"k-indeterminate":Q&&!l,"k-loading":Z,"k-empty":j,"k-readonly":w,"k-highlighted":_},Object.keys(z).reduce((P,E)=>(E.startsWith("k-")?P[E]=z[E]:P[`k-${E}`]=z[E],P),{}))};function Ne(e,t){if(!t)return{};let r=Array.isArray(t)?t:[t];return Object.fromEntries(r.map(a=>[`k-${a}`,!0]))}var s={xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},D={small:"small",medium:"medium",large:"large",full:"full"},g={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",generating:"generating",expanded:"expanded"},xe={calloutMap:{top:"n",bottom:"s",left:"w",right:"e"},orientationMap:{vertical:"vstack",horizontal:"hstack"}};var Ae=require("react/jsx-runtime"),Ve="k-card-callout",he=e=>{let{callout:t,...r}=e;return(0,Ae.jsx)("span",{...r,className:n(e.className,Ve,{[`k-callout-${xe.calloutMap[t]||t}`]:t})})};var p="card",f=p;var S=require("react/jsx-runtime"),J="k-card",qe=[d.hover,d.focus,d.selected,d.disabled],Je={themeColor:[o.primary,o.success,o.warning,o.error,o.info]},Xe={},M=e=>{let{orientation:t,themeColor:r,callout:a,hover:i,focus:m,selected:l,disabled:x,...u}=e;return(0,S.jsxs)("div",{...u,className:n(e.className,J,T(J,{themeColor:r}),h(J,{hover:i,focus:m,disabled:x,selected:l}),{[`k-card-${t}`]:t,"k-card-with-callout":a}),children:[a&&a!=="true"&&(0,S.jsx)(he,{callout:a}),(0,S.jsx)(S.Fragment,{children:e.children})]})};M.states=qe;M.options=Je;M.className=J;M.defaultOptions=Xe;M.moduleName=p;M.folderName=f;var U=require("react/jsx-runtime"),ee="k-card-list",Ye=[],Qe={},Ze={},K=e=>{let{...t}=e;return(0,U.jsx)("div",{...t,className:n(e.className,ee,h(ee,{})),children:(0,U.jsx)(U.Fragment,{children:e.children})})};K.states=Ye;K.options=Qe;K.className=ee;K.defaultOptions=Ze;K.moduleName=p;K.folderName=f;var be=require("react/jsx-runtime"),Me="k-card-group",je=[],et={},tt={},R=e=>{let{...t}=e;return(0,be.jsx)("div",{...t,className:n(e.className,Me),children:e.children})};R.states=je;R.options=et;R.className=Me;R.defaultOptions=tt;R.moduleName=p;R.folderName=f;var ve=require("react/jsx-runtime"),te="k-card-wrap",ot=[d.focus,d.selected],rt={},nt={},B=e=>{let{focus:t,selected:r,...a}=e;return(0,ve.jsx)("div",{...a,className:n(e.className,te,h(te,{focus:t,selected:r})),children:e.children})};B.states=ot;B.options=rt;B.className=te;B.defaultOptions=nt;B.moduleName=p;B.folderName=f;var Le=require("react/jsx-runtime"),oe="k-card-title",at=[d.hover,d.focus],$=e=>{let{hover:t,focus:r,...a}=e;return(0,Le.jsx)("div",{...a,className:n(e.className,oe,h(oe,{hover:t,focus:r})),children:e.children})};$.states=at;$.className=oe;var Te=require("react/jsx-runtime"),st="k-card-subtitle",re=e=>{let{...t}=e;return(0,Te.jsx)("div",{...t,className:n(e.className,st),children:e.children})};var Ee=require("react/jsx-runtime");var F=require("react/jsx-runtime"),ne="k-font-icon",it=[],lt={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]},dt={},G=e=>{let{size:t,themeColor:r,icon:a,rotate:i,flip:m,...l}=e;return a?(0,F.jsx)("span",{...l,className:n(e.className,ne,T(ne,{size:t}),{[`k-i-${a}`]:a,[`k-color-${r}`]:r,[`k-rotate-${i}`]:i,"k-flip-h":m==="h"||m==="both","k-flip-v":m==="v"||m==="both"})}):(0,F.jsx)(F.Fragment,{})};G.states=it;G.options=lt;G.className=ne;G.defaultOptions=dt;var ge=G;var y=require("react/jsx-runtime"),ae="k-svg-icon",ct=[],mt={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]},Se={viewBox:"0 0 24 24"},W=e=>{let{size:t,themeColor:r,rotate:a,flip:i,viewBox:m=Se.viewBox,icon:l,...x}=e;if(!l)return(0,y.jsx)(y.Fragment,{});l==="none"&&{...x,className:n(e.className,ae,"k-none")};let u=typeof l=="object"&&l.name&&l.name;return(0,y.jsx)("span",{...x,className:n(e.className,ae,T("k-icon",{size:t}),{[`k-svg-i-${u}`]:u,[`k-color-${r}`]:r,[`k-rotate-${a}`]:a,"k-flip-h":i==="h"||i==="both","k-flip-v":i==="v"||i==="both"}),children:(0,y.jsx)("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof l=="object"?l.viewBox:m,dangerouslySetInnerHTML:typeof l=="object"?{__html:l.content}:void 0,children:l?void 0:e.children})})};W.states=ct;W.options=mt;W.className=ae;W.defaultOptions=Se;var se=W;var ie=Ge(require("@progress/kendo-svg-icons"));var ye="icon",Oe="icons";var b=require("react/jsx-runtime"),X="k-icon",pt=e=>e.replace(/([-_][a-z0-9])/gi,t=>t.toUpperCase().replace("-","").replace("_","")),ut=[],ft={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]},le={viewBox:"0 0 24 24",type:"svg"},v=e=>{let{size:t,themeColor:r,icon:a,type:i=le.type,rotate:m,flip:l,viewBox:x=le.viewBox,...u}=e;if(!a)return(0,b.jsx)(b.Fragment,{});if(i==="svg"){if(a==="none")return(0,b.jsx)(se,{...u,className:n(e.className,X),icon:a,size:t});let k=ie[a]?a:pt(`${a}-icon`);return ie[k]?(0,b.jsx)(se,{...u,className:n(e.className,X),icon:ie[k],size:t,themeColor:r,rotate:m,flip:l,viewBox:x}):(0,b.jsx)(b.Fragment,{})}return(0,b.jsx)(ge,{...u,className:n(e.className,X),icon:a,size:t,themeColor:r,rotate:m,flip:l})};v.states=ut;v.options=ft;v.defaultOptions=le;v.className=X;v.moduleName=ye;v.folderName=Oe;var de="button",ke=de;var C=require("react/jsx-runtime"),V="k-button",Ct=["icon-button"],Nt=[d.hover,d.focus,d.active,d.selected,d.disabled,d.generating],xt={size:[s.small,s.medium,s.large],rounded:[D.small,D.medium,D.large,D.full],fillMode:[g.solid,g.flat,g.outline,g.clear,g.link],themeColor:[o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.light,o.dark,o.inverse]},O={size:s.medium,rounded:D.medium,fillMode:g.solid,themeColor:o.base,showArrow:!1,arrowIconName:"caret-alt-down"},c=e=>{let{size:t=O.size,rounded:r=O.rounded,fillMode:a=O.fillMode,themeColor:i=O.themeColor,showArrow:m=O.showArrow,arrowIconName:l=O.arrowIconName,variant:x,hover:u,focus:k,active:Q,selected:Z,disabled:j,icon:w,text:_,iconClassName:z,...P}=e,E=w!==void 0,Ie=e.children!==void 0;return(0,C.jsxs)("button",{...P,className:n(e.className,V,Ne(V,x),T(V,{size:t,rounded:r,fillMode:a,themeColor:i}),h(V,{hover:u,focus:k,active:Q,disabled:j,selected:Z}),{"k-icon-button":!_&&!Ie&&E}),children:[w&&(0,C.jsx)(v,{className:n(z,"k-button-icon"),icon:w}),_?(0,C.jsxs)(C.Fragment,{children:[_&&(0,C.jsx)("span",{className:"k-button-text",children:_}),e.children]}):e.children&&(0,C.jsx)("span",{className:"k-button-text",children:e.children}),m&&(0,C.jsx)("span",{className:"k-menu-button-arrow k-button-arrow",children:(0,C.jsx)(v,{icon:l})})]})};c.states=Nt;c.options=xt;c.variants=Ct;c.className=V;c.defaultOptions=O;c.moduleName=de;c.folderName=ke;var ht=require("react/jsx-runtime");var At=require("react/jsx-runtime");var Mt=require("react/jsx-runtime");var ce=require("react/jsx-runtime");var bt=require("react/jsx-runtime");var A=require("react/jsx-runtime"),vt="k-card-body",me=e=>{let{title:t,subtitle:r,details:a,...i}=e;return(0,A.jsxs)("div",{...i,className:n(e.className,vt),children:[t&&(0,A.jsx)($,{children:t}),r&&(0,A.jsx)(re,{children:r}),(0,A.jsx)(A.Fragment,{children:e.children}),a&&(0,A.jsx)("span",{className:"k-card-header-actions",children:(0,A.jsx)(c,{className:"k-card-details",icon:"more-vertical",rounded:"medium",size:"medium",fillMode:"flat",themeColor:"base"})})]})};var De=require("react/jsx-runtime"),_e="k-card-deck",Lt=[],Tt={},Et={},H=e=>{let{...t}=e;return(0,De.jsx)("div",{...t,className:n(e.className,_e),children:e.children})};H.states=Lt;H.options=Tt;H.className=_e;H.defaultOptions=Et;H.moduleName=p;H.folderName=f;var Re=require("react/jsx-runtime"),Ke="k-card-deck-scrollwrap",gt=[],St={},yt={},I=e=>{let{...t}=e;return(0,Re.jsx)("div",{...t,className:n(e.className,Ke),children:e.children})};I.states=gt;I.options=St;I.className=Ke;I.defaultOptions=yt;I.moduleName=p;I.folderName=f;var pe="action-buttons",Be=pe;var He=require("react/jsx-runtime"),Y="k-actions",Ot=[],kt={},ue={alignment:"start",orientation:"horizontal"},L=e=>{let{alignment:t=ue.alignment,orientation:r=ue.orientation,...a}=e;return(0,He.jsx)("div",{...a,className:n(Y,{[`${Y}-${t}`]:t,[`${Y}-${r}`]:r},e.className),children:e.children})};L.states=Ot;L.options=kt;L.className=Y;L.defaultOptions=ue;L.moduleName=pe;L.folderName=Be;var fe=require("react/jsx-runtime");var N=require("react/jsx-runtime"),_t=e=>(0,N.jsx)(M,{orientation:"horizontal",children:(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(me,{title:"Card Title",children:(0,N.jsx)("p",{children:"Some quick example text to build on the card title and make up the bulk of the card's content."})}),(0,N.jsxs)(L,{orientation:"vertical",className:"k-card-actions",children:[(0,N.jsx)(c,{fillMode:"flat",themeColor:"primary",children:"Action 1"}),(0,N.jsx)(c,{fillMode:"flat",themeColor:"primary",children:"Action 2"})]})]}),...e});