@estiva-app/ui 0.113.0 → 0.115.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@estiva-app/ui",
3
- "version": "0.113.0",
3
+ "version": "0.115.0",
4
4
  "description": "Estiva's design tokens (the contract) and a small set of primitives (a convenience) for every Estiva app.",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/registry.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "kind": "package",
5
5
  "repo": "estiva-ui",
6
6
  "package": "@estiva-app/ui",
7
- "packageVersion": "0.113.0",
7
+ "packageVersion": "0.115.0",
8
8
  "exports": 253,
9
9
  "typeExports": 263,
10
10
  "files": null
@@ -4685,10 +4685,10 @@
4685
4685
  "note": "People rather than circles, as `LevelIcon`'s `people`."
4686
4686
  },
4687
4687
  {
4688
- "name": "offDescription",
4689
- "takes": "text",
4688
+ "name": "files",
4689
+ "takes": "true/false",
4690
4690
  "required": false,
4691
- "note": "The line under Not following."
4691
+ "note": "Whether the place lists files (a topic, a space): each level then says what of them it shows."
4692
4692
  },
4693
4693
  {
4694
4694
  "name": "backTo",
@@ -8732,6 +8732,12 @@
8732
8732
  "takes": "text",
8733
8733
  "required": false,
8734
8734
  "note": "Extra classes on the trigger wrapper — e.g."
8735
+ },
8736
+ {
8737
+ "name": "openOnTap",
8738
+ "takes": "true/false",
8739
+ "required": false,
8740
+ "note": "A tap on the trigger opens the card, and a second tap closes it, for a touch screen, where nothing hovers (ACT-4: the dot beside a page's title)."
8735
8741
  }
8736
8742
  ],
8737
8743
  "variants": [
@@ -12361,6 +12367,12 @@
12361
12367
  "takes": "text",
12362
12368
  "required": false,
12363
12369
  "note": null
12370
+ },
12371
+ {
12372
+ "name": "quiet",
12373
+ "takes": "true/false",
12374
+ "required": false,
12375
+ "note": null
12364
12376
  }
12365
12377
  ],
12366
12378
  "variants": [],
@@ -47,6 +47,11 @@ const level: 'all' | 'important' | undefined = 'important'
47
47
  - `backTo` is the name of the group whose default the viewer chose against.
48
48
  Leave it out when no default reaches them or they did not choose against it.
49
49
  - `people` draws people instead of circles, for a place that is a group's own.
50
+ - `files` says whether the place lists files (a topic, a space; the default).
51
+ Each level's line then says what of them the place shows and what lights:
52
+ "Shows its own conversation. Lights for new conversations, replies in yours,
53
+ and what names you on its files." Pass `false` for a place with none (a
54
+ team's chat): the lines say only what lights, "Lights for every message".
50
55
  - `label` is the place's name. The button's accessible name says the level and
51
56
  what pressing it does: "You follow it at Important: change how you follow
52
57
  Item one".
@@ -23,8 +23,8 @@ export const NotFollowing: Story = { args: { level: undefined } }
23
23
  /** Chose against a group's default: "Back to Group one’s default" is offered under the levels. */
24
24
  export const AgainstADefault: Story = { args: { level: 'all', backTo: 'Group one' } }
25
25
 
26
- /** A group's own place: people rather than circles. */
27
- export const People: Story = { args: { level: 'important', people: true } }
26
+ /** A group's own place: people rather than circles. With no files to list, each level says only what lights. */
27
+ export const People: Story = { args: { level: 'important', people: true, files: false } }
28
28
 
29
29
  /** No `onChoose`: it shows the level and cannot be changed. */
30
30
  export const ReadOnly: Story = { args: { level: undefined, onChoose: undefined } }
@@ -48,6 +48,26 @@ describe('FollowSwitch', () => {
48
48
  expect(onChoose).toHaveBeenCalledWith('default')
49
49
  })
50
50
 
