@apliteni/apliteni-ui 0.147.0 → 0.151.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/guidelines/account-and-settings.md +5 -7
- package/guidelines/dense-tables.md +18 -4
- package/guidelines/density-and-accents.md +1 -1
- package/guidelines/going-back.md +5 -5
- package/guidelines/the-page.md +2 -0
- package/package.json +1 -2
- package/react/README.md +7 -16
- package/react/dist/index.css +121 -0
- package/react/dist/index.d.ts +44 -23
- package/react/dist/index.js +1245 -987
- package/src/assets/icons.js +10 -0
- package/src/logic/dropdown-placement.js +17 -1
- package/src/styles/back.css +2 -2
- package/src/styles/card.css +43 -0
- package/src/styles/dropdown.css +14 -0
- package/src/styles/layout.css +7 -3
- package/src/styles/nav.css +3 -38
- package/src/styles/table.css +33 -110
- package/src/tokens/tokens.css +12 -0
|
@@ -4,17 +4,15 @@
|
|
|
4
4
|
|
|
5
5
|
<!-- rule: modal -->
|
|
6
6
|
|
|
7
|
-
**Rule:** Open account and settings in
|
|
7
|
+
**Rule:** Open account and settings in the kit's account window, over the product, with its sections beside the pane.
|
|
8
8
|
|
|
9
9
|
**Why:** The reader has not left the work behind it, and one overlay holds every setting.
|
|
10
10
|
|
|
11
|
-
**Do:**
|
|
11
|
+
**Do:** Give the window the reader and the sections, and let it draw the rail, the title, the close and the dimmed page.
|
|
12
12
|
|
|
13
13
|
**Don't:** Slide a full-width sheet in with columns inside it.
|
|
14
14
|
|
|
15
|
-
**Except:** On a phone the
|
|
16
|
-
|
|
17
|
-
**Gap #553:** The kit has no modal that takes a navigation pane or a width, so this shape is built by hand.
|
|
15
|
+
**Except:** On a phone the sections become tabs under the reader, where a column beside the pane would leave it narrower than its rows.
|
|
18
16
|
|
|
19
17
|
## Give the modal its own navigation
|
|
20
18
|
|
|
@@ -34,11 +32,11 @@
|
|
|
34
32
|
|
|
35
33
|
<!-- rule: menu -->
|
|
36
34
|
|
|
37
|
-
**Rule:** Keep the account menu to the reader,
|
|
35
|
+
**Rule:** Keep the account menu to the reader, a few ways in, a Theme submenu and Sign out.
|
|
38
36
|
|
|
39
37
|
**Why:** A setting answered inside a menu has no address to link, search or come back to.
|
|
40
38
|
|
|
41
|
-
**Do:** Name the reader, then
|
|
39
|
+
**Do:** Name the reader, then Account settings and Support.
|
|
42
40
|
|
|
43
41
|
**Don't:** Answer the settings in the menu, a row per setting.
|
|
44
42
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
**Rule:** Put tables on a white surface in light mode and the base canvas in dark mode.
|
|
10
10
|
|
|
11
|
-
**Do:**
|
|
11
|
+
**Do:** Let the row edge mark hover.
|
|
12
12
|
|
|
13
13
|
**Don't:** Add a grey zebra or hover fill.
|
|
14
14
|
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
|
|
33
33
|
**Rule:** Right-align numeric headers and values.
|
|
34
34
|
|
|
35
|
-
**Do:**
|
|
35
|
+
**Do:** Use tabular numerals, and keep text left-aligned.
|
|
36
36
|
|
|
37
37
|
**Don't:** Align numbers to their labels or sort formatted strings.
|
|
38
38
|
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
|
|
57
57
|
**Rule:** Keep units smaller and in body ink.
|
|
58
58
|
|
|
59
|
-
**Do:** Keep units smaller and in body ink, and explain abbreviations in reachable text.
|
|
59
|
+
**Do:** Keep units smaller and in body ink, and explain abbreviations in reachable text.
|
|
60
60
|
|
|
61
61
|
**Don't:** Hide units in muted text or make readers guess what an abbreviation means.
|
|
62
62
|
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
|
|
87
87
|
**Don't:** Squeeze columns until values are unreadable or silently remove data.
|
|
88
88
|
|
|
89
|
-
**Except:** On a phone, a
|
|
89
|
+
**Except:** On a phone, a table stays a table and scrolls sideways. Never turn its rows into cards.
|
|
90
90
|
|
|
91
91
|
## Keep identity sub-lines as text
|
|
92
92
|
|
|
@@ -111,3 +111,17 @@
|
|
|
111
111
|
**Do:** Retain rows while refreshing, report busy state, distinguish no data from no matches and errors, and preserve focus when filters change.
|
|
112
112
|
|
|
113
113
|
**Don't:** Replace the table with a blank state or move focus without telling the reader why.
|
|
114
|
+
|
|
115
|
+
## Give every table its filter bar
|
|
116
|
+
|
|
117
|
+
<!-- rule: filter-bar -->
|
|
118
|
+
|
|
119
|
+
**Why:** Readers narrow rows before reading them, and look for the bar where other tables put it.
|
|
120
|
+
|
|
121
|
+
**Rule:** Put a bar with a search field and column filters directly above every table.
|
|
122
|
+
|
|
123
|
+
**Do:** Search, then a status filter, on the row above the table.
|
|
124
|
+
|
|
125
|
+
**Don't:** Leave rows that the reader cannot narrow.
|
|
126
|
+
|
|
127
|
+
**Except:** Two tables take no bar: one that compares a document line by line, where a filter hides lines the reviewer must check, and a chart's Table view, which holds only the chart's points.
|
|
@@ -48,6 +48,6 @@
|
|
|
48
48
|
|
|
49
49
|
**Do:** Lead with the extracted fields, in the wider column, with each value heavier than its label, and put the accent on the pane's own name.
|
|
50
50
|
|
|
51
|
-
**Don't:** Give the
|
|
51
|
+
**Don't:** Give the document preview the leading, wider pane, or let a control inside it hold the only accent on the screen while the saved values hold none.
|
|
52
52
|
|
|
53
53
|
**Except:** Fade nothing to make a block quieter; a quieter block is smaller, later or uncoloured, never muted.
|
package/guidelines/going-back.md
CHANGED
|
@@ -40,17 +40,17 @@
|
|
|
40
40
|
|
|
41
41
|
**Except:** After search or another record, still link to the parent; browser Back returns to the previous location.
|
|
42
42
|
|
|
43
|
-
##
|
|
43
|
+
## Skip the trail
|
|
44
44
|
|
|
45
45
|
<!-- rule: one-or-the-other -->
|
|
46
46
|
|
|
47
|
-
**Rule:** Put one back link
|
|
47
|
+
**Rule:** Put one back link, to the parent, above a subpage’s title.
|
|
48
48
|
|
|
49
|
-
**Why:**
|
|
49
|
+
**Why:** The sidebar already shows the section, so a trail names the same place again.
|
|
50
50
|
|
|
51
|
-
**Do:**
|
|
51
|
+
**Do:** Link Invoices above an invoice.
|
|
52
52
|
|
|
53
|
-
**Don't:**
|
|
53
|
+
**Don't:** Stack a link for each level, such as Finance then Invoices.
|
|
54
54
|
|
|
55
55
|
## Keep the section active
|
|
56
56
|
|
package/guidelines/the-page.md
CHANGED
package/package.json
CHANGED
package/react/README.md
CHANGED
|
@@ -311,7 +311,7 @@ now compare against the working tree rather than the last published release.
|
|
|
311
311
|
|
|
312
312
|
### Table appearance
|
|
313
313
|
|
|
314
|
-
`DataTable` takes the vanilla table hooks as props. `zebra`, `hover` (on unless `false`),
|
|
314
|
+
`DataTable` takes the vanilla table hooks as props. `zebra`, `hover` (on unless `false`),
|
|
315
315
|
`density`, `stickyHeader` and `pinnedIdentity` set the table modifiers. `rowState={(row) => 'target' | 'dead' | undefined}`
|
|
316
316
|
marks a row, `footer` takes totals rows, and `caption` names the table for assistive technology. A column takes
|
|
317
317
|
`rowHeader` and `cell` (`'title' | 'code' | 'long' | 'strong' | 'act'`). A `dead` row is muted, so put the word
|
|
@@ -319,7 +319,7 @@ that names its state in one of its cells.
|
|
|
319
319
|
|
|
320
320
|
```tsx
|
|
321
321
|
<DataTable columns={columns} rows={rows} selectable={false} pager={false}
|
|
322
|
-
density="dense" zebra
|
|
322
|
+
density="dense" zebra rowState={(r) => (r.id === landedOn ? 'target' : undefined)} />
|
|
323
323
|
```
|
|
324
324
|
|
|
325
325
|
### Tables with another presentation of the same rows
|
|
@@ -1004,7 +1004,7 @@ avatar mark, the reader's name and address, the rows in `items` and Sign out. Bo
|
|
|
1004
1004
|
kit's `Dropdown`, so they share its keyboard and placement. `current` marks one account page in
|
|
1005
1005
|
accent ink and defaults to `prefs`.
|
|
1006
1006
|
|
|
1007
|
-
## NavTabs
|
|
1007
|
+
## NavTabs
|
|
1008
1008
|
|
|
1009
1009
|
`NavTabs` renders route links with the kit’s underline or pill presentation. Pass
|
|
1010
1010
|
unique item IDs and set `active` to the current route’s ID. The current link has
|
|
@@ -1017,11 +1017,6 @@ badges accept text, numbers (including zero), or `{ text, tone }`.
|
|
|
1017
1017
|
{ id: 'payouts', label: 'Payouts', href: '/payouts', badge: 3 },
|
|
1018
1018
|
{ id: 'exports', label: 'Exports', disabled: true },
|
|
1019
1019
|
]} />
|
|
1020
|
-
<Breadcrumbs items={[
|
|
1021
|
-
{ label: 'Finance', href: '/finance' },
|
|
1022
|
-
{ label: 'Payouts', href: '/payouts' },
|
|
1023
|
-
{ label: 'PY-4821' },
|
|
1024
|
-
]} />
|
|
1025
1020
|
```
|
|
1026
1021
|
|
|
1027
1022
|
Use `Tabs` for panels within a page. `NavTabs` keeps normal link keyboard behavior.
|
|
@@ -1029,7 +1024,7 @@ An omitted `href` falls back to `#` plus the item ID. `variant="pill"` selects t
|
|
|
1029
1024
|
existing pill styles. A badge of `null` renders no badge, so a count that is not in
|
|
1030
1025
|
yet costs nothing to pass.
|
|
1031
1026
|
|
|
1032
|
-
|
|
1027
|
+
`NavTabs` takes `renderLink`, the prop `AppShell` already uses, so a router
|
|
1033
1028
|
handles the navigation instead of the browser reloading the document:
|
|
1034
1029
|
|
|
1035
1030
|
```tsx
|
|
@@ -1039,18 +1034,14 @@ handles the navigation instead of the browser reloading the document:
|
|
|
1039
1034
|
)} />
|
|
1040
1035
|
```
|
|
1041
1036
|
|
|
1042
|
-
Without it
|
|
1037
|
+
Without it, it renders a plain `<a>`. The kit's class, destination, current state
|
|
1043
1038
|
and children all arrive in `linkProps`, so pass them through rather than rebuilding
|
|
1044
1039
|
them.
|
|
1045
1040
|
|
|
1046
|
-
`
|
|
1047
|
-
`href`; the final item is always current-page text. Items accept a decorative kit
|
|
1048
|
-
`icon` name. Both components accept native navigation attributes and a forwarded
|
|
1049
|
-
root ref. Use `aria-label` to distinguish navigation landmarks. Link items accept
|
|
1041
|
+
`NavTabs` accepts native navigation attributes and a forwarded root ref. Use `aria-label` to distinguish navigation landmarks. Link items accept
|
|
1050
1042
|
`target`. Script, data, and VBScript destinations fall back to `#`.
|
|
1051
1043
|
|
|
1052
|
-
Tab rows scroll within their container when the links do not fit
|
|
1053
|
-
trail wraps instead. A row whose links do fit scrolls nothing and clips nothing, so
|
|
1044
|
+
Tab rows scroll within their container when the links do not fit. A row whose links do fit scrolls nothing and clips nothing, so
|
|
1054
1045
|
a focus ring in it keeps its complete band. The current route is revealed after
|
|
1055
1046
|
mounting and route changes. Content and container changes update the fit state
|
|
1056
1047
|
without revealing the route again, so they preserve the reader's scroll position
|
package/react/dist/index.css
CHANGED
|
@@ -282,6 +282,127 @@
|
|
|
282
282
|
flex: none;
|
|
283
283
|
}
|
|
284
284
|
|
|
285
|
+
/* src/AccountWindow.css */
|
|
286
|
+
.rx-modal.rx-account {
|
|
287
|
+
width: min(calc(var(--container) - var(--space-12) * 2), 96vw);
|
|
288
|
+
height: min(76vh, calc(100vh - var(--space-16)));
|
|
289
|
+
height: min(76dvh, calc(100dvh - var(--space-16)));
|
|
290
|
+
max-height: none;
|
|
291
|
+
flex-direction: row;
|
|
292
|
+
}
|
|
293
|
+
.rx-account__rail {
|
|
294
|
+
flex: none;
|
|
295
|
+
display: flex;
|
|
296
|
+
flex-direction: column;
|
|
297
|
+
gap: var(--space-4);
|
|
298
|
+
margin: var(--space-2);
|
|
299
|
+
padding: var(--space-5) var(--space-3);
|
|
300
|
+
border-radius: var(--radius-lg);
|
|
301
|
+
overflow-y: auto;
|
|
302
|
+
background: var(--bg);
|
|
303
|
+
}
|
|
304
|
+
.rx-account__rail:focus-visible {
|
|
305
|
+
outline: var(--ring-scroll);
|
|
306
|
+
outline-offset: var(--ring-scroll-offset);
|
|
307
|
+
}
|
|
308
|
+
.rx-account__who {
|
|
309
|
+
display: flex;
|
|
310
|
+
align-items: center;
|
|
311
|
+
gap: var(--space-3);
|
|
312
|
+
min-width: 0;
|
|
313
|
+
padding: 0 var(--space-3);
|
|
314
|
+
}
|
|
315
|
+
.rx-account__who > .ui-app__who {
|
|
316
|
+
flex: 1 1 auto;
|
|
317
|
+
}
|
|
318
|
+
.rx-account__av {
|
|
319
|
+
display: grid;
|
|
320
|
+
flex: none;
|
|
321
|
+
}
|
|
322
|
+
.rx-account__av > .ui-avatar {
|
|
323
|
+
--ui-avatar-size: var(--space-10);
|
|
324
|
+
}
|
|
325
|
+
.rx-account .ui-nav__item.is-active {
|
|
326
|
+
color: var(--accent);
|
|
327
|
+
}
|
|
328
|
+
.rx-account__pane {
|
|
329
|
+
flex: 1 1 auto;
|
|
330
|
+
min-width: 0;
|
|
331
|
+
display: flex;
|
|
332
|
+
flex-direction: column;
|
|
333
|
+
}
|
|
334
|
+
.rx-account__head {
|
|
335
|
+
border-bottom: 0;
|
|
336
|
+
padding: var(--space-5) var(--space-5) var(--space-2) var(--space-8);
|
|
337
|
+
}
|
|
338
|
+
.rx-account__title {
|
|
339
|
+
margin: 0;
|
|
340
|
+
font-size: var(--text-lg);
|
|
341
|
+
font-weight: var(--weight-semibold);
|
|
342
|
+
line-height: var(--leading-snug);
|
|
343
|
+
font-family: var(--font-sans);
|
|
344
|
+
color: var(--strong);
|
|
345
|
+
}
|
|
346
|
+
.rx-account__body {
|
|
347
|
+
flex: 1 1 auto;
|
|
348
|
+
padding: var(--space-4) var(--space-8) var(--space-8);
|
|
349
|
+
}
|
|
350
|
+
.rx-account__tabs,
|
|
351
|
+
.rx-account__who > .ui-btn {
|
|
352
|
+
display: none;
|
|
353
|
+
}
|
|
354
|
+
.rx-account__tabs {
|
|
355
|
+
--ui-tabs-ground: var(--bg);
|
|
356
|
+
}
|
|
357
|
+
.rx-account__tabs .ui-nav__tab {
|
|
358
|
+
border: 0;
|
|
359
|
+
background: none;
|
|
360
|
+
font-family: inherit;
|
|
361
|
+
cursor: pointer;
|
|
362
|
+
}
|
|
363
|
+
.rx-account__who > .ui-btn {
|
|
364
|
+
width: calc(var(--space-10) + var(--space-1));
|
|
365
|
+
height: calc(var(--space-10) + var(--space-1));
|
|
366
|
+
flex: none;
|
|
367
|
+
}
|
|
368
|
+
@media (max-width: 560px) {
|
|
369
|
+
.rx-modal.rx-account {
|
|
370
|
+
width: 100vw;
|
|
371
|
+
height: 100vh;
|
|
372
|
+
height: 100dvh;
|
|
373
|
+
border-radius: 0;
|
|
374
|
+
flex-direction: column;
|
|
375
|
+
}
|
|
376
|
+
.rx-account__rail {
|
|
377
|
+
overflow: visible;
|
|
378
|
+
padding: var(--space-4) var(--space-3);
|
|
379
|
+
gap: var(--space-2);
|
|
380
|
+
}
|
|
381
|
+
.rx-account__av > .ui-avatar {
|
|
382
|
+
--ui-avatar-size: var(--space-8);
|
|
383
|
+
}
|
|
384
|
+
.rx-account__who {
|
|
385
|
+
padding: 0 0 0 var(--space-3);
|
|
386
|
+
}
|
|
387
|
+
.rx-account__side,
|
|
388
|
+
.rx-account__head > .ui-btn {
|
|
389
|
+
display: none;
|
|
390
|
+
}
|
|
391
|
+
.rx-account__tabs,
|
|
392
|
+
.rx-account__who > .ui-btn {
|
|
393
|
+
display: flex;
|
|
394
|
+
}
|
|
395
|
+
.rx-account__pane {
|
|
396
|
+
min-height: 0;
|
|
397
|
+
}
|
|
398
|
+
.rx-account__head {
|
|
399
|
+
padding: var(--space-4) var(--space-4) 0;
|
|
400
|
+
}
|
|
401
|
+
.rx-account__body {
|
|
402
|
+
padding: var(--space-4);
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
|
|
285
406
|
/* src/DataTable.css */
|
|
286
407
|
.rx-sortable {
|
|
287
408
|
user-select: none;
|
package/react/dist/index.d.ts
CHANGED
|
@@ -208,6 +208,32 @@ type ModalProps = {
|
|
|
208
208
|
};
|
|
209
209
|
declare function Modal({ open, title, onClose, footer, children, initialFocusRef, role }: ModalProps): react.ReactPortal | null;
|
|
210
210
|
|
|
211
|
+
type AccountSection = {
|
|
212
|
+
id: string;
|
|
213
|
+
label: string;
|
|
214
|
+
icon?: string;
|
|
215
|
+
content: ReactNode;
|
|
216
|
+
};
|
|
217
|
+
type AccountReader = {
|
|
218
|
+
name: string;
|
|
219
|
+
email: string;
|
|
220
|
+
personKey?: string | number;
|
|
221
|
+
avatarSrc?: string;
|
|
222
|
+
};
|
|
223
|
+
type AccountWindowProps = {
|
|
224
|
+
open: boolean;
|
|
225
|
+
onClose: () => void;
|
|
226
|
+
reader: AccountReader;
|
|
227
|
+
sections: AccountSection[];
|
|
228
|
+
/** The open section. Leave it out and the window keeps its own, from `defaultSection`. */
|
|
229
|
+
section?: string;
|
|
230
|
+
defaultSection?: string;
|
|
231
|
+
onSectionChange?: (id: string) => void;
|
|
232
|
+
/** The dialog's name. The section title is its heading. */
|
|
233
|
+
label?: string;
|
|
234
|
+
};
|
|
235
|
+
declare function AccountWindow({ open, onClose, reader, sections, section, defaultSection, onSectionChange, label, }: AccountWindowProps): react.ReactPortal | null;
|
|
236
|
+
|
|
211
237
|
type DrawerProps = {
|
|
212
238
|
open: boolean;
|
|
213
239
|
title: string;
|
|
@@ -286,7 +312,7 @@ type Column<T> = {
|
|
|
286
312
|
linked?: boolean;
|
|
287
313
|
/** Renders this column's body cells as row headers (`th scope="row"`), as the kit's compact table does. */
|
|
288
314
|
rowHeader?: boolean;
|
|
289
|
-
/** `title` gives the column the remaining width, `code` sets a handle or id in the table's small text, `long` is running text that
|
|
315
|
+
/** `title` gives the column the remaining width, `code` sets a handle or id in the table's small text, `long` is running text that wraps in a column wide enough to read, `strong` bolds a figure, `act` right-aligns a row action. */
|
|
290
316
|
cell?: 'title' | 'code' | 'long' | 'strong' | 'act';
|
|
291
317
|
};
|
|
292
318
|
type TableSort<T> = {
|
|
@@ -323,9 +349,10 @@ type PagerProps = {
|
|
|
323
349
|
type DataTableProps<T> = {
|
|
324
350
|
columns: Column<T>[];
|
|
325
351
|
rows: T[];
|
|
326
|
-
/** The kit's `--zebra
|
|
352
|
+
/** The kit's `--zebra` and `--hover` (on unless `false`) hooks. */
|
|
327
353
|
zebra?: boolean;
|
|
328
354
|
hover?: boolean;
|
|
355
|
+
/** @deprecated Ignored. A table no longer stacks its rows on a phone. It scrolls sideways in its frame. The prop stays only so existing calls compile. */
|
|
329
356
|
stack?: boolean;
|
|
330
357
|
/** Marks a row the reader landed on (`target`) or a revoked one (`dead`). A dead row is muted, so put the word that names its state in one of its cells. */
|
|
331
358
|
rowState?: (row: T) => 'target' | 'dead' | undefined;
|
|
@@ -362,7 +389,7 @@ type DataTableProps<T> = {
|
|
|
362
389
|
declare function sortTableRows<T>(rows: T[], sort: TableSort<T>): T[];
|
|
363
390
|
declare function DataTable<T extends {
|
|
364
391
|
name: string;
|
|
365
|
-
}>({ columns, rows, zebra, hover,
|
|
392
|
+
}>({ columns, rows, zebra, hover, rowState, footer, caption, dense, density, stickyHeader, pinnedIdentity, scrollLabel, empty, pageSize, pageSizes, onPageSizeChange, pager, pagerLabel, loading, selectable, selected, onToggle, onTogglePage, sort: controlledSort, onSortChange, page: controlledPage, onPageChange, total, hasMore, }: DataTableProps<T>): react.JSX.Element;
|
|
366
393
|
|
|
367
394
|
type PaginationProps = {
|
|
368
395
|
page?: number;
|
|
@@ -894,29 +921,19 @@ type ToastProps = {
|
|
|
894
921
|
declare function useToast(): (notice: ToastNotice) => void;
|
|
895
922
|
declare function Toast({ children, collapse }: ToastProps): react.JSX.Element;
|
|
896
923
|
|
|
897
|
-
type BreadcrumbItem = {
|
|
898
|
-
label: string;
|
|
899
|
-
href?: string;
|
|
900
|
-
target?: string;
|
|
901
|
-
icon?: string;
|
|
902
|
-
};
|
|
903
|
-
type BreadcrumbsProps = Omit<ComponentPropsWithoutRef<'nav'>, 'children'> & {
|
|
904
|
-
items: readonly BreadcrumbItem[];
|
|
905
|
-
/** Spread linkProps onto the router link, including children. */
|
|
906
|
-
renderLink?: (item: BreadcrumbItem, linkProps: ComponentPropsWithoutRef<'a'>) => ReactNode;
|
|
907
|
-
};
|
|
908
|
-
declare const Breadcrumbs: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLElement>, HTMLElement>, "ref">, "children"> & {
|
|
909
|
-
items: readonly BreadcrumbItem[];
|
|
910
|
-
/** Spread linkProps onto the router link, including children. */
|
|
911
|
-
renderLink?: (item: BreadcrumbItem, linkProps: ComponentPropsWithoutRef<"a">) => ReactNode;
|
|
912
|
-
} & react.RefAttributes<HTMLElement>>;
|
|
913
|
-
|
|
914
924
|
type AppShellSection = {
|
|
915
925
|
href: string;
|
|
916
926
|
label: string;
|
|
917
927
|
icon: string;
|
|
918
928
|
count?: number;
|
|
919
929
|
};
|
|
930
|
+
/** A product's own row in the account menu, such as Account settings or Support (#736). */
|
|
931
|
+
type AppShellAccountItem = {
|
|
932
|
+
label: string;
|
|
933
|
+
icon?: string;
|
|
934
|
+
href?: string;
|
|
935
|
+
onSelect?: () => void;
|
|
936
|
+
};
|
|
920
937
|
type AppShellProps = {
|
|
921
938
|
sections: AppShellSection[];
|
|
922
939
|
/** The vanilla rail layout, or the existing band layout. */
|
|
@@ -933,9 +950,11 @@ type AppShellProps = {
|
|
|
933
950
|
href: string;
|
|
934
951
|
label: string;
|
|
935
952
|
};
|
|
936
|
-
crumbs?: readonly BreadcrumbItem[];
|
|
937
953
|
lede?: string;
|
|
938
954
|
actions?: ReactNode;
|
|
955
|
+
/** Small tools for the whole page, at the end of the title row: a version badge, a
|
|
956
|
+
* small button. The lede stands under the whole row (#736). */
|
|
957
|
+
tools?: ReactNode;
|
|
939
958
|
bandControl?: ReactNode;
|
|
940
959
|
/** One glyph control in the sidebar head, before the fold button, drawn as the fold is.
|
|
941
960
|
* On a phone it stands in the menu panel's head. Topbar layout only (#732). */
|
|
@@ -949,6 +968,8 @@ type AppShellProps = {
|
|
|
949
968
|
name: string;
|
|
950
969
|
email: string;
|
|
951
970
|
};
|
|
971
|
+
/** Rows above the theme row and Sign out in every account menu (#736). */
|
|
972
|
+
accountItems?: readonly AppShellAccountItem[];
|
|
952
973
|
onSignOut: () => void;
|
|
953
974
|
/** Server-read fold preference. The browser restores the shared rail cookie. */
|
|
954
975
|
defaultCollapsed?: boolean;
|
|
@@ -956,7 +977,7 @@ type AppShellProps = {
|
|
|
956
977
|
/** Spread linkProps onto the router link, including children and onClick. */
|
|
957
978
|
renderLink?: (section: AppShellSection, linkProps: ComponentPropsWithoutRef<'a'>) => ReactNode;
|
|
958
979
|
};
|
|
959
|
-
declare function AppShell({ sections, pathname, title, children, word, brand, layout, brandHref, width, back,
|
|
980
|
+
declare function AppShell({ sections, pathname, title, children, word, brand, layout, brandHref, width, back, lede, actions, tools, bandControl, headControl, account, accountItems, onSignOut, searchLabel, defaultCollapsed, palette, renderLink }: AppShellProps): react.JSX.Element;
|
|
960
981
|
|
|
961
982
|
type AuthShellProps = Omit<HTMLAttributes<HTMLDivElement>, 'children'> & {
|
|
962
983
|
brand: ReactNode;
|
|
@@ -1380,4 +1401,4 @@ declare const NavTabs: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedH
|
|
|
1380
1401
|
declare const PAGE_SIZES: readonly number[];
|
|
1381
1402
|
declare const DEFAULT_PAGE_SIZE: number;
|
|
1382
1403
|
|
|
1383
|
-
export { type Accent, AccentPicker, type AccentPickerProps, AccountMenu, type AccountMenuProps, type AddFilter, AppShell, type AppShellProps, type AppShellSection, AuthShell, type AuthShellProps, Avatar, type AvatarProps, BackLink, type BackLinkOwnProps, type BackLinkProps, Badge,
|
|
1404
|
+
export { type Accent, AccentPicker, type AccentPickerProps, AccountMenu, type AccountMenuProps, type AccountReader, type AccountSection, AccountWindow, type AccountWindowProps, type AddFilter, AppShell, type AppShellProps, type AppShellSection, AuthShell, type AuthShellProps, Avatar, type AvatarProps, BackLink, type BackLinkOwnProps, type BackLinkProps, Badge, BusyRegion, type BusyRegionProps, Button, type ButtonLinkProps, type ButtonProps, Callout, type CalloutProps, type CalloutVariant, Card, Chart, type ChartAreaLook, type ChartBridgeStep, type ChartBridgeTones, type ChartDonutLook, type ChartLineLook, type ChartLookSeries, type ChartPeriod, type ChartProps, type ChartSeries, type ChartSlice, type ChartStackedLook, type ChartTone, CheckList, type CheckListProps, Checkbox, type CheckboxProps, type Column, type CommandGroup, type CommandItem, CommandPalette, type CommandPaletteProps, Confirm, type ConfirmProps, DEFAULT_PAGE_SIZE, DataTable, type DataTableProps, DatePicker, type DatePickerMode, type DatePickerPreset, type DatePickerProps, type DatePickerRange, DeltaValue, type DeltaValueProps, Denied, type DeniedProps, Drawer, type DrawerProps, DrawerSection, type DrawerSectionProps, Dropdown, type DropdownAvatar, type DropdownBadge, type DropdownEntry, type DropdownItem, type DropdownProps, type DropdownRowProps, type DropdownSearch, type DropdownSection, type DropdownSeparator, EmptyState, type EmptyStateProps, type EmptyStateVariant, Feedback, type FeedbackPayload, type FeedbackProps, type FeedbackResult, type FeedbackSection, Field, type FieldControlProps, type FieldProps, FileDrop, type FileDropFile, type FileDropProps, type FileDropStatus, FileField, type FileFieldProps, type Filter, FilterBar, type FilterBarProps, Footer, type FooterColumn, type FooterLink, type FooterProps, type FooterSocial, Icon, KeyValueList, type KeyValueListProps, type KeyValueRow, Modal, type ModalProps, type NativeButtonProps, type NavTabBadge, type NavTabItem, NavTabs, type NavTabsProps, NumericValue, type NumericValueProps, PAGE_SIZES, Pagination, type PaginationProps, Pill, type PillProps, RowIdentity, type RowIdentityProps, SearchField, type SearchFieldProps, type SegmentOption, Segmented, type SegmentedProps, SelectField, type SelectFieldProps, SidebarNav, type SidebarNavBadge, type SidebarNavItem, type SidebarNavLeaf, type SidebarNavProps, type SidebarNavSection, Skeleton, type SkeletonProps, SkeletonTable, type SkeletonTableProps, Snippet, type SnippetProps, StatBand, type StatBandProps, type StatDelta, type StatFigure, type StatTone, type StatVariant, StatusDot, type StatusDotProps, Success, SuccessCheck, type SuccessCheckProps, type SuccessCountdown, SuccessPanel, type SuccessPanelProps, type SuccessProps, Switch, type SwitchProps, THEME_INIT_SCRIPT, type TabItem, type TableSort, Tabs, type TabsProps, TextArea, type TextAreaProps, TextField, type TextFieldProps, ThemeToggle, type ThemeToggleProps, Timeline, type TimelineEvent, type TimelineEventKind, type TimelineProps, Toast, type ToastNotice, type ToastProps, Tooltip, type TooltipProps, TopBar, type TopBarProps, type Version, VersionSwitcher, type VersionSwitcherProps, ViewSwitch, type ViewSwitchItem, type ViewSwitchProps, sortTableRows, useToast };
|