@@ -134,11 +134,52 @@ const Slots = setSlots(
134134 * @slot suggestion - Slot for rendering a single suggestion item.
135135 * @slot empty-state - Slot shown when there are no messages.
136136 *
137- * @csspart header - Styles the header container.
138- * @csspart prefix - Styles the element before the title (e.g., avatar).
137+ * @csspart chat-container - Styles the main chat container.
138+ * @csspart header - Styles the chat header container.
139+ * @csspart prefix - Styles the element before the chat title (e.g., avatar).
139140 * @csspart title - Styles the chat header title.
140- * @csspart suggestions - Styles the suggestion container.
141+ *
142+ * @csspart message-area-container - Styles the container holding the messages and (optional) suggestions.
143+ * @csspart message-list - Styles the message list container.
144+ * @csspart message-item - Styles each message wrapper.
145+ * @csspart typing-indicator - Styles the typing indicator container.
146+ * @csspart typing-dot - Styles individual typing indicator dots.
147+ *
148+ * @csspart suggestions-container - Styles the container holding all suggestions.
149+ * @csspart suggestions-header - Styles the suggestions header.
141150 * @csspart suggestion - Styles each suggestion item.
151+ * @csspart suggestion-prefix - Styles the icon or prefix in a suggestion.
152+ * @csspart suggestion-title - Styles the text/title of a suggestion.
153+ *
154+ * @csspart empty-state - Styles the empty state container when there are no messages.
155+ *
156+ * @csspart input-area-container - Styles the wrapper around the chat input area.
157+ * @csspart input-container - Styles the main input container.
158+ * @csspart input-attachments-container - Styles the container for attachments in the input.
159+ * @csspart input-attachment-container - Styles a single attachment in the input area.
160+ * @csspart input-attachment-name - Styles the file name of an attachment.
161+ * @csspart input-attachment-icon - Styles the icon of an attachment.
162+ * @csspart text-input - Styles the text input field for typing messages.
163+ * @csspart input-actions-container - Styles the container for input actions.
164+ * @csspart input-actions-start - Styles the group of actions at the start of the input after the default file upload.
165+ * @csspart input-actions-end - Styles the group of actions at the end of the input.
166+ * @csspart file-upload-container - Styles the container for the file upload input.
167+ * @csspart file-upload - Styles the file upload input itself.
168+ * @csspart send-button-container - Styles the container around the send button.
169+ * @csspart send-button - Styles the send button.
170+ *
171+ * @csspart message-container - Styles the container of a single message.
172+ * @csspart message-list (forwarded) - Styles the internal list of messages.
173+ * @csspart message-header - Styles the header of a message (e.g., sender, timestamp).
174+ * @csspart message-content - Styles the text content of a message.
175+ * @csspart message-attachments-container - Styles the container for message attachments.
176+ * @csspart message-attachment - Styles a single message attachment.
177+ * @csspart message-actions-container - Styles the container holding message actions.
178+ * @csspart message-sent - Styles messages marked as sent by the current user.
179+ * @csspart attachment-header - Styles the header of an attachment block.
180+ * @csspart attachment-content - Styles the content of an attachment block.
181+ * @csspart attachment-icon - Styles the icon of an attachment.
182+ * @csspart file-name - Styles the file name shown in an attachment.
142183 */
143184export default class IgcChatComponent extends EventEmitterMixin <
144185 IgcChatComponentEventMap ,
@@ -329,13 +370,10 @@ export default class IgcChatComponent extends EventEmitterMixin<
329370 < div part ="header " ?hidden =${ ! hasContent } >
330371 < slot
331372 name ="prefix "
332- part ="prefix "
333373 ?hidden =${ ! this . _slots . hasAssignedElements ( 'prefix' ) }
334374 > </ slot >
335- < slot name ="title " part ="title "
336- > ${ this . _state . options ?. headerText } </ slot
337- >
338- < slot name ="actions " part ="actions "> </ slot >
375+ < slot name ="title "> ${ this . _state . options ?. headerText } </ slot >
376+ < slot name ="actions "> </ slot >
339377 </ div >
340378 ` ;
341379 }
@@ -354,8 +392,20 @@ export default class IgcChatComponent extends EventEmitterMixin<
354392 id =${ `message-${ message . id } ` }
355393 part ="message-item"
356394 .message=${ message }
357- exportparts="message-container, message-text, message-attachments-container, message-attachment, message-actions, sent,
358- attachment, attachment-header, attachment-content, attachment-icon, file-name, actions: attachment-actions"
395+ exportparts="
396+ message-container,
397+ message-list,
398+ message-header,
399+ plain-text: message-content,
400+ message-attachments: message-attachments-container,
401+ attachment: message-attachment,
402+ message-actions: message-actions-container,
403+ sent: message-sent,
404+ attachment-header,
405+ attachment-content,
406+ attachment-icon,
407+ file-name,
408+ "
359409 >
360410 </ igc-chat-message >
361411 ` ;
@@ -399,23 +449,26 @@ export default class IgcChatComponent extends EventEmitterMixin<
399449 </ span >
400450 < slot name ="suggestions-header "> </ slot >
401451 </ igc-list-header >
402- < slot name ="suggestions " part =" suggestions " >
452+ < slot name ="suggestions ">
403453 ${ suggestions . map (
404454 ( suggestion ) => html `
405- < slot name ="suggestion " part =" suggestion " >
455+ < slot name ="suggestion ">
406456 < igc-list-item
457+ part ="suggestion "
407458 @click =${ ( ) => this . _handleSuggestionClick ( suggestion ) }
408459 >
409- < span slot ="start ">
460+ < span slot ="start " part =" suggestion-prefix " >
410461 ${ this . _getRenderer ( 'suggestionPrefix' ) ( ctx ) }
411462 </ span >
412- < span slot ="title "> ${ suggestion } </ span >
463+ < span slot ="title " part ="suggestion-title "
464+ > ${ suggestion } </ span
465+ >
413466 </ igc-list-item >
414467 </ slot >
415468 `
416469 ) }
417470 </ slot >
418- < slot name ="suggestions-actions " part =" suggestions-actions " > </ slot >
471+ < slot name ="suggestions-actions "> </ slot >
419472 </ igc-list >
420473 </ div >
421474 ` ;
@@ -436,48 +489,10 @@ export default class IgcChatComponent extends EventEmitterMixin<
436489 : this . _renderSuggestions ( ) ;
437490
438491 return html `
439- < div
440- part ="chat-container "
441- exportparts ="
442- chat-container,
443- header,
444- prefix,
445- title,
446- actions,
447- chat-wrapper,
448- chat-messages,
449- empty-state,
450- suggestions-container,
451- suggestions-header,
452- suggestions,
453- suggestions-actions,
454- suggestion,
455- message-container,
456- message-list,
457- message-item,
458- message,
459- message-text,
460- message-attachment,
461- message-attachments-container,
462- message-actions,
463- typing-indicator,
464- attachments-container,
465- attachment,
466- attachment-header,
467- attachment-content,
468- attachment-icon,
469- file-name,
470- attachment-actions,
471- sent,
472- file-upload,
473- input-actions-start,
474- input-actions-end,
475- send-button
476- "
477- >
492+ < div part ="chat-container ">
478493 ${ this . _renderHeader ( ) }
479494
480- < div part ="chat-wrapper ">
495+ < div part ="message-area-container ">
481496 ${ cache (
482497 hasMessages || this . _state . options ?. isTyping
483498 ? this . _renderMessages ( )
@@ -490,14 +505,19 @@ export default class IgcChatComponent extends EventEmitterMixin<
490505
491506 < igc-chat-input
492507 exportparts ="
493- input-container,
494- input-wrapper,
508+ input-container: input-area-container ,
509+ input-wrapper: input-container ,
495510 attachments: input-attachments-container,
496- attachments -wrapper: input-attachment,
511+ attachment -wrapper: input-attachment-container ,
497512 attachment-name: input-attachment-name,
513+ attachment-icon: input-attachment-icon,
498514 text-input,
499- buttons-container: input-buttons-container,
500- upload-button,
515+ actions-container: input-actions-container,
516+ input-actions-start,
517+ input-actions-end,
518+ file-upload-container,
519+ file-upload,
520+ send-button-container,
501521 send-button "
502522 >
503523 </ igc-chat-input >
0 commit comments