@poolse/react-ui 1.0.3 → 1.0.5

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
@@ -660,8 +660,48 @@
660
660
 
661
661
  .poolse-composer__row {
662
662
  display: flex;
663
+ /* end-align so the buttons stay anchored to the bottom edge when
664
+ the textarea grows multi-line (lists, soft wraps). */
665
+ align-items: end;
666
+ gap: 8px;
667
+ }
668
+
669
+ /* In-composer paperclip — sits inside the composer row (left of the
670
+ textarea). Mirrors .poolse-attach-btn shape so the visual rhythm
671
+ matches the send button on the right. */
672
+ .poolse-composer__attach {
673
+ width: 40px;
674
+ height: 40px;
675
+ border-radius: 50%;
676
+ border: none;
677
+ background: transparent;
678
+ color: var(--poolse-ink-2);
679
+ cursor: pointer;
680
+ flex-shrink: 0;
681
+ display: inline-flex;
663
682
  align-items: center;
664
- gap: 10px;
683
+ justify-content: center;
684
+ transition:
685
+ background-color 0.12s,
686
+ color 0.12s;
687
+ }
688
+
689
+ .poolse-composer__attach:hover:not(:disabled) {
690
+ background: var(--poolse-surface-2);
691
+ color: var(--poolse-ink);
692
+ }
693
+
694
+ .poolse-composer__attach:disabled {
695
+ opacity: 0.5;
696
+ cursor: not-allowed;
697
+ }
698
+
699
+ /* Mobile: bump touch target to 44x44 alongside the other composer controls. */
700
+ @media (max-width: 760px) {
701
+ .poolse-composer__attach {
702
+ width: 44px;
703
+ height: 44px;
704
+ }
665
705
  }
666
706
 
667
707
  /* Quote-reply chip — sits above the textarea while the caller has
@@ -1361,12 +1401,18 @@
1361
1401
 
1362
1402
  .poolse-reaction-picker {
1363
1403
  display: inline-flex;
1404
+ flex-wrap: wrap;
1364
1405
  gap: 4px;
1365
1406
  padding: 6px;
1366
1407
  background: var(--poolse-surface);
1367
1408
  border: 1px solid var(--poolse-border);
1368
1409
  border-radius: var(--poolse-radius-lg);
1369
1410
  box-shadow: var(--poolse-shadow-md);
1411
+ /* Cap width so the picker can't overflow narrow viewports. Anchors
1412
+ to the same edge as the actions toolbar via
1413
+ .poolse-msg-actions__picker; if it would exceed the bubble's
1414
+ side it wraps to a second row instead of clipping off-screen. */
1415
+ max-width: min(280px, calc(100vw - 16px));
1370
1416
  }
1371
1417
 
1372
1418
  .poolse-reaction-picker__btn {
@@ -1476,6 +1522,10 @@
1476
1522
  color: var(--poolse-error);
1477
1523
  }
1478
1524
 
1525
+ /* Reactions picker — mirrors the actions popover's edge alignment so
1526
+ it stays anchored to the same side as the toolbar (right for self,
1527
+ left for other). On narrow viewports the picker wraps to two rows
1528
+ so it never overflows the bubble's max-width. */
1479
1529
  .poolse-msg-actions__picker {
1480
1530
  position: absolute;
1481
1531
  /* Picker appears BELOW the actions toolbar so the stack is
@@ -1485,6 +1535,14 @@
1485
1535
  z-index: 10;
1486
1536
  }
1487
1537
 
1538
+ /* When the row's actions are right-aligned (self bubbles), the picker
1539
+ anchors to the right edge of the toolbar so it extends LEFT — same
1540
+ "into available space" behavior the toolbar itself uses. */
1541
+ .poolse-message-row__actions--right .poolse-msg-actions__picker {
1542
+ left: auto;
1543
+ right: 0;
1544
+ }
1545
+
1488
1546
  /* Default container that customers can wrap each message in for
1489
1547
  hover-show behavior. Adds positioning context + reveals the
1490
1548
  actions only on row hover. */
@@ -1520,14 +1578,15 @@
1520
1578
  left: 0;
1521
1579
  }
1522
1580
 
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 {
1581
+ /* Reveal the actions popover only on explicit open — click on chevron
1582
+ (desktop) / tap-on-bubble (touch) sets data-actions-open; the
1583
+ popover then stays open while any of its OWN buttons have focus
1584
+ (so keyboard tabbing inside doesn't dismiss it).
1585
+ We deliberately do NOT use `.poolse-message-row:focus-within` here:
1586
+ that would also open on any other focusable descendant (e.g. the
1587
+ thread-pill "N replies" button), which is the wrong UX. */
1588
+ .poolse-message-row[data-actions-open] .poolse-message-row__actions,
1589
+ .poolse-message-row__actions:focus-within {
1531
1590
  opacity: 1;
1532
1591
  pointer-events: auto;
1533
1592
  }
@@ -1581,8 +1640,14 @@
1581
1640
  color: var(--poolse-ink);
1582
1641
  }
1583
1642
 
1643
+ /* Chevron reveal — show on row hover (desktop discoverability), on
1644
+ its own focus (keyboard users tabbing through), or whenever the
1645
+ popover is open. We can't use row :focus-within (that would also
1646
+ reveal it while a thread-pill or reaction button has focus, which
1647
+ isn't what we want) — focusing the chevron itself or a popover
1648
+ button keeps both visible. */
1584
1649
  .poolse-message-row:hover .poolse-message__chevron,
1585
- .poolse-message-row:focus-within .poolse-message__chevron,
1650
+ .poolse-message__chevron:focus,
1586
1651
  .poolse-message-row[data-actions-open] .poolse-message__chevron {
1587
1652
  opacity: 1;
1588
1653
  pointer-events: auto;
@@ -1621,8 +1686,9 @@
1621
1686
 
1622
1687
  .poolse-message--self .poolse-message__edit {
1623
1688
  /* Switch self-edit to a surface-color textarea — coral background
1624
- would make the cursor invisible. */
1625
- background: var(--poolse-on-brand);
1689
+ would make the cursor invisible. Use --poolse-surface (theme-aware)
1690
+ rather than --poolse-on-brand (always light, breaks dark theme). */
1691
+ background: var(--poolse-surface);
1626
1692
  color: var(--poolse-ink);
1627
1693
  }
1628
1694
 
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.5",
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/sdk": "1.0.5",
50
+ "@poolse/react": "1.0.5"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "react": ">=18"