@crewlethq/ui 0.100.2 → 0.101.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.
Files changed (51) hide show
  1. package/dist/AgentHandoffPanel/index.js +1 -1
  2. package/dist/AppShell/index.js +3 -3
  3. package/dist/ArtifactCard/index.js +3 -3
  4. package/dist/ContrastBadge/index.js +2 -2
  5. package/dist/ContrastHelp/index.js +3 -3
  6. package/dist/DataGrid/DataGrid.d.ts +127 -41
  7. package/dist/DataGrid/index.d.ts +1 -1
  8. package/dist/DataGrid/index.js +4 -2
  9. package/dist/DataGrid/parts.d.ts +163 -0
  10. package/dist/{DataGrid-SAHEL4SN.css → DataGrid-ERDIPEWV.css} +205 -16
  11. package/dist/DocTabsEditor/index.js +2 -2
  12. package/dist/LogoSlot/index.js +3 -3
  13. package/dist/OrgTable/OrgTable.d.ts +5 -20
  14. package/dist/OrgTable/index.js +10 -3
  15. package/dist/{OrgTable-XYHEFI5X.css → OrgTable-5NXRECVP.css} +29 -9
  16. package/dist/PeekRail/index.js +2 -2
  17. package/dist/RailList/index.js +3 -2
  18. package/dist/RelatedRow/index.js +3 -2
  19. package/dist/SetupWizard/index.js +1 -1
  20. package/dist/SlideFilmstrip/index.js +2 -2
  21. package/dist/TableCells/TableCells.d.ts +10 -2
  22. package/dist/TableCells/index.js +3 -2
  23. package/dist/Text/index.js +2 -1
  24. package/dist/TreeGrid/TreeGrid.d.ts +143 -12
  25. package/dist/TreeGrid/index.d.ts +1 -1
  26. package/dist/TreeGrid/index.js +15 -2
  27. package/dist/{TreeGrid-H3GHMKZX.css → TreeGrid-XZCH5WCC.css} +232 -2
  28. package/dist/{chunk-G44KKOMB.js → chunk-2LLMUJFB.js} +1 -1
  29. package/dist/{chunk-BK4KUIAZ.js → chunk-AP6JSZGT.js} +12 -4
  30. package/dist/chunk-FL5DTFF3.js +557 -0
  31. package/dist/{chunk-CL3FWLDO.js → chunk-HI47TXSW.js} +1 -1
  32. package/dist/{chunk-XQWWA2LG.js → chunk-IQO6YDEM.js} +19 -51
  33. package/dist/{chunk-HTCNTCBE.js → chunk-KMMRKMBQ.js} +1 -1
  34. package/dist/chunk-LIRXQOTR.js +892 -0
  35. package/dist/{chunk-CQIODINH.js → chunk-M2DHVN6T.js} +1 -1
  36. package/dist/chunk-WSIJDWUG.js +10 -0
  37. package/dist/{chunk-O5CEG7TQ.js → chunk-XLMURU75.js} +1 -6
  38. package/dist/generated/index.js +61 -61
  39. package/dist/index.js +61 -61
  40. package/dist/styles.css +469 -30
  41. package/dist/utils/titleIfCut.d.ts +18 -0
  42. package/package.json +3 -3
  43. package/dist/chunk-CCNAGB3F.js +0 -591
  44. package/dist/chunk-CTQZK5J3.js +0 -8
  45. package/dist/chunk-ERESJG6C.js +0 -353
  46. package/dist/{chunk-HEXH3HQJ.js → chunk-A5ISYHW7.js} +2 -2
  47. package/dist/{chunk-YPXXDYTR.js → chunk-AP6SM6BL.js} +1 -1
  48. package/dist/{chunk-GCKHZMWG.js → chunk-E23AXDKL.js} +1 -1
  49. package/dist/{chunk-HBHKMFAH.js → chunk-K2GVWTHA.js} +2 -2
  50. package/dist/{chunk-EW4ULFHK.js → chunk-WTJU7MAG.js} +1 -1
  51. package/dist/{chunk-BGRYFVSK.js → chunk-XHQ2JJCB.js} +1 -1
package/dist/styles.css CHANGED
@@ -15266,7 +15266,7 @@ button.crewlet-histogram__bar[data-empty]:focus-visible > .crewlet-histogram__fi
15266
15266
  }
15267
15267
 
15268
15268
 
15269
- /* DataGrid-SAHEL4SN.css */
15269
+ /* DataGrid-ERDIPEWV.css */
15270
15270
  /*
15271
15271
  * DataGrid: a list as columns, one track list on the grid.
15272
15272
  *
@@ -15468,11 +15468,11 @@ button.crewlet-histogram__bar[data-empty]:focus-visible > .crewlet-histogram__fi
15468
15468
  * sorts is a button filling its head, and takes the same edge.
15469
15469
  */
15470
15470
  .crewlet-data-grid__th--right .crewlet-data-grid__sort {
15471
- justify-content: flex-end;
15471
+ justify-content: safe flex-end;
15472
15472
  }
