UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

2 lines (1 loc) 9.96 kB
var ce=Object.create;var F=Object.defineProperty;var de=Object.getOwnPropertyDescriptor;var pe=Object.getOwnPropertyNames;var ue=Object.getPrototypeOf,fe=Object.prototype.hasOwnProperty;var ge=(o,e)=>{for(var s in e)F(o,s,{get:e[s],enumerable:!0})},ee=(o,e,s,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of pe(e))!fe.call(o,a)&&a!==s&&F(o,a,{get:()=>e[a],enumerable:!(r=de(e,a))||r.enumerable});return o};var he=(o,e,s)=>(s=o!=null?ce(ue(o)):{},ee(e||!o||!o.__esModule?F(s,"default",{value:o,enumerable:!0}):s,o)),xe=o=>ee(F({},"__esModule",{value:!0}),o);var He={};ge(He,{UPLOADFILEMULTIPLE_CLASSNAME:()=>le,UploadFileMultiple:()=>$e});module.exports=xe(He);var l=(...o)=>o.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?l(...e):typeof e=="object"?Object.keys(e).map((s,r)=>e[r]||e[s]&&s||null).filter(s=>s!==null).join(" "):e).filter(e=>!!e).join(" ");var O=(o,e)=>l({[`${o}-xs`]:e.size==="xsmall",[`${o}-sm`]:e.size==="small",[`${o}-md`]:e.size==="medium",[`${o}-lg`]:e.size==="large",[`${o}-xl`]:e.size==="xlarge",[`${o}-xxl`]:e.size==="xxlarge",[`${o}-xxxl`]:e.size==="xxxlarge"},{[`${o}-${e.fillMode}`]:e.fillMode},{[`${o}-${e.fillMode}-${e.themeColor}`]:e.fillMode&&e.themeColor},{[`${o}-${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"}),E=(o,e)=>{let{valid:s,invalid:r,hover:a,focus:m,checked:i,active:g,selected:d,disabled:u,indeterminate:L,loading:T,empty:W,readonly:w,highlighted:A,...I}=e;return l({"k-valid":s,"k-invalid":r,"k-hover":a,"k-focus":m,"k-checked":i,"k-active":g,"k-selected":d,"k-disabled":u,"k-indeterminate":L&&!i,"k-loading":T,"k-empty":W,"k-readonly":w,"k-highlighted":A},Object.keys(I).reduce((_,y)=>(y.startsWith("k-")?_[y]=I[y]:_[`k-${y}`]=I[y],_),{}))};function oe(o,e){if(!e)return{};let s=Array.isArray(e)?e:[e];return Object.fromEntries(s.map(r=>[`k-${r}`,!0]))}var n={xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},P={small:"small",medium:"medium",large:"large",full:"full"},M={solid:"solid",flat:"flat",outline:"outline",clear:"clear",link:"link"},t={inherit:"inherit",base:"base",primary:"primary",secondary:"secondary",tertiary:"tertiary",info:"info",success:"success",warning:"warning",error:"error",dark:"dark",light:"light",inverse:"inverse"},f={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"};var z=require("react/jsx-runtime"),J="k-font-icon",Ne=[],ke={size:[n.xsmall,n.small,n.medium,n.large,n.xlarge,n.xxlarge,n.xxxlarge],themeColor:[t.base,t.primary,t.secondary,t.tertiary,t.success,t.warning,t.error,t.info,t.light,t.dark]},be={},K=o=>{let{size:e,themeColor:s,icon:r,rotate:a,flip:m,...i}=o;return r?(0,z.jsx)("span",{...i,className:l(o.className,J,O(J,{size:e}),{[`k-i-${r}`]:r,[`k-color-${s}`]:s,[`k-rotate-${a}`]:a,"k-flip-h":m==="h"||m==="both","k-flip-v":m==="v"||m==="both"})}):(0,z.jsx)(z.Fragment,{})};K.states=Ne;K.options=ke;K.className=J;K.defaultOptions=be;var te=K;var S=require("react/jsx-runtime"),Q="k-svg-icon",ve=[],ye={size:[n.xsmall,n.small,n.medium,n.large,n.xlarge,n.xxlarge,n.xxxlarge],themeColor:[t.base,t.primary,t.secondary,t.tertiary,t.success,t.warning,t.error,t.info,t.light,t.dark]},se={viewBox:"0 0 24 24"},$=o=>{let{size:e,themeColor:s,rotate:r,flip:a,viewBox:m=se.viewBox,icon:i,...g}=o;if(!i)return(0,S.jsx)(S.Fragment,{});i==="none"&&{...g,className:l(o.className,Q,"k-none")};let d=typeof i=="object"&&i.name&&i.name;return(0,S.jsx)("span",{...g,className:l(o.className,Q,O("k-icon",{size:e}),{[`k-svg-i-${d}`]:d,[`k-color-${s}`]:s,[`k-rotate-${r}`]:r,"k-flip-h":a==="h"||a==="both","k-flip-v":a==="v"||a==="both"}),children:(0,S.jsx)("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof i=="object"?i.viewBox:m,dangerouslySetInnerHTML:typeof i=="object"?{__html:i.content}:void 0,children:i?void 0:o.children})})};$.states=ve;$.options=ye;$.className=Q;$.defaultOptions=se;var X=$;var Y=he(require("@progress/kendo-svg-icons"));var re="icon",ne="icons";var k=require("react/jsx-runtime"),D="k-icon",Me=o=>o.replace(/([-_][a-z0-9])/gi,e=>e.toUpperCase().replace("-","").replace("_","")),Se=[],Ce={size:[n.xsmall,n.small,n.medium,n.large,n.xlarge,n.xxlarge,n.xxxlarge],themeColor:[t.base,t.primary,t.secondary,t.tertiary,t.success,t.warning,t.error,t.info,t.light,t.dark]},Z={viewBox:"0 0 24 24",type:"svg"},x=o=>{let{size:e,themeColor:s,icon:r,type:a=Z.type,rotate:m,flip:i,viewBox:g=Z.viewBox,...d}=o;if(!r)return(0,k.jsx)(k.Fragment,{});if(a==="svg"){if(r==="none")return(0,k.jsx)(X,{...d,className:l(o.className,D),icon:r,size:e});let u=Y[r]?r:Me(`${r}-icon`);return Y[u]?(0,k.jsx)(X,{...d,className:l(o.className,D),icon:Y[u],size:e,themeColor:s,rotate:m,flip:i,viewBox:g}):(0,k.jsx)(k.Fragment,{})}return(0,k.jsx)(te,{...d,className:l(o.className,D),icon:r,size:e,themeColor:s,rotate:m,flip:i})};x.states=Se;x.options=Ce;x.defaultOptions=Z;x.className=D;x.moduleName=re;x.folderName=ne;var j="button",ae=j;var N=require("react/jsx-runtime"),H="k-button",Be=["icon-button"],Ae=[f.hover,f.focus,f.active,f.selected,f.disabled,f.generating],Oe={size:[n.small,n.medium,n.large],rounded:[P.small,P.medium,P.large,P.full],fillMode:[M.solid,M.flat,M.outline,M.clear,M.link],themeColor:[t.base,t.primary,t.secondary,t.tertiary,t.success,t.warning,t.error,t.info,t.light,t.dark,t.inverse]},C={size:n.medium,rounded:P.medium,fillMode:M.solid,themeColor:t.base,showArrow:!1,arrowIconName:"caret-alt-down"},p=o=>{let{size:e=C.size,rounded:s=C.rounded,fillMode:r=C.fillMode,themeColor:a=C.themeColor,showArrow:m=C.showArrow,arrowIconName:i=C.arrowIconName,variant:g,hover:d,focus:u,active:L,selected:T,disabled:W,icon:w,text:A,iconClassName:I,..._}=o,y=w!==void 0,me=o.children!==void 0;return(0,N.jsxs)("button",{..._,className:l(o.className,H,oe(H,g),O(H,{size:e,rounded:s,fillMode:r,themeColor:a}),E(H,{hover:d,focus:u,active:L,disabled:W,selected:T}),{"k-icon-button":!A&&!me&&y}),children:[w&&(0,N.jsx)(x,{className:l(I,"k-button-icon"),icon:w}),A?(0,N.jsxs)(N.Fragment,{children:[A&&(0,N.jsx)("span",{className:"k-button-text",children:A}),o.children]}):o.children&&(0,N.jsx)("span",{className:"k-button-text",children:o.children}),m&&(0,N.jsx)("span",{className:"k-menu-button-arrow k-button-arrow",children:(0,N.jsx)(x,{icon:i})})]})};p.states=Ae;p.options=Oe;p.variants=Be;p.className=H;p.defaultOptions=C;p.moduleName=j;p.folderName=ae;var Ee=require("react/jsx-runtime");var Pe=require("react/jsx-runtime");var Re=require("react/jsx-runtime");var U="progressbar",G=U;var b=require("react/jsx-runtime"),h="k-progressbar",Le=[f.disabled,f.indeterminate],Te={},B={indeterminate:!1,label:!0,labelPosition:"start",orientation:"horizontal",reverse:!1,value:"0"},v=o=>{let{disabled:e,height:s,indeterminate:r=B.indeterminate,label:a=B.label,labelPosition:m=B.labelPosition,orientation:i=B.orientation,reverse:g=B.reverse,value:d=B.value,width:u,style:L,...T}=o;return(0,b.jsxs)("div",{...T,className:l(o.className,h,E(h,{disabled:e}),{[`${h}-${i}`]:i,[`${h}-indeterminate`]:r,[`${h}-reverse`]:g}),style:{...L,"--kendo-progressbar-value":d,[i==="horizontal"?"height":"width"]:i==="horizontal"?s:u},children:[(0,b.jsx)("span",{className:l("k-progress-status-wrap",{[`k-progress-${m}`]:m&&!r}),children:a&&(0,b.jsxs)("span",{className:"k-progress-status",children:[d,"%"]})}),!r&&(0,b.jsx)("div",{className:"k-progressbar-value k-selected",children:(0,b.jsx)("span",{className:l("k-progress-status-wrap",{[`k-progress-${m}`]:m}),children:a&&(0,b.jsxs)("span",{className:"k-progress-status",children:[o.value,"%"]})})})]})};v.states=Le;v.options=Te;v.className=h;v.defaultOptions=B;v.moduleName=U;v.folderName=G;var q=require("react/jsx-runtime"),ie="k-chunk-progressbar",we=(o,e)=>e<=o-1,Ie=[f.disabled,f.indeterminate],_e={},V={chunkCount:5,orientation:"horizontal",progress:0},R=o=>{let{disabled:e,chunkCount:s=V.chunkCount,indeterminate:r,orientation:a=V.orientation,progress:m=V.progress,reverse:i,...g}=o;return(0,q.jsx)("div",{...g,className:l(o.className,h,ie,E(h,{disabled:e}),{[`${h}-${a}`]:a,[`${h}-indeterminate`]:r,[`${h}-reverse`]:i}),children:(0,q.jsx)("ul",{className:"k-progressbar-chunks k-reset",children:[...Array(s)].map((d,u)=>(0,q.jsx)("li",{className:l("k-progressbar-chunk",{"k-first":u===0,"k-last":u===[...Array(s)].length-1,"k-selected":we(m,u)})},u))})})};R.states=Ie;R.options=_e;R.className=ie;R.defaultOptions=V;R.moduleName=U;R.folderName=G;var ze=require("react/jsx-runtime");var Ke=require("react/jsx-runtime");var c=require("react/jsx-runtime"),le="k-file",$e=o=>{let{status:e,progress:s,validationMsg:r,fileSummary:a,...m}=o;return(0,c.jsx)("li",{...m,className:l(o.className,le,{[`k-file-${e}`]:e}),children:(0,c.jsxs)("div",{className:"k-file-multiple",children:[(0,c.jsx)(v,{className:l({"k-hidden":e!=="progress"}),value:s,label:!1}),(0,c.jsx)("span",{className:"k-file-icon-wrapper",children:(0,c.jsx)(x,{className:"k-file-icon",icon:"copy",size:"xxlarge"})}),(0,c.jsxs)("div",{className:"k-multiple-files-wrapper",children:[o.children,a&&(0,c.jsx)("span",{className:l("k-file-summary",{"k-hidden":e!=="progress"}),children:a}),r&&(0,c.jsx)("span",{className:"k-file-validation-message",children:r})]}),(0,c.jsx)("div",{className:"k-upload-actions",children:e==="progress"?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("span",{className:"k-upload-pct",children:[s,"%"]}),(0,c.jsx)(p,{icon:"pause-sm",fillMode:"flat",className:"k-upload-action"}),(0,c.jsx)(p,{icon:"cancel",fillMode:"flat",className:"k-upload-action"})]}):(0,c.jsx)(p,{icon:"x",fillMode:"flat",className:"k-upload-action"})})]})})};