@helpway/react 0.6.0 → 0.7.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 +6 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/themed/styles.css +33 -1
package/package.json
CHANGED
package/src/themed/styles.css
CHANGED
|
@@ -241,6 +241,26 @@
|
|
|
241
241
|
border-radius: 0; /* bubble itself handles rounding */
|
|
242
242
|
}
|
|
243
243
|
|
|
244
|
+
/* Logo variant (admin-uploaded launcherIconUrl OR website.logoUrl) —
|
|
245
|
+
logos carry their own padding rules and shouldn't be cropped. Use
|
|
246
|
+
`contain` + inner padding so SVG/PNG marks render at intended
|
|
247
|
+
proportion inside the rounded bubble. `object-fit: cover` is correct
|
|
248
|
+
only for face avatars. Padding is applied directly on the img so it
|
|
249
|
+
works regardless of whether the parent has --logo / --avatar class. */
|
|
250
|
+
.hw-agent-img.hw-agent-img--logo {
|
|
251
|
+
object-fit: contain;
|
|
252
|
+
padding: 10px;
|
|
253
|
+
box-sizing: border-box;
|
|
254
|
+
}
|
|
255
|
+
/* Higher-specificity override: .hw-bubble--avatar's inner img rule sets
|
|
256
|
+
width/height + border-radius:0 with 3-class specificity. Match that
|
|
257
|
+
so logo padding actually applies inside the bubble. */
|
|
258
|
+
.hw-bubble--avatar .hw-bubble-icon--bot .hw-agent-img.hw-agent-img--logo {
|
|
259
|
+
padding: 10px;
|
|
260
|
+
box-sizing: border-box;
|
|
261
|
+
object-fit: contain;
|
|
262
|
+
}
|
|
263
|
+
|
|
244
264
|
.hw-bubble-icon--close svg {
|
|
245
265
|
width: 22px;
|
|
246
266
|
height: 22px;
|
|
@@ -557,6 +577,11 @@
|
|
|
557
577
|
justify-content: center;
|
|
558
578
|
border-radius: 8px;
|
|
559
579
|
overflow: hidden;
|
|
580
|
+
/* Public override hook — light SVG/PNG logos disappear on white
|
|
581
|
+
chat-header cards. Site stylesheet sets `--hw-agent-bg` to a
|
|
582
|
+
contrast color (e.g. brand color) and the avatar gets a tinted
|
|
583
|
+
circle behind it. Default `transparent` preserves legacy look. */
|
|
584
|
+
background: var(--hw-agent-bg, transparent);
|
|
560
585
|
}
|
|
561
586
|
.hw-header-bot-icon svg {
|
|
562
587
|
width: 24px;
|
|
@@ -569,7 +594,14 @@
|
|
|
569
594
|
.hw-header-agent-img {
|
|
570
595
|
width: 100%;
|
|
571
596
|
height: 100%;
|
|
572
|
-
|
|
597
|
+
/* Override hooks: `--hw-agent-fit` swaps cover→contain so logos
|
|
598
|
+
aren't cropped, `--hw-agent-pad` adds breathing room around the
|
|
599
|
+
logo inside the circle. Defaults match legacy face-photo
|
|
600
|
+
behavior. Padding requires border-box so it stays inside the
|
|
601
|
+
circle rather than expanding the img. */
|
|
602
|
+
object-fit: var(--hw-agent-fit, cover);
|
|
603
|
+
padding: var(--hw-agent-pad, 0);
|
|
604
|
+
box-sizing: border-box;
|
|
573
605
|
}
|
|
574
606
|
.hw-header-agent-initials {
|
|
575
607
|
font-size: 11px;
|