15473
15473
 
15474
15474
  .crewlet-data-grid__th--center .crewlet-data-grid__sort {
15475
- justify-content: center;
15475
+ justify-content: safe center;
15476
15476
  }
15477
15477
 
15478
15478
  .crewlet-data-grid__th:not(.crewlet-data-grid__th--plain):hover,
@@ -15533,11 +15533,11 @@ button.crewlet-histogram__bar[data-empty]:focus-visible > .crewlet-histogram__fi
15533
15533
  }
15534
15534
 
15535
15535
  .crewlet-data-grid__th--right {
15536
- justify-content: flex-end;
15536
+ justify-content: safe flex-end;
15537
15537
  }
15538
15538
 
15539
15539
  .crewlet-data-grid__th--center {
15540
- justify-content: center;
15540
+ justify-content: safe center;
15541
15541
  }
15542
15542
 
15543
15543
  .crewlet-data-grid__sort:focus-visible,
@@ -15626,12 +15626,147 @@ button.crewlet-data-grid__row-link {
15626
15626
  box-shadow: inset 2px 0 0 var(--color-brand-accent);
15627
15627
  }
15628
15628
 
15629
- /* A FAILED ROW IS MARKED ON ITS EDGE, not tinted: the status column already
15630
- says so, and two signals for one fact teach a reader to trust neither. */
15631
- .crewlet-data-grid__row--failed {
15629
+ /* A ROW'S TONE IS MARKED ON ITS EDGE, not tinted: the row's own cells
15630
+ already say the state in words, and two loud signals for one fact teach a
15631
+ reader to trust neither. The edge runs down the lines under the row too,
15632
+ so the record reads as one. `--failed` is the danger tone's old name. */
15633
+ .crewlet-data-grid__row--failed,
15634
+ .crewlet-data-grid__row[data-tone='danger'],
15635
+ .crewlet-data-grid__subrow[data-tone='danger'] {
15632
15636
  box-shadow: inset 2px 0 0 var(--color-feedback-danger-ink);
15633
15637
  }
15634
15638
 
15639
+ .crewlet-data-grid__row[data-tone='warning'],
15640
+ .crewlet-data-grid__subrow[data-tone='warning'] {
15641
+ box-shadow: inset 2px 0 0 var(--color-feedback-warning-ink);
15642
+ }
15643
+
15644
+ .crewlet-data-grid__row[data-tone='info'],
15645
+ .crewlet-data-grid__subrow[data-tone='info'] {
15646
+ box-shadow: inset 2px 0 0 var(--color-feedback-info-ink);
15647
+ }
15648
+
15649
+ /*
15650
+ * A ROW AND THE LINES UNDER IT ARE ONE RECORD: the accessory line that says
15651
+ * what the row cannot, the detail an open row shows. No rule between them;
15652
+ * the last of them draws the record's rule. They start on the first of the
15653
+ * caller's columns (the cell's own `grid-column`), past the grid's own.
15654
+ */
15655
+ .crewlet-data-grid__row[data-continued] {
15656
+ border-bottom-color: transparent;
15657
+ }
15658
+
15659
+ .crewlet-data-grid__subrow {
15660
+ display: grid;
15661
+ grid-template-columns: subgrid;
15662
+ grid-column: 1 / -1;
15663
+ border-bottom: 1px solid var(--color-border-default);
15664
+ }
15665
+
15666
+ .crewlet-data-grid__subrow:not(:last-child):has(+ .crewlet-data-grid__subrow) {
15667
+ border-bottom-color: transparent;
15668
+ }
15669
+
15670
+ .crewlet-data-grid__subrow:last-child {
15671
+ border-bottom: none;
15672
+ }
15673
+
15674
+ .crewlet-data-grid__subrow-cell {
15675
+ min-width: 0;
15676
+ padding-block: 0 var(--spacing-2);
15677
+ padding-inline: var(--spacing-3) var(--crewlet-data-grid-edge);
15678
+ font-size: var(--font-size-xs);
15679
+ color: var(--color-text-secondary);
15680
+ }
15681
+
15682
+ .crewlet-data-grid__subrow-cell[data-first] {
15683
+ padding-inline-start: var(--crewlet-data-grid-edge);
15684
+ }
15685
+
15686
+ /* AN OPEN ROW'S DETAIL is its own ground, a step in from the row's, so it
15687
+ reads as the inside of the row above it and not as one more row. */
15688
+ .crewlet-data-grid__subrow--detail {
15689
+ background: var(--color-surface-inset);
15690
+ }
15691
+
15692
+ .crewlet-data-grid__subrow--detail > .crewlet-data-grid__subrow-cell {
15693
+ padding-block: var(--spacing-3);
15694
+ font-size: var(--font-size-compact);
15695
+ color: inherit;
15696
+ }
15697
+
15698
+ /* THE CHEVRON TURNS to point at the open row's detail, as a tree's does. */
15699
+ .crewlet-data-grid__expander {
15700
+ display: inline-flex;
15701
+ }
15702
+
15703
+ .crewlet-data-grid__expander svg {
15704
+ transition: transform var(--motion-duration-fast) var(--motion-easing-default);
15705
+ }
15706
+
15707
+ .crewlet-data-grid__expander[data-open] svg {
15708
+ transform: rotate(90deg);
15709
+ }
15710
+
15711
+ /* A ROW MOVED BY HAND: the handle says it can be carried, the row being
15712
+ carried is a gap outlined where it will land, and a move still being
15713
+ saved is quieter until it lands. */
15714
+ .crewlet-data-grid__handle {
15715
+ cursor: grab;
15716
+ color: var(--color-text-tertiary);
15717
+ }
15718
+
15719
+ .crewlet-data-grid__handle:active {
15720
+ cursor: grabbing;
15721
+ }
15722
+
15723
+ .crewlet-data-grid__row[data-reorder='dragging'] {
15724
+ background: transparent;
15725
+ outline: 1px dashed var(--color-border-strong);
15726
+ outline-offset: -1px;
15727
+ }
15728
+
15729
+ .crewlet-data-grid__row[data-reorder='dragging'] > *,
15730
+ .crewlet-data-grid__row[data-pending] > * {
15731
+ opacity: 0.5;
15732
+ }
15733
+
15734
+ /*
15735
+ * A SUMMARY ROW IS NOT A RECORD: a total under the rows or the whole above
15736
+ * its parts. On the same tracks, so its figures stand under their heads; in
15737
+ * the weight a total takes; with no pointer, since it opens nothing.
15738
+ */
15739
+ .crewlet-data-grid__row--summary,
15740
+ .crewlet-data-grid__row--summary:hover {
15741
+ cursor: default;
15742
+ background: var(--color-surface-elevated);
15743
+ font-weight: var(--font-weight-medium);
15744
+ }
15745
+
15746
+ .crewlet-data-grid__row--summary[data-position='top'] {
15747
+ border-bottom-color: var(--color-border-hover);
15748
+ }
15749
+
15750
+ .crewlet-data-grid__row--summary[data-position='bottom'] {
15751
+ border-top: 1px solid var(--color-border-hover);
15752
+ }
15753
+
15754
+ .crewlet-data-grid__row--summary + .crewlet-data-grid__row--summary[data-position='bottom'] {
15755
+ border-top: none;
15756
+ }
15757
+
15758
+ /* A ROW STILL ON ITS WAY: the head's tracks, a sweeping line in each cell. */
15759
+ .crewlet-data-grid__row--loading,
15760
+ .crewlet-data-grid__row--loading:hover {
15761
+ cursor: default;
15762
+ background: transparent;
15763
+ }
15764
+
15765
+ .crewlet-data-grid__row--loading .crewlet-data-grid__cell > * {
15766
+ flex: 1 1 auto;
15767
+ max-width: 10rem;
15768
+ }
15769
+
15635
15770
  .crewlet-data-grid__cell {
15636
15771
  padding-block: var(--spacing-1);
15637
15772
  padding-inline: var(--crewlet-data-grid-cell-start) var(--crewlet-data-grid-cell-end);
@@ -15684,14 +15819,47 @@ button.crewlet-data-grid__row-link {
15684
15819
  }
15685
15820
 
15686
15821
  /* A RIGHT-ALIGNED COLUMN holds figures, times and dates: tabular digits, so
15687
- "53s ago" and "12h ago" end on one edge and their digits stand in columns. */
15822
+ "53s ago" and "12h ago" end on one edge and their digits stand in columns.
15823
+ `safe`: a value wider than its clipped track keeps its start and is cut at
15824
+ its end, where end alignment overflowed the start ("1d ago" read "ago"). */
15688
15825
  .crewlet-data-grid__cell--right {
15689
- justify-content: flex-end;
15826
+ justify-content: safe flex-end;
15690
15827
  font-variant-numeric: tabular-nums;
15691
15828
  }
15692
15829
 
15693
15830
  .crewlet-data-grid__cell--center {
15694
- justify-content: center;
15831
+ justify-content: safe center;
15832
+ }
15833
+
15834
+ /* A PROSE COLUMN (`overflow: 'wrap'`) breaks over as many lines as it takes,
15835
+ anywhere it must, and its row grows to hold it. */
15836
+ .crewlet-data-grid__cell--wrap {
15837
+ white-space: normal;
15838
+ overflow-wrap: anywhere;
15839
+ padding-block: var(--spacing-2);
15840
+ }
15841
+
15842
+ /*
15843
+ * A COMPACT GRID (`density="compact"`) is a step shorter in its head and in
15844
+ * every row, for a grid in a drawer or a side panel read beside something
15845
+ * else. The type stays; only the rows' height and their air give.
15846
+ */
15847
+ .crewlet-data-grid[data-density='compact'] .crewlet-data-grid__head,
15848
+ .crewlet-data-grid[data-density='compact'] .crewlet-data-grid__row {
15849
+ min-height: var(--size-row-sm);
15850
+ }
15851
+
15852
+ .crewlet-data-grid[data-density='compact'] .crewlet-data-grid__th {
15853
+ padding-block: var(--spacing-1);
15854
+ }
15855
+
15856
+ .crewlet-data-grid[data-density='compact'] .crewlet-data-grid__sort {
15857
+ margin-block: calc(-1 * var(--spacing-1));
15858
+ padding-block: var(--spacing-1);
15859
+ }
15860
+
15861
+ .crewlet-data-grid[data-density='compact'] .crewlet-data-grid__cell {
15862
+ padding-block: 0;
15695
15863
  }
15696
15864
 
15697
15865
 
@@ -15777,8 +15945,6 @@ button.crewlet-data-grid__row-link {
15777
15945
  .crewlet-data-grid__foot {
15778
15946
  display: flex;
15779
15947
  align-items: center;
15780
- flex-wrap: wrap;
15781
- gap: var(--spacing-1) var(--spacing-3);
15782
15948
  min-height: var(--size-control-sm);
15783
15949
  padding: var(--spacing-1) var(--crewlet-data-grid-edge);
15784
15950
  border-top: 1px solid var(--color-border-default);
@@ -15788,6 +15954,24 @@ button.crewlet-data-grid__row-link {
15788
15954
  line-height: var(--font-line-height-tight);
15789
15955
  }
15790
15956
 
15957
+ /* THE FOOT IS THE TABLE'S OWN ROW GROUP (a tfoot): one row, one cell across
15958
+ every column, which lays the caller's words and the grid's notes out on
15959
+ one line that wraps. */
15960
+ .crewlet-data-grid__foot-group {
15961
+ display: block;
15962
+ grid-column: 1 / -1;
15963
+ min-width: 0;
15964
+ }
15965
+
15966
+ .crewlet-data-grid__foot-cell {
15967
+ display: flex;
15968
+ flex: 1 1 auto;
15969
+ align-items: center;
15970
+ flex-wrap: wrap;
15971
+ gap: var(--spacing-1) var(--spacing-3);
15972
+ min-width: 0;
15973
+ }
15974
+
15791
15975
  .crewlet-data-grid__foot-spacer {
15792
15976
  flex: 1 1 auto;
15793
15977
  }
@@ -15799,8 +15983,7 @@ button.crewlet-data-grid__row-link {
15799
15983
 
15800
15984
  .crewlet-data-grid__cols-reset {
15801
15985
  all: unset;
15802
- /* After the reset, which takes `grid-column` too. */
15803
- grid-column: 1 / -1;
15986
+ display: block;
15804
15987
  padding: var(--spacing-1) var(--crewlet-data-grid-edge);
15805
15988
  font-size: var(--font-size-2xs);
15806
15989
  color: var(--color-brand-accent-ink);
@@ -15851,7 +16034,8 @@ button.crewlet-data-grid__row-link {
15851
16034
  @media (prefers-reduced-motion: reduce) {
15852
16035
  .crewlet-data-grid__th,
15853
16036
  .crewlet-data-grid__row,
15854
- .crewlet-data-grid__sort-mark {
16037
+ .crewlet-data-grid__sort-mark,
16038
+ .crewlet-data-grid__expander svg {
15855
16039
  transition: none;
15856
16040
  }
15857
16041
  }
@@ -15885,10 +16069,15 @@ button.crewlet-data-grid__row-link {
15885
16069
  }
15886
16070
 
15887
16071
  :where(.crewlet-data-grid[data-stacked]) .crewlet-data-grid__body,
15888
- :where(.crewlet-data-grid[data-stacked]) .crewlet-data-grid__band {
16072
+ :where(.crewlet-data-grid[data-stacked]) .crewlet-data-grid__band,
16073
+ :where(.crewlet-data-grid[data-stacked]) .crewlet-data-grid__subrow {
15889
16074
  display: block;
15890
16075
  }
15891
16076
 
16077
+ :where(.crewlet-data-grid[data-stacked]) .crewlet-data-grid__subrow-cell {
16078
+ padding-inline: var(--crewlet-data-grid-edge);
16079
+ }
16080
+
15892
16081
  :where(.crewlet-data-grid[data-stacked]) .crewlet-data-grid__row {
15893
16082
  display: block;
15894
16083
  padding: var(--spacing-2) var(--crewlet-data-grid-edge);
@@ -29778,7 +29967,7 @@ button.crewlet-mention-chip:focus-visible {
29778
29967
  }
29779
29968
 
29780
29969
 
29781
- /* OrgTable-XYHEFI5X.css */
29970
+ /* OrgTable-5NXRECVP.css */
29782
29971
  /*
29783
29972
  * An organization as an indented table of rows (OrgTable.tsx).
29784
29973
  *
@@ -29873,23 +30062,32 @@ button.crewlet-mention-chip:focus-visible {
29873
30062
  min-width: 0;
29874
30063
  }
29875
30064
 
29876
- /* THE NAME COLUMN'S HEADING STANDS OVER THE NAMES, not over the chevrons. */
30065
+ /* THE NAME COLUMN'S HEADING STANDS OVER THE NAMES, not over the chevrons.
30066
+ Its start inset too, so a sort button filling the head takes the same
30067
+ inset back and the whole cell stays the target. */
29877
30068
  .crewlet-org-table [role='columnheader'][aria-colindex='1'] {
30069
+ --crewlet-tree-grid-cell-start: var(--crewlet-org-table-name-start);
30070
+
29878
30071
  padding-inline-start: var(--crewlet-org-table-name-start);
29879
30072
  }
29880
30073
 
29881
30074
  /* With a select box, the names start one slot and one gap further in. */
29882
30075
  .crewlet-org-table[data-select] [role='columnheader'][aria-colindex='1'] {
30076
+ --crewlet-tree-grid-cell-start: calc(
30077
+ var(--crewlet-org-table-name-start) + var(--size-target-min) + var(--spacing-2)
30078
+ );
30079
+
29883
30080
  padding-inline-start: calc(var(--crewlet-org-table-name-start) + var(--size-target-min) + var(--spacing-2));
29884
30081
  }
29885
30082
 
29886
- /* THE SELECT BOX'S SLOT, kept on every row, so a row with no box keeps its name in line. */
29887
- .crewlet-org-table__select {
29888
- display: inline-flex;
29889
- flex: none;
29890
- align-items: center;
29891
- justify-content: center;
29892
- width: var(--size-target-min);
30083
+ /* A ROW DRAWN AS A CARD (`phoneRows`) starts its values' lines under its
30084
+ name: the cell's inset, the chevron, the wire's level and its gap. Set on
30085
+ the row, which carries its depth; its cells inherit the length. */
30086
+ .crewlet-org-table [role='row'] {
30087
+ --crewlet-tree-grid-value-indent: calc(
30088
+ var(--spacing-2) * 2 + var(--size-control-sm) + var(--crewlet-org-table-indent) *
30089
+ var(--crewlet-tree-grid-depth, 0)
30090
+ );
29893
30091
  }
29894
30092
 
29895
30093
  /* A CONTAINER-WIDTH TABLE steps its indent in as it narrows, so a nested
@@ -29988,7 +30186,18 @@ button.crewlet-mention-chip:focus-visible {
29988
30186
  */
29989
30187
  .crewlet-org-table [role='gridcell']:last-child,
29990
30188
  .crewlet-org-table [role='columnheader']:last-child {
29991
- justify-content: flex-end;
30189
+ justify-content: safe flex-end;
30190
+ }
30191
+
30192
+ /* AND A LAST HEAD THAT SORTS ENDS WITH ITS VALUES: its button fills the head,
30193
+ so the button takes the end, and its arrow goes before the word, as a
30194
+ right-aligned head's does, so the word stays on the column's edge. */
30195
+ .crewlet-org-table [role='columnheader']:last-child > .crewlet-data-grid__sort {
30196
+ justify-content: safe flex-end;
30197
+ }
30198
+
30199
+ .crewlet-org-table [role='columnheader']:last-child .crewlet-data-grid__sort-mark {
30200
+ order: -1;
29992
30201
  }
29993
30202
 
29994
30203
  .crewlet-org-table__wire {
@@ -47141,7 +47350,7 @@ svg.crewlet-time-window__tick {
47141
47350
  }
47142
47351
 
47143
47352
 
47144
- /* TreeGrid-H3GHMKZX.css */
47353
+ /* TreeGrid-XZCH5WCC.css */
47145
47354
  /*
47146
47355
  * A hierarchy as rows and columns (TreeGrid.tsx), on `DataGrid`'s table rules: one
47147
47356
  * track list on the grid, which the head, body and rows pass through as `subgrid`.
@@ -47154,8 +47363,15 @@ svg.crewlet-time-window__tick {
47154
47363
  own in a flush card. */
47155
47364
  --crewlet-tree-grid-inset: var(--spacing-3);
47156
47365
  --crewlet-tree-grid-edge: var(--spacing-3);
47366
+ /* THE HEAD AND THE FOOT ARE DATAGRID'S OWN PARTS (DataGrid/parts.tsx), so
47367
+ they read this grid's edge through DataGrid's name for it. */
47368
+ --crewlet-data-grid-edge: var(--crewlet-tree-grid-edge);
47157
47369
 
47158
47370
  position: relative;
47371
+ /* A flex or grid item that may shrink below its content, as DataGrid's
47372
+ frame: at its automatic minimum a tree widened its parent to its
47373
+ longest line. */
47374
+ min-width: 0;
47159
47375
  }
47160
47376
 
47161
47377
  /*
@@ -47220,14 +47436,15 @@ svg.crewlet-time-window__tick {
47220
47436
 
47221
47437
  .crewlet-tree-grid--container .crewlet-tree-grid__head {
47222
47438
  position: sticky;
47223
- top: 0;
47439
+ /* At the offset an application gives its grids' heads, as a DataGrid's. */
47440
+ top: var(--crewlet-data-grid-sticky-top, var(--spacing-0));
47224
47441
  z-index: var(--z-index-sticky);
47225
47442
  border-start-start-radius: calc(var(--radius-md) - 1px);
47226
47443
  border-start-end-radius: calc(var(--radius-md) - 1px);
47227
47444
  }
47228
47445
 
47229
47446
  /*
47230
- * INSIDE A FLUSH CARD THE CARD IS THE FRAME. A flush card exists so that a
47447
+ * INSIDE A FLUSH CARD THE CARD IS THE FRAME, and so with `flush`. A flush card exists so that a
47231
47448
  * table's rows reach its edges (Card.css), and a grid that drew its own border
47232
47449
  * and corner there was a second rounded box one pixel inside the first, with
47233
47450
  * the card's footer hanging outside it. The rows keep their own hairlines, and
@@ -47243,6 +47460,22 @@ svg.crewlet-time-window__tick {
47243
47460
  border-radius: 0;
47244
47461
  }
47245
47462
 
47463
+ /* `flush` outside a flush card: the card's body, with one rule above its head. */
47464
+ .crewlet-tree-grid[data-flush] {
47465
+ --crewlet-tree-grid-edge: var(--spacing-4);
47466
+ }
47467
+
47468
+ .crewlet-tree-grid[data-flush] .crewlet-tree-grid__scroller {
47469
+ background: none;
47470
+ border: none;
47471
+ border-top: 1px solid var(--color-border-default);
47472
+ border-radius: 0;
47473
+ }
47474
+
47475
+ .crewlet-card__header + .crewlet-tree-grid[data-flush] .crewlet-tree-grid__scroller {
47476
+ border-top: 0;
47477
+ }
47478
+
47246
47479
  .crewlet-tree-grid__row {
47247
47480
  align-items: center;
47248
47481
  min-height: var(--size-row-md);
@@ -47307,6 +47540,40 @@ svg.crewlet-time-window__tick {
47307
47540
  --crewlet-tree-grid-cell-end: var(--crewlet-tree-grid-edge);
47308
47541
  }
47309
47542
 
47543
+ /*
47544
+ * THE HEAD IS DATAGRID'S HEAD CELL (its sort button, marks and edges), on this
47545
+ * grid's insets: the button takes back exactly the padding its head has.
47546
+ */
47547
+ .crewlet-tree-grid__head > .crewlet-tree-grid__row > .crewlet-data-grid__th {
47548
+ --crewlet-data-grid-cell-start: var(--crewlet-tree-grid-cell-start);
47549
+ --crewlet-data-grid-cell-end: var(--crewlet-tree-grid-cell-end);
47550
+ }
47551
+
47552
+ /* AN ICON COLUMN keeps the cells' own step on both sides wherever it stands, as a DataGrid's. */
47553
+ .crewlet-tree-grid__row > .crewlet-data-grid__th.crewlet-data-grid__th--icon,
47554
+ .crewlet-tree-grid__row > .crewlet-tree-grid__cell.crewlet-tree-grid__cell--icon {
47555
+ --crewlet-tree-grid-cell-start: var(--crewlet-tree-grid-inset);
47556
+ --crewlet-tree-grid-cell-end: var(--crewlet-tree-grid-inset);
47557
+ }
47558
+
47559
+ /* ONE EDGE PER COLUMN, shared by its head and its values, as a DataGrid's:
47560
+ figures and times on the right in tabular digits, one mark centred, and
47561
+ (`safe`) a value wider than its track cut at its end, never its start. */
47562
+ .crewlet-tree-grid__cell--right {
47563
+ justify-content: safe flex-end;
47564
+ font-variant-numeric: tabular-nums;
47565
+ }
47566
+
47567
+ .crewlet-tree-grid__cell--center {
47568
+ justify-content: safe center;
47569
+ }
47570
+
47571
+ /* A SHRINK COLUMN does not wrap inside its capped track, nor paint past it. */
47572
+ .crewlet-tree-grid__cell--shrink {
47573
+ white-space: nowrap;
47574
+ overflow: clip;
47575
+ }
47576
+
47310
47577
  /* A COLUMN OF VALUES READ AFTER THE NAME takes the caption's size, a step under the name's. */
47311
47578
  .crewlet-tree-grid__cell[data-size='sm'] {
47312
47579
  font-size: var(--font-size-2xs);
@@ -47394,11 +47661,183 @@ svg.crewlet-time-window__tick {
47394
47661
  white-space: nowrap;
47395
47662
  }
47396
47663
 
47664
+ /* THE SELECT BOX'S SLOT, kept on every row, so a row with no box keeps its name in line. */
47665
+ .crewlet-tree-grid__select {
47666
+ display: inline-flex;
47667
+ flex: none;
47668
+ align-items: center;
47669
+ justify-content: center;
47670
+ width: var(--size-target-min);
47671
+ }
47672
+
47673
+ /*
47674
+ * THE ROW'S OWN LINK, STRETCHED OVER IT (`rowHref`), out of flow so it takes
47675
+ * no track. The row is its containing block. The cells' own controls sit
47676
+ * above it, positioned and later in the document; `:where` keeps that at no
47677
+ * weight, so a control that positions itself keeps its own rule.
47678
+ */
47679
+ .crewlet-tree-grid__row[data-linked] {
47680
+ position: relative;
47681
+ cursor: pointer;
47682
+ }
47683
+
47684
+ .crewlet-tree-grid__row-link {
47685
+ position: absolute;
47686
+ inset: 0;
47687
+ }
47688
+
47689
+ :where(
47690
+ .crewlet-tree-grid__row[data-linked]
47691
+ :is(a, button, input, label, [data-above-row]):not(.crewlet-tree-grid__row-link)
47692
+ ) {
47693
+ position: relative;
47694
+ }
47695
+
47696
+ /* A FAILED ROW IS MARKED ON ITS EDGE, as a DataGrid's: its cells say why. */
47697
+ .crewlet-tree-grid__row[data-failed] {
47698
+ box-shadow: inset 2px 0 0 var(--color-feedback-danger-ink);
47699
+ }
47700
+
47397
47701
  /* The selection is where the reader is, so it takes the accent. */
47398
47702
  .crewlet-tree-grid__row[aria-selected='true'] {
47399
47703
  box-shadow: inset 2px 0 0 var(--color-brand-accent);
47400
47704
  }
47401
47705
 
47706
+ /*
47707
+ * THE FOOT IS DATAGRID'S (what the width dropped, what is loaded, the way to
47708
+ * more), under the rows inside the frame. It holds still while the rows
47709
+ * scroll sideways, so its words stay in view.
47710
+ */
47711
+ .crewlet-tree-grid__scroller > .crewlet-data-grid__foot-group {
47712
+ position: sticky;
47713
+ inset-inline-start: 0;
47714
+ }
47715
+
47716
+ /* ---- WHERE COLUMNS DO NOT FIT, A ROW IS A CARD (`phoneRows`) ----------------
47717
+ Set on a phone and where the give-way columns have all gone. The row keeps
47718
+ its first cell (its chevron, its level and its name) and every other value
47719
+ becomes a line under it, named, at the name's indent, so the hierarchy still
47720
+ reads down the left. The head stays for a screen reader, unseen. */
47721
+ .crewlet-tree-grid[data-stacked] .crewlet-tree-grid__scroller {
47722
+ overflow-x: visible;
47723
+ }
47724
+
47725
+ .crewlet-tree-grid[data-stacked] .crewlet-tree-grid__grid {
47726
+ display: block;
47727
+ min-width: 0;
47728
+ }
47729
+
47730
+ .crewlet-tree-grid[data-stacked] .crewlet-tree-grid__head {
47731
+ position: absolute;
47732
+ width: 1px;
47733
+ height: 1px;
47734
+ overflow: hidden;
47735
+ clip-path: inset(50%);
47736
+ white-space: nowrap;
47737
+ }
47738
+
47739
+ .crewlet-tree-grid[data-stacked] .crewlet-tree-grid__body,
47740
+ .crewlet-tree-grid[data-stacked] .crewlet-tree-grid__row {
47741
+ display: block;
47742
+ }
47743
+
47744
+ .crewlet-tree-grid[data-stacked] .crewlet-tree-grid__row {
47745
+ padding-block: var(--spacing-1);
47746
+ }
47747
+
47748
+ .crewlet-tree-grid[data-stacked] .crewlet-tree-grid__cell {
47749
+ align-items: baseline;
47750
+ gap: var(--spacing-3);
47751
+ white-space: normal;
47752
+ justify-content: flex-start;
47753
+ }
47754
+
47755
+ /* A VALUE'S LINE STARTS WHERE THE ROW'S NAME DOES: past the edge, the chevron
47756
+ and the row's level. A drawn indent (an org table's wires) sets its own. */
47757
+ .crewlet-tree-grid[data-stacked] .crewlet-tree-grid__cell:not(:first-child) {
47758
+ padding-block: 1px;
47759
+ padding-inline: var(
47760
+ --crewlet-tree-grid-value-indent,
47761
+ calc(
47762
+ var(--crewlet-tree-grid-edge) + var(--size-control-sm) + var(--spacing-2) + var(--spacing-5) *
47763
+ var(--crewlet-tree-grid-depth, 0)
47764
+ )
47765
+ )
47766
+ var(--crewlet-tree-grid-edge);
47767
+ }
47768
+
47769
+ .crewlet-tree-grid[data-stacked] .crewlet-tree-grid__cell:first-child {
47770
+ align-items: center;
47771
+ }
47772
+
47773
+ .crewlet-tree-grid[data-stacked] .crewlet-tree-grid__cell:empty {
47774
+ display: none;
47775
+ }
47776
+
47777
+ .crewlet-tree-grid[data-stacked] .crewlet-tree-grid__cell[data-label]::before {
47778
+ content: attr(data-label);
47779
+ flex: 0 0 7rem;
47780
+ overflow-wrap: anywhere;
47781
+ font-size: var(--font-size-2xs);
47782
+ text-transform: uppercase;
47783
+ letter-spacing: var(--font-letter-spacing-wide);
47784
+ color: var(--color-text-tertiary);
47785
+ }
47786
+
47787
+ /* THE COMPACT CARD: the name, then its values as one run of marks under it.
47788
+ The row is indented to its values' line and the name takes that back, so
47789
+ a value that wraps to a new line still starts under the name. A zero-height
47790
+ break after the name ends its line, as DataGrid's compact row does. */
47791
+ .crewlet-tree-grid[data-phone-rows='compact'] .crewlet-tree-grid__row {
47792
+ display: flex;
47793
+ flex-wrap: wrap;
47794
+ align-items: center;
47795
+ column-gap: var(--spacing-2);
47796
+ padding-inline: var(
47797
+ --crewlet-tree-grid-value-indent,
47798
+ calc(
47799
+ var(--crewlet-tree-grid-edge) + var(--size-control-sm) + var(--spacing-2) + var(--spacing-5) *
47800
+ var(--crewlet-tree-grid-depth, 0)
47801
+ )
47802
+ )
47803
+ var(--crewlet-tree-grid-edge);
47804
+ }
47805
+
47806
+ .crewlet-tree-grid[data-phone-rows='compact'] .crewlet-tree-grid__cell:not(:first-child) {
47807
+ padding: 0;
47808
+ }
47809
+
47810
+ .crewlet-tree-grid[data-phone-rows='compact'] .crewlet-tree-grid__row::after {
47811
+ content: '';
47812
+ order: 1;
47813
+ flex-basis: 100%;
47814
+ height: 0;
47815
+ }
47816
+
47817
+ .crewlet-tree-grid[data-phone-rows='compact'] .crewlet-tree-grid__cell {
47818
+ order: 2;
47819
+ }
47820
+
47821
+ .crewlet-tree-grid[data-phone-rows='compact'] .crewlet-tree-grid__cell:first-child {
47822
+ flex: 1 1 auto;
47823
+ order: 0;
47824
+ margin-inline: calc(
47825
+ -1 *
47826
+ var(
47827
+ --crewlet-tree-grid-value-indent,
47828
+ calc(
47829
+ var(--crewlet-tree-grid-edge) + var(--size-control-sm) + var(--spacing-2) + var(--spacing-5) *
47830
+ var(--crewlet-tree-grid-depth, 0)
47831
+ )
47832
+ )
47833
+ )
47834
+ calc(-1 * var(--crewlet-tree-grid-edge));
47835
+ }
47836
+
47837
+ .crewlet-tree-grid[data-phone-rows='compact'] .crewlet-tree-grid__cell[data-label]::before {
47838
+ content: none;
47839
+ }
47840
+
47402
47841
 
47403
47842
  /* TypeSpecimen-WK6YNHL7.css */
47404
47843
  /*
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Puts the element's whole words on its title while they are cut, and takes
3
+ * the title off while they fit. One line is cut across (`inline`), a clamp
4
+ * down (`block`). The words are read from the element itself, so a run of
5
+ * marked-up text (a mono id inside the line) reads as it is shown, with its
6
+ * white space collapsed as the line collapses it.
7
+ *
8
+ * MEASURED WHEN THE POINTER ARRIVES, the only moment a title is read, so it
9
+ * never goes stale after a resize or a new value, and a table of a thousand
10
+ * cut cells costs nothing until one is hovered. One helper for every element
11
+ * the kit cuts with an ellipsis (`Text`, the table cells, a grid's heads), so
12
+ * no cut is drawn without its words on hover.
13
+ */
14
+ export declare function titleIfCut(element: HTMLElement, axis?: 'inline' | 'block'): void;
15
+ /** `onMouseEnter` for a one-line cut: see [titleIfCut]. */
16
+ export declare const titleWhenCut: (event: {
17
+ currentTarget: HTMLElement;
18
+ }) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crewlethq/ui",
3
- "version": "0.100.2",
3
+ "version": "0.101.0",
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.100.2",
46
- "@crewlethq/tokens": "0.100.2",
45
+ "@crewlethq/icons": "0.101.0",
46
+ "@crewlethq/tokens": "0.101.0",
47
47
  "prosemirror-commands": "1.7.2",
48
48
  "prosemirror-gapcursor": "1.4.1",
49
49
  "prosemirror-history": "1.5.1",