@crewlethq/ui 0.127.0 → 0.128.1

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.
Files changed (102) hide show
  1. package/dist/ActivityLine/index.js +3 -3
  2. package/dist/AppShell/index.js +2 -2
  3. package/dist/ArtifactBar/index.js +4 -4
  4. package/dist/ArtifactCard/index.js +3 -3
  5. package/dist/ArtifactMakeRow/index.js +1 -1
  6. package/dist/Avatar/index.js +1 -1
  7. package/dist/{Avatar-CRSLRUVT.css → Avatar-RHFI55UZ.css} +14 -0
  8. package/dist/AvatarPicker/index.js +6 -6
  9. package/dist/{AvatarStack-GNEJHEU6.css → AvatarStack-UNBXFHTZ.css} +14 -1
  10. package/dist/Clamp/Clamp.d.ts +50 -0
  11. package/dist/Clamp/index.d.ts +3 -0
  12. package/dist/Clamp/index.js +12 -0
  13. package/dist/Clamp-Q5WKCGWY.css +60 -0
  14. package/dist/CommentThread/index.js +1 -1
  15. package/dist/ContrastBadge/index.js +2 -2
  16. package/dist/ContrastHelp/index.js +3 -3
  17. package/dist/DataTable/index.js +2 -2
  18. package/dist/DataView/index.js +4 -4
  19. package/dist/DeepWorkCard/index.js +2 -2
  20. package/dist/DeliveryReceipt/DeliveryReceipt.d.ts +37 -24
  21. package/dist/DeliveryReceipt/index.js +1 -2
  22. package/dist/{DeliveryReceipt-G55ILD6O.css → DeliveryReceipt-BILVVNTO.css} +11 -14
  23. package/dist/DocTabsEditor/index.js +2 -2
  24. package/dist/{Editor-UIBCHECM.js → Editor-RCFNNOLO.js} +1 -1
  25. package/dist/EntityChip/index.js +1 -1
  26. package/dist/GraphCanvas/index.js +2 -2
  27. package/dist/HuePicker/index.js +4 -4
  28. package/dist/ImageUpload/index.js +1 -1
  29. package/dist/LogoSlot/index.js +3 -3
  30. package/dist/MarkdownEditor/index.js +4 -4
  31. package/dist/MentionMenu/MentionMenu.d.ts +4 -3
  32. package/dist/Menu/Menu.d.ts +4 -0
  33. package/dist/Menu/index.js +1 -1
  34. package/dist/MergeConflicts/index.js +4 -4
  35. package/dist/OrgLabel/index.js +1 -1
  36. package/dist/OrgNode/index.js +1 -1
  37. package/dist/OrgTable/index.js +1 -1
  38. package/dist/PeopleRail/index.js +1 -1
  39. package/dist/PresenceStack/index.js +1 -1
  40. package/dist/Principal/index.js +1 -1
  41. package/dist/PrincipalPicker/index.js +1 -1
  42. package/dist/RichEditor/index.js +1 -1
  43. package/dist/SearchTrigger/SearchTrigger.d.ts +15 -7
  44. package/dist/SearchTrigger/index.js +1 -1
  45. package/dist/{SearchTrigger-SE4GKNAY.css → SearchTrigger-MME7NIHX.css} +13 -1
  46. package/dist/SegmentedControl/index.js +3 -3
  47. package/dist/SetupWizard/index.js +2 -2
  48. package/dist/ShareDialog/index.js +1 -1
  49. package/dist/SheetColumnEditor/index.js +5 -5
  50. package/dist/SheetGrid/index.js +3 -3
  51. package/dist/SlideFilmstrip/index.js +2 -2
  52. package/dist/TableCells/index.js +1 -1
  53. package/dist/Tabs/index.js +2 -2
  54. package/dist/ThemeSwitcher/index.js +4 -4
  55. package/dist/ThreadSummary/ThreadSummary.d.ts +24 -16
  56. package/dist/ThreadSummary/index.js +2 -2
  57. package/dist/{ThreadSummary-2AFEU6NH.css → ThreadSummary-3AODTHAM.css} +44 -35
  58. package/dist/TimeRangePicker/index.js +4 -4
  59. package/dist/VersionCompare/index.js +4 -4
  60. package/dist/VersionTimeline/index.js +1 -1
  61. package/dist/WorkingLine/index.js +2 -2
  62. package/dist/{chunk-7MKWQ3ZL.js → chunk-3DAIOPAV.js} +1 -1
  63. package/dist/{chunk-TLZ7NG6T.js → chunk-3WSDAVE6.js} +1 -1
  64. package/dist/{chunk-4OKNZZ5E.js → chunk-7FSIBX4S.js} +1 -1
  65. package/dist/{chunk-5EOOS2VG.js → chunk-A3SQWUWG.js} +2 -3
  66. package/dist/{chunk-ORBM3IHQ.js → chunk-AIYSPVVZ.js} +1 -1
  67. package/dist/{chunk-2JXILC4H.js → chunk-AQV5GYSX.js} +2 -2
  68. package/dist/{chunk-5SMYKL3D.js → chunk-ARZGEHWE.js} +2 -2
  69. package/dist/{chunk-ICIJUGKK.js → chunk-CAFDQEDT.js} +2 -2
  70. package/dist/{chunk-CMS5MLTU.js → chunk-E3AFQTWT.js} +1 -1
  71. package/dist/{chunk-FIQGLZ5Q.js → chunk-EGHOU7U2.js} +7 -3
  72. package/dist/{chunk-BG4GI5W3.js → chunk-FNJCCVQX.js} +1 -1
  73. package/dist/chunk-GTNXDLYH.js +146 -0
  74. package/dist/{chunk-KANE3PVJ.js → chunk-H2QSDZTX.js} +1 -1
  75. package/dist/chunk-IZGB6SQE.js +89 -0
  76. package/dist/{chunk-2FRELJBU.js → chunk-J74M64CN.js} +1 -1
  77. package/dist/{chunk-L2N7SZFY.js → chunk-JY6WSDUG.js} +1 -1
  78. package/dist/{chunk-ERNT3UTB.js → chunk-K5WTII2H.js} +3 -4
  79. package/dist/{chunk-SIL5WE55.js → chunk-LPQF7Z44.js} +1 -1
  80. package/dist/{chunk-56WQTRIW.js → chunk-M5UZLZUM.js} +1 -1
  81. package/dist/{chunk-UL46NV3X.js → chunk-NLGRDKCK.js} +2 -2
  82. package/dist/{chunk-4VQYVWPU.js → chunk-NMBGVHGQ.js} +2 -2
  83. package/dist/{chunk-XUFVRAEB.js → chunk-NZUOUIL6.js} +2 -2
  84. package/dist/{chunk-4Q7AWZ6O.js → chunk-OIC6S5ES.js} +1 -1
  85. package/dist/{chunk-SFO4KY65.js → chunk-OYKQVTJB.js} +1 -1
  86. package/dist/{chunk-GHRCG45F.js → chunk-PFTUWDZN.js} +1 -1
  87. package/dist/{chunk-I5HJ6Y6E.js → chunk-U4HA6LRQ.js} +8 -14
  88. package/dist/{chunk-FODDW4BC.js → chunk-V2FD4RPS.js} +1 -1
  89. package/dist/{chunk-TU6IC2XD.js → chunk-V47JOO72.js} +1 -1
  90. package/dist/{chunk-UA7FQCD7.js → chunk-XZB53C7U.js} +2 -2
  91. package/dist/{chunk-FXKRSBUM.js → chunk-YGURXCUZ.js} +1 -1
  92. package/dist/generated/index.d.ts +1 -0
  93. package/dist/generated/index.js +74 -73
  94. package/dist/index.js +74 -73
  95. package/dist/styles.css +164 -56
  96. package/package.json +3 -3
  97. package/dist/chunk-WNPKXYDJ.js +0 -141
  98. package/dist/{chunk-QV3WVNRA.js → chunk-2KUAO2CX.js} +0 -0
  99. package/dist/{chunk-3YOLD7WG.js → chunk-F7NHMBGJ.js} +1 -1
  100. package/dist/{chunk-WJIBZ2UM.js → chunk-R4LHYCZN.js} +1 -1
  101. package/dist/{chunk-JLOZE7QG.js → chunk-RSUZY3PI.js} +1 -1
  102. package/dist/{chunk-2DZV4PHK.js → chunk-WLL3PFI3.js} +1 -1
