@progress/kendo-themes-html
Version:
A collection of HTML helpers used for developing Kendo UI themes
2 lines (1 loc) • 27 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,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"}),I=(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 mt}from"react/jsx-runtime";var Se="k-checkbox",po=[n.hover,n.focus,n.valid,n.invalid,n.required,n.disabled,n.checked,n.indeterminate],mo={size:[a.small,a.medium,a.large],rounded:[d.small,d.medium,d.large,d.full]},Ve={size:a.medium,rounded:d.medium},O=e=>{let{id:t,checked:o,indeterminate:s,hover:l,focus:c,disabled:p,invalid:m,valid:h,required:N,size:S=Ve.size,rounded:C=Ve.rounded,...w}=e;return mt("span",{className:"k-checkbox-wrap",children:mt("input",{...w,id:t,type:"checkbox",defaultChecked:o,required:N,className:i(e.className,Se,x(Se,{size:S,rounded:C}),I(Se,{hover:l,focus:c,disabled:p,invalid:m,valid:h,indeterminate:s,checked:o}))})})};O.states=po;O.options=mo;O.className=Se;O.defaultOptions=Ve;import{jsx as ho}from"react/jsx-runtime";var ut="k-checkbox-list",uo=[],fo={},ft={layout:"vertical"},Y=e=>{let{layout:t=ft.layout,...o}=e;return ho("ul",{...o,className:i(e.className,ut,{[`k-list-${t}`]:t}),children:e.children})};Y.states=uo;Y.options=fo;Y.className=ut;Y.defaultOptions=ft;import{jsx as No}from"react/jsx-runtime";var ht="k-checkbox-list-item",xo=[],vo={},bo={},Z=e=>{let{...t}=e;return No("li",{...t,className:i(e.className,ht),children:e.children})};Z.states=xo;Z.options=vo;Z.className=ht;Z.defaultOptions=bo;import{Fragment as Ti,jsx as ki,jsxs as Ii}from"react/jsx-runtime";import{Fragment as Ei,jsx as Mi,jsxs as Li}from"react/jsx-runtime";import{Fragment as Hi,jsx as Ki,jsxs as Pi}from"react/jsx-runtime";import{Fragment as _i,jsx as $i,jsxs as Fi}from"react/jsx-runtime";import{jsx as Di}from"react/jsx-runtime";import{jsx as Yi}from"react/jsx-runtime";import{Fragment as ko,jsx as xt}from"react/jsx-runtime";var _e="k-icon k-font-icon",So=[],yo={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]},Co={},le=e=>{let{size:t,themeColor:o,icon:s,rotate:l,flip:c,...p}=e;return s?xt("span",{...p,className:i(e.className,_e,x(_e,{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"})}):xt(ko,{})};le.states=So;le.options=yo;le.className=_e;le.defaultOptions=Co;var vt=le;import{Fragment as wo,jsx as ye}from"react/jsx-runtime";var Fe="k-icon k-svg-icon",To=[],Io={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]},bt={viewBox:"0 0 24 24"},ce=e=>{let{size:t,themeColor:o,rotate:s,flip:l,viewBox:c=bt.viewBox,icon:p,...m}=e;if(!p)return ye(wo,{});p==="none"&&{...m,className:i(e.className,Fe,"k-none")};let h=typeof p=="object"&&p.name&&p.name;return ye("span",{...m,className:i(e.className,Fe,x("k-icon",{size:t}),{[`k-svg-i-${h}`]:h,[`k-color-${o}`]:o,[`k-rotate-${s}`]:s,"k-flip-h":l==="h"||l==="both","k-flip-v":l==="v"||l==="both"}),children:ye("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})})};ce.states=To;ce.options=Io;ce.className=Fe;ce.defaultOptions=bt;var Xe=ce;import*as Nt from"@progress/kendo-svg-icons";import{Fragment as St,jsx as pe}from"react/jsx-runtime";var go=e=>e.replace(/([-_][a-z0-9])/gi,t=>t.toUpperCase().replace("-","").replace("_","")),Ao=[],Mo={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]},Je={viewBox:"0 0 24 24",type:"svg"},v=e=>{let{size:t,themeColor:o,icon:s,type:l=Je.type,rotate:c,flip:p,viewBox:m=Je.viewBox,...h}=e;if(!s)return pe(St,{});if(l==="svg"){if(s==="none")return pe(Xe,{...h,icon:s,size:t});let N=go(`${s}-icon`);return Nt[N]?pe(Xe,{...h,icon:Nt[N],size:t,themeColor:o,rotate:c,flip:p,viewBox:m}):pe(St,{})}return pe(vt,{...h,icon:s,size:t,themeColor:o,rotate:c,flip:p})};v.states=Ao;v.options=Mo;v.defaultOptions=Je;import{jsx as zo}from"react/jsx-runtime";var Ce="k-input",Eo=[n.hover,n.focus,n.valid,n.invalid,n.required,n.disabled,n.loading,n.readonly],Lo={size:[a.small,a.medium,a.large],rounded:[d.small,d.medium,d.large,d.full],fillMode:[u.solid,u.flat,u.outline]},ke={size:a.medium,rounded:a.medium,fillMode:u.solid},k=e=>{let{hover:t,focus:o,disabled:s,invalid:l,valid:c,loading:p,readonly:m,size:h=ke.size,rounded:N=ke.rounded,fillMode:S=ke.fillMode,...C}=e;return zo("span",{...C,className:i(e.className,Ce,x(Ce,{size:h,rounded:N,fillMode:S}),I(Ce,{hover:t,focus:o,disabled:s,invalid:l,valid:c,loading:p,readonly:m}))})};k.states=Eo;k.options=Lo;k.className=Ce;k.defaultOptions=ke;import{jsx as Ko}from"react/jsx-runtime";var Te="k-picker",Oo=[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]},Ie={size:a.medium,rounded:d.medium,fillMode:u.solid},we=e=>{let{hover:t,focus:o,disabled:s,invalid:l,valid:c,loading:p,readonly:m,size:h=Ie.size,rounded:N=Ie.rounded,fillMode:S=Ie.fillMode,...C}=e;return Ko("span",{...C,className:i(e.className,Te,x(Te,{size:h,rounded:N,fillMode:S}),I(Te,{hover:t,focus:o,disabled:s,invalid:l,valid:c,loading:p,readonly:m})),children:e.children})};we.states=Oo;we.options=Ro;we.className=Te;we.defaultOptions=Ie;import{Fragment as Bo,jsx as qe}from"react/jsx-runtime";var yt="k-clear-value",Ho=[n.disabled,n.loading,n.readonly],Po={},P=e=>{let{disabled:t,loading:o,readonly:s,value:l}=e;return t||s||o||!l?qe(Bo,{}):qe("span",{className:i(e.className,yt),children:qe(v,{icon:"x"})})};P.states=Ho;P.options=Po;P.className=yt;import{jsx as $o}from"react/jsx-runtime";var De="k-input-inner",Go=[],Vo={},ge={type:"text",autocomplete:"off",value:"",placeholder:""},q=e=>{let{value:t=ge.value,type:o=ge.type,placeholder:s=ge.placeholder,autocomplete:l=ge.autocomplete,...c}=e;return $o("input",{...c,type:o,className:i(e.className,De,x(De,e)),placeholder:s,autoComplete:l,defaultValue:t})};q.states=Go;q.options=Vo;q.className=De;import{jsx as Ct,jsxs as Xo}from"react/jsx-runtime";var Ue="k-input-inner",_o=[],Fo={},We=e=>{let{value:t,placeholder:o,showValue:s,valueIcon:l,valueIconName:c,...p}=e;return Xo("span",{...p,className:i(e.className,Ue,x(Ue,e)),children:[l,!l&&c&&Ct(v,{className:"k-input-value-icon",icon:c}),s&&!t&&o,s&&t&&Ct("span",{className:"k-input-value-text",children:t})]})};We.states=_o;We.options=Fo;We.className=Ue;import{jsx as Do}from"react/jsx-runtime";var Qe="k-input-inner",Jo=[],qo={},kt={value:"",placeholder:""},Ye=e=>{let{value:t=kt.value,placeholder:o=kt.placeholder,rows:s,...l}=e;return Do("textarea",{...l,className:i(e.className,Qe,x(Qe,e)),placeholder:o,rows:s,defaultValue:t})};Ye.states=Jo;Ye.options=qo;Ye.className=Qe;import{Fragment as Wo,jsx as Tt}from"react/jsx-runtime";var It="k-input-loading-icon",Uo=[n.disabled,n.loading],G=e=>{let{disabled:t,loading:o}=e;return t||!o?Tt(Wo,{}):Tt("span",{className:i(e.className,It,"k-icon k-i-loading")})};G.states=Uo;G.className=It;import{Fragment as Zo,jsx as wt}from"react/jsx-runtime";var gt="k-input-validation-icon",Qo=[n.valid,n.invalid,n.disabled,n.loading],Yo={},B=e=>{let{valid:t,invalid:o,disabled:s,loading:l}=e,c=o?"warning-circle":"check-circle";return s||l||!!!(t||o)?wt(Zo,{}):wt(v,{className:i(gt),icon:c})};B.states=Qo;B.options=Yo;B.className=gt;import{Fragment as tn,jsx as At}from"react/jsx-runtime";var jo="k-input-prefix",en={direction:"horizontal"},Ae=e=>{let{direction:t=en.direction,...o}=e;return e.children?At("span",{...o,className:i(jo,e.className,{[`k-input-prefix-${t}`]:t}),children:e.children}):At(tn,{})};import{Fragment as sn,jsx as Mt}from"react/jsx-runtime";var on="k-input-suffix",nn={direction:"horizontal"},Me=e=>{let{direction:t=nn.direction,...o}=e;return e.children?Mt("span",{...o,className:i(on,e.className,{[`k-input-suffix-${t}`]:t}),children:e.children}):Mt(sn,{})};import{jsx as sa}from"react/jsx-runtime";import{jsx as ca}from"react/jsx-runtime";import{jsx as rn}from"react/jsx-runtime";var Et="k-input-separator",an={direction:"vertical"},Ze=e=>{let{direction:t=an.direction,...o}=e;return rn("span",{...o,className:i(Et,e.className,{[`${Et}-${t}`]:t})})};import{Fragment as Lt,jsx as V,jsxs as je}from"react/jsx-runtime";var zt="k-textbox",ln=[n.hover,n.focus,n.valid,n.invalid,n.required,n.disabled,n.loading,n.readonly],cn={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:k.defaultOptions.size,rounded:k.defaultOptions.rounded,fillMode:k.defaultOptions.fillMode,separators:!0},$=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:h,type:N,value:S,placeholder:C,hover:w,focus:T,valid:M,invalid:g,required:L,loading:z,disabled:K,readonly:H,...J}=e;return je(k,{...J,size:t,rounded:o,fillMode:s,hover:w,focus:T,valid:M,invalid:g,required:L,loading:z,disabled:K,readonly:H,className:i(e.className,zt),children:[m&&je(Lt,{children:[V(Ae,{children:m}),l&&V(Ze,{})]}),V(q,{placeholder:C,value:S,type:N}),p&&V(B,{valid:M,invalid:g,loading:z,disabled:K}),V(G,{loading:z,disabled:K}),c&&V(P,{loading:z,disabled:K,readonly:H,value:S}),h&&je(Lt,{children:[l&&V(Ze,{}),V(Me,{children:h})]})]})};$.states=ln;$.options=cn;$.className=zt;$.defaultOptions=D;import{jsx as Ra}from"react/jsx-runtime";import{Fragment as Va,jsx as Ga}from"react/jsx-runtime";import{Fragment as mn,jsx as de,jsxs as Rt}from"react/jsx-runtime";var Ee="k-button",pn=[n.hover,n.focus,n.active,n.selected,n.disabled],dn={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]},U={size:a.medium,rounded:d.medium,fillMode:u.solid,themeColor:r.base,showArrow:!1,arrowIconName:"caret-alt-down"},R=e=>{let{size:t=U.size,rounded:o=U.rounded,fillMode:s=U.fillMode,themeColor:l=U.themeColor,showArrow:c=U.showArrow,arrowIconName:p=U.arrowIconName,hover:m,focus:h,active:N,selected:S,disabled:C,icon:w,text:T,iconClassName:M,...g}=e,L=w!==void 0,z=e.children!==void 0;return Rt("button",{...g,className:i(e.className,Ee,x(Ee,{size:t,rounded:o,fillMode:s,themeColor:l}),I(Ee,{hover:m,focus:h,active:N,disabled:C,selected:S}),{"k-icon-button":!T&&!z&&L}),children:[w&&de(v,{className:i(M,"k-button-icon"),icon:w}),T?Rt(mn,{children:[T&&de("span",{className:"k-button-text",children:T}),e.children]}):e.children&&de("span",{className:"k-button-text",children:e.children}),c&&de("span",{className:"k-menu-button-arrow k-button-arrow",children:de(v,{icon:p})})]})};R.states=pn;R.options=dn;R.className=Ee;R.defaultOptions=U;import{jsx as Ua}from"react/jsx-runtime";import{jsx as Za}from"react/jsx-runtime";import{jsx as or}from"react/jsx-runtime";import{Fragment as fr,jsx as ur}from"react/jsx-runtime";import{jsx as Le}from"react/jsx-runtime";import{createElement as Kt}from"react";var et="k-treeview",un=[],fn={size:[a.small,a.medium,a.large]},Ht={size:a.medium},E=e=>{let{size:t=Ht.size,children:o,dir:s,...l}=e,c=[];return o&&(Array.isArray(o)?o.map((p,m)=>{p.type===f&&c.push(Kt(f,{...p.props,dir:s,key:m})),p.type===y&&c.push(Kt(y,{...p.props,dir:s,key:m}))}):(o.type===f&&c.push(Le(f,{...o.props,dir:s})),o.type===y&&c.push(Le(y,{...o.props,dir:s})))),Le("div",{...l,dir:s,className:i(e.className,et,x(et,{size:t})),children:Le(y,{className:"k-treeview-lines",dir:s,children:c})})};E.states=un;E.options=fn;E.className=et;E.defaultOptions=Ht;import{jsx as Pt}from"react/jsx-runtime";import{createElement as xn}from"react";var hn="k-treeview-group",y=e=>{let{children:t,dir:o}=e,s=[];return t&&(Array.isArray(t)?t.map((l,c)=>{l.type===me&&s.push(xn(me,{...l.props,dir:o,key:c}))}):t.type===me&&s.push(Pt(me,{...t.props,dir:o}))),Pt("ul",{className:i(e.className,hn),children:s})};import{jsx as Bt,jsxs as Nn}from"react/jsx-runtime";var tt="k-treeview-leaf",vn=[n.hover,n.focus,n.selected],bn={},ze=e=>{let{text:t,showIcon:o,icon:s,hover:l,focus:c,selected:p,...m}=e;return Nn("span",{...m,className:i(e.className,tt,I(tt,{hover:l,focus:c,selected:p})),children:[o&&Bt(v,{icon:s}),Bt("span",{className:"k-treeview-leaf-text",children:t})]})};ze.states=vn;ze.options=bn;ze.className=tt;var Gt=ze;import{Fragment as Tn,jsx as j,jsxs as Vt}from"react/jsx-runtime";import{createElement as kn}from"react";var $t="k-treeview-item",Sn=[n.hover,n.focus,n.selected,n.disabled],yn={},Cn={},f=e=>{let{leafClassName:t,children:o,hasChildren:s,expanded:l,text:c,showIcon:p,icon:m,showCheckbox:h,checked:N,hover:S,focus:C,selected:w,disabled:T,top:M,bottom:g,dir:L,...z}=e,K=s||o,H=[];return o&&(Array.isArray(o)?o.map((J,Ge)=>{J.type===y&&H.push(kn(y,{...J.props,dir:L,key:Ge},J.props.children))}):o.type===y&&H.push(j(y,{...o.props,dir:L,children:o.props.children}))),Vt("li",{...z,className:i(e.className,$t),children:[Vt("span",{className:i({"k-treeview-top":M,"k-treeview-bot":g,"k-treeview-mid":!M&&!g}),children:[K&&j("span",{className:i("k-treeview-toggle",I("k-treeview-toggle",{disabled:T})),children:j(v,{icon:l?"caret-alt-down":L==="rtl"?"caret-alt-left":"caret-alt-right"})}),h&&j(O,{checked:N,disabled:T}),j(Gt,{className:i(t,I(t,{disabled:T})),text:c,showIcon:p,icon:m,hover:S,focus:C,selected:w})]}),l&&K&&j(Tn,{children:H})]})};f.states=Sn;f.options=yn;f.className=$t;f.defaultOptions=Cn;var me=f;import{jsx as Jr}from"react/jsx-runtime";import{jsx as Wr,jsxs as Qr}from"react/jsx-runtime";import{jsx as el,jsxs as tl}from"react/jsx-runtime";import{jsx as sl,jsxs as al}from"react/jsx-runtime";import{jsx as pl,jsxs as dl}from"react/jsx-runtime";import{jsx as wl}from"react/jsx-runtime";import{jsx as _t}from"react/jsx-runtime";var ue="k-avatar";var In=[n.hover,n.focus,n.active,n.selected,n.disabled],wn={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]},W={type:"text",size:a.medium,rounded:d.full,fillMode:u.solid,themeColor:r.primary,border:!1},ee=e=>{let{size:t=W.size,rounded:o=W.rounded,fillMode:s=W.fillMode,themeColor:l=W.themeColor,type:c=W.type,border:p=W.border,...m}=e;return _t("div",{...m,className:i(e.className,ue,x(ue,{size:t,rounded:o,fillMode:s,themeColor:l}),{[`${ue}-bordered`]:p}),children:_t("span",{className:`${ue}-${c}`,children:e.children})})};ee.states=In;ee.options=wn;ee.className=ue;ee.defaultOptions=W;import{jsx as Ol}from"react/jsx-runtime";import{jsx as Pl}from"react/jsx-runtime";import{jsx as $l}from"react/jsx-runtime";import{jsx as te,jsxs as Mn}from"react/jsx-runtime";var Oe="k-chip",gn=[n.hover,n.focus,n.active,n.selected,n.disabled],An={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]},oe={size:a.medium,rounded:d.medium,fillMode:u.solid,themeColor:r.base,avatarImage:"/packages/html/assets/avatar.jpg"},Re=e=>{let{size:t=oe.size,rounded:o=oe.rounded,fillMode:s=oe.fillMode,themeColor:l=oe.themeColor,text:c,icon:p,actions:m,showAvatar:h,avatarImage:N=oe.avatarImage,hover:S,focus:C,active:w,selected:T,disabled:M,...g}=e;return Mn("div",{...g,className:i(e.className,Oe,x(Oe,{size:t,rounded:o,fillMode:s,themeColor:l}),I(Oe,{hover:S,focus:C,active:w,disabled:M,selected:T})),children:[p&&te(v,{className:"k-chip-icon",icon:p,size:"small"}),h&&te(ee,{className:"k-chip-avatar",type:"image",children:te("img",{src:N})}),te("span",{className:"k-chip-content",children:e.children?e.children:c&&te("span",{className:"k-chip-label",children:c})}),m&&te("span",{className:"k-chip-actions",children:m})]})};Re.states=gn;Re.options=An;Re.className=Oe;Re.defaultOptions=oe;import{jsx as zn}from"react/jsx-runtime";var ot="k-chip-list",En=[],Ln={size:[a.small,a.medium,a.large]},Xt={size:a.medium},ne=e=>{let{size:t=Xt.size,...o}=e;return zn("div",{...o,className:i(e.className,ot,x(ot,{size:t})),children:e.children})};ne.states=En;ne.options=Ln;ne.className=ot;ne.defaultOptions=Xt;import{jsx as ic}from"react/jsx-runtime";import{jsx as lc}from"react/jsx-runtime";import{jsx as mc}from"react/jsx-runtime";import{jsx as vc}from"react/jsx-runtime";import{Fragment as kc,jsx as Cc,jsxs as Tc}from"react/jsx-runtime";import{jsx as Jt}from"react/jsx-runtime";var qt="k-animation-container",Rn=[],Kn={},Dt={positionMode:"absolute"},_=e=>{let{positionMode:t=Dt.positionMode,animationStyle:o,offset:s,...l}=e;return Jt("div",{...l,style:{...s,...e.style},className:i(e.className,qt,"k-animation-container-shown",{"k-animation-container-fixed":t==="fixed"}),children:Jt("div",{className:"k-child-animation-container",style:o,children:e.children})})};_.states=Rn;_.options=Kn;_.className=qt;_.defaultOptions=Dt;import{jsx as Ut}from"react/jsx-runtime";var Wt="k-popup",Hn=[],Pn={},Qt={positionMode:"absolute"},ie=e=>{let{offset:t,positionMode:o=Qt.positionMode,animationStyle:s,...l}=e;return Ut(_,{positionMode:o,offset:t,animationStyle:s,children:Ut("div",{...l,className:i(e.className,Wt),children:e.children})})};ie.states=Hn;ie.options=Pn;ie.className=Wt;ie.defaultOptions=Qt;import{jsx as Vn}from"react/jsx-runtime";var He="k-actions",Bn=[],Gn={},nt={alignment:"start",orientation:"horizontal"},se=e=>{let{alignment:t=nt.alignment,orientation:o=nt.orientation,...s}=e;return Vn("div",{...s,className:i(He,{[`${He}-${t}`]:t,[`${He}-${o}`]:o},e.className),children:e.children})};se.states=Bn;se.options=Gn;se.className=He;se.defaultOptions=nt;import{jsx as _n}from"react/jsx-runtime";var $n="k-actionsheet-footer",Yt={alignment:"stretched",orientation:"horizontal"},it=e=>{let{alignment:t=Yt.alignment,orientation:o=Yt.orientation,template:s,as:l=s?"div":se,...c}=e;return _n(l,{...c,...!s&&{alignment:t,orientation:o},className:i(e.className,$n),children:e.children})};import{jsx as fe,jsxs as Jn}from"react/jsx-runtime";var Zt="k-searchbox",Fn=[n.hover,n.focus,n.valid,n.invalid,n.required,n.disabled,n.loading],Xn={size:[a.small,a.medium,a.large],rounded:[d.small,d.medium,d.large,d.full],fillMode:[u.solid,u.flat,u.outline]},st={showIcon:!0,icon:"search",size:k.defaultOptions.size,rounded:k.defaultOptions.rounded,fillMode:k.defaultOptions.fillMode},ae=e=>{let{value:t,placeholder:o,size:s,rounded:l,fillMode:c,hover:p,focus:m,valid:h,invalid:N,required:S,loading:C,disabled:w,showIcon:T=st.showIcon,icon:M=st.icon,...g}=e;return Jn(k,{...g,size:s,rounded:l,fillMode:c,hover:p,focus:m,valid:h,invalid:N,required:S,loading:C,disabled:w,className:i(e.className,Zt),children:[T&&fe(v,{className:"k-input-icon",icon:M}),fe(q,{placeholder:o,value:t}),fe(G,{...e}),fe(B,{...e}),fe(P,{...e})]})};ae.states=Fn;ae.options=Xn;ae.className=Zt;ae.defaultOptions=st;import{jsx as cp}from"react/jsx-runtime";import{jsx as F,jsxs as at}from"react/jsx-runtime";var jt="k-actionsheet-titlebar",qn={},X=e=>{let{title:t,subtitle:o,actionsStart:s,actionsEnd:l,filter:c,input:p,inputValue:m,inputPlaceholder:h,adaptive:N,children:S,...C}=e;return at("div",{...C,className:i(e.className,jt),children:[at("div",{className:"k-actionsheet-titlebar-group",children:[s&&F("div",{className:"k-actionsheet-actions",children:s}),!S&&at("div",{className:"k-actionsheet-title",children:[t&&F("div",{className:"k-text-center",children:t}),o&&F("div",{className:"k-actionsheet-subtitle k-text-center",children:o})]}),S&&F("div",{className:"k-actionsheet-title",children:S}),l&&F("div",{className:"k-actionsheet-actions",children:l})]}),(p||c)&&F("div",{className:"k-actionsheet-titlebar-group k-actionsheet-filter",children:p?F($,{value:m,placeholder:h,size:N?"large":"medium"}):F(ae,{placeholder:"Filter",size:N?"large":"medium"})})]})};X.className=jt;X.defaultOptions=qn;import{jsx as rt,jsxs as Qn}from"react/jsx-runtime";var lt="k-actionsheet-view",Dn=[],Un={},Wn={},re=e=>{let{adaptive:t,animated:o,children:s,header:l,footer:c,...p}=e,m=l?.type===X&&rt(X,{adaptive:t,...l?.props}),h=c?.type===it&&rt(it,{...c?.props});return Qn("div",{...p,className:i(e.className,lt,{[`${lt}-animated`]:o}),children:[m,rt("div",{className:"k-actionsheet-content",children:s}),h]})};re.states=Dn;re.options=Un;re.className=lt;re.defaultOptions=Wn;import{jsx as Pe,jsxs as jn}from"react/jsx-runtime";var eo="k-actionsheet",Yn=[],Zn={},he={side:"bottom",fullscreen:!1,adaptive:!1,overlay:!0},Q=e=>{let{side:t=he.side,fullscreen:o=he.fullscreen,adaptive:s=he.adaptive,overlay:l=he.overlay,template:c,children:p,header:m,footer:h,...N}=e;return jn("div",{className:"k-actionsheet-container",children:[l&&Pe("div",{className:"k-overlay"}),Pe(_,{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:Pe("div",{...N,className:i(e.className,eo,{[`k-actionsheet-${t}`]:o===!1,"k-actionsheet-fullscreen":o===!0,"k-adaptive-actionsheet":s}),children:c||Pe(re,{header:m,footer:h,adaptive:s,...e,children:p})})})]})};Q.states=Yn;Q.options=Zn;Q.className=eo;Q.defaultOptions=he;import{jsx as Lp}from"react/jsx-runtime";import{Fragment as ti,jsx as xe,jsxs as ct}from"react/jsx-runtime";var pt="k-actionsheet-item",ei=[n.hover,n.focus,n.selected,n.disabled],dt=e=>{let{iconName:t,text:o,description:s,hover:l,focus:c,selected:p,disabled:m,...h}=e;return ct("span",{...h,className:i(e.className,pt,I(pt,{hover:l,focus:c,selected:p,disabled:m})),children:[!e.children&&xe(ti,{children:ct("span",{className:"k-actionsheet-action",children:[t&&xe("span",{className:"k-icon-wrap",children:xe(v,{className:"k-actionsheet-item-icon",icon:t})}),ct("span",{className:"k-actionsheet-item-text",children:[o&&xe("span",{className:"k-actionsheet-item-title",children:o}),s&&xe("span",{className:"k-actionsheet-item-description",children:s})]})]})}),e.children]})};dt.states=ei;dt.className=pt;import{jsx as Vp,jsxs as $p}from"react/jsx-runtime";import{jsx as Jp}from"react/jsx-runtime";import{jsx as Wp}from"react/jsx-runtime";import{jsx as jp}from"react/jsx-runtime";import{Fragment as oo,jsx as b,jsxs as ve}from"react/jsx-runtime";var no="k-multiselecttree",oi=[n.hover,n.focus,n.valid,n.invalid,n.required,n.disabled,n.loading,n.readonly],ni={size:[a.small,a.medium,a.large],rounded:[d.small,d.medium,d.large,d.full],fillMode:[u.solid,u.flat,u.outline]},Be={size:k.defaultOptions.size,rounded:k.defaultOptions.rounded,fillMode:k.defaultOptions.fillMode},be=e=>{let{size:t=Be.size,rounded:o=Be.rounded,fillMode:s=Be.fillMode,prefix:l,suffix:c,placeholder:p,tags:m,popup:h,showArrowButton:N,hover:S,focus:C,valid:w,invalid:T,required:M,loading:g,disabled:L,readonly:z,opened:K,dir:H,adaptive:J,adaptiveSettings:Ge,adaptiveTitle:ao,adaptiveSubtitle:ro,adaptiveFilter:lo,...co}=e;return ve(oo,{children:[ve(k,{...co,dir:H,size:t,rounded:o,fillMode:s,hover:S,focus:C,valid:w,invalid:T,required:M,loading:g,disabled:L,readonly:z,className:i(e.className,no),children:[b(Ae,{children:l}),b(ne,{size:t,className:"k-input-values",children:b(oo,{children:m})}),b("span",{className:"k-input-inner",children:!m&&b("span",{className:"k-input-value-text",children:p})}),b(B,{valid:w,invalid:T,loading:g,disabled:L}),b(G,{loading:g,disabled:L}),b(P,{loading:g,disabled:L,readonly:z,value:m?"value":""}),b(Me,{children:c}),N&&b(R,{className:"k-input-button",icon:"caret-alt-down",rounded:null,size:t,fillMode:s})]}),K&&h&&b(ie,{className:"k-multiselecttree-popup",dir:H,children:h}),J&&b(Q,{adaptive:!0,...Ge,header:b(X,{actionsEnd:b(R,{icon:"check",themeColor:"primary",size:"large",fillMode:"flat"}),filter:lo,inputPlaceholder:p,title:ao,subtitle:ro}),children:ve(E,{size:"large",children:[b(f,{top:!0,text:"Root 1"}),b(f,{text:"Root 2",expanded:!0,children:ve(y,{children:[b(f,{top:!0,text:"Child 2.1"}),b(f,{text:"Child 2.2",children:b(y,{children:b(f,{bottom:!0,text:"Child 2.2.1"})})}),b(f,{text:"Child 2.3"}),b(f,{bottom:!0,leafClassName:"k-treeview-load-more-button",text:"Load more ..."})]})}),b(f,{bottom:!0,text:"Root 3",children:ve(y,{children:[b(f,{top:!0,text:"Child 3.1"}),b(f,{text:"Child 3.2"}),b(f,{bottom:!0,text:"Child 3.3"})]})})]})})]})};be.states=oi;be.options=ni;be.className=no;be.defaultOptions=Be;var io=be;import{Fragment as so,jsx as A,jsxs as Ne}from"react/jsx-runtime";var gd=e=>A(io,{opened:!0,popup:Ne(so,{children:[A("div",{className:"k-list-filter",children:A($,{prefix:A(so,{children:A(v,{icon:"search"})})})}),Ne("div",{className:"k-check-all",children:[A(O,{}),A("span",{className:"k-checkbox-label",children:"Check all"})]}),Ne(E,{dir:e.dir,children:[A(f,{top:!0,text:"Furniture",showCheckbox:!0,children:Ne(y,{children:[A(f,{top:!0,text:"Child 1",showCheckbox:!0}),A(f,{text:"Child 2",showCheckbox:!0}),A(f,{bottom:!0,text:"Child 3",showCheckbox:!0})]})}),A(f,{bottom:!0,text:"Decor",showCheckbox:!0,children:Ne(y,{children:[A(f,{top:!0,text:"Child 1",showCheckbox:!0}),A(f,{text:"Child 2",showCheckbox:!0}),A(f,{bottom:!0,text:"Child 3",showCheckbox:!0})]})})]})]}),...e});export{gd as MultiSelectTreeFiltering};