@crewlethq/ui 0.14.0 → 0.15.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 (70) hide show
  1. package/README.md +26 -0
  2. package/dist/AppShell/AppShell.d.ts +76 -11
  3. package/dist/AppShell/index.d.ts +1 -1
  4. package/dist/AppShell/index.js +2 -2
  5. package/dist/{AppShell-CEVLW4QG.css → AppShell-6QUD7NWM.css} +74 -1
  6. package/dist/AvatarPicker/index.js +3 -3
  7. package/dist/Canvas/index.js +3 -3
  8. package/dist/Charts/StackedColumns.d.ts +30 -7
  9. package/dist/Charts/index.d.ts +1 -1
  10. package/dist/Charts/index.js +1 -1
  11. package/dist/{Charts-JUERFLAR.css → Charts-JYW4X5ZL.css} +18 -1
  12. package/dist/CommandPalette/index.js +3 -3
  13. package/dist/DataTable/index.js +5 -5
  14. package/dist/DataView/index.js +8 -8
  15. package/dist/DateTimePicker/index.js +3 -3
  16. package/dist/DescriptionList/DescriptionList.d.ts +9 -1
  17. package/dist/DescriptionList/index.js +1 -1
  18. package/dist/{DescriptionList-YYY3V3O6.css → DescriptionList-IXMRCSMK.css} +24 -0
  19. package/dist/FactList/index.js +3 -3
  20. package/dist/Layer/index.js +1 -1
  21. package/dist/Layer-J222IFNX.css +33 -0
  22. package/dist/Layout/index.js +1 -1
  23. package/dist/{Layout-2ZCV3IGF.css → Layout-ZBEGLXAE.css} +18 -0
  24. package/dist/ListInput/index.js +1 -1
  25. package/dist/MarkdownEditor/index.js +1 -1
  26. package/dist/Menu/index.js +2 -2
  27. package/dist/Modal/index.js +2 -2
  28. package/dist/OrgTable/index.js +4 -4
  29. package/dist/Popover/index.js +2 -2
  30. package/dist/Select/index.js +2 -2
  31. package/dist/Shortcut/index.js +1 -1
  32. package/dist/Switcher/index.js +4 -4
  33. package/dist/TagsInput/index.js +1 -1
  34. package/dist/TimeWindowPicker/index.js +4 -4
  35. package/dist/Toaster/Toaster.d.ts +6 -1
  36. package/dist/Toaster/index.js +2 -2
  37. package/dist/{Toaster-VZKISP2S.css → Toaster-EOOOTSJT.css} +6 -4
  38. package/dist/Toolbar/index.js +1 -1
  39. package/dist/Tooltip/index.js +2 -2
  40. package/dist/TreeCanvas/index.js +4 -4
  41. package/dist/TreeGrid/index.js +3 -3
  42. package/dist/{chunk-5IXMLWGW.js → chunk-2GXTIK37.js} +4 -4
  43. package/dist/{chunk-RZ7RGECB.js → chunk-2OLCUNG7.js} +1 -1
  44. package/dist/{chunk-AXNQCAFC.js → chunk-2UU5IGZI.js} +1 -1
  45. package/dist/{chunk-IFM63LAG.js → chunk-7BZPYA5P.js} +2 -2
  46. package/dist/{chunk-2PZBIHRV.js → chunk-AMH67MLM.js} +2 -2
  47. package/dist/{chunk-6LXMLQUM.js → chunk-B2Z2CDM5.js} +2 -2
  48. package/dist/{chunk-O2ZDZZS7.js → chunk-BWRGFKJP.js} +3 -2
  49. package/dist/{chunk-75WOCYGC.js → chunk-DYHSQHAZ.js} +1 -1
  50. package/dist/{chunk-4FFHJBEN.js → chunk-EFNHOVC2.js} +1 -1
  51. package/dist/{chunk-XN4JBAN3.js → chunk-F2XSYBKH.js} +8 -2
  52. package/dist/{chunk-IXUU5DLZ.js → chunk-FC4YTTFJ.js} +1 -1
  53. package/dist/{chunk-L3CTFFLZ.js → chunk-H3XOMT7W.js} +53 -9
  54. package/dist/{chunk-7RPGY3JE.js → chunk-HMPFGIWM.js} +1 -1
  55. package/dist/{chunk-WYQOHFML.js → chunk-IYZZL3MZ.js} +1 -1
  56. package/dist/{chunk-URYDN2KA.js → chunk-JI5AVQLA.js} +1 -1
  57. package/dist/{chunk-TFMJH2E6.js → chunk-K4VORB64.js} +1 -1
  58. package/dist/{chunk-Y6NR7QJ3.js → chunk-LCF4WPYS.js} +2 -2
  59. package/dist/{chunk-4WNNEDKO.js → chunk-MLT2HBPN.js} +87 -74
  60. package/dist/{chunk-TFH6SYWB.js → chunk-NS7BVLL3.js} +1 -1
  61. package/dist/{chunk-CBZSSKH3.js → chunk-QH3AKP2N.js} +18 -5
  62. package/dist/{chunk-3VVKJ7AZ.js → chunk-QV266R6G.js} +3 -3
  63. package/dist/{chunk-CQY5NTRS.js → chunk-QWOPX2MN.js} +1 -1
  64. package/dist/{chunk-53DVJCVW.js → chunk-VYOKRN2I.js} +1 -1
  65. package/dist/{chunk-W4ENKCXJ.js → chunk-ZAC7SKUN.js} +1 -1
  66. package/dist/generated/index.js +32 -32
  67. package/dist/index.js +32 -32
  68. package/dist/styles.css +157 -13
  69. package/package.json +3 -3
  70. package/dist/Layer-NAFSGCFA.css +0 -23
