@coolms/ui-react 0.1.0-alpha.2 → 0.1.0-alpha.20

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/CHANGELOG.md CHANGED
@@ -2,6 +2,216 @@
2
2
 
3
3
  All notable changes to `@coolms/ui-react` are listed here. Versions follow [semantic versioning](https://semver.org/).
4
4
 
5
+ ## 0.1.0-alpha.20 (2026-11-20)
6
+
7
+ The server's icon names the folder menu and the image bar use, and a space kept for a name the kit does not know.
8
+
9
+ - `Icon`: `folder-plus`, `folder-x`, `user-check` and `user-x`, in the set's stroke style.
10
+ - `BOOTSTRAP_ICONS` / `iconForName`: `pencil` is `pencil`, `trash3` is `trash`, `folder-plus` and `folder-x` are themselves, `image` is `image`, `person-check` is `user-check`, and `person-x` is `user-x`.
11
+ - `NamedIcon` (new): a server's icon by its name, 18px by default, for a row of items. A name the table does not hold draws an empty space of the same size, so the labels beside it line up, and says so once per name in the console outside production. No name draws nothing.
12
+
13
+ ## 0.1.0-alpha.19 (2026-11-20)
14
+
15
+ The screen shell at phone width, on design tokens 0.10.0 (contract 0.5.0).
16
+
17
+ - `ScreenShell` (contract `screen-shell`): one screen of a section at phone width. One bar: the section's navigation at its root, or Back named by the parent on a nested screen; the title; the section's search, then the shell's own icons (the bell, the avatar). Optional filter chips under it, exactly one selected. The content scrolls on its own and refreshes by a pull from its top (`onRefresh`, 64px); the primary action floats at the bottom right as one button or a menu of declared entries, and the content ends with room for it. While the section's search is open (`searching`), the bar is Close and the host's search field.
18
+ - `usePull`, `PULL_AT`, `usePullState`: the pull, shared; a `List` inside a shell draws it (state `pulled`) with the sync time, then the refreshing state.
19
+ - `List`: one row anatomy, flat on one surface with light separators, no border or card; a row may be `unread` (the title semibold) and carry a `count` under its meta.
20
+ - `Avatar`: `connection` (on one's own avatar, the live connection as its dot, said in words as its name and tooltip), `deleted` (a neutral person icon, never initials), and presence `busy`, drawn as away.
21
+ - Icons: `user`, a person.
22
+ - Tokens: the copy is design-tokens v0.10.0 (a075e93); only the components contract changed (the screen shell, its search part, the list's row and the avatar's states).
23
+
24
+ ## 0.1.0-alpha.18 (2026-11-20)
25
+
26
+ A sender's own initials when a service sent on their behalf.
27
+
28
+ - `Avatar` / `initialsOf`: a trailing "via <service>" is left out before the initials are taken, so a message sent on someone's behalf shows the sender's own: "Valentina Zagnetova via LinkedIn" is VZ, not VL. Only a lowercase "via", as relays write it: "Maria Via Rossi" stays MR. Each initial is the word's first letter or digit, so a name in quotes ("'Anna Kowalska' via Partners") is AK.
29
+
30
+ ## 0.1.0-alpha.17 (2026-11-19)
31
+
32
+ The pane toolbar always reaches More, and two icons of their own.
33
+
34
+ - `PaneToolbar`: More is always reached. In a row too narrow for its pinned actions and More, after the overflow, the pinned go behind More too, from the end of the row, and its menu lists them after the overflow; no action is cut off at the row's edge. One action alone goes behind More when no other can go with it and that alone lets the row fit (one keeping its label, without an icon).
35
+ - Icons: `envelope-open` draws an open envelope (`mail-open`), apart from `envelope`, and `clipboard` draws a clipboard (`copy`), so Show message and Copy source have their own icons.
36
+
37
+ ## 0.1.0-alpha.16 (2026-11-19)
38
+
39
+ The design tokens 0.8.0 with their control heights, and the kit covering every entry of their contract 0.3.0.
40
+
41
+ - Tokens: the copy is design-tokens v0.8.0, with `--cms-control-height-sm` (32px), `-md` (40px; 44px on a coarse pointer) and `-lg` (44px). `tools/check-css.mjs` is its copy that keeps the coarse-pointer block.
42
+ - Control heights: a button, a text field and a select are `--cms-control-height-md`: 40px with a mouse, 44px on a touch screen, as the token says. A button's height is no longer set again by the window's width.
43
+ - `Notification`: one notification in a list (contract `notification`: unread, read, collapsed, expanded, with-action, row-action). Pressing the row reads it and follows only a row action the host can follow; a button action goes only from its button, after the text; the chevron opens the body and reads it.
44
+ - `FileViewer`: `state` draws loading, an error (Retry only when the caller gives it) or no preview (Download as its action) inside the content, the top bar staying; `editing.conflict` asks, above the editor, whether to overwrite the other version or keep both, and saves nothing on its own.
45
+ - `ContextMenu`: a refused or disabled item is described by its reason (`aria-describedby`), as the pane toolbar's disabled action is (contract `item-disabled`); an item's icon and words share one line.
46
+ - The kit declares `file-viewer`, `file-picker`, `pane-toolbar` and `notification` against the contract, state by state.
47
+ - `tools/check-layout.mjs`: below the desktop width the browser is a touch screen's (a coarse pointer, no hover), so a control's touch height is the one measured; the demo has a notifications screen.
48
+
49
+ ## 0.1.0-alpha.15 (2026-11-18)
50
+
51
+ Resizable panes.
52
+
53
+ - `SplitPanes`: `sizes` gives the panes before the last a width, limits, a width to put back and a splitter's name; where every pane shows, a splitter is drawn after each. A splitter is a vertical separator with its width and limits, dragged by mouse, touch or pen, moved 16 px by the arrow keys, taken to its limits by Home and End, and put back by a double-click or Enter. `onResize` reports a move while it is dragged and once more when the drag or the key ends. The last pane is never narrower than `lastMin` (360 by default); as the window narrows the pane nearest it gives way first. Where fewer panes show, there is no splitter.
54
+ - `fitPanes(sizes, room, lastMin)`: the widths the panes take in a given room, as `SplitPanes` lays them out.
55
+
56
+ ## 0.1.0-alpha.14 (2026-11-18)
57
+
58
+ Number, date and time fields, and a field of several lines, for forms the server declares.
59
+
60
+ - `TextField`: `type` adds `number`, `date`, `time` and `datetime-local`, native inputs, so a phone shows its own keyboard or picker and assistive technology reads them as what they are. The server's constraints are the input's own: `min`, `max`, `step`, `minLength`, `maxLength` and `required`. A number with a fractional or `any` step asks for the decimal keyboard. `locale` (the person's) is the input's language, and a read-only or pinned date or time is written out in it as the wall-clock value it is, with its ISO value in `data-value`; a value naming no real date or time is shown as given. While a date or time is edited, the device's picker shows the browser's own format.
61
+ - `writtenOut(type, value, locale)`: the same writing out, for a host.
62
+ - `TextArea`: several lines in the text field's frame and states, with `rows`, `minLength`, `maxLength`, `required` and `locale`.
63
+
64
+ ## 0.1.0-alpha.13 (2026-11-17)
65
+
66
+ The viewer's side arrows say where they go, and the next one stands clear of the scrollbar.
67
+
68
+ - `FileViewer`: each side arrow's label (`siblings.previousLabel` / `nextLabel`) is also its tooltip, so the caller's words ("Next attachment: Receipt.pdf") show on hover. The next arrow stands 20px further in from the content's right edge, clear of the content's own vertical scrollbar.
69
+
70
+ ## 0.1.0-alpha.12 (2026-11-16)
71
+
72
+ A disabled action's reason is read out with it, and a press shows it.
73
+
74
+ - `PaneToolbar`: a disabled action's reason describes it (`aria-describedby`), so it is read out with the action, and a press shows it as hover and focus do, until focus leaves or Escape. A press still runs nothing.
75
+
76
+ ## 0.1.0-alpha.11 (2026-11-15)
77
+
78
+ Show original stays in More, and a toolbar's labels give way one by one.
79
+
80
+ - `PaneToolbar`: as the pane narrows, labels hide one by one, in the overflow order (lower priority first, a
81
+ priority's actions together), then the pinned actions' from the end of the row; only once every label is hidden do
82
+ actions go behind More, in the same order, never one alone. They come back in the reverse order. An action hiding its
83
+ label keeps it as its tooltip. The row is marked `cms-pane-toolbar--labels-partly-hidden` between the two, the
84
+ contract's new `labels-partly-hidden` state.
85
+ - `PaneToolbar`: the classes named as the contract names them. An action whose label is hidden is
86
+ `cms-pane-toolbar__action--bare` (renamed `--icon` to `--bare`), and an action drawn without an icon is
87
+ `cms-pane-toolbar__action--text`, the same in both kits.
88
+ - `PaneToolbar`: `overflow: 0` means menu only. The action is never drawn in the row, at any width, and always sits behind
89
+ More, first in its menu. More is drawn for it even when it is alone. Its label takes no part in the giving way, and the
90
+ rule that one action never goes behind More alone counts only the actions that could have stayed in the row.
91
+ - `Icon`: `file-code`, a file with code's angle brackets, for the server's `file-earmark-code` (Show original).
92
+
93
+ ## 0.1.0-alpha.10 (2026-11-10)
94
+
95
+ The row of actions at the top of a pane, drawn from the server's action nodes.
96
+
97
+ - `ContextMenu` takes `focus`, the item focused as it opens; `PaneToolbar`'s More opens its menu on the last item with Up.
98
+ - `PaneToolbar`, the contract's `pane-toolbar`: the one row of actions at the top of a pane, the
99
+ same height in every pane. It draws the actions it is given, as the server's action nodes give them (id, label, icon,
100
+ group, overflow priority, danger, disabled), and says which was chosen by its id. As the pane narrows every label
101
+ hides at once, then actions go behind More by their overflow priority, never one alone, a priority's actions together.
102
+ One Tab stop, a status at the end.
103
+ - Icons `forward` and `refresh`.
104
+
105
+ ## 0.1.0-alpha.9 (2026-11-09)
106
+
107
+ A quick reply that carries its own controls and decides when it may be sent.
108
+
109
+ - `Composer` takes `leading`, a quick reply's own controls at the start of its last row before Send, and `canSend`,
110
+ which decides whether Send sends in place of the text being non-empty.
111
+
112
+ ## 0.1.0-alpha.8 (2026-11-09)
113
+
114
+ Choosing files a person already has, and a file viewer that keeps to the screen.
115
+
116
+ - Added: `FilePicker`, for choosing files that already exist in the person's spaces, such as Drive, to attach them
117
+ without downloading and uploading them again (contract component `file-picker`). The kit knows no API: the host
118
+ gives the spaces, lists a folder page by page (`list(space, path, cursor?)`), and receives the chosen entries with
119
+ the space and path each was chosen in.
120
+ - The selection holds across folders and spaces; the footer counts all of it, and a chip lists it, with Remove and
121
+ Clear.
122
+ - An optional `budget` (`usedBytes`, `limitBytes`, `cost`) is counted here: what is left after the selection, and
123
+ a file that would go over is disabled with the host's words for it. `disabledReason` adds the host's own reasons.
124
+ Attach is disabled with nothing chosen and while over.
125
+ - A listbox with aria-multiselectable: Up, Down, Home and End move, Enter opens a folder, Space ticks a file,
126
+ Backspace goes up, Escape cancels. The breadcrumb is a navigation landmark. A page further is asked for near the
127
+ end of the list.
128
+ - Loading, empty and error with Retry through `State`; a folder the person may not open (`FilePickerDenied` from
129
+ `list`) is denied in place, the dialog staying open.
130
+ - A dialog of fixed height on a wide screen; the whole screen on a phone, its foot kept at the bottom.
131
+ - `kit.contract.json` does not declare it yet: no released design-tokens version has the entry.
132
+ - Fixed: the file viewer is never wider than the screen. A viewer bar wider than a phone widened the whole overlay;
133
+ now the overlay is one column the screen's width, and the bar scrolls sideways in its place, its controls centred
134
+ while they fit.
135
+ - `Modal` takes `initialFocus`, what takes the focus on opening when it is not the body's first control, and
136
+ `className`, for a component drawn in it that has a layout of its own.
137
+
138
+ ## 0.1.0-alpha.7 (2026-11-08)
139
+
140
+ An icon of its own for the important folder.
141
+
142
+ - Added: the `important` icon, a marker shaped as a label's chevron, for a mail client's important folder. The bell
143
+ stays for notifications alone. The demo's mail folders show it after Starred.
144
+
145
+ ## 0.1.0-alpha.6 (2026-11-08)
146
+
147
+ A file opens over the page, and every place that waits, finds nothing or is refused says so in one way.
148
+
149
+ - Added: `FileViewer`, the overlay a file's adapter goes inside. It draws no file itself.
150
+ - The top bar has Close, the type badge and the name, then the caller's actions (Download, Print, Open separately),
151
+ in a menu on a phone. Edit is there only when the caller passes it.
152
+ - Close leaves the viewer, asking the caller first when there is unsaved work; Done returns from editing.
153
+ Escape closes only while viewing.
154
+ - Focus starts on Close, stays among what is drawn, and returns to what opened the viewer. The page behind does not
155
+ scroll.
156
+ - Arrows, swipes and side buttons move through a set of files. A field, an editor, or anything marked
157
+ `data-viewer-keys` or `data-viewer-gestures` keeps its keys and gestures. A key held with Ctrl, Cmd or Alt is left
158
+ to the browser.
159
+ - Plus, minus and 0 call `onZoom`. The viewer bar, thumbnails and strip hold what the adapter gives.
160
+ - `download`, `print` and `open-separately` join the icons.
161
+ - `kit.contract.json` does not declare it yet: design-tokens v0.7.1 has no entry for it.
162
+ - Added: `State`, for loading, empty, error and denied, at a page's, a card's or a line's size, with the caller's
163
+ title, description and action. Loading shows nothing until `STATE_DELAY_MS` (the `state-delay` token) has passed.
164
+ `elevation-required` is declared not offered, since this kit's clients never elevate.
165
+ - Changed: the kit is checked against design-tokens v0.7.1, from v0.7.0.
166
+
167
+ ## 0.1.0-alpha.5 (2026-11-04)
168
+
169
+ A field is drawn once.
170
+
171
+ - Fixed: `SignInForm`'s inputs carried the class of a field's frame, `cms-field`, so their box (a border, a fixed
172
+ 44px height, padding and a background) fell on the frame of every `TextField`, `Select` and `Toggle` too: each field
173
+ drew two boxes, and its help text ran over the next label. The sign-in inputs are now `cms-signin-form__input`, and
174
+ the frame is a column of label, box and help only. A page that styled the sign-in inputs as `.cms-field` styles
175
+ them as `.cms-signin-form__input`.
176
+
177
+ ## 0.1.0-alpha.4 (2026-11-02)
178
+
179
+ The kit's words come from the app, and the composer leaves an input method's Enter alone.
180
+
181
+ - Added: every word a component says can be given in the app's language, English where it is not.
182
+ - `labels` on `IncomingCall`, `CallPanel` and `CallBar` (`CallLabels`, defaults `CALL_LABELS`);
183
+ - `labels` on `SignInForm` (`SignInLabels`, `SIGN_IN_LABELS`) and `MailRow` (`MailRowLabels`, `MAIL_ROW_LABELS`);
184
+ - `railLabel` on `AppShell`, `readLabel` on `ChatBubble`, `attachLabel` on `Composer`, `closeLabel` on `Modal`
185
+ and `ConfirmDialog`, `dismissLabel` on `Toast` and `retryLabel` on `ErrorBanner`.
186
+ The words that name someone or something take it as an argument (`onCallWith(name)`), so a language can place it.
187
+ - Changed: `AppShell`'s main area is a column: a section in it can fill the height (`flex: 1`), and a lone child does.
188
+ - Fixed: `Composer` no longer sends on Enter while an input method is composing (`isComposing`, or the composing key
189
+ 229 on browsers that do not set it). Typing Chinese, Japanese or Korean, Enter confirms the text.
190
+
191
+ ## 0.1.0-alpha.3 (2026-10-30)
192
+
193
+ The Workspace's components, on design-tokens 0.6.0.
194
+
195
+ - Added: `AppShell` (the dark rail of sections with counts, the top bar with the server, search and account),
196
+ `SearchField`, `Badge`, `FilterChips` (a radio group of pills), `SplitPanes` (two or three labelled panes),
197
+ `MailRow`, `ChatBubble`, `Composer` (chat and quick reply), `IncomingCall`, `CallPanel`, `CallBar`, `SignInLayout`
198
+ and `SignInForm`, and `Icon` with its set of 29 icons.
199
+ - Responsive by design, on the layout's tokens: desktop from 1200px (the full rail, three panes), tablet from 600px
200
+ (an icons-only rail with each section's name as its tooltip, two panes), phone below 600px (a bottom tab bar, one
201
+ pane at a time). `SplitPanes` takes `active`, the pane the person is in, and `back`, a link to the pane before
202
+ it, shown where that pane is hidden; with the selection in the address, the browser's Back agrees. Sign-in fits
203
+ every width, and every control is at least 44px at tablet and phone widths.
204
+ - A navy button keeps a visible 1px edge in dark (`button-chrome-border`).
205
+ - Changed: `Avatar` takes one of six tints from the name (`tintOf`), the same name always the same tint.
206
+ - Added: Inter (`./fonts.css`, SIL Open Font License 1.1) and the token file with the Workspace tokens, both from
207
+ design-tokens 0.6.0, as the lock records.
208
+ - The demo gains a Workspace page per screen (Mail, Chat, Calls, Sign in), light and dark: `demo/workspace.html`.
209
+ Mail shows the mailbox's folders as a tree, never labels. Each screen's place is in its address (`#mail/2` is
210
+ Mail with its third message open).
211
+ - Checks: `check-breakpoints` (every media query width is a breakpoint token) and `check-layout` (every demo screen
212
+ at 1440, 1024, 768 and 390px, light and dark, in headless Chrome: nothing passes the edge or scrolls sideways,
213
+ and no control at touch widths is under 44px).
214
+
5
215
  ## 0.1.0-alpha.2 (2026-10-28)
6
216
 
7
217
  The token file is CSS a browser keeps whole.
@@ -13,13 +223,11 @@ The token file is CSS a browser keeps whole.
13
223
  `design-tokens.lock.json` with the tag's commit.
14
224
  - Added: `tools/check-css.mjs`, copied from v0.5.0 and pinned the same way, runs on the token file in
15
225
  `tokens:check`; `tools/check-css-teeth.mjs` makes sure it still fails a `//` header and a missing file.
16
- - Changed: the README's install line names no version (it named 0.1.0-alpha.1), and says to use 0.1.0-alpha.2 or
17
- later.
226
+ - Changed: the README's install line names no version, and says to use 0.1.0-alpha.2 or later.
18
227
 
19
228
  ## 0.1.0-alpha.1 (2026-10-23)
20
229
 
21
- The first pre-release. Published from `develop` at 91f0db3, which has no tag; the package already carries
22
- `design-tokens.lock.json` (#1).
230
+ The first pre-release. The package carries `design-tokens.lock.json` (#1).
23
231
 
24
232
  - The 15 components of the CoolMS UI contract, each in every state the contract names. `elevation-required` is not
25
233
  offered.
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "repository": "coolms/design-tokens",
3
- "tag": "v0.5.0",
4
- "commit": "9e18a14ca2b5549ab217beab007a9f480dd3b12c",
3
+ "tag": "v0.10.0",
4
+ "commit": "a075e930422602ab8ccd47db721b393c80ad44ce",
5
5
  "files": {
6
6
  "dist/coolms-tokens.css": {
7
7
  "to": "src/tokens/coolms-tokens.css",
8
- "sha256": "bb89703ab55784b538c18a3dd82f95769980b2c83fa0733a81f628ae3d6ad1c3"
8
+ "sha256": "aadfb15497060c9c1ddd2ffb89039ff569bd6b3618734cccde0a17c51a217fac"
9
9
  },
10
10
  "contract/components.json": {
11
11
  "to": "contract/components.json",
12
- "sha256": "3a21896076d70e96658033eb85173b1a0fc745151a7d4d5c070d882ec7605658"
12
+ "sha256": "204aef4b2a18945f1a3d6e463fa18464b042943a132199b7b347c00352fb71f0"
13
13
  },
14
14
  "contract/server-states.json": {
15
15
  "to": "contract/server-states.json",
@@ -17,11 +17,31 @@
17
17
  },
18
18
  "tools/check-kit.mjs": {
19
19
  "to": "tools/check-kit.mjs",
20
- "sha256": "f8407f6accd55eb666eb6bbfe629a10f959c3bf6c62fe8ef2f1fe06a48471a8c"
20
+ "sha256": "c48ac67d267aec11698ab362a8095a355eea8c8775c313d4261be2c60b65d0bb"
21
21
  },
22
22
  "tools/check-css.mjs": {
23
23
  "to": "tools/check-css.mjs",
24
- "sha256": "231ca006b6e949f9882c98186527e2a974efb5acd60bfb8d05a37d82eae6a678"
24
+ "sha256": "aad1b7d00c46577346b4fc38ddfe0047633a61f4eebe39959918811eb134fd12"
25
+ },
26
+ "fonts/inter.css": {
27
+ "to": "src/fonts/inter.css",
28
+ "sha256": "78bea3ce5f8e0209ec80162fd692c138a5628ae37c69b2362a49ba755540b2b1"
29
+ },
30
+ "fonts/inter-latin.woff2": {
31
+ "to": "src/fonts/inter-latin.woff2",
32
+ "sha256": "3100e775e8616cd2611beecfa23a4263d7037586789b43f035236a2e6fbd4c62"
33
+ },
34
+ "fonts/inter-latin-ext.woff2": {
35
+ "to": "src/fonts/inter-latin-ext.woff2",
36
+ "sha256": "34b9c504cab7a73e37b746343a449132e56cf7b5481af2cb81dc74dcff25c956"
37
+ },
38
+ "fonts/inter-cyrillic.woff2": {
39
+ "to": "src/fonts/inter-cyrillic.woff2",
40
+ "sha256": "71d5ee93cc1e9f1d520a3a8b66456de18c7879d8df09d57fcd2eaff75fef0075"
41
+ },
42
+ "fonts/OFL.txt": {
43
+ "to": "src/fonts/OFL.txt",
44
+ "sha256": "262481e844521b326f5ecd053e59b98c8b2da78c8ee1bdbb6e8174305e54935a"
25
45
  }
26
46
  }
27
47
  }
@@ -0,0 +1,71 @@
1
+ import type { ReactNode } from 'react';
2
+ /** The words a call's components say, in the app's language; English by default. */
3
+ export interface CallLabels {
4
+ readonly incomingAudio: string;
5
+ readonly incomingVideo: string;
6
+ /** The incoming card's name for a screen reader: what is ringing, and who calls. */
7
+ readonly incomingFrom: (what: string, name: string) => string;
8
+ readonly accept: string;
9
+ readonly decline: string;
10
+ readonly callWith: (name: string) => string;
11
+ readonly callTime: (duration: string) => string;
12
+ readonly goodConnection: string;
13
+ readonly poorConnection: string;
14
+ readonly you: string;
15
+ readonly speaking: string;
16
+ readonly mute: string;
17
+ readonly unmute: string;
18
+ readonly speaker: string;
19
+ readonly addPerson: string;
20
+ readonly chat: string;
21
+ readonly hangUp: string;
22
+ readonly onCallWith: (name: string) => string;
23
+ readonly returnToCall: string;
24
+ }
25
+ export declare const CALL_LABELS: CallLabels;
26
+ export interface IncomingCallProps {
27
+ /** Who is calling. */
28
+ readonly name: string;
29
+ readonly media: 'audio' | 'video';
30
+ readonly onAccept: () => void;
31
+ readonly onDecline: () => void;
32
+ /** Its words, in the app's language; each left out is English. */
33
+ readonly labels?: Partial<CallLabels>;
34
+ }
35
+ /** A call ringing on this device: who, and Accept or Decline. An alert dialog, so a screen reader announces it. */
36
+ export declare function IncomingCall({ name, media, onAccept, onDecline, labels }: IncomingCallProps): ReactNode;
37
+ export interface CallPanelProps {
38
+ readonly name: string;
39
+ /** How long the call has lasted ("04:12"). */
40
+ readonly duration: string;
41
+ /** What the call's statistics say of the connection. */
42
+ readonly connection: 'good' | 'poor';
43
+ /** This account, in the call: its name and whether it is speaking. */
44
+ readonly you: {
45
+ readonly name: string;
46
+ readonly speaking: boolean;
47
+ };
48
+ readonly muted: boolean;
49
+ readonly speaker: boolean;
50
+ readonly onToggleMute: () => void;
51
+ readonly onToggleSpeaker: () => void;
52
+ readonly onAddPerson?: () => void;
53
+ readonly onChat?: () => void;
54
+ readonly onHangUp: () => void;
55
+ /** Its words, in the app's language; each left out is English. */
56
+ readonly labels?: Partial<CallLabels>;
57
+ }
58
+ /** A call in progress: who, how long, how the connection is, and its controls. */
59
+ export declare function CallPanel({ name, duration, connection, you, muted, speaker, onToggleMute, onToggleSpeaker, onAddPerson, onChat, onHangUp, labels }: CallPanelProps): ReactNode;
60
+ export interface CallBarProps {
61
+ readonly name: string;
62
+ readonly duration: string;
63
+ readonly muted: boolean;
64
+ readonly onToggleMute: () => void;
65
+ readonly onReturn: () => void;
66
+ readonly onHangUp: () => void;
67
+ /** Its words, in the app's language; each left out is English. */
68
+ readonly labels?: Partial<CallLabels>;
69
+ }
70
+ /** The call, kept in view while another section is open: who, how long, mute, back to it, hang up. */
71
+ export declare function CallBar({ name, duration, muted, onToggleMute, onReturn, onHangUp, labels }: CallBarProps): ReactNode;
@@ -8,6 +8,10 @@ export interface ListRow {
8
8
  readonly lead?: ReactNode;
9
9
  /** Trailing text: a date, a size. */
10
10
  readonly meta?: ReactNode;
11
+ /** Not read yet: the title in semibold. */
12
+ readonly unread?: boolean;
13
+ /** A count under the meta (unread messages in a conversation). */
14
+ readonly count?: number;
11
15
  }
12
16
  export interface ListProps {
13
17
  /** What the rows are, for a screen reader ("Messages"). */
@@ -31,7 +35,9 @@ export interface ListProps {
31
35
  }
32
36
  /**
33
37
  * Rows of objects, each opened by a press; a row's other actions in its menu (contract component `list`: loading,
34
- * empty, populated, selected, error). Up and Down move between rows; Enter opens one.
38
+ * empty, populated, selected, error, pulled). Up and Down move between rows; Enter opens one. Every row has one anatomy:
39
+ * a leading icon or avatar, a title (semibold while unread), a secondary line, the meta with a count under it; rows sit
40
+ * on one surface, never cards. Inside a screen that takes a pull, the list draws it at its top (pulled).
35
41
  */
36
42
  export declare function List({ label, rows, error, onRetry, loadingText, emptyTitle, emptyHint, selected, onOpen, onRowMenu }: ListProps): ReactNode;
37
43
  export interface MenuItem {
@@ -53,10 +59,13 @@ export interface ContextMenuProps {
53
59
  readonly items: readonly MenuItem[];
54
60
  readonly onClose: () => void;
55
61
  readonly label?: string;
62
+ /** The item focused as it opens: the first, or the last (a menu button opened with Up). */
63
+ readonly focus?: 'first' | 'last';
56
64
  }
57
65
  /**
58
- * The selected object's actions (contract component `context-menu`: open, item-danger, item-locked, item-refused).
59
- * An item the server withheld is not drawn; a locked one carries its lock; a refused one is shown disabled with the
60
- * server's refusal. Escape, a press outside, or a choice closes it, and focus goes back where it was.
66
+ * The selected object's actions (contract component `context-menu`: open, item-danger, item-locked, item-refused,
67
+ * item-disabled). An item the server withheld is not drawn; a locked one carries its lock; a refused or disabled one
68
+ * stays in the menu, reached by the arrow keys, aria-disabled, with the server's reason under its label and as its
69
+ * description; choosing it does nothing and the menu stays open. Escape, a press outside, or a choice closes it, and focus goes back where it was.
61
70
  */
62
- export declare function ContextMenu({ at, items, onClose, label }: ContextMenuProps): ReactNode;
71
+ export declare function ContextMenu({ at, items, onClose, label, focus }: ContextMenuProps): ReactNode;
@@ -1,4 +1,4 @@
1
- import { type ReactNode } from 'react';
1
+ import { type ReactNode, type RefObject } from 'react';
2
2
  /** How long the closing state is drawn before the dialog leaves the page. */
3
3
  export declare const MODAL_CLOSE_MS = 150;
4
4
  export interface ModalProps {
@@ -15,12 +15,18 @@ export interface ModalProps {
15
15
  readonly children: ReactNode;
16
16
  /** The dialog's actions, at its foot. */
17
17
  readonly footer?: ReactNode;
18
+ /** The close button's name, in the app's language ("Close"). */
19
+ readonly closeLabel?: string;
20
+ /** What takes the focus on opening, when it is not the body's first control (a list, say). */
21
+ readonly initialFocus?: RefObject<HTMLElement | null>;
22
+ /** A class for the dialog itself, for a component drawn in it that has a layout of its own. */
23
+ readonly className?: string;
18
24
  }
19
25
  /**
20
26
  * A dialog over the page (contract component `modal`: open, closing, dirty). Focus moves into it on open and back to
21
27
  * where it was on close; Tab stays inside while it is open.
22
28
  */
23
- export declare function Modal({ open, title, onClose, dirty, onDirtyClose, children, footer }: ModalProps): ReactNode;
29
+ export declare function Modal({ open, title, onClose, dirty, onDirtyClose, children, footer, closeLabel, initialFocus, className }: ModalProps): ReactNode;
24
30
  export interface ConfirmDialogProps {
25
31
  readonly open: boolean;
26
32
  readonly title: ReactNode;
@@ -33,8 +39,10 @@ export interface ConfirmDialogProps {
33
39
  /** The confirming button names the outcome ("Delete 3 messages"), never "OK". */
34
40
  readonly confirmLabel?: ReactNode;
35
41
  readonly cancelLabel?: ReactNode;
42
+ /** The close button's name for a screen reader, in the app's language; "Close" where none is given. */
43
+ readonly closeLabel?: string;
36
44
  readonly onConfirm: () => void;
37
45
  readonly onCancel: () => void;
38
46
  }
39
47
  /** A question before a destructive or irreversible action (contract component `confirm-dialog`: default, danger, discard-changes). */
40
- export declare function ConfirmDialog({ open, title, message, kind, confirmLabel, cancelLabel, onConfirm, onCancel }: ConfirmDialogProps): ReactNode;
48
+ export declare function ConfirmDialog({ open, title, message, kind, confirmLabel, cancelLabel, closeLabel, onConfirm, onCancel }: ConfirmDialogProps): ReactNode;
@@ -9,11 +9,32 @@ interface FieldFrame {
9
9
  /** Shown, focusable and copyable, but not changed here. */
10
10
  readonly readOnly?: boolean;
11
11
  }
12
- export interface TextFieldProps extends FieldFrame {
12
+ /** The native kinds of one line: each brings the device's own keyboard or picker and its accessibility. */
13
+ export type TextFieldType = 'text' | 'email' | 'url' | 'search' | 'tel' | 'password' | 'number' | 'date' | 'time' | 'datetime-local';
14
+ /** What the server declares about a value: its bounds, its step and its length. */
15
+ interface Constraints {
16
+ /** The least value: a number, or an ISO date or time for the date and time types. */
17
+ readonly min?: string | number;
18
+ /** The greatest value, as `min`. */
19
+ readonly max?: string | number;
20
+ /** The step between values (`any` for none): seconds for `time` and `datetime-local`, days for `date`. */
21
+ readonly step?: number | 'any';
22
+ readonly minLength?: number;
23
+ readonly maxLength?: number;
24
+ /** A value is needed: marked for assistive technology, and checked by the browser on submit. */
25
+ readonly required?: boolean;
26
+ }
27
+ export interface TextFieldProps extends FieldFrame, Constraints {
28
+ /** The value as the input holds it: digits for `number`, ISO for the date and time types (`2026-11-18`, `14:30`, `2026-11-18T14:30`). */
13
29
  readonly value: string;
14
30
  readonly onChange?: (value: string) => void;
15
31
  readonly placeholder?: string;
16
- readonly type?: 'text' | 'email' | 'url' | 'search' | 'tel' | 'password';
32
+ readonly type?: TextFieldType;
33
+ /**
34
+ * The person's locale (BCP 47, from their settings): the field's language, and how a read-only or pinned date or
35
+ * time is written out. An editable date or time is the device's own picker.
36
+ */
37
+ readonly locale?: string;
17
38
  /**
18
39
  * The value is set by the environment, not here (a pinned setting): shown read-only with why, the way the admin
19
40
  * shows a key the deployment pins.
@@ -21,8 +42,31 @@ export interface TextFieldProps extends FieldFrame {
21
42
  readonly pinned?: ReactNode;
22
43
  readonly name?: string;
23
44
  }
24
- /** One line of text (contract component `text-field`: default, focused, disabled, read-only, invalid, pinned). */
25
- export declare function TextField({ label, help, error, disabled, readOnly, pinned, value, onChange, placeholder, type, name }: TextFieldProps): ReactNode;
45
+ /**
46
+ * A date or time value written out in a locale, as the wall-clock value it is (no time zone is applied); the value
47
+ * itself when it is not one the type holds, or names no real date or time (a 30 February, a 25th hour).
48
+ */
49
+ export declare function writtenOut(type: TextFieldType, value: string, locale: string | undefined): string;
50
+ /**
51
+ * One line of text (contract component `text-field`: default, focused, disabled, read-only, invalid, pinned), of any
52
+ * native kind: a number, a date, a time or both bring the device's keyboard or picker. The server's constraints are the
53
+ * input's own (`min`, `max`, `step`, `minlength`, `maxlength`, `required`). A date or time that is read-only or pinned
54
+ * is written out in the person's locale, and keeps its ISO value in `data-value`.
55
+ */
56
+ export declare function TextField({ label, help, error, disabled, readOnly, pinned, value, onChange, placeholder, type, name, locale, min, max, step, minLength, maxLength, required }: TextFieldProps): ReactNode;
57
+ export interface TextAreaProps extends FieldFrame, Pick<Constraints, 'minLength' | 'maxLength' | 'required'> {
58
+ readonly value: string;
59
+ readonly onChange?: (value: string) => void;
60
+ readonly placeholder?: string;
61
+ /** The lines it shows before it scrolls (4 by default); the person may make it taller. */
62
+ readonly rows?: number;
63
+ /** The person's locale (BCP 47): the field's language, for spelling and the input method. */
64
+ readonly locale?: string;
65
+ readonly pinned?: ReactNode;
66
+ readonly name?: string;
67
+ }
68
+ /** Several lines of text: the text field's frame and states (`text-field`), with the server's length and need. */
69
+ export declare function TextArea({ label, help, error, disabled, readOnly, pinned, value, onChange, placeholder, rows, name, locale, minLength, maxLength, required }: TextAreaProps): ReactNode;
26
70
  export interface SelectOption {
27
71
  readonly value: string;
28
72
  readonly label: string;
@@ -0,0 +1,83 @@
1
+ import { type ReactNode } from 'react';
2
+ /** A space the person may read, such as their Drive or a shared space. */
3
+ export interface FilePickerSpace {
4
+ readonly id: string;
5
+ readonly name: string;
6
+ }
7
+ /** One entry of a folder, as the host lists it: a folder opens, a file can be chosen. */
8
+ export interface FilePickerEntry {
9
+ readonly id: string;
10
+ readonly name: string;
11
+ readonly kind: 'folder' | 'file';
12
+ readonly size?: number | null;
13
+ readonly mimeType?: string | null;
14
+ }
15
+ /** One page of a folder; `next` when more follow. */
16
+ export interface FilePickerPage {
17
+ readonly entries: readonly FilePickerEntry[];
18
+ readonly next?: string | null;
19
+ }
20
+ /** A chosen file, with the space and folder it was chosen in, so the host needs no second lookup. */
21
+ export interface FilePickerChoice extends FilePickerEntry {
22
+ readonly space: string;
23
+ readonly path: string;
24
+ }
25
+ /** What the host has spent of a limit before this choice; `cost` is what a file adds against it, its size by default. */
26
+ export interface FilePickerBudget {
27
+ readonly usedBytes: number;
28
+ readonly limitBytes: number;
29
+ readonly cost?: (entry: FilePickerEntry) => number;
30
+ }
31
+ /** A folder the person may not open: thrown by `list`, it is shown as denied in place. Anything else is an error. */
32
+ export declare class FilePickerDenied extends Error {
33
+ constructor(message?: string);
34
+ }
35
+ /** The picker's words, in the host's language. */
36
+ export interface FilePickerLabels {
37
+ readonly title: string;
38
+ readonly close: string;
39
+ readonly cancel: string;
40
+ /** The confirm action, carrying the count: "Attach 3 files". */
41
+ readonly confirm: (count: number) => string;
42
+ readonly space: string;
43
+ readonly path: string;
44
+ readonly up: string;
45
+ readonly files: string;
46
+ /** "3 selected", on the chip that lists the selection. */
47
+ readonly selected: (count: number) => string;
48
+ readonly clear: string;
49
+ readonly remove: (name: string) => string;
50
+ /** The whole selection: "3 files, 2.1 MB". */
51
+ readonly total: (count: number, size: string) => string;
52
+ /** With a budget: "1.2 MB of 25 MB left after these". */
53
+ readonly left: (left: string, limit: string) => string;
54
+ /** Why a file is not offered, or the selection cannot be sent: it would go over the limit. */
55
+ readonly overBudget: string;
56
+ readonly loading: string;
57
+ readonly empty: string;
58
+ readonly error: string;
59
+ readonly retry: string;
60
+ readonly denied: string;
61
+ }
62
+ export interface FilePickerProps {
63
+ readonly open: boolean;
64
+ /** The spaces the person may read, in the host's order; the first is shown first. With one, no switch is drawn. */
65
+ readonly spaces: readonly FilePickerSpace[];
66
+ /** One page of a folder of a space, in the host's order. Throws FilePickerDenied for a folder the person may not open. */
67
+ readonly list: (space: string, path: string, cursor?: string) => Promise<FilePickerPage>;
68
+ /** The host's own reason a file cannot be chosen (not readable, a type it will not send), or nothing. */
69
+ readonly disabledReason?: (entry: FilePickerEntry) => string | null | undefined;
70
+ readonly budget?: FilePickerBudget;
71
+ /** A size as the host says it, in the person's language. */
72
+ readonly formatSize: (bytes: number) => string;
73
+ readonly labels: FilePickerLabels;
74
+ readonly onConfirm: (chosen: readonly FilePickerChoice[]) => void;
75
+ readonly onCancel: () => void;
76
+ }
77
+ /**
78
+ * Choosing files a person already has, in their spaces (contract component `file-picker`). The kit knows no API: the
79
+ * host lists folders page by page and receives the chosen entries. The selection holds across folders and spaces; a
80
+ * budget, when given, is counted here, so every host disables the same files. Enter opens a folder, Space ticks a file,
81
+ * Backspace goes up, Escape cancels.
82
+ */
83
+ export declare function FilePicker(props: FilePickerProps): ReactNode;