package/dist/styles.css CHANGED
@@ -5333,7 +5333,7 @@ a.crewlet-make-row__item:active {
5333
5333
  }
5334
5334
 
5335
5335
 
5336
- /* Avatar-CRSLRUVT.css */
5336
+ /* Avatar-RHFI55UZ.css */
5337
5337
  /*
5338
5338
  * The identity badge.
5339
5339
  *
@@ -5402,6 +5402,20 @@ a.crewlet-make-row__item:active {
5402
5402
  box-sizing: border-box;
5403
5403
  }
5404
5404
 
5405
+ /*
5406
+ * ONE PLACE ON A LINE, WHATEVER THE FACE HOLDS. An inline flex box takes its
5407
+ * baseline from its first item, so a face standing in a line of text or in an
5408
+ * inline wrapper (a title tooltip's span) sat on its initials' baseline when
5409
+ * it held initials and on its picture's foot when it held a character: a
5410
+ * person beside two agents stood 2px lower at 20px, measured. Centred on the
5411
+ * line, every face lands on the same middle. A face in a sentence
5412
+ * (`size="text"`) is placed by the sentence that holds it (InlineRef.css), so
5413
+ * it is left out here.
5414
+ */
5415
+ .crewlet-avatar:not(.crewlet-avatar--text) {
5416
+ vertical-align: middle;
5417
+ }
5418
+
5405
5419
  /*
5406
5420
  * The four steps. Each pairs its box with a type step, so two initials sit
5407
5421
  * inside the outline at every one of them. A numeric size sets the same
@@ -5845,7 +5859,7 @@ button.crewlet-avatar-picker:hover .crewlet-avatar-picker__pip {
5845
5859
  }
5846
5860
 
5847
5861
 
5848
- /* AvatarStack-GNEJHEU6.css */
5862
+ /* AvatarStack-UNBXFHTZ.css */
5849
5863
  /*
5850
5864
  * Several badges as one mark (AvatarStack.tsx).
5851
5865
  *
@@ -5886,7 +5900,7 @@ button.crewlet-avatar-picker:hover .crewlet-avatar-picker__pip {
5886
5900
  }
5887
5901
 
5888
5902
  /*
5889
- * THE RING IS THE ONLY EDGE A STACKED FACE NEEDS. A face's own hairline inside
5903
+ * THE RING IS THE ONLY EDGE A PLATED FACE NEEDS. A face's own hairline inside
5890
5904
  * the ring drew each face as a framed tile, two edges a pixel apart, so a
5891
5905
  * stacked face (a member, or the face a member wraps) draws its border in no
5892
5906
  * colour. The border keeps its width, so the face keeps its box.
@@ -5896,6 +5910,19 @@ button.crewlet-avatar-picker:hover .crewlet-avatar-picker__pip {
5896
5910
  border-color: transparent;
5897
5911
  }
5898
5912
 
5913
+ /*
5914
+ * EXCEPT A FACE WITH NO PLATE OF ITS OWN. The neutral badge (a person's
5915
+ * initials, an agent nobody gave a hue) is the raised rung, which on the
5916
+ * light sheet is a step of 1.03:1, so with its hairline gone it had no edge
5917
+ * at all: a person's initials stood bare between agents' tinted plates and
5918
+ * read as a smaller face. Its hairline is its plate's only edge, and it keeps
5919
+ * it inside the ring.
5920
+ */
5921
+ .crewlet-avatar-stack > .crewlet-avatar-stack__member.crewlet-avatar--neutral,
5922
+ .crewlet-avatar-stack > .crewlet-avatar-stack__member > .crewlet-avatar--neutral {
5923
+ border-color: var(--color-edge-hairline);
5924
+ }
5925
+
5899
5926
  /*
5900
5927
  * A BADGE IN FRONT HIDES THE ONE BEHIND IT. A hue's plate is a tint, 12% of
5901
5928
  * the hue over whatever the badge stands on, and in a stack that is partly
@@ -13277,6 +13304,69 @@ button.crewlet-histogram__bar[data-empty]:focus-visible > .crewlet-histogram__fi
13277
13304
  }
13278
13305
 
13279
13306
 
13307
+ /* Clamp-Q5WKCGWY.css */
13308
+ /*
13309
+ * A long block folded to a height, with Show more under it (Clamp.tsx).
13310
+ */
13311
+ .crewlet-clamp {
13312
+ --crewlet-clamp-height: 20rem;
13313
+ /* How far above the fold the last lines fade out. */
13314
+ --crewlet-clamp-fade: var(--spacing-10);
13315
+ position: relative;
13316
+ display: flex;
13317
+ flex-direction: column;
13318
+ align-items: flex-start;
13319
+ gap: var(--spacing-1);
13320
+ min-width: 0;
13321
+ }
13322
+
13323
+ /* The body runs the block's width; only the control hugs its words. */
13324
+ .crewlet-clamp__body {
13325
+ align-self: stretch;
13326
+ min-width: 0;
13327
+ }
13328
+
13329
+ /* The fold, measured: an empty box as tall as it, out of the flow and unseen,
13330
+ so the block can tell whether it is long enough to fold. */
13331
+ .crewlet-clamp__fold {
13332
+ position: absolute;
13333
+ top: 0;
13334
+ left: 0;
13335
+ width: 0;
13336
+ height: var(--crewlet-clamp-height);
13337
+ visibility: hidden;
13338
+ pointer-events: none;
13339
+ }
13340
+
13341
+ /*
13342
+ * FOLDED, the body stops at the fold and its last lines fade out. The fade is
13343
+ * a MASK: it takes the block's own ground away rather than painting one over
13344
+ * it, so it needs no colour of whatever the block stands on. Any opaque ink
13345
+ * draws a mask; only its alpha is read.
13346
+ */
13347
+ .crewlet-clamp[data-state='folded'] > .crewlet-clamp__body {
13348
+ max-height: var(--crewlet-clamp-height);
13349
+ overflow: hidden;
13350
+ mask-image: linear-gradient(
13351
+ to bottom,
13352
+ var(--color-text-primary) calc(100% - var(--crewlet-clamp-fade)),
13353
+ transparent
13354
+ );
13355
+ }
13356
+
13357
+ @media print {
13358
+ .crewlet-clamp[data-state='folded'] > .crewlet-clamp__body {
13359
+ max-height: none;
13360
+ overflow: visible;
13361
+ mask-image: none;
13362
+ }
13363
+
13364
+ .crewlet-clamp > .crewlet-clamp__toggle {
13365
+ display: none;
13366
+ }
13367
+ }
13368
+
13369
+
13280
13370
  /* CodeBlock-LS7H6KUQ.css */
