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"}),T=(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 Yt,jsx as tt}from"react/jsx-runtime";var Ee="k-icon k-font-icon",Ut=[],Wt={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]},Qt={},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(Yt,{})};ie.states=Ut;ie.options=Wt;ie.className=Ee;ie.defaultOptions=Qt;var ot=ie;import{Fragment as eo,jsx as he}from"react/jsx-runtime";var Le="k-icon k-svg-icon",Zt=[],jt={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(eo,{});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=Zt;se.options=jt;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 to=e=>e.replace(/([-_][a-z0-9])/gi,t=>t.toUpperCase().replace("-","").replace("_","")),oo=[],no={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=to(`${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=oo;b.options=no;b.defaultOptions=Re;import{Fragment as ro,jsx as ae,jsxs as rt}from"react/jsx-runtime";var xe="k-button",io=[n.hover,n.focus,n.active,n.selected,n.disabled],so={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:y,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}),T(xe,{hover:m,focus:u,active:x,disabled:k,selected:v}),{"k-icon-button":!y&&!A&&E}),children:[C&&ae(b,{className:i(g,"k-button-icon"),icon:C}),y?rt(ro,{children:[y&&ae("span",{className:"k-button-text",children:y}),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=io;O.options=so;O.className=xe;O.defaultOptions=F;import{jsx as ci}from"react/jsx-runtime";import{jsx as ui}from"react/jsx-runtime";import{jsx as vi}from"react/jsx-runtime";import{jsx as co}from"react/jsx-runtime";var ve="k-input",ao=[n.hover,n.focus,n.valid,n.invalid,n.required,n.disabled,n.loading,n.readonly],lo={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 co("span",{...k,className:i(e.className,ve,S(ve,{size:u,rounded:x,fillMode:v}),T(ve,{hover:t,focus:o,disabled:s,invalid:a,valid:l,loading:c,readonly:m}))})};w.states=ao;w.options=lo;w.className=ve;w.defaultOptions=be;import{jsx as uo}from"react/jsx-runtime";var Ne="k-picker",po=[n.hover,n.focus,n.valid,n.invalid,n.required,n.disabled,n.loading,n.readonly],mo={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 uo("span",{...k,className:i(e.className,Ne,S(Ne,{size:u,rounded:x,fillMode:v}),T(Ne,{hover:t,focus:o,disabled:s,invalid:a,valid:l,loading:c,readonly:m})),children:e.children})};U.states=po;U.options=mo;U.className=Ne;U.defaultOptions=Se;import{Fragment as xo,jsx as ze}from"react/jsx-runtime";var at="k-clear-value",fo=[n.disabled,n.loading,n.readonly],ho={},X=e=>{let{disabled:t,loading:o,readonly:s,value:a}=e;return t||s||o||!a?ze(xo,{}):ze("span",{className:i(e.className,at),children:ze(b,{icon:"x"})})};X.states=fo;X.options=ho;X.className=at;import{jsx as No}from"react/jsx-runtime";var He="k-input-inner",vo=[],bo={},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 No("input",{...l,type:o,className:i(e.className,He,S(He,e)),placeholder:s,autoComplete:a,defaultValue:t})};J.states=vo;J.options=bo;J.className=He;import{jsx as lt,jsxs as ko}from"react/jsx-runtime";var Pe="k-input-inner",So=[],Io={},le=e=>{let{value:t,placeholder:o,showValue:s,valueIcon:a,valueIconName:l,...c}=e;return ko("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=So;le.options=Io;le.className=Pe;import{jsx as wo}from"react/jsx-runtime";var Ke="k-input-inner",yo=[],To={},ct={value:"",placeholder:""},Be=e=>{let{value:t=ct.value,placeholder:o=ct.placeholder,rows:s,...a}=e;return wo("textarea",{...a,className:i(e.className,Ke,S(Ke,e)),placeholder:o,rows:s,defaultValue:t})};Be.states=yo;Be.options=To;Be.className=Ke;import{Fragment as go,jsx as dt}from"react/jsx-runtime";var pt="k-input-loading-icon",Co=[n.disabled,n.loading],P=e=>{let{disabled:t,loading:o}=e;return t||!o?dt(go,{}):dt("span",{className:i(e.className,pt,"k-icon k-i-loading")})};P.states=Co;P.className=pt;import{Fragment as Eo,jsx as mt}from"react/jsx-runtime";var ut="k-input-validation-icon",Ao=[n.valid,n.invalid,n.disabled,n.loading],Mo={},H=e=>{let{valid:t,invalid:o,disabled:s,loading:a}=e,l=o?"warning-circle":"check-circle";return s||a||!!!(t||o)?mt(Eo,{}):mt(b,{className:i(ut),icon:l})};H.states=Ao;H.options=Mo;H.className=ut;import{Fragment as Ro,jsx as ft}from"react/jsx-runtime";var Lo="k-input-prefix",Oo={direction:"horizontal"},ke=e=>{let{direction:t=Oo.direction,...o}=e;return e.children?ft("span",{...o,className:i(Lo,e.className,{[`k-input-prefix-${t}`]:t}),children:e.children}):ft(Ro,{})};import{Fragment as Po,jsx as ht}from"react/jsx-runtime";var zo="k-input-suffix",Ho={direction:"horizontal"},ye=e=>{let{direction:t=Ho.direction,...o}=e;return e.children?ht("span",{...o,className:i(zo,e.className,{[`k-input-suffix-${t}`]:t}),children:e.children}):ht(Po,{})};import{jsx as ss}from"react/jsx-runtime";import{jsx as cs}from"react/jsx-runtime";import{jsx as Bo}from"react/jsx-runtime";var xt="k-input-separator",Ko={direction:"vertical"},Ve=e=>{let{direction:t=Ko.direction,...o}=e;return Bo("span",{...o,className:i(xt,e.className,{[`${xt}-${t}`]:t})})};import{jsx as vt}from"react/jsx-runtime";var bt="k-animation-container",Vo=[],Go={},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=Vo;K.options=Go;K.className=bt;K.defaultOptions=Nt;import{jsx as St}from"react/jsx-runtime";var It="k-popup",$o=[],_o={},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=_o;W.className=It;W.defaultOptions=kt;import{jsx as Jo}from"react/jsx-runtime";var Te="k-actions",Fo=[],Xo={},Ge={alignment:"start",orientation:"horizontal"},Q=e=>{let{alignment:t=Ge.alignment,orientation:o=Ge.orientation,...s}=e;return Jo("div",{...s,className:i(Te,{[`${Te}-${t}`]:t,[`${Te}-${o}`]:o},e.className),children:e.children})};Q.states=Fo;Q.options=Xo;Q.className=Te;Q.defaultOptions=Ge;import{jsx as qo}from"react/jsx-runtime";var Do="k-actionsheet-footer",yt={alignment:"stretched",orientation:"horizontal"},$e=e=>{let{alignment:t=yt.alignment,orientation:o=yt.orientation,template:s,as:a=s?"div":Q,...l}=e;return qo(a,{...l,...!s&&{alignment:t,orientation:o},className:i(e.className,Do),children:e.children})};import{jsx as ce,jsxs as Qo}from"react/jsx-runtime";var Tt="k-searchbox",Uo=[n.hover,n.focus,n.valid,n.invalid,n.required,n.disabled,n.loading],Wo={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:y=_e.showIcon,icon:g=_e.icon,...M}=e;return Qo(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,Tt),children:[y&&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=Uo;Y.options=Wo;Y.className=Tt;Y.defaultOptions=_e;import{jsx as or}from"react/jsx-runtime";import{Fragment as wt,jsx as B,jsxs as Fe}from"react/jsx-runtime";var Ct="k-textbox",Yo=[n.hover,n.focus,n.valid,n.invalid,n.required,n.disabled,n.loading,n.readonly],Zo={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:y,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:y,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(ye,{children:u})]})]})};Z.states=Yo;Z.options=Zo;Z.className=Ct;Z.defaultOptions=D;import{jsx as ur}from"react/jsx-runtime";import{Fragment as Nr,jsx as br}from"react/jsx-runtime";import{Fragment as Cr,jsx as wr}from"react/jsx-runtime";import{jsx as V,jsxs as Xe}from"react/jsx-runtime";var At="k-actionsheet-titlebar",jo={},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=jo;import{jsx as Je,jsxs as nn}from"react/jsx-runtime";var De="k-actionsheet-view",en=[],tn={},on={},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 nn("div",{...c,className:i(e.className,De,{[`${De}-animated`]:o}),children:[m,Je("div",{className:"k-actionsheet-content",children:s}),u]})};j.states=en;j.options=tn;j.className=De;j.defaultOptions=on;import{jsx as we,jsxs as an}from"react/jsx-runtime";var Mt="k-actionsheet",sn=[],rn={},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 an("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=sn;q.options=rn;q.className=Mt;q.defaultOptions=de;import{jsx as Qr}from"react/jsx-runtime";import{Fragment as cn,jsx as pe,jsxs as qe}from"react/jsx-runtime";var Ue="k-actionsheet-item",ln=[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,T(Ue,{hover:a,focus:l,selected:c,disabled:m})),children:[!e.children&&pe(cn,{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=ln;We.className=Ue;import{jsx as sa,jsxs as ra}from"react/jsx-runtime";import{jsx as da}from"react/jsx-runtime";import{jsx as fa}from"react/jsx-runtime";import{jsx as ba}from"react/jsx-runtime";import{jsx as Ce}from"react/jsx-runtime";import{createElement as Lt}from"react";var Qe="k-treeview",dn=[],pn={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=dn;L.options=pn;L.className=Qe;L.defaultOptions=Ot;import{jsx as Rt}from"react/jsx-runtime";var ge="k-checkbox",mn=[n.hover,n.focus,n.valid,n.invalid,n.required,n.disabled,n.checked,n.indeterminate],un={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}),T(ge,{hover:a,focus:l,disabled:c,invalid:m,valid:u,indeterminate:s,checked:o}))})})};$.states=mn;$.options=un;$.className=ge;$.defaultOptions=Ye;import{jsx as xn}from"react/jsx-runtime";var zt="k-checkbox-list",fn=[],hn={},Ht={layout:"vertical"},ee=e=>{let{layout:t=Ht.layout,...o}=e;return xn("ul",{...o,className:i(e.className,zt,{[`k-list-${t}`]:t}),children:e.children})};ee.states=fn;ee.options=hn;ee.className=zt;ee.defaultOptions=Ht;import{jsx as Sn}from"react/jsx-runtime";var Pt="k-checkbox-list-item",vn=[],bn={},Nn={},te=e=>{let{...t}=e;return Sn("li",{...t,className:i(e.className,Pt),children:e.children})};te.states=vn;te.options=bn;te.className=Pt;te.defaultOptions=Nn;import{Fragment as Ua,jsx as qa,jsxs as Wa}from"react/jsx-runtime";import{Fragment as el,jsx as ja,jsxs as tl}from"react/jsx-runtime";import{Fragment as rl,jsx as sl,jsxs as al}from"react/jsx-runtime";import{Fragment as ml,jsx as pl,jsxs as ul}from"react/jsx-runtime";import{jsx as vl}from"react/jsx-runtime";import{jsx as Il}from"react/jsx-runtime";import{jsx as Kt}from"react/jsx-runtime";import{createElement as kn}from"react";var In="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(kn(me,{...a.props,dir:o,key:l}))}):t.type===me&&s.push(Kt(me,{...t.props,dir:o}))),Kt("ul",{className:i(e.className,In),children:s})};import{jsx as Bt,jsxs as wn}from"react/jsx-runtime";var je="k-treeview-leaf",yn=[n.hover,n.focus,n.selected],Tn={},Ae=e=>{let{text:t,showIcon:o,icon:s,hover:a,focus:l,selected:c,...m}=e;return wn("span",{...m,className:i(e.className,je,T(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=Tn;Ae.className=je;var Vt=Ae;import{Fragment as En,jsx as oe,jsxs as Gt}from"react/jsx-runtime";import{createElement as Mn}from"react";var $t="k-treeview-item",Cn=[n.hover,n.focus,n.selected,n.disabled],gn={},An={},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:y,top:g,bottom:M,dir:E,...A}=e,R=s||o,z=[];return o&&(Array.isArray(o)?o.map((_,Me)=>{_.type===I&&z.push(Mn(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",T("k-treeview-toggle",{disabled:y})),children:oe(b,{icon:a?"caret-alt-down":E==="rtl"?"caret-alt-left":"caret-alt-right"})}),u&&oe($,{checked:x,disabled:y}),oe(Vt,{className:i(t,T(t,{disabled:y})),text:l,showIcon:c,icon:m,hover:v,focus:k,selected:C})]}),a&&R&&oe(En,{children:z})]})};h.states=Cn;h.options=gn;h.className=$t;h.defaultOptions=An;var me=h;import{jsx as Zl}from"react/jsx-runtime";import{jsx as oc,jsxs as nc}from"react/jsx-runtime";import{jsx as ac,jsxs as lc}from"react/jsx-runtime";import{jsx as mc,jsxs as uc}from"react/jsx-runtime";import{jsx as vc,jsxs as bc}from"react/jsx-runtime";import{Fragment as Rn,jsx as N,jsxs as ue}from"react/jsx-runtime";var _t="k-dropdowntree",Ln=[n.hover,n.focus,n.valid,n.invalid,n.required,n.disabled,n.loading,n.readonly],On={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:y,invalid:g,required:M,loading:E,disabled:A,readonly:R,popup:z,opened:_,adaptive:Me,adaptiveSettings:Ft,adaptiveTitle:Xt,adaptiveSubtitle:Jt,adaptiveFilter:Dt,dir:et,...qt}=e;return ue(Rn,{children:[ue(U,{...qt,dir:et,size:t,rounded:o,fillMode:s,hover:k,focus:C,valid:y,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:y,invalid:g,loading:E,disabled:A}),N(P,{loading:E,disabled:A}),N(ye,{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,...Ft,header:N(G,{actionsEnd:N(O,{icon:"check",themeColor:"primary",size:"large",fillMode:"flat"}),filter:Dt,inputValue:x,inputPlaceholder:v,title:Xt,subtitle:Jt}),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=Ln;fe.options=On;fe.className=_t;fe.defaultOptions=ne;var Kc=fe;export{_t as DROPDOWNTREE_CLASSNAME,fe as DropdownTree,Kc as default};