UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

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