@progress/kendo-themes-html
Version:
A collection of HTML helpers used for developing Kendo UI themes
2 lines (1 loc) • 28 kB
JavaScript
var i=(...e)=>e.filter(t=>t!==!0&&!!t).map(t=>Array.isArray(t)?i(...t):typeof t=="object"?Object.keys(t).map((o,r)=>t[r]||t[o]&&o||null).filter(o=>o!==null).join(" "):t).filter(t=>!!t).join(" ");var v=(e,t)=>i({[`${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.fillMode}-${t.themeColor}`]:t.fillMode&&t.themeColor},{[`${e}-${t.themeColor}`]:t.themeColor&&t.fillMode===void 0},{"k-rounded-sm":t.rounded==="small","k-rounded-md":t.rounded==="medium","k-rounded-lg":t.rounded==="large","k-rounded-full":t.rounded==="full"}),L=(e,t)=>{let{valid:o,invalid:r,hover:a,focus:p,checked:c,active:d,selected:f,disabled:x,indeterminate:T,loading:E,empty:O,readonly:S,highlighted:I,...C}=t;return i({"k-valid":o,"k-invalid":r,"k-hover":a,"k-focus":p,"k-checked":c,"k-active":d,"k-selected":f,"k-disabled":x,"k-indeterminate":T&&!c,"k-loading":E,"k-empty":O,"k-readonly":S,"k-highlighted":I},Object.keys(C).reduce((k,y)=>(y.startsWith("k-")?k[y]=C[y]:k[`k-${y}`]=C[y],k),{}))};function kt(e,t){if(!t)return{};let o=Array.isArray(t)?t:[t];return Object.fromEntries(o.map(r=>[`k-${r}`,!0]))}var s={xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},m={small:"small",medium:"medium",large:"large",full:"full"},u={solid:"solid",flat:"flat",outline:"outline",clear:"clear",link:"link"},l={inherit:"inherit",base:"base",primary:"primary",secondary:"secondary",tertiary:"tertiary",info:"info",success:"success",warning:"warning",error:"error",dark:"dark",light:"light",inverse:"inverse"},n={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 ue="input",Le=ue;import{jsx as Uo}from"react/jsx-runtime";var Oe="k-input",Do=[n.hover,n.focus,n.valid,n.invalid,n.required,n.disabled,n.loading,n.readonly],Bo={size:[s.small,s.medium,s.large],rounded:[m.small,m.medium,m.large,m.full],fillMode:[u.solid,u.flat,u.outline]},ke={size:s.medium,rounded:s.medium,fillMode:u.solid},A=e=>{let{hover:t,focus:o,disabled:r,invalid:a,valid:p,loading:c,readonly:d,size:f=ke.size,rounded:x=ke.rounded,fillMode:T=ke.fillMode,...E}=e;return Uo("span",{...E,className:i(e.className,Oe,v(Oe,{size:f,rounded:x,fillMode:T}),L(Oe,{hover:t,focus:o,disabled:r,invalid:a,valid:p,loading:c,readonly:d}))})};A.states=Do;A.options=Bo;A.className=Oe;A.defaultOptions=ke;A.moduleName=ue;A.folderName=Le;import{jsx as Xo}from"react/jsx-runtime";var ge="k-picker",Fo=[n.hover,n.focus,n.valid,n.invalid,n.required,n.disabled,n.loading,n.readonly],Vo={size:[s.small,s.medium,s.large],rounded:[m.small,m.medium,m.large,m.full],fillMode:[u.solid,u.flat,u.outline]},we={size:s.medium,rounded:m.medium,fillMode:u.solid},re=e=>{let{hover:t,focus:o,disabled:r,invalid:a,valid:p,loading:c,readonly:d,size:f=we.size,rounded:x=we.rounded,fillMode:T=we.fillMode,...E}=e;return Xo("span",{...E,className:i(e.className,ge,v(ge,{size:f,rounded:x,fillMode:T}),L(ge,{hover:t,focus:o,disabled:r,invalid:a,valid:p,loading:c,readonly:d})),children:e.children})};re.states=Fo;re.options=Vo;re.className=ge;re.defaultOptions=we;re.moduleName=ue;re.folderName=Le;import{Fragment as qo,jsx as gt}from"react/jsx-runtime";var Qe="k-font-icon",Go=[],$o={size:[s.xsmall,s.small,s.medium,s.large,s.xlarge,s.xxlarge,s.xxxlarge],themeColor:[l.base,l.primary,l.secondary,l.tertiary,l.success,l.warning,l.error,l.info,l.light,l.dark]},Jo={},fe=e=>{let{size:t,themeColor:o,icon:r,rotate:a,flip:p,...c}=e;return r?gt("span",{...c,className:i(e.className,Qe,v(Qe,{size:t}),{[`k-i-${r}`]:r,[`k-color-${o}`]:o,[`k-rotate-${a}`]:a,"k-flip-h":p==="h"||p==="both","k-flip-v":p==="v"||p==="both"})}):gt(qo,{})};fe.states=Go;fe.options=$o;fe.className=Qe;fe.defaultOptions=Jo;var wt=fe;import{Fragment as Yo,jsx as Re}from"react/jsx-runtime";var Ye="k-svg-icon",Wo=[],Qo={size:[s.xsmall,s.small,s.medium,s.large,s.xlarge,s.xxlarge,s.xxxlarge],themeColor:[l.base,l.primary,l.secondary,l.tertiary,l.success,l.warning,l.error,l.info,l.light,l.dark]},Rt={viewBox:"0 0 24 24"},he=e=>{let{size:t,themeColor:o,rotate:r,flip:a,viewBox:p=Rt.viewBox,icon:c,...d}=e;if(!c)return Re(Yo,{});c==="none"&&{...d,className:i(e.className,Ye,"k-none")};let f=typeof c=="object"&&c.name&&c.name;return Re("span",{...d,className:i(e.className,Ye,v("k-icon",{size:t}),{[`k-svg-i-${f}`]:f,[`k-color-${o}`]:o,[`k-rotate-${r}`]:r,"k-flip-h":a==="h"||a==="both","k-flip-v":a==="v"||a==="both"}),children:Re("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof c=="object"?c.viewBox:p,dangerouslySetInnerHTML:typeof c=="object"?{__html:c.content}:void 0,children:c?void 0:e.children})})};he.states=Wo;he.options=Qo;he.className=Ye;he.defaultOptions=Rt;var Ze=he;import*as je from"@progress/kendo-svg-icons";var _t="icon",Kt="icons";import{Fragment as Ht,jsx as xe}from"react/jsx-runtime";var _e="k-icon",Zo=e=>e.replace(/([-_][a-z0-9])/gi,t=>t.toUpperCase().replace("-","").replace("_","")),jo=[],en={size:[s.xsmall,s.small,s.medium,s.large,s.xlarge,s.xxlarge,s.xxxlarge],themeColor:[l.base,l.primary,l.secondary,l.tertiary,l.success,l.warning,l.error,l.info,l.light,l.dark]},et={viewBox:"0 0 24 24",type:"svg"},N=e=>{let{size:t,themeColor:o,icon:r,type:a=et.type,rotate:p,flip:c,viewBox:d=et.viewBox,...f}=e;if(!r)return xe(Ht,{});if(a==="svg"){if(r==="none")return xe(Ze,{...f,className:i(e.className,_e),icon:r,size:t});let x=je[r]?r:Zo(`${r}-icon`);return je[x]?xe(Ze,{...f,className:i(e.className,_e),icon:je[x],size:t,themeColor:o,rotate:p,flip:c,viewBox:d}):xe(Ht,{})}return xe(wt,{...f,className:i(e.className,_e),icon:r,size:t,themeColor:o,rotate:p,flip:c})};N.states=jo;N.options=en;N.defaultOptions=et;N.className=_e;N.moduleName=_t;N.folderName=Kt;import{Fragment as nn,jsx as tt}from"react/jsx-runtime";var Pt="k-clear-value",tn=[n.disabled,n.loading,n.readonly],on={},P=e=>{let{disabled:t,loading:o,readonly:r,value:a}=e;return t||r||o||!a?tt(nn,{}):tt("span",{className:i(e.className,Pt),children:tt(N,{icon:"x"})})};P.states=tn;P.options=on;P.className=Pt;import{jsx as an}from"react/jsx-runtime";var ot="k-input-inner",rn=[],sn={},Ke={type:"text",autocomplete:"off",value:"",placeholder:""},j=e=>{let{value:t=Ke.value,type:o=Ke.type,placeholder:r=Ke.placeholder,autocomplete:a=Ke.autocomplete,...p}=e;return an("input",{...p,type:o,className:i(e.className,ot,v(ot,e)),placeholder:r,autoComplete:a,defaultValue:t})};j.states=rn;j.options=sn;j.className=ot;import{jsx as zt,jsxs as cn}from"react/jsx-runtime";var nt="k-input-inner",ln=[],pn={},it=e=>{let{value:t,placeholder:o,showValue:r,valueIcon:a,valueIconName:p,...c}=e;return cn("span",{...c,className:i(e.className,nt,v(nt,e)),children:[a,!a&&p&&zt(N,{className:"k-input-value-icon",icon:p}),r&&!t&&o,r&&t&&zt("span",{className:"k-input-value-text",children:t})]})};it.states=ln;it.options=pn;it.className=nt;import{jsx as un}from"react/jsx-runtime";var rt="k-input-inner",mn=[],dn={},Dt={value:"",placeholder:""},st=e=>{let{value:t=Dt.value,placeholder:o=Dt.placeholder,rows:r,...a}=e;return un("textarea",{...a,className:i(e.className,rt,v(rt,e)),placeholder:o,rows:r,defaultValue:t})};st.states=mn;st.options=dn;st.className=rt;import{Fragment as hn,jsx as Bt}from"react/jsx-runtime";var Ut="k-input-loading-icon",fn=[n.disabled,n.loading],B=e=>{let{disabled:t,loading:o}=e;return t||!o?Bt(hn,{}):Bt("span",{className:i(e.className,Ut,"k-icon k-i-loading")})};B.states=fn;B.className=Ut;import{Fragment as vn,jsx as Ft}from"react/jsx-runtime";var Vt="k-input-validation-icon",xn=[n.valid,n.invalid,n.disabled,n.loading],Nn={},z=e=>{let{valid:t,invalid:o,disabled:r,loading:a}=e,p=o?"warning-circle":"check-circle";return r||a||!!!(t||o)?Ft(vn,{}):Ft(N,{className:i(Vt),icon:p})};z.states=xn;z.options=Nn;z.className=Vt;import{Fragment as En,jsx as Xt}from"react/jsx-runtime";var bn="k-input-prefix",Tn={direction:"horizontal"},He=e=>{let{direction:t=Tn.direction,...o}=e;return e.children?Xt("span",{...o,className:i(bn,e.className,{[`k-input-prefix-${t}`]:t}),children:e.children}):Xt(En,{})};import{Fragment as Mn,jsx as Gt}from"react/jsx-runtime";var An="k-input-suffix",Cn={direction:"horizontal"},Pe=e=>{let{direction:t=Cn.direction,...o}=e;return e.children?Gt("span",{...o,className:i(An,e.className,{[`k-input-suffix-${t}`]:t}),children:e.children}):Gt(Mn,{})};import{jsx as $r}from"react/jsx-runtime";import{jsx as Qr}from"react/jsx-runtime";import{jsx as In}from"react/jsx-runtime";var $t="k-input-separator",Sn={direction:"vertical"},at=e=>{let{direction:t=Sn.direction,...o}=e;return In("span",{...o,className:i($t,e.className,{[`${$t}-${t}`]:t})})};var lt="button",Jt=lt;import{Fragment as kn,jsx as Ne,jsxs as qt}from"react/jsx-runtime";var ve="k-button",yn=["icon-button"],Ln=[n.hover,n.focus,n.active,n.selected,n.disabled,n.generating],On={size:[s.small,s.medium,s.large],rounded:[m.small,m.medium,m.large,m.full],fillMode:[u.solid,u.flat,u.outline,u.clear,u.link],themeColor:[l.base,l.primary,l.secondary,l.tertiary,l.success,l.warning,l.error,l.info,l.light,l.dark,l.inverse]},ee={size:s.medium,rounded:m.medium,fillMode:u.solid,themeColor:l.base,showArrow:!1,arrowIconName:"caret-alt-down"},g=e=>{let{size:t=ee.size,rounded:o=ee.rounded,fillMode:r=ee.fillMode,themeColor:a=ee.themeColor,showArrow:p=ee.showArrow,arrowIconName:c=ee.arrowIconName,variant:d,hover:f,focus:x,active:T,selected:E,disabled:O,icon:S,text:I,iconClassName:C,...k}=e,y=S!==void 0,R=e.children!==void 0;return qt("button",{...k,className:i(e.className,ve,kt(ve,d),v(ve,{size:t,rounded:o,fillMode:r,themeColor:a}),L(ve,{hover:f,focus:x,active:T,disabled:O,selected:E}),{"k-icon-button":!I&&!R&&y}),children:[S&&Ne(N,{className:i(C,"k-button-icon"),icon:S}),I?qt(kn,{children:[I&&Ne("span",{className:"k-button-text",children:I}),e.children]}):e.children&&Ne("span",{className:"k-button-text",children:e.children}),p&&Ne("span",{className:"k-menu-button-arrow k-button-arrow",children:Ne(N,{icon:c})})]})};g.states=Ln;g.options=On;g.variants=yn;g.className=ve;g.defaultOptions=ee;g.moduleName=lt;g.folderName=Jt;import{jsx as Cs}from"react/jsx-runtime";import{jsx as ys}from"react/jsx-runtime";import{jsx as gs}from"react/jsx-runtime";import{jsx as Us}from"react/jsx-runtime";var pt="avatar",Wt=pt;import{jsx as Qt}from"react/jsx-runtime";var be="k-avatar";var gn=[n.hover,n.focus,n.active,n.selected,n.disabled],wn={size:[s.small,s.medium,s.large],rounded:[m.small,m.medium,m.large,m.full],fillMode:[u.solid,u.flat,u.outline],themeColor:[l.base,l.primary,l.secondary,l.tertiary,l.success,l.warning,l.error,l.info,l.light,l.dark,l.inverse]},te={type:"text",size:s.medium,rounded:m.full,fillMode:u.solid,themeColor:l.primary,border:!1},U=e=>{let{size:t=te.size,rounded:o=te.rounded,fillMode:r=te.fillMode,themeColor:a=te.themeColor,type:p=te.type,border:c=te.border,...d}=e;return Qt("div",{...d,className:i(e.className,be,v(be,{size:t,rounded:o,fillMode:r,themeColor:a}),{[`${be}-bordered`]:c}),children:Qt("span",{className:`${be}-${p}`,children:e.children})})};U.states=gn;U.options=wn;U.className=be;U.defaultOptions=te;U.moduleName=pt;U.folderName=Wt;import{jsx as Qs}from"react/jsx-runtime";import{jsx as ea}from"react/jsx-runtime";import{jsx as ia}from"react/jsx-runtime";var Te="chip",ze=Te;import{jsx as se,jsxs as Kn}from"react/jsx-runtime";var De="k-chip",Rn=[n.hover,n.focus,n.active,n.selected,n.disabled],_n={size:[s.small,s.medium,s.large],rounded:[m.small,m.medium,m.large,m.full],fillMode:[u.solid,u.outline],themeColor:[l.base,l.success,l.warning,l.error,l.info]},ae={size:s.medium,rounded:m.medium,fillMode:u.solid,themeColor:l.base,avatarImage:"/packages/html/assets/avatar.jpg"},le=e=>{let{size:t=ae.size,rounded:o=ae.rounded,fillMode:r=ae.fillMode,themeColor:a=ae.themeColor,text:p,icon:c,actions:d,showAvatar:f,avatarImage:x=ae.avatarImage,hover:T,focus:E,active:O,selected:S,disabled:I,...C}=e;return Kn("div",{...C,className:i(e.className,De,v(De,{size:t,rounded:o,fillMode:r,themeColor:a}),L(De,{hover:T,focus:E,active:O,disabled:I,selected:S})),children:[c&&se(N,{className:"k-chip-icon",icon:c,size:"small"}),f&&se(U,{className:"k-chip-avatar",type:"image",children:se("img",{src:x})}),se("span",{className:"k-chip-content",children:e.children?e.children:p&&se("span",{className:"k-chip-label",children:p})}),d&&se("span",{className:"k-chip-actions",children:d})]})};le.states=Rn;le.options=_n;le.className=De;le.defaultOptions=ae;le.moduleName=Te;le.folderName=ze;import{jsx as zn}from"react/jsx-runtime";var ct="k-chip-list",Hn=[],Pn={size:[s.small,s.medium,s.large]},Zt={size:s.medium},F=e=>{let{size:t=Zt.size,...o}=e;return zn("div",{...o,className:i(e.className,ct,v(ct,{size:t})),children:e.children})};F.states=Hn;F.options=Pn;F.className=ct;F.defaultOptions=Zt;F.moduleName=Te;F.folderName=ze;import{jsx as Ma}from"react/jsx-runtime";import{jsx as La}from"react/jsx-runtime";import{jsx as wa}from"react/jsx-runtime";import{jsx as Pa}from"react/jsx-runtime";import{Fragment as Va,jsx as Fa,jsxs as Xa}from"react/jsx-runtime";var mt="popup",jt=mt;import{jsx as eo}from"react/jsx-runtime";var to="k-animation-container",Bn=[],Un={},oo={positionMode:"absolute"},_=e=>{let{positionMode:t=oo.positionMode,animationStyle:o,offset:r,...a}=e;return eo("div",{...a,style:{...r,...e.style},className:i(e.className,to,"k-animation-container-shown",{"k-animation-container-fixed":t==="fixed"}),children:eo("div",{className:"k-child-animation-container",style:o,children:e.children})})};_.states=Bn;_.options=Un;_.className=to;_.defaultOptions=oo;_.moduleName=mt;_.folderName=jt;var dt="popup",no=dt;import{jsx as io}from"react/jsx-runtime";var ro="k-popup",Fn=[],Vn={},so={positionMode:"absolute"},V=e=>{let{offset:t,positionMode:o=so.positionMode,animationStyle:r,...a}=e;return io(_,{positionMode:o,offset:t,animationStyle:r,children:io("div",{...a,className:i(e.className,ro),children:e.children})})};V.states=Fn;V.options=Vn;V.className=ro;V.defaultOptions=so;V.moduleName=dt;V.folderName=no;var ut="action-buttons",ao=ut;import{jsx as $n}from"react/jsx-runtime";var Ue="k-actions",Xn=[],Gn={},ft={alignment:"start",orientation:"horizontal"},X=e=>{let{alignment:t=ft.alignment,orientation:o=ft.orientation,...r}=e;return $n("div",{...r,className:i(Ue,{[`${Ue}-${t}`]:t,[`${Ue}-${o}`]:o},e.className),children:e.children})};X.states=Xn;X.options=Gn;X.className=Ue;X.defaultOptions=ft;X.moduleName=ut;X.folderName=ao;import{jsx as qn}from"react/jsx-runtime";var Jn="k-actionsheet-footer",lo={alignment:"stretched",orientation:"horizontal"},ht=e=>{let{alignment:t=lo.alignment,orientation:o=lo.orientation,template:r,as:a=r?"div":X,...p}=e;return qn(a,{...p,...!r&&{alignment:t,orientation:o},className:i(e.className,Jn),children:e.children})};var xt="searchbox",po=xt;import{jsx as Ee,jsxs as Yn}from"react/jsx-runtime";var co="k-searchbox",Wn=[n.hover,n.focus,n.valid,n.invalid,n.required,n.disabled,n.loading],Qn={size:[s.small,s.medium,s.large],rounded:[m.small,m.medium,m.large,m.full],fillMode:[u.solid,u.flat,u.outline]},Nt={showIcon:!0,icon:"search",size:A.defaultOptions.size,rounded:A.defaultOptions.rounded,fillMode:A.defaultOptions.fillMode},G=e=>{let{value:t,placeholder:o,size:r,rounded:a,fillMode:p,hover:c,focus:d,valid:f,invalid:x,required:T,loading:E,disabled:O,showIcon:S=Nt.showIcon,icon:I=Nt.icon,...C}=e;return Yn(A,{...C,size:r,rounded:a,fillMode:p,hover:c,focus:d,valid:f,invalid:x,required:T,loading:E,disabled:O,className:i(e.className,co),children:[S&&Ee(N,{className:"k-input-icon",icon:I}),Ee(j,{placeholder:o,value:t}),Ee(B,{...e}),Ee(z,{...e}),Ee(P,{...e})]})};G.states=Wn;G.options=Qn;G.className=co;G.defaultOptions=Nt;G.moduleName=xt;G.folderName=po;import{jsx as Pl}from"react/jsx-runtime";var vt="textbox",mo=vt;import{Fragment as uo,jsx as $,jsxs as bt}from"react/jsx-runtime";var fo="k-textbox",Zn=[n.hover,n.focus,n.valid,n.invalid,n.required,n.disabled,n.loading,n.readonly],jn={size:[s.small,s.medium,s.large],rounded:[m.small,m.medium,m.large,m.full],fillMode:[u.solid,u.flat,u.outline]},oe={showClearButton:!0,showValidationIcon:!0,size:A.defaultOptions.size,rounded:A.defaultOptions.rounded,fillMode:A.defaultOptions.fillMode,separators:!0},J=e=>{let{size:t=oe.size,rounded:o=oe.rounded,fillMode:r=oe.fillMode,separators:a=oe.separators,showClearButton:p=oe.showClearButton,showValidationIcon:c=oe.showValidationIcon,prefix:d,suffix:f,type:x,value:T,placeholder:E,hover:O,focus:S,valid:I,invalid:C,required:k,loading:y,disabled:R,readonly:H,...Z}=e;return bt(A,{...Z,size:t,rounded:o,fillMode:r,hover:O,focus:S,valid:I,invalid:C,required:k,loading:y,disabled:R,readonly:H,className:i(e.className,fo),children:[d&&bt(uo,{children:[$(He,{children:d}),a&&$(at,{})]}),$(j,{placeholder:E,value:T,type:x}),c&&$(z,{valid:I,invalid:C,loading:y,disabled:R}),$(B,{loading:y,disabled:R}),p&&$(P,{loading:y,disabled:R,readonly:H,value:T}),f&&bt(uo,{children:[a&&$(at,{}),$(Pe,{children:f})]})]})};J.states=Zn;J.options=jn;J.className=fo;J.defaultOptions=oe;J.moduleName=vt;J.folderName=mo;import{jsx as Ql}from"react/jsx-runtime";import{Fragment as op,jsx as tp}from"react/jsx-runtime";import{Fragment as pp,jsx as lp}from"react/jsx-runtime";import{jsx as q,jsxs as Tt}from"react/jsx-runtime";var xo="k-actionsheet-titlebar",ei={},W=e=>{let{title:t,subtitle:o,actionsStart:r,actionsEnd:a,filter:p,input:c,inputValue:d,inputPlaceholder:f,adaptive:x,children:T,...E}=e;return Tt("div",{...E,className:i(e.className,xo),children:[Tt("div",{className:"k-actionsheet-titlebar-group",children:[r&&q("div",{className:"k-actionsheet-actions",children:r}),!T&&Tt("div",{className:"k-actionsheet-title",children:[t&&q("div",{className:"k-text-center",children:t}),o&&q("div",{className:"k-actionsheet-subtitle k-text-center",children:o})]}),T&&q("div",{className:"k-actionsheet-title",children:T}),a&&q("div",{className:"k-actionsheet-actions",children:a})]}),(c||p)&&q("div",{className:"k-actionsheet-titlebar-group k-actionsheet-filter",children:c?q(J,{value:d,placeholder:f,size:x?"large":"medium"}):q(G,{placeholder:"Filter",size:x?"large":"medium"})})]})};W.className=xo;W.defaultOptions=ei;import{jsx as Et,jsxs as ii}from"react/jsx-runtime";var At="k-actionsheet-view",ti=[],oi={},ni={},pe=e=>{let{adaptive:t,animated:o,children:r,header:a,footer:p,...c}=e,d=a?.type===W&&Et(W,{adaptive:t,...a?.props}),f=p?.type===ht&&Et(ht,{...p?.props});return ii("div",{...c,className:i(e.className,At,{[`${At}-animated`]:o}),children:[d,Et("div",{className:"k-actionsheet-content",children:r}),f]})};pe.states=ti;pe.options=oi;pe.className=At;pe.defaultOptions=ni;var Ae="action-sheet",Fe=Ae;import{jsx as Ve,jsxs as ai}from"react/jsx-runtime";var No="k-actionsheet",ri=[],si={},Ce={side:"bottom",fullscreen:!1,adaptive:!1,overlay:!0},D=e=>{let{side:t=Ce.side,fullscreen:o=Ce.fullscreen,adaptive:r=Ce.adaptive,overlay:a=Ce.overlay,template:p,children:c,header:d,footer:f,...x}=e;return ai("div",{className:"k-actionsheet-container",children:[a&&Ve("div",{className:"k-overlay"}),Ve(_,{animationStyle:{[`${o===!0?"top":t}`]:0,[`${o===!0?"width":null}`]:"100%",[`${o===!0?"height":null}`]:"100%",[`${t==="top"||t==="bottom"?"width":null}`]:"100%",[`${t==="left"||t==="right"?"height":null}`]:"100%"},children:Ve("div",{...x,className:i(e.className,No,{[`k-actionsheet-${t}`]:o===!1,"k-actionsheet-fullscreen":o===!0,"k-adaptive-actionsheet":r}),children:p||Ve(pe,{header:d,footer:f,adaptive:r,...e,children:c})})})]})};D.states=ri;D.options=si;D.className=No;D.defaultOptions=Ce;D.moduleName=Ae;D.folderName=Fe;import{jsx as mi}from"react/jsx-runtime";var vo="k-actionsheet-container",li=[],pi={},ci={},ce=e=>{let{children:t,...o}=e;return mi("div",{...o,className:vo,children:t})};ce.states=li;ce.options=pi;ce.className=vo;ce.defaultOptions=ci;ce.moduleName=Ae;ce.folderName=Fe;import{jsx as zp}from"react/jsx-runtime";import{Fragment as ui,jsx as Me,jsxs as Ct}from"react/jsx-runtime";var Mt="k-actionsheet-item",di=[n.hover,n.focus,n.selected,n.disabled],St=e=>{let{iconName:t,text:o,description:r,hover:a,focus:p,selected:c,disabled:d,...f}=e;return Ct("span",{...f,className:i(e.className,Mt,L(Mt,{hover:a,focus:p,selected:c,disabled:d})),children:[!e.children&&Me(ui,{children:Ct("span",{className:"k-actionsheet-action",children:[t&&Me("span",{className:"k-icon-wrap",children:Me(N,{className:"k-actionsheet-item-icon",icon:t})}),Ct("span",{className:"k-actionsheet-item-text",children:[o&&Me("span",{className:"k-actionsheet-item-title",children:o}),r&&Me("span",{className:"k-actionsheet-item-description",children:r})]})]})}),e.children]})};St.states=di;St.className=Mt;import{jsx as Jp,jsxs as qp}from"react/jsx-runtime";import{jsx as Zp}from"react/jsx-runtime";import{jsx as oc}from"react/jsx-runtime";import{jsx as sc}from"react/jsx-runtime";var Se="treeview",Xe=Se;import{jsx as Ge}from"react/jsx-runtime";import{createElement as To}from"react";var It="k-treeview",fi=[],hi={size:[s.small,s.medium,s.large]},Eo={size:s.medium},w=e=>{let{size:t=Eo.size,children:o,dir:r,...a}=e,p=[];return o&&(Array.isArray(o)?o.map((c,d)=>{c.type===h&&p.push(To(h,{...c.props,dir:r,key:d})),c.type===M&&p.push(To(M,{...c.props,dir:r,key:d}))}):(o.type===h&&p.push(Ge(h,{...o.props,dir:r})),o.type===M&&p.push(Ge(M,{...o.props,dir:r})))),Ge("div",{...a,dir:r,className:i(e.className,It,v(It,{size:t})),children:Ge(M,{className:"k-treeview-lines",dir:r,children:p})})};w.states=fi;w.options=hi;w.className=It;w.defaultOptions=Eo;w.moduleName=Se;w.folderName=Xe;var ne="checkbox",me=ne;import{jsx as Ao}from"react/jsx-runtime";var $e="k-checkbox",xi=[n.hover,n.focus,n.valid,n.invalid,n.required,n.disabled,n.checked,n.indeterminate],Ni={size:[s.small,s.medium,s.large],rounded:[m.small,m.medium,m.large,m.full]},yt={size:s.medium,rounded:m.medium},K=e=>{let{id:t,checked:o,indeterminate:r,hover:a,focus:p,disabled:c,invalid:d,valid:f,required:x,size:T=yt.size,rounded:E=yt.rounded,...O}=e;return Ao("span",{className:"k-checkbox-wrap",children:Ao("input",{...O,id:t,type:"checkbox",defaultChecked:o,required:x,className:i(e.className,$e,v($e,{size:T,rounded:E}),L($e,{hover:a,focus:p,disabled:c,invalid:d,valid:f,indeterminate:r,checked:o}))})})};K.states=xi;K.options=Ni;K.className=$e;K.defaultOptions=yt;K.moduleName=ne;K.folderName=me;import{jsx as Ti}from"react/jsx-runtime";var Co="k-checkbox-list",vi=[],bi={},Mo={layout:"vertical"},Q=e=>{let{layout:t=Mo.layout,...o}=e;return Ti("ul",{...o,className:i(e.className,Co,{[`k-list-${t}`]:t}),children:e.children})};Q.states=vi;Q.options=bi;Q.className=Co;Q.defaultOptions=Mo;Q.moduleName=ne;Q.folderName=me;import{jsx as Mi}from"react/jsx-runtime";var So="k-checkbox-list-item",Ei=[],Ai={},Ci={},Y=e=>{let{...t}=e;return Mi("li",{...t,className:i(e.className,So),children:e.children})};Y.states=Ei;Y.options=Ai;Y.className=So;Y.defaultOptions=Ci;Y.moduleName=ne;Y.folderName=me;import{Fragment as Vc,jsx as Fc,jsxs as Xc}from"react/jsx-runtime";import{Fragment as Wc,jsx as qc,jsxs as Qc}from"react/jsx-runtime";import{Fragment as tm,jsx as em,jsxs as om}from"react/jsx-runtime";import{Fragment as am,jsx as sm,jsxs as lm}from"react/jsx-runtime";import{jsx as dm}from"react/jsx-runtime";import{jsx as xm}from"react/jsx-runtime";import{jsx as Io}from"react/jsx-runtime";import{createElement as Ii}from"react";var Si="k-treeview-group",M=e=>{let{children:t,dir:o}=e,r=[];return t&&(Array.isArray(t)?t.map((a,p)=>{a.type===Ie&&r.push(Ii(Ie,{...a.props,dir:o,key:p}))}):t.type===Ie&&r.push(Io(Ie,{...t.props,dir:o}))),Io("ul",{className:i(e.className,Si),children:r})};import{jsx as yo,jsxs as Oi}from"react/jsx-runtime";var Ot="k-treeview-leaf",yi=[n.hover,n.focus,n.selected],Li={},Je=e=>{let{text:t,showIcon:o,icon:r,hover:a,focus:p,selected:c,...d}=e;return Oi("span",{...d,className:i(e.className,Ot,L(Ot,{hover:a,focus:p,selected:c})),children:[o&&yo(N,{icon:r}),yo("span",{className:"k-treeview-leaf-text",children:t})]})};Je.states=yi;Je.options=Li;Je.className=Ot;var Lo=Je;import{Fragment as _i,jsx as de,jsxs as Oo}from"react/jsx-runtime";import{createElement as Ri}from"react";var ko="k-treeview-item",ki=[n.hover,n.focus,n.selected,n.disabled],gi={},wi={},h=e=>{let{leafClassName:t,children:o,hasChildren:r,expanded:a,text:p,showIcon:c,icon:d,showCheckbox:f,checked:x,hover:T,focus:E,selected:O,disabled:S,top:I,bottom:C,dir:k,...y}=e,R=r||o,H=[];return o&&(Array.isArray(o)?o.map((Z,We)=>{Z.type===M&&H.push(Ri(M,{...Z.props,dir:k,key:We},Z.props.children))}):o.type===M&&H.push(de(M,{...o.props,dir:k,children:o.props.children}))),Oo("li",{...y,className:i(e.className,ko),children:[Oo("span",{className:i({"k-treeview-top":I,"k-treeview-bot":C,"k-treeview-mid":!I&&!C}),children:[R&&de("span",{className:i("k-treeview-toggle",L("k-treeview-toggle",{disabled:S})),children:de(N,{icon:a?"caret-alt-down":k==="rtl"?"caret-alt-left":"caret-alt-right"})}),f&&de(K,{checked:x,disabled:S}),de(Lo,{className:i(t,L(t,{disabled:S})),text:p,showIcon:c,icon:d,hover:T,focus:E,selected:O})]}),a&&R&&de(_i,{children:H})]})};h.states=ki;h.options=gi;h.className=ko;h.defaultOptions=wi;h.moduleName=Se;h.folderName=Xe;var Ie=h;import{jsx as qm}from"react/jsx-runtime";import{jsx as Zm,jsxs as jm}from"react/jsx-runtime";import{jsx as nd,jsxs as id}from"react/jsx-runtime";import{jsx as ld,jsxs as pd}from"react/jsx-runtime";import{jsx as ud,jsxs as fd}from"react/jsx-runtime";var go="dropdown-tree",wo="dropdowntree";import{Fragment as Ro,jsx as b,jsxs as ye}from"react/jsx-runtime";var _o="k-multiselecttree",Ki=[n.hover,n.focus,n.valid,n.invalid,n.required,n.disabled,n.loading,n.readonly],Hi={size:[s.small,s.medium,s.large],rounded:[m.small,m.medium,m.large,m.full],fillMode:[u.solid,u.flat,u.outline]},qe={size:A.defaultOptions.size,rounded:A.defaultOptions.rounded,fillMode:A.defaultOptions.fillMode},ie=e=>{let{size:t=qe.size,rounded:o=qe.rounded,fillMode:r=qe.fillMode,prefix:a,suffix:p,placeholder:c,tags:d,popup:f,showArrowButton:x,hover:T,focus:E,valid:O,invalid:S,required:I,loading:C,disabled:k,readonly:y,opened:R,dir:H,adaptive:Z,adaptiveSettings:We,adaptiveTitle:Ko,adaptiveSubtitle:Ho,adaptiveFilter:Po,...zo}=e;return ye(Ro,{children:[ye(A,{...zo,dir:H,size:t,rounded:o,fillMode:r,hover:T,focus:E,valid:O,invalid:S,required:I,loading:C,disabled:k,readonly:y,className:i(e.className,_o),children:[b(He,{children:a}),b(F,{size:t,className:"k-input-values",children:b(Ro,{children:d})}),b("span",{className:"k-input-inner",children:!d&&b("span",{className:"k-input-value-text",children:c})}),b(z,{valid:O,invalid:S,loading:C,disabled:k}),b(B,{loading:C,disabled:k}),b(P,{loading:C,disabled:k,readonly:y,value:d?"value":""}),b(Pe,{children:p}),x&&b(g,{className:"k-input-button",icon:"caret-alt-down",rounded:null,size:t,fillMode:r})]}),R&&f&&b(V,{className:"k-multiselecttree-popup",dir:H,children:f}),Z&&b(D,{adaptive:!0,...We,header:b(W,{actionsEnd:b(g,{icon:"check",themeColor:"primary",size:"large",fillMode:"flat"}),filter:Po,inputPlaceholder:c,title:Ko,subtitle:Ho}),children:ye(w,{size:"large",children:[b(h,{top:!0,text:"Root 1"}),b(h,{text:"Root 2",expanded:!0,children:ye(M,{children:[b(h,{top:!0,text:"Child 2.1"}),b(h,{text:"Child 2.2",children:b(M,{children:b(h,{bottom:!0,text:"Child 2.2.1"})})}),b(h,{text:"Child 2.3"}),b(h,{bottom:!0,leafClassName:"k-treeview-load-more-button",text:"Load more ..."})]})}),b(h,{bottom:!0,text:"Root 3",children:ye(M,{children:[b(h,{top:!0,text:"Child 3.1"}),b(h,{text:"Child 3.2"}),b(h,{bottom:!0,text:"Child 3.3"})]})})]})})]})};ie.states=Ki;ie.options=Hi;ie.className=_o;ie.defaultOptions=qe;ie.moduleName=go;ie.folderName=wo;var Hd=ie;export{_o as MULTISELECTTREE_CLASSNAME,ie as MultiSelectTree,Hd as default};