51
+ it('says what the place shows and what lights at each level, by whether it lists files', async () => {
52
+ const user = userEvent.setup()
53
+ const { rerender } = render(<FollowSwitch level="important" label="Item one" onChoose={() => {}} />)
54
+ await user.click(screen.getByRole('button', { name: /change how you follow/ }))
55
+ // A topic or a space (the default): what of its files it shows, then what lights (ACT-5).
56
+ expect((await screen.findByRole('menuitem', { name: /^Not following/ })).textContent).toContain('Shows its own conversation. Nothing lights.')
57
+ expect(screen.getByRole('menuitem', { name: /^Important/ }).textContent).toContain(
58
+ 'Shows its own conversation. Lights for new conversations, replies in yours, and what names you on its files.',
59
+ )
60
+ expect(screen.getByRole('menuitem', { name: /^All/ }).textContent).toContain('Shows its files’ threads too. Lights for all of it.')
61
+ await user.keyboard('{Escape}')
62
+ // A place with no files (a team's chat): only what lights.
63
+ rerender(<FollowSwitch level="important" label="Item one" onChoose={() => {}} files={false} people />)
64
+ await user.click(screen.getByRole('button', { name: /change how you follow/ }))
65
+ expect((await screen.findByRole('menuitem', { name: /^Not following/ })).textContent).toContain('Nothing lights.')
66
+ expect(screen.getByRole('menuitem', { name: /^Not following/ }).textContent).not.toContain('Shows')
67
+ expect(screen.getByRole('menuitem', { name: /^Important/ }).textContent).toContain('Lights for new conversations and replies in yours.')
68
+ expect(screen.getByRole('menuitem', { name: /^All/ }).textContent).toContain('Lights for every message.')
69
+ })
70
+
51
71
  it('cannot be changed without onChoose', () => {
52
72
  render(<FollowSwitch level={undefined} label="Item one" />)
53
73
  expect(screen.getByRole('button', { name: /Not following/ }).hasAttribute('disabled')).toBe(true)
@@ -46,9 +46,28 @@ export function LevelIcon({ level, people = false }: LevelIconProps) {
46
46
  return <IconCircleDashedPlus {...ICON} aria-hidden className="text-text-muted" />
47
47
  }
48
48
 
49
- const WORDS: Record<FollowLevel, { label: string; description: string }> = {
50
- important: { label: 'Important', description: 'New conversations, and replies in the ones you are in' },
51
- all: { label: 'All', description: 'Every new conversation and every reply' },
49
+ const LABEL: Record<FollowLevel, string> = { important: 'Important', all: 'All' }
50
+
51
+ /**
52
+ * The line under each level: what the place shows at it, and what lights its
53
+ * dot (ACT-5; the activity indicator prototype Miky approved on 10 November).
54
+ * A place that lists files (a topic, a space) says what of them it shows; a
55
+ * place with none (a team's chat) says only what lights. Important's third
56
+ * part restates the record on what names you on a listed file.
57
+ *
58
+ * why: https://github.com/estiva-app/estiva-docs/blob/main/decisions/at-important-what-names-you-on-a-listed-file-lights-the-topic.md
59
+ */
60
+ const WORDS: Record<'files' | 'noFiles', Record<'off' | FollowLevel, string>> = {
61
+ files: {
62
+ off: 'Shows its own conversation. Nothing lights.',
63
+ important: 'Shows its own conversation. Lights for new conversations, replies in yours, and what names you on its files.',
64
+ all: 'Shows its files’ threads too. Lights for all of it.',
65
+ },
66
+ noFiles: {
67
+ off: 'Nothing lights.',
68
+ important: 'Lights for new conversations and replies in yours.',
69
+ all: 'Lights for every message.',
70
+ },
52
71
  }
53
72
 
54
73
  export interface FollowSwitchProps {
@@ -62,8 +81,12 @@ export interface FollowSwitchProps {
62
81
  readOnlyReason?: string
63
82
  /** People rather than circles, as `LevelIcon`'s `people`. */
64
83
  people?: boolean
65
- /** The line under Not following. */
66
- offDescription?: string
84
+ /**
85
+ * Whether the place lists files (a topic, a space): each level then says what of
86
+ * them it shows. `false` for a place with none (a team's chat): the levels say only
87
+ * what lights.
88
+ */
89
+ files?: boolean
67
90
  /**
68
91
  * The name of the group whose default reaches the viewer, when they chose
69
92
  * against it: offers "Back to <name>’s default". Leave it out otherwise.
@@ -73,12 +96,14 @@ export interface FollowSwitchProps {
73
96
 
74
97
  /**
75
98
  * The one switch on a place: Not following, Important or All, each with what
76
- * it lights, and "Back to <name>’s default" when the viewer chose against a
77
- * group's default. It sits before the place's title, drawn as `LevelIcon`.
99
+ * the place shows at it and what lights, and "Back to <name>’s default" when
100
+ * the viewer chose against a group's default. It sits before the place's
101
+ * title, drawn as `LevelIcon`.
78
102
  */
79
- export function FollowSwitch({ level, label, onChoose, readOnlyReason, people = false, offDescription = 'Nothing here lights for you', backTo }: FollowSwitchProps) {
103
+ export function FollowSwitch({ level, label, onChoose, readOnlyReason, people = false, files = true, backTo }: FollowSwitchProps) {
80
104
  const [busy, setBusy] = useState(false)
81
- const now = level ? `You follow it at ${WORDS[level].label}` : 'Not following'
105
+ const words = WORDS[files ? 'files' : 'noFiles']
106
+ const now = level ? `You follow it at ${LABEL[level]}` : 'Not following'
82
107
  const button = (
83
108
  <IconButton aria-label={`${now}: change how you follow ${label}`} tooltip={now} disabled={!onChoose || busy} disabledReason={onChoose ? undefined : readOnlyReason}>
84
109
  <LevelIcon level={level} people={people} />
@@ -113,9 +138,9 @@ export function FollowSwitch({ level, label, onChoose, readOnlyReason, people =
113
138
  return (
114
139
  <Menu trigger={button}>
115
140
  <MenuSection label="How you follow it">
116
- {item('off', 'Not following', offDescription, undefined)}
117
- {item('important', WORDS.important.label, WORDS.important.description, 'important')}
118
- {item('all', WORDS.all.label, WORDS.all.description, 'all')}
141
+ {item('off', 'Not following', words.off, undefined)}
142
+ {item('important', LABEL.important, words.important, 'important')}
143
+ {item('all', LABEL.all, words.all, 'all')}
119
144
  </MenuSection>
120
145
  {backTo && (
121
146
  <MenuSection label={`${backTo} gives you Important`}>
@@ -107,6 +107,14 @@ There is no keyboard trigger, by design — see above.
107
107
  | pointer moves into the card | it stays up, and can be scrolled |
108
108
  | pointer leaves both | closes after 200ms |
109
109
  | Escape | closes |
110
+ | a tap on the trigger, with `openOnTap` | opens; a second tap closes it, and it stays closed |
111
+ | a screen reader's double-tap, with `openOnTap` | the same as a tap |
112
+
113
+ A touch screen has no hover, so without `openOnTap` a tap opens nothing: a row's card stays hover-only, because a
114
+ tap on a row opens the row. Pass `openOnTap` when the trigger opens nothing of its own, as a dot beside a page's
115
+ title does.
116
+
117
+ <Canvas of={PreviewCardStories.OnATap} />
110
118
 
111
119
  ## Props
112
120
 
@@ -1,5 +1,6 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react-vite'
2
2
  import { IconSquareRounded } from '@tabler/icons-react'
3
+ import { IconButton } from './IconButton'
3
4
  import { MenuPanel } from './Menu'
4
5
  import { PreviewCard } from './PreviewCard'
5
6
  import { SkeletonBar } from './Skeleton'
@@ -118,6 +119,30 @@ export const OnARow: Story = {
118
119
  ),
119
120
  }
120
121
 
122
+ /**
123
+ * Live, with `openOnTap`: on a touch screen a tap on the trigger opens the
124
+ * card and a second tap closes it; a mouse still opens it by resting. For a
125
+ * trigger that answers a tap with nothing of its own.
126
+ */
127
+ export const OnATap: Story = {
128
+ parameters: { controls: { disable: true } },
129
+ render: () => (
130
+ <PreviewCard
131
+ openOnTap
132
+ content={
133
+ <span className="text-caption text-text-secondary">
134
+ This is the card. A tap on the button opened it, and another tap
135
+ closes it.
136
+ </span>
137
+ }
138
+ >
139
+ <IconButton aria-label="Item one">
140
+ <IconSquareRounded size={16} stroke={1.5} />
141
+ </IconButton>
142
+ </PreviewCard>
143
+ ),
144
+ }
145
+
121
146
  /**
122
147
  * A card taller than its cap scrolls, **and you can reach the scrollbar** —
123
148
  * which is the whole difference between this and a tooltip. Rest the pointer
@@ -7,12 +7,15 @@
7
7
  * tested beside itself. Placement is Floating UI's and is measured in a
8
8
  * browser — jsdom lays nothing out — so what is here is the behaviour.
9
9
  */
10
- import { afterEach, describe, expect, it } from 'vitest'
11
- import { cleanup, render, screen } from '@testing-library/react'
10
+ import { afterEach, describe, expect, it, vi } from 'vitest'
11
+ import { act, cleanup, fireEvent, render, screen } from '@testing-library/react'
12
12
  import userEvent from '@testing-library/user-event'
13
13
  import { PreviewCard } from './PreviewCard'
14
14
 
15
- afterEach(cleanup)
15
+ afterEach(() => {
16
+ cleanup()
17
+ vi.useRealTimers()
18
+ })
16
19
 
17
20
  describe('PreviewCard', () => {
18
21
  it('renders its trigger, and nothing of its content, until it opens', () => {
@@ -40,6 +43,72 @@ describe('PreviewCard', () => {
40
43
  expect(screen.queryByText('The rest of it')).toBeNull()
41
44
  })
42
45
 
46
+ it('with openOnTap, a tap on a touch screen opens the card and a second tap closes it', async () => {
47
+ const user = userEvent.setup()
48
+ render(
49
+ <PreviewCard content={<span>The rest of it</span>} openOnTap>
50
+ <span>A dot</span>
51
+ </PreviewCard>,
52
+ )
53
+ const dot = screen.getByText('A dot')
54
+ await user.pointer({ keys: '[TouchA]', target: dot })
55
+ expect(await screen.findByText('The rest of it')).toBeTruthy()
56
+ await user.pointer({ keys: '[TouchA]', target: dot })
57
+ expect(screen.queryByText('The rest of it')).toBeNull()
58
+ })
59
+
60
+ it('with openOnTap on a button, a tap that closes the card stays closed: focus from the tap does not reopen it a moment later', async () => {
61
+ vi.useFakeTimers()
62
+ render(
63
+ <PreviewCard content={<span>The rest of it</span>} openOnTap>
64
+ <button type="button">A dot</button>
65
+ </PreviewCard>,
66
+ )
67
+ const dot = screen.getByRole('button', { name: 'A dot' })
68
+ // A finger's tap on a button, in the order a phone sends it: the press and the lift, then the mouse events made
69
+ // from them, focus on the button and the click. Fired by hand, because user-event waits on a clock this test fakes.
70
+ const tap = () => {
71
+ fireEvent.pointerDown(dot, { pointerType: 'touch' })
72
+ fireEvent.pointerUp(dot, { pointerType: 'touch' })
73
+ fireEvent.mouseDown(dot)
74
+ act(() => dot.focus())
75
+ fireEvent.mouseUp(dot)
76
+ fireEvent.click(dot)
77
+ }
78
+ tap()
79
+ expect(screen.getByText('The rest of it')).toBeTruthy()
80
+ tap()
81
+ expect(screen.queryByText('The rest of it')).toBeNull()
82
+ act(() => {
83
+ vi.advanceTimersByTime(1000)
84
+ })
85
+ expect(screen.queryByText('The rest of it')).toBeNull()
86
+ })
87
+
88
+ it('with openOnTap, a click with no press before it (a screen reader double-tap) opens the card, and another closes it', async () => {
89
+ render(
90
+ <PreviewCard content={<span>The rest of it</span>} openOnTap>
91
+ <button type="button">A dot</button>
92
+ </PreviewCard>,
93
+ )
94
+ const dot = screen.getByRole('button', { name: 'A dot' })
95
+ fireEvent.click(dot)
96
+ expect(screen.queryByText('The rest of it')).not.toBeNull()
97
+ fireEvent.click(dot)
98
+ expect(screen.queryByText('The rest of it')).toBeNull()
99
+ })
100
+
101
+ it('without openOnTap, a tap on a touch screen opens nothing, so a row tapped opens the row', async () => {
102
+ const user = userEvent.setup()
103
+ render(
104
+ <PreviewCard content={<span>The rest of it</span>}>
105
+ <span>A row</span>
106
+ </PreviewCard>,
107
+ )
108
+ await user.pointer({ keys: '[TouchA]', target: screen.getByText('A row') })
109
+ expect(screen.queryByText('The rest of it')).toBeNull()
110
+ })
111
+
43
112
  /*
44
113
  * Not here: "the pointer can move into the card, and it scrolls" — the one
45
114
  * claim that separates this from a tooltip.
@@ -1,4 +1,4 @@
1
- import type { ReactNode } from 'react'
1
+ import { useRef, useState, type PointerEvent, type ReactNode } from 'react'
2
2
  import { PreviewCard as BasePreviewCard } from '@base-ui/react/preview-card'
3
3
  import { cn } from './cn'
4
4
  import { ScrollArea } from './ScrollArea'
@@ -46,6 +46,13 @@ export interface PreviewCardProps {
46
46
  contentClassName?: string
47
47
  /** Extra classes on the trigger wrapper — e.g. `block w-full` for a row. */
48
48
  wrapperClassName?: string
49
+ /**
50
+ * A tap on the trigger opens the card, and a second tap closes it, for a
51
+ * touch screen, where nothing hovers (ACT-4: the dot beside a page's title).
52
+ * A mouse still opens it by resting. Off by default: a row's card stays
53
+ * hover-only, because a tap on a row opens the row.
54
+ */
55
+ openOnTap?: boolean
49
56
  }
50
57
 
51
58
  /** The card's own numbers: 12px from the trigger, 8px clear of every screen
@@ -65,9 +72,40 @@ const OPEN_DELAY = 350
65
72
  * here the card can be reached, so it can. */
66
73
  const CLOSE_DELAY = 200
67
74
 
68
- export function PreviewCard({ content, children, side = 'right', delay = OPEN_DELAY, closeDelay = CLOSE_DELAY, className, contentClassName, wrapperClassName }: PreviewCardProps) {
75
+ export function PreviewCard({ content, children, side = 'right', delay = OPEN_DELAY, closeDelay = CLOSE_DELAY, className, contentClassName, wrapperClassName, openOnTap = false }: PreviewCardProps) {
76
+ // Held here always, so turning `openOnTap` on or off never switches the card between controlled and not; without it
77
+ // every change is Base UI's own (hover, focus, Escape, a press outside), as before.
78
+ const [open, setOpen] = useState(false)
79
+ // The press the next click belongs to: its pointer type, and whether the card was open when it went down. A tap
80
+ // focuses a button inside, and focus may open the card before the click, so the click sets the opposite of what was
81
+ // there before the press, not of what focus just did. The click uses it up.
82
+ const press = useRef<{ pointerType: string; wasOpen: boolean } | undefined>(undefined)
83
+ // The last press's pointer type, which outlives the click: it says whether a focus that opens the card came from a tap.
84
+ const lastPointer = useRef<string | undefined>(undefined)
85
+ const onOpenChange = (next: boolean, details: BasePreviewCard.Root.ChangeEventDetails) => {
86
+ // Base UI opens on focus after its delay, on a timer a tap's close does not cancel: after a touch, a tapped-shut
87
+ // card would open again a moment later. On a touch screen only a tap opens it.
88
+ if (openOnTap && next && details.reason === 'trigger-focus' && lastPointer.current === 'touch') return
89
+ setOpen(next)
90
+ }
91
+ const tapHandlers = openOnTap
92
+ ? {
93
+ onPointerDown: (event: PointerEvent) => {
94
+ press.current = { pointerType: event.pointerType, wasOpen: open }
95
+ lastPointer.current = event.pointerType
96
+ },
97
+ onClick: () => {
98
+ const last = press.current
99
+ press.current = undefined
100
+ // A mouse or a pen opens it by resting, as Base UI treats both as able to hover. A touch, or a click with no
101
+ // press before it (a screen reader's double-tap sends only the click), sets the opposite.
102
+ if (last?.pointerType === 'mouse' || last?.pointerType === 'pen') return
103
+ setOpen(!(last ? last.wasOpen : open))
104
+ },
105
+ }
106
+ : {}
69
107
  return (
70
- <BasePreviewCard.Root>
108
+ <BasePreviewCard.Root open={open} onOpenChange={onOpenChange}>
71
109
  {/* The part renders an `<a>` by default, which a row is not; `render`
72
110
  makes it the wrapper this component has always been, and the trigger
73
111
  inside keeps whatever element it already is. */}
@@ -75,6 +113,7 @@ export function PreviewCard({ content, children, side = 'right', delay = OPEN_DE
75
113
  delay={delay}
76
114
  closeDelay={closeDelay}
77
115
  render={<span className={cn('inline-flex', wrapperClassName)} />}
116
+ {...tapHandlers}
78
117
  >
79
118
  {children}
80
119
  </BasePreviewCard.Trigger>
package/src/UnreadDot.mdx CHANGED
@@ -54,6 +54,7 @@ It does these by itself. Write none of them around it.
54
54
  | The 6px disc in a 24px slot | a sized box around a round div | |
55
55
  | `data-unread`, the attribute tests and photo runs select on | a marker of your own | |
56
56
  | Keeps its size in a tight row | `shrink-0` | |
57
+ | `quiet`: the same 6px as a ring, not marked `data-unread`, for a dot that is always there and has nothing new | a bordered div of your own | |
57
58
 
58
59
  ## Props
59
60
 
@@ -11,6 +11,9 @@ type Story = StoryObj<typeof meta>
11
11
 
12
12
  export const Default: Story = {}
13
13
 
14
+ /** Nothing new: the ring a dot that is always there draws, so the slot does not empty. */
15
+ export const Quiet: Story = { args: { quiet: true } }
16
+
14
17
  /** Beside a line of text, as a list row draws it: the slot keeps the row's height. */
15
18
  export const InARow: Story = {
16
19
  render: (args) => (
@@ -14,4 +14,9 @@ describe('UnreadDot', () => {
14
14
  expect(slot.className).toContain('w-6')
15
15
  expect((slot.firstElementChild as HTMLElement).className).toContain('w-1.5')
16
16
  })
17
+
18
+ it('a quiet dot, with nothing new, is not marked data-unread, so nothing reads it as unread', () => {
19
+ const { container } = render(<UnreadDot quiet />)
20
+ expect((container.firstElementChild as HTMLElement).hasAttribute('data-unread')).toBe(false)
21
+ })
17
22
  })
package/src/UnreadDot.tsx CHANGED
@@ -7,11 +7,16 @@ import { cn } from './cn'
7
7
  *
8
8
  * Purely visual: the row that draws it says "unread" in its own accessible
9
9
  * name, because a coloured disc reads as nothing to a screen reader.
10
+ *
11
+ * `quiet` draws the same 6px as a ring with nothing new: the dot beside a
12
+ * page's title, which is always there because it opens the page's list
13
+ * (ACT-4; the activity indicator prototype Miky approved, 10 November). A
14
+ * quiet dot is not marked `data-unread`.
10
15
  */
11
- export function UnreadDot({ className }: { className?: string }) {
16
+ export function UnreadDot({ className, quiet = false }: { className?: string; quiet?: boolean }) {
12
17
  return (
13
- <div className={cn('flex h-6 w-6 shrink-0 items-center justify-center', className)} data-unread>
14
- <div className="h-1.5 w-1.5 rounded-full bg-accent-primary" />
18
+ <div className={cn('flex h-6 w-6 shrink-0 items-center justify-center', className)} {...(quiet ? {} : { 'data-unread': '' })}>
19
+ <div className={cn('h-1.5 w-1.5 rounded-full', quiet ? 'border border-border-strong' : 'bg-accent-primary')} />
15
20
  </div>
16
21
  )
17
22
  }
@@ -66,7 +66,7 @@ fork freely, owe nothing back, mention it on the package's ticket.
66
66
  |---|---|
67
67
  | A list of verbs from a trigger | **Menu** — Escape, outside-click and the arrow keys come with it |
68
68
  | A panel of *content* from a trigger — a field, a toolbar, a small form | **Popover** — the menu's surface without a menu's keyboard |
69
- | More of a thing on hover | **PreviewCard** — unlike a tooltip, you can point at it; on a sidebar row, **NavItem** `preview` opens it |
69
+ | More of a thing on hover | **PreviewCard** — unlike a tooltip, you can point at it; on a sidebar row, **NavItem** `preview` opens it; `openOnTap` when nothing else on the trigger answers a tap |
70
70
  | A hint on hover or on keyboard focus | **Tooltip** / **WithTooltip** — one `TooltipProvider` at the app root shares the delay |
71
71
  | A strip of controls that act on one thing | **Toolbar** — one Tab stop for the row, arrow keys along it |
72
72
  | Reactions to choose from | **ReactionPicker** — the row; **Reaction** is the pill it produces |
@@ -120,7 +120,7 @@ The same conversation in every app; only its colours are each app's.
120
120
  | A box that can hold more than fits — a list that grows with its data counts, even when today's data fits | **ScrollArea** — its bar is drawn over the content and takes no width |
121
121
  | Text that can run long above things the reader needs, cut behind a fade | **ShowMore** — measures; what fits has no button |
122
122
  | A status, a count or a category, in a small pill | **Chip** — six colour types; the colour is the message, the label makes it legible |
123
- | Something new on a row or a card, no count | **UnreadDot** — the 6px dot in a 24px slot; in a sidebar row, **NavItem** `unread` draws it |
123
+ | Something new on a row or a card, no count | **UnreadDot** — the 6px dot in a 24px slot; in a sidebar row, **NavItem** `unread` draws it; `quiet` for a dot that is always there with nothing new |
124
124
  | One thing — a conversation, a project, an object — as a box you can pick | **Card** — the fill by what it sits on; `href` for a link, `hover="fill"` in a feed, `onPress` when a press opens it |
125
125
  | A section heading, chevron, hover actions, a count beside the title | **SectionHeader** |
126
126
  | A group of rows that opens and closes, and stays how you left it | **CollapsibleSection** — `storageKey` remembers |