@crewlethq/ui 0.44.0 → 0.46.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 (143) hide show
  1. package/README.md +34 -2
  2. package/dist/AccessDeniedCard/index.js +2 -2
  3. package/dist/AgentHandoffPanel/index.js +6 -3
  4. package/dist/AppShell/index.js +3 -3
  5. package/dist/ArrangeList/index.js +5 -3
  6. package/dist/ArtifactBar/index.js +5 -5
  7. package/dist/ArtifactCard/index.js +3 -3
  8. package/dist/AsideLayout/AsideLayout.d.ts +24 -0
  9. package/dist/AsideLayout/index.d.ts +3 -0
  10. package/dist/AsideLayout/index.js +2 -0
  11. package/dist/AsideLayout-TH5SQZNK.css +45 -0
  12. package/dist/AvatarPicker/index.js +6 -6
  13. package/dist/Canvas/index.js +1 -1
  14. package/dist/CanvasBoard/index.js +1 -1
  15. package/dist/CanvasToolbar/index.js +1 -1
  16. package/dist/CatalogTile/index.js +1 -1
  17. package/dist/{CatalogTile-VPSLCKJE.css → CatalogTile-26XN7L2A.css} +13 -7
  18. package/dist/CharacterCount/CharacterCount.d.ts +63 -0
  19. package/dist/CharacterCount/index.d.ts +3 -0
  20. package/dist/CharacterCount/index.js +4 -0
  21. package/dist/CharacterCount-S735DICR.css +29 -0
  22. package/dist/Checkbox/index.js +5 -2
  23. package/dist/Combobox/index.js +5 -3
  24. package/dist/CommandPalette/index.js +6 -4
  25. package/dist/CommentThread/index.js +7 -4
  26. package/dist/Composer/index.js +5 -2
  27. package/dist/ConfirmField/index.js +5 -2
  28. package/dist/DataGrid/index.js +2 -2
  29. package/dist/DataTable/index.js +8 -6
  30. package/dist/DataView/index.js +10 -8
  31. package/dist/DateTimePicker/index.js +1 -1
  32. package/dist/DocTabsEditor/index.js +5 -4
  33. package/dist/EditingStatus/index.js +2 -1
  34. package/dist/{Editor-FXO2JVWK.js → Editor-6FXHMW64.js} +5 -3
  35. package/dist/EmptyState/EmptyState.d.ts +9 -2
  36. package/dist/EmptyState/index.js +1 -1
  37. package/dist/{EmptyState-C6HRBGT7.css → EmptyState-7L4UAQBX.css} +34 -0
  38. package/dist/FollowBanner/index.js +2 -2
  39. package/dist/HuePicker/index.js +5 -5
  40. package/dist/InlineEditor/InlineEditor.d.ts +86 -0
  41. package/dist/InlineEditor/index.d.ts +3 -0
  42. package/dist/InlineEditor/index.js +9 -0
  43. package/dist/InlineEditor-W55DDKML.css +72 -0
  44. package/dist/Input/FormField.d.ts +18 -1
  45. package/dist/Input/Textarea.d.ts +16 -0
  46. package/dist/Input/index.d.ts +2 -2
  47. package/dist/Input/index.js +4 -1
  48. package/dist/{Input-OQZBCRX5.css → Input-VDSV7VWJ.css} +19 -0
  49. package/dist/LinkInterstitial/index.js +3 -3
  50. package/dist/List/List.d.ts +16 -1
  51. package/dist/List/index.js +1 -1
  52. package/dist/{List-YHLIZFK4.css → List-XY445TKY.css} +31 -0
  53. package/dist/ListInput/ListInput.d.ts +87 -2
  54. package/dist/ListInput/index.d.ts +2 -2
  55. package/dist/ListInput/index.js +5 -2
  56. package/dist/{ListInput-O7LJKOIG.css → ListInput-DP2CSJ22.css} +118 -2
  57. package/dist/MarkdownEditor/index.js +5 -5
  58. package/dist/Menu/index.js +2 -2
  59. package/dist/MergeConflicts/index.js +5 -5
  60. package/dist/Modal/index.js +2 -2
  61. package/dist/PresenterView/index.js +3 -3
  62. package/dist/PrincipalPicker/index.js +6 -4
  63. package/dist/RelatedRow/index.js +2 -2
  64. package/dist/RichEditor/index.js +1 -1
  65. package/dist/SegmentedControl/index.js +4 -4
  66. package/dist/Select/index.js +1 -1
  67. package/dist/ShareDialog/index.js +3 -3
  68. package/dist/SheetColumnEditor/index.js +10 -8
  69. package/dist/SheetGrid/index.js +4 -4
  70. package/dist/SlideCompare/index.js +1 -1
  71. package/dist/SlideFilmstrip/index.js +3 -3
  72. package/dist/Statement/Statement.d.ts +45 -0
  73. package/dist/Statement/index.d.ts +3 -0
  74. package/dist/Statement/index.js +4 -0
  75. package/dist/Statement-M4QDXIMO.css +53 -0
  76. package/dist/Switcher/index.js +5 -4
  77. package/dist/Tabs/index.js +3 -3
  78. package/dist/Text/Text.d.ts +8 -0
  79. package/dist/Text/index.js +1 -1
  80. package/dist/{Text-S3Q4O3IG.css → Text-XOCOU34C.css} +9 -0
  81. package/dist/ThemeSwitcher/index.js +5 -5
  82. package/dist/TileGrid/index.js +1 -1
  83. package/dist/{TileGrid-I6LNYD2H.css → TileGrid-UYMVVVJK.css} +30 -0
  84. package/dist/TimeWindowPicker/index.js +5 -3
  85. package/dist/TreeCanvas/index.js +1 -1
  86. package/dist/VersionCompare/index.js +6 -6
  87. package/dist/{chunk-5AHDGYKN.js → chunk-2KQR6JKE.js} +2 -2
  88. package/dist/{chunk-NVMZQ3Y4.js → chunk-2LPNWAN6.js} +2 -2
  89. package/dist/{chunk-XIDD7PJO.js → chunk-2MYSESZF.js} +1 -1
  90. package/dist/{chunk-MVGCZ655.js → chunk-2UVMIM2J.js} +1 -1
  91. package/dist/{chunk-NF6SWHQI.js → chunk-32MTQ6DN.js} +2 -2
  92. package/dist/{chunk-QOP7QYUW.js → chunk-34RMTXDZ.js} +1 -1
  93. package/dist/{chunk-Q7HLZH32.js → chunk-3QSKDZR5.js} +1 -1
  94. package/dist/{chunk-BVFMLSE3.js → chunk-5EBDOE3C.js} +1 -1
  95. package/dist/{chunk-BF5WV7NM.js → chunk-6FVGSWLS.js} +1 -1
  96. package/dist/chunk-7P336RA5.js +147 -0
  97. package/dist/{chunk-UAGDFEBG.js → chunk-DY4DQ7EB.js} +1 -1
  98. package/dist/{chunk-4DIKLY53.js → chunk-HBSR5DL6.js} +1 -1
  99. package/dist/{chunk-KA75QPFM.js → chunk-ILFEWRLG.js} +1 -1
  100. package/dist/{chunk-AACPFUZW.js → chunk-KOJKX3U6.js} +4 -4
  101. package/dist/chunk-KY65C4XS.js +12 -0
  102. package/dist/{chunk-FG243QHY.js → chunk-KZDMAQNJ.js} +1 -1
  103. package/dist/{chunk-TC7DJTXI.js → chunk-MULOZYHL.js} +2 -0
  104. package/dist/chunk-MZJKPTA5.js +36 -0
  105. package/dist/{chunk-ZUTUI27P.js → chunk-N4GBDK4L.js} +1 -1
  106. package/dist/{chunk-7CXGSS7D.js → chunk-O6H5XXVK.js} +1 -1
  107. package/dist/{chunk-RA2ULG6H.js → chunk-PPUR46MK.js} +10 -1
  108. package/dist/{chunk-GI3S6RMM.js → chunk-PWZT6CZY.js} +3 -3
  109. package/dist/{chunk-NNTO3TNC.js → chunk-Q6CQMS6R.js} +1 -1
  110. package/dist/{chunk-IKBK4A5O.js → chunk-QP2P6GDQ.js} +1 -1
  111. package/dist/{chunk-KV3ODJXH.js → chunk-QTMUKRTN.js} +1 -1
  112. package/dist/{chunk-W53CWWX3.js → chunk-RCKRJXFV.js} +2 -2
  113. package/dist/{chunk-IUQQGIHL.js → chunk-RFPCHMSX.js} +2 -2
  114. package/dist/{chunk-X6IJ7DAX.js → chunk-RL75QTNT.js} +2 -2
  115. package/dist/{chunk-N3SHQ3VU.js → chunk-RRPQMMCZ.js} +1 -1
  116. package/dist/{chunk-EY7LACIR.js → chunk-RWET7W22.js} +1 -1
  117. package/dist/{chunk-TVSHR35W.js → chunk-RWWLVDRE.js} +1 -1
  118. package/dist/{chunk-LSRQJDGR.js → chunk-SEPSXOGJ.js} +1 -1
  119. package/dist/{chunk-MCOC3KQA.js → chunk-SQ4JFHO7.js} +1 -1
  120. package/dist/chunk-SQZEVWVC.js +436 -0
  121. package/dist/{chunk-DL5ERIFF.js → chunk-SS4XCUUJ.js} +2 -2
  122. package/dist/{chunk-GPIRKHGS.js → chunk-T7DXSFUX.js} +1 -1
  123. package/dist/{chunk-NZWX27J7.js → chunk-TDQ262TB.js} +19 -3
  124. package/dist/{chunk-5GNA4RKP.js → chunk-TGSIVB6H.js} +1 -1
  125. package/dist/{chunk-UO5VJHWP.js → chunk-U4HOKU6P.js} +2 -2
  126. package/dist/chunk-XCUUI7E7.js +62 -0
  127. package/dist/{chunk-ENHLVF6Q.js → chunk-XS2FJVMT.js} +1 -1
  128. package/dist/{chunk-FV6H7H5I.js → chunk-YBJVIY5E.js} +4 -4
  129. package/dist/{chunk-6MAQ2SVP.js → chunk-YR3ZURBM.js} +3 -3
  130. package/dist/{chunk-ZI5G5RS7.js → chunk-Z734SV4E.js} +55 -8
  131. package/dist/{chunk-OWIGEE2Y.js → chunk-ZZCCNVF3.js} +3 -3
  132. package/dist/generated/index.d.ts +4 -0
  133. package/dist/generated/index.js +95 -91
  134. package/dist/index.js +95 -91
  135. package/dist/styles.css +472 -16
  136. package/package.json +3 -3
  137. package/dist/chunk-NMYGJJJK.js +0 -263
  138. package/dist/{chunk-VXCT6L3F.js → chunk-245IXG5P.js} +0 -0
  139. package/dist/{chunk-OED6LUWE.js → chunk-4A4QG6UC.js} +1 -1
  140. package/dist/{chunk-FYINAYAJ.js → chunk-6AKG2VLR.js} +1 -1
  141. package/dist/{chunk-E6HXFFWO.js → chunk-ISDEXIXH.js} +1 -1
  142. package/dist/{chunk-U2XAJONO.js → chunk-OKE5YSLD.js} +1 -1
  143. package/dist/{chunk-PCI7ZJ6Z.js → chunk-TMM32U7D.js} +1 -1
