@bothub-chat/ui 2.49.1-feat-finam-22c1d2a3-1cf1-4bfd-9a3c-4d82369166bb → 2.49.1-feat-finam-61fe41b1-3320-4e97-9108-5d93633544cb
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest as i,__awaiter as e}from"tslib";import{jsx as o,jsxs as s,Fragment as n}from"react/jsx-runtime";import{useRef as t,useState as r,useCallback as c,useEffect as d}from"react";import{useTransition as m}from"@react-spring/web";import{useOnClickOutside as a}from"../../utils/useOnClickOutside.js";import{InputMessageStyled as p,InputMessageContent as l,InputMessageMain as j,InputMessageVoiceRecord as x,InputMessageVoiceRecordDot as u,InputMessageVoiceRecordTimeText as g,InputMessageFiles as h,InputMessageFile as b,InputMessageConcatenateWarning as f,InputMessageVoiceFiles as y,InputMessageVoiceTrack as v,InputMessageVoiceFileDelete as w,InputMessageTextArea as k,InputMessageBottom as D,InputMessageBottomGroup as C,InputMessageUploadFile as $,InputMessageUploadFileInput as A,InputMessageUploadFileButton as F,InputMessageToggleSendStyled as E,InputMessageToggleSendButton as T,InputMessageToggleSendModalStyled as S,InputMessageToggleSendModalOption as L,InputMessageVoicePlayButton as K,InputMessageVoicePauseButton as O,InputMessageVoiceButton as P,InputMessageSendButton as U,InputMessageSendIcon as q}from"./styled.js";import{ChipImage as z}from"../chip/styled.js";import"react-markdown";import"react-dom";import"../portal/styled.js";import"../tooltip/styled.js";import"../tooltip/arrow/styled.js";import"../../theme/index.js";import"../tooltip/context.js";import{PdfIcon as I}from"../../icons/pdf/index.js";import{TxtIcon as R}from"../../icons/txt/index.js";import{WordIcon as V}from"../../icons/word/index.js";import{XlsIcon as B}from"../../icons/xls/index.js";import{IconProvider as N}from"../icon/context.js";import"../icon/styled.js";import{getPreviewUrlForFile as M,isFileTypeAccepted as G,formatUploadFiles as H,formatSeconds as W,isMobileDevice as _}from"./utils.js";import{AttachFileIcon as J}from"../../icons/attach-file/index.js";import{getSupportedAudioMimeType as Q}from"../../utils/getSupportedAudioMimeType.js";import"../message/styled.js";import"../skeleton/index.js";import"unified";import"remark-parse";import"remark-gfm";import"mdast-util-to-markdown";import"../../utils/colors/calculateGrayScale.js";import"../../utils/colors/calculateAccentColors.js";import"../message/context.js";import"styled-components";import"../message/components/code/inline/styled.js";import"../message/components/code/multiline/styled.js";import"../message/components/code/multiline/copy/styled.js";import"../../icons/check-small/index.js";import"../../icons/copy/index.js";import"../message/components/code/multiline/content/styled.js";import"../message/components/paragraph/styled.js";import"../message/components/bold/styled.js";import"../message/components/italic/styled.js";import"../message/components/pre/styled.js";import"../message/components/table/styled.js";import"../message/components/table/cell/styled.js";import"../message/components/list/styled.js";import"../message/components/list/context.js";import"../message/components/list/item/styled.js";import"../message/components/title/styled.js";import"../message/components/link/styled.js";import"../message/components/image/styled.js";import"../message/components/image/context.js";import"../message/components/image/grid/styled.js";import"../message/components/image/button/styled.js";import"../message/components/image/button/list/styled.js";import"../message/markdown/styled.js";import"../scrollbar/styled.js";import"../scrollbar/shadow/styled.js";import"../scrollbar/style/styled.js";import"../message/timestamp/styled.js";import"../../icons/menu-dot/index.js";import"../../icons/update/index.js";import"../../icons/resend/index.js";import"../../icons/edit/index.js";import"../../icons/trash/index.js";import"../../icons/thumb-down/index.js";import"../../icons/close/index.js";import"../../icons/download-img/index.js";import"../message/actions/styled.js";import"../message/actions/copy-button/styled.js";import"../message/list/styled.js";import"../message/scroll-button/styled.js";import"../../icons/arrow-down/index.js";import"../../icons/arrow-narrow-left/index.js";import"../../icons/arrow-narrow-right/index.js";import"../../icons/arrow-up/index.js";import"../../icons/bitcoin/index.js";import"../../icons/bot-circle/index.js";import"../../icons/bothub-agg/index.js";import"../../icons/business-colored/index.js";import"../../icons/check-circle/index.js";import"../../icons/email-circle/index.js";import"../../icons/language/index.js";import"../../icons/lock-circle/index.js";import"../../icons/menu/index.js";import"../../icons/medium-circle/index.js";import"../../icons/tg-circle/index.js";import"../../icons/tg-colored/index.js";import"../../icons/youcassa/index.js";import"../../icons/dashboard/index.js";import"../../icons/user-profile/index.js";import"../../icons/logout/index.js";import"../../icons/habr-2/index.js";import"../../icons/arrow-2-down/index.js";import"../../icons/links/index.js";import"../../icons/free/index.js";import"../../icons/hotness/index.js";import"../../icons/checked/index.js";import"../../icons/ai/index.js";import"../../icons/bookmarks/index.js";import"../../icons/bookmarks-big/index.js";import"../../icons/chat/index.js";import"../../icons/chats/index.js";import"../../icons/coder/index.js";import"../../icons/presets-big/index.js";import"../../icons/referal/index.js";import"../../icons/restore/index.js";import"../../icons/tariff/index.js";import"../../icons/plus-2/index.js";import"../../icons/plus-1/index.js";import"../../icons/send/index.js";import"../../icons/settings/index.js";import"../../icons/habr/index.js";import"../../icons/stop/index.js";import"../../icons/thumb-up/index.js";import"../../icons/star/index.js";import"../../icons/info-big/index.js";import"../../icons/warning-big/index.js";import"../../icons/error-big/index.js";import"../../icons/success-big/index.js";import"../../icons/mj/index.js";import"../../icons/card/index.js";import"../../icons/arrow-narrow-up/index.js";import"../../icons/arrow-narrow-down/index.js";import"../../icons/filters/index.js";import"../../icons/info/index.js";import"../../icons/search-circle/index.js";import"../../icons/save/index.js";import"../../icons/light/index.js";import"../../icons/dark/index.js";import"../../icons/email-colored/index.js";import"../../icons/action-chat/index.js";import"../../icons/attach/index.js";import"../../icons/avatar-add/index.js";import"../../icons/brush/index.js";import"../../icons/calendar/index.js";import"../../icons/claude/index.js";import"../../icons/cookie/index.js";import"../../icons/dalle/index.js";import"../../icons/error/index.js";import"../../icons/expand/index.js";import"../../icons/eye/index.js";import"../../icons/face/index.js";import"../../icons/gear/index.js";import"../../icons/gear-min/index.js";import"../../icons/generation/index.js";import"../../icons/gpt-3_5/index.js";import"../../icons/gpt-4/index.js";import"../../icons/imagine/index.js";import"../../icons/imagine-2/index.js";import"../../icons/loader/index.js";import"../../icons/loader-circular/index.js";import"../../icons/loader-circular-gradient/index.js";import"../../icons/loader-circular-gradient-2/index.js";import"../../icons/minus/index.js";import"../../icons/mj-white/index.js";import"../../icons/prompt/index.js";import"../../icons/rabbit/index.js";import"../../icons/ratio-1x1/index.js";import"../../icons/ratio-2x3/index.js";import"../../icons/ratio-3x2/index.js";import"../../icons/ratio-4x5/index.js";import"../../icons/ratio-4x7/index.js";import"../../icons/ratio-5x4/index.js";import"../../icons/ratio-7x4/index.js";import"../../icons/ratio-16x9/index.js";import"../../icons/ratio-9x16/index.js";import"../../icons/ratio-21x9/index.js";import"../../icons/ratio-9x21/index.js";import"../../icons/refferal-min/index.js";import"../../icons/search-data/index.js";import"../../icons/square/index.js";import"../../icons/turtle/index.js";import"../../icons/upscale/index.js";import"../../icons/withdraw/index.js";import"../../icons/search-plus/index.js";import"../../icons/lightning/index.js";import"../../icons/blog-circle/index.js";import"../../icons/stripe/index.js";import"../../icons/corporate/index.js";import"../../icons/public/index.js";import"../../icons/private/index.js";import"../../icons/mistral/index.js";import"../../icons/gemini/index.js";import"../../icons/search-simple/index.js";import"../../icons/sad-robot/index.js";import"../../icons/model/index.js";import"../../icons/phone-colored/index.js";import"../../icons/questions/index.js";import"../../icons/pdf-big/index.js";import"../../icons/xls-big/index.js";import"../../icons/word-big/index.js";import"../../icons/txt-big/index.js";import"../../icons/bothub-logo-gradient/index.js";import"../../icons/telegram-logo-gradient/index.js";import"../../icons/decline-circle/index.js";import"../../icons/simple-gear-bg/index.js";import"../../icons/advanced-filter/index.js";import"../../icons/big-corporate/index.js";import"../../icons/big-mj/index.js";import"../../icons/big-models/index.js";import"../../icons/big-stats/index.js";import"../../icons/big-success/index.js";import"../../icons/big-users/index.js";import"../../icons/optional-presets/index.js";import"../../icons/wallet-withdraw/index.js";import"../../icons/big-presets/index.js";import"../../icons/big-favorite/index.js";import"../../icons/big-referal/index.js";import"../../icons/attach-file-big/index.js";import"../../icons/voice/index.js";import"../../icons/play-button/index.js";import"../../icons/pause-button/index.js";import"../../icons/text-read/index.js";import"../../icons/text-hide/index.js";import"../../icons/best-chat-bots/index.js";import"../../icons/upload/index.js";import{EnterIcon as X}from"../../icons/enter/index.js";import"../../icons/discord/index.js";import"../../icons/discord-circle/index.js";import"../../icons/black-forest-labs/index.js";import"../../icons/flux/index.js";import"../../icons/stable-diffusion/index.js";import"../../icons/stability-ai/index.js";import"../../icons/article-generator/index.js";import"../../icons/success/index.js";import"../../icons/google/index.js";import"../../icons/yandex/index.js";import"../../icons/vk/index.js";import"../../icons/big-article/index.js";import"../../icons/add-chat/index.js";import"../../icons/add-group/index.js";import"../../icons/drag-dot/index.js";import"../../icons/add-folder/index.js";import"../../icons/temp-chat/index.js";import"../../icons/delete-chat/index.js";import"../../icons/sidebar-chat/index.js";import"../../icons/organization/index.js";import"../../icons/simple-gear/index.js";import"../../icons/text-bold/index.js";import"../../icons/text-italic/index.js";import"../../icons/text-underline/index.js";import"../../icons/text-strikethrough/index.js";import"../../icons/refresh/index.js";import"../../icons/copy-variants/index.js";import"../../icons/sort-ascending/index.js";import"../../icons/sort-descending/index.js";import"../../icons/quote/index.js";import"../../icons/url-circle/index.js";import"../../icons/show-ui/index.js";import"../../icons/hide-ui/index.js";import"../../icons/sort-user/index.js";import"../../icons/happy-robot/index.js";import"../../icons/happy-robot-gradient/index.js";import"../../icons/min-window/index.js";import"../../icons/max-window/index.js";import"../../icons/manage-chat/index.js";import"../../icons/analyze-urls/index.js";import"../../icons/web-search/index.js";import"../../icons/include-context/index.js";import"../../icons/queue/index.js";import"../../icons/sort-alphabet-ascending/index.js";import"../../icons/sort-alphabet-descending/index.js";import"../../icons/sort-date-ascending/index.js";import"../../icons/sort-date-descending/index.js";import"../../icons/cot-r1/index.js";import"../../icons/news/index.js";import"../../icons/volume/index.js";import"../../icons/flag-ru/index.js";import"../../icons/flag-kz/index.js";import"../../icons/print/index.js";import"../../icons/pc-icon-1/index.js";import"../../icons/pc-icon-2/index.js";import"../../icons/pc-icon-3/index.js";import"../../icons/star-unfilled/index.js";import"../../icons/image-generation/index.js";import"../../icons/speech-synthesys/index.js";import"../../icons/transcription/index.js";import"../../icons/text-rewrite/index.js";import"../../icons/code-generation/index.js";import"../../icons/essay-generation/index.js";import"../../icons/spelling/index.js";import"../../icons/text-generation/index.js";import"../../icons/traffic-analisys/index.js";import"../../icons/fav-profile/index.js";import"../../icons/exclamation/index.js";import"../../icons/article/index.js";import"../../icons/setchel/index.js";import"../../icons/assembly/index.js";import"../../icons/data-visualisation/index.js";import"../../icons/document-analisys/index.js";import"../../icons/problem-solvment/index.js";import"../../icons/setting-analisys/index.js";import"../../icons/translation/index.js";import"../../icons/stars/index.js";import"../../icons/academy/index.js";import"../../icons/articles/index.js";import"../../icons/blog-post/index.js";import"../../icons/book/index.js";import"../../icons/bow-tie/index.js";import"../../icons/case-study/index.js";import"../../icons/comments/index.js";import"../../icons/guide/index.js";import"../../icons/marketing/index.js";import"../../icons/post/index.js";import"../../icons/report/index.js";import"../../icons/review/index.js";import"../../icons/scientific-article/index.js";import"../../icons/selling-text/index.js";import"../../icons/textbook/index.js";import"../../icons/wind/index.js";import"../../icons/grok/index.js";import"../../icons/deepseek/index.js";import"../../icons/grid-horizontal/index.js";import"../../icons/grid-vertical/index.js";import"../../icons/star-gradient/index.js";import"../../icons/qwen/index.js";import"../../icons/sidebar-toggle-left/index.js";import"../../icons/sidebar-toggle-right/index.js";import"../../icons/system/index.js";import"../../icons/selector/index.js";import"../../icons/video-camera/index.js";import"../../icons/music-note/index.js";import"../../icons/add-profile/index.js";import"../../icons/token-counter/index.js";import"../../icons/customer-support/index.js";import"../../icons/sort-alphabet-top-bottom/index.js";import"../../icons/sort-alphabet-bottom-top/index.js";import"../../icons/pause/index.js";import"../../icons/play/index.js";import"../../icons/restore-2/index.js";import"../../icons/video-generation/index.js";import"../../icons/veo-model/index.js";import"../../icons/runway/index.js";import"../../icons/queue-select/index.js";import"../../icons/apple/index.js";import"../../icons/mail-colored/index.js";import"../../icons/shield/index.js";import"../../icons/stars-gradient/index.js";import"../../icons/fire/index.js";import"../../icons/brain/index.js";import"../../icons/mj-purple/index.js";import"../../icons/claude-black/index.js";import"../../icons/vk-filled/index.js";import"../../icons/tg/index.js";import"../../icons/gift/index.js";import"../../icons/exchange/index.js";import"../../icons/time/index.js";import"../message/versions/styled.js";import"../message/copy/styled.js";import"../message/badge-progress/styled.js";import"../message/button/styled.js";import"../message/button/list/styled.js";import"../message/file/styled.js";import{MessageVoice as Y}from"../message/voice/index.js";import"../message/reasoning-block/styled.js";import"../typography/styled.js";import"../message/search-results/styled.js";import"../message/video/styled.js";import{getWaveData as Z}from"../../utils/audio/getWaveData.js";import{useTheme as ii}from"../../theme/hook.js";const ei=ei=>{var{className:oi,placeholder:si,message:ni,files:ti,disabled:ri=!1,sendDisabled:ci=!1,textAreaDisabled:di=!1,useAlternativeKeyDefaultValue:mi=!1,defaultKeySendText:ai,alternativeKeySendText:pi,concatenateText:li,uploadFileLimit:ji=5,hideUploadFile:xi=!1,uploadFileDisabled:ui=!1,uploadFileAccept:gi,autoFocus:hi=!0,voice:bi=!1,onSetAlternativeKeyValue:fi,onChange:yi,onFilesChange:vi,onVoiceFilesChange:wi,onTextAreaChange:ki,onSend:Di,onFocus:Ci,onBlur:$i,emitError:Ai,rightActions:Fi}=ei,Ei=i(ei,["className","placeholder","message","files","disabled","sendDisabled","textAreaDisabled","useAlternativeKeyDefaultValue","defaultKeySendText","alternativeKeySendText","concatenateText","uploadFileLimit","hideUploadFile","uploadFileDisabled","uploadFileAccept","autoFocus","voice","onSetAlternativeKeyValue","onChange","onFilesChange","onVoiceFilesChange","onTextAreaChange","onSend","onFocus","onBlur","emitError","rightActions"]);const Ti=ii(),Si=t(null),[Li,Ki]=r("calc(var(--bothub-scale, 1) * 22px)"),[Oi,Pi]="string"==typeof ni?[ni,yi]:r(""),[Ui,qi]=Array.isArray(ti)?[ti,vi]:r([]),[zi,Ii]=r([]),[Ri,Vi]=r(!1),[Bi,Ni]=r(!ri&&hi),[Mi,Gi]=r(!1),[Hi,Wi]=r(!1),[_i,Ji]=r(null),Qi=t(null),Xi=t(null),Yi=t([]),Zi=t(null),ie=t(!1),ee=t(null),[oe,se]=r(mi),[ne,te]=r(!1),re=c(()=>{se(!1),null==fi||fi(!1),te(!1)},[]),ce=c(()=>{se(!0),null==fi||fi(!0),te(!1)},[]),de=c(i=>{Ni(!0),null==Ci||Ci(i)},[Ci]);console.log(Ti.bright);const me=c(i=>{Ni(!1),null==$i||$i(i)},[$i]),ae=c(i=>{null==Pi||Pi(i.target.value),null==ki||ki(i)},[Pi,ki]),pe=c(i=>e(void 0,void 0,void 0,function*(){if(!i.length)return;const e=[],o=[],s=yield Promise.all(null==i?void 0:i.map(M));for(const[n,t]of i.entries()){G(t.type,gi)?e.push({previewUrl:s[n],name:t.name,native:t}):o.push(t)}o.length>0&&(null==Ai||Ai({name:"WRONG_FILES",payload:o})),(null==e?void 0:e.length)>0&&(null==qi||qi([...Ui,...e].slice(0,ji)))}),[gi,Ai,ji,Ui]),le=c(i=>e(void 0,void 0,void 0,function*(){!ui&&i.clipboardData.files.length>0&&(i.preventDefault(),yield pe([...i.clipboardData.files]))}),[pe,ui]),je=c(i=>e(void 0,void 0,void 0,function*(){if(!qi||!i.target.files)return;const e=yield H([...Ui.map(({native:i})=>i),...i.target.files]);qi(e.slice(0,ji))}),[Ui,qi,ji]),xe=c(i=>{null==qi||qi(Ui.filter(({name:e})=>e!==i.name))},[qi,Ui]),ue=c(i=>{i.stopPropagation(),null==Di||Di(Oi,Ui),null==Pi||Pi(""),null==qi||qi([]),null==Ii||Ii([]),Ki("calc(var(--bothub-scale, 1) * 22px)")},[Oi,Ui,Di,Pi,qi,Ii]),ge=c(i=>{i.stopPropagation();if(_()&&"Enter"===i.key)return;const e=oe?"enter":"ctrl/shift+enter";let o="";if("Enter"===i.key&&(i.shiftKey||i.ctrlKey))o="ctrl/shift+enter";else{if("Enter"!==i.key)return;o="enter"}if(Bi&&"Enter"===i.key){if(o===e&&i.ctrlKey){i.preventDefault();const e=Si.current;if(!e)return;const o=e.value,t=e.selectionStart,r=o.slice(0,t),c=o.slice(t);null==Pi||Pi(`${r}\n${c}`),s=e,n=t+1,setTimeout(()=>{s.selectionStart=n,s.selectionEnd=n},1)}e!==o&&""!==o&&(i.preventDefault(),null==Di||Di(Oi,Ui),Ki("calc(var(--bothub-scale, 1) * 22px)"))}var s,n},[Bi,Oi,Ui,Di,Pi,qi]),he=c(()=>{var i;ri||null===(i=Si.current)||void 0===i||i.focus()},[ri,hi]),be=c(i=>{i.stopPropagation()},[]),fe=c(i=>e(void 0,void 0,void 0,function*(){if(Hi)return;ie.current=!0,i.stopPropagation();const e=yield navigator.mediaDevices.getUserMedia({audio:!0}),o=new MediaRecorder(e,{mimeType:Q()});ie.current&&(o.start(1e3),Qi.current=o,Xi.current=e,Zi.current=window.setInterval(()=>{Ji(i=>(null!=i?i:0)+.1)},100),Wi(!0),Ji(0),Vi(!1))}),[ie.current,Yi.current,Hi]),ye=c(()=>{const i=Qi.current,e=Xi.current,o=Zi.current;if(Hi&&i&&e&&o){i.stop();for(const i of e.getTracks())i.stop();window.clearInterval(o)}},[Hi,Qi.current,Xi.current,Zi.current]),ve=c(()=>e(void 0,void 0,void 0,function*(){ie.current=!1,Hi&&ye()}),[Hi,ye]),we=c(()=>{const i=Qi.current,e=Zi.current;Hi&&i&&e&&(i.pause(),window.clearInterval(e),Vi(!0))},[Hi]),ke=c(()=>{const i=Qi.current;Hi&&i&&(i.resume(),Zi.current=window.setInterval(()=>{Ji(i=>(null!=i?i:0)+.1)},100),Vi(!1))},[Hi,Ji]),De=c(i=>{Ii(zi.filter(e=>e.src!==i.src))},[zi,Ii]),Ce=c(()=>{const i=Si.current;null!==i&&(i.style.height="calc(var(--bothub-scale, 1) * 22px)",i.style.height=`${i.scrollHeight}px`,Ki(`${i.scrollHeight}px`))},[Oi,hi]);d(()=>{Ce()},[Ce]),d(()=>{const i=Si.current;if(!i||ri)return;const e=!ri&&hi;Ni(e),e?i.focus():document.activeElement===i&&i.blur()},[ri,hi]),d(()=>{const i=Si.current;if(null!==i)return i.addEventListener("keydown",ge),()=>{i.removeEventListener("keydown",ge)}},[ge]),d(()=>{qi&&ti&&qi(ti)},[ti]),d(()=>{null==wi||wi(zi)},[zi]),d(()=>{const i=Qi.current,o=i=>{i.data.size>0&&Yi.current.push(i.data)},s=()=>e(void 0,void 0,void 0,function*(){const i=new Blob(Yi.current,{type:Q()}),{waveData:e,duration:o}=yield Z(i),s={src:URL.createObjectURL(i),duration:o,blob:i,waveData:e};Ii([...zi,s]),Qi.current=null,Xi.current=null,Yi.current=[],Zi.current=null,Wi(!1),Ji(null)});return i&&(i.addEventListener("dataavailable",o),i.addEventListener("stop",s)),()=>{i&&(i.removeEventListener("dataavailable",o),i.removeEventListener("stop",s)),ye()}},[Qi.current]),a(ee,()=>{te(!1)});const $e=m(ne,{from:{opacity:0,y:10},enter:{opacity:1,y:0},leave:{opacity:0,y:10},config:{duration:150,ease:"easeOut"}});return o(p,{$active:Bi,$dragActive:Mi,$disabled:ri,$textAreaDisabled:di,$voiceRecording:Hi,className:oi,onClick:he,onDragEnter:()=>Gi(!0),onDragLeave:()=>Gi(!1),onDragOver:i=>(i.stopPropagation(),i.preventDefault(),!1),onDrop:i=>e(void 0,void 0,void 0,function*(){if(i.dataTransfer.files.length>0)return i.stopPropagation(),i.preventDefault(),yield pe([...i.dataTransfer.files]),Gi(!1),!1}),children:s(l,{children:[s(j,{children:[Hi&&null!==_i&&s(x,{children:[o(u,{}),o(g,{children:W(_i)})]}),Ui.length>0&&o(h,{children:Ui.map(i=>{let e;return e=i.previewUrl&&(i.name.match(/.png$/i)||i.name.match(/.jpg$/i)||i.name.match(/.jpeg$/i))?o(z,{src:i.previewUrl}):i.name.match(/.txt$/i)?o(R,{}):i.name.match(/.docx$/i)?o(V,{}):i.name.match(/.xlsx$/i)?o(B,{}):i.name.match(/.pdf$/i)?o(I,{}):o(J,{}),e=o(N,{size:18,children:e}),o(b,{start:e,onDelete:xe.bind(null,i),children:i.name.length>20?`...${i.name.slice(-20)}`:i.name},i.name)})}),zi.length>1&&o(f,{children:li}),zi.length>0&&o(y,{children:zi.map(i=>s(v,{children:[o(Y,{variant:"input",height:24,src:i.src,duration:i.duration,waveData:i.waveData,disableTranscription:!0}),o(w,{onClick:De.bind(null,i)})]},i.src))}),(!di||di&&si&&Ui.length!==ji||di&&Oi)&&o(k,Object.assign({$disabled:ri},Ei,{ref:Si,value:Oi,placeholder:si,disabled:ri||di,style:Object.assign(Object.assign({},Ei.style),{height:Li}),onFocus:de,onBlur:me,onChange:ae,onPaste:le}))]}),s(D,{children:[s(C,{children:[!xi&&!Hi&&s($,{onClick:be,children:[o(A,{type:"file",accept:gi,multiple:!0,disabled:Ui.length>=ji||ri||ui,onChange:je},Ui.length),o(F,{disabled:Ui.length>=ji||ri||ui})]}),Fi]}),s(C,{children:[!!ai&&!!pi&&s(E,{ref:ee,children:[o(T,{startIcon:o(X,{fill:Ti.bright?Ti.colors.custom.icon:Ti.colors.grayScale.gray3}),onClick:i=>{i.stopPropagation(),te(!ne)},disabled:ri}),$e((i,e)=>e&&s(S,{style:i,children:[o(L,{active:!oe,onClick:re,children:ai}),o(L,{active:oe,onClick:ce,children:pi})]},"alternative-key-modal"))]}),Hi&&o(n,{children:Ri?o(K,{onClick:ke}):o(O,{onClick:we})}),bi&&o(P,{$isRecording:Hi,disabled:ri||ci,onClick:Hi?ve:fe,"data-test":"submit-message"}),o(U,{disabled:ri||ci||Hi,onClick:ue,"data-test":"submit-message",children:o(q,Object.assign({},Ti.bright&&{fill:Ti.default.colors.base.white}))})]})]})]})})};export{ei as InputMessage};
|
|
1
|
+
import{__rest as i,__awaiter as e}from"tslib";import{jsx as o,jsxs as s,Fragment as n}from"react/jsx-runtime";import{useRef as t,useState as r,useCallback as c,useEffect as d}from"react";import{useTransition as m}from"@react-spring/web";import{useOnClickOutside as a}from"../../utils/useOnClickOutside.js";import{InputMessageStyled as p,InputMessageContent as l,InputMessageMain as j,InputMessageVoiceRecord as x,InputMessageVoiceRecordDot as u,InputMessageVoiceRecordTimeText as g,InputMessageFiles as h,InputMessageFile as b,InputMessageConcatenateWarning as f,InputMessageVoiceFiles as y,InputMessageVoiceTrack as v,InputMessageVoiceFileDelete as w,InputMessageTextArea as k,InputMessageBottom as D,InputMessageBottomGroup as C,InputMessageUploadFile as $,InputMessageUploadFileInput as A,InputMessageUploadFileButton as F,InputMessageToggleSendStyled as E,InputMessageToggleSendButton as T,InputMessageToggleSendModalStyled as S,InputMessageToggleSendModalOption as L,InputMessageVoicePlayButton as K,InputMessageVoicePauseButton as O,InputMessageVoiceButton as P,InputMessageSendButton as U,InputMessageSendIcon as q}from"./styled.js";import{ChipImage as z}from"../chip/styled.js";import"react-markdown";import"react-dom";import"../portal/styled.js";import"../tooltip/styled.js";import"../tooltip/arrow/styled.js";import"../../theme/index.js";import"../tooltip/context.js";import{PdfIcon as I}from"../../icons/pdf/index.js";import{TxtIcon as R}from"../../icons/txt/index.js";import{WordIcon as V}from"../../icons/word/index.js";import{XlsIcon as B}from"../../icons/xls/index.js";import{IconProvider as N}from"../icon/context.js";import"../icon/styled.js";import{getPreviewUrlForFile as M,isFileTypeAccepted as G,formatUploadFiles as H,formatSeconds as W,isMobileDevice as _}from"./utils.js";import{AttachFileIcon as J}from"../../icons/attach-file/index.js";import{getSupportedAudioMimeType as Q}from"../../utils/getSupportedAudioMimeType.js";import"../message/styled.js";import"../skeleton/index.js";import"unified";import"remark-parse";import"remark-gfm";import"mdast-util-to-markdown";import"../../utils/colors/calculateGrayScale.js";import"../../utils/colors/calculateAccentColors.js";import"../message/context.js";import"styled-components";import"../message/components/code/inline/styled.js";import"../message/components/code/multiline/styled.js";import"../message/components/code/multiline/copy/styled.js";import"../../icons/check-small/index.js";import"../../icons/copy/index.js";import"../message/components/code/multiline/content/styled.js";import"../message/components/paragraph/styled.js";import"../message/components/bold/styled.js";import"../message/components/italic/styled.js";import"../message/components/pre/styled.js";import"../message/components/table/styled.js";import"../message/components/table/cell/styled.js";import"../message/components/list/styled.js";import"../message/components/list/context.js";import"../message/components/list/item/styled.js";import"../message/components/title/styled.js";import"../message/components/link/styled.js";import"../message/components/image/styled.js";import"../message/components/image/context.js";import"../message/components/image/grid/styled.js";import"../message/components/image/button/styled.js";import"../message/components/image/button/list/styled.js";import"../message/markdown/styled.js";import"../scrollbar/styled.js";import"../scrollbar/shadow/styled.js";import"../scrollbar/style/styled.js";import"../message/timestamp/styled.js";import"../../icons/menu-dot/index.js";import"../../icons/update/index.js";import"../../icons/resend/index.js";import"../../icons/edit/index.js";import"../../icons/trash/index.js";import"../../icons/thumb-down/index.js";import"../../icons/close/index.js";import"../../icons/download-img/index.js";import"../message/actions/styled.js";import"../message/actions/copy-button/styled.js";import"../message/list/styled.js";import"../message/scroll-button/styled.js";import"../../icons/arrow-down/index.js";import"../../icons/arrow-narrow-left/index.js";import"../../icons/arrow-narrow-right/index.js";import"../../icons/arrow-up/index.js";import"../../icons/bitcoin/index.js";import"../../icons/bot-circle/index.js";import"../../icons/bothub-agg/index.js";import"../../icons/business-colored/index.js";import"../../icons/check-circle/index.js";import"../../icons/email-circle/index.js";import"../../icons/language/index.js";import"../../icons/lock-circle/index.js";import"../../icons/menu/index.js";import"../../icons/medium-circle/index.js";import"../../icons/tg-circle/index.js";import"../../icons/tg-colored/index.js";import"../../icons/youcassa/index.js";import"../../icons/dashboard/index.js";import"../../icons/user-profile/index.js";import"../../icons/logout/index.js";import"../../icons/habr-2/index.js";import"../../icons/arrow-2-down/index.js";import"../../icons/links/index.js";import"../../icons/free/index.js";import"../../icons/hotness/index.js";import"../../icons/checked/index.js";import"../../icons/ai/index.js";import"../../icons/bookmarks/index.js";import"../../icons/bookmarks-big/index.js";import"../../icons/chat/index.js";import"../../icons/chats/index.js";import"../../icons/coder/index.js";import"../../icons/presets-big/index.js";import"../../icons/referal/index.js";import"../../icons/restore/index.js";import"../../icons/tariff/index.js";import"../../icons/plus-2/index.js";import"../../icons/plus-1/index.js";import"../../icons/send/index.js";import"../../icons/settings/index.js";import"../../icons/habr/index.js";import"../../icons/stop/index.js";import"../../icons/thumb-up/index.js";import"../../icons/star/index.js";import"../../icons/info-big/index.js";import"../../icons/warning-big/index.js";import"../../icons/error-big/index.js";import"../../icons/success-big/index.js";import"../../icons/mj/index.js";import"../../icons/card/index.js";import"../../icons/arrow-narrow-up/index.js";import"../../icons/arrow-narrow-down/index.js";import"../../icons/filters/index.js";import"../../icons/info/index.js";import"../../icons/search-circle/index.js";import"../../icons/save/index.js";import"../../icons/light/index.js";import"../../icons/dark/index.js";import"../../icons/email-colored/index.js";import"../../icons/action-chat/index.js";import"../../icons/attach/index.js";import"../../icons/avatar-add/index.js";import"../../icons/brush/index.js";import"../../icons/calendar/index.js";import"../../icons/claude/index.js";import"../../icons/cookie/index.js";import"../../icons/dalle/index.js";import"../../icons/error/index.js";import"../../icons/expand/index.js";import"../../icons/eye/index.js";import"../../icons/face/index.js";import"../../icons/gear/index.js";import"../../icons/gear-min/index.js";import"../../icons/generation/index.js";import"../../icons/gpt-3_5/index.js";import"../../icons/gpt-4/index.js";import"../../icons/imagine/index.js";import"../../icons/imagine-2/index.js";import"../../icons/loader/index.js";import"../../icons/loader-circular/index.js";import"../../icons/loader-circular-gradient/index.js";import"../../icons/loader-circular-gradient-2/index.js";import"../../icons/minus/index.js";import"../../icons/mj-white/index.js";import"../../icons/prompt/index.js";import"../../icons/rabbit/index.js";import"../../icons/ratio-1x1/index.js";import"../../icons/ratio-2x3/index.js";import"../../icons/ratio-3x2/index.js";import"../../icons/ratio-4x5/index.js";import"../../icons/ratio-4x7/index.js";import"../../icons/ratio-5x4/index.js";import"../../icons/ratio-7x4/index.js";import"../../icons/ratio-16x9/index.js";import"../../icons/ratio-9x16/index.js";import"../../icons/ratio-21x9/index.js";import"../../icons/ratio-9x21/index.js";import"../../icons/refferal-min/index.js";import"../../icons/search-data/index.js";import"../../icons/square/index.js";import"../../icons/turtle/index.js";import"../../icons/upscale/index.js";import"../../icons/withdraw/index.js";import"../../icons/search-plus/index.js";import"../../icons/lightning/index.js";import"../../icons/blog-circle/index.js";import"../../icons/stripe/index.js";import"../../icons/corporate/index.js";import"../../icons/public/index.js";import"../../icons/private/index.js";import"../../icons/mistral/index.js";import"../../icons/gemini/index.js";import"../../icons/search-simple/index.js";import"../../icons/sad-robot/index.js";import"../../icons/model/index.js";import"../../icons/phone-colored/index.js";import"../../icons/questions/index.js";import"../../icons/pdf-big/index.js";import"../../icons/xls-big/index.js";import"../../icons/word-big/index.js";import"../../icons/txt-big/index.js";import"../../icons/bothub-logo-gradient/index.js";import"../../icons/telegram-logo-gradient/index.js";import"../../icons/decline-circle/index.js";import"../../icons/simple-gear-bg/index.js";import"../../icons/advanced-filter/index.js";import"../../icons/big-corporate/index.js";import"../../icons/big-mj/index.js";import"../../icons/big-models/index.js";import"../../icons/big-stats/index.js";import"../../icons/big-success/index.js";import"../../icons/big-users/index.js";import"../../icons/optional-presets/index.js";import"../../icons/wallet-withdraw/index.js";import"../../icons/big-presets/index.js";import"../../icons/big-favorite/index.js";import"../../icons/big-referal/index.js";import"../../icons/attach-file-big/index.js";import"../../icons/voice/index.js";import"../../icons/play-button/index.js";import"../../icons/pause-button/index.js";import"../../icons/text-read/index.js";import"../../icons/text-hide/index.js";import"../../icons/best-chat-bots/index.js";import"../../icons/upload/index.js";import{EnterIcon as X}from"../../icons/enter/index.js";import"../../icons/discord/index.js";import"../../icons/discord-circle/index.js";import"../../icons/black-forest-labs/index.js";import"../../icons/flux/index.js";import"../../icons/stable-diffusion/index.js";import"../../icons/stability-ai/index.js";import"../../icons/article-generator/index.js";import"../../icons/success/index.js";import"../../icons/google/index.js";import"../../icons/yandex/index.js";import"../../icons/vk/index.js";import"../../icons/big-article/index.js";import"../../icons/add-chat/index.js";import"../../icons/add-group/index.js";import"../../icons/drag-dot/index.js";import"../../icons/add-folder/index.js";import"../../icons/temp-chat/index.js";import"../../icons/delete-chat/index.js";import"../../icons/sidebar-chat/index.js";import"../../icons/organization/index.js";import"../../icons/simple-gear/index.js";import"../../icons/text-bold/index.js";import"../../icons/text-italic/index.js";import"../../icons/text-underline/index.js";import"../../icons/text-strikethrough/index.js";import"../../icons/refresh/index.js";import"../../icons/copy-variants/index.js";import"../../icons/sort-ascending/index.js";import"../../icons/sort-descending/index.js";import"../../icons/quote/index.js";import"../../icons/url-circle/index.js";import"../../icons/show-ui/index.js";import"../../icons/hide-ui/index.js";import"../../icons/sort-user/index.js";import"../../icons/happy-robot/index.js";import"../../icons/happy-robot-gradient/index.js";import"../../icons/min-window/index.js";import"../../icons/max-window/index.js";import"../../icons/manage-chat/index.js";import"../../icons/analyze-urls/index.js";import"../../icons/web-search/index.js";import"../../icons/include-context/index.js";import"../../icons/queue/index.js";import"../../icons/sort-alphabet-ascending/index.js";import"../../icons/sort-alphabet-descending/index.js";import"../../icons/sort-date-ascending/index.js";import"../../icons/sort-date-descending/index.js";import"../../icons/cot-r1/index.js";import"../../icons/news/index.js";import"../../icons/volume/index.js";import"../../icons/flag-ru/index.js";import"../../icons/flag-kz/index.js";import"../../icons/print/index.js";import"../../icons/pc-icon-1/index.js";import"../../icons/pc-icon-2/index.js";import"../../icons/pc-icon-3/index.js";import"../../icons/star-unfilled/index.js";import"../../icons/image-generation/index.js";import"../../icons/speech-synthesys/index.js";import"../../icons/transcription/index.js";import"../../icons/text-rewrite/index.js";import"../../icons/code-generation/index.js";import"../../icons/essay-generation/index.js";import"../../icons/spelling/index.js";import"../../icons/text-generation/index.js";import"../../icons/traffic-analisys/index.js";import"../../icons/fav-profile/index.js";import"../../icons/exclamation/index.js";import"../../icons/article/index.js";import"../../icons/setchel/index.js";import"../../icons/assembly/index.js";import"../../icons/data-visualisation/index.js";import"../../icons/document-analisys/index.js";import"../../icons/problem-solvment/index.js";import"../../icons/setting-analisys/index.js";import"../../icons/translation/index.js";import"../../icons/stars/index.js";import"../../icons/academy/index.js";import"../../icons/articles/index.js";import"../../icons/blog-post/index.js";import"../../icons/book/index.js";import"../../icons/bow-tie/index.js";import"../../icons/case-study/index.js";import"../../icons/comments/index.js";import"../../icons/guide/index.js";import"../../icons/marketing/index.js";import"../../icons/post/index.js";import"../../icons/report/index.js";import"../../icons/review/index.js";import"../../icons/scientific-article/index.js";import"../../icons/selling-text/index.js";import"../../icons/textbook/index.js";import"../../icons/wind/index.js";import"../../icons/grok/index.js";import"../../icons/deepseek/index.js";import"../../icons/grid-horizontal/index.js";import"../../icons/grid-vertical/index.js";import"../../icons/star-gradient/index.js";import"../../icons/qwen/index.js";import"../../icons/sidebar-toggle-left/index.js";import"../../icons/sidebar-toggle-right/index.js";import"../../icons/system/index.js";import"../../icons/selector/index.js";import"../../icons/video-camera/index.js";import"../../icons/music-note/index.js";import"../../icons/add-profile/index.js";import"../../icons/token-counter/index.js";import"../../icons/customer-support/index.js";import"../../icons/sort-alphabet-top-bottom/index.js";import"../../icons/sort-alphabet-bottom-top/index.js";import"../../icons/pause/index.js";import"../../icons/play/index.js";import"../../icons/restore-2/index.js";import"../../icons/video-generation/index.js";import"../../icons/veo-model/index.js";import"../../icons/runway/index.js";import"../../icons/queue-select/index.js";import"../../icons/apple/index.js";import"../../icons/mail-colored/index.js";import"../../icons/shield/index.js";import"../../icons/stars-gradient/index.js";import"../../icons/fire/index.js";import"../../icons/brain/index.js";import"../../icons/mj-purple/index.js";import"../../icons/claude-black/index.js";import"../../icons/vk-filled/index.js";import"../../icons/tg/index.js";import"../../icons/gift/index.js";import"../../icons/exchange/index.js";import"../../icons/time/index.js";import"../message/versions/styled.js";import"../message/copy/styled.js";import"../message/badge-progress/styled.js";import"../message/button/styled.js";import"../message/button/list/styled.js";import"../message/file/styled.js";import{MessageVoice as Y}from"../message/voice/index.js";import"../message/reasoning-block/styled.js";import"../typography/styled.js";import"../message/search-results/styled.js";import"../message/video/styled.js";import{getWaveData as Z}from"../../utils/audio/getWaveData.js";import{useTheme as ii}from"../../theme/hook.js";const ei=ei=>{var{className:oi,placeholder:si,message:ni,files:ti,disabled:ri=!1,sendDisabled:ci=!1,textAreaDisabled:di=!1,useAlternativeKeyDefaultValue:mi=!1,defaultKeySendText:ai,alternativeKeySendText:pi,concatenateText:li,uploadFileLimit:ji=5,hideUploadFile:xi=!1,uploadFileDisabled:ui=!1,uploadFileAccept:gi,autoFocus:hi=!0,voice:bi=!1,onSetAlternativeKeyValue:fi,onChange:yi,onFilesChange:vi,onVoiceFilesChange:wi,onTextAreaChange:ki,onSend:Di,onFocus:Ci,onBlur:$i,emitError:Ai,rightActions:Fi}=ei,Ei=i(ei,["className","placeholder","message","files","disabled","sendDisabled","textAreaDisabled","useAlternativeKeyDefaultValue","defaultKeySendText","alternativeKeySendText","concatenateText","uploadFileLimit","hideUploadFile","uploadFileDisabled","uploadFileAccept","autoFocus","voice","onSetAlternativeKeyValue","onChange","onFilesChange","onVoiceFilesChange","onTextAreaChange","onSend","onFocus","onBlur","emitError","rightActions"]);const Ti=ii(),Si=t(null),[Li,Ki]=r("calc(var(--bothub-scale, 1) * 22px)"),[Oi,Pi]="string"==typeof ni?[ni,yi]:r(""),[Ui,qi]=Array.isArray(ti)?[ti,vi]:r([]),[zi,Ii]=r([]),[Ri,Vi]=r(!1),[Bi,Ni]=r(!ri&&hi),[Mi,Gi]=r(!1),[Hi,Wi]=r(!1),[_i,Ji]=r(null),Qi=t(null),Xi=t(null),Yi=t([]),Zi=t(null),ie=t(!1),ee=t(null),[oe,se]=r(mi),[ne,te]=r(!1),re=c(()=>{se(!1),null==fi||fi(!1),te(!1)},[]),ce=c(()=>{se(!0),null==fi||fi(!0),te(!1)},[]),de=c(i=>{Ni(!0),null==Ci||Ci(i)},[Ci]);console.log(Ti.bright,Ti.default.colors.base.white);const me=c(i=>{Ni(!1),null==$i||$i(i)},[$i]),ae=c(i=>{null==Pi||Pi(i.target.value),null==ki||ki(i)},[Pi,ki]),pe=c(i=>e(void 0,void 0,void 0,function*(){if(!i.length)return;const e=[],o=[],s=yield Promise.all(null==i?void 0:i.map(M));for(const[n,t]of i.entries()){G(t.type,gi)?e.push({previewUrl:s[n],name:t.name,native:t}):o.push(t)}o.length>0&&(null==Ai||Ai({name:"WRONG_FILES",payload:o})),(null==e?void 0:e.length)>0&&(null==qi||qi([...Ui,...e].slice(0,ji)))}),[gi,Ai,ji,Ui]),le=c(i=>e(void 0,void 0,void 0,function*(){!ui&&i.clipboardData.files.length>0&&(i.preventDefault(),yield pe([...i.clipboardData.files]))}),[pe,ui]),je=c(i=>e(void 0,void 0,void 0,function*(){if(!qi||!i.target.files)return;const e=yield H([...Ui.map(({native:i})=>i),...i.target.files]);qi(e.slice(0,ji))}),[Ui,qi,ji]),xe=c(i=>{null==qi||qi(Ui.filter(({name:e})=>e!==i.name))},[qi,Ui]),ue=c(i=>{i.stopPropagation(),null==Di||Di(Oi,Ui),null==Pi||Pi(""),null==qi||qi([]),null==Ii||Ii([]),Ki("calc(var(--bothub-scale, 1) * 22px)")},[Oi,Ui,Di,Pi,qi,Ii]),ge=c(i=>{i.stopPropagation();if(_()&&"Enter"===i.key)return;const e=oe?"enter":"ctrl/shift+enter";let o="";if("Enter"===i.key&&(i.shiftKey||i.ctrlKey))o="ctrl/shift+enter";else{if("Enter"!==i.key)return;o="enter"}if(Bi&&"Enter"===i.key){if(o===e&&i.ctrlKey){i.preventDefault();const e=Si.current;if(!e)return;const o=e.value,t=e.selectionStart,r=o.slice(0,t),c=o.slice(t);null==Pi||Pi(`${r}\n${c}`),s=e,n=t+1,setTimeout(()=>{s.selectionStart=n,s.selectionEnd=n},1)}e!==o&&""!==o&&(i.preventDefault(),null==Di||Di(Oi,Ui),Ki("calc(var(--bothub-scale, 1) * 22px)"))}var s,n},[Bi,Oi,Ui,Di,Pi,qi]),he=c(()=>{var i;ri||null===(i=Si.current)||void 0===i||i.focus()},[ri,hi]),be=c(i=>{i.stopPropagation()},[]),fe=c(i=>e(void 0,void 0,void 0,function*(){if(Hi)return;ie.current=!0,i.stopPropagation();const e=yield navigator.mediaDevices.getUserMedia({audio:!0}),o=new MediaRecorder(e,{mimeType:Q()});ie.current&&(o.start(1e3),Qi.current=o,Xi.current=e,Zi.current=window.setInterval(()=>{Ji(i=>(null!=i?i:0)+.1)},100),Wi(!0),Ji(0),Vi(!1))}),[ie.current,Yi.current,Hi]),ye=c(()=>{const i=Qi.current,e=Xi.current,o=Zi.current;if(Hi&&i&&e&&o){i.stop();for(const i of e.getTracks())i.stop();window.clearInterval(o)}},[Hi,Qi.current,Xi.current,Zi.current]),ve=c(()=>e(void 0,void 0,void 0,function*(){ie.current=!1,Hi&&ye()}),[Hi,ye]),we=c(()=>{const i=Qi.current,e=Zi.current;Hi&&i&&e&&(i.pause(),window.clearInterval(e),Vi(!0))},[Hi]),ke=c(()=>{const i=Qi.current;Hi&&i&&(i.resume(),Zi.current=window.setInterval(()=>{Ji(i=>(null!=i?i:0)+.1)},100),Vi(!1))},[Hi,Ji]),De=c(i=>{Ii(zi.filter(e=>e.src!==i.src))},[zi,Ii]),Ce=c(()=>{const i=Si.current;null!==i&&(i.style.height="calc(var(--bothub-scale, 1) * 22px)",i.style.height=`${i.scrollHeight}px`,Ki(`${i.scrollHeight}px`))},[Oi,hi]);d(()=>{Ce()},[Ce]),d(()=>{const i=Si.current;if(!i||ri)return;const e=!ri&&hi;Ni(e),e?i.focus():document.activeElement===i&&i.blur()},[ri,hi]),d(()=>{const i=Si.current;if(null!==i)return i.addEventListener("keydown",ge),()=>{i.removeEventListener("keydown",ge)}},[ge]),d(()=>{qi&&ti&&qi(ti)},[ti]),d(()=>{null==wi||wi(zi)},[zi]),d(()=>{const i=Qi.current,o=i=>{i.data.size>0&&Yi.current.push(i.data)},s=()=>e(void 0,void 0,void 0,function*(){const i=new Blob(Yi.current,{type:Q()}),{waveData:e,duration:o}=yield Z(i),s={src:URL.createObjectURL(i),duration:o,blob:i,waveData:e};Ii([...zi,s]),Qi.current=null,Xi.current=null,Yi.current=[],Zi.current=null,Wi(!1),Ji(null)});return i&&(i.addEventListener("dataavailable",o),i.addEventListener("stop",s)),()=>{i&&(i.removeEventListener("dataavailable",o),i.removeEventListener("stop",s)),ye()}},[Qi.current]),a(ee,()=>{te(!1)});const $e=m(ne,{from:{opacity:0,y:10},enter:{opacity:1,y:0},leave:{opacity:0,y:10},config:{duration:150,ease:"easeOut"}});return o(p,{$active:Bi,$dragActive:Mi,$disabled:ri,$textAreaDisabled:di,$voiceRecording:Hi,className:oi,onClick:he,onDragEnter:()=>Gi(!0),onDragLeave:()=>Gi(!1),onDragOver:i=>(i.stopPropagation(),i.preventDefault(),!1),onDrop:i=>e(void 0,void 0,void 0,function*(){if(i.dataTransfer.files.length>0)return i.stopPropagation(),i.preventDefault(),yield pe([...i.dataTransfer.files]),Gi(!1),!1}),children:s(l,{children:[s(j,{children:[Hi&&null!==_i&&s(x,{children:[o(u,{}),o(g,{children:W(_i)})]}),Ui.length>0&&o(h,{children:Ui.map(i=>{let e;return e=i.previewUrl&&(i.name.match(/.png$/i)||i.name.match(/.jpg$/i)||i.name.match(/.jpeg$/i))?o(z,{src:i.previewUrl}):i.name.match(/.txt$/i)?o(R,{}):i.name.match(/.docx$/i)?o(V,{}):i.name.match(/.xlsx$/i)?o(B,{}):i.name.match(/.pdf$/i)?o(I,{}):o(J,{}),e=o(N,{size:18,children:e}),o(b,{start:e,onDelete:xe.bind(null,i),children:i.name.length>20?`...${i.name.slice(-20)}`:i.name},i.name)})}),zi.length>1&&o(f,{children:li}),zi.length>0&&o(y,{children:zi.map(i=>s(v,{children:[o(Y,{variant:"input",height:24,src:i.src,duration:i.duration,waveData:i.waveData,disableTranscription:!0}),o(w,{onClick:De.bind(null,i)})]},i.src))}),(!di||di&&si&&Ui.length!==ji||di&&Oi)&&o(k,Object.assign({$disabled:ri},Ei,{ref:Si,value:Oi,placeholder:si,disabled:ri||di,style:Object.assign(Object.assign({},Ei.style),{height:Li}),onFocus:de,onBlur:me,onChange:ae,onPaste:le}))]}),s(D,{children:[s(C,{children:[!xi&&!Hi&&s($,{onClick:be,children:[o(A,{type:"file",accept:gi,multiple:!0,disabled:Ui.length>=ji||ri||ui,onChange:je},Ui.length),o(F,{disabled:Ui.length>=ji||ri||ui})]}),Fi]}),s(C,{children:[!!ai&&!!pi&&s(E,{ref:ee,children:[o(T,{startIcon:o(X,{fill:Ti.bright?Ti.colors.custom.icon:Ti.colors.grayScale.gray3}),onClick:i=>{i.stopPropagation(),te(!ne)},disabled:ri}),$e((i,e)=>e&&s(S,{style:i,children:[o(L,{active:!oe,onClick:re,children:ai}),o(L,{active:oe,onClick:ce,children:pi})]},"alternative-key-modal"))]}),Hi&&o(n,{children:Ri?o(K,{onClick:ke}):o(O,{onClick:we})}),bi&&o(P,{$isRecording:Hi,disabled:ri||ci,onClick:Hi?ve:fe,"data-test":"submit-message"}),o(U,{disabled:ri||ci||Hi,onClick:ue,"data-test":"submit-message",children:o(q,Object.assign({},Ti.bright&&{fill:Ti.default.colors.base.white}))})]})]})]})})};export{ei as InputMessage};
|
|
@@ -4997,7 +4997,492 @@ export declare const InputMessageVoiceButton: import("styled-components").IStyle
|
|
|
4997
4997
|
$isRecording?: boolean | undefined;
|
|
4998
4998
|
disabled?: boolean | undefined;
|
|
4999
4999
|
}>;
|
|
5000
|
-
export declare const InputMessageSendIcon: import("
|
|
5000
|
+
export declare const InputMessageSendIcon: import("styled-components").IStyledComponent<"web", {
|
|
5001
|
+
size?: number | undefined;
|
|
5002
|
+
fill?: string | undefined;
|
|
5003
|
+
enableTooltip?: boolean | undefined;
|
|
5004
|
+
string?: number | string | undefined | undefined;
|
|
5005
|
+
mode?: number | string | undefined | undefined;
|
|
5006
|
+
filter?: string | undefined | undefined;
|
|
5007
|
+
values?: string | undefined | undefined;
|
|
5008
|
+
children?: import("react").ReactNode;
|
|
5009
|
+
end?: number | string | undefined | undefined;
|
|
5010
|
+
accumulate?: "none" | "sum" | undefined | undefined;
|
|
5011
|
+
local?: number | string | undefined | undefined;
|
|
5012
|
+
color?: string | undefined | undefined;
|
|
5013
|
+
clip?: number | string | undefined | undefined;
|
|
5014
|
+
style?: import("react").CSSProperties | undefined;
|
|
5015
|
+
unicode?: number | string | undefined | undefined;
|
|
5016
|
+
stroke?: string | undefined | undefined;
|
|
5017
|
+
x?: number | string | undefined | undefined;
|
|
5018
|
+
y?: number | string | undefined | undefined;
|
|
5019
|
+
alphabetic?: number | string | undefined | undefined;
|
|
5020
|
+
hanging?: number | string | undefined | undefined;
|
|
5021
|
+
ideographic?: number | string | undefined | undefined;
|
|
5022
|
+
mathematical?: number | string | undefined | undefined;
|
|
5023
|
+
key?: import("react").Key | null | undefined;
|
|
5024
|
+
suppressHydrationWarning?: boolean | undefined | undefined;
|
|
5025
|
+
className?: string | undefined | undefined;
|
|
5026
|
+
id?: string | undefined | undefined;
|
|
5027
|
+
lang?: string | undefined | undefined;
|
|
5028
|
+
tabIndex?: number | undefined | undefined;
|
|
5029
|
+
role?: import("react").AriaRole | undefined;
|
|
5030
|
+
"aria-activedescendant"?: string | undefined | undefined;
|
|
5031
|
+
"aria-atomic"?: (boolean | "false" | "true") | undefined;
|
|
5032
|
+
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined | undefined;
|
|
5033
|
+
"aria-braillelabel"?: string | undefined | undefined;
|
|
5034
|
+
"aria-brailleroledescription"?: string | undefined | undefined;
|
|
5035
|
+
"aria-busy"?: (boolean | "false" | "true") | undefined;
|
|
5036
|
+
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
|
|
5037
|
+
"aria-colcount"?: number | undefined | undefined;
|
|
5038
|
+
"aria-colindex"?: number | undefined | undefined;
|
|
5039
|
+
"aria-colindextext"?: string | undefined | undefined;
|
|
5040
|
+
"aria-colspan"?: number | undefined | undefined;
|
|
5041
|
+
"aria-controls"?: string | undefined | undefined;
|
|
5042
|
+
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined | undefined;
|
|
5043
|
+
"aria-describedby"?: string | undefined | undefined;
|
|
5044
|
+
"aria-description"?: string | undefined | undefined;
|
|
5045
|
+
"aria-details"?: string | undefined | undefined;
|
|
5046
|
+
"aria-disabled"?: (boolean | "false" | "true") | undefined;
|
|
5047
|
+
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined | undefined;
|
|
5048
|
+
"aria-errormessage"?: string | undefined | undefined;
|
|
5049
|
+
"aria-expanded"?: (boolean | "false" | "true") | undefined;
|
|
5050
|
+
"aria-flowto"?: string | undefined | undefined;
|
|
5051
|
+
"aria-grabbed"?: (boolean | "false" | "true") | undefined;
|
|
5052
|
+
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined | undefined;
|
|
5053
|
+
"aria-hidden"?: (boolean | "false" | "true") | undefined;
|
|
5054
|
+
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined | undefined;
|
|
5055
|
+
"aria-keyshortcuts"?: string | undefined | undefined;
|
|
5056
|
+
"aria-label"?: string | undefined | undefined;
|
|
5057
|
+
"aria-labelledby"?: string | undefined | undefined;
|
|
5058
|
+
"aria-level"?: number | undefined | undefined;
|
|
5059
|
+
"aria-live"?: "off" | "assertive" | "polite" | undefined | undefined;
|
|
5060
|
+
"aria-modal"?: (boolean | "false" | "true") | undefined;
|
|
5061
|
+
"aria-multiline"?: (boolean | "false" | "true") | undefined;
|
|
5062
|
+
"aria-multiselectable"?: (boolean | "false" | "true") | undefined;
|
|
5063
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined | undefined;
|
|
5064
|
+
"aria-owns"?: string | undefined | undefined;
|
|
5065
|
+
"aria-placeholder"?: string | undefined | undefined;
|
|
5066
|
+
"aria-posinset"?: number | undefined | undefined;
|
|
5067
|
+
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
|
|
5068
|
+
"aria-readonly"?: (boolean | "false" | "true") | undefined;
|
|
5069
|
+
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined | undefined;
|
|
5070
|
+
"aria-required"?: (boolean | "false" | "true") | undefined;
|
|
5071
|
+
"aria-roledescription"?: string | undefined | undefined;
|
|
5072
|
+
"aria-rowcount"?: number | undefined | undefined;
|
|
5073
|
+
"aria-rowindex"?: number | undefined | undefined;
|
|
5074
|
+
"aria-rowindextext"?: string | undefined | undefined;
|
|
5075
|
+
"aria-rowspan"?: number | undefined | undefined;
|
|
5076
|
+
"aria-selected"?: (boolean | "false" | "true") | undefined;
|
|
5077
|
+
"aria-setsize"?: number | undefined | undefined;
|
|
5078
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined | undefined;
|
|
5079
|
+
"aria-valuemax"?: number | undefined | undefined;
|
|
5080
|
+
"aria-valuemin"?: number | undefined | undefined;
|
|
5081
|
+
"aria-valuenow"?: number | undefined | undefined;
|
|
5082
|
+
"aria-valuetext"?: string | undefined | undefined;
|
|
5083
|
+
dangerouslySetInnerHTML?: {
|
|
5084
|
+
__html: string | TrustedHTML;
|
|
5085
|
+
} | undefined | undefined;
|
|
5086
|
+
onCopy?: import("react").ClipboardEventHandler<SVGSVGElement> | undefined;
|
|
5087
|
+
onCopyCapture?: import("react").ClipboardEventHandler<SVGSVGElement> | undefined;
|
|
5088
|
+
onCut?: import("react").ClipboardEventHandler<SVGSVGElement> | undefined;
|
|
5089
|
+
onCutCapture?: import("react").ClipboardEventHandler<SVGSVGElement> | undefined;
|
|
5090
|
+
onPaste?: import("react").ClipboardEventHandler<SVGSVGElement> | undefined;
|
|
5091
|
+
onPasteCapture?: import("react").ClipboardEventHandler<SVGSVGElement> | undefined;
|
|
5092
|
+
onCompositionEnd?: import("react").CompositionEventHandler<SVGSVGElement> | undefined;
|
|
5093
|
+
onCompositionEndCapture?: import("react").CompositionEventHandler<SVGSVGElement> | undefined;
|
|
5094
|
+
onCompositionStart?: import("react").CompositionEventHandler<SVGSVGElement> | undefined;
|
|
5095
|
+
onCompositionStartCapture?: import("react").CompositionEventHandler<SVGSVGElement> | undefined;
|
|
5096
|
+
onCompositionUpdate?: import("react").CompositionEventHandler<SVGSVGElement> | undefined;
|
|
5097
|
+
onCompositionUpdateCapture?: import("react").CompositionEventHandler<SVGSVGElement> | undefined;
|
|
5098
|
+
onFocus?: import("react").FocusEventHandler<SVGSVGElement> | undefined;
|
|
5099
|
+
onFocusCapture?: import("react").FocusEventHandler<SVGSVGElement> | undefined;
|
|
5100
|
+
onBlur?: import("react").FocusEventHandler<SVGSVGElement> | undefined;
|
|
5101
|
+
onBlurCapture?: import("react").FocusEventHandler<SVGSVGElement> | undefined;
|
|
5102
|
+
onChange?: import("react").FormEventHandler<SVGSVGElement> | undefined;
|
|
5103
|
+
onChangeCapture?: import("react").FormEventHandler<SVGSVGElement> | undefined;
|
|
5104
|
+
onBeforeInput?: import("react").InputEventHandler<SVGSVGElement> | undefined;
|
|
5105
|
+
onBeforeInputCapture?: import("react").FormEventHandler<SVGSVGElement> | undefined;
|
|
5106
|
+
onInput?: import("react").FormEventHandler<SVGSVGElement> | undefined;
|
|
5107
|
+
onInputCapture?: import("react").FormEventHandler<SVGSVGElement> | undefined;
|
|
5108
|
+
onReset?: import("react").FormEventHandler<SVGSVGElement> | undefined;
|
|
5109
|
+
onResetCapture?: import("react").FormEventHandler<SVGSVGElement> | undefined;
|
|
5110
|
+
onSubmit?: import("react").FormEventHandler<SVGSVGElement> | undefined;
|
|
5111
|
+
onSubmitCapture?: import("react").FormEventHandler<SVGSVGElement> | undefined;
|
|
5112
|
+
onInvalid?: import("react").FormEventHandler<SVGSVGElement> | undefined;
|
|
5113
|
+
onInvalidCapture?: import("react").FormEventHandler<SVGSVGElement> | undefined;
|
|
5114
|
+
onLoad?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5115
|
+
onLoadCapture?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5116
|
+
onError?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5117
|
+
onErrorCapture?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5118
|
+
onKeyDown?: import("react").KeyboardEventHandler<SVGSVGElement> | undefined;
|
|
5119
|
+
onKeyDownCapture?: import("react").KeyboardEventHandler<SVGSVGElement> | undefined;
|
|
5120
|
+
onKeyPress?: import("react").KeyboardEventHandler<SVGSVGElement> | undefined;
|
|
5121
|
+
onKeyPressCapture?: import("react").KeyboardEventHandler<SVGSVGElement> | undefined;
|
|
5122
|
+
onKeyUp?: import("react").KeyboardEventHandler<SVGSVGElement> | undefined;
|
|
5123
|
+
onKeyUpCapture?: import("react").KeyboardEventHandler<SVGSVGElement> | undefined;
|
|
5124
|
+
onAbort?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5125
|
+
onAbortCapture?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5126
|
+
onCanPlay?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5127
|
+
onCanPlayCapture?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5128
|
+
onCanPlayThrough?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5129
|
+
onCanPlayThroughCapture?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5130
|
+
onDurationChange?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5131
|
+
onDurationChangeCapture?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5132
|
+
onEmptied?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5133
|
+
onEmptiedCapture?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5134
|
+
onEncrypted?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5135
|
+
onEncryptedCapture?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5136
|
+
onEnded?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5137
|
+
onEndedCapture?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5138
|
+
onLoadedData?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5139
|
+
onLoadedDataCapture?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5140
|
+
onLoadedMetadata?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5141
|
+
onLoadedMetadataCapture?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5142
|
+
onLoadStart?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5143
|
+
onLoadStartCapture?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5144
|
+
onPause?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5145
|
+
onPauseCapture?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5146
|
+
onPlay?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5147
|
+
onPlayCapture?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5148
|
+
onPlaying?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5149
|
+
onPlayingCapture?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5150
|
+
onProgress?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5151
|
+
onProgressCapture?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5152
|
+
onRateChange?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5153
|
+
onRateChangeCapture?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5154
|
+
onSeeked?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5155
|
+
onSeekedCapture?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5156
|
+
onSeeking?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5157
|
+
onSeekingCapture?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5158
|
+
onStalled?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5159
|
+
onStalledCapture?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5160
|
+
onSuspend?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5161
|
+
onSuspendCapture?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5162
|
+
onTimeUpdate?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5163
|
+
onTimeUpdateCapture?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5164
|
+
onVolumeChange?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5165
|
+
onVolumeChangeCapture?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5166
|
+
onWaiting?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5167
|
+
onWaitingCapture?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5168
|
+
onAuxClick?: import("react").MouseEventHandler<SVGSVGElement> | undefined;
|
|
5169
|
+
onAuxClickCapture?: import("react").MouseEventHandler<SVGSVGElement> | undefined;
|
|
5170
|
+
onClick?: import("react").MouseEventHandler<SVGSVGElement> | undefined;
|
|
5171
|
+
onClickCapture?: import("react").MouseEventHandler<SVGSVGElement> | undefined;
|
|
5172
|
+
onContextMenu?: import("react").MouseEventHandler<SVGSVGElement> | undefined;
|
|
5173
|
+
onContextMenuCapture?: import("react").MouseEventHandler<SVGSVGElement> | undefined;
|
|
5174
|
+
onDoubleClick?: import("react").MouseEventHandler<SVGSVGElement> | undefined;
|
|
5175
|
+
onDoubleClickCapture?: import("react").MouseEventHandler<SVGSVGElement> | undefined;
|
|
5176
|
+
onDragCapture?: import("react").DragEventHandler<SVGSVGElement> | undefined;
|
|
5177
|
+
onDragEndCapture?: import("react").DragEventHandler<SVGSVGElement> | undefined;
|
|
5178
|
+
onDragEnter?: import("react").DragEventHandler<SVGSVGElement> | undefined;
|
|
5179
|
+
onDragEnterCapture?: import("react").DragEventHandler<SVGSVGElement> | undefined;
|
|
5180
|
+
onDragExit?: import("react").DragEventHandler<SVGSVGElement> | undefined;
|
|
5181
|
+
onDragExitCapture?: import("react").DragEventHandler<SVGSVGElement> | undefined;
|
|
5182
|
+
onDragLeave?: import("react").DragEventHandler<SVGSVGElement> | undefined;
|
|
5183
|
+
onDragLeaveCapture?: import("react").DragEventHandler<SVGSVGElement> | undefined;
|
|
5184
|
+
onDragOver?: import("react").DragEventHandler<SVGSVGElement> | undefined;
|
|
5185
|
+
onDragOverCapture?: import("react").DragEventHandler<SVGSVGElement> | undefined;
|
|
5186
|
+
onDragStartCapture?: import("react").DragEventHandler<SVGSVGElement> | undefined;
|
|
5187
|
+
onDrop?: import("react").DragEventHandler<SVGSVGElement> | undefined;
|
|
5188
|
+
onDropCapture?: import("react").DragEventHandler<SVGSVGElement> | undefined;
|
|
5189
|
+
onMouseDown?: import("react").MouseEventHandler<SVGSVGElement> | undefined;
|
|
5190
|
+
onMouseDownCapture?: import("react").MouseEventHandler<SVGSVGElement> | undefined;
|
|
5191
|
+
onMouseEnter?: import("react").MouseEventHandler<SVGSVGElement> | undefined;
|
|
5192
|
+
onMouseLeave?: import("react").MouseEventHandler<SVGSVGElement> | undefined;
|
|
5193
|
+
onMouseMove?: import("react").MouseEventHandler<SVGSVGElement> | undefined;
|
|
5194
|
+
onMouseMoveCapture?: import("react").MouseEventHandler<SVGSVGElement> | undefined;
|
|
5195
|
+
onMouseOut?: import("react").MouseEventHandler<SVGSVGElement> | undefined;
|
|
5196
|
+
onMouseOutCapture?: import("react").MouseEventHandler<SVGSVGElement> | undefined;
|
|
5197
|
+
onMouseOver?: import("react").MouseEventHandler<SVGSVGElement> | undefined;
|
|
5198
|
+
onMouseOverCapture?: import("react").MouseEventHandler<SVGSVGElement> | undefined;
|
|
5199
|
+
onMouseUp?: import("react").MouseEventHandler<SVGSVGElement> | undefined;
|
|
5200
|
+
onMouseUpCapture?: import("react").MouseEventHandler<SVGSVGElement> | undefined;
|
|
5201
|
+
onSelect?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5202
|
+
onSelectCapture?: import("react").ReactEventHandler<SVGSVGElement> | undefined;
|
|
5203
|
+
onTouchCancel?: import("react").TouchEventHandler<SVGSVGElement> | undefined;
|
|
5204
|
+
onTouchCancelCapture?: import("react").TouchEventHandler<SVGSVGElement> | undefined;
|
|
5205
|
+
onTouchEnd?: import("react").TouchEventHandler<SVGSVGElement> | undefined;
|
|
5206
|
+
onTouchEndCapture?: import("react").TouchEventHandler<SVGSVGElement> | undefined;
|
|
5207
|
+
onTouchMove?: import("react").TouchEventHandler<SVGSVGElement> | undefined;
|
|
5208
|
+
onTouchMoveCapture?: import("react").TouchEventHandler<SVGSVGElement> | undefined;
|
|
5209
|
+
onTouchStart?: import("react").TouchEventHandler<SVGSVGElement> | undefined;
|
|
5210
|
+
onTouchStartCapture?: import("react").TouchEventHandler<SVGSVGElement> | undefined;
|
|
5211
|
+
onPointerDown?: import("react").PointerEventHandler<SVGSVGElement> | undefined;
|
|
5212
|
+
onPointerDownCapture?: import("react").PointerEventHandler<SVGSVGElement> | undefined;
|
|
5213
|
+
onPointerMove?: import("react").PointerEventHandler<SVGSVGElement> | undefined;
|
|
5214
|
+
onPointerMoveCapture?: import("react").PointerEventHandler<SVGSVGElement> | undefined;
|
|
5215
|
+
onPointerUp?: import("react").PointerEventHandler<SVGSVGElement> | undefined;
|
|
5216
|
+
onPointerUpCapture?: import("react").PointerEventHandler<SVGSVGElement> | undefined;
|
|
5217
|
+
onPointerCancel?: import("react").PointerEventHandler<SVGSVGElement> | undefined;
|
|
5218
|
+
onPointerCancelCapture?: import("react").PointerEventHandler<SVGSVGElement> | undefined;
|
|
5219
|
+
onPointerEnter?: import("react").PointerEventHandler<SVGSVGElement> | undefined;
|
|
5220
|
+
onPointerLeave?: import("react").PointerEventHandler<SVGSVGElement> | undefined;
|
|
5221
|
+
onPointerOver?: import("react").PointerEventHandler<SVGSVGElement> | undefined;
|
|
5222
|
+
onPointerOverCapture?: import("react").PointerEventHandler<SVGSVGElement> | undefined;
|
|
5223
|
+
onPointerOut?: import("react").PointerEventHandler<SVGSVGElement> | undefined;
|
|
5224
|
+
onPointerOutCapture?: import("react").PointerEventHandler<SVGSVGElement> | undefined;
|
|
5225
|
+
onGotPointerCapture?: import("react").PointerEventHandler<SVGSVGElement> | undefined;
|
|
5226
|
+
onGotPointerCaptureCapture?: import("react").PointerEventHandler<SVGSVGElement> | undefined;
|
|
5227
|
+
onLostPointerCapture?: import("react").PointerEventHandler<SVGSVGElement> | undefined;
|
|
5228
|
+
onLostPointerCaptureCapture?: import("react").PointerEventHandler<SVGSVGElement> | undefined;
|
|
5229
|
+
onScroll?: import("react").UIEventHandler<SVGSVGElement> | undefined;
|
|
5230
|
+
onScrollCapture?: import("react").UIEventHandler<SVGSVGElement> | undefined;
|
|
5231
|
+
onScrollEnd?: import("react").UIEventHandler<SVGSVGElement> | undefined;
|
|
5232
|
+
onScrollEndCapture?: import("react").UIEventHandler<SVGSVGElement> | undefined;
|
|
5233
|
+
onWheel?: import("react").WheelEventHandler<SVGSVGElement> | undefined;
|
|
5234
|
+
onWheelCapture?: import("react").WheelEventHandler<SVGSVGElement> | undefined;
|
|
5235
|
+
onAnimationStartCapture?: import("react").AnimationEventHandler<SVGSVGElement> | undefined;
|
|
5236
|
+
onAnimationEnd?: import("react").AnimationEventHandler<SVGSVGElement> | undefined;
|
|
5237
|
+
onAnimationEndCapture?: import("react").AnimationEventHandler<SVGSVGElement> | undefined;
|
|
5238
|
+
onAnimationIteration?: import("react").AnimationEventHandler<SVGSVGElement> | undefined;
|
|
5239
|
+
onAnimationIterationCapture?: import("react").AnimationEventHandler<SVGSVGElement> | undefined;
|
|
5240
|
+
onToggle?: import("react").ToggleEventHandler<SVGSVGElement> | undefined;
|
|
5241
|
+
onBeforeToggle?: import("react").ToggleEventHandler<SVGSVGElement> | undefined;
|
|
5242
|
+
onTransitionCancel?: import("react").TransitionEventHandler<SVGSVGElement> | undefined;
|
|
5243
|
+
onTransitionCancelCapture?: import("react").TransitionEventHandler<SVGSVGElement> | undefined;
|
|
5244
|
+
onTransitionEnd?: import("react").TransitionEventHandler<SVGSVGElement> | undefined;
|
|
5245
|
+
onTransitionEndCapture?: import("react").TransitionEventHandler<SVGSVGElement> | undefined;
|
|
5246
|
+
onTransitionRun?: import("react").TransitionEventHandler<SVGSVGElement> | undefined;
|
|
5247
|
+
onTransitionRunCapture?: import("react").TransitionEventHandler<SVGSVGElement> | undefined;
|
|
5248
|
+
onTransitionStart?: import("react").TransitionEventHandler<SVGSVGElement> | undefined;
|
|
5249
|
+
onTransitionStartCapture?: import("react").TransitionEventHandler<SVGSVGElement> | undefined;
|
|
5250
|
+
clipPath?: string | undefined | undefined;
|
|
5251
|
+
mask?: string | undefined | undefined;
|
|
5252
|
+
path?: string | undefined | undefined;
|
|
5253
|
+
transform?: string | undefined | undefined;
|
|
5254
|
+
z?: number | string | undefined | undefined;
|
|
5255
|
+
rotate?: number | string | undefined | undefined;
|
|
5256
|
+
scale?: number | string | undefined | undefined;
|
|
5257
|
+
cursor?: number | string | undefined | undefined;
|
|
5258
|
+
direction?: number | string | undefined | undefined;
|
|
5259
|
+
display?: number | string | undefined | undefined;
|
|
5260
|
+
fontFamily?: string | undefined | undefined;
|
|
5261
|
+
fontSize?: number | string | undefined | undefined;
|
|
5262
|
+
fontSizeAdjust?: number | string | undefined | undefined;
|
|
5263
|
+
fontStretch?: number | string | undefined | undefined;
|
|
5264
|
+
fontStyle?: number | string | undefined | undefined;
|
|
5265
|
+
fontVariant?: number | string | undefined | undefined;
|
|
5266
|
+
fontWeight?: number | string | undefined | undefined;
|
|
5267
|
+
height?: number | string | undefined | undefined;
|
|
5268
|
+
imageRendering?: number | string | undefined | undefined;
|
|
5269
|
+
letterSpacing?: number | string | undefined | undefined;
|
|
5270
|
+
opacity?: number | string | undefined | undefined;
|
|
5271
|
+
order?: number | string | undefined | undefined;
|
|
5272
|
+
paintOrder?: number | string | undefined | undefined;
|
|
5273
|
+
pointerEvents?: number | string | undefined | undefined;
|
|
5274
|
+
textRendering?: number | string | undefined | undefined;
|
|
5275
|
+
unicodeBidi?: number | string | undefined | undefined;
|
|
5276
|
+
visibility?: number | string | undefined | undefined;
|
|
5277
|
+
width?: number | string | undefined | undefined;
|
|
5278
|
+
wordSpacing?: number | string | undefined | undefined;
|
|
5279
|
+
writingMode?: number | string | undefined | undefined;
|
|
5280
|
+
offset?: number | string | undefined | undefined;
|
|
5281
|
+
overflow?: number | string | undefined | undefined;
|
|
5282
|
+
textDecoration?: number | string | undefined | undefined;
|
|
5283
|
+
azimuth?: number | string | undefined | undefined;
|
|
5284
|
+
alignmentBaseline?: "auto" | "baseline" | "before-edge" | "text-before-edge" | "middle" | "central" | "after-edge" | "text-after-edge" | "ideographic" | "alphabetic" | "hanging" | "mathematical" | "inherit" | undefined | undefined;
|
|
5285
|
+
baselineShift?: number | string | undefined | undefined;
|
|
5286
|
+
clipRule?: number | string | undefined | undefined;
|
|
5287
|
+
colorInterpolation?: number | string | undefined | undefined;
|
|
5288
|
+
colorRendering?: number | string | undefined | undefined;
|
|
5289
|
+
dominantBaseline?: number | string | undefined | undefined;
|
|
5290
|
+
fillOpacity?: number | string | undefined | undefined;
|
|
5291
|
+
fillRule?: "nonzero" | "evenodd" | "inherit" | undefined | undefined;
|
|
5292
|
+
floodColor?: number | string | undefined | undefined;
|
|
5293
|
+
floodOpacity?: number | string | undefined | undefined;
|
|
5294
|
+
glyphOrientationVertical?: number | string | undefined | undefined;
|
|
5295
|
+
lightingColor?: number | string | undefined | undefined;
|
|
5296
|
+
markerEnd?: string | undefined | undefined;
|
|
5297
|
+
markerMid?: string | undefined | undefined;
|
|
5298
|
+
markerStart?: string | undefined | undefined;
|
|
5299
|
+
shapeRendering?: number | string | undefined | undefined;
|
|
5300
|
+
stopColor?: string | undefined | undefined;
|
|
5301
|
+
stopOpacity?: number | string | undefined | undefined;
|
|
5302
|
+
strokeDasharray?: string | number | undefined | undefined;
|
|
5303
|
+
strokeDashoffset?: string | number | undefined | undefined;
|
|
5304
|
+
strokeLinecap?: "butt" | "round" | "square" | "inherit" | undefined | undefined;
|
|
5305
|
+
strokeLinejoin?: "miter" | "round" | "bevel" | "inherit" | undefined | undefined;
|
|
5306
|
+
strokeMiterlimit?: number | string | undefined | undefined;
|
|
5307
|
+
strokeOpacity?: number | string | undefined | undefined;
|
|
5308
|
+
strokeWidth?: number | string | undefined | undefined;
|
|
5309
|
+
textAnchor?: string | undefined | undefined;
|
|
5310
|
+
vectorEffect?: number | string | undefined | undefined;
|
|
5311
|
+
viewBox?: string | undefined | undefined;
|
|
5312
|
+
from?: number | string | undefined | undefined;
|
|
5313
|
+
to?: number | string | undefined | undefined;
|
|
5314
|
+
target?: string | undefined | undefined;
|
|
5315
|
+
type?: string | undefined | undefined;
|
|
5316
|
+
r?: number | string | undefined | undefined;
|
|
5317
|
+
name?: string | undefined | undefined;
|
|
5318
|
+
max?: number | string | undefined | undefined;
|
|
5319
|
+
media?: string | undefined | undefined;
|
|
5320
|
+
method?: string | undefined | undefined;
|
|
5321
|
+
min?: number | string | undefined | undefined;
|
|
5322
|
+
crossOrigin?: "" | "anonymous" | "use-credentials" | undefined;
|
|
5323
|
+
accentHeight?: number | string | undefined | undefined;
|
|
5324
|
+
additive?: "replace" | "sum" | undefined | undefined;
|
|
5325
|
+
allowReorder?: "no" | "yes" | undefined | undefined;
|
|
5326
|
+
amplitude?: number | string | undefined | undefined;
|
|
5327
|
+
arabicForm?: "initial" | "medial" | "terminal" | "isolated" | undefined | undefined;
|
|
5328
|
+
ascent?: number | string | undefined | undefined;
|
|
5329
|
+
attributeName?: string | undefined | undefined;
|
|
5330
|
+
attributeType?: string | undefined | undefined;
|
|
5331
|
+
autoReverse?: (boolean | "false" | "true") | undefined;
|
|
5332
|
+
baseFrequency?: number | string | undefined | undefined;
|
|
5333
|
+
baseProfile?: number | string | undefined | undefined;
|
|
5334
|
+
bbox?: number | string | undefined | undefined;
|
|
5335
|
+
begin?: number | string | undefined | undefined;
|
|
5336
|
+
bias?: number | string | undefined | undefined;
|
|
5337
|
+
by?: number | string | undefined | undefined;
|
|
5338
|
+
calcMode?: number | string | undefined | undefined;
|
|
5339
|
+
capHeight?: number | string | undefined | undefined;
|
|
5340
|
+
clipPathUnits?: number | string | undefined | undefined;
|
|
5341
|
+
colorInterpolationFilters?: "auto" | "sRGB" | "linearRGB" | "inherit" | undefined | undefined;
|
|
5342
|
+
colorProfile?: number | string | undefined | undefined;
|
|
5343
|
+
contentScriptType?: number | string | undefined | undefined;
|
|
5344
|
+
contentStyleType?: number | string | undefined | undefined;
|
|
5345
|
+
cx?: number | string | undefined | undefined;
|
|
5346
|
+
cy?: number | string | undefined | undefined;
|
|
5347
|
+
d?: string | undefined | undefined;
|
|
5348
|
+
decelerate?: number | string | undefined | undefined;
|
|
5349
|
+
descent?: number | string | undefined | undefined;
|
|
5350
|
+
diffuseConstant?: number | string | undefined | undefined;
|
|
5351
|
+
divisor?: number | string | undefined | undefined;
|
|
5352
|
+
dur?: number | string | undefined | undefined;
|
|
5353
|
+
dx?: number | string | undefined | undefined;
|
|
5354
|
+
dy?: number | string | undefined | undefined;
|
|
5355
|
+
edgeMode?: number | string | undefined | undefined;
|
|
5356
|
+
elevation?: number | string | undefined | undefined;
|
|
5357
|
+
enableBackground?: number | string | undefined | undefined;
|
|
5358
|
+
exponent?: number | string | undefined | undefined;
|
|
5359
|
+
externalResourcesRequired?: (boolean | "false" | "true") | undefined;
|
|
5360
|
+
filterRes?: number | string | undefined | undefined;
|
|
5361
|
+
filterUnits?: number | string | undefined | undefined;
|
|
5362
|
+
focusable?: "auto" | (boolean | "false" | "true") | undefined;
|
|
5363
|
+
format?: number | string | undefined | undefined;
|
|
5364
|
+
fr?: number | string | undefined | undefined;
|
|
5365
|
+
fx?: number | string | undefined | undefined;
|
|
5366
|
+
fy?: number | string | undefined | undefined;
|
|
5367
|
+
g1?: number | string | undefined | undefined;
|
|
5368
|
+
g2?: number | string | undefined | undefined;
|
|
5369
|
+
glyphName?: number | string | undefined | undefined;
|
|
5370
|
+
glyphOrientationHorizontal?: number | string | undefined | undefined;
|
|
5371
|
+
glyphRef?: number | string | undefined | undefined;
|
|
5372
|
+
gradientTransform?: string | undefined | undefined;
|
|
5373
|
+
gradientUnits?: string | undefined | undefined;
|
|
5374
|
+
horizAdvX?: number | string | undefined | undefined;
|
|
5375
|
+
horizOriginX?: number | string | undefined | undefined;
|
|
5376
|
+
href?: string | undefined | undefined;
|
|
5377
|
+
in2?: number | string | undefined | undefined;
|
|
5378
|
+
in?: string | undefined | undefined;
|
|
5379
|
+
intercept?: number | string | undefined | undefined;
|
|
5380
|
+
k1?: number | string | undefined | undefined;
|
|
5381
|
+
k2?: number | string | undefined | undefined;
|
|
5382
|
+
k3?: number | string | undefined | undefined;
|
|
5383
|
+
k4?: number | string | undefined | undefined;
|
|
5384
|
+
k?: number | string | undefined | undefined;
|
|
5385
|
+
kernelMatrix?: number | string | undefined | undefined;
|
|
5386
|
+
kernelUnitLength?: number | string | undefined | undefined;
|
|
5387
|
+
kerning?: number | string | undefined | undefined;
|
|
5388
|
+
keyPoints?: number | string | undefined | undefined;
|
|
5389
|
+
keySplines?: number | string | undefined | undefined;
|
|
5390
|
+
keyTimes?: number | string | undefined | undefined;
|
|
5391
|
+
lengthAdjust?: number | string | undefined | undefined;
|
|
5392
|
+
limitingConeAngle?: number | string | undefined | undefined;
|
|
5393
|
+
markerHeight?: number | string | undefined | undefined;
|
|
5394
|
+
markerUnits?: number | string | undefined | undefined;
|
|
5395
|
+
markerWidth?: number | string | undefined | undefined;
|
|
5396
|
+
maskContentUnits?: number | string | undefined | undefined;
|
|
5397
|
+
maskUnits?: number | string | undefined | undefined;
|
|
5398
|
+
numOctaves?: number | string | undefined | undefined;
|
|
5399
|
+
operator?: number | string | undefined | undefined;
|
|
5400
|
+
orient?: number | string | undefined | undefined;
|
|
5401
|
+
orientation?: number | string | undefined | undefined;
|
|
5402
|
+
origin?: number | string | undefined | undefined;
|
|
5403
|
+
overlinePosition?: number | string | undefined | undefined;
|
|
5404
|
+
overlineThickness?: number | string | undefined | undefined;
|
|
5405
|
+
panose1?: number | string | undefined | undefined;
|
|
5406
|
+
pathLength?: number | string | undefined | undefined;
|
|
5407
|
+
patternContentUnits?: string | undefined | undefined;
|
|
5408
|
+
patternTransform?: number | string | undefined | undefined;
|
|
5409
|
+
patternUnits?: string | undefined | undefined;
|
|
5410
|
+
points?: string | undefined | undefined;
|
|
5411
|
+
pointsAtX?: number | string | undefined | undefined;
|
|
5412
|
+
pointsAtY?: number | string | undefined | undefined;
|
|
5413
|
+
pointsAtZ?: number | string | undefined | undefined;
|
|
5414
|
+
preserveAlpha?: (boolean | "false" | "true") | undefined;
|
|
5415
|
+
preserveAspectRatio?: string | undefined | undefined;
|
|
5416
|
+
primitiveUnits?: number | string | undefined | undefined;
|
|
5417
|
+
radius?: number | string | undefined | undefined;
|
|
5418
|
+
refX?: number | string | undefined | undefined;
|
|
5419
|
+
refY?: number | string | undefined | undefined;
|
|
5420
|
+
renderingIntent?: number | string | undefined | undefined;
|
|
5421
|
+
repeatCount?: number | string | undefined | undefined;
|
|
5422
|
+
repeatDur?: number | string | undefined | undefined;
|
|
5423
|
+
requiredExtensions?: number | string | undefined | undefined;
|
|
5424
|
+
requiredFeatures?: number | string | undefined | undefined;
|
|
5425
|
+
restart?: number | string | undefined | undefined;
|
|
5426
|
+
result?: string | undefined | undefined;
|
|
5427
|
+
rx?: number | string | undefined | undefined;
|
|
5428
|
+
ry?: number | string | undefined | undefined;
|
|
5429
|
+
seed?: number | string | undefined | undefined;
|
|
5430
|
+
slope?: number | string | undefined | undefined;
|
|
5431
|
+
spacing?: number | string | undefined | undefined;
|
|
5432
|
+
specularConstant?: number | string | undefined | undefined;
|
|
5433
|
+
specularExponent?: number | string | undefined | undefined;
|
|
5434
|
+
speed?: number | string | undefined | undefined;
|
|
5435
|
+
spreadMethod?: string | undefined | undefined;
|
|
5436
|
+
startOffset?: number | string | undefined | undefined;
|
|
5437
|
+
stdDeviation?: number | string | undefined | undefined;
|
|
5438
|
+
stemh?: number | string | undefined | undefined;
|
|
5439
|
+
stemv?: number | string | undefined | undefined;
|
|
5440
|
+
stitchTiles?: number | string | undefined | undefined;
|
|
5441
|
+
strikethroughPosition?: number | string | undefined | undefined;
|
|
5442
|
+
strikethroughThickness?: number | string | undefined | undefined;
|
|
5443
|
+
surfaceScale?: number | string | undefined | undefined;
|
|
5444
|
+
systemLanguage?: number | string | undefined | undefined;
|
|
5445
|
+
tableValues?: number | string | undefined | undefined;
|
|
5446
|
+
targetX?: number | string | undefined | undefined;
|
|
5447
|
+
targetY?: number | string | undefined | undefined;
|
|
5448
|
+
textLength?: number | string | undefined | undefined;
|
|
5449
|
+
u1?: number | string | undefined | undefined;
|
|
5450
|
+
u2?: number | string | undefined | undefined;
|
|
5451
|
+
underlinePosition?: number | string | undefined | undefined;
|
|
5452
|
+
underlineThickness?: number | string | undefined | undefined;
|
|
5453
|
+
unicodeRange?: number | string | undefined | undefined;
|
|
5454
|
+
unitsPerEm?: number | string | undefined | undefined;
|
|
5455
|
+
vAlphabetic?: number | string | undefined | undefined;
|
|
5456
|
+
version?: string | undefined | undefined;
|
|
5457
|
+
vertAdvY?: number | string | undefined | undefined;
|
|
5458
|
+
vertOriginX?: number | string | undefined | undefined;
|
|
5459
|
+
vertOriginY?: number | string | undefined | undefined;
|
|
5460
|
+
vHanging?: number | string | undefined | undefined;
|
|
5461
|
+
vIdeographic?: number | string | undefined | undefined;
|
|
5462
|
+
viewTarget?: number | string | undefined | undefined;
|
|
5463
|
+
vMathematical?: number | string | undefined | undefined;
|
|
5464
|
+
widths?: number | string | undefined | undefined;
|
|
5465
|
+
x1?: number | string | undefined | undefined;
|
|
5466
|
+
x2?: number | string | undefined | undefined;
|
|
5467
|
+
xChannelSelector?: string | undefined | undefined;
|
|
5468
|
+
xHeight?: number | string | undefined | undefined;
|
|
5469
|
+
xlinkActuate?: string | undefined | undefined;
|
|
5470
|
+
xlinkArcrole?: string | undefined | undefined;
|
|
5471
|
+
xlinkHref?: string | undefined | undefined;
|
|
5472
|
+
xlinkRole?: string | undefined | undefined;
|
|
5473
|
+
xlinkShow?: string | undefined | undefined;
|
|
5474
|
+
xlinkTitle?: string | undefined | undefined;
|
|
5475
|
+
xlinkType?: string | undefined | undefined;
|
|
5476
|
+
xmlBase?: string | undefined | undefined;
|
|
5477
|
+
xmlLang?: string | undefined | undefined;
|
|
5478
|
+
xmlns?: string | undefined | undefined;
|
|
5479
|
+
xmlnsXlink?: string | undefined | undefined;
|
|
5480
|
+
xmlSpace?: string | undefined | undefined;
|
|
5481
|
+
y1?: number | string | undefined | undefined;
|
|
5482
|
+
y2?: number | string | undefined | undefined;
|
|
5483
|
+
yChannelSelector?: string | undefined | undefined;
|
|
5484
|
+
zoomAndPan?: string | undefined | undefined;
|
|
5485
|
+
}>;
|
|
5001
5486
|
export declare const InputMessageVoiceRecord: import("styled-components").IStyledComponent<"web", {
|
|
5002
5487
|
ref?: import("react").Ref<HTMLDivElement> | undefined;
|
|
5003
5488
|
key?: import("react").Key | null | undefined;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as o}from"react/jsx-runtime";import{styled as i,css as a,keyframes as n}from"styled-components";import{animated as s}from"@react-spring/web";import{Button as
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as o}from"react/jsx-runtime";import{styled as i,css as a,keyframes as n}from"styled-components";import{animated as s}from"@react-spring/web";import{Button as l}from"../button/index.js";import{AttachIcon as r}from"../../icons/attach/index.js";import{SendIcon as d}from"../../icons/send/index.js";import{CloseIcon as c}from"../../icons/close/index.js";import{Chip as p}from"../chip/index.js";import{VoiceIcon as m}from"../../icons/voice/index.js";import{PauseIcon as g}from"../../icons/pause/index.js";import{PlayIcon as u}from"../../icons/play/index.js";import{ExclamationIcon as y}from"../../icons/exclamation/index.js";import{Typography as h}from"../typography/index.js";import{adaptive as f}from"../../adaptive/index.js";const x=i.div.withConfig({displayName:"styled__InputMessageStyled",componentId:"sc-4jukeb-0"})(["display:flex;position:relative;border-radius:10px;border:1px solid ",";background:",";width:100%;padding:14px 20px;max-width:",";box-sizing:border-box;overflow:visible;cursor:",";outline:none;"," ",""],({theme:e,$active:t,$disabled:o})=>o?e.colors.grayScale.gray2:t?e.colors.accent.primary:e.colors.grayScale.gray2,({theme:e,$disabled:t})=>t?e.colors.grayScale.gray3:"light"===e.mode?e.default.colors.base.white:e.colors.grayScale.gray4,({theme:e})=>e.dashboard.chat.containerWidth,({$disabled:e,$textAreaDisabled:t,$voiceRecording:o})=>e?"not-allowed":t||o?"default":"text",({$disabled:e})=>!e&&a`
|
|
2
2
|
&:hover {
|
|
3
3
|
border-color: ${({theme:e})=>e.colors.accent.primary};
|
|
4
4
|
}
|
|
5
|
-
`,({$dragActive:e})=>e&&"\n opacity: 0.85;\n "),b=i.div.withConfig({displayName:"styled__InputMessageContent",componentId:"sc-4jukeb-1"})(["display:flex;flex-direction:column;justify-content:center;gap:14px;width:100%;"]),w=i.div.withConfig({displayName:"styled__InputMessageBottomGroup",componentId:"sc-4jukeb-2"})(["display:flex;gap:10px;align-items:center;"]),I=i(w).withConfig({displayName:"styled__InputMessageBottom",componentId:"sc-4jukeb-3"})(["justify-content:space-between;"]),_=i.div.withConfig({displayName:"styled__InputMessageUploadFile",componentId:"sc-4jukeb-4"})(["display:inline-flex;"]),k=i.input.attrs({id:"inputMessageUploadFileInput"}).withConfig({displayName:"styled__InputMessageUploadFileInput",componentId:"sc-4jukeb-5"})(["display:none;"]),j=i(
|
|
5
|
+
`,({$dragActive:e})=>e&&"\n opacity: 0.85;\n "),b=i.div.withConfig({displayName:"styled__InputMessageContent",componentId:"sc-4jukeb-1"})(["display:flex;flex-direction:column;justify-content:center;gap:14px;width:100%;"]),w=i.div.withConfig({displayName:"styled__InputMessageBottomGroup",componentId:"sc-4jukeb-2"})(["display:flex;gap:10px;align-items:center;"]),I=i(w).withConfig({displayName:"styled__InputMessageBottom",componentId:"sc-4jukeb-3"})(["justify-content:space-between;"]),_=i.div.withConfig({displayName:"styled__InputMessageUploadFile",componentId:"sc-4jukeb-4"})(["display:inline-flex;"]),k=i.input.attrs({id:"inputMessageUploadFileInput"}).withConfig({displayName:"styled__InputMessageUploadFileInput",componentId:"sc-4jukeb-5"})(["display:none;"]),j=i(l).attrs({variant:"secondary",component:"label",htmlFor:"inputMessageUploadFileInput",children:e(r,{})}).withConfig({displayName:"styled__InputMessageUploadFileButton",componentId:"sc-4jukeb-6"})(["flex-shrink:0;user-select:none;"]),v=i.div.withConfig({displayName:"styled__InputMessageMain",componentId:"sc-4jukeb-7"})(["display:flex;flex-direction:column;justify-content:flex-start;align-items:flex-start;gap:14px;width:100%;"]),M=i.div.withConfig({displayName:"styled__InputMessageFiles",componentId:"sc-4jukeb-8"})(["display:flex;flex-wrap:wrap;gap:10px 14px;cursor:default;max-height:200px;overflow-y:auto;"]),C=i(p).attrs({variant:"input"}).withConfig({displayName:"styled__InputMessageFile",componentId:"sc-4jukeb-9"})([""]),N=i(M).withConfig({displayName:"styled__InputMessageVoiceFiles",componentId:"sc-4jukeb-10"})(["width:100%;"]),S=i.div.withConfig({displayName:"styled__InputMessageVoiceTrack",componentId:"sc-4jukeb-11"})(["display:flex;gap:14px;align-items:center;"]),$=i(h).attrs(({theme:i,children:a})=>({variant:"body-m-regular",children:t(o,{children:[e(y,{fill:i.colors.accent.primaryLight}),a]})})).withConfig({displayName:"styled__InputMessageConcatenateWarning",componentId:"sc-4jukeb-12"})(["display:flex;align-items:center;gap:8px;color:",";"],({theme:e})=>e.colors.accent.primaryLight),F=i(l).attrs({variant:"text",children:e(c,{})}).withConfig({displayName:"styled__InputMessageVoiceFileDelete",componentId:"sc-4jukeb-13"})([""]),z=i.textarea.withConfig({displayName:"styled__InputMessageTextArea",componentId:"sc-4jukeb-14"})(["display:flex;height:auto;width:100%;min-height:22px;max-height:270px;background:none;outline:none;resize:none;border:none;color:",";flex-shrink:0;overflow:auto;scrollbar-width:none;padding:0px;&::placeholder{color:",";}&::-webkit-scrollbar{display:none;}"," font-weight:400;font-size:18px;line-height:23.4px;@media (max-width:","){font-size:16px;line-height:22px;}"],({theme:e,$disabled:t})=>t?e.colors.grayScale.gray1:e.colors.base.white,({theme:e})=>e.colors.grayScale.gray1,({$disabled:e})=>e&&a`
|
|
6
6
|
cursor: not-allowed;
|
|
7
|
-
`,({theme:e})=>e.mobile.maxWidth),V=i(
|
|
7
|
+
`,({theme:e})=>e.mobile.maxWidth),V=i(l).withConfig({displayName:"styled__InputMessageSendButton",componentId:"sc-4jukeb-15"})(["flex-shrink:0;svg{pointer-events:none;}"]),B=i(l).attrs({variant:"text",children:e(g,{})}).withConfig({displayName:"styled__InputMessageVoicePauseButton",componentId:"sc-4jukeb-16"})(["padding:10px;margin-left:10px;"]),T=i(B).attrs({children:e(u,{})}).withConfig({displayName:"styled__InputMessageVoicePlayButton",componentId:"sc-4jukeb-17"})([""]),R=i(V).attrs(({theme:t,disabled:o})=>({variant:"text",startIcon:e(m,{}),iconFill:o?t.colors.grayScale.gray1:t.bright?t.default.colors.base.black:t.default.colors.base.white,disableHoverColor:!0})).withConfig({displayName:"styled__InputMessageVoiceButton",componentId:"sc-4jukeb-18"})(["margin-inline:10px;padding:10px;border-radius:8px;background-color:",";position:relative;z-index:0;"," &:before{content:'';height:140%;width:140%;position:absolute;top:-20%;left:-20%;background-color:",";opacity:",";filter:blur(18px);z-index:-1;transition:opacity 300ms ease-out;}"],({theme:e,$isRecording:t})=>t?e.colors.critic:"transparent",({theme:e,$isRecording:t})=>t&&a`
|
|
8
8
|
svg path {
|
|
9
9
|
fill: ${e.default.colors.base.white} !important;
|
|
10
10
|
}
|
|
11
|
-
`,({theme:e})=>e.colors.critic,({$isRecording:e})=>e?1:0),U=d,A=i.div.withConfig({displayName:"styled__InputMessageVoiceRecord",componentId:"sc-4jukeb-
|
|
11
|
+
`,({theme:e})=>e.colors.critic,({$isRecording:e})=>e?1:0),U=i(d).withConfig({displayName:"styled__InputMessageSendIcon",componentId:"sc-4jukeb-19"})([""]),A=i.div.withConfig({displayName:"styled__InputMessageVoiceRecord",componentId:"sc-4jukeb-20"})(["display:flex;align-items:center;gap:8px;"]),D=i.span.withConfig({displayName:"styled__InputMessageVoiceRecordDot",componentId:"sc-4jukeb-21"})(["display:inline-flex;width:8px;height:8px;background:",";border-radius:50%;animation:"," 1s ease-in-out infinite;"],({theme:e})=>e.colors.critic,()=>n`
|
|
12
12
|
from {
|
|
13
13
|
opacity: 1;
|
|
14
14
|
}
|
|
@@ -18,8 +18,8 @@ import{jsx as e,jsxs as t,Fragment as o}from"react/jsx-runtime";import{styled as
|
|
|
18
18
|
to {
|
|
19
19
|
opacity: 1;
|
|
20
20
|
}
|
|
21
|
-
`),W=i(h).attrs({variant:"body-s-medium"}).withConfig({displayName:"styled__InputMessageVoiceRecordTimeText",componentId:"sc-4jukeb-
|
|
21
|
+
`),W=i(h).attrs({variant:"body-s-medium"}).withConfig({displayName:"styled__InputMessageVoiceRecordTimeText",componentId:"sc-4jukeb-22"})(["cursor:default;"]),L=i.div.withConfig({displayName:"styled__InputMessageToggleSendStyled",componentId:"sc-4jukeb-23"})(["position:relative;width:fit-content;height:fit-content;",""],f({tablet:a`
|
|
22
22
|
display: none;
|
|
23
23
|
`,mobile:a`
|
|
24
24
|
display: none;
|
|
25
|
-
`})),P=i(
|
|
25
|
+
`})),P=i(l).attrs({variant:"text",iconSize:24}).withConfig({displayName:"styled__InputMessageToggleSendButton",componentId:"sc-4jukeb-24"})(["display:flex;&:hover{svg{path{fill:"," !important;}}}"],({theme:e})=>"dark"===e.mode?e.colors.grayScale.gray2:e.colors.grayScale.gray1),G=i(s.div).withConfig({displayName:"styled__InputMessageToggleSendModalStyled",componentId:"sc-4jukeb-25"})(["display:flex;flex-direction:column;gap:6px;max-height:fit-content;width:max-content;max-width:60vw;padding:6px;position:absolute;bottom:calc(100% + 10px);right:0;border-radius:10px;border:1px "," solid;background-color:",";z-index:50;user-select:none;-moz-user-select:none;-webkit-user-select:none;"],({theme:e})=>e.colors.grayScale.gray2,({theme:e})=>"dark"===e.mode?e.colors.grayScale.gray4:e.default.colors.base.white),H=i.button.withConfig({displayName:"styled__InputMessageToggleSendModalOption",componentId:"sc-4jukeb-26"})(["all:unset;margin:0;padding:12px;border-radius:8px;background-color:",";cursor:pointer;transition:opacity 0.1s ease-in-out,transform 0.1s ease-in-out,filter 0.1s ease-in-out;&:hover{filter:",";transition:filter 100ms ease-in-out;}&:active{transform:translateY(1px);}"],({theme:e,active:t})=>"dark"===e.mode?t?e.colors.grayScale.gray3:e.colors.grayScale.gray4:t?e.colors.grayScale.gray3:e.default.colors.base.white,({theme:e})=>"dark"===e.mode?"brightness(120%)":"brightness(80%)");export{I as InputMessageBottom,w as InputMessageBottomGroup,$ as InputMessageConcatenateWarning,b as InputMessageContent,C as InputMessageFile,M as InputMessageFiles,v as InputMessageMain,V as InputMessageSendButton,U as InputMessageSendIcon,x as InputMessageStyled,z as InputMessageTextArea,P as InputMessageToggleSendButton,H as InputMessageToggleSendModalOption,G as InputMessageToggleSendModalStyled,L as InputMessageToggleSendStyled,_ as InputMessageUploadFile,j as InputMessageUploadFileButton,k as InputMessageUploadFileInput,R as InputMessageVoiceButton,F as InputMessageVoiceFileDelete,N as InputMessageVoiceFiles,B as InputMessageVoicePauseButton,T as InputMessageVoicePlayButton,A as InputMessageVoiceRecord,D as InputMessageVoiceRecordDot,W as InputMessageVoiceRecordTimeText,S as InputMessageVoiceTrack};
|