UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

2 lines (1 loc) 25.5 kB
var n=(...e)=>e.filter(t=>t!==!0&&!!t).map(t=>Array.isArray(t)?n(...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)=>n({[`${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"}),y=(e,t)=>n({"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"},u={small:"small",medium:"medium",large:"large",full:"full"},h={solid:"solid",flat:"flat",outline:"outline",clear:"clear",link:"link"},c={inherit:"inherit",base:"base",primary:"primary",secondary:"secondary",tertiary:"tertiary",info:"info",success:"success",warning:"warning",error:"error",dark:"dark",light:"light",inverse:"inverse"},s={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 io}from"react/jsx-runtime";var no="k-no-data",ae=e=>io("span",{className:n(no,e.className),children:e.children});import{jsx as W,jsxs as ct}from"react/jsx-runtime";var Ke="k-list",ao=[],ro={size:[a.small,a.medium,a.large]},dt={size:a.medium},z=e=>{let{size:t=dt.size,virtualization:o,children:i,optionLabel:r,customValue:l,screenReaders:p,...m}=e,d,f,b,L,N=[];return i?i.map((v,C)=>{v.type===M?(v.props.root===!0?(d=v.props.label,v.props.children.map((A,T)=>{N.push(W(x,{...A.props},`optChild-${T}-${new Date().getTime()}`))})):v.props.children.forEach((A,T)=>{let O="";T===0&&(O=v.props.label),N.push(W(x,{className:T===0?"k-first":"",...A.props,groupLabel:O},`groupLabel-${T}-${new Date().getTime()}`))}),f=W(M,{label:d,virtualization:o,children:N})):v.type===x&&(N.push(W(x,{...v.props},`${v.type}-${C}`)),b=W(Q,{virtualization:o,children:N}),p&&(L=ct(ae,{className:"k-sr-only",children:[N.length," items found."]})))}):L=W(ae,{children:"No data found."}),ct("div",{...m,className:n(e.className,Ke,S(Ke,{size:t}),{"k-virtual-list":o}),children:[r,l,f,b,L]})};z.states=ao;z.options=ro;z.className=Ke;z.defaultOptions=dt;import{jsx as X,jsxs as co}from"react/jsx-runtime";var Re="k-list",lo=[],po={size:[a.small,a.medium,a.large]},mt={size:a.medium},D=e=>{let{size:t=mt.size,virtualization:o,children:i,...r}=e,l,p,m,d=[];return i?i.map((f,b)=>{f.type===M?(f.props.root===!0?(l=f.props.label,f.props.children.map((L,N)=>{d.push(X(x,{...L.props},`optChild-${N}-${new Date().getTime()}`))})):(d.push(X(ut,{...f.props,children:f.props.label},`listChild-${b}`)),f.props.children.map((L,N)=>{d.push(X(x,{...L.props},`fwOptChild-${N}-${new Date().getTime()}`))})),p=X(M,{label:l,virtualization:o,children:d})):f.type===x&&(d.push(X(x,{...f.props},`${f.type}-${b}`)),m=X(Q,{virtualization:o,children:d}))}):m=X(ae,{children:"No data found."}),co("div",{...r,className:n(e.className,Re,S(Re,{size:t}),{"k-virtual-list":o}),children:[p,m]})};D.states=lo;D.options=po;D.className=Re;D.defaultOptions=mt;import{jsx as ft}from"react/jsx-runtime";var Le="k-checkbox",mo=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.checked,s.indeterminate],uo={size:[a.small,a.medium,a.large],rounded:[u.small,u.medium,u.large,u.full]},Pe={size:a.medium,rounded:u.medium},P=e=>{let{id:t,checked:o,indeterminate:i,hover:r,focus:l,disabled:p,invalid:m,valid:d,required:f,size:b=Pe.size,rounded:L=Pe.rounded,...N}=e;return ft("span",{className:"k-checkbox-wrap",children:ft("input",{...N,id:t,type:"checkbox",defaultChecked:o,required:f,className:n(e.className,Le,S(Le,{size:b,rounded:L}),y(Le,{hover:r,focus:l,disabled:p,invalid:m,valid:d,indeterminate:i,checked:o}))})})};P.states=mo;P.options=uo;P.className=Le;P.defaultOptions=Pe;import{jsx as ho}from"react/jsx-runtime";var xt="k-checkbox-list",fo=[],xo={},ht={layout:"vertical"},Y=e=>{let{layout:t=ht.layout,...o}=e;return ho("ul",{...o,className:n(e.className,xt,{[`k-list-${t}`]:t}),children:e.children})};Y.states=fo;Y.options=xo;Y.className=xt;Y.defaultOptions=ht;import{jsx as vo}from"react/jsx-runtime";var bt="k-checkbox-list-item",bo=[],Lo={},No={},Z=e=>{let{...t}=e;return vo("li",{...t,className:n(e.className,bt),children:e.children})};Z.states=bo;Z.options=Lo;Z.className=bt;Z.defaultOptions=No;import{Fragment as wn,jsx as Pn,jsxs as Gn}from"react/jsx-runtime";import{Fragment as Xn,jsx as _n,jsxs as Dn}from"react/jsx-runtime";import{Fragment as Wn,jsx as Un,jsxs as Qn}from"react/jsx-runtime";import{Fragment as ti,jsx as ei,jsxs as oi}from"react/jsx-runtime";import{jsx as ai}from"react/jsx-runtime";import{jsx as ci}from"react/jsx-runtime";import{Fragment as ko,jsx as Lt}from"react/jsx-runtime";var Ge="k-icon k-font-icon",So=[],Io={size:[a.xsmall,a.small,a.medium,a.large,a.xlarge,a.xxlarge,a.xxxlarge],themeColor:[c.base,c.primary,c.secondary,c.tertiary,c.success,c.warning,c.error,c.info,c.light,c.dark]},go={},re=e=>{let{size:t,themeColor:o,icon:i,rotate:r,flip:l,...p}=e;return i?Lt("span",{...p,className:n(e.className,Ge,S(Ge,{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"})}):Lt(ko,{})};re.states=So;re.options=Io;re.className=Ge;re.defaultOptions=go;var Nt=re;import{Fragment as Co,jsx as Ne}from"react/jsx-runtime";var Ve="k-icon k-svg-icon",yo=[],Ao={size:[a.xsmall,a.small,a.medium,a.large,a.xlarge,a.xxlarge,a.xxxlarge],themeColor:[c.base,c.primary,c.secondary,c.tertiary,c.success,c.warning,c.error,c.info,c.light,c.dark]},vt={viewBox:"0 0 24 24"},le=e=>{let{size:t,themeColor:o,rotate:i,flip:r,viewBox:l=vt.viewBox,icon:p,...m}=e;if(!p)return Ne(Co,{});p==="none"&&{...m,className:n(e.className,Ve,"k-none")};let d=typeof p=="object"&&p.name&&p.name;return Ne("span",{...m,className:n(e.className,Ve,S("k-icon",{size:t}),{[`k-svg-i-${d}`]:d,[`k-color-${o}`]:o,[`k-rotate-${i}`]:i,"k-flip-h":r==="h"||r==="both","k-flip-v":r==="v"||r==="both"}),children:Ne("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})})};le.states=yo;le.options=Ao;le.className=Ve;le.defaultOptions=vt;var Be=le;import*as St from"@progress/kendo-svg-icons";import{Fragment as It,jsx as pe}from"react/jsx-runtime";var Mo=e=>e.replace(/([-_][a-z0-9])/gi,t=>t.toUpperCase().replace("-","").replace("_","")),To=[],zo={size:[a.xsmall,a.small,a.medium,a.large,a.xlarge,a.xxlarge,a.xxxlarge],themeColor:[c.base,c.primary,c.secondary,c.tertiary,c.success,c.warning,c.error,c.info,c.light,c.dark]},$e={viewBox:"0 0 24 24",type:"svg"},I=e=>{let{size:t,themeColor:o,icon:i,type:r=$e.type,rotate:l,flip:p,viewBox:m=$e.viewBox,...d}=e;if(!i)return pe(It,{});if(r==="svg"){if(i==="none")return pe(Be,{...d,icon:i,size:t});let f=Mo(`${i}-icon`);return St[f]?pe(Be,{...d,icon:St[f],size:t,themeColor:o,rotate:l,flip:p,viewBox:m}):pe(It,{})}return pe(Nt,{...d,icon:i,size:t,themeColor:o,rotate:l,flip:p})};I.states=To;I.options=zo;I.defaultOptions=$e;import{jsx as ve,jsxs as Ko}from"react/jsx-runtime";var _e="k-list-item",Oo=[s.hover,s.focus,s.selected,s.disabled],Eo={},Ho={},x=e=>{let{text:t,groupLabel:o,group:i,showIcon:r,iconName:l,showCheckbox:p,checked:m,hover:d,focus:f,selected:b,disabled:L,...N}=e,v=t||e.children;return Ko("li",{...N,className:n(e.className,i?"k-list-group-item":_e,y(_e,{hover:d,focus:f,disabled:L,selected:b})),children:[p&&ve(P,{checked:m}),r&&ve(I,{icon:l}),ve("span",{className:"k-list-item-text",children:v}),o&&o!==""&&ve("div",{className:"k-list-item-group-label",children:o})]})};x.states=Oo;x.options=Eo;x.className=_e;x.defaultOptions=Ho;import{jsx as Xe,jsxs as Po}from"react/jsx-runtime";var Ro="k-list-content",Q=e=>{let{virtualization:t,...o}=e;return Po("div",{...o,className:n(Ro,e.className),children:[Xe("ul",{className:n("k-list-ul"),children:e.children}),t&&Xe("div",{className:"k-height-container",children:Xe("div",{})})]})};import{jsx as gt}from"react/jsx-runtime";var wo="k-list-group-sticky-header",kt=e=>gt("div",{className:n(wo,e.className),children:gt("div",{className:"k-list-header-text",children:e.children})});import{Fragment as Go,jsx as yt,jsxs as Vo}from"react/jsx-runtime";var M=e=>{let{virtualization:t,label:o}=e;return Vo(Go,{children:[o&&yt(kt,{children:o}),e.children&&yt(Q,{virtualization:t,children:e.children})]})};import{jsx as At}from"react/jsx-runtime";var Bo="k-list-group-item",ut=e=>At("li",{className:n(Bo,e.className),children:At("span",{className:"k-list-item-text",children:e.children})});import{jsx as Do}from"react/jsx-runtime";var De="k-list-optionlabel",$o=[s.hover,s.focus,s.selected,s.disabled],_o={},Xo={},Se=e=>{let{text:t,hover:o,focus:i,selected:r,disabled:l,...p}=e;return Do("div",{...p,className:n(De,y(De,{hover:o,focus:i,selected:r,disabled:l})),children:t})};Se.states=$o;Se.options=_o;Se.className=De;Se.defaultOptions=Xo;import{jsx as Uo}from"react/jsx-runtime";var Fe="k-list-custom-value",Fo=[s.hover,s.focus,s.selected,s.disabled],Jo={},qo={},j=e=>{let{text:t,hover:o,focus:i,selected:r,disabled:l,...p}=e;return Uo("div",{...p,className:n(Fe,y(Fe,{hover:o,focus:i,selected:r,disabled:l})),children:t})};j.states=Fo;j.options=Jo;j.className=Fe;j.defaultOptions=qo;import{jsx as la}from"react/jsx-runtime";import{jsx as ma}from"react/jsx-runtime";import{jsx as ha,jsxs as ba}from"react/jsx-runtime";import{jsx as Sa,jsxs as Ia}from"react/jsx-runtime";import{jsx as Aa}from"react/jsx-runtime";import{jsx as za,jsxs as Oa}from"react/jsx-runtime";import{jsx as Ra,jsxs as Pa}from"react/jsx-runtime";import{jsx as Yo}from"react/jsx-runtime";var Ie="k-input",Wo=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading,s.readonly],Qo={size:[a.small,a.medium,a.large],rounded:[u.small,u.medium,u.large,u.full],fillMode:[h.solid,h.flat,h.outline]},ge={size:a.medium,rounded:a.medium,fillMode:h.solid},g=e=>{let{hover:t,focus:o,disabled:i,invalid:r,valid:l,loading:p,readonly:m,size:d=ge.size,rounded:f=ge.rounded,fillMode:b=ge.fillMode,...L}=e;return Yo("span",{...L,className:n(e.className,Ie,S(Ie,{size:d,rounded:f,fillMode:b}),y(Ie,{hover:t,focus:o,disabled:i,invalid:r,valid:l,loading:p,readonly:m}))})};g.states=Wo;g.options=Qo;g.className=Ie;g.defaultOptions=ge;import{jsx as es}from"react/jsx-runtime";var ke="k-picker",Zo=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading,s.readonly],jo={size:[a.small,a.medium,a.large],rounded:[u.small,u.medium,u.large,u.full],fillMode:[h.solid,h.flat,h.outline]},ye={size:a.medium,rounded:u.medium,fillMode:h.solid},Ae=e=>{let{hover:t,focus:o,disabled:i,invalid:r,valid:l,loading:p,readonly:m,size:d=ye.size,rounded:f=ye.rounded,fillMode:b=ye.fillMode,...L}=e;return es("span",{...L,className:n(e.className,ke,S(ke,{size:d,rounded:f,fillMode:b}),y(ke,{hover:t,focus:o,disabled:i,invalid:r,valid:l,loading:p,readonly:m})),children:e.children})};Ae.states=Zo;Ae.options=jo;Ae.className=ke;Ae.defaultOptions=ye;import{Fragment as ss,jsx as Je}from"react/jsx-runtime";var Ct="k-clear-value",ts=[s.disabled,s.loading,s.readonly],os={},H=e=>{let{disabled:t,loading:o,readonly:i,value:r}=e;return t||i||o||!r?Je(ss,{}):Je("span",{className:n(e.className,Ct),children:Je(I,{icon:"x"})})};H.states=ts;H.options=os;H.className=Ct;import{jsx as as}from"react/jsx-runtime";var qe="k-input-inner",ns=[],is={},Ce={type:"text",autocomplete:"off",value:"",placeholder:""},K=e=>{let{value:t=Ce.value,type:o=Ce.type,placeholder:i=Ce.placeholder,autocomplete:r=Ce.autocomplete,...l}=e;return as("input",{...l,type:o,className:n(e.className,qe,S(qe,e)),placeholder:i,autoComplete:r,defaultValue:t})};K.states=ns;K.options=is;K.className=qe;import{jsx as Mt,jsxs as ps}from"react/jsx-runtime";var Ue="k-input-inner",rs=[],ls={},We=e=>{let{value:t,placeholder:o,showValue:i,valueIcon:r,valueIconName:l,...p}=e;return ps("span",{...p,className:n(e.className,Ue,S(Ue,e)),children:[r,!r&&l&&Mt(I,{className:"k-input-value-icon",icon:l}),i&&!t&&o,i&&t&&Mt("span",{className:"k-input-value-text",children:t})]})};We.states=rs;We.options=ls;We.className=Ue;import{jsx as ms}from"react/jsx-runtime";var Qe="k-input-inner",cs=[],ds={},Tt={value:"",placeholder:""},Ye=e=>{let{value:t=Tt.value,placeholder:o=Tt.placeholder,rows:i,...r}=e;return ms("textarea",{...r,className:n(e.className,Qe,S(Qe,e)),placeholder:o,rows:i,defaultValue:t})};Ye.states=cs;Ye.options=ds;Ye.className=Qe;import{Fragment as fs,jsx as zt}from"react/jsx-runtime";var Ot="k-input-loading-icon",us=[s.disabled,s.loading],w=e=>{let{disabled:t,loading:o}=e;return t||!o?zt(fs,{}):zt("span",{className:n(e.className,Ot,"k-icon k-i-loading")})};w.states=us;w.className=Ot;import{Fragment as bs,jsx as Et}from"react/jsx-runtime";var Ht="k-input-validation-icon",xs=[s.valid,s.invalid,s.disabled,s.loading],hs={},R=e=>{let{valid:t,invalid:o,disabled:i,loading:r}=e,l=o?"warning-circle":"check-circle";return i||r||!!!(t||o)?Et(bs,{}):Et(I,{className:n(Ht),icon:l})};R.states=xs;R.options=hs;R.className=Ht;import{Fragment as vs,jsx as Kt}from"react/jsx-runtime";var Ls="k-input-prefix",Ns={direction:"horizontal"},Me=e=>{let{direction:t=Ns.direction,...o}=e;return e.children?Kt("span",{...o,className:n(Ls,e.className,{[`k-input-prefix-${t}`]:t}),children:e.children}):Kt(vs,{})};import{Fragment as gs,jsx as Rt}from"react/jsx-runtime";var Ss="k-input-suffix",Is={direction:"horizontal"},Te=e=>{let{direction:t=Is.direction,...o}=e;return e.children?Rt("span",{...o,className:n(Ss,e.className,{[`k-input-suffix-${t}`]:t}),children:e.children}):Rt(gs,{})};import{jsx as Pr}from"react/jsx-runtime";import{jsx as Br}from"react/jsx-runtime";import{jsx as ys}from"react/jsx-runtime";var Pt="k-input-separator",ks={direction:"vertical"},ee=e=>{let{direction:t=ks.direction,...o}=e;return ys("span",{...o,className:n(Pt,e.className,{[`${Pt}-${t}`]:t})})};import{Fragment as Ms,jsx as ce,jsxs as wt}from"react/jsx-runtime";var ze="k-button",As=[s.hover,s.focus,s.active,s.selected,s.disabled],Cs={size:[a.small,a.medium,a.large],rounded:[u.small,u.medium,u.large,u.full],fillMode:[h.solid,h.flat,h.outline,h.clear,h.link],themeColor:[c.base,c.primary,c.secondary,c.tertiary,c.success,c.warning,c.error,c.info,c.light,c.dark,c.inverse]},F={size:a.medium,rounded:u.medium,fillMode:h.solid,themeColor:c.base,showArrow:!1,arrowIconName:"caret-alt-down"},E=e=>{let{size:t=F.size,rounded:o=F.rounded,fillMode:i=F.fillMode,themeColor:r=F.themeColor,showArrow:l=F.showArrow,arrowIconName:p=F.arrowIconName,hover:m,focus:d,active:f,selected:b,disabled:L,icon:N,text:v,iconClassName:C,...A}=e,T=N!==void 0,O=e.children!==void 0;return wt("button",{...A,className:n(e.className,ze,S(ze,{size:t,rounded:o,fillMode:i,themeColor:r}),y(ze,{hover:m,focus:d,active:f,disabled:L,selected:b}),{"k-icon-button":!v&&!O&&T}),children:[N&&ce(I,{className:n(C,"k-button-icon"),icon:N}),v?wt(Ms,{children:[v&&ce("span",{className:"k-button-text",children:v}),e.children]}):e.children&&ce("span",{className:"k-button-text",children:e.children}),l&&ce("span",{className:"k-menu-button-arrow k-button-arrow",children:ce(I,{icon:p})})]})};E.states=As;E.options=Cs;E.className=ze;E.defaultOptions=F;import{jsx as dl}from"react/jsx-runtime";import{jsx as xl}from"react/jsx-runtime";import{jsx as Nl}from"react/jsx-runtime";import{jsx as Gt}from"react/jsx-runtime";var Vt="k-animation-container",Ts=[],zs={},Bt={positionMode:"absolute"},G=e=>{let{positionMode:t=Bt.positionMode,animationStyle:o,offset:i,...r}=e;return Gt("div",{...r,style:{...i,...e.style},className:n(e.className,Vt,"k-animation-container-shown",{"k-animation-container-fixed":t==="fixed"}),children:Gt("div",{className:"k-child-animation-container",style:o,children:e.children})})};G.states=Ts;G.options=zs;G.className=Vt;G.defaultOptions=Bt;import{jsx as $t}from"react/jsx-runtime";var _t="k-popup",Os=[],Es={},Xt={positionMode:"absolute"},te=e=>{let{offset:t,positionMode:o=Xt.positionMode,animationStyle:i,...r}=e;return $t(G,{positionMode:o,offset:t,animationStyle:i,children:$t("div",{...r,className:n(e.className,_t),children:e.children})})};te.states=Os;te.options=Es;te.className=_t;te.defaultOptions=Xt;import{jsx as Rs}from"react/jsx-runtime";var Oe="k-actions",Hs=[],Ks={},Ze={alignment:"start",orientation:"horizontal"},oe=e=>{let{alignment:t=Ze.alignment,orientation:o=Ze.orientation,...i}=e;return Rs("div",{...i,className:n(Oe,{[`${Oe}-${t}`]:t,[`${Oe}-${o}`]:o},e.className),children:e.children})};oe.states=Hs;oe.options=Ks;oe.className=Oe;oe.defaultOptions=Ze;import{jsx as ws}from"react/jsx-runtime";var Ps="k-actionsheet-footer",Dt={alignment:"stretched",orientation:"horizontal"},je=e=>{let{alignment:t=Dt.alignment,orientation:o=Dt.orientation,template:i,as:r=i?"div":oe,...l}=e;return ws(r,{...l,...!i&&{alignment:t,orientation:o},className:n(e.className,Ps),children:e.children})};import{jsx as de,jsxs as Bs}from"react/jsx-runtime";var Ft="k-searchbox",Gs=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading],Vs={size:[a.small,a.medium,a.large],rounded:[u.small,u.medium,u.large,u.full],fillMode:[h.solid,h.flat,h.outline]},et={showIcon:!0,icon:"search",size:g.defaultOptions.size,rounded:g.defaultOptions.rounded,fillMode:g.defaultOptions.fillMode},se=e=>{let{value:t,placeholder:o,size:i,rounded:r,fillMode:l,hover:p,focus:m,valid:d,invalid:f,required:b,loading:L,disabled:N,showIcon:v=et.showIcon,icon:C=et.icon,...A}=e;return Bs(g,{...A,size:i,rounded:r,fillMode:l,hover:p,focus:m,valid:d,invalid:f,required:b,loading:L,disabled:N,className:n(e.className,Ft),children:[v&&de(I,{className:"k-input-icon",icon:C}),de(K,{placeholder:o,value:t}),de(w,{...e}),de(R,{...e}),de(H,{...e})]})};se.states=Gs;se.options=Vs;se.className=Ft;se.defaultOptions=et;import{jsx as ep}from"react/jsx-runtime";import{Fragment as Jt,jsx as V,jsxs as tt}from"react/jsx-runtime";var qt="k-textbox",$s=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading,s.readonly],_s={size:[a.small,a.medium,a.large],rounded:[u.small,u.medium,u.large,u.full],fillMode:[h.solid,h.flat,h.outline]},J={showClearButton:!0,showValidationIcon:!0,size:g.defaultOptions.size,rounded:g.defaultOptions.rounded,fillMode:g.defaultOptions.fillMode,separators:!0},ne=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:m,suffix:d,type:f,value:b,placeholder:L,hover:N,focus:v,valid:C,invalid:A,required:T,loading:O,disabled:_,readonly:be,...He}=e;return tt(g,{...He,size:t,rounded:o,fillMode:i,hover:N,focus:v,valid:C,invalid:A,required:T,loading:O,disabled:_,readonly:be,className:n(e.className,qt),children:[m&&tt(Jt,{children:[V(Me,{children:m}),r&&V(ee,{})]}),V(K,{placeholder:L,value:b,type:f}),p&&V(R,{valid:C,invalid:A,loading:O,disabled:_}),V(w,{loading:O,disabled:_}),l&&V(H,{loading:O,disabled:_,readonly:be,value:b}),d&&tt(Jt,{children:[r&&V(ee,{}),V(Te,{children:d})]})]})};ne.states=$s;ne.options=_s;ne.className=qt;ne.defaultOptions=J;import{jsx as dp}from"react/jsx-runtime";import{Fragment as bp,jsx as hp}from"react/jsx-runtime";import{Fragment as kp,jsx as gp}from"react/jsx-runtime";import{jsx as B,jsxs as ot}from"react/jsx-runtime";var Wt="k-actionsheet-titlebar",Xs={},$=e=>{let{title:t,subtitle:o,actionsStart:i,actionsEnd:r,filter:l,input:p,inputValue:m,inputPlaceholder:d,adaptive:f,children:b,...L}=e;return ot("div",{...L,className:n(e.className,Wt),children:[ot("div",{className:"k-actionsheet-titlebar-group",children:[i&&B("div",{className:"k-actionsheet-actions",children:i}),!b&&ot("div",{className:"k-actionsheet-title",children:[t&&B("div",{className:"k-text-center",children:t}),o&&B("div",{className:"k-actionsheet-subtitle k-text-center",children:o})]}),b&&B("div",{className:"k-actionsheet-title",children:b}),r&&B("div",{className:"k-actionsheet-actions",children:r})]}),(p||l)&&B("div",{className:"k-actionsheet-titlebar-group k-actionsheet-filter",children:p?B(ne,{value:m,placeholder:d,size:f?"large":"medium"}):B(se,{placeholder:"Filter",size:f?"large":"medium"})})]})};$.className=Wt;$.defaultOptions=Xs;import{jsx as st,jsxs as qs}from"react/jsx-runtime";var nt="k-actionsheet-view",Ds=[],Fs={},Js={},ie=e=>{let{adaptive:t,animated:o,children:i,header:r,footer:l,...p}=e,m=r?.type===$&&st($,{adaptive:t,...r?.props}),d=l?.type===je&&st(je,{...l?.props});return qs("div",{...p,className:n(e.className,nt,{[`${nt}-animated`]:o}),children:[m,st("div",{className:"k-actionsheet-content",children:i}),d]})};ie.states=Ds;ie.options=Fs;ie.className=nt;ie.defaultOptions=Js;import{jsx as Ee,jsxs as Qs}from"react/jsx-runtime";var Qt="k-actionsheet",Us=[],Ws={},me={side:"bottom",fullscreen:!1,adaptive:!1,overlay:!0},q=e=>{let{side:t=me.side,fullscreen:o=me.fullscreen,adaptive:i=me.adaptive,overlay:r=me.overlay,template:l,children:p,header:m,footer:d,...f}=e;return Qs("div",{className:"k-actionsheet-container",children:[r&&Ee("div",{className:"k-overlay"}),Ee(G,{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:Ee("div",{...f,className:n(e.className,Qt,{[`k-actionsheet-${t}`]:o===!1,"k-actionsheet-fullscreen":o===!0,"k-adaptive-actionsheet":i}),children:l||Ee(ie,{header:m,footer:d,adaptive:i,...e,children:p})})})]})};q.states=Us;q.options=Ws;q.className=Qt;q.defaultOptions=me;import{jsx as Up}from"react/jsx-runtime";import{Fragment as Zs,jsx as ue,jsxs as it}from"react/jsx-runtime";var at="k-actionsheet-item",Ys=[s.hover,s.focus,s.selected,s.disabled],rt=e=>{let{iconName:t,text:o,description:i,hover:r,focus:l,selected:p,disabled:m,...d}=e;return it("span",{...d,className:n(e.className,at,y(at,{hover:r,focus:l,selected:p,disabled:m})),children:[!e.children&&ue(Zs,{children:it("span",{className:"k-actionsheet-action",children:[t&&ue("span",{className:"k-icon-wrap",children:ue(I,{className:"k-actionsheet-item-icon",icon:t})}),it("span",{className:"k-actionsheet-item-text",children:[o&&ue("span",{className:"k-actionsheet-item-title",children:o}),i&&ue("span",{className:"k-actionsheet-item-description",children:i})]})]})}),e.children]})};rt.states=Ys;rt.className=at;import{jsx as sc,jsxs as nc}from"react/jsx-runtime";import{jsx as lc}from"react/jsx-runtime";import{jsx as mc}from"react/jsx-runtime";import{jsx as hc}from"react/jsx-runtime";import{Fragment as lt,jsx as k,jsxs as fe}from"react/jsx-runtime";var Zt="k-combobox",js=[s.hover,s.focus,s.valid,s.invalid,s.loading,s.required,s.disabled,s.readonly],en={size:[a.small,a.medium,a.large],rounded:[u.small,u.medium,u.large,u.full],fillMode:[h.solid,h.flat,h.outline]},xe={size:g.defaultOptions.size,rounded:g.defaultOptions.rounded,fillMode:g.defaultOptions.fillMode,separators:!0},he=e=>{let{size:t=xe.size,rounded:o=xe.rounded,fillMode:i=xe.fillMode,separators:r=xe.separators,prefix:l,suffix:p,value:m,placeholder:d,hover:f,focus:b,valid:L,invalid:N,required:v,loading:C,disabled:A,popup:T,opened:O,readonly:_,adaptive:be,adaptiveSettings:He,adaptiveTitle:eo,adaptiveSubtitle:to,adaptiveCustomValue:oo,...so}=e;return fe(lt,{children:[fe(g,{...so,size:t,rounded:o,fillMode:i,hover:f,focus:b,valid:L,invalid:N,required:v,loading:C,disabled:A,readonly:_,className:n(e.className,Zt),children:[l&&fe(lt,{children:[k(Me,{children:l}),r&&k(ee,{})]}),k(K,{placeholder:d,value:m}),k(R,{valid:L,invalid:N,loading:C,disabled:A}),k(w,{loading:C,disabled:A}),k(H,{loading:C,disabled:A,readonly:_,value:m}),p&&fe(lt,{children:[r&&k(ee,{}),k(Te,{children:p})]}),k(E,{className:"k-input-button",icon:"caret-alt-down",rounded:null,size:t,fillMode:i})]}),O&&T&&k(te,{className:"k-list-container k-combobox-popup",children:T}),be&&k(q,{adaptive:!0,...He,header:k($,{actionsEnd:k(E,{icon:"check",themeColor:"primary",size:"large",fillMode:"flat"}),input:!0,inputValue:m,inputPlaceholder:d,title:eo,subtitle:to}),children:k("div",{className:"k-list-container",children:fe(z,{customValue:oo?k(j,{text:`Use "${m}"`}):void 0,size:"large",children:[k(x,{text:"List item"}),k(x,{text:"List item"}),k(x,{text:"List item"})]})})})]})};he.states=js;he.options=en;he.className=Zt;he.defaultOptions=xe;var jt=he;import{jsx as U,jsxs as pt}from"react/jsx-runtime";var Bc=e=>U(jt,{opened:!0,popup:pt(z,{children:[pt(M,{label:"Group 1",root:!0,children:[U(x,{children:"List group 1 item 1"}),U(x,{children:"List group 1 item 2"}),U(x,{children:"List group 1 item 3"})]}),pt(M,{label:"Group 2",children:[U(x,{children:"List group 1 item 1"}),U(x,{children:"List group 1 item 2"}),U(x,{children:"List group 1 item 3"})]})]}),...e});export{Bc as ComboboxGrouping};