@progress/kendo-themes-html
Version:
A collection of HTML helpers used for developing Kendo UI themes
2 lines (1 loc) • 30.8 kB
JavaScript
var n=(...e)=>e.filter(t=>t!==!0&&!!t).map(t=>Array.isArray(t)?n(...t):typeof t=="object"?Object.keys(t).map((o,i)=>t[i]||t[o]&&o||null).filter(o=>o!==null).join(" "):t).filter(t=>!!t).join(" ");var g=(e,t)=>n({[`${e}-xs`]:t.size==="xsmall",[`${e}-sm`]:t.size==="small",[`${e}-md`]:t.size==="medium",[`${e}-lg`]:t.size==="large",[`${e}-xl`]:t.size==="xlarge",[`${e}-xxl`]:t.size==="xxlarge",[`${e}-xxxl`]:t.size==="xxxlarge"},{[`${e}-${t.fillMode}`]:t.fillMode},{[`${e}-${t.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"}),C=(e,t)=>{let{valid:o,invalid:i,hover:a,focus:l,checked:c,active:p,selected:f,disabled:x,indeterminate:b,loading:k,empty:N,readonly:I,highlighted:F,...P}=t;return n({"k-valid":o,"k-invalid":i,"k-hover":a,"k-focus":l,"k-checked":c,"k-active":p,"k-selected":f,"k-disabled":x,"k-indeterminate":b&&!c,"k-loading":k,"k-empty":N,"k-readonly":I,"k-highlighted":F},Object.keys(P).reduce((v,_)=>(_.startsWith("k-")?v[_]=P[_]:v[`k-${_}`]=P[_],v),{}))};function ut(e,t){if(!t)return{};let o=Array.isArray(t)?t:[t];return Object.fromEntries(o.map(i=>[`k-${i}`,!0]))}var r={undefined:void 0,xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},m={undefined:void 0,none:"none",small:"small",medium:"medium",large:"large",full:"full"},L={undefined:void 0,solid:"solid",flat:"flat",outline:"outline",clear:"clear",link:"link"},H={undefined:void 0,outline:"outline",solid:"solid",duotone:"duotone"},d={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 Pe={};function S(e){return Pe[e]=(Pe[e]||0)+1,`k-${e}-${Pe[e]}`}var le="input",he=le;import{jsx as mo}from"react/jsx-runtime";var Le="k-input",lo=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading,s.readonly],co={size:[r.undefined,r.small,r.medium,r.large],rounded:[m.undefined,m.none,m.small,m.medium,m.large,m.full],fillMode:[L.undefined,L.solid,L.flat,L.outline]},po={},O=e=>{let{hover:t,focus:o,disabled:i,invalid:a,valid:l,loading:c,readonly:p,size:f,rounded:x,fillMode:b,...k}=e;return mo("span",{...k,className:n(e.className,Le,g(Le,{size:f,rounded:x,fillMode:b}),C(Le,{hover:t,focus:o,disabled:i,invalid:a,valid:l,loading:c,readonly:p}))})};O.states=lo;O.options=co;O.className=Le;O.defaultOptions=po;O.moduleName=le;O.folderName=he;import{jsx as xo}from"react/jsx-runtime";var Ne="k-picker",uo=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading,s.readonly],fo={size:[r.undefined,r.small,r.medium,r.large],rounded:[m.undefined,m.none,m.small,m.medium,m.large,m.full],fillMode:[L.undefined,L.solid,L.flat,L.outline]},bo={},Y=e=>{let{hover:t,focus:o,disabled:i,invalid:a,valid:l,loading:c,readonly:p,size:f,rounded:x,fillMode:b,...k}=e;return xo("span",{...k,className:n(e.className,Ne,g(Ne,{size:f,rounded:x,fillMode:b}),C(Ne,{hover:t,focus:o,disabled:i,invalid:a,valid:l,loading:c,readonly:p})),children:e.children})};Y.states=uo;Y.options=fo;Y.className=Ne;Y.defaultOptions=bo;Y.moduleName=le;Y.folderName=he;import{Fragment as go,jsx as ft}from"react/jsx-runtime";var _e="k-font-icon",ho=[],Lo={size:[r.undefined,r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[d.undefined,d.base,d.primary,d.secondary,d.tertiary,d.success,d.warning,d.error,d.info]},No={},ce=e=>{let{size:t,themeColor:o,icon:i,rotate:a,flip:l,...c}=e;return i?ft("span",{...c,className:n(e.className,_e,g(_e,{size:t}),{[`k-i-${i}`]:i,[`k-color-${o}`]:o,[`k-rotate-${a}`]:a,"k-flip-h":l==="h"||l==="both","k-flip-v":l==="v"||l==="both"}),"aria-hidden":"true"}):ft(go,{})};ce.states=ho;ce.options=Lo;ce.className=_e;ce.defaultOptions=No;var bt=ce;import{Fragment as vo,jsx as ge}from"react/jsx-runtime";var He="k-svg-icon",ko=[],Io={size:[r.undefined,r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[d.undefined,d.base,d.primary,d.secondary,d.tertiary,d.success,d.warning,d.error,d.info],variant:[H.outline,H.solid,H.duotone]},we={viewBox:"0 0 24 24",variant:H.outline},pe=e=>{let{size:t,themeColor:o,rotate:i,flip:a,viewBox:l=we.viewBox,variant:c=we.variant,icon:p,...f}=e;if(!p)return ge(vo,{});if(p==="none")return ge("span",{...f,className:n(e.className,He,g("k-icon",{size:t}),"k-none"),"aria-hidden":"true"});let x=typeof p=="object"&&p.name&&p.name,b=typeof p=="object"?c&&p.variants?.[c]||p.variants?.outline||p.content:void 0;return ge("span",{...f,className:n(e.className,He,g("k-icon",{size:t}),{[`k-svg-i-${x}`]:x,[`k-color-${o}`]:o,[`k-rotate-${i}`]:i,"k-flip-h":a==="h"||a==="both","k-flip-v":a==="v"||a==="both"}),"aria-hidden":"true",children:ge("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof p=="object"?p.viewBox:l,dangerouslySetInnerHTML:b!==void 0?{__html:b}:void 0,children:p?void 0:e.children})})};pe.states=ko;pe.options=Io;pe.className=He;pe.defaultOptions=we;var ze=pe;import*as De from"@progress/kendo-svg-icons";var xt="icon",ht="icons";import{useContext as So}from"react";import{createContext as Co}from"react";var Lt=Co({iconsType:"svg"});import{Fragment as Nt,jsx as de}from"react/jsx-runtime";var ke="k-icon",yo=e=>e.replace(/([-_][a-z0-9])/gi,t=>t.toUpperCase().replace("-","").replace("_","")),Mo=[],Ao={size:[r.undefined,r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[d.undefined,d.base,d.primary,d.secondary,d.tertiary,d.success,d.warning,d.error,d.info],variant:[H.outline,H.solid,H.duotone]},Ie={viewBox:"0 0 24 24",type:"svg",variant:H.outline},u=e=>{let{iconsType:t}=So(Lt),{size:o,themeColor:i,icon:a,type:l=t||Ie.type,rotate:c,flip:p,viewBox:f=Ie.viewBox,variant:x=Ie.variant,...b}=e;if(!a)return de(Nt,{});if((t||l)==="svg"){if(a==="none")return de(ze,{...b,className:n(e.className,ke),icon:a,size:o,variant:x});let N=De[a]?a:yo(`${a}-icon`);return De[N]?de(ze,{...b,className:n(e.className,ke),icon:De[N],size:o,themeColor:i,rotate:c,flip:p,viewBox:f,variant:x}):de(Nt,{})}return de(bt,{...b,className:n(e.className,ke),icon:a,size:o,themeColor:i,rotate:c,flip:p})};u.states=Mo;u.options=Ao;u.defaultOptions=Ie;u.className=ke;u.moduleName=xt;u.folderName=ht;u.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 Eo,jsx as Ue}from"react/jsx-runtime";var gt="k-clear-value",Oo=[s.disabled,s.loading,s.readonly],To={},me=e=>{let{disabled:t,loading:o,readonly:i,value:a}=e;return t||i||o||!a?Ue(Eo,{}):Ue("span",{className:n(e.className,gt),children:Ue(u,{icon:"x"})})};me.states=Oo;me.options=To;me.className=gt;import{jsx as Bo}from"react/jsx-runtime";var Ge="k-input-inner",Ko=[],Ro={},ve={type:"text",autocomplete:"off",value:"",placeholder:""},X=e=>{let{value:t=ve.value,type:o=ve.type,placeholder:i=ve.placeholder,autocomplete:a=ve.autocomplete,disabled:l,readOnly:c,...p}=e;return Bo("input",{...p,type:o,className:n(e.className,Ge,g(Ge,e)),placeholder:i,autoComplete:a,defaultValue:t,disabled:l||void 0,readOnly:c||void 0})};X.states=Ko;X.options=Ro;X.className=Ge;import{jsx as kt,jsxs as Ho}from"react/jsx-runtime";var Ve="k-input-inner",Po=[],_o={},Fe=e=>{let{value:t,placeholder:o,showValue:i,valueIcon:a,valueIconName:l,...c}=e;return Ho("span",{...c,className:n(e.className,Ve,g(Ve,e)),children:[a,!a&&l&&kt(u,{className:"k-input-value-icon",icon:l}),i&&!t&&o,i&&t&&kt("span",{className:"k-input-value-text",children:t})]})};Fe.states=Po;Fe.options=_o;Fe.className=Ve;import{jsx as Do}from"react/jsx-runtime";var $e="k-input-inner",wo=[],zo={},It={value:"",placeholder:""},Xe=e=>{let{value:t=It.value,placeholder:o=It.placeholder,rows:i,disabled:a,...l}=e;return Do("textarea",{...l,className:n(e.className,$e,g($e,e)),placeholder:o,rows:i,defaultValue:t,disabled:a||void 0})};Xe.states=wo;Xe.options=zo;Xe.className=$e;import{Fragment as Go,jsx as vt}from"react/jsx-runtime";var Ct="k-input-loading-icon",Uo=[s.disabled,s.loading],Ce=e=>{let{disabled:t,loading:o}=e;return t||!o?vt(Go,{}):vt("span",{className:n(e.className,Ct,"k-icon k-i-loading")})};Ce.states=Uo;Ce.className=Ct;import{Fragment as $o,jsx as St}from"react/jsx-runtime";var yt="k-input-validation-icon",Vo=[s.valid,s.invalid,s.disabled,s.loading],Fo={},ue=e=>{let{valid:t,invalid:o,disabled:i,loading:a}=e,l=o?"warning-circle":"check-circle";return i||a||!!!(t||o)?St($o,{}):St(u,{className:n(yt),icon:l})};ue.states=Vo;ue.options=Fo;ue.className=yt;import{Fragment as qo,jsx as Mt}from"react/jsx-runtime";var Xo="k-input-prefix",Wo={direction:"horizontal"},Se=e=>{let{direction:t=Wo.direction,...o}=e;return e.children?Mt("span",{...o,className:n(Xo,e.className,{[`k-input-prefix-${t}`]:t}),children:e.children}):Mt(qo,{})};import{Fragment as Yo,jsx as At}from"react/jsx-runtime";var Jo="k-input-suffix",Qo={direction:"horizontal"},ye=e=>{let{direction:t=Qo.direction,...o}=e;return e.children?At("span",{...o,className:n(Jo,e.className,{[`k-input-suffix-${t}`]:t}),children:e.children}):At(Yo,{})};import{jsx as Ui}from"react/jsx-runtime";import{jsx as $i}from"react/jsx-runtime";import{jsx as jo}from"react/jsx-runtime";var Ot="k-input-separator",Zo={direction:"vertical"},Z=e=>{let{direction:t=Zo.direction,...o}=e;return jo("span",{...o,className:n(Ot,e.className,{[`${Ot}-${t}`]:t})})};var We="button",Tt=We;import{Fragment as Et,jsx as j,jsxs as Kt}from"react/jsx-runtime";var fe="k-button",en=["icon-button"],tn=[s.hover,s.focus,s.active,s.selected,s.disabled,s.generating],on={size:[r.undefined,r.xsmall,r.small,r.medium,r.large],rounded:[m.undefined,m.none,m.small,m.medium,m.large,m.full],fillMode:[L.undefined,L.solid,L.flat,L.outline,L.clear,L.link],themeColor:[d.undefined,d.base,d.primary,d.secondary,d.tertiary,d.success,d.warning,d.error,d.info,d.inverse]},qe={showArrow:!1,arrowIconName:"chevron-down"},h=e=>{let{as:t="button",size:o,rounded:i,fillMode:a,themeColor:l,showArrow:c=qe.showArrow,arrowIconName:p=qe.arrowIconName,variant:f,hover:x,focus:b,active:k,selected:N,disabled:I,togglable:F,ariaDisabled:P,icon:v,iconSize:_,text:$,iconClassName:Be,className:so,...io}=e,ao=v!=null,ro=e.children!==void 0;return Kt(t,{className:n(so,fe,ut(fe,f),g(fe,{size:o,rounded:i,fillMode:a,themeColor:l}),C(fe,{hover:x,focus:b,active:k,disabled:I||P,selected:N}),{"k-icon-button":!$&&!ro&&ao}),"aria-pressed":F?N?"true":"false":void 0,...io,"aria-disabled":P?"true":void 0,disabled:I||void 0,children:[typeof v=="string"&&v&&j(u,{className:n(Be,"k-button-icon"),icon:v,size:_}),v&&typeof v!="string"&&j(Et,{children:v}),$?Kt(Et,{children:[$&&j("span",{className:"k-button-text",children:$}),e.children]}):e.children&&j("span",{className:"k-button-text",children:e.children}),c&&j("span",{className:"k-menu-button-arrow k-button-arrow",children:j(u,{icon:p})})]})};h.states=tn;h.options=on;h.variants=en;h.className=fe;h.defaultOptions=qe;h.moduleName=We;h.folderName=Tt;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 nn}from"react/jsx-runtime";var Me=e=>nn(h,{children:"Button",...e});import{Fragment as Rt,jsx as w,jsxs as Je}from"react/jsx-runtime";var sn=O.states,an=O.defaultOptions,rn=O.options,ln=[{name:"prefix",title:"Prefix"},{name:"suffix",title:"Suffix"},{name:"clear-button",title:"`Clear` Button"},{name:"validation-icon",title:"Validation Icon"},{name:"separators",title:"Separators"}],cn=[],ee=e=>{let{modifiers:t,valid:o,invalid:i,loading:a,disabled:l,readonly:c,...p}=e,f=t?.prefix,x=t?.suffix,b=t?.["clear-button"],k=t?.["validation-icon"],N=t?.separators;return Je(O,{...p,valid:o,invalid:i,loading:a,disabled:l,readonly:c,style:{width:300},children:[f&&Je(Rt,{children:[w(Se,{children:w(u,{icon:"lock"})}),N&&w(Z,{})]}),w(X,{placeholder:"Placeholder",value:"Value"}),k&&w(ue,{valid:o,invalid:i,loading:a,disabled:l}),w(Ce,{loading:a,disabled:l}),b&&w(me,{loading:a,disabled:l,readonly:c,value:"Value"}),x&&Je(Rt,{children:[N&&w(Z,{}),w(ye,{children:w(Me,{size:p.size,fillMode:"clear",children:"Send"})})]})]})};ee.options=rn;ee.states=sn;ee.variants=cn;ee.defaultOptions=an;ee.modifiers=ln;ee.className=O.className;var Qe="popup",Bt=Qe;import{jsx as Pt}from"react/jsx-runtime";var _t="k-animation-container",pn=[],dn={},Ye={positionMode:"absolute",shown:!0},V=e=>{let{positionMode:t=Ye.positionMode,shown:o=Ye.shown,animationStyle:i,offset:a,...l}=e;return Pt("div",{...l,style:{...a,...e.style},className:n(e.className,_t,{"k-animation-container-shown":o,"k-animation-container-fixed":t==="fixed"}),children:Pt("div",{className:"k-child-animation-container",style:i,children:e.children})})};V.states=pn;V.options=dn;V.className=_t;V.defaultOptions=Ye;V.moduleName=Qe;V.folderName=Bt;var Ze="popup",Ht=Ze;import{jsx as wt}from"react/jsx-runtime";var zt="k-popup",mn=[],un={},Dt={positionMode:"absolute"},z=e=>{let{offset:t,positionMode:o=Dt.positionMode,animationStyle:i,containerClassName:a,containerRole:l,containerAriaLabel:c,...p}=e;return wt(V,{positionMode:o,offset:t,animationStyle:i,className:a,role:l,"aria-label":c,children:wt("div",{...p,className:n(e.className,zt),children:e.children})})};z.states=mn;z.options=un;z.className=zt;z.defaultOptions=Dt;z.moduleName=Ze;z.folderName=Ht;z.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 je="smart-box",Ut=je;import{Fragment as et,jsx as te,jsxs as Ae}from"react/jsx-runtime";var Gt="k-smart-box",fn=[s.hover,s.focus,s.disabled],bn={size:[r.undefined,r.small,r.medium,r.large],rounded:[m.undefined,m.none,m.small,m.medium,m.large,m.full],fillMode:[L.undefined,L.solid,L.flat,L.outline]},Vt={separators:!0},K=e=>{let{size:t,rounded:o,fillMode:i,separators:a=Vt.separators,prefix:l,suffix:c,value:p,placeholder:f,hover:x,focus:b,disabled:k,popup:N,opened:I,processing:F,inputAriaLabel:P,inputAriaControls:v,inputAriaActiveDescendant:_,inputAriaAutocomplete:$,...Be}=e;return Ae(et,{children:[Ae(O,{...Be,size:t,rounded:o,fillMode:i,hover:x,focus:b,disabled:k,loading:F,className:n(e.className,Gt),children:[l&&Ae(et,{children:[te(Se,{children:l}),a&&te(Z,{})]}),te(X,{placeholder:f,value:p,role:"combobox","aria-haspopup":"listbox","aria-expanded":I?"true":"false","aria-autocomplete":$,"aria-controls":I?v:void 0,"aria-activedescendant":I?_:void 0,"aria-label":P}),c&&Ae(et,{children:[a&&te(Z,{}),te(ye,{children:c})]})]}),I&&N&&te(z,{className:"k-smart-box-popup",children:N})]})};K.states=fn;K.options=bn;K.className=Gt;K.defaultOptions=Vt;K.moduleName=je;K.folderName=Ut;K.ariaSpec={selector:".k-smart-box",rules:[{selector:".k-smart-box .k-input-inner",attribute:"role=combobox",usage:"Announces the combobox role for the SmartBox input."},{selector:".k-smart-box .k-input-inner",attribute:"aria-label or aria-labelledby",usage:'Provides an accessible label for the SmartBox (e.g., "AI-powered search").'},{selector:".k-smart-box .k-input-inner",attribute:"aria-expanded",usage:"Indicates whether the suggestion popup is currently visible."},{selector:".k-smart-box .k-input-inner",attribute:"aria-haspopup=listbox",usage:"Indicates that the SmartBox has a popup listbox with suggestions."},{selector:".k-smart-box .k-input-inner",attribute:"aria-controls (when present)",usage:"References the ID of the popup listbox element when the popup is open."},{selector:".k-smart-box .k-input-inner",attribute:"aria-autocomplete (when present)",usage:"Indicates the autocomplete behavior of the input field."},{selector:".k-smart-box .k-input-inner",attribute:"aria-activedescendant (when present)",usage:"When the popup is open and keyboard navigation is active, references the ID of the currently focused list item."},{selector:".k-smart-box .k-input-prefix .k-icon",attribute:"aria-hidden=true",usage:"Decorative icons in the prefix area are hidden from screen readers."},{selector:".k-smart-box .k-input-suffix .k-button",attribute:"aria-label",usage:'Suffix buttons must have accessible labels describing their function (e.g., "Start voice input", "Send prompt").'},{selector:".k-smart-box .k-smart-box-send",attribute:"aria-label",usage:'The send button must be labelled to indicate its current action (e.g., "Send" or "Stop processing").'},{selector:".k-smart-box .k-smart-box-send.k-disabled",attribute:"disabled or aria-disabled=true",usage:"Indicates the button is disabled when there is no input or processing is not active."},{selector:".k-smart-box .k-smart-box-send.k-processing",attribute:"aria-pressed=true",usage:"Indicates that processing is in progress. The button changes function to stop processing."}]};import{jsx as xn}from"react/jsx-runtime";var W=e=>xn(h,{icon:"folder",...e,"aria-label":e["aria-label"]||"Folder",children:void 0});import{jsx as hn}from"react/jsx-runtime";var Ft=e=>hn(h,{icon:"folder",children:"Button",...e});import{jsx as tt}from"react/jsx-runtime";var Ln=h.options,Nn=h.states,gn={...h.defaultOptions,variant:"text"},kn=[{name:"icon-only",title:"Icon Only"},{name:"icon-and-text",title:"Icon & Text"},{name:"text",title:"Text"}],In=[],oe=e=>{let{variant:t,...o}=e;switch(t){case"icon-only":return tt(W,{...o,icon:"star"});case"icon-and-text":return tt(Ft,{...o,icon:"star",children:"Button"});default:return tt(Me,{...o,children:"Button"})}};oe.options=Ln;oe.states=Nn;oe.variants=kn;oe.defaultOptions=gn;oe.modifiers=In;oe.className=h.className;import{jsx as vn}from"react/jsx-runtime";var $t="k-smart-box-send",Xt={processing:!1},D=e=>{let{processing:t=Xt.processing,...o}=e;return vn(h,{...o,rounded:"full",size:"small",icon:t?"stop":"arrow-up",active:t,"aria-pressed":t?"true":void 0,"aria-label":t?"Stop processing":"Send",className:n(e.className,$t,{"k-processing":t})})};D.states=h.states;D.options=h.options;D.className=$t;D.defaultOptions=Xt;import st from"react";import{jsx as Wt}from"react/jsx-runtime";var Cn="k-list-group-sticky-header",ot=e=>Wt("div",{className:n(Cn,e.className),children:Wt("div",{className:"k-list-header-text",children:e.children})});import{jsx as yn}from"react/jsx-runtime";var Sn="k-no-data",nt=e=>{let{live:t,...o}=e;return yn("span",{...o,className:n(Sn,e.className),"aria-live":t?"polite":void 0,children:e.children})};var q="list",ne=q;import{jsx as qt,jsxs as Jt}from"react/jsx-runtime";var it="k-list",Mn=[],An={size:[r.undefined,r.small,r.medium,r.large]},On={},y=e=>{let{size:t,virtualization:o,children:i,header:a,selectAll:l,optionLabel:c,customValue:p,noData:f,screenReaders:x,...b}=e,N=st.Children.toArray(i)[0],I=N?.props?.children?st.Children.count(N.props.children):st.Children.count(i);return Jt("div",{...b,className:n(e.className,it,g(it,{size:t}),{"k-virtual-list":o}),children:[c,l,p,a&&qt(ot,{children:a}),i||(f!==void 0?f:qt(nt,{live:!0,children:"No data found."})),x&&i&&Jt(nt,{className:"k-sr-only",live:!0,children:[I," items found."]})]})};y.states=Mn;y.options=An;y.className=it;y.defaultOptions=On;y.moduleName=q;y.folderName=ne;y.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 Rn}from"react/jsx-runtime";var Qt="k-list-container",Tn=[],En={},Kn={},se=e=>{let{...t}=e;return Rn("div",{...t,className:n(e.className,Qt),children:e.children})};se.states=Tn;se.options=En;se.className=Qt;se.defaultOptions=Kn;se.moduleName=q;se.folderName=ne;var J="checkbox",ie=J;import{jsx as Yt}from"react/jsx-runtime";var Oe="k-checkbox",Bn=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.checked,s.indeterminate],Pn={size:[r.undefined,r.small,r.medium,r.large],rounded:[m.undefined,m.none,m.small,m.medium,m.large,m.full]},_n={},T=e=>{let{id:t,checked:o,indeterminate:i,hover:a,focus:l,disabled:c,invalid:p,valid:f,required:x,size:b,rounded:k,wrapperRole:N,...I}=e;return Yt("span",{className:"k-checkbox-wrap",role:N,children:Yt("input",{...I,id:t,type:"checkbox",defaultChecked:o,required:x,disabled:c||void 0,"aria-invalid":p?"true":void 0,className:n(e.className,Oe,g(Oe,{size:b,rounded:k}),C(Oe,{hover:a,focus:l,disabled:c,invalid:p,valid:f,indeterminate:i,checked:o}))})})};T.states=Bn;T.options=Pn;T.className=Oe;T.defaultOptions=_n;T.moduleName=J;T.folderName=ie;T.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 B=T;import{jsx as zn}from"react/jsx-runtime";var Zt="k-checkbox-list",Hn=[],wn={},jt={layout:"vertical"},M=e=>{let{layout:t=jt.layout,...o}=e;return zn("ul",{...o,className:n(e.className,Zt,{[`k-list-${t}`]:t}),children:e.children})};M.states=Hn;M.options=wn;M.className=Zt;M.defaultOptions=jt;M.moduleName=J;M.folderName=ie;import{jsx as Vn}from"react/jsx-runtime";var eo="k-checkbox-list-item",Dn=[],Un={},Gn={},A=e=>{let{...t}=e;return Vn("li",{...t,className:n(e.className,eo),children:e.children})};A.states=Dn;A.options=Un;A.className=eo;A.defaultOptions=Gn;A.moduleName=J;A.folderName=ie;import{Fragment as Fn,jsx as to,jsxs as $n}from"react/jsx-runtime";var U=({children:e="Label",id:t="cb-label-after",...o})=>$n(Fn,{children:[to(B,{id:t,...o}),to("label",{className:"k-checkbox-label",htmlFor:t,children:e})]});import{Fragment as ul,jsx as ml,jsxs as fl}from"react/jsx-runtime";import{Fragment as Nl,jsx as Ll,jsxs as gl}from"react/jsx-runtime";import{Fragment as Sl,jsx as Cl,jsxs as yl}from"react/jsx-runtime";import{jsx as Tl}from"react/jsx-runtime";import{jsx as Bl}from"react/jsx-runtime";import{jsx as wl}from"react/jsx-runtime";import{jsx as R,jsxs as oo}from"react/jsx-runtime";var Xn=M.options,Wn=M.states,qn={...M.defaultOptions,variant:"vertical"},Jn=[{name:"vertical",title:"Vertical"},{name:"horizontal",title:"Horizontal"}],Qn=[],ae=e=>{let{variant:t,...o}=e;return t==="horizontal"?oo(M,{layout:"horizontal",...o,children:[R(A,{children:R(U,{id:S("cb"),defaultChecked:!0,children:"Label"})}),R(A,{children:R(U,{id:S("cb"),children:"Label"})}),R(A,{children:R(U,{id:S("cb"),children:"Label"})})]}):oo(M,{...o,children:[R(A,{children:R(U,{id:S("cb"),defaultChecked:!0,children:"Label"})}),R(A,{children:R(U,{id:S("cb"),children:"Label"})}),R(A,{children:R(U,{id:S("cb"),children:"Label"})})]})};ae.options=Xn;ae.states=Wn;ae.variants=Jn;ae.defaultOptions=qn;ae.modifiers=Qn;ae.className=M.className;import{jsx as os}from"react/jsx-runtime";var Yn=B.options,Zn=B.states,jn=B.defaultOptions,es=[],ts=[],re=e=>os(U,{id:S("checkbox"),...e,defaultChecked:!0,children:"Label"});re.options=Yn;re.states=Zn;re.variants=es;re.defaultOptions=jn;re.modifiers=ts;re.className=B.className;import{jsx as Q,jsxs as as}from"react/jsx-runtime";var at="k-list-item",ns=[s.hover,s.focus,s.selected,s.disabled],ss={},is={},E=e=>{let{text:t,groupLabel:o,group:i,iconName:a,iconClassName:l,showCheckbox:c,checked:p,hover:f,focus:x,selected:b,disabled:k,actions:N,description:I,id:F,...P}=e,v=t||e.children;return as("li",{...P,id:F,role:i?"presentation":"option",tabIndex:i?void 0:x?0:-1,"aria-selected":!i&&b?"true":i?void 0:"false","aria-disabled":!i&&k?"true":void 0,className:n(e.className,i?"k-list-group-item":at,C(at,{hover:f,focus:x,disabled:k,selected:b})),children:[c&&Q(T,{checked:p}),a&&Q("span",{className:"k-list-item-icon-wrapper",children:Q(u,{icon:a,className:n("k-list-item-icon",l)})}),Q("span",{className:"k-list-item-text",children:v}),N&&Q("div",{className:"k-list-item-actions",children:N}),I&&Q("span",{className:"k-list-item-description",children:I}),o&&o!==""&&Q("div",{className:"k-list-item-group-label",children:o})]})};E.states=ns;E.options=ss;E.className=at;E.defaultOptions=is;E.moduleName=q;E.folderName=ne;E.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 ls}from"react/jsx-runtime";var rs="k-list-ul",be=e=>{let{children:t,role:o,id:i,...a}=e;return ls("ul",{...a,id:i,role:o,className:n(rs,e.className),children:t})};be.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 rt,jsxs as ps}from"react/jsx-runtime";var cs="k-list-content",G=e=>{let{virtualization:t,grouping:o,"aria-label":i,"aria-labelledby":a,listboxId:l,...c}=e;return ps("div",{...c,className:n(cs,e.className),role:o?"listbox":void 0,id:o?l:void 0,"aria-label":o?i:void 0,"aria-labelledby":o?a:void 0,children:[o?e.children:rt(be,{role:"listbox",id:l,"aria-label":i,"aria-labelledby":a,children:e.children}),t&&rt("div",{className:"k-height-container",children:rt("div",{})})]})};G.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 lt,jsxs as fs}from"react/jsx-runtime";var Te="k-list-sticky-header",ds=[s.hover,s.focus,s.selected],ms={},us={},Ee=e=>{let{label:t="Select all",showCheckbox:o=!0,checked:i,indeterminate:a,hover:l,focus:c,selected:p,...f}=e;return lt("div",{...f,className:n(Te,e.className),children:fs("div",{className:n(`${Te}-item`,C(`${Te}-item`,{hover:l,focus:c,selected:p})),children:[o&<(T,{checked:i,indeterminate:a,"aria-label":t}),lt("span",{className:"k-list-item-text",children:t})]})})};Ee.states=ds;Ee.options=ms;Ee.className=Te;Ee.defaultOptions=us;import{Fragment as Kc,jsx as Ec,jsxs as Rc}from"react/jsx-runtime";import{jsx as ct,jsxs as xs}from"react/jsx-runtime";var bs="k-list-group-item",pt=e=>{let{groupIconName:t,...o}=e;return xs("li",{...o,role:"presentation",className:n(bs,e.className),children:[t&&ct("span",{className:"k-list-item-icon-wrapper",children:ct(u,{icon:t,className:"k-list-item-icon"})}),ct("span",{className:"k-list-item-text",children:e.children})]})};pt.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 gs}from"react/jsx-runtime";var dt="k-list-optionlabel",hs=[s.hover,s.focus,s.selected,s.disabled],Ls={},Ns={},Ke=e=>{let{text:t,hover:o,focus:i,selected:a,disabled:l,...c}=e;return gs("div",{...c,className:n(dt,C(dt,{hover:o,focus:i,selected:a,disabled:l})),children:t})};Ke.states=hs;Ke.options=Ls;Ke.className=dt;Ke.defaultOptions=Ns;import{jsx as Cs}from"react/jsx-runtime";var mt="k-list-custom-value",ks=[s.hover,s.focus,s.selected,s.disabled],Is={},vs={},Re=e=>{let{text:t,hover:o,focus:i,selected:a,disabled:l,...c}=e;return Cs("div",{...c,className:n(mt,C(mt,{hover:o,focus:i,selected:a,disabled:l})),children:t})};Re.states=ks;Re.options=Is;Re.className=mt;Re.defaultOptions=vs;import{Fragment as Jc,jsx as qc,jsxs as Qc}from"react/jsx-runtime";import{Fragment as op,jsx as tp,jsxs as np}from"react/jsx-runtime";import{Fragment as pp,jsx as lp,jsxs as cp}from"react/jsx-runtime";import{Fragment as hp,jsx as bp,jsxs as xp}from"react/jsx-runtime";import{jsx as kp}from"react/jsx-runtime";import{Fragment as Mp,jsx as yp,jsxs as Ap}from"react/jsx-runtime";import{Fragment as ed,jsx as Zp,jsxs as jp}from"react/jsx-runtime";import{Fragment as cd,jsx as ld,jsxs as pd}from"react/jsx-runtime";import{Fragment as hd,jsx as xd,jsxs as Ld}from"react/jsx-runtime";import{Fragment as Sd,jsx as Cd,jsxs as yd}from"react/jsx-runtime";import{Fragment as no,jsx as xe,jsxs as Ss}from"react/jsx-runtime";var zd=e=>xe(K,{...e,value:"Smart box",separators:!1,inputAriaLabel:"AI-powered search",prefix:xe(no,{children:xe(u,{icon:"sparkles",className:"k-accent-icon","aria-hidden":"true"})}),suffix:Ss(no,{children:[xe(W,{icon:"microphone",fillMode:"clear",rounded:"full",size:"small","aria-label":"Start voice input"}),xe(D,{})]})});export{zd as SmartBoxNormal};