package/dist/styles.css CHANGED
@@ -535,7 +535,7 @@
535
535
  }
536
536
 
537
537
 
538
- /* AppShell-CEVLW4QG.css */
538
+ /* AppShell-6QUD7NWM.css */
539
539
  /*
540
540
  * The application frame: a rail on the FRAME, and the screen on a SHEET that
541
541
  * floats beside it.
@@ -753,7 +753,44 @@
753
753
  color var(--motion-duration-fast) var(--motion-easing-default);
754
754
  }
755
755
 
756
- .crewlet-app-shell__rail-row--action:hover {
756
+ /*
757
+ * A CONTROL IN THE FOOT IS A ROW OF THE RAIL'S OWN GRAMMAR: the nav row's 30px
758
+ * step, its glyph-to-word gap, its word size and weight, and its secondary ink
759
+ * lifting to the primary under the pointer, as Settings above it is drawn. So
760
+ * the engine's row under Settings reads as one more row of the rail rather
761
+ * than as a caption, its words start on the line the nav's words start on, and
762
+ * it keeps one height in every state it says: one line of the compact step.
763
+ * A status line the rail only states keeps the quieter caption above, and the
764
+ * status block keeps its card.
765
+ *
766
+ * Its mark takes a nav glyph's width, `sm` (14px), whatever the mark is, so a
767
+ * 7px status dot is centred where the glyph above it is centred and the words
768
+ * beside it start where "Settings" starts.
769
+ */
770
+ .crewlet-app-shell__rail-row--action:not(.crewlet-app-shell__rail-row--block),
771
+ .crewlet-app-shell__rail-foot > .crewlet-btn {
772
+ gap: calc(var(--spacing-2) + var(--spacing-1) / 2);
773
+ min-height: var(--size-nav-row);
774
+ padding-block: 0;
775
+ color: var(--color-text-secondary);
776
+ font-size: var(--font-size-compact);
777
+ font-weight: var(--font-weight-medium);
778
+ letter-spacing: var(--font-letter-spacing-snug);
779
+ line-height: var(--font-line-height-tight);
780
+ }
781
+
782
+ .crewlet-app-shell__rail-row--action:not(.crewlet-app-shell__rail-row--block) > .crewlet-app-shell__rail-row-icon {
783
+ min-width: 14px;
784
+ }
785
+
786
+ /*
787
+ * OPEN IS POINTED AT. The row a panel is open from keeps the hover's lift for
788
+ * as long as the panel is open, drawn from `aria-expanded` so the picture and
789
+ * what a screen reader is told cannot come apart, as the switcher's trigger
790
+ * draws it.
791
+ */
792
+ .crewlet-app-shell__rail-row--action:hover,
793
+ .crewlet-app-shell__rail-row--action[aria-expanded='true'] {
757
794
  background: var(--color-surface-hover);
758
795
  color: var(--color-text-primary);
759
796
  }
