@estiva-app/ui 0.90.2 → 0.91.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 (228) hide show
  1. package/dist/AttachedCard.d.ts +30 -0
  2. package/dist/AttachedCard.d.ts.map +1 -0
  3. package/dist/AttachmentCard.d.ts +14 -0
  4. package/dist/AttachmentCard.d.ts.map +1 -1
  5. package/dist/AvatarGroup.d.ts +7 -1
  6. package/dist/AvatarGroup.d.ts.map +1 -1
  7. package/dist/CommentBox.d.ts +1 -1
  8. package/dist/CommentBox.d.ts.map +1 -1
  9. package/dist/InlineText.d.ts +5 -2
  10. package/dist/InlineText.d.ts.map +1 -1
  11. package/dist/Link.d.ts +3 -2
  12. package/dist/Link.d.ts.map +1 -1
  13. package/dist/LinkCard.d.ts +3 -3
  14. package/dist/LinkCard.d.ts.map +1 -1
  15. package/dist/LinkChip.d.ts.map +1 -1
  16. package/dist/LinkParts.d.ts +17 -3
  17. package/dist/LinkParts.d.ts.map +1 -1
  18. package/dist/LinkPreview.d.ts.map +1 -1
  19. package/dist/LinkRow.d.ts +10 -5
  20. package/dist/LinkRow.d.ts.map +1 -1
  21. package/dist/PartCard.d.ts +7 -3
  22. package/dist/PartCard.d.ts.map +1 -1
  23. package/dist/Popover.d.ts +8 -1
  24. package/dist/Popover.d.ts.map +1 -1
  25. package/dist/ReactionRow.d.ts.map +1 -1
  26. package/dist/RichText.d.ts.map +1 -1
  27. package/dist/SuggestionMenu.d.ts +6 -2
  28. package/dist/SuggestionMenu.d.ts.map +1 -1
  29. package/dist/editor.js +19 -12
  30. package/dist/editor.js.map +3 -3
  31. package/dist/eslint/has-a-page-and-a-story.d.ts.map +1 -1
  32. package/dist/eslint/index.js +1093 -1076
  33. package/dist/eslint/index.js.map +4 -4
  34. package/dist/eslint/no-restyled-part.d.ts +9 -4
  35. package/dist/eslint/no-restyled-part.d.ts.map +1 -1
  36. package/dist/gates/{chunk-BS5JASHV.js → chunk-P2P6AHRY.js} +2 -2
  37. package/dist/gates/{chunk-BS5JASHV.js.map → chunk-P2P6AHRY.js.map} +2 -2
  38. package/dist/gates/cli.js +1 -1
  39. package/dist/gates/gate-config.d.ts +4 -1
  40. package/dist/gates/gate-config.d.ts.map +1 -1
  41. package/dist/gates/hook.d.ts.map +1 -1
  42. package/dist/gates/index.js +2 -2
  43. package/dist/gates/index.js.map +2 -2
  44. package/dist/index.d.ts +2 -2
  45. package/dist/index.d.ts.map +1 -1
  46. package/dist/index.js +275 -185
  47. package/dist/index.js.map +4 -4
  48. package/dist/linked.d.ts +7 -9
  49. package/dist/linked.d.ts.map +1 -1
  50. package/dist/linked.examples.d.ts.map +1 -1
  51. package/dist/linkedFrom.d.ts.map +1 -1
  52. package/dist/links.d.ts +2 -2
  53. package/dist/links.d.ts.map +1 -1
  54. package/dist/looks.d.ts +24 -0
  55. package/dist/looks.d.ts.map +1 -1
  56. package/dist/registry/{app-X2GI4WTU.js → app-IGBRDD4L.js} +3 -3
  57. package/dist/registry/{build-P6X3PTZP.js → build-MWN4UI23.js} +2 -2
  58. package/dist/registry/{chunk-P55P2QFD.js → chunk-4TWYUIOB.js} +1 -1
  59. package/dist/registry/chunk-4TWYUIOB.js.map +7 -0
  60. package/dist/registry/{chunk-V67F474L.js → chunk-NSHK76XT.js} +2 -2
  61. package/dist/registry/{chunk-4QWD3EBY.js → chunk-THI3SLW5.js} +1 -1
  62. package/dist/registry/{chunk-4QWD3EBY.js.map → chunk-THI3SLW5.js.map} +1 -1
  63. package/dist/registry/cli.js +3 -3
  64. package/dist/registry/find.d.ts +1 -1
  65. package/dist/registry/find.d.ts.map +1 -1
  66. package/dist/registry/index.js +3 -3
  67. package/package.json +1 -1
  68. package/registry.json +509 -455
  69. package/src/AppProvider.stories.tsx +1 -1
  70. package/src/AppShell.stories.tsx +1 -1
  71. package/src/AttachedCard.mdx +55 -0
  72. package/src/{CardUnder.stories.tsx → AttachedCard.stories.tsx} +10 -19
  73. package/src/{CardUnder.test.tsx → AttachedCard.test.tsx} +8 -8
  74. package/src/AttachedCard.tsx +43 -0
  75. package/src/AttachmentCard.stories.tsx +1 -1
  76. package/src/AttachmentCard.tsx +36 -14
  77. package/src/Avatar.stories.tsx +1 -1
  78. package/src/AvatarGroup.stories.tsx +1 -1
  79. package/src/AvatarGroup.tsx +8 -2
  80. package/src/Banner.stories.tsx +1 -1
  81. package/src/BlockHandle.stories.tsx +1 -1
  82. package/src/BlockNodes.stories.tsx +1 -1
  83. package/src/Breadcrumb.stories.tsx +1 -1
  84. package/src/Button.stories.tsx +1 -1
  85. package/src/Card.stories.tsx +1 -1
  86. package/src/Checkbox.stories.tsx +1 -1
  87. package/src/Chip.stories.tsx +1 -1
  88. package/src/ChipInput.stories.tsx +1 -1
  89. package/src/CodeBlockColours.stories.tsx +1 -1
  90. package/src/CollapsibleSection.stories.tsx +1 -1
  91. package/src/CommandPalette.stories.tsx +1 -1
  92. package/src/CommentBox.mdx +3 -3
  93. package/src/CommentBox.stories.tsx +39 -7
  94. package/src/CommentBox.tsx +27 -17
  95. package/src/CommentHighlights.stories.tsx +1 -1
  96. package/src/ComposerTriggers.stories.tsx +1 -1
  97. package/src/ConfirmDialog.stories.tsx +1 -1
  98. package/src/ContainerHeader.stories.tsx +1 -1
  99. package/src/DialogShell.stories.tsx +1 -1
  100. package/src/Divider.stories.tsx +1 -1
  101. package/src/DocumentEditor.stories.tsx +1 -1
  102. package/src/EditableText.stories.tsx +1 -1
  103. package/src/EditorBlockHandle.stories.tsx +1 -1
  104. package/src/EditorTableControls.stories.tsx +1 -1
  105. package/src/EmptyState.stories.tsx +1 -1
  106. package/src/EntryShell.mdx +1 -1
  107. package/src/EntryShell.stories.tsx +1 -1
  108. package/src/ErrorBoundary.stories.tsx +1 -1
  109. package/src/Field.stories.tsx +1 -1
  110. package/src/FieldLine.stories.tsx +1 -1
  111. package/src/FilePicker.stories.tsx +1 -1
  112. package/src/Form.stories.tsx +1 -1
  113. package/src/IconButton.stories.tsx +1 -1
  114. package/src/IdentityMenu.stories.tsx +1 -1
  115. package/src/InlineChip.stories.tsx +1 -1
  116. package/src/InlineText.mdx +1 -0
  117. package/src/InlineText.stories.tsx +6 -3
  118. package/src/InlineText.tsx +7 -2
  119. package/src/Kbd.stories.tsx +1 -1
  120. package/src/KindIcon.stories.tsx +1 -1
  121. package/src/Lightbox.stories.tsx +1 -1
  122. package/src/Link.mdx +3 -2
  123. package/src/Link.stories.tsx +1 -1
  124. package/src/Link.test.tsx +5 -3
  125. package/src/Link.tsx +5 -3
  126. package/src/LinkCard.mdx +5 -4
  127. package/src/LinkCard.stories.tsx +1 -1
  128. package/src/LinkCard.test.tsx +1 -1
  129. package/src/LinkCard.tsx +80 -57
  130. package/src/LinkChip.mdx +3 -3
  131. package/src/LinkChip.stories.tsx +1 -1
  132. package/src/LinkChip.test.tsx +1 -1
  133. package/src/LinkChip.tsx +16 -3
  134. package/src/LinkChips.stories.tsx +1 -1
  135. package/src/LinkParts.stories.tsx +1 -1
  136. package/src/LinkParts.tsx +40 -8
  137. package/src/LinkPlaces.stories.tsx +1 -1
  138. package/src/LinkPreview.mdx +1 -1
  139. package/src/LinkPreview.stories.tsx +1 -1
  140. package/src/LinkPreview.tsx +3 -1
  141. package/src/LinkRow.mdx +8 -6
  142. package/src/LinkRow.stories.tsx +3 -3
  143. package/src/LinkRow.test.tsx +3 -3
  144. package/src/LinkRow.tsx +71 -40
  145. package/src/ListColumn.stories.tsx +1 -1
  146. package/src/MembersDialog.stories.tsx +1 -1
  147. package/src/MembersPill.stories.tsx +1 -1
  148. package/src/Menu.stories.tsx +1 -1
  149. package/src/MenuItem.stories.tsx +1 -1
  150. package/src/NavItem.stories.tsx +1 -1
  151. package/src/NavTree.stories.tsx +1 -1
  152. package/src/Panel.stories.tsx +1 -1
  153. package/src/PartCard.mdx +4 -4
  154. package/src/PartCard.stories.tsx +11 -8
  155. package/src/PartCard.test.tsx +5 -3
  156. package/src/PartCard.tsx +33 -24
  157. package/src/PastedImages.stories.tsx +1 -1
  158. package/src/PastedMarkdown.stories.tsx +1 -1
  159. package/src/Person.stories.tsx +1 -1
  160. package/src/PersonTrigger.stories.tsx +1 -1
  161. package/src/Popover.stories.tsx +1 -1
  162. package/src/Popover.tsx +6 -2
  163. package/src/PreviewCard.stories.tsx +1 -1
  164. package/src/ProgressBar.stories.tsx +1 -1
  165. package/src/Property.stories.tsx +1 -1
  166. package/src/Rail.stories.tsx +1 -1
  167. package/src/RailItem.stories.tsx +1 -1
  168. package/src/Reaction.stories.tsx +1 -1
  169. package/src/ReactionPicker.stories.tsx +1 -1
  170. package/src/ReactionRow.stories.tsx +1 -1
  171. package/src/ReactionRow.tsx +3 -1
  172. package/src/ReferenceCards.mdx +3 -0
  173. package/src/ReferenceCards.stories.tsx +3 -1
  174. package/src/ReferenceMenu.mdx +1 -1
  175. package/src/ReferenceMenu.stories.tsx +1 -1
  176. package/src/RichText.stories.tsx +1 -1
  177. package/src/RichText.tsx +6 -2
  178. package/src/ScrollArea.stories.tsx +1 -1
  179. package/src/SearchInput.stories.tsx +1 -1
  180. package/src/SectionHeader.stories.tsx +1 -1
  181. package/src/SectionLabel.stories.tsx +1 -1
  182. package/src/Select.stories.tsx +1 -1
  183. package/src/SelectionToolbar.stories.tsx +1 -1
  184. package/src/ShowMore.stories.tsx +1 -1
  185. package/src/Sidebar.stories.tsx +1 -1
  186. package/src/Skeleton.stories.tsx +1 -1
  187. package/src/SuggestionMenu.mdx +4 -1
  188. package/src/SuggestionMenu.stories.tsx +14 -8
  189. package/src/SuggestionMenu.tsx +20 -3
  190. package/src/Tabs.stories.tsx +1 -1
  191. package/src/TextInput.stories.tsx +1 -1
  192. package/src/Textarea.stories.tsx +1 -1
  193. package/src/Toast.stories.tsx +1 -1
  194. package/src/Toolbar.stories.tsx +1 -1
  195. package/src/Tooltip.stories.tsx +1 -1
  196. package/src/TopBar.stories.tsx +1 -1
  197. package/src/UnreadDot.stories.tsx +1 -1
  198. package/src/eslint/has-a-page-and-a-story.test.ts +5 -0
  199. package/src/eslint/has-a-page-and-a-story.ts +11 -2
  200. package/src/eslint/no-restyled-part.test.ts +32 -8
  201. package/src/eslint/no-restyled-part.ts +50 -23
  202. package/src/gates/gate-config.ts +5 -2
  203. package/src/gates/gates.test.ts +20 -2
  204. package/src/gates/hook.ts +4 -3
  205. package/src/index.ts +2 -1
  206. package/src/linked.examples.ts +2 -3
  207. package/src/linked.ts +11 -1
  208. package/src/linkedFrom.ts +1 -0
  209. package/src/links.ts +3 -2
  210. package/src/looks.ts +29 -0
  211. package/src/registry/build.ts +1 -1
  212. package/src/registry/contract.test.ts +1 -1
  213. package/src/registry/find.ts +1 -1
  214. package/src/registry/registry.test.ts +12 -12
  215. package/src/suggestionPopup.tsx +1 -1
  216. package/stories/Choosing.mdx +2 -2
  217. package/stories/DesignTokens.mdx +1 -1
  218. package/stories/GettingStarted.mdx +2 -2
  219. package/stories/Introduction.mdx +23 -4
  220. package/stories/TokensPage.tsx +12 -7
  221. package/dist/CardUnder.d.ts +0 -31
  222. package/dist/CardUnder.d.ts.map +0 -1
  223. package/dist/registry/chunk-P55P2QFD.js.map +0 -7
  224. package/src/CardUnder.mdx +0 -54
  225. package/src/CardUnder.tsx +0 -49
  226. /package/dist/registry/{app-X2GI4WTU.js.map → app-IGBRDD4L.js.map} +0 -0
  227. /package/dist/registry/{build-P6X3PTZP.js.map → build-MWN4UI23.js.map} +0 -0
  228. /package/dist/registry/{chunk-V67F474L.js.map → chunk-NSHK76XT.js.map} +0 -0
