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