@@ -831,6 +868,42 @@
831
868
  flex: none;
832
869
  }
833
870
 
871
+ /*
872
+ * THE COUNT: how many of something the row reports, after its words, drawn as
873
+ * a count in the nav is: the caption step, tabular figures so a count that
874
+ * ticks up does not move the words beside it, and a mark half a step off the
875
+ * figure. It is the tertiary step, as the nav's is, unless what it counts is
876
+ * wrong: a warning count is the warning ink, figure and mark together, which
877
+ * @crewlethq/tokens holds to 4.5:1 on the rail and under the hover overlay
878
+ * (RAIL_PAINTS), so on the row a panel is open from too.
879
+ */
880
+ .crewlet-app-shell__rail-row-count {
881
+ display: inline-flex;
882
+ align-items: center;
883
+ flex: none;
884
+ gap: calc(var(--spacing-1) + 1px);
885
+ color: var(--color-text-tertiary);
886
+ font-size: var(--font-size-2xs);
887
+ font-variant-numeric: tabular-nums;
888
+ }
889
+
890
+ .crewlet-app-shell__rail-row-count-mark {
891
+ display: inline-flex;
892
+ }
893
+
894
+ .crewlet-app-shell__rail-row-count--warning {
895
+ color: var(--color-feedback-warning-ink);
896
+ }
897
+
898
+ /* The chevron that says the row opens a panel, in the quiet step: a mark, not
899
+ a word, and it stays quiet while the row lifts, as the panel's own name is
900
+ what a reader is told. */
901
+ .crewlet-app-shell__rail-row-opens {
902
+ display: inline-flex;
903
+ flex: none;
904
+ color: var(--color-text-tertiary);
905
+ }
906
+
834
907
  /*
835
908
  * THE STATUS BLOCK: a row given a `detail` is the approved design's engine
836
909
  * status, its words over a second line, on the card rung inside the plain
@@ -3297,7 +3370,7 @@ a.crewlet-breadcrumb__crumb:focus-visible {
3297
3370
  }
3298
3371
 
3299
3372
 
3300
- /* Charts-JUERFLAR.css */
3373
+ /* Charts-JYW4X5ZL.css */
3301
3374
  /* The chart kit: a legend, a ranked bar list, a stacked bar, stacked
3302
3375
  columns, an activity strip, a time series and the reading layer they share. Hand-drawn rather than a charting library, for one reason that
3303
3376
  decides it: every mark here reads tokens, in two themes, at the contrast
@@ -3705,6 +3778,16 @@ a.crewlet-breadcrumb__crumb:focus-visible {
3705
3778
  min-width: 0;
3706
3779
  }
3707
3780
 
3781
+ /*
3782
+ * A FILL CHART GROWS INTO THE HEIGHT IT IS GIVEN (`height="fill"`). The figure
3783
+ * flexes, so in a card a taller neighbour stretches it takes the spare height,
3784
+ * and its rows (a style property) spend all of it on the plot's row. Nowhere to
3785
+ * grow, it is as tall as its content, the plot at its least.
3786
+ */
3787
+ .crewlet-stacked-columns--fill {
3788
+ flex: 1 1 auto;
3789
+ }
3790
+
3708
3791
  /*
3709
3792
  * EACH WORD IS A BOX OF NO HEIGHT, spread from the top of the plot to its
3710
3793
  * baseline, with the word centred on it: so every word stands exactly on the
@@ -3819,12 +3902,19 @@ a.crewlet-breadcrumb__crumb:focus-visible {
3819
3902
  * legend at its END, top right, where the design's Spend card draws it; the
3820
3903
  * legend is flushed to the end of that row and wraps from there. Below, the
3821
3904
  * legend starts under the axis, a step clear of the dates.
3905
+ *
3906
+ * ON A CARD TOO NARROW FOR BOTH, THE LEGEND TAKES A ROW OF ITS OWN, under the
3907
+ * heading and still flushed to the end. Held on one line, the two shrank
3908
+ * together and the legend stood beside the title as a column of one series a
3909
+ * line. The rows stand a step apart, closer than the head stands to the plot,
3910
+ * so the legend still reads as the head's.
3822
3911
  */