@@ -1,26 +1,28 @@
1
- export { DATA_VIEW_TOOLBAR_LABELS, DataView, DataViewToolbar, FILTER_AXIS_LABELS, FilterAxisBar, FilterAxisChip, applyColumnFilters, applyFilters, blankFilterValue, defaultOperator, filterDefsFromColumns, filterHasValue, filterPredicate, formatFilterValue, operatorOf, tableColumns } from '../chunk-AACPFUZW.js';
1
+ export { DATA_VIEW_TOOLBAR_LABELS, DataView, DataViewToolbar, FILTER_AXIS_LABELS, FilterAxisBar, FilterAxisChip, applyColumnFilters, applyFilters, blankFilterValue, defaultOperator, filterDefsFromColumns, filterHasValue, filterPredicate, formatFilterValue, operatorOf, tableColumns } from '../chunk-KOJKX3U6.js';
2
2
  import '../chunk-HOXGBLEY.js';
3
3
  import '../chunk-UFXLNC2N.js';
4
- import '../chunk-GI3S6RMM.js';
4
+ import '../chunk-PWZT6CZY.js';
5
5
  import '../chunk-STJ7QBC3.js';
6
6
  import '../chunk-DTIW4CHZ.js';
7
- import '../chunk-FYINAYAJ.js';
7
+ import '../chunk-6AKG2VLR.js';
8
8
  import '../chunk-7KHM2FZH.js';
