@lobehub/ui
Version:
Lobe UI is an open-source UI component library for building AIGC web apps
1 lines • 2.3 kB
Source Map (JSON)
{"version":3,"file":"ChatInputArea.mjs","names":["DraggablePanel","ChatInputAreaInner"],"sources":["../../../src/chat/ChatInputArea/ChatInputArea.tsx"],"sourcesContent":["'use client';\n\nimport { memo } from 'react';\n\nimport DraggablePanel from '@/DraggablePanel';\n\nimport ChatInputAreaInner from './components/ChatInputAreaInner';\nimport { styles } from './style';\nimport type { ChatInputAreaProps } from './type';\n\nconst ChatInputArea = memo<ChatInputAreaProps>(\n ({\n ref,\n className,\n style,\n classNames,\n expand = true,\n setExpand,\n bottomAddons,\n topAddons,\n onSizeChange,\n heights,\n onSend,\n ...rest\n }) => {\n return (\n <DraggablePanel\n className={className}\n classNames={classNames}\n fullscreen={expand}\n headerHeight={heights?.headerHeight}\n maxHeight={heights?.maxHeight}\n minHeight={heights?.minHeight}\n onSizeChange={onSizeChange}\n placement=\"bottom\"\n size={{ height: heights?.inputHeight, width: '100%' }}\n style={{ zIndex: 10, ...style }}\n >\n <section className={styles.container} style={{ minHeight: heights?.minHeight }}>\n {topAddons}\n <div className={styles.textareaContainer}>\n <ChatInputAreaInner\n className={styles.textarea}\n onSend={() => {\n onSend?.();\n setExpand?.(false);\n }}\n ref={ref}\n style={{\n paddingInline: 16,\n }}\n {...rest}\n />\n </div>\n {bottomAddons}\n </section>\n </DraggablePanel>\n );\n },\n);\n\nexport default ChatInputArea;\n"],"mappings":";;;;;;;;;AAUA,MAAM,gBAAgB,MACnB,EACC,KACA,WACA,OACA,YACA,SAAS,MACT,WACA,cACA,WACA,cACA,SACA,QACA,GAAG,WACC;AACJ,QACE,oBAACA;EACY;EACC;EACZ,YAAY;EACZ,cAAc,SAAS;EACvB,WAAW,SAAS;EACpB,WAAW,SAAS;EACN;EACd,WAAU;EACV,MAAM;GAAE,QAAQ,SAAS;GAAa,OAAO;GAAQ;EACrD,OAAO;GAAE,QAAQ;GAAI,GAAG;GAAO;YAE/B,qBAAC;GAAQ,WAAW,OAAO;GAAW,OAAO,EAAE,WAAW,SAAS,WAAW;;IAC3E;IACD,oBAAC;KAAI,WAAW,OAAO;eACrB,oBAACC;MACC,WAAW,OAAO;MAClB,cAAc;AACZ,iBAAU;AACV,mBAAY,MAAM;;MAEf;MACL,OAAO,EACL,eAAe,IAChB;MACD,GAAI;OACJ;MACE;IACL;;IACO;GACK;EAGtB;AAED,4BAAe"}