@helpway/react 0.6.0 → 0.8.0
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/dist/index.js +28 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/themed/styles.css +78 -2
package/package.json
CHANGED
package/src/themed/styles.css
CHANGED
|
@@ -122,6 +122,11 @@
|
|
|
122
122
|
BUBBLE (FAB)
|
|
123
123
|
════════════════════════════════════════════════ */
|
|
124
124
|
|
|
125
|
+
@keyframes hw-bubble-enter {
|
|
126
|
+
from { opacity: 0; transform: scale(0.6); }
|
|
127
|
+
to { opacity: 1; transform: scale(1); }
|
|
128
|
+
}
|
|
129
|
+
|
|
125
130
|
.hw-bubble {
|
|
126
131
|
width: 48px;
|
|
127
132
|
height: 48px;
|
|
@@ -137,6 +142,7 @@
|
|
|
137
142
|
transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
|
|
138
143
|
position: relative;
|
|
139
144
|
overflow: visible;
|
|
145
|
+
animation: hw-bubble-enter 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) both;
|
|
140
146
|
}
|
|
141
147
|
|
|
142
148
|
/* bubbleStyle variants — override border-radius */
|
|
@@ -241,6 +247,26 @@
|
|
|
241
247
|
border-radius: 0; /* bubble itself handles rounding */
|
|
242
248
|
}
|
|
243
249
|
|
|
250
|
+
/* Logo variant (admin-uploaded launcherIconUrl OR website.logoUrl) —
|
|
251
|
+
logos carry their own padding rules and shouldn't be cropped. Use
|
|
252
|
+
`contain` + inner padding so SVG/PNG marks render at intended
|
|
253
|
+
proportion inside the rounded bubble. `object-fit: cover` is correct
|
|
254
|
+
only for face avatars. Padding is applied directly on the img so it
|
|
255
|
+
works regardless of whether the parent has --logo / --avatar class. */
|
|
256
|
+
.hw-agent-img.hw-agent-img--logo {
|
|
257
|
+
object-fit: contain;
|
|
258
|
+
padding: 10px;
|
|
259
|
+
box-sizing: border-box;
|
|
260
|
+
}
|
|
261
|
+
/* Higher-specificity override: .hw-bubble--avatar's inner img rule sets
|
|
262
|
+
width/height + border-radius:0 with 3-class specificity. Match that
|
|
263
|
+
so logo padding actually applies inside the bubble. */
|
|
264
|
+
.hw-bubble--avatar .hw-bubble-icon--bot .hw-agent-img.hw-agent-img--logo {
|
|
265
|
+
padding: 10px;
|
|
266
|
+
box-sizing: border-box;
|
|
267
|
+
object-fit: contain;
|
|
268
|
+
}
|
|
269
|
+
|
|
244
270
|
.hw-bubble-icon--close svg {
|
|
245
271
|
width: 22px;
|
|
246
272
|
height: 22px;
|
|
@@ -375,6 +401,7 @@
|
|
|
375
401
|
.hw-window--closing,
|
|
376
402
|
.hw-content,
|
|
377
403
|
.hw-msg,
|
|
404
|
+
.hw-bubble,
|
|
378
405
|
.hw-bubble-icon,
|
|
379
406
|
.hw-bubble-badge,
|
|
380
407
|
.hw-bubble-badge::after,
|
|
@@ -557,6 +584,14 @@
|
|
|
557
584
|
justify-content: center;
|
|
558
585
|
border-radius: 8px;
|
|
559
586
|
overflow: hidden;
|
|
587
|
+
/* Two-tier fallback so site overrides still win cleanly:
|
|
588
|
+
1. Site stylesheet → `--hw-agent-bg` (highest priority)
|
|
589
|
+
2. Widget smart default → `--hw-agent-bg-default` (set when the
|
|
590
|
+
org uploaded a logo as the avatar; see [data-has-avatar])
|
|
591
|
+
3. Built-in `transparent` (face-photo legacy default)
|
|
592
|
+
Setting --hw-agent-bg in user CSS short-circuits the entire
|
|
593
|
+
chain — exactly the cascade behavior we want. */
|
|
594
|
+
background: var(--hw-agent-bg, var(--hw-agent-bg-default, transparent));
|
|
560
595
|
}
|
|
561
596
|
.hw-header-bot-icon svg {
|
|
562
597
|
width: 24px;
|
|
@@ -571,6 +606,21 @@
|
|
|
571
606
|
height: 100%;
|
|
572
607
|
object-fit: cover;
|
|
573
608
|
}
|
|
609
|
+
.hw-header-bot-icon .hw-agent-img {
|
|
610
|
+
object-fit: var(--hw-agent-fit, var(--hw-agent-fit-default, cover));
|
|
611
|
+
padding: var(--hw-agent-pad, var(--hw-agent-pad-default, 0));
|
|
612
|
+
box-sizing: border-box;
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
/* Smart default: the org uploaded a logo (vs a face photo). Widget
|
|
616
|
+
sets data-has-avatar="true" on the root when agentConfig.avatarUrl
|
|
617
|
+
is non-empty. Logos look right with brand-tinted circle + contain +
|
|
618
|
+
inner padding; face photos with the legacy transparent + cover. */
|
|
619
|
+
.hw-widget[data-has-avatar="true"] {
|
|
620
|
+
--hw-agent-bg-default: var(--hw-primary);
|
|
621
|
+
--hw-agent-fit-default: contain;
|
|
622
|
+
--hw-agent-pad-default: 6px;
|
|
623
|
+
}
|
|
574
624
|
.hw-header-agent-initials {
|
|
575
625
|
font-size: 11px;
|
|
576
626
|
font-weight: 600;
|
|
@@ -916,7 +966,11 @@
|
|
|
916
966
|
width: 36px;
|
|
917
967
|
height: 36px;
|
|
918
968
|
border-radius: 10px;
|
|
919
|
-
|
|
969
|
+
/* Same fallback chain as the chat-header avatar so the smart default
|
|
970
|
+
for uploaded logos (data-has-avatar="true" → --hw-agent-bg-default)
|
|
971
|
+
reaches conversation rows too. Falls through to --hw-bg-subtle for
|
|
972
|
+
face-photo agents (legacy gray container). */
|
|
973
|
+
background: var(--hw-agent-bg, var(--hw-agent-bg-default, var(--hw-bg-subtle)));
|
|
920
974
|
color: var(--hw-text-3);
|
|
921
975
|
display: flex;
|
|
922
976
|
align-items: center;
|
|
@@ -931,8 +985,19 @@
|
|
|
931
985
|
.hw-conv-card-avatar-img {
|
|
932
986
|
width: 100%;
|
|
933
987
|
height: 100%;
|
|
988
|
+
/* Team-member uploaded image — face photos by design, so cover-by-
|
|
989
|
+
default is correct. We deliberately don't apply --hw-agent-fit
|
|
990
|
+
here because that variable is for the BOT avatar (logo case). */
|
|
934
991
|
object-fit: cover;
|
|
935
992
|
}
|
|
993
|
+
/* Bot-side image rendered via WidgetLogo inside the conv-card-avatar.
|
|
994
|
+
Reaches the same fallback chain used in the chat header so uploaded
|
|
995
|
+
logos get contain + padding here as well. */
|
|
996
|
+
.hw-conv-card-avatar .hw-agent-img {
|
|
997
|
+
object-fit: var(--hw-agent-fit, var(--hw-agent-fit-default, cover));
|
|
998
|
+
padding: var(--hw-agent-pad, var(--hw-agent-pad-default, 0));
|
|
999
|
+
box-sizing: border-box;
|
|
1000
|
+
}
|
|
936
1001
|
.hw-conv-card-avatar--team {
|
|
937
1002
|
background: var(--hw-brand, #0a0a0a);
|
|
938
1003
|
color: var(--hw-on-brand, #fff);
|
|
@@ -2287,7 +2352,10 @@
|
|
|
2287
2352
|
width: 32px;
|
|
2288
2353
|
height: 32px;
|
|
2289
2354
|
border-radius: 50%;
|
|
2290
|
-
|
|
2355
|
+
/* Fallback chain mirroring chat-header / conv-list — uploaded-logo
|
|
2356
|
+
smart default reaches event rows (joined/left) when the bot
|
|
2357
|
+
avatar is the one being shown. Falls through to legacy gray. */
|
|
2358
|
+
background: var(--hw-agent-bg, var(--hw-agent-bg-default, var(--hw-bg-hover, #e0e0e0)));
|
|
2291
2359
|
color: var(--hw-text-2, #555);
|
|
2292
2360
|
display: flex;
|
|
2293
2361
|
align-items: center;
|
|
@@ -2300,8 +2368,16 @@
|
|
|
2300
2368
|
.hw-event-avatar-img {
|
|
2301
2369
|
width: 100%;
|
|
2302
2370
|
height: 100%;
|
|
2371
|
+
/* Same reasoning as conv-card-avatar-img: this is the human/team
|
|
2372
|
+
member's photo, cover is intentional. Bot-side avatars rendered
|
|
2373
|
+
via WidgetLogo (.hw-agent-img) get the variable-driven fit below. */
|
|
2303
2374
|
object-fit: cover;
|
|
2304
2375
|
}
|
|
2376
|
+
.hw-event-avatar .hw-agent-img {
|
|
2377
|
+
object-fit: var(--hw-agent-fit, var(--hw-agent-fit-default, cover));
|
|
2378
|
+
padding: var(--hw-agent-pad, var(--hw-agent-pad-default, 0));
|
|
2379
|
+
box-sizing: border-box;
|
|
2380
|
+
}
|
|
2305
2381
|
|
|
2306
2382
|
.hw-event-body {
|
|
2307
2383
|
font-size: 13px;
|