@poolse/react-ui 1.0.3 → 1.0.4

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/styles.css CHANGED
@@ -1361,12 +1361,18 @@
1361
1361
 
1362
1362
  .poolse-reaction-picker {
1363
1363
  display: inline-flex;
1364
+ flex-wrap: wrap;
1364
1365
  gap: 4px;
1365
1366
  padding: 6px;
1366
1367
  background: var(--poolse-surface);
1367
1368
  border: 1px solid var(--poolse-border);
1368
1369
  border-radius: var(--poolse-radius-lg);
1369
1370
  box-shadow: var(--poolse-shadow-md);
1371
+ /* Cap width so the picker can't overflow narrow viewports. Anchors
1372
+ to the same edge as the actions toolbar via
1373
+ .poolse-msg-actions__picker; if it would exceed the bubble's
1374
+ side it wraps to a second row instead of clipping off-screen. */
1375
+ max-width: min(280px, calc(100vw - 16px));
1370
1376
  }
1371
1377
 
1372
1378
  .poolse-reaction-picker__btn {
@@ -1476,6 +1482,10 @@
1476
1482
  color: var(--poolse-error);
1477
1483
  }
1478
1484
 
1485
+ /* Reactions picker — mirrors the actions popover's edge alignment so
1486
+ it stays anchored to the same side as the toolbar (right for self,
1487
+ left for other). On narrow viewports the picker wraps to two rows
1488
+ so it never overflows the bubble's max-width. */
1479
1489
  .poolse-msg-actions__picker {
1480
1490
  position: absolute;
1481
1491
  /* Picker appears BELOW the actions toolbar so the stack is
@@ -1485,6 +1495,14 @@
1485
1495
  z-index: 10;
1486
1496
  }
1487
1497
 
1498
+ /* When the row's actions are right-aligned (self bubbles), the picker
1499
+ anchors to the right edge of the toolbar so it extends LEFT — same
1500
+ "into available space" behavior the toolbar itself uses. */
1501
+ .poolse-message-row__actions--right .poolse-msg-actions__picker {
1502
+ left: auto;
1503
+ right: 0;
1504
+ }
1505
+
1488
1506
  /* Default container that customers can wrap each message in for
1489
1507
  hover-show behavior. Adds positioning context + reveals the
1490
1508
  actions only on row hover. */
@@ -1520,14 +1538,15 @@
1520
1538
  left: 0;
1521
1539
  }
1522
1540
 
1523
- /* Reveal the actions popover only on explicit open — keyboard focus
1524
- (focus-within) or click (data-actions-open via chevron on desktop /
1525
- tap-on-bubble on touch). Pure hover used to open it, but the gap
1526
- between bubble and popover was a no-mans-land that closed the popover
1527
- before the cursor reached it. The chevron trigger eliminates the
1528
- gap-crossing problem entirely. */
1529
- .poolse-message-row:focus-within .poolse-message-row__actions,
1530
- .poolse-message-row[data-actions-open] .poolse-message-row__actions {
1541
+ /* Reveal the actions popover only on explicit open — click on chevron
1542
+ (desktop) / tap-on-bubble (touch) sets data-actions-open; the
1543
+ popover then stays open while any of its OWN buttons have focus
1544
+ (so keyboard tabbing inside doesn't dismiss it).
1545
+ We deliberately do NOT use `.poolse-message-row:focus-within` here:
1546
+ that would also open on any other focusable descendant (e.g. the
1547
+ thread-pill "N replies" button), which is the wrong UX. */
1548
+ .poolse-message-row[data-actions-open] .poolse-message-row__actions,
1549
+ .poolse-message-row__actions:focus-within {
1531
1550
  opacity: 1;
1532
1551
  pointer-events: auto;
1533
1552
  }
@@ -1581,8 +1600,14 @@
1581
1600
  color: var(--poolse-ink);
1582
1601
  }
1583
1602
 
1603
+ /* Chevron reveal — show on row hover (desktop discoverability), on
1604
+ its own focus (keyboard users tabbing through), or whenever the
1605
+ popover is open. We can't use row :focus-within (that would also
1606
+ reveal it while a thread-pill or reaction button has focus, which
1607
+ isn't what we want) — focusing the chevron itself or a popover
1608
+ button keeps both visible. */
1584
1609
  .poolse-message-row:hover .poolse-message__chevron,
1585
- .poolse-message-row:focus-within .poolse-message__chevron,
1610
+ .poolse-message__chevron:focus,
1586
1611
  .poolse-message-row[data-actions-open] .poolse-message__chevron {
1587
1612
  opacity: 1;
1588
1613
  pointer-events: auto;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poolse/react-ui",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Plug-and-play React components for poolse — realtime chat infrastructure. Brand-aligned defaults, CSS-variable theming, render-prop escape hatches.",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -46,8 +46,8 @@
46
46
  "dependencies": {
47
47
  "react-markdown": "^9.0.1",
48
48
  "remark-gfm": "^4.0.0",
49
- "@poolse/sdk": "1.0.3",
50
- "@poolse/react": "1.0.3"
49
+ "@poolse/react": "1.0.4",
50
+ "@poolse/sdk": "1.0.4"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "react": ">=18"