UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

2 lines (1 loc) 25.5 kB
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 E=(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"}),y=(e,t)=>{let{valid:o,invalid:r,hover:s,focus:l,checked:p,active:m,selected:f,disabled:h,indeterminate:v,loading:I,empty:L,readonly:C,highlighted:M,...k}=t;return i({"k-valid":o,"k-invalid":r,"k-hover":s,"k-focus":l,"k-checked":p,"k-active":m,"k-selected":f,"k-disabled":h,"k-indeterminate":v&&!p,"k-loading":I,"k-empty":L,"k-readonly":C,"k-highlighted":M},Object.keys(k).reduce((w,S)=>(S.startsWith("k-")?w[S]=k[S]:w[`k-${S}`]=k[S],w),{}))};function Tt(e,t){if(!t)return{};let o=Array.isArray(t)?t:[t];return Object.fromEntries(o.map(r=>[`k-${r}`,!0]))}var a={xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},d={small:"small",medium:"medium",large:"large",full:"full"},x={solid:"solid",flat:"flat",outline:"outline",clear:"clear",link:"link"},c={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"};import{Fragment as Oo,jsx as Et}from"react/jsx-runtime";var Fe="k-font-icon",ko=[],wo={size:[a.xsmall,a.small,a.medium,a.large,a.xlarge,a.xxlarge,a.xxxlarge],themeColor:[c.base,c.primary,c.secondary,c.tertiary,c.success,c.warning,c.error,c.info,c.light,c.dark]},yo={},pe=e=>{let{size:t,themeColor:o,icon:r,rotate:s,flip:l,...p}=e;return r?Et("span",{...p,className:i(e.className,Fe,E(Fe,{size:t}),{[`k-i-${r}`]:r,[`k-color-${o}`]:o,[`k-rotate-${s}`]:s,"k-flip-h":l==="h"||l==="both","k-flip-v":l==="v"||l==="both"})}):Et(Oo,{})};pe.states=ko;pe.options=wo;pe.className=Fe;pe.defaultOptions=yo;var It=pe;import{Fragment as Ro,jsx as Se}from"react/jsx-runtime";var Ue="k-svg-icon",Lo=[],go={size:[a.xsmall,a.small,a.medium,a.large,a.xlarge,a.xxlarge,a.xxxlarge],themeColor:[c.base,c.primary,c.secondary,c.tertiary,c.success,c.warning,c.error,c.info,c.light,c.dark]},St={viewBox:"0 0 24 24"},ce=e=>{let{size:t,themeColor:o,rotate:r,flip:s,viewBox:l=St.viewBox,icon:p,...m}=e;if(!p)return Se(Ro,{});p==="none"&&{...m,className:i(e.className,Ue,"k-none")};let f=typeof p=="object"&&p.name&&p.name;return Se("span",{...m,className:i(e.className,Ue,E("k-icon",{size:t}),{[`k-svg-i-${f}`]:f,[`k-color-${o}`]:o,[`k-rotate-${r}`]:r,"k-flip-h":s==="h"||s==="both","k-flip-v":s==="v"||s==="both"}),children:Se("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof p=="object"?p.viewBox:l,dangerouslySetInnerHTML:typeof p=="object"?{__html:p.content}:void 0,children:p?void 0:e.children})})};ce.states=Lo;ce.options=go;ce.className=Ue;ce.defaultOptions=St;var Ve=ce;import*as Xe from"@progress/kendo-svg-icons";var Mt="icon",Ct="icons";import{Fragment as At,jsx as de}from"react/jsx-runtime";var Me="k-icon",_o=e=>e.replace(/([-_][a-z0-9])/gi,t=>t.toUpperCase().replace("-","").replace("_","")),Ko=[],Ho={size:[a.xsmall,a.small,a.medium,a.large,a.xlarge,a.xxlarge,a.xxxlarge],themeColor:[c.base,c.primary,c.secondary,c.tertiary,c.success,c.warning,c.error,c.info,c.light,c.dark]},Ge={viewBox:"0 0 24 24",type:"svg"},N=e=>{let{size:t,themeColor:o,icon:r,type:s=Ge.type,rotate:l,flip:p,viewBox:m=Ge.viewBox,...f}=e;if(!r)return de(At,{});if(s==="svg"){if(r==="none")return de(Ve,{...f,className:i(e.className,Me),icon:r,size:t});let h=Xe[r]?r:_o(`${r}-icon`);return Xe[h]?de(Ve,{...f,className:i(e.className,Me),icon:Xe[h],size:t,themeColor:o,rotate:l,flip:p,viewBox:m}):de(At,{})}return de(It,{...f,className:i(e.className,Me),icon:r,size:t,themeColor:o,rotate:l,flip:p})};N.states=Ko;N.options=Ho;N.defaultOptions=Ge;N.className=Me;N.moduleName=Mt;N.folderName=Ct;var $e="button",kt=$e;import{Fragment as Bo,jsx as me,jsxs as wt}from"react/jsx-runtime";var ue="k-button",Po=["icon-button"],zo=[n.hover,n.focus,n.active,n.selected,n.disabled,n.generating],Do={size:[a.small,a.medium,a.large],rounded:[d.small,d.medium,d.large,d.full],fillMode:[x.solid,x.flat,x.outline,x.clear,x.link],themeColor:[c.base,c.primary,c.secondary,c.tertiary,c.success,c.warning,c.error,c.info,c.light,c.dark,c.inverse]},Z={size:a.medium,rounded:d.medium,fillMode:x.solid,themeColor:c.base,showArrow:!1,arrowIconName:"caret-alt-down"},g=e=>{let{size:t=Z.size,rounded:o=Z.rounded,fillMode:r=Z.fillMode,themeColor:s=Z.themeColor,showArrow:l=Z.showArrow,arrowIconName:p=Z.arrowIconName,variant:m,hover:f,focus:h,active:v,selected:I,disabled:L,icon:C,text:M,iconClassName:k,...w}=e,S=C!==void 0,_=e.children!==void 0;return wt("button",{...w,className:i(e.className,ue,Tt(ue,m),E(ue,{size:t,rounded:o,fillMode:r,themeColor:s}),y(ue,{hover:f,focus:h,active:v,disabled:L,selected:I}),{"k-icon-button":!M&&!_&&S}),children:[C&&me(N,{className:i(k,"k-button-icon"),icon:C}),M?wt(Bo,{children:[M&&me("span",{className:"k-button-text",children:M}),e.children]}):e.children&&me("span",{className:"k-button-text",children:e.children}),l&&me("span",{className:"k-menu-button-arrow k-button-arrow",children:me(N,{icon:p})})]})};g.states=zo;g.options=Do;g.variants=Po;g.className=ue;g.defaultOptions=Z;g.moduleName=$e;g.folderName=kt;import{jsx as Qr}from"react/jsx-runtime";import{jsx as ei}from"react/jsx-runtime";import{jsx as ri}from"react/jsx-runtime";var fe="input",Ce=fe;import{jsx as Vo}from"react/jsx-runtime";var Ae="k-input",Fo=[n.hover,n.focus,n.valid,n.invalid,n.required,n.disabled,n.loading,n.readonly],Uo={size:[a.small,a.medium,a.large],rounded:[d.small,d.medium,d.large,d.full],fillMode:[x.solid,x.flat,x.outline]},ke={size:a.medium,rounded:a.medium,fillMode:x.solid},A=e=>{let{hover:t,focus:o,disabled:r,invalid:s,valid:l,loading:p,readonly:m,size:f=ke.size,rounded:h=ke.rounded,fillMode:v=ke.fillMode,...I}=e;return Vo("span",{...I,className:i(e.className,Ae,E(Ae,{size:f,rounded:h,fillMode:v}),y(Ae,{hover:t,focus:o,disabled:r,invalid:s,valid:l,loading:p,readonly:m}))})};A.states=Fo;A.options=Uo;A.className=Ae;A.defaultOptions=ke;A.moduleName=fe;A.folderName=Ce;import{jsx as $o}from"react/jsx-runtime";var we="k-picker",Xo=[n.hover,n.focus,n.valid,n.invalid,n.required,n.disabled,n.loading,n.readonly],Go={size:[a.small,a.medium,a.large],rounded:[d.small,d.medium,d.large,d.full],fillMode:[x.solid,x.flat,x.outline]},ye={size:a.medium,rounded:d.medium,fillMode:x.solid},F=e=>{let{hover:t,focus:o,disabled:r,invalid:s,valid:l,loading:p,readonly:m,size:f=ye.size,rounded:h=ye.rounded,fillMode:v=ye.fillMode,...I}=e;return $o("span",{...I,className:i(e.className,we,E(we,{size:f,rounded:h,fillMode:v}),y(we,{hover:t,focus:o,disabled:r,invalid:s,valid:l,loading:p,readonly:m})),children:e.children})};F.states=Xo;F.options=Go;F.className=we;F.defaultOptions=ye;F.moduleName=fe;F.folderName=Ce;import{Fragment as qo,jsx as Je}from"react/jsx-runtime";var yt="k-clear-value",Jo=[n.disabled,n.loading,n.readonly],Wo={},j=e=>{let{disabled:t,loading:o,readonly:r,value:s}=e;return t||r||o||!s?Je(qo,{}):Je("span",{className:i(e.className,yt),children:Je(N,{icon:"x"})})};j.states=Jo;j.options=Wo;j.className=yt;import{jsx as Zo}from"react/jsx-runtime";var We="k-input-inner",Qo=[],Yo={},Oe={type:"text",autocomplete:"off",value:"",placeholder:""},ee=e=>{let{value:t=Oe.value,type:o=Oe.type,placeholder:r=Oe.placeholder,autocomplete:s=Oe.autocomplete,...l}=e;return Zo("input",{...l,type:o,className:i(e.className,We,E(We,e)),placeholder:r,autoComplete:s,defaultValue:t})};ee.states=Qo;ee.options=Yo;ee.className=We;import{jsx as Ot,jsxs as tn}from"react/jsx-runtime";var qe="k-input-inner",jo=[],en={},xe=e=>{let{value:t,placeholder:o,showValue:r,valueIcon:s,valueIconName:l,...p}=e;return tn("span",{...p,className:i(e.className,qe,E(qe,e)),children:[s,!s&&l&&Ot(N,{className:"k-input-value-icon",icon:l}),r&&!t&&o,r&&t&&Ot("span",{className:"k-input-value-text",children:t})]})};xe.states=jo;xe.options=en;xe.className=qe;import{jsx as rn}from"react/jsx-runtime";var Qe="k-input-inner",on=[],nn={},Lt={value:"",placeholder:""},Ye=e=>{let{value:t=Lt.value,placeholder:o=Lt.placeholder,rows:r,...s}=e;return rn("textarea",{...s,className:i(e.className,Qe,E(Qe,e)),placeholder:o,rows:r,defaultValue:t})};Ye.states=on;Ye.options=nn;Ye.className=Qe;import{Fragment as an,jsx as gt}from"react/jsx-runtime";var Rt="k-input-loading-icon",sn=[n.disabled,n.loading],U=e=>{let{disabled:t,loading:o}=e;return t||!o?gt(an,{}):gt("span",{className:i(e.className,Rt,"k-icon k-i-loading")})};U.states=sn;U.className=Rt;import{Fragment as cn,jsx as _t}from"react/jsx-runtime";var Kt="k-input-validation-icon",ln=[n.valid,n.invalid,n.disabled,n.loading],pn={},D=e=>{let{valid:t,invalid:o,disabled:r,loading:s}=e,l=o?"warning-circle":"check-circle";return r||s||!!!(t||o)?_t(cn,{}):_t(N,{className:i(Kt),icon:l})};D.states=ln;D.options=pn;D.className=Kt;import{Fragment as un,jsx as Ht}from"react/jsx-runtime";var dn="k-input-prefix",mn={direction:"horizontal"},Le=e=>{let{direction:t=mn.direction,...o}=e;return e.children?Ht("span",{...o,className:i(dn,e.className,{[`k-input-prefix-${t}`]:t}),children:e.children}):Ht(un,{})};import{Fragment as hn,jsx as Pt}from"react/jsx-runtime";var fn="k-input-suffix",xn={direction:"horizontal"},ge=e=>{let{direction:t=xn.direction,...o}=e;return e.children?Pt("span",{...o,className:i(fn,e.className,{[`k-input-suffix-${t}`]:t}),children:e.children}):Pt(hn,{})};import{jsx as qi}from"react/jsx-runtime";import{jsx as ji}from"react/jsx-runtime";import{jsx as vn}from"react/jsx-runtime";var zt="k-input-separator",Nn={direction:"vertical"},Ze=e=>{let{direction:t=Nn.direction,...o}=e;return vn("span",{...o,className:i(zt,e.className,{[`${zt}-${t}`]:t})})};var je="popup",Dt=je;import{jsx as Bt}from"react/jsx-runtime";var Ft="k-animation-container",bn=[],Tn={},Ut={positionMode:"absolute"},K=e=>{let{positionMode:t=Ut.positionMode,animationStyle:o,offset:r,...s}=e;return Bt("div",{...s,style:{...r,...e.style},className:i(e.className,Ft,"k-animation-container-shown",{"k-animation-container-fixed":t==="fixed"}),children:Bt("div",{className:"k-child-animation-container",style:o,children:e.children})})};K.states=bn;K.options=Tn;K.className=Ft;K.defaultOptions=Ut;K.moduleName=je;K.folderName=Dt;var et="popup",Vt=et;import{jsx as Xt}from"react/jsx-runtime";var Gt="k-popup",En=[],In={},$t={positionMode:"absolute"},V=e=>{let{offset:t,positionMode:o=$t.positionMode,animationStyle:r,...s}=e;return Xt(K,{positionMode:o,offset:t,animationStyle:r,children:Xt("div",{...s,className:i(e.className,Gt),children:e.children})})};V.states=En;V.options=In;V.className=Gt;V.defaultOptions=$t;V.moduleName=et;V.folderName=Vt;var tt="action-buttons",Jt=tt;import{jsx as Cn}from"react/jsx-runtime";var Re="k-actions",Sn=[],Mn={},ot={alignment:"start",orientation:"horizontal"},X=e=>{let{alignment:t=ot.alignment,orientation:o=ot.orientation,...r}=e;return Cn("div",{...r,className:i(Re,{[`${Re}-${t}`]:t,[`${Re}-${o}`]:o},e.className),children:e.children})};X.states=Sn;X.options=Mn;X.className=Re;X.defaultOptions=ot;X.moduleName=tt;X.folderName=Jt;import{jsx as kn}from"react/jsx-runtime";var An="k-actionsheet-footer",Wt={alignment:"stretched",orientation:"horizontal"},nt=e=>{let{alignment:t=Wt.alignment,orientation:o=Wt.orientation,template:r,as:s=r?"div":X,...l}=e;return kn(s,{...l,...!r&&{alignment:t,orientation:o},className:i(e.className,An),children:e.children})};var rt="searchbox",qt=rt;import{jsx as he,jsxs as On}from"react/jsx-runtime";var Qt="k-searchbox",wn=[n.hover,n.focus,n.valid,n.invalid,n.required,n.disabled,n.loading],yn={size:[a.small,a.medium,a.large],rounded:[d.small,d.medium,d.large,d.full],fillMode:[x.solid,x.flat,x.outline]},it={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:s,fillMode:l,hover:p,focus:m,valid:f,invalid:h,required:v,loading:I,disabled:L,showIcon:C=it.showIcon,icon:M=it.icon,...k}=e;return On(A,{...k,size:r,rounded:s,fillMode:l,hover:p,focus:m,valid:f,invalid:h,required:v,loading:I,disabled:L,className:i(e.className,Qt),children:[C&&he(N,{className:"k-input-icon",icon:M}),he(ee,{placeholder:o,value:t}),he(U,{...e}),he(D,{...e}),he(j,{...e})]})};G.states=wn;G.options=yn;G.className=Qt;G.defaultOptions=it;G.moduleName=rt;G.folderName=qt;import{jsx as ea}from"react/jsx-runtime";var st="textbox",Yt=st;import{Fragment as Zt,jsx as $,jsxs as at}from"react/jsx-runtime";var jt="k-textbox",Ln=[n.hover,n.focus,n.valid,n.invalid,n.required,n.disabled,n.loading,n.readonly],gn={size:[a.small,a.medium,a.large],rounded:[d.small,d.medium,d.large,d.full],fillMode:[x.solid,x.flat,x.outline]},te={showClearButton:!0,showValidationIcon:!0,size:A.defaultOptions.size,rounded:A.defaultOptions.rounded,fillMode:A.defaultOptions.fillMode,separators:!0},H=e=>{let{size:t=te.size,rounded:o=te.rounded,fillMode:r=te.fillMode,separators:s=te.separators,showClearButton:l=te.showClearButton,showValidationIcon:p=te.showValidationIcon,prefix:m,suffix:f,type:h,value:v,placeholder:I,hover:L,focus:C,valid:M,invalid:k,required:w,loading:S,disabled:_,readonly:z,...Y}=e;return at(A,{...Y,size:t,rounded:o,fillMode:r,hover:L,focus:C,valid:M,invalid:k,required:w,loading:S,disabled:_,readonly:z,className:i(e.className,jt),children:[m&&at(Zt,{children:[$(Le,{children:m}),s&&$(Ze,{})]}),$(ee,{placeholder:I,value:v,type:h}),p&&$(D,{valid:M,invalid:k,loading:S,disabled:_}),$(U,{loading:S,disabled:_}),l&&$(j,{loading:S,disabled:_,readonly:z,value:v}),f&&at(Zt,{children:[s&&$(Ze,{}),$(ge,{children:f})]})]})};H.states=Ln;H.options=gn;H.className=jt;H.defaultOptions=te;H.moduleName=st;H.folderName=Yt;import{jsx as ua}from"react/jsx-runtime";import{Fragment as ba,jsx as va}from"react/jsx-runtime";import{Fragment as Aa,jsx as Ca}from"react/jsx-runtime";import{jsx as J,jsxs as lt}from"react/jsx-runtime";var to="k-actionsheet-titlebar",Rn={},W=e=>{let{title:t,subtitle:o,actionsStart:r,actionsEnd:s,filter:l,input:p,inputValue:m,inputPlaceholder:f,adaptive:h,children:v,...I}=e;return lt("div",{...I,className:i(e.className,to),children:[lt("div",{className:"k-actionsheet-titlebar-group",children:[r&&J("div",{className:"k-actionsheet-actions",children:r}),!v&&lt("div",{className:"k-actionsheet-title",children:[t&&J("div",{className:"k-text-center",children:t}),o&&J("div",{className:"k-actionsheet-subtitle k-text-center",children:o})]}),v&&J("div",{className:"k-actionsheet-title",children:v}),s&&J("div",{className:"k-actionsheet-actions",children:s})]}),(p||l)&&J("div",{className:"k-actionsheet-titlebar-group k-actionsheet-filter",children:p?J(H,{value:m,placeholder:f,size:h?"large":"medium"}):J(G,{placeholder:"Filter",size:h?"large":"medium"})})]})};W.className=to;W.defaultOptions=Rn;import{jsx as pt,jsxs as Pn}from"react/jsx-runtime";var ct="k-actionsheet-view",_n=[],Kn={},Hn={},re=e=>{let{adaptive:t,animated:o,children:r,header:s,footer:l,...p}=e,m=s?.type===W&&pt(W,{adaptive:t,...s?.props}),f=l?.type===nt&&pt(nt,{...l?.props});return Pn("div",{...p,className:i(e.className,ct,{[`${ct}-animated`]:o}),children:[m,pt("div",{className:"k-actionsheet-content",children:r}),f]})};re.states=_n;re.options=Kn;re.className=ct;re.defaultOptions=Hn;var Ne="action-sheet",_e=Ne;import{jsx as Ke,jsxs as Bn}from"react/jsx-runtime";var oo="k-actionsheet",zn=[],Dn={},ve={side:"bottom",fullscreen:!1,adaptive:!1,overlay:!0},B=e=>{let{side:t=ve.side,fullscreen:o=ve.fullscreen,adaptive:r=ve.adaptive,overlay:s=ve.overlay,template:l,children:p,header:m,footer:f,...h}=e;return Bn("div",{className:"k-actionsheet-container",children:[s&&Ke("div",{className:"k-overlay"}),Ke(K,{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:Ke("div",{...h,className:i(e.className,oo,{[`k-actionsheet-${t}`]:o===!1,"k-actionsheet-fullscreen":o===!0,"k-adaptive-actionsheet":r}),children:l||Ke(re,{header:m,footer:f,adaptive:r,...e,children:p})})})]})};B.states=zn;B.options=Dn;B.className=oo;B.defaultOptions=ve;B.moduleName=Ne;B.folderName=_e;import{jsx as Xn}from"react/jsx-runtime";var no="k-actionsheet-container",Fn=[],Un={},Vn={},ie=e=>{let{children:t,...o}=e;return Xn("div",{...o,className:no,children:t})};ie.states=Fn;ie.options=Un;ie.className=no;ie.defaultOptions=Vn;ie.moduleName=Ne;ie.folderName=_e;import{jsx as tl}from"react/jsx-runtime";import{Fragment as $n,jsx as be,jsxs as dt}from"react/jsx-runtime";var mt="k-actionsheet-item",Gn=[n.hover,n.focus,n.selected,n.disabled],ut=e=>{let{iconName:t,text:o,description:r,hover:s,focus:l,selected:p,disabled:m,...f}=e;return dt("span",{...f,className:i(e.className,mt,y(mt,{hover:s,focus:l,selected:p,disabled:m})),children:[!e.children&&be($n,{children:dt("span",{className:"k-actionsheet-action",children:[t&&be("span",{className:"k-icon-wrap",children:be(N,{className:"k-actionsheet-item-icon",icon:t})}),dt("span",{className:"k-actionsheet-item-text",children:[o&&be("span",{className:"k-actionsheet-item-title",children:o}),r&&be("span",{className:"k-actionsheet-item-description",children:r})]})]})}),e.children]})};ut.states=Gn;ut.className=mt;import{jsx as cl,jsxs as dl}from"react/jsx-runtime";import{jsx as xl}from"react/jsx-runtime";import{jsx as bl}from"react/jsx-runtime";import{jsx as Sl}from"react/jsx-runtime";var Te="treeview",He=Te;import{jsx as Pe}from"react/jsx-runtime";import{createElement as io}from"react";var ft="k-treeview",Jn=[],Wn={size:[a.small,a.medium,a.large]},so={size:a.medium},O=e=>{let{size:t=so.size,children:o,dir:r,...s}=e,l=[];return o&&(Array.isArray(o)?o.map((p,m)=>{p.type===u&&l.push(io(u,{...p.props,dir:r,key:m})),p.type===b&&l.push(io(b,{...p.props,dir:r,key:m}))}):(o.type===u&&l.push(Pe(u,{...o.props,dir:r})),o.type===b&&l.push(Pe(b,{...o.props,dir:r})))),Pe("div",{...s,dir:r,className:i(e.className,ft,E(ft,{size:t})),children:Pe(b,{className:"k-treeview-lines",dir:r,children:l})})};O.states=Jn;O.options=Wn;O.className=ft;O.defaultOptions=so;O.moduleName=Te;O.folderName=He;var oe="checkbox",se=oe;import{jsx as ao}from"react/jsx-runtime";var ze="k-checkbox",qn=[n.hover,n.focus,n.valid,n.invalid,n.required,n.disabled,n.checked,n.indeterminate],Qn={size:[a.small,a.medium,a.large],rounded:[d.small,d.medium,d.large,d.full]},xt={size:a.medium,rounded:d.medium},P=e=>{let{id:t,checked:o,indeterminate:r,hover:s,focus:l,disabled:p,invalid:m,valid:f,required:h,size:v=xt.size,rounded:I=xt.rounded,...L}=e;return ao("span",{className:"k-checkbox-wrap",children:ao("input",{...L,id:t,type:"checkbox",defaultChecked:o,required:h,className:i(e.className,ze,E(ze,{size:v,rounded:I}),y(ze,{hover:s,focus:l,disabled:p,invalid:m,valid:f,indeterminate:r,checked:o}))})})};P.states=qn;P.options=Qn;P.className=ze;P.defaultOptions=xt;P.moduleName=oe;P.folderName=se;import{jsx as jn}from"react/jsx-runtime";var lo="k-checkbox-list",Yn=[],Zn={},po={layout:"vertical"},q=e=>{let{layout:t=po.layout,...o}=e;return jn("ul",{...o,className:i(e.className,lo,{[`k-list-${t}`]:t}),children:e.children})};q.states=Yn;q.options=Zn;q.className=lo;q.defaultOptions=po;q.moduleName=oe;q.folderName=se;import{jsx as nr}from"react/jsx-runtime";var co="k-checkbox-list-item",er=[],tr={},or={},Q=e=>{let{...t}=e;return nr("li",{...t,className:i(e.className,co),children:e.children})};Q.states=er;Q.options=tr;Q.className=co;Q.defaultOptions=or;Q.moduleName=oe;Q.folderName=se;import{Fragment as sp,jsx as ip,jsxs as ap}from"react/jsx-runtime";import{Fragment as mp,jsx as dp,jsxs as up}from"react/jsx-runtime";import{Fragment as vp,jsx as Np,jsxs as bp}from"react/jsx-runtime";import{Fragment as Mp,jsx as Sp,jsxs as Cp}from"react/jsx-runtime";import{jsx as yp}from"react/jsx-runtime";import{jsx as Rp}from"react/jsx-runtime";import{jsx as mo}from"react/jsx-runtime";import{createElement as ir}from"react";var rr="k-treeview-group",b=e=>{let{children:t,dir:o}=e,r=[];return t&&(Array.isArray(t)?t.map((s,l)=>{s.type===Ee&&r.push(ir(Ee,{...s.props,dir:o,key:l}))}):t.type===Ee&&r.push(mo(Ee,{...t.props,dir:o}))),mo("ul",{className:i(e.className,rr),children:r})};import{jsx as uo,jsxs as lr}from"react/jsx-runtime";var Nt="k-treeview-leaf",sr=[n.hover,n.focus,n.selected],ar={},De=e=>{let{text:t,showIcon:o,icon:r,hover:s,focus:l,selected:p,...m}=e;return lr("span",{...m,className:i(e.className,Nt,y(Nt,{hover:s,focus:l,selected:p})),children:[o&&uo(N,{icon:r}),uo("span",{className:"k-treeview-leaf-text",children:t})]})};De.states=sr;De.options=ar;De.className=Nt;var fo=De;import{Fragment as ur,jsx as ae,jsxs as xo}from"react/jsx-runtime";import{createElement as mr}from"react";var ho="k-treeview-item",pr=[n.hover,n.focus,n.selected,n.disabled],cr={},dr={},u=e=>{let{leafClassName:t,children:o,hasChildren:r,expanded:s,text:l,showIcon:p,icon:m,showCheckbox:f,checked:h,hover:v,focus:I,selected:L,disabled:C,top:M,bottom:k,dir:w,...S}=e,_=r||o,z=[];return o&&(Array.isArray(o)?o.map((Y,Be)=>{Y.type===b&&z.push(mr(b,{...Y.props,dir:w,key:Be},Y.props.children))}):o.type===b&&z.push(ae(b,{...o.props,dir:w,children:o.props.children}))),xo("li",{...S,className:i(e.className,ho),children:[xo("span",{className:i({"k-treeview-top":M,"k-treeview-bot":k,"k-treeview-mid":!M&&!k}),children:[_&&ae("span",{className:i("k-treeview-toggle",y("k-treeview-toggle",{disabled:C})),children:ae(N,{icon:s?"caret-alt-down":w==="rtl"?"caret-alt-left":"caret-alt-right"})}),f&&ae(P,{checked:h,disabled:C}),ae(fo,{className:i(t,y(t,{disabled:C})),text:l,showIcon:p,icon:m,hover:v,focus:I,selected:L})]}),s&&_&&ae(ur,{children:z})]})};u.states=pr;u.options=cr;u.className=ho;u.defaultOptions=dr;u.moduleName=Te;u.folderName=He;var Ee=u;import{jsx as dc}from"react/jsx-runtime";import{jsx as xc,jsxs as hc}from"react/jsx-runtime";import{jsx as Tc,jsxs as Ec}from"react/jsx-runtime";import{jsx as Cc,jsxs as Ac}from"react/jsx-runtime";import{jsx as Oc,jsxs as Lc}from"react/jsx-runtime";var No="dropdown-tree",vo="dropdowntree";import{Fragment as hr,jsx as T,jsxs as Ie}from"react/jsx-runtime";var bo="k-dropdowntree",fr=[n.hover,n.focus,n.valid,n.invalid,n.required,n.disabled,n.loading,n.readonly],xr={size:[a.small,a.medium,a.large],rounded:[d.small,d.medium,d.large,d.full],fillMode:[x.solid,x.flat,x.outline]},le={showValue:!0,arrowIconName:"caret-alt-down",size:a.medium,rounded:d.medium,fillMode:x.solid},ne=e=>{let{size:t=le.size,rounded:o=le.rounded,fillMode:r=le.fillMode,arrowIconName:s=le.arrowIconName,showValue:l=le.showValue,valueIconName:p,prefix:m,suffix:f,value:h,placeholder:v,hover:I,focus:L,valid:C,invalid:M,required:k,loading:w,disabled:S,readonly:_,popup:z,opened:Y,adaptive:Be,adaptiveSettings:Io,adaptiveTitle:So,adaptiveSubtitle:Mo,adaptiveFilter:Co,dir:bt,...Ao}=e;return Ie(hr,{children:[Ie(F,{...Ao,dir:bt,size:t,rounded:o,fillMode:r,hover:I,focus:L,valid:C,invalid:M,required:k,loading:w,disabled:S,readonly:_,className:i(e.className,bo,{"k-icon-picker":!l&&p}),children:[T(Le,{children:m}),T(xe,{placeholder:v,value:h,showValue:l,valueIconName:p}),T(D,{valid:C,invalid:M,loading:w,disabled:S}),T(U,{loading:w,disabled:S}),T(ge,{children:f}),T(g,{className:"k-input-button",icon:s,rounded:null,size:e.size,fillMode:e.fillMode})]}),Y&&z&&T(V,{className:"k-list-container k-dropdowntree-popup",dir:bt,children:z}),Be&&T(B,{adaptive:!0,...Io,header:T(W,{actionsEnd:T(g,{icon:"check",themeColor:"primary",size:"large",fillMode:"flat"}),filter:Co,inputValue:h,inputPlaceholder:v,title:So,subtitle:Mo}),children:Ie(O,{size:"large",children:[T(u,{top:!0,text:"Root 1"}),T(u,{text:"Root 2",expanded:!0,children:Ie(b,{children:[T(u,{top:!0,text:"Child 2.1"}),T(u,{text:"Child 2.2",children:T(b,{children:T(u,{bottom:!0,text:"Child 2.2.1"})})}),T(u,{bottom:!0,text:"Child 2.3"})]})}),T(u,{bottom:!0,text:"Root 3",children:Ie(b,{children:[T(u,{top:!0,text:"Child 3.1"}),T(u,{text:"Child 3.2"}),T(u,{bottom:!0,text:"Child 3.3"})]})})]})})]})};ne.states=fr;ne.options=xr;ne.className=bo;ne.defaultOptions=le;ne.moduleName=No;ne.folderName=vo;var To=ne;import{Fragment as Eo,jsx as R,jsxs as vt}from"react/jsx-runtime";var rd=e=>R(To,{opened:!0,popup:vt(Eo,{children:[R("div",{className:"k-list-filter",children:R(H,{prefix:R(Eo,{children:R(N,{icon:"search"})})})}),vt(O,{dir:e.dir,children:[R(u,{top:!0,text:"Root 1"}),R(u,{bottom:!0,text:"Root 2",expanded:!0,children:vt(b,{children:[R(u,{top:!0,text:"Child 2.1",expanded:!0,children:R(b,{children:R(u,{bottom:!0,text:"Child 2.1.1"})})}),R(u,{text:"Child 2.2"}),R(u,{bottom:!0,leafClassName:"k-treeview-load-more-button",text:"Load more ..."})]})})]})]}),...e});export{rd as DropdownTreeFiltering};