@crewlethq/ui 0.70.0 → 0.72.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 (72) hide show
  1. package/README.md +16 -0
  2. package/dist/AgentHandoffPanel/index.js +4 -4
  3. package/dist/ArrangeFrame/index.js +2 -2
  4. package/dist/ArrangeList/index.js +4 -4
  5. package/dist/ArtifactCard/index.js +4 -4
  6. package/dist/BriefCard/BriefCard.d.ts +48 -35
  7. package/dist/BriefCard/index.d.ts +2 -2
  8. package/dist/BriefCard/index.js +1 -1
  9. package/dist/{BriefCard-L66R5U32.css → BriefCard-VKTH3BSW.css} +33 -45
  10. package/dist/Checkbox/index.js +3 -3
  11. package/dist/ColorField/index.js +3 -3
  12. package/dist/Combobox/index.js +3 -3
  13. package/dist/CommandPalette/index.js +3 -3
  14. package/dist/CommentThread/index.js +4 -4
  15. package/dist/Composer/index.js +3 -3
  16. package/dist/ConfirmField/index.js +3 -3
  17. package/dist/DataGrid/index.js +4 -4
  18. package/dist/DataTable/index.js +4 -4
  19. package/dist/DataView/index.js +5 -5
  20. package/dist/DocTabsEditor/index.js +3 -3
  21. package/dist/{Editor-NNQEALNT.js → Editor-6PBP444G.js} +2 -2
  22. package/dist/Input/index.js +2 -2
  23. package/dist/ListInput/index.js +3 -3
  24. package/dist/PrincipalPicker/index.js +4 -4
  25. package/dist/ProposalCard/index.js +4 -4
  26. package/dist/RichEditor/index.js +1 -1
  27. package/dist/SelectionBar/index.js +2 -2
  28. package/dist/SheetColumnEditor/index.js +4 -4
  29. package/dist/SheetGrid/index.js +1 -1
  30. package/dist/SlideFilmstrip/index.js +1 -1
  31. package/dist/Switcher/index.js +3 -3
  32. package/dist/TagsInput/index.js +2 -2
  33. package/dist/TimeRangePicker/index.js +3 -3
  34. package/dist/TimeWindowPicker/index.js +3 -3
  35. package/dist/Toaster/Toaster.d.ts +14 -2
  36. package/dist/Toaster/index.d.ts +1 -1
  37. package/dist/Toaster/index.js +1 -1
  38. package/dist/ValueField/index.js +4 -4
  39. package/dist/{chunk-3EETQFAM.js → chunk-4HCYBQ6B.js} +1 -1
  40. package/dist/chunk-4KSCGXLJ.js +106 -0
  41. package/dist/{chunk-H32JW6CZ.js → chunk-52D5EFHL.js} +2 -2
  42. package/dist/{chunk-J5WWMC35.js → chunk-AMYU5W2H.js} +2 -2
  43. package/dist/{chunk-KAA3GFTP.js → chunk-AWQQ5I34.js} +2 -2
  44. package/dist/{chunk-3LP3VPLT.js → chunk-BW6MQO2B.js} +1 -1
  45. package/dist/{chunk-6C6YK75K.js → chunk-EKZFB34W.js} +1 -1
  46. package/dist/{chunk-LQWORB5B.js → chunk-F5QBQP63.js} +2 -2
  47. package/dist/{chunk-PBCNINMB.js → chunk-FFWMTIMH.js} +1 -1
  48. package/dist/{chunk-YGWIWDXE.js → chunk-FX7FDPCM.js} +1 -1
  49. package/dist/{chunk-4MVLED6E.js → chunk-H6S6NRZL.js} +1 -1
  50. package/dist/{chunk-BWFJB5JD.js → chunk-HGWHIUZ5.js} +1 -1
  51. package/dist/{chunk-ADSOY7UM.js → chunk-I7YQNRTQ.js} +1 -1
  52. package/dist/{chunk-MFQPGMJT.js → chunk-IXPC5D36.js} +1 -1
  53. package/dist/{chunk-7LSSYHOT.js → chunk-J7INWERB.js} +1 -1
  54. package/dist/{chunk-SZFKGH2W.js → chunk-JIBWNHTC.js} +42 -9
  55. package/dist/{chunk-FURJVZCT.js → chunk-LEM3ZY35.js} +1 -1
  56. package/dist/{chunk-JVII5264.js → chunk-LQXYAB2Q.js} +1 -1
  57. package/dist/{chunk-5OFRDX66.js → chunk-NATDVYEY.js} +1 -1
  58. package/dist/{chunk-W5AXJWOW.js → chunk-O4NQVNO5.js} +1 -1
  59. package/dist/{chunk-ZUBFVK6B.js → chunk-OFARYSWS.js} +1 -1
  60. package/dist/{chunk-3EY5SEGH.js → chunk-OSMR6TSC.js} +1 -1
  61. package/dist/{chunk-NXNLAZPK.js → chunk-SPWBT7FE.js} +1 -1
  62. package/dist/{chunk-BWAUL5MB.js → chunk-YAL6VBRK.js} +2 -2
  63. package/dist/{chunk-TWJERLT3.js → chunk-YZSG3JIY.js} +1 -1
  64. package/dist/generated/index.js +38 -38
  65. package/dist/index.js +38 -38
  66. package/dist/styles.css +34 -46
  67. package/package.json +3 -3
  68. package/dist/chunk-VBA5FSWV.js +0 -87
  69. package/dist/{chunk-HEIOLITO.js → chunk-5VMAJAVF.js} +1 -1
  70. package/dist/{chunk-PLNJEDGI.js → chunk-I4IO56EY.js} +1 -1
  71. package/dist/{chunk-L4HHWG4V.js → chunk-V2EV56MY.js} +1 -1
  72. package/dist/{chunk-ETSF7SU6.js → chunk-ZMML6NRS.js} +1 -1