13281
13371
  /*
13282
13372
  * CodeBlock, a monospace command, config or record surface. One step off the
@@ -19929,37 +20019,34 @@ svg.crewlet-datetime__chevron {
19929
20019
  }
19930
20020
 
19931
20021
 
19932
- /* DeliveryReceipt-G55ILD6O.css */
20022
+ /* DeliveryReceipt-BILVVNTO.css */
19933
20023
  /*
19934
20024
  * Who a person's message reached and who answered, under its words; and the
19935
20025
  * same line over a composer, before the message is sent.
20026
+ *
20027
+ * ONE LINE OF TEXT: a sentence that wraps like any other, with its mark
20028
+ * standing at its start. It was a row of flex parts with a dot between them,
20029
+ * which made two facts out of one and named the seats that answered twice.
19936
20030
  */
19937
-
19938
20031
  .crewlet-delivery-receipt {
19939
- display: flex;
19940
- flex-wrap: wrap;
19941
- align-items: center;
19942
- column-gap: var(--spacing-1);
19943
20032
  max-width: 100%;
19944
20033
  margin: 0;
19945
20034
  color: var(--color-text-tertiary);
19946
20035
  font-size: var(--crewlet-chat-meta);
19947
20036
  line-height: var(--font-line-height-snug);
20037
+ overflow-wrap: anywhere;
19948
20038
  }
