@progress/kendo-themes-html
Version:
A collection of HTML helpers used for developing Kendo UI themes
2 lines (1 loc) • 12 kB
JavaScript
var ve=Object.create;var F=Object.defineProperty;var Ne=Object.getOwnPropertyDescriptor;var ye=Object.getOwnPropertyNames;var be=Object.getPrototypeOf,Be=Object.prototype.hasOwnProperty;var Se=(o,e)=>{for(var s in e)F(o,s,{get:e[s],enumerable:!0})},le=(o,e,s,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of ye(e))!Be.call(o,n)&&n!==s&&F(o,n,{get:()=>e[n],enumerable:!(a=Ne(e,n))||a.enumerable});return o};var Me=(o,e,s)=>(s=o!=null?ve(be(o)):{},le(e||!o||!o.__esModule?F(s,"default",{value:o,enumerable:!0}):s,o)),ze=o=>le(F({},"__esModule",{value:!0}),o);var to={};Se(to,{UploadChunk:()=>oo});module.exports=ze(to);var r=(...o)=>o.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?r(...e):typeof e=="object"?Object.keys(e).map((s,a)=>e[a]||e[s]&&s||null).filter(s=>s!==null).join(" "):e).filter(e=>!!e).join(" ");var L=(o,e)=>r({[`${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"}),N=(o,e)=>r({"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"},P={small:"small",medium:"medium",large:"large",full:"full"},z={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"},p={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"};var ce=require("react/jsx-runtime"),E="k-actions",Ce=[],Ie={},Q={alignment:"start",orientation:"horizontal"},K=o=>{let{alignment:e=Q.alignment,orientation:s=Q.orientation,...a}=o;return(0,ce.jsx)("div",{...a,className:r(E,{[`${E}-${e}`]:e,[`${E}-${s}`]:s},o.className),children:o.children})};K.states=Ce;K.options=Ie;K.className=E;K.defaultOptions=Q;var ie=K;var O=require("react/jsx-runtime"),X="k-icon k-font-icon",Ae=[],Ue={size:[i.xsmall,i.small,i.medium,i.large,i.xlarge,i.xxlarge,i.xxxlarge],themeColor:[t.base,t.primary,t.secondary,t.tertiary,t.success,t.warning,t.error,t.info,t.light,t.dark]},Le={},T=o=>{let{size:e,themeColor:s,icon:a,rotate:n,flip:c,...l}=o;return a?(0,O.jsx)("span",{...l,className:r(o.className,X,L(X,{size:e}),{[`k-i-${a}`]:a,[`k-color-${s}`]:s,[`k-rotate-${n}`]:n,"k-flip-h":c==="h"||c==="both","k-flip-v":c==="v"||c==="both"})}):(0,O.jsx)(O.Fragment,{})};T.states=Ae;T.options=Ue;T.className=X;T.defaultOptions=Le;var de=T;var C=require("react/jsx-runtime"),Y="k-icon k-svg-icon",Pe=[],we={size:[i.xsmall,i.small,i.medium,i.large,i.xlarge,i.xxlarge,i.xxxlarge],themeColor:[t.base,t.primary,t.secondary,t.tertiary,t.success,t.warning,t.error,t.info,t.light,t.dark]},pe={viewBox:"0 0 24 24"},_=o=>{let{size:e,themeColor:s,rotate:a,flip:n,viewBox:c=pe.viewBox,icon:l,...g}=o;if(!l)return(0,C.jsx)(C.Fragment,{});l==="none"&&{...g,className:r(o.className,Y,"k-none")};let f=typeof l=="object"&&l.name&&l.name;return(0,C.jsx)("span",{...g,className:r(o.className,Y,L("k-icon",{size:e}),{[`k-svg-i-${f}`]:f,[`k-color-${s}`]:s,[`k-rotate-${a}`]:a,"k-flip-h":n==="h"||n==="both","k-flip-v":n==="v"||n==="both"}),children:(0,C.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:o.children})})};_.states=Pe;_.options=we;_.className=Y;_.defaultOptions=pe;var j=_;var me=Me(require("@progress/kendo-svg-icons")),y=require("react/jsx-runtime"),Ke=o=>o.replace(/([-_][a-z0-9])/gi,e=>e.toUpperCase().replace("-","").replace("_","")),Oe=[],Te={size:[i.xsmall,i.small,i.medium,i.large,i.xlarge,i.xxlarge,i.xxxlarge],themeColor:[t.base,t.primary,t.secondary,t.tertiary,t.success,t.warning,t.error,t.info,t.light,t.dark]},ee={viewBox:"0 0 24 24",type:"svg"},h=o=>{let{size:e,themeColor:s,icon:a,type:n=ee.type,rotate:c,flip:l,viewBox:g=ee.viewBox,...f}=o;if(!a)return(0,y.jsx)(y.Fragment,{});if(n==="svg"){if(a==="none")return(0,y.jsx)(j,{...f,icon:a,size:e});let k=Ke(`${a}-icon`);return me[k]?(0,y.jsx)(j,{...f,icon:me[k],size:e,themeColor:s,rotate:c,flip:l,viewBox:g}):(0,y.jsx)(y.Fragment,{})}return(0,y.jsx)(de,{...f,icon:a,size:e,themeColor:s,rotate:c,flip:l})};h.states=Oe;h.options=Te;h.defaultOptions=ee;var v=require("react/jsx-runtime"),H="k-button",_e=[p.hover,p.focus,p.active,p.selected,p.disabled],$e={size:[i.small,i.medium,i.large],rounded:[P.small,P.medium,P.large,P.full],fillMode:[z.solid,z.flat,z.outline,z.clear,z.link],themeColor:[t.base,t.primary,t.secondary,t.tertiary,t.success,t.warning,t.error,t.info,t.light,t.dark,t.inverse]},I={size:i.medium,rounded:P.medium,fillMode:z.solid,themeColor:t.base,showArrow:!1,arrowIconName:"caret-alt-down"},m=o=>{let{size:e=I.size,rounded:s=I.rounded,fillMode:a=I.fillMode,themeColor:n=I.themeColor,showArrow:c=I.showArrow,arrowIconName:l=I.arrowIconName,hover:g,focus:f,active:k,selected:q,disabled:Z,icon:J,text:$,iconClassName:ge,...he}=o,xe=J!==void 0,ke=o.children!==void 0;return(0,v.jsxs)("button",{...he,className:r(o.className,H,L(H,{size:e,rounded:s,fillMode:a,themeColor:n}),N(H,{hover:g,focus:f,active:k,disabled:Z,selected:q}),{"k-icon-button":!$&&!ke&&xe}),children:[J&&(0,v.jsx)(h,{className:r(ge,"k-button-icon"),icon:J}),$?(0,v.jsxs)(v.Fragment,{children:[$&&(0,v.jsx)("span",{className:"k-button-text",children:$}),o.children]}):o.children&&(0,v.jsx)("span",{className:"k-button-text",children:o.children}),c&&(0,v.jsx)("span",{className:"k-menu-button-arrow k-button-arrow",children:(0,v.jsx)(h,{icon:l})})]})};m.states=_e;m.options=$e;m.className=H;m.defaultOptions=I;var Fe=require("react/jsx-runtime");var Ee=require("react/jsx-runtime");var He=require("react/jsx-runtime");var d=require("react/jsx-runtime"),oe="k-upload-dropzone",Re=[p.hover],R=o=>{let{hover:e,status:s,...a}=o,n=(0,d.jsx)(d.Fragment,{});switch(s){case"uploading":n=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(h,{icon:"upload"}),"Uploading..."]});break;case"done":n=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(h,{icon:"check"}),"Done"]});break;case"failed":n=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(h,{icon:"exclamation-circle"}),"Done"]});break;default:n=(0,d.jsx)(d.Fragment,{});break}return(0,d.jsxs)("div",{...a,className:r(o.className,oe,"k-dropzone",N(oe,{hover:e})),children:[(0,d.jsxs)("div",{className:"k-upload-button-wrap",children:[(0,d.jsx)(m,{className:"k-upload-button",children:"Select files..."}),(0,d.jsx)("input",{id:"upload-input",className:"k-hidden"})]}),(0,d.jsx)("span",{className:r("k-dropzone-hint",{"k-hidden":s!=="upload"}),children:"Drop files here to upload"}),s!=="upload"&&(0,d.jsx)("span",{className:"k-upload-status",children:n})]})};R.states=Re;R.className=oe;var B=require("react/jsx-runtime"),te="k-upload",De=[p.hover,p.disabled],Ve={},ue={actionsLayout:"end"},b=o=>{let{async:e,empty:s,actions:a,actionsLayout:n=ue.actionsLayout,hover:c,status:l,disabled:g,...f}=o;return(0,B.jsxs)("div",{...f,className:r(o.className,te,N(te,{disabled:g}),{"k-upload-async":e,"k-upload-empty":s}),children:[(0,B.jsx)(R,{status:l,hover:c}),o.children&&(0,B.jsx)("ul",{className:"k-upload-files",children:o.children}),a&&o.children&&(0,B.jsxs)(ie,{alignment:n,orientation:"horizontal",children:[(0,B.jsx)(m,{className:"k-clear-selected",children:"Clear"}),(0,B.jsx)(m,{themeColor:"primary",className:"k-upload-selected",children:"Upload"})]})]})};b.states=De;b.options=Ve;b.className=te;b.defaultOptions=ue;var S=require("react/jsx-runtime"),x="k-progressbar",Ge=[p.disabled,p.indeterminate],We={},A={indeterminate:!1,label:!0,labelPosition:"start",orientation:"horizontal",reverse:!1,value:"0"},U=o=>{let{disabled:e,height:s,indeterminate:a=A.indeterminate,label:n=A.label,labelPosition:c=A.labelPosition,orientation:l=A.orientation,reverse:g=A.reverse,value:f=A.value,width:k,style:q,...Z}=o;return(0,S.jsxs)("div",{...Z,className:r(o.className,x,N(x,{disabled:e}),{[`${x}-${l}`]:l,[`${x}-indeterminate`]:a,[`${x}-reverse`]:g}),style:{...q,"--kendo-progressbar-value":f,[l==="horizontal"?"height":"width"]:l==="horizontal"?s:k},children:[(0,S.jsx)("span",{className:r("k-progress-status-wrap",{[`k-progress-${c}`]:c&&!a}),children:n&&(0,S.jsxs)("span",{className:"k-progress-status",children:[f,"%"]})}),!a&&(0,S.jsx)("div",{className:"k-progressbar-value k-selected",children:(0,S.jsx)("span",{className:r("k-progress-status-wrap",{[`k-progress-${c}`]:c}),children:n&&(0,S.jsxs)("span",{className:"k-progress-status",children:[o.value,"%"]})})})]})};U.states=Ge;U.options=We;U.className=x;U.defaultOptions=A;var V=require("react/jsx-runtime"),fe="k-chunk-progressbar",qe=(o,e)=>e<=o-1,Ze=[p.disabled,p.indeterminate],Je={},D={chunkCount:5,orientation:"horizontal",progress:0},G=o=>{let{disabled:e,chunkCount:s=D.chunkCount,indeterminate:a,orientation:n=D.orientation,progress:c=D.progress,reverse:l,...g}=o;return(0,V.jsx)("div",{...g,className:r(o.className,x,fe,N(x,{disabled:e}),{[`${x}-${n}`]:n,[`${x}-indeterminate`]:a,[`${x}-reverse`]:l}),children:(0,V.jsx)("ul",{className:"k-progressbar-chunks k-reset",children:[...Array(s)].map((f,k)=>(0,V.jsx)("li",{className:r("k-progressbar-chunk",{"k-first":k===0,"k-last":k===[...Array(s)].length-1,"k-selected":qe(c,k)})},k))})})};G.states=Ze;G.options=Je;G.className=fe;G.defaultOptions=D;var Qe=require("react/jsx-runtime");var Xe=require("react/jsx-runtime");var w=require("react/jsx-runtime"),Ye="k-file-info",se=o=>{let{name:e,size:s,validationMsg:a,...n}=o;return(0,w.jsxs)("div",{...n,className:r(o.className,Ye),children:[e&&(0,w.jsx)("span",{className:"k-file-name",children:e}),s&&(0,w.jsx)("span",{className:"k-file-size",children:s}),a&&(0,w.jsx)("span",{className:"k-file-validation-message",children:a})]})};var u=require("react/jsx-runtime"),je="k-file",W=o=>{let{status:e,progress:s,name:a,icon:n,size:c,state:l,validationMsg:g,...f}=o;return(0,u.jsx)("li",{...f,className:r(o.className,je,{[`k-file-${e}`]:e}),children:(0,u.jsxs)("div",{className:"k-file-single",children:[(0,u.jsx)(U,{className:r({"k-hidden":e!=="progress"}),value:s,label:!1}),(0,u.jsxs)("span",{className:"k-file-icon-wrapper",children:[(0,u.jsx)(h,{className:"k-file-icon",icon:n,size:"xxlarge"}),l&&(0,u.jsx)("span",{className:"k-file-state",children:l})]}),(0,u.jsx)(se,{name:a,size:c,validationMsg:g}),(0,u.jsx)("div",{className:"k-upload-actions",children:e==="progress"?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("span",{className:"k-upload-pct",children:[s,"%"]}),(0,u.jsx)(m,{icon:"pause-sm",fillMode:"flat",className:"k-upload-action"}),(0,u.jsx)(m,{icon:"cancel",fillMode:"flat",className:"k-upload-action"})]}):(0,u.jsx)(m,{icon:"x",fillMode:"flat",className:"k-upload-action"})})]})})};var ae=require("react/jsx-runtime");var ne=require("react/jsx-runtime");var eo=require("react/jsx-runtime");var re=require("react/jsx-runtime");var M=require("react/jsx-runtime"),oo=o=>(0,M.jsx)(b,{async:!0,children:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(W,{name:"Image_With_Very_Very_Very_Very_Very_Long_Name1.png",icon:"file-image",size:"51.23 KB"}),(0,M.jsx)(W,{name:"Image2.jpg",icon:"file-image",size:"106.43 KB"})]}),...o});