@@ -2,11 +2,11 @@ import { Fragment, useCallback, useEffect, useLayoutEffect, useRef, useState, ty
2
2
  import { Extension, type AnyExtension, type EditorOptions } from '@tiptap/core'
3
3
  import { Editor, type JSONContent } from '@tiptap/react'
4
4
  import { IconLock, IconPaperclip, IconSquareRounded } from '@tabler/icons-react'
5
+ import { AttachedCard } from './AttachedCard'
5
6
  import { AttachmentCard } from './AttachmentCard'
6
7
  import { ReferenceNode, type ReferenceViewProps } from './BlockNodes'
7
8
  import { Button } from './Button'
8
9
  import { Card } from './Card'
9
- import { CardUnder } from './CardUnder'
10
10
  import { cn } from './cn'
11
11
  import { BoxFrame, ComposeKeys, COMPOSE_EDITOR_CLASSES, isEmptyDoc as isEmpty, SendBox } from './commentBoxFrame'
12
12
  import {
@@ -26,7 +26,8 @@ import {
26
26
  import { FieldLine } from './Field'
27
27
  import { FilePicker } from './FilePicker'
28
28
  import { Kbd } from './Kbd'
29
- import { BoxKit, PasteOverWords } from './links'
29
+ import { inTheBox } from './linked'
30
+ import { BoxKit, LINK_MARK_ATTRIBUTES, PasteOverWords } from './links'
30
31
  import { PastedImages } from './PastedImages'
31
32
  import { KeptSelection } from './SelectionToolbar'
32
33
  import { isSuggestionOpen } from './suggestionPopup'
@@ -138,7 +139,7 @@ export interface CommentBoxProps {
138
139
  code?: CodeFormat
139
140
  /** Send what is written, with the files that are ready and the card still shown; resolves with the relay's answer. */
140
141
  send: (body: JSONContent, files: BoxFile[], under: BoxSentUnder) => Promise<SendAnswer>
141
- /** The card and parts under the box while something is written, with ✕ on the card. Absent, nothing shows under it. */
142
+ /** The card and parts in the box while something is written, with the files, ✕ on the card. Absent, there are none. */
142
143
  under?: BoxUnder
143
144
  /**
144
145
  * The app shows a send before the relay answers: the box empties at once,
@@ -245,7 +246,8 @@ const sameApp = (a: BoxApp, b: BoxApp) =>
245
246
  function boxExtensions(hold: BoxHold, app: BoxApp): AnyExtension[] {
246
247
  const iconFor = (uri: string | null) => hold.current.referenceIcon?.(uri)
247
248
  return [
248
- BoxKit.configure({ link: { openOnClick: false } }),
249
+ // A link drawn as one, as in a document: it read as plain words in the box before (Katerina, 29 Oct).
250
+ BoxKit.configure({ link: { openOnClick: false, HTMLAttributes: LINK_MARK_ATTRIBUTES } }),
249
251
  PasteOverWords,
250
252
  KeptSelection,
251
253
  ComposeKeys,
@@ -651,18 +653,28 @@ export function CommentBox({
651
653
  </>
652
654
  ) : undefined
653
655
 
654
- // Under the box, outside its border: the card with its ✕, then the live parts (none in an edit, which carries none).
656
+ // In the box, under the text with the files (Katerina, 29 Oct: "the file's ✕ and inside the box"): the files, then
657
+ // the card with its ✕ and the live parts on a line of their own (none in an edit, which carries none). On the files'
658
+ // fill, the card's values as words until it is sent (`inTheBox`).
655
659
  const card = reading?.card && !removed.has(reading.card.value) ? reading.card : undefined
656
660
  const parts = edit ? [] : (reading?.parts ?? [])
657
- const underBox =
661
+ const attached =
658
662
  card || parts.length > 0 ? (
659
- <div data-box-under className="mt-1 flex flex-col gap-2">
660
- {card && <CardUnder onRemove={() => setRemoved((was) => new Set([...was, card.value]))}>{card.view}</CardUnder>}
661
- {parts.map((part) => (
662
- <Fragment key={part.key}>{part.view}</Fragment>
663
- ))}
664
- </div>
665
- ) : undefined
663
+ <>
664
+ {fileCards}
665
+ <inTheBox.Provider value>
666
+ {/* min-w-0: a card with a long title would otherwise be as wide as its title, past the box's edge (29 Oct). */}
667
+ <div data-box-under className="flex min-w-0 basis-full flex-col gap-2">
668
+ {card && <AttachedCard onRemove={() => setRemoved((was) => new Set([...was, card.value]))}>{card.view}</AttachedCard>}
669
+ {parts.map((part) => (
670
+ <Fragment key={part.key}>{part.view}</Fragment>
671
+ ))}
672
+ </div>
673
+ </inTheBox.Provider>
674
+ </>
675
+ ) : (
676
+ fileCards
677
+ )
666
678
 
667
679
  const refusedLine = refused && (
668
680
  <FieldLine tone="error">
@@ -697,7 +709,7 @@ export function CommentBox({
697
709
  marked={marking}
698
710
  // The same strip as the send box: writing and editing work the same way (Katerina, 21 Oct).
699
711
  selection={{ link: true }}
700
- attachments={fileCards}
712
+ attachments={attached}
701
713
  className={cn(sending && '[&_.ProseMirror]:text-text-muted')}
702
714
  footer={
703
715
  <div className="flex items-center justify-between gap-2">
@@ -715,7 +727,6 @@ export function CommentBox({
715
727
  </div>
716
728
  }
717
729
  />
718
- {underBox}
719
730
  {takesFiles && <FilePicker ref={picker} multiple accept={accept} onPick={attachFiles} />}
720
731
  {sending && <FieldLine>Saving…</FieldLine>}
721
732
  {fileLines}
@@ -737,14 +748,13 @@ export function CommentBox({
737
748
  </ToolbarButton>
738
749
  ) : undefined
739
750
  }
740
- attachments={fileCards}
751
+ attachments={attached}
741
752
  ready={ready}
742
753
  marked={marking}
743
754
  holding={uploading || failed > 0 || sending}
744
755
  selection={{ link: true }}
745
756
  className={cn(sending && '[&_[data-composer-editor]]:text-text-muted')}
746
757
  />
747
- {underBox}
748
758
  {upload && <FilePicker ref={picker} multiple accept={accept} onPick={attachFiles} />}
749
759
  {sending && <FieldLine>Sending…</FieldLine>}
750
760
  {fileLines}
@@ -12,7 +12,7 @@ import { richTextClassName } from './RichText'
12
12
  * comment is now.
13
13
  */
14
14
  const meta = {
15
- title: 'Primitives/CommentHighlights',
15
+ title: 'Writing/CommentHighlights',
16
16
  parameters: { layout: 'padded' },
17
17
  } satisfies Meta
18
18
 
@@ -23,7 +23,7 @@ import {
23
23
  * Type one of them in the box.
24
24
  */
25
25
  const meta = {
26
- title: 'Primitives/ComposerTriggers',
26
+ title: 'Writing/ComposerTriggers',
27
27
  parameters: { layout: 'padded' },
28
28
  } satisfies Meta
29
29
 
@@ -4,7 +4,7 @@ import { Button } from './Button'
4
4
  import { ConfirmDialog } from './ConfirmDialog'
5
5
 
6
6
  const meta = {
7
- title: 'Overlays/ConfirmDialog',
7
+ title: 'Menus & windows/ConfirmDialog',
8
8
  component: ConfirmDialog,
9
9
  parameters: {
10
10
  layout: 'fullscreen',
@@ -9,7 +9,7 @@ import { Card } from './Card'
9
9
  const inColumn: Decorator = (Story) => <Card clip className="w-96">{Story()}</Card>
10
10
 
11
11
  const meta = {
12
- title: 'Navigation/ContainerHeader',
12
+ title: 'Page structure/ContainerHeader',
13
13
  component: ContainerHeader,
14
14
  args: { title: 'Items' },
15
15
  argTypes: { actions: { control: false } },
@@ -11,7 +11,7 @@ import { TextInput } from './TextInput'
11
11
  import { Textarea } from './Textarea'
12
12
 
13
13
  const meta = {
14
- title: 'Overlays/DialogShell',
14
+ title: 'Menus & windows/DialogShell',
15
15
  component: DialogShell,
16
16
  parameters: {
17
17
  layout: 'fullscreen',
@@ -5,7 +5,7 @@ import { Card } from './Card'
5
5
 
6
6
  /** A hairline in `border-subtle`, inset 12px each side — or standing up between two columns. */
7
7
  const meta = {
8
- title: 'Primitives/Divider',
8
+ title: 'Page structure/Divider',
9
9
  component: Divider,
10
10
  } satisfies Meta<typeof Divider>
11
11
 
@@ -28,7 +28,7 @@ import { MenuItem } from './Menu'
28
28
  * ending. Pick the theme in the toolbar.
29
29
  */
30
30
  const meta = {
31
- title: 'Primitives/DocumentEditor',
31
+ title: 'Writing/DocumentEditor',
32
32
  component: DocumentEditor,
33
33
  parameters: { layout: 'padded' },
34
34
  } satisfies Meta<typeof DocumentEditor>
@@ -3,7 +3,7 @@ import { useState } from 'react'
3
3
  import { EditableText } from './EditableText'
4
4
 
5
5
  const meta = {
6
- title: 'Inputs/EditableText',
6
+ title: 'Forms & fields/EditableText',
7
7
  component: EditableText,
8
8
  args: {
9
9
  value: 'Team charter',
@@ -13,7 +13,7 @@ import { richTextClassName } from './RichText'
13
13
  * Turn into, Duplicate, Delete, then the app's rows.
14
14
  */
15
15
  const meta = {
16
- title: 'Primitives/EditorBlockHandle',
16
+ title: 'Writing/EditorBlockHandle',
17
17
  // The handle sits 28px left of the content, in the page's margin.
18
18
  parameters: { layout: 'padded' },
19
19
  } satisfies Meta
@@ -13,7 +13,7 @@ import { richTextClassName } from './RichText'
13
13
  * it.
14
14
  */
15
15
  const meta = {
16
- title: 'Primitives/EditorTableControls',
16
+ title: 'Writing/EditorTableControls',
17
17
  // The block handle sits 28px left of the content, and the column ➕ 16px right of the table.
18
18
  parameters: { layout: 'padded' },
19
19
  } satisfies Meta
@@ -6,7 +6,7 @@ import { EmptyState } from './EmptyState'
6
6
  const inBox: Decorator = (Story) => <div className="flex h-[280px] w-[480px] flex-col rounded-lg border border-border-default p-4">{Story()}</div>
7
7
 
8
8
  const meta = {
9
- title: 'Feedback/EmptyState',
9
+ title: 'Status & feedback/EmptyState',
10
10
  component: EmptyState,
11
11
  args: { message: 'Nothing here yet.' },
12
12
  argTypes: { icon: { control: false } },
@@ -32,7 +32,7 @@ why, and at most one button.
32
32
 
33
33
  - Inside the app's frame. It stands in *for* the whole app while entry is
34
34
  decided; a page or a section with nothing to show inside the frame is an
35
- [**EmptyState**](?path=/docs/feedback-emptystate--docs).
35
+ [**EmptyState**](?path=/docs/status-feedback-emptystate--docs).
36
36
 
37
37
  ## How
38
38
 
@@ -10,7 +10,7 @@ const logo = (
10
10
  )
11
11
 
12
12
  const meta = {
13
- title: 'Frame/EntryShell',
13
+ title: 'App frame/EntryShell',
14
14
  component: EntryShell,
15
15
  parameters: { layout: 'fullscreen' },
16
16
  args: { logo },
@@ -8,7 +8,7 @@ import { ErrorBoundary } from './ErrorBoundary'
8
8
  * page keeps working. Try again draws the part again.
9
9
  */
10
10
  const meta = {
11
- title: 'Feedback/ErrorBoundary',
11
+ title: 'Status & feedback/ErrorBoundary',
12
12
  component: ErrorBoundary,
13
13
  parameters: { layout: 'fullscreen' },
14
14
  args: { label: 'panel', children: null },
@@ -4,7 +4,7 @@ import { TextInput } from './TextInput'
4
4
  import { Textarea } from './Textarea'
5
5
 
6
6
  const meta = {
7
- title: 'Inputs/Field',
7
+ title: 'Forms & fields/Field',
8
8
  component: Field,
9
9
  parameters: { layout: 'padded' },
10
10
  args: { label: 'Title', required: false },
@@ -7,7 +7,7 @@ import { TextInput } from './TextInput'
7
7
 
8
8
  /** The small line a Field draws under a control, on its own — for a group of controls. */
9
9
  const meta = {
10
- title: 'Inputs/Field line',
10
+ title: 'Forms & fields/Field line',
11
11
  component: FieldLine,
12
12
  parameters: { layout: 'padded' },
13
13
  args: { tone: 'helper', children: 'Leave this empty and one is made for you.' },
@@ -7,7 +7,7 @@ import { IconButton } from './IconButton'
7
7
  import { EmptyState } from './EmptyState'
8
8
 
9
9
  const meta = {
10
- title: 'Inputs/FilePicker',
10
+ title: 'Forms & fields/FilePicker',
11
11
  component: FilePicker,
12
12
  // The code tab shows each story's own code: building it from the rendered
13
13
  // element reads `element.ref`, which React 19 warns about.
@@ -8,7 +8,7 @@ import { TextInput } from './TextInput'
8
8
  import { Textarea } from './Textarea'
9
9
 
10
10
  const meta = {
11
- title: 'Inputs/Form',
11
+ title: 'Forms & fields/Form',
12
12
  component: Form,
13
13
  parameters: { layout: 'padded' },
14
14
  args: { onSubmit: fn(), busy: false, 'aria-label': 'Example', children: null },
@@ -3,7 +3,7 @@ import { IconSettings } from '@tabler/icons-react'
3
3
  import { IconButton } from './IconButton'
4
4
 
5
5
  const meta = {
6
- title: 'Primitives/IconButton',
6
+ title: 'Buttons & links/IconButton',
7
7
  component: IconButton,
8
8
  // An icon-only button owes its name; axe's button-name rule fails without it.
9
9
  args: { variant: 'muted', disabled: false, 'aria-label': 'Settings', children: <IconSettings className="size-4" stroke={1.5} /> },
@@ -18,7 +18,7 @@ import { IdentityMenu, IdentityPanelSurface } from './IdentityMenu'
18
18
  * items that are not items.
19
19
  */
20
20
  const meta = {
21
- title: 'Navigation/IdentityMenu',
21
+ title: 'App frame/IdentityMenu',
22
22
  component: IdentityPanelSurface,
23
23
  args: {
24
24
  me: {},
@@ -3,7 +3,7 @@ import { IconSquareRounded } from '@tabler/icons-react'
3
3
  import { InlineChip } from './InlineChip'
4
4
 
5
5
  const meta = {
6
- title: 'Components/InlineChip',
6
+ title: 'Links & references/InlineChip',
7
7
  component: InlineChip,
8
8
  args: { tone: 'neutral', children: 'Label' },
9
9
  argTypes: {
@@ -12,6 +12,7 @@ A page's title, or the line under it, edited where it stands, as in a document:
12
12
  ## When
13
13
 
14
14
  - **`variant="title"`**: a page's heading. Left empty, the saved one comes back.
15
+ - **`variant="heading"`**: a document's title, at the largest heading size, as Leaf's file page has it. As a title, left empty, the saved one comes back.
15
16
  - **`variant="summary"`** with **`clearable`**: the quieter line under it. Left empty, it is saved as nothing.
16
17
  - `readOnly` for someone who cannot change it, or until the app can save: the same text in the same place.
17
18
 
@@ -9,7 +9,7 @@ import { InlineText, type InlineTextHandle } from './InlineText'
9
9
  * page; Escape or clicking away saves too.
10
10
  */
11
11
  const meta = {
12
- title: 'Primitives/InlineText',
12
+ title: 'Writing/InlineText',
13
13
  component: InlineText,
14
14
  parameters: { layout: 'padded' },
15
15
  decorators: [
@@ -28,7 +28,7 @@ const LINE = 'A line of plain text under the title, saying in a sentence what th
28
28
  const LONG = 'A line of plain text under the title that goes on for longer than a line should, so it wraps the way the text around it does and the reader sees all of it, without anything cut off at the edge or hidden behind a control.'
29
29
 
30
30
  /** A title, the line under it, and the text below: Enter in the title goes to the line, Enter in the line goes to the text. */
31
- function Page({ title = 'Item one', line = LINE, refuse = false, readOnly = false }: { title?: string; line?: string; refuse?: boolean; readOnly?: boolean }) {
31
+ function Page({ title = 'Item one', line = LINE, refuse = false, readOnly = false, heading = false }: { title?: string; line?: string; refuse?: boolean; readOnly?: boolean; heading?: boolean }) {
32
32
  const lineRef = useRef<InlineTextHandle>(null)
33
33
  const textRef = useRef<HTMLParagraphElement>(null)
34
34
  const [saved, setSaved] = useState({ title, line })
@@ -36,7 +36,7 @@ function Page({ title = 'Item one', line = LINE, refuse = false, readOnly = fals
36
36
  return (
37
37
  <div className="flex flex-col">
38
38
  <InlineText
39
- variant="title"
39
+ variant={heading ? 'heading' : 'title'}
40
40
  label="Title"
41
41
  placeholder="Untitled"
42
42
  value={saved.title}
@@ -73,6 +73,9 @@ function Page({ title = 'Item one', line = LINE, refuse = false, readOnly = fals
73
73
 
74
74
  export const Default: Story = { render: () => <Page /> }
75
75
 
76
+ /** A document's title, at the largest heading size: `variant="heading"`, as Leaf's file page draws it. */
77
+ export const DocumentHeading: Story = { render: () => <Page title="Document one" heading /> }
78
+
76
79
  /** Nothing written yet: what each is for, muted, in its place. */
77
80
  export const Empty: Story = { render: () => <Page title="" line="" /> }
78
81
 
@@ -41,8 +41,11 @@ export interface InlineTextProps {
41
41
  onText?: (text: string | null) => void
42
42
  /** Enter, after the save has started: where the caret goes next. */
43
43
  onEnter?: () => void
44
- /** `title`: the page's heading. `summary`: the line under it, quieter. */
45
- variant?: 'title' | 'summary'
44
+ /**
45
+ * `title`: the page's heading. `heading`: a document's title, at the largest heading size (Leaf's file page).
46
+ * `summary`: the line under either, quieter.
47
+ */
48
+ variant?: 'title' | 'heading' | 'summary'
46
49
  /** Empty is a value (a summary). Otherwise leaving it empty brings the saved one back (a title). */
47
50
  clearable?: boolean
48
51
  /** Text only, the same size and place: nobody can change it, or the editor is not ready. */
@@ -62,6 +65,8 @@ export interface InlineTextHandle {
62
65
  /** Size and tone, per variant: the same for the text at rest and while it is written. */
63
66
  const VARIANT = {
64
67
  title: 'text-h2 text-text-primary',
68
+ // A document's title: Leaf set text-h1 on InlineText from outside, which the gate refuses (Katerina, 29 Oct: "I choose A").
69
+ heading: 'text-h1 text-text-primary',
65
70
  summary: 'text-body-1 text-text-secondary',
66
71
  } as const
67
72
 
@@ -4,7 +4,7 @@ import { MenuItem, MenuPanel, MenuSection } from './Menu'
4
4
  import { Tooltip } from './Tooltip'
5
5
 
6
6
  const meta = {
7
- title: 'Primitives/Kbd',
7
+ title: 'Buttons & links/Kbd',
8
8
  component: Kbd,
9
9
  args: { children: 'Cmd+K' },
10
10
  argTypes: { children: { control: 'text' } },
@@ -4,7 +4,7 @@ import { KindIcon, type ThingKind } from './KindIcon'
4
4
  import { MenuItem, MenuPanel, MenuSection } from './Menu'
5
5
 
6
6
  const meta = {
7
- title: 'Primitives/KindIcon',
7
+ title: 'Links & references/KindIcon',
8
8
  component: KindIcon,
9
9
  args: { kind: 'topic' },
10
10
  argTypes: { kind: { control: 'select', options: ['topic', 'project', 'issue', 'file', 'message'] } },
@@ -22,7 +22,7 @@ const TALL = svg(
22
22
  )
23
23
 
24
24
  const meta = {
25
- title: 'Overlays/Lightbox',
25
+ title: 'Menus & windows/Lightbox',
26
26
  component: Lightbox,
27
27
  parameters: {
28
28
  layout: 'fullscreen',
package/src/Link.mdx CHANGED
@@ -14,8 +14,9 @@ the app decides how it navigates.
14
14
 
15
15
  - **It takes the size and colour of the text around it**: put it inside that
16
16
  text.
17
- - **`text`** — a link written inside text: the theme's link colour, always
18
- underlined, dimming on hover.
17
+ - **`text`** — a link written inside text: the theme's link colour, the link
18
+ icon before its words and one underline under both, dimming on hover. A chip
19
+ of an Estiva thing is **LinkChip**, which starts with its kind's icon instead.
19
20
  - **`quiet`** — a title or a time that is also a link. It takes the colour and
20
21
  size of the text it sits in, and underlines on hover.
21
22
  - **`underlined`** — a short "open it there" beside a note. It takes the
@@ -4,7 +4,7 @@ import { Card } from './Card'
4
4
  import { Chip } from './Chip'
5
5
 
6
6
  const meta = {
7
- title: 'Navigation/Link',
7
+ title: 'Buttons & links/Link',
8
8
  component: Link,
9
9
  args: { href: '#', variant: 'text', external: false, children: 'a link' },
10
10
  argTypes: {
package/src/Link.test.tsx CHANGED
@@ -53,12 +53,14 @@ describe('Link', () => {
53
53
  expect(screen.getByRole('link', { name: 'Documents' }).getAttribute('href')).toBe('/documents')
54
54
  })
55
55
 
56
- it('text is the link colour, always underlined, and is the default', () => {
56
+ it('text is the link colour, the link icon before its words with one underline under both, and is the default', () => {
57
57
  render(<Link href="#">Label</Link>)
58
58
  const classes = classesOf(screen.getByRole('link'))
59
59
  expect(classes).toContain('text-text-interactive')
60
- expect(classes).toContain('underline')
61
- expect(classes).toContain('underline-offset-2')
60
+ // One line under the icon and the words: the link's own background, not text-decoration, which skips the icon.
61
+ expect(classes).toContain('no-underline')
62
+ expect(classes).toContain('bg-[length:100%_1px]')
63
+ expect(classes).toContain("before:content-['']")
62
64
  })
63
65
 
64
66
  it('quiet sets no colour and no size of its own, and underlines on hover', () => {
package/src/Link.tsx CHANGED
@@ -1,6 +1,7 @@
1
1
  import type { ComponentPropsWithRef, ReactNode } from 'react'
2
2
  import { useInAppClick } from './AppProvider'
3
3
  import { cn } from './cn'
4
+ import { WEB_LINK_CLASSES } from './looks'
4
5
 
5
6
  /**
6
7
  * A link: an anchor with one of four looks, and nothing else of its own.
@@ -9,8 +10,9 @@ import { cn } from './cn'
9
10
  * on 13 September 2026, in three jobs (UIG-27). The looks are the ones those
10
11
  * links already had, reduced by Katerina's ruling:
11
12
  *
12
- * - `text` — a link inside written text: the theme's link colour, always underlined,
13
- * dimming on hover. The look a link in a body of text already had.
13
+ * - `text` — a link inside written text: the theme's link colour, the link icon
14
+ * before its words and one underline under both, dimming on hover (Katerina,
15
+ * 29 Oct, after Slack). `WEB_LINK_CLASSES`, which the editors' links wear too.
14
16
  * - `quiet` — a title or a timestamp that is also a link. It takes the colour
15
17
  * and size of the text it sits in and underlines on hover. Two looks that
16
18
  * differed only in their text became this one (her ruling, 13 September).
@@ -43,7 +45,7 @@ export type LinkVariant = 'text' | 'quiet' | 'underlined' | 'plain'
43
45
  const COVER_CLASSES = 'after:absolute after:inset-0 after:rounded-md focus-visible:outline-none focus-visible:after:[outline-style:auto]'
44
46
 
45
47
  const VARIANT_CLASSES: Record<LinkVariant, string> = {
46
- text: 'text-text-interactive underline underline-offset-2 hover:opacity-80',
48
+ text: `text-text-interactive hover:opacity-80 ${WEB_LINK_CLASSES}`,
47
49
  quiet: 'hover:underline',
48
50
  underlined: 'underline underline-offset-2 hover:text-text-primary',
49
51
  plain: '',
package/src/LinkCard.mdx CHANGED
@@ -11,11 +11,12 @@ A link's card: what a row cannot hold, and the changes the reader may make from
11
11
 
12
12
  ## When
13
13
 
14
- - **ready** — the title as the link (the icon opens it too), the key and what it is in, its summary, the items inside it, its newest conversation, and a footer: the pickers and the conversation count, or who wrote it and when. No summary, the title alone.
14
+ - **ready** — it starts as its row does: its kind in a file's 36px tile, the title as the link on one line, cut short when long, and under it the key and what it is ("ABC-2 · Issue"); a ring or faces on the title's line. Then its summary, the items inside it in a box of their own, its newest conversation as a quote, and a footer: the pickers and the conversation count, or who wrote it and when. No summary, the title alone.
15
+ - **width** — at most 480px in a message or a document; in a box being written in it fills the box, on the files' fill, its values as words until it is sent.
15
16
  - **read only** — a picker the app passed no `onChange` for reads as words in the same place: the reader may not change it. `readOnly` makes every value words, as the hover preview does.
16
- - **words a person wrote** — their face, their name, the time as the link, and the words.
17
+ - **words a person wrote** — their 24px face, their name, the time beside it as the link, and the words.
17
18
  - **loading** — the card it will become in bars, at its own height: `shape` from `loadingShapeOf(linked)` the last time it drew, or the kind's usual card. **LinkCardLoading**, from this file.
18
- - **unavailable** — one line, as **LinkRow** draws it.
19
+ - **unavailable** — one row, as **LinkRow** draws it.
19
20
 
20
21
  <Canvas of={LinkCardStories.ReadOnly} />
21
22
  <Canvas of={LinkCardStories.Loading} />
@@ -23,7 +24,7 @@ A link's card: what a row cannot hold, and the changes the reader may make from
23
24
  ## When not
24
25
 
25
26
  - A link alone on its line, where the card was not chosen → **LinkRow**.
26
- - The one card under a piece of text, with its ✕ → **CardUnder**, which draws this.
27
+ - The one card attached to a piece of text, with its ✕ → **AttachedCard**, which draws this.
27
28
  - A part of something longer → **PartCard**.
28
29
 
29
30
  ## How
@@ -5,7 +5,7 @@ import { loadingShapeOf, type Linked } from './linked'
5
5
  import { GROUP, ITEM, ITEM_NO_SUMMARY, ITEM_READ_ONLY, ITEM_UNREAD, PAGE, PLACE, ready, SAID, UNAVAILABLE } from './linked.examples'
6
6
 
7
7
  const meta = {
8
- title: 'Components/LinkCard',
8
+ title: 'Links & references/LinkCard',
9
9
  component: LinkCard,
10
10
  parameters: { layout: 'padded' },
11
11
  args: { link: ready(ITEM) },
@@ -97,7 +97,7 @@ describe('LinkCard', () => {
97
97
 
98
98
  it('says it is not available, and where it may still open', () => {
99
99
  render(<LinkCard link={UNAVAILABLE} />)
100
- expect(screen.getByText('Item — not available.')).toBeTruthy()
100
+ expect(screen.getByText('Issue — not available.')).toBeTruthy()
101
101
  expect(screen.getByRole('link', { name: /Open in App one/ }).getAttribute('href')).toBe('#elsewhere')
102
102
  })
103
103
  })