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