UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

2 lines (1 loc) 43.9 kB
import mt 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 C=(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"}),E=(e,t)=>{let{valid:o,invalid:i,hover:n,focus:r,checked:d,active:c,selected:m,disabled:b,indeterminate:f,loading:N,empty:v,readonly:O,highlighted:_,...I}=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":b,"k-indeterminate":f&&!d,"k-loading":N,"k-empty":v,"k-readonly":O,"k-highlighted":_},Object.keys(I).reduce((S,y)=>(y.startsWith("k-")?S[y]=I[y]:S[`k-${y}`]=I[y],S),{}))};function no(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 ct={};function g(e){return ct[e]=(ct[e]||0)+1,`k-${e}-${ct[e]}`}import{jsx as io}from"react/jsx-runtime";var bn="k-list-group-sticky-header",dt=e=>io("div",{className:a(bn,e.className),children:io("div",{className:"k-list-header-text",children:e.children})});import{jsx as xn}from"react/jsx-runtime";var fn="k-no-data",pt=e=>{let{live:t,...o}=e;return xn("span",{...o,className:a(fn,e.className),"aria-live":t?"polite":void 0,children:e.children})};var ce="list",fe=ce;import{jsx as ao,jsxs as so}from"react/jsx-runtime";var ut="k-list",hn=[],Nn={size:[l.undefined,l.small,l.medium,l.large]},Ln={},T=e=>{let{size:t,virtualization:o,children:i,header:n,selectAll:r,optionLabel:d,customValue:c,noData:m,screenReaders:b,...f}=e,v=mt.Children.toArray(i)[0],O=v?.props?.children?mt.Children.count(v.props.children):mt.Children.count(i);return so("div",{...f,className:a(e.className,ut,C(ut,{size:t}),{"k-virtual-list":o}),children:[d,r,c,n&&ao(dt,{children:n}),i||(m!==void 0?m:ao(pt,{live:!0,children:"No data found."})),b&&i&&so(pt,{className:"k-sr-only",live:!0,children:[O," items found."]})]})};T.states=hn;T.options=Nn;T.className=ut;T.defaultOptions=Ln;T.moduleName=ce;T.folderName=fe;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 In}from"react/jsx-runtime";var ro="k-list-container",vn=[],gn={},kn={},xe=e=>{let{...t}=e;return In("div",{...t,className:a(e.className,ro),children:e.children})};xe.states=vn;xe.options=gn;xe.className=ro;xe.defaultOptions=kn;xe.moduleName=ce;xe.folderName=fe;var de="checkbox",he=de;import{jsx as lo}from"react/jsx-runtime";var Je="k-checkbox",Sn=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.checked,s.indeterminate],Cn={size:[l.undefined,l.small,l.medium,l.large],rounded:[p.undefined,p.none,p.small,p.medium,p.large,p.full]},An={},z=e=>{let{id:t,checked:o,indeterminate:i,hover:n,focus:r,disabled:d,invalid:c,valid:m,required:b,size:f,rounded:N,wrapperRole:v,...O}=e;return lo("span",{className:"k-checkbox-wrap",role:v,children:lo("input",{...O,id:t,type:"checkbox",defaultChecked:o,required:b,disabled:d||void 0,"aria-invalid":c?"true":void 0,className:a(e.className,Je,C(Je,{size:f,rounded:N}),E(Je,{hover:n,focus:r,disabled:d,invalid:c,valid:m,indeterminate:i,checked:o}))})})};z.states=Sn;z.options=Cn;z.className=Je;z.defaultOptions=An;z.moduleName=de;z.folderName=he;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 Mn}from"react/jsx-runtime";var co="k-checkbox-list",yn=[],En={},po={layout:"vertical"},P=e=>{let{layout:t=po.layout,...o}=e;return Mn("ul",{...o,className:a(e.className,co,{[`k-list-${t}`]:t}),children:e.children})};P.states=yn;P.options=En;P.className=co;P.defaultOptions=po;P.moduleName=de;P.folderName=he;import{jsx as Kn}from"react/jsx-runtime";var mo="k-checkbox-list-item",On=[],Tn={},Rn={},w=e=>{let{...t}=e;return Kn("li",{...t,className:a(e.className,mo),children:e.children})};w.states=On;w.options=Tn;w.className=mo;w.defaultOptions=Rn;w.moduleName=de;w.folderName=he;import{Fragment as _n,jsx as uo,jsxs as Hn}from"react/jsx-runtime";var Z=({children:e="Label",id:t="cb-label-after",...o})=>Hn(_n,{children:[uo(U,{id:t,...o}),uo("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 br,jsx as ur,jsxs as fr}from"react/jsx-runtime";import{Fragment as vr,jsx as Lr,jsxs as gr}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 bo}from"react/jsx-runtime";var Pn=P.options,wn=P.states,Dn={...P.defaultOptions,variant:"vertical"},zn=[{name:"vertical",title:"Vertical"},{name:"horizontal",title:"Horizontal"}],Bn=[],Ne=e=>{let{variant:t,...o}=e;return t==="horizontal"?bo(P,{layout:"horizontal",...o,children:[B(w,{children:B(Z,{id:g("cb"),defaultChecked:!0,children:"Label"})}),B(w,{children:B(Z,{id:g("cb"),children:"Label"})}),B(w,{children:B(Z,{id:g("cb"),children:"Label"})})]}):bo(P,{...o,children:[B(w,{children:B(Z,{id:g("cb"),defaultChecked:!0,children:"Label"})}),B(w,{children:B(Z,{id:g("cb"),children:"Label"})}),B(w,{children:B(Z,{id:g("cb"),children:"Label"})})]})};Ne.options=Pn;Ne.states=wn;Ne.variants=zn;Ne.defaultOptions=Dn;Ne.modifiers=Bn;Ne.className=P.className;import{jsx as $n}from"react/jsx-runtime";var Un=U.options,Fn=U.states,Vn=U.defaultOptions,Gn=[],Xn=[],Le=e=>$n(Z,{id:g("checkbox"),...e,defaultChecked:!0,children:"Label"});Le.options=Un;Le.states=Fn;Le.variants=Gn;Le.defaultOptions=Vn;Le.modifiers=Xn;Le.className=U.className;import{Fragment as Yn,jsx as fo}from"react/jsx-runtime";var bt="k-font-icon",qn=[],Jn={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]},Wn={},we=e=>{let{size:t,themeColor:o,icon:i,rotate:n,flip:r,...d}=e;return i?fo("span",{...d,className:a(e.className,bt,C(bt,{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(Yn,{})};we.states=qn;we.options=Jn;we.className=bt;we.defaultOptions=Wn;var xo=we;import{Fragment as jn,jsx as We}from"react/jsx-runtime";var ft="k-svg-icon",Qn=[],Zn={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]},xt={viewBox:"0 0 24 24",variant:q.outline},De=e=>{let{size:t,themeColor:o,rotate:i,flip:n,viewBox:r=xt.viewBox,variant:d=xt.variant,icon:c,...m}=e;if(!c)return We(jn,{});if(c==="none")return We("span",{...m,className:a(e.className,ft,C("k-icon",{size:t}),"k-none"),"aria-hidden":"true"});let b=typeof c=="object"&&c.name&&c.name,f=typeof c=="object"?d&&c.variants?.[d]||c.variants?.outline||c.content:void 0;return We("span",{...m,className:a(e.className,ft,C("k-icon",{size:t}),{[`k-svg-i-${b}`]:b,[`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:We("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof c=="object"?c.viewBox:r,dangerouslySetInnerHTML:f!==void 0?{__html:f}:void 0,children:c?void 0:e.children})})};De.states=Qn;De.options=Zn;De.className=ft;De.defaultOptions=xt;var ht=De;import*as Nt from"@progress/kendo-svg-icons";var ho="icon",No="icons";import{useContext as ti}from"react";import{createContext as ei}from"react";var Lo=ei({iconsType:"svg"});import{Fragment as vo,jsx as ze}from"react/jsx-runtime";var Ye="k-icon",oi=e=>e.replace(/([-_][a-z0-9])/gi,t=>t.toUpperCase().replace("-","").replace("_","")),ni=[],ii={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]},Qe={viewBox:"0 0 24 24",type:"svg",variant:q.outline},L=e=>{let{iconsType:t}=ti(Lo),{size:o,themeColor:i,icon:n,type:r=t||Qe.type,rotate:d,flip:c,viewBox:m=Qe.viewBox,variant:b=Qe.variant,...f}=e;if(!n)return ze(vo,{});if((t||r)==="svg"){if(n==="none")return ze(ht,{...f,className:a(e.className,Ye),icon:n,size:o,variant:b});let v=Nt[n]?n:oi(`${n}-icon`);return Nt[v]?ze(ht,{...f,className:a(e.className,Ye),icon:Nt[v],size:o,themeColor:i,rotate:d,flip:c,viewBox:m,variant:b}):ze(vo,{})}return ze(xo,{...f,className:a(e.className,Ye),icon:n,size:o,themeColor:i,rotate:d,flip:c})};L.states=ni;L.options=ii;L.defaultOptions=Qe;L.className=Ye;L.moduleName=ho;L.folderName=No;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 pe,jsxs as li}from"react/jsx-runtime";var Lt="k-list-item",ai=[s.hover,s.focus,s.selected,s.disabled],si={},ri={},k=e=>{let{text:t,groupLabel:o,group:i,iconName:n,iconClassName:r,showCheckbox:d,checked:c,hover:m,focus:b,selected:f,disabled:N,actions:v,description:O,id:_,...I}=e,S=t||e.children;return li("li",{...I,id:_,role:i?"presentation":"option",tabIndex:i?void 0:b?0:-1,"aria-selected":!i&&f?"true":i?void 0:"false","aria-disabled":!i&&N?"true":void 0,className:a(e.className,i?"k-list-group-item":Lt,E(Lt,{hover:m,focus:b,disabled:N,selected:f})),children:[d&&pe(z,{checked:c}),n&&pe("span",{className:"k-list-item-icon-wrapper",children:pe(L,{icon:n,className:a("k-list-item-icon",r)})}),pe("span",{className:"k-list-item-text",children:S}),v&&pe("div",{className:"k-list-item-actions",children:v}),O&&pe("span",{className:"k-list-item-description",children:O}),o&&o!==""&&pe("div",{className:"k-list-item-group-label",children:o})]})};k.states=ai;k.options=si;k.className=Lt;k.defaultOptions=ri;k.moduleName=ce;k.folderName=fe;k.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 di}from"react/jsx-runtime";var ci="k-list-ul",te=e=>{let{children:t,role:o,id:i,...n}=e;return di("ul",{...n,id:i,role:o,className:a(ci,e.className),children:t})};te.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 vt,jsxs as mi}from"react/jsx-runtime";var pi="k-list-content",F=e=>{let{virtualization:t,grouping:o,"aria-label":i,"aria-labelledby":n,listboxId:r,...d}=e;return mi("div",{...d,className:a(pi,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:vt(te,{role:"listbox",id:r,"aria-label":i,"aria-labelledby":n,children:e.children}),t&&vt("div",{className:"k-height-container",children:vt("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 gt,jsxs as xi}from"react/jsx-runtime";var Ze="k-list-sticky-header",ui=[s.hover,s.focus,s.selected],bi={},fi={},je=e=>{let{label:t="Select all",showCheckbox:o=!0,checked:i,indeterminate:n,hover:r,focus:d,selected:c,...m}=e;return gt("div",{...m,className:a(Ze,e.className),children:xi("div",{className:a(`${Ze}-item`,E(`${Ze}-item`,{hover:r,focus:d,selected:c})),children:[o&&gt(z,{checked:i,indeterminate:n,"aria-label":t}),gt("span",{className:"k-list-item-text",children:t})]})})};je.states=ui;je.options=bi;je.className=Ze;je.defaultOptions=fi;import{Fragment as Jl,jsx as ql,jsxs as Wl}from"react/jsx-runtime";import{jsx as kt,jsxs as Ni}from"react/jsx-runtime";var hi="k-list-group-item",ve=e=>{let{groupIconName:t,...o}=e;return Ni("li",{...o,role:"presentation",className:a(hi,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})]})};ve.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",Li=[s.hover,s.focus,s.selected,s.disabled],vi={},gi={},et=e=>{let{text:t,hover:o,focus:i,selected:n,disabled:r,...d}=e;return ki("div",{...d,className:a(It,E(It,{hover:o,focus:i,selected:n,disabled:r})),children:t})};et.states=Li;et.options=vi;et.className=It;et.defaultOptions=gi;import{jsx as Ai}from"react/jsx-runtime";var St="k-list-custom-value",Ii=[s.hover,s.focus,s.selected,s.disabled],Si={},Ci={},ge=e=>{let{text:t,hover:o,focus:i,selected:n,disabled:r,...d}=e;return Ai("div",{...d,className:a(St,E(St,{hover:o,focus:i,selected:n,disabled:r})),children:t})};ge.states=Ii;ge.options=Si;ge.className=St;ge.defaultOptions=Ci;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 Gc}from"react/jsx-runtime";var Be="input",tt=Be;import{jsx as Oi}from"react/jsx-runtime";var ot="k-input",yi=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading,s.readonly],Ei={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]},Mi={},M=e=>{let{hover:t,focus:o,disabled:i,invalid:n,valid:r,loading:d,readonly:c,size:m,rounded:b,fillMode:f,...N}=e;return Oi("span",{...N,className:a(e.className,ot,C(ot,{size:m,rounded:b,fillMode:f}),E(ot,{hover:t,focus:o,disabled:i,invalid:n,valid:r,loading:d,readonly:c}))})};M.states=yi;M.options=Ei;M.className=ot;M.defaultOptions=Mi;M.moduleName=Be;M.folderName=tt;import{jsx as _i}from"react/jsx-runtime";var nt="k-picker",Ti=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading,s.readonly],Ri={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]},Ki={},ke=e=>{let{hover:t,focus:o,disabled:i,invalid:n,valid:r,loading:d,readonly:c,size:m,rounded:b,fillMode:f,...N}=e;return _i("span",{...N,className:a(e.className,nt,C(nt,{size:m,rounded:b,fillMode:f}),E(nt,{hover:t,focus:o,disabled:i,invalid:n,valid:r,loading:d,readonly:c})),children:e.children})};ke.states=Ti;ke.options=Ri;ke.className=nt;ke.defaultOptions=Ki;ke.moduleName=Be;ke.folderName=tt;import{Fragment as wi,jsx as Ct}from"react/jsx-runtime";var go="k-clear-value",Hi=[s.disabled,s.loading,s.readonly],Pi={},V=e=>{let{disabled:t,loading:o,readonly:i,value:n}=e;return t||i||o||!n?Ct(wi,{}):Ct("span",{className:a(e.className,go),children:Ct(L,{icon:"x"})})};V.states=Hi;V.options=Pi;V.className=go;import{jsx as Bi}from"react/jsx-runtime";var At="k-input-inner",Di=[],zi={},it={type:"text",autocomplete:"off",value:"",placeholder:""},G=e=>{let{value:t=it.value,type:o=it.type,placeholder:i=it.placeholder,autocomplete:n=it.autocomplete,disabled:r,readOnly:d,...c}=e;return Bi("input",{...c,type:o,className:a(e.className,At,C(At,e)),placeholder:i,autoComplete:n,defaultValue:t,disabled:r||void 0,readOnly:d||void 0})};G.states=Di;G.options=zi;G.className=At;import{jsx as ko,jsxs as Vi}from"react/jsx-runtime";var yt="k-input-inner",Ui=[],Fi={},Et=e=>{let{value:t,placeholder:o,showValue:i,valueIcon:n,valueIconName:r,...d}=e;return Vi("span",{...d,className:a(e.className,yt,C(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=Ui;Et.options=Fi;Et.className=yt;import{jsx as $i}from"react/jsx-runtime";var Mt="k-input-inner",Gi=[],Xi={},Io={value:"",placeholder:""},Ot=e=>{let{value:t=Io.value,placeholder:o=Io.placeholder,rows:i,disabled:n,...r}=e;return $i("textarea",{...r,className:a(e.className,Mt,C(Mt,e)),placeholder:o,rows:i,defaultValue:t,disabled:n||void 0})};Ot.states=Gi;Ot.options=Xi;Ot.className=Mt;import{Fragment as Ji,jsx as So}from"react/jsx-runtime";var Co="k-input-loading-icon",qi=[s.disabled,s.loading],J=e=>{let{disabled:t,loading:o}=e;return t||!o?So(Ji,{}):So("span",{className:a(e.className,Co,"k-icon k-i-loading")})};J.states=qi;J.className=Co;import{Fragment as Qi,jsx as Ao}from"react/jsx-runtime";var yo="k-input-validation-icon",Wi=[s.valid,s.invalid,s.disabled,s.loading],Yi={},X=e=>{let{valid:t,invalid:o,disabled:i,loading:n}=e,r=o?"warning-circle":"check-circle";return i||n||!!!(t||o)?Ao(Qi,{}):Ao(L,{className:a(yo),icon:r})};X.states=Wi;X.options=Yi;X.className=yo;import{Fragment as ea,jsx as Eo}from"react/jsx-runtime";var Zi="k-input-prefix",ji={direction:"horizontal"},Ie=e=>{let{direction:t=ji.direction,...o}=e;return e.children?Eo("span",{...o,className:a(Zi,e.className,{[`k-input-prefix-${t}`]:t}),children:e.children}):Eo(ea,{})};import{Fragment as na,jsx as Mo}from"react/jsx-runtime";var ta="k-input-suffix",oa={direction:"horizontal"},Se=e=>{let{direction:t=oa.direction,...o}=e;return e.children?Mo("span",{...o,className:a(ta,e.className,{[`k-input-suffix-${t}`]:t}),children:e.children}):Mo(na,{})};import{jsx as Jd}from"react/jsx-runtime";import{jsx as Zd}from"react/jsx-runtime";import{jsx as aa}from"react/jsx-runtime";var Oo="k-input-separator",ia={direction:"vertical"},j=e=>{let{direction:t=ia.direction,...o}=e;return aa("span",{...o,className:a(Oo,e.className,{[`${Oo}-${t}`]:t})})};var Tt="button",To=Tt;import{Fragment as Ro,jsx as Ce,jsxs as Ko}from"react/jsx-runtime";var Ue="k-button",sa=["icon-button"],ra=[s.hover,s.focus,s.active,s.selected,s.disabled,s.generating],la={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:b,focus:f,active:N,selected:v,disabled:O,togglable:_,ariaDisabled:I,icon:S,iconSize:y,text:H,iconClassName:ue,className:Ke,...be}=e,_e=S!=null,He=e.children!==void 0;return Ko(t,{className:a(Ke,Ue,no(Ue,m),C(Ue,{size:o,rounded:i,fillMode:n,themeColor:r}),E(Ue,{hover:b,focus:f,active:N,disabled:O||I,selected:v}),{"k-icon-button":!H&&!He&&_e}),"aria-pressed":_?v?"true":"false":void 0,...be,"aria-disabled":I?"true":void 0,disabled:O||void 0,children:[typeof S=="string"&&S&&Ce(L,{className:a(ue,"k-button-icon"),icon:S,size:y}),S&&typeof S!="string"&&Ce(Ro,{children:S}),H?Ko(Ro,{children:[H&&Ce("span",{className:"k-button-text",children:H}),e.children]}):e.children&&Ce("span",{className:"k-button-text",children:e.children}),d&&Ce("span",{className:"k-menu-button-arrow k-button-arrow",children:Ce(L,{icon:c})})]})};h.states=ra;h.options=la;h.variants=sa;h.className=Ue;h.defaultOptions=Rt;h.moduleName=Tt;h.folderName=To;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 ca}from"react/jsx-runtime";var me=e=>ca(h,{children:"Button",...e});import{Fragment as _o,jsx as W,jsxs as Kt}from"react/jsx-runtime";var da=M.states,pa=M.defaultOptions,ma=M.options,ua=[{name:"prefix",title:"Prefix"},{name:"suffix",title:"Suffix"},{name:"clear-button",title:"`Clear` Button"},{name:"validation-icon",title:"Validation Icon"},{name:"separators",title:"Separators"}],ba=[],Ae=e=>{let{modifiers:t,valid:o,invalid:i,loading:n,disabled:r,readonly:d,...c}=e,m=t?.prefix,b=t?.suffix,f=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(_o,{children:[W(Ie,{children:W(L,{icon:"lock"})}),v&&W(j,{})]}),W(G,{placeholder:"Placeholder",value:"Value"}),N&&W(X,{valid:o,invalid:i,loading:n,disabled:r}),W(J,{loading:n,disabled:r}),f&&W(V,{loading:n,disabled:r,readonly:d,value:"Value"}),b&&Kt(_o,{children:[v&&W(j,{}),W(Se,{children:W(me,{size:c.size,fillMode:"clear",children:"Send"})})]})]})};Ae.options=ma;Ae.states=da;Ae.variants=ba;Ae.defaultOptions=pa;Ae.modifiers=ua;Ae.className=M.className;import{jsx as fa}from"react/jsx-runtime";var Ho=e=>fa(h,{icon:"folder",...e,"aria-label":e["aria-label"]||"Folder",children:void 0});import{jsx as xa}from"react/jsx-runtime";var Po=e=>xa(h,{icon:"folder",children:"Button",...e});import{jsx as _t}from"react/jsx-runtime";var ha=h.options,Na=h.states,La={...h.defaultOptions,variant:"text"},va=[{name:"icon-only",title:"Icon Only"},{name:"icon-and-text",title:"Icon & Text"},{name:"text",title:"Text"}],ga=[],ye=e=>{let{variant:t,...o}=e;switch(t){case"icon-only":return _t(Ho,{...o,icon:"star"});case"icon-and-text":return _t(Po,{...o,icon:"star",children:"Button"});default:return _t(me,{...o,children:"Button"})}};ye.options=ha;ye.states=Na;ye.variants=va;ye.defaultOptions=La;ye.modifiers=ga;ye.className=h.className;var Ht="popup",wo=Ht;import{jsx as Do}from"react/jsx-runtime";var zo="k-animation-container",ka=[],Ia={},Pt={positionMode:"absolute",shown:!0},Y=e=>{let{positionMode:t=Pt.positionMode,shown:o=Pt.shown,animationStyle:i,offset:n,...r}=e;return Do("div",{...r,style:{...n,...e.style},className:a(e.className,zo,{"k-animation-container-shown":o,"k-animation-container-fixed":t==="fixed"}),children:Do("div",{className:"k-child-animation-container",style:i,children:e.children})})};Y.states=ka;Y.options=Ia;Y.className=zo;Y.defaultOptions=Pt;Y.moduleName=Ht;Y.folderName=wo;var wt="popup",Bo=wt;import{jsx as Uo}from"react/jsx-runtime";var Fo="k-popup",Sa=[],Ca={},Vo={positionMode:"absolute"},ee=e=>{let{offset:t,positionMode:o=Vo.positionMode,animationStyle:i,containerClassName:n,containerRole:r,containerAriaLabel:d,...c}=e;return Uo(Y,{positionMode:o,offset:t,animationStyle:i,className:n,role:r,"aria-label":d,children:Uo("div",{...c,className:a(e.className,Fo),children:e.children})})};ee.states=Sa;ee.options=Ca;ee.className=Fo;ee.defaultOptions=Vo;ee.moduleName=wt;ee.folderName=Bo;ee.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",Go=Dt;import{jsx as Ea}from"react/jsx-runtime";var at="k-actions",Aa=[],ya={},zt={alignment:"start",orientation:"horizontal"},oe=e=>{let{alignment:t=zt.alignment,orientation:o=zt.orientation,...i}=e;return Ea("div",{...i,className:a(at,{[`${at}-${t}`]:t,[`${at}-${o}`]:o},e.className),children:e.children})};oe.states=Aa;oe.options=ya;oe.className=at;oe.defaultOptions=zt;oe.moduleName=Dt;oe.folderName=Go;import{jsx as Oa}from"react/jsx-runtime";var Ma="k-actionsheet-footer",Xo={alignment:"stretched",orientation:"horizontal"},Ee=e=>{let{alignment:t=Xo.alignment,orientation:o=Xo.orientation,template:i,as:n=i?"div":oe,...r}=e;return Oa(n,{...r,...!i&&{alignment:t,orientation:o},className:a(e.className,Ma),children:e.children})};var Bt="searchbox",$o=Bt;import{jsx as Fe,jsxs as Ka}from"react/jsx-runtime";var qo="k-searchbox",Ta=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading],Ra={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"},ne=e=>{let{value:t,placeholder:o,size:i,rounded:n,fillMode:r,hover:d,focus:c,valid:m,invalid:b,required:f,loading:N,disabled:v,showIcon:O=Ut.showIcon,icon:_=Ut.icon,"aria-label":I,...S}=e;return Ka(M,{...S,size:i,rounded:n,fillMode:r,hover:d,focus:c,valid:m,invalid:b,required:f,loading:N,disabled:v,className:a(e.className,qo),children:[O&&Fe(L,{className:"k-input-icon",icon:_}),Fe(G,{placeholder:o,value:t,"aria-label":I}),Fe(J,{...e}),Fe(X,{...e}),Fe(V,{...e})]})};ne.states=Ta;ne.options=Ra;ne.className=qo;ne.defaultOptions=Ut;ne.moduleName=Bt;ne.folderName=$o;import{jsx as Fm}from"react/jsx-runtime";var Ft="textbox",Jo=Ft;import{Fragment as Wo,jsx as ie,jsxs as Vt}from"react/jsx-runtime";var Yo="k-textbox",_a=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading,s.readonly],Ha={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]},st={showClearButton:!0,showValidationIcon:!0,separators:!0},D=e=>{let{size:t,rounded:o,fillMode:i,separators:n=st.separators,showClearButton:r=st.showClearButton,showValidationIcon:d=st.showValidationIcon,prefix:c,suffix:m,type:b,value:f,placeholder:N,hover:v,focus:O,valid:_,invalid:I,required:S,loading:y,disabled:H,readonly:ue,id:Ke,"aria-label":be,"aria-describedby":_e,...He}=e;return Vt(M,{...He,size:t,rounded:o,fillMode:i,hover:v,focus:O,valid:_,invalid:I,required:S,loading:y,disabled:H,readonly:ue,className:a(e.className,Yo),children:[c&&Vt(Wo,{children:[ie(Ie,{children:c}),n&&ie(j,{})]}),ie(G,{id:Ke,placeholder:N,value:f,type:b,disabled:H,"aria-label":be,"aria-describedby":_e,"aria-invalid":I?"true":void 0}),d&&ie(X,{valid:_,invalid:I,loading:y,disabled:H}),ie(J,{loading:y,disabled:H}),r&&ie(V,{loading:y,disabled:H,readonly:ue,value:f}),m&&Vt(Wo,{children:[n&&ie(j,{}),ie(Se,{children:m})]})]})};D.states=_a;D.options=Ha;D.className=Yo;D.defaultOptions=st;D.moduleName=Ft;D.folderName=Jo;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 Ve=D;import{jsx as Pa}from"react/jsx-runtime";var Qo=e=>Pa(Ve,{...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 Gt}from"react/jsx-runtime";var wa=D.states,Da=D.defaultOptions,za=D.options,Ba=[{name:"prefix",title:"Prefix"},{name:"suffix",title:"Suffix"},{name:"clear-button",title:"`Clear` Button"}],Ua=[],Me=e=>{let{modifiers:t,...o}=e,i={};return Object.keys(t||{}).forEach(n=>{switch(n){case"prefix":i.prefix=t?.[n]?Gt(L,{icon:"lock"}):void 0;break;case"suffix":i.suffix=t?.[n]?Gt(me,{size:o.size,fillMode:"clear",children:"Send"}):void 0;break;case"clear-button":i.showClearButton=t?.[n];break;default:break}}),Gt(Qo,{value:"Value",style:{width:300},...o,...i})};Me.options=za;Me.states=wa;Me.variants=Ua;Me.defaultOptions=Da;Me.modifiers=Ba;Me.className=D.className;import{jsx as ae,jsxs as Xt}from"react/jsx-runtime";var Zo="k-actionsheet-titlebar",Fa={},$=e=>{let{title:t,subtitle:o,actionsStart:i,actionsEnd:n,filter:r,input:d,inputValue:c,inputPlaceholder:m,adaptive:b,titleId:f,children:N,...v}=e;return Xt("div",{...v,className:a(e.className,Zo),children:[Xt("div",{className:"k-actionsheet-titlebar-group",children:[i&&ae("div",{className:"k-actionsheet-actions",children:i}),!N&&Xt("div",{className:"k-actionsheet-title",id:f,children:[t&&ae("div",{className:"k-text-center",children:t}),o&&ae("div",{className:"k-actionsheet-subtitle k-text-center",children:o})]}),N&&ae("div",{className:"k-actionsheet-title",id:f,children:N}),n&&ae("div",{className:"k-actionsheet-actions",children:n})]}),(d||r)&&ae("div",{className:"k-actionsheet-titlebar-group k-actionsheet-filter",children:d?ae(D,{value:c,placeholder:m,size:b?"large":"medium","aria-label":t||m||"Input"}):ae(ne,{placeholder:"Filter",size:b?"large":"medium","aria-label":"Filter options"})})]})};$.className=Zo;$.defaultOptions=Fa;import{jsx as $t,jsxs as $a}from"react/jsx-runtime";var qt="k-actionsheet-view",Va=[],Ga={},Xa={},Oe=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}),b=r?.type===Ee&&$t(Ee,{...r?.props});return $a("div",{...c,className:a(e.className,qt,{[`${qt}-animated`]:o}),children:[m,$t("div",{className:"k-actionsheet-content",children:i}),b]})};Oe.states=Va;Oe.options=Ga;Oe.className=qt;Oe.defaultOptions=Xa;var Ge="action-sheet",rt=Ge;var Jt="overlay",jo=Jt;import{jsx as Ya}from"react/jsx-runtime";var en="k-overlay",qa=[],Ja={},Wa={},se=e=>{let{...t}=e;return Ya("div",{...t,className:a(e.className,en),children:e.children})};se.states=qa;se.options=Ja;se.className=en;se.defaultOptions=Wa;se.moduleName=Jt;se.folderName=jo;import{jsx as lt,jsxs as ja}from"react/jsx-runtime";var tn="k-actionsheet",Qa=[],Za={},Xe={side:"bottom",fullscreen:!1,adaptive:!1,overlay:!0},R=e=>{let{side:t=Xe.side,fullscreen:o=Xe.fullscreen,adaptive:i=Xe.adaptive,overlay:n=Xe.overlay,template:r,children:d,header:c,footer:m,id:b,...f}=e,N=b&&!r&&c?`${b}-title`:void 0;return ja("div",{className:"k-actionsheet-container",children:[n&&lt(se,{}),lt(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:lt("div",{...f,id:b,role:"dialog","aria-modal":n?"true":void 0,"aria-labelledby":N,className:a(e.className,tn,{[`k-actionsheet-${t}`]:o===!1,"k-actionsheet-fullscreen":o===!0,"k-adaptive-actionsheet":i}),children:r||lt(Oe,{header:c,footer:m,adaptive:i,titleId:N,...e,children:d})})})]})};R.states=Qa;R.options=Za;R.className=tn;R.defaultOptions=Xe;R.moduleName=Ge;R.folderName=rt;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 ns}from"react/jsx-runtime";var on="k-actionsheet-container",es=[],ts={},os={},Te=e=>{let{children:t,...o}=e;return ns("div",{...o,className:on,children:t})};Te.states=es;Te.options=ts;Te.className=on;Te.defaultOptions=os;Te.moduleName=Ge;Te.folderName=rt;import{jsx as is}from"react/jsx-runtime";var Wt=e=>{let{...t}=e;return is("div",{...t,className:a(e.className,"k-list-ul"),children:e.children})};import{Fragment as ss,jsx as $e,jsxs as Yt}from"react/jsx-runtime";var Qt="k-actionsheet-item",as=[s.hover,s.focus,s.selected,s.disabled],re=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,E(Qt,{hover:n,focus:r,selected:d,disabled:c})),children:[!e.children&&$e(ss,{children:Yt("span",{className:"k-actionsheet-action",children:[t&&$e("span",{className:"k-icon-wrap",children:$e(L,{className:"k-actionsheet-item-icon",icon:t})}),Yt("span",{className:"k-actionsheet-item-text",children:[o&&$e("span",{className:"k-actionsheet-item-title",children:o}),i&&$e("span",{className:"k-actionsheet-item-description",children:i})]})]})}),e.children]})};re.states=as;re.className=Qt;import{jsx as fb,jsxs as xb}from"react/jsx-runtime";import{jsx as vb}from"react/jsx-runtime";import{jsx as Sb}from"react/jsx-runtime";import{jsx as Eb}from"react/jsx-runtime";import{jsx as K,jsxs as Zt}from"react/jsx-runtime";var rs=R.options,ls=R.states,an={...R.defaultOptions,variant:"normal"},cs=[{name:"normal",title:"Normal"},{name:"adaptive",title:"Adaptive"},{name:"fullScreen",title:"Full Screen"}],ds=[{name:"actions",title:"Titlebar Actions",type:"boolean"},{name:"subtitle",title:"Subtitle",type:"boolean"},{name:"footer",title:"Footer",type:"boolean"}],Re=e=>{let{variant:t,modifiers:o,...i}={...an,...e},n={},r=Zt(Wt,{children:[K(re,{text:"Edit Item",description:"Click to edit",iconName:"edit-tools"}),K(re,{text:"Add to Favorites",iconName:"heart"}),K(re,{text:"Upload New",iconName:"upload",disabled:!0}),K("hr",{className:"k-hr"}),K(re,{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(Ee,{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(Ee,{alignment:"stretched",children:[K(h,{text:"Apply",themeColor:"primary"}),K(h,{text:"Cancel",themeColor:"base"})]}):void 0,children:r})};Re.options=rs;Re.states=ls;Re.variants=cs;Re.defaultOptions=an;Re.modifiers=ds;Re.className=R.className;var jt="combobox",sn=jt;import{Fragment as eo,jsx as A,jsxs as qe}from"react/jsx-runtime";var rn="k-combobox",ps=[s.hover,s.focus,s.valid,s.invalid,s.loading,s.required,s.disabled,s.readonly],ms={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]},ln={separators:!0},le=e=>{let{size:t,rounded:o,fillMode:i,separators:n=ln.separators,prefix:r,suffix:d,value:c,placeholder:m,hover:b,focus:f,valid:N,invalid:v,required:O,loading:_,disabled:I,popup:S,opened:y,readonly:H,adaptive:ue,adaptiveSettings:Ke,adaptiveTitle:be,adaptiveSubtitle:_e,adaptiveCustomValue:He,id:Pe,autocomplete:dn,activeDescendant:oo,"aria-label":pn,...mn}=e,un=Pe?`${Pe}-listbox`:void 0;return qe(eo,{children:[qe(M,{...mn,size:t,rounded:o,fillMode:i,hover:b,focus:f,valid:N,invalid:v,required:O,loading:_,disabled:I,readonly:H,className:a(e.className,rn),children:[r&&qe(eo,{children:[A(Ie,{children:r}),n&&A(j,{})]}),A(G,{id:Pe,placeholder:m,value:c,role:"combobox","aria-haspopup":"listbox","aria-expanded":y?"true":"false","aria-controls":y?un:void 0,"aria-activedescendant":y&&oo?oo:void 0,"aria-autocomplete":dn,"aria-invalid":v?"true":void 0,"aria-busy":_?"true":void 0,"aria-label":pn,disabled:I,readOnly:H}),A(X,{valid:N,invalid:v,loading:_,disabled:I}),A(J,{loading:_,disabled:I}),A(V,{loading:_,disabled:I,readonly:H,value:c}),d&&qe(eo,{children:[n&&A(j,{}),A(Se,{children:d})]}),A(h,{className:"k-input-button",icon:"chevron-down",size:t,fillMode:i,"aria-label":"Open popup",tabIndex:-1,disabled:I})]}),y&&S&&A(ee,{className:"k-list-container k-combobox-popup",containerRole:"region",containerAriaLabel:"Combobox suggestions",children:S}),ue&&A(R,{adaptive:!0,id:Pe?`${Pe}-adaptive`:void 0,...Ke,header:A($,{actionsEnd:A(h,{icon:"check",themeColor:"primary",size:"large",fillMode:"flat","aria-label":"Apply selection"}),input:!0,inputValue:c,inputPlaceholder:m,title:be,subtitle:_e}),children:A("div",{className:"k-list-container",children:A(T,{customValue:He?A(ge,{text:`Use "${c}"`}):void 0,size:"large",children:qe(F,{"aria-label":be||"Options",children:[A(k,{text:"List item"}),A(k,{text:"List item"}),A(k,{text:"List item"})]})})})})]})};le.states=ps;le.options=ms;le.className=rn;le.defaultOptions=ln;le.moduleName=jt;le.folderName=sn;le.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 cn=le;import{jsx as Q,jsxs as to}from"react/jsx-runtime";var uf=e=>{let t=g("combobox"),o=g("combobox-group"),i=g("combobox-group");return Q(cn,{id:t,opened:!0,popup:Q(T,{header:"Group 1",children:to(F,{grouping:!0,listboxId:`${t}-listbox`,"aria-label":"Options",children:[to(te,{role:"group","aria-labelledby":o,children:[Q(ve,{id:o,children:"Group 1"}),Q(k,{id:g("combobox-item"),children:"List group 1 item 1"}),Q(k,{id:g("combobox-item"),children:"List group 1 item 2"}),Q(k,{id:g("combobox-item"),children:"List group 1 item 3"})]}),to(te,{role:"group","aria-labelledby":i,children:[Q(ve,{id:i,children:"Group 2"}),Q(k,{id:g("combobox-item"),children:"List group 1 item 1"}),Q(k,{id:g("combobox-item"),children:"List group 1 item 2"}),Q(k,{id:g("combobox-item"),children:"List group 1 item 3"})]})]})}),...e})};export{uf as ComboboxGrouping};