@progress/kendo-themes-html
Version:
A collection of HTML helpers used for developing Kendo UI themes
2 lines (1 loc) • 23 kB
JavaScript
var pt=Object.create;var re=Object.defineProperty;var ct=Object.getOwnPropertyDescriptor;var ut=Object.getOwnPropertyNames;var mt=Object.getPrototypeOf,ft=Object.prototype.hasOwnProperty;var gt=(e,t)=>{for(var o in t)re(e,o,{get:t[o],enumerable:!0})},Oe=(e,t,o,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of ut(t))!ft.call(e,a)&&a!==o&&re(e,a,{get:()=>t[a],enumerable:!(s=ct(t,a))||s.enumerable});return e};var bt=(e,t,o)=>(o=e!=null?pt(mt(e)):{},Oe(t||!e||!e.__esModule?re(o,"default",{value:e,enumerable:!0}):o,e)),ht=e=>Oe(re({},"__esModule",{value:!0}),e);var ao={};gt(ao,{UploadBatch:()=>oo});module.exports=ht(ao);var r=(...e)=>e.filter(t=>t!==!0&&!!t).map(t=>Array.isArray(t)?r(...t):typeof t=="object"?Object.keys(t).map((o,s)=>t[s]||t[o]&&o||null).filter(o=>o!==null).join(" "):t).filter(t=>!!t).join(" ");var w=(e,t)=>r({[`${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.themeColor}`]:t.themeColor},{"k-rounded-sm":t.rounded==="small","k-rounded-md":t.rounded==="medium","k-rounded-lg":t.rounded==="large","k-rounded-full":t.rounded==="full","k-rounded-none":t.rounded==="none"}),S=(e,t)=>{let{valid:o,invalid:s,hover:a,focus:i,checked:c,active:l,selected:f,disabled:N,indeterminate:v,loading:O,empty:A,readonly:se,highlighted:ge,...G}=t;return r({"k-valid":o,"k-invalid":s,"k-hover":a,"k-focus":i,"k-checked":c,"k-active":l,"k-selected":f,"k-disabled":N,"k-indeterminate":v&&!c,"k-loading":O,"k-empty":A,"k-readonly":se,"k-highlighted":ge},Object.keys(G).reduce((C,K)=>(K.startsWith("k-")?C[K]=G[K]:C[`k-${K}`]=G[K],C),{}))};function Ie(e,t){if(!t)return{};let o=Array.isArray(t)?t:[t];return Object.fromEntries(o.map(s=>[`k-${s}`,!0]))}var d={undefined:void 0,xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},R={undefined:void 0,none:"none",small:"small",medium:"medium",large:"large",full:"full"},F={undefined:void 0,solid:"solid",flat:"flat",outline:"outline",clear:"clear",link:"link"},L={undefined:void 0,outline:"outline",solid:"solid",duotone:"duotone"},n={undefined:void 0,inherit:"inherit",base:"base",primary:"primary",secondary:"secondary",tertiary:"tertiary",info:"info",success:"success",warning:"warning",error:"error",inverse:"inverse"},g={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 be="action-buttons",Pe=be;var _e=require("react/jsx-runtime"),ie="k-actions",vt=[],xt={},he={alignment:"start",orientation:"horizontal"},D=e=>{let{alignment:t=he.alignment,orientation:o=he.orientation,...s}=e;return(0,_e.jsx)("div",{...s,className:r(ie,{[`${ie}-${t}`]:t,[`${ie}-${o}`]:o},e.className),children:e.children})};D.states=vt;D.options=xt;D.className=ie;D.defaultOptions=he;D.moduleName=be;D.folderName=Pe;var Te=D;var Q=require("react/jsx-runtime"),ve="k-font-icon",kt=[],Nt={size:[d.undefined,d.xsmall,d.small,d.medium,d.large,d.xlarge,d.xxlarge,d.xxxlarge],themeColor:[n.undefined,n.base,n.primary,n.secondary,n.tertiary,n.success,n.warning,n.error,n.info]},yt={},X=e=>{let{size:t,themeColor:o,icon:s,rotate:a,flip:i,...c}=e;return s?(0,Q.jsx)("span",{...c,className:r(e.className,ve,w(ve,{size:t}),{[`k-i-${s}`]:s,[`k-color-${o}`]:o,[`k-rotate-${a}`]:a,"k-flip-h":i==="h"||i==="both","k-flip-v":i==="v"||i==="both"}),"aria-hidden":"true"}):(0,Q.jsx)(Q.Fragment,{})};X.states=kt;X.options=Nt;X.className=ve;X.defaultOptions=yt;var Ee=X;var H=require("react/jsx-runtime"),xe="k-svg-icon",Bt=[],Mt={size:[d.undefined,d.xsmall,d.small,d.medium,d.large,d.xlarge,d.xxlarge,d.xxxlarge],themeColor:[n.undefined,n.base,n.primary,n.secondary,n.tertiary,n.success,n.warning,n.error,n.info],variant:[L.outline,L.solid,L.duotone]},ke={viewBox:"0 0 24 24",variant:L.outline},Y=e=>{var O,A;let{size:t,themeColor:o,rotate:s,flip:a,viewBox:i=ke.viewBox,variant:c=ke.variant,icon:l,...f}=e;if(!l)return(0,H.jsx)(H.Fragment,{});if(l==="none")return(0,H.jsx)("span",{...f,className:r(e.className,xe,w("k-icon",{size:t}),"k-none"),"aria-hidden":"true"});let N=typeof l=="object"&&l.name&&l.name,v=typeof l=="object"?c&&((O=l.variants)==null?void 0:O[c])||((A=l.variants)==null?void 0:A.outline)||l.content:void 0;return(0,H.jsx)("span",{...f,className:r(e.className,xe,w("k-icon",{size:t}),{[`k-svg-i-${N}`]:N,[`k-color-${o}`]:o,[`k-rotate-${s}`]:s,"k-flip-h":a==="h"||a==="both","k-flip-v":a==="v"||a==="both"}),"aria-hidden":"true",children:(0,H.jsx)("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof l=="object"?l.viewBox:i,dangerouslySetInnerHTML:v!==void 0?{__html:v}:void 0,children:l?void 0:e.children})})};Y.states=Bt;Y.options=Mt;Y.className=xe;Y.defaultOptions=ke;var Ne=Y;var ye=bt(require("@progress/kendo-svg-icons"));var ze="icon",Ke="icons";var Fe=require("react");var we=require("react"),Re=(0,we.createContext)({iconsType:"svg"});var I=require("react/jsx-runtime"),le="k-icon",At=e=>e.replace(/([-_][a-z0-9])/gi,t=>t.toUpperCase().replace("-","").replace("_","")),Ct=[],Ut={size:[d.undefined,d.xsmall,d.small,d.medium,d.large,d.xlarge,d.xxlarge,d.xxxlarge],themeColor:[n.undefined,n.base,n.primary,n.secondary,n.tertiary,n.success,n.warning,n.error,n.info],variant:[L.outline,L.solid,L.duotone]},de={viewBox:"0 0 24 24",type:"svg",variant:L.outline},b=e=>{let{iconsType:t}=(0,Fe.useContext)(Re),{size:o,themeColor:s,icon:a,type:i=t||de.type,rotate:c,flip:l,viewBox:f=de.viewBox,variant:N=de.variant,...v}=e;if(!a)return(0,I.jsx)(I.Fragment,{});if((t||i)==="svg"){if(a==="none")return(0,I.jsx)(Ne,{...v,className:r(e.className,le),icon:a,size:o,variant:N});let A=ye[a]?a:At(`${a}-icon`);return ye[A]?(0,I.jsx)(Ne,{...v,className:r(e.className,le),icon:ye[A],size:o,themeColor:s,rotate:c,flip:l,viewBox:f,variant:N}):(0,I.jsx)(I.Fragment,{})}return(0,I.jsx)(Ee,{...v,className:r(e.className,le),icon:a,size:o,themeColor:s,rotate:c,flip:l})};b.states=Ct;b.options=Ut;b.defaultOptions=de;b.className=le;b.moduleName=ze;b.folderName=Ke;b.ariaSpec={selector:".k-icon, .k-svg-icon",rules:[{selector:".k-icon, .k-svg-icon",attribute:"aria-hidden=true",usage:"Hides the icon element and all its children from assistive technologies."}]};var Be="button",De=Be;var M=require("react/jsx-runtime"),j="k-button",St=["icon-button"],Lt=[g.hover,g.focus,g.active,g.selected,g.disabled,g.generating],Ot={size:[d.undefined,d.xsmall,d.small,d.medium,d.large],rounded:[R.undefined,R.none,R.small,R.medium,R.large,R.full],fillMode:[F.undefined,F.solid,F.flat,F.outline,F.clear,F.link],themeColor:[n.undefined,n.base,n.primary,n.secondary,n.tertiary,n.success,n.warning,n.error,n.info,n.inverse]},Me={showArrow:!1,arrowIconName:"chevron-down"},p=e=>{let{as:t="button",size:o,rounded:s,fillMode:a,themeColor:i,showArrow:c=Me.showArrow,arrowIconName:l=Me.arrowIconName,variant:f,hover:N,focus:v,active:O,selected:A,disabled:se,togglable:ge,ariaDisabled:G,icon:C,iconSize:K,text:ne,iconClassName:nt,className:rt,...it}=e,lt=C!=null,dt=e.children!==void 0;return(0,M.jsxs)(t,{className:r(rt,j,Ie(j,f),w(j,{size:o,rounded:s,fillMode:a,themeColor:i}),S(j,{hover:N,focus:v,active:O,disabled:se||G,selected:A}),{"k-icon-button":!ne&&!dt&<}),"aria-pressed":ge?A?"true":"false":void 0,...it,"aria-disabled":G?"true":void 0,disabled:se||void 0,children:[typeof C=="string"&&C&&(0,M.jsx)(b,{className:r(nt,"k-button-icon"),icon:C,size:K}),C&&typeof C!="string"&&(0,M.jsx)(M.Fragment,{children:C}),ne?(0,M.jsxs)(M.Fragment,{children:[ne&&(0,M.jsx)("span",{className:"k-button-text",children:ne}),e.children]}):e.children&&(0,M.jsx)("span",{className:"k-button-text",children:e.children}),c&&(0,M.jsx)("span",{className:"k-menu-button-arrow k-button-arrow",children:(0,M.jsx)(b,{icon:l})})]})};p.states=Lt;p.options=Ot;p.variants=St;p.className=j;p.defaultOptions=Me;p.moduleName=Be;p.folderName=De;p.ariaSpec={selector:".k-button",rules:[{selector:".k-button",attribute:"role=button or nodeName=button",usage:"The button role is implicit from the native <button> element."},{selector:".k-button",attribute:"aria-label (when icon-only)",usage:"Required for icon-only buttons that have no visible text."},{selector:".k-button",attribute:"aria-pressed (when togglable)",usage:"Indicates the pressed state of a toggle button."},{selector:".k-button",attribute:"disabled (when disabled)",usage:"Rendered when the button is disabled."}]};var $e=require("react/jsx-runtime"),He=e=>(0,$e.jsx)(p,{icon:"folder",...e,"aria-label":e["aria-label"]||"Folder",children:void 0});var Ge=require("react/jsx-runtime"),Ve=e=>(0,Ge.jsx)(p,{icon:"folder",children:"Button",...e});var We=require("react/jsx-runtime"),qe=e=>(0,We.jsx)(p,{children:"Button",...e});var pe=require("react/jsx-runtime"),It=p.options,Pt=p.states,Tt={...p.defaultOptions,variant:"text"},_t=[{name:"icon-only",title:"Icon Only"},{name:"icon-and-text",title:"Icon & Text"},{name:"text",title:"Text"}],Et=[],q=e=>{let{variant:t,...o}=e;switch(t){case"icon-only":return(0,pe.jsx)(He,{...o,icon:"star"});case"icon-and-text":return(0,pe.jsx)(Ve,{...o,icon:"star",children:"Button"});default:return(0,pe.jsx)(qe,{...o,children:"Button"})}};q.options=It;q.states=Pt;q.variants=_t;q.defaultOptions=Tt;q.modifiers=Et;q.className=p.className;var u=require("react/jsx-runtime"),Ae="k-upload-dropzone",zt=[g.hover],ce=e=>{let{hover:t,status:o,disabled:s,hasFiles:a,filesId:i,...c}=e,l;switch(o){case"uploading":l=(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(b,{icon:"upload"}),"Uploading..."]});break;case"done":l=(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(b,{icon:"check"}),"Done"]});break;case"failed":l=(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(b,{icon:"exclamation-circle"}),"Done"]});break;default:l=(0,u.jsx)(u.Fragment,{});break}return(0,u.jsxs)("div",{...c,className:r(e.className,Ae,"k-dropzone",S(Ae,{hover:t})),children:[(0,u.jsxs)("div",{className:"k-upload-button-wrap",children:[(0,u.jsx)(p,{className:"k-upload-button","aria-disabled":s?"true":"false",...a&&i?{"aria-controls":i}:{},children:"Select files..."}),(0,u.jsx)("input",{id:"upload-input",className:"k-hidden",tabIndex:-1,"aria-hidden":"true"})]}),(0,u.jsx)("span",{className:r("k-dropzone-hint",{"k-hidden":o!=="upload"}),children:"Drop files here to upload"}),o!=="upload"&&(0,u.jsx)("span",{className:"k-upload-status",children:l})]})};ce.states=zt;ce.className=Ae;var Ce="upload",Ze=Ce;var _=require("react/jsx-runtime"),Ue="k-upload",Kt=[g.hover,g.disabled],wt={},Qe={actionsLayout:"end"},Je="upload-files-list",m=e=>{let{async:t,empty:o,actions:s,actionsLayout:a=Qe.actionsLayout,hover:i,status:c,disabled:l,...f}=e,N=!!e.children;return(0,_.jsxs)("div",{...f,className:r(e.className,Ue,S(Ue,{disabled:l}),{"k-upload-async":t,"k-upload-empty":o}),children:[(0,_.jsx)(ce,{status:c,hover:i,disabled:l,hasFiles:N,filesId:Je}),N&&(0,_.jsx)("ul",{className:"k-upload-files",role:"list",id:Je,children:e.children}),s&&N&&(0,_.jsxs)(Te,{alignment:a,orientation:"horizontal",children:[(0,_.jsx)(p,{className:"k-clear-selected",children:"Clear"}),(0,_.jsx)(p,{themeColor:"primary",className:"k-upload-selected",children:"Upload"})]})]})};m.states=Kt;m.options=wt;m.className=Ue;m.defaultOptions=Qe;m.moduleName=Ce;m.folderName=Ze;m.ariaSpec={selector:".k-upload",rules:[{selector:".k-upload .k-upload-button",attribute:"aria-disabled",usage:"Announces the disabled state of the upload button."},{selector:".k-upload .k-upload-button",attribute:"aria-controls (when present)",usage:"Creates the relationship between the button and the list of selected files when the list is present."},{selector:".k-upload input",attribute:"tabindex=-1",usage:"Assures that the input element inside the upload is not focusable."},{selector:".k-upload input",attribute:"aria-hidden=true",usage:"The input needs to be hidden from screen readers."},{selector:".k-upload-files",attribute:"role=list",usage:"Explicitly sets the UL role to list."},{selector:".k-upload-files",attribute:"id",usage:"Unique and deterministic id linked to the button aria-controls attribute."},{selector:".k-upload-files .k-file",attribute:"role=listitem",usage:"Explicitly sets the LI role to listitem."},{selector:".k-upload .k-file .k-file-validation-message",attribute:"aria-live=polite",usage:"Announces the change in the upload status of the file."},{selector:".k-upload .k-upload-actions .k-upload-action",attribute:"aria-label",usage:"Provides accessible names for the file action buttons."},{selector:".k-upload .k-upload-actions .k-upload-action",attribute:"tabindex=-1",usage:"The list file action buttons are not focusable elements."}]};var ee="progressbar",ue=ee;var E=require("react/jsx-runtime"),U="k-progressbar",Rt=[g.disabled,g.indeterminate],Ft={orientation:["horizontal","vertical"]},$={indeterminate:!1,label:!0,labelPosition:"start",orientation:"horizontal",reverse:!1,value:"0"},x=e=>{let{disabled:t,height:o,indeterminate:s=$.indeterminate,label:a=$.label,labelPosition:i=$.labelPosition,orientation:c=$.orientation,reverse:l=$.reverse,value:f=$.value,width:N,style:v,ariaLabel:O,...A}=e;return(0,E.jsxs)("div",{...A,className:r(e.className,U,S(U,{disabled:t}),{[`${U}-${c}`]:c,[`${U}-indeterminate`]:s,[`${U}-reverse`]:l}),style:{...v,"--kendo-progressbar-value":f,[c==="horizontal"?"height":"width"]:c==="horizontal"?o:N},role:"progressbar","aria-label":O||"progress","aria-valuenow":s?void 0:Number(f),"aria-valuemin":0,"aria-valuemax":100,children:[(0,E.jsx)("span",{className:r("k-progress-status-wrap",{[`k-progress-${i}`]:i&&!s}),children:a&&(0,E.jsxs)("span",{className:"k-progress-status",children:[f,"%"]})}),!s&&(0,E.jsx)("div",{className:"k-progressbar-value k-selected",children:(0,E.jsx)("span",{className:r("k-progress-status-wrap",{[`k-progress-${i}`]:i}),children:a&&(0,E.jsxs)("span",{className:"k-progress-status",children:[e.value,"%"]})})})]})};x.states=Rt;x.options=Ft;x.className=U;x.defaultOptions=$;x.moduleName=ee;x.folderName=ue;x.ariaSpec={selector:".k-progressbar",implicitRole:"progressbar",rules:[{selector:".k-progressbar",attribute:"role=progressbar",usage:"Sets the proper role for ProgressBar."},{selector:".k-progressbar",attribute:"aria-label or aria-labelledby",usage:"The ProgressBar needs an accessible name to be assigned to it."},{selector:".k-progressbar:not(.k-progressbar-indeterminate)",attribute:"aria-valuenow",usage:"Required if the value is not indeterminate. Decimal value between aria-valuemin and aria-valuemax."},{selector:".k-progressbar",attribute:"aria-valuemin",usage:"Minimum value. Defaults to 0."},{selector:".k-progressbar",attribute:"aria-valuemax",usage:"Maximum value. Defaults to 100."}]};var Xe=x;var fe=require("react/jsx-runtime"),Ye="k-chunk-progressbar",Dt=(e,t)=>t<=e-1,Ht=[g.disabled,g.indeterminate],$t={},me={chunkCount:5,orientation:"horizontal",progress:0},V=e=>{let{disabled:t,chunkCount:o=me.chunkCount,indeterminate:s,orientation:a=me.orientation,progress:i=me.progress,reverse:c,ariaLabel:l,...f}=e;return(0,fe.jsx)("div",{...f,className:r(e.className,U,Ye,S(U,{disabled:t}),{[`${U}-${a}`]:a,[`${U}-indeterminate`]:s,[`${U}-reverse`]:c}),role:"progressbar","aria-label":l||"progress","aria-valuenow":s?void 0:i,"aria-valuemin":0,"aria-valuemax":o,children:(0,fe.jsx)("ul",{className:"k-progressbar-chunks k-reset",children:[...Array(o)].map((N,v)=>(0,fe.jsx)("li",{className:r("k-progressbar-chunk",{"k-first":v===0,"k-last":v===[...Array(o)].length-1,"k-selected":Dt(i,v)})},v))})})};V.states=Ht;V.options=$t;V.className=Ye;V.defaultOptions=me;V.moduleName=ee;V.folderName=ue;V.ariaSpec={selector:".k-chunk-progressbar",implicitRole:"progressbar",rules:[{selector:".k-chunk-progressbar",attribute:"role=progressbar",usage:"Sets the proper role for ChunkProgressBar."},{selector:".k-chunk-progressbar",attribute:"aria-label or aria-labelledby",usage:"The ChunkProgressBar needs an accessible name to be assigned to it."},{selector:".k-chunk-progressbar:not(.k-progressbar-indeterminate)",attribute:"aria-valuenow",usage:"Required if the value is not indeterminate. Value between aria-valuemin and aria-valuemax."},{selector:".k-chunk-progressbar",attribute:"aria-valuemin",usage:"Minimum value. Defaults to 0."},{selector:".k-chunk-progressbar",attribute:"aria-valuemax",usage:"Maximum value. Defaults to chunk count."}]};var je=require("react/jsx-runtime"),te=e=>(0,je.jsx)(Xe,{...e});var Vt=require("react/jsx-runtime");var P=require("react/jsx-runtime"),Gt=x.options,qt=x.states,et={...x.defaultOptions,variant:"start"},Wt=[{name:"start",title:"Label start"},{name:"center",title:"Label center"},{name:"end",title:"Label end"},{name:"empty",title:"No label"}],Zt=[],W=e=>{let{variant:t,modifiers:o,...s}={...et,...e},a={},i={style:{width:"324px"}};switch(Object.keys(o||{}).forEach(c=>{switch(c){case"reverse":a.reverse=!!(o!=null&&o[c]);break;case"vertical":a.orientation=o!=null&&o[c]?"vertical":void 0,i.style=o!=null&&o[c]?void 0:{width:"324px"};break}}),t){case"end":return(0,P.jsx)("div",{...i,children:(0,P.jsx)(te,{...s,...a,labelPosition:"end",value:"50"})});case"center":return(0,P.jsx)("div",{...i,children:(0,P.jsx)(te,{...s,...a,labelPosition:"center",value:"50"})});case"empty":return(0,P.jsx)("div",{...i,children:(0,P.jsx)(te,{...s,...a,label:!1,value:"50"})});default:return(0,P.jsx)("div",{...i,children:(0,P.jsx)(te,{...s,...a,labelPosition:"start",value:"50"})})}};W.options=Gt;W.states=qt;W.variants=Wt;W.defaultOptions=et;W.modifiers=Zt;W.className=x.className;var Z=require("react/jsx-runtime"),Jt="k-file-info",oe=e=>{let{name:t,size:o,validationMsg:s,...a}=e;return(0,Z.jsxs)("div",{...a,className:r(e.className,Jt),children:[t&&(0,Z.jsx)("span",{className:"k-file-name",children:t}),o&&(0,Z.jsx)("span",{className:"k-file-size",children:o}),s&&(0,Z.jsx)("span",{className:"k-file-validation-message","aria-live":"polite",children:s})]})};var k=require("react/jsx-runtime"),Qt="k-file",B=e=>{let{status:t,progress:o,name:s,icon:a,size:i,state:c,validationMsg:l,...f}=e;return(0,k.jsx)("li",{...f,className:r(e.className,Qt,{[`k-file-${t}`]:t}),role:"listitem",tabIndex:0,children:(0,k.jsxs)("div",{className:"k-file-single",children:[(0,k.jsx)(x,{className:r({"k-hidden":t!=="progress"}),value:o,label:!1}),(0,k.jsxs)("span",{className:"k-file-icon-wrapper",children:[(0,k.jsx)(b,{className:"k-file-icon",icon:a,size:"xxlarge"}),c&&(0,k.jsx)("span",{className:"k-file-state",children:c})]}),(0,k.jsx)(oe,{name:s,size:i,validationMsg:l}),(0,k.jsx)("div",{className:"k-upload-actions",children:t==="progress"?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)("span",{className:"k-upload-pct",children:[o,"%"]}),(0,k.jsx)(p,{icon:"pause-sm",fillMode:"flat",size:"xsmall",className:"k-upload-action","aria-label":"Pause upload",tabIndex:-1}),(0,k.jsx)(p,{icon:"cancel",fillMode:"flat",size:"xsmall",className:"k-upload-action","aria-label":"Cancel upload",tabIndex:-1})]}):(0,k.jsx)(p,{icon:"x",fillMode:"flat",size:"xsmall",className:"k-upload-action","aria-label":"Remove file",tabIndex:-1})})]})})};var h=require("react/jsx-runtime"),Xt="k-file",tt=e=>{let{status:t,progress:o,validationMsg:s,fileSummary:a,...i}=e;return(0,h.jsx)("li",{...i,className:r(e.className,Xt,{[`k-file-${t}`]:t}),role:"listitem",tabIndex:0,children:(0,h.jsxs)("div",{className:"k-file-multiple",children:[(0,h.jsx)(x,{className:r({"k-hidden":t!=="progress"}),value:o,label:!1}),(0,h.jsx)("span",{className:"k-file-icon-wrapper",children:(0,h.jsx)(b,{className:"k-file-icon",icon:"copy",size:"xxlarge"})}),(0,h.jsxs)("div",{className:"k-multiple-files-wrapper",children:[e.children,a&&(0,h.jsx)("span",{className:r("k-file-summary",{"k-hidden":t!=="progress"}),children:a}),s&&(0,h.jsx)("span",{className:"k-file-validation-message","aria-live":"polite",children:s})]}),(0,h.jsx)("div",{className:"k-upload-actions",children:t==="progress"?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)("span",{className:"k-upload-pct",children:[o,"%"]}),(0,h.jsx)(p,{icon:"pause-sm",fillMode:"flat",size:"xsmall",className:"k-upload-action","aria-label":"Pause upload",tabIndex:-1}),(0,h.jsx)(p,{icon:"cancel",fillMode:"flat",size:"xsmall",className:"k-upload-action","aria-label":"Cancel upload",tabIndex:-1})]}):(0,h.jsx)(p,{icon:"x",fillMode:"flat",size:"xsmall",className:"k-upload-action","aria-label":"Remove file",tabIndex:-1})})]})})};var z=require("react/jsx-runtime"),ae=e=>(0,z.jsx)(m,{async:!0,children:(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(B,{name:"Image_With_Very_Very_Very_Very_Very_Long_Name1.png",icon:"file-image",size:"51.23 KB"}),(0,z.jsx)(B,{name:"Image2.jpg",icon:"file-image",size:"106.43 KB"})]}),...e});var at=require("react/jsx-runtime"),ot=e=>(0,at.jsx)(m,{async:!0,empty:!0,...e});var Se=require("react/jsx-runtime");var Le=require("react/jsx-runtime");var y=require("react/jsx-runtime"),Yt=m.options,jt=m.states,st={...m.defaultOptions,variant:"empty"},eo=[{name:"empty",title:"Empty"},{name:"upload",title:"Upload"},{name:"uploading",title:"Uploading"},{name:"success",title:"Success"},{name:"failed",title:"Failed"}],to=[],J=e=>{let{variant:t,...o}={...st,...e};switch(t){case"success":return(0,y.jsxs)(ae,{status:"done",style:{width:"586px"},...o,children:[(0,y.jsx)(B,{status:"success",validationMsg:"File(s) uploaded successfully.",name:"Image1.png",icon:"file-image"}),(0,y.jsx)(B,{status:"success",validationMsg:"File(s) uploaded successfully.",name:"Image2.png",icon:"file-image"})]});case"failed":return(0,y.jsxs)(ae,{status:"failed",style:{width:"586px"},...o,children:[(0,y.jsx)(B,{status:"error",validationMsg:"File type not allowed.",name:"Movie1.mkv",icon:"file-image"}),(0,y.jsx)(B,{status:"error",validationMsg:"File type not allowed.",name:"Video2.mkv",icon:"file-image"})]});case"uploading":return(0,y.jsxs)(ae,{status:"uploading",style:{width:"586px"},...o,children:[(0,y.jsx)(B,{progress:"50",status:"progress",name:"Document1.txt",icon:"file-pdf",size:"328.92 KB"}),(0,y.jsx)(B,{progress:"70",status:"progress",name:"Document2.txt",icon:"file-pdf",size:"225.68 KB"})]});case"upload":return(0,y.jsxs)(ae,{actions:!0,status:"upload",style:{width:"586px"},...o,children:[(0,y.jsx)(B,{name:"Image1.png",icon:"file-image",size:"51.23 KB"}),(0,y.jsx)(B,{name:"Image2.jpg",icon:"file-image",size:"106.43 KB"})]});default:return(0,y.jsx)(ot,{async:!0,status:"upload",style:{width:"586px"},...o})}};J.options=Yt;J.states=jt;J.variants=eo;J.defaultOptions=st;J.modifiers=to;J.className=m.className;var T=require("react/jsx-runtime"),oo=e=>(0,T.jsx)(m,{async:!0,children:(0,T.jsx)(T.Fragment,{children:(0,T.jsxs)(tt,{fileSummary:"Total: 2 files, 157.66 KB",children:[(0,T.jsx)(oe,{name:"Video1_File_with_Very_Very_Very_Very_Long_Name.png",size:"51.23 KB"}),(0,T.jsx)(oe,{name:"Image2.jpg",size:"106.43 KB"})]})}),...e});