19949
20039
 
19950
- .crewlet-delivery-receipt__part {
19951
- display: inline-flex;
19952
- align-items: center;
19953
- gap: var(--spacing-1);
19954
- min-width: 0;
19955
- }
19956
-
20040
+ /* The mark stands on the sentence's first line, centred on it, a step
20041
+ before the words. */
19957
20042
  .crewlet-delivery-receipt__mark {
19958
20043
  display: inline-flex;
19959
- flex: none;
20044
+ vertical-align: middle;
20045
+ margin-inline-end: var(--spacing-1);
19960
20046
  }
19961
20047
 
19962
- .crewlet-delivery-receipt__answered {
20048
+ /* An answer lifts the line to the secondary ink, check and all. */
20049
+ .crewlet-delivery-receipt--answered {
19963
20050
  color: var(--color-text-secondary);
19964
20051
  }
19965
20052
 
@@ -36292,7 +36379,7 @@ button.crewlet-presence-stack__member:focus-visible {
36292
36379
  }
36293
36380
 
36294
36381
 
36295
- /* SearchTrigger-SE4GKNAY.css */
36382
+ /* SearchTrigger-MME7NIHX.css */
36296
36383
  /*
36297
36384
  * A button drawn as the field it stands in for.
36298
36385
  *
@@ -36410,7 +36497,19 @@ button.crewlet-presence-stack__member:focus-visible {
36410
36497
  justify-content: center;
36411
36498
  }
36412
36499
 
36413
- .crewlet-search-trigger--toolbar .crewlet-search-trigger__label,
36500
+ /* The words are the button's name, so they are clipped out of sight
36501
+ rather than taken out: under `display: none` they would name nothing,
36502
+ and the glyph would be announced as "button". VisuallyHidden's clip. */
36503
+ .crewlet-search-trigger--toolbar .crewlet-search-trigger__label {
36504
+ position: absolute;
36505
+ width: 1px;
36506
+ height: 1px;
36507
+ margin: -1px;
36508
+ overflow: hidden;
36509
+ clip-path: inset(50%);
36510
+ white-space: nowrap;
36511
+ }
36512
+
36414
36513
  .crewlet-search-trigger--toolbar .crewlet-search-trigger__shortcut {
36415
36514
  display: none;
36416
36515
  }
@@ -47453,12 +47552,13 @@ b.crewlet-switcher__match {
47453
47552
  }
47454
47553
 
47455
47554
 
47456
- /* ThreadSummary-2AFEU6NH.css */
47555
+ /* ThreadSummary-3AODTHAM.css */
47457
47556
  /*
47458
47557
  * The line under a message that has replies, and the working line under it.
47459
47558
  */
47460
47559
 
47461
- /* The column's width, so the line's own cap (below) is what bounds it. */
47560
+ /* A column under the message: the line hugs its own content, and the working
47561
+ line under it may run the column's width. */
47462
47562
  .crewlet-thread-summary-wrap {
47463
47563
  display: flex;
47464
47564
  flex-direction: column;
@@ -47473,18 +47573,25 @@ b.crewlet-switcher__match {
47473
47573
  max-width: 100%;
47474
47574
  }
47475
47575
 
47476
- /* The faces sit on the content edge: the line's 1px edge and its inset are
47477
- taken back by the same amount outside it. It runs the content column's
47478
- width up to a reading cap, so the whole line is the target and its end
47479
- stands at one place down a room. */
47576
+ /*
47577
+ * AS LONG AS WHAT IT SAYS: the faces, the count, how many are new, when the
47578
+ * last reply came and the chevron's place, and no more. It was a bar the
47579
+ * content column's width up to 37.5rem, with "View thread" or "Thread open"
47580
+ * at its far end, which turned a two-word fact into the heaviest thing under
47581
+ * a message.
47582
+ *
47583
+ * The faces sit on the content edge: the line's 1px edge and its inset are
47584
+ * taken back by the same amount outside it.
47585
+ */
47480
47586
  .crewlet-thread-summary {
47481
47587
  --crewlet-thread-summary-inset: var(--spacing-1);
47482
- display: flex;
47588
+ display: inline-flex;
47483
47589
  align-items: center;
47484
- gap: var(--spacing-2);
47485
- width: min(100%, 37.5rem);
47486
- /* The 24px faces with 5px of air above and below. */
47487
- height: calc(var(--size-control-md) + var(--spacing-1));
47590
+ gap: var(--spacing-1);
47591
+ /* The small control's height: the 20px faces with a little air inside the
47592
+ hairline. */
47593
+ height: var(--size-control-sm);
47594
+ min-width: 0;
47488
47595
  box-sizing: border-box;
47489
47596
  margin-inline-start: calc((var(--crewlet-thread-summary-inset) + 1px) * -1);
47490
47597
  padding: 0 var(--crewlet-thread-summary-inset);
@@ -47496,6 +47603,7 @@ b.crewlet-switcher__match {
47496
47603
  font-size: var(--font-size-compact);
47497
47604
  line-height: 1;
47498
47605
  text-align: start;
47606
+ white-space: nowrap;
47499
47607
  cursor: pointer;
47500
47608
  }
47501
47609
 
@@ -47511,47 +47619,53 @@ b.crewlet-switcher__match {
47511
47619
  outline-offset: var(--size-focus-ring-inset-offset);
47512
47620
  }
47513
47621
 
47622
+ /* A step between the faces and the words, wider than the one between the
47623
+ words themselves. */
47624
+ .crewlet-thread-summary > .crewlet-avatar-stack {
47625
+ margin-inline-end: var(--spacing-1);
47626
+ }
47627
+
47514
47628
  .crewlet-thread-summary__count {
47515
47629
  flex: none;
47516
47630
  color: var(--color-brand-accent-ink);
47517
47631
  font-weight: var(--font-weight-medium);
47518
- white-space: nowrap;
47519
47632
  }
47520
47633
 
47521
- /* When the last reply came, laid out at rest and shown on the line's hover:
47522
- the part that gives way first where the column is narrow. */
47634
+ /* When the last reply came, after the count and a middle dot the eye reads
47635
+ between them, in the quiet ink: always shown, and the part that gives way
47636
+ first where the column is narrow. */
47523
47637
  .crewlet-thread-summary__last {
47524
47638
  min-width: 0;
47525
47639
  overflow: hidden;
47526
47640
  color: var(--color-text-tertiary);
47527
47641
  text-overflow: ellipsis;
47528
- white-space: nowrap;
47529
- opacity: 0;
47530
- transition: opacity var(--motion-duration-moderate) var(--motion-easing-default);
47531
47642
  }
47532
47643
 
47533
- /* "View thread" and the chevron that says the line opens, at its end. */
47534
- .crewlet-thread-summary__end {
47535
- display: inline-flex;
47536
- flex: none;
47537
- align-items: center;
47538
- gap: var(--spacing-1);
47539
- margin-inline-start: auto;
47540
- color: var(--color-text-secondary);
47541
- white-space: nowrap;
47542
- opacity: 0;
47644
+ .crewlet-thread-summary__last::before {
47645
+ content: '\00b7\00a0';
47543
47646
  }
47544
47647
 
47648
+ /* The chevron that says the line opens: its place always laid out, shown
47649
+ under the pointer or the keyboard. */
47545
47650
  .crewlet-thread-summary__chevron {
47651
+ flex: none;
47546
47652
  color: var(--color-text-tertiary);
47653
+ opacity: 0;
47547
47654
  }
47548
47655
 
47549
- .crewlet-thread-summary:is(:hover, :focus-visible) .crewlet-thread-summary__last,
47550
- .crewlet-thread-summary:is(:hover, :focus-visible, .is-open) .crewlet-thread-summary__end {
47656
+ .crewlet-thread-summary:is(:hover, :focus-visible) .crewlet-thread-summary__chevron {
47551
47657
  opacity: 1;
47552
47658
  }
47553
47659
 
47554
- /* OPEN, the end says so and opens nothing new. */
47660
+ /* OPEN, the line is the selected surface inside its hairline, and opens
47661
+ nothing new: no chevron. */
47662
+ .crewlet-thread-summary.is-open,
47663
+ .crewlet-thread-summary.is-open:is(:hover, :focus-visible) {
47664
+ border-color: var(--color-edge-hairline);
47665
+ background: var(--color-surface-selected);
47666
+ color: var(--color-text-primary);
47667
+ }
47668
+
47555
47669
  .crewlet-thread-summary.is-open .crewlet-thread-summary__chevron {
47556
47670
  visibility: hidden;
47557
47671
  }
@@ -47564,12 +47678,6 @@ b.crewlet-switcher__match {
47564
47678
  background: var(--color-surface-selected);
47565
47679
  }
47566
47680
 
47567
- @media (prefers-reduced-motion: reduce) {
47568
- .crewlet-thread-summary__last {
47569
- transition: none;
47570
- }
47571
- }
47572
-
47573
47681
 
47574
47682
  /* TileGrid-XOEJ4P52.css */
47575
47683
  /*
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crewlethq/ui",
3
- "version": "0.127.0",
3
+ "version": "0.128.1",
4
4
  "description": "Crewlet shared React components built on @crewlethq/tokens and @crewlethq/icons.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -42,8 +42,8 @@
42
42
  "clean": "rm -rf dist src/generated"
43
43
  },
44
44
  "dependencies": {
45
- "@crewlethq/icons": "0.127.0",
46
- "@crewlethq/tokens": "0.127.0",
45
+ "@crewlethq/icons": "0.128.1",
46
+ "@crewlethq/tokens": "0.128.1",
47
47
  "prosemirror-commands": "1.7.2",
48
48
  "prosemirror-gapcursor": "1.4.1",
49
49
  "prosemirror-history": "1.5.1",
@@ -1,141 +0,0 @@
1
- import { VisuallyHidden } from './chunk-RRRK2KB6.js';
2
- import { cx } from './chunk-ODEQTPFM.js';
3
- import './ChatScale-LGESYXCO.css';
4
- import './DeliveryReceipt-G55ILD6O.css';
5
- import { useState } from 'react';
6
- import { CheckGlyph, TriangleAlertGlyph } from '@crewlethq/icons/glyphs';
7
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
8
-
9
- var DELIVERY_RECEIPT_LABELS = {
10
- reached: (who) => `Reached ${who}`,
11
- reaches: (who) => `Will reach ${who}`,
12
- none: "Reached no agent",
13
- noneDraft: "Will reach no agent",
14
- answered: (who) => `${who} answered`,
15
- list: (names) => names.join(", "),
16
- reason: (words) => `(${words})`,
17
- groups: (groups) => groups.join("; "),
18
- truncated: "Some seats were not reached",
19
- more: (count) => `and ${count} more`,
20
- fewer: "Show fewer"
21
- };
22
- function reachOf(recipients, labels) {
23
- const order = [];
24
- const byReason = /* @__PURE__ */ new Map();
25
- for (const r of recipients) {
26
- const key = r.reason ?? "";
27
- const names = byReason.get(key);
28
- if (names) {
29
- names.push(r.name);
30
- } else {
31
- order.push(key);
32
- byReason.set(key, [r.name]);
33
- }
34
- }
35
- return labels.groups(
36
- order.map((key) => {
37
- const list = labels.list(byReason.get(key) ?? []);
38
- return key ? `${list} ${labels.reason(key)}` : list;
39
- })
40
- );
41
- }
42
- function DeliveryReceipt({
43
- recipients,
44
- tense = "sent",
45
- truncated = false,
46
- hint,
47
- announce = false,
48
- max = 1,
49
- labels: overrides,
50
- className,
51
- ...rest
52
- }) {
53
- if (max !== Infinity && (!Number.isInteger(max) || max < 1)) {
54
- throw new RangeError(
55
- `DeliveryReceipt max must be a whole number of at least 1; it was ${max}`
56
- );
57
- }
58
- const [expanded, setExpanded] = useState(false);
59
- const labels = overrides ? { ...DELIVERY_RECEIPT_LABELS, ...overrides } : DELIVERY_RECEIPT_LABELS;
60
- const cap = expanded ? Infinity : max;
61
- const capped = (all) => all.length > cap + 1 ? all.slice(0, cap) : all;
62
- const none = recipients.length === 0;
63
- const answeredAll = tense === "sent" ? recipients.filter((r) => r.answered).map((r) => r.name) : [];
64
- const answered = capped(answeredAll);
65
- const reached = capped(recipients);
66
- const hiddenReach = recipients.length - reached.length;
67
- const hiddenAnswered = answeredAll.length - answered.length;
68
- const toggle = hiddenReach > 0 || hiddenAnswered > 0 || expanded ? /* @__PURE__ */ jsx(
69
- "button",
70
- {
71
- type: "button",
72
- className: "crewlet-delivery-receipt__more",
73
- "aria-expanded": expanded,
74
- onClick: () => setExpanded((was) => !was),
75
- children: expanded ? labels.fewer : labels.more(hiddenReach)
76
- }
77
- ) : null;
78
- const reach = none ? tense === "draft" ? labels.noneDraft : labels.none : (tense === "draft" ? labels.reaches : labels.reached)(
79
- reachOf(reached, labels)
80
- );
81
- const parts = [
82
- {
83
- key: "reach",
84
- mark: none ? /* @__PURE__ */ jsx(TriangleAlertGlyph, { size: "xs" }) : void 0,
85
- words: reach,
86
- after: toggle
87
- }
88
- ];
89
- if (truncated && !none)
90
- parts.push({ key: "truncated", words: labels.truncated });
91
- if (answered.length > 0) {
92
- parts.push({
93
- key: "answered",
94
- className: "crewlet-delivery-receipt__answered",
95
- mark: /* @__PURE__ */ jsx(CheckGlyph, { size: "xs" }),
96
- words: labels.answered(
97
- hiddenAnswered > 0 ? `${labels.list(answered)} ${labels.more(hiddenAnswered)}` : labels.list(answered)
98
- )
99
- });
100
- }
101
- if (none && hint)
102
- parts.push({
103
- key: "hint",
104
- className: "crewlet-delivery-receipt__hint",
105
- words: hint
106
- });
107
- return /* @__PURE__ */ jsx(
108
- "p",
109
- {
110
- ...rest,
111
- role: announce ? "status" : void 0,
112
- "data-tense": tense,
113
- className: cx(
114
- "crewlet-delivery-receipt",
115
- none && "crewlet-delivery-receipt--none",
116
- className
117
- ),
118
- children: parts.map((part, i) => /* @__PURE__ */ jsxs(
119
- "span",
120
- {
121
- className: cx("crewlet-delivery-receipt__part", part.className),
122
- children: [
123
- i > 0 ? /* @__PURE__ */ jsx("span", { className: "crewlet-delivery-receipt__dot", "aria-hidden": "true", children: "\xB7" }) : null,
124
- part.mark ? /* @__PURE__ */ jsx("span", { className: "crewlet-delivery-receipt__mark", "aria-hidden": "true", children: part.mark }) : null,
125
- /* @__PURE__ */ jsxs("span", { children: [
126
- part.words,
127
- part.after ? /* @__PURE__ */ jsxs(Fragment, { children: [
128
- " ",
129
- part.after
130
- ] }) : null
131
- ] }),
132
- i < parts.length - 1 ? /* @__PURE__ */ jsx(VisuallyHidden, { children: ". " }) : null
133
- ]
134
- },
135
- part.key
136
- ))
137
- }
138
- );
139
- }
140
-
141
- export { DELIVERY_RECEIPT_LABELS, DeliveryReceipt };
File without changes
@@ -1,5 +1,5 @@
1
- import { normalizeHex } from './chunk-7W3LYIOC.js';
2
1
  import { Tag } from './chunk-SJ3EUCFD.js';
2
+ import { normalizeHex } from './chunk-7W3LYIOC.js';
3
3
  import { VisuallyHidden } from './chunk-RRRK2KB6.js';
4
4
  import { cx } from './chunk-ODEQTPFM.js';
5
5
  import './ContrastBadge-CBZPGG3G.css';
@@ -1,6 +1,6 @@
1
1
  import { useMeasuredSizes, isTypeAheadKey, typeAheadBuffer } from './chunk-MY374UUD.js';
2
- import { FilterChip } from './chunk-L6HUVA33.js';
3
2
  import { FullscreenToggle } from './chunk-3JLG6KRU.js';
3
+ import { FilterChip } from './chunk-L6HUVA33.js';
4
4
  import { CANVAS_FIT_PADDING, Canvas } from './chunk-CVNJ6VHK.js';
5
5
  import { Text } from './chunk-475DOAWF.js';
6
6
  import { LayerHost } from './chunk-FIX72ZEC.js';
@@ -1,6 +1,6 @@
1
1
  import { StepList } from './chunk-EHD4CEHK.js';
2
- import { Meter } from './chunk-MXOT2CWL.js';
3
2
  import { ReceiptStrip } from './chunk-TMHG4576.js';
3
+ import { Meter } from './chunk-MXOT2CWL.js';
4
4
  import { StatusCard } from './chunk-X227R7IP.js';
5
5
  import { Disclosure } from './chunk-D5O64CVE.js';
6
6
  import { Spinner } from './chunk-XSPCITPN.js';
@@ -1,5 +1,5 @@
1
- import { PageHeader } from './chunk-FPDIHEM4.js';
2
1
  import { Stepper } from './chunk-EHD4CEHK.js';
2
+ import { PageHeader } from './chunk-FPDIHEM4.js';
3
3
  import { Disclosure } from './chunk-D5O64CVE.js';
4
4
  import { useMediaMatch } from './chunk-COS6LJ4K.js';
5
5
  import { useHeadingLevel, nextHeadingLevel, headingTag, HeadingLevelProvider } from './chunk-PQADV6P6.js';