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