3823
3912
  .crewlet-stacked-columns__head {
3824
3913
  grid-column: 1 / -1;
3825
3914
  display: flex;
3915
+ flex-wrap: wrap;
3826
3916
  align-items: flex-start;
3827
- gap: var(--spacing-4);
3917
+ gap: var(--spacing-2) var(--spacing-4);
3828
3918
  margin-bottom: var(--spacing-3);
3829
3919
  min-width: 0;
3830
3920
  }
@@ -8065,7 +8155,7 @@ svg.crewlet-datetime__chevron {
8065
8155
  }
8066
8156
 
8067
8157
 
8068
- /* DescriptionList-YYY3V3O6.css */
8158
+ /* DescriptionList-IXMRCSMK.css */
8069
8159
  /*
8070
8160
  * Metadata pairs on one grid.
8071
8161
  *
@@ -8126,6 +8216,30 @@ svg.crewlet-datetime__chevron {
8126
8216
  }
8127
8217
  }
8128
8218
 
8219
+ /*
8220
+ * FIT: the term column is as wide as its longest term, and the pairs stay side
8221
+ * by side at every width. It is for a panel of its own width, such as a
8222
+ * popover, where the window's width says nothing about the room the list has:
8223
+ * the narrow rule above is a question about the window, and a 260px panel is
8224
+ * 260px on a phone and on a desktop alike. Its terms are a word each, so the
8225
+ * column they take is a word wide and the details keep the rest.
8226
+ *
8227
+ * Written AFTER the narrow rule, which it overrides at the same weight, so
8228
+ * nothing here has to outrank a media query.
8229
+ */
8230
+ .crewlet-description-list--fit {
8231
+ grid-template-columns: max-content minmax(0, 1fr);
8232
+ gap: var(--spacing-2) var(--spacing-4);
8233
+ }
8234
+
8235
+ .crewlet-description-list--fit.crewlet-description-list--dense {
8236
+ gap: var(--spacing-1) var(--spacing-3);
8237
+ }
8238
+
8239
+ .crewlet-description-list--fit .crewlet-description-list__detail {
8240
+ margin-bottom: 0;
8241
+ }
8242
+
8129
8243
 
8130
8244
  /* DiffList-3EX64AAE.css */
8131
8245
  /* DiffList: one path per row, with its mark, its word and its tint.
@@ -10679,7 +10793,7 @@ svg.crewlet-datetime__chevron {
10679
10793
  }
10680
10794
 
10681
10795
 
10682
- /* Layer-NAFSGCFA.css */
10796
+ /* Layer-J222IFNX.css */
10683
10797
  /*
10684
10798
  * The portal target a LayerHost provides.
10685
10799
  *
@@ -10691,13 +10805,23 @@ svg.crewlet-datetime__chevron {
10691
10805
  * Its container establishes the positioning context. A host whose parent is
10692
10806
  * static covers the nearest positioned ancestor instead, which is the
10693
10807
  * viewport in the common case and is still a usable bound.
10808
+ *
10809
+ * IT TAKES NO PLACE IN THE STACKING ORDER OF ITS OWN. Every surface drawn in
10810
+ * it carries its own step in the layer band, its depth in the stack, and that
10811
+ * is what decides what paints on top. A z-index here made the host a stacking
10812
+ * context at the bottom of the band, which held everything inside it under
10813
+ * whatever the page stacked above that step: the shell's open drawer takes
10814
+ * the band's own steps beside the host rather than inside it, so a panel
10815
+ * opened from the drawer was drawn under the drawer it came from. A surface
10816
+ * at the same step as the drawer's rail, which is the next one opened above
10817
+ * it, paints over the rail because the host follows the shell in the
10818
+ * document.
10694
10819
  */
10695
10820
 
10696
10821
  .crewlet-layer-host {
10697
10822
  position: absolute;
10698
10823
  inset: 0;
10699
10824
  pointer-events: none;
10700
- z-index: var(--z-index-layer-base);
10701
10825
  }
10702
10826
 
