UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

2 lines (1 loc) 26.3 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 x=(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"}),k=(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 a={xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},d={small:"small",medium:"medium",large:"large",full:"full"},u={solid:"solid",flat:"flat",outline:"outline",clear:"clear",link:"link"},r={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{jsx as lo}from"react/jsx-runtime";var be="k-input",ao=[n.hover,n.focus,n.valid,n.invalid,n.required,n.disabled,n.loading,n.readonly],ro={size:[a.small,a.medium,a.large],rounded:[d.small,d.medium,d.large,d.full],fillMode:[u.solid,u.flat,u.outline]},Ne={size:a.medium,rounded:a.medium,fillMode:u.solid},C=e=>{let{hover:t,focus:o,disabled:s,invalid:l,valid:c,loading:p,readonly:m,size:f=Ne.size,rounded:b=Ne.rounded,fillMode:S=Ne.fillMode,...y}=e;return lo("span",{...y,className:i(e.className,be,x(be,{size:f,rounded:b,fillMode:S}),k(be,{hover:t,focus:o,disabled:s,invalid:l,valid:c,loading:p,readonly:m}))})};C.states=ao;C.options=ro;C.className=be;C.defaultOptions=Ne;import{jsx as mo}from"react/jsx-runtime";var Se="k-picker",co=[n.hover,n.focus,n.valid,n.invalid,n.required,n.disabled,n.loading,n.readonly],po={size:[a.small,a.medium,a.large],rounded:[d.small,d.medium,d.large,d.full],fillMode:[u.solid,u.flat,u.outline]},ye={size:a.medium,rounded:d.medium,fillMode:u.solid},Ce=e=>{let{hover:t,focus:o,disabled:s,invalid:l,valid:c,loading:p,readonly:m,size:f=ye.size,rounded:b=ye.rounded,fillMode:S=ye.fillMode,...y}=e;return mo("span",{...y,className:i(e.className,Se,x(Se,{size:f,rounded:b,fillMode:S}),k(Se,{hover:t,focus:o,disabled:s,invalid:l,valid:c,loading:p,readonly:m})),children:e.children})};Ce.states=co;Ce.options=po;Ce.className=Se;Ce.defaultOptions=ye;import{Fragment as xo,jsx as pt}from"react/jsx-runtime";var Be="k-icon k-font-icon",uo=[],fo={size:[a.xsmall,a.small,a.medium,a.large,a.xlarge,a.xxlarge,a.xxxlarge],themeColor:[r.base,r.primary,r.secondary,r.tertiary,r.success,r.warning,r.error,r.info,r.light,r.dark]},ho={},re=e=>{let{size:t,themeColor:o,icon:s,rotate:l,flip:c,...p}=e;return s?pt("span",{...p,className:i(e.className,Be,x(Be,{size:t}),{[`k-i-${s}`]:s,[`k-color-${o}`]:o,[`k-rotate-${l}`]:l,"k-flip-h":c==="h"||c==="both","k-flip-v":c==="v"||c==="both"})}):pt(xo,{})};re.states=uo;re.options=fo;re.className=Be;re.defaultOptions=ho;var dt=re;import{Fragment as No,jsx as Ie}from"react/jsx-runtime";var Ve="k-icon k-svg-icon",vo=[],bo={size:[a.xsmall,a.small,a.medium,a.large,a.xlarge,a.xxlarge,a.xxxlarge],themeColor:[r.base,r.primary,r.secondary,r.tertiary,r.success,r.warning,r.error,r.info,r.light,r.dark]},mt={viewBox:"0 0 24 24"},le=e=>{let{size:t,themeColor:o,rotate:s,flip:l,viewBox:c=mt.viewBox,icon:p,...m}=e;if(!p)return Ie(No,{});p==="none"&&{...m,className:i(e.className,Ve,"k-none")};let f=typeof p=="object"&&p.name&&p.name;return Ie("span",{...m,className:i(e.className,Ve,x("k-icon",{size:t}),{[`k-svg-i-${f}`]:f,[`k-color-${o}`]:o,[`k-rotate-${s}`]:s,"k-flip-h":l==="h"||l==="both","k-flip-v":l==="v"||l==="both"}),children:Ie("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof p=="object"?p.viewBox:c,dangerouslySetInnerHTML:typeof p=="object"?{__html:p.content}:void 0,children:p?void 0:e.children})})};le.states=vo;le.options=bo;le.className=Ve;le.defaultOptions=mt;var Ge=le;import*as ut from"@progress/kendo-svg-icons";import{Fragment as ft,jsx as ce}from"react/jsx-runtime";var So=e=>e.replace(/([-_][a-z0-9])/gi,t=>t.toUpperCase().replace("-","").replace("_","")),yo=[],Co={size:[a.xsmall,a.small,a.medium,a.large,a.xlarge,a.xxlarge,a.xxxlarge],themeColor:[r.base,r.primary,r.secondary,r.tertiary,r.success,r.warning,r.error,r.info,r.light,r.dark]},$e={viewBox:"0 0 24 24",type:"svg"},N=e=>{let{size:t,themeColor:o,icon:s,type:l=$e.type,rotate:c,flip:p,viewBox:m=$e.viewBox,...f}=e;if(!s)return ce(ft,{});if(l==="svg"){if(s==="none")return ce(Ge,{...f,icon:s,size:t});let b=So(`${s}-icon`);return ut[b]?ce(Ge,{...f,icon:ut[b],size:t,themeColor:o,rotate:c,flip:p,viewBox:m}):ce(ft,{})}return ce(dt,{...f,icon:s,size:t,themeColor:o,rotate:c,flip:p})};N.states=yo;N.options=Co;N.defaultOptions=$e;import{Fragment as ko,jsx as _e}from"react/jsx-runtime";var ht="k-clear-value",Io=[n.disabled,n.loading,n.readonly],To={},K=e=>{let{disabled:t,loading:o,readonly:s,value:l}=e;return t||s||o||!l?_e(ko,{}):_e("span",{className:i(e.className,ht),children:_e(N,{icon:"x"})})};K.states=Io;K.options=To;K.className=ht;import{jsx as Ao}from"react/jsx-runtime";var Xe="k-input-inner",go=[],wo={},Te={type:"text",autocomplete:"off",value:"",placeholder:""},F=e=>{let{value:t=Te.value,type:o=Te.type,placeholder:s=Te.placeholder,autocomplete:l=Te.autocomplete,...c}=e;return Ao("input",{...c,type:o,className:i(e.className,Xe,x(Xe,e)),placeholder:s,autoComplete:l,defaultValue:t})};F.states=go;F.options=wo;F.className=Xe;import{jsx as xt,jsxs as Lo}from"react/jsx-runtime";var Fe="k-input-inner",Mo=[],Eo={},Je=e=>{let{value:t,placeholder:o,showValue:s,valueIcon:l,valueIconName:c,...p}=e;return Lo("span",{...p,className:i(e.className,Fe,x(Fe,e)),children:[l,!l&&c&&xt(N,{className:"k-input-value-icon",icon:c}),s&&!t&&o,s&&t&&xt("span",{className:"k-input-value-text",children:t})]})};Je.states=Mo;Je.options=Eo;Je.className=Fe;import{jsx as Ro}from"react/jsx-runtime";var qe="k-input-inner",zo=[],Oo={},vt={value:"",placeholder:""},De=e=>{let{value:t=vt.value,placeholder:o=vt.placeholder,rows:s,...l}=e;return Ro("textarea",{...l,className:i(e.className,qe,x(qe,e)),placeholder:o,rows:s,defaultValue:t})};De.states=zo;De.options=Oo;De.className=qe;import{Fragment as Ho,jsx as bt}from"react/jsx-runtime";var Nt="k-input-loading-icon",Ko=[n.disabled,n.loading],P=e=>{let{disabled:t,loading:o}=e;return t||!o?bt(Ho,{}):bt("span",{className:i(e.className,Nt,"k-icon k-i-loading")})};P.states=Ko;P.className=Nt;import{Fragment as Vo,jsx as St}from"react/jsx-runtime";var yt="k-input-validation-icon",Po=[n.valid,n.invalid,n.disabled,n.loading],Bo={},H=e=>{let{valid:t,invalid:o,disabled:s,loading:l}=e,c=o?"warning-circle":"check-circle";return s||l||!!!(t||o)?St(Vo,{}):St(N,{className:i(yt),icon:c})};H.states=Po;H.options=Bo;H.className=yt;import{Fragment as _o,jsx as Ct}from"react/jsx-runtime";var Go="k-input-prefix",$o={direction:"horizontal"},ke=e=>{let{direction:t=$o.direction,...o}=e;return e.children?Ct("span",{...o,className:i(Go,e.className,{[`k-input-prefix-${t}`]:t}),children:e.children}):Ct(_o,{})};import{Fragment as Jo,jsx as It}from"react/jsx-runtime";var Xo="k-input-suffix",Fo={direction:"horizontal"},ge=e=>{let{direction:t=Fo.direction,...o}=e;return e.children?It("span",{...o,className:i(Xo,e.className,{[`k-input-suffix-${t}`]:t}),children:e.children}):It(Jo,{})};import{jsx as is}from"react/jsx-runtime";import{jsx as ls}from"react/jsx-runtime";import{jsx as Do}from"react/jsx-runtime";var Tt="k-input-separator",qo={direction:"vertical"},Ue=e=>{let{direction:t=qo.direction,...o}=e;return Do("span",{...o,className:i(Tt,e.className,{[`${Tt}-${t}`]:t})})};import{Fragment as Qo,jsx as pe,jsxs as kt}from"react/jsx-runtime";var we="k-button",Uo=[n.hover,n.focus,n.active,n.selected,n.disabled],Wo={size:[a.small,a.medium,a.large],rounded:[d.small,d.medium,d.large,d.full],fillMode:[u.solid,u.flat,u.outline,u.clear,u.link],themeColor:[r.base,r.primary,r.secondary,r.tertiary,r.success,r.warning,r.error,r.info,r.light,r.dark,r.inverse]},J={size:a.medium,rounded:d.medium,fillMode:u.solid,themeColor:r.base,showArrow:!1,arrowIconName:"caret-alt-down"},z=e=>{let{size:t=J.size,rounded:o=J.rounded,fillMode:s=J.fillMode,themeColor:l=J.themeColor,showArrow:c=J.showArrow,arrowIconName:p=J.arrowIconName,hover:m,focus:f,active:b,selected:S,disabled:y,icon:g,text:T,iconClassName:A,...w}=e,M=g!==void 0,E=e.children!==void 0;return kt("button",{...w,className:i(e.className,we,x(we,{size:t,rounded:o,fillMode:s,themeColor:l}),k(we,{hover:m,focus:f,active:b,disabled:y,selected:S}),{"k-icon-button":!T&&!E&&M}),children:[g&&pe(N,{className:i(A,"k-button-icon"),icon:g}),T?kt(Qo,{children:[T&&pe("span",{className:"k-button-text",children:T}),e.children]}):e.children&&pe("span",{className:"k-button-text",children:e.children}),c&&pe("span",{className:"k-menu-button-arrow k-button-arrow",children:pe(N,{icon:p})})]})};z.states=Uo;z.options=Wo;z.className=we;z.defaultOptions=J;import{jsx as Os}from"react/jsx-runtime";import{jsx as Ps}from"react/jsx-runtime";import{jsx as $s}from"react/jsx-runtime";import{jsx as Ys}from"react/jsx-runtime";import{jsx as gt}from"react/jsx-runtime";var de="k-avatar";var Yo=[n.hover,n.focus,n.active,n.selected,n.disabled],Zo={size:[a.small,a.medium,a.large],rounded:[d.small,d.medium,d.large,d.full],fillMode:[u.solid,u.flat,u.outline],themeColor:[r.base,r.primary,r.secondary,r.tertiary,r.success,r.warning,r.error,r.info,r.light,r.dark,r.inverse]},q={type:"text",size:a.medium,rounded:d.full,fillMode:u.solid,themeColor:r.primary,border:!1},W=e=>{let{size:t=q.size,rounded:o=q.rounded,fillMode:s=q.fillMode,themeColor:l=q.themeColor,type:c=q.type,border:p=q.border,...m}=e;return gt("div",{...m,className:i(e.className,de,x(de,{size:t,rounded:o,fillMode:s,themeColor:l}),{[`${de}-bordered`]:p}),children:gt("span",{className:`${de}-${c}`,children:e.children})})};W.states=Yo;W.options=Zo;W.className=de;W.defaultOptions=q;import{jsx as ia}from"react/jsx-runtime";import{jsx as la}from"react/jsx-runtime";import{jsx as ma}from"react/jsx-runtime";import{jsx as Q,jsxs as tn}from"react/jsx-runtime";var Ae="k-chip",jo=[n.hover,n.focus,n.active,n.selected,n.disabled],en={size:[a.small,a.medium,a.large],rounded:[d.small,d.medium,d.large,d.full],fillMode:[u.solid,u.outline],themeColor:[r.base,r.success,r.warning,r.error,r.info]},Y={size:a.medium,rounded:d.medium,fillMode:u.solid,themeColor:r.base,avatarImage:"/packages/html/assets/avatar.jpg"},Me=e=>{let{size:t=Y.size,rounded:o=Y.rounded,fillMode:s=Y.fillMode,themeColor:l=Y.themeColor,text:c,icon:p,actions:m,showAvatar:f,avatarImage:b=Y.avatarImage,hover:S,focus:y,active:g,selected:T,disabled:A,...w}=e;return tn("div",{...w,className:i(e.className,Ae,x(Ae,{size:t,rounded:o,fillMode:s,themeColor:l}),k(Ae,{hover:S,focus:y,active:g,disabled:A,selected:T})),children:[p&&Q(N,{className:"k-chip-icon",icon:p,size:"small"}),f&&Q(W,{className:"k-chip-avatar",type:"image",children:Q("img",{src:b})}),Q("span",{className:"k-chip-content",children:e.children?e.children:c&&Q("span",{className:"k-chip-label",children:c})}),m&&Q("span",{className:"k-chip-actions",children:m})]})};Me.states=jo;Me.options=en;Me.className=Ae;Me.defaultOptions=Y;import{jsx as sn}from"react/jsx-runtime";var We="k-chip-list",on=[],nn={size:[a.small,a.medium,a.large]},At={size:a.medium},Z=e=>{let{size:t=At.size,...o}=e;return sn("div",{...o,className:i(e.className,We,x(We,{size:t})),children:e.children})};Z.states=on;Z.options=nn;Z.className=We;Z.defaultOptions=At;import{jsx as Ma}from"react/jsx-runtime";import{jsx as Oa}from"react/jsx-runtime";import{jsx as Pa}from"react/jsx-runtime";import{jsx as _a}from"react/jsx-runtime";import{Fragment as Ua,jsx as Da,jsxs as Wa}from"react/jsx-runtime";import{jsx as Mt}from"react/jsx-runtime";var Et="k-animation-container",rn=[],ln={},Lt={positionMode:"absolute"},B=e=>{let{positionMode:t=Lt.positionMode,animationStyle:o,offset:s,...l}=e;return Mt("div",{...l,style:{...s,...e.style},className:i(e.className,Et,"k-animation-container-shown",{"k-animation-container-fixed":t==="fixed"}),children:Mt("div",{className:"k-child-animation-container",style:o,children:e.children})})};B.states=rn;B.options=ln;B.className=Et;B.defaultOptions=Lt;import{jsx as zt}from"react/jsx-runtime";var Ot="k-popup",cn=[],pn={},Rt={positionMode:"absolute"},j=e=>{let{offset:t,positionMode:o=Rt.positionMode,animationStyle:s,...l}=e;return zt(B,{positionMode:o,offset:t,animationStyle:s,children:zt("div",{...l,className:i(e.className,Ot),children:e.children})})};j.states=cn;j.options=pn;j.className=Ot;j.defaultOptions=Rt;import{jsx as un}from"react/jsx-runtime";var Le="k-actions",dn=[],mn={},Qe={alignment:"start",orientation:"horizontal"},ee=e=>{let{alignment:t=Qe.alignment,orientation:o=Qe.orientation,...s}=e;return un("div",{...s,className:i(Le,{[`${Le}-${t}`]:t,[`${Le}-${o}`]:o},e.className),children:e.children})};ee.states=dn;ee.options=mn;ee.className=Le;ee.defaultOptions=Qe;import{jsx as hn}from"react/jsx-runtime";var fn="k-actionsheet-footer",Kt={alignment:"stretched",orientation:"horizontal"},Ye=e=>{let{alignment:t=Kt.alignment,orientation:o=Kt.orientation,template:s,as:l=s?"div":ee,...c}=e;return hn(l,{...c,...!s&&{alignment:t,orientation:o},className:i(e.className,fn),children:e.children})};import{jsx as me,jsxs as bn}from"react/jsx-runtime";var Ht="k-searchbox",xn=[n.hover,n.focus,n.valid,n.invalid,n.required,n.disabled,n.loading],vn={size:[a.small,a.medium,a.large],rounded:[d.small,d.medium,d.large,d.full],fillMode:[u.solid,u.flat,u.outline]},Ze={showIcon:!0,icon:"search",size:C.defaultOptions.size,rounded:C.defaultOptions.rounded,fillMode:C.defaultOptions.fillMode},te=e=>{let{value:t,placeholder:o,size:s,rounded:l,fillMode:c,hover:p,focus:m,valid:f,invalid:b,required:S,loading:y,disabled:g,showIcon:T=Ze.showIcon,icon:A=Ze.icon,...w}=e;return bn(C,{...w,size:s,rounded:l,fillMode:c,hover:p,focus:m,valid:f,invalid:b,required:S,loading:y,disabled:g,className:i(e.className,Ht),children:[T&&me(N,{className:"k-input-icon",icon:A}),me(F,{placeholder:o,value:t}),me(P,{...e}),me(H,{...e}),me(K,{...e})]})};te.states=xn;te.options=vn;te.className=Ht;te.defaultOptions=Ze;import{jsx as Rr}from"react/jsx-runtime";import{Fragment as Pt,jsx as V,jsxs as je}from"react/jsx-runtime";var Bt="k-textbox",Nn=[n.hover,n.focus,n.valid,n.invalid,n.required,n.disabled,n.loading,n.readonly],Sn={size:[a.small,a.medium,a.large],rounded:[d.small,d.medium,d.large,d.full],fillMode:[u.solid,u.flat,u.outline]},D={showClearButton:!0,showValidationIcon:!0,size:C.defaultOptions.size,rounded:C.defaultOptions.rounded,fillMode:C.defaultOptions.fillMode,separators:!0},oe=e=>{let{size:t=D.size,rounded:o=D.rounded,fillMode:s=D.fillMode,separators:l=D.separators,showClearButton:c=D.showClearButton,showValidationIcon:p=D.showValidationIcon,prefix:m,suffix:f,type:b,value:S,placeholder:y,hover:g,focus:T,valid:A,invalid:w,required:M,loading:E,disabled:O,readonly:R,...X}=e;return je(C,{...X,size:t,rounded:o,fillMode:s,hover:g,focus:T,valid:A,invalid:w,required:M,loading:E,disabled:O,readonly:R,className:i(e.className,Bt),children:[m&&je(Pt,{children:[V(ke,{children:m}),l&&V(Ue,{})]}),V(F,{placeholder:y,value:S,type:b}),p&&V(H,{valid:A,invalid:w,loading:E,disabled:O}),V(P,{loading:E,disabled:O}),c&&V(K,{loading:E,disabled:O,readonly:R,value:S}),f&&je(Pt,{children:[l&&V(Ue,{}),V(ge,{children:f})]})]})};oe.states=Nn;oe.options=Sn;oe.className=Bt;oe.defaultOptions=D;import{jsx as Jr}from"react/jsx-runtime";import{Fragment as Yr,jsx as Qr}from"react/jsx-runtime";import{Fragment as il,jsx as nl}from"react/jsx-runtime";import{jsx as G,jsxs as et}from"react/jsx-runtime";var Gt="k-actionsheet-titlebar",yn={},$=e=>{let{title:t,subtitle:o,actionsStart:s,actionsEnd:l,filter:c,input:p,inputValue:m,inputPlaceholder:f,adaptive:b,children:S,...y}=e;return et("div",{...y,className:i(e.className,Gt),children:[et("div",{className:"k-actionsheet-titlebar-group",children:[s&&G("div",{className:"k-actionsheet-actions",children:s}),!S&&et("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})]}),S&&G("div",{className:"k-actionsheet-title",children:S}),l&&G("div",{className:"k-actionsheet-actions",children:l})]}),(p||c)&&G("div",{className:"k-actionsheet-titlebar-group k-actionsheet-filter",children:p?G(oe,{value:m,placeholder:f,size:b?"large":"medium"}):G(te,{placeholder:"Filter",size:b?"large":"medium"})})]})};$.className=Gt;$.defaultOptions=yn;import{jsx as tt,jsxs as kn}from"react/jsx-runtime";var ot="k-actionsheet-view",Cn=[],In={},Tn={},ne=e=>{let{adaptive:t,animated:o,children:s,header:l,footer:c,...p}=e,m=l?.type===$&&tt($,{adaptive:t,...l?.props}),f=c?.type===Ye&&tt(Ye,{...c?.props});return kn("div",{...p,className:i(e.className,ot,{[`${ot}-animated`]:o}),children:[m,tt("div",{className:"k-actionsheet-content",children:s}),f]})};ne.states=Cn;ne.options=In;ne.className=ot;ne.defaultOptions=Tn;import{jsx as ze,jsxs as An}from"react/jsx-runtime";var $t="k-actionsheet",gn=[],wn={},ue={side:"bottom",fullscreen:!1,adaptive:!1,overlay:!0},U=e=>{let{side:t=ue.side,fullscreen:o=ue.fullscreen,adaptive:s=ue.adaptive,overlay:l=ue.overlay,template:c,children:p,header:m,footer:f,...b}=e;return An("div",{className:"k-actionsheet-container",children:[l&&ze("div",{className:"k-overlay"}),ze(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:ze("div",{...b,className:i(e.className,$t,{[`k-actionsheet-${t}`]:o===!1,"k-actionsheet-fullscreen":o===!0,"k-adaptive-actionsheet":s}),children:c||ze(ne,{header:m,footer:f,adaptive:s,...e,children:p})})})]})};U.states=gn;U.options=wn;U.className=$t;U.defaultOptions=ue;import{jsx as Al}from"react/jsx-runtime";import{Fragment as En,jsx as fe,jsxs as nt}from"react/jsx-runtime";var it="k-actionsheet-item",Mn=[n.hover,n.focus,n.selected,n.disabled],st=e=>{let{iconName:t,text:o,description:s,hover:l,focus:c,selected:p,disabled:m,...f}=e;return nt("span",{...f,className:i(e.className,it,k(it,{hover:l,focus:c,selected:p,disabled:m})),children:[!e.children&&fe(En,{children:nt("span",{className:"k-actionsheet-action",children:[t&&fe("span",{className:"k-icon-wrap",children:fe(N,{className:"k-actionsheet-item-icon",icon:t})}),nt("span",{className:"k-actionsheet-item-text",children:[o&&fe("span",{className:"k-actionsheet-item-title",children:o}),s&&fe("span",{className:"k-actionsheet-item-description",children:s})]})]})}),e.children]})};st.states=Mn;st.className=it;import{jsx as Pl,jsxs as Bl}from"react/jsx-runtime";import{jsx as _l}from"react/jsx-runtime";import{jsx as ql}from"react/jsx-runtime";import{jsx as Ql}from"react/jsx-runtime";import{jsx as Oe}from"react/jsx-runtime";import{createElement as Xt}from"react";var at="k-treeview",Ln=[],zn={size:[a.small,a.medium,a.large]},Ft={size:a.medium},L=e=>{let{size:t=Ft.size,children:o,dir:s,...l}=e,c=[];return o&&(Array.isArray(o)?o.map((p,m)=>{p.type===h&&c.push(Xt(h,{...p.props,dir:s,key:m})),p.type===I&&c.push(Xt(I,{...p.props,dir:s,key:m}))}):(o.type===h&&c.push(Oe(h,{...o.props,dir:s})),o.type===I&&c.push(Oe(I,{...o.props,dir:s})))),Oe("div",{...l,dir:s,className:i(e.className,at,x(at,{size:t})),children:Oe(I,{className:"k-treeview-lines",dir:s,children:c})})};L.states=Ln;L.options=zn;L.className=at;L.defaultOptions=Ft;import{jsx as Jt}from"react/jsx-runtime";var Re="k-checkbox",On=[n.hover,n.focus,n.valid,n.invalid,n.required,n.disabled,n.checked,n.indeterminate],Rn={size:[a.small,a.medium,a.large],rounded:[d.small,d.medium,d.large,d.full]},rt={size:a.medium,rounded:d.medium},_=e=>{let{id:t,checked:o,indeterminate:s,hover:l,focus:c,disabled:p,invalid:m,valid:f,required:b,size:S=rt.size,rounded:y=rt.rounded,...g}=e;return Jt("span",{className:"k-checkbox-wrap",children:Jt("input",{...g,id:t,type:"checkbox",defaultChecked:o,required:b,className:i(e.className,Re,x(Re,{size:S,rounded:y}),k(Re,{hover:l,focus:c,disabled:p,invalid:m,valid:f,indeterminate:s,checked:o}))})})};_.states=On;_.options=Rn;_.className=Re;_.defaultOptions=rt;import{jsx as Pn}from"react/jsx-runtime";var qt="k-checkbox-list",Kn=[],Hn={},Dt={layout:"vertical"},ie=e=>{let{layout:t=Dt.layout,...o}=e;return Pn("ul",{...o,className:i(e.className,qt,{[`k-list-${t}`]:t}),children:e.children})};ie.states=Kn;ie.options=Hn;ie.className=qt;ie.defaultOptions=Dt;import{jsx as $n}from"react/jsx-runtime";var Ut="k-checkbox-list-item",Bn=[],Vn={},Gn={},se=e=>{let{...t}=e;return $n("li",{...t,className:i(e.className,Ut),children:e.children})};se.states=Bn;se.options=Vn;se.className=Ut;se.defaultOptions=Gn;import{Fragment as gc,jsx as kc,jsxs as wc}from"react/jsx-runtime";import{Fragment as zc,jsx as Lc,jsxs as Oc}from"react/jsx-runtime";import{Fragment as Bc,jsx as Pc,jsxs as Vc}from"react/jsx-runtime";import{Fragment as Fc,jsx as Xc,jsxs as Jc}from"react/jsx-runtime";import{jsx as Wc}from"react/jsx-runtime";import{jsx as jc}from"react/jsx-runtime";import{jsx as Wt}from"react/jsx-runtime";import{createElement as Xn}from"react";var _n="k-treeview-group",I=e=>{let{children:t,dir:o}=e,s=[];return t&&(Array.isArray(t)?t.map((l,c)=>{l.type===he&&s.push(Xn(he,{...l.props,dir:o,key:c}))}):t.type===he&&s.push(Wt(he,{...t.props,dir:o}))),Wt("ul",{className:i(e.className,_n),children:s})};import{jsx as Qt,jsxs as qn}from"react/jsx-runtime";var ct="k-treeview-leaf",Fn=[n.hover,n.focus,n.selected],Jn={},Ke=e=>{let{text:t,showIcon:o,icon:s,hover:l,focus:c,selected:p,...m}=e;return qn("span",{...m,className:i(e.className,ct,k(ct,{hover:l,focus:c,selected:p})),children:[o&&Qt(N,{icon:s}),Qt("span",{className:"k-treeview-leaf-text",children:t})]})};Ke.states=Fn;Ke.options=Jn;Ke.className=ct;var Yt=Ke;import{Fragment as Yn,jsx as ae,jsxs as Zt}from"react/jsx-runtime";import{createElement as Qn}from"react";var jt="k-treeview-item",Dn=[n.hover,n.focus,n.selected,n.disabled],Un={},Wn={},h=e=>{let{leafClassName:t,children:o,hasChildren:s,expanded:l,text:c,showIcon:p,icon:m,showCheckbox:f,checked:b,hover:S,focus:y,selected:g,disabled:T,top:A,bottom:w,dir:M,...E}=e,O=s||o,R=[];return o&&(Array.isArray(o)?o.map((X,Pe)=>{X.type===I&&R.push(Qn(I,{...X.props,dir:M,key:Pe},X.props.children))}):o.type===I&&R.push(ae(I,{...o.props,dir:M,children:o.props.children}))),Zt("li",{...E,className:i(e.className,jt),children:[Zt("span",{className:i({"k-treeview-top":A,"k-treeview-bot":w,"k-treeview-mid":!A&&!w}),children:[O&&ae("span",{className:i("k-treeview-toggle",k("k-treeview-toggle",{disabled:T})),children:ae(N,{icon:l?"caret-alt-down":M==="rtl"?"caret-alt-left":"caret-alt-right"})}),f&&ae(_,{checked:b,disabled:T}),ae(Yt,{className:i(t,k(t,{disabled:T})),text:c,showIcon:p,icon:m,hover:S,focus:y,selected:g})]}),l&&O&&ae(Yn,{children:R})]})};h.states=Dn;h.options=Un;h.className=jt;h.defaultOptions=Wn;var he=h;import{jsx as Ep}from"react/jsx-runtime";import{jsx as Rp,jsxs as Kp}from"react/jsx-runtime";import{jsx as Vp,jsxs as Gp}from"react/jsx-runtime";import{jsx as Fp,jsxs as Jp}from"react/jsx-runtime";import{jsx as Wp,jsxs as Qp}from"react/jsx-runtime";import{Fragment as eo,jsx as v,jsxs as xe}from"react/jsx-runtime";var to="k-multiselecttree",Zn=[n.hover,n.focus,n.valid,n.invalid,n.required,n.disabled,n.loading,n.readonly],jn={size:[a.small,a.medium,a.large],rounded:[d.small,d.medium,d.large,d.full],fillMode:[u.solid,u.flat,u.outline]},He={size:C.defaultOptions.size,rounded:C.defaultOptions.rounded,fillMode:C.defaultOptions.fillMode},ve=e=>{let{size:t=He.size,rounded:o=He.rounded,fillMode:s=He.fillMode,prefix:l,suffix:c,placeholder:p,tags:m,popup:f,showArrowButton:b,hover:S,focus:y,valid:g,invalid:T,required:A,loading:w,disabled:M,readonly:E,opened:O,dir:R,adaptive:X,adaptiveSettings:Pe,adaptiveTitle:oo,adaptiveSubtitle:no,adaptiveFilter:io,...so}=e;return xe(eo,{children:[xe(C,{...so,dir:R,size:t,rounded:o,fillMode:s,hover:S,focus:y,valid:g,invalid:T,required:A,loading:w,disabled:M,readonly:E,className:i(e.className,to),children:[v(ke,{children:l}),v(Z,{size:t,className:"k-input-values",children:v(eo,{children:m})}),v("span",{className:"k-input-inner",children:!m&&v("span",{className:"k-input-value-text",children:p})}),v(H,{valid:g,invalid:T,loading:w,disabled:M}),v(P,{loading:w,disabled:M}),v(K,{loading:w,disabled:M,readonly:E,value:m?"value":""}),v(ge,{children:c}),b&&v(z,{className:"k-input-button",icon:"caret-alt-down",rounded:null,size:t,fillMode:s})]}),O&&f&&v(j,{className:"k-multiselecttree-popup",dir:R,children:f}),X&&v(U,{adaptive:!0,...Pe,header:v($,{actionsEnd:v(z,{icon:"check",themeColor:"primary",size:"large",fillMode:"flat"}),filter:io,inputPlaceholder:p,title:oo,subtitle:no}),children:xe(L,{size:"large",children:[v(h,{top:!0,text:"Root 1"}),v(h,{text:"Root 2",expanded:!0,children:xe(I,{children:[v(h,{top:!0,text:"Child 2.1"}),v(h,{text:"Child 2.2",children:v(I,{children:v(h,{bottom:!0,text:"Child 2.2.1"})})}),v(h,{text:"Child 2.3"}),v(h,{bottom:!0,leafClassName:"k-treeview-load-more-button",text:"Load more ..."})]})}),v(h,{bottom:!0,text:"Root 3",children:xe(I,{children:[v(h,{top:!0,text:"Child 3.1"}),v(h,{text:"Child 3.2"}),v(h,{bottom:!0,text:"Child 3.3"})]})})]})})]})};ve.states=Zn;ve.options=jn;ve.className=to;ve.defaultOptions=He;var xd=ve;export{to as MULTISELECTTREE_CLASSNAME,ve as MultiSelectTree,xd as default};