diff --git a/packages/dev/s2-docs/assets/wallpaper_collaborative_S2_desktop.webp b/packages/dev/s2-docs/assets/wallpaper_collaborative_S2_desktop.webp new file mode 100644 index 00000000000..14a94ca9b04 Binary files /dev/null and b/packages/dev/s2-docs/assets/wallpaper_collaborative_S2_desktop.webp differ diff --git a/packages/dev/s2-docs/pages/WelcomeHeader.tsx b/packages/dev/s2-docs/pages/WelcomeHeader.tsx new file mode 100644 index 00000000000..186eb60a5c8 --- /dev/null +++ b/packages/dev/s2-docs/pages/WelcomeHeader.tsx @@ -0,0 +1,71 @@ +import {ProductCard, Content, Footer, Text, LinkButton} from '@react-spectrum/s2'; +import {style} from '@react-spectrum/s2/style' with {type: 'macro'}; +import {TAB_DEFS} from '../src/constants'; +// @ts-ignore +import url from 'url:../assets/wallpaper_collaborative_S2_desktop.webp'; + +export function WelcomeHeader() { + return ( +
+

+ React Spectrum Libraries +

+
+ ); +} + +export function LibraryCards() { + return ( +
+ + {TAB_DEFS['react-spectrum'].icon} + + {TAB_DEFS['react-spectrum'].label} + {TAB_DEFS['react-spectrum'].description} + +
+ Get started +
+
+ + + {TAB_DEFS['react-aria'].icon} + + {TAB_DEFS['react-aria'].label} + {TAB_DEFS['react-aria'].description} + +
+ Explore +
+
+ + + {TAB_DEFS['internationalized'].icon} + + {TAB_DEFS['internationalized'].label} + {TAB_DEFS['internationalized'].description} + + + +
+ ); +} diff --git a/packages/dev/s2-docs/pages/index.mdx b/packages/dev/s2-docs/pages/index.mdx index 4d27ba3323c..e8578e91c72 100644 --- a/packages/dev/s2-docs/pages/index.mdx +++ b/packages/dev/s2-docs/pages/index.mdx @@ -1,14 +1,15 @@ import {Layout} from '../src/Layout'; -import {LinkButton} from '@react-spectrum/s2'; +import {WelcomeHeader, LibraryCards} from './WelcomeHeader'; export default Layout; export const section = 'Getting started'; +export const hideNav = true; -# Welcome! + The React Spectrum docs have a new look! This is a **beta preview** so keep in mind that we will be continuing to make improvements before the full release. -Get Started with Spectrum 2 + ## What's new? @@ -22,4 +23,4 @@ The React Spectrum docs have a new look! This is a **beta preview** so keep in m ## Roadmap -The existing docs are still available [here](https://react-spectrum.adobe.com/react-spectrum/index.html). We plan to do a full release of the new docs site by early 2026, so we welcome any and all feedback! +The existing docs are still available [here](https://react-spectrum.adobe.com/index.html). We plan to do a full release of the new docs site by early 2026, so we welcome any and all feedback! diff --git a/packages/dev/s2-docs/src/Layout.tsx b/packages/dev/s2-docs/src/Layout.tsx index 66ba59a9936..d408c529322 100644 --- a/packages/dev/s2-docs/src/Layout.tsx +++ b/packages/dev/s2-docs/src/Layout.tsx @@ -101,7 +101,7 @@ let articleStyles = style({ export function Layout(props: PageProps & {children: ReactElement}) { let {pages, currentPage, children} = props; - let hasToC = currentPage.tableOfContents?.[0]?.children && currentPage.tableOfContents[0].children.length > 0; + let hasToC = !currentPage.exports?.hideNav && currentPage.tableOfContents?.[0]?.children && currentPage.tableOfContents?.[0]?.children?.length > 0; return ( @@ -150,7 +150,7 @@ export function Layout(props: PageProps & {children: ReactElement}) { pages={pages} currentPage={currentPage} />
-