9
+ import '../chunk-NR4CPM4T.js';
9
10
  import '../chunk-KHJIEPZV.js';
10
11
  import '../chunk-GXQ3B46I.js';
11
- import '../chunk-NR4CPM4T.js';
12
- import '../chunk-EY7LACIR.js';
12
+ import '../chunk-RWET7W22.js';
13
13
  import '../chunk-3CZ7XAVY.js';
14
14
  import '../chunk-EUCC37WY.js';
15
15
  import '../chunk-AV2DXAEL.js';
16
- import '../chunk-ZI5G5RS7.js';
16
+ import '../chunk-Z734SV4E.js';
17
+ import '../chunk-XCUUI7E7.js';
17
18
  import '../chunk-SMBKXWML.js';
18
19
  import '../chunk-BHHIIK3M.js';
19
20
  import '../chunk-PQADV6P6.js';
20
- import '../chunk-PCI7ZJ6Z.js';
21
+ import '../chunk-RSAQOKH3.js';
22
+ import '../chunk-TMM32U7D.js';
21
23
  import '../chunk-OMV5W53A.js';
22
- import '../chunk-H5XTJ7GJ.js';
23
24
  import '../chunk-OG6CL3EB.js';
25
+ import '../chunk-H5XTJ7GJ.js';
24
26
  import '../chunk-LACA4JGC.js';
25
27
  import '../chunk-NUZHC6MM.js';
26
28
  import '../chunk-BZFWDIV6.js';
@@ -2,8 +2,8 @@ export { DEFAULT_DATE_TIME_PICKER_LABELS, DateTimePicker } from '../chunk-UFXLNC
2
2
  import '../chunk-KHJIEPZV.js';
3
3
  import '../chunk-GXQ3B46I.js';
4
4
  import '../chunk-OMV5W53A.js';
5
- import '../chunk-H5XTJ7GJ.js';
6
5
  import '../chunk-OG6CL3EB.js';
6
+ import '../chunk-H5XTJ7GJ.js';
7
7
  import '../chunk-LACA4JGC.js';
8
8
  import '../chunk-NUZHC6MM.js';
9
9
  import '../chunk-BZFWDIV6.js';
@@ -1,12 +1,13 @@
1
- export { DOC_TABS_EDITOR_LABELS, DocTabsEditor } from '../chunk-W53CWWX3.js';
1
+ export { DOC_TABS_EDITOR_LABELS, DocTabsEditor } from '../chunk-RCKRJXFV.js';
2
2
  import '../chunk-XJ2QEBMM.js';
3
- import '../chunk-ZI5G5RS7.js';
3
+ import '../chunk-Z734SV4E.js';
4
+ import '../chunk-XCUUI7E7.js';
4
5
  import '../chunk-PQADV6P6.js';
5
6
  import '../chunk-RSAQOKH3.js';
6
- import '../chunk-PCI7ZJ6Z.js';
7
+ import '../chunk-TMM32U7D.js';
7
8
  import '../chunk-OMV5W53A.js';
8
- import '../chunk-H5XTJ7GJ.js';
9
9
  import '../chunk-OG6CL3EB.js';
