@salesforcedevs/docs-components 0.0.33-chat → 0.0.34-chat
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.
package/package.json
CHANGED
|
@@ -117,7 +117,7 @@ body.chat-closed .global-header {
|
|
|
117
117
|
|
|
118
118
|
.chat-header {
|
|
119
119
|
background: linear-gradient(135deg, #0176d3 0%, #005fb2 100%);
|
|
120
|
-
padding:
|
|
120
|
+
padding: 18px 24px;
|
|
121
121
|
border-bottom: 1px solid rgb(1 118 211 / 20%);
|
|
122
122
|
display: flex;
|
|
123
123
|
align-items: center;
|
|
@@ -204,6 +204,7 @@ body.chat-closed .global-header {
|
|
|
204
204
|
display: flex;
|
|
205
205
|
align-items: flex-start;
|
|
206
206
|
animation: message-slide-in 0.4s cubic-bezier(0.4, 0, 0.2, 1);
|
|
207
|
+
gap: 12px;
|
|
207
208
|
}
|
|
208
209
|
|
|
209
210
|
.message-wrapper[data-sender="user"] {
|
|
@@ -214,6 +215,120 @@ body.chat-closed .global-header {
|
|
|
214
215
|
justify-content: flex-start;
|
|
215
216
|
}
|
|
216
217
|
|
|
218
|
+
/* Avatar styling */
|
|
219
|
+
.message-avatar-wrapper {
|
|
220
|
+
flex-shrink: 0;
|
|
221
|
+
display: flex;
|
|
222
|
+
align-items: flex-start;
|
|
223
|
+
margin-top: 2px;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/* Hide avatar for user messages */
|
|
227
|
+
.message-wrapper[data-sender="user"] .message-avatar-wrapper {
|
|
228
|
+
display: none;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/* Show avatar for assistant messages */
|
|
232
|
+
.message-wrapper[data-sender="assistant"] .message-avatar-wrapper {
|
|
233
|
+
display: flex;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.avatar-container {
|
|
237
|
+
width: 36px;
|
|
238
|
+
height: 36px;
|
|
239
|
+
background: linear-gradient(180deg, #fafbfc 0%, #f7f9fb 100%);
|
|
240
|
+
border-radius: 50%;
|
|
241
|
+
display: flex;
|
|
242
|
+
align-items: center;
|
|
243
|
+
justify-content: center;
|
|
244
|
+
box-shadow: 0 2px 8px rgb(0 0 0 / 10%);
|
|
245
|
+
position: relative;
|
|
246
|
+
overflow: hidden;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.avatar-container::before {
|
|
250
|
+
content: "";
|
|
251
|
+
position: absolute;
|
|
252
|
+
inset: 0;
|
|
253
|
+
background: linear-gradient(135deg, rgb(255 255 255 / 20%) 0%, rgb(255 255 255 / 10%) 100%);
|
|
254
|
+
border-radius: 50%;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.avatar-container {
|
|
258
|
+
animation: thinking-avatar-pulse 3s ease-in-out infinite;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.avatar-icon {
|
|
262
|
+
width: 32px;
|
|
263
|
+
height: 32px;
|
|
264
|
+
color: white;
|
|
265
|
+
position: relative;
|
|
266
|
+
z-index: 1;
|
|
267
|
+
filter: drop-shadow(0 1px 2px rgb(0 0 0 / 15%));
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/* Thinking Bot SVG Animations */
|
|
271
|
+
.thinking-body {
|
|
272
|
+
animation: thinking-breathe 2s ease-in-out infinite;
|
|
273
|
+
transform-origin: center;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.thinking-smile {
|
|
277
|
+
animation: thinking-smile-animation 3s ease-in-out infinite;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.thinking-eye {
|
|
281
|
+
animation: think-blink 6s infinite;
|
|
282
|
+
transform-origin: center;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
@keyframes thinking-avatar-pulse {
|
|
286
|
+
0%, 100% {
|
|
287
|
+
transform: scale(1);
|
|
288
|
+
box-shadow: 0 2px 8px rgb(0 0 0 / 10%);
|
|
289
|
+
}
|
|
290
|
+
50% {
|
|
291
|
+
transform: scale(1.08);
|
|
292
|
+
box-shadow: 0 4px 16px rgb(0 0 0 / 20%);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
@keyframes thinking-breathe {
|
|
297
|
+
0%, 100% {
|
|
298
|
+
transform: scale(1);
|
|
299
|
+
}
|
|
300
|
+
50% {
|
|
301
|
+
transform: scale(1.05);
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
@keyframes thinking-smile-animation {
|
|
306
|
+
0%, 100% {
|
|
307
|
+
transform: translateY(0px);
|
|
308
|
+
}
|
|
309
|
+
50% {
|
|
310
|
+
transform: translateY(-2px);
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
@keyframes think-blink {
|
|
315
|
+
0%, 85%, 100% {
|
|
316
|
+
transform: scaleY(1);
|
|
317
|
+
}
|
|
318
|
+
90% {
|
|
319
|
+
transform: scaleY(0.6);
|
|
320
|
+
}
|
|
321
|
+
92% {
|
|
322
|
+
transform: scaleY(0.2);
|
|
323
|
+
}
|
|
324
|
+
94% {
|
|
325
|
+
transform: scaleY(0.6);
|
|
326
|
+
}
|
|
327
|
+
96% {
|
|
328
|
+
transform: scaleY(1);
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
|
|
217
332
|
.message-content {
|
|
218
333
|
max-width: 80%;
|
|
219
334
|
display: flex;
|
|
@@ -444,6 +559,20 @@ body.chat-closed .global-header {
|
|
|
444
559
|
.message-content {
|
|
445
560
|
max-width: 85%;
|
|
446
561
|
}
|
|
562
|
+
|
|
563
|
+
.avatar-container {
|
|
564
|
+
width: 32px;
|
|
565
|
+
height: 32px;
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
.avatar-icon {
|
|
569
|
+
width: 28px;
|
|
570
|
+
height: 28px;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
.message-wrapper {
|
|
574
|
+
gap: 10px;
|
|
575
|
+
}
|
|
447
576
|
}
|
|
448
577
|
|
|
449
578
|
@media (max-width: 480px) {
|
|
@@ -479,6 +608,21 @@ body.chat-closed .global-header {
|
|
|
479
608
|
.chat-input-area {
|
|
480
609
|
padding: 12px;
|
|
481
610
|
}
|
|
611
|
+
|
|
612
|
+
.avatar-container {
|
|
613
|
+
width: 28px;
|
|
614
|
+
height: 28px;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
.avatar-icon {
|
|
618
|
+
width: 24px;
|
|
619
|
+
height: 24px;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
.message-wrapper {
|
|
623
|
+
gap: 8px;
|
|
624
|
+
margin-bottom: 16px;
|
|
625
|
+
}
|
|
482
626
|
}
|
|
483
627
|
|
|
484
628
|
/* Accessibility improvements */
|
|
@@ -494,6 +638,23 @@ body.chat-closed .global-header {
|
|
|
494
638
|
.chat-messages {
|
|
495
639
|
scroll-behavior: auto;
|
|
496
640
|
}
|
|
641
|
+
|
|
642
|
+
.avatar-container {
|
|
643
|
+
animation: none;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
/* Disable all thinking bot animations for reduced motion users */
|
|
647
|
+
.thinking-body {
|
|
648
|
+
animation: none !important;
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
.thinking-smile {
|
|
652
|
+
animation: none !important;
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
.thinking-eye {
|
|
656
|
+
animation: none !important;
|
|
657
|
+
}
|
|
497
658
|
}
|
|
498
659
|
|
|
499
660
|
/* High contrast mode support */
|
|
@@ -77,6 +77,45 @@
|
|
|
77
77
|
class="message-wrapper"
|
|
78
78
|
data-sender={message.sender}
|
|
79
79
|
>
|
|
80
|
+
<!-- AI Avatar for assistant messages only -->
|
|
81
|
+
<div class="message-avatar-wrapper" data-sender={message.sender}>
|
|
82
|
+
<div class="avatar-container">
|
|
83
|
+
<svg
|
|
84
|
+
class="avatar-icon"
|
|
85
|
+
viewBox="0 0 300 320"
|
|
86
|
+
fill="none"
|
|
87
|
+
stroke="none"
|
|
88
|
+
>
|
|
89
|
+
<!-- Antennas -->
|
|
90
|
+
<g stroke="#999" stroke-width="6">
|
|
91
|
+
<line x1="70" y1="20" x2="70" y2="60" />
|
|
92
|
+
<line x1="230" y1="20" x2="230" y2="60" />
|
|
93
|
+
</g>
|
|
94
|
+
<circle cx="70" cy="20" r="10" fill="#3A98D8" />
|
|
95
|
+
<circle cx="230" cy="20" r="10" fill="#3A98D8" />
|
|
96
|
+
|
|
97
|
+
<!-- Robot Body -->
|
|
98
|
+
<g class="thinking-body">
|
|
99
|
+
<rect x="40" y="60" width="220" height="240" rx="110" ry="110" fill="#3A98D8" />
|
|
100
|
+
|
|
101
|
+
<!-- Forehead Dots -->
|
|
102
|
+
<circle cx="150" cy="90" r="6" fill="#9ED4E6" />
|
|
103
|
+
<rect x="135" y="100" width="30" height="10" rx="5" ry="5" fill="#9ED4E6" />
|
|
104
|
+
|
|
105
|
+
<!-- Face Panel -->
|
|
106
|
+
<rect x="70" y="130" width="160" height="80" rx="40" ry="40" fill="#577C86" />
|
|
107
|
+
|
|
108
|
+
<!-- Eyes (Thinking animation) -->
|
|
109
|
+
<circle class="thinking-eye" cx="115" cy="170" r="10" fill="#86D3BD" />
|
|
110
|
+
<circle class="thinking-eye" cx="185" cy="170" r="10" fill="#86D3BD" />
|
|
111
|
+
|
|
112
|
+
<!-- Thinking Smile -->
|
|
113
|
+
<path class="thinking-smile" d="M110 240 Q150 260 190 240" stroke="#2F435A" stroke-width="6" fill="none" stroke-linecap="round" />
|
|
114
|
+
</g>
|
|
115
|
+
</svg>
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
|
|
80
119
|
<div class="message-content">
|
|
81
120
|
<div class="message-bubble">
|
|
82
121
|
<template lwc:if={message.isTyping}>
|