@oxy.so/bloom 19.5.2 → 19.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/adoption-matrix.mdx +13 -13
- package/docs/app-shell.mdx +18 -11
- package/docs/compose-layouts.mdx +114 -2
- package/docs/dialog.mdx +7 -0
- package/docs/engagement-bar.mdx +9 -0
- package/docs/layout.mdx +1 -1
- package/docs/list.mdx +4 -3
- package/docs/page-header.mdx +7 -0
- package/docs/public-parts.mdx +1 -1
- package/docs/screen.mdx +4 -0
- package/docs/scroll.mdx +6 -3
- package/docs/sidebar.mdx +26 -5
- package/docs/task-catalog.json +1 -1
- package/docs/task-catalog.mdx +1 -1
- package/lib/commonjs/app-shell/AppShell.js +3 -3
- package/lib/commonjs/app-shell/AppShell.js.map +1 -1
- package/lib/commonjs/app-shell/AppShellEngine.js +2 -1
- package/lib/commonjs/app-shell/AppShellEngine.js.map +1 -1
- package/lib/commonjs/app-shell/AppShellPanelLayout.js +345 -172
- package/lib/commonjs/app-shell/AppShellPanelLayout.js.map +1 -1
- package/lib/commonjs/app-shell/RetainedPanelLayout.js +6 -0
- package/lib/commonjs/app-shell/RetainedPanelLayout.js.map +1 -1
- package/lib/commonjs/app-shell/panel-layout-css.js +20 -13
- package/lib/commonjs/app-shell/panel-layout-css.js.map +1 -1
- package/lib/commonjs/app-shell/panel-layout.js +33 -185
- package/lib/commonjs/app-shell/panel-layout.js.map +1 -1
- package/lib/commonjs/app-shell/panel-motion.js +13 -36
- package/lib/commonjs/app-shell/panel-motion.js.map +1 -1
- package/lib/commonjs/app-shell/panel-transitions.js +26 -0
- package/lib/commonjs/app-shell/panel-transitions.js.map +1 -0
- package/lib/commonjs/app-shell/shell-layout-css.js +2 -2
- package/lib/commonjs/app-shell/shell-layout-css.js.map +1 -1
- package/lib/commonjs/app-shell/use-panel-exit-completion.js +100 -0
- package/lib/commonjs/app-shell/use-panel-exit-completion.js.map +1 -0
- package/lib/commonjs/app-shell/use-panel-resize.js +21 -7
- package/lib/commonjs/app-shell/use-panel-resize.js.map +1 -1
- package/lib/commonjs/app-shell/use-panel-reveal.js +2 -1
- package/lib/commonjs/app-shell/use-panel-reveal.js.map +1 -1
- package/lib/commonjs/bottom-sheet/BottomSheetBase.js +3 -2
- package/lib/commonjs/bottom-sheet/BottomSheetBase.js.map +1 -1
- package/lib/commonjs/dialog/DialogBottomSheet.js +6 -3
- package/lib/commonjs/dialog/DialogBottomSheet.js.map +1 -1
- package/lib/commonjs/engagement-bar/EngagementAction.js +6 -5
- package/lib/commonjs/engagement-bar/EngagementAction.js.map +1 -1
- package/lib/commonjs/engagement-bar/EngagementBar.js +31 -7
- package/lib/commonjs/engagement-bar/EngagementBar.js.map +1 -1
- package/lib/commonjs/engagement-bar/EngagementPop.js +10 -3
- package/lib/commonjs/engagement-bar/EngagementPop.js.map +1 -1
- package/lib/commonjs/engagement-bar/context.js.map +1 -1
- package/lib/commonjs/engagement-bar/paint.js +59 -12
- package/lib/commonjs/engagement-bar/paint.js.map +1 -1
- package/lib/commonjs/hooks/use-border-box-size.js +46 -0
- package/lib/commonjs/hooks/use-border-box-size.js.map +1 -0
- package/lib/commonjs/layout/ScrollBar.web.js +62 -29
- package/lib/commonjs/layout/ScrollBar.web.js.map +1 -1
- package/lib/commonjs/layout/scroll-metrics.js.map +1 -1
- package/lib/commonjs/list/VirtualList.js +12 -0
- package/lib/commonjs/list/VirtualList.js.map +1 -1
- package/lib/commonjs/list/VirtualList.web.js +40 -19
- package/lib/commonjs/list/VirtualList.web.js.map +1 -1
- package/lib/commonjs/list/flash-list-module.js.map +1 -1
- package/lib/commonjs/page-header/EdgeScrim.js +14 -4
- package/lib/commonjs/page-header/EdgeScrim.js.map +1 -1
- package/lib/commonjs/page-header/PageHeader.js +19 -6
- package/lib/commonjs/page-header/PageHeader.js.map +1 -1
- package/lib/commonjs/screen/ScreenBase.js +15 -6
- package/lib/commonjs/screen/ScreenBase.js.map +1 -1
- package/lib/commonjs/screen/ScreenScrollViewBase.js +12 -2
- package/lib/commonjs/screen/ScreenScrollViewBase.js.map +1 -1
- package/lib/commonjs/screen/context.js.map +1 -1
- package/lib/commonjs/screen/use-intrinsic-content-height.js +53 -0
- package/lib/commonjs/screen/use-intrinsic-content-height.js.map +1 -0
- package/lib/commonjs/screen/use-screen-viewport.js +37 -6
- package/lib/commonjs/screen/use-screen-viewport.js.map +1 -1
- package/lib/commonjs/scroll/constants.js +4 -1
- package/lib/commonjs/scroll/constants.js.map +1 -1
- package/lib/commonjs/scroll/owner-handoff.js +27 -7
- package/lib/commonjs/scroll/owner-handoff.js.map +1 -1
- package/lib/commonjs/scroll/use-scroll-restoration.web.js +2 -11
- package/lib/commonjs/scroll/use-scroll-restoration.web.js.map +1 -1
- package/lib/commonjs/sidebar/Sidebar.js +121 -87
- package/lib/commonjs/sidebar/Sidebar.js.map +1 -1
- package/lib/commonjs/sidebar/arrangement.js +36 -0
- package/lib/commonjs/sidebar/arrangement.js.map +1 -0
- package/lib/commonjs/sidebar/index.js.map +1 -1
- package/lib/module/app-shell/AppShell.js +3 -3
- package/lib/module/app-shell/AppShell.js.map +1 -1
- package/lib/module/app-shell/AppShellEngine.js +2 -1
- package/lib/module/app-shell/AppShellEngine.js.map +1 -1
- package/lib/module/app-shell/AppShellPanelLayout.js +319 -147
- package/lib/module/app-shell/AppShellPanelLayout.js.map +1 -1
- package/lib/module/app-shell/RetainedPanelLayout.js +7 -1
- package/lib/module/app-shell/RetainedPanelLayout.js.map +1 -1
- package/lib/module/app-shell/panel-layout-css.js +19 -12
- package/lib/module/app-shell/panel-layout-css.js.map +1 -1
- package/lib/module/app-shell/panel-layout.js +32 -183
- package/lib/module/app-shell/panel-layout.js.map +1 -1
- package/lib/module/app-shell/panel-motion.js +14 -36
- package/lib/module/app-shell/panel-motion.js.map +1 -1
- package/lib/module/app-shell/panel-transitions.js +21 -0
- package/lib/module/app-shell/panel-transitions.js.map +1 -0
- package/lib/module/app-shell/shell-layout-css.js +2 -2
- package/lib/module/app-shell/shell-layout-css.js.map +1 -1
- package/lib/module/app-shell/use-panel-exit-completion.js +97 -0
- package/lib/module/app-shell/use-panel-exit-completion.js.map +1 -0
- package/lib/module/app-shell/use-panel-resize.js +22 -8
- package/lib/module/app-shell/use-panel-resize.js.map +1 -1
- package/lib/module/app-shell/use-panel-reveal.js +2 -1
- package/lib/module/app-shell/use-panel-reveal.js.map +1 -1
- package/lib/module/bottom-sheet/BottomSheetBase.js +3 -2
- package/lib/module/bottom-sheet/BottomSheetBase.js.map +1 -1
- package/lib/module/dialog/DialogBottomSheet.js +6 -3
- package/lib/module/dialog/DialogBottomSheet.js.map +1 -1
- package/lib/module/engagement-bar/EngagementAction.js +7 -6
- package/lib/module/engagement-bar/EngagementAction.js.map +1 -1
- package/lib/module/engagement-bar/EngagementBar.js +29 -5
- package/lib/module/engagement-bar/EngagementBar.js.map +1 -1
- package/lib/module/engagement-bar/EngagementPop.js +10 -3
- package/lib/module/engagement-bar/EngagementPop.js.map +1 -1
- package/lib/module/engagement-bar/context.js.map +1 -1
- package/lib/module/engagement-bar/paint.js +60 -13
- package/lib/module/engagement-bar/paint.js.map +1 -1
- package/lib/module/hooks/use-border-box-size.js +42 -0
- package/lib/module/hooks/use-border-box-size.js.map +1 -0
- package/lib/module/layout/ScrollBar.web.js +64 -31
- package/lib/module/layout/ScrollBar.web.js.map +1 -1
- package/lib/module/layout/scroll-metrics.js.map +1 -1
- package/lib/module/list/VirtualList.js +12 -0
- package/lib/module/list/VirtualList.js.map +1 -1
- package/lib/module/list/VirtualList.web.js +41 -20
- package/lib/module/list/VirtualList.web.js.map +1 -1
- package/lib/module/list/flash-list-module.js.map +1 -1
- package/lib/module/page-header/EdgeScrim.js +14 -4
- package/lib/module/page-header/EdgeScrim.js.map +1 -1
- package/lib/module/page-header/PageHeader.js +19 -6
- package/lib/module/page-header/PageHeader.js.map +1 -1
- package/lib/module/screen/ScreenBase.js +15 -6
- package/lib/module/screen/ScreenBase.js.map +1 -1
- package/lib/module/screen/ScreenScrollViewBase.js +12 -2
- package/lib/module/screen/ScreenScrollViewBase.js.map +1 -1
- package/lib/module/screen/context.js.map +1 -1
- package/lib/module/screen/use-intrinsic-content-height.js +50 -0
- package/lib/module/screen/use-intrinsic-content-height.js.map +1 -0
- package/lib/module/screen/use-screen-viewport.js +39 -8
- package/lib/module/screen/use-screen-viewport.js.map +1 -1
- package/lib/module/scroll/constants.js +3 -0
- package/lib/module/scroll/constants.js.map +1 -1
- package/lib/module/scroll/owner-handoff.js +27 -8
- package/lib/module/scroll/owner-handoff.js.map +1 -1
- package/lib/module/scroll/use-scroll-restoration.web.js +1 -10
- package/lib/module/scroll/use-scroll-restoration.web.js.map +1 -1
- package/lib/module/sidebar/Sidebar.js +121 -87
- package/lib/module/sidebar/Sidebar.js.map +1 -1
- package/lib/module/sidebar/arrangement.js +32 -0
- package/lib/module/sidebar/arrangement.js.map +1 -0
- package/lib/module/sidebar/index.js.map +1 -1
- package/lib/typescript/commonjs/app-shell/AppShell.d.ts.map +1 -1
- package/lib/typescript/commonjs/app-shell/AppShellEngine.d.ts.map +1 -1
- package/lib/typescript/commonjs/app-shell/AppShellPanelLayout.d.ts.map +1 -1
- package/lib/typescript/commonjs/app-shell/RetainedPanelLayout.d.ts.map +1 -1
- package/lib/typescript/commonjs/app-shell/panel-layout-css.d.ts +2 -1
- package/lib/typescript/commonjs/app-shell/panel-layout-css.d.ts.map +1 -1
- package/lib/typescript/commonjs/app-shell/panel-layout-types.d.ts +11 -2
- package/lib/typescript/commonjs/app-shell/panel-layout-types.d.ts.map +1 -1
- package/lib/typescript/commonjs/app-shell/panel-layout.d.ts +13 -27
- package/lib/typescript/commonjs/app-shell/panel-layout.d.ts.map +1 -1
- package/lib/typescript/commonjs/app-shell/panel-motion.d.ts +1 -12
- package/lib/typescript/commonjs/app-shell/panel-motion.d.ts.map +1 -1
- package/lib/typescript/commonjs/app-shell/panel-transitions.d.ts +4 -0
- package/lib/typescript/commonjs/app-shell/panel-transitions.d.ts.map +1 -0
- package/lib/typescript/commonjs/app-shell/shell-layout-css.d.ts.map +1 -1
- package/lib/typescript/commonjs/app-shell/types.d.ts +4 -0
- package/lib/typescript/commonjs/app-shell/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/app-shell/use-panel-exit-completion.d.ts +14 -0
- package/lib/typescript/commonjs/app-shell/use-panel-exit-completion.d.ts.map +1 -0
- package/lib/typescript/commonjs/app-shell/use-panel-reorder.d.ts +2 -2
- package/lib/typescript/commonjs/app-shell/use-panel-reorder.d.ts.map +1 -1
- package/lib/typescript/commonjs/app-shell/use-panel-resize.d.ts +4 -2
- package/lib/typescript/commonjs/app-shell/use-panel-resize.d.ts.map +1 -1
- package/lib/typescript/commonjs/app-shell/use-panel-reveal.d.ts +2 -2
- package/lib/typescript/commonjs/app-shell/use-panel-reveal.d.ts.map +1 -1
- package/lib/typescript/commonjs/bottom-sheet/BottomSheetBase.d.ts.map +1 -1
- package/lib/typescript/commonjs/bottom-sheet/types.d.ts +2 -0
- package/lib/typescript/commonjs/bottom-sheet/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/DialogBottomSheet.d.ts +2 -2
- package/lib/typescript/commonjs/dialog/DialogBottomSheet.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/types.d.ts +2 -0
- package/lib/typescript/commonjs/dialog/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/engagement-bar/EngagementAction.d.ts.map +1 -1
- package/lib/typescript/commonjs/engagement-bar/EngagementBar.d.ts +3 -3
- package/lib/typescript/commonjs/engagement-bar/EngagementBar.d.ts.map +1 -1
- package/lib/typescript/commonjs/engagement-bar/EngagementPop.d.ts +2 -1
- package/lib/typescript/commonjs/engagement-bar/EngagementPop.d.ts.map +1 -1
- package/lib/typescript/commonjs/engagement-bar/context.d.ts +1 -0
- package/lib/typescript/commonjs/engagement-bar/context.d.ts.map +1 -1
- package/lib/typescript/commonjs/engagement-bar/paint.d.ts +4 -2
- package/lib/typescript/commonjs/engagement-bar/paint.d.ts.map +1 -1
- package/lib/typescript/commonjs/engagement-bar/types.d.ts +10 -1
- package/lib/typescript/commonjs/engagement-bar/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/hooks/use-border-box-size.d.ts +13 -0
- package/lib/typescript/commonjs/hooks/use-border-box-size.d.ts.map +1 -0
- package/lib/typescript/commonjs/layout/ScrollBar.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/layout/scroll-metrics.d.ts +2 -0
- package/lib/typescript/commonjs/layout/scroll-metrics.d.ts.map +1 -1
- package/lib/typescript/commonjs/layout/types.d.ts +2 -2
- package/lib/typescript/commonjs/layout/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/list/VirtualList.d.ts.map +1 -1
- package/lib/typescript/commonjs/list/VirtualList.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/list/flash-list-module.d.ts +1 -1
- package/lib/typescript/commonjs/list/flash-list-module.d.ts.map +1 -1
- package/lib/typescript/commonjs/page-header/EdgeScrim.d.ts +3 -1
- package/lib/typescript/commonjs/page-header/EdgeScrim.d.ts.map +1 -1
- package/lib/typescript/commonjs/page-header/PageHeader.d.ts +1 -1
- package/lib/typescript/commonjs/page-header/PageHeader.d.ts.map +1 -1
- package/lib/typescript/commonjs/page-header/types.d.ts +2 -0
- package/lib/typescript/commonjs/page-header/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/screen/ScreenBase.d.ts.map +1 -1
- package/lib/typescript/commonjs/screen/ScreenScrollViewBase.d.ts.map +1 -1
- package/lib/typescript/commonjs/screen/context.d.ts +3 -0
- package/lib/typescript/commonjs/screen/context.d.ts.map +1 -1
- package/lib/typescript/commonjs/screen/use-intrinsic-content-height.d.ts +3 -0
- package/lib/typescript/commonjs/screen/use-intrinsic-content-height.d.ts.map +1 -0
- package/lib/typescript/commonjs/screen/use-screen-viewport.d.ts.map +1 -1
- package/lib/typescript/commonjs/scroll/constants.d.ts +2 -0
- package/lib/typescript/commonjs/scroll/constants.d.ts.map +1 -1
- package/lib/typescript/commonjs/scroll/owner-handoff.d.ts +3 -1
- package/lib/typescript/commonjs/scroll/owner-handoff.d.ts.map +1 -1
- package/lib/typescript/commonjs/scroll/use-scroll-restoration.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/sidebar/Sidebar.d.ts.map +1 -1
- package/lib/typescript/commonjs/sidebar/arrangement.d.ts +32 -0
- package/lib/typescript/commonjs/sidebar/arrangement.d.ts.map +1 -0
- package/lib/typescript/commonjs/sidebar/index.d.ts +1 -0
- package/lib/typescript/commonjs/sidebar/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/sidebar/types.d.ts +13 -1
- package/lib/typescript/commonjs/sidebar/types.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/AppShell.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/AppShellEngine.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/AppShellPanelLayout.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/RetainedPanelLayout.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/panel-layout-css.d.ts +2 -1
- package/lib/typescript/module/app-shell/panel-layout-css.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/panel-layout-types.d.ts +11 -2
- package/lib/typescript/module/app-shell/panel-layout-types.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/panel-layout.d.ts +13 -27
- package/lib/typescript/module/app-shell/panel-layout.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/panel-motion.d.ts +1 -12
- package/lib/typescript/module/app-shell/panel-motion.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/panel-transitions.d.ts +4 -0
- package/lib/typescript/module/app-shell/panel-transitions.d.ts.map +1 -0
- package/lib/typescript/module/app-shell/shell-layout-css.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/types.d.ts +4 -0
- package/lib/typescript/module/app-shell/types.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/use-panel-exit-completion.d.ts +14 -0
- package/lib/typescript/module/app-shell/use-panel-exit-completion.d.ts.map +1 -0
- package/lib/typescript/module/app-shell/use-panel-reorder.d.ts +2 -2
- package/lib/typescript/module/app-shell/use-panel-reorder.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/use-panel-resize.d.ts +4 -2
- package/lib/typescript/module/app-shell/use-panel-resize.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/use-panel-reveal.d.ts +2 -2
- package/lib/typescript/module/app-shell/use-panel-reveal.d.ts.map +1 -1
- package/lib/typescript/module/bottom-sheet/BottomSheetBase.d.ts.map +1 -1
- package/lib/typescript/module/bottom-sheet/types.d.ts +2 -0
- package/lib/typescript/module/bottom-sheet/types.d.ts.map +1 -1
- package/lib/typescript/module/dialog/DialogBottomSheet.d.ts +2 -2
- package/lib/typescript/module/dialog/DialogBottomSheet.d.ts.map +1 -1
- package/lib/typescript/module/dialog/types.d.ts +2 -0
- package/lib/typescript/module/dialog/types.d.ts.map +1 -1
- package/lib/typescript/module/engagement-bar/EngagementAction.d.ts.map +1 -1
- package/lib/typescript/module/engagement-bar/EngagementBar.d.ts +3 -3
- package/lib/typescript/module/engagement-bar/EngagementBar.d.ts.map +1 -1
- package/lib/typescript/module/engagement-bar/EngagementPop.d.ts +2 -1
- package/lib/typescript/module/engagement-bar/EngagementPop.d.ts.map +1 -1
- package/lib/typescript/module/engagement-bar/context.d.ts +1 -0
- package/lib/typescript/module/engagement-bar/context.d.ts.map +1 -1
- package/lib/typescript/module/engagement-bar/paint.d.ts +4 -2
- package/lib/typescript/module/engagement-bar/paint.d.ts.map +1 -1
- package/lib/typescript/module/engagement-bar/types.d.ts +10 -1
- package/lib/typescript/module/engagement-bar/types.d.ts.map +1 -1
- package/lib/typescript/module/hooks/use-border-box-size.d.ts +13 -0
- package/lib/typescript/module/hooks/use-border-box-size.d.ts.map +1 -0
- package/lib/typescript/module/layout/ScrollBar.web.d.ts.map +1 -1
- package/lib/typescript/module/layout/scroll-metrics.d.ts +2 -0
- package/lib/typescript/module/layout/scroll-metrics.d.ts.map +1 -1
- package/lib/typescript/module/layout/types.d.ts +2 -2
- package/lib/typescript/module/layout/types.d.ts.map +1 -1
- package/lib/typescript/module/list/VirtualList.d.ts.map +1 -1
- package/lib/typescript/module/list/VirtualList.web.d.ts.map +1 -1
- package/lib/typescript/module/list/flash-list-module.d.ts +1 -1
- package/lib/typescript/module/list/flash-list-module.d.ts.map +1 -1
- package/lib/typescript/module/page-header/EdgeScrim.d.ts +3 -1
- package/lib/typescript/module/page-header/EdgeScrim.d.ts.map +1 -1
- package/lib/typescript/module/page-header/PageHeader.d.ts +1 -1
- package/lib/typescript/module/page-header/PageHeader.d.ts.map +1 -1
- package/lib/typescript/module/page-header/types.d.ts +2 -0
- package/lib/typescript/module/page-header/types.d.ts.map +1 -1
- package/lib/typescript/module/screen/ScreenBase.d.ts.map +1 -1
- package/lib/typescript/module/screen/ScreenScrollViewBase.d.ts.map +1 -1
- package/lib/typescript/module/screen/context.d.ts +3 -0
- package/lib/typescript/module/screen/context.d.ts.map +1 -1
- package/lib/typescript/module/screen/use-intrinsic-content-height.d.ts +3 -0
- package/lib/typescript/module/screen/use-intrinsic-content-height.d.ts.map +1 -0
- package/lib/typescript/module/screen/use-screen-viewport.d.ts.map +1 -1
- package/lib/typescript/module/scroll/constants.d.ts +2 -0
- package/lib/typescript/module/scroll/constants.d.ts.map +1 -1
- package/lib/typescript/module/scroll/owner-handoff.d.ts +3 -1
- package/lib/typescript/module/scroll/owner-handoff.d.ts.map +1 -1
- package/lib/typescript/module/scroll/use-scroll-restoration.web.d.ts.map +1 -1
- package/lib/typescript/module/sidebar/Sidebar.d.ts.map +1 -1
- package/lib/typescript/module/sidebar/arrangement.d.ts +32 -0
- package/lib/typescript/module/sidebar/arrangement.d.ts.map +1 -0
- package/lib/typescript/module/sidebar/index.d.ts +1 -0
- package/lib/typescript/module/sidebar/index.d.ts.map +1 -1
- package/lib/typescript/module/sidebar/types.d.ts +13 -1
- package/lib/typescript/module/sidebar/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/support/yoga-host-tree.ts +55 -2
- package/src/app-shell/AppShell.tsx +7 -3
- package/src/app-shell/AppShellEngine.tsx +6 -2
- package/src/app-shell/AppShellPanelLayout.tsx +466 -189
- package/src/app-shell/RetainedPanelLayout.tsx +7 -1
- package/src/app-shell/panel-layout-css.ts +41 -27
- package/src/app-shell/panel-layout-types.ts +11 -2
- package/src/app-shell/panel-layout.ts +49 -256
- package/src/app-shell/panel-motion.ts +34 -52
- package/src/app-shell/panel-transitions.ts +39 -0
- package/src/app-shell/shell-layout-css.ts +6 -2
- package/src/app-shell/types.ts +4 -0
- package/src/app-shell/use-panel-exit-completion.ts +95 -0
- package/src/app-shell/use-panel-reorder.ts +2 -2
- package/src/app-shell/use-panel-resize.ts +37 -10
- package/src/app-shell/use-panel-reveal.ts +4 -9
- package/src/bottom-sheet/BottomSheetBase.tsx +6 -2
- package/src/bottom-sheet/types.ts +2 -0
- package/src/dialog/DialogBottomSheet.tsx +13 -2
- package/src/dialog/types.ts +2 -0
- package/src/engagement-bar/EngagementAction.tsx +5 -4
- package/src/engagement-bar/EngagementBar.tsx +30 -5
- package/src/engagement-bar/EngagementPop.tsx +11 -3
- package/src/engagement-bar/context.ts +1 -0
- package/src/engagement-bar/paint.ts +60 -13
- package/src/engagement-bar/types.ts +10 -1
- package/src/hooks/use-border-box-size.ts +38 -0
- package/src/layout/ScrollBar.web.tsx +74 -40
- package/src/layout/scroll-metrics.tsx +2 -0
- package/src/layout/types.ts +2 -2
- package/src/list/VirtualList.tsx +18 -0
- package/src/list/VirtualList.web.tsx +69 -22
- package/src/list/flash-list-module.ts +2 -0
- package/src/page-header/EdgeScrim.tsx +29 -9
- package/src/page-header/PageHeader.tsx +10 -6
- package/src/page-header/types.ts +2 -0
- package/src/screen/ScreenBase.tsx +13 -6
- package/src/screen/ScreenScrollViewBase.tsx +24 -2
- package/src/screen/context.ts +3 -0
- package/src/screen/use-intrinsic-content-height.ts +56 -0
- package/src/screen/use-screen-viewport.ts +60 -11
- package/src/scroll/constants.ts +3 -0
- package/src/scroll/owner-handoff.ts +45 -11
- package/src/scroll/use-scroll-restoration.web.ts +4 -10
- package/src/sidebar/Sidebar.tsx +146 -121
- package/src/sidebar/arrangement.ts +47 -0
- package/src/sidebar/index.ts +6 -0
- package/src/sidebar/types.ts +13 -1
package/src/sidebar/Sidebar.tsx
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { resolveSidebarArrangement } from './arrangement';
|
|
1
2
|
import { resolvePaintMode } from '../theme/paint';
|
|
2
3
|
import {
|
|
3
4
|
SurfaceLevelProvider,
|
|
@@ -200,6 +201,7 @@ const SidebarPanel: React.FC<SidebarProps> = ({
|
|
|
200
201
|
primaryAction,
|
|
201
202
|
primaryActionPlacement = 'bottom',
|
|
202
203
|
contentAlignment = 'start',
|
|
204
|
+
arrangement,
|
|
203
205
|
content,
|
|
204
206
|
onScroll,
|
|
205
207
|
footer,
|
|
@@ -884,6 +886,11 @@ const SidebarPanel: React.FC<SidebarProps> = ({
|
|
|
884
886
|
|
|
885
887
|
// Keep the same children mounted while the header changes from a row to a
|
|
886
888
|
// column. Numeric positions share the panel clock, including reversals.
|
|
889
|
+
const placed = resolveSidebarArrangement(contentAlignment, arrangement);
|
|
890
|
+
// The logo and its account menu move into the centred group only where the panel draws its own
|
|
891
|
+
// header row: a consumer's `header` replaces the row, and the mobile drawer keeps its own.
|
|
892
|
+
const identityGrouped =
|
|
893
|
+
!mobile && header == null && Boolean(logo || accountMenu) && placed.logo === 'group';
|
|
887
894
|
const headerRow = mobile ? (
|
|
888
895
|
<>
|
|
889
896
|
<View
|
|
@@ -921,7 +928,7 @@ const SidebarPanel: React.FC<SidebarProps> = ({
|
|
|
921
928
|
testID="sidebar-header"
|
|
922
929
|
style={[{ width: '100%', position: 'relative' }, headerGeometry]}
|
|
923
930
|
>
|
|
924
|
-
{logo || accountMenu ? (
|
|
931
|
+
{!identityGrouped && (logo || accountMenu) ? (
|
|
925
932
|
<Animated.View
|
|
926
933
|
style={[
|
|
927
934
|
{ position: 'absolute', insetInlineStart: 0, minWidth: 0 },
|
|
@@ -947,7 +954,7 @@ const SidebarPanel: React.FC<SidebarProps> = ({
|
|
|
947
954
|
{headerControl}
|
|
948
955
|
</Animated.View>
|
|
949
956
|
</Animated.View>
|
|
950
|
-
{logo ? accountMenu : null}
|
|
957
|
+
{!identityGrouped && logo ? accountMenu : null}
|
|
951
958
|
</>
|
|
952
959
|
);
|
|
953
960
|
|
|
@@ -965,6 +972,134 @@ const SidebarPanel: React.FC<SidebarProps> = ({
|
|
|
965
972
|
/>
|
|
966
973
|
));
|
|
967
974
|
|
|
975
|
+
// Anything grouped is centred with the destinations in the room above the persistent footer;
|
|
976
|
+
// what is not stays pinned (the controls at the top, the footer at the bottom).
|
|
977
|
+
const { centred } = placed;
|
|
978
|
+
const actionPlacement =
|
|
979
|
+
arrangement?.primaryAction ?? (primaryActionPlacement === 'top' ? 'top' : placed.primaryAction);
|
|
980
|
+
const primaryActionNode = primaryAction ? (
|
|
981
|
+
<SidebarPrimaryAction
|
|
982
|
+
action={primaryAction}
|
|
983
|
+
collapsed={collapsed}
|
|
984
|
+
placement={actionPlacement === 'top' ? 'top' : undefined}
|
|
985
|
+
testID={testID ? `${testID}-primary-action` : undefined}
|
|
986
|
+
/>
|
|
987
|
+
) : null;
|
|
988
|
+
const identityNode = identityGrouped ? (
|
|
989
|
+
<Animated.View style={[{ width: '100%', gap: 12, paddingBottom: 12 }, scrollInsets]}>
|
|
990
|
+
{logo ? (
|
|
991
|
+
<SidebarLogoView logo={logo} collapsed={collapsed} testID="sidebar-logo" />
|
|
992
|
+
) : (
|
|
993
|
+
accountMenu
|
|
994
|
+
)}
|
|
995
|
+
{logo ? accountMenu : null}
|
|
996
|
+
</Animated.View>
|
|
997
|
+
) : null;
|
|
998
|
+
const headerNode = (
|
|
999
|
+
<Animated.View
|
|
1000
|
+
testID={`${testID ?? 'sidebar'}-fixed-header`}
|
|
1001
|
+
style={[
|
|
1002
|
+
{
|
|
1003
|
+
width: '100%',
|
|
1004
|
+
gap: 12,
|
|
1005
|
+
paddingTop: Math.max(expandedPadding, windowControlsRoom),
|
|
1006
|
+
paddingBottom: 12,
|
|
1007
|
+
},
|
|
1008
|
+
scrollInsets,
|
|
1009
|
+
]}
|
|
1010
|
+
>
|
|
1011
|
+
{header != null ? (typeof header === 'function' ? header({ collapsed }) : header) : headerRow}
|
|
1012
|
+
{typeof toolbar === 'function' ? toolbar({ collapsed }) : toolbar}
|
|
1013
|
+
{actionPlacement === 'top' ? primaryActionNode : null}
|
|
1014
|
+
{inlineModes ? null : modeSwitcher}
|
|
1015
|
+
{showSearch && !flatMobile ? searchButton : null}
|
|
1016
|
+
</Animated.View>
|
|
1017
|
+
);
|
|
1018
|
+
const mainRegion = (
|
|
1019
|
+
<Animated.View
|
|
1020
|
+
testID={`${testID ?? 'sidebar'}-main-region`}
|
|
1021
|
+
style={[
|
|
1022
|
+
{
|
|
1023
|
+
width: '100%',
|
|
1024
|
+
flexGrow: centred ? 0 : 1,
|
|
1025
|
+
paddingBottom: 8,
|
|
1026
|
+
gap: hasSections ? 24 : 0,
|
|
1027
|
+
},
|
|
1028
|
+
scrollInsets,
|
|
1029
|
+
]}
|
|
1030
|
+
>
|
|
1031
|
+
{shownItems.length > 0 || !hasTree ? (
|
|
1032
|
+
<Animated.View
|
|
1033
|
+
collapsable={false}
|
|
1034
|
+
role="navigation"
|
|
1035
|
+
style={[{ width: '100%', gap: 4 }, !hasTree && navInset]}
|
|
1036
|
+
>
|
|
1037
|
+
{nothingMatches && !hasTree ? (
|
|
1038
|
+
<Text
|
|
1039
|
+
variant="body-regular"
|
|
1040
|
+
style={{
|
|
1041
|
+
paddingLeft: 8,
|
|
1042
|
+
paddingRight: 8,
|
|
1043
|
+
paddingTop: 12,
|
|
1044
|
+
paddingBottom: 12,
|
|
1045
|
+
color: palette.textTertiary,
|
|
1046
|
+
}}
|
|
1047
|
+
>
|
|
1048
|
+
{noResultsLabel}
|
|
1049
|
+
</Text>
|
|
1050
|
+
) : (
|
|
1051
|
+
shownItems.map(renderRow)
|
|
1052
|
+
)}
|
|
1053
|
+
</Animated.View>
|
|
1054
|
+
) : null}
|
|
1055
|
+
{onboarding && !collapsed ? (
|
|
1056
|
+
<SidebarOnboardingCard
|
|
1057
|
+
{...onboarding}
|
|
1058
|
+
testID={onboarding.testID ?? `${testID ?? 'sidebar'}-onboarding`}
|
|
1059
|
+
/>
|
|
1060
|
+
) : null}
|
|
1061
|
+
{collapsed || shownSections.length === 0 ? null : onTreeItemDrop ? (
|
|
1062
|
+
<TreeDragProvider
|
|
1063
|
+
sections={sections}
|
|
1064
|
+
onDrop={onTreeItemDrop}
|
|
1065
|
+
movedLabel={messages.moved}
|
|
1066
|
+
scroll={treeScroll}
|
|
1067
|
+
>
|
|
1068
|
+
{treeView}
|
|
1069
|
+
</TreeDragProvider>
|
|
1070
|
+
) : (
|
|
1071
|
+
treeView
|
|
1072
|
+
)}
|
|
1073
|
+
{content != null ? (
|
|
1074
|
+
<Animated.View
|
|
1075
|
+
testID={`${testID ?? 'sidebar'}-content`}
|
|
1076
|
+
pointerEvents={collapsed ? 'none' : 'auto'}
|
|
1077
|
+
aria-hidden={collapsed}
|
|
1078
|
+
accessibilityElementsHidden={collapsed}
|
|
1079
|
+
importantForAccessibility={collapsed ? 'no-hide-descendants' : 'auto'}
|
|
1080
|
+
{...(IS_WEB && collapsed ? { inert: true } : {})}
|
|
1081
|
+
ref={contentFade.ref}
|
|
1082
|
+
style={[{ overflow: 'hidden', flexShrink: 0 }, contentMorph, contentFade.style]}
|
|
1083
|
+
>
|
|
1084
|
+
<Animated.View
|
|
1085
|
+
onLayout={(event) => setContentHeight(event.nativeEvent.layout.height)}
|
|
1086
|
+
style={contentWidth}
|
|
1087
|
+
>
|
|
1088
|
+
{content}
|
|
1089
|
+
</Animated.View>
|
|
1090
|
+
</Animated.View>
|
|
1091
|
+
) : null}
|
|
1092
|
+
{nothingMatches && hasTree ? (
|
|
1093
|
+
<Text
|
|
1094
|
+
variant="body-regular"
|
|
1095
|
+
style={{ paddingLeft: 8, paddingRight: 8, color: palette.textTertiary }}
|
|
1096
|
+
>
|
|
1097
|
+
{noResultsLabel}
|
|
1098
|
+
</Text>
|
|
1099
|
+
) : null}
|
|
1100
|
+
</Animated.View>
|
|
1101
|
+
);
|
|
1102
|
+
|
|
968
1103
|
const sidebar = (
|
|
969
1104
|
<SidebarSizeProvider value={size}>
|
|
970
1105
|
<SidebarGeometryProvider value={geometry}>
|
|
@@ -1025,37 +1160,7 @@ const SidebarPanel: React.FC<SidebarProps> = ({
|
|
|
1025
1160
|
overflow: 'hidden',
|
|
1026
1161
|
}}
|
|
1027
1162
|
contentContainerStyle={{ flexGrow: 1 }}
|
|
1028
|
-
stickyHeader={
|
|
1029
|
-
<Animated.View
|
|
1030
|
-
testID={`${testID ?? 'sidebar'}-fixed-header`}
|
|
1031
|
-
style={[
|
|
1032
|
-
{
|
|
1033
|
-
width: '100%',
|
|
1034
|
-
gap: 12,
|
|
1035
|
-
paddingTop: Math.max(expandedPadding, windowControlsRoom),
|
|
1036
|
-
paddingBottom: 12,
|
|
1037
|
-
},
|
|
1038
|
-
scrollInsets,
|
|
1039
|
-
]}
|
|
1040
|
-
>
|
|
1041
|
-
{header != null
|
|
1042
|
-
? typeof header === 'function'
|
|
1043
|
-
? header({ collapsed })
|
|
1044
|
-
: header
|
|
1045
|
-
: headerRow}
|
|
1046
|
-
{typeof toolbar === 'function' ? toolbar({ collapsed }) : toolbar}
|
|
1047
|
-
{primaryAction && primaryActionPlacement === 'top' ? (
|
|
1048
|
-
<SidebarPrimaryAction
|
|
1049
|
-
action={primaryAction}
|
|
1050
|
-
collapsed={collapsed}
|
|
1051
|
-
placement="top"
|
|
1052
|
-
testID={testID ? `${testID}-primary-action` : undefined}
|
|
1053
|
-
/>
|
|
1054
|
-
) : null}
|
|
1055
|
-
{inlineModes ? null : modeSwitcher}
|
|
1056
|
-
{showSearch && !flatMobile ? searchButton : null}
|
|
1057
|
-
</Animated.View>
|
|
1058
|
-
}
|
|
1163
|
+
stickyHeader={headerNode}
|
|
1059
1164
|
stickyFooter={
|
|
1060
1165
|
<Animated.View
|
|
1061
1166
|
testID={`${testID ?? 'sidebar'}-sticky-footer`}
|
|
@@ -1069,13 +1174,7 @@ const SidebarPanel: React.FC<SidebarProps> = ({
|
|
|
1069
1174
|
scrollInsets,
|
|
1070
1175
|
]}
|
|
1071
1176
|
>
|
|
1072
|
-
{
|
|
1073
|
-
<SidebarPrimaryAction
|
|
1074
|
-
action={primaryAction}
|
|
1075
|
-
collapsed={collapsed}
|
|
1076
|
-
testID={testID ? `${testID}-primary-action` : undefined}
|
|
1077
|
-
/>
|
|
1078
|
-
) : null}
|
|
1177
|
+
{actionPlacement === 'bottom' ? primaryActionNode : null}
|
|
1079
1178
|
{showThemeToggle ? (
|
|
1080
1179
|
<Animated.View
|
|
1081
1180
|
testID="sidebar-theme-morph"
|
|
@@ -1160,89 +1259,15 @@ const SidebarPanel: React.FC<SidebarProps> = ({
|
|
|
1160
1259
|
</Animated.View>
|
|
1161
1260
|
}
|
|
1162
1261
|
>
|
|
1163
|
-
<
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
paddingBottom: 8,
|
|
1170
|
-
gap: hasSections ? 24 : 0,
|
|
1171
|
-
justifyContent: contentAlignment === 'center' ? 'center' : undefined,
|
|
1172
|
-
},
|
|
1173
|
-
scrollInsets,
|
|
1174
|
-
]}
|
|
1175
|
-
>
|
|
1176
|
-
{shownItems.length > 0 || !hasTree ? (
|
|
1177
|
-
<Animated.View
|
|
1178
|
-
collapsable={false}
|
|
1179
|
-
role="navigation"
|
|
1180
|
-
style={[{ width: '100%', gap: 4 }, !hasTree && navInset]}
|
|
1181
|
-
>
|
|
1182
|
-
{nothingMatches && !hasTree ? (
|
|
1183
|
-
<Text
|
|
1184
|
-
variant="body-regular"
|
|
1185
|
-
style={{
|
|
1186
|
-
paddingLeft: 8,
|
|
1187
|
-
paddingRight: 8,
|
|
1188
|
-
paddingTop: 12,
|
|
1189
|
-
paddingBottom: 12,
|
|
1190
|
-
color: palette.textTertiary,
|
|
1191
|
-
}}
|
|
1192
|
-
>
|
|
1193
|
-
{noResultsLabel}
|
|
1194
|
-
</Text>
|
|
1195
|
-
) : (
|
|
1196
|
-
shownItems.map(renderRow)
|
|
1197
|
-
)}
|
|
1262
|
+
<View style={{ flexGrow: 1, justifyContent: centred ? 'center' : undefined }}>
|
|
1263
|
+
{identityNode}
|
|
1264
|
+
{mainRegion}
|
|
1265
|
+
{actionPlacement === 'group' ? (
|
|
1266
|
+
<Animated.View style={[{ width: '100%' }, scrollInsets]}>
|
|
1267
|
+
{primaryActionNode}
|
|
1198
1268
|
</Animated.View>
|
|
1199
1269
|
) : null}
|
|
1200
|
-
|
|
1201
|
-
<SidebarOnboardingCard
|
|
1202
|
-
{...onboarding}
|
|
1203
|
-
testID={onboarding.testID ?? `${testID ?? 'sidebar'}-onboarding`}
|
|
1204
|
-
/>
|
|
1205
|
-
) : null}
|
|
1206
|
-
{collapsed || shownSections.length === 0 ? null : onTreeItemDrop ? (
|
|
1207
|
-
<TreeDragProvider
|
|
1208
|
-
sections={sections}
|
|
1209
|
-
onDrop={onTreeItemDrop}
|
|
1210
|
-
movedLabel={messages.moved}
|
|
1211
|
-
scroll={treeScroll}
|
|
1212
|
-
>
|
|
1213
|
-
{treeView}
|
|
1214
|
-
</TreeDragProvider>
|
|
1215
|
-
) : (
|
|
1216
|
-
treeView
|
|
1217
|
-
)}
|
|
1218
|
-
{content != null ? (
|
|
1219
|
-
<Animated.View
|
|
1220
|
-
testID={`${testID ?? 'sidebar'}-content`}
|
|
1221
|
-
pointerEvents={collapsed ? 'none' : 'auto'}
|
|
1222
|
-
aria-hidden={collapsed}
|
|
1223
|
-
accessibilityElementsHidden={collapsed}
|
|
1224
|
-
importantForAccessibility={collapsed ? 'no-hide-descendants' : 'auto'}
|
|
1225
|
-
{...(IS_WEB && collapsed ? { inert: true } : {})}
|
|
1226
|
-
ref={contentFade.ref}
|
|
1227
|
-
style={[{ overflow: 'hidden', flexShrink: 0 }, contentMorph, contentFade.style]}
|
|
1228
|
-
>
|
|
1229
|
-
<Animated.View
|
|
1230
|
-
onLayout={(event) => setContentHeight(event.nativeEvent.layout.height)}
|
|
1231
|
-
style={contentWidth}
|
|
1232
|
-
>
|
|
1233
|
-
{content}
|
|
1234
|
-
</Animated.View>
|
|
1235
|
-
</Animated.View>
|
|
1236
|
-
) : null}
|
|
1237
|
-
{nothingMatches && hasTree ? (
|
|
1238
|
-
<Text
|
|
1239
|
-
variant="body-regular"
|
|
1240
|
-
style={{ paddingLeft: 8, paddingRight: 8, color: palette.textTertiary }}
|
|
1241
|
-
>
|
|
1242
|
-
{noResultsLabel}
|
|
1243
|
-
</Text>
|
|
1244
|
-
) : null}
|
|
1245
|
-
</Animated.View>
|
|
1270
|
+
</View>
|
|
1246
1271
|
</SidebarScrollArea>
|
|
1247
1272
|
</AnimatedStyledView>
|
|
1248
1273
|
</CollapseProvider>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where the parts of a sidebar sit in its column.
|
|
3
|
+
*
|
|
4
|
+
* Every sidebar has three regions: a pinned top (the controls: collapse, mode
|
|
5
|
+
* toggle), a pinned bottom (the `footer`: an account control), and the room
|
|
6
|
+
* between them. The destinations always live in that room. A part that is
|
|
7
|
+
* `group` joins them there, as one block centred in the room; a part that is
|
|
8
|
+
* pinned stays in its region.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/** Where the logo (or account) row sits. */
|
|
12
|
+
export type SidebarLogoPlacement = 'top' | 'group';
|
|
13
|
+
/** Where the persistent primary action sits. */
|
|
14
|
+
export type SidebarPrimaryActionPlacement = 'bottom' | 'group';
|
|
15
|
+
|
|
16
|
+
export interface SidebarArrangement {
|
|
17
|
+
/** `top` (default) pins the logo with the controls; `group` centres it with the destinations. */
|
|
18
|
+
logo?: SidebarLogoPlacement;
|
|
19
|
+
/** `bottom` (default) pins the action above the footer; `group` centres it with the destinations. */
|
|
20
|
+
primaryAction?: SidebarPrimaryActionPlacement;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface ResolvedSidebarArrangement {
|
|
24
|
+
logo: SidebarLogoPlacement;
|
|
25
|
+
primaryAction: SidebarPrimaryActionPlacement;
|
|
26
|
+
/** Anything is grouped, so the destinations are centred in the room too. */
|
|
27
|
+
centred: boolean;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* The arrangement a sidebar draws: each part's own placement, else the one
|
|
32
|
+
* `contentAlignment` implies (`center` is the preset that groups every part),
|
|
33
|
+
* else its default. A part that is given always wins over the preset.
|
|
34
|
+
*/
|
|
35
|
+
export function resolveSidebarArrangement(
|
|
36
|
+
contentAlignment: 'start' | 'center' | undefined,
|
|
37
|
+
arrangement: SidebarArrangement | undefined,
|
|
38
|
+
): ResolvedSidebarArrangement {
|
|
39
|
+
const preset = contentAlignment === 'center';
|
|
40
|
+
const logo = arrangement?.logo ?? (preset ? 'group' : 'top');
|
|
41
|
+
const primaryAction = arrangement?.primaryAction ?? (preset ? 'group' : 'bottom');
|
|
42
|
+
return {
|
|
43
|
+
logo,
|
|
44
|
+
primaryAction,
|
|
45
|
+
centred: preset || logo === 'group' || primaryAction === 'group',
|
|
46
|
+
};
|
|
47
|
+
}
|
package/src/sidebar/index.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
export { Sidebar } from './Sidebar';
|
|
2
|
+
export type {
|
|
3
|
+
ResolvedSidebarArrangement,
|
|
4
|
+
SidebarArrangement,
|
|
5
|
+
SidebarLogoPlacement,
|
|
6
|
+
SidebarPrimaryActionPlacement,
|
|
7
|
+
} from './arrangement';
|
|
2
8
|
export { SidebarFolder } from './SidebarFolder';
|
|
3
9
|
export { SidebarItem } from './SidebarItem';
|
|
4
10
|
export { SidebarToolbar } from './SidebarToolbar';
|
package/src/sidebar/types.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { SidebarArrangement } from './arrangement';
|
|
1
2
|
import type { ComponentRef, ReactNode, Ref } from 'react';
|
|
2
3
|
import type { ScrollAreaScrollbarSide } from '../layout/types';
|
|
3
4
|
import type { DropZoneProps } from '../drop-zone/types';
|
|
@@ -378,8 +379,19 @@ export interface SidebarProps {
|
|
|
378
379
|
toolbar?: ReactNode | ((state: { collapsed: boolean }) => ReactNode);
|
|
379
380
|
/** Expanded panel inset, also used to measure app-owned scroll content. Defaults to the size's inset. */
|
|
380
381
|
contentPadding?: number;
|
|
381
|
-
/**
|
|
382
|
+
/**
|
|
383
|
+
* `center` is the preset that centres the logo, the destinations and the primary action as one
|
|
384
|
+
* group in the room above the persistent footer; `start` (default) pins the logo at the top and
|
|
385
|
+
* the primary action above the footer. Say `arrangement` for a part-by-part choice.
|
|
386
|
+
*/
|
|
382
387
|
contentAlignment?: 'start' | 'center';
|
|
388
|
+
/**
|
|
389
|
+
* Where each part sits, overriding what `contentAlignment` implies: the logo pinned at the top
|
|
390
|
+
* or grouped with the destinations, the primary action pinned above the footer or grouped with
|
|
391
|
+
* them. The controls (collapse, mode toggle) are always pinned at the top and the `footer` at
|
|
392
|
+
* the bottom. Panel variant; a rail keeps its own column.
|
|
393
|
+
*/
|
|
394
|
+
arrangement?: SidebarArrangement;
|
|
383
395
|
/** App-owned destination content after the built-in rows/tree, inside the same
|
|
384
396
|
* scroll viewport. Hidden and noninteractive while collapsed; remains mounted
|
|
385
397
|
* so pagination and disclosure state survive. Not rendered in variant="rail".
|