@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
package/dist/docs/app-shell.json
CHANGED
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
"docs": {
|
|
149
149
|
"appShell": {
|
|
150
150
|
"imports": {
|
|
151
|
-
"source": "import {\n AppShell,\n AppShellActions,\n AppShellAside,\n AppShellAsideBody,\n AppShellAsideFooter,\n AppShellAsideHeader,\n AppShellAsideResizer,\n AppShellAsideToggle,\n AppShellBanner,\n AppShellBrand,\n AppShellCenter,\n AppShellDefaultsProvider,\n AppShellFooter,\n AppShellMain,\n AppShellNav,\n AppShellNavBody,\n AppShellNavFooter,\n AppShellNavHeader,\n AppShellNavRail,\n AppShellNavToggle,\n AppShellProgress,\n} from '@slotted/react';"
|
|
151
|
+
"source": "import {\n AppShell,\n AppShellActions,\n AppShellAside,\n AppShellAsideBody,\n AppShellAsideFooter,\n AppShellAsideHeader,\n AppShellAsideResizer,\n AppShellAsideToggle,\n AppShellBanner,\n AppShellBrand,\n AppShellCenter,\n AppShellDefaultsProvider,\n AppShellFooter,\n AppShellMain,\n AppShellNav,\n AppShellNavBody,\n AppShellNavFooter,\n AppShellNavHeader,\n AppShellNavPinned,\n AppShellNavRail,\n AppShellNavToggle,\n AppShellProgress,\n} from '@slotted/react/app-shell';"
|
|
152
152
|
},
|
|
153
153
|
"anatomy": [
|
|
154
154
|
{
|
|
@@ -179,7 +179,7 @@
|
|
|
179
179
|
"part": "center",
|
|
180
180
|
"element": "div",
|
|
181
181
|
"required": false,
|
|
182
|
-
"purpose": "The middle of the bar, and the one cluster that grows: a search field, a breadcrumb trail, the route title, tabs. Without it a bar is two clusters and a void
|
|
182
|
+
"purpose": "The middle of the bar, and the one cluster that grows: a search field, a breadcrumb trail, the route title, tabs. Without it a bar is two clusters and a void."
|
|
183
183
|
},
|
|
184
184
|
{
|
|
185
185
|
"part": "actions",
|
|
@@ -191,7 +191,7 @@
|
|
|
191
191
|
"part": "nav-toggle",
|
|
192
192
|
"element": "button, or the element render returns",
|
|
193
193
|
"required": false,
|
|
194
|
-
"purpose": "The disclosure control for the navigation region: aria-expanded, aria-controls and the
|
|
194
|
+
"purpose": "The disclosure control for the navigation region: aria-expanded, aria-controls and the shell’s own label, all taken from the shell’s context rather than from where it stands. Draws the panel-open or panel-close Glyph element by state, mirrored by navSide and by direction."
|
|
195
195
|
},
|
|
196
196
|
{
|
|
197
197
|
"part": "nav",
|
|
@@ -251,7 +251,7 @@
|
|
|
251
251
|
"part": "aside",
|
|
252
252
|
"element": "aside, or the element render returns",
|
|
253
253
|
"required": false,
|
|
254
|
-
"purpose": "The complementary landmark, carrying the
|
|
254
|
+
"purpose": "The complementary landmark, carrying the shell’s own label. It opens and closes the way the navigation does — a column beside the content or a layer over it, by asideMode — and carries its own data-open, because the root’s is the navigation’s. Closed, it leaves the layout: a pane has no rail."
|
|
255
255
|
},
|
|
256
256
|
{
|
|
257
257
|
"part": "aside-resizer",
|
|
@@ -314,182 +314,182 @@
|
|
|
314
314
|
"type": "boolean",
|
|
315
315
|
"defaultValue": "—",
|
|
316
316
|
"appliesTo": "AppShell",
|
|
317
|
-
"description": "The controlled value of the navigation region. Passing anything but undefined puts the shell in controlled mode for its lifetime, and it then reports and waits rather than moving itself"
|
|
317
|
+
"description": "The controlled value of the navigation region. Passing anything but undefined puts the shell in controlled mode for its lifetime, and it then reports and waits rather than moving itself."
|
|
318
318
|
},
|
|
319
319
|
{
|
|
320
320
|
"name": "defaultNavOpen",
|
|
321
321
|
"type": "boolean",
|
|
322
322
|
"defaultValue": "true",
|
|
323
323
|
"appliesTo": "AppShell",
|
|
324
|
-
"description": "The uncontrolled starting value, read once. A later change to it does not silently become new state"
|
|
324
|
+
"description": "The uncontrolled starting value, read once. A later change to it does not silently become new state."
|
|
325
325
|
},
|
|
326
326
|
{
|
|
327
327
|
"name": "asideOpen",
|
|
328
328
|
"type": "boolean",
|
|
329
329
|
"defaultValue": "—",
|
|
330
330
|
"appliesTo": "AppShell",
|
|
331
|
-
"description": "The controlled value of the secondary pane, under the same rule. A product that opens the pane on a selection passes the selection down as this"
|
|
331
|
+
"description": "The controlled value of the secondary pane, under the same rule. A product that opens the pane on a selection passes the selection down as this."
|
|
332
332
|
},
|
|
333
333
|
{
|
|
334
334
|
"name": "defaultAsideOpen",
|
|
335
335
|
"type": "boolean",
|
|
336
336
|
"defaultValue": "true",
|
|
337
337
|
"appliesTo": "AppShell",
|
|
338
|
-
"description": "The uncontrolled starting value of the pane. A product that projects a pane wants to see it, so the default is open"
|
|
338
|
+
"description": "The uncontrolled starting value of the pane. A product that projects a pane wants to see it, so the default is open."
|
|
339
339
|
},
|
|
340
340
|
{
|
|
341
341
|
"name": "asideExtent",
|
|
342
342
|
"type": "number | undefined",
|
|
343
343
|
"defaultValue": "—",
|
|
344
344
|
"appliesTo": "AppShell",
|
|
345
|
-
"description": "The controlled measure of the pane as a column, as a fraction of the shell’s inline size. Unset, asideSize decides. The pane writes it as --slotted-app-shell-aside-extent in cqi, which the stylesheet reads in the column alone: a layer keeps its step"
|
|
345
|
+
"description": "The controlled measure of the pane as a column, as a fraction of the shell’s inline size. Unset, asideSize decides. The pane writes it as --slotted-app-shell-aside-extent in cqi, which the stylesheet reads in the column alone: a layer keeps its step."
|
|
346
346
|
},
|
|
347
347
|
{
|
|
348
348
|
"name": "defaultAsideExtent",
|
|
349
349
|
"type": "number | undefined",
|
|
350
350
|
"defaultValue": "—",
|
|
351
351
|
"appliesTo": "AppShell",
|
|
352
|
-
"description": "The uncontrolled starting measure, read once. Unset, the pane starts on its asideSize step"
|
|
352
|
+
"description": "The uncontrolled starting measure, read once. Unset, the pane starts on its asideSize step."
|
|
353
353
|
},
|
|
354
354
|
{
|
|
355
355
|
"name": "minAsideExtent",
|
|
356
356
|
"type": "number",
|
|
357
357
|
"defaultValue": "0.16",
|
|
358
358
|
"appliesTo": "AppShell",
|
|
359
|
-
"description": "The smallest fraction of the shell the reader may give the pane, and Home’s target. aria-valuemin is this times a hundred"
|
|
359
|
+
"description": "The smallest fraction of the shell the reader may give the pane, and Home’s target. aria-valuemin is this times a hundred."
|
|
360
360
|
},
|
|
361
361
|
{
|
|
362
362
|
"name": "maxAsideExtent",
|
|
363
363
|
"type": "number",
|
|
364
364
|
"defaultValue": "0.6",
|
|
365
365
|
"appliesTo": "AppShell",
|
|
366
|
-
"description": "The largest fraction, and End’s target. aria-valuemax is this times a hundred"
|
|
366
|
+
"description": "The largest fraction, and End’s target. aria-valuemax is this times a hundred."
|
|
367
367
|
},
|
|
368
368
|
{
|
|
369
369
|
"name": "inset",
|
|
370
370
|
"type": "'none' | undefined",
|
|
371
371
|
"defaultValue": "—",
|
|
372
372
|
"appliesTo": "AppShellAsideBody",
|
|
373
|
-
"description": "none drops the body’s own padding, for content that brings its own inset. Written as data-inset"
|
|
373
|
+
"description": "none drops the body’s own padding, for content that brings its own inset. Written as data-inset."
|
|
374
374
|
},
|
|
375
375
|
{
|
|
376
376
|
"name": "primary",
|
|
377
377
|
"type": "'banner' | 'nav' | 'main'",
|
|
378
378
|
"defaultValue": "banner",
|
|
379
379
|
"appliesTo": "AppShell, AppShellDefaultsProvider",
|
|
380
|
-
"description": "Which region reaches the corner. Under nav the navigation spans every row and its head takes the banner’s height so the two marks sit on one line; under main it does too, and the banner stands inside the card that holds the content"
|
|
380
|
+
"description": "Which region reaches the corner. Under nav the navigation spans every row and its head takes the banner’s height so the two marks sit on one line; under main it does too, and the banner stands inside the card that holds the content."
|
|
381
381
|
},
|
|
382
382
|
{
|
|
383
383
|
"name": "canvas",
|
|
384
384
|
"type": "'inset' | 'flush' | 'floating' | 'panel'",
|
|
385
385
|
"defaultValue": "inset",
|
|
386
386
|
"appliesTo": "AppShell, AppShellDefaultsProvider",
|
|
387
|
-
"description": "The plane of every region at once. inset: content and pane as cards over a sunken frame. flush: every region edge to edge, seams drawn. floating: the column a card as well. panel: column, content and pane in one card, the bar and the footer on the frame"
|
|
387
|
+
"description": "The plane of every region at once. inset: content and pane as cards over a sunken frame. flush: every region edge to edge, seams drawn. floating: the column a card as well. panel: column, content and pane in one card, the bar and the footer on the frame."
|
|
388
388
|
},
|
|
389
389
|
{
|
|
390
390
|
"name": "navMode",
|
|
391
391
|
"type": "'inline' | 'overlay' | 'auto'",
|
|
392
392
|
"defaultValue": "auto",
|
|
393
393
|
"appliesTo": "AppShell, AppShellDefaultsProvider",
|
|
394
|
-
"description": "How the region occupies space. auto is inline at or above 600 pixels of the shell’s own inline size and overlay below it, answered in CSS for the layout and in script for the keyboard"
|
|
394
|
+
"description": "How the region occupies space. auto is inline at or above 600 pixels of the shell’s own inline size and overlay below it, answered in CSS for the layout and in script for the keyboard."
|
|
395
395
|
},
|
|
396
396
|
{
|
|
397
397
|
"name": "asideMode",
|
|
398
398
|
"type": "'inline' | 'overlay' | 'auto'",
|
|
399
399
|
"defaultValue": "auto",
|
|
400
400
|
"appliesTo": "AppShell, AppShellDefaultsProvider",
|
|
401
|
-
"description": "How the pane occupies space: the navigation’s pair, resolved on the same width. inline is a column beside the content, or a row under it when there is no room; overlay is a layer from the end the navigation is not on"
|
|
401
|
+
"description": "How the pane occupies space: the navigation’s pair, resolved on the same width. inline is a column beside the content, or a row under it when there is no room; overlay is a layer from the end the navigation is not on."
|
|
402
402
|
},
|
|
403
403
|
{
|
|
404
404
|
"name": "navSide",
|
|
405
405
|
"type": "'start' | 'end'",
|
|
406
406
|
"defaultValue": "start",
|
|
407
407
|
"appliesTo": "AppShell, AppShellDefaultsProvider",
|
|
408
|
-
"description": "Which end of the line the region sits at. Logical, so a right-to-left document mirrors the whole frame; the pane sits at the other end, and both controls turn their marks"
|
|
408
|
+
"description": "Which end of the line the region sits at. Logical, so a right-to-left document mirrors the whole frame; the pane sits at the other end, and both controls turn their marks."
|
|
409
409
|
},
|
|
410
410
|
{
|
|
411
411
|
"name": "navSize",
|
|
412
412
|
"type": "'sm' | 'md' | 'lg'",
|
|
413
413
|
"defaultValue": "md",
|
|
414
414
|
"appliesTo": "AppShell, AppShellDefaultsProvider",
|
|
415
|
-
"description": "The width of the open region, as a step on the
|
|
415
|
+
"description": "The width of the open region, as a step on the shell’s own scale. A theme retunes the step; nothing retunes a pixel string."
|
|
416
416
|
},
|
|
417
417
|
{
|
|
418
418
|
"name": "asideSize",
|
|
419
419
|
"type": "'sm' | 'md' | 'lg'",
|
|
420
420
|
"defaultValue": "md",
|
|
421
421
|
"appliesTo": "AppShell, AppShellDefaultsProvider",
|
|
422
|
-
"description": "The width of the secondary pane, on the same kind of scale"
|
|
422
|
+
"description": "The width of the secondary pane, on the same kind of scale."
|
|
423
423
|
},
|
|
424
424
|
{
|
|
425
425
|
"name": "collapsedTo",
|
|
426
426
|
"type": "'rail' | 'hidden'",
|
|
427
427
|
"defaultValue": "rail",
|
|
428
428
|
"appliesTo": "AppShell, AppShellDefaultsProvider",
|
|
429
|
-
"description": "What a closed inline navigation leaves behind. rail keeps a strip the width of a target and keeps the tab order; hidden takes the region out of both. A closed pane always leaves nothing: it has no marks to keep"
|
|
429
|
+
"description": "What a closed inline navigation leaves behind. rail keeps a strip the width of a target and keeps the tab order; hidden takes the region out of both. A closed pane always leaves nothing: it has no marks to keep."
|
|
430
430
|
},
|
|
431
431
|
{
|
|
432
432
|
"name": "scroll",
|
|
433
433
|
"type": "'content' | 'document'",
|
|
434
434
|
"defaultValue": "content",
|
|
435
435
|
"appliesTo": "AppShell, AppShellDefaultsProvider",
|
|
436
|
-
"description": "content makes the shell the height it was given, capped at 100dvh, and only the content column and the pane’s body scroll; document lets the shell grow and the banner travel with it"
|
|
436
|
+
"description": "content makes the shell the height it was given, capped at 100dvh, and only the content column and the pane’s body scroll; document lets the shell grow and the banner travel with it."
|
|
437
437
|
},
|
|
438
438
|
{
|
|
439
439
|
"name": "separation",
|
|
440
440
|
"type": "'rule' | 'tone'",
|
|
441
441
|
"defaultValue": "rule",
|
|
442
442
|
"appliesTo": "AppShell, AppShellDefaultsProvider",
|
|
443
|
-
"description": "What draws a seam where two regions touch without a gutter. rule is a line; tone is a ground of its own on the chrome regions, with the subtle tones inside them recomputed from it. Where a gutter separates, it draws nothing either way"
|
|
443
|
+
"description": "What draws a seam where two regions touch without a gutter. rule is a line; tone is a ground of its own on the chrome regions, with the subtle tones inside them recomputed from it. Where a gutter separates, it draws nothing either way."
|
|
444
444
|
},
|
|
445
445
|
{
|
|
446
446
|
"name": "modal",
|
|
447
447
|
"type": "boolean",
|
|
448
448
|
"defaultValue": "true",
|
|
449
449
|
"appliesTo": "AppShell, AppShellDefaultsProvider",
|
|
450
|
-
"description": "Whether an overlaid region contains focus and makes every other region inert. Only the overlaid modes read it, and it applies to whichever layer is open"
|
|
450
|
+
"description": "Whether an overlaid region contains focus and makes every other region inert. Only the overlaid modes read it, and it applies to whichever layer is open."
|
|
451
451
|
},
|
|
452
452
|
{
|
|
453
453
|
"name": "escape",
|
|
454
454
|
"type": "'close' | 'none'",
|
|
455
455
|
"defaultValue": "close",
|
|
456
456
|
"appliesTo": "AppShell, AppShellDefaultsProvider",
|
|
457
|
-
"description": "Whether Escape closes an overlaid region. Registered in the capture phase by @slotted/core/dismissable-layer, so a handler inside the panel runs after the layer has already asked"
|
|
457
|
+
"description": "Whether Escape closes an overlaid region. Registered in the capture phase by @slotted/core/dismissable-layer, so a handler inside the panel runs after the layer has already asked."
|
|
458
458
|
},
|
|
459
459
|
{
|
|
460
460
|
"name": "outsidePress",
|
|
461
461
|
"type": "'close' | 'none'",
|
|
462
462
|
"defaultValue": "close",
|
|
463
463
|
"appliesTo": "AppShell, AppShellDefaultsProvider",
|
|
464
|
-
"description": "Whether a press outside an overlaid panel closes it"
|
|
464
|
+
"description": "Whether a press outside an overlaid panel closes it."
|
|
465
465
|
},
|
|
466
466
|
{
|
|
467
467
|
"name": "back",
|
|
468
468
|
"type": "'close' | 'none'",
|
|
469
469
|
"defaultValue": "close",
|
|
470
470
|
"appliesTo": "AppShell, AppShellDefaultsProvider",
|
|
471
|
-
"description": "The platform's way back — a phone's gesture, a browser's button — closes the layer instead of leaving the page, while it is modal: @slotted/core/dismissable-layer holds one close watcher per modal layer where the browser has CloseWatcher, and one history entry elsewhere, and answers the way back with the reason back"
|
|
471
|
+
"description": "The platform's way back — a phone's gesture, a browser's button — closes the layer instead of leaving the page, while it is modal: @slotted/core/dismissable-layer holds one close watcher per modal layer where the browser has CloseWatcher, and one history entry elsewhere, and answers the way back with the reason back."
|
|
472
472
|
},
|
|
473
473
|
{
|
|
474
474
|
"name": "closeOnNavigate",
|
|
475
475
|
"type": "boolean",
|
|
476
476
|
"defaultValue": "true",
|
|
477
477
|
"appliesTo": "AppShell, AppShellDefaultsProvider",
|
|
478
|
-
"description": "Whether a click on an a[href] inside the overlaid navigation closes it, with the reason select — a router’s preventDefault included, an aria-disabled link excluded. Without it a phone costs two taps per destination"
|
|
478
|
+
"description": "Whether a click on an a[href] inside the overlaid navigation closes it, with the reason select — a router’s preventDefault included, an aria-disabled link excluded. Without it a phone costs two taps per destination."
|
|
479
479
|
},
|
|
480
480
|
{
|
|
481
481
|
"name": "messages",
|
|
482
482
|
"type": "Partial<AppShellMessages>",
|
|
483
483
|
"defaultValue": "—",
|
|
484
484
|
"appliesTo": "AppShell",
|
|
485
|
-
"description": "Words laid over the language in force, key by key — aside, close, closeAside, nav, open, openAside, progress, resizeAside, skipToAside, skipToMain, skipToNav: the two regions’ accessible names, the two controls’ labels in each state, the wait’s name, the pane edge’s name, and the three skip links. An aria-label written on the part itself still wins"
|
|
485
|
+
"description": "Words laid over the language in force, key by key — aside, close, closeAside, nav, open, openAside, progress, resizeAside, skipToAside, skipToMain, skipToNav: the two regions’ accessible names, the two controls’ labels in each state, the wait’s name, the pane edge’s name, and the three skip links. An aria-label written on the part itself still wins."
|
|
486
486
|
},
|
|
487
487
|
{
|
|
488
488
|
"name": "loading",
|
|
489
489
|
"type": "boolean",
|
|
490
490
|
"defaultValue": "true",
|
|
491
491
|
"appliesTo": "AppShellProgress",
|
|
492
|
-
"description": "Whether the next page is on its way. The bar appears once it has lasted delay (200 ms), stays at least minDuration (400 ms), and main carries aria-busy for exactly that long. Every other ProgressBar prop but placement passes through — value for a wait that reports its fraction, tone, label, size (sm by default) — and a value set through ProgressIndicatorDefaultsProvider wins over the shell’s timing"
|
|
492
|
+
"description": "Whether the next page is on its way. The bar appears once it has lasted delay (200 ms), stays at least minDuration (400 ms), and main carries aria-busy for exactly that long. Every other ProgressBar prop but placement passes through — value for a wait that reports its fraction, tone, label, size (sm by default) — and a value set through ProgressIndicatorDefaultsProvider wins over the shell’s timing."
|
|
493
493
|
}
|
|
494
494
|
],
|
|
495
495
|
"composition": [
|
|
@@ -498,77 +498,77 @@
|
|
|
498
498
|
"type": "anything",
|
|
499
499
|
"defaultValue": "—",
|
|
500
500
|
"appliesTo": "every region",
|
|
501
|
-
"description": "The
|
|
501
|
+
"description": "The shell owns where a region is drawn, its landmark, its width and its state, and nothing about what is in it. The bar’s three clusters, the column’s three ends, the content, the pane’s three parts and the footer each take whatever an application puts there — its own search, its own account, another family, its own markup."
|
|
502
502
|
},
|
|
503
503
|
{
|
|
504
504
|
"name": "published geometry",
|
|
505
505
|
"type": "--slotted-app-shell-row-*",
|
|
506
506
|
"defaultValue": "—",
|
|
507
507
|
"appliesTo": "anything inside a region",
|
|
508
|
-
"description": "Six numbers the shell publishes for the rows a product brings: row-inset, row-mark, row-gap, row-height, row-font-size and row-line-height.
|
|
508
|
+
"description": "Six numbers the shell publishes for the rows a product brings: row-inset, row-mark, row-gap, row-height, row-font-size and row-line-height. A row that reads them and states nothing of its own keeps a destination’s mark under the control in the bar."
|
|
509
509
|
},
|
|
510
510
|
{
|
|
511
511
|
"name": "custom properties",
|
|
512
512
|
"type": "--slotted-app-shell-*",
|
|
513
513
|
"defaultValue": "—",
|
|
514
514
|
"appliesTo": "the frame or any region",
|
|
515
|
-
"description": "A ground and an ink per region, plus every measure the frame stands on. Each region reads the public name and falls back to the plane’s default, so a property written on the region resolves in the region’s own scope. The full list is under Theme-owned decisions below"
|
|
515
|
+
"description": "A ground and an ink per region, plus every measure the frame stands on. Each region reads the public name and falls back to the plane’s default, so a property written on the region resolves in the region’s own scope. The full list is under Theme-owned decisions below."
|
|
516
516
|
},
|
|
517
517
|
{
|
|
518
518
|
"name": "data-part selectors",
|
|
519
519
|
"type": "[data-ui=\"app-shell\"] [data-part=\"…\"]",
|
|
520
520
|
"defaultValue": "—",
|
|
521
521
|
"appliesTo": "every part",
|
|
522
|
-
"description": "Anything the properties do not reach is one selector away. [data-ui=\"app-shell\"][data-open] is the navigation; [data-part=\"aside\"][data-open] is the pane"
|
|
522
|
+
"description": "Anything the properties do not reach is one selector away. [data-ui=\"app-shell\"][data-open] is the navigation; [data-part=\"aside\"][data-open] is the pane."
|
|
523
523
|
},
|
|
524
524
|
{
|
|
525
525
|
"name": "render",
|
|
526
526
|
"type": "(props) => ReactNode",
|
|
527
527
|
"defaultValue": "—",
|
|
528
528
|
"appliesTo": "every part",
|
|
529
|
-
"description": "Substitutes the rendered element and hands it every attribute, listener and data-* the part had. The skip links, the veil and the portal root are the shell’s own and are not substitutable"
|
|
529
|
+
"description": "Substitutes the rendered element and hands it every attribute, listener and data-* the part had. The skip links, the veil and the portal root are the shell’s own and are not substitutable."
|
|
530
530
|
},
|
|
531
531
|
{
|
|
532
532
|
"name": "ref",
|
|
533
533
|
"type": "Ref<AppShellHandle> on AppShell, Ref<HTMLElement> on every part",
|
|
534
534
|
"defaultValue": "—",
|
|
535
535
|
"appliesTo": "AppShell and its parts",
|
|
536
|
-
"description": "The root exposes a handle — openNav(), closeNav(), openAside(), closeAside(), focusMain() and root — because those are the actions a consumer cannot express declaratively; every part exposes its own element"
|
|
536
|
+
"description": "The root exposes a handle — openNav(), closeNav(), openAside(), closeAside(), focusMain() and root — because those are the actions a consumer cannot express declaratively; every part exposes its own element."
|
|
537
537
|
},
|
|
538
538
|
{
|
|
539
539
|
"name": "useAppShell()",
|
|
540
540
|
"type": "() => AppShellContextValue",
|
|
541
541
|
"defaultValue": "—",
|
|
542
542
|
"appliesTo": "inside AppShell",
|
|
543
|
-
"description": "What a part reads: open, asideOpen, the resolved modes, every axis, the ids, the translator t, setOpen(next, reason) and setAsideOpen(next, reason). Throws outside a shell rather than rendering a div that navigates nothing"
|
|
543
|
+
"description": "What a part reads: open, asideOpen, the resolved modes, every axis, the ids, the translator t, setOpen(next, reason) and setAsideOpen(next, reason). Throws outside a shell rather than rendering a div that navigates nothing."
|
|
544
544
|
},
|
|
545
545
|
{
|
|
546
546
|
"name": "AppShellDefaultsProvider",
|
|
547
547
|
"type": "{ …fourteen axes }",
|
|
548
548
|
"defaultValue": "—",
|
|
549
549
|
"appliesTo": "a subtree",
|
|
550
|
-
"description": "What an application decides once for every route. A shell that states any of them itself still wins"
|
|
550
|
+
"description": "What an application decides once for every route. A shell that states any of them itself still wins."
|
|
551
551
|
},
|
|
552
552
|
{
|
|
553
553
|
"name": "AppShellNavToggle and AppShellAsideToggle anywhere",
|
|
554
554
|
"type": "take their wiring from context",
|
|
555
555
|
"defaultValue": "—",
|
|
556
556
|
"appliesTo": "inside AppShell",
|
|
557
|
-
"description": "id, aria-expanded, aria-controls, the label and the handler come from the shell, so each control can stand in the banner, in its region’s own head or foot, or anywhere else — and there is still exactly one control carrying each state. Where it goes is
|
|
557
|
+
"description": "id, aria-expanded, aria-controls, the label and the handler come from the shell, so each control can stand in the banner, in its region’s own head or foot, or anywhere else — and there is still exactly one control carrying each state. Where it goes is shown in the Rail and Nav rail examples."
|
|
558
558
|
},
|
|
559
559
|
{
|
|
560
560
|
"name": "setPortalContainer",
|
|
561
561
|
"type": "the layer part, named once",
|
|
562
562
|
"defaultValue": "—",
|
|
563
563
|
"appliesTo": "every overlay under the shell",
|
|
564
|
-
"description": "Dialog, Drawer, Menu, Popover, Tooltip and Toast land in the shell’s own layer instead of on the body, which is what keeps an application’s overlays inside the application’s stacking context"
|
|
564
|
+
"description": "Dialog, Drawer, Menu, Popover, Tooltip and Toast land in the shell’s own layer instead of on the body, which is what keeps an application’s overlays inside the application’s stacking context."
|
|
565
565
|
},
|
|
566
566
|
{
|
|
567
567
|
"name": "onClick, onKeyDown, …",
|
|
568
568
|
"type": "composed, never replaced",
|
|
569
569
|
"defaultValue": "—",
|
|
570
570
|
"appliesTo": "every part",
|
|
571
|
-
"description": "A consumer’s own handler runs first; the
|
|
571
|
+
"description": "A consumer’s own handler runs first; the shell acts afterwards and only if the event was not prevented."
|
|
572
572
|
}
|
|
573
573
|
],
|
|
574
574
|
"events": [
|
|
@@ -591,7 +591,7 @@
|
|
|
591
591
|
"accessibility": [
|
|
592
592
|
"The structure is the WAI-ARIA APG’s Landmark Regions (w3.org/WAI/ARIA/apg/practices/landmark-regions/), and every one of the five is earned from the element rather than written as a role: header in the context of the body is banner, nav is navigation, main is main, aside is complementary, footer is contentinfo. The root is a div for exactly that reason — a main inside a sectioning element stops being a landmark, and the shell has to be placeable anywhere.",
|
|
593
593
|
"Both controls are the APG’s Disclosure pattern (w3.org/WAI/ARIA/apg/patterns/disclosure/): real buttons, so Enter and Space activate them natively, carrying aria-expanded and aria-controls pointing at their region. One departure is written and costed: under collapsedTo=\"rail\" the navigation does not disappear, it narrows — aria-expanded is still true or false about the region’s full form, and the region stays in the tab order because a rail whose destinations cannot be reached is not a rail. The pane has no such departure: closed, it leaves the layout and the tab order.",
|
|
594
|
-
"A document with more than one navigation or complementary landmark needs a unique label on each, so both regions carry the
|
|
594
|
+
"A document with more than one navigation or complementary landmark needs a unique label on each, so both regions carry the shell’s strings and a consumer may replace either per instance. Each control’s own name changes with the state — “Open navigation” and “Close navigation”, “Open side panel” and “Close side panel” — because a control whose name never changes leaves the reader to infer the state from aria-expanded alone.",
|
|
595
595
|
"The skip links are written from the regions that rendered and are open, so no link ever points at a target nobody built or the reader closed, and the main link writes tabindex=\"-1\" on main before it moves the focus: without it the browser moves the scroll and leaves the focus behind in Safari and Firefox. Blur or the next pointer press inside removes the attribute, so a click on the content never focuses main.",
|
|
596
596
|
"While an overlaid region is modal, @slotted/core/focus contains the keyboard inside it and returns it to the control that opened it on close, and every region beside it — the banner included — takes inert, so Tab cannot reach them and a screen reader does not read them. The ways out are Escape, the veil, a destination, and whatever control the product put in the panel. Two layers can be open together only with both modes forced, and @slotted/core/dismissable-layer keeps one stack, so Escape reaches the topmost.",
|
|
597
597
|
"The pane’s edge is the APG’s Window Splitter (w3.org/WAI/ARIA/apg/patterns/windowsplitter/): a focusable separator with aria-orientation=\"vertical\", aria-controls pointing at the pane and aria-valuemin, aria-valuemax and aria-valuenow as whole percentages of the shell, named “Resize panel”. ArrowLeft and ArrowRight move it sixteen pixels, sixty-four with Shift, by the direction on the screen — so ArrowLeft grows an end pane and shrinks a start one, mirrored in right-to-left — and Home and End go to the limits.",
|
|
@@ -702,7 +702,7 @@
|
|
|
702
702
|
{
|
|
703
703
|
"id": "anatomy",
|
|
704
704
|
"title": "The frame with nothing in it",
|
|
705
|
-
"note": "Every part the contract declares, drawn as its own name. Everything else
|
|
705
|
+
"note": "Every part the contract declares, drawn as its own name. Everything else in these scenes is a product standing in these boxes; this is the shell on its own — four rows, three columns, one gutter, the card the content stands on, three clusters in the bar, and a pane with a head, a body and a foot.",
|
|
706
706
|
"language": "tsx",
|
|
707
707
|
"source": "<AppShell>\n <AppShellBanner>\n <AppShellBrand>\n <AppShellNavToggle />\n </AppShellBrand>\n <AppShellCenter>…</AppShellCenter>\n <AppShellActions>…</AppShellActions>\n </AppShellBanner>\n <AppShellNav>\n <AppShellNavHeader>…</AppShellNavHeader>\n <AppShellNavBody>…</AppShellNavBody>\n <AppShellNavFooter>…</AppShellNavFooter>\n </AppShellNav>\n <AppShellMain>…</AppShellMain>\n <AppShellAside>\n <AppShellAsideHeader>\n …\n <AppShellAsideToggle />\n </AppShellAsideHeader>\n <AppShellAsideBody>…</AppShellAsideBody>\n <AppShellAsideFooter>…</AppShellAsideFooter>\n </AppShellAside>\n <AppShellFooter>…</AppShellFooter>\n</AppShell>;\n",
|
|
708
708
|
"verdict": "excerpt"
|
|
@@ -712,8 +712,8 @@
|
|
|
712
712
|
"title": "Five regions, five landmarks",
|
|
713
713
|
"note": "Each region is the HTML element that already means what it is, so none of them writes a role: header is banner, nav is navigation, main is main, aside is complementary, footer is contentinfo. The root is a div precisely so that stays true — a main inside an article is not a landmark. Cadence has no pane and no footer, and the landmark list is then exactly three.",
|
|
714
714
|
"language": "tsx",
|
|
715
|
-
"source": "<AppShell
|
|
716
|
-
"verdict": "
|
|
715
|
+
"source": "import {\n AppShell,\n AppShellActions,\n AppShellBanner,\n AppShellBrand,\n AppShellCenter,\n AppShellFooter,\n AppShellMain,\n AppShellNav,\n AppShellNavBody,\n AppShellNavFooter,\n AppShellNavHeader,\n AppShellNavPinned,\n AppShellNavToggle,\n} from '@slotted/react/app-shell';\nimport { Avatar } from '@slotted/react/avatar';\nimport { Button, IconButton } from '@slotted/react/button';\nimport { Glyph, Icon } from '@slotted/react/icon';\nimport {\n SideNavigation,\n SideNavigationIcon,\n SideNavigationItem,\n SideNavigationLabel,\n SideNavigationLink,\n SideNavigationList,\n} from '@slotted/react/side-navigation';\nimport { Stack } from '@slotted/react/stack';\nimport { TextField } from '@slotted/react/text-field';\nimport { Heading, Text } from '@slotted/react/typography';\n\nexport default function AppShellRegionsExample() {\n return (\n <AppShell>\n <AppShellBanner>\n <AppShellBrand>\n <AppShellNavToggle />\n <span>Northwind</span>\n </AppShellBrand>\n <AppShellCenter>\n <TextField\n aria-label=\"Search orders\"\n placeholder=\"Search orders\"\n start={\n <Icon>\n <Glyph name=\"search\" />\n </Icon>\n }\n type=\"search\"\n />\n </AppShellCenter>\n <AppShellActions>\n <IconButton aria-label=\"Notifications\" tone=\"secondary\" variant=\"ghost\">\n <Glyph name=\"bell\" />\n </IconButton>\n <Avatar name=\"Maria Chen\" />\n </AppShellActions>\n </AppShellBanner>\n <AppShellNav>\n <AppShellNavHeader>Rotterdam warehouse</AppShellNavHeader>\n <AppShellNavPinned>\n <Button>New order</Button>\n </AppShellNavPinned>\n <AppShellNavBody>\n <SideNavigation defaultValue=\"orders\">\n <SideNavigationList>\n <SideNavigationItem value=\"orders\">\n <SideNavigationLink href=\"#orders\">\n <SideNavigationIcon>\n <Icon>\n <Glyph name=\"inbox\" />\n </Icon>\n </SideNavigationIcon>\n <SideNavigationLabel>Orders</SideNavigationLabel>\n </SideNavigationLink>\n </SideNavigationItem>\n <SideNavigationItem value=\"shipments\">\n <SideNavigationLink href=\"#shipments\">\n <SideNavigationIcon>\n <Icon>\n <Glyph name=\"calendar\" />\n </Icon>\n </SideNavigationIcon>\n <SideNavigationLabel>Shipments</SideNavigationLabel>\n </SideNavigationLink>\n </SideNavigationItem>\n <SideNavigationItem value=\"reports\">\n <SideNavigationLink href=\"#reports\">\n <SideNavigationIcon>\n <Icon>\n <Glyph name=\"trending-up\" />\n </Icon>\n </SideNavigationIcon>\n <SideNavigationLabel>Reports</SideNavigationLabel>\n </SideNavigationLink>\n </SideNavigationItem>\n </SideNavigationList>\n </SideNavigation>\n </AppShellNavBody>\n <AppShellNavFooter>\n <Text size=\"sm\" tone=\"muted\">\n Maria Chen, shift lead\n </Text>\n </AppShellNavFooter>\n </AppShellNav>\n <AppShellMain>\n <Stack gap={2}>\n <Heading level={1} size=\"md\">\n Orders\n </Heading>\n <Text tone=\"muted\">128 open orders, 14 awaiting payment.</Text>\n </Stack>\n </AppShellMain>\n <AppShellFooter>Northwind Traders, EU region</AppShellFooter>\n </AppShell>\n );\n}\n",
|
|
716
|
+
"verdict": "example"
|
|
717
717
|
},
|
|
718
718
|
{
|
|
719
719
|
"id": "banner",
|
|
@@ -760,8 +760,8 @@
|
|
|
760
760
|
"title": "What a closed region leaves behind",
|
|
761
761
|
"note": "rail keeps a strip one mark column wide with a row’s inset on each side: every destination stays reachable by its mark, the region stays in the tab order, and the column’s own query container is what tells the rows to drop their labels. hidden takes the region out of the layout and the tab order entirely. Under primary=\"nav\" the control stands in the column’s own foot, over the column it moves, and survives the rail.",
|
|
762
762
|
"language": "tsx",
|
|
763
|
-
"source": "
|
|
764
|
-
"verdict": "
|
|
763
|
+
"source": "import { useState } from 'react';\nimport {\n AppShell,\n AppShellBanner,\n AppShellBrand,\n type AppShellCollapsedTo,\n AppShellMain,\n AppShellNav,\n AppShellNavBody,\n AppShellNavToggle,\n} from '@slotted/react/app-shell';\nimport { Glyph, Icon } from '@slotted/react/icon';\nimport { Segment, SegmentedControl } from '@slotted/react/segmented-control';\nimport {\n SideNavigation,\n SideNavigationIcon,\n SideNavigationItem,\n SideNavigationLabel,\n SideNavigationLink,\n SideNavigationList,\n} from '@slotted/react/side-navigation';\nimport { Stack } from '@slotted/react/stack';\nimport { Heading, Text } from '@slotted/react/typography';\n\nexport default function AppShellRailExample() {\n const [collapsedTo, setCollapsedTo] = useState<AppShellCollapsedTo>('rail');\n\n return (\n <Stack gap={3}>\n <SegmentedControl\n aria-label=\"Closed navigation\"\n onValueChange={(next) => setCollapsedTo(next as AppShellCollapsedTo)}\n value={collapsedTo}\n >\n <Segment value=\"rail\">Rail</Segment>\n <Segment value=\"hidden\">Hidden</Segment>\n </SegmentedControl>\n <AppShell collapsedTo={collapsedTo} defaultNavOpen={false}>\n <AppShellBanner>\n <AppShellBrand>\n <AppShellNavToggle />\n <span>Northwind</span>\n </AppShellBrand>\n </AppShellBanner>\n <AppShellNav>\n <AppShellNavBody>\n <SideNavigation defaultValue=\"orders\">\n <SideNavigationList>\n <SideNavigationItem value=\"orders\">\n <SideNavigationLink href=\"#orders\">\n <SideNavigationIcon>\n <Icon>\n <Glyph name=\"inbox\" />\n </Icon>\n </SideNavigationIcon>\n <SideNavigationLabel>Orders</SideNavigationLabel>\n </SideNavigationLink>\n </SideNavigationItem>\n <SideNavigationItem value=\"shipments\">\n <SideNavigationLink href=\"#shipments\">\n <SideNavigationIcon>\n <Icon>\n <Glyph name=\"calendar\" />\n </Icon>\n </SideNavigationIcon>\n <SideNavigationLabel>Shipments</SideNavigationLabel>\n </SideNavigationLink>\n </SideNavigationItem>\n <SideNavigationItem value=\"reports\">\n <SideNavigationLink href=\"#reports\">\n <SideNavigationIcon>\n <Icon>\n <Glyph name=\"trending-up\" />\n </Icon>\n </SideNavigationIcon>\n <SideNavigationLabel>Reports</SideNavigationLabel>\n </SideNavigationLink>\n </SideNavigationItem>\n </SideNavigationList>\n </SideNavigation>\n </AppShellNavBody>\n </AppShellNav>\n <AppShellMain>\n <Stack gap={2}>\n <Heading level={1} size=\"md\">\n Reports\n </Heading>\n <Text tone=\"muted\">Margin by warehouse, updated at 06:00.</Text>\n </Stack>\n </AppShellMain>\n </AppShell>\n </Stack>\n );\n}\n",
|
|
764
|
+
"verdict": "example"
|
|
765
765
|
},
|
|
766
766
|
{
|
|
767
767
|
"id": "navRail",
|
|
@@ -776,16 +776,16 @@
|
|
|
776
776
|
"title": "The pane opens on a selection, and closes from its own head",
|
|
777
777
|
"note": "The pane holds the second open state, under the same shape as the navigation’s: asideOpen, defaultAsideOpen, onAsideOpenChange with a reason. Select a row and the product opens the pane; press the control in the pane’s head, or Escape when it is a layer, and it closes — the content takes the room, because a closed pane leaves no rail. The skip link to the pane exists only while it is open. Drag the pane’s inner edge, or focus it and press the arrows, Home and End: asideExtent is a fraction of the shell between minAsideExtent and maxAsideExtent, and onAsideExtentChange says which hand moved it.",
|
|
778
778
|
"language": "tsx",
|
|
779
|
-
"source": "const [selected, setSelected] = useState<string | undefined>();\n\n<AppShell\n
|
|
780
|
-
"verdict": "
|
|
779
|
+
"source": "import { useState } from 'react';\nimport {\n AppShell,\n AppShellAside,\n AppShellAsideBody,\n AppShellAsideFooter,\n AppShellAsideHeader,\n AppShellAsideToggle,\n AppShellBanner,\n AppShellBrand,\n AppShellMain,\n AppShellNav,\n AppShellNavBody,\n AppShellNavToggle,\n} from '@slotted/react/app-shell';\nimport { Button } from '@slotted/react/button';\nimport { Glyph, Icon } from '@slotted/react/icon';\nimport { Inline } from '@slotted/react/inline';\nimport {\n SideNavigation,\n SideNavigationIcon,\n SideNavigationItem,\n SideNavigationLabel,\n SideNavigationLink,\n SideNavigationList,\n} from '@slotted/react/side-navigation';\nimport { Stack } from '@slotted/react/stack';\nimport { Heading, Text } from '@slotted/react/typography';\n\nexport default function AppShellAsideExample() {\n const [selected, setSelected] = useState<string | undefined>();\n const details: Record<string, string> = {\n 'SH-3101': '12 pallets from Antwerp to Cologne, delivered.',\n 'SH-3102': '18 pallets from Rotterdam to Lyon, due Thursday.',\n 'SH-3103': '6 pallets from Hamburg to Prague, held at customs.',\n };\n\n return (\n <AppShell\n asideOpen={selected !== undefined}\n onAsideOpenChange={(open) => {\n if (!open) setSelected(undefined);\n }}\n >\n <AppShellBanner>\n <AppShellBrand>\n <AppShellNavToggle />\n <span>Northwind</span>\n </AppShellBrand>\n </AppShellBanner>\n <AppShellNav>\n <AppShellNavBody>\n <SideNavigation defaultValue=\"orders\">\n <SideNavigationList>\n <SideNavigationItem value=\"orders\">\n <SideNavigationLink href=\"#orders\">\n <SideNavigationIcon>\n <Icon>\n <Glyph name=\"inbox\" />\n </Icon>\n </SideNavigationIcon>\n <SideNavigationLabel>Orders</SideNavigationLabel>\n </SideNavigationLink>\n </SideNavigationItem>\n <SideNavigationItem value=\"shipments\">\n <SideNavigationLink href=\"#shipments\">\n <SideNavigationIcon>\n <Icon>\n <Glyph name=\"calendar\" />\n </Icon>\n </SideNavigationIcon>\n <SideNavigationLabel>Shipments</SideNavigationLabel>\n </SideNavigationLink>\n </SideNavigationItem>\n <SideNavigationItem value=\"reports\">\n <SideNavigationLink href=\"#reports\">\n <SideNavigationIcon>\n <Icon>\n <Glyph name=\"trending-up\" />\n </Icon>\n </SideNavigationIcon>\n <SideNavigationLabel>Reports</SideNavigationLabel>\n </SideNavigationLink>\n </SideNavigationItem>\n </SideNavigationList>\n </SideNavigation>\n </AppShellNavBody>\n </AppShellNav>\n <AppShellMain>\n <Stack gap={2}>\n <Heading level={1} size=\"md\">\n Shipments\n </Heading>\n <Inline gap={2}>\n <Button onClick={() => setSelected('SH-3101')} tone=\"secondary\" variant=\"outline\">\n SH-3101\n </Button>\n <Button onClick={() => setSelected('SH-3102')} tone=\"secondary\" variant=\"outline\">\n SH-3102\n </Button>\n <Button onClick={() => setSelected('SH-3103')} tone=\"secondary\" variant=\"outline\">\n SH-3103\n </Button>\n </Inline>\n </Stack>\n </AppShellMain>\n <AppShellAside>\n <AppShellAsideHeader>\n <span>{selected}</span>\n <AppShellAsideToggle />\n </AppShellAsideHeader>\n <AppShellAsideBody>\n <Text>{selected === undefined ? '' : details[selected]}</Text>\n </AppShellAsideBody>\n <AppShellAsideFooter>\n <Button>Reschedule pickup</Button>\n </AppShellAsideFooter>\n </AppShellAside>\n </AppShell>\n );\n}\n",
|
|
780
|
+
"verdict": "example"
|
|
781
781
|
},
|
|
782
782
|
{
|
|
783
783
|
"id": "overlay",
|
|
784
784
|
"title": "The layer, and what it does to the rest",
|
|
785
785
|
"note": "Atrium overlays its navigation at every width. While the layer is modal, the rest of the shell is inert — the banner and its toggle included, exactly as a dialog’s trigger is — and the ways out are Escape, the veil, a destination, and whatever control the product put in the panel. The pane is a layer of its own under the same policies: escape=\"none\" keeps it open on Escape, outsidePress=\"none\" keeps it open on a press outside, modal={false} draws no veil and inerts nothing.",
|
|
786
786
|
"language": "tsx",
|
|
787
|
-
"source": "<AppShell navMode=\"overlay\"
|
|
788
|
-
"verdict": "
|
|
787
|
+
"source": "import {\n AppShell,\n AppShellBanner,\n AppShellBrand,\n AppShellMain,\n AppShellNav,\n AppShellNavBody,\n AppShellNavToggle,\n} from '@slotted/react/app-shell';\nimport { Glyph, Icon } from '@slotted/react/icon';\nimport {\n SideNavigation,\n SideNavigationIcon,\n SideNavigationItem,\n SideNavigationLabel,\n SideNavigationLink,\n SideNavigationList,\n} from '@slotted/react/side-navigation';\nimport { Stack } from '@slotted/react/stack';\nimport { Heading, Text } from '@slotted/react/typography';\n\nexport default function AppShellOverlayExample() {\n return (\n <AppShell defaultNavOpen={false} navMode=\"overlay\">\n <AppShellBanner>\n <AppShellBrand>\n <AppShellNavToggle />\n <span>Northwind</span>\n </AppShellBrand>\n </AppShellBanner>\n <AppShellNav>\n <AppShellNavBody>\n <SideNavigation defaultValue=\"orders\">\n <SideNavigationList>\n <SideNavigationItem value=\"orders\">\n <SideNavigationLink href=\"#orders\">\n <SideNavigationIcon>\n <Icon>\n <Glyph name=\"inbox\" />\n </Icon>\n </SideNavigationIcon>\n <SideNavigationLabel>Orders</SideNavigationLabel>\n </SideNavigationLink>\n </SideNavigationItem>\n <SideNavigationItem value=\"shipments\">\n <SideNavigationLink href=\"#shipments\">\n <SideNavigationIcon>\n <Icon>\n <Glyph name=\"calendar\" />\n </Icon>\n </SideNavigationIcon>\n <SideNavigationLabel>Shipments</SideNavigationLabel>\n </SideNavigationLink>\n </SideNavigationItem>\n <SideNavigationItem value=\"reports\">\n <SideNavigationLink href=\"#reports\">\n <SideNavigationIcon>\n <Icon>\n <Glyph name=\"trending-up\" />\n </Icon>\n </SideNavigationIcon>\n <SideNavigationLabel>Reports</SideNavigationLabel>\n </SideNavigationLink>\n </SideNavigationItem>\n </SideNavigationList>\n </SideNavigation>\n </AppShellNavBody>\n </AppShellNav>\n <AppShellMain>\n <Stack gap={2}>\n <Heading level={1} size=\"md\">\n Orders\n </Heading>\n <Text tone=\"muted\">128 open orders, 14 awaiting payment.</Text>\n </Stack>\n </AppShellMain>\n </AppShell>\n );\n}\n",
|
|
788
|
+
"verdict": "example"
|
|
789
789
|
},
|
|
790
790
|
{
|
|
791
791
|
"id": "primary",
|
|
@@ -798,10 +798,10 @@
|
|
|
798
798
|
{
|
|
799
799
|
"id": "sides",
|
|
800
800
|
"title": "Sides, sizes and the mirror",
|
|
801
|
-
"note": "Atrium puts the navigation at the end of the line and the pane at the start; the controls turn their marks with them. Switch the direction to right-to-left and the whole frame mirrors, because every distance is logical. navSize and asideSize are steps on the
|
|
801
|
+
"note": "Atrium puts the navigation at the end of the line and the pane at the start; the controls turn their marks with them. Switch the direction to right-to-left and the whole frame mirrors, because every distance is logical. navSize and asideSize are steps on the shell’s own scale — a theme retunes a step, and nothing retunes a pixel string.",
|
|
802
802
|
"language": "tsx",
|
|
803
|
-
"source": "
|
|
804
|
-
"verdict": "
|
|
803
|
+
"source": "import { useState } from 'react';\nimport {\n AppShell,\n AppShellAside,\n AppShellAsideBody,\n AppShellAsideHeader,\n AppShellAsideToggle,\n AppShellBanner,\n AppShellBrand,\n AppShellMain,\n AppShellNav,\n AppShellNavBody,\n type AppShellNavSide,\n AppShellNavToggle,\n type AppShellSize,\n} from '@slotted/react/app-shell';\nimport { Glyph, Icon } from '@slotted/react/icon';\nimport { Segment, SegmentedControl } from '@slotted/react/segmented-control';\nimport {\n SideNavigation,\n SideNavigationIcon,\n SideNavigationItem,\n SideNavigationLabel,\n SideNavigationLink,\n SideNavigationList,\n} from '@slotted/react/side-navigation';\nimport { Stack } from '@slotted/react/stack';\nimport { Heading, Text } from '@slotted/react/typography';\n\nexport default function AppShellSidesExample() {\n const [navSide, setNavSide] = useState<AppShellNavSide>('start');\n const [navSize, setNavSize] = useState<AppShellSize>('md');\n const [asideSize, setAsideSize] = useState<AppShellSize>('md');\n\n return (\n <Stack gap={3}>\n <SegmentedControl\n aria-label=\"Navigation side\"\n onValueChange={(next) => setNavSide(next as AppShellNavSide)}\n value={navSide}\n >\n <Segment value=\"start\">Start</Segment>\n <Segment value=\"end\">End</Segment>\n </SegmentedControl>\n <SegmentedControl\n aria-label=\"Navigation size\"\n onValueChange={(next) => setNavSize(next as AppShellSize)}\n value={navSize}\n >\n <Segment value=\"sm\">SM</Segment>\n <Segment value=\"md\">MD</Segment>\n <Segment value=\"lg\">LG</Segment>\n </SegmentedControl>\n <SegmentedControl\n aria-label=\"Pane size\"\n onValueChange={(next) => setAsideSize(next as AppShellSize)}\n value={asideSize}\n >\n <Segment value=\"sm\">SM</Segment>\n <Segment value=\"md\">MD</Segment>\n <Segment value=\"lg\">LG</Segment>\n </SegmentedControl>\n <AppShell asideSize={asideSize} navSide={navSide} navSize={navSize}>\n <AppShellBanner>\n <AppShellBrand>\n <AppShellNavToggle />\n <span>Northwind</span>\n </AppShellBrand>\n </AppShellBanner>\n <AppShellNav>\n <AppShellNavBody>\n <SideNavigation defaultValue=\"orders\">\n <SideNavigationList>\n <SideNavigationItem value=\"orders\">\n <SideNavigationLink href=\"#orders\">\n <SideNavigationIcon>\n <Icon>\n <Glyph name=\"inbox\" />\n </Icon>\n </SideNavigationIcon>\n <SideNavigationLabel>Orders</SideNavigationLabel>\n </SideNavigationLink>\n </SideNavigationItem>\n <SideNavigationItem value=\"shipments\">\n <SideNavigationLink href=\"#shipments\">\n <SideNavigationIcon>\n <Icon>\n <Glyph name=\"calendar\" />\n </Icon>\n </SideNavigationIcon>\n <SideNavigationLabel>Shipments</SideNavigationLabel>\n </SideNavigationLink>\n </SideNavigationItem>\n <SideNavigationItem value=\"reports\">\n <SideNavigationLink href=\"#reports\">\n <SideNavigationIcon>\n <Icon>\n <Glyph name=\"trending-up\" />\n </Icon>\n </SideNavigationIcon>\n <SideNavigationLabel>Reports</SideNavigationLabel>\n </SideNavigationLink>\n </SideNavigationItem>\n </SideNavigationList>\n </SideNavigation>\n </AppShellNavBody>\n </AppShellNav>\n <AppShellMain>\n <Stack gap={2}>\n <Heading level={1} size=\"md\">\n Shipments\n </Heading>\n <Text tone=\"muted\">23 in transit, 4 late.</Text>\n </Stack>\n </AppShellMain>\n <AppShellAside>\n <AppShellAsideHeader>\n <span>Shipment SH-3102</span>\n <AppShellAsideToggle />\n </AppShellAsideHeader>\n <AppShellAsideBody>\n <Text>18 pallets from Rotterdam to Lyon, due Thursday.</Text>\n </AppShellAsideBody>\n </AppShellAside>\n </AppShell>\n </Stack>\n );\n}\n",
|
|
804
|
+
"verdict": "example"
|
|
805
805
|
},
|
|
806
806
|
{
|
|
807
807
|
"id": "scroll",
|
|
@@ -814,10 +814,10 @@
|
|
|
814
814
|
{
|
|
815
815
|
"id": "progress",
|
|
816
816
|
"title": "The wait for the next page",
|
|
817
|
-
"note": "AppShellProgress draws an indeterminate bar on the line between the chrome and the content — wherever the canvas draws that line — after 200 ms, holds it for at least 400 ms, and marks main aria-busy for exactly as long as it is painted. A page header inside a busy content region draws no bar of its own. Pass loading from the router; nothing in the
|
|
817
|
+
"note": "AppShellProgress draws an indeterminate bar on the line between the chrome and the content — wherever the canvas draws that line — after 200 ms, holds it for at least 400 ms, and marks main aria-busy for exactly as long as it is painted. A page header inside a busy content region draws no bar of its own. Pass loading from the router; nothing in the shell knows one.",
|
|
818
818
|
"language": "tsx",
|
|
819
|
-
"source": "
|
|
820
|
-
"verdict": "
|
|
819
|
+
"source": "import { useState } from 'react';\nimport {\n AppShell,\n AppShellBanner,\n AppShellBrand,\n AppShellMain,\n AppShellNav,\n AppShellNavBody,\n AppShellNavToggle,\n AppShellProgress,\n} from '@slotted/react/app-shell';\nimport { Button } from '@slotted/react/button';\nimport { Glyph, Icon } from '@slotted/react/icon';\nimport { Inline } from '@slotted/react/inline';\nimport {\n SideNavigation,\n SideNavigationIcon,\n SideNavigationItem,\n SideNavigationLabel,\n SideNavigationLink,\n SideNavigationList,\n} from '@slotted/react/side-navigation';\nimport { Stack } from '@slotted/react/stack';\nimport { Heading, Text } from '@slotted/react/typography';\n\nexport default function AppShellProgressExample() {\n const [loading, setLoading] = useState(false);\n\n function handleRefresh() {\n setLoading(true);\n setTimeout(() => setLoading(false), 2500);\n }\n\n return (\n <AppShell>\n <AppShellBanner>\n <AppShellBrand>\n <AppShellNavToggle />\n <span>Northwind</span>\n </AppShellBrand>\n </AppShellBanner>\n <AppShellNav>\n <AppShellNavBody>\n <SideNavigation defaultValue=\"orders\">\n <SideNavigationList>\n <SideNavigationItem value=\"orders\">\n <SideNavigationLink href=\"#orders\">\n <SideNavigationIcon>\n <Icon>\n <Glyph name=\"inbox\" />\n </Icon>\n </SideNavigationIcon>\n <SideNavigationLabel>Orders</SideNavigationLabel>\n </SideNavigationLink>\n </SideNavigationItem>\n <SideNavigationItem value=\"shipments\">\n <SideNavigationLink href=\"#shipments\">\n <SideNavigationIcon>\n <Icon>\n <Glyph name=\"calendar\" />\n </Icon>\n </SideNavigationIcon>\n <SideNavigationLabel>Shipments</SideNavigationLabel>\n </SideNavigationLink>\n </SideNavigationItem>\n <SideNavigationItem value=\"reports\">\n <SideNavigationLink href=\"#reports\">\n <SideNavigationIcon>\n <Icon>\n <Glyph name=\"trending-up\" />\n </Icon>\n </SideNavigationIcon>\n <SideNavigationLabel>Reports</SideNavigationLabel>\n </SideNavigationLink>\n </SideNavigationItem>\n </SideNavigationList>\n </SideNavigation>\n </AppShellNavBody>\n </AppShellNav>\n <AppShellMain>\n <Stack gap={2}>\n <Heading level={1} size=\"md\">\n Orders\n </Heading>\n <Text tone=\"muted\">128 open orders, 14 awaiting payment.</Text>\n <Inline gap={2}>\n <Button onClick={handleRefresh}>Open reports</Button>\n </Inline>\n </Stack>\n </AppShellMain>\n <AppShellProgress loading={loading} />\n </AppShell>\n );\n}\n",
|
|
820
|
+
"verdict": "example"
|
|
821
821
|
},
|
|
822
822
|
{
|
|
823
823
|
"id": "skipLinks",
|
|
@@ -840,8 +840,8 @@
|
|
|
840
840
|
"title": "Setting it once, and reaching past it",
|
|
841
841
|
"note": "AppShellDefaultsProvider takes every axis and the strings, so an application decides once how its routes are framed and a shell that states any of them itself still wins. ref gives an AppShellHandle rather than a DOM node: openNav, closeNav, openAside, closeAside and focusMain are the actions a prop cannot express. render makes the root the consumer’s own element and keeps every attribute on it.",
|
|
842
842
|
"language": "tsx",
|
|
843
|
-
"source": "<AppShellDefaultsProvider canvas=\"
|
|
844
|
-
"verdict": "
|
|
843
|
+
"source": "import {\n AppShell,\n AppShellBanner,\n AppShellBrand,\n AppShellDefaultsProvider,\n AppShellMain,\n AppShellNav,\n AppShellNavBody,\n AppShellNavToggle,\n} from '@slotted/react/app-shell';\nimport { Glyph, Icon } from '@slotted/react/icon';\nimport {\n SideNavigation,\n SideNavigationIcon,\n SideNavigationItem,\n SideNavigationLabel,\n SideNavigationLink,\n SideNavigationList,\n} from '@slotted/react/side-navigation';\nimport { Stack } from '@slotted/react/stack';\nimport { Heading, Text } from '@slotted/react/typography';\n\nexport default function AppShellDefaultsExample() {\n return (\n <AppShellDefaultsProvider canvas=\"panel\" navSize=\"sm\" primary=\"nav\">\n <AppShell messages={{ skipToMain: 'Skip to the order list' }}>\n <AppShellBanner>\n <AppShellBrand>\n <AppShellNavToggle />\n <span>Northwind</span>\n </AppShellBrand>\n </AppShellBanner>\n <AppShellNav>\n <AppShellNavBody>\n <SideNavigation defaultValue=\"orders\">\n <SideNavigationList>\n <SideNavigationItem value=\"orders\">\n <SideNavigationLink href=\"#orders\">\n <SideNavigationIcon>\n <Icon>\n <Glyph name=\"inbox\" />\n </Icon>\n </SideNavigationIcon>\n <SideNavigationLabel>Orders</SideNavigationLabel>\n </SideNavigationLink>\n </SideNavigationItem>\n <SideNavigationItem value=\"shipments\">\n <SideNavigationLink href=\"#shipments\">\n <SideNavigationIcon>\n <Icon>\n <Glyph name=\"calendar\" />\n </Icon>\n </SideNavigationIcon>\n <SideNavigationLabel>Shipments</SideNavigationLabel>\n </SideNavigationLink>\n </SideNavigationItem>\n <SideNavigationItem value=\"reports\">\n <SideNavigationLink href=\"#reports\">\n <SideNavigationIcon>\n <Icon>\n <Glyph name=\"trending-up\" />\n </Icon>\n </SideNavigationIcon>\n <SideNavigationLabel>Reports</SideNavigationLabel>\n </SideNavigationLink>\n </SideNavigationItem>\n </SideNavigationList>\n </SideNavigation>\n </AppShellNavBody>\n </AppShellNav>\n <AppShellMain>\n <Stack gap={2}>\n <Heading level={1} size=\"md\">\n Orders\n </Heading>\n <Text tone=\"muted\">128 open orders, 14 awaiting payment.</Text>\n </Stack>\n </AppShellMain>\n </AppShell>\n </AppShellDefaultsProvider>\n );\n}\n",
|
|
844
|
+
"verdict": "example"
|
|
845
845
|
},
|
|
846
846
|
{
|
|
847
847
|
"id": "composition",
|
|
@@ -859,12 +859,44 @@
|
|
|
859
859
|
"source": "<AppShellNav aria-label=\"Main navigation\">…</AppShellNav>;\n<AppShellAside aria-label=\"Order details\">…</AppShellAside>;\n",
|
|
860
860
|
"verdict": "excerpt"
|
|
861
861
|
},
|
|
862
|
+
{
|
|
863
|
+
"id": "arrangement",
|
|
864
|
+
"title": "arrangement.tsx",
|
|
865
|
+
"note": null,
|
|
866
|
+
"language": "tsx",
|
|
867
|
+
"source": "import { useState } from 'react';\nimport {\n AppShell,\n AppShellBanner,\n AppShellBrand,\n type AppShellCanvas,\n AppShellMain,\n AppShellNav,\n AppShellNavBody,\n AppShellNavToggle,\n type AppShellPrimary,\n type AppShellSeparation,\n} from '@slotted/react/app-shell';\nimport { Glyph, Icon } from '@slotted/react/icon';\nimport { Segment, SegmentedControl } from '@slotted/react/segmented-control';\nimport {\n SideNavigation,\n SideNavigationIcon,\n SideNavigationItem,\n SideNavigationLabel,\n SideNavigationLink,\n SideNavigationList,\n} from '@slotted/react/side-navigation';\nimport { Stack } from '@slotted/react/stack';\nimport { Heading, Text } from '@slotted/react/typography';\n\nexport default function AppShellArrangementExample() {\n const [primary, setPrimary] = useState<AppShellPrimary>('banner');\n const [canvas, setCanvas] = useState<AppShellCanvas>('flush');\n const [separation, setSeparation] = useState<AppShellSeparation>('rule');\n\n return (\n <Stack gap={3}>\n <SegmentedControl\n aria-label=\"Primary region\"\n onValueChange={(next) => setPrimary(next as AppShellPrimary)}\n value={primary}\n >\n <Segment value=\"banner\">Banner</Segment>\n <Segment value=\"nav\">Nav</Segment>\n <Segment value=\"main\">Main</Segment>\n </SegmentedControl>\n <SegmentedControl\n aria-label=\"Canvas\"\n onValueChange={(next) => setCanvas(next as AppShellCanvas)}\n value={canvas}\n >\n <Segment value=\"inset\">Inset</Segment>\n <Segment value=\"flush\">Flush</Segment>\n <Segment value=\"floating\">Floating</Segment>\n <Segment value=\"panel\">Panel</Segment>\n </SegmentedControl>\n <SegmentedControl\n aria-label=\"Separation\"\n onValueChange={(next) => setSeparation(next as AppShellSeparation)}\n value={separation}\n >\n <Segment value=\"rule\">Rule</Segment>\n <Segment value=\"tone\">Tone</Segment>\n </SegmentedControl>\n <AppShell canvas={canvas} primary={primary} separation={separation}>\n <AppShellBanner>\n <AppShellBrand>\n <AppShellNavToggle />\n <span>Northwind</span>\n </AppShellBrand>\n </AppShellBanner>\n <AppShellNav>\n <AppShellNavBody>\n <SideNavigation defaultValue=\"orders\">\n <SideNavigationList>\n <SideNavigationItem value=\"orders\">\n <SideNavigationLink href=\"#orders\">\n <SideNavigationIcon>\n <Icon>\n <Glyph name=\"inbox\" />\n </Icon>\n </SideNavigationIcon>\n <SideNavigationLabel>Orders</SideNavigationLabel>\n </SideNavigationLink>\n </SideNavigationItem>\n <SideNavigationItem value=\"shipments\">\n <SideNavigationLink href=\"#shipments\">\n <SideNavigationIcon>\n <Icon>\n <Glyph name=\"calendar\" />\n </Icon>\n </SideNavigationIcon>\n <SideNavigationLabel>Shipments</SideNavigationLabel>\n </SideNavigationLink>\n </SideNavigationItem>\n <SideNavigationItem value=\"reports\">\n <SideNavigationLink href=\"#reports\">\n <SideNavigationIcon>\n <Icon>\n <Glyph name=\"trending-up\" />\n </Icon>\n </SideNavigationIcon>\n <SideNavigationLabel>Reports</SideNavigationLabel>\n </SideNavigationLink>\n </SideNavigationItem>\n </SideNavigationList>\n </SideNavigation>\n </AppShellNavBody>\n </AppShellNav>\n <AppShellMain>\n <Stack gap={2}>\n <Heading level={1} size=\"md\">\n Orders\n </Heading>\n <Text tone=\"muted\">128 open orders, 14 awaiting payment.</Text>\n </Stack>\n </AppShellMain>\n </AppShell>\n </Stack>\n );\n}\n",
|
|
868
|
+
"verdict": "example"
|
|
869
|
+
},
|
|
862
870
|
{
|
|
863
871
|
"id": "basic",
|
|
864
872
|
"title": "basic.tsx",
|
|
865
873
|
"note": null,
|
|
866
874
|
"language": "tsx",
|
|
867
|
-
"source": "import {\n AppShell,\n AppShellBanner,\n AppShellBrand,\n AppShellMain,\n AppShellNav,\n AppShellNavToggle,\n} from '@slotted/react/app-shell';\nimport {\n SideNavigation,\n SideNavigationItem,\n SideNavigationLabel,\n SideNavigationLink,\n SideNavigationList,\n} from '@slotted/react/side-navigation';\n\nexport default function
|
|
875
|
+
"source": "import {\n AppShell,\n AppShellBanner,\n AppShellBrand,\n AppShellMain,\n AppShellNav,\n AppShellNavBody,\n AppShellNavToggle,\n} from '@slotted/react/app-shell';\nimport { Glyph, Icon } from '@slotted/react/icon';\nimport {\n SideNavigation,\n SideNavigationIcon,\n SideNavigationItem,\n SideNavigationLabel,\n SideNavigationLink,\n SideNavigationList,\n} from '@slotted/react/side-navigation';\nimport { Stack } from '@slotted/react/stack';\nimport { Heading, Text } from '@slotted/react/typography';\n\nexport default function AppShellBasicExample() {\n return (\n <AppShell>\n <AppShellBanner>\n <AppShellBrand>\n <AppShellNavToggle />\n <span>Northwind</span>\n </AppShellBrand>\n </AppShellBanner>\n <AppShellNav>\n <AppShellNavBody>\n <SideNavigation defaultValue=\"orders\">\n <SideNavigationList>\n <SideNavigationItem value=\"orders\">\n <SideNavigationLink href=\"#orders\">\n <SideNavigationIcon>\n <Icon>\n <Glyph name=\"inbox\" />\n </Icon>\n </SideNavigationIcon>\n <SideNavigationLabel>Orders</SideNavigationLabel>\n </SideNavigationLink>\n </SideNavigationItem>\n <SideNavigationItem value=\"shipments\">\n <SideNavigationLink href=\"#shipments\">\n <SideNavigationIcon>\n <Icon>\n <Glyph name=\"calendar\" />\n </Icon>\n </SideNavigationIcon>\n <SideNavigationLabel>Shipments</SideNavigationLabel>\n </SideNavigationLink>\n </SideNavigationItem>\n <SideNavigationItem value=\"reports\">\n <SideNavigationLink href=\"#reports\">\n <SideNavigationIcon>\n <Icon>\n <Glyph name=\"trending-up\" />\n </Icon>\n </SideNavigationIcon>\n <SideNavigationLabel>Reports</SideNavigationLabel>\n </SideNavigationLink>\n </SideNavigationItem>\n </SideNavigationList>\n </SideNavigation>\n </AppShellNavBody>\n </AppShellNav>\n <AppShellMain>\n <Stack gap={2}>\n <Heading level={1} size=\"md\">\n Orders\n </Heading>\n <Text tone=\"muted\">128 open orders, 14 awaiting payment.</Text>\n </Stack>\n </AppShellMain>\n </AppShell>\n );\n}\n",
|
|
876
|
+
"verdict": "example"
|
|
877
|
+
},
|
|
878
|
+
{
|
|
879
|
+
"id": "dismissal",
|
|
880
|
+
"title": "dismissal.tsx",
|
|
881
|
+
"note": null,
|
|
882
|
+
"language": "tsx",
|
|
883
|
+
"source": "import { useState } from 'react';\nimport {\n AppShell,\n AppShellBanner,\n AppShellBrand,\n AppShellMain,\n AppShellNav,\n AppShellNavBody,\n AppShellNavFooter,\n AppShellNavToggle,\n} from '@slotted/react/app-shell';\nimport { Button } from '@slotted/react/button';\nimport { Glyph, Icon } from '@slotted/react/icon';\nimport {\n SideNavigation,\n SideNavigationIcon,\n SideNavigationItem,\n SideNavigationLabel,\n SideNavigationLink,\n SideNavigationList,\n} from '@slotted/react/side-navigation';\nimport { Stack } from '@slotted/react/stack';\nimport { Heading, Text } from '@slotted/react/typography';\n\nexport default function AppShellDismissalExample() {\n const [open, setOpen] = useState(false);\n\n return (\n <AppShell\n back=\"none\"\n closeOnNavigate={false}\n escape=\"none\"\n modal={false}\n navMode=\"overlay\"\n navOpen={open}\n onNavOpenChange={setOpen}\n outsidePress=\"none\"\n >\n <AppShellBanner>\n <AppShellBrand>\n <AppShellNavToggle />\n <span>Northwind</span>\n </AppShellBrand>\n </AppShellBanner>\n <AppShellNav>\n <AppShellNavBody>\n <SideNavigation defaultValue=\"orders\">\n <SideNavigationList>\n <SideNavigationItem value=\"orders\">\n <SideNavigationLink href=\"#orders\">\n <SideNavigationIcon>\n <Icon>\n <Glyph name=\"inbox\" />\n </Icon>\n </SideNavigationIcon>\n <SideNavigationLabel>Orders</SideNavigationLabel>\n </SideNavigationLink>\n </SideNavigationItem>\n <SideNavigationItem value=\"shipments\">\n <SideNavigationLink href=\"#shipments\">\n <SideNavigationIcon>\n <Icon>\n <Glyph name=\"calendar\" />\n </Icon>\n </SideNavigationIcon>\n <SideNavigationLabel>Shipments</SideNavigationLabel>\n </SideNavigationLink>\n </SideNavigationItem>\n <SideNavigationItem value=\"reports\">\n <SideNavigationLink href=\"#reports\">\n <SideNavigationIcon>\n <Icon>\n <Glyph name=\"trending-up\" />\n </Icon>\n </SideNavigationIcon>\n <SideNavigationLabel>Reports</SideNavigationLabel>\n </SideNavigationLink>\n </SideNavigationItem>\n </SideNavigationList>\n </SideNavigation>\n </AppShellNavBody>\n <AppShellNavFooter>\n <Button onClick={() => setOpen(false)}>Close navigation</Button>\n </AppShellNavFooter>\n </AppShellNav>\n <AppShellMain>\n <Stack gap={2}>\n <Heading level={1} size=\"md\">\n Orders\n </Heading>\n <Text tone=\"muted\">128 open orders, 14 awaiting payment.</Text>\n </Stack>\n </AppShellMain>\n </AppShell>\n );\n}\n",
|
|
884
|
+
"verdict": "example"
|
|
885
|
+
},
|
|
886
|
+
{
|
|
887
|
+
"id": "nav-rail",
|
|
888
|
+
"title": "nav-rail.tsx",
|
|
889
|
+
"note": null,
|
|
890
|
+
"language": "tsx",
|
|
891
|
+
"source": "import { useState } from 'react';\nimport {\n AppShell,\n AppShellBanner,\n AppShellBrand,\n AppShellMain,\n AppShellNav,\n AppShellNavBody,\n AppShellNavHeader,\n AppShellNavRail,\n AppShellNavToggle,\n} from '@slotted/react/app-shell';\nimport { IconButton } from '@slotted/react/button';\nimport { Glyph, Icon } from '@slotted/react/icon';\nimport {\n SideNavigation,\n SideNavigationIcon,\n SideNavigationItem,\n SideNavigationLabel,\n SideNavigationLink,\n SideNavigationList,\n} from '@slotted/react/side-navigation';\nimport { Stack } from '@slotted/react/stack';\nimport { Heading, Text } from '@slotted/react/typography';\n\nexport default function AppShellNavRailExample() {\n const [active, setActive] = useState('sales');\n const titles: Record<string, string> = {\n sales: 'Sales',\n warehouse: 'Warehouse',\n finance: 'Finance',\n };\n\n return (\n <AppShell primary=\"main\">\n <AppShellBanner>\n <AppShellBrand>\n <AppShellNavToggle />\n <span>Northwind</span>\n </AppShellBrand>\n </AppShellBanner>\n <AppShellNav>\n <AppShellNavRail aria-label=\"Modules\">\n <IconButton\n aria-current={active === 'sales' ? 'true' : undefined}\n aria-label=\"Sales\"\n onClick={() => setActive('sales')}\n tone=\"secondary\"\n variant={active === 'sales' ? 'solid' : 'ghost'}\n >\n <Glyph name=\"inbox\" />\n </IconButton>\n <IconButton\n aria-current={active === 'warehouse' ? 'true' : undefined}\n aria-label=\"Warehouse\"\n onClick={() => setActive('warehouse')}\n tone=\"secondary\"\n variant={active === 'warehouse' ? 'solid' : 'ghost'}\n >\n <Glyph name=\"calendar\" />\n </IconButton>\n <IconButton\n aria-current={active === 'finance' ? 'true' : undefined}\n aria-label=\"Finance\"\n onClick={() => setActive('finance')}\n tone=\"secondary\"\n variant={active === 'finance' ? 'solid' : 'ghost'}\n >\n <Glyph name=\"trending-up\" />\n </IconButton>\n <AppShellNavToggle />\n </AppShellNavRail>\n <AppShellNavHeader>{titles[active]}</AppShellNavHeader>\n <AppShellNavBody>\n {active === 'sales' && (\n <SideNavigation defaultValue=\"orders\">\n <SideNavigationList>\n <SideNavigationItem value=\"orders\">\n <SideNavigationLink href=\"#orders\">\n <SideNavigationIcon>\n <Icon>\n <Glyph name=\"inbox\" />\n </Icon>\n </SideNavigationIcon>\n <SideNavigationLabel>Orders</SideNavigationLabel>\n </SideNavigationLink>\n </SideNavigationItem>\n <SideNavigationItem value=\"quotes\">\n <SideNavigationLink href=\"#quotes\">\n <SideNavigationIcon>\n <Icon>\n <Glyph name=\"file-text\" />\n </Icon>\n </SideNavigationIcon>\n <SideNavigationLabel>Quotes</SideNavigationLabel>\n </SideNavigationLink>\n </SideNavigationItem>\n </SideNavigationList>\n </SideNavigation>\n )}\n {active === 'warehouse' && (\n <SideNavigation defaultValue=\"shipments\">\n <SideNavigationList>\n <SideNavigationItem value=\"shipments\">\n <SideNavigationLink href=\"#shipments\">\n <SideNavigationIcon>\n <Icon>\n <Glyph name=\"calendar\" />\n </Icon>\n </SideNavigationIcon>\n <SideNavigationLabel>Shipments</SideNavigationLabel>\n </SideNavigationLink>\n </SideNavigationItem>\n <SideNavigationItem value=\"counts\">\n <SideNavigationLink href=\"#counts\">\n <SideNavigationIcon>\n <Icon>\n <Glyph name=\"clock\" />\n </Icon>\n </SideNavigationIcon>\n <SideNavigationLabel>Cycle counts</SideNavigationLabel>\n </SideNavigationLink>\n </SideNavigationItem>\n </SideNavigationList>\n </SideNavigation>\n )}\n {active === 'finance' && (\n <SideNavigation defaultValue=\"invoices\">\n <SideNavigationList>\n <SideNavigationItem value=\"invoices\">\n <SideNavigationLink href=\"#invoices\">\n <SideNavigationIcon>\n <Icon>\n <Glyph name=\"file-spreadsheet\" />\n </Icon>\n </SideNavigationIcon>\n <SideNavigationLabel>Invoices</SideNavigationLabel>\n </SideNavigationLink>\n </SideNavigationItem>\n <SideNavigationItem value=\"reports\">\n <SideNavigationLink href=\"#reports\">\n <SideNavigationIcon>\n <Icon>\n <Glyph name=\"trending-up\" />\n </Icon>\n </SideNavigationIcon>\n <SideNavigationLabel>Reports</SideNavigationLabel>\n </SideNavigationLink>\n </SideNavigationItem>\n </SideNavigationList>\n </SideNavigation>\n )}\n </AppShellNavBody>\n </AppShellNav>\n <AppShellMain>\n <Stack gap={2}>\n <Heading level={1} size=\"md\">\n Orders\n </Heading>\n <Text tone=\"muted\">128 open orders, 14 awaiting payment.</Text>\n </Stack>\n </AppShellMain>\n </AppShell>\n );\n}\n",
|
|
892
|
+
"verdict": "example"
|
|
893
|
+
},
|
|
894
|
+
{
|
|
895
|
+
"id": "reasons",
|
|
896
|
+
"title": "reasons.tsx",
|
|
897
|
+
"note": null,
|
|
898
|
+
"language": "tsx",
|
|
899
|
+
"source": "import { useState } from 'react';\nimport {\n AppShell,\n AppShellBanner,\n AppShellBrand,\n AppShellMain,\n AppShellNav,\n AppShellNavBody,\n AppShellNavToggle,\n} from '@slotted/react/app-shell';\nimport { Glyph, Icon } from '@slotted/react/icon';\nimport {\n SideNavigation,\n SideNavigationIcon,\n SideNavigationItem,\n SideNavigationLabel,\n SideNavigationLink,\n SideNavigationList,\n} from '@slotted/react/side-navigation';\nimport { Stack } from '@slotted/react/stack';\nimport { Heading, Text } from '@slotted/react/typography';\n\nexport default function AppShellReasonsExample() {\n const [open, setOpen] = useState(false);\n const [reason, setReason] = useState('none yet');\n\n return (\n <AppShell\n navMode=\"overlay\"\n navOpen={open}\n onNavOpenChange={(next, request) => {\n setOpen(next);\n setReason(request.reason);\n }}\n >\n <AppShellBanner>\n <AppShellBrand>\n <AppShellNavToggle />\n <span>Northwind</span>\n </AppShellBrand>\n </AppShellBanner>\n <AppShellNav>\n <AppShellNavBody>\n <SideNavigation defaultValue=\"orders\">\n <SideNavigationList>\n <SideNavigationItem value=\"orders\">\n <SideNavigationLink href=\"#orders\">\n <SideNavigationIcon>\n <Icon>\n <Glyph name=\"inbox\" />\n </Icon>\n </SideNavigationIcon>\n <SideNavigationLabel>Orders</SideNavigationLabel>\n </SideNavigationLink>\n </SideNavigationItem>\n <SideNavigationItem value=\"shipments\">\n <SideNavigationLink href=\"#shipments\">\n <SideNavigationIcon>\n <Icon>\n <Glyph name=\"calendar\" />\n </Icon>\n </SideNavigationIcon>\n <SideNavigationLabel>Shipments</SideNavigationLabel>\n </SideNavigationLink>\n </SideNavigationItem>\n <SideNavigationItem value=\"reports\">\n <SideNavigationLink href=\"#reports\">\n <SideNavigationIcon>\n <Icon>\n <Glyph name=\"trending-up\" />\n </Icon>\n </SideNavigationIcon>\n <SideNavigationLabel>Reports</SideNavigationLabel>\n </SideNavigationLink>\n </SideNavigationItem>\n </SideNavigationList>\n </SideNavigation>\n </AppShellNavBody>\n </AppShellNav>\n <AppShellMain>\n <Stack gap={2}>\n <Heading level={1} size=\"md\">\n Orders\n </Heading>\n <Text tone=\"muted\">128 open orders, 14 awaiting payment.</Text>\n <Text size=\"sm\">Last request: {reason}</Text>\n </Stack>\n </AppShellMain>\n </AppShell>\n );\n}\n",
|
|
868
900
|
"verdict": "example"
|
|
869
901
|
}
|
|
870
902
|
]
|