UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

2 lines (1 loc) 43.5 kB
import pt from"react";var a=(...e)=>e.filter(t=>t!==!0&&!!t).map(t=>Array.isArray(t)?a(...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 I=(e,t)=>a({[`${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.themeColor}`]:t.themeColor},{"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-rounded-none":t.rounded==="none"}),y=(e,t)=>{let{valid:o,invalid:i,hover:n,focus:r,checked:d,active:c,selected:m,disabled:f,indeterminate:b,loading:N,empty:v,readonly:O,highlighted:_,...k}=t;return a({"k-valid":o,"k-invalid":i,"k-hover":n,"k-focus":r,"k-checked":d,"k-active":c,"k-selected":m,"k-disabled":f,"k-indeterminate":b&&!d,"k-loading":N,"k-empty":v,"k-readonly":O,"k-highlighted":_},Object.keys(k).reduce((g,A)=>(A.startsWith("k-")?g[A]=k[A]:g[`k-${A}`]=k[A],g),{}))};function oo(e,t){if(!t)return{};let o=Array.isArray(t)?t:[t];return Object.fromEntries(o.map(i=>[`k-${i}`,!0]))}var l={undefined:void 0,xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},p={undefined:void 0,none:"none",small:"small",medium:"medium",large:"large",full:"full"},x={undefined:void 0,solid:"solid",flat:"flat",outline:"outline",clear:"clear",link:"link"},q={undefined:void 0,outline:"outline",solid:"solid",duotone:"duotone"},u={undefined:void 0,inherit:"inherit",base:"base",primary:"primary",secondary:"secondary",tertiary:"tertiary",info:"info",success:"success",warning:"warning",error:"error",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",generating:"generating",expanded:"expanded"};var lt={};function E(e){return lt[e]=(lt[e]||0)+1,`k-${e}-${lt[e]}`}import{jsx as no}from"react/jsx-runtime";var un="k-list-group-sticky-header",ct=e=>no("div",{className:a(un,e.className),children:no("div",{className:"k-list-header-text",children:e.children})});import{jsx as bn}from"react/jsx-runtime";var fn="k-no-data",dt=e=>{let{live:t,...o}=e;return bn("span",{...o,className:a(fn,e.className),"aria-live":t?"polite":void 0,children:e.children})};var re="list",ue=re;import{jsx as io,jsxs as ao}from"react/jsx-runtime";var mt="k-list",xn=[],hn={size:[l.undefined,l.small,l.medium,l.large]},Nn={},T=e=>{let{size:t,virtualization:o,children:i,header:n,selectAll:r,optionLabel:d,customValue:c,noData:m,screenReaders:f,...b}=e,v=pt.Children.toArray(i)[0],O=v?.props?.children?pt.Children.count(v.props.children):pt.Children.count(i);return ao("div",{...b,className:a(e.className,mt,I(mt,{size:t}),{"k-virtual-list":o}),children:[d,r,c,n&&io(ct,{children:n}),i||(m!==void 0?m:io(dt,{live:!0,children:"No data found."})),f&&i&&ao(dt,{className:"k-sr-only",live:!0,children:[O," items found."]})]})};T.states=xn;T.options=hn;T.className=mt;T.defaultOptions=Nn;T.moduleName=re;T.folderName=ue;T.ariaSpec={selector:".k-list",rules:[{selector:".k-list .k-no-data",attribute:"aria-live=polite",usage:'Announces "No data found" to screen readers.'}]};import{jsx as gn}from"react/jsx-runtime";var so="k-list-container",Ln=[],vn={},kn={},fe=e=>{let{...t}=e;return gn("div",{...t,className:a(e.className,so),children:e.children})};fe.states=Ln;fe.options=vn;fe.className=so;fe.defaultOptions=kn;fe.moduleName=re;fe.folderName=ue;var le="checkbox",be=le;import{jsx as ro}from"react/jsx-runtime";var qe="k-checkbox",In=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.checked,s.indeterminate],Sn={size:[l.undefined,l.small,l.medium,l.large],rounded:[p.undefined,p.none,p.small,p.medium,p.large,p.full]},Cn={},z=e=>{let{id:t,checked:o,indeterminate:i,hover:n,focus:r,disabled:d,invalid:c,valid:m,required:f,size:b,rounded:N,wrapperRole:v,...O}=e;return ro("span",{className:"k-checkbox-wrap",role:v,children:ro("input",{...O,id:t,type:"checkbox",defaultChecked:o,required:f,disabled:d||void 0,"aria-invalid":c?"true":void 0,className:a(e.className,qe,I(qe,{size:b,rounded:N}),y(qe,{hover:n,focus:r,disabled:d,invalid:c,valid:m,indeterminate:i,checked:o}))})})};z.states=In;z.options=Sn;z.className=qe;z.defaultOptions=Cn;z.moduleName=le;z.folderName=be;z.ariaSpec={selector:".k-checkbox",rules:[{selector:".k-checkbox",attribute:"role=checkbox or type=checkbox",usage:"Announces the checkbox role of the element."},{selector:".k-checkbox",attribute:"label for or aria-label or aria-labelledby (when has accessible name)",usage:"The input requires an accessible name to which it will be assigned."},{selector:".k-checkbox",attribute:"aria-checked=true/false/mixed or checked",usage:"For native checkboxes the checked state is handled by the browser. aria-checked is used for custom implementations."},{selector:".k-checkbox",attribute:"aria-describedby (when has hint or error)",usage:"Points to the hint or error message for the checkbox."},{selector:".k-checkbox",attribute:"disabled or aria-disabled=true (when disabled)",usage:"For native checkboxes use the HTML disabled attribute. aria-disabled for custom implementations."},{selector:".k-invalid, .ng-invalid",attribute:"aria-invalid=true (when invalid)",usage:"Rendered only when the CheckBox is in a form and announces the invalid state."}]};var U=z;import{jsx as En}from"react/jsx-runtime";var lo="k-checkbox-list",An=[],yn={},co={layout:"vertical"},P=e=>{let{layout:t=co.layout,...o}=e;return En("ul",{...o,className:a(e.className,lo,{[`k-list-${t}`]:t}),children:e.children})};P.states=An;P.options=yn;P.className=lo;P.defaultOptions=co;P.moduleName=le;P.folderName=be;import{jsx as Rn}from"react/jsx-runtime";var po="k-checkbox-list-item",Mn=[],On={},Tn={},w=e=>{let{...t}=e;return Rn("li",{...t,className:a(e.className,po),children:e.children})};w.states=Mn;w.options=On;w.className=po;w.defaultOptions=Tn;w.moduleName=le;w.folderName=be;import{Fragment as Kn,jsx as mo,jsxs as _n}from"react/jsx-runtime";var Q=({children:e="Label",id:t="cb-label-after",...o})=>_n(Kn,{children:[mo(U,{id:t,...o}),mo("label",{className:"k-checkbox-label",htmlFor:t,children:e})]});import{Fragment as lr,jsx as rr,jsxs as cr}from"react/jsx-runtime";import{Fragment as fr,jsx as ur,jsxs as br}from"react/jsx-runtime";import{Fragment as vr,jsx as Lr,jsxs as kr}from"react/jsx-runtime";import{jsx as Cr}from"react/jsx-runtime";import{jsx as Mr}from"react/jsx-runtime";import{jsx as Kr}from"react/jsx-runtime";import{jsx as B,jsxs as uo}from"react/jsx-runtime";var Hn=P.options,Pn=P.states,wn={...P.defaultOptions,variant:"vertical"},Dn=[{name:"vertical",title:"Vertical"},{name:"horizontal",title:"Horizontal"}],zn=[],xe=e=>{let{variant:t,...o}=e;return t==="horizontal"?uo(P,{layout:"horizontal",...o,children:[B(w,{children:B(Q,{id:E("cb"),defaultChecked:!0,children:"Label"})}),B(w,{children:B(Q,{id:E("cb"),children:"Label"})}),B(w,{children:B(Q,{id:E("cb"),children:"Label"})})]}):uo(P,{...o,children:[B(w,{children:B(Q,{id:E("cb"),defaultChecked:!0,children:"Label"})}),B(w,{children:B(Q,{id:E("cb"),children:"Label"})}),B(w,{children:B(Q,{id:E("cb"),children:"Label"})})]})};xe.options=Hn;xe.states=Pn;xe.variants=Dn;xe.defaultOptions=wn;xe.modifiers=zn;xe.className=P.className;import{jsx as Gn}from"react/jsx-runtime";var Bn=U.options,Un=U.states,Fn=U.defaultOptions,Vn=[],Xn=[],he=e=>Gn(Q,{id:E("checkbox"),...e,defaultChecked:!0,children:"Label"});he.options=Bn;he.states=Un;he.variants=Vn;he.defaultOptions=Fn;he.modifiers=Xn;he.className=U.className;import{Fragment as Wn,jsx as fo}from"react/jsx-runtime";var ut="k-font-icon",$n=[],qn={size:[l.undefined,l.xsmall,l.small,l.medium,l.large,l.xlarge,l.xxlarge,l.xxxlarge],themeColor:[u.undefined,u.base,u.primary,u.secondary,u.tertiary,u.success,u.warning,u.error,u.info]},Jn={},_e=e=>{let{size:t,themeColor:o,icon:i,rotate:n,flip:r,...d}=e;return i?fo("span",{...d,className:a(e.className,ut,I(ut,{size:t}),{[`k-i-${i}`]:i,[`k-color-${o}`]:o,[`k-rotate-${n}`]:n,"k-flip-h":r==="h"||r==="both","k-flip-v":r==="v"||r==="both"}),"aria-hidden":"true"}):fo(Wn,{})};_e.states=$n;_e.options=qn;_e.className=ut;_e.defaultOptions=Jn;var bo=_e;import{Fragment as Zn,jsx as Je}from"react/jsx-runtime";var ft="k-svg-icon",Yn=[],Qn={size:[l.undefined,l.xsmall,l.small,l.medium,l.large,l.xlarge,l.xxlarge,l.xxxlarge],themeColor:[u.undefined,u.base,u.primary,u.secondary,u.tertiary,u.success,u.warning,u.error,u.info],variant:[q.outline,q.solid,q.duotone]},bt={viewBox:"0 0 24 24",variant:q.outline},He=e=>{let{size:t,themeColor:o,rotate:i,flip:n,viewBox:r=bt.viewBox,variant:d=bt.variant,icon:c,...m}=e;if(!c)return Je(Zn,{});if(c==="none")return Je("span",{...m,className:a(e.className,ft,I("k-icon",{size:t}),"k-none"),"aria-hidden":"true"});let f=typeof c=="object"&&c.name&&c.name,b=typeof c=="object"?d&&c.variants?.[d]||c.variants?.outline||c.content:void 0;return Je("span",{...m,className:a(e.className,ft,I("k-icon",{size:t}),{[`k-svg-i-${f}`]:f,[`k-color-${o}`]:o,[`k-rotate-${i}`]:i,"k-flip-h":n==="h"||n==="both","k-flip-v":n==="v"||n==="both"}),"aria-hidden":"true",children:Je("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof c=="object"?c.viewBox:r,dangerouslySetInnerHTML:b!==void 0?{__html:b}:void 0,children:c?void 0:e.children})})};He.states=Yn;He.options=Qn;He.className=ft;He.defaultOptions=bt;var xt=He;import*as ht from"@progress/kendo-svg-icons";var xo="icon",ho="icons";import{useContext as ei}from"react";import{createContext as jn}from"react";var No=jn({iconsType:"svg"});import{Fragment as Lo,jsx as Pe}from"react/jsx-runtime";var We="k-icon",ti=e=>e.replace(/([-_][a-z0-9])/gi,t=>t.toUpperCase().replace("-","").replace("_","")),oi=[],ni={size:[l.undefined,l.xsmall,l.small,l.medium,l.large,l.xlarge,l.xxlarge,l.xxxlarge],themeColor:[u.undefined,u.base,u.primary,u.secondary,u.tertiary,u.success,u.warning,u.error,u.info],variant:[q.outline,q.solid,q.duotone]},Ye={viewBox:"0 0 24 24",type:"svg",variant:q.outline},L=e=>{let{iconsType:t}=ei(No),{size:o,themeColor:i,icon:n,type:r=t||Ye.type,rotate:d,flip:c,viewBox:m=Ye.viewBox,variant:f=Ye.variant,...b}=e;if(!n)return Pe(Lo,{});if((t||r)==="svg"){if(n==="none")return Pe(xt,{...b,className:a(e.className,We),icon:n,size:o,variant:f});let v=ht[n]?n:ti(`${n}-icon`);return ht[v]?Pe(xt,{...b,className:a(e.className,We),icon:ht[v],size:o,themeColor:i,rotate:d,flip:c,viewBox:m,variant:f}):Pe(Lo,{})}return Pe(bo,{...b,className:a(e.className,We),icon:n,size:o,themeColor:i,rotate:d,flip:c})};L.states=oi;L.options=ni;L.defaultOptions=Ye;L.className=We;L.moduleName=xo;L.folderName=ho;L.ariaSpec={selector:".k-icon, .k-svg-icon",rules:[{selector:".k-icon, .k-svg-icon",attribute:"aria-hidden=true",usage:"Hides the icon element and all its children from assistive technologies."}]};import{jsx as ce,jsxs as ri}from"react/jsx-runtime";var Nt="k-list-item",ii=[s.hover,s.focus,s.selected,s.disabled],ai={},si={},S=e=>{let{text:t,groupLabel:o,group:i,iconName:n,iconClassName:r,showCheckbox:d,checked:c,hover:m,focus:f,selected:b,disabled:N,actions:v,description:O,id:_,...k}=e,g=t||e.children;return ri("li",{...k,id:_,role:i?"presentation":"option",tabIndex:i?void 0:f?0:-1,"aria-selected":!i&&b?"true":i?void 0:"false","aria-disabled":!i&&N?"true":void 0,className:a(e.className,i?"k-list-group-item":Nt,y(Nt,{hover:m,focus:f,disabled:N,selected:b})),children:[d&&ce(z,{checked:c}),n&&ce("span",{className:"k-list-item-icon-wrapper",children:ce(L,{icon:n,className:a("k-list-item-icon",r)})}),ce("span",{className:"k-list-item-text",children:g}),v&&ce("div",{className:"k-list-item-actions",children:v}),O&&ce("span",{className:"k-list-item-description",children:O}),o&&o!==""&&ce("div",{className:"k-list-item-group-label",children:o})]})};S.states=ii;S.options=ai;S.className=Nt;S.defaultOptions=si;S.moduleName=re;S.folderName=ue;S.ariaSpec={selector:".k-list-item",rules:[{selector:".k-list-item",attribute:"role=option",usage:"Each list item is an option in the listbox."},{selector:".k-list-item",attribute:"id",usage:"ID for aria-activedescendant reference."},{selector:".k-list-item",attribute:"aria-selected (when selectable)",usage:"Indicates the selected state of the option."},{selector:".k-list-group-item",attribute:"role=presentation",usage:"Group headers are presentational, not selectable options."},{selector:".k-list-item-icon",attribute:"aria-hidden=true",usage:"Decorative icons are hidden from assistive technology."}]};import{jsx as ci}from"react/jsx-runtime";var li="k-list-ul",we=e=>{let{children:t,role:o,id:i,...n}=e;return ci("ul",{...n,id:i,role:o,className:a(li,e.className),children:t})};we.ariaSpec={selector:".k-list-ul",rules:[{selector:'.k-list-ul[role="listbox"]',attribute:"role=listbox",usage:"For ungrouped lists, the UL has the listbox role."},{selector:'.k-list-ul[role="listbox"]',attribute:"aria-label or aria-labelledby (when has accessible name)",usage:"Accessible name for the listbox."},{selector:'.k-list-ul[role="group"]',attribute:"role=group",usage:"For grouped sublists under a group header."},{selector:'.k-list-ul[role="group"]',attribute:"aria-labelledby (when grouped)",usage:"References the group header ID."}]};import{jsx as Lt,jsxs as pi}from"react/jsx-runtime";var di="k-list-content",F=e=>{let{virtualization:t,grouping:o,"aria-label":i,"aria-labelledby":n,listboxId:r,...d}=e;return pi("div",{...d,className:a(di,e.className),role:o?"listbox":void 0,id:o?r:void 0,"aria-label":o?i:void 0,"aria-labelledby":o?n:void 0,children:[o?e.children:Lt(we,{role:"listbox",id:r,"aria-label":i,"aria-labelledby":n,children:e.children}),t&&Lt("div",{className:"k-height-container",children:Lt("div",{})})]})};F.ariaSpec={selector:".k-list-content",rules:[{selector:'.k-list-content[role="listbox"]',attribute:"role=listbox",usage:"For grouped lists, the list content container has the listbox role."},{selector:'.k-list-content[role="listbox"]',attribute:"aria-label or aria-labelledby (when has accessible name)",usage:"Accessible name for the listbox."}]};import{jsx as vt,jsxs as bi}from"react/jsx-runtime";var Qe="k-list-sticky-header",mi=[s.hover,s.focus,s.selected],ui={},fi={},Ze=e=>{let{label:t="Select all",showCheckbox:o=!0,checked:i,indeterminate:n,hover:r,focus:d,selected:c,...m}=e;return vt("div",{...m,className:a(Qe,e.className),children:bi("div",{className:a(`${Qe}-item`,y(`${Qe}-item`,{hover:r,focus:d,selected:c})),children:[o&&vt(z,{checked:i,indeterminate:n,"aria-label":t}),vt("span",{className:"k-list-item-text",children:t})]})})};Ze.states=mi;Ze.options=ui;Ze.className=Qe;Ze.defaultOptions=fi;import{Fragment as Jl,jsx as ql,jsxs as Wl}from"react/jsx-runtime";import{jsx as kt,jsxs as hi}from"react/jsx-runtime";var xi="k-list-group-item",gt=e=>{let{groupIconName:t,...o}=e;return hi("li",{...o,role:"presentation",className:a(xi,e.className),children:[t&&kt("span",{className:"k-list-item-icon-wrapper",children:kt(L,{icon:t,className:"k-list-item-icon"})}),kt("span",{className:"k-list-item-text",children:e.children})]})};gt.ariaSpec={selector:".k-list-group-item",rules:[{selector:".k-list-group-item",attribute:"role=presentation",usage:"Group headers are presentational, not selectable options."},{selector:".k-list-group-item",attribute:"id (when referenced)",usage:"ID for aria-labelledby on the parent group UL."}]};import{jsx as ki}from"react/jsx-runtime";var It="k-list-optionlabel",Ni=[s.hover,s.focus,s.selected,s.disabled],Li={},vi={},je=e=>{let{text:t,hover:o,focus:i,selected:n,disabled:r,...d}=e;return ki("div",{...d,className:a(It,y(It,{hover:o,focus:i,selected:n,disabled:r})),children:t})};je.states=Ni;je.options=Li;je.className=It;je.defaultOptions=vi;import{jsx as Ci}from"react/jsx-runtime";var St="k-list-custom-value",gi=[s.hover,s.focus,s.selected,s.disabled],Ii={},Si={},Ne=e=>{let{text:t,hover:o,focus:i,selected:n,disabled:r,...d}=e;return Ci("div",{...d,className:a(St,y(St,{hover:o,focus:i,selected:n,disabled:r})),children:t})};Ne.states=gi;Ne.options=Ii;Ne.className=St;Ne.defaultOptions=Si;import{Fragment as pc,jsx as dc,jsxs as mc}from"react/jsx-runtime";import{Fragment as Nc,jsx as hc,jsxs as Lc}from"react/jsx-runtime";import{Fragment as Ac,jsx as Sc,jsxs as Cc}from"react/jsx-runtime";import{Fragment as Kc,jsx as Tc,jsxs as Rc}from"react/jsx-runtime";import{jsx as wc}from"react/jsx-runtime";import{Fragment as Vc,jsx as Fc,jsxs as Xc}from"react/jsx-runtime";var De="input",et=De;import{jsx as Mi}from"react/jsx-runtime";var tt="k-input",Ai=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading,s.readonly],yi={size:[l.undefined,l.small,l.medium,l.large],rounded:[p.undefined,p.none,p.small,p.medium,p.large,p.full],fillMode:[x.undefined,x.solid,x.flat,x.outline]},Ei={},M=e=>{let{hover:t,focus:o,disabled:i,invalid:n,valid:r,loading:d,readonly:c,size:m,rounded:f,fillMode:b,...N}=e;return Mi("span",{...N,className:a(e.className,tt,I(tt,{size:m,rounded:f,fillMode:b}),y(tt,{hover:t,focus:o,disabled:i,invalid:n,valid:r,loading:d,readonly:c}))})};M.states=Ai;M.options=yi;M.className=tt;M.defaultOptions=Ei;M.moduleName=De;M.folderName=et;import{jsx as Ki}from"react/jsx-runtime";var ot="k-picker",Oi=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading,s.readonly],Ti={size:[l.undefined,l.small,l.medium,l.large],rounded:[p.undefined,p.none,p.small,p.medium,p.large,p.full],fillMode:[x.undefined,x.solid,x.flat,x.outline]},Ri={},Le=e=>{let{hover:t,focus:o,disabled:i,invalid:n,valid:r,loading:d,readonly:c,size:m,rounded:f,fillMode:b,...N}=e;return Ki("span",{...N,className:a(e.className,ot,I(ot,{size:m,rounded:f,fillMode:b}),y(ot,{hover:t,focus:o,disabled:i,invalid:n,valid:r,loading:d,readonly:c})),children:e.children})};Le.states=Oi;Le.options=Ti;Le.className=ot;Le.defaultOptions=Ri;Le.moduleName=De;Le.folderName=et;import{Fragment as Pi,jsx as Ct}from"react/jsx-runtime";var vo="k-clear-value",_i=[s.disabled,s.loading,s.readonly],Hi={},V=e=>{let{disabled:t,loading:o,readonly:i,value:n}=e;return t||i||o||!n?Ct(Pi,{}):Ct("span",{className:a(e.className,vo),children:Ct(L,{icon:"x"})})};V.states=_i;V.options=Hi;V.className=vo;import{jsx as zi}from"react/jsx-runtime";var At="k-input-inner",wi=[],Di={},nt={type:"text",autocomplete:"off",value:"",placeholder:""},X=e=>{let{value:t=nt.value,type:o=nt.type,placeholder:i=nt.placeholder,autocomplete:n=nt.autocomplete,disabled:r,readOnly:d,...c}=e;return zi("input",{...c,type:o,className:a(e.className,At,I(At,e)),placeholder:i,autoComplete:n,defaultValue:t,disabled:r||void 0,readOnly:d||void 0})};X.states=wi;X.options=Di;X.className=At;import{jsx as ko,jsxs as Fi}from"react/jsx-runtime";var yt="k-input-inner",Bi=[],Ui={},Et=e=>{let{value:t,placeholder:o,showValue:i,valueIcon:n,valueIconName:r,...d}=e;return Fi("span",{...d,className:a(e.className,yt,I(yt,e)),children:[n,!n&&r&&ko(L,{className:"k-input-value-icon",icon:r}),i&&!t&&o,i&&t&&ko("span",{className:"k-input-value-text",children:t})]})};Et.states=Bi;Et.options=Ui;Et.className=yt;import{jsx as Gi}from"react/jsx-runtime";var Mt="k-input-inner",Vi=[],Xi={},go={value:"",placeholder:""},Ot=e=>{let{value:t=go.value,placeholder:o=go.placeholder,rows:i,disabled:n,...r}=e;return Gi("textarea",{...r,className:a(e.className,Mt,I(Mt,e)),placeholder:o,rows:i,defaultValue:t,disabled:n||void 0})};Ot.states=Vi;Ot.options=Xi;Ot.className=Mt;import{Fragment as qi,jsx as Io}from"react/jsx-runtime";var So="k-input-loading-icon",$i=[s.disabled,s.loading],J=e=>{let{disabled:t,loading:o}=e;return t||!o?Io(qi,{}):Io("span",{className:a(e.className,So,"k-icon k-i-loading")})};J.states=$i;J.className=So;import{Fragment as Yi,jsx as Co}from"react/jsx-runtime";var Ao="k-input-validation-icon",Ji=[s.valid,s.invalid,s.disabled,s.loading],Wi={},G=e=>{let{valid:t,invalid:o,disabled:i,loading:n}=e,r=o?"warning-circle":"check-circle";return i||n||!!!(t||o)?Co(Yi,{}):Co(L,{className:a(Ao),icon:r})};G.states=Ji;G.options=Wi;G.className=Ao;import{Fragment as ji,jsx as yo}from"react/jsx-runtime";var Qi="k-input-prefix",Zi={direction:"horizontal"},ve=e=>{let{direction:t=Zi.direction,...o}=e;return e.children?yo("span",{...o,className:a(Qi,e.className,{[`k-input-prefix-${t}`]:t}),children:e.children}):yo(ji,{})};import{Fragment as oa,jsx as Eo}from"react/jsx-runtime";var ea="k-input-suffix",ta={direction:"horizontal"},ke=e=>{let{direction:t=ta.direction,...o}=e;return e.children?Eo("span",{...o,className:a(ea,e.className,{[`k-input-suffix-${t}`]:t}),children:e.children}):Eo(oa,{})};import{jsx as Jd}from"react/jsx-runtime";import{jsx as Zd}from"react/jsx-runtime";import{jsx as ia}from"react/jsx-runtime";var Mo="k-input-separator",na={direction:"vertical"},Z=e=>{let{direction:t=na.direction,...o}=e;return ia("span",{...o,className:a(Mo,e.className,{[`${Mo}-${t}`]:t})})};var Tt="button",Oo=Tt;import{Fragment as To,jsx as ge,jsxs as Ro}from"react/jsx-runtime";var ze="k-button",aa=["icon-button"],sa=[s.hover,s.focus,s.active,s.selected,s.disabled,s.generating],ra={size:[l.undefined,l.xsmall,l.small,l.medium,l.large],rounded:[p.undefined,p.none,p.small,p.medium,p.large,p.full],fillMode:[x.undefined,x.solid,x.flat,x.outline,x.clear,x.link],themeColor:[u.undefined,u.base,u.primary,u.secondary,u.tertiary,u.success,u.warning,u.error,u.info,u.inverse]},Rt={showArrow:!1,arrowIconName:"chevron-down"},h=e=>{let{as:t="button",size:o,rounded:i,fillMode:n,themeColor:r,showArrow:d=Rt.showArrow,arrowIconName:c=Rt.arrowIconName,variant:m,hover:f,focus:b,active:N,selected:v,disabled:O,togglable:_,ariaDisabled:k,icon:g,iconSize:A,text:H,iconClassName:pe,className:Oe,...me}=e,Te=g!=null,Re=e.children!==void 0;return Ro(t,{className:a(Oe,ze,oo(ze,m),I(ze,{size:o,rounded:i,fillMode:n,themeColor:r}),y(ze,{hover:f,focus:b,active:N,disabled:O||k,selected:v}),{"k-icon-button":!H&&!Re&&Te}),"aria-pressed":_?v?"true":"false":void 0,...me,"aria-disabled":k?"true":void 0,disabled:O||void 0,children:[typeof g=="string"&&g&&ge(L,{className:a(pe,"k-button-icon"),icon:g,size:A}),g&&typeof g!="string"&&ge(To,{children:g}),H?Ro(To,{children:[H&&ge("span",{className:"k-button-text",children:H}),e.children]}):e.children&&ge("span",{className:"k-button-text",children:e.children}),d&&ge("span",{className:"k-menu-button-arrow k-button-arrow",children:ge(L,{icon:c})})]})};h.states=sa;h.options=ra;h.variants=aa;h.className=ze;h.defaultOptions=Rt;h.moduleName=Tt;h.folderName=Oo;h.ariaSpec={selector:".k-button",rules:[{selector:".k-button",attribute:"role=button or nodeName=button",usage:"The button role is implicit from the native <button> element."},{selector:".k-button",attribute:"aria-label (when icon-only)",usage:"Required for icon-only buttons that have no visible text."},{selector:".k-button",attribute:"aria-pressed (when togglable)",usage:"Indicates the pressed state of a toggle button."},{selector:".k-button",attribute:"disabled (when disabled)",usage:"Rendered when the button is disabled."}]};import{jsx as la}from"react/jsx-runtime";var de=e=>la(h,{children:"Button",...e});import{Fragment as Ko,jsx as W,jsxs as Kt}from"react/jsx-runtime";var ca=M.states,da=M.defaultOptions,pa=M.options,ma=[{name:"prefix",title:"Prefix"},{name:"suffix",title:"Suffix"},{name:"clear-button",title:"`Clear` Button"},{name:"validation-icon",title:"Validation Icon"},{name:"separators",title:"Separators"}],ua=[],Ie=e=>{let{modifiers:t,valid:o,invalid:i,loading:n,disabled:r,readonly:d,...c}=e,m=t?.prefix,f=t?.suffix,b=t?.["clear-button"],N=t?.["validation-icon"],v=t?.separators;return Kt(M,{...c,valid:o,invalid:i,loading:n,disabled:r,readonly:d,style:{width:300},children:[m&&Kt(Ko,{children:[W(ve,{children:W(L,{icon:"lock"})}),v&&W(Z,{})]}),W(X,{placeholder:"Placeholder",value:"Value"}),N&&W(G,{valid:o,invalid:i,loading:n,disabled:r}),W(J,{loading:n,disabled:r}),b&&W(V,{loading:n,disabled:r,readonly:d,value:"Value"}),f&&Kt(Ko,{children:[v&&W(Z,{}),W(ke,{children:W(de,{size:c.size,fillMode:"clear",children:"Send"})})]})]})};Ie.options=pa;Ie.states=ca;Ie.variants=ua;Ie.defaultOptions=da;Ie.modifiers=ma;Ie.className=M.className;import{jsx as fa}from"react/jsx-runtime";var _o=e=>fa(h,{icon:"folder",...e,"aria-label":e["aria-label"]||"Folder",children:void 0});import{jsx as ba}from"react/jsx-runtime";var Ho=e=>ba(h,{icon:"folder",children:"Button",...e});import{jsx as _t}from"react/jsx-runtime";var xa=h.options,ha=h.states,Na={...h.defaultOptions,variant:"text"},La=[{name:"icon-only",title:"Icon Only"},{name:"icon-and-text",title:"Icon & Text"},{name:"text",title:"Text"}],va=[],Se=e=>{let{variant:t,...o}=e;switch(t){case"icon-only":return _t(_o,{...o,icon:"star"});case"icon-and-text":return _t(Ho,{...o,icon:"star",children:"Button"});default:return _t(de,{...o,children:"Button"})}};Se.options=xa;Se.states=ha;Se.variants=La;Se.defaultOptions=Na;Se.modifiers=va;Se.className=h.className;var Ht="popup",Po=Ht;import{jsx as wo}from"react/jsx-runtime";var Do="k-animation-container",ka=[],ga={},Pt={positionMode:"absolute",shown:!0},Y=e=>{let{positionMode:t=Pt.positionMode,shown:o=Pt.shown,animationStyle:i,offset:n,...r}=e;return wo("div",{...r,style:{...n,...e.style},className:a(e.className,Do,{"k-animation-container-shown":o,"k-animation-container-fixed":t==="fixed"}),children:wo("div",{className:"k-child-animation-container",style:i,children:e.children})})};Y.states=ka;Y.options=ga;Y.className=Do;Y.defaultOptions=Pt;Y.moduleName=Ht;Y.folderName=Po;var wt="popup",zo=wt;import{jsx as Bo}from"react/jsx-runtime";var Uo="k-popup",Ia=[],Sa={},Fo={positionMode:"absolute"},j=e=>{let{offset:t,positionMode:o=Fo.positionMode,animationStyle:i,containerClassName:n,containerRole:r,containerAriaLabel:d,...c}=e;return Bo(Y,{positionMode:o,offset:t,animationStyle:i,className:n,role:r,"aria-label":d,children:Bo("div",{...c,className:a(e.className,Uo),children:e.children})})};j.states=Ia;j.options=Sa;j.className=Uo;j.defaultOptions=Fo;j.moduleName=wt;j.folderName=zo;j.ariaSpec={selector:".k-popup",rules:[{selector:".k-animation-container",attribute:"role (when appended to body)",usage:'Container gets role="region" when appended to document body. Popup is a building block \u2014 ARIA semantics come from consuming components.'}]};var Dt="action-buttons",Vo=Dt;import{jsx as ya}from"react/jsx-runtime";var it="k-actions",Ca=[],Aa={},zt={alignment:"start",orientation:"horizontal"},ee=e=>{let{alignment:t=zt.alignment,orientation:o=zt.orientation,...i}=e;return ya("div",{...i,className:a(it,{[`${it}-${t}`]:t,[`${it}-${o}`]:o},e.className),children:e.children})};ee.states=Ca;ee.options=Aa;ee.className=it;ee.defaultOptions=zt;ee.moduleName=Dt;ee.folderName=Vo;import{jsx as Ma}from"react/jsx-runtime";var Ea="k-actionsheet-footer",Xo={alignment:"stretched",orientation:"horizontal"},Ce=e=>{let{alignment:t=Xo.alignment,orientation:o=Xo.orientation,template:i,as:n=i?"div":ee,...r}=e;return Ma(n,{...r,...!i&&{alignment:t,orientation:o},className:a(e.className,Ea),children:e.children})};var Bt="searchbox",Go=Bt;import{jsx as Be,jsxs as Ra}from"react/jsx-runtime";var $o="k-searchbox",Oa=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading],Ta={size:[l.undefined,l.small,l.medium,l.large],rounded:[p.undefined,p.none,p.small,p.medium,p.large,p.full],fillMode:[x.undefined,x.solid,x.flat,x.outline]},Ut={showIcon:!0,icon:"search"},te=e=>{let{value:t,placeholder:o,size:i,rounded:n,fillMode:r,hover:d,focus:c,valid:m,invalid:f,required:b,loading:N,disabled:v,showIcon:O=Ut.showIcon,icon:_=Ut.icon,"aria-label":k,...g}=e;return Ra(M,{...g,size:i,rounded:n,fillMode:r,hover:d,focus:c,valid:m,invalid:f,required:b,loading:N,disabled:v,className:a(e.className,$o),children:[O&&Be(L,{className:"k-input-icon",icon:_}),Be(X,{placeholder:o,value:t,"aria-label":k}),Be(J,{...e}),Be(G,{...e}),Be(V,{...e})]})};te.states=Oa;te.options=Ta;te.className=$o;te.defaultOptions=Ut;te.moduleName=Bt;te.folderName=Go;import{jsx as Fm}from"react/jsx-runtime";var Ft="textbox",qo=Ft;import{Fragment as Jo,jsx as oe,jsxs as Vt}from"react/jsx-runtime";var Wo="k-textbox",Ka=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading,s.readonly],_a={size:[l.undefined,l.small,l.medium,l.large],rounded:[p.undefined,p.none,p.small,p.medium,p.large,p.full],fillMode:[x.undefined,x.solid,x.flat,x.outline]},at={showClearButton:!0,showValidationIcon:!0,separators:!0},D=e=>{let{size:t,rounded:o,fillMode:i,separators:n=at.separators,showClearButton:r=at.showClearButton,showValidationIcon:d=at.showValidationIcon,prefix:c,suffix:m,type:f,value:b,placeholder:N,hover:v,focus:O,valid:_,invalid:k,required:g,loading:A,disabled:H,readonly:pe,id:Oe,"aria-label":me,"aria-describedby":Te,...Re}=e;return Vt(M,{...Re,size:t,rounded:o,fillMode:i,hover:v,focus:O,valid:_,invalid:k,required:g,loading:A,disabled:H,readonly:pe,className:a(e.className,Wo),children:[c&&Vt(Jo,{children:[oe(ve,{children:c}),n&&oe(Z,{})]}),oe(X,{id:Oe,placeholder:N,value:b,type:f,disabled:H,"aria-label":me,"aria-describedby":Te,"aria-invalid":k?"true":void 0}),d&&oe(G,{valid:_,invalid:k,loading:A,disabled:H}),oe(J,{loading:A,disabled:H}),r&&oe(V,{loading:A,disabled:H,readonly:pe,value:b}),m&&Vt(Jo,{children:[n&&oe(Z,{}),oe(ke,{children:m})]})]})};D.states=Ka;D.options=_a;D.className=Wo;D.defaultOptions=at;D.moduleName=Ft;D.folderName=qo;D.ariaSpec={selector:".k-textbox",rules:[{selector:".k-textbox > .k-input-inner",attribute:"role=textbox or nodeName=input",usage:"Describes the role of the component."},{selector:".k-textbox > .k-input-inner",attribute:"label for or aria-label or aria-labelledby (when has accessible name)",usage:"The input requires an accessible name (provided by consuming app)."},{selector:".k-textbox > .k-input-inner",attribute:"aria-invalid=true (when invalid)",usage:"Rendered when the TextBox is in an invalid state."},{selector:".k-textbox > .k-input-inner",attribute:"aria-describedby (when has hint or error)",usage:"Points to the hint or error message for the input."},{selector:".k-textbox.k-disabled > .k-input-inner",attribute:"disabled=disabled or aria-disabled=true",usage:"Rendered when the TextBox is disabled."}]};var Ue=D;import{jsx as Ha}from"react/jsx-runtime";var Yo=e=>Ha(Ue,{...e});import{Fragment as su,jsx as au}from"react/jsx-runtime";import{Fragment as mu,jsx as pu}from"react/jsx-runtime";import{jsx as xu}from"react/jsx-runtime";import{jsx as Xt}from"react/jsx-runtime";var Pa=D.states,wa=D.defaultOptions,Da=D.options,za=[{name:"prefix",title:"Prefix"},{name:"suffix",title:"Suffix"},{name:"clear-button",title:"`Clear` Button"}],Ba=[],Ae=e=>{let{modifiers:t,...o}=e,i={};return Object.keys(t||{}).forEach(n=>{switch(n){case"prefix":i.prefix=t?.[n]?Xt(L,{icon:"lock"}):void 0;break;case"suffix":i.suffix=t?.[n]?Xt(de,{size:o.size,fillMode:"clear",children:"Send"}):void 0;break;case"clear-button":i.showClearButton=t?.[n];break;default:break}}),Xt(Yo,{value:"Value",style:{width:300},...o,...i})};Ae.options=Da;Ae.states=Pa;Ae.variants=Ba;Ae.defaultOptions=wa;Ae.modifiers=za;Ae.className=D.className;import{jsx as ne,jsxs as Gt}from"react/jsx-runtime";var Qo="k-actionsheet-titlebar",Ua={},$=e=>{let{title:t,subtitle:o,actionsStart:i,actionsEnd:n,filter:r,input:d,inputValue:c,inputPlaceholder:m,adaptive:f,titleId:b,children:N,...v}=e;return Gt("div",{...v,className:a(e.className,Qo),children:[Gt("div",{className:"k-actionsheet-titlebar-group",children:[i&&ne("div",{className:"k-actionsheet-actions",children:i}),!N&&Gt("div",{className:"k-actionsheet-title",id:b,children:[t&&ne("div",{className:"k-text-center",children:t}),o&&ne("div",{className:"k-actionsheet-subtitle k-text-center",children:o})]}),N&&ne("div",{className:"k-actionsheet-title",id:b,children:N}),n&&ne("div",{className:"k-actionsheet-actions",children:n})]}),(d||r)&&ne("div",{className:"k-actionsheet-titlebar-group k-actionsheet-filter",children:d?ne(D,{value:c,placeholder:m,size:f?"large":"medium","aria-label":t||m||"Input"}):ne(te,{placeholder:"Filter",size:f?"large":"medium","aria-label":"Filter options"})})]})};$.className=Qo;$.defaultOptions=Ua;import{jsx as $t,jsxs as Ga}from"react/jsx-runtime";var qt="k-actionsheet-view",Fa=[],Va={},Xa={},ye=e=>{let{adaptive:t,animated:o,children:i,header:n,footer:r,titleId:d,...c}=e,m=n?.type===$&&$t($,{adaptive:t,titleId:d,...n?.props}),f=r?.type===Ce&&$t(Ce,{...r?.props});return Ga("div",{...c,className:a(e.className,qt,{[`${qt}-animated`]:o}),children:[m,$t("div",{className:"k-actionsheet-content",children:i}),f]})};ye.states=Fa;ye.options=Va;ye.className=qt;ye.defaultOptions=Xa;var Fe="action-sheet",st=Fe;var Jt="overlay",Zo=Jt;import{jsx as Wa}from"react/jsx-runtime";var jo="k-overlay",$a=[],qa={},Ja={},ie=e=>{let{...t}=e;return Wa("div",{...t,className:a(e.className,jo),children:e.children})};ie.states=$a;ie.options=qa;ie.className=jo;ie.defaultOptions=Ja;ie.moduleName=Jt;ie.folderName=Zo;import{jsx as rt,jsxs as Za}from"react/jsx-runtime";var en="k-actionsheet",Ya=[],Qa={},Ve={side:"bottom",fullscreen:!1,adaptive:!1,overlay:!0},R=e=>{let{side:t=Ve.side,fullscreen:o=Ve.fullscreen,adaptive:i=Ve.adaptive,overlay:n=Ve.overlay,template:r,children:d,header:c,footer:m,id:f,...b}=e,N=f&&!r&&c?`${f}-title`:void 0;return Za("div",{className:"k-actionsheet-container",children:[n&&rt(ie,{}),rt(Y,{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:rt("div",{...b,id:f,role:"dialog","aria-modal":n?"true":void 0,"aria-labelledby":N,className:a(e.className,en,{[`k-actionsheet-${t}`]:o===!1,"k-actionsheet-fullscreen":o===!0,"k-adaptive-actionsheet":i}),children:r||rt(ye,{header:c,footer:m,adaptive:i,titleId:N,...e,children:d})})})]})};R.states=Ya;R.options=Qa;R.className=en;R.defaultOptions=Ve;R.moduleName=Fe;R.folderName=st;R.ariaSpec={selector:".k-actionsheet",rules:[{selector:".k-actionsheet",attribute:"role=dialog",usage:"Announces the dialog role of the component."},{selector:".k-actionsheet",attribute:"aria-labelledby (when has title)",usage:"Associates the title of the action sheet."},{selector:".k-actionsheet",attribute:"aria-hidden=true/false (when hidden)",usage:"Announces the hidden state of the ActionSheet container."},{selector:".k-actionsheet",attribute:"aria-modal=true (when modal)",usage:"Announces that the action sheet is modal."},{selector:".k-actionsheet .k-actionsheet-title",attribute:"id",usage:"Used to associate the title with the action sheet wrapper element."}]};import{jsx as os}from"react/jsx-runtime";var tn="k-actionsheet-container",ja=[],es={},ts={},Ee=e=>{let{children:t,...o}=e;return os("div",{...o,className:tn,children:t})};Ee.states=ja;Ee.options=es;Ee.className=tn;Ee.defaultOptions=ts;Ee.moduleName=Fe;Ee.folderName=st;import{jsx as ns}from"react/jsx-runtime";var Wt=e=>{let{...t}=e;return ns("div",{...t,className:a(e.className,"k-list-ul"),children:e.children})};import{Fragment as as,jsx as Xe,jsxs as Yt}from"react/jsx-runtime";var Qt="k-actionsheet-item",is=[s.hover,s.focus,s.selected,s.disabled],ae=e=>{let{iconName:t,text:o,description:i,hover:n,focus:r,selected:d,disabled:c,...m}=e;return Yt("span",{...m,className:a(e.className,Qt,y(Qt,{hover:n,focus:r,selected:d,disabled:c})),children:[!e.children&&Xe(as,{children:Yt("span",{className:"k-actionsheet-action",children:[t&&Xe("span",{className:"k-icon-wrap",children:Xe(L,{className:"k-actionsheet-item-icon",icon:t})}),Yt("span",{className:"k-actionsheet-item-text",children:[o&&Xe("span",{className:"k-actionsheet-item-title",children:o}),i&&Xe("span",{className:"k-actionsheet-item-description",children:i})]})]})}),e.children]})};ae.states=is;ae.className=Qt;import{jsx as xf,jsxs as hf}from"react/jsx-runtime";import{jsx as kf}from"react/jsx-runtime";import{jsx as Cf}from"react/jsx-runtime";import{jsx as Mf}from"react/jsx-runtime";import{jsx as K,jsxs as Zt}from"react/jsx-runtime";var ss=R.options,rs=R.states,nn={...R.defaultOptions,variant:"normal"},ls=[{name:"normal",title:"Normal"},{name:"adaptive",title:"Adaptive"},{name:"fullScreen",title:"Full Screen"}],cs=[{name:"actions",title:"Titlebar Actions",type:"boolean"},{name:"subtitle",title:"Subtitle",type:"boolean"},{name:"footer",title:"Footer",type:"boolean"}],Me=e=>{let{variant:t,modifiers:o,...i}={...nn,...e},n={},r=Zt(Wt,{children:[K(ae,{text:"Edit Item",description:"Click to edit",iconName:"edit-tools"}),K(ae,{text:"Add to Favorites",iconName:"heart"}),K(ae,{text:"Upload New",iconName:"upload",disabled:!0}),K("hr",{className:"k-hr"}),K(ae,{text:"Cancel",iconName:"cancel"})]}),d="Choose from the items below",c="Select Item";return t==="fullScreen"&&(n.fullScreen=!0),Object.keys(o||{}).forEach(m=>{switch(m){case"actions":n.actionsStart=!!o?.[m],n.actionsEnd=!!o?.[m];break;case"subtitle":n.subtitle=o?.[m]?d:void 0;break;case"footer":n.footer=!!o?.[m];break;default:break}}),t==="adaptive"?K(R,{...i,adaptive:!0,fullscreen:n.fullScreen,header:K($,{actionsStart:n.actionsStart?K(h,{icon:"chevron-left",size:"large",fillMode:"flat"}):void 0,actionsEnd:n.actionsEnd?K(h,{icon:"x",size:"large",fillMode:"flat"}):void 0,title:c,subtitle:n.subtitle}),footer:n.footer?Zt(Ce,{alignment:"stretched",children:[K(h,{text:"Cancel",size:"large",themeColor:"base"}),K(h,{text:"Apply",size:"large",themeColor:"primary"})]}):void 0,children:r}):K(R,{...i,fullscreen:n.fullScreen,header:K($,{actionsStart:n.actionsStart?K(h,{icon:"chevron-left",fillMode:"flat"}):void 0,actionsEnd:n.actionsEnd?K(h,{icon:"x",fillMode:"flat"}):void 0,title:"Select Item",subtitle:n.subtitle}),footer:n.footer?Zt(Ce,{alignment:"stretched",children:[K(h,{text:"Apply",themeColor:"primary"}),K(h,{text:"Cancel",themeColor:"base"})]}):void 0,children:r})};Me.options=ss;Me.states=rs;Me.variants=ls;Me.defaultOptions=nn;Me.modifiers=cs;Me.className=R.className;var jt="combobox",an=jt;import{Fragment as eo,jsx as C,jsxs as Ge}from"react/jsx-runtime";var sn="k-combobox",ds=[s.hover,s.focus,s.valid,s.invalid,s.loading,s.required,s.disabled,s.readonly],ps={size:[l.undefined,l.small,l.medium,l.large],rounded:[p.undefined,p.none,p.small,p.medium,p.large,p.full],fillMode:[x.undefined,x.solid,x.flat,x.outline]},rn={separators:!0},se=e=>{let{size:t,rounded:o,fillMode:i,separators:n=rn.separators,prefix:r,suffix:d,value:c,placeholder:m,hover:f,focus:b,valid:N,invalid:v,required:O,loading:_,disabled:k,popup:g,opened:A,readonly:H,adaptive:pe,adaptiveSettings:Oe,adaptiveTitle:me,adaptiveSubtitle:Te,adaptiveCustomValue:Re,id:Ke,autocomplete:cn,activeDescendant:to,"aria-label":dn,...pn}=e,mn=Ke?`${Ke}-listbox`:void 0;return Ge(eo,{children:[Ge(M,{...pn,size:t,rounded:o,fillMode:i,hover:f,focus:b,valid:N,invalid:v,required:O,loading:_,disabled:k,readonly:H,className:a(e.className,sn),children:[r&&Ge(eo,{children:[C(ve,{children:r}),n&&C(Z,{})]}),C(X,{id:Ke,placeholder:m,value:c,role:"combobox","aria-haspopup":"listbox","aria-expanded":A?"true":"false","aria-controls":A?mn:void 0,"aria-activedescendant":A&&to?to:void 0,"aria-autocomplete":cn,"aria-invalid":v?"true":void 0,"aria-busy":_?"true":void 0,"aria-label":dn,disabled:k,readOnly:H}),C(G,{valid:N,invalid:v,loading:_,disabled:k}),C(J,{loading:_,disabled:k}),C(V,{loading:_,disabled:k,readonly:H,value:c}),d&&Ge(eo,{children:[n&&C(Z,{}),C(ke,{children:d})]}),C(h,{className:"k-input-button",icon:"chevron-down",size:t,fillMode:i,"aria-label":"Open popup",tabIndex:-1,disabled:k})]}),A&&g&&C(j,{className:"k-list-container k-combobox-popup",containerRole:"region",containerAriaLabel:"Combobox suggestions",children:g}),pe&&C(R,{adaptive:!0,id:Ke?`${Ke}-adaptive`:void 0,...Oe,header:C($,{actionsEnd:C(h,{icon:"check",themeColor:"primary",size:"large",fillMode:"flat","aria-label":"Apply selection"}),input:!0,inputValue:c,inputPlaceholder:m,title:me,subtitle:Te}),children:C("div",{className:"k-list-container",children:C(T,{customValue:Re?C(Ne,{text:`Use "${c}"`}):void 0,size:"large",children:Ge(F,{"aria-label":me||"Options",children:[C(S,{text:"List item"}),C(S,{text:"List item"}),C(S,{text:"List item"})]})})})})]})};se.states=ds;se.options=ps;se.className=sn;se.defaultOptions=rn;se.moduleName=jt;se.folderName=an;se.ariaSpec={selector:".k-combobox",rules:[{selector:".k-combobox > .k-input-inner",attribute:"role=combobox",usage:"Identifies the input as a combobox."},{selector:".k-combobox > .k-input-inner",attribute:"aria-haspopup=listbox",usage:"Indicates the combobox has a listbox popup."},{selector:".k-combobox > .k-input-inner",attribute:"aria-expanded",usage:"Indicates whether the popup is open."},{selector:".k-combobox > .k-input-inner",attribute:"aria-controls=${id}-listbox (when open)",usage:"Points to the listbox element when popup is open."},{selector:".k-combobox > .k-input-inner",attribute:"aria-activedescendant (when open)",usage:"Points to the focused item in the listbox."},{selector:".k-combobox > .k-input-inner",attribute:"aria-autocomplete=list|both|inline (when has autocomplete)",usage:"Indicates the autocomplete behavior."},{selector:".k-combobox > .k-input-inner",attribute:"aria-invalid=true (when invalid)",usage:"Rendered when the combobox is in an invalid state."},{selector:".k-combobox > .k-input-inner",attribute:"aria-busy=true (when loading)",usage:"Rendered when the combobox is loading data."},{selector:".k-combobox > .k-input-inner",attribute:"label for or aria-label or aria-labelledby (when has accessible name)",usage:"Accessible name provided by consuming app."},{selector:".k-combobox.k-disabled > .k-input-inner",attribute:"disabled=disabled or aria-disabled=true",usage:"Rendered when the combobox is disabled."},{selector:".k-combobox .k-input-button",attribute:"role=button or nodeName=button",usage:"The dropdown toggle button."},{selector:".k-combobox .k-input-button",attribute:"aria-label",usage:"Accessible name for the dropdown button."},{selector:".k-combobox .k-input-button",attribute:"tabindex=-1",usage:"Dropdown button is not in the tab order."},{selector:".k-combobox-popup .k-list-content, .k-combobox-popup .k-list-ul",attribute:"role=listbox",usage:"The popup list container has the listbox role."},{selector:'.k-combobox-popup .k-list-ul[role="listbox"], .k-combobox-popup .k-list-content[role="listbox"]',attribute:"aria-label or aria-labelledby",usage:"Popup listbox must have an accessible name. Consuming code is responsible for associating with the component label via aria-labelledby."},{selector:".k-combobox-popup .k-list-item",attribute:"role=option",usage:"Each list item is an option."},{selector:".k-combobox-popup .k-list-item",attribute:"aria-selected (when selectable)",usage:"Indicates the selected state."},{selector:".k-combobox-popup .k-no-data",attribute:"aria-live=polite",usage:"Announces no-data state to screen readers."}]};var ln=se;import{jsx as $e,jsxs as ms}from"react/jsx-runtime";var ub=e=>{let t=E("combobox-1-item"),o=E("combobox-1-item"),i=E("combobox-1-item");return $e(ln,{id:"combobox-1",opened:!0,activeDescendant:o,popup:$e(T,{children:ms(F,{listboxId:"combobox-1-listbox","aria-label":"Options",children:[$e(S,{id:t,selected:!0,children:"Selected item"}),$e(S,{id:o,focus:!0,children:"Focused item"}),$e(S,{id:i,children:"List item"})]})}),...e})};export{ub as ComboboxPopup};