10
+ import '../chunk-H5XTJ7GJ.js';
10
11
  import '../chunk-LACA4JGC.js';
11
12
  import '../chunk-NUZHC6MM.js';
12
13
  import '../chunk-BZFWDIV6.js';
@@ -1,2 +1,3 @@
1
- export { EditingStatus } from '../chunk-TC7DJTXI.js';
1
+ export { EditingStatus } from '../chunk-MULOZYHL.js';
2
+ import '../chunk-BZFWDIV6.js';
2
3
  import '../chunk-ODEQTPFM.js';
@@ -2,12 +2,14 @@ import { richEditorLabels } from './chunk-CSQTDGTS.js';
2
2
  import { schema, readMarkdown, writeMarkdown } from './chunk-QH6VYJ3X.js';
3
3
  import { safeHref, MARKDOWN_CALLOUT_TONES } from './chunk-BAKPMH3S.js';
4
4
  import { Toolbar } from './chunk-NR4CPM4T.js';
5
- import { FormField, Input } from './chunk-ZI5G5RS7.js';
5
+ import { FormField, Input } from './chunk-Z734SV4E.js';
6
+ import './chunk-XCUUI7E7.js';
6
7
  import './chunk-PQADV6P6.js';
7
- import { Menu } from './chunk-PCI7ZJ6Z.js';
8
+ import './chunk-RSAQOKH3.js';
9
+ import { Menu } from './chunk-TMM32U7D.js';
8
10
  import { placePopup, viewportBounds } from './chunk-OMV5W53A.js';
9
- import { usePopupLayer } from './chunk-H5XTJ7GJ.js';
10
11
  import { Button } from './chunk-OG6CL3EB.js';
12
+ import { usePopupLayer } from './chunk-H5XTJ7GJ.js';
11
13
  import { IconButton } from './chunk-LACA4JGC.js';
12
14
  import './chunk-NUZHC6MM.js';
13
15
  import { VisuallyHidden } from './chunk-BZFWDIV6.js';
@@ -1,6 +1,13 @@
1
1
  import type { HTMLAttributes, ReactNode } from 'react';
2
2
  import { type HeadingLevel } from '../utils/headingLevel.js';
3
- export type EmptyStateSize = 'default' | 'compact';
3
+ /**
4
+ * `default` is a screen's, `compact` a panel's, both centred under a glyph.
5
+ * `inline` is a field's or a section's: one left-aligned row on a dashed
6
+ * hairline, the sentence beside its one action and no glyph, for a part of a
7
+ * page that is empty while the rest of it is not (a mission nobody has
8
+ * written, a list with nothing in it yet).
9
+ */
10
+ export type EmptyStateSize = 'default' | 'compact' | 'inline';
4
11
  export interface EmptyStateProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
5
12
  /** A glyph, drawn large and quiet. Replaced by `illustration` when both are given. */
6
13
  icon?: ReactNode;
@@ -17,7 +24,7 @@ export interface EmptyStateProps extends Omit<HTMLAttributes<HTMLDivElement>, 't
17
24
  description: ReactNode;
18
25
  /** What would fill it, as a control: "Create the first seat", "Connect Slack". */
19
26
  action?: ReactNode;
20
- /** `compact` is for an empty state inside a panel rather than a screen. */
27
+ /** How much room it takes; see [EmptyStateSize]. */
21
28
  size?: EmptyStateSize | undefined;
22
29
  /**
23
30
  * The heading level of the title. Taken from where the component finds
@@ -1,3 +1,3 @@
1
- export { EmptyState } from '../chunk-RA2ULG6H.js';
1
+ export { EmptyState } from '../chunk-PPUR46MK.js';
2
2
  import '../chunk-PQADV6P6.js';
3
3
  import '../chunk-ODEQTPFM.js';
@@ -71,3 +71,37 @@
71
71
  .crewlet-empty-state__action {
72
72
  margin-top: var(--spacing-2);
73
73
  }
74
+
75
+ /*
76
+ * INLINE: one left-aligned row on a dashed hairline, the sentence beside its
77
+ * action. The dash says "nothing here yet" without a glyph, and the box keeps
78
+ * the place the content will take, so the page does not move when it is
79
+ * filled. Narrow, the action wraps under the words.
80
+ */
81
+ .crewlet-empty-state--inline {
82
+ flex-direction: row;
83
+ flex-wrap: wrap;
84
+ justify-content: space-between;
85
+ gap: var(--spacing-2) var(--spacing-4);
86
+ padding: var(--spacing-3) var(--spacing-4);
87
+ border: 1px dashed var(--color-border-default);
88
+ border-radius: var(--radius-md);
89
+ text-align: start;
90
+ }
91
+
92
+ .crewlet-empty-state__text {
93
+ display: flex;
94
+ flex: 1 1 16rem;
95
+ flex-direction: column;
96
+ gap: var(--spacing-1);
97
+ min-width: 0;
98
+ }
99
+
100
+ .crewlet-empty-state--inline .crewlet-empty-state__description {
101
+ max-width: var(--size-measure);
102
+ }
103
+
104
+ .crewlet-empty-state--inline .crewlet-empty-state__action {
105
+ flex: none;
106
+ margin-top: 0;
107
+ }
@@ -1,8 +1,8 @@
1
- export { FollowBanner } from '../chunk-OED6LUWE.js';
1
+ export { FollowBanner } from '../chunk-4A4QG6UC.js';
2
2
  import '../chunk-SZZRIHGT.js';
