UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

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