package/dist/styles.css CHANGED
@@ -5757,11 +5757,12 @@ a.crewlet-breadcrumb__crumb:focus-visible {
5757
5757
  }
5758
5758
 
5759
5759
 
5760
- /* BriefCard-L66R5U32.css */
5760
+ /* BriefCard-VKTH3BSW.css */
5761
5761
  /*
5762
- * A brief inside the product's status card: one sentence, the rows that wait
5763
- * on the reader, one recommendation and the questions to ask next, each block
5764
- * under a quiet label so a reader scans straight to the part they need.
5762
+ * A brief inside the product's status card: the verdict in the head, then one
5763
+ * line on what the page is about, the ranked rows that wait on the reader, a
5764
+ * quiet line of context and the questions to ask next. No block carries a
5765
+ * label: the verdict already says what the rows are.
5765
5766
  */
5766
5767
  .crewlet-brief-card__where {
5767
5768
  display: inline-flex;
@@ -5776,35 +5777,19 @@ a.crewlet-breadcrumb__crumb:focus-visible {
5776
5777
  .crewlet-brief-card__body {
5777
5778
  display: flex;
5778
5779
  flex-direction: column;
5779
- gap: var(--spacing-4);
5780
+ gap: var(--spacing-3);
5780
5781
  min-width: 0;
5781
5782
  }
5782
5783
 
5783
- .crewlet-brief-card__summary {
5784
+ .crewlet-brief-card__about {
5784
5785
  margin: 0;
5786
+ overflow-wrap: anywhere;
5785
5787
  font-size: var(--font-size-md);
5786
5788
  font-weight: var(--font-weight-medium);
5787
5789
  line-height: var(--font-line-height-snug);
5788
5790
  text-wrap: pretty;
5789
5791
  }
5790
5792
 
5791
- .crewlet-brief-card__block {
5792
- display: flex;
5793
- flex-direction: column;
5794
- gap: var(--spacing-2);
5795
- min-width: 0;
5796
- }
5797
-
5798
- .crewlet-brief-card__label {
5799
- margin: 0;
5800
- font-size: var(--font-size-2xs);
5801
- font-weight: var(--font-weight-medium);
5802
- letter-spacing: var(--font-letter-spacing-wide);
5803
- text-transform: uppercase;
5804
- line-height: var(--font-line-height-snug);
5805
- color: var(--color-text-tertiary);
5806
- }
5807
-
5808
5793
  .crewlet-brief-card__needs {
5809
5794
  display: flex;
5810
5795
  flex-direction: column;
@@ -5816,7 +5801,8 @@ a.crewlet-breadcrumb__crumb:focus-visible {
5816
5801
  /*
5817
5802
  * A ROW IS THE LIST ROW'S GRAMMAR: the dot on the first line, the words and
5818
5803
  * their one fact, and the action centred at the end, so a column of rows reads
5819
- * down the dots and across to the presses.
5804
+ * down the dots and across to the presses. The first row, the one the brief
5805
+ * recommends, stands on the accent's softest ground.
5820
5806
  */
5821
5807
  .crewlet-brief-card__need {
5822
5808
  display: grid;
@@ -5830,6 +5816,26 @@ a.crewlet-breadcrumb__crumb:focus-visible {
5830
5816
  border-top: 1px solid var(--color-border-default);
5831
5817
  }
5832
5818
 
5819
+ .crewlet-brief-card__need--first {
5820
+ padding-inline: var(--spacing-3);
5821
+ margin-inline: calc(-1 * var(--spacing-3));
5822
+ border-radius: var(--radius-md);
5823
+ background: var(--color-brand-accent-soft);
5824
+ }
5825
+
5826
+ .crewlet-brief-card__need--first + .crewlet-brief-card__need {
5827
+ border-top: 0;
5828
+ }
5829
+
5830
+ .crewlet-brief-card__first {
5831
+ font-size: var(--font-size-2xs);
5832
+ font-weight: var(--font-weight-medium);
5833
+ letter-spacing: var(--font-letter-spacing-wide);
5834
+ text-transform: uppercase;
5835
+ line-height: var(--font-line-height-snug);
5836
+ color: var(--color-brand-accent-ink);
5837
+ }
5838
+
5833
5839
  .crewlet-brief-card__need > .crewlet-button {
5834
5840
  align-self: center;
5835
5841
  }
@@ -5855,30 +5861,12 @@ a.crewlet-breadcrumb__crumb:focus-visible {
5855
5861
  color: var(--color-text-tertiary);
5856
5862
  }
5857
5863
 
5858
- .crewlet-brief-card__clear {
5859
- display: inline-flex;
5860
- align-items: center;
5861
- gap: var(--spacing-2);
5864
+ .crewlet-brief-card__context {
5862
5865
  margin: 0;
5863
- font-size: var(--font-size-compact);
5864
- color: var(--color-feedback-success-ink);
5865
- }
5866
-
5867
- /* The recommendation: one step, on the accent's softest ground. */
5868
- .crewlet-brief-card__next {
5869
- display: grid;
5870
- grid-template-columns: auto minmax(0, 1fr) auto;
5871
- align-items: center;
5872
- gap: var(--spacing-3);
5873
- padding: var(--spacing-2) var(--spacing-3);
5874
- border-radius: var(--radius-md);
5875
- background: var(--color-brand-accent-soft);
5866
+ font-size: var(--font-size-xs);
5867
+ line-height: var(--font-line-height-snug);
5868
+ color: var(--color-text-tertiary);
5876
5869
  overflow-wrap: anywhere;
5877
- font-size: var(--font-size-compact);
5878
- }
5879
-
5880
- .crewlet-brief-card__arrow {
5881
- color: var(--color-brand-accent-ink);
5882
5870
  }
5883
5871
 
5884
5872
  /* The questions to ask next sit on the card's text edge: each row's own inset is pulled out. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crewlethq/ui",
3
- "version": "0.70.0",
3
+ "version": "0.72.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.70.0",
46
- "@crewlethq/tokens": "0.70.0",
45
+ "@crewlethq/icons": "0.72.0",
46
+ "@crewlethq/tokens": "0.72.0",
47
47
  "prosemirror-commands": "1.7.2",
48
48
  "prosemirror-gapcursor": "1.4.1",
49
49
  "prosemirror-history": "1.5.1",
@@ -1,87 +0,0 @@
1
- import { SuggestionList, SuggestionRow } from './chunk-Y7PVLEZJ.js';
2
- import { StatusCard } from './chunk-NTQPJJAN.js';
3
- import { StatusDot } from './chunk-WIATRXEJ.js';
4
- import { Button } from './chunk-DGXZ635L.js';
5
- import { cx } from './chunk-ODEQTPFM.js';
6
- import './BriefCard-L66R5U32.css';
7
- import { useId } from 'react';
8
- import { CircleCheckGlyph, ArrowRightGlyph, MessageCircleQuestionMarkGlyph } from '@crewlethq/icons/glyphs';
9
- import { jsx, jsxs } from 'react/jsx-runtime';
10
-
11
- var BRIEF_CARD_MAX_NEEDS = 3;
12
- var BRIEF_CARD_LABELS = {
13
- heading: "Brief",
14
- needs: "Needs you",
15
- clear: "Nothing needs you.",
16
- recommended: "Recommended",
17
- followUps: "Ask next",
18
- count: (n) => n === 1 ? "1 needs you" : `${n} need you`,
19
- allClear: "All clear"
20
- };
21
- function BriefCard({
22
- scope,
23
- asOf,
24
- summary,
25
- needs,
26
- recommended,
27
- followUps,
28
- labels: overrides,
29
- className,
30
- ...rest
31
- }) {
32
- const labels = overrides ? { ...BRIEF_CARD_LABELS, ...overrides } : BRIEF_CARD_LABELS;
33
- const id = useId();
34
- const rows = needs.slice(0, BRIEF_CARD_MAX_NEEDS);
35
- const hasScope = !(scope === void 0 || scope === null || scope === "");
36
- const hasAsOf = !(asOf === void 0 || asOf === null || asOf === "");
37
- const subtitle = hasScope || hasAsOf ? /* @__PURE__ */ jsxs("span", { className: "crewlet-brief-card__where", children: [
38
- hasScope ? /* @__PURE__ */ jsx("span", { children: scope }) : null,
39
- hasScope && hasAsOf ? /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: "\xB7" }) : null,
40
- hasAsOf ? /* @__PURE__ */ jsx("span", { className: "crewlet-brief-card__asof", children: asOf }) : null
41
- ] }) : void 0;
42
- return /* @__PURE__ */ jsx(
43
- StatusCard,
44
- {
45
- ...rest,
46
- title: labels.heading,
47
- subtitle,
48
- status: rows.length > 0 ? { label: labels.count(rows.length), tone: "warning" } : { label: labels.allClear, tone: "success", icon: /* @__PURE__ */ jsx(CircleCheckGlyph, { size: "xs" }) },
49
- className: cx("crewlet-brief-card", className),
50
- children: /* @__PURE__ */ jsxs("div", { className: "crewlet-brief-card__body", children: [
51
- /* @__PURE__ */ jsx("p", { className: "crewlet-brief-card__summary", children: summary }),
52
- /* @__PURE__ */ jsxs("section", { className: "crewlet-brief-card__block", "aria-labelledby": `${id}-needs`, children: [
53
- /* @__PURE__ */ jsx("h4", { className: "crewlet-brief-card__label", id: `${id}-needs`, children: labels.needs }),
54
- rows.length === 0 ? /* @__PURE__ */ jsxs("p", { className: "crewlet-brief-card__clear", children: [
55
- /* @__PURE__ */ jsx(CircleCheckGlyph, { size: "sm", "aria-hidden": "true" }),
56
- labels.clear
57
- ] }) : (
58
- // A list the reader moves through by item; Safari drops the role of a list styled without markers.
59
- // eslint-disable-next-line jsx-a11y/no-redundant-roles
60
- /* @__PURE__ */ jsx("ul", { role: "list", className: "crewlet-brief-card__needs", children: rows.map((need) => /* @__PURE__ */ jsxs("li", { className: "crewlet-brief-card__need", children: [
61
- /* @__PURE__ */ jsx("span", { className: "crewlet-brief-card__dot", children: /* @__PURE__ */ jsx(StatusDot, { tone: need.tone ?? "warning" }) }),
62
- /* @__PURE__ */ jsxs("span", { className: "crewlet-brief-card__words", children: [
63
- /* @__PURE__ */ jsx("span", { children: need.text }),
64
- need.detail === void 0 || need.detail === null ? null : /* @__PURE__ */ jsx("span", { className: "crewlet-brief-card__detail", children: need.detail })
65
- ] }),
66
- need.action ? /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", onClick: need.action.onSelect, children: need.action.label }) : null
67
- ] }, need.key)) })
68
- )
69
- ] }),
70
- recommended === null ? null : /* @__PURE__ */ jsxs("section", { className: "crewlet-brief-card__block", "aria-labelledby": `${id}-next`, children: [
71
- /* @__PURE__ */ jsx("h4", { className: "crewlet-brief-card__label", id: `${id}-next`, children: labels.recommended }),
72
- /* @__PURE__ */ jsxs("div", { className: "crewlet-brief-card__next", children: [
73
- /* @__PURE__ */ jsx(ArrowRightGlyph, { size: "sm", "aria-hidden": "true", className: "crewlet-brief-card__arrow" }),
74
- /* @__PURE__ */ jsx("span", { children: recommended.text }),
75
- recommended.action ? /* @__PURE__ */ jsx(Button, { size: "small", variant: "primary", onClick: recommended.action.onSelect, children: recommended.action.label }) : null
76
- ] })
77
- ] }),
78
- followUps && followUps.length > 0 ? /* @__PURE__ */ jsxs("section", { className: "crewlet-brief-card__block", "aria-labelledby": `${id}-ask`, children: [
79
- /* @__PURE__ */ jsx("h4", { className: "crewlet-brief-card__label", id: `${id}-ask`, children: labels.followUps }),
80
- /* @__PURE__ */ jsx(SuggestionList, { className: "crewlet-brief-card__follow-ups", children: followUps.map((f) => /* @__PURE__ */ jsx(SuggestionRow, { icon: /* @__PURE__ */ jsx(MessageCircleQuestionMarkGlyph, { size: "sm" }), onSelect: f.onSelect, children: f.question }, f.key)) })
81
- ] }) : null
82
- ] })
83
- }
84
- );
85
- }
86
-
87
- export { BRIEF_CARD_LABELS, BRIEF_CARD_MAX_NEEDS, BriefCard };
@@ -1,9 +1,9 @@
1
1
  import { useListbox } from './chunk-7KHM2FZH.js';
2
2
  import { Tag } from './chunk-I5OIKDX2.js';
3
- import { announce } from './chunk-2G355KDJ.js';
4
3
  import { isComposing } from './chunk-H5XTJ7GJ.js';
5
4
  import { IconButton } from './chunk-UAUP6XGK.js';
6
5
  import { useFocusModality } from './chunk-NUZHC6MM.js';
6
+ import { announce } from './chunk-2G355KDJ.js';
7
7
  import { cx } from './chunk-ODEQTPFM.js';
8
8
  import './TagsInput-MZXEHKJD.css';
9
9
  import { forwardRef, useState, useRef, useId, useImperativeHandle, useEffect, useMemo, useLayoutEffect } from 'react';
@@ -1,5 +1,5 @@
1
- import { announce } from './chunk-2G355KDJ.js';
2
1
  import { IconButton } from './chunk-UAUP6XGK.js';
2
+ import { announce } from './chunk-2G355KDJ.js';
3
3
  import { cx } from './chunk-ODEQTPFM.js';
4
4
  import './ArrangeFrame-QCQZ5RF6.css';
5
5
  import { forwardRef, useRef, useCallback, useState, useEffect } from 'react';
@@ -1,7 +1,7 @@
1
1
  import { Toolbar } from './chunk-NR4CPM4T.js';
2
- import { announce } from './chunk-2G355KDJ.js';
3
2
  import { Button } from './chunk-DGXZ635L.js';
4
3
  import { returnFocus } from './chunk-NUZHC6MM.js';
4
+ import { announce } from './chunk-2G355KDJ.js';
5
5
  import { cx } from './chunk-ODEQTPFM.js';
6
6
  import './SelectionBar-SCAU6EBY.css';
7
7
  import { useRef, useEffect } from 'react';
@@ -1,9 +1,9 @@
1
1
  import { characterCountState, CharacterCount } from './chunk-PGCLHYVP.js';
2
2
  import { useHeadingLevel, headingTag, HeadingLevelProvider, nextHeadingLevel } from './chunk-PQADV6P6.js';
3
- import { announce } from './chunk-2G355KDJ.js';
4
3
  import { isComposing } from './chunk-H5XTJ7GJ.js';
5
4
  import { IconButton } from './chunk-UAUP6XGK.js';
6
5
  import { useFocusModality } from './chunk-NUZHC6MM.js';
6
+ import { announce } from './chunk-2G355KDJ.js';
7
7
  import { VisuallyHidden } from './chunk-UT6CW3C7.js';
8
8
  import { cx } from './chunk-ODEQTPFM.js';
9
9
  import './Input-GEFFMKBS.css';