UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

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