@slotted/react 0.1.0-beta.42 → 0.1.0-beta.44
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/action-sheet-q1UXXruJ.js +360 -0
- package/dist/action-sheet.js +1 -1
- package/dist/{app-shell-D54YkU7E.js → app-shell-BBPY0_KK.js} +217 -195
- package/dist/app-shell.js +1 -1
- package/dist/attachment-DJDXJrCx.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/{button-BMRInd-t.js → button-DS_HpPy0.js} +1 -1
- package/dist/button.js +2 -2
- package/dist/{calendar-YQ784o4d.js → calendar-BO5teotM.js} +1 -1
- package/dist/calendar.js +1 -1
- package/dist/{carousel-B9nMK7Yf.js → carousel-CRNz-T3g.js} +1 -1
- package/dist/carousel.js +1 -1
- package/dist/{cascader-fq8fNWSr.js → cascader-BbhADVGt.js} +134 -131
- package/dist/cascader.js +1 -1
- package/dist/{chart-vedR0BDN.js → chart-C4uPgUW8.js} +2 -2
- package/dist/chart.js +1 -1
- package/dist/{checkbox-DsJhlB5c.js → checkbox-D8HZG0be.js} +3 -3
- package/dist/{checkbox-group-pvX9R_yS.js → checkbox-group-5zuE2Kd1.js} +2 -2
- package/dist/checkbox-group.js +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{clock-DzkQa57Q.js → clock-DeJgwYbZ.js} +1 -1
- package/dist/clock.js +1 -1
- package/dist/{code-block-Cy548yk7.js → code-block-H0lmVVnY.js} +1 -1
- package/dist/code-block.js +1 -1
- package/dist/{color-picker-i-MJ5VVs.js → color-picker-fiLSUBjj.js} +23 -18
- package/dist/color-picker.js +1 -1
- package/dist/{column-manager-D028QbfO.js → column-manager-Cc72e1j-.js} +143 -143
- package/dist/column-manager.js +1 -1
- package/dist/{combobox-599heRN_.js → combobox-DMtXrMYE.js} +1 -1
- package/dist/combobox.js +1 -1
- package/dist/{command-palette-C90CzfQi.js → command-palette-DwjkexvN.js} +174 -162
- package/dist/command-palette.js +1 -1
- package/dist/{context-menu-WM_tT9hz.js → context-menu-CRRp-PhP.js} +12 -6
- package/dist/context-menu.js +1 -1
- package/dist/{currency-field-rS36pjCO.js → currency-field-Cxr8MT75.js} +1 -1
- package/dist/currency-field.js +1 -1
- package/dist/{dashboard-grid-Dh2Q3IQv.js → dashboard-grid-_3H4G0dP.js} +339 -333
- package/dist/dashboard-grid.js +1 -1
- package/dist/{data-grid-D106baPp.js → data-grid-BlElqHOU.js} +19 -19
- package/dist/data-grid.js +1 -1
- package/dist/{data-list-BA0xrySM.js → data-list-5zvM-DUz.js} +19 -18
- package/dist/data-list.js +1 -1
- package/dist/{date-field-BZ5JcvXJ.js → date-field-CjlOWVRA.js} +1 -1
- package/dist/date-field.js +1 -1
- package/dist/{date-picker-BvEbsbJC.js → date-picker-BoIHK8_U.js} +4 -4
- package/dist/date-picker.js +2 -2
- package/dist/{date-range-picker-uIr-yReE.js → date-range-picker-DzuuvudX.js} +5 -5
- package/dist/date-range-picker.js +1 -1
- package/dist/{datetime-field-DDs3mV9Z.js → datetime-field-PSEOgzfN.js} +1 -1
- package/dist/datetime-field.js +1 -1
- package/dist/{datetime-picker-DDYXqrjm.js → datetime-picker-BUhSr8yp.js} +7 -7
- package/dist/datetime-picker.js +1 -1
- package/dist/{datetime-range-picker-CFTHW771.js → datetime-range-picker-DXllehEN.js} +7 -7
- package/dist/datetime-range-picker.js +1 -1
- package/dist/{description-list-D8iTzgC0.js → description-list-1USVlDj3.js} +5 -1
- package/dist/description-list.js +1 -1
- package/dist/detail-panel-Czs05E_D.js +344 -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/action-sheet.examples.md +1 -1
- package/dist/docs/action-sheet.json +3 -3
- package/dist/docs/action-sheet.md +2 -2
- package/dist/docs/app-shell.examples.md +1273 -64
- package/dist/docs/app-shell.json +93 -60
- package/dist/docs/app-shell.md +98 -58
- 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.examples.md +790 -0
- package/dist/docs/avatar-group.json +111 -23
- package/dist/docs/avatar-group.md +46 -86
- package/dist/docs/avatar.json +6 -6
- package/dist/docs/avatar.md +43 -10
- package/dist/docs/badge.json +1 -1
- package/dist/docs/badge.md +15 -3
- package/dist/docs/button-group.json +98 -2
- package/dist/docs/button-group.md +411 -8
- package/dist/docs/button.json +2 -0
- package/dist/docs/button.md +1 -1
- package/dist/docs/calendar.examples.md +512 -0
- package/dist/docs/calendar.json +72 -25
- package/dist/docs/calendar.md +19 -148
- package/dist/docs/carousel.examples.md +868 -0
- package/dist/docs/carousel.json +60 -50
- package/dist/docs/carousel.md +67 -301
- 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 +75 -19
- package/dist/docs/clock.md +328 -23
- package/dist/docs/code-block.json +79 -55
- package/dist/docs/code-block.md +417 -74
- package/dist/docs/collapsible.json +10 -1
- package/dist/docs/collapsible.md +1 -1
- package/dist/docs/color-picker.json +74 -13
- package/dist/docs/color-picker.md +247 -23
- 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 +56 -25
- package/dist/docs/description-list.md +34 -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/drawer.examples.md +1 -1
- package/dist/docs/drawer.json +4 -4
- package/dist/docs/entity-picker.examples.md +1160 -0
- package/dist/docs/entity-picker.json +66 -18
- package/dist/docs/entity-picker.md +72 -247
- package/dist/docs/event-calendar.examples.md +749 -49
- package/dist/docs/event-calendar.json +53 -22
- package/dist/docs/event-calendar.md +82 -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 +42 -25
- package/dist/docs/filter-bar.md +43 -247
- package/dist/docs/floating-panel.json +7 -3
- package/dist/docs/floating-panel.md +23 -5
- 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/hover-card.json +8 -1
- package/dist/docs/hover-card.md +5 -1
- 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 +69 -39
- package/dist/docs/import-export-center.md +123 -229
- package/dist/docs/inline-message.json +8 -8
- package/dist/docs/inline-message.md +37 -31
- package/dist/docs/inline.json +1 -1
- package/dist/docs/inline.md +4 -1
- package/dist/docs/list-item.examples.md +769 -0
- package/dist/docs/list-item.json +113 -38
- package/dist/docs/list-item.md +85 -202
- 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 +585 -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/menu.examples.md +14 -2
- package/dist/docs/menu.json +1 -1
- package/dist/docs/message-scroller.examples.md +1359 -0
- package/dist/docs/message-scroller.json +41 -17
- package/dist/docs/message-scroller.md +93 -134
- package/dist/docs/message.examples.md +954 -0
- package/dist/docs/message.json +68 -18
- package/dist/docs/message.md +39 -327
- package/dist/docs/meter.json +58 -26
- package/dist/docs/meter.md +312 -32
- package/dist/docs/navigation-menu.examples.md +1116 -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 +1062 -0
- package/dist/docs/page-header.json +83 -43
- package/dist/docs/page-header.md +80 -292
- package/dist/docs/page.examples.md +651 -0
- package/dist/docs/page.json +48 -16
- package/dist/docs/page.md +62 -129
- package/dist/docs/popover.json +17 -2
- package/dist/docs/popover.md +2 -0
- package/dist/docs/progress-indicator.json +10 -1
- package/dist/docs/progress-indicator.md +2 -1
- 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 +1097 -0
- package/dist/docs/saved-views.json +53 -21
- package/dist/docs/saved-views.md +85 -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 +679 -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 +78 -28
- package/dist/docs/segmented-control.md +21 -192
- package/dist/docs/side-navigation.examples.md +1473 -0
- package/dist/docs/side-navigation.json +53 -53
- package/dist/docs/side-navigation.md +79 -354
- package/dist/docs/skeleton.json +2 -2
- package/dist/docs/skeleton.md +2 -2
- 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 -33
- package/dist/docs/status-indicator.md +410 -66
- package/dist/docs/stepper.json +53 -21
- package/dist/docs/stepper.md +363 -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/table.json +2 -1
- package/dist/docs/table.md +2 -2
- package/dist/docs/tabs.examples.md +6 -4
- package/dist/docs/tabs.json +7 -5
- package/dist/docs/tabs.md +2 -2
- 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 +622 -0
- package/dist/docs/timeline.json +44 -28
- package/dist/docs/timeline.md +34 -208
- package/dist/docs/toggle-group.json +2 -0
- package/dist/docs/toggle-group.md +1 -1
- package/dist/docs/toggle.json +2 -0
- package/dist/docs/toggle.md +1 -1
- package/dist/docs/tokens.md +8 -0
- package/dist/docs/toolbar.examples.md +529 -0
- package/dist/docs/toolbar.json +58 -18
- package/dist/docs/toolbar.md +36 -171
- package/dist/docs/tooltip.examples.md +46 -0
- package/dist/docs/tooltip.json +23 -0
- package/dist/docs/tooltip.md +2 -0
- package/dist/docs/top-navigation.examples.md +1308 -140
- package/dist/docs/top-navigation.json +49 -33
- package/dist/docs/top-navigation.md +92 -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/tree.examples.md +5 -2
- package/dist/docs/tree.json +2 -2
- package/dist/docs/typography.json +96 -0
- package/dist/docs/typography.md +365 -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/visually-hidden.json +3 -3
- package/dist/docs/visually-hidden.md +68 -41
- package/dist/docs/wizard.examples.md +1389 -0
- package/dist/docs/wizard.json +90 -49
- package/dist/docs/wizard.md +123 -264
- package/dist/drawer-JP3p-QZB.js +879 -0
- package/dist/drawer.js +1 -1
- package/dist/{entity-picker-CC4VoC3p.js → entity-picker-BWpuo-mp.js} +341 -334
- package/dist/entity-picker.js +1 -1
- package/dist/{event-calendar-CjmF_e0H.js → event-calendar-Bxx8eoGK.js} +10 -6
- package/dist/event-calendar.js +1 -1
- package/dist/{field-C-HRhke0.js → field-N0TiMbaI.js} +2 -2
- package/dist/{field-group-CU0PasvW.js → field-group-BrnE6FvP.js} +1 -1
- package/dist/field-group.js +1 -1
- package/dist/field.js +1 -1
- package/dist/{filter-bar-B3QJD7SZ.js → filter-bar-nQH58RVl.js} +361 -347
- package/dist/filter-bar.js +1 -1
- package/dist/{hover-card-CTItbEfH.js → hover-card-D9-rb9ts.js} +67 -63
- package/dist/hover-card.js +1 -1
- package/dist/{icon-button-N8Madx6i.js → icon-button-DzPkQamc.js} +0 -1
- package/dist/import-export-center-BpGga5jr.js +869 -0
- package/dist/import-export-center.js +1 -1
- package/dist/index.js +105 -105
- package/dist/{listbox-ZqiJ2yer.js → listbox-3XVusnCr.js} +1 -1
- package/dist/listbox.js +1 -1
- package/dist/{loading-overlay-BxIktMtQ.js → loading-overlay-BzycGqQA.js} +1 -1
- package/dist/loading-overlay.js +1 -1
- package/dist/{markdown-BdskE4-L.js → markdown-BMda5ino.js} +15 -15
- 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/{multi-select-Dc2d6dDB.js → multi-select-IpsZvoQ2.js} +1 -1
- package/dist/multi-select.js +1 -1
- package/dist/{navigation-menu-parts-CRLmigjy.js → navigation-menu-parts-D-vsDdEF.js} +5 -1
- package/dist/navigation-menu.js +1 -1
- package/dist/{notification-center-BngAw_kt.js → notification-center-CTSfrh9K.js} +3 -3
- package/dist/notification-center.js +1 -1
- package/dist/{number-field-BQ54hXmk.js → number-field-Cp33JMGB.js} +1 -1
- package/dist/number-field.js +1 -1
- package/dist/{otp-input-DRooqa3f.js → otp-input-CEP60HOi.js} +1 -1
- package/dist/otp-input.js +1 -1
- package/dist/{page-header-DmwBGwlm.js → page-header-DK896DGD.js} +105 -110
- package/dist/page-header.js +1 -1
- package/dist/{picker-frame-B6sPCP5Y.js → picker-frame-C3Fhjfaj.js} +1 -1
- package/dist/popover-DED1MTi-.js +615 -0
- package/dist/popover.js +1 -1
- package/dist/{progress-indicator-DRr0Gj6w.js → progress-indicator-Co8e7M5K.js} +6 -3
- package/dist/progress-indicator.js +1 -1
- package/dist/{prompt-composer-tYIs39rn.js → prompt-composer-CwjvdgBR.js} +1 -1
- package/dist/prompt-composer.js +1 -1
- package/dist/{radio-group-AW3xcYYh.js → radio-group-D6bOV_ea.js} +2 -2
- package/dist/radio-group.js +1 -1
- package/dist/{rating-h3qdHLNi.js → rating-D8BvDdjM.js} +1 -1
- package/dist/rating.js +1 -1
- package/dist/{saved-views-nqn0SDXn.js → saved-views-D-CP7JIE.js} +8 -5
- package/dist/saved-views.js +1 -1
- package/dist/section-CVTQdWBl.js +216 -0
- package/dist/section.js +2 -2
- package/dist/{segmented-control-CbK7SurB.js → segmented-control-BLcGhQ4J.js} +3 -3
- package/dist/segmented-control.js +1 -1
- package/dist/{select-d448Wkzb.js → select-Dbc3ng0M.js} +2 -2
- package/dist/{select-tags-3792weoq.js → select-tags-D0SMDPBX.js} +25 -24
- package/dist/select.js +1 -1
- package/dist/{side-navigation-CKRETc8E.js → side-navigation-Dw3-P12f.js} +181 -181
- package/dist/side-navigation.js +1 -1
- package/dist/{skeleton-DeEOmm1y.js → skeleton-DTqt2GEv.js} +27 -20
- package/dist/skeleton.js +1 -1
- package/dist/{slider-DQ2CnxTO.js → slider-COLWTaxi.js} +1 -1
- package/dist/slider.js +1 -1
- package/dist/{split-button-D4MPKSB2.js → split-button-Czr2D3HP.js} +1 -1
- package/dist/split-button.js +1 -1
- package/dist/{stat-card-CL3Xe6pV.js → stat-card-D6NMjkZM.js} +13 -15
- 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/accordion.css +1 -1
- package/dist/styles/action-bar.css +2 -2
- package/dist/styles/action-sheet.css +5 -3
- package/dist/styles/app-shell.css +3 -3
- package/dist/styles/attachment.css +3 -3
- package/dist/styles/avatar-group.css +1 -1
- package/dist/styles/badge.css +1 -1
- package/dist/styles/breadcrumb.css +1 -1
- package/dist/styles/button.css +2 -2
- package/dist/styles/calendar.css +1 -1
- package/dist/styles/card.css +1 -1
- package/dist/styles/carousel.css +1 -1
- package/dist/styles/cascader.css +7 -7
- package/dist/styles/chart.css +6 -4
- package/dist/styles/checkbox-group.css +6 -2
- package/dist/styles/checkbox.css +7 -3
- package/dist/styles/clock.css +1 -1
- package/dist/styles/code-block.css +2 -2
- package/dist/styles/collapsible.css +2 -2
- package/dist/styles/color-picker.css +9 -5
- package/dist/styles/column-manager.css +9 -9
- package/dist/styles/combobox.css +7 -3
- package/dist/styles/command-palette.css +5 -5
- package/dist/styles/context-menu.css +1 -1
- package/dist/styles/currency-field.css +7 -3
- package/dist/styles/dashboard-grid.css +6 -6
- package/dist/styles/data-grid.css +19 -19
- package/dist/styles/data-list.css +9 -9
- package/dist/styles/date-field.css +7 -3
- package/dist/styles/date-picker.css +8 -4
- package/dist/styles/date-range-picker.css +8 -4
- package/dist/styles/datetime-field.css +7 -3
- package/dist/styles/datetime-picker.css +10 -6
- package/dist/styles/datetime-range-picker.css +9 -5
- package/dist/styles/description-list.css +1 -1
- package/dist/styles/detail-panel.css +7 -7
- package/dist/styles/dialog.css +1 -1
- package/dist/styles/divider.css +1 -1
- package/dist/styles/drawer.css +5 -1
- package/dist/styles/entity-picker.css +10 -8
- package/dist/styles/event-calendar.css +12 -8
- package/dist/styles/field-group.css +6 -2
- package/dist/styles/field.css +6 -2
- package/dist/styles/filter-bar.css +20 -20
- package/dist/styles/floating-panel.css +1 -1
- package/dist/styles/hover-card.css +5 -1
- package/dist/styles/import-export-center.css +24 -24
- package/dist/styles/index.css +87 -85
- package/dist/styles/inline.css +1 -1
- package/dist/styles/kbd.css +1 -1
- package/dist/styles/list-item.css +1 -1
- package/dist/styles/listbox.css +7 -3
- package/dist/styles/loading-overlay.css +3 -3
- package/dist/styles/markdown.css +8 -8
- package/dist/styles/media-viewer.css +2 -2
- package/dist/styles/menu.css +1 -1
- package/dist/styles/menubar.css +2 -2
- package/dist/styles/message-scroller.css +1 -1
- package/dist/styles/message.css +1 -1
- package/dist/styles/multi-select.css +9 -7
- package/dist/styles/navigation-menu.css +1 -1
- package/dist/styles/notification-center.css +5 -5
- package/dist/styles/number-field.css +7 -3
- package/dist/styles/otp-input.css +7 -3
- package/dist/styles/page-header.css +4 -4
- package/dist/styles/pagination.css +1 -1
- package/dist/styles/popover.css +5 -1
- package/dist/styles/progress-indicator.css +2 -2
- package/dist/styles/prompt-composer.css +6 -4
- package/dist/styles/radio-group.css +7 -3
- package/dist/styles/rating.css +7 -3
- package/dist/styles/saved-views.css +8 -6
- package/dist/styles/section.css +1 -1
- package/dist/styles/segmented-control.css +7 -3
- package/dist/styles/select.css +8 -4
- package/dist/styles/side-navigation.css +4 -4
- package/dist/styles/skeleton.css +1 -1
- package/dist/styles/slider.css +6 -2
- package/dist/styles/split-button.css +3 -3
- package/dist/styles/stat-card.css +1 -1
- package/dist/styles/status-indicator.css +1 -1
- package/dist/styles/stepper.css +1 -1
- package/dist/styles/switch.css +6 -6
- package/dist/styles/table-of-contents.css +1 -1
- package/dist/styles/table.css +18 -18
- package/dist/styles/tabs.css +1 -1
- package/dist/styles/tag.css +1 -1
- package/dist/styles/tags-input.css +8 -4
- package/dist/styles/text-field.css +7 -3
- package/dist/styles/textarea.css +7 -3
- package/dist/styles/time-field.css +7 -3
- package/dist/styles/time-picker.css +8 -4
- package/dist/styles/time-range-picker.css +8 -4
- package/dist/styles/timeline.css +2 -2
- package/dist/styles/toast.css +3 -3
- package/dist/styles/toggle-group.css +7 -3
- package/dist/styles/toggle.css +1 -1
- package/dist/styles/toolbar.css +2 -2
- package/dist/styles/top-navigation.css +5 -5
- package/dist/styles/tour.css +3 -3
- package/dist/styles/transfer.css +9 -9
- package/dist/styles/tree.css +1 -1
- package/dist/styles/upload.css +10 -6
- package/dist/styles/wizard.css +8 -8
- package/dist/styles.css +1 -1
- package/dist/{switch-DxMukg7F.js → switch-CEbZkLlX.js} +2 -2
- package/dist/switch.js +1 -1
- package/dist/{table-BecApjeD.js → table-BU7XsbQX.js} +169 -162
- package/dist/{table-of-contents-kFr_3Dzs.js → table-of-contents-C410GoEC.js} +1 -1
- package/dist/table-of-contents.js +1 -1
- package/dist/table.js +1 -1
- package/dist/{tags-input-CqCeLtk-.js → tags-input-BdjkB19P.js} +260 -257
- package/dist/tags-input.js +1 -1
- package/dist/{text-field-CMOkJ9Z6.js → text-field-QJnu-rln.js} +1 -1
- package/dist/text-field.js +1 -1
- package/dist/{textarea-DfqPfXTr.js → textarea-DsrXI3xB.js} +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{time-field-GyLQsxcc.js → time-field-DlZdMsNw.js} +1 -1
- package/dist/time-field.js +1 -1
- package/dist/{time-picker-CGHPnust.js → time-picker-WmeCIySv.js} +5 -5
- package/dist/time-picker.js +1 -1
- package/dist/{time-range-picker-BMRtAqPy.js → time-range-picker-CwSbsJPt.js} +6 -6
- package/dist/time-range-picker.js +1 -1
- package/dist/{timeline-BiL2CXfn.js → timeline-ZngK6zLC.js} +9 -6
- package/dist/timeline.js +1 -1
- package/dist/{toast-aM_ga1mc.js → toast-C3xLEFDE.js} +1 -1
- package/dist/toast.js +1 -1
- package/dist/{toggle-group-DZEWkVRo.js → toggle-group-SP_W-yeh.js} +1 -1
- package/dist/toggle-group.js +1 -1
- package/dist/toolbar-BniP4i1C.js +249 -0
- package/dist/toolbar.js +1 -1
- package/dist/tooltip-UPICnTij.js +418 -0
- package/dist/tooltip.js +1 -1
- package/dist/top-navigation--OcOpGCy.js +744 -0
- package/dist/top-navigation.js +2 -2
- package/dist/{tour-ALH5CYMY.js → tour-7-TXdrMv.js} +2 -2
- package/dist/tour.js +1 -1
- package/dist/{transfer-sKUvmEKe.js → transfer-DX6umI2M.js} +6 -6
- package/dist/transfer.js +1 -1
- package/dist/types/action-sheet/action-sheet-parts.d.ts.map +1 -1
- package/dist/types/app-shell/app-shell.d.ts.map +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/cascader/cascader-surface.d.ts +6 -1
- package/dist/types/cascader/cascader-surface.d.ts.map +1 -1
- package/dist/types/cascader/cascader.d.ts.map +1 -1
- package/dist/types/clock/clock.types.d.ts +5 -2
- package/dist/types/clock/clock.types.d.ts.map +1 -1
- package/dist/types/color-picker/color-picker.d.ts.map +1 -1
- package/dist/types/column-manager/column-manager.d.ts.map +1 -1
- package/dist/types/command-palette/command-palette.d.ts.map +1 -1
- package/dist/types/context-menu/context-menu.d.ts.map +1 -1
- package/dist/types/dashboard-grid/dashboard-grid.types.d.ts +2 -1
- package/dist/types/dashboard-grid/dashboard-grid.types.d.ts.map +1 -1
- package/dist/types/dashboard-grid/dashboard-widget.d.ts.map +1 -1
- package/dist/types/data-list/data-list.d.ts.map +1 -1
- package/dist/types/description-list/description-list-parts.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/drawer/drawer-parts.d.ts +8 -3
- package/dist/types/drawer/drawer-parts.d.ts.map +1 -1
- package/dist/types/drawer/drawer.types.d.ts +2 -1
- package/dist/types/drawer/drawer.types.d.ts.map +1 -1
- package/dist/types/entity-picker/entity-picker.d.ts.map +1 -1
- package/dist/types/event-calendar/event-calendar.d.ts.map +1 -1
- package/dist/types/filter-bar/filter-bar-rules.d.ts.map +1 -1
- package/dist/types/hover-card/hover-card.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/navigation-menu/navigation-menu-parts.d.ts.map +1 -1
- package/dist/types/page-header/page-header-parts.d.ts.map +1 -1
- package/dist/types/popover/index.d.ts +1 -1
- package/dist/types/popover/index.d.ts.map +1 -1
- package/dist/types/popover/popover-defaults.d.ts.map +1 -1
- package/dist/types/popover/popover-parts.d.ts +2 -1
- package/dist/types/popover/popover-parts.d.ts.map +1 -1
- package/dist/types/popover/popover.d.ts +1 -1
- package/dist/types/popover/popover.d.ts.map +1 -1
- package/dist/types/popover/popover.types.d.ts +20 -0
- package/dist/types/popover/popover.types.d.ts.map +1 -1
- package/dist/types/progress-indicator/progress-bar.d.ts.map +1 -1
- package/dist/types/saved-views/saved-views.d.ts +1 -0
- package/dist/types/saved-views/saved-views.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/select/select-tags.d.ts.map +1 -1
- package/dist/types/side-navigation/side-navigation-parts.d.ts.map +1 -1
- package/dist/types/skeleton/skeleton-region-context.d.ts +2 -0
- package/dist/types/skeleton/skeleton-region-context.d.ts.map +1 -1
- package/dist/types/skeleton/skeleton-region.d.ts.map +1 -1
- package/dist/types/skeleton/skeleton-text.d.ts.map +1 -1
- package/dist/types/skeleton/skeleton.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/table/table-parts.d.ts.map +1 -1
- package/dist/types/tags-input/tags-input.d.ts.map +1 -1
- package/dist/types/time-picker/time-picker.d.ts.map +1 -1
- package/dist/types/time-range-picker/time-range-picker.d.ts.map +1 -1
- package/dist/types/timeline/timeline-parts.d.ts.map +1 -1
- package/dist/types/toolbar/toolbar.d.ts.map +1 -1
- package/dist/types/toolbar/toolbar.types.d.ts +1 -1
- package/dist/types/toolbar/toolbar.types.d.ts.map +1 -1
- package/dist/types/tooltip/tooltip-defaults.d.ts.map +1 -1
- package/dist/types/tooltip/tooltip-parts.d.ts.map +1 -1
- package/dist/types/tooltip/tooltip.d.ts +1 -1
- package/dist/types/tooltip/tooltip.d.ts.map +1 -1
- package/dist/types/tooltip/tooltip.types.d.ts +17 -0
- package/dist/types/tooltip/tooltip.types.d.ts.map +1 -1
- package/dist/types/top-navigation/top-navigation.d.ts.map +1 -1
- package/dist/types/tour/tour.d.ts.map +1 -1
- package/dist/{upload-CuMOaPK3.js → upload-BtD1nLHa.js} +2 -2
- package/dist/upload.js +1 -1
- package/dist/{use-date-picker-DdSX3RE4.js → use-date-picker-CwH791Jm.js} +2 -2
- package/dist/{use-picker-draft-I_pxqYsc.js → use-picker-draft-BnLS4lDY.js} +1 -1
- package/dist/wizard-6PTtBoi4.js +838 -0
- package/dist/wizard.js +1 -1
- package/package.json +6 -6
- package/dist/action-sheet-BouG2qh_.js +0 -360
- package/dist/attachment-MqczA38F.js +0 -292
- package/dist/detail-panel-EImAtksY.js +0 -327
- package/dist/drawer-CQagePr_.js +0 -830
- package/dist/import-export-center-CW8YVZev.js +0 -867
- package/dist/message-D1Dd6Y2k.js +0 -452
- package/dist/popover-1DlOu95x.js +0 -576
- package/dist/section-D_qOfdxR.js +0 -213
- package/dist/toolbar-BP7ka6lN.js +0 -243
- package/dist/tooltip-DrFiRlH8.js +0 -411
- package/dist/top-navigation-D8IHPOmm.js +0 -744
- package/dist/wizard-4c0X7Bx_.js +0 -838
|
@@ -23,7 +23,7 @@ Excerpt — not a complete module
|
|
|
23
23
|
|
|
24
24
|
### The frame with nothing in it
|
|
25
25
|
|
|
26
|
-
Every part the contract declares, drawn as its own name. Everything else
|
|
26
|
+
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.
|
|
27
27
|
|
|
28
28
|
Excerpt — not a complete module
|
|
29
29
|
|
|
@@ -58,14 +58,133 @@ Excerpt — not a complete module
|
|
|
58
58
|
|
|
59
59
|
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.
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
Example
|
|
62
62
|
|
|
63
63
|
```tsx
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
import {
|
|
65
|
+
AppShell,
|
|
66
|
+
AppShellActions,
|
|
67
|
+
AppShellBanner,
|
|
68
|
+
AppShellBrand,
|
|
69
|
+
AppShellCenter,
|
|
70
|
+
AppShellFooter,
|
|
71
|
+
AppShellMain,
|
|
72
|
+
AppShellNav,
|
|
73
|
+
AppShellNavBody,
|
|
74
|
+
AppShellNavFooter,
|
|
75
|
+
AppShellNavHeader,
|
|
76
|
+
AppShellNavPinned,
|
|
77
|
+
AppShellNavToggle,
|
|
78
|
+
} from '@slotted/react/app-shell';
|
|
79
|
+
import { Avatar } from '@slotted/react/avatar';
|
|
80
|
+
import { Button, IconButton } from '@slotted/react/button';
|
|
81
|
+
import { Glyph, Icon } from '@slotted/react/icon';
|
|
82
|
+
import { Page, PageBody } from '@slotted/react/page';
|
|
83
|
+
import {
|
|
84
|
+
SideNavigation,
|
|
85
|
+
SideNavigationIcon,
|
|
86
|
+
SideNavigationItem,
|
|
87
|
+
SideNavigationLabel,
|
|
88
|
+
SideNavigationLink,
|
|
89
|
+
SideNavigationList,
|
|
90
|
+
} from '@slotted/react/side-navigation';
|
|
91
|
+
import { Stack } from '@slotted/react/stack';
|
|
92
|
+
import { TextField } from '@slotted/react/text-field';
|
|
93
|
+
import { Heading, Text } from '@slotted/react/typography';
|
|
94
|
+
|
|
95
|
+
export default function AppShellRegionsExample() {
|
|
96
|
+
return (
|
|
97
|
+
<AppShell>
|
|
98
|
+
<AppShellBanner>
|
|
99
|
+
<AppShellBrand>
|
|
100
|
+
<AppShellNavToggle />
|
|
101
|
+
<span>Northwind</span>
|
|
102
|
+
</AppShellBrand>
|
|
103
|
+
<AppShellCenter>
|
|
104
|
+
<TextField
|
|
105
|
+
aria-label="Search orders"
|
|
106
|
+
placeholder="Search orders"
|
|
107
|
+
start={
|
|
108
|
+
<Icon>
|
|
109
|
+
<Glyph name="search" />
|
|
110
|
+
</Icon>
|
|
111
|
+
}
|
|
112
|
+
type="search"
|
|
113
|
+
/>
|
|
114
|
+
</AppShellCenter>
|
|
115
|
+
<AppShellActions>
|
|
116
|
+
<IconButton aria-label="Notifications" tone="secondary" variant="ghost">
|
|
117
|
+
<Glyph name="bell" />
|
|
118
|
+
</IconButton>
|
|
119
|
+
<Avatar
|
|
120
|
+
name="Maria Chen"
|
|
121
|
+
src="https://api.dicebear.com/11.x/lorelei/svg?seed=Maria%20Chen&backgroundColor=b6e3f4,c0aede,d1d4f9,ffd5dc,ffdfbf"
|
|
122
|
+
/>
|
|
123
|
+
</AppShellActions>
|
|
124
|
+
</AppShellBanner>
|
|
125
|
+
<AppShellNav>
|
|
126
|
+
<AppShellNavHeader>Rotterdam warehouse</AppShellNavHeader>
|
|
127
|
+
<AppShellNavPinned>
|
|
128
|
+
<Button>New order</Button>
|
|
129
|
+
</AppShellNavPinned>
|
|
130
|
+
<AppShellNavBody>
|
|
131
|
+
<SideNavigation defaultValue="orders">
|
|
132
|
+
<SideNavigationList>
|
|
133
|
+
<SideNavigationItem value="orders">
|
|
134
|
+
<SideNavigationLink href="#orders">
|
|
135
|
+
<SideNavigationIcon>
|
|
136
|
+
<Icon>
|
|
137
|
+
<Glyph name="inbox" />
|
|
138
|
+
</Icon>
|
|
139
|
+
</SideNavigationIcon>
|
|
140
|
+
<SideNavigationLabel>Orders</SideNavigationLabel>
|
|
141
|
+
</SideNavigationLink>
|
|
142
|
+
</SideNavigationItem>
|
|
143
|
+
<SideNavigationItem value="shipments">
|
|
144
|
+
<SideNavigationLink href="#shipments">
|
|
145
|
+
<SideNavigationIcon>
|
|
146
|
+
<Icon>
|
|
147
|
+
<Glyph name="calendar" />
|
|
148
|
+
</Icon>
|
|
149
|
+
</SideNavigationIcon>
|
|
150
|
+
<SideNavigationLabel>Shipments</SideNavigationLabel>
|
|
151
|
+
</SideNavigationLink>
|
|
152
|
+
</SideNavigationItem>
|
|
153
|
+
<SideNavigationItem value="reports">
|
|
154
|
+
<SideNavigationLink href="#reports">
|
|
155
|
+
<SideNavigationIcon>
|
|
156
|
+
<Icon>
|
|
157
|
+
<Glyph name="trending-up" />
|
|
158
|
+
</Icon>
|
|
159
|
+
</SideNavigationIcon>
|
|
160
|
+
<SideNavigationLabel>Reports</SideNavigationLabel>
|
|
161
|
+
</SideNavigationLink>
|
|
162
|
+
</SideNavigationItem>
|
|
163
|
+
</SideNavigationList>
|
|
164
|
+
</SideNavigation>
|
|
165
|
+
</AppShellNavBody>
|
|
166
|
+
<AppShellNavFooter>
|
|
167
|
+
<Text size="sm" tone="muted">
|
|
168
|
+
Maria Chen, shift lead
|
|
169
|
+
</Text>
|
|
170
|
+
</AppShellNavFooter>
|
|
171
|
+
</AppShellNav>
|
|
172
|
+
<AppShellMain>
|
|
173
|
+
<Page ground="surface" landmark="none">
|
|
174
|
+
<PageBody>
|
|
175
|
+
<Stack gap={2}>
|
|
176
|
+
<Heading level={1} size="md">
|
|
177
|
+
Orders
|
|
178
|
+
</Heading>
|
|
179
|
+
<Text tone="muted">128 open orders, 14 awaiting payment.</Text>
|
|
180
|
+
</Stack>
|
|
181
|
+
</PageBody>
|
|
182
|
+
</Page>
|
|
183
|
+
</AppShellMain>
|
|
184
|
+
<AppShellFooter>Northwind Traders, EU region</AppShellFooter>
|
|
185
|
+
</AppShell>
|
|
186
|
+
);
|
|
187
|
+
}
|
|
69
188
|
```
|
|
70
189
|
|
|
71
190
|
### Three clusters, and the one that grows
|
|
@@ -161,15 +280,106 @@ Excerpt — not a complete module
|
|
|
161
280
|
|
|
162
281
|
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.
|
|
163
282
|
|
|
164
|
-
|
|
283
|
+
Example
|
|
165
284
|
|
|
166
285
|
```tsx
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
286
|
+
import { useState } from 'react';
|
|
287
|
+
import {
|
|
288
|
+
AppShell,
|
|
289
|
+
AppShellBanner,
|
|
290
|
+
AppShellBrand,
|
|
291
|
+
type AppShellCollapsedTo,
|
|
292
|
+
AppShellMain,
|
|
293
|
+
AppShellNav,
|
|
294
|
+
AppShellNavBody,
|
|
295
|
+
AppShellNavToggle,
|
|
296
|
+
} from '@slotted/react/app-shell';
|
|
297
|
+
import { Glyph, Icon } from '@slotted/react/icon';
|
|
298
|
+
import { Page, PageBody } from '@slotted/react/page';
|
|
299
|
+
import { Segment, SegmentedControl } from '@slotted/react/segmented-control';
|
|
300
|
+
import {
|
|
301
|
+
SideNavigation,
|
|
302
|
+
SideNavigationIcon,
|
|
303
|
+
SideNavigationItem,
|
|
304
|
+
SideNavigationLabel,
|
|
305
|
+
SideNavigationLink,
|
|
306
|
+
SideNavigationList,
|
|
307
|
+
} from '@slotted/react/side-navigation';
|
|
308
|
+
import { Stack } from '@slotted/react/stack';
|
|
309
|
+
import { Heading, Text } from '@slotted/react/typography';
|
|
310
|
+
|
|
311
|
+
export default function AppShellRailExample() {
|
|
312
|
+
const [collapsedTo, setCollapsedTo] = useState<AppShellCollapsedTo>('rail');
|
|
313
|
+
|
|
314
|
+
return (
|
|
315
|
+
<AppShell collapsedTo={collapsedTo} defaultNavOpen={false}>
|
|
316
|
+
<AppShellBanner>
|
|
317
|
+
<AppShellBrand>
|
|
318
|
+
<AppShellNavToggle />
|
|
319
|
+
<span>Northwind</span>
|
|
320
|
+
</AppShellBrand>
|
|
321
|
+
</AppShellBanner>
|
|
322
|
+
<AppShellNav>
|
|
323
|
+
<AppShellNavBody>
|
|
324
|
+
<SideNavigation defaultValue="orders">
|
|
325
|
+
<SideNavigationList>
|
|
326
|
+
<SideNavigationItem value="orders">
|
|
327
|
+
<SideNavigationLink href="#orders">
|
|
328
|
+
<SideNavigationIcon>
|
|
329
|
+
<Icon>
|
|
330
|
+
<Glyph name="inbox" />
|
|
331
|
+
</Icon>
|
|
332
|
+
</SideNavigationIcon>
|
|
333
|
+
<SideNavigationLabel>Orders</SideNavigationLabel>
|
|
334
|
+
</SideNavigationLink>
|
|
335
|
+
</SideNavigationItem>
|
|
336
|
+
<SideNavigationItem value="shipments">
|
|
337
|
+
<SideNavigationLink href="#shipments">
|
|
338
|
+
<SideNavigationIcon>
|
|
339
|
+
<Icon>
|
|
340
|
+
<Glyph name="calendar" />
|
|
341
|
+
</Icon>
|
|
342
|
+
</SideNavigationIcon>
|
|
343
|
+
<SideNavigationLabel>Shipments</SideNavigationLabel>
|
|
344
|
+
</SideNavigationLink>
|
|
345
|
+
</SideNavigationItem>
|
|
346
|
+
<SideNavigationItem value="reports">
|
|
347
|
+
<SideNavigationLink href="#reports">
|
|
348
|
+
<SideNavigationIcon>
|
|
349
|
+
<Icon>
|
|
350
|
+
<Glyph name="trending-up" />
|
|
351
|
+
</Icon>
|
|
352
|
+
</SideNavigationIcon>
|
|
353
|
+
<SideNavigationLabel>Reports</SideNavigationLabel>
|
|
354
|
+
</SideNavigationLink>
|
|
355
|
+
</SideNavigationItem>
|
|
356
|
+
</SideNavigationList>
|
|
357
|
+
</SideNavigation>
|
|
358
|
+
</AppShellNavBody>
|
|
359
|
+
</AppShellNav>
|
|
360
|
+
<AppShellMain>
|
|
361
|
+
<Page ground="surface" landmark="none">
|
|
362
|
+
<PageBody>
|
|
363
|
+
<Stack gap={2}>
|
|
364
|
+
<Heading level={1} size="md">
|
|
365
|
+
Reports
|
|
366
|
+
</Heading>
|
|
367
|
+
<Text tone="muted">Margin by warehouse, updated at 06:00.</Text>
|
|
368
|
+
</Stack>
|
|
369
|
+
<SegmentedControl
|
|
370
|
+
aria-label="Closed navigation"
|
|
371
|
+
onValueChange={(next) => setCollapsedTo(next as AppShellCollapsedTo)}
|
|
372
|
+
value={collapsedTo}
|
|
373
|
+
>
|
|
374
|
+
<Segment value="rail">Rail</Segment>
|
|
375
|
+
<Segment value="hidden">Hidden</Segment>
|
|
376
|
+
</SegmentedControl>
|
|
377
|
+
</PageBody>
|
|
378
|
+
</Page>
|
|
379
|
+
</AppShellMain>
|
|
380
|
+
</AppShell>
|
|
381
|
+
);
|
|
382
|
+
}
|
|
173
383
|
```
|
|
174
384
|
|
|
175
385
|
### Two levels, one region
|
|
@@ -210,45 +420,228 @@ Excerpt — not a complete module
|
|
|
210
420
|
|
|
211
421
|
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.
|
|
212
422
|
|
|
213
|
-
|
|
423
|
+
Example
|
|
214
424
|
|
|
215
425
|
```tsx
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
426
|
+
import { useState } from 'react';
|
|
427
|
+
import {
|
|
428
|
+
AppShell,
|
|
429
|
+
AppShellAside,
|
|
430
|
+
AppShellAsideBody,
|
|
431
|
+
AppShellAsideFooter,
|
|
432
|
+
AppShellAsideHeader,
|
|
433
|
+
AppShellAsideToggle,
|
|
434
|
+
AppShellBanner,
|
|
435
|
+
AppShellBrand,
|
|
436
|
+
AppShellMain,
|
|
437
|
+
AppShellNav,
|
|
438
|
+
AppShellNavBody,
|
|
439
|
+
AppShellNavToggle,
|
|
440
|
+
} from '@slotted/react/app-shell';
|
|
441
|
+
import { Button } from '@slotted/react/button';
|
|
442
|
+
import { Glyph, Icon } from '@slotted/react/icon';
|
|
443
|
+
import { Inline } from '@slotted/react/inline';
|
|
444
|
+
import { Page, PageBody } from '@slotted/react/page';
|
|
445
|
+
import {
|
|
446
|
+
SideNavigation,
|
|
447
|
+
SideNavigationIcon,
|
|
448
|
+
SideNavigationItem,
|
|
449
|
+
SideNavigationLabel,
|
|
450
|
+
SideNavigationLink,
|
|
451
|
+
SideNavigationList,
|
|
452
|
+
} from '@slotted/react/side-navigation';
|
|
453
|
+
import { Stack } from '@slotted/react/stack';
|
|
454
|
+
import { Heading, Text } from '@slotted/react/typography';
|
|
455
|
+
|
|
456
|
+
export default function AppShellAsideExample() {
|
|
457
|
+
const [selected, setSelected] = useState<string | undefined>();
|
|
458
|
+
const details: Record<string, string> = {
|
|
459
|
+
'SH-3101': '12 pallets from Antwerp to Cologne, delivered.',
|
|
460
|
+
'SH-3102': '18 pallets from Rotterdam to Lyon, due Thursday.',
|
|
461
|
+
'SH-3103': '6 pallets from Hamburg to Prague, held at customs.',
|
|
462
|
+
};
|
|
463
|
+
|
|
464
|
+
return (
|
|
465
|
+
<AppShell
|
|
466
|
+
asideOpen={selected !== undefined}
|
|
467
|
+
onAsideOpenChange={(open) => {
|
|
468
|
+
if (!open) setSelected(undefined);
|
|
469
|
+
}}
|
|
470
|
+
>
|
|
471
|
+
<AppShellBanner>
|
|
472
|
+
<AppShellBrand>
|
|
473
|
+
<AppShellNavToggle />
|
|
474
|
+
<span>Northwind</span>
|
|
475
|
+
</AppShellBrand>
|
|
476
|
+
</AppShellBanner>
|
|
477
|
+
<AppShellNav>
|
|
478
|
+
<AppShellNavBody>
|
|
479
|
+
<SideNavigation defaultValue="orders">
|
|
480
|
+
<SideNavigationList>
|
|
481
|
+
<SideNavigationItem value="orders">
|
|
482
|
+
<SideNavigationLink href="#orders">
|
|
483
|
+
<SideNavigationIcon>
|
|
484
|
+
<Icon>
|
|
485
|
+
<Glyph name="inbox" />
|
|
486
|
+
</Icon>
|
|
487
|
+
</SideNavigationIcon>
|
|
488
|
+
<SideNavigationLabel>Orders</SideNavigationLabel>
|
|
489
|
+
</SideNavigationLink>
|
|
490
|
+
</SideNavigationItem>
|
|
491
|
+
<SideNavigationItem value="shipments">
|
|
492
|
+
<SideNavigationLink href="#shipments">
|
|
493
|
+
<SideNavigationIcon>
|
|
494
|
+
<Icon>
|
|
495
|
+
<Glyph name="calendar" />
|
|
496
|
+
</Icon>
|
|
497
|
+
</SideNavigationIcon>
|
|
498
|
+
<SideNavigationLabel>Shipments</SideNavigationLabel>
|
|
499
|
+
</SideNavigationLink>
|
|
500
|
+
</SideNavigationItem>
|
|
501
|
+
<SideNavigationItem value="reports">
|
|
502
|
+
<SideNavigationLink href="#reports">
|
|
503
|
+
<SideNavigationIcon>
|
|
504
|
+
<Icon>
|
|
505
|
+
<Glyph name="trending-up" />
|
|
506
|
+
</Icon>
|
|
507
|
+
</SideNavigationIcon>
|
|
508
|
+
<SideNavigationLabel>Reports</SideNavigationLabel>
|
|
509
|
+
</SideNavigationLink>
|
|
510
|
+
</SideNavigationItem>
|
|
511
|
+
</SideNavigationList>
|
|
512
|
+
</SideNavigation>
|
|
513
|
+
</AppShellNavBody>
|
|
514
|
+
</AppShellNav>
|
|
515
|
+
<AppShellMain>
|
|
516
|
+
<Page ground="surface" landmark="none">
|
|
517
|
+
<PageBody>
|
|
518
|
+
<Stack gap={2}>
|
|
519
|
+
<Heading level={1} size="md">
|
|
520
|
+
Shipments
|
|
521
|
+
</Heading>
|
|
522
|
+
<Inline gap={2}>
|
|
523
|
+
<Button onClick={() => setSelected('SH-3101')} tone="secondary" variant="outline">
|
|
524
|
+
SH-3101
|
|
525
|
+
</Button>
|
|
526
|
+
<Button onClick={() => setSelected('SH-3102')} tone="secondary" variant="outline">
|
|
527
|
+
SH-3102
|
|
528
|
+
</Button>
|
|
529
|
+
<Button onClick={() => setSelected('SH-3103')} tone="secondary" variant="outline">
|
|
530
|
+
SH-3103
|
|
531
|
+
</Button>
|
|
532
|
+
</Inline>
|
|
533
|
+
</Stack>
|
|
534
|
+
</PageBody>
|
|
535
|
+
</Page>
|
|
536
|
+
</AppShellMain>
|
|
537
|
+
<AppShellAside>
|
|
538
|
+
<AppShellAsideHeader>
|
|
539
|
+
<span>{selected}</span>
|
|
540
|
+
<AppShellAsideToggle />
|
|
541
|
+
</AppShellAsideHeader>
|
|
542
|
+
<AppShellAsideBody>
|
|
543
|
+
<Text>{selected === undefined ? '' : details[selected]}</Text>
|
|
544
|
+
</AppShellAsideBody>
|
|
545
|
+
<AppShellAsideFooter>
|
|
546
|
+
<Button>Reschedule pickup</Button>
|
|
547
|
+
</AppShellAsideFooter>
|
|
548
|
+
</AppShellAside>
|
|
549
|
+
</AppShell>
|
|
550
|
+
);
|
|
551
|
+
}
|
|
237
552
|
```
|
|
238
553
|
|
|
239
554
|
### The layer, and what it does to the rest
|
|
240
555
|
|
|
241
556
|
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.
|
|
242
557
|
|
|
243
|
-
|
|
558
|
+
Example
|
|
244
559
|
|
|
245
560
|
```tsx
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
561
|
+
import {
|
|
562
|
+
AppShell,
|
|
563
|
+
AppShellBanner,
|
|
564
|
+
AppShellBrand,
|
|
565
|
+
AppShellMain,
|
|
566
|
+
AppShellNav,
|
|
567
|
+
AppShellNavBody,
|
|
568
|
+
AppShellNavToggle,
|
|
569
|
+
} from '@slotted/react/app-shell';
|
|
570
|
+
import { Glyph, Icon } from '@slotted/react/icon';
|
|
571
|
+
import { Page, PageBody } from '@slotted/react/page';
|
|
572
|
+
import {
|
|
573
|
+
SideNavigation,
|
|
574
|
+
SideNavigationIcon,
|
|
575
|
+
SideNavigationItem,
|
|
576
|
+
SideNavigationLabel,
|
|
577
|
+
SideNavigationLink,
|
|
578
|
+
SideNavigationList,
|
|
579
|
+
} from '@slotted/react/side-navigation';
|
|
580
|
+
import { Stack } from '@slotted/react/stack';
|
|
581
|
+
import { Heading, Text } from '@slotted/react/typography';
|
|
582
|
+
|
|
583
|
+
export default function AppShellOverlayExample() {
|
|
584
|
+
return (
|
|
585
|
+
<AppShell defaultNavOpen={false} navMode="overlay">
|
|
586
|
+
<AppShellBanner>
|
|
587
|
+
<AppShellBrand>
|
|
588
|
+
<AppShellNavToggle />
|
|
589
|
+
<span>Northwind</span>
|
|
590
|
+
</AppShellBrand>
|
|
591
|
+
</AppShellBanner>
|
|
592
|
+
<AppShellNav>
|
|
593
|
+
<AppShellNavBody>
|
|
594
|
+
<SideNavigation defaultValue="orders">
|
|
595
|
+
<SideNavigationList>
|
|
596
|
+
<SideNavigationItem value="orders">
|
|
597
|
+
<SideNavigationLink href="#orders">
|
|
598
|
+
<SideNavigationIcon>
|
|
599
|
+
<Icon>
|
|
600
|
+
<Glyph name="inbox" />
|
|
601
|
+
</Icon>
|
|
602
|
+
</SideNavigationIcon>
|
|
603
|
+
<SideNavigationLabel>Orders</SideNavigationLabel>
|
|
604
|
+
</SideNavigationLink>
|
|
605
|
+
</SideNavigationItem>
|
|
606
|
+
<SideNavigationItem value="shipments">
|
|
607
|
+
<SideNavigationLink href="#shipments">
|
|
608
|
+
<SideNavigationIcon>
|
|
609
|
+
<Icon>
|
|
610
|
+
<Glyph name="calendar" />
|
|
611
|
+
</Icon>
|
|
612
|
+
</SideNavigationIcon>
|
|
613
|
+
<SideNavigationLabel>Shipments</SideNavigationLabel>
|
|
614
|
+
</SideNavigationLink>
|
|
615
|
+
</SideNavigationItem>
|
|
616
|
+
<SideNavigationItem value="reports">
|
|
617
|
+
<SideNavigationLink href="#reports">
|
|
618
|
+
<SideNavigationIcon>
|
|
619
|
+
<Icon>
|
|
620
|
+
<Glyph name="trending-up" />
|
|
621
|
+
</Icon>
|
|
622
|
+
</SideNavigationIcon>
|
|
623
|
+
<SideNavigationLabel>Reports</SideNavigationLabel>
|
|
624
|
+
</SideNavigationLink>
|
|
625
|
+
</SideNavigationItem>
|
|
626
|
+
</SideNavigationList>
|
|
627
|
+
</SideNavigation>
|
|
628
|
+
</AppShellNavBody>
|
|
629
|
+
</AppShellNav>
|
|
630
|
+
<AppShellMain>
|
|
631
|
+
<Page ground="surface" landmark="none">
|
|
632
|
+
<PageBody>
|
|
633
|
+
<Stack gap={2}>
|
|
634
|
+
<Heading level={1} size="md">
|
|
635
|
+
Orders
|
|
636
|
+
</Heading>
|
|
637
|
+
<Text tone="muted">128 open orders, 14 awaiting payment.</Text>
|
|
638
|
+
</Stack>
|
|
639
|
+
</PageBody>
|
|
640
|
+
</Page>
|
|
641
|
+
</AppShellMain>
|
|
642
|
+
</AppShell>
|
|
643
|
+
);
|
|
644
|
+
}
|
|
252
645
|
```
|
|
253
646
|
|
|
254
647
|
### Which region reaches the corner
|
|
@@ -265,14 +658,142 @@ Excerpt — not a complete module
|
|
|
265
658
|
|
|
266
659
|
### Sides, sizes and the mirror
|
|
267
660
|
|
|
268
|
-
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
|
|
661
|
+
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.
|
|
269
662
|
|
|
270
|
-
|
|
663
|
+
Example
|
|
271
664
|
|
|
272
665
|
```tsx
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
666
|
+
import { useState } from 'react';
|
|
667
|
+
import {
|
|
668
|
+
AppShell,
|
|
669
|
+
AppShellAside,
|
|
670
|
+
AppShellAsideBody,
|
|
671
|
+
AppShellAsideHeader,
|
|
672
|
+
AppShellAsideToggle,
|
|
673
|
+
AppShellBanner,
|
|
674
|
+
AppShellBrand,
|
|
675
|
+
AppShellMain,
|
|
676
|
+
AppShellNav,
|
|
677
|
+
AppShellNavBody,
|
|
678
|
+
type AppShellNavSide,
|
|
679
|
+
AppShellNavToggle,
|
|
680
|
+
type AppShellSize,
|
|
681
|
+
} from '@slotted/react/app-shell';
|
|
682
|
+
import { Glyph, Icon } from '@slotted/react/icon';
|
|
683
|
+
import { Page, PageBody } from '@slotted/react/page';
|
|
684
|
+
import { Segment, SegmentedControl } from '@slotted/react/segmented-control';
|
|
685
|
+
import {
|
|
686
|
+
SideNavigation,
|
|
687
|
+
SideNavigationIcon,
|
|
688
|
+
SideNavigationItem,
|
|
689
|
+
SideNavigationLabel,
|
|
690
|
+
SideNavigationLink,
|
|
691
|
+
SideNavigationList,
|
|
692
|
+
} from '@slotted/react/side-navigation';
|
|
693
|
+
import { Stack } from '@slotted/react/stack';
|
|
694
|
+
import { Heading, Text } from '@slotted/react/typography';
|
|
695
|
+
|
|
696
|
+
export default function AppShellSidesExample() {
|
|
697
|
+
const [navSide, setNavSide] = useState<AppShellNavSide>('start');
|
|
698
|
+
const [navSize, setNavSize] = useState<AppShellSize>('md');
|
|
699
|
+
const [asideSize, setAsideSize] = useState<AppShellSize>('md');
|
|
700
|
+
|
|
701
|
+
return (
|
|
702
|
+
<AppShell asideSize={asideSize} navSide={navSide} navSize={navSize}>
|
|
703
|
+
<AppShellBanner>
|
|
704
|
+
<AppShellBrand>
|
|
705
|
+
<AppShellNavToggle />
|
|
706
|
+
<span>Northwind</span>
|
|
707
|
+
</AppShellBrand>
|
|
708
|
+
</AppShellBanner>
|
|
709
|
+
<AppShellNav>
|
|
710
|
+
<AppShellNavBody>
|
|
711
|
+
<SideNavigation defaultValue="orders">
|
|
712
|
+
<SideNavigationList>
|
|
713
|
+
<SideNavigationItem value="orders">
|
|
714
|
+
<SideNavigationLink href="#orders">
|
|
715
|
+
<SideNavigationIcon>
|
|
716
|
+
<Icon>
|
|
717
|
+
<Glyph name="inbox" />
|
|
718
|
+
</Icon>
|
|
719
|
+
</SideNavigationIcon>
|
|
720
|
+
<SideNavigationLabel>Orders</SideNavigationLabel>
|
|
721
|
+
</SideNavigationLink>
|
|
722
|
+
</SideNavigationItem>
|
|
723
|
+
<SideNavigationItem value="shipments">
|
|
724
|
+
<SideNavigationLink href="#shipments">
|
|
725
|
+
<SideNavigationIcon>
|
|
726
|
+
<Icon>
|
|
727
|
+
<Glyph name="calendar" />
|
|
728
|
+
</Icon>
|
|
729
|
+
</SideNavigationIcon>
|
|
730
|
+
<SideNavigationLabel>Shipments</SideNavigationLabel>
|
|
731
|
+
</SideNavigationLink>
|
|
732
|
+
</SideNavigationItem>
|
|
733
|
+
<SideNavigationItem value="reports">
|
|
734
|
+
<SideNavigationLink href="#reports">
|
|
735
|
+
<SideNavigationIcon>
|
|
736
|
+
<Icon>
|
|
737
|
+
<Glyph name="trending-up" />
|
|
738
|
+
</Icon>
|
|
739
|
+
</SideNavigationIcon>
|
|
740
|
+
<SideNavigationLabel>Reports</SideNavigationLabel>
|
|
741
|
+
</SideNavigationLink>
|
|
742
|
+
</SideNavigationItem>
|
|
743
|
+
</SideNavigationList>
|
|
744
|
+
</SideNavigation>
|
|
745
|
+
</AppShellNavBody>
|
|
746
|
+
</AppShellNav>
|
|
747
|
+
<AppShellMain>
|
|
748
|
+
<Page ground="surface" landmark="none">
|
|
749
|
+
<PageBody>
|
|
750
|
+
<Stack gap={2}>
|
|
751
|
+
<Heading level={1} size="md">
|
|
752
|
+
Shipments
|
|
753
|
+
</Heading>
|
|
754
|
+
<Text tone="muted">23 in transit, 4 late.</Text>
|
|
755
|
+
</Stack>
|
|
756
|
+
<SegmentedControl
|
|
757
|
+
aria-label="Navigation side"
|
|
758
|
+
onValueChange={(next) => setNavSide(next as AppShellNavSide)}
|
|
759
|
+
value={navSide}
|
|
760
|
+
>
|
|
761
|
+
<Segment value="start">Start</Segment>
|
|
762
|
+
<Segment value="end">End</Segment>
|
|
763
|
+
</SegmentedControl>
|
|
764
|
+
<SegmentedControl
|
|
765
|
+
aria-label="Navigation size"
|
|
766
|
+
onValueChange={(next) => setNavSize(next as AppShellSize)}
|
|
767
|
+
value={navSize}
|
|
768
|
+
>
|
|
769
|
+
<Segment value="sm">SM</Segment>
|
|
770
|
+
<Segment value="md">MD</Segment>
|
|
771
|
+
<Segment value="lg">LG</Segment>
|
|
772
|
+
</SegmentedControl>
|
|
773
|
+
<SegmentedControl
|
|
774
|
+
aria-label="Pane size"
|
|
775
|
+
onValueChange={(next) => setAsideSize(next as AppShellSize)}
|
|
776
|
+
value={asideSize}
|
|
777
|
+
>
|
|
778
|
+
<Segment value="sm">SM</Segment>
|
|
779
|
+
<Segment value="md">MD</Segment>
|
|
780
|
+
<Segment value="lg">LG</Segment>
|
|
781
|
+
</SegmentedControl>
|
|
782
|
+
</PageBody>
|
|
783
|
+
</Page>
|
|
784
|
+
</AppShellMain>
|
|
785
|
+
<AppShellAside>
|
|
786
|
+
<AppShellAsideHeader>
|
|
787
|
+
<span>Shipment SH-3102</span>
|
|
788
|
+
<AppShellAsideToggle />
|
|
789
|
+
</AppShellAsideHeader>
|
|
790
|
+
<AppShellAsideBody>
|
|
791
|
+
<Text>18 pallets from Rotterdam to Lyon, due Thursday.</Text>
|
|
792
|
+
</AppShellAsideBody>
|
|
793
|
+
</AppShellAside>
|
|
794
|
+
</AppShell>
|
|
795
|
+
);
|
|
796
|
+
}
|
|
276
797
|
```
|
|
277
798
|
|
|
278
799
|
### Who scrolls
|
|
@@ -288,18 +809,110 @@ Excerpt — not a complete module
|
|
|
288
809
|
|
|
289
810
|
### The wait for the next page
|
|
290
811
|
|
|
291
|
-
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
|
|
812
|
+
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.
|
|
292
813
|
|
|
293
|
-
|
|
814
|
+
Example
|
|
294
815
|
|
|
295
816
|
```tsx
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
817
|
+
import { useState } from 'react';
|
|
818
|
+
import {
|
|
819
|
+
AppShell,
|
|
820
|
+
AppShellBanner,
|
|
821
|
+
AppShellBrand,
|
|
822
|
+
AppShellMain,
|
|
823
|
+
AppShellNav,
|
|
824
|
+
AppShellNavBody,
|
|
825
|
+
AppShellNavToggle,
|
|
826
|
+
AppShellProgress,
|
|
827
|
+
} from '@slotted/react/app-shell';
|
|
828
|
+
import { Button } from '@slotted/react/button';
|
|
829
|
+
import { Glyph, Icon } from '@slotted/react/icon';
|
|
830
|
+
import { Inline } from '@slotted/react/inline';
|
|
831
|
+
import { Page, PageBody } from '@slotted/react/page';
|
|
832
|
+
import {
|
|
833
|
+
SideNavigation,
|
|
834
|
+
SideNavigationIcon,
|
|
835
|
+
SideNavigationItem,
|
|
836
|
+
SideNavigationLabel,
|
|
837
|
+
SideNavigationLink,
|
|
838
|
+
SideNavigationList,
|
|
839
|
+
} from '@slotted/react/side-navigation';
|
|
840
|
+
import { Stack } from '@slotted/react/stack';
|
|
841
|
+
import { Heading, Text } from '@slotted/react/typography';
|
|
842
|
+
|
|
843
|
+
export default function AppShellProgressExample() {
|
|
844
|
+
const [loading, setLoading] = useState(false);
|
|
845
|
+
|
|
846
|
+
function handleRefresh() {
|
|
847
|
+
setLoading(true);
|
|
848
|
+
setTimeout(() => setLoading(false), 2500);
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
return (
|
|
852
|
+
<AppShell>
|
|
853
|
+
<AppShellBanner>
|
|
854
|
+
<AppShellBrand>
|
|
855
|
+
<AppShellNavToggle />
|
|
856
|
+
<span>Northwind</span>
|
|
857
|
+
</AppShellBrand>
|
|
858
|
+
</AppShellBanner>
|
|
859
|
+
<AppShellNav>
|
|
860
|
+
<AppShellNavBody>
|
|
861
|
+
<SideNavigation defaultValue="orders">
|
|
862
|
+
<SideNavigationList>
|
|
863
|
+
<SideNavigationItem value="orders">
|
|
864
|
+
<SideNavigationLink href="#orders">
|
|
865
|
+
<SideNavigationIcon>
|
|
866
|
+
<Icon>
|
|
867
|
+
<Glyph name="inbox" />
|
|
868
|
+
</Icon>
|
|
869
|
+
</SideNavigationIcon>
|
|
870
|
+
<SideNavigationLabel>Orders</SideNavigationLabel>
|
|
871
|
+
</SideNavigationLink>
|
|
872
|
+
</SideNavigationItem>
|
|
873
|
+
<SideNavigationItem value="shipments">
|
|
874
|
+
<SideNavigationLink href="#shipments">
|
|
875
|
+
<SideNavigationIcon>
|
|
876
|
+
<Icon>
|
|
877
|
+
<Glyph name="calendar" />
|
|
878
|
+
</Icon>
|
|
879
|
+
</SideNavigationIcon>
|
|
880
|
+
<SideNavigationLabel>Shipments</SideNavigationLabel>
|
|
881
|
+
</SideNavigationLink>
|
|
882
|
+
</SideNavigationItem>
|
|
883
|
+
<SideNavigationItem value="reports">
|
|
884
|
+
<SideNavigationLink href="#reports">
|
|
885
|
+
<SideNavigationIcon>
|
|
886
|
+
<Icon>
|
|
887
|
+
<Glyph name="trending-up" />
|
|
888
|
+
</Icon>
|
|
889
|
+
</SideNavigationIcon>
|
|
890
|
+
<SideNavigationLabel>Reports</SideNavigationLabel>
|
|
891
|
+
</SideNavigationLink>
|
|
892
|
+
</SideNavigationItem>
|
|
893
|
+
</SideNavigationList>
|
|
894
|
+
</SideNavigation>
|
|
895
|
+
</AppShellNavBody>
|
|
896
|
+
</AppShellNav>
|
|
897
|
+
<AppShellMain>
|
|
898
|
+
<Page ground="surface" landmark="none">
|
|
899
|
+
<PageBody>
|
|
900
|
+
<Stack gap={2}>
|
|
901
|
+
<Heading level={1} size="md">
|
|
902
|
+
Orders
|
|
903
|
+
</Heading>
|
|
904
|
+
<Text tone="muted">128 open orders, 14 awaiting payment.</Text>
|
|
905
|
+
<Inline gap={2}>
|
|
906
|
+
<Button onClick={handleRefresh}>Open reports</Button>
|
|
907
|
+
</Inline>
|
|
908
|
+
</Stack>
|
|
909
|
+
</PageBody>
|
|
910
|
+
</Page>
|
|
911
|
+
</AppShellMain>
|
|
912
|
+
<AppShellProgress loading={loading} />
|
|
913
|
+
</AppShell>
|
|
914
|
+
);
|
|
915
|
+
}
|
|
303
916
|
```
|
|
304
917
|
|
|
305
918
|
### The first thing a keyboard meets
|
|
@@ -336,15 +949,96 @@ Excerpt — not a complete module
|
|
|
336
949
|
|
|
337
950
|
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.
|
|
338
951
|
|
|
339
|
-
|
|
952
|
+
Example
|
|
340
953
|
|
|
341
954
|
```tsx
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
955
|
+
import {
|
|
956
|
+
AppShell,
|
|
957
|
+
AppShellBanner,
|
|
958
|
+
AppShellBrand,
|
|
959
|
+
AppShellDefaultsProvider,
|
|
960
|
+
AppShellMain,
|
|
961
|
+
AppShellNav,
|
|
962
|
+
AppShellNavBody,
|
|
963
|
+
AppShellNavToggle,
|
|
964
|
+
} from '@slotted/react/app-shell';
|
|
965
|
+
import { Glyph, Icon } from '@slotted/react/icon';
|
|
966
|
+
import { Page, PageBody } from '@slotted/react/page';
|
|
967
|
+
import {
|
|
968
|
+
SideNavigation,
|
|
969
|
+
SideNavigationIcon,
|
|
970
|
+
SideNavigationItem,
|
|
971
|
+
SideNavigationLabel,
|
|
972
|
+
SideNavigationLink,
|
|
973
|
+
SideNavigationList,
|
|
974
|
+
} from '@slotted/react/side-navigation';
|
|
975
|
+
import { Stack } from '@slotted/react/stack';
|
|
976
|
+
import { Heading, Text } from '@slotted/react/typography';
|
|
977
|
+
|
|
978
|
+
export default function AppShellDefaultsExample() {
|
|
979
|
+
return (
|
|
980
|
+
<AppShellDefaultsProvider canvas="panel" navSize="sm" primary="nav">
|
|
981
|
+
<AppShell messages={{ skipToMain: 'Skip to the order list' }}>
|
|
982
|
+
<AppShellBanner>
|
|
983
|
+
<AppShellBrand>
|
|
984
|
+
<AppShellNavToggle />
|
|
985
|
+
<span>Northwind</span>
|
|
986
|
+
</AppShellBrand>
|
|
987
|
+
</AppShellBanner>
|
|
988
|
+
<AppShellNav>
|
|
989
|
+
<AppShellNavBody>
|
|
990
|
+
<SideNavigation defaultValue="orders">
|
|
991
|
+
<SideNavigationList>
|
|
992
|
+
<SideNavigationItem value="orders">
|
|
993
|
+
<SideNavigationLink href="#orders">
|
|
994
|
+
<SideNavigationIcon>
|
|
995
|
+
<Icon>
|
|
996
|
+
<Glyph name="inbox" />
|
|
997
|
+
</Icon>
|
|
998
|
+
</SideNavigationIcon>
|
|
999
|
+
<SideNavigationLabel>Orders</SideNavigationLabel>
|
|
1000
|
+
</SideNavigationLink>
|
|
1001
|
+
</SideNavigationItem>
|
|
1002
|
+
<SideNavigationItem value="shipments">
|
|
1003
|
+
<SideNavigationLink href="#shipments">
|
|
1004
|
+
<SideNavigationIcon>
|
|
1005
|
+
<Icon>
|
|
1006
|
+
<Glyph name="calendar" />
|
|
1007
|
+
</Icon>
|
|
1008
|
+
</SideNavigationIcon>
|
|
1009
|
+
<SideNavigationLabel>Shipments</SideNavigationLabel>
|
|
1010
|
+
</SideNavigationLink>
|
|
1011
|
+
</SideNavigationItem>
|
|
1012
|
+
<SideNavigationItem value="reports">
|
|
1013
|
+
<SideNavigationLink href="#reports">
|
|
1014
|
+
<SideNavigationIcon>
|
|
1015
|
+
<Icon>
|
|
1016
|
+
<Glyph name="trending-up" />
|
|
1017
|
+
</Icon>
|
|
1018
|
+
</SideNavigationIcon>
|
|
1019
|
+
<SideNavigationLabel>Reports</SideNavigationLabel>
|
|
1020
|
+
</SideNavigationLink>
|
|
1021
|
+
</SideNavigationItem>
|
|
1022
|
+
</SideNavigationList>
|
|
1023
|
+
</SideNavigation>
|
|
1024
|
+
</AppShellNavBody>
|
|
1025
|
+
</AppShellNav>
|
|
1026
|
+
<AppShellMain>
|
|
1027
|
+
<Page ground="surface" landmark="none">
|
|
1028
|
+
<PageBody>
|
|
1029
|
+
<Stack gap={2}>
|
|
1030
|
+
<Heading level={1} size="md">
|
|
1031
|
+
Orders
|
|
1032
|
+
</Heading>
|
|
1033
|
+
<Text tone="muted">128 open orders, 14 awaiting payment.</Text>
|
|
1034
|
+
</Stack>
|
|
1035
|
+
</PageBody>
|
|
1036
|
+
</Page>
|
|
1037
|
+
</AppShellMain>
|
|
1038
|
+
</AppShell>
|
|
1039
|
+
</AppShellDefaultsProvider>
|
|
1040
|
+
);
|
|
1041
|
+
}
|
|
348
1042
|
```
|
|
349
1043
|
|
|
350
1044
|
### The families that live inside it
|
|
@@ -372,3 +1066,518 @@ Excerpt — not a complete module
|
|
|
372
1066
|
<AppShellNav aria-label="Main navigation">…</AppShellNav>;
|
|
373
1067
|
<AppShellAside aria-label="Order details">…</AppShellAside>;
|
|
374
1068
|
```
|
|
1069
|
+
|
|
1070
|
+
### arrangement.tsx
|
|
1071
|
+
|
|
1072
|
+
Example
|
|
1073
|
+
|
|
1074
|
+
```tsx
|
|
1075
|
+
import { useState } from 'react';
|
|
1076
|
+
import {
|
|
1077
|
+
AppShell,
|
|
1078
|
+
AppShellBanner,
|
|
1079
|
+
AppShellBrand,
|
|
1080
|
+
type AppShellCanvas,
|
|
1081
|
+
AppShellMain,
|
|
1082
|
+
AppShellNav,
|
|
1083
|
+
AppShellNavBody,
|
|
1084
|
+
AppShellNavToggle,
|
|
1085
|
+
type AppShellPrimary,
|
|
1086
|
+
type AppShellSeparation,
|
|
1087
|
+
} from '@slotted/react/app-shell';
|
|
1088
|
+
import { Glyph, Icon } from '@slotted/react/icon';
|
|
1089
|
+
import { Page, PageBody } from '@slotted/react/page';
|
|
1090
|
+
import { Segment, SegmentedControl } from '@slotted/react/segmented-control';
|
|
1091
|
+
import {
|
|
1092
|
+
SideNavigation,
|
|
1093
|
+
SideNavigationIcon,
|
|
1094
|
+
SideNavigationItem,
|
|
1095
|
+
SideNavigationLabel,
|
|
1096
|
+
SideNavigationLink,
|
|
1097
|
+
SideNavigationList,
|
|
1098
|
+
} from '@slotted/react/side-navigation';
|
|
1099
|
+
import { Stack } from '@slotted/react/stack';
|
|
1100
|
+
import { Heading, Text } from '@slotted/react/typography';
|
|
1101
|
+
|
|
1102
|
+
export default function AppShellArrangementExample() {
|
|
1103
|
+
const [primary, setPrimary] = useState<AppShellPrimary>('banner');
|
|
1104
|
+
const [canvas, setCanvas] = useState<AppShellCanvas>('flush');
|
|
1105
|
+
const [separation, setSeparation] = useState<AppShellSeparation>('rule');
|
|
1106
|
+
|
|
1107
|
+
return (
|
|
1108
|
+
<AppShell canvas={canvas} primary={primary} separation={separation}>
|
|
1109
|
+
<AppShellBanner>
|
|
1110
|
+
<AppShellBrand>
|
|
1111
|
+
<AppShellNavToggle />
|
|
1112
|
+
<span>Northwind</span>
|
|
1113
|
+
</AppShellBrand>
|
|
1114
|
+
</AppShellBanner>
|
|
1115
|
+
<AppShellNav>
|
|
1116
|
+
<AppShellNavBody>
|
|
1117
|
+
<SideNavigation defaultValue="orders">
|
|
1118
|
+
<SideNavigationList>
|
|
1119
|
+
<SideNavigationItem value="orders">
|
|
1120
|
+
<SideNavigationLink href="#orders">
|
|
1121
|
+
<SideNavigationIcon>
|
|
1122
|
+
<Icon>
|
|
1123
|
+
<Glyph name="inbox" />
|
|
1124
|
+
</Icon>
|
|
1125
|
+
</SideNavigationIcon>
|
|
1126
|
+
<SideNavigationLabel>Orders</SideNavigationLabel>
|
|
1127
|
+
</SideNavigationLink>
|
|
1128
|
+
</SideNavigationItem>
|
|
1129
|
+
<SideNavigationItem value="shipments">
|
|
1130
|
+
<SideNavigationLink href="#shipments">
|
|
1131
|
+
<SideNavigationIcon>
|
|
1132
|
+
<Icon>
|
|
1133
|
+
<Glyph name="calendar" />
|
|
1134
|
+
</Icon>
|
|
1135
|
+
</SideNavigationIcon>
|
|
1136
|
+
<SideNavigationLabel>Shipments</SideNavigationLabel>
|
|
1137
|
+
</SideNavigationLink>
|
|
1138
|
+
</SideNavigationItem>
|
|
1139
|
+
<SideNavigationItem value="reports">
|
|
1140
|
+
<SideNavigationLink href="#reports">
|
|
1141
|
+
<SideNavigationIcon>
|
|
1142
|
+
<Icon>
|
|
1143
|
+
<Glyph name="trending-up" />
|
|
1144
|
+
</Icon>
|
|
1145
|
+
</SideNavigationIcon>
|
|
1146
|
+
<SideNavigationLabel>Reports</SideNavigationLabel>
|
|
1147
|
+
</SideNavigationLink>
|
|
1148
|
+
</SideNavigationItem>
|
|
1149
|
+
</SideNavigationList>
|
|
1150
|
+
</SideNavigation>
|
|
1151
|
+
</AppShellNavBody>
|
|
1152
|
+
</AppShellNav>
|
|
1153
|
+
<AppShellMain>
|
|
1154
|
+
<Page ground="surface" landmark="none">
|
|
1155
|
+
<PageBody>
|
|
1156
|
+
<Stack gap={2}>
|
|
1157
|
+
<Heading level={1} size="md">
|
|
1158
|
+
Orders
|
|
1159
|
+
</Heading>
|
|
1160
|
+
<Text tone="muted">128 open orders, 14 awaiting payment.</Text>
|
|
1161
|
+
</Stack>
|
|
1162
|
+
<SegmentedControl
|
|
1163
|
+
aria-label="Primary region"
|
|
1164
|
+
onValueChange={(next) => setPrimary(next as AppShellPrimary)}
|
|
1165
|
+
value={primary}
|
|
1166
|
+
>
|
|
1167
|
+
<Segment value="banner">Banner</Segment>
|
|
1168
|
+
<Segment value="nav">Nav</Segment>
|
|
1169
|
+
<Segment value="main">Main</Segment>
|
|
1170
|
+
</SegmentedControl>
|
|
1171
|
+
<SegmentedControl
|
|
1172
|
+
aria-label="Canvas"
|
|
1173
|
+
onValueChange={(next) => setCanvas(next as AppShellCanvas)}
|
|
1174
|
+
value={canvas}
|
|
1175
|
+
>
|
|
1176
|
+
<Segment value="inset">Inset</Segment>
|
|
1177
|
+
<Segment value="flush">Flush</Segment>
|
|
1178
|
+
<Segment value="floating">Floating</Segment>
|
|
1179
|
+
<Segment value="panel">Panel</Segment>
|
|
1180
|
+
</SegmentedControl>
|
|
1181
|
+
<SegmentedControl
|
|
1182
|
+
aria-label="Separation"
|
|
1183
|
+
onValueChange={(next) => setSeparation(next as AppShellSeparation)}
|
|
1184
|
+
value={separation}
|
|
1185
|
+
>
|
|
1186
|
+
<Segment value="rule">Rule</Segment>
|
|
1187
|
+
<Segment value="tone">Tone</Segment>
|
|
1188
|
+
</SegmentedControl>
|
|
1189
|
+
</PageBody>
|
|
1190
|
+
</Page>
|
|
1191
|
+
</AppShellMain>
|
|
1192
|
+
</AppShell>
|
|
1193
|
+
);
|
|
1194
|
+
}
|
|
1195
|
+
```
|
|
1196
|
+
|
|
1197
|
+
### dismissal.tsx
|
|
1198
|
+
|
|
1199
|
+
Example
|
|
1200
|
+
|
|
1201
|
+
```tsx
|
|
1202
|
+
import { useState } from 'react';
|
|
1203
|
+
import {
|
|
1204
|
+
AppShell,
|
|
1205
|
+
AppShellBanner,
|
|
1206
|
+
AppShellBrand,
|
|
1207
|
+
AppShellMain,
|
|
1208
|
+
AppShellNav,
|
|
1209
|
+
AppShellNavBody,
|
|
1210
|
+
AppShellNavFooter,
|
|
1211
|
+
AppShellNavToggle,
|
|
1212
|
+
} from '@slotted/react/app-shell';
|
|
1213
|
+
import { Button } from '@slotted/react/button';
|
|
1214
|
+
import { Glyph, Icon } from '@slotted/react/icon';
|
|
1215
|
+
import { Page, PageBody } from '@slotted/react/page';
|
|
1216
|
+
import {
|
|
1217
|
+
SideNavigation,
|
|
1218
|
+
SideNavigationIcon,
|
|
1219
|
+
SideNavigationItem,
|
|
1220
|
+
SideNavigationLabel,
|
|
1221
|
+
SideNavigationLink,
|
|
1222
|
+
SideNavigationList,
|
|
1223
|
+
} from '@slotted/react/side-navigation';
|
|
1224
|
+
import { Stack } from '@slotted/react/stack';
|
|
1225
|
+
import { Heading, Text } from '@slotted/react/typography';
|
|
1226
|
+
|
|
1227
|
+
export default function AppShellDismissalExample() {
|
|
1228
|
+
const [open, setOpen] = useState(false);
|
|
1229
|
+
|
|
1230
|
+
return (
|
|
1231
|
+
<AppShell
|
|
1232
|
+
back="none"
|
|
1233
|
+
closeOnNavigate={false}
|
|
1234
|
+
escape="none"
|
|
1235
|
+
modal={false}
|
|
1236
|
+
navMode="overlay"
|
|
1237
|
+
navOpen={open}
|
|
1238
|
+
onNavOpenChange={setOpen}
|
|
1239
|
+
outsidePress="none"
|
|
1240
|
+
>
|
|
1241
|
+
<AppShellBanner>
|
|
1242
|
+
<AppShellBrand>
|
|
1243
|
+
<AppShellNavToggle />
|
|
1244
|
+
<span>Northwind</span>
|
|
1245
|
+
</AppShellBrand>
|
|
1246
|
+
</AppShellBanner>
|
|
1247
|
+
<AppShellNav>
|
|
1248
|
+
<AppShellNavBody>
|
|
1249
|
+
<SideNavigation defaultValue="orders">
|
|
1250
|
+
<SideNavigationList>
|
|
1251
|
+
<SideNavigationItem value="orders">
|
|
1252
|
+
<SideNavigationLink href="#orders">
|
|
1253
|
+
<SideNavigationIcon>
|
|
1254
|
+
<Icon>
|
|
1255
|
+
<Glyph name="inbox" />
|
|
1256
|
+
</Icon>
|
|
1257
|
+
</SideNavigationIcon>
|
|
1258
|
+
<SideNavigationLabel>Orders</SideNavigationLabel>
|
|
1259
|
+
</SideNavigationLink>
|
|
1260
|
+
</SideNavigationItem>
|
|
1261
|
+
<SideNavigationItem value="shipments">
|
|
1262
|
+
<SideNavigationLink href="#shipments">
|
|
1263
|
+
<SideNavigationIcon>
|
|
1264
|
+
<Icon>
|
|
1265
|
+
<Glyph name="calendar" />
|
|
1266
|
+
</Icon>
|
|
1267
|
+
</SideNavigationIcon>
|
|
1268
|
+
<SideNavigationLabel>Shipments</SideNavigationLabel>
|
|
1269
|
+
</SideNavigationLink>
|
|
1270
|
+
</SideNavigationItem>
|
|
1271
|
+
<SideNavigationItem value="reports">
|
|
1272
|
+
<SideNavigationLink href="#reports">
|
|
1273
|
+
<SideNavigationIcon>
|
|
1274
|
+
<Icon>
|
|
1275
|
+
<Glyph name="trending-up" />
|
|
1276
|
+
</Icon>
|
|
1277
|
+
</SideNavigationIcon>
|
|
1278
|
+
<SideNavigationLabel>Reports</SideNavigationLabel>
|
|
1279
|
+
</SideNavigationLink>
|
|
1280
|
+
</SideNavigationItem>
|
|
1281
|
+
</SideNavigationList>
|
|
1282
|
+
</SideNavigation>
|
|
1283
|
+
</AppShellNavBody>
|
|
1284
|
+
<AppShellNavFooter>
|
|
1285
|
+
<Button onClick={() => setOpen(false)}>Close navigation</Button>
|
|
1286
|
+
</AppShellNavFooter>
|
|
1287
|
+
</AppShellNav>
|
|
1288
|
+
<AppShellMain>
|
|
1289
|
+
<Page ground="surface" landmark="none">
|
|
1290
|
+
<PageBody>
|
|
1291
|
+
<Stack gap={2}>
|
|
1292
|
+
<Heading level={1} size="md">
|
|
1293
|
+
Orders
|
|
1294
|
+
</Heading>
|
|
1295
|
+
<Text tone="muted">128 open orders, 14 awaiting payment.</Text>
|
|
1296
|
+
</Stack>
|
|
1297
|
+
</PageBody>
|
|
1298
|
+
</Page>
|
|
1299
|
+
</AppShellMain>
|
|
1300
|
+
</AppShell>
|
|
1301
|
+
);
|
|
1302
|
+
}
|
|
1303
|
+
```
|
|
1304
|
+
|
|
1305
|
+
### nav-rail.tsx
|
|
1306
|
+
|
|
1307
|
+
Example
|
|
1308
|
+
|
|
1309
|
+
```tsx
|
|
1310
|
+
import { useState } from 'react';
|
|
1311
|
+
import {
|
|
1312
|
+
AppShell,
|
|
1313
|
+
AppShellBanner,
|
|
1314
|
+
AppShellBrand,
|
|
1315
|
+
AppShellMain,
|
|
1316
|
+
AppShellNav,
|
|
1317
|
+
AppShellNavBody,
|
|
1318
|
+
AppShellNavHeader,
|
|
1319
|
+
AppShellNavRail,
|
|
1320
|
+
AppShellNavToggle,
|
|
1321
|
+
} from '@slotted/react/app-shell';
|
|
1322
|
+
import { IconButton } from '@slotted/react/button';
|
|
1323
|
+
import { Glyph, Icon } from '@slotted/react/icon';
|
|
1324
|
+
import { Page, PageBody } from '@slotted/react/page';
|
|
1325
|
+
import {
|
|
1326
|
+
SideNavigation,
|
|
1327
|
+
SideNavigationIcon,
|
|
1328
|
+
SideNavigationItem,
|
|
1329
|
+
SideNavigationLabel,
|
|
1330
|
+
SideNavigationLink,
|
|
1331
|
+
SideNavigationList,
|
|
1332
|
+
} from '@slotted/react/side-navigation';
|
|
1333
|
+
import { Stack } from '@slotted/react/stack';
|
|
1334
|
+
import { Heading, Text } from '@slotted/react/typography';
|
|
1335
|
+
|
|
1336
|
+
export default function AppShellNavRailExample() {
|
|
1337
|
+
const [active, setActive] = useState('sales');
|
|
1338
|
+
const titles: Record<string, string> = {
|
|
1339
|
+
sales: 'Sales',
|
|
1340
|
+
warehouse: 'Warehouse',
|
|
1341
|
+
finance: 'Finance',
|
|
1342
|
+
};
|
|
1343
|
+
|
|
1344
|
+
return (
|
|
1345
|
+
<AppShell primary="main">
|
|
1346
|
+
<AppShellBanner>
|
|
1347
|
+
<AppShellBrand>
|
|
1348
|
+
<AppShellNavToggle />
|
|
1349
|
+
<span>Northwind</span>
|
|
1350
|
+
</AppShellBrand>
|
|
1351
|
+
</AppShellBanner>
|
|
1352
|
+
<AppShellNav>
|
|
1353
|
+
<AppShellNavRail aria-label="Modules">
|
|
1354
|
+
<IconButton
|
|
1355
|
+
aria-current={active === 'sales' ? 'true' : undefined}
|
|
1356
|
+
aria-label="Sales"
|
|
1357
|
+
onClick={() => setActive('sales')}
|
|
1358
|
+
tone="secondary"
|
|
1359
|
+
variant={active === 'sales' ? 'solid' : 'ghost'}
|
|
1360
|
+
>
|
|
1361
|
+
<Glyph name="inbox" />
|
|
1362
|
+
</IconButton>
|
|
1363
|
+
<IconButton
|
|
1364
|
+
aria-current={active === 'warehouse' ? 'true' : undefined}
|
|
1365
|
+
aria-label="Warehouse"
|
|
1366
|
+
onClick={() => setActive('warehouse')}
|
|
1367
|
+
tone="secondary"
|
|
1368
|
+
variant={active === 'warehouse' ? 'solid' : 'ghost'}
|
|
1369
|
+
>
|
|
1370
|
+
<Glyph name="calendar" />
|
|
1371
|
+
</IconButton>
|
|
1372
|
+
<IconButton
|
|
1373
|
+
aria-current={active === 'finance' ? 'true' : undefined}
|
|
1374
|
+
aria-label="Finance"
|
|
1375
|
+
onClick={() => setActive('finance')}
|
|
1376
|
+
tone="secondary"
|
|
1377
|
+
variant={active === 'finance' ? 'solid' : 'ghost'}
|
|
1378
|
+
>
|
|
1379
|
+
<Glyph name="trending-up" />
|
|
1380
|
+
</IconButton>
|
|
1381
|
+
<AppShellNavToggle />
|
|
1382
|
+
</AppShellNavRail>
|
|
1383
|
+
<AppShellNavHeader>{titles[active]}</AppShellNavHeader>
|
|
1384
|
+
<AppShellNavBody>
|
|
1385
|
+
{active === 'sales' && (
|
|
1386
|
+
<SideNavigation defaultValue="orders">
|
|
1387
|
+
<SideNavigationList>
|
|
1388
|
+
<SideNavigationItem value="orders">
|
|
1389
|
+
<SideNavigationLink href="#orders">
|
|
1390
|
+
<SideNavigationIcon>
|
|
1391
|
+
<Icon>
|
|
1392
|
+
<Glyph name="inbox" />
|
|
1393
|
+
</Icon>
|
|
1394
|
+
</SideNavigationIcon>
|
|
1395
|
+
<SideNavigationLabel>Orders</SideNavigationLabel>
|
|
1396
|
+
</SideNavigationLink>
|
|
1397
|
+
</SideNavigationItem>
|
|
1398
|
+
<SideNavigationItem value="quotes">
|
|
1399
|
+
<SideNavigationLink href="#quotes">
|
|
1400
|
+
<SideNavigationIcon>
|
|
1401
|
+
<Icon>
|
|
1402
|
+
<Glyph name="file-text" />
|
|
1403
|
+
</Icon>
|
|
1404
|
+
</SideNavigationIcon>
|
|
1405
|
+
<SideNavigationLabel>Quotes</SideNavigationLabel>
|
|
1406
|
+
</SideNavigationLink>
|
|
1407
|
+
</SideNavigationItem>
|
|
1408
|
+
</SideNavigationList>
|
|
1409
|
+
</SideNavigation>
|
|
1410
|
+
)}
|
|
1411
|
+
{active === 'warehouse' && (
|
|
1412
|
+
<SideNavigation defaultValue="shipments">
|
|
1413
|
+
<SideNavigationList>
|
|
1414
|
+
<SideNavigationItem value="shipments">
|
|
1415
|
+
<SideNavigationLink href="#shipments">
|
|
1416
|
+
<SideNavigationIcon>
|
|
1417
|
+
<Icon>
|
|
1418
|
+
<Glyph name="calendar" />
|
|
1419
|
+
</Icon>
|
|
1420
|
+
</SideNavigationIcon>
|
|
1421
|
+
<SideNavigationLabel>Shipments</SideNavigationLabel>
|
|
1422
|
+
</SideNavigationLink>
|
|
1423
|
+
</SideNavigationItem>
|
|
1424
|
+
<SideNavigationItem value="counts">
|
|
1425
|
+
<SideNavigationLink href="#counts">
|
|
1426
|
+
<SideNavigationIcon>
|
|
1427
|
+
<Icon>
|
|
1428
|
+
<Glyph name="clock" />
|
|
1429
|
+
</Icon>
|
|
1430
|
+
</SideNavigationIcon>
|
|
1431
|
+
<SideNavigationLabel>Cycle counts</SideNavigationLabel>
|
|
1432
|
+
</SideNavigationLink>
|
|
1433
|
+
</SideNavigationItem>
|
|
1434
|
+
</SideNavigationList>
|
|
1435
|
+
</SideNavigation>
|
|
1436
|
+
)}
|
|
1437
|
+
{active === 'finance' && (
|
|
1438
|
+
<SideNavigation defaultValue="invoices">
|
|
1439
|
+
<SideNavigationList>
|
|
1440
|
+
<SideNavigationItem value="invoices">
|
|
1441
|
+
<SideNavigationLink href="#invoices">
|
|
1442
|
+
<SideNavigationIcon>
|
|
1443
|
+
<Icon>
|
|
1444
|
+
<Glyph name="file-spreadsheet" />
|
|
1445
|
+
</Icon>
|
|
1446
|
+
</SideNavigationIcon>
|
|
1447
|
+
<SideNavigationLabel>Invoices</SideNavigationLabel>
|
|
1448
|
+
</SideNavigationLink>
|
|
1449
|
+
</SideNavigationItem>
|
|
1450
|
+
<SideNavigationItem value="reports">
|
|
1451
|
+
<SideNavigationLink href="#reports">
|
|
1452
|
+
<SideNavigationIcon>
|
|
1453
|
+
<Icon>
|
|
1454
|
+
<Glyph name="trending-up" />
|
|
1455
|
+
</Icon>
|
|
1456
|
+
</SideNavigationIcon>
|
|
1457
|
+
<SideNavigationLabel>Reports</SideNavigationLabel>
|
|
1458
|
+
</SideNavigationLink>
|
|
1459
|
+
</SideNavigationItem>
|
|
1460
|
+
</SideNavigationList>
|
|
1461
|
+
</SideNavigation>
|
|
1462
|
+
)}
|
|
1463
|
+
</AppShellNavBody>
|
|
1464
|
+
</AppShellNav>
|
|
1465
|
+
<AppShellMain>
|
|
1466
|
+
<Page ground="surface" landmark="none">
|
|
1467
|
+
<PageBody>
|
|
1468
|
+
<Stack gap={2}>
|
|
1469
|
+
<Heading level={1} size="md">
|
|
1470
|
+
Orders
|
|
1471
|
+
</Heading>
|
|
1472
|
+
<Text tone="muted">128 open orders, 14 awaiting payment.</Text>
|
|
1473
|
+
</Stack>
|
|
1474
|
+
</PageBody>
|
|
1475
|
+
</Page>
|
|
1476
|
+
</AppShellMain>
|
|
1477
|
+
</AppShell>
|
|
1478
|
+
);
|
|
1479
|
+
}
|
|
1480
|
+
```
|
|
1481
|
+
|
|
1482
|
+
### reasons.tsx
|
|
1483
|
+
|
|
1484
|
+
Example
|
|
1485
|
+
|
|
1486
|
+
```tsx
|
|
1487
|
+
import { useState } from 'react';
|
|
1488
|
+
import {
|
|
1489
|
+
AppShell,
|
|
1490
|
+
AppShellBanner,
|
|
1491
|
+
AppShellBrand,
|
|
1492
|
+
AppShellMain,
|
|
1493
|
+
AppShellNav,
|
|
1494
|
+
AppShellNavBody,
|
|
1495
|
+
AppShellNavToggle,
|
|
1496
|
+
} from '@slotted/react/app-shell';
|
|
1497
|
+
import { Glyph, Icon } from '@slotted/react/icon';
|
|
1498
|
+
import { Page, PageBody } from '@slotted/react/page';
|
|
1499
|
+
import {
|
|
1500
|
+
SideNavigation,
|
|
1501
|
+
SideNavigationIcon,
|
|
1502
|
+
SideNavigationItem,
|
|
1503
|
+
SideNavigationLabel,
|
|
1504
|
+
SideNavigationLink,
|
|
1505
|
+
SideNavigationList,
|
|
1506
|
+
} from '@slotted/react/side-navigation';
|
|
1507
|
+
import { Stack } from '@slotted/react/stack';
|
|
1508
|
+
import { Heading, Text } from '@slotted/react/typography';
|
|
1509
|
+
|
|
1510
|
+
export default function AppShellReasonsExample() {
|
|
1511
|
+
const [open, setOpen] = useState(false);
|
|
1512
|
+
const [reason, setReason] = useState('none yet');
|
|
1513
|
+
|
|
1514
|
+
return (
|
|
1515
|
+
<AppShell
|
|
1516
|
+
navMode="overlay"
|
|
1517
|
+
navOpen={open}
|
|
1518
|
+
onNavOpenChange={(next, request) => {
|
|
1519
|
+
setOpen(next);
|
|
1520
|
+
setReason(request.reason);
|
|
1521
|
+
}}
|
|
1522
|
+
>
|
|
1523
|
+
<AppShellBanner>
|
|
1524
|
+
<AppShellBrand>
|
|
1525
|
+
<AppShellNavToggle />
|
|
1526
|
+
<span>Northwind</span>
|
|
1527
|
+
</AppShellBrand>
|
|
1528
|
+
</AppShellBanner>
|
|
1529
|
+
<AppShellNav>
|
|
1530
|
+
<AppShellNavBody>
|
|
1531
|
+
<SideNavigation defaultValue="orders">
|
|
1532
|
+
<SideNavigationList>
|
|
1533
|
+
<SideNavigationItem value="orders">
|
|
1534
|
+
<SideNavigationLink href="#orders">
|
|
1535
|
+
<SideNavigationIcon>
|
|
1536
|
+
<Icon>
|
|
1537
|
+
<Glyph name="inbox" />
|
|
1538
|
+
</Icon>
|
|
1539
|
+
</SideNavigationIcon>
|
|
1540
|
+
<SideNavigationLabel>Orders</SideNavigationLabel>
|
|
1541
|
+
</SideNavigationLink>
|
|
1542
|
+
</SideNavigationItem>
|
|
1543
|
+
<SideNavigationItem value="shipments">
|
|
1544
|
+
<SideNavigationLink href="#shipments">
|
|
1545
|
+
<SideNavigationIcon>
|
|
1546
|
+
<Icon>
|
|
1547
|
+
<Glyph name="calendar" />
|
|
1548
|
+
</Icon>
|
|
1549
|
+
</SideNavigationIcon>
|
|
1550
|
+
<SideNavigationLabel>Shipments</SideNavigationLabel>
|
|
1551
|
+
</SideNavigationLink>
|
|
1552
|
+
</SideNavigationItem>
|
|
1553
|
+
<SideNavigationItem value="reports">
|
|
1554
|
+
<SideNavigationLink href="#reports">
|
|
1555
|
+
<SideNavigationIcon>
|
|
1556
|
+
<Icon>
|
|
1557
|
+
<Glyph name="trending-up" />
|
|
1558
|
+
</Icon>
|
|
1559
|
+
</SideNavigationIcon>
|
|
1560
|
+
<SideNavigationLabel>Reports</SideNavigationLabel>
|
|
1561
|
+
</SideNavigationLink>
|
|
1562
|
+
</SideNavigationItem>
|
|
1563
|
+
</SideNavigationList>
|
|
1564
|
+
</SideNavigation>
|
|
1565
|
+
</AppShellNavBody>
|
|
1566
|
+
</AppShellNav>
|
|
1567
|
+
<AppShellMain>
|
|
1568
|
+
<Page ground="surface" landmark="none">
|
|
1569
|
+
<PageBody>
|
|
1570
|
+
<Stack gap={2}>
|
|
1571
|
+
<Heading level={1} size="md">
|
|
1572
|
+
Orders
|
|
1573
|
+
</Heading>
|
|
1574
|
+
<Text tone="muted">128 open orders, 14 awaiting payment.</Text>
|
|
1575
|
+
<Text size="sm">Last request: {reason}</Text>
|
|
1576
|
+
</Stack>
|
|
1577
|
+
</PageBody>
|
|
1578
|
+
</Page>
|
|
1579
|
+
</AppShellMain>
|
|
1580
|
+
</AppShell>
|
|
1581
|
+
);
|
|
1582
|
+
}
|
|
1583
|
+
```
|