UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

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