UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

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