@slotted/react 0.1.0-beta.42 → 0.1.0-beta.43
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/dist/{app-shell-D54YkU7E.js → app-shell-DsWhsSMU.js} +3 -2
- package/dist/app-shell.js +1 -1
- package/dist/attachment-TZykYNu5.js +300 -0
- package/dist/attachment.js +2 -2
- package/dist/{avatar-group-bJaZE1_C.js → avatar-group-Bzmmj2HI.js} +2 -1
- package/dist/avatar-group.js +1 -1
- package/dist/{carousel-B9nMK7Yf.js → carousel-CRNz-T3g.js} +1 -1
- package/dist/carousel.js +1 -1
- package/dist/{command-palette-C90CzfQi.js → command-palette-Bgf5tfCI.js} +160 -156
- package/dist/command-palette.js +1 -1
- package/dist/{data-grid-D106baPp.js → data-grid-DUft3rJb.js} +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/{data-list-BA0xrySM.js → data-list-Dv3orBtf.js} +15 -15
- package/dist/data-list.js +1 -1
- package/dist/detail-panel-Cke3ZFU3.js +342 -0
- package/dist/detail-panel.js +2 -2
- package/dist/docs/action-bar.examples.md +768 -0
- package/dist/docs/action-bar.json +74 -50
- package/dist/docs/action-bar.md +49 -311
- package/dist/docs/app-shell.examples.md +1221 -64
- package/dist/docs/app-shell.json +92 -60
- package/dist/docs/app-shell.md +92 -57
- package/dist/docs/attachment.examples.md +689 -0
- package/dist/docs/attachment.json +69 -37
- package/dist/docs/attachment.md +44 -203
- package/dist/docs/avatar-group.json +111 -23
- package/dist/docs/avatar-group.md +487 -28
- package/dist/docs/button-group.json +98 -2
- package/dist/docs/button-group.md +411 -8
- package/dist/docs/calendar.examples.md +512 -0
- package/dist/docs/calendar.json +72 -24
- package/dist/docs/calendar.md +18 -147
- package/dist/docs/carousel.examples.md +868 -0
- package/dist/docs/carousel.json +58 -50
- package/dist/docs/carousel.md +66 -300
- package/dist/docs/cascader.examples.md +1269 -0
- package/dist/docs/cascader.json +72 -16
- package/dist/docs/cascader.md +78 -154
- package/dist/docs/chart.examples.md +734 -24
- package/dist/docs/chart.json +93 -13
- package/dist/docs/chart.md +28 -7
- package/dist/docs/clock.json +71 -15
- package/dist/docs/clock.md +326 -21
- package/dist/docs/code-block.json +79 -55
- package/dist/docs/code-block.md +417 -74
- package/dist/docs/color-picker.json +60 -12
- package/dist/docs/color-picker.md +245 -22
- package/dist/docs/column-manager.examples.md +764 -0
- package/dist/docs/column-manager.json +68 -12
- package/dist/docs/column-manager.md +44 -203
- package/dist/docs/command-palette.examples.md +747 -0
- package/dist/docs/command-palette.json +48 -24
- package/dist/docs/command-palette.md +60 -339
- package/dist/docs/currency-field.examples.md +355 -73
- package/dist/docs/currency-field.json +96 -64
- package/dist/docs/currency-field.md +57 -50
- package/dist/docs/dashboard-grid.examples.md +629 -0
- package/dist/docs/dashboard-grid.json +64 -16
- package/dist/docs/dashboard-grid.md +34 -152
- package/dist/docs/data-list.examples.md +1556 -0
- package/dist/docs/data-list.json +58 -18
- package/dist/docs/data-list.md +139 -224
- package/dist/docs/date-field.examples.md +543 -0
- package/dist/docs/date-field.json +64 -24
- package/dist/docs/date-field.md +22 -168
- package/dist/docs/datetime-field.examples.md +699 -0
- package/dist/docs/datetime-field.json +79 -31
- package/dist/docs/datetime-field.md +24 -269
- package/dist/docs/datetime-range-picker.examples.md +682 -0
- package/dist/docs/datetime-range-picker.json +117 -61
- package/dist/docs/datetime-range-picker.md +59 -224
- package/dist/docs/description-list.examples.md +652 -0
- package/dist/docs/description-list.json +49 -25
- package/dist/docs/description-list.md +33 -188
- package/dist/docs/detail-panel.examples.md +1177 -0
- package/dist/docs/detail-panel.json +69 -53
- package/dist/docs/detail-panel.md +114 -324
- package/dist/docs/entity-picker.examples.md +1037 -0
- package/dist/docs/entity-picker.json +66 -18
- package/dist/docs/entity-picker.md +56 -246
- package/dist/docs/event-calendar.examples.md +749 -49
- package/dist/docs/event-calendar.json +46 -22
- package/dist/docs/event-calendar.md +81 -11
- package/dist/docs/field-group.examples.md +554 -0
- package/dist/docs/field-group.json +98 -34
- package/dist/docs/field-group.md +55 -133
- package/dist/docs/filter-bar.examples.md +772 -0
- package/dist/docs/filter-bar.json +41 -25
- package/dist/docs/filter-bar.md +42 -246
- package/dist/docs/form.examples.md +579 -0
- package/dist/docs/form.json +87 -39
- package/dist/docs/form.md +53 -177
- package/dist/docs/fullscreen.examples.md +558 -0
- package/dist/docs/fullscreen.json +58 -18
- package/dist/docs/fullscreen.md +50 -169
- package/dist/docs/highlight.json +57 -25
- package/dist/docs/highlight.md +402 -50
- package/dist/docs/icon.json +85 -5
- package/dist/docs/icon.md +401 -10
- package/dist/docs/image.examples.md +670 -0
- package/dist/docs/image.json +44 -28
- package/dist/docs/image.md +24 -176
- package/dist/docs/import-export-center.examples.md +1280 -0
- package/dist/docs/import-export-center.json +67 -27
- package/dist/docs/import-export-center.md +121 -226
- package/dist/docs/list-item.examples.md +769 -0
- package/dist/docs/list-item.json +110 -38
- package/dist/docs/list-item.md +84 -201
- package/dist/docs/listbox.examples.md +858 -0
- package/dist/docs/listbox.json +76 -28
- package/dist/docs/listbox.md +41 -263
- package/dist/docs/markdown.json +79 -55
- package/dist/docs/markdown.md +581 -85
- package/dist/docs/media-viewer.examples.md +1038 -0
- package/dist/docs/media-viewer.json +70 -15
- package/dist/docs/media-viewer.md +84 -135
- package/dist/docs/message-scroller.examples.md +1193 -0
- package/dist/docs/message-scroller.json +41 -17
- package/dist/docs/message-scroller.md +80 -134
- package/dist/docs/message.examples.md +944 -0
- package/dist/docs/message.json +64 -16
- package/dist/docs/message.md +34 -326
- package/dist/docs/meter.json +58 -26
- package/dist/docs/meter.md +312 -32
- package/dist/docs/navigation-menu.examples.md +1107 -0
- package/dist/docs/navigation-menu.json +57 -41
- package/dist/docs/navigation-menu.md +105 -298
- package/dist/docs/notification-center.examples.md +1045 -0
- package/dist/docs/notification-center.json +71 -15
- package/dist/docs/notification-center.md +76 -266
- package/dist/docs/otp-input.examples.md +490 -0
- package/dist/docs/otp-input.json +65 -25
- package/dist/docs/otp-input.md +20 -191
- package/dist/docs/page-header.examples.md +1041 -0
- package/dist/docs/page-header.json +75 -43
- package/dist/docs/page-header.md +79 -291
- package/dist/docs/page.examples.md +633 -0
- package/dist/docs/page.json +48 -16
- package/dist/docs/page.md +62 -129
- package/dist/docs/prompt-composer.examples.md +630 -0
- package/dist/docs/prompt-composer.json +66 -18
- package/dist/docs/prompt-composer.md +35 -161
- package/dist/docs/prose.json +69 -37
- package/dist/docs/prose.md +393 -75
- package/dist/docs/rating.examples.md +525 -0
- package/dist/docs/rating.json +92 -28
- package/dist/docs/rating.md +27 -241
- package/dist/docs/saved-views.examples.md +1108 -0
- package/dist/docs/saved-views.json +53 -21
- package/dist/docs/saved-views.md +86 -171
- package/dist/docs/scroll-area.examples.md +837 -0
- package/dist/docs/scroll-area.json +64 -24
- package/dist/docs/scroll-area.md +57 -140
- package/dist/docs/section.examples.md +676 -0
- package/dist/docs/section.json +68 -20
- package/dist/docs/section.md +39 -162
- package/dist/docs/segmented-control.examples.md +480 -0
- package/dist/docs/segmented-control.json +76 -28
- package/dist/docs/segmented-control.md +20 -191
- package/dist/docs/side-navigation.examples.md +1468 -0
- package/dist/docs/side-navigation.json +53 -53
- package/dist/docs/side-navigation.md +79 -354
- package/dist/docs/slider.examples.md +505 -0
- package/dist/docs/slider.json +91 -51
- package/dist/docs/slider.md +47 -212
- package/dist/docs/sparkline.json +60 -36
- package/dist/docs/sparkline.md +447 -71
- package/dist/docs/split-button.examples.md +509 -0
- package/dist/docs/split-button.json +73 -41
- package/dist/docs/split-button.md +64 -194
- package/dist/docs/splitter.examples.md +921 -0
- package/dist/docs/splitter.json +94 -46
- package/dist/docs/splitter.md +75 -182
- package/dist/docs/stat-card.examples.md +725 -0
- package/dist/docs/stat-card.json +89 -41
- package/dist/docs/stat-card.md +55 -227
- package/dist/docs/status-indicator.json +80 -32
- package/dist/docs/status-indicator.md +409 -65
- package/dist/docs/stepper.json +53 -21
- package/dist/docs/stepper.md +369 -48
- package/dist/docs/table-of-contents.examples.md +550 -0
- package/dist/docs/table-of-contents.json +60 -28
- package/dist/docs/table-of-contents.md +70 -205
- package/dist/docs/tags-input.examples.md +541 -0
- package/dist/docs/tags-input.json +64 -16
- package/dist/docs/tags-input.md +15 -262
- package/dist/docs/time-field.examples.md +587 -0
- package/dist/docs/time-field.json +69 -29
- package/dist/docs/time-field.md +21 -223
- package/dist/docs/time-picker.json +117 -53
- package/dist/docs/time-picker.md +499 -54
- package/dist/docs/time-range-picker.examples.md +750 -0
- package/dist/docs/time-range-picker.json +139 -75
- package/dist/docs/time-range-picker.md +63 -225
- package/dist/docs/timeline.examples.md +617 -0
- package/dist/docs/timeline.json +44 -28
- package/dist/docs/timeline.md +34 -208
- package/dist/docs/toolbar.json +56 -16
- package/dist/docs/toolbar.md +357 -63
- package/dist/docs/top-navigation.examples.md +1206 -140
- package/dist/docs/top-navigation.json +49 -33
- package/dist/docs/top-navigation.md +87 -36
- package/dist/docs/tour.examples.md +960 -0
- package/dist/docs/tour.json +57 -25
- package/dist/docs/tour.md +60 -244
- package/dist/docs/transfer.examples.md +631 -0
- package/dist/docs/transfer.json +80 -16
- package/dist/docs/transfer.md +41 -170
- package/dist/docs/typography.json +96 -0
- package/dist/docs/typography.md +352 -4
- package/dist/docs/upload.examples.md +555 -53
- package/dist/docs/upload.json +62 -30
- package/dist/docs/upload.md +46 -11
- package/dist/docs/wizard.examples.md +1389 -0
- package/dist/docs/wizard.json +89 -49
- package/dist/docs/wizard.md +122 -263
- package/dist/{entity-picker-CC4VoC3p.js → entity-picker-C78f3Z0o.js} +9 -6
- package/dist/entity-picker.js +1 -1
- package/dist/{event-calendar-CjmF_e0H.js → event-calendar-DJPoCi-O.js} +1 -1
- package/dist/event-calendar.js +1 -1
- package/dist/{filter-bar-B3QJD7SZ.js → filter-bar-D61wiQFP.js} +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/{import-export-center-CW8YVZev.js → import-export-center-mqvmlzwB.js} +44 -36
- package/dist/import-export-center.js +1 -1
- package/dist/index.js +58 -58
- package/dist/{markdown-BdskE4-L.js → markdown-8CtV4k44.js} +2 -2
- package/dist/markdown.js +1 -1
- package/dist/{media-viewer-zEXcwfEY.js → media-viewer-C_cbuAq-.js} +64 -60
- package/dist/media-viewer.js +2 -2
- package/dist/message-P91bEGyV.js +455 -0
- package/dist/message.js +2 -2
- package/dist/{page-header-DmwBGwlm.js → page-header-jeAIQSZM.js} +103 -108
- package/dist/page-header.js +1 -1
- package/dist/section-CVTQdWBl.js +216 -0
- package/dist/section.js +2 -2
- package/dist/{segmented-control-CbK7SurB.js → segmented-control-BSMVjukr.js} +1 -1
- package/dist/segmented-control.js +1 -1
- package/dist/{side-navigation-CKRETc8E.js → side-navigation-BQzBxz2B.js} +179 -179
- package/dist/side-navigation.js +1 -1
- package/dist/{stat-card-CL3Xe6pV.js → stat-card-BpGZiFbG.js} +12 -14
- package/dist/stat-card.js +1 -1
- package/dist/{stepper-DHdrANZI.js → stepper-Cxb_tHnA.js} +130 -127
- package/dist/stepper.js +2 -2
- package/dist/styles/carousel.css +1 -1
- package/dist/styles/index.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/{timeline-BiL2CXfn.js → timeline-ZngK6zLC.js} +9 -6
- package/dist/timeline.js +1 -1
- package/dist/top-navigation-YSEQzBhD.js +744 -0
- package/dist/top-navigation.js +2 -2
- package/dist/{transfer-sKUvmEKe.js → transfer-Cv5yQuTN.js} +1 -1
- package/dist/transfer.js +1 -1
- package/dist/types/attachment/attachment-parts.d.ts +24 -11
- package/dist/types/attachment/attachment-parts.d.ts.map +1 -1
- package/dist/types/attachment/attachment.d.ts +3 -3
- package/dist/types/attachment/attachment.d.ts.map +1 -1
- package/dist/types/avatar-group/avatar-group.d.ts.map +1 -1
- package/dist/types/carousel/carousel-parts.d.ts +2 -2
- package/dist/types/command-palette/command-palette.d.ts.map +1 -1
- package/dist/types/data-list/data-list.d.ts.map +1 -1
- package/dist/types/detail-panel/detail-panel-parts.d.ts +10 -3
- package/dist/types/detail-panel/detail-panel-parts.d.ts.map +1 -1
- package/dist/types/detail-panel/detail-panel.d.ts.map +1 -1
- package/dist/types/detail-panel/detail-panel.types.d.ts +7 -0
- package/dist/types/detail-panel/detail-panel.types.d.ts.map +1 -1
- package/dist/types/entity-picker/entity-picker.d.ts.map +1 -1
- package/dist/types/import-export-center/import-export-center.d.ts.map +1 -1
- package/dist/types/media-viewer/index.d.ts +2 -2
- package/dist/types/media-viewer/index.d.ts.map +1 -1
- package/dist/types/media-viewer/media-viewer-bar.d.ts +3 -1
- package/dist/types/media-viewer/media-viewer-bar.d.ts.map +1 -1
- package/dist/types/media-viewer/media-viewer.types.d.ts +1 -0
- package/dist/types/media-viewer/media-viewer.types.d.ts.map +1 -1
- package/dist/types/message/message-parts.d.ts +7 -0
- package/dist/types/message/message-parts.d.ts.map +1 -1
- package/dist/types/message/message.d.ts.map +1 -1
- package/dist/types/page-header/page-header-parts.d.ts.map +1 -1
- package/dist/types/section/section-parts.d.ts +16 -8
- package/dist/types/section/section-parts.d.ts.map +1 -1
- package/dist/types/section/section.d.ts.map +1 -1
- package/dist/types/segmented-control/segmented-control-parts.d.ts.map +1 -1
- package/dist/types/side-navigation/side-navigation-parts.d.ts.map +1 -1
- package/dist/types/stat-card/stat-card-delta.d.ts.map +1 -1
- package/dist/types/stat-card/stat-card-parts.d.ts +3 -3
- package/dist/types/stat-card/stat-card-parts.d.ts.map +1 -1
- package/dist/types/stepper/stepper-parts.d.ts +11 -2
- package/dist/types/stepper/stepper-parts.d.ts.map +1 -1
- package/dist/types/stepper/stepper.d.ts.map +1 -1
- package/dist/types/timeline/timeline-parts.d.ts.map +1 -1
- package/dist/types/top-navigation/top-navigation.d.ts.map +1 -1
- package/dist/{wizard-4c0X7Bx_.js → wizard-Dfryz1id.js} +214 -214
- package/dist/wizard.js +1 -1
- package/package.json +6 -6
- package/dist/attachment-MqczA38F.js +0 -292
- package/dist/detail-panel-EImAtksY.js +0 -327
- package/dist/message-D1Dd6Y2k.js +0 -452
- package/dist/section-D_qOfdxR.js +0 -213
- package/dist/top-navigation-D8IHPOmm.js +0 -744
|
@@ -14,9 +14,11 @@ import { SideNavigation, SideNavigationActions, SideNavigationCount, SideNavigat
|
|
|
14
14
|
Example
|
|
15
15
|
|
|
16
16
|
```tsx
|
|
17
|
+
import { Glyph, Icon } from '@slotted/react/icon';
|
|
17
18
|
import {
|
|
18
19
|
SideNavigation,
|
|
19
20
|
SideNavigationCount,
|
|
21
|
+
SideNavigationIcon,
|
|
20
22
|
SideNavigationItem,
|
|
21
23
|
SideNavigationLabel,
|
|
22
24
|
SideNavigationLink,
|
|
@@ -25,17 +27,58 @@ import {
|
|
|
25
27
|
|
|
26
28
|
export default function SideNavigationBasic() {
|
|
27
29
|
return (
|
|
28
|
-
<SideNavigation
|
|
30
|
+
<SideNavigation defaultValue="orders">
|
|
29
31
|
<SideNavigationList>
|
|
30
|
-
<SideNavigationItem value="
|
|
31
|
-
<SideNavigationLink href="
|
|
32
|
-
<
|
|
32
|
+
<SideNavigationItem value="overview">
|
|
33
|
+
<SideNavigationLink href="#overview">
|
|
34
|
+
<SideNavigationIcon>
|
|
35
|
+
<Icon>
|
|
36
|
+
<Glyph name="trending-up" />
|
|
37
|
+
</Icon>
|
|
38
|
+
</SideNavigationIcon>
|
|
39
|
+
<SideNavigationLabel>Overview</SideNavigationLabel>
|
|
33
40
|
</SideNavigationLink>
|
|
34
41
|
</SideNavigationItem>
|
|
35
|
-
<SideNavigationItem value="
|
|
36
|
-
<SideNavigationLink href="
|
|
37
|
-
<
|
|
38
|
-
|
|
42
|
+
<SideNavigationItem value="orders">
|
|
43
|
+
<SideNavigationLink href="#orders">
|
|
44
|
+
<SideNavigationIcon>
|
|
45
|
+
<Icon>
|
|
46
|
+
<Glyph name="inbox" />
|
|
47
|
+
</Icon>
|
|
48
|
+
</SideNavigationIcon>
|
|
49
|
+
<SideNavigationLabel>Orders</SideNavigationLabel>
|
|
50
|
+
<SideNavigationCount>128</SideNavigationCount>
|
|
51
|
+
</SideNavigationLink>
|
|
52
|
+
</SideNavigationItem>
|
|
53
|
+
<SideNavigationItem value="returns">
|
|
54
|
+
<SideNavigationLink href="#returns">
|
|
55
|
+
<SideNavigationIcon>
|
|
56
|
+
<Icon>
|
|
57
|
+
<Glyph name="rotate-ccw" />
|
|
58
|
+
</Icon>
|
|
59
|
+
</SideNavigationIcon>
|
|
60
|
+
<SideNavigationLabel>Returns</SideNavigationLabel>
|
|
61
|
+
<SideNavigationCount>7</SideNavigationCount>
|
|
62
|
+
</SideNavigationLink>
|
|
63
|
+
</SideNavigationItem>
|
|
64
|
+
<SideNavigationItem value="customers">
|
|
65
|
+
<SideNavigationLink href="#customers">
|
|
66
|
+
<SideNavigationIcon>
|
|
67
|
+
<Icon>
|
|
68
|
+
<Glyph name="person" />
|
|
69
|
+
</Icon>
|
|
70
|
+
</SideNavigationIcon>
|
|
71
|
+
<SideNavigationLabel>Customers</SideNavigationLabel>
|
|
72
|
+
</SideNavigationLink>
|
|
73
|
+
</SideNavigationItem>
|
|
74
|
+
<SideNavigationItem value="reports">
|
|
75
|
+
<SideNavigationLink href="#reports">
|
|
76
|
+
<SideNavigationIcon>
|
|
77
|
+
<Icon>
|
|
78
|
+
<Glyph name="file-spreadsheet" />
|
|
79
|
+
</Icon>
|
|
80
|
+
</SideNavigationIcon>
|
|
81
|
+
<SideNavigationLabel>Reports</SideNavigationLabel>
|
|
39
82
|
</SideNavigationLink>
|
|
40
83
|
</SideNavigationItem>
|
|
41
84
|
</SideNavigationList>
|
|
@@ -71,32 +114,32 @@ export default function SideNavigationBasic() {
|
|
|
71
114
|
|
|
72
115
|
| Name | Type | Default | Applies to | Description |
|
|
73
116
|
| --- | --- | --- | --- | --- |
|
|
74
|
-
| `value` | `string \| null` | — | SideNavigation | The current destination’s value. Present means the consumer owns it; a link that states current itself still wins |
|
|
75
|
-
| `defaultValue` | `string \| null` | — | SideNavigation | The destination an uncontrolled column starts on, read once |
|
|
76
|
-
| `expanded` | `readonly string[]` | — | SideNavigation | The set of open groups. Present means the consumer owns it |
|
|
77
|
-
| `defaultExpanded` | `readonly string[]` | — | SideNavigation | The groups an uncontrolled column starts with open, read once |
|
|
78
|
-
| `flyout` | `string \| null` | — | SideNavigation | The one group presented beside the rail. Present means the consumer owns it; it never writes into expanded |
|
|
79
|
-
| `defaultFlyout` | `string \| null` | — | SideNavigation | The group an uncontrolled column starts with in the flyout, read once |
|
|
80
|
-
| `size` | `'sm' \| 'md' \| 'lg'` | md | SideNavigation, SideNavigationDefaultsProvider | The row height. md reads the geometry app-shell publishes, with the control scale as the fallback; sm and lg read their own steps |
|
|
81
|
-
| `mode` | `'auto' \| 'expanded' \| 'compact'` | auto | SideNavigation, SideNavigationDefaultsProvider | auto is a rail below compactAt pixels of the root’s own width and a labelled column above; the other two force one |
|
|
82
|
-
| `truncate` | `'end' \| 'middle' \| 'none'` | end | SideNavigation, SideNavigationDefaultsProvider | Where a label that does not fit is cut. end is the stylesheet’s ellipsis; middle keeps the start and the tail; none wraps. A cut label opens the tooltip with the whole text |
|
|
83
|
-
| `multiple` | `boolean` | true | SideNavigation, SideNavigationDefaultsProvider | Whether more than one group may be open at once. Off, opening one closes the rest |
|
|
84
|
-
| `autoExpand` | `boolean` | true | SideNavigation, SideNavigationDefaultsProvider | Whether the ancestors of the current destination open by themselves, with the reason select |
|
|
85
|
-
| `guides` | `boolean` | true | SideNavigation, SideNavigationDefaultsProvider | Whether a guide runs down each open group, under the parent’s mark or on its text edge |
|
|
86
|
-
| `landmark` | `boolean` | true | SideNavigation, SideNavigationDefaultsProvider | Whether the root is a nav. Unstated, it is one on its own and a div inside app-shell, whose nav region is already the landmark |
|
|
87
|
-
| `compactAt` | `number` | 96 | SideNavigation, SideNavigationDefaultsProvider | The width, in CSS pixels, under which mode="auto" is compact. The stylesheet’s own breakpoint is the same number |
|
|
88
|
-
| `messages` | `Partial<SideNavigationMessages>` | — | SideNavigation | Words laid over the language in force: the landmark’s name when the consumer gives no aria-label (navigation) |
|
|
89
|
-
| `value` | `string` | — | SideNavigationItem | The item’s identity: what value, expanded and flyout name it by. Reaches the DOM as data-value |
|
|
90
|
-
| `disabled` | `boolean` | false | SideNavigationItem | The row refuses the press and keeps its href, its name and its place in the tab order; the trigger takes the native attribute |
|
|
91
|
-
| `current` | `boolean` | — | SideNavigationLink | Stated on the row itself — what a router’s link writes — it wins over the root’s value |
|
|
92
|
-
| `current` | `boolean` | — | SideNavigationTrigger | A trigger that is the whole row is a destination too: its item is current when the root’s value names it, and a stated current wins over the value. It writes aria-current="page" on the trigger |
|
|
93
|
-
| `href` | `string` | — | SideNavigationLink | The destination. Without one the row is a button: a command in the column, never current |
|
|
94
|
-
| `labelSize` | `number \| string` | 60% | SideNavigationSkeleton | How wide the label’s bar is drawn |
|
|
95
|
-
| `render` | `(props) => ReactNode` | — | every part but indicator, skeleton and flyout | Substitutes the element and hands it every attribute: a router’s link as the row, a button for a command, a section as an aside |
|
|
96
|
-
| `ref` | `Ref<SideNavigationHandle> on the root, Ref<HTMLElement> on every part` | — | every part | The root’s handle carries focus(), expand(value), collapse(value) and the root element; every other ref reaches the element itself |
|
|
97
|
-
| `useSideNavigation()` | `() => SideNavigationContextValue` | — | inside SideNavigation | What the parts read: the axes, whether the column is compact, the three values and the requests that move them |
|
|
98
|
-
| `useSideNavigationItem()` | `() => SideNavigationItemContextValue` | — | inside SideNavigationItem | What a row reads: its value, whether it is expanded, current or holds the current destination, its identifiers |
|
|
99
|
-
| `SideNavigationDefaultsProvider` | `{ size, mode, truncate, multiple, autoExpand, guides, landmark, compactAt }` | — | a subtree | The decisions an application takes once. A column that states any of them itself still wins |
|
|
117
|
+
| `value` | `string \| null` | — | SideNavigation | The current destination’s value. Present means the consumer owns it; a link that states current itself still wins. |
|
|
118
|
+
| `defaultValue` | `string \| null` | — | SideNavigation | The destination an uncontrolled column starts on, read once. |
|
|
119
|
+
| `expanded` | `readonly string[]` | — | SideNavigation | The set of open groups. Present means the consumer owns it. |
|
|
120
|
+
| `defaultExpanded` | `readonly string[]` | — | SideNavigation | The groups an uncontrolled column starts with open, read once. |
|
|
121
|
+
| `flyout` | `string \| null` | — | SideNavigation | The one group presented beside the rail. Present means the consumer owns it; it never writes into expanded. |
|
|
122
|
+
| `defaultFlyout` | `string \| null` | — | SideNavigation | The group an uncontrolled column starts with in the flyout, read once. |
|
|
123
|
+
| `size` | `'sm' \| 'md' \| 'lg'` | md | SideNavigation, SideNavigationDefaultsProvider | The row height. md reads the geometry app-shell publishes, with the control scale as the fallback; sm and lg read their own steps. |
|
|
124
|
+
| `mode` | `'auto' \| 'expanded' \| 'compact'` | auto | SideNavigation, SideNavigationDefaultsProvider | auto is a rail below compactAt pixels of the root’s own width and a labelled column above; the other two force one. |
|
|
125
|
+
| `truncate` | `'end' \| 'middle' \| 'none'` | end | SideNavigation, SideNavigationDefaultsProvider | Where a label that does not fit is cut. end is the stylesheet’s ellipsis; middle keeps the start and the tail; none wraps. A cut label opens the tooltip with the whole text. |
|
|
126
|
+
| `multiple` | `boolean` | true | SideNavigation, SideNavigationDefaultsProvider | Whether more than one group may be open at once. Off, opening one closes the rest. |
|
|
127
|
+
| `autoExpand` | `boolean` | true | SideNavigation, SideNavigationDefaultsProvider | Whether the ancestors of the current destination open by themselves, with the reason select. |
|
|
128
|
+
| `guides` | `boolean` | true | SideNavigation, SideNavigationDefaultsProvider | Whether a guide runs down each open group, under the parent’s mark or on its text edge. |
|
|
129
|
+
| `landmark` | `boolean` | true | SideNavigation, SideNavigationDefaultsProvider | Whether the root is a nav. Unstated, it is one on its own and a div inside app-shell, whose nav region is already the landmark. |
|
|
130
|
+
| `compactAt` | `number` | 96 | SideNavigation, SideNavigationDefaultsProvider | The width, in CSS pixels, under which mode="auto" is compact. The stylesheet’s own breakpoint is the same number. |
|
|
131
|
+
| `messages` | `Partial<SideNavigationMessages>` | — | SideNavigation | Words laid over the language in force: the landmark’s name when the consumer gives no aria-label (navigation). |
|
|
132
|
+
| `value` | `string` | — | SideNavigationItem | The item’s identity: what value, expanded and flyout name it by. Reaches the DOM as data-value. |
|
|
133
|
+
| `disabled` | `boolean` | false | SideNavigationItem | The row refuses the press and keeps its href, its name and its place in the tab order; the trigger takes the native attribute. |
|
|
134
|
+
| `current` | `boolean` | — | SideNavigationLink | Stated on the row itself — what a router’s link writes — it wins over the root’s value. |
|
|
135
|
+
| `current` | `boolean` | — | SideNavigationTrigger | A trigger that is the whole row is a destination too: its item is current when the root’s value names it, and a stated current wins over the value. It writes aria-current="page" on the trigger. |
|
|
136
|
+
| `href` | `string` | — | SideNavigationLink | The destination. Without one the row is a button: a command in the column, never current. |
|
|
137
|
+
| `labelSize` | `number \| string` | 60% | SideNavigationSkeleton | How wide the label’s bar is drawn. |
|
|
138
|
+
| `render` | `(props) => ReactNode` | — | every part but indicator, skeleton and flyout | Substitutes the element and hands it every attribute: a router’s link as the row, a button for a command, a section as an aside. |
|
|
139
|
+
| `ref` | `Ref<SideNavigationHandle> on the root, Ref<HTMLElement> on every part` | — | every part | The root’s handle carries focus(), expand(value), collapse(value) and the root element; every other ref reaches the element itself. |
|
|
140
|
+
| `useSideNavigation()` | `() => SideNavigationContextValue` | — | inside SideNavigation | What the parts read: the axes, whether the column is compact, the three values and the requests that move them. |
|
|
141
|
+
| `useSideNavigationItem()` | `() => SideNavigationItemContextValue` | — | inside SideNavigationItem | What a row reads: its value, whether it is expanded, current or holds the current destination, its identifiers. |
|
|
142
|
+
| `SideNavigationDefaultsProvider` | `{ size, mode, truncate, multiple, autoExpand, guides, landmark, compactAt }` | — | a subtree | The decisions an application takes once. A column that states any of them itself still wins. |
|
|
100
143
|
|
|
101
144
|
## Events
|
|
102
145
|
|
|
@@ -105,7 +148,7 @@ export default function SideNavigationBasic() {
|
|
|
105
148
|
| `onValueChange(value, request)` | `the destination’s value, and a request with previous, reason (pointer \| keyboard \| programmatic), source and cancel()` | Before the current destination moves, on a press of a link with an href. Cancelling refuses; the navigation itself is the anchor’s. |
|
|
106
149
|
| `onExpandedChange(expanded, request)` | `the whole set of open values, and a request with reason (pointer \| keyboard \| select \| escape \| programmatic)` | Before a group opens or closes: a press on its trigger, Escape inside it, autoExpand reaching the current destination (select), or expand()/collapse() on the handle. |
|
|
107
150
|
| `onFlyoutChange(flyout, request)` | `the value of the group shown beside the rail or null, and a request with reason (pointer \| keyboard \| select \| escape \| outsidePress \| blur \| resize \| programmatic)` | Before the flyout opens or closes: a trigger pressed in the rail, a link pressed inside it, Escape, a press outside, focus leaving it, or the rail widening. |
|
|
108
|
-
| `onClick, onFocus, onKeyDown on every row` | `the element’s own events` | Whenever the a or button fires them. The consumer’s handler runs first, and preventDefault() in onClick refuses
|
|
151
|
+
| `onClick, onFocus, onKeyDown on every row` | `the element’s own events` | Whenever the a or button fires them. The consumer’s handler runs first, and preventDefault() in onClick refuses SideNavigation’s own handling. |
|
|
109
152
|
|
|
110
153
|
## Axes and defaults
|
|
111
154
|
|
|
@@ -135,322 +178,4 @@ export default function SideNavigationBasic() {
|
|
|
135
178
|
|
|
136
179
|
## Examples
|
|
137
180
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
One column with every axis on it, driven by the controls below the canvas. Tab reaches every row; the arrows walk them.
|
|
141
|
-
|
|
142
|
-
Excerpt — not a complete module
|
|
143
|
-
|
|
144
|
-
```tsx
|
|
145
|
-
<SideNavigation defaultValue="loads">
|
|
146
|
-
<SideNavigationList>
|
|
147
|
-
<SideNavigationItem value="dashboard">
|
|
148
|
-
<SideNavigationLink href="/dashboard">
|
|
149
|
-
<SideNavigationIcon>
|
|
150
|
-
<ChartNoAxesColumn />
|
|
151
|
-
</SideNavigationIcon>
|
|
152
|
-
<SideNavigationLabel>Dashboard</SideNavigationLabel>
|
|
153
|
-
</SideNavigationLink>
|
|
154
|
-
</SideNavigationItem>
|
|
155
|
-
<SideNavigationItem value="loads">
|
|
156
|
-
<SideNavigationLink href="/loads">
|
|
157
|
-
<SideNavigationIcon>
|
|
158
|
-
<Package />
|
|
159
|
-
</SideNavigationIcon>
|
|
160
|
-
<SideNavigationLabel>Loads</SideNavigationLabel>
|
|
161
|
-
<SideNavigationCount>12</SideNavigationCount>
|
|
162
|
-
</SideNavigationLink>
|
|
163
|
-
</SideNavigationItem>
|
|
164
|
-
</SideNavigationList>
|
|
165
|
-
</SideNavigation>;
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
### Every part, drawn as its own name
|
|
169
|
-
|
|
170
|
-
The frame with no product in it: each part the contract declares, labelled, so the family’s box can be told from the product’s content.
|
|
171
|
-
|
|
172
|
-
Excerpt — not a complete module
|
|
173
|
-
|
|
174
|
-
```tsx
|
|
175
|
-
<SideNavigation>
|
|
176
|
-
<SideNavigationSection>
|
|
177
|
-
<SideNavigationSectionLabel>section-label</SideNavigationSectionLabel>
|
|
178
|
-
<SideNavigationList>
|
|
179
|
-
<SideNavigationItem value="row">
|
|
180
|
-
<SideNavigationLink href="/row">
|
|
181
|
-
<SideNavigationIcon>…</SideNavigationIcon>
|
|
182
|
-
<SideNavigationLabel>label</SideNavigationLabel>
|
|
183
|
-
<SideNavigationDescription>description</SideNavigationDescription>
|
|
184
|
-
<SideNavigationCount>12</SideNavigationCount>
|
|
185
|
-
</SideNavigationLink>
|
|
186
|
-
<SideNavigationActions>…</SideNavigationActions>
|
|
187
|
-
</SideNavigationItem>
|
|
188
|
-
<SideNavigationItem value="branch">
|
|
189
|
-
<SideNavigationTrigger>
|
|
190
|
-
<SideNavigationLabel>trigger</SideNavigationLabel>
|
|
191
|
-
</SideNavigationTrigger>
|
|
192
|
-
<SideNavigationGroup>…</SideNavigationGroup>
|
|
193
|
-
</SideNavigationItem>
|
|
194
|
-
<SideNavigationDivider />
|
|
195
|
-
<SideNavigationSkeleton />
|
|
196
|
-
</SideNavigationList>
|
|
197
|
-
</SideNavigationSection>
|
|
198
|
-
</SideNavigation>;
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
### Groups that open and close
|
|
202
|
-
|
|
203
|
-
A trigger is the whole row and its group opens on a track that grows to its own height; the chevron turns from along the line to down. Under multiple=false the sibling closes.
|
|
204
|
-
|
|
205
|
-
Excerpt — not a complete module
|
|
206
|
-
|
|
207
|
-
```tsx
|
|
208
|
-
<SideNavigationItem value="deliveries">
|
|
209
|
-
<SideNavigationTrigger>
|
|
210
|
-
<SideNavigationIcon>
|
|
211
|
-
<Truck />
|
|
212
|
-
</SideNavigationIcon>
|
|
213
|
-
<SideNavigationLabel>Deliveries</SideNavigationLabel>
|
|
214
|
-
<SideNavigationCount>38</SideNavigationCount>
|
|
215
|
-
</SideNavigationTrigger>
|
|
216
|
-
<SideNavigationGroup>
|
|
217
|
-
<SideNavigationItem value="today">
|
|
218
|
-
<SideNavigationLink href="/deliveries/today">
|
|
219
|
-
<SideNavigationLabel>Today</SideNavigationLabel>
|
|
220
|
-
</SideNavigationLink>
|
|
221
|
-
</SideNavigationItem>
|
|
222
|
-
</SideNavigationGroup>
|
|
223
|
-
</SideNavigationItem>;
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
### A destination that is also a parent
|
|
227
|
-
|
|
228
|
-
The APG hybrid row: the link navigates and a mark-only trigger beside it opens the children, named by the row’s label. Five levels deep, the indent below the marked level is a constant step.
|
|
229
|
-
|
|
230
|
-
Excerpt — not a complete module
|
|
231
|
-
|
|
232
|
-
```tsx
|
|
233
|
-
<SideNavigationItem value="reports">
|
|
234
|
-
<SideNavigationLink href="/reports">
|
|
235
|
-
<SideNavigationIcon>
|
|
236
|
-
<ChartNoAxesColumn />
|
|
237
|
-
</SideNavigationIcon>
|
|
238
|
-
<SideNavigationLabel>Reports</SideNavigationLabel>
|
|
239
|
-
</SideNavigationLink>
|
|
240
|
-
<SideNavigationTrigger />
|
|
241
|
-
<SideNavigationGroup>…</SideNavigationGroup>
|
|
242
|
-
</SideNavigationItem>;
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
### Sections, a divider and a command
|
|
246
|
-
|
|
247
|
-
Two titled sections under one root, a divider between rows that keeps the list a list, and a row that is a button — a command in the column, never current.
|
|
248
|
-
|
|
249
|
-
Excerpt — not a complete module
|
|
250
|
-
|
|
251
|
-
```tsx
|
|
252
|
-
<SideNavigation>
|
|
253
|
-
<SideNavigationSection>
|
|
254
|
-
<SideNavigationSectionLabel>Operations</SideNavigationSectionLabel>
|
|
255
|
-
<SideNavigationList>…</SideNavigationList>
|
|
256
|
-
</SideNavigationSection>
|
|
257
|
-
<SideNavigationSection>
|
|
258
|
-
<SideNavigationSectionLabel>Administration</SideNavigationSectionLabel>
|
|
259
|
-
<SideNavigationList>
|
|
260
|
-
<SideNavigationDivider />
|
|
261
|
-
<SideNavigationItem value="new">
|
|
262
|
-
<SideNavigationLink onClick={() => openDialog()}>
|
|
263
|
-
<SideNavigationIcon>
|
|
264
|
-
<Plus />
|
|
265
|
-
</SideNavigationIcon>
|
|
266
|
-
<SideNavigationLabel>New load</SideNavigationLabel>
|
|
267
|
-
</SideNavigationLink>
|
|
268
|
-
</SideNavigationItem>
|
|
269
|
-
</SideNavigationList>
|
|
270
|
-
</SideNavigationSection>
|
|
271
|
-
</SideNavigation>;
|
|
272
|
-
```
|
|
273
|
-
|
|
274
|
-
### Where the reader is
|
|
275
|
-
|
|
276
|
-
value on the root names the destination and a press asks it to move; a link that states current itself wins. The parent of a hidden destination is marked until its group opens, and autoExpand opens it. With a router, usePressSelection paints the press before the route renders: the item is current at once, and the navigation runs after the frame that shows it. A click carrying a modifier key is left to the browser.
|
|
277
|
-
|
|
278
|
-
Excerpt — not a complete module
|
|
279
|
-
|
|
280
|
-
```tsx
|
|
281
|
-
const { pathname } = useLocation();
|
|
282
|
-
const navigate = useNavigate();
|
|
283
|
-
const { selected, select } = usePressSelection(pathname);
|
|
284
|
-
|
|
285
|
-
const press = (to: string) => (event: MouseEvent) => {
|
|
286
|
-
if (event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) {
|
|
287
|
-
return;
|
|
288
|
-
}
|
|
289
|
-
event.preventDefault();
|
|
290
|
-
select(to, () => navigate(to));
|
|
291
|
-
};
|
|
292
|
-
|
|
293
|
-
<SideNavigation value={selected ?? null}>
|
|
294
|
-
…
|
|
295
|
-
<SideNavigationItem value="/orders">
|
|
296
|
-
<SideNavigationLink href="/orders" onClick={press('/orders')}>
|
|
297
|
-
Orders
|
|
298
|
-
</SideNavigationLink>
|
|
299
|
-
</SideNavigationItem>
|
|
300
|
-
</SideNavigation>;
|
|
301
|
-
```
|
|
302
|
-
|
|
303
|
-
### The rail
|
|
304
|
-
|
|
305
|
-
Under mode="compact" — or under 96 pixels of its own width — every part but the mark leaves the eye; the label stays in the DOM, a tooltip repeats it, and a row with a count carries a dot.
|
|
306
|
-
|
|
307
|
-
Excerpt — not a complete module
|
|
308
|
-
|
|
309
|
-
```tsx
|
|
310
|
-
<SideNavigation mode="compact" defaultValue="loads">
|
|
311
|
-
…
|
|
312
|
-
</SideNavigation>;
|
|
313
|
-
```
|
|
314
|
-
|
|
315
|
-
### A group beside the rail
|
|
316
|
-
|
|
317
|
-
In the rail, pressing a trigger without a link presents its group in a layer beside it. ArrowDown walks into it, Escape returns to the trigger, and focus leaving it closes it.
|
|
318
|
-
|
|
319
|
-
Excerpt — not a complete module
|
|
320
|
-
|
|
321
|
-
```tsx
|
|
322
|
-
const [flyout, setFlyout] = useState<string | null>(null);
|
|
323
|
-
|
|
324
|
-
<SideNavigation mode="compact" flyout={flyout} onFlyoutChange={setFlyout}>
|
|
325
|
-
…
|
|
326
|
-
</SideNavigation>;
|
|
327
|
-
```
|
|
328
|
-
|
|
329
|
-
### Three row heights
|
|
330
|
-
|
|
331
|
-
md reads the row geometry app-shell publishes, so a column in the shell stands on the shell’s own edges; sm and lg read the control scale, and all three move with density.
|
|
332
|
-
|
|
333
|
-
Excerpt — not a complete module
|
|
334
|
-
|
|
335
|
-
```tsx
|
|
336
|
-
<SideNavigation size="sm">…</SideNavigation>;
|
|
337
|
-
```
|
|
338
|
-
|
|
339
|
-
### The states a row can be in
|
|
340
|
-
|
|
341
|
-
Current, expanded, open, disabled, and the hover, press and focus every row answers. A disabled destination keeps its href and its name, and refuses the press.
|
|
342
|
-
|
|
343
|
-
Excerpt — not a complete module
|
|
344
|
-
|
|
345
|
-
```tsx
|
|
346
|
-
<SideNavigationItem disabled value="billing">
|
|
347
|
-
<SideNavigationLink href="/billing">
|
|
348
|
-
<SideNavigationIcon>
|
|
349
|
-
<CreditCard />
|
|
350
|
-
</SideNavigationIcon>
|
|
351
|
-
<SideNavigationLabel>Billing</SideNavigationLabel>
|
|
352
|
-
<SideNavigationDescription>Available on the Team plan</SideNavigationDescription>
|
|
353
|
-
</SideNavigationLink>
|
|
354
|
-
</SideNavigationItem>;
|
|
355
|
-
```
|
|
356
|
-
|
|
357
|
-
### Content the family did not choose
|
|
358
|
-
|
|
359
|
-
A long label cut at the end with its whole text in the tooltip; the same column cut in the middle, where setembro and outubro stay apart; a URL; a title in another script; and wrapping, on request.
|
|
360
|
-
|
|
361
|
-
Excerpt — not a complete module
|
|
362
|
-
|
|
363
|
-
```tsx
|
|
364
|
-
<SideNavigation truncate="middle">…</SideNavigation>;
|
|
365
|
-
```
|
|
366
|
-
|
|
367
|
-
### A column still arriving
|
|
368
|
-
|
|
369
|
-
Skeleton rows in the geometry of the rows they stand for, so nothing moves when the destinations land; the root carries aria-busy.
|
|
370
|
-
|
|
371
|
-
Excerpt — not a complete module
|
|
372
|
-
|
|
373
|
-
```tsx
|
|
374
|
-
<SideNavigation aria-busy="true">
|
|
375
|
-
<SideNavigationList>
|
|
376
|
-
<SideNavigationSkeleton labelSize="55%" />
|
|
377
|
-
<SideNavigationSkeleton labelSize="70%" />
|
|
378
|
-
<SideNavigationSkeleton labelSize="45%" />
|
|
379
|
-
</SideNavigationList>
|
|
380
|
-
</SideNavigation>;
|
|
381
|
-
```
|
|
382
|
-
|
|
383
|
-
### Inside the shell
|
|
384
|
-
|
|
385
|
-
The column in app-shell’s nav region: a div rather than a second landmark, rows on the shell’s published geometry, and the rail read from the region’s own width when the shell collapses.
|
|
386
|
-
|
|
387
|
-
Excerpt — not a complete module
|
|
388
|
-
|
|
389
|
-
```tsx
|
|
390
|
-
<AppShell>
|
|
391
|
-
<AppShellBanner>…</AppShellBanner>
|
|
392
|
-
<AppShellNav>
|
|
393
|
-
<AppShellNavBody>
|
|
394
|
-
<SideNavigation defaultValue="orders">…</SideNavigation>
|
|
395
|
-
</AppShellNavBody>
|
|
396
|
-
</AppShellNav>
|
|
397
|
-
<AppShellMain>…</AppShellMain>
|
|
398
|
-
</AppShell>;
|
|
399
|
-
```
|
|
400
|
-
|
|
401
|
-
### Decided once for an application
|
|
402
|
-
|
|
403
|
-
The provider carries the axes for every column under it — a product whose groups open one at a time, with no guides — and a column that states one itself still wins.
|
|
404
|
-
|
|
405
|
-
Excerpt — not a complete module
|
|
406
|
-
|
|
407
|
-
```tsx
|
|
408
|
-
<SideNavigationDefaultsProvider guides={false} multiple={false} truncate="middle">
|
|
409
|
-
<SideNavigation>…</SideNavigation>
|
|
410
|
-
</SideNavigationDefaultsProvider>;
|
|
411
|
-
```
|
|
412
|
-
|
|
413
|
-
### Composed with what sits beside it
|
|
414
|
-
|
|
415
|
-
A Badge in end for a count that carries a tone, an Avatar in icon for a person, a Kbd for a shortcut, and a router’s own link through render, which is where aria-current comes from.
|
|
416
|
-
|
|
417
|
-
Excerpt — not a complete module
|
|
418
|
-
|
|
419
|
-
```tsx
|
|
420
|
-
<SideNavigationLink render={(props) => <NavLink {...props} to="/loads" />}>
|
|
421
|
-
<SideNavigationIcon>
|
|
422
|
-
<Package />
|
|
423
|
-
</SideNavigationIcon>
|
|
424
|
-
<SideNavigationLabel>Loads</SideNavigationLabel>
|
|
425
|
-
<SideNavigationEnd>
|
|
426
|
-
<Badge tone="danger" size="sm">
|
|
427
|
-
3
|
|
428
|
-
</Badge>
|
|
429
|
-
</SideNavigationEnd>
|
|
430
|
-
</SideNavigationLink>;
|
|
431
|
-
```
|
|
432
|
-
|
|
433
|
-
### The keyboard
|
|
434
|
-
|
|
435
|
-
Tab reaches every row. ArrowDown and ArrowUp walk the visible rows, Home and End jump, Escape closes the group holding focus and lands on its trigger. The reason each request carries is shown.
|
|
436
|
-
|
|
437
|
-
Excerpt — not a complete module
|
|
438
|
-
|
|
439
|
-
```tsx
|
|
440
|
-
<SideNavigation
|
|
441
|
-
onExpandedChange={(expanded, request) => log(request.reason)}
|
|
442
|
-
onValueChange={(value, request) => log(request.reason)}
|
|
443
|
-
>
|
|
444
|
-
…
|
|
445
|
-
</SideNavigation>;
|
|
446
|
-
```
|
|
447
|
-
|
|
448
|
-
### What a reader hears
|
|
449
|
-
|
|
450
|
-
A navigation landmark holding a list; each branch a button with aria-expanded and aria-controls; each destination a link, one of them aria-current; a hybrid trigger named by its row.
|
|
451
|
-
|
|
452
|
-
Excerpt — not a complete module
|
|
453
|
-
|
|
454
|
-
```tsx
|
|
455
|
-
<SideNavigation aria-label="Main navigation">…</SideNavigation>;
|
|
456
|
-
```
|
|
181
|
+
See [side-navigation.examples.md](./side-navigation.examples.md).
|