3
3
  import '../chunk-OMV5W53A.js';
4
- import '../chunk-H5XTJ7GJ.js';
5
4
  import '../chunk-OG6CL3EB.js';
5
+ import '../chunk-H5XTJ7GJ.js';
6
6
  import '../chunk-NUZHC6MM.js';
7
7
  import '../chunk-BZFWDIV6.js';
8
8
  import '../chunk-ODEQTPFM.js';
@@ -1,16 +1,16 @@
1
1
  import '../chunk-FFMCMSJB.js';
2
- export { HuePicker, HueSwatch } from '../chunk-QOP7QYUW.js';
2
+ export { HuePicker, HueSwatch } from '../chunk-34RMTXDZ.js';
3
3
  import '../chunk-AYKXMIOR.js';
4
- import '../chunk-BF5WV7NM.js';
5
- import '../chunk-KA75QPFM.js';
4
+ import '../chunk-6FVGSWLS.js';
5
+ import '../chunk-ILFEWRLG.js';
6
6
  import '../chunk-WIATRXEJ.js';
7
7
  import '../chunk-EGMQURBR.js';
8
8
  import '../chunk-BHHIIK3M.js';
9
- import '../chunk-PCI7ZJ6Z.js';
9
+ import '../chunk-TMM32U7D.js';
10
10
  import '../chunk-OMV5W53A.js';
11
- import '../chunk-H5XTJ7GJ.js';
12
11
  import '../chunk-2YTOOH3A.js';
13
12
  import '../chunk-OG6CL3EB.js';
13
+ import '../chunk-H5XTJ7GJ.js';
14
14
  import '../chunk-LACA4JGC.js';
15
15
  import '../chunk-NUZHC6MM.js';
16
16
  import '../chunk-BZFWDIV6.js';
