UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

2 lines (1 loc) 27.2 kB
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"}),g=(e,t)=>{let{valid:o,invalid:i,hover:r,focus:l,checked:p,active:d,selected:c,disabled:u,indeterminate:h,loading:L,empty:b,readonly:A,highlighted:v,...I}=t;return s({"k-valid":o,"k-invalid":i,"k-hover":r,"k-focus":l,"k-checked":p,"k-active":d,"k-selected":c,"k-disabled":u,"k-indeterminate":h&&!p,"k-loading":L,"k-empty":b,"k-readonly":A,"k-highlighted":v},Object.keys(I).reduce((O,C)=>(C.startsWith("k-")?O[C]=I[C]:O[`k-${C}`]=I[C],O),{}))};function gt(e,t){if(!t)return{};let o=Array.isArray(t)?t:[t];return Object.fromEntries(o.map(i=>[`k-${i}`,!0]))}var a={xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},f={small:"small",medium:"medium",large:"large",full:"full"},N={solid:"solid",flat:"flat",outline:"outline",clear:"clear",link:"link"},m={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",generating:"generating",expanded:"expanded"};var fe="input",Oe=fe;import{jsx as zo}from"react/jsx-runtime";var ge="k-input",Ro=[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:[f.small,f.medium,f.large,f.full],fillMode:[N.solid,N.flat,N.outline]},ke={size:a.medium,rounded:a.medium,fillMode:N.solid},E=e=>{let{hover:t,focus:o,disabled:i,invalid:r,valid:l,loading:p,readonly:d,size:c=ke.size,rounded:u=ke.rounded,fillMode:h=ke.fillMode,...L}=e;return zo("span",{...L,className:s(e.className,ge,S(ge,{size:c,rounded:u,fillMode:h}),g(ge,{hover:t,focus:o,disabled:i,invalid:r,valid:l,loading:p,readonly:d}))})};E.states=Ro;E.options=Po;E.className=ge;E.defaultOptions=ke;E.moduleName=fe;E.folderName=Oe;import{jsx as wo}from"react/jsx-runtime";var ye="k-picker",Do=[n.hover,n.focus,n.valid,n.invalid,n.required,n.disabled,n.loading,n.readonly],Bo={size:[a.small,a.medium,a.large],rounded:[f.small,f.medium,f.large,f.full],fillMode:[N.solid,N.flat,N.outline]},_e={size:a.medium,rounded:f.medium,fillMode:N.solid},ie=e=>{let{hover:t,focus:o,disabled:i,invalid:r,valid:l,loading:p,readonly:d,size:c=_e.size,rounded:u=_e.rounded,fillMode:h=_e.fillMode,...L}=e;return wo("span",{...L,className:s(e.className,ye,S(ye,{size:c,rounded:u,fillMode:h}),g(ye,{hover:t,focus:o,disabled:i,invalid:r,valid:l,loading:p,readonly:d})),children:e.children})};ie.states=Do;ie.options=Bo;ie.className=ye;ie.defaultOptions=_e;ie.moduleName=fe;ie.folderName=Oe;import{Fragment as Vo,jsx as kt}from"react/jsx-runtime";var $e="k-font-icon",Uo=[],Fo={size:[a.xsmall,a.small,a.medium,a.large,a.xlarge,a.xxlarge,a.xxxlarge],themeColor:[m.base,m.primary,m.secondary,m.tertiary,m.success,m.warning,m.error,m.info,m.light,m.dark]},Go={},xe=e=>{let{size:t,themeColor:o,icon:i,rotate:r,flip:l,...p}=e;return i?kt("span",{...p,className:s(e.className,$e,S($e,{size:t}),{[`k-i-${i}`]:i,[`k-color-${o}`]:o,[`k-rotate-${r}`]:r,"k-flip-h":l==="h"||l==="both","k-flip-v":l==="v"||l==="both"})}):kt(Vo,{})};xe.states=Uo;xe.options=Fo;xe.className=$e;xe.defaultOptions=Go;var yt=xe;import{Fragment as Jo,jsx as Ke}from"react/jsx-runtime";var Xe="k-svg-icon",$o=[],Xo={size:[a.xsmall,a.small,a.medium,a.large,a.xlarge,a.xxlarge,a.xxxlarge],themeColor:[m.base,m.primary,m.secondary,m.tertiary,m.success,m.warning,m.error,m.info,m.light,m.dark]},_t={viewBox:"0 0 24 24"},Ne=e=>{let{size:t,themeColor:o,rotate:i,flip:r,viewBox:l=_t.viewBox,icon:p,...d}=e;if(!p)return Ke(Jo,{});p==="none"&&{...d,className:s(e.className,Xe,"k-none")};let c=typeof p=="object"&&p.name&&p.name;return Ke("span",{...d,className:s(e.className,Xe,S("k-icon",{size:t}),{[`k-svg-i-${c}`]:c,[`k-color-${o}`]:o,[`k-rotate-${i}`]:i,"k-flip-h":r==="h"||r==="both","k-flip-v":r==="v"||r==="both"}),children:Ke("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof p=="object"?p.viewBox:l,dangerouslySetInnerHTML:typeof p=="object"?{__html:p.content}:void 0,children:p?void 0:e.children})})};Ne.states=$o;Ne.options=Xo;Ne.className=Xe;Ne.defaultOptions=_t;var Je=Ne;import*as qe from"@progress/kendo-svg-icons";var Kt="icon",Ht="icons";import{Fragment as Rt,jsx as he}from"react/jsx-runtime";var He="k-icon",qo=e=>e.replace(/([-_][a-z0-9])/gi,t=>t.toUpperCase().replace("-","").replace("_","")),Wo=[],Qo={size:[a.xsmall,a.small,a.medium,a.large,a.xlarge,a.xxlarge,a.xxxlarge],themeColor:[m.base,m.primary,m.secondary,m.tertiary,m.success,m.warning,m.error,m.info,m.light,m.dark]},We={viewBox:"0 0 24 24",type:"svg"},M=e=>{let{size:t,themeColor:o,icon:i,type:r=We.type,rotate:l,flip:p,viewBox:d=We.viewBox,...c}=e;if(!i)return he(Rt,{});if(r==="svg"){if(i==="none")return he(Je,{...c,className:s(e.className,He),icon:i,size:t});let u=qe[i]?i:qo(`${i}-icon`);return qe[u]?he(Je,{...c,className:s(e.className,He),icon:qe[u],size:t,themeColor:o,rotate:l,flip:p,viewBox:d}):he(Rt,{})}return he(yt,{...c,className:s(e.className,He),icon:i,size:t,themeColor:o,rotate:l,flip:p})};M.states=Wo;M.options=Qo;M.defaultOptions=We;M.className=He;M.moduleName=Kt;M.folderName=Ht;import{Fragment as jo,jsx as Qe}from"react/jsx-runtime";var Pt="k-clear-value",Yo=[n.disabled,n.loading,n.readonly],Zo={},P=e=>{let{disabled:t,loading:o,readonly:i,value:r}=e;return t||i||o||!r?Qe(jo,{}):Qe("span",{className:s(e.className,Pt),children:Qe(M,{icon:"x"})})};P.states=Yo;P.options=Zo;P.className=Pt;import{jsx as on}from"react/jsx-runtime";var Ye="k-input-inner",en=[],tn={},Re={type:"text",autocomplete:"off",value:"",placeholder:""},z=e=>{let{value:t=Re.value,type:o=Re.type,placeholder:i=Re.placeholder,autocomplete:r=Re.autocomplete,...l}=e;return on("input",{...l,type:o,className:s(e.className,Ye,S(Ye,e)),placeholder:i,autoComplete:r,defaultValue:t})};z.states=en;z.options=tn;z.className=Ye;import{jsx as zt,jsxs as an}from"react/jsx-runtime";var Ze="k-input-inner",nn=[],sn={},je=e=>{let{value:t,placeholder:o,showValue:i,valueIcon:r,valueIconName:l,...p}=e;return an("span",{...p,className:s(e.className,Ze,S(Ze,e)),children:[r,!r&&l&&zt(M,{className:"k-input-value-icon",icon:l}),i&&!t&&o,i&&t&&zt("span",{className:"k-input-value-text",children:t})]})};je.states=nn;je.options=sn;je.className=Ze;import{jsx as pn}from"react/jsx-runtime";var et="k-input-inner",rn=[],ln={},Dt={value:"",placeholder:""},tt=e=>{let{value:t=Dt.value,placeholder:o=Dt.placeholder,rows:i,...r}=e;return pn("textarea",{...r,className:s(e.className,et,S(et,e)),placeholder:o,rows:i,defaultValue:t})};tt.states=rn;tt.options=ln;tt.className=et;import{Fragment as cn,jsx as Bt}from"react/jsx-runtime";var wt="k-input-loading-icon",mn=[n.disabled,n.loading],F=e=>{let{disabled:t,loading:o}=e;return t||!o?Bt(cn,{}):Bt("span",{className:s(e.className,wt,"k-icon k-i-loading")})};F.states=mn;F.className=wt;import{Fragment as fn,jsx as Ut}from"react/jsx-runtime";var Ft="k-input-validation-icon",dn=[n.valid,n.invalid,n.disabled,n.loading],un={},D=e=>{let{valid:t,invalid:o,disabled:i,loading:r}=e,l=o?"warning-circle":"check-circle";return i||r||!!!(t||o)?Ut(fn,{}):Ut(M,{className:s(Ft),icon:l})};D.states=dn;D.options=un;D.className=Ft;import{Fragment as hn,jsx as Gt}from"react/jsx-runtime";var xn="k-input-prefix",Nn={direction:"horizontal"},Pe=e=>{let{direction:t=Nn.direction,...o}=e;return e.children?Gt("span",{...o,className:s(xn,e.className,{[`k-input-prefix-${t}`]:t}),children:e.children}):Gt(hn,{})};import{Fragment as An,jsx as Vt}from"react/jsx-runtime";var Ln="k-input-suffix",bn={direction:"horizontal"},ze=e=>{let{direction:t=bn.direction,...o}=e;return e.children?Vt("span",{...o,className:s(Ln,e.className,{[`k-input-suffix-${t}`]:t}),children:e.children}):Vt(An,{})};import{jsx as Qi}from"react/jsx-runtime";import{jsx as ea}from"react/jsx-runtime";import{jsx as Mn}from"react/jsx-runtime";var $t="k-input-separator",Sn={direction:"vertical"},ae=e=>{let{direction:t=Sn.direction,...o}=e;return Mn("span",{...o,className:s($t,e.className,{[`${$t}-${t}`]:t})})};var ot="popup",Xt=ot;import{jsx as Jt}from"react/jsx-runtime";var qt="k-animation-container",En=[],In={},Wt={positionMode:"absolute"},K=e=>{let{positionMode:t=Wt.positionMode,animationStyle:o,offset:i,...r}=e;return Jt("div",{...r,style:{...i,...e.style},className:s(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})})};K.states=En;K.options=In;K.className=qt;K.defaultOptions=Wt;K.moduleName=ot;K.folderName=Xt;var nt="popup",Qt=nt;import{jsx as Yt}from"react/jsx-runtime";var Zt="k-popup",vn=[],Cn={},jt={positionMode:"absolute"},G=e=>{let{offset:t,positionMode:o=jt.positionMode,animationStyle:i,...r}=e;return Yt(K,{positionMode:o,offset:t,animationStyle:i,children:Yt("div",{...r,className:s(e.className,Zt),children:e.children})})};G.states=vn;G.options=Cn;G.className=Zt;G.defaultOptions=jt;G.moduleName=nt;G.folderName=Qt;var st="action-buttons",eo=st;import{jsx as gn}from"react/jsx-runtime";var De="k-actions",Tn=[],On={},it={alignment:"start",orientation:"horizontal"},V=e=>{let{alignment:t=it.alignment,orientation:o=it.orientation,...i}=e;return gn("div",{...i,className:s(De,{[`${De}-${t}`]:t,[`${De}-${o}`]:o},e.className),children:e.children})};V.states=Tn;V.options=On;V.className=De;V.defaultOptions=it;V.moduleName=st;V.folderName=eo;import{jsx as yn}from"react/jsx-runtime";var kn="k-actionsheet-footer",to={alignment:"stretched",orientation:"horizontal"},at=e=>{let{alignment:t=to.alignment,orientation:o=to.orientation,template:i,as:r=i?"div":V,...l}=e;return yn(r,{...l,...!i&&{alignment:t,orientation:o},className:s(e.className,kn),children:e.children})};var rt="searchbox",oo=rt;import{jsx as Le,jsxs as Hn}from"react/jsx-runtime";var no="k-searchbox",_n=[n.hover,n.focus,n.valid,n.invalid,n.required,n.disabled,n.loading],Kn={size:[a.small,a.medium,a.large],rounded:[f.small,f.medium,f.large,f.full],fillMode:[N.solid,N.flat,N.outline]},lt={showIcon:!0,icon:"search",size:E.defaultOptions.size,rounded:E.defaultOptions.rounded,fillMode:E.defaultOptions.fillMode},$=e=>{let{value:t,placeholder:o,size:i,rounded:r,fillMode:l,hover:p,focus:d,valid:c,invalid:u,required:h,loading:L,disabled:b,showIcon:A=lt.showIcon,icon:v=lt.icon,...I}=e;return Hn(E,{...I,size:i,rounded:r,fillMode:l,hover:p,focus:d,valid:c,invalid:u,required:h,loading:L,disabled:b,className:s(e.className,no),children:[A&&Le(M,{className:"k-input-icon",icon:v}),Le(z,{placeholder:o,value:t}),Le(F,{...e}),Le(D,{...e}),Le(P,{...e})]})};$.states=_n;$.options=Kn;$.className=no;$.defaultOptions=lt;$.moduleName=rt;$.folderName=oo;import{jsx as tr}from"react/jsx-runtime";var pt="textbox",so=pt;import{Fragment as io,jsx as X,jsxs as mt}from"react/jsx-runtime";var ao="k-textbox",Rn=[n.hover,n.focus,n.valid,n.invalid,n.required,n.disabled,n.loading,n.readonly],Pn={size:[a.small,a.medium,a.large],rounded:[f.small,f.medium,f.large,f.full],fillMode:[N.solid,N.flat,N.outline]},j={showClearButton:!0,showValidationIcon:!0,size:E.defaultOptions.size,rounded:E.defaultOptions.rounded,fillMode:E.defaultOptions.fillMode,separators:!0},J=e=>{let{size:t=j.size,rounded:o=j.rounded,fillMode:i=j.fillMode,separators:r=j.separators,showClearButton:l=j.showClearButton,showValidationIcon:p=j.showValidationIcon,prefix:d,suffix:c,type:u,value:h,placeholder:L,hover:b,focus:A,valid:v,invalid:I,required:O,loading:C,disabled:R,readonly:Te,...Ve}=e;return mt(E,{...Ve,size:t,rounded:o,fillMode:i,hover:b,focus:A,valid:v,invalid:I,required:O,loading:C,disabled:R,readonly:Te,className:s(e.className,ao),children:[d&&mt(io,{children:[X(Pe,{children:d}),r&&X(ae,{})]}),X(z,{placeholder:L,value:h,type:u}),p&&X(D,{valid:v,invalid:I,loading:C,disabled:R}),X(F,{loading:C,disabled:R}),l&&X(P,{loading:C,disabled:R,readonly:Te,value:h}),c&&mt(io,{children:[r&&X(ae,{}),X(ze,{children:c})]})]})};J.states=Rn;J.options=Pn;J.className=ao;J.defaultOptions=j;J.moduleName=pt;J.folderName=so;import{jsx as fr}from"react/jsx-runtime";import{Fragment as Ar,jsx as br}from"react/jsx-runtime";var ct="button",lo=ct;import{Fragment as wn,jsx as be,jsxs as po}from"react/jsx-runtime";var Ae="k-button",zn=["icon-button"],Dn=[n.hover,n.focus,n.active,n.selected,n.disabled,n.generating],Bn={size:[a.small,a.medium,a.large],rounded:[f.small,f.medium,f.large,f.full],fillMode:[N.solid,N.flat,N.outline,N.clear,N.link],themeColor:[m.base,m.primary,m.secondary,m.tertiary,m.success,m.warning,m.error,m.info,m.light,m.dark,m.inverse]},ee={size:a.medium,rounded:f.medium,fillMode:N.solid,themeColor:m.base,showArrow:!1,arrowIconName:"caret-alt-down"},_=e=>{let{size:t=ee.size,rounded:o=ee.rounded,fillMode:i=ee.fillMode,themeColor:r=ee.themeColor,showArrow:l=ee.showArrow,arrowIconName:p=ee.arrowIconName,variant:d,hover:c,focus:u,active:h,selected:L,disabled:b,icon:A,text:v,iconClassName:I,...O}=e,C=A!==void 0,R=e.children!==void 0;return po("button",{...O,className:s(e.className,Ae,gt(Ae,d),S(Ae,{size:t,rounded:o,fillMode:i,themeColor:r}),g(Ae,{hover:c,focus:u,active:h,disabled:b,selected:L}),{"k-icon-button":!v&&!R&&C}),children:[A&&be(M,{className:s(I,"k-button-icon"),icon:A}),v?po(wn,{children:[v&&be("span",{className:"k-button-text",children:v}),e.children]}):e.children&&be("span",{className:"k-button-text",children:e.children}),l&&be("span",{className:"k-menu-button-arrow k-button-arrow",children:be(M,{icon:p})})]})};_.states=Dn;_.options=Bn;_.variants=zn;_.className=Ae;_.defaultOptions=ee;_.moduleName=ct;_.folderName=lo;import{jsx as kr}from"react/jsx-runtime";import{jsx as Hr}from"react/jsx-runtime";import{jsx as Dr}from"react/jsx-runtime";import{Fragment as Qr,jsx as Wr}from"react/jsx-runtime";import{jsx as q,jsxs as dt}from"react/jsx-runtime";var mo="k-actionsheet-titlebar",Un={},W=e=>{let{title:t,subtitle:o,actionsStart:i,actionsEnd:r,filter:l,input:p,inputValue:d,inputPlaceholder:c,adaptive:u,children:h,...L}=e;return dt("div",{...L,className:s(e.className,mo),children:[dt("div",{className:"k-actionsheet-titlebar-group",children:[i&&q("div",{className:"k-actionsheet-actions",children:i}),!h&&dt("div",{className:"k-actionsheet-title",children:[t&&q("div",{className:"k-text-center",children:t}),o&&q("div",{className:"k-actionsheet-subtitle k-text-center",children:o})]}),h&&q("div",{className:"k-actionsheet-title",children:h}),r&&q("div",{className:"k-actionsheet-actions",children:r})]}),(p||l)&&q("div",{className:"k-actionsheet-titlebar-group k-actionsheet-filter",children:p?q(J,{value:d,placeholder:c,size:u?"large":"medium"}):q($,{placeholder:"Filter",size:u?"large":"medium"})})]})};W.className=mo;W.defaultOptions=Un;import{jsx as ut,jsxs as $n}from"react/jsx-runtime";var ft="k-actionsheet-view",Fn=[],Gn={},Vn={},re=e=>{let{adaptive:t,animated:o,children:i,header:r,footer:l,...p}=e,d=r?.type===W&&ut(W,{adaptive:t,...r?.props}),c=l?.type===at&&ut(at,{...l?.props});return $n("div",{...p,className:s(e.className,ft,{[`${ft}-animated`]:o}),children:[d,ut("div",{className:"k-actionsheet-content",children:i}),c]})};re.states=Fn;re.options=Gn;re.className=ft;re.defaultOptions=Vn;var Se="action-sheet",Be=Se;import{jsx as we,jsxs as qn}from"react/jsx-runtime";var co="k-actionsheet",Xn=[],Jn={},Me={side:"bottom",fullscreen:!1,adaptive:!1,overlay:!0},B=e=>{let{side:t=Me.side,fullscreen:o=Me.fullscreen,adaptive:i=Me.adaptive,overlay:r=Me.overlay,template:l,children:p,header:d,footer:c,...u}=e;return qn("div",{className:"k-actionsheet-container",children:[r&&we("div",{className:"k-overlay"}),we(K,{animationStyle:{[`${o===!0?"top":t}`]:0,[`${o===!0?"width":null}`]:"100%",[`${o===!0?"height":null}`]:"100%",[`${t==="top"||t==="bottom"?"width":null}`]:"100%",[`${t==="left"||t==="right"?"height":null}`]:"100%"},children:we("div",{...u,className:s(e.className,co,{[`k-actionsheet-${t}`]:o===!1,"k-actionsheet-fullscreen":o===!0,"k-adaptive-actionsheet":i}),children:l||we(re,{header:d,footer:c,adaptive:i,...e,children:p})})})]})};B.states=Xn;B.options=Jn;B.className=co;B.defaultOptions=Me;B.moduleName=Se;B.folderName=Be;import{jsx as Zn}from"react/jsx-runtime";var uo="k-actionsheet-container",Wn=[],Qn={},Yn={},le=e=>{let{children:t,...o}=e;return Zn("div",{...o,className:uo,children:t})};le.states=Wn;le.options=Qn;le.className=uo;le.defaultOptions=Yn;le.moduleName=Se;le.folderName=Be;import{jsx as vl}from"react/jsx-runtime";import{Fragment as es,jsx as Ee,jsxs as xt}from"react/jsx-runtime";var Nt="k-actionsheet-item",jn=[n.hover,n.focus,n.selected,n.disabled],ht=e=>{let{iconName:t,text:o,description:i,hover:r,focus:l,selected:p,disabled:d,...c}=e;return xt("span",{...c,className:s(e.className,Nt,g(Nt,{hover:r,focus:l,selected:p,disabled:d})),children:[!e.children&&Ee(es,{children:xt("span",{className:"k-actionsheet-action",children:[t&&Ee("span",{className:"k-icon-wrap",children:Ee(M,{className:"k-actionsheet-item-icon",icon:t})}),xt("span",{className:"k-actionsheet-item-text",children:[o&&Ee("span",{className:"k-actionsheet-item-title",children:o}),i&&Ee("span",{className:"k-actionsheet-item-description",children:i})]})]})}),e.children]})};ht.states=jn;ht.className=Nt;import{jsx as Hl,jsxs as Rl}from"react/jsx-runtime";import{jsx as Bl}from"react/jsx-runtime";import{jsx as Gl}from"react/jsx-runtime";import{jsx as Jl}from"react/jsx-runtime";import{jsx as os}from"react/jsx-runtime";var ts="k-no-data",Ie=e=>os("span",{className:s(ts,e.className),children:e.children});var w="list",Q=w;import{jsx as pe,jsxs as xo}from"react/jsx-runtime";var Lt="k-list",ns=[],ss={size:[a.small,a.medium,a.large]},No={size:a.medium},k=e=>{let{size:t=No.size,virtualization:o,children:i,optionLabel:r,customValue:l,screenReaders:p,...d}=e,c,u,h,L,b=[];return i?i.map((A,v)=>{A.type===y?(A.props.root===!0?(c=A.props.label,A.props.children.map((I,O)=>{b.push(pe(x,{...I.props},`optChild-${O}-${new Date().getTime()}`))})):A.props.children.forEach((I,O)=>{let C="";O===0&&(C=A.props.label),b.push(pe(x,{className:O===0?"k-first":"",...I.props,groupLabel:C},`groupLabel-${O}-${new Date().getTime()}`))}),u=pe(y,{label:c,virtualization:o,children:b})):A.type===x&&(b.push(pe(x,{...A.props},`${A.type}-${v}`)),h=pe(me,{virtualization:o,children:b}),p&&(L=xo(Ie,{className:"k-sr-only",children:[b.length," items found."]})))}):L=pe(Ie,{children:"No data found."}),xo("div",{...d,className:s(e.className,Lt,S(Lt,{size:t}),{"k-virtual-list":o}),children:[r,l,u,h,L]})};k.states=ns;k.options=ss;k.className=Lt;k.defaultOptions=No;k.moduleName=w;k.folderName=Q;import{jsx as ls}from"react/jsx-runtime";var ho="k-list-container",is=[],as={},rs={},ce=e=>{let{...t}=e;return ls("div",{...t,className:s(e.className,ho),children:e.children})};ce.states=is;ce.options=as;ce.className=ho;ce.defaultOptions=rs;ce.moduleName=w;ce.folderName=Q;import{jsx as te,jsxs as cs}from"react/jsx-runtime";var bt="k-list",ps=[],ms={size:[a.small,a.medium,a.large]},Lo={size:a.medium},U=e=>{let{size:t=Lo.size,virtualization:o,children:i,...r}=e,l,p,d,c=[];return i?i.map((u,h)=>{u.type===y?(u.props.root===!0?(l=u.props.label,u.props.children.map((L,b)=>{c.push(te(x,{...L.props},`optChild-${b}-${new Date().getTime()}`))})):(c.push(te(bo,{...u.props,children:u.props.label},`listChild-${h}`)),u.props.children.map((L,b)=>{c.push(te(x,{...L.props},`fwOptChild-${b}-${new Date().getTime()}`))})),p=te(y,{label:l,virtualization:o,children:c})):u.type===x&&(c.push(te(x,{...u.props},`${u.type}-${h}`)),d=te(me,{virtualization:o,children:c}))}):d=te(Ie,{children:"No data found."}),cs("div",{...r,className:s(e.className,bt,S(bt,{size:t}),{"k-virtual-list":o}),children:[p,d]})};U.states=ps;U.options=ms;U.className=bt;U.defaultOptions=Lo;U.moduleName=w;U.folderName=Q;var oe="checkbox",de=oe;import{jsx as Ao}from"react/jsx-runtime";var Ue="k-checkbox",ds=[n.hover,n.focus,n.valid,n.invalid,n.required,n.disabled,n.checked,n.indeterminate],us={size:[a.small,a.medium,a.large],rounded:[f.small,f.medium,f.large,f.full]},At={size:a.medium,rounded:f.medium},H=e=>{let{id:t,checked:o,indeterminate:i,hover:r,focus:l,disabled:p,invalid:d,valid:c,required:u,size:h=At.size,rounded:L=At.rounded,...b}=e;return Ao("span",{className:"k-checkbox-wrap",children:Ao("input",{...b,id:t,type:"checkbox",defaultChecked:o,required:u,className:s(e.className,Ue,S(Ue,{size:h,rounded:L}),g(Ue,{hover:r,focus:l,disabled:p,invalid:d,valid:c,indeterminate:i,checked:o}))})})};H.states=ds;H.options=us;H.className=Ue;H.defaultOptions=At;H.moduleName=oe;H.folderName=de;import{jsx as Ns}from"react/jsx-runtime";var So="k-checkbox-list",fs=[],xs={},Mo={layout:"vertical"},Y=e=>{let{layout:t=Mo.layout,...o}=e;return Ns("ul",{...o,className:s(e.className,So,{[`k-list-${t}`]:t}),children:e.children})};Y.states=fs;Y.options=xs;Y.className=So;Y.defaultOptions=Mo;Y.moduleName=oe;Y.folderName=de;import{jsx as As}from"react/jsx-runtime";var Eo="k-checkbox-list-item",hs=[],Ls={},bs={},Z=e=>{let{...t}=e;return As("li",{...t,className:s(e.className,Eo),children:e.children})};Z.states=hs;Z.options=Ls;Z.className=Eo;Z.defaultOptions=bs;Z.moduleName=oe;Z.folderName=de;import{Fragment as $p,jsx as Vp,jsxs as Xp}from"react/jsx-runtime";import{Fragment as Yp,jsx as Qp,jsxs as Zp}from"react/jsx-runtime";import{Fragment as nm,jsx as om,jsxs as sm}from"react/jsx-runtime";import{Fragment as pm,jsx as lm,jsxs as mm}from"react/jsx-runtime";import{jsx as fm}from"react/jsx-runtime";import{jsx as Lm}from"react/jsx-runtime";import{jsx as Fe,jsxs as Is}from"react/jsx-runtime";var Mt="k-list-item",Ss=[n.hover,n.focus,n.selected,n.disabled],Ms={},Es={},x=e=>{let{text:t,groupLabel:o,group:i,showIcon:r,iconName:l,showCheckbox:p,checked:d,hover:c,focus:u,selected:h,disabled:L,...b}=e,A=t||e.children;return Is("li",{...b,className:s(e.className,i?"k-list-group-item":Mt,g(Mt,{hover:c,focus:u,disabled:L,selected:h})),children:[p&&Fe(H,{checked:d}),r&&Fe(M,{icon:l}),Fe("span",{className:"k-list-item-text",children:A}),o&&o!==""&&Fe("div",{className:"k-list-item-group-label",children:o})]})};x.states=Ss;x.options=Ms;x.className=Mt;x.defaultOptions=Es;x.moduleName=w;x.folderName=Q;import{jsx as Et,jsxs as Cs}from"react/jsx-runtime";var vs="k-list-content",me=e=>{let{virtualization:t,...o}=e;return Cs("div",{...o,className:s(vs,e.className),children:[Et("ul",{className:s("k-list-ul"),children:e.children}),t&&Et("div",{className:"k-height-container",children:Et("div",{})})]})};import{jsx as Io}from"react/jsx-runtime";var Ts="k-list-group-sticky-header",vo=e=>Io("div",{className:s(Ts,e.className),children:Io("div",{className:"k-list-header-text",children:e.children})});import{Fragment as Os,jsx as Co,jsxs as gs}from"react/jsx-runtime";var y=e=>{let{virtualization:t,label:o}=e;return gs(Os,{children:[o&&Co(vo,{children:o}),e.children&&Co(me,{virtualization:t,children:e.children})]})};import{jsx as To}from"react/jsx-runtime";var ks="k-list-group-item",bo=e=>To("li",{className:s(ks,e.className),children:To("span",{className:"k-list-item-text",children:e.children})});import{jsx as Hs}from"react/jsx-runtime";var It="k-list-optionlabel",ys=[n.hover,n.focus,n.selected,n.disabled],_s={},Ks={},Ge=e=>{let{text:t,hover:o,focus:i,selected:r,disabled:l,...p}=e;return Hs("div",{...p,className:s(It,g(It,{hover:o,focus:i,selected:r,disabled:l})),children:t})};Ge.states=ys;Ge.options=_s;Ge.className=It;Ge.defaultOptions=Ks;import{jsx as Ds}from"react/jsx-runtime";var vt="k-list-custom-value",Rs=[n.hover,n.focus,n.selected,n.disabled],Ps={},zs={},ue=e=>{let{text:t,hover:o,focus:i,selected:r,disabled:l,...p}=e;return Ds("div",{...p,className:s(vt,g(vt,{hover:o,focus:i,selected:r,disabled:l})),children:t})};ue.states=Rs;ue.options=Ps;ue.className=vt;ue.defaultOptions=zs;import{jsx as oc}from"react/jsx-runtime";import{jsx as ac}from"react/jsx-runtime";import{jsx as mc,jsxs as cc}from"react/jsx-runtime";import{jsx as xc,jsxs as Nc}from"react/jsx-runtime";import{jsx as Ac}from"react/jsx-runtime";import{jsx as Ic,jsxs as vc}from"react/jsx-runtime";import{jsx as gc,jsxs as kc}from"react/jsx-runtime";var Ct="autocomplete",Oo=Ct;import{Fragment as Tt,jsx as T,jsxs as ve}from"react/jsx-runtime";var go="k-autocomplete",Bs=[n.hover,n.focus,n.valid,n.invalid,n.required,n.disabled,n.loading,n.readonly],ws={size:[a.small,a.medium,a.large],rounded:[f.small,f.medium,f.large,f.full],fillMode:[N.solid,N.flat,N.outline]},Ce={size:E.defaultOptions.size,rounded:E.defaultOptions.rounded,fillMode:E.defaultOptions.fillMode,separators:!0},ne=e=>{let{size:t=Ce.size,rounded:o=Ce.rounded,fillMode:i=Ce.fillMode,separators:r=Ce.separators,prefix:l,suffix:p,value:d,placeholder:c,hover:u,focus:h,valid:L,invalid:b,required:A,loading:v,disabled:I,popup:O,opened:C,readonly:R,adaptive:Te,adaptiveSettings:Ve,adaptiveTitle:yo,adaptiveSubtitle:_o,adaptiveCustomValue:Ko,...Ho}=e;return ve(Tt,{children:[ve(E,{...Ho,size:t,rounded:o,fillMode:i,hover:u,focus:h,valid:L,invalid:b,required:A,loading:v,disabled:I,readonly:R,className:s(e.className,go),children:[l&&ve(Tt,{children:[T(Pe,{children:l}),r&&T(ae,{})]}),T(z,{placeholder:c,value:d}),T(D,{valid:L,invalid:b,loading:v,disabled:I}),T(F,{loading:v,disabled:I}),T(P,{loading:v,disabled:I,readonly:R,value:d}),p&&ve(Tt,{children:[r&&T(ae,{}),T(ze,{children:p})]})]}),C&&O&&T(G,{className:"k-list-container k-autocomplete-popup",children:O}),Te&&T(B,{adaptive:!0,...Ve,header:T(W,{actionsEnd:T(_,{icon:"check",themeColor:"primary",size:"large",fillMode:"flat"}),input:!0,inputValue:d,inputPlaceholder:c,title:yo,subtitle:_o}),children:T("div",{className:"k-list-container",children:ve(k,{customValue:Ko?T(ue,{text:`Use "${d}"`}):void 0,size:"large",children:[T(x,{text:"List item"}),T(x,{text:"List item"}),T(x,{text:"List item"})]})})})]})};ne.states=Bs;ne.options=ws;ne.className=go;ne.defaultOptions=Ce;ne.moduleName=Ct;ne.folderName=Oo;var ko=ne;import{jsx as se,jsxs as Ot}from"react/jsx-runtime";var pd=e=>se(ko,{opened:!0,popup:Ot(k,{children:[Ot(y,{label:"Group 1",root:!0,children:[se(x,{children:"List group 1 item 1"}),se(x,{children:"List group 1 item 2"}),se(x,{children:"List group 1 item 3"})]}),Ot(y,{label:"Group 2",children:[se(x,{children:"List group 1 item 1"}),se(x,{children:"List group 1 item 2"}),se(x,{children:"List group 1 item 3"})]})]}),...e});export{pd as AutocompleteGrouping};