UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

2 lines (1 loc) 22.1 kB
var it=Object.create;var te=Object.defineProperty;var rt=Object.getOwnPropertyDescriptor;var lt=Object.getOwnPropertyNames;var pt=Object.getPrototypeOf,ct=Object.prototype.hasOwnProperty;var dt=(e,t)=>{for(var o in t)te(e,o,{get:t[o],enumerable:!0})},ke=(e,t,o,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of lt(t))!ct.call(e,n)&&n!==o&&te(e,n,{get:()=>t[n],enumerable:!(s=rt(t,n))||s.enumerable});return e};var ut=(e,t,o)=>(o=e!=null?it(pt(e)):{},ke(t||!e||!e.__esModule?te(o,"default",{value:e,enumerable:!0}):o,e)),mt=e=>ke(te({},"__esModule",{value:!0}),e);var go={};dt(go,{Chat:()=>F,default:()=>xo});module.exports=mt(go);var l=(...e)=>e.filter(t=>t!==!0&&!!t).map(t=>Array.isArray(t)?l(...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 M=(e,t)=>l({[`${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"}),D=(e,t)=>{let{valid:o,invalid:s,hover:n,focus:p,checked:r,active:c,selected:v,disabled:b,indeterminate:x,loading:g,empty:f,readonly:C,highlighted:w,...R}=t;return l({"k-valid":o,"k-invalid":s,"k-hover":n,"k-focus":p,"k-checked":r,"k-active":c,"k-selected":v,"k-disabled":b,"k-indeterminate":x&&!r,"k-loading":g,"k-empty":f,"k-readonly":C,"k-highlighted":w},Object.keys(R).reduce((k,z)=>(z.startsWith("k-")?k[z]=R[z]:k[`k-${z}`]=R[z],k),{}))};function Be(e,t){if(!t)return{};let o=Array.isArray(t)?t:[t];return Object.fromEntries(o.map(s=>[`k-${s}`,!0]))}var i={undefined:void 0,xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},B={undefined:void 0,none:"none",small:"small",medium:"medium",large:"large",full:"full"},S={undefined:void 0,solid:"solid",flat:"flat",outline:"outline",clear:"clear",link:"link"},I={undefined:void 0,outline:"outline",solid:"solid",duotone:"duotone"},a={undefined:void 0,inherit:"inherit",base:"base",primary:"primary",secondary:"secondary",tertiary:"tertiary",info:"info",success:"success",warning:"warning",error:"error",inverse:"inverse"},u={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 V=require("react/jsx-runtime"),le="k-font-icon",ft=[],bt={size:[i.undefined,i.xsmall,i.small,i.medium,i.large,i.xlarge,i.xxlarge,i.xxxlarge],themeColor:[a.undefined,a.base,a.primary,a.secondary,a.tertiary,a.success,a.warning,a.error,a.info]},xt={},G=e=>{let{size:t,themeColor:o,icon:s,rotate:n,flip:p,...r}=e;return s?(0,V.jsx)("span",{...r,className:l(e.className,le,M(le,{size:t}),{[`k-i-${s}`]:s,[`k-color-${o}`]:o,[`k-rotate-${n}`]:n,"k-flip-h":p==="h"||p==="both","k-flip-v":p==="v"||p==="both"}),"aria-hidden":"true"}):(0,V.jsx)(V.Fragment,{})};G.states=ft;G.options=bt;G.className=le;G.defaultOptions=xt;var ye=G;var H=require("react/jsx-runtime"),pe="k-svg-icon",gt=[],ht={size:[i.undefined,i.xsmall,i.small,i.medium,i.large,i.xlarge,i.xxlarge,i.xxxlarge],themeColor:[a.undefined,a.base,a.primary,a.secondary,a.tertiary,a.success,a.warning,a.error,a.info],variant:[I.outline,I.solid,I.duotone]},ce={viewBox:"0 0 24 24",variant:I.outline},q=e=>{var g,f;let{size:t,themeColor:o,rotate:s,flip:n,viewBox:p=ce.viewBox,variant:r=ce.variant,icon:c,...v}=e;if(!c)return(0,H.jsx)(H.Fragment,{});if(c==="none")return(0,H.jsx)("span",{...v,className:l(e.className,pe,M("k-icon",{size:t}),"k-none"),"aria-hidden":"true"});let b=typeof c=="object"&&c.name&&c.name,x=typeof c=="object"?r&&((g=c.variants)==null?void 0:g[r])||((f=c.variants)==null?void 0:f.outline)||c.content:void 0;return(0,H.jsx)("span",{...v,className:l(e.className,pe,M("k-icon",{size:t}),{[`k-svg-i-${b}`]:b,[`k-color-${o}`]:o,[`k-rotate-${s}`]:s,"k-flip-h":n==="h"||n==="both","k-flip-v":n==="v"||n==="both"}),"aria-hidden":"true",children:(0,H.jsx)("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof c=="object"?c.viewBox:p,dangerouslySetInnerHTML:x!==void 0?{__html:x}:void 0,children:c?void 0:e.children})})};q.states=gt;q.options=ht;q.className=pe;q.defaultOptions=ce;var de=q;var ue=ut(require("@progress/kendo-svg-icons"));var Ae="icon",Me="icons";var Oe=require("react");var Ee=require("react"),Se=(0,Ee.createContext)({iconsType:"svg"});var L=require("react/jsx-runtime"),oe="k-icon",vt=e=>e.replace(/([-_][a-z0-9])/gi,t=>t.toUpperCase().replace("-","").replace("_","")),Nt=[],Tt={size:[i.undefined,i.xsmall,i.small,i.medium,i.large,i.xlarge,i.xxlarge,i.xxxlarge],themeColor:[a.undefined,a.base,a.primary,a.secondary,a.tertiary,a.success,a.warning,a.error,a.info],variant:[I.outline,I.solid,I.duotone]},ne={viewBox:"0 0 24 24",type:"svg",variant:I.outline},y=e=>{let{iconsType:t}=(0,Oe.useContext)(Se),{size:o,themeColor:s,icon:n,type:p=t||ne.type,rotate:r,flip:c,viewBox:v=ne.viewBox,variant:b=ne.variant,...x}=e;if(!n)return(0,L.jsx)(L.Fragment,{});if((t||p)==="svg"){if(n==="none")return(0,L.jsx)(de,{...x,className:l(e.className,oe),icon:n,size:o,variant:b});let f=ue[n]?n:vt(`${n}-icon`);return ue[f]?(0,L.jsx)(de,{...x,className:l(e.className,oe),icon:ue[f],size:o,themeColor:s,rotate:r,flip:c,viewBox:v,variant:b}):(0,L.jsx)(L.Fragment,{})}return(0,L.jsx)(ye,{...x,className:l(e.className,oe),icon:n,size:o,themeColor:s,rotate:r,flip:c})};y.states=Nt;y.options=Tt;y.defaultOptions=ne;y.className=oe;y.moduleName=Ae;y.folderName=Me;y.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 me="button",Ce=me;var E=require("react/jsx-runtime"),W="k-button",kt=["icon-button"],Bt=[u.hover,u.focus,u.active,u.selected,u.disabled,u.generating],yt={size:[i.undefined,i.xsmall,i.small,i.medium,i.large],rounded:[B.undefined,B.none,B.small,B.medium,B.large,B.full],fillMode:[S.undefined,S.solid,S.flat,S.outline,S.clear,S.link],themeColor:[a.undefined,a.base,a.primary,a.secondary,a.tertiary,a.success,a.warning,a.error,a.info,a.inverse]},fe={showArrow:!1,arrowIconName:"chevron-down"},d=e=>{let{as:t="button",size:o,rounded:s,fillMode:n,themeColor:p,showArrow:r=fe.showArrow,arrowIconName:c=fe.arrowIconName,variant:v,hover:b,focus:x,active:g,selected:f,disabled:C,togglable:w,ariaDisabled:R,icon:k,iconSize:z,text:ee,iconClassName:tt,className:ot,...nt}=e,at=k!=null,st=e.children!==void 0;return(0,E.jsxs)(t,{className:l(ot,W,Be(W,v),M(W,{size:o,rounded:s,fillMode:n,themeColor:p}),D(W,{hover:b,focus:x,active:g,disabled:C||R,selected:f}),{"k-icon-button":!ee&&!st&&at}),"aria-pressed":w?f?"true":"false":void 0,...nt,"aria-disabled":R?"true":void 0,disabled:C||void 0,children:[typeof k=="string"&&k&&(0,E.jsx)(y,{className:l(tt,"k-button-icon"),icon:k,size:z}),k&&typeof k!="string"&&(0,E.jsx)(E.Fragment,{children:k}),ee?(0,E.jsxs)(E.Fragment,{children:[ee&&(0,E.jsx)("span",{className:"k-button-text",children:ee}),e.children]}):e.children&&(0,E.jsx)("span",{className:"k-button-text",children:e.children}),r&&(0,E.jsx)("span",{className:"k-menu-button-arrow k-button-arrow",children:(0,E.jsx)(y,{icon:c})})]})};d.states=Bt;d.options=yt;d.variants=kt;d.className=W;d.defaultOptions=fe;d.moduleName=me;d.folderName=Ce;d.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 Ie=require("react/jsx-runtime"),P=e=>(0,Ie.jsx)(d,{icon:"folder",...e,"aria-label":e["aria-label"]||"Folder",children:void 0});var _e=require("react/jsx-runtime"),Pe=e=>(0,_e.jsx)(d,{icon:"folder",children:"Button",...e});var Ke=require("react/jsx-runtime"),Le=e=>(0,Ke.jsx)(d,{children:"Button",...e});var ae=require("react/jsx-runtime"),At=d.options,Mt=d.states,Et={...d.defaultOptions,variant:"text"},St=[{name:"icon-only",title:"Icon Only"},{name:"icon-and-text",title:"Icon & Text"},{name:"text",title:"Text"}],Ot=[],$=e=>{let{variant:t,...o}=e;switch(t){case"icon-only":return(0,ae.jsx)(P,{...o,icon:"star"});case"icon-and-text":return(0,ae.jsx)(Pe,{...o,icon:"star",children:"Button"});default:return(0,ae.jsx)(Le,{...o,children:"Button"})}};$.options=At;$.states=Mt;$.variants=St;$.defaultOptions=Et;$.modifiers=Ot;$.className=d.className;var Q=require("react/jsx-runtime"),se="k-fab",Pt=[u.hover,u.focus,u.active,u.selected,u.disabled],_t={size:[i.undefined,i.small,i.medium,i.large],rounded:[B.undefined,B.none,B.small,B.medium,B.large,B.full],themeColor:[a.undefined,a.base,a.primary,a.secondary,a.tertiary]},Fe={type:"button"},m=e=>{let{size:t,rounded:o,themeColor:s,text:n,icon:p,type:r=Fe.type,position:c,hover:v,focus:b,active:x,selected:g,disabled:f,...C}=e;return(0,Q.jsxs)("button",{...C,type:r,className:l(e.className,se,M(se,{size:t,rounded:o,themeColor:s}),D(se,{hover:v,focus:b,active:x,disabled:f,selected:g}),{[`!k-pos-absolute k-${c}`]:c}),...!n&&p&&!e["aria-label"]&&{"aria-label":"Action"},...f&&{"aria-disabled":"true"},disabled:f||void 0,children:[p&&(0,Q.jsx)(y,{className:"k-fab-icon",icon:p}),n&&(0,Q.jsx)("span",{className:"k-fab-text",children:n})]})};m.states=Pt;m.options=_t;m.className=se;m.defaultOptions=Fe;m.moduleName="fab";m.folderName="fab";m.ariaSpec={selector:".k-fab",rules:[{selector:".k-fab",attribute:"role=button or nodeName=button",usage:"Omitted if the <button> DOM element is used."},{selector:".k-fab",attribute:"aria-label or title (when icon-only)",usage:"The attribute must be present when no text is initially visible in the button."},{selector:".k-fab.k-disabled",attribute:"aria-disabled=true",usage:"Rendered only when the button is disabled."}]};var we=require("react/jsx-runtime"),Lt="k-fab-items",Re=e=>{let{position:t,...o}=e;return(0,we.jsx)("ul",{...o,className:l(e.className,Lt,{[`k-fab-items-${t}`]:t}),children:e.children})};var Y=require("react/jsx-runtime"),ze="k-fab-item",Kt=[u.hover,u.focus,u.active,u.disabled],be=e=>{let{text:t,icon:o,align:s,hover:n,focus:p,active:r,disabled:c,...v}=e;return(0,Y.jsxs)("li",{...v,className:l(e.className,ze,{[`k-text-${s}`]:s},D(ze,{hover:n,focus:p,active:r,disabled:c})),children:[(0,Y.jsx)("span",{className:"k-fab-item-text",children:t}),(0,Y.jsx)(y,{className:"k-fab-item-icon",icon:o})]})};be.states=Kt;var Ft=require("react/jsx-runtime");var De=require("react/jsx-runtime"),He=e=>(0,De.jsx)(m,{icon:"plus",...e});var Rt=require("react/jsx-runtime");var wt=require("react/jsx-runtime");var K=require("react/jsx-runtime"),zt=m.options,Ht=m.states,Dt={...m.defaultOptions,variant:"text"},$t=[{name:"icon-only",title:"Icon Only"},{name:"icon-and-text",title:"Icon & Text"},{name:"text",title:"Text"}],Ut=[{name:"opened",title:"Opened"}],U=e=>{let{variant:t,modifiers:o,...s}=e,{opened:n}=o||{},p=n?(0,K.jsx)("div",{className:"k-fab-popup k-popup k-popup-transparent",style:{position:"absolute",top:"calc(16px + 36px)",right:"calc(16px + calc(36px / 2) - calc(36px /2))"},children:(0,K.jsx)(Re,{position:"bottom",children:(0,K.jsx)(be,{text:"Item",icon:"pencil",align:"right"})})}):null,r;switch(t){case"icon-only":r=(0,K.jsx)(m,{...s,icon:"star"});break;case"icon-and-text":r=(0,K.jsx)(m,{...s,icon:"star",text:"Action"});break;default:r=(0,K.jsx)(m,{...s,text:"Action"});break}return(0,K.jsxs)("span",{style:{position:"relative"},children:[r,p]})};U.options=zt;U.states=Ht;U.variants=$t;U.defaultOptions=Dt;U.modifiers=Ut;U.className=m.className;var $e=require("react/jsx-runtime"),xe="k-input-inner",Xt=[],Jt={},ie={type:"text",autocomplete:"off",value:"",placeholder:""},Z=e=>{let{value:t=ie.value,type:o=ie.type,placeholder:s=ie.placeholder,autocomplete:n=ie.autocomplete,disabled:p,readOnly:r,...c}=e;return(0,$e.jsx)("input",{...c,type:o,className:l(e.className,xe,M(xe,e)),placeholder:s,autoComplete:n,defaultValue:t,disabled:p||void 0,readOnly:r||void 0})};Z.states=Xt;Z.options=Jt;Z.className=xe;var Xe=require("react/jsx-runtime"),ge="k-input-inner",Vt=[],Gt={},Ue={value:"",placeholder:""},j=e=>{let{value:t=Ue.value,placeholder:o=Ue.placeholder,rows:s,disabled:n,...p}=e;return(0,Xe.jsx)("textarea",{...p,className:l(e.className,ge,M(ge,e)),placeholder:o,rows:s,defaultValue:t,disabled:n||void 0})};j.states=Vt;j.options=Gt;j.className=ge;var he="prompt-box",Je=he;var ve="speech-to-text-button",Ve=ve;var We=require("react/jsx-runtime"),Ge="k-speech-to-text-button",qe={icon:"microphone"},A=e=>{let{listening:t=!1,icon:o=qe.icon,...s}=e;return(0,We.jsx)(d,{...s,icon:t?"stop":o,className:l(e.className,Ge,{"k-listening":t}),"aria-pressed":t?"true":"false","aria-label":t?"Stop listening":"Start listening"})};A.states=d.states;A.options=d.options;A.className=Ge;A.defaultOptions=qe;A.moduleName=ve;A.folderName=Ve;A.ariaSpec={selector:".k-speech-to-text-button",rules:[{selector:".k-button.k-speech-to-text-button",attribute:"role=button or nodeName=button",usage:"If the used element is not <button>, explicitly set its role to button."},{selector:".k-button.k-speech-to-text-button",attribute:"aria-pressed",usage:"Announces the toggle behaviour of the button."},{selector:".k-button.k-speech-to-text-button",attribute:"aria-label",usage:"Accessible name for the speech-to-text button."}]};var qt=require("react/jsx-runtime");var Wt=require("react/jsx-runtime");var Ye=require("react/jsx-runtime"),Qt=d.states,Qe={...d.defaultOptions,variant:"normal"},Yt={...d.options,fillMode:d.options.fillMode.filter(e=>e!=="clear"&&e!=="link")},Zt=[],jt=[{name:"normal",title:"Normal"},{name:"listening",title:"Listening"}],X=e=>{let{variant:t,...o}={...Qe,...e},s={};return t==="listening"&&(s.listening=!0),(0,Ye.jsx)(A,{...o,...s})};X.options=Yt;X.states=Qt;X.variants=jt;X.defaultOptions=Qe;X.modifiers=Zt;X.className=A.className;var O=require("react/jsx-runtime"),_="k-prompt-box",eo=[u.hover,u.focus,u.disabled],to={fillMode:[S.undefined,S.solid,S.flat,S.outline]},Ne={lineMode:"auto",isExpanded:!1},N=e=>{let{fillMode:t,lineMode:o=Ne.lineMode,startAffix:s,endAffix:n,header:p,isExpanded:r=Ne.isExpanded,className:c,children:v,value:b,placeholder:x,generating:g,hover:f,focus:C,disabled:w,...R}=e,k=o==="multi"||o==="auto"&&r;return(0,O.jsxs)("div",{...R,className:l(c,"k-input",_,{[`${_}-singleline`]:o==="single",[`${_}-multiline`]:k,[`k-input-${t}`]:t,"k-hover":f,"k-focus":C,"k-disabled":w}),children:[p&&(0,O.jsx)("div",{className:`${_}-header`,children:p}),(0,O.jsxs)("div",{className:`${_}-content`,children:[s&&(0,O.jsx)("div",{className:`${_}-affix`,children:s}),o==="single"?(0,O.jsx)(Z,{value:b,placeholder:x,className:`${_}-input`,type:"text","aria-label":"Prompt input"}):(0,O.jsx)(j,{value:b,placeholder:x,className:`${_}-textarea`,rows:o==="multi"||r?3:1,"aria-label":"Prompt input","aria-multiline":"true"}),(0,O.jsxs)("div",{className:`${_}-affix`,children:[n,(0,O.jsx)(A,{size:"small",fillMode:"flat",rounded:"full"}),(0,O.jsx)(P,{icon:g?"stop":"arrow-up",size:"small",rounded:"full",active:g,disabled:!b&&!g,className:l({"k-generating":g}),"aria-label":g?"Stop generating":"Send prompt","aria-live":"polite"})]})]}),v]})};N.states=eo;N.options=to;N.className=_;N.defaultOptions=Ne;N.moduleName=he;N.folderName=Je;N.ariaSpec={selector:".k-prompt-box",rules:[{selector:".k-prompt-box-singleline .k-prompt-box-input",attribute:"nodeName=input",usage:"Ensures the input field has the proper textbox role."},{selector:".k-prompt-box-singleline .k-prompt-box-input",attribute:"aria-label",usage:"Provides an accessible label for the single-line input."},{selector:".k-prompt-box-multiline .k-prompt-box-textarea",attribute:"nodeName=textarea",usage:"Ensures the textarea has the proper textbox role."},{selector:".k-prompt-box-multiline .k-prompt-box-textarea",attribute:"aria-label",usage:"Provides an accessible label for the textarea."},{selector:".k-prompt-box-multiline .k-prompt-box-textarea",attribute:"aria-multiline=true",usage:"Indicates the textarea supports multiple lines of text."},{selector:".k-prompt-box:not(.k-prompt-box-singleline):not(.k-prompt-box-multiline) .k-prompt-box-textarea",attribute:"nodeName=textarea",usage:"Ensures the auto-mode textarea has the proper textbox role."},{selector:".k-prompt-box:not(.k-prompt-box-singleline):not(.k-prompt-box-multiline) .k-prompt-box-textarea",attribute:"aria-label",usage:"Provides an accessible label for the auto-mode textarea."},{selector:".k-prompt-box:not(.k-prompt-box-singleline):not(.k-prompt-box-multiline) .k-prompt-box-textarea",attribute:"aria-multiline=true",usage:"Indicates the auto-mode textarea supports multiple lines of text."},{selector:".k-prompt-box-affix .k-button:not(.k-speech-to-text-button)",attribute:"aria-label",usage:"The send/stop button is labelled to indicate its current action."},{selector:".k-prompt-box-affix .k-button:not(.k-speech-to-text-button)",attribute:"aria-live=polite",usage:"Announces the change in status of the send/stop button."}]};var oo=require("react/jsx-runtime");var no=require("react/jsx-runtime");var ao=require("react/jsx-runtime");var so=require("react/jsx-runtime");var io=require("react/jsx-runtime");var T=require("react/jsx-runtime"),ro=N.options,lo=N.states,po={...N.defaultOptions,variant:"Single"},co=[{name:"Single",title:"Singleline"},{name:"Multi",title:"Multiline"}],uo=[{name:"header",title:"Header"},{name:"endAffix",title:"End Affix"},{name:"startAffix",title:"Start Affix"}],J=e=>{let{variant:t,modifiers:o,...s}=e,n={},p=(0,T.jsx)(T.Fragment,{children:(0,T.jsx)(P,{size:"small",icon:"send",fillMode:"flat"})});return Object.keys(o||{}).forEach(r=>{switch(r){case"header":n.header=o!=null&&o[r]?(0,T.jsx)(d,{children:"Button in header"}):void 0;break;case"endAffix":o!=null&&o[r]&&(n.endAffix=(0,T.jsxs)(T.Fragment,{children:[p,(0,T.jsx)(P,{icon:"paperclip",size:"small",fillMode:"flat"})]}));break;case"startAffix":n.startAffix=o!=null&&o[r]?(0,T.jsx)(T.Fragment,{children:(0,T.jsx)(P,{icon:"plus",size:"small",fillMode:"flat"})}):void 0;break;default:break}}),t==="Multi"?(0,T.jsx)(N,{style:{width:300},lineMode:"multi",endAffix:p,placeholder:"Enter your prompt...",...s,...n}):(0,T.jsx)(N,{style:{width:300},lineMode:"single",endAffix:p,placeholder:"Enter your prompt...",...s,...n})};J.options=ro;J.states=lo;J.variants=co;J.defaultOptions=po;J.modifiers=uo;J.className=N.className;var Te="chat",Ze=Te;var h=require("react/jsx-runtime"),je="k-chat",mo=[],fo={},bo=(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(P,{icon:"paperclip",fillMode:"clear",rounded:"full",size:"small","aria-label":"Attach file"},"paperclip"),(0,h.jsx)("div",{className:"k-spacer"})]}),et={tools:bo},F=e=>{let{header:t,dir:o,suggestedActions:s,files:n,pinned:p,replied:r,generating:c,tools:v=et.tools,value:b,empty:x,scrollToBottom:g,scrollbar:f,promptBoxProps:C,...w}=e;return(0,h.jsxs)("div",{...w,className:l(je,e.className),dir:o,children:[t,(0,h.jsxs)("div",{className:"k-message-list",role:"log","aria-label":"Message list","aria-live":"polite",children:[p,(0,h.jsx)("div",{className:l("k-message-list-content",x&&"k-message-list-content-empty"),children:e.children}),g&&(0,h.jsx)("div",{className:"k-chat-scroll-to-bottom-container",children:(0,h.jsx)(He,{themeColor:"base",icon:"arrow-down",size:"small"})})]}),f&&(0,h.jsx)("div",{className:"k-separator"}),(0,h.jsxs)("div",{className:"k-message-box-wrapper",children:[s,(0,h.jsx)(N,{lineMode:"multi",placeholder:"Type a message",generating:c,value:b,header:n||r?(0,h.jsxs)(h.Fragment,{children:[r,n]}):void 0,endAffix:v,...C})]})]})};F.states=mo;F.options=fo;F.className=je;F.defaultOptions=et;F.moduleName=Te;F.folderName=Ze;F.ariaSpec={selector:".k-chat",rules:[{selector:".k-message-list",attribute:"role=log",usage:"The role of the Chat message list must imply that there is a log (list) of messages."},{selector:".k-message-list",attribute:"aria-label",usage:"Announces the purpose of the Chat message list."},{selector:".k-message-list",attribute:"aria-live=polite",usage:"Announces new messages in the Chat message list."},{selector:".k-bubble",attribute:"tabindex=0",usage:"The Chat bubble must be focusable."},{selector:".k-bubble .k-typing-indicator",attribute:"tabindex=-1",usage:"The Chat bubble typing indicator should not be focusable."},{selector:".k-bubble-expandable-indicator",attribute:"role=button",usage:"The expandable indicator must have an appropriate role."},{selector:".k-bubble-expandable-indicator",attribute:"aria-label or title",usage:"The expandable indicator must be properly labelled."},{selector:".k-bubble-expandable-indicator",attribute:"tabindex=0",usage:"The expandable indicator must be part of the page tabsequence."},{selector:".k-message-reference>.k-button",attribute:"aria-label or title",usage:"The reference close button must be properly labelled."},{selector:".k-message-reference>.k-button",attribute:"role=button or nodeName=button",usage:"The reference close button must have an appropriate role."},{selector:".k-prompt-box-affix>.k-button",attribute:"role=button or nodeName=button",usage:"The buttons must have appropriate role."},{selector:".k-prompt-box-affix>.k-button",attribute:"aria-label or title",usage:"The buttons must be properly labelled."},{selector:".k-prompt-box-affix>.k-button.k-disabled",attribute:"disabled",usage:"Announces the send action as disabled when necessary."}]};var xo=F;