@telia-ace/widget-conversation 1.1.2-rc.1 → 1.1.2-rc.2
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/{conversation-b5103766.mjs → conversation-2acab7f7.mjs} +394 -344
- package/{conversation-cba1688c.js → conversation-eb4d6944.js} +320 -320
- package/index.js +1 -1
- package/index.mjs +64 -24
- package/package.json +8 -8
- package/{return-button-70a640cb.mjs → return-button-3e542ab7.mjs} +47 -31
- package/{return-button-cdc53d1f.js → return-button-f1f43984.js} +33 -29
- package/types.d.ts +16 -4
- package/utils/index.d.ts +1 -1
|
@@ -220,52 +220,52 @@ const Le = ({ className: e }) => {
|
|
|
220
220
|
}};
|
|
221
221
|
}
|
|
222
222
|
`, Ae = s.div`
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
223
|
+
width: ${(e) => e.avatarSize || "32px"};
|
|
224
|
+
height: ${(e) => e.avatarSize || "32px"};
|
|
225
|
+
border-radius: 50%;
|
|
226
|
+
background-color: ${(e) => {
|
|
227
227
|
var t;
|
|
228
228
|
return (t = e.theme.colors) == null ? void 0 : t.accent;
|
|
229
229
|
}};
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
230
|
+
border: ${(e) => e.theme.border};
|
|
231
|
+
grid-area: avatar;
|
|
232
|
+
align-self: flex-end;
|
|
233
|
+
justify-self: center;
|
|
234
|
+
overflow: hidden;
|
|
235
|
+
margin-right: 10px;
|
|
236
|
+
display: flex;
|
|
237
|
+
justify-content: center;
|
|
238
|
+
align-items: center;
|
|
239
|
+
color: ${(e) => {
|
|
240
240
|
var t;
|
|
241
241
|
return (t = e.theme.colors) == null ? void 0 : t.text;
|
|
242
242
|
}};
|
|
243
243
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
244
|
+
> img {
|
|
245
|
+
height: 100%;
|
|
246
|
+
width: 100%;
|
|
247
|
+
object-fit: cover;
|
|
248
|
+
}
|
|
249
249
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
250
|
+
> svg {
|
|
251
|
+
width: 90%;
|
|
252
|
+
height: 90%;
|
|
253
|
+
padding: 10%;
|
|
254
|
+
color: ${(e) => {
|
|
255
255
|
var t;
|
|
256
256
|
return (t = e.theme.colors) == null ? void 0 : t.text;
|
|
257
257
|
}};
|
|
258
258
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
259
|
+
line,
|
|
260
|
+
path,
|
|
261
|
+
circle,
|
|
262
|
+
fill {
|
|
263
|
+
stroke: ${(e) => {
|
|
264
264
|
var t;
|
|
265
265
|
return (t = e.theme.colors) == null ? void 0 : t.text;
|
|
266
266
|
}};
|
|
267
|
-
}
|
|
268
267
|
}
|
|
268
|
+
}
|
|
269
269
|
`, Be = we`
|
|
270
270
|
0% {
|
|
271
271
|
opacity: 0;
|
|
@@ -277,121 +277,121 @@ const Le = ({ className: e }) => {
|
|
|
277
277
|
opacity: 0;
|
|
278
278
|
}
|
|
279
279
|
`, Re = s.div`
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
280
|
+
display: flex;
|
|
281
|
+
justify-content: center;
|
|
282
|
+
> div {
|
|
283
|
+
height: 10px;
|
|
284
|
+
width: 10px;
|
|
285
|
+
border-radius: 50%;
|
|
286
|
+
margin: 5px;
|
|
287
|
+
background-color: ${(e) => {
|
|
288
288
|
var t;
|
|
289
289
|
return (t = e.theme.colors) == null ? void 0 : t.text;
|
|
290
290
|
}};
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
291
|
+
animation: ${Be} 1s infinite;
|
|
292
|
+
}
|
|
293
|
+
> div:nth-of-type(2) {
|
|
294
|
+
animation-delay: 100ms;
|
|
295
|
+
}
|
|
296
|
+
> div:nth-of-type(3) {
|
|
297
|
+
animation-delay: 200ms;
|
|
298
|
+
}
|
|
299
299
|
`, U = s.div`
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
300
|
+
grid-area: content;
|
|
301
|
+
max-width: 100%;
|
|
302
|
+
overflow: hidden;
|
|
303
303
|
`, Ke = s(Y)`
|
|
304
|
-
|
|
304
|
+
font-size: ${(e) => {
|
|
305
305
|
var t;
|
|
306
306
|
return (t = e.theme.fonts) == null ? void 0 : t.normal;
|
|
307
307
|
}};
|
|
308
|
-
|
|
309
|
-
|
|
308
|
+
font-weight: normal;
|
|
309
|
+
margin: 0;
|
|
310
310
|
`, _ = s.div`
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
311
|
+
display: flex;
|
|
312
|
+
${(e) => e.left && "justify-content: start;"};
|
|
313
|
+
${(e) => e.center && "justify-content: center;"};
|
|
314
|
+
${(e) => e.right && "justify-content: end;"};
|
|
315
315
|
`, V = s.div`
|
|
316
|
-
|
|
316
|
+
${(e) => {
|
|
317
317
|
var t;
|
|
318
318
|
return e.padded && `padding: ${(t = e.theme.sizes) == null ? void 0 : t.medium};`;
|
|
319
319
|
}}
|
|
320
|
-
|
|
320
|
+
${(e) => !e.user && e.stacked && je(e.stacked, e.theme)}
|
|
321
321
|
${(e) => e.user && e.stacked && Oe(e.stacked, e.theme)}
|
|
322
322
|
|
|
323
323
|
display: inline-block;
|
|
324
|
-
|
|
324
|
+
margin-top: ${(e) => {
|
|
325
325
|
var t;
|
|
326
326
|
return (t = e.theme.sizes) == null ? void 0 : t.normal;
|
|
327
327
|
}};
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
328
|
+
&& > * {
|
|
329
|
+
overflow-wrap: break-word;
|
|
330
|
+
word-wrap: break-word;
|
|
331
|
+
word-break: break-all;
|
|
332
|
+
word-break: break-word;
|
|
333
|
+
hyphens: auto;
|
|
334
|
+
}
|
|
335
|
+
max-width: 100%;
|
|
336
|
+
${(e) => e.fullWidth && "width: 100%;"}
|
|
337
337
|
`, je = (e, t) => {
|
|
338
338
|
var r, a;
|
|
339
339
|
const o = g`
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
340
|
+
background-color: ${(r = t.colors) == null ? void 0 : r.accent};
|
|
341
|
+
color: ${(a = t.colors) == null ? void 0 : a.text};
|
|
342
|
+
${t.border && `border: ${t.border};`};
|
|
343
|
+
`;
|
|
344
344
|
return t.borderRadius ? g`
|
|
345
|
-
|
|
345
|
+
${o}
|
|
346
346
|
|
|
347
|
-
|
|
348
|
-
|
|
347
|
+
border-top-right-radius: ${t.borderRadius};
|
|
348
|
+
border-bottom-right-radius: ${t.borderRadius};
|
|
349
349
|
|
|
350
|
-
|
|
350
|
+
${e === "first" && `
|
|
351
351
|
border-top-left-radius: ${t.borderRadius};
|
|
352
352
|
`}
|
|
353
353
|
|
|
354
|
-
|
|
354
|
+
${e === "last" && `
|
|
355
355
|
border-bottom-left-radius: ${t.borderRadius};
|
|
356
356
|
`}
|
|
357
|
-
|
|
357
|
+
` : o;
|
|
358
358
|
}, Oe = (e, t) => {
|
|
359
359
|
var r, a;
|
|
360
360
|
const o = g`
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
361
|
+
background-color: ${(r = t.colors) == null ? void 0 : r.primary};
|
|
362
|
+
color: ${(a = t.colors) == null ? void 0 : a.accent};
|
|
363
|
+
`;
|
|
364
364
|
return t.borderRadius ? g`
|
|
365
|
-
|
|
365
|
+
${o}
|
|
366
366
|
|
|
367
|
-
|
|
368
|
-
|
|
367
|
+
border-top-left-radius: ${t.borderRadius};
|
|
368
|
+
border-bottom-left-radius: ${t.borderRadius};
|
|
369
369
|
|
|
370
|
-
|
|
370
|
+
${e === "first" && `
|
|
371
371
|
border-top-right-radius: ${t.borderRadius};
|
|
372
372
|
`}
|
|
373
373
|
|
|
374
|
-
|
|
374
|
+
${e === "last" && `
|
|
375
375
|
border-bottom-right-radius: ${t.borderRadius};
|
|
376
376
|
`}
|
|
377
|
-
|
|
377
|
+
` : o;
|
|
378
378
|
}, A = s.div`
|
|
379
|
-
|
|
379
|
+
margin-bottom: ${(e) => {
|
|
380
380
|
var t;
|
|
381
381
|
return (t = e.theme.sizes) == null ? void 0 : t.normal;
|
|
382
382
|
}};
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
383
|
+
&:last-child {
|
|
384
|
+
margin-bottom: 0;
|
|
385
|
+
}
|
|
386
386
|
`, C = (e) => {
|
|
387
387
|
var t, o;
|
|
388
388
|
return g`
|
|
389
|
-
|
|
390
|
-
|
|
389
|
+
margin: ${(t = e.theme.sizes) == null ? void 0 : t.medium} 0;
|
|
390
|
+
padding: 0 ${(o = e.theme.sizes) == null ? void 0 : o.medium};
|
|
391
391
|
`;
|
|
392
392
|
}, De = s(ze)`
|
|
393
|
-
|
|
394
|
-
|
|
393
|
+
& button.humany-form-component-button {
|
|
394
|
+
${(e) => {
|
|
395
395
|
var t, o, r, a;
|
|
396
396
|
return ((t = e.theme.colors) == null ? void 0 : t.primary) && ((o = e.theme.colors) == null ? void 0 : o.accent) && pe({
|
|
397
397
|
active: !1,
|
|
@@ -400,82 +400,92 @@ const Le = ({ className: e }) => {
|
|
|
400
400
|
theme: e.theme
|
|
401
401
|
});
|
|
402
402
|
}};
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
403
|
+
display: block;
|
|
404
|
+
width: 100%;
|
|
405
|
+
margin-bottom: ${(e) => {
|
|
406
406
|
var t;
|
|
407
407
|
return (t = e.theme.sizes) == null ? void 0 : t.normal;
|
|
408
408
|
}};
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
409
|
+
}
|
|
410
|
+
& button.humany-form-component-submit {
|
|
411
|
+
width: 100%;
|
|
412
|
+
margin: 0;
|
|
413
|
+
:not(:last-child) {
|
|
414
|
+
margin-bottom: ${(e) => {
|
|
415
415
|
var t;
|
|
416
416
|
return (t = e.theme.sizes) == null ? void 0 : t.normal;
|
|
417
417
|
}};
|
|
418
|
-
}
|
|
419
418
|
}
|
|
419
|
+
}
|
|
420
420
|
`, We = s(G)`
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
421
|
+
white-space: pre-wrap;
|
|
422
|
+
a {
|
|
423
|
+
color: ${(e) => e.theme.colors.link};
|
|
424
|
+
&:focus {
|
|
425
|
+
${(e) => {
|
|
426
426
|
var t;
|
|
427
427
|
return ((t = e.theme.accessibility) == null ? void 0 : t.isTabbing) && f;
|
|
428
428
|
}};
|
|
429
|
-
}
|
|
430
429
|
}
|
|
430
|
+
}
|
|
431
431
|
`, Ee = s(re)`
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
432
|
+
padding: 0;
|
|
433
|
+
list-style: none;
|
|
434
|
+
margin: 0 -${(e) => {
|
|
435
435
|
var t;
|
|
436
436
|
return (t = e.theme.sizes) == null ? void 0 : t.normal;
|
|
437
437
|
}};
|
|
438
|
-
|
|
439
|
-
|
|
438
|
+
> li {
|
|
439
|
+
margin: ${(e) => {
|
|
440
440
|
var t;
|
|
441
441
|
return (t = e.theme.sizes) == null ? void 0 : t.normal;
|
|
442
442
|
}};
|
|
443
|
-
|
|
443
|
+
}
|
|
444
444
|
`, Fe = s.button`
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
445
|
+
${(e) => K(e)};
|
|
446
|
+
display: block;
|
|
447
|
+
background-color: ${(e) => {
|
|
448
448
|
var t;
|
|
449
449
|
return (t = e.theme.colors) == null ? void 0 : t.primary;
|
|
450
450
|
}};
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
451
|
+
width: 100%;
|
|
452
|
+
color: #fff;
|
|
453
|
+
&:focus-visible {
|
|
454
|
+
${f}
|
|
455
|
+
background-color: transparent;
|
|
456
|
+
}
|
|
457
457
|
`, Z = Q(
|
|
458
|
-
({ boxed: e, className: t, agentData: o }, r) => /* @__PURE__ */ n(U, { ref: r, children: /* @__PURE__ */ n(_, { left: e, center: !e, children: /* @__PURE__ */ n(
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
458
|
+
({ boxed: e, className: t, agentData: o }, r) => /* @__PURE__ */ n(U, { ref: r, children: /* @__PURE__ */ n(_, { left: e, center: !e, children: /* @__PURE__ */ n(
|
|
459
|
+
V,
|
|
460
|
+
{
|
|
461
|
+
padded: !!e,
|
|
462
|
+
stacked: e ? "first" : void 0,
|
|
463
|
+
children: /* @__PURE__ */ m(Re, { children: [
|
|
464
|
+
/* @__PURE__ */ n("div", {}),
|
|
465
|
+
/* @__PURE__ */ n("div", {}),
|
|
466
|
+
/* @__PURE__ */ n("div", {})
|
|
467
|
+
] })
|
|
468
|
+
}
|
|
469
|
+
) }) })
|
|
463
470
|
), Pe = s.p`
|
|
464
|
-
|
|
465
|
-
|
|
471
|
+
&& {
|
|
472
|
+
font-size: ${(e) => {
|
|
466
473
|
var t;
|
|
467
474
|
return (t = e.theme.fonts) == null ? void 0 : t.small;
|
|
468
475
|
}};
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
476
|
+
font-weight: 300;
|
|
477
|
+
}
|
|
478
|
+
margin: 0;
|
|
479
|
+
line-height: 1.5em;
|
|
480
|
+
grid-area: info;
|
|
481
|
+
color: ${(e) => {
|
|
475
482
|
var t;
|
|
476
483
|
return (t = e.theme.colors) == null ? void 0 : t.text;
|
|
477
484
|
}};
|
|
478
|
-
`, ee = (e) => new Date(e).toLocaleTimeString([], {
|
|
485
|
+
`, ee = (e) => new Date(e).toLocaleTimeString([], {
|
|
486
|
+
hour: "2-digit",
|
|
487
|
+
minute: "2-digit"
|
|
488
|
+
}), B = ({ className: e, name: t, timestamp: o }) => {
|
|
479
489
|
if (!t && !o)
|
|
480
490
|
return null;
|
|
481
491
|
let r = "";
|
|
@@ -527,7 +537,10 @@ const Le = ({ className: e }) => {
|
|
|
527
537
|
Ve,
|
|
528
538
|
{
|
|
529
539
|
ref: i,
|
|
530
|
-
className: M(
|
|
540
|
+
className: M(
|
|
541
|
+
e,
|
|
542
|
+
"humany-conversation-system-message"
|
|
543
|
+
),
|
|
531
544
|
fullWidth: a,
|
|
532
545
|
children: r ? /* @__PURE__ */ m(qe, { className: "humany-conversation-discrete-message", children: [
|
|
533
546
|
t,
|
|
@@ -539,32 +552,35 @@ const Le = ({ className: e }) => {
|
|
|
539
552
|
}
|
|
540
553
|
)
|
|
541
554
|
), Ve = s.div`
|
|
542
|
-
|
|
543
|
-
|
|
555
|
+
${(e) => e.fullWidth && "width: 100%"};
|
|
556
|
+
padding: 0 ${(e) => {
|
|
544
557
|
var t;
|
|
545
558
|
return (t = e.theme.sizes) == null ? void 0 : t.large;
|
|
546
559
|
}};
|
|
547
|
-
|
|
560
|
+
overflow: auto;
|
|
548
561
|
`, qe = s.div`
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
562
|
+
text-align: center;
|
|
563
|
+
word-wrap: break-word;
|
|
564
|
+
font-size: ${(e) => {
|
|
552
565
|
var t;
|
|
553
566
|
return (t = e.theme.fonts) == null ? void 0 : t.normal;
|
|
554
567
|
}};
|
|
555
|
-
|
|
568
|
+
color: ${(e) => {
|
|
556
569
|
var t;
|
|
557
570
|
return (t = e.theme.colors) == null ? void 0 : t.text;
|
|
558
571
|
}};
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
572
|
+
> p {
|
|
573
|
+
margin: 0;
|
|
574
|
+
}
|
|
562
575
|
`, Ye = ({ className: e, children: t, timestamp: o }) => {
|
|
563
576
|
const { userLabel: r = "" } = I();
|
|
564
577
|
return /* @__PURE__ */ m(
|
|
565
578
|
Ge,
|
|
566
579
|
{
|
|
567
|
-
className: M(
|
|
580
|
+
className: M(
|
|
581
|
+
e,
|
|
582
|
+
"humany-conversation-user-message"
|
|
583
|
+
),
|
|
568
584
|
children: [
|
|
569
585
|
t,
|
|
570
586
|
/* @__PURE__ */ n(B, { name: r, timestamp: o })
|
|
@@ -572,11 +588,11 @@ const Le = ({ className: e }) => {
|
|
|
572
588
|
}
|
|
573
589
|
);
|
|
574
590
|
}, Ge = s.div`
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
591
|
+
margin-left: 10%;
|
|
592
|
+
width: 90%;
|
|
593
|
+
display: flex;
|
|
594
|
+
flex-direction: column;
|
|
595
|
+
align-items: flex-end;
|
|
580
596
|
`, X = (e) => Array.isArray(e) ? e : Object.keys(e).map((t) => ({
|
|
581
597
|
label: e[t],
|
|
582
598
|
actionKey: t
|
|
@@ -694,16 +710,16 @@ const Le = ({ className: e }) => {
|
|
|
694
710
|
const o = be(e);
|
|
695
711
|
return !o || !e ? null : /* @__PURE__ */ n(ke, { fallback: null, children: /* @__PURE__ */ n(o, { ...t }) });
|
|
696
712
|
}, tt = ({ body: e }) => /* @__PURE__ */ n(nt, { html: e }), nt = s(G)`
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
}
|
|
713
|
+
${$e}
|
|
714
|
+
color: inherit;
|
|
715
|
+
white-space: pre-wrap;
|
|
716
|
+
${C}
|
|
717
|
+
a {
|
|
718
|
+
color: ${(e) => e.theme.colors.link};
|
|
719
|
+
&:focus-visible {
|
|
720
|
+
${f};
|
|
706
721
|
}
|
|
722
|
+
}
|
|
707
723
|
`, rt = ({ header: e, actions: t, dispatch: o }) => /* @__PURE__ */ n(
|
|
708
724
|
ot,
|
|
709
725
|
{
|
|
@@ -741,92 +757,92 @@ const Le = ({ className: e }) => {
|
|
|
741
757
|
}
|
|
742
758
|
}
|
|
743
759
|
), ot = s(j)`
|
|
744
|
-
|
|
760
|
+
${O}
|
|
745
761
|
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
762
|
+
> .humany-paragraph {
|
|
763
|
+
${C}
|
|
764
|
+
margin-bottom: 0;
|
|
749
765
|
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
}
|
|
766
|
+
h1 {
|
|
767
|
+
margin: 0;
|
|
753
768
|
}
|
|
769
|
+
}
|
|
754
770
|
|
|
755
|
-
|
|
771
|
+
${(e) => J(e)(
|
|
756
772
|
"h1",
|
|
757
773
|
g`
|
|
758
|
-
|
|
759
|
-
|
|
774
|
+
white-space: normal;
|
|
775
|
+
`
|
|
760
776
|
)}
|
|
761
777
|
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
778
|
+
> ul {
|
|
779
|
+
display: flex;
|
|
780
|
+
flex-direction: column;
|
|
781
|
+
gap: ${(e) => {
|
|
766
782
|
var t;
|
|
767
783
|
return (t = e.theme.sizes) == null ? void 0 : t.normal;
|
|
768
784
|
}};
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
}
|
|
785
|
+
> li {
|
|
786
|
+
margin: 0;
|
|
772
787
|
}
|
|
788
|
+
}
|
|
773
789
|
|
|
774
|
-
|
|
775
|
-
|
|
790
|
+
li {
|
|
791
|
+
border-bottom: ${(e) => e.theme.border};
|
|
776
792
|
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
}
|
|
793
|
+
&:last-of-type {
|
|
794
|
+
border-bottom: none;
|
|
780
795
|
}
|
|
796
|
+
}
|
|
781
797
|
`, st = s.div`
|
|
782
|
-
|
|
783
|
-
|
|
798
|
+
display: flex;
|
|
799
|
+
gap: ${(e) => {
|
|
784
800
|
var t;
|
|
785
801
|
return (t = e.theme.sizes) == null ? void 0 : t.medium;
|
|
786
802
|
}};
|
|
787
|
-
|
|
803
|
+
${C}
|
|
788
804
|
|
|
789
|
-
|
|
790
|
-
|
|
805
|
+
.item-icon {
|
|
806
|
+
}
|
|
791
807
|
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
808
|
+
.item-body {
|
|
809
|
+
display: flex;
|
|
810
|
+
flex-direction: column;
|
|
811
|
+
align-items: flex-start;
|
|
812
|
+
gap: ${(e) => {
|
|
797
813
|
var t;
|
|
798
814
|
return (t = e.theme.sizes) == null ? void 0 : t.normal;
|
|
799
815
|
}};
|
|
800
816
|
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
}
|
|
817
|
+
p {
|
|
818
|
+
margin: 0;
|
|
819
|
+
white-space: normal;
|
|
805
820
|
}
|
|
821
|
+
}
|
|
806
822
|
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
823
|
+
button {
|
|
824
|
+
background: transparent;
|
|
825
|
+
border: none;
|
|
826
|
+
font-family: inherit;
|
|
827
|
+
font-size: ${(e) => {
|
|
812
828
|
var t;
|
|
813
829
|
return (t = e.theme.fonts) == null ? void 0 : t.normal;
|
|
814
830
|
}};
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
831
|
+
cursor: pointer;
|
|
832
|
+
padding: 0;
|
|
833
|
+
margin: 0;
|
|
818
834
|
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
835
|
+
&:focus-visible {
|
|
836
|
+
${f}
|
|
837
|
+
span {
|
|
838
|
+
color: ${(e) => {
|
|
823
839
|
var t;
|
|
824
840
|
return (t = e.theme.colors) == null ? void 0 : t.primary;
|
|
825
841
|
}};
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
}
|
|
842
|
+
text-decoration: underline;
|
|
843
|
+
}
|
|
829
844
|
}
|
|
845
|
+
}
|
|
830
846
|
`, at = ({ header: e, actions: t, dispatch: o }) => /* @__PURE__ */ n(
|
|
831
847
|
it,
|
|
832
848
|
{
|
|
@@ -859,67 +875,67 @@ const Le = ({ className: e }) => {
|
|
|
859
875
|
) }, r.actionKey)
|
|
860
876
|
}
|
|
861
877
|
), it = s(j)`
|
|
862
|
-
|
|
863
|
-
|
|
878
|
+
${O}
|
|
879
|
+
${C}
|
|
864
880
|
|
|
865
881
|
${(e) => J(e)(
|
|
866
882
|
"h1",
|
|
867
883
|
g`
|
|
868
|
-
|
|
869
|
-
|
|
884
|
+
white-space: normal;
|
|
885
|
+
`
|
|
870
886
|
)}
|
|
871
887
|
|
|
872
888
|
> ul {
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
889
|
+
display: flex;
|
|
890
|
+
flex-direction: column;
|
|
891
|
+
gap: ${(e) => {
|
|
876
892
|
var t;
|
|
877
893
|
return (t = e.theme.sizes) == null ? void 0 : t.normal;
|
|
878
894
|
}};
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
}
|
|
895
|
+
> li {
|
|
896
|
+
margin: 0;
|
|
882
897
|
}
|
|
898
|
+
}
|
|
883
899
|
`, lt = s(z)`
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
900
|
+
display: block;
|
|
901
|
+
text-align: left;
|
|
902
|
+
font-weight: 300;
|
|
903
|
+
color: ${(e) => {
|
|
888
904
|
var t;
|
|
889
905
|
return (t = e.theme.colors) == null ? void 0 : t.primary;
|
|
890
906
|
}};
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
907
|
+
max-width: 100%;
|
|
908
|
+
text-overflow: ellipsis;
|
|
909
|
+
overflow: hidden;
|
|
894
910
|
|
|
895
|
-
|
|
911
|
+
${(e) => {
|
|
896
912
|
var t, o;
|
|
897
913
|
return e.help && g`
|
|
898
|
-
|
|
899
|
-
|
|
914
|
+
color: ${(t = e.theme.colors) == null ? void 0 : t.text};
|
|
915
|
+
text-decoration: underline;
|
|
900
916
|
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
917
|
+
i,
|
|
918
|
+
svg {
|
|
919
|
+
margin-left: ${(o = e.theme.sizes) == null ? void 0 : o.small};
|
|
920
|
+
}
|
|
921
|
+
`;
|
|
906
922
|
}}
|
|
907
923
|
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
924
|
+
&:focus-visible {
|
|
925
|
+
${f}
|
|
926
|
+
span {
|
|
927
|
+
color: ${(e) => {
|
|
912
928
|
var t;
|
|
913
929
|
return (t = e.theme.colors) == null ? void 0 : t.primary;
|
|
914
930
|
}};
|
|
915
|
-
|
|
916
|
-
}
|
|
931
|
+
text-decoration: underline;
|
|
917
932
|
}
|
|
933
|
+
}
|
|
918
934
|
`, ct = () => /* @__PURE__ */ n(dt, { className: "humany-conversation-separator" }), dt = s.div`
|
|
919
|
-
|
|
920
|
-
|
|
935
|
+
${(e) => e.theme.border && `border-bottom: ${e.theme.border};`}
|
|
936
|
+
width: 100%;
|
|
921
937
|
`, mt = ({ text: e }) => /* @__PURE__ */ n(ht, { className: "humany-conversation-text", variant: "span", children: e }), ht = s(Y)`
|
|
922
|
-
|
|
938
|
+
${C}
|
|
923
939
|
`, ut = ({
|
|
924
940
|
header: e = "Video call",
|
|
925
941
|
acceptLabel: t = "Accept",
|
|
@@ -968,59 +984,59 @@ const Le = ({ className: e }) => {
|
|
|
968
984
|
}
|
|
969
985
|
);
|
|
970
986
|
}, gt = s(j)`
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
987
|
+
${(e) => O(e)}
|
|
988
|
+
> ul {
|
|
989
|
+
display: flex;
|
|
990
|
+
flex-wrap: wrap;
|
|
991
|
+
gap: ${(e) => {
|
|
976
992
|
var t;
|
|
977
993
|
return (t = e.theme.sizes) == null ? void 0 : t.normal;
|
|
978
994
|
}};
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
}
|
|
995
|
+
> li {
|
|
996
|
+
margin: 0;
|
|
982
997
|
}
|
|
983
|
-
|
|
998
|
+
}
|
|
999
|
+
${(e) => C(e)}
|
|
984
1000
|
`, ft = s(z)`
|
|
985
|
-
|
|
1001
|
+
${K};
|
|
986
1002
|
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
1003
|
+
background-color: ${(e) => e.bgColor};
|
|
1004
|
+
display: flex;
|
|
1005
|
+
justify-content: center;
|
|
1006
|
+
align-items: center;
|
|
1007
|
+
color: #ffffff;
|
|
1008
|
+
width: 46px;
|
|
1009
|
+
height: 46px;
|
|
1010
|
+
border-radius: 100%;
|
|
995
1011
|
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
1012
|
+
&:focus-visible {
|
|
1013
|
+
${f}
|
|
1014
|
+
background-color: transparent;
|
|
999
1015
|
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1016
|
+
i,
|
|
1017
|
+
svg {
|
|
1018
|
+
color: ${(e) => {
|
|
1003
1019
|
var t;
|
|
1004
1020
|
return (t = e.theme.colors) == null ? void 0 : t.primary;
|
|
1005
1021
|
}};
|
|
1006
1022
|
|
|
1007
|
-
|
|
1008
|
-
|
|
1023
|
+
path {
|
|
1024
|
+
stroke: ${(e) => {
|
|
1009
1025
|
var t;
|
|
1010
1026
|
return (t = e.theme.colors) == null ? void 0 : t.primary;
|
|
1011
1027
|
}};
|
|
1012
|
-
|
|
1013
|
-
}
|
|
1028
|
+
}
|
|
1014
1029
|
}
|
|
1030
|
+
}
|
|
1015
1031
|
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1032
|
+
i,
|
|
1033
|
+
svg {
|
|
1034
|
+
color: #fff;
|
|
1019
1035
|
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
}
|
|
1036
|
+
path {
|
|
1037
|
+
stroke: #fff;
|
|
1023
1038
|
}
|
|
1039
|
+
}
|
|
1024
1040
|
`, pt = ([e, t]) => ({ type: e, content: t }), yt = ({ items: e, dispatch: t }) => /* @__PURE__ */ n(
|
|
1025
1041
|
bt,
|
|
1026
1042
|
{
|
|
@@ -1049,11 +1065,11 @@ const Le = ({ className: e }) => {
|
|
|
1049
1065
|
}
|
|
1050
1066
|
}
|
|
1051
1067
|
), bt = s(re)`
|
|
1052
|
-
|
|
1068
|
+
${ve}
|
|
1053
1069
|
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1070
|
+
> li {
|
|
1071
|
+
margin: 0;
|
|
1072
|
+
}
|
|
1057
1073
|
`, $t = Q(
|
|
1058
1074
|
({ className: e, timestamp: t, sender: o, type: r, content: a }, i) => {
|
|
1059
1075
|
const u = ae(
|
|
@@ -1076,22 +1092,30 @@ const Le = ({ className: e }) => {
|
|
|
1076
1092
|
},
|
|
1077
1093
|
l
|
|
1078
1094
|
);
|
|
1079
|
-
}) }), p = () => /* @__PURE__ */ n(
|
|
1080
|
-
|
|
1095
|
+
}) }), p = () => /* @__PURE__ */ n(
|
|
1096
|
+
le,
|
|
1081
1097
|
{
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
children: /* @__PURE__ */ n(
|
|
1086
|
-
|
|
1098
|
+
sender: o,
|
|
1099
|
+
timestamp: t,
|
|
1100
|
+
className: e,
|
|
1101
|
+
children: /* @__PURE__ */ n(U, { className: "humany-message-content-bundle", children: a.map((d, l) => /* @__PURE__ */ n(
|
|
1102
|
+
_,
|
|
1087
1103
|
{
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1104
|
+
className: "humany-message-container",
|
|
1105
|
+
left: !0,
|
|
1106
|
+
ref: i,
|
|
1107
|
+
children: /* @__PURE__ */ n(
|
|
1108
|
+
F,
|
|
1109
|
+
{
|
|
1110
|
+
content: d,
|
|
1111
|
+
stacked: u(l)
|
|
1112
|
+
}
|
|
1113
|
+
)
|
|
1114
|
+
},
|
|
1115
|
+
d.key
|
|
1116
|
+
)) })
|
|
1117
|
+
}
|
|
1118
|
+
), x = () => /* @__PURE__ */ n(Ye, { timestamp: t, className: e, children: /* @__PURE__ */ n(U, { className: "humany-message-content-bundle", children: a.map((d, l) => /* @__PURE__ */ n(
|
|
1095
1119
|
_,
|
|
1096
1120
|
{
|
|
1097
1121
|
className: "humany-message-container",
|
|
@@ -1119,9 +1143,22 @@ const Le = ({ className: e }) => {
|
|
|
1119
1143
|
return null;
|
|
1120
1144
|
}
|
|
1121
1145
|
}
|
|
1122
|
-
), F = ({
|
|
1146
|
+
), F = ({
|
|
1147
|
+
content: e,
|
|
1148
|
+
isUser: t,
|
|
1149
|
+
isSystem: o,
|
|
1150
|
+
stacked: r
|
|
1151
|
+
}) => {
|
|
1123
1152
|
const a = q(), { title: i, body: u, actions: c, form: p, items: x } = e;
|
|
1124
|
-
return x ? /* @__PURE__ */ n(
|
|
1153
|
+
return x ? /* @__PURE__ */ n(
|
|
1154
|
+
V,
|
|
1155
|
+
{
|
|
1156
|
+
className: "humany-message-content",
|
|
1157
|
+
user: !!t,
|
|
1158
|
+
stacked: r,
|
|
1159
|
+
children: /* @__PURE__ */ n(yt, { items: x, dispatch: a })
|
|
1160
|
+
}
|
|
1161
|
+
) : /* @__PURE__ */ m(
|
|
1125
1162
|
V,
|
|
1126
1163
|
{
|
|
1127
1164
|
className: "humany-message-content",
|
|
@@ -1175,7 +1212,20 @@ const Le = ({ className: e }) => {
|
|
|
1175
1212
|
messages: r,
|
|
1176
1213
|
loading: a,
|
|
1177
1214
|
typingActors: i = []
|
|
1178
|
-
} = I(), u = () => i && i.length ? i.map((c, p) => /* @__PURE__ */ n(
|
|
1215
|
+
} = I(), u = () => i && i.length ? i.map((c, p) => /* @__PURE__ */ n(
|
|
1216
|
+
P,
|
|
1217
|
+
{
|
|
1218
|
+
id: `typing_${c.name}`,
|
|
1219
|
+
children: /* @__PURE__ */ n(le, { timestamp: Date.now(), sender: c, children: /* @__PURE__ */ n(
|
|
1220
|
+
Z,
|
|
1221
|
+
{
|
|
1222
|
+
boxed: !0,
|
|
1223
|
+
ref: e
|
|
1224
|
+
}
|
|
1225
|
+
) })
|
|
1226
|
+
},
|
|
1227
|
+
`typing_${c.name}`
|
|
1228
|
+
)) : null;
|
|
1179
1229
|
return /* @__PURE__ */ m(R, { children: [
|
|
1180
1230
|
/* @__PURE__ */ m(vt, { tabIndex: 0, scrollableCss: t, ref: o, children: [
|
|
1181
1231
|
r && r.length ? r.map((c, p) => {
|
|
@@ -1196,55 +1246,55 @@ const Le = ({ className: e }) => {
|
|
|
1196
1246
|
/* @__PURE__ */ n(Le, {})
|
|
1197
1247
|
] });
|
|
1198
1248
|
}, vt = s.div`
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1249
|
+
display: flex;
|
|
1250
|
+
flex-direction: column;
|
|
1251
|
+
align-items: stretch;
|
|
1252
|
+
flex: 0 1 100%;
|
|
1253
|
+
padding: 0 ${(e) => {
|
|
1204
1254
|
var t;
|
|
1205
1255
|
return (t = e.theme.sizes) == null ? void 0 : t.medium;
|
|
1206
1256
|
}};
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1257
|
+
${(e) => !!e.scrollableCss && e.scrollableCss};
|
|
1258
|
+
&:focus-visible {
|
|
1259
|
+
${(e) => f(e)};
|
|
1260
|
+
}
|
|
1211
1261
|
`, P = s.div`
|
|
1212
|
-
|
|
1213
|
-
|
|
1262
|
+
margin: 0;
|
|
1263
|
+
margin-bottom: ${(e) => {
|
|
1214
1264
|
var t;
|
|
1215
1265
|
return (t = e.theme.sizes) == null ? void 0 : t.medium;
|
|
1216
1266
|
}};
|
|
1217
1267
|
|
|
1218
|
-
|
|
1219
|
-
|
|
1268
|
+
&:first-of-type {
|
|
1269
|
+
margin-top: ${(e) => {
|
|
1220
1270
|
var t;
|
|
1221
1271
|
return (t = e.theme.sizes) == null ? void 0 : t.medium;
|
|
1222
1272
|
}};
|
|
1223
|
-
|
|
1273
|
+
}
|
|
1224
1274
|
|
|
1225
|
-
|
|
1226
|
-
|
|
1275
|
+
&:last-of-type {
|
|
1276
|
+
padding-bottom: ${(e) => {
|
|
1227
1277
|
var t;
|
|
1228
1278
|
return (t = e.theme.sizes) == null ? void 0 : t.medium;
|
|
1229
1279
|
}};
|
|
1230
|
-
|
|
1280
|
+
}
|
|
1231
1281
|
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1282
|
+
& span,
|
|
1283
|
+
p,
|
|
1284
|
+
a,
|
|
1285
|
+
div {
|
|
1286
|
+
font-weight: 300;
|
|
1287
|
+
}
|
|
1238
1288
|
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1289
|
+
& b,
|
|
1290
|
+
h1 {
|
|
1291
|
+
font-weight: normal;
|
|
1292
|
+
}
|
|
1293
|
+
${(e) => J(e)(
|
|
1244
1294
|
"h1",
|
|
1245
1295
|
g`
|
|
1246
|
-
|
|
1247
|
-
|
|
1296
|
+
font-weight: normal;
|
|
1297
|
+
`
|
|
1248
1298
|
)}
|
|
1249
1299
|
`, xt = ({ dispatch: e }) => {
|
|
1250
1300
|
const t = Se(null);
|
|
@@ -1397,14 +1447,14 @@ const Le = ({ className: e }) => {
|
|
|
1397
1447
|
}
|
|
1398
1448
|
);
|
|
1399
1449
|
}, Lt = s.div`
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1450
|
+
position: absolute;
|
|
1451
|
+
right: 0;
|
|
1452
|
+
left: 0;
|
|
1453
|
+
bottom: 0;
|
|
1454
|
+
top: 0;
|
|
1455
|
+
overflow: hidden;
|
|
1456
|
+
display: flex;
|
|
1457
|
+
flex-direction: column;
|
|
1408
1458
|
`;
|
|
1409
1459
|
export {
|
|
1410
1460
|
Dt as default
|