@helpway/react 0.5.0 → 0.6.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@helpway/react",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Official React SDK for Helpway — drop-in AI chat support widget with headless hooks for custom UIs.",
5
5
  "keywords": [
6
6
  "helpway",
@@ -41,8 +41,13 @@
41
41
  padding: 0;
42
42
  }
43
43
 
44
- /* ── Tokens ────────────────────────────────────── */
45
- .hw-widget {
44
+ /* ── Tokens ──────────────────────────────────────
45
+ Wrapped in :where() so the default token block has zero specificity.
46
+ That way `applyTheme()` (which writes inline styles onto the host
47
+ element and onto documentElement as a fallback) always wins, and
48
+ anyone setting --hw-* via their own stylesheet doesn't need
49
+ `!important` to override us. */
50
+ :where(.hw-widget) {
46
51
  --hw-primary: #171717;
47
52
  --hw-primary-hover: #2a2a2a;
48
53
  /* Brand surface used by team-avatar fallbacks and primary CTAs.
@@ -837,7 +842,7 @@
837
842
  color: var(--hw-text);
838
843
  }
839
844
  .hw-recent-row--unread .hw-conv-card-time {
840
- color: var(--hw-accent);
845
+ color: var(--hw-primary);
841
846
  font-weight: 500;
842
847
  }
843
848
 
@@ -978,7 +983,7 @@
978
983
  color: var(--hw-text);
979
984
  }
980
985
  .hw-conv-card--unread .hw-conv-card-time {
981
- color: var(--hw-accent);
986
+ color: var(--hw-primary);
982
987
  font-weight: 500;
983
988
  }
984
989
 
@@ -1317,6 +1322,55 @@
1317
1322
  width: 100%;
1318
1323
  }
1319
1324
 
1325
+ /* Quick reply buttons — interactive workflow choices */
1326
+ .hw-quick-replies {
1327
+ display: flex;
1328
+ flex-wrap: wrap;
1329
+ gap: 6px;
1330
+ margin-top: 8px;
1331
+ }
1332
+
1333
+ .hw-quick-reply-btn {
1334
+ font: inherit;
1335
+ font-size: 13px;
1336
+ font-weight: 500;
1337
+ padding: 6px 14px;
1338
+ border-radius: 18px;
1339
+ border: 1px solid rgba(0, 0, 0, 0.12);
1340
+ background: var(--hw-bg, #fff);
1341
+ color: var(--hw-text-1, #1a1a1a);
1342
+ cursor: pointer;
1343
+ transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease, transform 80ms ease;
1344
+ line-height: 1.3;
1345
+ }
1346
+
1347
+ .hw-quick-reply-btn:hover:not(:disabled) {
1348
+ border-color: var(--hw-primary);
1349
+ background: color-mix(in srgb, var(--hw-primary) 8%, transparent);
1350
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
1351
+ }
1352
+
1353
+ .hw-quick-reply-btn:active:not(:disabled) {
1354
+ transform: scale(0.97);
1355
+ }
1356
+
1357
+ .hw-quick-reply-btn:disabled {
1358
+ cursor: default;
1359
+ opacity: 0.4;
1360
+ }
1361
+
1362
+ .hw-quick-reply-btn[data-tapped="true"] {
1363
+ background: var(--hw-primary);
1364
+ color: white;
1365
+ border-color: var(--hw-primary);
1366
+ opacity: 1;
1367
+ }
1368
+
1369
+ .hw-quick-replies[data-cancelled="true"] .hw-quick-reply-btn {
1370
+ border-color: rgba(0, 0, 0, 0.08);
1371
+ color: var(--hw-text-muted, #9ca3af);
1372
+ }
1373
+
1320
1374
  .hw-msg--ai .hw-code {
1321
1375
  width: 100%;
1322
1376
  box-sizing: border-box;
@@ -2468,10 +2522,6 @@
2468
2522
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
2469
2523
  }
2470
2524
 
2471
- .hw-preview--closing {
2472
- animation: hw-preview-out 0.2s ease forwards;
2473
- }
2474
-
2475
2525
  @keyframes hw-preview-in {
2476
2526
  from {
2477
2527
  opacity: 0;
@@ -2553,14 +2603,52 @@
2553
2603
  }
2554
2604
 
2555
2605
  .hw-preview-body {
2556
- padding: 8px 14px 14px;
2606
+ padding: 4px 14px;
2557
2607
  font-size: 14px;
2558
2608
  line-height: 1.45;
2559
2609
  color: var(--hw-text-2);
2560
- display: -webkit-box;
2561
- -webkit-line-clamp: 3;
2562
- -webkit-box-orient: vertical;
2563
- overflow: hidden;
2610
+ }
2611
+
2612
+ .hw-preview-body:first-of-type {
2613
+ padding-top: 8px;
2614
+ }
2615
+
2616
+ .hw-preview-body:last-child {
2617
+ padding-bottom: 14px;
2618
+ }
2619
+
2620
+ .hw-preview-prompt {
2621
+ padding: 2px 14px 6px;
2622
+ font-size: 14px;
2623
+ font-weight: 500;
2624
+ color: var(--hw-text-1);
2625
+ }
2626
+
2627
+ .hw-preview-quick-replies {
2628
+ display: flex;
2629
+ flex-wrap: wrap;
2630
+ gap: 6px;
2631
+ padding: 0 14px 14px;
2632
+ }
2633
+
2634
+ .hw-preview-qr-btn {
2635
+ display: inline-flex;
2636
+ align-items: center;
2637
+ padding: 6px 14px;
2638
+ font-size: 13px;
2639
+ font-weight: 500;
2640
+ line-height: 1.3;
2641
+ color: var(--hw-brand, #000);
2642
+ background: transparent;
2643
+ border: 1px solid var(--hw-border, rgba(0, 0, 0, 0.1));
2644
+ border-radius: 18px;
2645
+ cursor: pointer;
2646
+ transition: background 0.15s, border-color 0.15s;
2647
+ }
2648
+
2649
+ .hw-preview-qr-btn:hover {
2650
+ background: var(--hw-hover, rgba(0, 0, 0, 0.04));
2651
+ border-color: var(--hw-brand, #000);
2564
2652
  }
2565
2653
 
2566
2654
  /* ═══════════════════════════════════════════════════════════