@progress/kendo-themes-html
Version:
A collection of HTML helpers used for developing Kendo UI themes
2 lines (1 loc) • 12.2 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})},re=(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)):{},re(e||!o||!o.__esModule?F(s,"default",{value:o,enumerable:!0}):s,o)),ze=o=>re(F({},"__esModule",{value:!0}),o);var so={};Se(so,{UploadBatch:()=>to});module.exports=ze(so);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 l={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"},m={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 ie=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,ie.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 le=K;var O=require("react/jsx-runtime"),X="k-icon k-font-icon",Ae=[],Ue={size:[l.xsmall,l.small,l.medium,l.large,l.xlarge,l.xxlarge,l.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,...i}=o;return a?(0,O.jsx)("span",{...i,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 ce=T;var C=require("react/jsx-runtime"),Y="k-icon k-svg-icon",Pe=[],we={size:[l.xsmall,l.small,l.medium,l.large,l.xlarge,l.xxlarge,l.xxxlarge],themeColor:[t.base,t.primary,t.secondary,t.tertiary,t.success,t.warning,t.error,t.info,t.light,t.dark]},de={viewBox:"0 0 24 24"},_=o=>{let{size:e,themeColor:s,rotate:a,flip:n,viewBox:c=de.viewBox,icon:i,...h}=o;if(!i)return(0,C.jsx)(C.Fragment,{});i==="none"&&{...h,className:r(o.className,Y,"k-none")};let f=typeof i=="object"&&i.name&&i.name;return(0,C.jsx)("span",{...h,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 i=="object"?i.viewBox:c,dangerouslySetInnerHTML:typeof i=="object"?{__html:i.content}:void 0,children:i?void 0:o.children})})};_.states=Pe;_.options=we;_.className=Y;_.defaultOptions=de;var j=_;var pe=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:[l.xsmall,l.small,l.medium,l.large,l.xlarge,l.xxlarge,l.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"},g=o=>{let{size:e,themeColor:s,icon:a,type:n=ee.type,rotate:c,flip:i,viewBox:h=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 pe[k]?(0,y.jsx)(j,{...f,icon:pe[k],size:e,themeColor:s,rotate:c,flip:i,viewBox:h}):(0,y.jsx)(y.Fragment,{})}return(0,y.jsx)(ce,{...f,icon:a,size:e,themeColor:s,rotate:c,flip:i})};g.states=Oe;g.options=Te;g.defaultOptions=ee;var v=require("react/jsx-runtime"),H="k-button",_e=[m.hover,m.focus,m.active,m.selected,m.disabled],$e={size:[l.small,l.medium,l.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:l.medium,rounded:P.medium,fillMode:z.solid,themeColor:t.base,showArrow:!1,arrowIconName:"caret-alt-down"},u=o=>{let{size:e=I.size,rounded:s=I.rounded,fillMode:a=I.fillMode,themeColor:n=I.themeColor,showArrow:c=I.showArrow,arrowIconName:i=I.arrowIconName,hover:h,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:h,focus:f,active:k,disabled:Z,selected:q}),{"k-icon-button":!$&&!ke&&xe}),children:[J&&(0,v.jsx)(g,{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)(g,{icon:i})})]})};u.states=_e;u.options=$e;u.className=H;u.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=[m.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)(g,{icon:"upload"}),"Uploading..."]});break;case"done":n=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(g,{icon:"check"}),"Done"]});break;case"failed":n=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(g,{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)(u,{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 S=require("react/jsx-runtime"),te="k-upload",De=[m.hover,m.disabled],Ve={},me={actionsLayout:"end"},b=o=>{let{async:e,empty:s,actions:a,actionsLayout:n=me.actionsLayout,hover:c,status:i,disabled:h,...f}=o;return(0,S.jsxs)("div",{...f,className:r(o.className,te,N(te,{disabled:h}),{"k-upload-async":e,"k-upload-empty":s}),children:[(0,S.jsx)(R,{status:i,hover:c}),o.children&&(0,S.jsx)("ul",{className:"k-upload-files",children:o.children}),a&&o.children&&(0,S.jsxs)(le,{alignment:n,orientation:"horizontal",children:[(0,S.jsx)(u,{className:"k-clear-selected",children:"Clear"}),(0,S.jsx)(u,{themeColor:"primary",className:"k-upload-selected",children:"Upload"})]})]})};b.states=De;b.options=Ve;b.className=te;b.defaultOptions=me;var M=require("react/jsx-runtime"),x="k-progressbar",Ge=[m.disabled,m.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:i=A.orientation,reverse:h=A.reverse,value:f=A.value,width:k,style:q,...Z}=o;return(0,M.jsxs)("div",{...Z,className:r(o.className,x,N(x,{disabled:e}),{[`${x}-${i}`]:i,[`${x}-indeterminate`]:a,[`${x}-reverse`]:h}),style:{...q,"--kendo-progressbar-value":f,[i==="horizontal"?"height":"width"]:i==="horizontal"?s:k},children:[(0,M.jsx)("span",{className:r("k-progress-status-wrap",{[`k-progress-${c}`]:c&&!a}),children:n&&(0,M.jsxs)("span",{className:"k-progress-status",children:[f,"%"]})}),!a&&(0,M.jsx)("div",{className:"k-progressbar-value k-selected",children:(0,M.jsx)("span",{className:r("k-progress-status-wrap",{[`k-progress-${c}`]:c}),children:n&&(0,M.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"),ue="k-chunk-progressbar",qe=(o,e)=>e<=o-1,Ze=[m.disabled,m.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:i,...h}=o;return(0,V.jsx)("div",{...h,className:r(o.className,x,ue,N(x,{disabled:e}),{[`${x}-${n}`]:n,[`${x}-indeterminate`]:a,[`${x}-reverse`]:i}),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=ue;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",W=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 se=require("react/jsx-runtime");var p=require("react/jsx-runtime"),je="k-file",fe=o=>{let{status:e,progress:s,validationMsg:a,fileSummary:n,...c}=o;return(0,p.jsx)("li",{...c,className:r(o.className,je,{[`k-file-${e}`]:e}),children:(0,p.jsxs)("div",{className:"k-file-multiple",children:[(0,p.jsx)(U,{className:r({"k-hidden":e!=="progress"}),value:s,label:!1}),(0,p.jsx)("span",{className:"k-file-icon-wrapper",children:(0,p.jsx)(g,{className:"k-file-icon",icon:"copy",size:"xxlarge"})}),(0,p.jsxs)("div",{className:"k-multiple-files-wrapper",children:[o.children,n&&(0,p.jsx)("span",{className:r("k-file-summary",{"k-hidden":e!=="progress"}),children:n}),a&&(0,p.jsx)("span",{className:"k-file-validation-message",children:a})]}),(0,p.jsx)("div",{className:"k-upload-actions",children:e==="progress"?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)("span",{className:"k-upload-pct",children:[s,"%"]}),(0,p.jsx)(u,{icon:"pause-sm",fillMode:"flat",className:"k-upload-action"}),(0,p.jsx)(u,{icon:"cancel",fillMode:"flat",className:"k-upload-action"})]}):(0,p.jsx)(u,{icon:"x",fillMode:"flat",className:"k-upload-action"})})]})})};var ae=require("react/jsx-runtime");var oo=require("react/jsx-runtime");var ne=require("react/jsx-runtime");var B=require("react/jsx-runtime"),to=o=>(0,B.jsx)(b,{async:!0,children:(0,B.jsx)(B.Fragment,{children:(0,B.jsxs)(fe,{fileSummary:"Total: 2 files, 157.66 KB",children:[(0,B.jsx)(W,{name:"Video1_File_with_Very_Very_Very_Very_Long_Name.png",size:"51.23 KB"}),(0,B.jsx)(W,{name:"Image2.jpg",size:"106.43 KB"})]})}),...o});