10703
10827
  .crewlet-layer-host > * {
@@ -10705,7 +10829,7 @@ svg.crewlet-datetime__chevron {
10705
10829
  }
10706
10830
 
10707
10831
 
10708
- /* Layout-2ZCV3IGF.css */
10832
+ /* Layout-ZBEGLXAE.css */
10709
10833
  /*
10710
10834
  * Stack, Inline, Spacer and AutoGrid.
10711
10835
  *
@@ -10733,6 +10857,24 @@ svg.crewlet-datetime__chevron {
10733
10857
  flex-direction: row;
10734
10858
  }
10735
10859
 
10860
+ /*
10861
+ * DRAWN AS A LIST, IT IS STILL A RUN OF ITEMS. A Stack or an Inline spends no
10862
+ * pixel of its own, and a `ul` or an `ol` arrives with the browser's: a margin
10863
+ * above and below, a 40px indent and a marker on every item, so a list of five
10864
+ * names laid out as a Stack was pushed in and bulleted. They are taken back,
10865
+ * and the element stays a list to a screen reader. A list that wants its
10866
+ * markers is `List variant="bulleted"`.
10867
+ *
10868
+ * Inside :where(), so the rule weighs one class like every other here and a
10869
+ * caller's own class still decides what it sets.
10870
+ */
10871
+ :where(ul, ol).crewlet-stack,
10872
+ :where(ul, ol).crewlet-inline {
10873
+ margin: 0;
10874
+ padding: 0;
10875
+ list-style: none;
10876
+ }
10877
+
10736
10878
  /*
10737
10879
  * A GRID OF CARDS KEEPS ITS TRACKS. `auto-fill` lays down every track the row
10738
10880
  * has room for and leaves the empty ones empty; `auto-fit`, which this was,
@@ -19899,7 +20041,7 @@ svg.crewlet-time-window__tick {
19899
20041
  }
19900
20042
 
19901
20043
 
19902
- /* Toaster-VZKISP2S.css */
20044
+ /* Toaster-EOOOTSJT.css */
19903
20045
  /*
19904
20046
  * The toast stack, drawn as the first release drew it (24a60c3): a dark strip
19905
20047
  * on the page's deepest ground with the large shadow and the rim light, a
@@ -20004,10 +20146,12 @@ svg.crewlet-time-window__tick {
20004
20146
 
20005
20147
  /*
20006
20148
  * A VARIANT IS ITS MARK AND ITS WASH. The words stay in the strip's own inks
20007
- * and the edge stays the hairline, so a failure is a rose mark on a faint rose
20008
- * wash rather than a red strip: the outcome is said by the glyph and the title,
20009
- * and the sentence beside them is read in the ink every sentence is read in.
20010
- * Information is the neutral mark on the neutral wash.
20149
+ * and the edge stays the hairline, so a failure is a rose mark rather than a
20150
+ * red strip: the outcome is said by the glyph and the title, and the sentence
20151
+ * beside them is read in the ink every sentence is read in. The wash is the
20152
+ * countdown, so only a toast that counts down draws one: a success is a moss
20153
+ * mark on a faint moss wash, and a failure, sticky unless it is given a
20154
+ * duration, draws none. Information is the neutral mark on the neutral wash.
20011
20155
  */
20012
20156
  .crewlet-toast--success {
20013
20157
  --crewlet-toast-mark: var(--color-feedback-success-ink);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crewlethq/ui",
3
- "version": "0.14.0",
3
+ "version": "0.15.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.14.0",
46
- "@crewlethq/tokens": "0.14.0"
45
+ "@crewlethq/icons": "0.15.0",
46
+ "@crewlethq/tokens": "0.15.0"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "react": ">=18",
@@ -1,23 +0,0 @@
1
- /*
2
- * The portal target a LayerHost provides.
3
- *
4
- * It covers its container so a surface placed against its rectangle is placed
5
- * against the container, and it is inert until something is drawn in it: an
6
- * empty host over a canvas must not swallow the drag that pans the canvas.
7
- * Each overlay inside takes pointer events back for its own panel.
8
- *
9
- * Its container establishes the positioning context. A host whose parent is
10
- * static covers the nearest positioned ancestor instead, which is the
11
- * viewport in the common case and is still a usable bound.
12
- */
13
-
14
- .crewlet-layer-host {
15
- position: absolute;
16
- inset: 0;
17
- pointer-events: none;
18
- z-index: var(--z-index-layer-base);
19
- }
20
-
21
- .crewlet-layer-host > * {
22
- pointer-events: auto;
23
- }