@progress/kendo-react-conversational-ui
Version:
React Chat component allows the user to participate in chat sessions with users or chat bots. KendoReact Conversational UI components
9 lines (8 loc) • 1.4 kB
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react"),d=require("@progress/kendo-react-common");function u(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const o=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(r,a,o.get?o:{enumerable:!0,get:()=>t[a]})}}return r.default=t,Object.freeze(r)}const l=u(s),b=t=>{const{suggestions:r,onSuggestionClick:a,suggestionsView:o}=t,i=(e,n)=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),a(e,n))},c=()=>r.map(e=>l.createElement("span",{role:"button",tabIndex:e.disabled?-1:0,"aria-label":e.description,"aria-disabled":e.disabled,onClick:n=>!e.disabled&&a(n,e),onKeyDown:n=>!e.disabled&&i(n,e),key:e.id,title:e.description,className:d.classNames(o==="classic"?"k-prompt-suggestion":"k-suggestion",{"k-disabled":e.disabled})},e.text));return o==="classic"?c():l.createElement("div",{role:"group",className:"k-suggestion-group"},c())};exports.SuggestionGroup=b;