@poolse/react-ui 2.0.1 → 2.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/index.cjs +457 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +112 -2
- package/dist/index.d.ts +112 -2
- package/dist/index.js +456 -9
- package/dist/index.js.map +1 -1
- package/dist/styles.css +405 -0
- package/package.json +3 -3
package/dist/styles.css
CHANGED
|
@@ -2411,3 +2411,408 @@
|
|
|
2411
2411
|
filter: none;
|
|
2412
2412
|
}
|
|
2413
2413
|
}
|
|
2414
|
+
|
|
2415
|
+
/* ─────────────────────────────────────────────────────────────
|
|
2416
|
+
ChatHeader — title bar above a ConversationView. Standalone
|
|
2417
|
+
so PoolseInbox can mount it without ConversationView wrapping
|
|
2418
|
+
its own header.
|
|
2419
|
+
───────────────────────────────────────────────────────────── */
|
|
2420
|
+
|
|
2421
|
+
.poolse-chat-header {
|
|
2422
|
+
display: flex;
|
|
2423
|
+
align-items: center;
|
|
2424
|
+
gap: 10px;
|
|
2425
|
+
padding: 10px 14px;
|
|
2426
|
+
background: var(--poolse-surface);
|
|
2427
|
+
border-bottom: 1px solid var(--poolse-border);
|
|
2428
|
+
}
|
|
2429
|
+
|
|
2430
|
+
.poolse-chat-header__back {
|
|
2431
|
+
/* Re-uses the `reply` glyph rotated to point left — matches RN. */
|
|
2432
|
+
transform: scaleX(-1);
|
|
2433
|
+
}
|
|
2434
|
+
|
|
2435
|
+
.poolse-chat-header__title-btn,
|
|
2436
|
+
.poolse-chat-header__title-row {
|
|
2437
|
+
display: flex;
|
|
2438
|
+
align-items: center;
|
|
2439
|
+
gap: 10px;
|
|
2440
|
+
flex: 1;
|
|
2441
|
+
min-width: 0;
|
|
2442
|
+
}
|
|
2443
|
+
|
|
2444
|
+
.poolse-chat-header__title-btn {
|
|
2445
|
+
appearance: none;
|
|
2446
|
+
background: transparent;
|
|
2447
|
+
border: 0;
|
|
2448
|
+
padding: 0;
|
|
2449
|
+
text-align: left;
|
|
2450
|
+
cursor: pointer;
|
|
2451
|
+
color: inherit;
|
|
2452
|
+
font: inherit;
|
|
2453
|
+
}
|
|
2454
|
+
|
|
2455
|
+
.poolse-chat-header__titles {
|
|
2456
|
+
display: flex;
|
|
2457
|
+
flex-direction: column;
|
|
2458
|
+
gap: 2px;
|
|
2459
|
+
min-width: 0;
|
|
2460
|
+
}
|
|
2461
|
+
|
|
2462
|
+
.poolse-chat-header__title {
|
|
2463
|
+
font-family: var(--poolse-font-display);
|
|
2464
|
+
font-size: 15px;
|
|
2465
|
+
font-weight: 600;
|
|
2466
|
+
color: var(--poolse-ink);
|
|
2467
|
+
overflow: hidden;
|
|
2468
|
+
text-overflow: ellipsis;
|
|
2469
|
+
white-space: nowrap;
|
|
2470
|
+
}
|
|
2471
|
+
|
|
2472
|
+
.poolse-chat-header__subtitle {
|
|
2473
|
+
font-size: 12px;
|
|
2474
|
+
color: var(--poolse-ink-3);
|
|
2475
|
+
}
|
|
2476
|
+
|
|
2477
|
+
.poolse-chat-header__actions {
|
|
2478
|
+
display: flex;
|
|
2479
|
+
align-items: center;
|
|
2480
|
+
gap: 4px;
|
|
2481
|
+
margin-left: auto;
|
|
2482
|
+
}
|
|
2483
|
+
|
|
2484
|
+
/* ─────────────────────────────────────────────────────────────
|
|
2485
|
+
PoolseInbox — composed list + detail shell.
|
|
2486
|
+
Wide viewport: two-column. Mobile: detail slides over list.
|
|
2487
|
+
───────────────────────────────────────────────────────────── */
|
|
2488
|
+
|
|
2489
|
+
.poolse-inbox {
|
|
2490
|
+
display: grid;
|
|
2491
|
+
grid-template-columns: minmax(260px, 320px) 1fr;
|
|
2492
|
+
height: 100%;
|
|
2493
|
+
min-height: 0;
|
|
2494
|
+
background: var(--poolse-paper);
|
|
2495
|
+
color: var(--poolse-ink);
|
|
2496
|
+
font-family: var(--poolse-font-body);
|
|
2497
|
+
}
|
|
2498
|
+
|
|
2499
|
+
.poolse-inbox__list-pane {
|
|
2500
|
+
display: flex;
|
|
2501
|
+
flex-direction: column;
|
|
2502
|
+
min-height: 0;
|
|
2503
|
+
border-right: 1px solid var(--poolse-border);
|
|
2504
|
+
background: var(--poolse-surface);
|
|
2505
|
+
}
|
|
2506
|
+
|
|
2507
|
+
.poolse-inbox__list-header {
|
|
2508
|
+
display: flex;
|
|
2509
|
+
align-items: center;
|
|
2510
|
+
gap: 8px;
|
|
2511
|
+
padding: 12px 14px;
|
|
2512
|
+
border-bottom: 1px solid var(--poolse-border);
|
|
2513
|
+
}
|
|
2514
|
+
|
|
2515
|
+
.poolse-inbox__list-title {
|
|
2516
|
+
flex: 1;
|
|
2517
|
+
font-family: var(--poolse-font-display);
|
|
2518
|
+
font-size: 18px;
|
|
2519
|
+
font-weight: 700;
|
|
2520
|
+
color: var(--poolse-ink);
|
|
2521
|
+
}
|
|
2522
|
+
|
|
2523
|
+
.poolse-inbox__list-actions {
|
|
2524
|
+
display: flex;
|
|
2525
|
+
align-items: center;
|
|
2526
|
+
gap: 4px;
|
|
2527
|
+
}
|
|
2528
|
+
|
|
2529
|
+
.poolse-inbox__list-scroll {
|
|
2530
|
+
flex: 1;
|
|
2531
|
+
min-height: 0;
|
|
2532
|
+
overflow-y: auto;
|
|
2533
|
+
}
|
|
2534
|
+
|
|
2535
|
+
.poolse-inbox__detail-pane {
|
|
2536
|
+
display: flex;
|
|
2537
|
+
flex-direction: column;
|
|
2538
|
+
min-height: 0;
|
|
2539
|
+
background: var(--poolse-paper);
|
|
2540
|
+
}
|
|
2541
|
+
|
|
2542
|
+
.poolse-inbox__detail-empty {
|
|
2543
|
+
flex: 1;
|
|
2544
|
+
display: flex;
|
|
2545
|
+
flex-direction: column;
|
|
2546
|
+
align-items: center;
|
|
2547
|
+
justify-content: center;
|
|
2548
|
+
gap: 12px;
|
|
2549
|
+
color: var(--poolse-ink-3);
|
|
2550
|
+
}
|
|
2551
|
+
|
|
2552
|
+
.poolse-inbox__detail-empty-title {
|
|
2553
|
+
font-size: 14px;
|
|
2554
|
+
font-family: var(--poolse-font-display);
|
|
2555
|
+
font-weight: 600;
|
|
2556
|
+
}
|
|
2557
|
+
|
|
2558
|
+
/* Mobile-web: stack panes, slide detail over list when one is open. */
|
|
2559
|
+
@media (max-width: 720px) {
|
|
2560
|
+
.poolse-inbox {
|
|
2561
|
+
grid-template-columns: 1fr;
|
|
2562
|
+
position: relative;
|
|
2563
|
+
}
|
|
2564
|
+
|
|
2565
|
+
.poolse-inbox__detail-pane {
|
|
2566
|
+
position: absolute;
|
|
2567
|
+
inset: 0;
|
|
2568
|
+
transform: translateX(100%);
|
|
2569
|
+
transition: transform 220ms ease;
|
|
2570
|
+
z-index: 2;
|
|
2571
|
+
}
|
|
2572
|
+
|
|
2573
|
+
.poolse-inbox--detail-open .poolse-inbox__detail-pane {
|
|
2574
|
+
transform: translateX(0);
|
|
2575
|
+
}
|
|
2576
|
+
}
|
|
2577
|
+
|
|
2578
|
+
/* ─────────────────────────────────────────────────────────────
|
|
2579
|
+
Modal shell — used by UserPickerSheet, GroupDetailsSheet.
|
|
2580
|
+
Centered card with a dimming backdrop.
|
|
2581
|
+
───────────────────────────────────────────────────────────── */
|
|
2582
|
+
|
|
2583
|
+
.poolse-modal {
|
|
2584
|
+
position: fixed;
|
|
2585
|
+
inset: 0;
|
|
2586
|
+
background: rgba(0, 0, 0, 0.45);
|
|
2587
|
+
display: flex;
|
|
2588
|
+
align-items: center;
|
|
2589
|
+
justify-content: center;
|
|
2590
|
+
padding: 16px;
|
|
2591
|
+
z-index: 50;
|
|
2592
|
+
}
|
|
2593
|
+
|
|
2594
|
+
.poolse-modal__sheet {
|
|
2595
|
+
background: var(--poolse-surface);
|
|
2596
|
+
color: var(--poolse-ink);
|
|
2597
|
+
border-radius: var(--poolse-radius-lg);
|
|
2598
|
+
box-shadow: var(--poolse-shadow-lg);
|
|
2599
|
+
width: 100%;
|
|
2600
|
+
max-width: 440px;
|
|
2601
|
+
max-height: min(80vh, 720px);
|
|
2602
|
+
display: flex;
|
|
2603
|
+
flex-direction: column;
|
|
2604
|
+
overflow: hidden;
|
|
2605
|
+
}
|
|
2606
|
+
|
|
2607
|
+
.poolse-modal__header {
|
|
2608
|
+
display: flex;
|
|
2609
|
+
align-items: center;
|
|
2610
|
+
gap: 8px;
|
|
2611
|
+
padding: 12px 14px;
|
|
2612
|
+
border-bottom: 1px solid var(--poolse-border);
|
|
2613
|
+
}
|
|
2614
|
+
|
|
2615
|
+
.poolse-modal__title {
|
|
2616
|
+
flex: 1;
|
|
2617
|
+
font-family: var(--poolse-font-display);
|
|
2618
|
+
font-size: 16px;
|
|
2619
|
+
font-weight: 700;
|
|
2620
|
+
}
|
|
2621
|
+
|
|
2622
|
+
.poolse-modal__body {
|
|
2623
|
+
flex: 1;
|
|
2624
|
+
min-height: 0;
|
|
2625
|
+
overflow-y: auto;
|
|
2626
|
+
padding: 12px 14px;
|
|
2627
|
+
display: flex;
|
|
2628
|
+
flex-direction: column;
|
|
2629
|
+
gap: 10px;
|
|
2630
|
+
}
|
|
2631
|
+
|
|
2632
|
+
.poolse-modal__footer {
|
|
2633
|
+
display: flex;
|
|
2634
|
+
align-items: center;
|
|
2635
|
+
justify-content: space-between;
|
|
2636
|
+
gap: 8px;
|
|
2637
|
+
padding: 10px 14px;
|
|
2638
|
+
border-top: 1px solid var(--poolse-border);
|
|
2639
|
+
background: var(--poolse-surface-2);
|
|
2640
|
+
}
|
|
2641
|
+
|
|
2642
|
+
.poolse-modal__footer-hint {
|
|
2643
|
+
font-size: 12px;
|
|
2644
|
+
color: var(--poolse-ink-3);
|
|
2645
|
+
}
|
|
2646
|
+
|
|
2647
|
+
.poolse-modal__search {
|
|
2648
|
+
display: flex;
|
|
2649
|
+
align-items: center;
|
|
2650
|
+
gap: 6px;
|
|
2651
|
+
padding: 8px 10px;
|
|
2652
|
+
background: var(--poolse-surface-2);
|
|
2653
|
+
border-radius: var(--poolse-radius-md);
|
|
2654
|
+
color: var(--poolse-ink-2);
|
|
2655
|
+
}
|
|
2656
|
+
|
|
2657
|
+
/* ─────────────────────────────────────────────────────────────
|
|
2658
|
+
Inputs + buttons — generic primitives used by modals.
|
|
2659
|
+
───────────────────────────────────────────────────────────── */
|
|
2660
|
+
|
|
2661
|
+
.poolse-input {
|
|
2662
|
+
appearance: none;
|
|
2663
|
+
width: 100%;
|
|
2664
|
+
padding: 10px 12px;
|
|
2665
|
+
background: var(--poolse-surface-2);
|
|
2666
|
+
color: var(--poolse-ink);
|
|
2667
|
+
border: 1px solid transparent;
|
|
2668
|
+
border-radius: var(--poolse-radius-md);
|
|
2669
|
+
font-family: var(--poolse-font-body);
|
|
2670
|
+
font-size: 14px;
|
|
2671
|
+
outline: none;
|
|
2672
|
+
}
|
|
2673
|
+
|
|
2674
|
+
.poolse-input:focus-visible {
|
|
2675
|
+
border-color: var(--poolse-brand);
|
|
2676
|
+
}
|
|
2677
|
+
|
|
2678
|
+
.poolse-input--bare {
|
|
2679
|
+
background: transparent;
|
|
2680
|
+
padding: 0;
|
|
2681
|
+
border: 0;
|
|
2682
|
+
}
|
|
2683
|
+
|
|
2684
|
+
.poolse-btn {
|
|
2685
|
+
appearance: none;
|
|
2686
|
+
display: inline-flex;
|
|
2687
|
+
align-items: center;
|
|
2688
|
+
justify-content: center;
|
|
2689
|
+
gap: 6px;
|
|
2690
|
+
padding: 8px 14px;
|
|
2691
|
+
background: var(--poolse-surface-2);
|
|
2692
|
+
color: var(--poolse-ink);
|
|
2693
|
+
border: 0;
|
|
2694
|
+
border-radius: var(--poolse-radius-md);
|
|
2695
|
+
font-family: var(--poolse-font-body);
|
|
2696
|
+
font-size: 14px;
|
|
2697
|
+
font-weight: 600;
|
|
2698
|
+
cursor: pointer;
|
|
2699
|
+
transition: opacity 120ms ease;
|
|
2700
|
+
}
|
|
2701
|
+
|
|
2702
|
+
.poolse-btn:disabled {
|
|
2703
|
+
opacity: 0.5;
|
|
2704
|
+
cursor: not-allowed;
|
|
2705
|
+
}
|
|
2706
|
+
|
|
2707
|
+
.poolse-btn--brand {
|
|
2708
|
+
background: var(--poolse-brand);
|
|
2709
|
+
color: var(--poolse-on-brand);
|
|
2710
|
+
}
|
|
2711
|
+
|
|
2712
|
+
/* ─────────────────────────────────────────────────────────────
|
|
2713
|
+
UserPickerSheet — list of users for new-chat / new-group.
|
|
2714
|
+
───────────────────────────────────────────────────────────── */
|
|
2715
|
+
|
|
2716
|
+
.poolse-user-picker {
|
|
2717
|
+
list-style: none;
|
|
2718
|
+
margin: 0;
|
|
2719
|
+
padding: 0;
|
|
2720
|
+
display: flex;
|
|
2721
|
+
flex-direction: column;
|
|
2722
|
+
}
|
|
2723
|
+
|
|
2724
|
+
.poolse-user-picker__empty {
|
|
2725
|
+
padding: 20px 4px;
|
|
2726
|
+
color: var(--poolse-ink-3);
|
|
2727
|
+
font-size: 13px;
|
|
2728
|
+
text-align: center;
|
|
2729
|
+
}
|
|
2730
|
+
|
|
2731
|
+
.poolse-user-picker__row {
|
|
2732
|
+
display: flex;
|
|
2733
|
+
align-items: center;
|
|
2734
|
+
gap: 10px;
|
|
2735
|
+
padding: 8px 6px;
|
|
2736
|
+
border-radius: var(--poolse-radius-md);
|
|
2737
|
+
cursor: pointer;
|
|
2738
|
+
}
|
|
2739
|
+
|
|
2740
|
+
.poolse-user-picker__row:hover,
|
|
2741
|
+
.poolse-user-picker__row--selected {
|
|
2742
|
+
background: var(--poolse-surface-2);
|
|
2743
|
+
}
|
|
2744
|
+
|
|
2745
|
+
.poolse-user-picker__body {
|
|
2746
|
+
flex: 1;
|
|
2747
|
+
min-width: 0;
|
|
2748
|
+
}
|
|
2749
|
+
|
|
2750
|
+
.poolse-user-picker__name {
|
|
2751
|
+
font-size: 14px;
|
|
2752
|
+
font-weight: 600;
|
|
2753
|
+
color: var(--poolse-ink);
|
|
2754
|
+
overflow: hidden;
|
|
2755
|
+
text-overflow: ellipsis;
|
|
2756
|
+
white-space: nowrap;
|
|
2757
|
+
}
|
|
2758
|
+
|
|
2759
|
+
.poolse-user-picker__subtitle {
|
|
2760
|
+
font-size: 12px;
|
|
2761
|
+
color: var(--poolse-ink-3);
|
|
2762
|
+
overflow: hidden;
|
|
2763
|
+
text-overflow: ellipsis;
|
|
2764
|
+
white-space: nowrap;
|
|
2765
|
+
}
|
|
2766
|
+
|
|
2767
|
+
.poolse-user-picker__check {
|
|
2768
|
+
width: 22px;
|
|
2769
|
+
height: 22px;
|
|
2770
|
+
border-radius: 11px;
|
|
2771
|
+
border: 1.5px solid var(--poolse-border);
|
|
2772
|
+
display: flex;
|
|
2773
|
+
align-items: center;
|
|
2774
|
+
justify-content: center;
|
|
2775
|
+
font-size: 13px;
|
|
2776
|
+
font-weight: 700;
|
|
2777
|
+
color: var(--poolse-on-brand);
|
|
2778
|
+
}
|
|
2779
|
+
|
|
2780
|
+
.poolse-user-picker__check--on {
|
|
2781
|
+
background: var(--poolse-brand);
|
|
2782
|
+
border-color: var(--poolse-brand);
|
|
2783
|
+
}
|
|
2784
|
+
|
|
2785
|
+
/* ─────────────────────────────────────────────────────────────
|
|
2786
|
+
GroupDetailsSheet — hero + member list inside the modal shell.
|
|
2787
|
+
───────────────────────────────────────────────────────────── */
|
|
2788
|
+
|
|
2789
|
+
.poolse-group-details__hero {
|
|
2790
|
+
display: flex;
|
|
2791
|
+
align-items: center;
|
|
2792
|
+
gap: 12px;
|
|
2793
|
+
padding-bottom: 8px;
|
|
2794
|
+
}
|
|
2795
|
+
|
|
2796
|
+
.poolse-group-details__hero-text {
|
|
2797
|
+
min-width: 0;
|
|
2798
|
+
}
|
|
2799
|
+
|
|
2800
|
+
.poolse-group-details__title {
|
|
2801
|
+
font-family: var(--poolse-font-display);
|
|
2802
|
+
font-size: 17px;
|
|
2803
|
+
font-weight: 700;
|
|
2804
|
+
color: var(--poolse-ink);
|
|
2805
|
+
overflow: hidden;
|
|
2806
|
+
text-overflow: ellipsis;
|
|
2807
|
+
white-space: nowrap;
|
|
2808
|
+
}
|
|
2809
|
+
|
|
2810
|
+
.poolse-group-details__subtitle {
|
|
2811
|
+
font-size: 12px;
|
|
2812
|
+
color: var(--poolse-ink-3);
|
|
2813
|
+
}
|
|
2814
|
+
|
|
2815
|
+
.poolse-group-details__members {
|
|
2816
|
+
border-top: 1px solid var(--poolse-border);
|
|
2817
|
+
padding-top: 8px;
|
|
2818
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@poolse/react-ui",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.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": "2.0.
|
|
50
|
-
"@poolse/react": "2.0.
|
|
49
|
+
"@poolse/sdk": "2.0.5",
|
|
50
|
+
"@poolse/react": "2.0.5"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"react": ">=18"
|