11import { consume } from '@lit/context' ;
22import { html , LitElement , nothing , type TemplateResult } from 'lit' ;
33import { query , state } from 'lit/decorators.js' ;
4+ import { addThemingController } from '../../theming/theming-controller.js' ;
45import IgcIconButtonComponent from '../button/icon-button.js' ;
56import IgcChipComponent from '../chip/chip.js' ;
67import { chatContext } from '../common/context.js' ;
@@ -12,6 +13,8 @@ import { registerIconFromText } from '../icon/icon.registry.js';
1213import IgcTextareaComponent from '../textarea/textarea.js' ;
1314import type { ChatState } from './chat-state.js' ;
1415import { styles } from './themes/input.base.css.js' ;
16+ import { all } from './themes/input.js' ;
17+ import { styles as shared } from './themes/shared/input/input.common.css.js' ;
1518import { attachmentIcon , sendButtonIcon } from './types.js' ;
1619
1720/**
@@ -46,7 +49,7 @@ import { attachmentIcon, sendButtonIcon } from './types.js';
4649export default class IgcChatInputComponent extends LitElement {
4750 public static readonly tagName = 'igc-chat-input' ;
4851
49- public static override styles = styles ;
52+ public static override styles = [ styles , shared ] ;
5053
5154 @consume ( { context : chatContext , subscribe : true } )
5255 private _chatState ?: ChatState ;
@@ -82,6 +85,7 @@ export default class IgcChatInputComponent extends LitElement {
8285
8386 constructor ( ) {
8487 super ( ) ;
88+ addThemingController ( this , all ) ;
8589 registerIconFromText ( 'attachment' , attachmentIcon , 'material' ) ;
8690 registerIconFromText ( 'send-message' , sendButtonIcon , 'material' ) ;
8791 }
@@ -164,7 +168,7 @@ export default class IgcChatInputComponent extends LitElement {
164168 const target = e . target as HTMLTextAreaElement ;
165169 this . inputValue = target . value ;
166170 this . _chatState ?. handleInputChange ( this . inputValue ) ;
167- this . adjustTextareaHeight ( ) ;
171+ // this.adjustTextareaHeight();
168172 }
169173
170174 private handleKeyDown ( e : KeyboardEvent ) {
@@ -263,14 +267,14 @@ export default class IgcChatInputComponent extends LitElement {
263267 this . requestUpdate ( ) ;
264268 }
265269
266- private adjustTextareaHeight ( ) {
267- const textarea = this . textInputElement ;
268- if ( ! textarea ) return ;
270+ // private adjustTextareaHeight() {
271+ // const textarea = this.textInputElement;
272+ // if (!textarea) return;
269273
270- textarea . style . height = 'auto' ;
271- const newHeight = Math . min ( textarea . scrollHeight , 120 ) ;
272- textarea . style . height = `${ newHeight } px` ;
273- }
274+ // textarea.style.height = 'auto';
275+ // const newHeight = Math.min(textarea.scrollHeight, 120);
276+ // textarea.style.height = `${newHeight}px`;
277+ // }
274278
275279 private sendMessage ( ) {
276280 if (
0 commit comments