@@ -0,0 +1,86 @@
1
+ import { type FormHTMLAttributes, type ReactNode } from 'react';
2
+ import { type EditingStatusLabels } from '../EditingStatus/index.js';
3
+ /** Every string the editor's bar draws. */
4
+ export interface InlineEditorLabels {
5
+ save: string;
6
+ cancel: string;
7
+ /** Why Save does nothing while nothing has changed. */
8
+ unchanged: string;
9
+ /** Why Save does nothing while a field refuses its value. */
10
+ invalid: string;
11
+ /** Why Cancel does nothing while the save is in flight. */
12
+ saving: string;
13
+ /** The words after the shortcut's keycap: "to save". */
14
+ shortcut: string;
15
+ status?: Partial<EditingStatusLabels> | undefined;
16
+ }
17
+ export declare const INLINE_EDITOR_LABELS: InlineEditorLabels;
18
+ export interface InlineEditorProps extends Omit<FormHTMLAttributes<HTMLFormElement>, 'onSubmit' | 'children' | 'aria-label'> {
19
+ /** The form's name, for a reader moving by landmark: "Edit the mission". */
20
+ label: string;
21
+ /** The fields. Their values, and what a save sends, are the caller's. */
22
+ children: ReactNode;
23
+ /** Save was asked for: the button, or Mod+Enter from inside the form. Not called while Save is unavailable. */
24
+ onSave: () => void;
25
+ /** Cancel was asked for: the button, or Escape from inside the form. Not called while saving. */
26
+ onCancel: () => void;
27
+ /** Anything differs from what was opened. Save waits for it, and the bar says so. */
28
+ dirty: boolean;
29
+ /** A save is in flight: Save spins, and neither Save nor Cancel can be pressed again. */
30
+ saving?: boolean | undefined;
31
+ /** A field refuses its value. Save waits for it. */
32
+ invalid?: boolean | undefined;
33
+ /** Why the last save failed, said as an alert above the bar. */
34
+ error?: ReactNode;
35
+ /** A note above the bar that is not an error: a `ConflictNote` once the record moved on. */
36
+ notice?: ReactNode;
37
+ /**
38
+ * Puts the focus in the first field when the editor opens, at the end of
39
+ * what it holds. ON by default, because an editor is opened by a press of
40
+ * Edit, and the reader's next keystroke is meant for the field, not for the
41
+ * button that has gone. Named as `ListInput`'s is.
42
+ */
43
+ focusOnMount?: boolean | undefined;
44
+ /** Draws the Mod+Enter keycap beside Save. ON by default. */
45
+ shortcutHint?: boolean | undefined;
46
+ /** Controls at the start of the bar, after the status: a "Reset to the default" link. */
47
+ secondaryActions?: ReactNode;
48
+ labels?: Partial<InlineEditorLabels> | undefined;
49
+ }
50
+ /**
51
+ * One record edited where it is read: its fields, then a bar with the editing
52
+ * status at its start and Cancel and Save at its end.
53
+ *
54
+ * WHY IT EXISTS. A page that shows a mission, a list of policies or a goal and
55
+ * lets the reader change it has the same five decisions to make every time,
56
+ * and each one made differently is a page that behaves unlike its neighbour:
57
+ * which keys save and cancel, whether a Save with nothing to save can be
58
+ * pressed, where the failure is said, where the focus goes when the form
59
+ * opens, and what the reader is told while the save is in flight. This is
60
+ * those five, once.
61
+ *
62
+ * IT OWNS NO STATE. The draft, the save call, what happens on a conflict and
63
+ * where the focus goes once the editor closes are the caller's: the record is
64
+ * the caller's, and so is the button that opened the editor, which is the one
65
+ * place the focus belongs when it closes.
66
+ *
67
+ * THE KEYS. Mod+Enter saves from any field and Escape cancels, each only
68
+ * once nothing inside has claimed the key first (an open menu's Escape closes
69
+ * the menu, not the editor) and never in the middle of an input method's
70
+ * composition. Enter alone belongs to the field: a newline in a paragraph,
71
+ * the next item in a list, and NOTHING in a single-line field. A browser
72
+ * submits a form on Enter in a one-line input, and here that would save a
73
+ * record mid-edit from the key a writer presses to finish a word, so the
74
+ * editor refuses that implicit submission: saving is always the one gesture.
75
+ *
76
+ * CANCEL DISCARDS AT ONCE. Escape and Cancel call `onCancel` whatever the
77
+ * draft holds, because whether a draft is worth a question is the caller's
78
+ * call. A caller holding a draft worth keeping asks first in `onCancel` while
79
+ * `dirty` ("Discard your changes to the mission?"), and closes only on yes.
80
+ *
81
+ * SAVE IS NEVER A DEAD BUTTON. While nothing has changed, while a field
82
+ * refuses its value and while a save is in flight it stays reachable and says
83
+ * why it does nothing, rather than being natively disabled, which takes the
84
+ * focus away from the reader who just pressed it.
85
+ */
86
+ export declare function InlineEditor({ label, children, onSave, onCancel, dirty, saving, invalid, error, notice, focusOnMount, shortcutHint, secondaryActions, labels: overrides, className, onKeyDown, ...rest }: InlineEditorProps): import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import './InlineEditor.css';
2
+ export { INLINE_EDITOR_LABELS, InlineEditor } from './InlineEditor.js';
3
+ export type { InlineEditorLabels, InlineEditorProps } from './InlineEditor.js';
@@ -0,0 +1,9 @@
1
+ export { INLINE_EDITOR_LABELS, InlineEditor } from '../chunk-7P336RA5.js';
2
+ import '../chunk-MULOZYHL.js';
3
+ import '../chunk-SMBKXWML.js';
4
+ import '../chunk-OMV5W53A.js';
5
+ import '../chunk-OG6CL3EB.js';
6
+ import '../chunk-H5XTJ7GJ.js';
7
+ import '../chunk-NUZHC6MM.js';
8
+ import '../chunk-BZFWDIV6.js';
9
+ import '../chunk-ODEQTPFM.js';
@@ -0,0 +1,72 @@
1
+ /*
2
+ * InlineEditor: one record's fields, then a bar. It draws no surface of its
3
+ * own, so it reads as the card or the section it is opened in rather than as
4
+ * a form dropped on top of it.
5
+ */
6
+
7
+ .crewlet-inline-editor {
8
+ display: flex;
9
+ flex-direction: column;
10
+ gap: var(--spacing-3);
11
+ min-width: 0;
12
+ margin: 0;
13
+ }
14
+
15
+ .crewlet-inline-editor__fields {
16
+ display: flex;
17
+ flex-direction: column;
18
+ gap: var(--spacing-4);
19
+ min-width: 0;
20
+ }
21
+
22
+ .crewlet-inline-editor__error {
23
+ font-size: var(--font-size-sm);
24
+ line-height: var(--font-line-height-normal);
25
+ color: var(--color-feedback-danger-ink);
26
+ }
27
+
28
+ /*
29
+ * THE BAR: the status at its start, the two controls at its end, on one line
30
+ * where there is room. On a narrow card it wraps whole, the controls keeping
31
+ * their order at the end, so Save is never the control that falls off.
32
+ */
33
+ .crewlet-inline-editor__bar {
34
+ display: flex;
35
+ flex-wrap: wrap;
36
+ align-items: center;
37
+ justify-content: space-between;
38
+ gap: var(--spacing-2) var(--spacing-3);
39
+ padding-top: var(--spacing-3);
40
+ border-top-width: 1px;
41
+ border-top-style: solid;
42
+ border-top-color: var(--color-border-default);
43
+ }
44
+
45
+ .crewlet-inline-editor__start,
46
+ .crewlet-inline-editor__end {
47
+ display: inline-flex;
48
+ align-items: center;
49
+ gap: var(--spacing-2);
50
+ min-width: 0;
51
+ }
52
+
53
+ .crewlet-inline-editor__end {
54
+ margin-inline-start: auto;
55
+ }
56
+
57
+ .crewlet-inline-editor__hint {
58
+ display: inline-flex;
59
+ align-items: center;
60
+ gap: var(--spacing-1);
61
+ font-size: var(--font-size-xs);
62
+ color: var(--color-text-tertiary);
63
+ white-space: nowrap;
64
+ }
65
+
66
+ /* A touch screen has no Mod+Enter to press: the hint goes where no keyboard
67
+ is the main way in. */
68
+ @media (hover: none) and (pointer: coarse) {
69
+ .crewlet-inline-editor__hint {
70
+ display: none;
71
+ }
72
+ }
@@ -1,4 +1,13 @@
1
1
  import { type HTMLAttributes, type ReactNode } from 'react';
