UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

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