@progress/kendo-themes-html
Version:
A collection of HTML helpers used for developing Kendo UI themes
2 lines (1 loc) • 25 kB
JavaScript
var i=(...e)=>e.filter(t=>t!==!0&&!!t).map(t=>Array.isArray(t)?i(...t):typeof t=="object"?Object.keys(t).map((o,r)=>t[r]||t[o]&&o||null).filter(o=>o!==null).join(" "):t).filter(t=>!!t).join(" ");var 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"}),y=(e,t)=>{let{valid:o,invalid:r,hover:s,focus:l,checked:p,active:m,selected:u,disabled:h,indeterminate:v,loading:E,empty:O,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":O,"k-readonly":A,"k-highlighted":I},Object.keys(k).reduce((w,M)=>(M.startsWith("k-")?w[M]=k[M]:w[`k-${M}`]=k[M],w),{}))};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 ko,jsx as bt}from"react/jsx-runtime";var Be="k-font-icon",Io=[],Ao={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]},Co={},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(ko,{})};le.states=Io;le.options=Ao;le.className=Be;le.defaultOptions=Co;var Tt=le;import{Fragment as Oo,jsx as Se}from"react/jsx-runtime";var Fe="k-svg-icon",wo=[],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=wo;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",Lo=e=>e.replace(/([-_][a-z0-9])/gi,t=>t.toUpperCase().replace("-","").replace("_","")),go=[],Ro={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:Lo(`${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=go;N.options=Ro;N.defaultOptions=Xe;N.className=Me;N.moduleName=St;N.folderName=Mt;var Ge="button",At=Ge;import{Fragment as Po,jsx as de,jsxs as Ct}from"react/jsx-runtime";var me="k-button",_o=["icon-button"],Ko=[n.hover,n.focus,n.active,n.selected,n.disabled,n.generating],Ho={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:O,icon:A,text:I,iconClassName:k,...w}=e,M=A!==void 0,R=e.children!==void 0;return Ct("button",{...w,className:i(e.className,me,vt(me,m),T(me,{size:t,rounded:o,fillMode:r,themeColor:s}),y(me,{hover:u,focus:h,active:v,disabled:O,selected:E}),{"k-icon-button":!I&&!R&&M}),children:[A&&de(N,{className:i(k,"k-button-icon"),icon:A}),I?Ct(Po,{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=Ko;L.options=Ho;L.variants=_o;L.className=me;L.defaultOptions=Y;L.moduleName=Ge;L.folderName=At;import{jsx as Wr}from"react/jsx-runtime";import{jsx as Zr}from"react/jsx-runtime";import{jsx as oi}from"react/jsx-runtime";var ue="input",Ie=ue;import{jsx as Bo}from"react/jsx-runtime";var Ae="k-input",zo=[n.hover,n.focus,n.valid,n.invalid,n.required,n.disabled,n.loading,n.readonly],Do={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 Bo("span",{...E,className:i(e.className,Ae,T(Ae,{size:u,rounded:h,fillMode:v}),y(Ae,{hover:t,focus:o,disabled:r,invalid:s,valid:l,loading:p,readonly:m}))})};C.states=zo;C.options=Do;C.className=Ae;C.defaultOptions=Ce;C.moduleName=ue;C.folderName=Ie;import{jsx as Vo}from"react/jsx-runtime";var ke="k-picker",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:[f.solid,f.flat,f.outline]},we={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=we.size,rounded:h=we.rounded,fillMode:v=we.fillMode,...E}=e;return Vo("span",{...E,className:i(e.className,ke,T(ke,{size:u,rounded:h,fillMode:v}),y(ke,{hover:t,focus:o,disabled:r,invalid:s,valid:l,loading:p,readonly:m})),children:e.children})};D.states=Fo;D.options=Uo;D.className=ke;D.defaultOptions=we;D.moduleName=ue;D.folderName=Ie;import{Fragment as $o,jsx as $e}from"react/jsx-runtime";var kt="k-clear-value",Xo=[n.disabled,n.loading,n.readonly],Go={},Z=e=>{let{disabled:t,loading:o,readonly:r,value:s}=e;return t||r||o||!s?$e($o,{}):$e("span",{className:i(e.className,kt),children:$e(N,{icon:"x"})})};Z.states=Xo;Z.options=Go;Z.className=kt;import{jsx as qo}from"react/jsx-runtime";var Je="k-input-inner",Jo=[],Wo={},ye={type:"text",autocomplete:"off",value:"",placeholder:""},j=e=>{let{value:t=ye.value,type:o=ye.type,placeholder:r=ye.placeholder,autocomplete:s=ye.autocomplete,...l}=e;return qo("input",{...l,type:o,className:i(e.className,Je,T(Je,e)),placeholder:r,autoComplete:s,defaultValue:t})};j.states=Jo;j.options=Wo;j.className=Je;import{jsx as wt,jsxs as Zo}from"react/jsx-runtime";var We="k-input-inner",Qo=[],Yo={},fe=e=>{let{value:t,placeholder:o,showValue:r,valueIcon:s,valueIconName:l,...p}=e;return Zo("span",{...p,className:i(e.className,We,T(We,e)),children:[s,!s&&l&&wt(N,{className:"k-input-value-icon",icon:l}),r&&!t&&o,r&&t&&wt("span",{className:"k-input-value-text",children:t})]})};fe.states=Qo;fe.options=Yo;fe.className=We;import{jsx as tn}from"react/jsx-runtime";var qe="k-input-inner",jo=[],en={},yt={value:"",placeholder:""},Qe=e=>{let{value:t=yt.value,placeholder:o=yt.placeholder,rows:r,...s}=e;return tn("textarea",{...s,className:i(e.className,qe,T(qe,e)),placeholder:o,rows:r,defaultValue:t})};Qe.states=jo;Qe.options=en;Qe.className=qe;import{Fragment as nn,jsx as Ot}from"react/jsx-runtime";var Lt="k-input-loading-icon",on=[n.disabled,n.loading],B=e=>{let{disabled:t,loading:o}=e;return t||!o?Ot(nn,{}):Ot("span",{className:i(e.className,Lt,"k-icon k-i-loading")})};B.states=on;B.className=Lt;import{Fragment as an,jsx as gt}from"react/jsx-runtime";var Rt="k-input-validation-icon",rn=[n.valid,n.invalid,n.disabled,n.loading],sn={},P=e=>{let{valid:t,invalid:o,disabled:r,loading:s}=e,l=o?"warning-circle":"check-circle";return r||s||!!!(t||o)?gt(an,{}):gt(N,{className:i(Rt),icon:l})};P.states=rn;P.options=sn;P.className=Rt;import{Fragment as cn,jsx as _t}from"react/jsx-runtime";var ln="k-input-prefix",pn={direction:"horizontal"},Oe=e=>{let{direction:t=pn.direction,...o}=e;return e.children?_t("span",{...o,className:i(ln,e.className,{[`k-input-prefix-${t}`]:t}),children:e.children}):_t(cn,{})};import{Fragment as un,jsx as Kt}from"react/jsx-runtime";var dn="k-input-suffix",mn={direction:"horizontal"},Le=e=>{let{direction:t=mn.direction,...o}=e;return e.children?Kt("span",{...o,className:i(dn,e.className,{[`k-input-suffix-${t}`]:t}),children:e.children}):Kt(un,{})};import{jsx as Ji}from"react/jsx-runtime";import{jsx as Yi}from"react/jsx-runtime";import{jsx as xn}from"react/jsx-runtime";var Ht="k-input-separator",fn={direction:"vertical"},Ye=e=>{let{direction:t=fn.direction,...o}=e;return xn("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",hn=[],Nn={},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=hn;_.options=Nn;_.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",vn=[],bn={},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=vn;F.options=bn;F.className=Vt;F.defaultOptions=Xt;F.moduleName=je;F.folderName=Ft;var et="action-buttons",Gt=et;import{jsx as Sn}from"react/jsx-runtime";var ge="k-actions",Tn=[],En={},tt={alignment:"start",orientation:"horizontal"},U=e=>{let{alignment:t=tt.alignment,orientation:o=tt.orientation,...r}=e;return Sn("div",{...r,className:i(ge,{[`${ge}-${t}`]:t,[`${ge}-${o}`]:o},e.className),children:e.children})};U.states=Tn;U.options=En;U.className=ge;U.defaultOptions=tt;U.moduleName=et;U.folderName=Gt;import{jsx as In}from"react/jsx-runtime";var Mn="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 In(s,{...l,...!r&&{alignment:t,orientation:o},className:i(e.className,Mn),children:e.children})};var nt="searchbox",Jt=nt;import{jsx as xe,jsxs as kn}from"react/jsx-runtime";var Wt="k-searchbox",An=[n.hover,n.focus,n.valid,n.invalid,n.required,n.disabled,n.loading],Cn={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:O,showIcon:A=rt.showIcon,icon:I=rt.icon,...k}=e;return kn(C,{...k,size:r,rounded:s,fillMode:l,hover:p,focus:m,valid:u,invalid:h,required:v,loading:E,disabled:O,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=An;V.options=Cn;V.className=Wt;V.defaultOptions=rt;V.moduleName=nt;V.folderName=Jt;import{jsx as Zs}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",wn=[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:O,focus:A,valid:I,invalid:k,required:w,loading:M,disabled:R,readonly:H,...Q}=e;return st(C,{...Q,size:t,rounded:o,fillMode:r,hover:O,focus:A,valid:I,invalid:k,required:w,loading:M,disabled:R,readonly:H,className:i(e.className,Yt),children:[m&&st(Qt,{children:[X(Oe,{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=wn;G.options=yn;G.className=Yt;G.defaultOptions=ee;G.moduleName=it;G.folderName=qt;import{jsx as da}from"react/jsx-runtime";import{Fragment as Na,jsx as ha}from"react/jsx-runtime";import{Fragment as Ia,jsx as Ma}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 _n}from"react/jsx-runtime";var pt="k-actionsheet-view",Ln=[],gn={},Rn={},ne=e=>{let{adaptive:t,animated:o,children:r,header:s,footer:l,...p}=e,m=s?.type===J&<(J,{adaptive:t,...s?.props}),u=l?.type===ot&<(ot,{...l?.props});return _n("div",{...p,className:i(e.className,pt,{[`${pt}-animated`]:o}),children:[m,lt("div",{className:"k-actionsheet-content",children:r}),u]})};ne.states=Ln;ne.options=gn;ne.className=pt;ne.defaultOptions=Rn;var he="action-sheet",Re=he;import{jsx as _e,jsxs as Pn}from"react/jsx-runtime";var eo="k-actionsheet",Kn=[],Hn={},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 Pn("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=Kn;z.options=Hn;z.className=eo;z.defaultOptions=Ne;z.moduleName=he;z.folderName=Re;import{jsx as Fn}from"react/jsx-runtime";var to="k-actionsheet-container",zn=[],Dn={},Bn={},re=e=>{let{children:t,...o}=e;return Fn("div",{...o,className:to,children:t})};re.states=zn;re.options=Dn;re.className=to;re.defaultOptions=Bn;re.moduleName=he;re.folderName=Re;import{jsx as ja}from"react/jsx-runtime";import{Fragment as Vn,jsx as ve,jsxs as ct}from"react/jsx-runtime";var dt="k-actionsheet-item",Un=[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,y(dt,{hover:s,focus:l,selected:p,disabled:m})),children:[!e.children&&ve(Vn,{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=Un;mt.className=dt;import{jsx as ll,jsxs as pl}from"react/jsx-runtime";import{jsx as ul}from"react/jsx-runtime";import{jsx as Nl}from"react/jsx-runtime";import{jsx as El}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",Xn=[],Gn={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=Xn;g.options=Gn;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",$n=[n.hover,n.focus,n.valid,n.invalid,n.required,n.disabled,n.checked,n.indeterminate],Jn={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,...O}=e;return io("span",{className:"k-checkbox-wrap",children:io("input",{...O,id:t,type:"checkbox",defaultChecked:o,required:h,className:i(e.className,Pe,T(Pe,{size:v,rounded:E}),y(Pe,{hover:s,focus:l,disabled:p,invalid:m,valid:u,indeterminate:r,checked:o}))})})};K.states=$n;K.options=Jn;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",Wn=[],qn={},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=Wn;W.options=qn;W.className=so;W.defaultOptions=ao;W.moduleName=te;W.folderName=ie;import{jsx as er}from"react/jsx-runtime";var lo="k-checkbox-list-item",Yn=[],Zn={},jn={},q=e=>{let{...t}=e;return er("li",{...t,className:i(e.className,lo),children:e.children})};q.states=Yn;q.options=Zn;q.className=lo;q.defaultOptions=jn;q.moduleName=te;q.folderName=ie;import{Fragment as rp,jsx as np,jsxs as ip}from"react/jsx-runtime";import{Fragment as cp,jsx as pp,jsxs as dp}from"react/jsx-runtime";import{Fragment as hp,jsx as xp,jsxs as Np}from"react/jsx-runtime";import{Fragment as Sp,jsx as Ep,jsxs as Mp}from"react/jsx-runtime";import{jsx as kp}from"react/jsx-runtime";import{jsx as Lp}from"react/jsx-runtime";import{jsx as po}from"react/jsx-runtime";import{createElement as or}from"react";var tr="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(or(Te,{...s.props,dir:o,key:l}))}):t.type===Te&&r.push(po(Te,{...t.props,dir:o}))),po("ul",{className:i(e.className,tr),children:r})};import{jsx as co,jsxs as ir}from"react/jsx-runtime";var ht="k-treeview-leaf",nr=[n.hover,n.focus,n.selected],rr={},ze=e=>{let{text:t,showIcon:o,icon:r,hover:s,focus:l,selected:p,...m}=e;return ir("span",{...m,className:i(e.className,ht,y(ht,{hover:s,focus:l,selected:p})),children:[o&&co(N,{icon:r}),co("span",{className:"k-treeview-leaf-text",children:t})]})};ze.states=nr;ze.options=rr;ze.className=ht;var mo=ze;import{Fragment as cr,jsx as se,jsxs as uo}from"react/jsx-runtime";import{createElement as pr}from"react";var fo="k-treeview-item",sr=[n.hover,n.focus,n.selected,n.disabled],ar={},lr={},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:O,disabled:A,top:I,bottom:k,dir:w,...M}=e,R=r||o,H=[];return o&&(Array.isArray(o)?o.map((Q,De)=>{Q.type===S&&H.push(pr(S,{...Q.props,dir:w,key:De},Q.props.children))}):o.type===S&&H.push(se(S,{...o.props,dir:w,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",y("k-treeview-toggle",{disabled:A})),children:se(N,{icon:s?"caret-alt-down":w==="rtl"?"caret-alt-left":"caret-alt-right"})}),u&&se(K,{checked:h,disabled:A}),se(mo,{className:i(t,y(t,{disabled:A})),text:l,showIcon:p,icon:m,hover:v,focus:E,selected:O})]}),s&&R&&se(cr,{children:H})]})};x.states=sr;x.options=ar;x.className=fo;x.defaultOptions=lr;x.moduleName=be;x.folderName=Ke;var Te=x;import{jsx as pc}from"react/jsx-runtime";import{jsx as uc,jsxs as fc}from"react/jsx-runtime";import{jsx as vc,jsxs as bc}from"react/jsx-runtime";import{jsx as Mc,jsxs as Ic}from"react/jsx-runtime";import{jsx as wc,jsxs as yc}from"react/jsx-runtime";var xo="dropdown-tree",ho="dropdowntree";import{Fragment as ur,jsx as b,jsxs as Ee}from"react/jsx-runtime";var No="k-dropdowntree",dr=[n.hover,n.focus,n.valid,n.invalid,n.required,n.disabled,n.loading,n.readonly],mr={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:O,valid:A,invalid:I,required:k,loading:w,disabled:M,readonly:R,popup:H,opened:Q,adaptive:De,adaptiveSettings:bo,adaptiveTitle:To,adaptiveSubtitle:Eo,adaptiveFilter:So,dir:Nt,...Mo}=e;return Ee(ur,{children:[Ee(D,{...Mo,dir:Nt,size:t,rounded:o,fillMode:r,hover:E,focus:O,valid:A,invalid:I,required:k,loading:w,disabled:M,readonly:R,className:i(e.className,No,{"k-icon-picker":!l&&p}),children:[b(Oe,{children:m}),b(fe,{placeholder:v,value:h,showValue:l,valueIconName:p}),b(P,{valid:A,invalid:I,loading:w,disabled:M}),b(B,{loading:w,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,...bo,header:b(J,{actionsEnd:b(L,{icon:"check",themeColor:"primary",size:"large",fillMode:"flat"}),filter:So,inputValue:h,inputPlaceholder:v,title:To,subtitle:Eo}),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=dr;oe.options=mr;oe.className=No;oe.defaultOptions=ae;oe.moduleName=xo;oe.folderName=ho;var vo=oe;import{jsx as fr}from"react/jsx-runtime";var jc=e=>fr(vo,{adaptive:!0,...e});export{jc as DropdownTreeAdaptive};