2
+ import { type CharacterCountLabels } from '../CharacterCount/index.js';
3
+ /** A field's length limit, and how much of it the value uses. */
4
+ export interface FormFieldLimit {
5
+ /** How many characters the value holds. `countCharacters` counts them as a reader would. */
6
+ length: number;
7
+ /** The most it may hold. */
8
+ max: number;
9
+ labels?: Partial<CharacterCountLabels> | undefined;
10
+ }
2
11
  /** What a field's control needs to know about the row it sits in. */
3
12
  export interface FormFieldRender {
4
13
  /** The id the label points at. Put it on the control. */
@@ -28,6 +37,14 @@ export interface FormFieldProps extends Omit<HTMLAttributes<HTMLElement>, 'child
28
37
  helperOnFocus?: boolean | undefined;
29
38
  /** Why the last value was refused. */
30
39
  error?: ReactNode;
40
+ /**
41
+ * A length limit: the count is drawn at the end of the help line ("120 /
42
+ * 500"), joined into the description after the help and before the error,
43
+ * and a value past it marks the field invalid. A SOFT limit, never a
44
+ * `maxLength`: what was typed or pasted stays, and the count says by how
45
+ * much it is over. See `CharacterCount`.
46
+ */
47
+ limit?: FormFieldLimit | undefined;
31
48
  /** A control rendered beside the label, such as an Add button. */
32
49
  labelAction?: ReactNode;
33
50
  /**
@@ -65,4 +82,4 @@ export interface FormFieldProps extends Omit<HTMLAttributes<HTMLElement>, 'child
65
82
  * instant, the only line that said what right looks like disappeared. Both
66
83
  * lines are joined into `aria-describedby` in reading order, help first.
67
84
  */
68
- export declare const FormField: ({ label, required, optional, requiredNews, helper, helperOnFocus, error, labelAction, as, describedBy, htmlFor, className, children, ...rest }: FormFieldProps) => import("react").JSX.Element;
85
+ export declare const FormField: ({ label, required, optional, requiredNews, helper, helperOnFocus, error, limit, labelAction, as, describedBy, htmlFor, className, children, ...rest }: FormFieldProps) => import("react").JSX.Element;
@@ -12,5 +12,21 @@ export interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElemen
12
12
  * hinting that Enter adds the value. It does not take the pointer.
13
13
  */
14
14
  trailing?: ReactNode;
15
+ /**
16
+ * A value of ONE LINE that wraps so it can be read whole: a mission, a
17
+ * policy, a title with a long tail. A one-line `Input` scrolls a long value
18
+ * sideways, so a 160-character mission shows only its last words while it
19
+ * is being edited; this field wraps it instead, and still holds one line.
20
+ * Enter inserts no line break (the key stays the surrounding form's or
21
+ * list's to act on), and a line break pasted or dropped in is folded into
22
+ * a space, and said so (`foldedMessage`), since the value is then not
23
+ * quite what was pasted. `aria-multiline` is false, so it is announced as
24
+ * the one-line field it is. Pair it with `autoResize` and `rows={1}`.
25
+ */
26
+ singleLine?: boolean;
27
+ /** Said through the page's `Announcer` when a `singleLine` field folds line breaks it was given. */
28
+ foldedMessage?: string;
15
29
  }
30
+ /** A value with its line breaks, and the space around each, folded into one space. */
31
+ export declare function foldLineBreaks(text: string): string;
16
32
  export declare const Textarea: import("react").ForwardRefExoticComponent<TextareaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
@@ -1,12 +1,12 @@
1
1
  import './Input.css';
2
2
  export { Input, InputAffix } from './Input.js';
3
3
  export type { InputAffixProps, InputAppearance, InputProps, InputSize, InputWidth } from './Input.js';
4
- export { Textarea } from './Textarea.js';
4
+ export { Textarea, foldLineBreaks } from './Textarea.js';
5
5
  export type { TextareaProps } from './Textarea.js';
6
6
  export { Label } from './Label.js';
7
7
  export type { LabelProps } from './Label.js';
8
8
  export { FormField } from './FormField.js';
9
- export type { FormFieldProps, FormFieldRender } from './FormField.js';
9
+ export type { FormFieldLimit, FormFieldProps, FormFieldRender } from './FormField.js';
10
10
  export { FormRow } from './FormRow.js';
11
11
  export type { FormRowProps } from './FormRow.js';
12
12
  export { FormSection } from './FormSection.js';
@@ -1,5 +1,8 @@
1
- export { FormField, FormRow, FormSection, Input, InputAffix, Label, ReadOnlyField, Textarea } from '../chunk-ZI5G5RS7.js';
1
+ export { FormField, FormRow, FormSection, Input, InputAffix, Label, ReadOnlyField, Textarea, foldLineBreaks } from '../chunk-Z734SV4E.js';
2
+ import '../chunk-XCUUI7E7.js';
2
3
  import '../chunk-PQADV6P6.js';
4
+ import '../chunk-RSAQOKH3.js';
5
+ import '../chunk-H5XTJ7GJ.js';
3
6
  import '../chunk-LACA4JGC.js';
4
7
  import '../chunk-NUZHC6MM.js';
5
8
  import '../chunk-BZFWDIV6.js';
@@ -561,6 +561,25 @@
561
561
  color: var(--color-text-tertiary);
562
562
  }
563
563
 
