@progress/kendo-themes-html
Version:
A collection of HTML helpers used for developing Kendo UI themes
2 lines (1 loc) • 32 kB
JavaScript
var Bo=Object.create;var Te=Object.defineProperty;var Po=Object.getOwnPropertyDescriptor;var _o=Object.getOwnPropertyNames;var Ho=Object.getPrototypeOf,wo=Object.prototype.hasOwnProperty;var zo=(e,t)=>{for(var o in t)Te(e,o,{get:t[o],enumerable:!0})},_t=(e,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of _o(t))!wo.call(e,s)&&s!==o&&Te(e,s,{get:()=>t[s],enumerable:!(i=Po(t,s))||i.enumerable});return e};var Ht=(e,t,o)=>(o=e!=null?Bo(Ho(e)):{},_t(t||!e||!e.__esModule?Te(o,"default",{value:e,enumerable:!0}):o,e)),Do=e=>_t(Te({},"__esModule",{value:!0}),e);var Ei={};zo(Ei,{SmartBoxOpenedFocused:()=>Ti});module.exports=Do(Ei);var Ee=Ht(require("react"));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 k=(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"}),M=(e,t)=>{let{valid:o,invalid:i,hover:s,focus:l,checked:c,active:p,selected:b,disabled:h,indeterminate:x,loading:g,empty:f,readonly:S,highlighted:z,...D}=t;return n({"k-valid":o,"k-invalid":i,"k-hover":s,"k-focus":l,"k-checked":c,"k-active":p,"k-selected":b,"k-disabled":h,"k-indeterminate":x&&!c,"k-loading":g,"k-empty":f,"k-readonly":S,"k-highlighted":z},Object.keys(D).reduce((y,U)=>(U.startsWith("k-")?y[U]=D[U]:y[`k-${U}`]=D[U],y),{}))};function wt(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"},N={undefined:void 0,solid:"solid",flat:"flat",outline:"outline",clear:"clear",link:"link"},G={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"},a={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 Je={};function I(e){return Je[e]=(Je[e]||0)+1,`k-${e}-${Je[e]}`}var Qe=require("react/jsx-runtime"),Uo="k-list-group-sticky-header",Ye=e=>(0,Qe.jsx)("div",{className:n(Uo,e.className),children:(0,Qe.jsx)("div",{className:"k-list-header-text",children:e.children})});var zt=require("react/jsx-runtime"),Go="k-no-data",Ze=e=>{let{live:t,...o}=e;return(0,zt.jsx)("span",{...o,className:n(Go,e.className),"aria-live":t?"polite":void 0,children:e.children})};var Y="list",ne=Y;var ie=require("react/jsx-runtime"),je="k-list",Vo=[],Fo={size:[r.undefined,r.small,r.medium,r.large]},$o={},A=e=>{var z;let{size:t,virtualization:o,children:i,header:s,selectAll:l,optionLabel:c,customValue:p,noData:b,screenReaders:h,...x}=e,f=Ee.default.Children.toArray(i)[0],S=(z=f==null?void 0:f.props)!=null&&z.children?Ee.default.Children.count(f.props.children):Ee.default.Children.count(i);return(0,ie.jsxs)("div",{...x,className:n(e.className,je,k(je,{size:t}),{"k-virtual-list":o}),children:[c,l,p,s&&(0,ie.jsx)(Ye,{children:s}),i||(b!==void 0?b:(0,ie.jsx)(Ze,{live:!0,children:"No data found."})),h&&i&&(0,ie.jsxs)(Ze,{className:"k-sr-only",live:!0,children:[S," items found."]})]})};A.states=Vo;A.options=Fo;A.className=je;A.defaultOptions=$o;A.moduleName=Y;A.folderName=ne;A.ariaSpec={selector:".k-list",rules:[{selector:".k-list .k-no-data",attribute:"aria-live=polite",usage:'Announces "No data found" to screen readers.'}]};var Ut=require("react/jsx-runtime"),Dt="k-list-container",Xo=[],Wo={},qo={},se=e=>{let{...t}=e;return(0,Ut.jsx)("div",{...t,className:n(e.className,Dt),children:e.children})};se.states=Xo;se.options=Wo;se.className=Dt;se.defaultOptions=qo;se.moduleName=Y;se.folderName=ne;var Z="checkbox",ae=Z;var et=require("react/jsx-runtime"),Ke="k-checkbox",Jo=[a.hover,a.focus,a.valid,a.invalid,a.required,a.disabled,a.checked,a.indeterminate],Qo={size:[r.undefined,r.small,r.medium,r.large],rounded:[m.undefined,m.none,m.small,m.medium,m.large,m.full]},Yo={},B=e=>{let{id:t,checked:o,indeterminate:i,hover:s,focus:l,disabled:c,invalid:p,valid:b,required:h,size:x,rounded:g,wrapperRole:f,...S}=e;return(0,et.jsx)("span",{className:"k-checkbox-wrap",role:f,children:(0,et.jsx)("input",{...S,id:t,type:"checkbox",defaultChecked:o,required:h,disabled:c||void 0,"aria-invalid":p?"true":void 0,className:n(e.className,Ke,k(Ke,{size:x,rounded:g}),M(Ke,{hover:s,focus:l,disabled:c,invalid:p,valid:b,indeterminate:i,checked:o}))})})};B.states=Jo;B.options=Qo;B.className=Ke;B.defaultOptions=Yo;B.moduleName=Z;B.folderName=ae;B.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 w=B;var Ft=require("react/jsx-runtime"),Gt="k-checkbox-list",Zo=[],jo={},Vt={layout:"vertical"},K=e=>{let{layout:t=Vt.layout,...o}=e;return(0,Ft.jsx)("ul",{...o,className:n(e.className,Gt,{[`k-list-${t}`]:t}),children:e.children})};K.states=Zo;K.options=jo;K.className=Gt;K.defaultOptions=Vt;K.moduleName=Z;K.folderName=ae;var Xt=require("react/jsx-runtime"),$t="k-checkbox-list-item",en=[],tn={},on={},R=e=>{let{...t}=e;return(0,Xt.jsx)("li",{...t,className:n(e.className,$t),children:e.children})};R.states=en;R.options=tn;R.className=$t;R.defaultOptions=on;R.moduleName=Z;R.folderName=ae;var j=require("react/jsx-runtime"),$=({children:e="Label",id:t="cb-label-after",...o})=>(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(w,{id:t,...o}),(0,j.jsx)("label",{className:"k-checkbox-label",htmlFor:t,children:e})]});var tt=require("react/jsx-runtime");var ot=require("react/jsx-runtime");var nt=require("react/jsx-runtime");var nn=require("react/jsx-runtime");var sn=require("react/jsx-runtime");var an=require("react/jsx-runtime");var O=require("react/jsx-runtime"),rn=K.options,ln=K.states,cn={...K.defaultOptions,variant:"vertical"},pn=[{name:"vertical",title:"Vertical"},{name:"horizontal",title:"Horizontal"}],dn=[],re=e=>{let{variant:t,...o}=e;return t==="horizontal"?(0,O.jsxs)(K,{layout:"horizontal",...o,children:[(0,O.jsx)(R,{children:(0,O.jsx)($,{id:I("cb"),defaultChecked:!0,children:"Label"})}),(0,O.jsx)(R,{children:(0,O.jsx)($,{id:I("cb"),children:"Label"})}),(0,O.jsx)(R,{children:(0,O.jsx)($,{id:I("cb"),children:"Label"})})]}):(0,O.jsxs)(K,{...o,children:[(0,O.jsx)(R,{children:(0,O.jsx)($,{id:I("cb"),defaultChecked:!0,children:"Label"})}),(0,O.jsx)(R,{children:(0,O.jsx)($,{id:I("cb"),children:"Label"})}),(0,O.jsx)(R,{children:(0,O.jsx)($,{id:I("cb"),children:"Label"})})]})};re.options=rn;re.states=ln;re.variants=pn;re.defaultOptions=cn;re.modifiers=dn;re.className=K.className;var Wt=require("react/jsx-runtime"),mn=w.options,un=w.states,fn=w.defaultOptions,bn=[],xn=[],le=e=>(0,Wt.jsx)($,{id:I("checkbox"),...e,defaultChecked:!0,children:"Label"});le.options=mn;le.states=un;le.variants=bn;le.defaultOptions=fn;le.modifiers=xn;le.className=w.className;var he=require("react/jsx-runtime"),it="k-font-icon",hn=[],Ln={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]},Nn={},Le=e=>{let{size:t,themeColor:o,icon:i,rotate:s,flip:l,...c}=e;return i?(0,he.jsx)("span",{...c,className:n(e.className,it,k(it,{size:t}),{[`k-i-${i}`]:i,[`k-color-${o}`]:o,[`k-rotate-${s}`]:s,"k-flip-h":l==="h"||l==="both","k-flip-v":l==="v"||l==="both"}),"aria-hidden":"true"}):(0,he.jsx)(he.Fragment,{})};Le.states=hn;Le.options=Ln;Le.className=it;Le.defaultOptions=Nn;var qt=Le;var ee=require("react/jsx-runtime"),st="k-svg-icon",gn=[],kn={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:[G.outline,G.solid,G.duotone]},at={viewBox:"0 0 24 24",variant:G.outline},Ne=e=>{var g,f;let{size:t,themeColor:o,rotate:i,flip:s,viewBox:l=at.viewBox,variant:c=at.variant,icon:p,...b}=e;if(!p)return(0,ee.jsx)(ee.Fragment,{});if(p==="none")return(0,ee.jsx)("span",{...b,className:n(e.className,st,k("k-icon",{size:t}),"k-none"),"aria-hidden":"true"});let h=typeof p=="object"&&p.name&&p.name,x=typeof p=="object"?c&&((g=p.variants)==null?void 0:g[c])||((f=p.variants)==null?void 0:f.outline)||p.content:void 0;return(0,ee.jsx)("span",{...b,className:n(e.className,st,k("k-icon",{size:t}),{[`k-svg-i-${h}`]:h,[`k-color-${o}`]:o,[`k-rotate-${i}`]:i,"k-flip-h":s==="h"||s==="both","k-flip-v":s==="v"||s==="both"}),"aria-hidden":"true",children:(0,ee.jsx)("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof p=="object"?p.viewBox:l,dangerouslySetInnerHTML:x!==void 0?{__html:x}:void 0,children:p?void 0:e.children})})};Ne.states=gn;Ne.options=kn;Ne.className=st;Ne.defaultOptions=at;var rt=Ne;var lt=Ht(require("@progress/kendo-svg-icons"));var Jt="icon",Qt="icons";var jt=require("react");var Yt=require("react"),Zt=(0,Yt.createContext)({iconsType:"svg"});var X=require("react/jsx-runtime"),Re="k-icon",In=e=>e.replace(/([-_][a-z0-9])/gi,t=>t.toUpperCase().replace("-","").replace("_","")),vn=[],Cn={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:[G.outline,G.solid,G.duotone]},Be={viewBox:"0 0 24 24",type:"svg",variant:G.outline},u=e=>{let{iconsType:t}=(0,jt.useContext)(Zt),{size:o,themeColor:i,icon:s,type:l=t||Be.type,rotate:c,flip:p,viewBox:b=Be.viewBox,variant:h=Be.variant,...x}=e;if(!s)return(0,X.jsx)(X.Fragment,{});if((t||l)==="svg"){if(s==="none")return(0,X.jsx)(rt,{...x,className:n(e.className,Re),icon:s,size:o,variant:h});let f=lt[s]?s:In(`${s}-icon`);return lt[f]?(0,X.jsx)(rt,{...x,className:n(e.className,Re),icon:lt[f],size:o,themeColor:i,rotate:c,flip:p,viewBox:b,variant:h}):(0,X.jsx)(X.Fragment,{})}return(0,X.jsx)(qt,{...x,className:n(e.className,Re),icon:s,size:o,themeColor:i,rotate:c,flip:p})};u.states=vn;u.options=Cn;u.defaultOptions=Be;u.className=Re;u.moduleName=Jt;u.folderName=Qt;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."}]};var V=require("react/jsx-runtime"),ct="k-list-item",Sn=[a.hover,a.focus,a.selected,a.disabled],yn={},Mn={},T=e=>{let{text:t,groupLabel:o,group:i,iconName:s,iconClassName:l,showCheckbox:c,checked:p,hover:b,focus:h,selected:x,disabled:g,actions:f,description:S,id:z,...D}=e,y=t||e.children;return(0,V.jsxs)("li",{...D,id:z,role:i?"presentation":"option",tabIndex:i?void 0:h?0:-1,"aria-selected":!i&&x?"true":i?void 0:"false","aria-disabled":!i&&g?"true":void 0,className:n(e.className,i?"k-list-group-item":ct,M(ct,{hover:b,focus:h,disabled:g,selected:x})),children:[c&&(0,V.jsx)(B,{checked:p}),s&&(0,V.jsx)("span",{className:"k-list-item-icon-wrapper",children:(0,V.jsx)(u,{icon:s,className:n("k-list-item-icon",l)})}),(0,V.jsx)("span",{className:"k-list-item-text",children:y}),f&&(0,V.jsx)("div",{className:"k-list-item-actions",children:f}),S&&(0,V.jsx)("span",{className:"k-list-item-description",children:S}),o&&o!==""&&(0,V.jsx)("div",{className:"k-list-item-group-label",children:o})]})};T.states=Sn;T.options=yn;T.className=ct;T.defaultOptions=Mn;T.moduleName=Y;T.folderName=ne;T.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."}]};var eo=require("react/jsx-runtime"),An="k-list-ul",ge=e=>{let{children:t,role:o,id:i,...s}=e;return(0,eo.jsx)("ul",{...s,id:i,role:o,className:n(An,e.className),children:t})};ge.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."}]};var ce=require("react/jsx-runtime"),On="k-list-content",F=e=>{let{virtualization:t,grouping:o,"aria-label":i,"aria-labelledby":s,listboxId:l,...c}=e;return(0,ce.jsxs)("div",{...c,className:n(On,e.className),role:o?"listbox":void 0,id:o?l:void 0,"aria-label":o?i:void 0,"aria-labelledby":o?s:void 0,children:[o?e.children:(0,ce.jsx)(ge,{role:"listbox",id:l,"aria-label":i,"aria-labelledby":s,children:e.children}),t&&(0,ce.jsx)("div",{className:"k-height-container",children:(0,ce.jsx)("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."}]};var pe=require("react/jsx-runtime"),Pe="k-list-sticky-header",Tn=[a.hover,a.focus,a.selected],En={},Kn={},_e=e=>{let{label:t="Select all",showCheckbox:o=!0,checked:i,indeterminate:s,hover:l,focus:c,selected:p,...b}=e;return(0,pe.jsx)("div",{...b,className:n(Pe,e.className),children:(0,pe.jsxs)("div",{className:n(`${Pe}-item`,M(`${Pe}-item`,{hover:l,focus:c,selected:p})),children:[o&&(0,pe.jsx)(B,{checked:i,indeterminate:s,"aria-label":t}),(0,pe.jsx)("span",{className:"k-list-item-text",children:t})]})})};_e.states=Tn;_e.options=En;_e.className=Pe;_e.defaultOptions=Kn;var pt=require("react/jsx-runtime");var de=require("react/jsx-runtime"),Rn="k-list-group-item",dt=e=>{let{groupIconName:t,...o}=e;return(0,de.jsxs)("li",{...o,role:"presentation",className:n(Rn,e.className),children:[t&&(0,de.jsx)("span",{className:"k-list-item-icon-wrapper",children:(0,de.jsx)(u,{icon:t,className:"k-list-item-icon"})}),(0,de.jsx)("span",{className:"k-list-item-text",children:e.children})]})};dt.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."}]};var to=require("react/jsx-runtime"),mt="k-list-optionlabel",Bn=[a.hover,a.focus,a.selected,a.disabled],Pn={},_n={},He=e=>{let{text:t,hover:o,focus:i,selected:s,disabled:l,...c}=e;return(0,to.jsx)("div",{...c,className:n(mt,M(mt,{hover:o,focus:i,selected:s,disabled:l})),children:t})};He.states=Bn;He.options=Pn;He.className=mt;He.defaultOptions=_n;var oo=require("react/jsx-runtime"),ut="k-list-custom-value",Hn=[a.hover,a.focus,a.selected,a.disabled],wn={},zn={},we=e=>{let{text:t,hover:o,focus:i,selected:s,disabled:l,...c}=e;return(0,oo.jsx)("div",{...c,className:n(ut,M(ut,{hover:o,focus:i,selected:s,disabled:l})),children:t})};we.states=Hn;we.options=wn;we.className=ut;we.defaultOptions=zn;var ft=require("react/jsx-runtime");var bt=require("react/jsx-runtime");var xt=require("react/jsx-runtime");var ht=require("react/jsx-runtime");var Dn=require("react/jsx-runtime");var Lt=require("react/jsx-runtime");var ke="input",ze=ke;var no=require("react/jsx-runtime"),De="k-input",Un=[a.hover,a.focus,a.valid,a.invalid,a.required,a.disabled,a.loading,a.readonly],Gn={size:[r.undefined,r.small,r.medium,r.large],rounded:[m.undefined,m.none,m.small,m.medium,m.large,m.full],fillMode:[N.undefined,N.solid,N.flat,N.outline]},Vn={},P=e=>{let{hover:t,focus:o,disabled:i,invalid:s,valid:l,loading:c,readonly:p,size:b,rounded:h,fillMode:x,...g}=e;return(0,no.jsx)("span",{...g,className:n(e.className,De,k(De,{size:b,rounded:h,fillMode:x}),M(De,{hover:t,focus:o,disabled:i,invalid:s,valid:l,loading:c,readonly:p}))})};P.states=Un;P.options=Gn;P.className=De;P.defaultOptions=Vn;P.moduleName=ke;P.folderName=ze;var io=require("react/jsx-runtime"),Ue="k-picker",Fn=[a.hover,a.focus,a.valid,a.invalid,a.required,a.disabled,a.loading,a.readonly],$n={size:[r.undefined,r.small,r.medium,r.large],rounded:[m.undefined,m.none,m.small,m.medium,m.large,m.full],fillMode:[N.undefined,N.solid,N.flat,N.outline]},Xn={},me=e=>{let{hover:t,focus:o,disabled:i,invalid:s,valid:l,loading:c,readonly:p,size:b,rounded:h,fillMode:x,...g}=e;return(0,io.jsx)("span",{...g,className:n(e.className,Ue,k(Ue,{size:b,rounded:h,fillMode:x}),M(Ue,{hover:t,focus:o,disabled:i,invalid:s,valid:l,loading:c,readonly:p})),children:e.children})};me.states=Fn;me.options=$n;me.className=Ue;me.defaultOptions=Xn;me.moduleName=ke;me.folderName=ze;var ue=require("react/jsx-runtime"),so="k-clear-value",Wn=[a.disabled,a.loading,a.readonly],qn={},Ie=e=>{let{disabled:t,loading:o,readonly:i,value:s}=e;return t||i||o||!s?(0,ue.jsx)(ue.Fragment,{}):(0,ue.jsx)("span",{className:n(e.className,so),children:(0,ue.jsx)(u,{icon:"x"})})};Ie.states=Wn;Ie.options=qn;Ie.className=so;var ao=require("react/jsx-runtime"),Nt="k-input-inner",Jn=[],Qn={},Ge={type:"text",autocomplete:"off",value:"",placeholder:""},te=e=>{let{value:t=Ge.value,type:o=Ge.type,placeholder:i=Ge.placeholder,autocomplete:s=Ge.autocomplete,disabled:l,readOnly:c,...p}=e;return(0,ao.jsx)("input",{...p,type:o,className:n(e.className,Nt,k(Nt,e)),placeholder:i,autoComplete:s,defaultValue:t,disabled:l||void 0,readOnly:c||void 0})};te.states=Jn;te.options=Qn;te.className=Nt;var ve=require("react/jsx-runtime"),gt="k-input-inner",Yn=[],Zn={},kt=e=>{let{value:t,placeholder:o,showValue:i,valueIcon:s,valueIconName:l,...c}=e;return(0,ve.jsxs)("span",{...c,className:n(e.className,gt,k(gt,e)),children:[s,!s&&l&&(0,ve.jsx)(u,{className:"k-input-value-icon",icon:l}),i&&!t&&o,i&&t&&(0,ve.jsx)("span",{className:"k-input-value-text",children:t})]})};kt.states=Yn;kt.options=Zn;kt.className=gt;var lo=require("react/jsx-runtime"),It="k-input-inner",jn=[],ei={},ro={value:"",placeholder:""},vt=e=>{let{value:t=ro.value,placeholder:o=ro.placeholder,rows:i,disabled:s,...l}=e;return(0,lo.jsx)("textarea",{...l,className:n(e.className,It,k(It,e)),placeholder:o,rows:i,defaultValue:t,disabled:s||void 0})};vt.states=jn;vt.options=ei;vt.className=It;var Ce=require("react/jsx-runtime"),co="k-input-loading-icon",ti=[a.disabled,a.loading],Ve=e=>{let{disabled:t,loading:o}=e;return t||!o?(0,Ce.jsx)(Ce.Fragment,{}):(0,Ce.jsx)("span",{className:n(e.className,co,"k-icon k-i-loading")})};Ve.states=ti;Ve.className=co;var Se=require("react/jsx-runtime"),po="k-input-validation-icon",oi=[a.valid,a.invalid,a.disabled,a.loading],ni={},ye=e=>{let{valid:t,invalid:o,disabled:i,loading:s}=e,l=o?"warning-circle":"check-circle";return i||s||!!!(t||o)?(0,Se.jsx)(Se.Fragment,{}):(0,Se.jsx)(u,{className:n(po),icon:l})};ye.states=oi;ye.options=ni;ye.className=po;var Me=require("react/jsx-runtime"),ii="k-input-prefix",si={direction:"horizontal"},Fe=e=>{let{direction:t=si.direction,...o}=e;return e.children?(0,Me.jsx)("span",{...o,className:n(ii,e.className,{[`k-input-prefix-${t}`]:t}),children:e.children}):(0,Me.jsx)(Me.Fragment,{})};var Ae=require("react/jsx-runtime"),ai="k-input-suffix",ri={direction:"horizontal"},$e=e=>{let{direction:t=ri.direction,...o}=e;return e.children?(0,Ae.jsx)("span",{...o,className:n(ai,e.className,{[`k-input-suffix-${t}`]:t}),children:e.children}):(0,Ae.jsx)(Ae.Fragment,{})};var li=require("react/jsx-runtime");var ci=require("react/jsx-runtime");var uo=require("react/jsx-runtime"),mo="k-input-separator",pi={direction:"vertical"},fe=e=>{let{direction:t=pi.direction,...o}=e;return(0,uo.jsx)("span",{...o,className:n(mo,e.className,{[`${mo}-${t}`]:t})})};var Ct="button",fo=Ct;var _=require("react/jsx-runtime"),Oe="k-button",di=["icon-button"],mi=[a.hover,a.focus,a.active,a.selected,a.disabled,a.generating],ui={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:[N.undefined,N.solid,N.flat,N.outline,N.clear,N.link],themeColor:[d.undefined,d.base,d.primary,d.secondary,d.tertiary,d.success,d.warning,d.error,d.info,d.inverse]},St={showArrow:!1,arrowIconName:"chevron-down"},L=e=>{let{as:t="button",size:o,rounded:i,fillMode:s,themeColor:l,showArrow:c=St.showArrow,arrowIconName:p=St.arrowIconName,variant:b,hover:h,focus:x,active:g,selected:f,disabled:S,togglable:z,ariaDisabled:D,icon:y,iconSize:U,text:Q,iconClassName:qe,className:To,...Eo}=e,Ko=y!=null,Ro=e.children!==void 0;return(0,_.jsxs)(t,{className:n(To,Oe,wt(Oe,b),k(Oe,{size:o,rounded:i,fillMode:s,themeColor:l}),M(Oe,{hover:h,focus:x,active:g,disabled:S||D,selected:f}),{"k-icon-button":!Q&&!Ro&&Ko}),"aria-pressed":z?f?"true":"false":void 0,...Eo,"aria-disabled":D?"true":void 0,disabled:S||void 0,children:[typeof y=="string"&&y&&(0,_.jsx)(u,{className:n(qe,"k-button-icon"),icon:y,size:U}),y&&typeof y!="string"&&(0,_.jsx)(_.Fragment,{children:y}),Q?(0,_.jsxs)(_.Fragment,{children:[Q&&(0,_.jsx)("span",{className:"k-button-text",children:Q}),e.children]}):e.children&&(0,_.jsx)("span",{className:"k-button-text",children:e.children}),c&&(0,_.jsx)("span",{className:"k-menu-button-arrow k-button-arrow",children:(0,_.jsx)(u,{icon:p})})]})};L.states=mi;L.options=ui;L.variants=di;L.className=Oe;L.defaultOptions=St;L.moduleName=Ct;L.folderName=fo;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."}]};var bo=require("react/jsx-runtime"),Xe=e=>(0,bo.jsx)(L,{children:"Button",...e});var v=require("react/jsx-runtime"),fi=P.states,bi=P.defaultOptions,xi=P.options,hi=[{name:"prefix",title:"Prefix"},{name:"suffix",title:"Suffix"},{name:"clear-button",title:"`Clear` Button"},{name:"validation-icon",title:"Validation Icon"},{name:"separators",title:"Separators"}],Li=[],be=e=>{let{modifiers:t,valid:o,invalid:i,loading:s,disabled:l,readonly:c,...p}=e,b=t==null?void 0:t.prefix,h=t==null?void 0:t.suffix,x=t==null?void 0:t["clear-button"],g=t==null?void 0:t["validation-icon"],f=t==null?void 0:t.separators;return(0,v.jsxs)(P,{...p,valid:o,invalid:i,loading:s,disabled:l,readonly:c,style:{width:300},children:[b&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(Fe,{children:(0,v.jsx)(u,{icon:"lock"})}),f&&(0,v.jsx)(fe,{})]}),(0,v.jsx)(te,{placeholder:"Placeholder",value:"Value"}),g&&(0,v.jsx)(ye,{valid:o,invalid:i,loading:s,disabled:l}),(0,v.jsx)(Ve,{loading:s,disabled:l}),x&&(0,v.jsx)(Ie,{loading:s,disabled:l,readonly:c,value:"Value"}),h&&(0,v.jsxs)(v.Fragment,{children:[f&&(0,v.jsx)(fe,{}),(0,v.jsx)($e,{children:(0,v.jsx)(Xe,{size:p.size,fillMode:"clear",children:"Send"})})]})]})};be.options=xi;be.states=fi;be.variants=Li;be.defaultOptions=bi;be.modifiers=hi;be.className=P.className;var yt="popup",xo=yt;var At=require("react/jsx-runtime"),ho="k-animation-container",Ni=[],gi={},Mt={positionMode:"absolute",shown:!0},J=e=>{let{positionMode:t=Mt.positionMode,shown:o=Mt.shown,animationStyle:i,offset:s,...l}=e;return(0,At.jsx)("div",{...l,style:{...s,...e.style},className:n(e.className,ho,{"k-animation-container-shown":o,"k-animation-container-fixed":t==="fixed"}),children:(0,At.jsx)("div",{className:"k-child-animation-container",style:i,children:e.children})})};J.states=Ni;J.options=gi;J.className=ho;J.defaultOptions=Mt;J.moduleName=yt;J.folderName=xo;var Ot="popup",Lo=Ot;var Tt=require("react/jsx-runtime"),No="k-popup",ki=[],Ii={},go={positionMode:"absolute"},W=e=>{let{offset:t,positionMode:o=go.positionMode,animationStyle:i,containerClassName:s,containerRole:l,containerAriaLabel:c,...p}=e;return(0,Tt.jsx)(J,{positionMode:o,offset:t,animationStyle:i,className:s,role:l,"aria-label":c,children:(0,Tt.jsx)("div",{...p,className:n(e.className,No),children:e.children})})};W.states=ki;W.options=Ii;W.className=No;W.defaultOptions=go;W.moduleName=Ot;W.folderName=Lo;W.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 Et="smart-box",ko=Et;var E=require("react/jsx-runtime"),Io="k-smart-box",vi=[a.hover,a.focus,a.disabled],Ci={size:[r.undefined,r.small,r.medium,r.large],rounded:[m.undefined,m.none,m.small,m.medium,m.large,m.full],fillMode:[N.undefined,N.solid,N.flat,N.outline]},vo={separators:!0},H=e=>{let{size:t,rounded:o,fillMode:i,separators:s=vo.separators,prefix:l,suffix:c,value:p,placeholder:b,hover:h,focus:x,disabled:g,popup:f,opened:S,processing:z,inputAriaLabel:D,inputAriaControls:y,inputAriaActiveDescendant:U,inputAriaAutocomplete:Q,...qe}=e;return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(P,{...qe,size:t,rounded:o,fillMode:i,hover:h,focus:x,disabled:g,loading:z,className:n(e.className,Io),children:[l&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Fe,{children:l}),s&&(0,E.jsx)(fe,{})]}),(0,E.jsx)(te,{placeholder:b,value:p,role:"combobox","aria-haspopup":"listbox","aria-expanded":S?"true":"false","aria-autocomplete":Q,"aria-controls":S?y:void 0,"aria-activedescendant":S?U:void 0,"aria-label":D}),c&&(0,E.jsxs)(E.Fragment,{children:[s&&(0,E.jsx)(fe,{}),(0,E.jsx)($e,{children:c})]})]}),S&&f&&(0,E.jsx)(W,{className:"k-smart-box-popup",children:f})]})};H.states=vi;H.options=Ci;H.className=Io;H.defaultOptions=vo;H.moduleName=Et;H.folderName=ko;H.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."}]};var Co=require("react/jsx-runtime"),oe=e=>(0,Co.jsx)(L,{icon:"folder",...e,"aria-label":e["aria-label"]||"Folder",children:void 0});var yo=require("react/jsx-runtime"),So=e=>(0,yo.jsx)(L,{icon:"folder",children:"Button",...e});var We=require("react/jsx-runtime"),Si=L.options,yi=L.states,Mi={...L.defaultOptions,variant:"text"},Ai=[{name:"icon-only",title:"Icon Only"},{name:"icon-and-text",title:"Icon & Text"},{name:"text",title:"Text"}],Oi=[],xe=e=>{let{variant:t,...o}=e;switch(t){case"icon-only":return(0,We.jsx)(oe,{...o,icon:"star"});case"icon-and-text":return(0,We.jsx)(So,{...o,icon:"star",children:"Button"});default:return(0,We.jsx)(Xe,{...o,children:"Button"})}};xe.options=Si;xe.states=yi;xe.variants=Ai;xe.defaultOptions=Mi;xe.modifiers=Oi;xe.className=L.className;var Oo=require("react/jsx-runtime"),Mo="k-smart-box-send",Ao={processing:!1},q=e=>{let{processing:t=Ao.processing,...o}=e;return(0,Oo.jsx)(L,{...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,Mo,{"k-processing":t})})};q.states=L.states;q.options=L.options;q.className=Mo;q.defaultOptions=Ao;var Kt=require("react/jsx-runtime");var Rt=require("react/jsx-runtime");var Bt=require("react/jsx-runtime");var Pt=require("react/jsx-runtime");var C=require("react/jsx-runtime"),Ti=e=>{let t=I("sb-listbox"),o=I("sb-item"),i=I("sb-item");return(0,C.jsx)(H,{opened:!0,focus:!0,separators:!1,inputAriaLabel:"AI-powered search",inputAriaControls:t,inputAriaAutocomplete:"list",inputAriaActiveDescendant:o,prefix:(0,C.jsx)(C.Fragment,{children:(0,C.jsx)(u,{icon:"sparkles",className:"k-accent-icon","aria-hidden":"true"})}),suffix:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(oe,{icon:"microphone",fillMode:"clear",rounded:"full",size:"small","aria-label":"Start voice input"}),(0,C.jsx)(q,{})]}),popup:(0,C.jsx)(C.Fragment,{children:(0,C.jsx)(A,{children:(0,C.jsxs)(F,{listboxId:t,"aria-label":"Suggestions",children:[(0,C.jsx)(T,{id:o,focus:!0,children:"List item 1"}),(0,C.jsx)(T,{id:i,children:"List item 2"})]})})}),...e})};