564
+ /*
565
+ * THE HELP LINE WITH A COUNT AT ITS END (`limit`). The help wraps in the room
566
+ * the count leaves, and the count keeps its width and its line: it is the
567
+ * figure a writer glances at, so it does not move as the sentence beside it
568
+ * wraps.
569
+ */
570
+ .crewlet-form-field__meta {
571
+ display: flex;
572
+ align-items: flex-start;
573
+ justify-content: space-between;
574
+ gap: var(--spacing-3);
575
+ }
576
+
577
+ .crewlet-form-field__meta > .crewlet-form-field__helper,
578
+ .crewlet-form-field__meta-spacer {
579
+ flex: 1;
580
+ min-width: 0;
581
+ }
582
+
564
583
  /* SHOWN ONLY WHILE THE FIELD HAS FOCUS (`helperOnFocus`): a dense form reads as
565
584
  labels and values at rest, and the sentence appears under the field the
566
585
  reader is in. Still described, so a screen reader hears it on entry. */
@@ -1,11 +1,11 @@
1
- export { LinkInterstitial, openExternal } from '../chunk-UAGDFEBG.js';
2
- import '../chunk-FYINAYAJ.js';
1
+ export { LinkInterstitial, openExternal } from '../chunk-DY4DQ7EB.js';
3
2
  import '../chunk-5CLW2CXT.js';
3
+ import '../chunk-6AKG2VLR.js';
4
4
  import '../chunk-SZZRIHGT.js';
5
5
  import '../chunk-PQADV6P6.js';
6
6
  import '../chunk-OMV5W53A.js';
7
- import '../chunk-H5XTJ7GJ.js';
8
7
  import '../chunk-OG6CL3EB.js';
8
+ import '../chunk-H5XTJ7GJ.js';
9
9
  import '../chunk-LACA4JGC.js';
10
10
  import '../chunk-NUZHC6MM.js';
11
11
  import '../chunk-BZFWDIV6.js';
@@ -32,6 +32,21 @@ export interface ListProps extends HTMLAttributes<HTMLElement> {
32
32
  * row measures itself against the same track list.
33
33
  */
34
34
  template?: string | undefined;
35
+ /**
36
+ * How much room a row takes. `comfortable` (the default) is the list as it
37
+ * always was. `compact` sets the rows a small step apart in the body's size
38
+ * at its normal leading, for a card that has to hold a long list on one
39
+ * screen: eight standing policies of two lines each, on a page that also
40
+ * shows the mission and the vision above them.
41
+ */
42
+ density?: 'comfortable' | 'compact' | undefined;
43
+ /**
44
+ * Holds each row's words to a reading measure while the row itself, and the
45
+ * rule under it, still spans the list: `normal` is prose's (68ch), `wide`
46
+ * is a list of statements read one at a time (80ch), a company's policies.
47
+ * Unset, the words take the row's width, as a feed's do.
48
+ */
49
+ measure?: 'normal' | 'wide' | undefined;
35
50
  }
36
51
  /**
37
52
  * The non-tabular list: an activity feed, a set of search results, a
@@ -43,7 +58,7 @@ export interface ListProps extends HTMLAttributes<HTMLElement> {
43
58
  * means nothing. What a feed does want is alignment, which `template` gives it
44
59
  * without the promise.
45
60
  */
46
- export declare function List({ variant, template, className, style, children, ...rest }: ListProps): import("react").JSX.Element;
61
+ export declare function List({ variant, template, density, measure, className, style, children, ...rest }: ListProps): import("react").JSX.Element;
47
62
  export declare namespace List {
48
63
  var Item: typeof ListItem;
49
64
  }
@@ -1,3 +1,3 @@
1
- export { List, ListItem } from '../chunk-NZWX27J7.js';
1
+ export { List, ListItem } from '../chunk-TDQ262TB.js';
2
2
  import '../chunk-BZFWDIV6.js';
3
3
  import '../chunk-ODEQTPFM.js';
@@ -166,6 +166,37 @@
166
166
  color: var(--color-text-tertiary);
167
167
  }
168
168
 
169
+ /*
170
+ * COMPACT: a row a small step tall, in the body's size at its normal leading,
171
+ * so a list of statements that each run to two lines still stands on one
172
+ * screen. Only the rhythm changes; the number column, the rule between rows
173
+ * and the inset a card gives them stay where they were.
174
+ */
175
+ .crewlet-list--compact .crewlet-list__row {
176
+ min-height: 0;
177
+ padding-block: var(--spacing-1);
178
+ }
179
+
180
+ .crewlet-list--compact.crewlet-list--numbered-divided .crewlet-list__row {
181
+ padding-block: var(--spacing-2);
182
+ font-size: var(--font-size-sm);
183
+ line-height: var(--font-line-height-normal);
184
+ text-wrap: pretty;
185
+ }
186
+
187
+ /*
188
+ * THE WORDS AT A READING MEASURE (`measure`), while the row and its rule
189
+ * still span the list. In a card the width of the page a policy otherwise
190
+ * runs to some 150 characters a line. A maximum, never a width.
191
+ */
192
+ .crewlet-list--measure-normal .crewlet-list__content {
193
+ max-inline-size: var(--size-measure);
194
+ }
195
+
196
+ .crewlet-list--measure-wide .crewlet-list__content {
197
+ max-inline-size: var(--size-measure-wide);
198
+ }
199
+
169
200
  /* ---- States ------------------------------------------------------------ */
170
201
 
171
202
  /*