diff --git a/.circleci/config.yml b/.circleci/config.yml index f96ae44433..6ae5b24b6a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -226,12 +226,6 @@ jobs: - run: name: '`pnpm docs:api` changes committed?' command: git add -A && git diff --exit-code --staged - - run: - name: Update the navigation translations - command: pnpm docs:i18n - - run: - name: '`pnpm docs:i18n` changes committed?' - command: git add -A && git diff --exit-code --staged - run: name: '`pnpm extract-error-codes` changes committed?' command: | diff --git a/.eslintrc.js b/.eslintrc.js index 6885f32f2c..db08e1dc25 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -6,6 +6,13 @@ const OneLevelImportMessage = [ 'See https://github.com/mui/material-ui/pull/24147 for the kind of win it can unlock.', ].join('\n'); +const NO_RESTRICTED_IMPORTS_PATTERNS_DEEPLY_NESTED = [ + { + group: ['@base_ui/react/*/*', '!@base_ui/react/legacy/*'], + message: OneLevelImportMessage, + }, +]; + module.exports = { ...baseline, settings: { @@ -27,27 +34,15 @@ module.exports = { 'no-restricted-imports': [ 'error', { - patterns: [ - { - group: [ - '@mui/*/*/*', - '@pigment-css/*/*/*', - '@base_ui/react/*/*', - '!@base_ui/react/legacy/*', - // Allow any import depth with any internal packages - '!@mui/internal-*/**', - // TODO delete, @mui/docs should be @mui/internal-docs - '!@mui/docs/**', - ], - message: OneLevelImportMessage, - }, - ], + patterns: NO_RESTRICTED_IMPORTS_PATTERNS_DEEPLY_NESTED, }, ], '@typescript-eslint/no-redeclare': 'off', }, overrides: [ - ...baseline.overrides, + ...baseline.overrides.filter( + (ruleSet) => !ruleSet.rules.hasOwnProperty('filenames/match-exported'), + ), { files: ['docs/pages/experiments/**/*{.tsx,.js}', 'docs/pages/playground/**/*{.tsx,.js}'], rules: { @@ -67,5 +62,30 @@ module.exports = { 'testing-library/render-result-naming-convention': 'off', // False positives }, }, + { + files: ['docs/**/*{.ts,.tsx,.js}'], + rules: { + 'no-restricted-imports': [ + 'error', + { + patterns: NO_RESTRICTED_IMPORTS_PATTERNS_DEEPLY_NESTED, + }, + ], + 'react/prop-types': 'off', + '@typescript-eslint/no-use-before-define': 'off', + }, + }, + { + files: ['docs/data/**/*{.tsx,.js}'], + excludedFiles: [ + 'docs/data/**/css/*{.tsx,.js}', + 'docs/data/**/css-modules/*{.tsx,.js}', + 'docs/data/**/system/*{.tsx,.js}', + 'docs/data/**/tailwind/*{.tsx,.js}', + ], + rules: { + 'filenames/match-exported': ['error'], + }, + }, ], }; diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 44aa9ff60a..fdac48578d 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,9 +1,10 @@ { "recommendations": [ - "editorconfig.editorconfig", - "dbaeumer.vscode-eslint", "davidanson.vscode-markdownlint", + "dbaeumer.vscode-eslint", + "editorconfig.editorconfig", "esbenp.prettier-vscode", + "unifiedjs.vscode-mdx", "yoavbls.pretty-ts-errors" ] } diff --git a/docs/.link-check-errors.txt b/docs/.link-check-errors.txt index 0b8d083f4a..e69de29bb2 100644 --- a/docs/.link-check-errors.txt +++ b/docs/.link-check-errors.txt @@ -1,2 +0,0 @@ -Broken links found by `pnpm docs:link-check` that exist: - diff --git a/docs/app/(content)/components/[slug]/getApiReferenceData.ts b/docs/app/(content)/components/[slug]/getApiReferenceData.ts new file mode 100644 index 0000000000..77c500d4d9 --- /dev/null +++ b/docs/app/(content)/components/[slug]/getApiReferenceData.ts @@ -0,0 +1,27 @@ +import { readFile } from 'node:fs/promises'; +import { ComponentAPIReference } from 'docs-base/types/ComponentAPIReference'; +import kebabCase from 'lodash/kebabCase'; + +export function getApiReferenceData(componentNames: string[]): Promise { + return Promise.all( + componentNames.map(async (componentName) => { + const kebabedComponentName = kebabCase(componentName); + const apiDescriptionFilePath = `data/api/${kebabedComponentName}.json`; + const translationsFilePath = `data/translations/api-docs/${kebabedComponentName}/${kebabedComponentName}.json`; + + const apiDescription = JSON.parse(await readFile(apiDescriptionFilePath, 'utf-8')); + const translations = JSON.parse(await readFile(translationsFilePath, 'utf-8')); + + return { + name: componentName, + description: translations.componentDescription, + props: Object.keys(apiDescription.props).map((propName) => ({ + name: propName, + ...apiDescription.props[propName], + defaultValue: apiDescription.props[propName].default ?? null, + ...translations.propDescriptions[propName], + })), + } satisfies ComponentAPIReference; + }), + ); +} diff --git a/docs/app/(content)/components/[slug]/page.tsx b/docs/app/(content)/components/[slug]/page.tsx new file mode 100644 index 0000000000..28656d5527 --- /dev/null +++ b/docs/app/(content)/components/[slug]/page.tsx @@ -0,0 +1,107 @@ +import * as React from 'react'; +import { Metadata } from 'next'; +import { components } from 'docs-base/src/components/content/MDXComponents'; +import { getMarkdownPage, getMarkdownPageMetadata } from 'docs-base/app/(content)/getMarkdownPage'; +import { ComponentLinkHeader } from 'docs-base/src/components/content/ComponentLinkHeader'; +import { Description } from 'docs-base/src/components/content/Description'; +import { TableOfContents } from 'docs-base/src/components/TableOfContents'; +import routes, { getSlugs } from 'docs-base/data/pages'; +import { SiblingPageLinks } from 'docs-base/src/components/SiblingPageLinks'; +import { EditPageGithubLink } from 'docs-base/src/components/EditPageGithhubLink'; +import { + ApiReference, + getApiReferenceTableOfContents, +} from 'docs-base/src/components/ApiReference'; +import { DemoLoader, DemoLoaderProps } from 'docs-base/src/components/demo/DemoLoader'; +import { getApiReferenceData } from './getApiReferenceData'; +import classes from '../../styles.module.css'; + +const CATEGORY_SEGMENT = 'components'; + +interface Props { + params: { + slug: string; + }; +} + +function componentNameFromSlug(slug: string) { + return slug.replace('react-', ''); +} + +export default async function ComponentPage(props: Props) { + const { + params: { slug }, + } = props; + + const componentName = componentNameFromSlug(slug); + + const { MDXContent, metadata, tableOfContents } = await getMarkdownPage( + CATEGORY_SEGMENT, + componentName, + ); + + const documentedComponents = metadata.components?.split(',').map((c: string) => c.trim()) ?? []; + const componentsApi = await getApiReferenceData(documentedComponents); + const apiReferenceToc = getApiReferenceTableOfContents(componentsApi); + + tableOfContents[0].children?.push(apiReferenceToc); + + const allComponents = { + ...components, + // eslint-disable-next-line react/no-unstable-nested-components + Demo: (demoProps: Omit) => ( + + ), + // eslint-disable-next-line react/no-unstable-nested-components + Description: () => , + // eslint-disable-next-line react/no-unstable-nested-components + ComponentLinkHeader: () => ( + + ), + }; + + return ( + +
+ + +
+
+ +
+
+ +
+
+
+ + +
+ ); +} + +export async function generateStaticParams() { + return getSlugs(`/${CATEGORY_SEGMENT}`).map((slug) => ({ slug })); +} + +export async function generateMetadata({ params }: Props): Promise { + const { slug } = params; + const componentName = componentNameFromSlug(slug); + const { title = 'Components', description } = await getMarkdownPageMetadata( + CATEGORY_SEGMENT, + componentName, + ); + + return { + title, + description, + twitter: { + title, + description, + }, + openGraph: { + title, + description, + }, + }; +} diff --git a/docs/app/(content)/getMarkdownPage.ts b/docs/app/(content)/getMarkdownPage.ts new file mode 100644 index 0000000000..8c3f4afca7 --- /dev/null +++ b/docs/app/(content)/getMarkdownPage.ts @@ -0,0 +1,88 @@ +import path from 'node:path'; +import fs from 'node:fs'; +import { readFile } from 'node:fs/promises'; +import rehypePrettyCode from 'rehype-pretty-code'; +import { evaluate } from '@mdx-js/mdx'; +import * as jsxRuntime from 'react/jsx-runtime'; +import remarkFrontmatter from 'remark-frontmatter'; +import remarkMdxFrontmatter from 'remark-mdx-frontmatter'; +import remarkGfm from 'remark-gfm'; +import rehypeSlug from 'rehype-slug'; +import extractToc, { type Toc } from '@stefanprobst/rehype-extract-toc'; +import exportToc from '@stefanprobst/rehype-extract-toc/mdx'; +import { read as readVFile } from 'to-vfile'; +import { matter } from 'vfile-matter'; +import { config } from 'docs-base/config'; + +export const DATA_PATH = path.join(process.cwd(), 'data'); + +export interface PageMetadata { + title: string; + description: string; + components?: string; + githubLabel?: string; + waiAria?: string; + slug: string; +} + +export const getMarkdownPage = async (basePath: string, slug: string) => { + const mdxFilePath = path.join(DATA_PATH, basePath, `/${slug}/${slug}.mdx`); + const mdFilePath = path.join(DATA_PATH, basePath, `/${slug}/${slug}.md`); + + let filePath: string; + + if (fs.existsSync(mdxFilePath)) { + filePath = mdxFilePath; + } else if (fs.existsSync(mdFilePath)) { + filePath = mdFilePath; + } else { + throw new Error(`No MD(X) file found for ${basePath}/${slug}`); + } + + const mdxSource = await readFile(filePath, 'utf8'); + + const { + default: MDXContent, + frontmatter, + tableOfContents, + // @ts-ignore https://github.com/mdx-js/mdx/issues/2463 + } = await evaluate(mdxSource, { + ...jsxRuntime, + remarkPlugins: [remarkGfm, remarkFrontmatter, remarkMdxFrontmatter], + rehypePlugins: [ + [rehypePrettyCode, { theme: config.shikiThemes }], + rehypeSlug, + extractToc, + exportToc, + ], + }); + + return { + metadata: { + ...(frontmatter as Partial), + slug, + } as PageMetadata, + tableOfContents: tableOfContents as Toc, + MDXContent, + }; +}; + +export const getMarkdownPageMetadata = async (basePath: string, slug: string) => { + const mdxFilePath = path.join(DATA_PATH, basePath, `/${slug}/${slug}.mdx`); + const mdFilePath = path.join(DATA_PATH, basePath, `/${slug}/${slug}.md`); + + let filePath: string; + + if (fs.existsSync(mdxFilePath)) { + filePath = mdxFilePath; + } else if (fs.existsSync(mdFilePath)) { + filePath = mdFilePath; + } else { + throw new Error(`No MD(X) file found for ${basePath}/${slug}`); + } + + const file = await readVFile(filePath); + matter(file); + + return file.data.matter as PageMetadata; +}; diff --git a/docs/app/(content)/getting-started/[slug]/page.tsx b/docs/app/(content)/getting-started/[slug]/page.tsx new file mode 100644 index 0000000000..e3e506a985 --- /dev/null +++ b/docs/app/(content)/getting-started/[slug]/page.tsx @@ -0,0 +1,76 @@ +import * as React from 'react'; +import { Metadata } from 'next'; +import { components } from 'docs-base/src/components/content/MDXComponents'; +import { getMarkdownPage, getMarkdownPageMetadata } from 'docs-base/app/(content)/getMarkdownPage'; +import { TableOfContents } from 'docs-base/src/components/TableOfContents'; +import routes, { getSlugs } from 'docs-base/data/pages'; +import { Description } from 'docs-base/src/components/content/Description'; +import { SiblingPageLinks } from 'docs-base/src/components/SiblingPageLinks'; +import { EditPageGithubLink } from 'docs-base/src/components/EditPageGithhubLink'; +import classes from '../../styles.module.css'; + +const CATEGORY_SEGMENT = 'getting-started'; + +interface Props { + params: { + slug: string; + }; +} + +export default async function DocsPage(props: Props) { + const { + params: { slug }, + } = props; + + const { MDXContent, tableOfContents, metadata } = await getMarkdownPage(CATEGORY_SEGMENT, slug); + + const allComponents = { + ...components, + // eslint-disable-next-line react/no-unstable-nested-components + Description: () => , + Demo: () => null, + }; + + return ( + +
+ +
+
+ +
+
+ +
+
+
+ + +
+ ); +} + +export async function generateStaticParams() { + return getSlugs(`/${CATEGORY_SEGMENT}`).map((slug) => ({ slug })); +} + +export async function generateMetadata({ params }: Props): Promise { + const { slug } = params; + const { title = 'Getting started', description } = await getMarkdownPageMetadata( + CATEGORY_SEGMENT, + slug, + ); + + return { + title, + description, + twitter: { + title, + description, + }, + openGraph: { + title, + description, + }, + }; +} diff --git a/docs/app/(content)/guides/[slug]/page.tsx b/docs/app/(content)/guides/[slug]/page.tsx new file mode 100644 index 0000000000..5d4f17ff21 --- /dev/null +++ b/docs/app/(content)/guides/[slug]/page.tsx @@ -0,0 +1,73 @@ +import * as React from 'react'; +import { Metadata } from 'next'; +import { components } from 'docs-base/src/components/content/MDXComponents'; +import { getMarkdownPage, getMarkdownPageMetadata } from 'docs-base/app/(content)/getMarkdownPage'; +import { TableOfContents } from 'docs-base/src/components/TableOfContents'; +import routes, { getSlugs } from 'docs-base/data/pages'; +import { Description } from 'docs-base/src/components/content/Description'; +import { SiblingPageLinks } from 'docs-base/src/components/SiblingPageLinks'; +import { EditPageGithubLink } from 'docs-base/src/components/EditPageGithhubLink'; +import classes from '../../styles.module.css'; + +const CATEGORY_SEGMENT = 'guides'; + +interface Props { + params: { + slug: string; + }; +} + +export default async function DocsPage(props: Props) { + const { + params: { slug }, + } = props; + + const { MDXContent, tableOfContents, metadata } = await getMarkdownPage(CATEGORY_SEGMENT, slug); + + const allComponents = { + ...components, + // eslint-disable-next-line react/no-unstable-nested-components + Description: () => , + Demo: () => null, + }; + + return ( + +
+ +
+
+ +
+
+ +
+
+
+ + +
+ ); +} + +export async function generateStaticParams() { + return getSlugs(`/${CATEGORY_SEGMENT}`).map((slug) => ({ slug })); +} + +export async function generateMetadata({ params }: Props): Promise { + const { slug } = params; + const { title = 'Guides', description } = await getMarkdownPageMetadata(CATEGORY_SEGMENT, slug); + + return { + title, + description, + twitter: { + title, + description, + }, + openGraph: { + title, + description, + }, + }; +} diff --git a/docs/app/(content)/layout.tsx b/docs/app/(content)/layout.tsx new file mode 100644 index 0000000000..706a9d110f --- /dev/null +++ b/docs/app/(content)/layout.tsx @@ -0,0 +1,15 @@ +import * as React from 'react'; + +import { AppBar } from 'docs-base/src/components/AppBar'; +import { Navigation } from 'docs-base/src/components/Navigation'; +import routes from 'docs-base/data/pages'; + +export default function Layout({ children }: React.PropsWithChildren<{}>) { + return ( + + + + {children} + + ); +} diff --git a/docs/app/(content)/styles.module.css b/docs/app/(content)/styles.module.css new file mode 100644 index 0000000000..81380b5dc4 --- /dev/null +++ b/docs/app/(content)/styles.module.css @@ -0,0 +1,205 @@ +@layer mdx { + .content { + max-width: 714px; + padding-top: var(--space-9); + padding-left: var(--space-6); + padding-right: var(--space-6); + margin-left: auto; + margin-right: auto; + margin-bottom: var(--space-9); + + @media (max-width: 1242px) { + margin-right: calc((100vw - 240px - 762px) / 2); + } + + @media (max-width: 1002px) { + margin-left: auto; + margin-right: auto; + } + + p { + margin: 0; + margin-bottom: var(--space-4); + font-size: var(--fs-4); + line-height: 23px; + font-family: var(--ff-sans); + font-weight: var(--fw-1); + color: var(--gray-text-2); + scroll-margin-top: 80px; + } + + ul { + margin: 0; + margin-bottom: var(--space-4); + font-size: var(--fs-4); + line-height: 23px; + font-family: var(--ff-sans); + font-weight: var(--fw-1); + color: var(--gray-text-2); + scroll-margin-top: 80px; + } + + ul p { + margin-bottom: 0; + } + + h1 { + margin: 0; + font-family: var(--ff-sans); + color: var(--gray-text-2); + scroll-margin-top: 80px; + font-size: var(--fs-8); + line-height: 37px; + font-weight: var(--fw-2); + letter-spacing: -0.042em; + text-indent: -1.1px; + margin-bottom: var(--space-2); + } + + h2 { + margin: 0; + font-family: var(--ff-sans); + color: var(--gray-text-2); + scroll-margin-top: 80px; + margin-top: var(--space-7); + margin-bottom: var(--space-3); + font-size: var(--fs-6); + line-height: 24px; + font-weight: 500; + letter-spacing: -0.018em; + } + + h3 { + margin: 0; + font-family: var(--ff-sans); + color: var(--gray-text-2); + scroll-margin-top: 80px; + margin-top: var(--space-7); + margin-bottom: var(--space-2); + font-size: var(--fs-5); + line-height: 23px; + font-weight: var(--fw-2); + letter-spacing: -0.012em; + } + + code { + font-family: var(--ff-code); + } + + :not(pre) > code { + margin-left: 1px; + margin-right: 1px; + box-sizing: border-box; + font-family: var(--ff-code); + color: var(--gray-text-2); + font-size: 0.89em; + padding-right: var(--space-1); + padding-bottom: 2px; + padding-left: var(--space-1); + white-space: break-spaces; + border: 1px solid var(--gray-outline-1); + border-radius: 6px; + position: relative; + top: -0.5px; + } + + figure { + box-sizing: border-box; + margin-left: 0; + margin-right: 0; + margin-top: var(--space-5); + margin-bottom: var(--space-5); + } + + pre { + box-sizing: border-box; + overflow: hidden; + margin: 0; + padding: var(--space-3) var(--space-4); + font-family: var(--ff-code); + font-size: var(--fs-2); + line-height: 20px; + white-space: pre; + color: var(--gray-text-1); + border: 1px solid var(--gray-outline-2); + border-radius: 12px; + } + + kbd { + padding: 6px; + display: inline-block; + white-space: nowrap; + margin: 0px 1px; + font-family: var(--ff-code); + font-size: var(--fs-1); + color: var(--gray-text-2); + line-height: 10px; + vertical-align: middle; + border-radius: 6px; + border: 1px solid var(--gray-outline-2); + background-color: var(--gray-container-1); + box-shadow: inset 0 -2px 0 var(--gray-outline-2); + } + + table { + border-collapse: collapse; + margin-bottom: var(--space-4); + } + + th { + font-weight: var(--fw-2); + } + + th, + td { + border-bottom: 1px solid var(--gray-outline-2); + padding: var(--space-3); + + &:first-child { + padding-left: 0; + } + + &:last-child { + padding-right: 0; + } + } + + strong { + font-weight: var(--fw-2); + } + + a { + text-decoration-line: underline; + text-decoration-style: solid; + text-decoration-thickness: 1px; + text-underline-offset: calc(0.1em + 3px); + color: inherit; + position: relative; + z-index: 0; + } + + @media screen and (hover: hover) { + a:hover { + text-decoration: none; + } + } + + @media screen and (hover: hover) { + a:hover::after { + content: ''; + width: calc(100% + 6px); + height: calc(100% + 8px); + top: -4px; + left: -3px; + position: absolute; + background-color: var(--gray-container-1); + z-index: -1; + } + } + } +} + +.editLink { + padding-top: var(--space-9); + padding-bottom: var(--space-9); +} diff --git a/docs/app/DocsProviders.tsx b/docs/app/DocsProviders.tsx new file mode 100644 index 0000000000..7caa4a4eff --- /dev/null +++ b/docs/app/DocsProviders.tsx @@ -0,0 +1,14 @@ +import * as React from 'react'; +import * as Tooltip from '@base_ui/react/Tooltip'; +import { DemoVariantSelectorProvider } from 'docs-base/src/components/demo/DemoVariantSelectorProvider'; +import { PackageManagerSnippetProvider } from 'docs-base/src/blocks/PackageManagerSnippet/PackageManagerSnippetProvider'; + +export function DocsProviders({ children }: { children: React.ReactNode }) { + return ( + + + {children} + + + ); +} diff --git a/docs/app/experiments/[slug]/page.tsx b/docs/app/experiments/[slug]/page.tsx new file mode 100644 index 0000000000..60ed954eaf --- /dev/null +++ b/docs/app/experiments/[slug]/page.tsx @@ -0,0 +1,35 @@ +import { notFound } from 'next/navigation'; +import { type Dirent } from 'node:fs'; +import { readdir } from 'node:fs/promises'; +import * as React from 'react'; + +interface Props { + params: { + slug: string; + }; +} + +export default async function Page(props: Props) { + const { + params: { slug }, + } = props; + + try { + const Experiment = (await import(`../${slug}.tsx`)).default; + return ; + } catch (error) { + notFound(); + } +} + +export async function generateStaticParams() { + return (await readdir('app/experiments', { withFileTypes: true })) + .filter( + (entry: Dirent) => + entry.name.endsWith('.tsx') && + entry.name !== 'page.tsx' && + entry.name !== 'layout.tsx' && + entry.isFile(), + ) + .map((entry: Dirent) => ({ slug: entry.name })); +} diff --git a/docs/pages/experiments/anchor-positioning.tsx b/docs/app/experiments/anchor-positioning.tsx similarity index 99% rename from docs/pages/experiments/anchor-positioning.tsx rename to docs/app/experiments/anchor-positioning.tsx index 4b79201888..98f510dad9 100644 --- a/docs/pages/experiments/anchor-positioning.tsx +++ b/docs/app/experiments/anchor-positioning.tsx @@ -1,3 +1,5 @@ +'use client'; + import * as React from 'react'; import * as ReactDOM from 'react-dom'; diff --git a/docs/pages/experiments/collapsible-accordion.tsx b/docs/app/experiments/collapsible-accordion.tsx similarity index 99% rename from docs/pages/experiments/collapsible-accordion.tsx rename to docs/app/experiments/collapsible-accordion.tsx index 535cccee95..ceec392ed0 100644 --- a/docs/pages/experiments/collapsible-accordion.tsx +++ b/docs/app/experiments/collapsible-accordion.tsx @@ -1,3 +1,5 @@ +'use client'; + import * as React from 'react'; import * as Collapsible from '@base_ui/react/Collapsible'; diff --git a/docs/pages/experiments/collapsible-framer.tsx b/docs/app/experiments/collapsible-framer.tsx similarity index 99% rename from docs/pages/experiments/collapsible-framer.tsx rename to docs/app/experiments/collapsible-framer.tsx index f4ff2791cf..918e4699be 100644 --- a/docs/pages/experiments/collapsible-framer.tsx +++ b/docs/app/experiments/collapsible-framer.tsx @@ -1,3 +1,5 @@ +'use client'; + import * as React from 'react'; import { useTheme } from '@mui/system'; import * as Collapsible from '@base_ui/react/Collapsible'; diff --git a/docs/pages/experiments/collapsible-hidden-until-found.tsx b/docs/app/experiments/collapsible-hidden-until-found.tsx similarity index 99% rename from docs/pages/experiments/collapsible-hidden-until-found.tsx rename to docs/app/experiments/collapsible-hidden-until-found.tsx index c292b81b4e..9e2cd7d604 100644 --- a/docs/pages/experiments/collapsible-hidden-until-found.tsx +++ b/docs/app/experiments/collapsible-hidden-until-found.tsx @@ -1,3 +1,5 @@ +'use client'; + import * as React from 'react'; import * as Collapsible from '@base_ui/react/Collapsible'; diff --git a/docs/pages/experiments/collapsible.tsx b/docs/app/experiments/collapsible.tsx similarity index 99% rename from docs/pages/experiments/collapsible.tsx rename to docs/app/experiments/collapsible.tsx index b3c47630c7..a69c9c0d3f 100644 --- a/docs/pages/experiments/collapsible.tsx +++ b/docs/app/experiments/collapsible.tsx @@ -1,3 +1,5 @@ +'use client'; + import * as React from 'react'; import * as Collapsible from '@base_ui/react/Collapsible'; diff --git a/docs/pages/experiments/dialog.module.css b/docs/app/experiments/dialog.module.css similarity index 100% rename from docs/pages/experiments/dialog.module.css rename to docs/app/experiments/dialog.module.css diff --git a/docs/pages/experiments/dialog.tsx b/docs/app/experiments/dialog.tsx similarity index 99% rename from docs/pages/experiments/dialog.tsx rename to docs/app/experiments/dialog.tsx index 3244285b89..d1dd28b189 100644 --- a/docs/pages/experiments/dialog.tsx +++ b/docs/app/experiments/dialog.tsx @@ -1,3 +1,5 @@ +'use client'; + import * as React from 'react'; import clsx from 'clsx'; import * as Dialog from '@base_ui/react/Dialog'; diff --git a/docs/app/experiments/experiments.module.css b/docs/app/experiments/experiments.module.css new file mode 100644 index 0000000000..db310200ce --- /dev/null +++ b/docs/app/experiments/experiments.module.css @@ -0,0 +1,30 @@ +.main { + display: flex; + flex-direction: column; + align-items: center; + font-family: var(--ff-sans); + padding: 20px; +} + +.h1 { + font-size: 2rem; + margin-bottom: 1rem; + font-weight: 500; +} + +.list { + display: flex; + flex-direction: column; + justify-content: center; + text-align: center; + + a { + text-decoration: none; + color: var(--color-text); + margin: 0.5rem; + + &:hover { + text-decoration: underline; + } + } +} diff --git a/docs/app/experiments/layout.tsx b/docs/app/experiments/layout.tsx new file mode 100644 index 0000000000..27cc3ee416 --- /dev/null +++ b/docs/app/experiments/layout.tsx @@ -0,0 +1,6 @@ +import * as React from 'react'; +import classes from './experiments.module.css'; + +export default function Layout({ children }: React.PropsWithChildren<{}>) { + return
{children}
; +} diff --git a/docs/app/experiments/page.tsx b/docs/app/experiments/page.tsx new file mode 100644 index 0000000000..37af5d6f51 --- /dev/null +++ b/docs/app/experiments/page.tsx @@ -0,0 +1,36 @@ +import * as React from 'react'; +import { readdir } from 'node:fs/promises'; +import { type Dirent } from 'node:fs'; +import Link from 'next/link'; +import classes from './experiments.module.css'; + +export default async function Experiments() { + /* @ts-ignore */ + const allExperiments = (await readdir('app/experiments', { withFileTypes: true })) + .filter( + (entry: Dirent) => + entry.name.endsWith('.tsx') && + entry.name !== 'page.tsx' && + entry.name !== 'layout.tsx' && + entry.isFile(), + ) + .map((entry: Dirent) => entry.name); + + return ( + +

Base UI Experiments

+
+ {allExperiments + .filter((key: string) => key !== './page.tsx') + .map((key: string) => { + const slug = key.replace('./', '').replace('.tsx', ''); + return ( + + {slug.replace(/-/g, ' ')} + + ); + })} +
+
+ ); +} diff --git a/docs/pages/experiments/progress.tsx b/docs/app/experiments/progress.tsx similarity index 99% rename from docs/pages/experiments/progress.tsx rename to docs/app/experiments/progress.tsx index f98f217bb4..eee05f9508 100644 --- a/docs/pages/experiments/progress.tsx +++ b/docs/app/experiments/progress.tsx @@ -1,3 +1,5 @@ +'use client'; + import * as React from 'react'; import { useTheme } from '@mui/system'; import * as Progress from '@base_ui/react/Progress'; diff --git a/docs/pages/experiments/slider-change-committed-lag.tsx b/docs/app/experiments/slider-change-committed-lag.tsx similarity index 98% rename from docs/pages/experiments/slider-change-committed-lag.tsx rename to docs/app/experiments/slider-change-committed-lag.tsx index 198bad1b9c..62e06e32a8 100644 --- a/docs/pages/experiments/slider-change-committed-lag.tsx +++ b/docs/app/experiments/slider-change-committed-lag.tsx @@ -1,3 +1,5 @@ +'use client'; + // https://github.com/mui/material-ui/issues/41739 // to cross check whether this issue would still occur in the new API import * as React from 'react'; diff --git a/docs/pages/experiments/slider-marks.tsx b/docs/app/experiments/slider-marks.tsx similarity index 99% rename from docs/pages/experiments/slider-marks.tsx rename to docs/app/experiments/slider-marks.tsx index 05a8204146..d657adf020 100644 --- a/docs/pages/experiments/slider-marks.tsx +++ b/docs/app/experiments/slider-marks.tsx @@ -1,3 +1,5 @@ +'use client'; + import * as React from 'react'; import * as Slider from '@base_ui/react/Slider'; import { useSliderContext } from '@base_ui/react/Slider'; diff --git a/docs/pages/experiments/slider-template.tsx b/docs/app/experiments/slider-template.tsx similarity index 97% rename from docs/pages/experiments/slider-template.tsx rename to docs/app/experiments/slider-template.tsx index ef38d7c628..46dc5022b7 100644 --- a/docs/pages/experiments/slider-template.tsx +++ b/docs/app/experiments/slider-template.tsx @@ -1,3 +1,5 @@ +'use client'; + import * as React from 'react'; import * as Slider from '@base_ui/react/Slider'; import { Styles } from './slider'; diff --git a/docs/pages/experiments/slider-tooltip.tsx b/docs/app/experiments/slider-tooltip.tsx similarity index 99% rename from docs/pages/experiments/slider-tooltip.tsx rename to docs/app/experiments/slider-tooltip.tsx index a05a681174..977e93b775 100644 --- a/docs/pages/experiments/slider-tooltip.tsx +++ b/docs/app/experiments/slider-tooltip.tsx @@ -1,3 +1,5 @@ +'use client'; + import * as React from 'react'; import { useTheme } from '@mui/system'; import * as Slider from '@base_ui/react/Slider'; diff --git a/docs/pages/experiments/slider.tsx b/docs/app/experiments/slider.tsx similarity index 99% rename from docs/pages/experiments/slider.tsx rename to docs/app/experiments/slider.tsx index 116cd5cef2..3d789a1a90 100644 --- a/docs/pages/experiments/slider.tsx +++ b/docs/app/experiments/slider.tsx @@ -1,3 +1,5 @@ +'use client'; + import * as React from 'react'; import { useTheme } from '@mui/system'; import * as Slider from '@base_ui/react/Slider'; diff --git a/docs/pages/experiments/tabs.tsx b/docs/app/experiments/tabs.tsx similarity index 99% rename from docs/pages/experiments/tabs.tsx rename to docs/app/experiments/tabs.tsx index 0ab1135f99..c52b25bc7b 100644 --- a/docs/pages/experiments/tabs.tsx +++ b/docs/app/experiments/tabs.tsx @@ -1,3 +1,5 @@ +'use client'; + /* eslint-disable react/no-danger */ import * as React from 'react'; import { css, styled } from '@mui/system'; diff --git a/docs/pages/experiments/tooltip.tsx b/docs/app/experiments/tooltip.tsx similarity index 99% rename from docs/pages/experiments/tooltip.tsx rename to docs/app/experiments/tooltip.tsx index 2a18baac46..039eb3671e 100644 --- a/docs/pages/experiments/tooltip.tsx +++ b/docs/app/experiments/tooltip.tsx @@ -1,3 +1,5 @@ +'use client'; + import * as React from 'react'; import * as Tooltip from '@base_ui/react/Tooltip'; import { styled, keyframes } from '@mui/system'; diff --git a/docs/app/layout.tsx b/docs/app/layout.tsx new file mode 100644 index 0000000000..9bf30616a3 --- /dev/null +++ b/docs/app/layout.tsx @@ -0,0 +1,48 @@ +import * as React from 'react'; +import { Metadata } from 'next'; +import { GoogleAnalytics } from 'docs-base/src/components/GoogleAnalytics'; +import { DocsProviders } from './DocsProviders'; +import '../src/styles/style.css'; + +interface Props { + children: React.ReactNode; +} + +export default function Layout({ children }: Props) { + return ( + + + + + + + + + + {children} + + + + + ); +} + +export const metadata: Metadata = { + title: { + template: '%s · Base UI', + default: 'Base UI', + }, + twitter: { + site: '@Base_UI', + card: 'summary_large_image', + }, + openGraph: { + type: 'website', + locale: 'en_US', + title: { + template: '%s · Base UI', + default: 'Base UI', + }, + ttl: 604800, + }, +}; diff --git a/docs/app/not-found.tsx b/docs/app/not-found.tsx new file mode 100644 index 0000000000..d676eb675c --- /dev/null +++ b/docs/app/not-found.tsx @@ -0,0 +1,5 @@ +import * as React from 'react'; + +export default function NotFound() { + return

Page not found

; +} diff --git a/docs/app/page.tsx b/docs/app/page.tsx new file mode 100644 index 0000000000..b8eceb7534 --- /dev/null +++ b/docs/app/page.tsx @@ -0,0 +1,47 @@ +import * as React from 'react'; +import { Metadata } from 'next'; +import Link from 'next/link'; +import { BaseUIIcon } from 'docs-base/src/icons/BaseUI'; + +export default function Home() { + return ( +
+
+ +
+

+ Unstyled UI components for building accessible web apps and design systems. +

+

+ From the creators of Radix, Floating UI, and MUI. +

+ + Documentation + +
+ ); +} + +const description = 'Unstyled UI components for building accessible web apps and design systems.'; + +export const metadata: Metadata = { + description, + twitter: { + description, + }, + openGraph: { + description, + }, +}; diff --git a/docs/babel.config.js b/docs/babel.config.js deleted file mode 100644 index 349ce17131..0000000000 --- a/docs/babel.config.js +++ /dev/null @@ -1,45 +0,0 @@ -const path = require('path'); -const fse = require('fs-extra'); - -const errorCodesPath = path.resolve(__dirname, './public/static/error-codes.json'); - -const { version: transformRuntimeVersion } = fse.readJSONSync( - require.resolve('@babel/runtime-corejs3/package.json'), -); - -module.exports = { - assumptions: { - noDocumentAll: true, - }, - presets: [ - // backport of https://github.com/vercel/next.js/pull/9511 - [ - 'next/babel', - { - 'preset-react': { runtime: 'automatic' }, - 'transform-runtime': { corejs: 3, version: transformRuntimeVersion }, - }, - ], - ], - plugins: [ - [ - 'babel-plugin-macros', - { - muiError: { - errorCodesPath, - }, - }, - ], - 'babel-plugin-optimize-clsx', - ], - ignore: [/@babel[\\|/]runtime/], // Fix a Windows issue. - env: { - production: { - plugins: [ - '@babel/plugin-transform-react-constant-elements', - ['babel-plugin-react-remove-properties', { properties: ['data-mui-test'] }], - ['babel-plugin-transform-react-remove-prop-types', { mode: 'remove' }], - ], - }, - }, -}; diff --git a/docs/config.d.ts b/docs/config.d.ts deleted file mode 100644 index 605606f117..0000000000 --- a/docs/config.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export const LANGUAGES: string[]; - -export const LANGUAGES_SSR: string[]; - -export const LANGUAGES_IN_PROGRESS: string[]; - -export const LANGUAGES_IGNORE_PAGES: (pathname: string) => boolean; diff --git a/docs/config.js b/docs/config.js deleted file mode 100644 index 49a7ebd2de..0000000000 --- a/docs/config.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('@mui/monorepo/docs/config'); diff --git a/docs/config.ts b/docs/config.ts new file mode 100644 index 0000000000..a265661890 --- /dev/null +++ b/docs/config.ts @@ -0,0 +1,6 @@ +export const config = { + shikiThemes: { + light: 'github-light-default', + dark: 'material-theme-ocean', + }, +}; diff --git a/docs/pages/base-ui/api/alert-dialog-backdrop.json b/docs/data/api/alert-dialog-backdrop.json similarity index 88% rename from docs/pages/base-ui/api/alert-dialog-backdrop.json rename to docs/data/api/alert-dialog-backdrop.json index ced30b97d5..e4c113258d 100644 --- a/docs/pages/base-ui/api/alert-dialog-backdrop.json +++ b/docs/data/api/alert-dialog-backdrop.json @@ -15,6 +15,6 @@ "forwardsRefTo": "HTMLDivElement", "filename": "/packages/mui-base/src/AlertDialog/Backdrop/AlertDialogBackdrop.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/alert-dialog-close.json b/docs/data/api/alert-dialog-close.json similarity index 87% rename from docs/pages/base-ui/api/alert-dialog-close.json rename to docs/data/api/alert-dialog-close.json index 3ae0ccd4b4..ed0de8e5c0 100644 --- a/docs/pages/base-ui/api/alert-dialog-close.json +++ b/docs/data/api/alert-dialog-close.json @@ -14,6 +14,6 @@ "forwardsRefTo": "HTMLButtonElement", "filename": "/packages/mui-base/src/AlertDialog/Close/AlertDialogClose.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/alert-dialog-description.json b/docs/data/api/alert-dialog-description.json similarity index 87% rename from docs/pages/base-ui/api/alert-dialog-description.json rename to docs/data/api/alert-dialog-description.json index 2875bcc0a9..4004c33a33 100644 --- a/docs/pages/base-ui/api/alert-dialog-description.json +++ b/docs/data/api/alert-dialog-description.json @@ -14,6 +14,6 @@ "forwardsRefTo": "HTMLParagraphElement", "filename": "/packages/mui-base/src/AlertDialog/Description/AlertDialogDescription.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/alert-dialog-popup.json b/docs/data/api/alert-dialog-popup.json similarity index 89% rename from docs/pages/base-ui/api/alert-dialog-popup.json rename to docs/data/api/alert-dialog-popup.json index ea9878c52a..4e06422802 100644 --- a/docs/pages/base-ui/api/alert-dialog-popup.json +++ b/docs/data/api/alert-dialog-popup.json @@ -16,6 +16,6 @@ "forwardsRefTo": "HTMLDivElement", "filename": "/packages/mui-base/src/AlertDialog/Popup/AlertDialogPopup.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/alert-dialog-root.json b/docs/data/api/alert-dialog-root.json similarity index 86% rename from docs/pages/base-ui/api/alert-dialog-root.json rename to docs/data/api/alert-dialog-root.json index a733c1d74f..dddc81760d 100644 --- a/docs/pages/base-ui/api/alert-dialog-root.json +++ b/docs/data/api/alert-dialog-root.json @@ -15,6 +15,6 @@ "muiName": "AlertDialogRoot", "filename": "/packages/mui-base/src/AlertDialog/Root/AlertDialogRoot.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/alert-dialog-title.json b/docs/data/api/alert-dialog-title.json similarity index 87% rename from docs/pages/base-ui/api/alert-dialog-title.json rename to docs/data/api/alert-dialog-title.json index cbea492a58..7d11d2f33c 100644 --- a/docs/pages/base-ui/api/alert-dialog-title.json +++ b/docs/data/api/alert-dialog-title.json @@ -14,6 +14,6 @@ "forwardsRefTo": "HTMLHeadingElement", "filename": "/packages/mui-base/src/AlertDialog/Title/AlertDialogTitle.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/alert-dialog-trigger.json b/docs/data/api/alert-dialog-trigger.json similarity index 87% rename from docs/pages/base-ui/api/alert-dialog-trigger.json rename to docs/data/api/alert-dialog-trigger.json index a2ba533cf7..e785893339 100644 --- a/docs/pages/base-ui/api/alert-dialog-trigger.json +++ b/docs/data/api/alert-dialog-trigger.json @@ -14,6 +14,6 @@ "forwardsRefTo": "HTMLButtonElement", "filename": "/packages/mui-base/src/AlertDialog/Trigger/AlertDialogTrigger.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/checkbox-group-root.json b/docs/data/api/checkbox-group-root.json similarity index 91% rename from docs/pages/base-ui/api/checkbox-group-root.json rename to docs/data/api/checkbox-group-root.json index c6598e663f..d7a9319d07 100644 --- a/docs/pages/base-ui/api/checkbox-group-root.json +++ b/docs/data/api/checkbox-group-root.json @@ -20,6 +20,6 @@ "forwardsRefTo": "HTMLDivElement", "filename": "/packages/mui-base/src/CheckboxGroup/Root/CheckboxGroupRoot.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/checkbox-indicator.json b/docs/data/api/checkbox-indicator.json similarity index 89% rename from docs/pages/base-ui/api/checkbox-indicator.json rename to docs/data/api/checkbox-indicator.json index 85eddfd6e5..b4d7a04f53 100644 --- a/docs/pages/base-ui/api/checkbox-indicator.json +++ b/docs/data/api/checkbox-indicator.json @@ -15,6 +15,6 @@ "forwardsRefTo": "HTMLSpanElement", "filename": "/packages/mui-base/src/Checkbox/Indicator/CheckboxIndicator.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/checkbox-root.json b/docs/data/api/checkbox-root.json similarity index 94% rename from docs/pages/base-ui/api/checkbox-root.json rename to docs/data/api/checkbox-root.json index 6e43c832b5..2faa95eb58 100644 --- a/docs/pages/base-ui/api/checkbox-root.json +++ b/docs/data/api/checkbox-root.json @@ -34,6 +34,6 @@ "forwardsRefTo": "HTMLButtonElement", "filename": "/packages/mui-base/src/Checkbox/Root/CheckboxRoot.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/click-away-listener.json b/docs/data/api/click-away-listener.json similarity index 91% rename from docs/pages/base-ui/api/click-away-listener.json rename to docs/data/api/click-away-listener.json index a9198e004b..b8fdec663b 100644 --- a/docs/pages/base-ui/api/click-away-listener.json +++ b/docs/data/api/click-away-listener.json @@ -26,6 +26,6 @@ "muiName": "ClickAwayListener", "filename": "/packages/mui-base/src/legacy/ClickAwayListener/ClickAwayListener.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/collapsible-content.json b/docs/data/api/collapsible-content.json similarity index 89% rename from docs/pages/base-ui/api/collapsible-content.json rename to docs/data/api/collapsible-content.json index a669796d20..f756bd0bd8 100644 --- a/docs/pages/base-ui/api/collapsible-content.json +++ b/docs/data/api/collapsible-content.json @@ -18,6 +18,6 @@ "forwardsRefTo": "HTMLDivElement", "filename": "/packages/mui-base/src/Collapsible/Content/CollapsibleContent.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/collapsible-root.json b/docs/data/api/collapsible-root.json similarity index 91% rename from docs/pages/base-ui/api/collapsible-root.json rename to docs/data/api/collapsible-root.json index 57be702ca3..4e1abe2c46 100644 --- a/docs/pages/base-ui/api/collapsible-root.json +++ b/docs/data/api/collapsible-root.json @@ -19,6 +19,6 @@ "forwardsRefTo": "HTMLDivElement", "filename": "/packages/mui-base/src/Collapsible/Root/CollapsibleRoot.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/collapsible-trigger.json b/docs/data/api/collapsible-trigger.json similarity index 87% rename from docs/pages/base-ui/api/collapsible-trigger.json rename to docs/data/api/collapsible-trigger.json index 589540e0ee..0aa32c8e70 100644 --- a/docs/pages/base-ui/api/collapsible-trigger.json +++ b/docs/data/api/collapsible-trigger.json @@ -14,6 +14,6 @@ "forwardsRefTo": "HTMLButtonElement", "filename": "/packages/mui-base/src/Collapsible/Trigger/CollapsibleTrigger.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/dialog-backdrop.json b/docs/data/api/dialog-backdrop.json similarity index 89% rename from docs/pages/base-ui/api/dialog-backdrop.json rename to docs/data/api/dialog-backdrop.json index 1256870dac..041757b2b5 100644 --- a/docs/pages/base-ui/api/dialog-backdrop.json +++ b/docs/data/api/dialog-backdrop.json @@ -15,6 +15,6 @@ "forwardsRefTo": "HTMLDivElement", "filename": "/packages/mui-base/src/Dialog/Backdrop/DialogBackdrop.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/dialog-close.json b/docs/data/api/dialog-close.json similarity index 87% rename from docs/pages/base-ui/api/dialog-close.json rename to docs/data/api/dialog-close.json index 0f0791e752..f3c98f9ce0 100644 --- a/docs/pages/base-ui/api/dialog-close.json +++ b/docs/data/api/dialog-close.json @@ -14,6 +14,6 @@ "forwardsRefTo": "HTMLButtonElement", "filename": "/packages/mui-base/src/Dialog/Close/DialogClose.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/dialog-description.json b/docs/data/api/dialog-description.json similarity index 88% rename from docs/pages/base-ui/api/dialog-description.json rename to docs/data/api/dialog-description.json index 995ec0670b..8733b10c70 100644 --- a/docs/pages/base-ui/api/dialog-description.json +++ b/docs/data/api/dialog-description.json @@ -14,6 +14,6 @@ "forwardsRefTo": "HTMLParagraphElement", "filename": "/packages/mui-base/src/Dialog/Description/DialogDescription.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/dialog-popup.json b/docs/data/api/dialog-popup.json similarity index 90% rename from docs/pages/base-ui/api/dialog-popup.json rename to docs/data/api/dialog-popup.json index 6cb5afbd1f..3072b9ff3c 100644 --- a/docs/pages/base-ui/api/dialog-popup.json +++ b/docs/data/api/dialog-popup.json @@ -16,6 +16,6 @@ "forwardsRefTo": "HTMLDivElement", "filename": "/packages/mui-base/src/Dialog/Popup/DialogPopup.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/dialog-root.json b/docs/data/api/dialog-root.json similarity index 89% rename from docs/pages/base-ui/api/dialog-root.json rename to docs/data/api/dialog-root.json index 478fe8acbe..20a26cb4fc 100644 --- a/docs/pages/base-ui/api/dialog-root.json +++ b/docs/data/api/dialog-root.json @@ -15,6 +15,6 @@ "muiName": "DialogRoot", "filename": "/packages/mui-base/src/Dialog/Root/DialogRoot.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/dialog-title.json b/docs/data/api/dialog-title.json similarity index 87% rename from docs/pages/base-ui/api/dialog-title.json rename to docs/data/api/dialog-title.json index c686160ca8..5a9cfb7e43 100644 --- a/docs/pages/base-ui/api/dialog-title.json +++ b/docs/data/api/dialog-title.json @@ -14,6 +14,6 @@ "forwardsRefTo": "HTMLHeadingElement", "filename": "/packages/mui-base/src/Dialog/Title/DialogTitle.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/dialog-trigger.json b/docs/data/api/dialog-trigger.json similarity index 88% rename from docs/pages/base-ui/api/dialog-trigger.json rename to docs/data/api/dialog-trigger.json index 04cc9b2212..08ba0d1edb 100644 --- a/docs/pages/base-ui/api/dialog-trigger.json +++ b/docs/data/api/dialog-trigger.json @@ -14,6 +14,6 @@ "forwardsRefTo": "HTMLButtonElement", "filename": "/packages/mui-base/src/Dialog/Trigger/DialogTrigger.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/field-control.json b/docs/data/api/field-control.json similarity index 88% rename from docs/pages/base-ui/api/field-control.json rename to docs/data/api/field-control.json index edd786dac8..c6db9e9aa2 100644 --- a/docs/pages/base-ui/api/field-control.json +++ b/docs/data/api/field-control.json @@ -14,6 +14,6 @@ "forwardsRefTo": "HTMLInputElement", "filename": "/packages/mui-base/src/Field/Control/FieldControl.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/field-description.json b/docs/data/api/field-description.json similarity index 88% rename from docs/pages/base-ui/api/field-description.json rename to docs/data/api/field-description.json index 10f4d3e666..4654b11ac8 100644 --- a/docs/pages/base-ui/api/field-description.json +++ b/docs/data/api/field-description.json @@ -14,6 +14,6 @@ "forwardsRefTo": "HTMLParagraphElement", "filename": "/packages/mui-base/src/Field/Description/FieldDescription.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/field-error.json b/docs/data/api/field-error.json similarity index 92% rename from docs/pages/base-ui/api/field-error.json rename to docs/data/api/field-error.json index b6ebc23de9..970c3f775e 100644 --- a/docs/pages/base-ui/api/field-error.json +++ b/docs/data/api/field-error.json @@ -19,6 +19,6 @@ "forwardsRefTo": "HTMLDivElement", "filename": "/packages/mui-base/src/Field/Error/FieldError.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/field-label.json b/docs/data/api/field-label.json similarity index 87% rename from docs/pages/base-ui/api/field-label.json rename to docs/data/api/field-label.json index b965b8fac8..feebb4e277 100644 --- a/docs/pages/base-ui/api/field-label.json +++ b/docs/data/api/field-label.json @@ -12,6 +12,6 @@ "forwardsRefTo": "HTMLLabelElement", "filename": "/packages/mui-base/src/Field/Label/FieldLabel.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/field-root.json b/docs/data/api/field-root.json similarity index 91% rename from docs/pages/base-ui/api/field-root.json rename to docs/data/api/field-root.json index cdb93b639a..8d1c6a0893 100644 --- a/docs/pages/base-ui/api/field-root.json +++ b/docs/data/api/field-root.json @@ -16,6 +16,6 @@ "forwardsRefTo": "HTMLDivElement", "filename": "/packages/mui-base/src/Field/Root/FieldRoot.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/field-validity.json b/docs/data/api/field-validity.json similarity index 82% rename from docs/pages/base-ui/api/field-validity.json rename to docs/data/api/field-validity.json index 8ae6d577a7..39bbdadb2d 100644 --- a/docs/pages/base-ui/api/field-validity.json +++ b/docs/data/api/field-validity.json @@ -10,6 +10,6 @@ "muiName": "FieldValidity", "filename": "/packages/mui-base/src/Field/Validity/FieldValidity.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/fieldset-legend.json b/docs/data/api/fieldset-legend.json similarity index 87% rename from docs/pages/base-ui/api/fieldset-legend.json rename to docs/data/api/fieldset-legend.json index 676f46fe0d..08643190ff 100644 --- a/docs/pages/base-ui/api/fieldset-legend.json +++ b/docs/data/api/fieldset-legend.json @@ -14,6 +14,6 @@ "forwardsRefTo": "HTMLSpanElement", "filename": "/packages/mui-base/src/Fieldset/Legend/FieldsetLegend.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/fieldset-root.json b/docs/data/api/fieldset-root.json similarity index 87% rename from docs/pages/base-ui/api/fieldset-root.json rename to docs/data/api/fieldset-root.json index 52faf80619..cd34d7cfc4 100644 --- a/docs/pages/base-ui/api/fieldset-root.json +++ b/docs/data/api/fieldset-root.json @@ -14,6 +14,6 @@ "forwardsRefTo": "HTMLFieldSetElement", "filename": "/packages/mui-base/src/Fieldset/Root/FieldsetRoot.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/focus-trap.json b/docs/data/api/focus-trap.json similarity index 91% rename from docs/pages/base-ui/api/focus-trap.json rename to docs/data/api/focus-trap.json index 89493cb807..1ebc33fa86 100644 --- a/docs/pages/base-ui/api/focus-trap.json +++ b/docs/data/api/focus-trap.json @@ -22,6 +22,6 @@ "muiName": "FocusTrap", "filename": "/packages/mui-base/src/legacy/FocusTrap/FocusTrap.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/form-control.json b/docs/data/api/form-control.json similarity index 92% rename from docs/pages/base-ui/api/form-control.json rename to docs/data/api/form-control.json index 15e8de9e67..b799c1adc6 100644 --- a/docs/pages/base-ui/api/form-control.json +++ b/docs/data/api/form-control.json @@ -25,6 +25,6 @@ "forwardsRefTo": "HTMLDivElement", "filename": "/packages/mui-base/src/legacy/FormControl/FormControl.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/menu-arrow.json b/docs/data/api/menu-arrow.json similarity index 89% rename from docs/pages/base-ui/api/menu-arrow.json rename to docs/data/api/menu-arrow.json index e03d97c5e5..026e242c14 100644 --- a/docs/pages/base-ui/api/menu-arrow.json +++ b/docs/data/api/menu-arrow.json @@ -13,6 +13,6 @@ "forwardsRefTo": "HTMLDivElement", "filename": "/packages/mui-base/src/Menu/Arrow/MenuArrow.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/menu-item.json b/docs/data/api/menu-item.json similarity index 89% rename from docs/pages/base-ui/api/menu-item.json rename to docs/data/api/menu-item.json index 33242a8ebd..639cb25160 100644 --- a/docs/pages/base-ui/api/menu-item.json +++ b/docs/data/api/menu-item.json @@ -15,6 +15,6 @@ "forwardsRefTo": "HTMLDivElement", "filename": "/packages/mui-base/src/Menu/Item/MenuItem.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/menu-popup.json b/docs/data/api/menu-popup.json similarity index 88% rename from docs/pages/base-ui/api/menu-popup.json rename to docs/data/api/menu-popup.json index b9877029ee..49cc98f616 100644 --- a/docs/pages/base-ui/api/menu-popup.json +++ b/docs/data/api/menu-popup.json @@ -13,6 +13,6 @@ "forwardsRefTo": "HTMLDivElement", "filename": "/packages/mui-base/src/Menu/Popup/MenuPopup.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/menu-positioner.json b/docs/data/api/menu-positioner.json similarity index 96% rename from docs/pages/base-ui/api/menu-positioner.json rename to docs/data/api/menu-positioner.json index 3a18b00470..f57d2e57bf 100644 --- a/docs/pages/base-ui/api/menu-positioner.json +++ b/docs/data/api/menu-positioner.json @@ -59,6 +59,6 @@ "forwardsRefTo": "HTMLDivElement", "filename": "/packages/mui-base/src/Menu/Positioner/MenuPositioner.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/menu-root.json b/docs/data/api/menu-root.json similarity index 93% rename from docs/pages/base-ui/api/menu-root.json rename to docs/data/api/menu-root.json index 22e9be139b..d79474fbb9 100644 --- a/docs/pages/base-ui/api/menu-root.json +++ b/docs/data/api/menu-root.json @@ -26,6 +26,6 @@ "muiName": "MenuRoot", "filename": "/packages/mui-base/src/Menu/Root/MenuRoot.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/menu-trigger.json b/docs/data/api/menu-trigger.json similarity index 90% rename from docs/pages/base-ui/api/menu-trigger.json rename to docs/data/api/menu-trigger.json index 231b072df3..05e73a2a82 100644 --- a/docs/pages/base-ui/api/menu-trigger.json +++ b/docs/data/api/menu-trigger.json @@ -15,6 +15,6 @@ "forwardsRefTo": "HTMLButtonElement", "filename": "/packages/mui-base/src/Menu/Trigger/MenuTrigger.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/no-ssr.json b/docs/data/api/no-ssr.json similarity index 85% rename from docs/pages/base-ui/api/no-ssr.json rename to docs/data/api/no-ssr.json index bce849fae7..17ef9a515e 100644 --- a/docs/pages/base-ui/api/no-ssr.json +++ b/docs/data/api/no-ssr.json @@ -12,6 +12,6 @@ "muiName": "NoSsr", "filename": "/packages/mui-base/src/legacy/NoSsr/NoSsr.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/number-field-decrement.json b/docs/data/api/number-field-decrement.json similarity index 87% rename from docs/pages/base-ui/api/number-field-decrement.json rename to docs/data/api/number-field-decrement.json index 1da65c97bc..cd1e3cea37 100644 --- a/docs/pages/base-ui/api/number-field-decrement.json +++ b/docs/data/api/number-field-decrement.json @@ -14,6 +14,6 @@ "forwardsRefTo": "HTMLButtonElement", "filename": "/packages/mui-base/src/NumberField/Decrement/NumberFieldDecrement.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/number-field-group.json b/docs/data/api/number-field-group.json similarity index 87% rename from docs/pages/base-ui/api/number-field-group.json rename to docs/data/api/number-field-group.json index 9d95b0598b..fc0aa6bafd 100644 --- a/docs/pages/base-ui/api/number-field-group.json +++ b/docs/data/api/number-field-group.json @@ -14,6 +14,6 @@ "forwardsRefTo": "HTMLDivElement", "filename": "/packages/mui-base/src/NumberField/Group/NumberFieldGroup.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/number-field-increment.json b/docs/data/api/number-field-increment.json similarity index 87% rename from docs/pages/base-ui/api/number-field-increment.json rename to docs/data/api/number-field-increment.json index 2add3d46d3..ccf741caea 100644 --- a/docs/pages/base-ui/api/number-field-increment.json +++ b/docs/data/api/number-field-increment.json @@ -14,6 +14,6 @@ "forwardsRefTo": "HTMLButtonElement", "filename": "/packages/mui-base/src/NumberField/Increment/NumberFieldIncrement.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/number-field-input.json b/docs/data/api/number-field-input.json similarity index 87% rename from docs/pages/base-ui/api/number-field-input.json rename to docs/data/api/number-field-input.json index 3e1e864f78..e2252d7710 100644 --- a/docs/pages/base-ui/api/number-field-input.json +++ b/docs/data/api/number-field-input.json @@ -14,6 +14,6 @@ "forwardsRefTo": "HTMLInputElement", "filename": "/packages/mui-base/src/NumberField/Input/NumberFieldInput.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/number-field-root.json b/docs/data/api/number-field-root.json similarity index 96% rename from docs/pages/base-ui/api/number-field-root.json rename to docs/data/api/number-field-root.json index 66c8635b17..5b3e34aca7 100644 --- a/docs/pages/base-ui/api/number-field-root.json +++ b/docs/data/api/number-field-root.json @@ -42,6 +42,6 @@ "forwardsRefTo": "HTMLDivElement", "filename": "/packages/mui-base/src/NumberField/Root/NumberFieldRoot.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/number-field-scrub-area-cursor.json b/docs/data/api/number-field-scrub-area-cursor.json similarity index 88% rename from docs/pages/base-ui/api/number-field-scrub-area-cursor.json rename to docs/data/api/number-field-scrub-area-cursor.json index 35a61c44fc..095efebcb8 100644 --- a/docs/pages/base-ui/api/number-field-scrub-area-cursor.json +++ b/docs/data/api/number-field-scrub-area-cursor.json @@ -14,6 +14,6 @@ "forwardsRefTo": "HTMLSpanElement", "filename": "/packages/mui-base/src/NumberField/ScrubAreaCursor/NumberFieldScrubAreaCursor.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/number-field-scrub-area.json b/docs/data/api/number-field-scrub-area.json similarity index 90% rename from docs/pages/base-ui/api/number-field-scrub-area.json rename to docs/data/api/number-field-scrub-area.json index 303673a875..f4c83c1085 100644 --- a/docs/pages/base-ui/api/number-field-scrub-area.json +++ b/docs/data/api/number-field-scrub-area.json @@ -20,6 +20,6 @@ "forwardsRefTo": "HTMLSpanElement", "filename": "/packages/mui-base/src/NumberField/ScrubArea/NumberFieldScrubArea.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/option-group.json b/docs/data/api/option-group.json similarity index 91% rename from docs/pages/base-ui/api/option-group.json rename to docs/data/api/option-group.json index 43a30ea13c..0d1bafd8fd 100644 --- a/docs/pages/base-ui/api/option-group.json +++ b/docs/data/api/option-group.json @@ -26,6 +26,6 @@ "forwardsRefTo": "HTMLLIElement", "filename": "/packages/mui-base/src/legacy/OptionGroup/OptionGroup.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/option.json b/docs/data/api/option.json similarity index 90% rename from docs/pages/base-ui/api/option.json rename to docs/data/api/option.json index b76fea09fb..10af8958f2 100644 --- a/docs/pages/base-ui/api/option.json +++ b/docs/data/api/option.json @@ -21,6 +21,6 @@ "forwardsRefTo": "HTMLLIElement", "filename": "/packages/mui-base/src/legacy/Option/Option.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/popover-arrow.json b/docs/data/api/popover-arrow.json similarity index 89% rename from docs/pages/base-ui/api/popover-arrow.json rename to docs/data/api/popover-arrow.json index 48b5ba258f..278c8cfd65 100644 --- a/docs/pages/base-ui/api/popover-arrow.json +++ b/docs/data/api/popover-arrow.json @@ -15,6 +15,6 @@ "forwardsRefTo": "HTMLDivElement", "filename": "/packages/mui-base/src/Popover/Arrow/PopoverArrow.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/popover-backdrop.json b/docs/data/api/popover-backdrop.json similarity index 90% rename from docs/pages/base-ui/api/popover-backdrop.json rename to docs/data/api/popover-backdrop.json index 14ea5ffa0e..c2c9ea7605 100644 --- a/docs/pages/base-ui/api/popover-backdrop.json +++ b/docs/data/api/popover-backdrop.json @@ -19,6 +19,6 @@ "forwardsRefTo": "HTMLDivElement", "filename": "/packages/mui-base/src/Popover/Backdrop/PopoverBackdrop.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/popover-close.json b/docs/data/api/popover-close.json similarity index 87% rename from docs/pages/base-ui/api/popover-close.json rename to docs/data/api/popover-close.json index 4a61ef621f..31957848c9 100644 --- a/docs/pages/base-ui/api/popover-close.json +++ b/docs/data/api/popover-close.json @@ -14,6 +14,6 @@ "forwardsRefTo": "HTMLButtonElement", "filename": "/packages/mui-base/src/Popover/Close/PopoverClose.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/popover-description.json b/docs/data/api/popover-description.json similarity index 88% rename from docs/pages/base-ui/api/popover-description.json rename to docs/data/api/popover-description.json index ac05beda57..b3eeb77f99 100644 --- a/docs/pages/base-ui/api/popover-description.json +++ b/docs/data/api/popover-description.json @@ -14,6 +14,6 @@ "forwardsRefTo": "HTMLParagraphElement", "filename": "/packages/mui-base/src/Popover/Description/PopoverDescription.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/popover-popup.json b/docs/data/api/popover-popup.json similarity index 87% rename from docs/pages/base-ui/api/popover-popup.json rename to docs/data/api/popover-popup.json index 74937e72b3..06a36805b0 100644 --- a/docs/pages/base-ui/api/popover-popup.json +++ b/docs/data/api/popover-popup.json @@ -14,6 +14,6 @@ "forwardsRefTo": "HTMLDivElement", "filename": "/packages/mui-base/src/Popover/Popup/PopoverPopup.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/popover-positioner.json b/docs/data/api/popover-positioner.json similarity index 96% rename from docs/pages/base-ui/api/popover-positioner.json rename to docs/data/api/popover-positioner.json index 73e00c6d06..e40a2886ea 100644 --- a/docs/pages/base-ui/api/popover-positioner.json +++ b/docs/data/api/popover-positioner.json @@ -59,6 +59,6 @@ "forwardsRefTo": "HTMLDivElement", "filename": "/packages/mui-base/src/Popover/Positioner/PopoverPositioner.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/popover-root.json b/docs/data/api/popover-root.json similarity index 92% rename from docs/pages/base-ui/api/popover-root.json rename to docs/data/api/popover-root.json index 786ee24dce..7235da5dcb 100644 --- a/docs/pages/base-ui/api/popover-root.json +++ b/docs/data/api/popover-root.json @@ -26,6 +26,6 @@ "muiName": "PopoverRoot", "filename": "/packages/mui-base/src/Popover/Root/PopoverRoot.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/popover-title.json b/docs/data/api/popover-title.json similarity index 87% rename from docs/pages/base-ui/api/popover-title.json rename to docs/data/api/popover-title.json index 4b527795e4..239fcf2910 100644 --- a/docs/pages/base-ui/api/popover-title.json +++ b/docs/data/api/popover-title.json @@ -14,6 +14,6 @@ "forwardsRefTo": "HTMLHeadingElement", "filename": "/packages/mui-base/src/Popover/Title/PopoverTitle.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/popover-trigger.json b/docs/data/api/popover-trigger.json similarity index 88% rename from docs/pages/base-ui/api/popover-trigger.json rename to docs/data/api/popover-trigger.json index 48b6895388..cd6204789f 100644 --- a/docs/pages/base-ui/api/popover-trigger.json +++ b/docs/data/api/popover-trigger.json @@ -14,6 +14,6 @@ "forwardsRefTo": "HTMLButtonElement", "filename": "/packages/mui-base/src/Popover/Trigger/PopoverTrigger.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/popup.json b/docs/data/api/popup.json similarity index 96% rename from docs/pages/base-ui/api/popup.json rename to docs/data/api/popup.json index b3945c372d..45bade2d94 100644 --- a/docs/pages/base-ui/api/popup.json +++ b/docs/data/api/popup.json @@ -52,6 +52,6 @@ "forwardsRefTo": "HTMLDivElement", "filename": "/packages/mui-base/src/legacy/Unstable_Popup/Popup.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/portal.json b/docs/data/api/portal.json similarity index 86% rename from docs/pages/base-ui/api/portal.json rename to docs/data/api/portal.json index 8f99df400f..8ae3526537 100644 --- a/docs/pages/base-ui/api/portal.json +++ b/docs/data/api/portal.json @@ -12,6 +12,6 @@ "muiName": "Portal", "filename": "/packages/mui-base/src/legacy/Portal/Portal.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/preview-card-arrow.json b/docs/data/api/preview-card-arrow.json similarity index 88% rename from docs/pages/base-ui/api/preview-card-arrow.json rename to docs/data/api/preview-card-arrow.json index 55330f1db5..a37473e607 100644 --- a/docs/pages/base-ui/api/preview-card-arrow.json +++ b/docs/data/api/preview-card-arrow.json @@ -15,6 +15,6 @@ "forwardsRefTo": "HTMLDivElement", "filename": "/packages/mui-base/src/PreviewCard/Arrow/PreviewCardArrow.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/preview-card-backdrop.json b/docs/data/api/preview-card-backdrop.json similarity index 89% rename from docs/pages/base-ui/api/preview-card-backdrop.json rename to docs/data/api/preview-card-backdrop.json index 92809a18ee..ef40f420f1 100644 --- a/docs/pages/base-ui/api/preview-card-backdrop.json +++ b/docs/data/api/preview-card-backdrop.json @@ -16,6 +16,6 @@ "forwardsRefTo": "HTMLDivElement", "filename": "/packages/mui-base/src/PreviewCard/Backdrop/PreviewCardBackdrop.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/preview-card-popup.json b/docs/data/api/preview-card-popup.json similarity index 87% rename from docs/pages/base-ui/api/preview-card-popup.json rename to docs/data/api/preview-card-popup.json index 3175bd3af0..3d1b7e10a0 100644 --- a/docs/pages/base-ui/api/preview-card-popup.json +++ b/docs/data/api/preview-card-popup.json @@ -14,6 +14,6 @@ "forwardsRefTo": "HTMLDivElement", "filename": "/packages/mui-base/src/PreviewCard/Popup/PreviewCardPopup.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/preview-card-positioner.json b/docs/data/api/preview-card-positioner.json similarity index 96% rename from docs/pages/base-ui/api/preview-card-positioner.json rename to docs/data/api/preview-card-positioner.json index b3364857d9..84141a8efb 100644 --- a/docs/pages/base-ui/api/preview-card-positioner.json +++ b/docs/data/api/preview-card-positioner.json @@ -59,6 +59,6 @@ "forwardsRefTo": "HTMLDivElement", "filename": "/packages/mui-base/src/PreviewCard/Positioner/PreviewCardPositioner.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/preview-card-root.json b/docs/data/api/preview-card-root.json similarity index 90% rename from docs/pages/base-ui/api/preview-card-root.json rename to docs/data/api/preview-card-root.json index 0768357b05..02a5916f07 100644 --- a/docs/pages/base-ui/api/preview-card-root.json +++ b/docs/data/api/preview-card-root.json @@ -21,6 +21,6 @@ "muiName": "PreviewCardRoot", "filename": "/packages/mui-base/src/PreviewCard/Root/PreviewCardRoot.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/preview-card-trigger.json b/docs/data/api/preview-card-trigger.json similarity index 87% rename from docs/pages/base-ui/api/preview-card-trigger.json rename to docs/data/api/preview-card-trigger.json index 8f6e03f893..4fa0b2fa94 100644 --- a/docs/pages/base-ui/api/preview-card-trigger.json +++ b/docs/data/api/preview-card-trigger.json @@ -14,6 +14,6 @@ "forwardsRefTo": "HTMLAnchorElement", "filename": "/packages/mui-base/src/PreviewCard/Trigger/PreviewCardTrigger.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/progress-indicator.json b/docs/data/api/progress-indicator.json similarity index 88% rename from docs/pages/base-ui/api/progress-indicator.json rename to docs/data/api/progress-indicator.json index aa7e0347eb..533523f185 100644 --- a/docs/pages/base-ui/api/progress-indicator.json +++ b/docs/data/api/progress-indicator.json @@ -14,6 +14,6 @@ "forwardsRefTo": "HTMLSpanElement", "filename": "/packages/mui-base/src/Progress/Indicator/ProgressIndicator.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/progress-root.json b/docs/data/api/progress-root.json similarity index 94% rename from docs/pages/base-ui/api/progress-root.json rename to docs/data/api/progress-root.json index 3f19432036..125c799f7f 100644 --- a/docs/pages/base-ui/api/progress-root.json +++ b/docs/data/api/progress-root.json @@ -38,6 +38,6 @@ "forwardsRefTo": "HTMLDivElement", "filename": "/packages/mui-base/src/Progress/Root/ProgressRoot.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/progress-track.json b/docs/data/api/progress-track.json similarity index 87% rename from docs/pages/base-ui/api/progress-track.json rename to docs/data/api/progress-track.json index d3c67ca359..22ed962223 100644 --- a/docs/pages/base-ui/api/progress-track.json +++ b/docs/data/api/progress-track.json @@ -14,6 +14,6 @@ "forwardsRefTo": "HTMLSpanElement", "filename": "/packages/mui-base/src/Progress/Track/ProgressTrack.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/radio-group-root.json b/docs/data/api/radio-group-root.json similarity index 91% rename from docs/pages/base-ui/api/radio-group-root.json rename to docs/data/api/radio-group-root.json index c6fa6bb283..c18ad3f6c6 100644 --- a/docs/pages/base-ui/api/radio-group-root.json +++ b/docs/data/api/radio-group-root.json @@ -21,6 +21,6 @@ "forwardsRefTo": "HTMLDivElement", "filename": "/packages/mui-base/src/RadioGroup/Root/RadioGroupRoot.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/radio-indicator.json b/docs/data/api/radio-indicator.json similarity index 88% rename from docs/pages/base-ui/api/radio-indicator.json rename to docs/data/api/radio-indicator.json index 64d48ae20c..871ffdf1e1 100644 --- a/docs/pages/base-ui/api/radio-indicator.json +++ b/docs/data/api/radio-indicator.json @@ -15,6 +15,6 @@ "forwardsRefTo": "HTMLSpanElement", "filename": "/packages/mui-base/src/Radio/Indicator/RadioIndicator.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/radio-root.json b/docs/data/api/radio-root.json similarity index 90% rename from docs/pages/base-ui/api/radio-root.json rename to docs/data/api/radio-root.json index 5e1ad484c2..277bbc8074 100644 --- a/docs/pages/base-ui/api/radio-root.json +++ b/docs/data/api/radio-root.json @@ -16,6 +16,6 @@ "forwardsRefTo": "HTMLButtonElement", "filename": "/packages/mui-base/src/Radio/Root/RadioRoot.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/select.json b/docs/data/api/select.json similarity index 95% rename from docs/pages/base-ui/api/select.json rename to docs/data/api/select.json index fb03ad00ec..a15215c7b8 100644 --- a/docs/pages/base-ui/api/select.json +++ b/docs/data/api/select.json @@ -42,6 +42,6 @@ "forwardsRefTo": "HTMLButtonElement", "filename": "/packages/mui-base/src/legacy/Select/Select.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/slider-control.json b/docs/data/api/slider-control.json similarity index 88% rename from docs/pages/base-ui/api/slider-control.json rename to docs/data/api/slider-control.json index 4afaf710f5..a5a029fd21 100644 --- a/docs/pages/base-ui/api/slider-control.json +++ b/docs/data/api/slider-control.json @@ -14,6 +14,6 @@ "forwardsRefTo": "HTMLSpanElement", "filename": "/packages/mui-base/src/Slider/Control/SliderControl.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/slider-indicator.json b/docs/data/api/slider-indicator.json similarity index 88% rename from docs/pages/base-ui/api/slider-indicator.json rename to docs/data/api/slider-indicator.json index 2a5f48b7f0..f56dec0339 100644 --- a/docs/pages/base-ui/api/slider-indicator.json +++ b/docs/data/api/slider-indicator.json @@ -14,6 +14,6 @@ "forwardsRefTo": "HTMLSpanElement", "filename": "/packages/mui-base/src/Slider/Indicator/SliderIndicator.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/slider-output.json b/docs/data/api/slider-output.json similarity index 88% rename from docs/pages/base-ui/api/slider-output.json rename to docs/data/api/slider-output.json index df302bc721..674878e398 100644 --- a/docs/pages/base-ui/api/slider-output.json +++ b/docs/data/api/slider-output.json @@ -14,6 +14,6 @@ "forwardsRefTo": "HTMLOutputElement", "filename": "/packages/mui-base/src/Slider/Output/SliderOutput.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/slider-root.json b/docs/data/api/slider-root.json similarity index 96% rename from docs/pages/base-ui/api/slider-root.json rename to docs/data/api/slider-root.json index 15286acf93..6c83045dcb 100644 --- a/docs/pages/base-ui/api/slider-root.json +++ b/docs/data/api/slider-root.json @@ -50,6 +50,6 @@ "forwardsRefTo": "HTMLDivElement", "filename": "/packages/mui-base/src/Slider/Root/SliderRoot.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/slider-thumb.json b/docs/data/api/slider-thumb.json similarity index 92% rename from docs/pages/base-ui/api/slider-thumb.json rename to docs/data/api/slider-thumb.json index 23f15b78cb..17027ffd04 100644 --- a/docs/pages/base-ui/api/slider-thumb.json +++ b/docs/data/api/slider-thumb.json @@ -27,6 +27,6 @@ "forwardsRefTo": "HTMLSpanElement", "filename": "/packages/mui-base/src/Slider/Thumb/SliderThumb.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/slider-track.json b/docs/data/api/slider-track.json similarity index 87% rename from docs/pages/base-ui/api/slider-track.json rename to docs/data/api/slider-track.json index 1ab887f9f7..e226d779a8 100644 --- a/docs/pages/base-ui/api/slider-track.json +++ b/docs/data/api/slider-track.json @@ -14,6 +14,6 @@ "forwardsRefTo": "HTMLSpanElement", "filename": "/packages/mui-base/src/Slider/Track/SliderTrack.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/snackbar.json b/docs/data/api/snackbar.json similarity index 94% rename from docs/pages/base-ui/api/snackbar.json rename to docs/data/api/snackbar.json index 181f2297e7..fb31bbec7b 100644 --- a/docs/pages/base-ui/api/snackbar.json +++ b/docs/data/api/snackbar.json @@ -33,6 +33,6 @@ "forwardsRefTo": "HTMLDivElement", "filename": "/packages/mui-base/src/legacy/Snackbar/Snackbar.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/submenu-trigger.json b/docs/data/api/submenu-trigger.json similarity index 89% rename from docs/pages/base-ui/api/submenu-trigger.json rename to docs/data/api/submenu-trigger.json index fc5a0e413f..1213f13295 100644 --- a/docs/pages/base-ui/api/submenu-trigger.json +++ b/docs/data/api/submenu-trigger.json @@ -12,6 +12,6 @@ "muiName": "SubmenuTrigger", "filename": "/packages/mui-base/src/Menu/SubmenuTrigger/SubmenuTrigger.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/switch-root.json b/docs/data/api/switch-root.json similarity index 94% rename from docs/pages/base-ui/api/switch-root.json rename to docs/data/api/switch-root.json index 8fcc52fab4..b63432c278 100644 --- a/docs/pages/base-ui/api/switch-root.json +++ b/docs/data/api/switch-root.json @@ -27,6 +27,6 @@ "forwardsRefTo": "HTMLButtonElement", "filename": "/packages/mui-base/src/Switch/Root/SwitchRoot.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/switch-thumb.json b/docs/data/api/switch-thumb.json similarity index 87% rename from docs/pages/base-ui/api/switch-thumb.json rename to docs/data/api/switch-thumb.json index a15a88fb8e..7da6d60ff7 100644 --- a/docs/pages/base-ui/api/switch-thumb.json +++ b/docs/data/api/switch-thumb.json @@ -14,6 +14,6 @@ "forwardsRefTo": "HTMLSpanElement", "filename": "/packages/mui-base/src/Switch/Thumb/SwitchThumb.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/tab-indicator.json b/docs/data/api/tab-indicator.json similarity index 89% rename from docs/pages/base-ui/api/tab-indicator.json rename to docs/data/api/tab-indicator.json index decc72522d..e6661a7748 100644 --- a/docs/pages/base-ui/api/tab-indicator.json +++ b/docs/data/api/tab-indicator.json @@ -13,6 +13,6 @@ "forwardsRefTo": "HTMLSpanElement", "filename": "/packages/mui-base/src/Tabs/TabIndicator/TabIndicator.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/tab-panel.json b/docs/data/api/tab-panel.json similarity index 89% rename from docs/pages/base-ui/api/tab-panel.json rename to docs/data/api/tab-panel.json index ceb7029362..dc09c16d64 100644 --- a/docs/pages/base-ui/api/tab-panel.json +++ b/docs/data/api/tab-panel.json @@ -14,6 +14,6 @@ "forwardsRefTo": "HTMLDivElement", "filename": "/packages/mui-base/src/Tabs/TabPanel/TabPanel.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/tab.json b/docs/data/api/tab.json similarity index 88% rename from docs/pages/base-ui/api/tab.json rename to docs/data/api/tab.json index 9c202d603f..02c7d764cb 100644 --- a/docs/pages/base-ui/api/tab.json +++ b/docs/data/api/tab.json @@ -13,6 +13,6 @@ "forwardsRefTo": "HTMLButtonElement", "filename": "/packages/mui-base/src/Tabs/Tab/Tab.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/table-pagination.json b/docs/data/api/table-pagination.json similarity index 96% rename from docs/pages/base-ui/api/table-pagination.json rename to docs/data/api/table-pagination.json index 296aca8e6e..59eed69839 100644 --- a/docs/pages/base-ui/api/table-pagination.json +++ b/docs/data/api/table-pagination.json @@ -61,6 +61,6 @@ "forwardsRefTo": "HTMLTableCellElement", "filename": "/packages/mui-base/src/legacy/TablePagination/TablePagination.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/tabs-list.json b/docs/data/api/tabs-list.json similarity index 90% rename from docs/pages/base-ui/api/tabs-list.json rename to docs/data/api/tabs-list.json index c54a616290..c6f0fd0e78 100644 --- a/docs/pages/base-ui/api/tabs-list.json +++ b/docs/data/api/tabs-list.json @@ -14,6 +14,6 @@ "forwardsRefTo": "HTMLDivElement", "filename": "/packages/mui-base/src/Tabs/TabsList/TabsList.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/tabs-root.json b/docs/data/api/tabs-root.json similarity index 92% rename from docs/pages/base-ui/api/tabs-root.json rename to docs/data/api/tabs-root.json index 46d508e65e..1560c4cc23 100644 --- a/docs/pages/base-ui/api/tabs-root.json +++ b/docs/data/api/tabs-root.json @@ -23,6 +23,6 @@ "forwardsRefTo": "HTMLDivElement", "filename": "/packages/mui-base/src/Tabs/Root/TabsRoot.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/textarea-autosize.json b/docs/data/api/textarea-autosize.json similarity index 85% rename from docs/pages/base-ui/api/textarea-autosize.json rename to docs/data/api/textarea-autosize.json index c82eae2b44..1d68ffac62 100644 --- a/docs/pages/base-ui/api/textarea-autosize.json +++ b/docs/data/api/textarea-autosize.json @@ -14,6 +14,6 @@ "forwardsRefTo": "HTMLTextAreaElement", "filename": "/packages/mui-base/src/legacy/TextareaAutosize/TextareaAutosize.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/tooltip-arrow.json b/docs/data/api/tooltip-arrow.json similarity index 88% rename from docs/pages/base-ui/api/tooltip-arrow.json rename to docs/data/api/tooltip-arrow.json index 61b36f53ef..b0c2e7756b 100644 --- a/docs/pages/base-ui/api/tooltip-arrow.json +++ b/docs/data/api/tooltip-arrow.json @@ -15,6 +15,6 @@ "forwardsRefTo": "Element", "filename": "/packages/mui-base/src/Tooltip/Arrow/TooltipArrow.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/tooltip-popup.json b/docs/data/api/tooltip-popup.json similarity index 87% rename from docs/pages/base-ui/api/tooltip-popup.json rename to docs/data/api/tooltip-popup.json index df09d08b10..d9fb393ef9 100644 --- a/docs/pages/base-ui/api/tooltip-popup.json +++ b/docs/data/api/tooltip-popup.json @@ -14,6 +14,6 @@ "forwardsRefTo": "HTMLDivElement", "filename": "/packages/mui-base/src/Tooltip/Popup/TooltipPopup.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/tooltip-positioner.json b/docs/data/api/tooltip-positioner.json similarity index 96% rename from docs/pages/base-ui/api/tooltip-positioner.json rename to docs/data/api/tooltip-positioner.json index 08dd615d30..d670049eb7 100644 --- a/docs/pages/base-ui/api/tooltip-positioner.json +++ b/docs/data/api/tooltip-positioner.json @@ -59,6 +59,6 @@ "forwardsRefTo": "HTMLDivElement", "filename": "/packages/mui-base/src/Tooltip/Positioner/TooltipPositioner.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/tooltip-provider.json b/docs/data/api/tooltip-provider.json similarity index 87% rename from docs/pages/base-ui/api/tooltip-provider.json rename to docs/data/api/tooltip-provider.json index 07c1024aba..aecb4bf44b 100644 --- a/docs/pages/base-ui/api/tooltip-provider.json +++ b/docs/data/api/tooltip-provider.json @@ -14,6 +14,6 @@ "muiName": "TooltipProvider", "filename": "/packages/mui-base/src/Tooltip/Provider/TooltipProvider.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/tooltip-root.json b/docs/data/api/tooltip-root.json similarity index 93% rename from docs/pages/base-ui/api/tooltip-root.json rename to docs/data/api/tooltip-root.json index 98f3a278fe..f18183291c 100644 --- a/docs/pages/base-ui/api/tooltip-root.json +++ b/docs/data/api/tooltip-root.json @@ -29,6 +29,6 @@ "muiName": "TooltipRoot", "filename": "/packages/mui-base/src/Tooltip/Root/TooltipRoot.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/tooltip-trigger.json b/docs/data/api/tooltip-trigger.json similarity index 88% rename from docs/pages/base-ui/api/tooltip-trigger.json rename to docs/data/api/tooltip-trigger.json index bdb850291e..d7727ec84b 100644 --- a/docs/pages/base-ui/api/tooltip-trigger.json +++ b/docs/data/api/tooltip-trigger.json @@ -14,6 +14,6 @@ "forwardsRefTo": "HTMLButtonElement", "filename": "/packages/mui-base/src/Tooltip/Trigger/TooltipTrigger.tsx", "inheritance": null, - "demos": "", + "demos": "", "cssComponent": false } diff --git a/docs/pages/base-ui/api/use-checkbox-group-parent.json b/docs/data/api/use-checkbox-group-parent.json similarity index 100% rename from docs/pages/base-ui/api/use-checkbox-group-parent.json rename to docs/data/api/use-checkbox-group-parent.json diff --git a/docs/pages/base-ui/api/use-checkbox-group-root.json b/docs/data/api/use-checkbox-group-root.json similarity index 100% rename from docs/pages/base-ui/api/use-checkbox-group-root.json rename to docs/data/api/use-checkbox-group-root.json diff --git a/docs/pages/base-ui/api/use-composite-item.json b/docs/data/api/use-composite-item.json similarity index 100% rename from docs/pages/base-ui/api/use-composite-item.json rename to docs/data/api/use-composite-item.json diff --git a/docs/pages/base-ui/api/use-composite-list-item.json b/docs/data/api/use-composite-list-item.json similarity index 100% rename from docs/pages/base-ui/api/use-composite-list-item.json rename to docs/data/api/use-composite-list-item.json diff --git a/docs/pages/base-ui/api/use-radio-group-root.json b/docs/data/api/use-radio-group-root.json similarity index 100% rename from docs/pages/base-ui/api/use-radio-group-root.json rename to docs/data/api/use-radio-group-root.json diff --git a/docs/pages/base-ui/api/use-radio-root.json b/docs/data/api/use-radio-root.json similarity index 100% rename from docs/pages/base-ui/api/use-radio-root.json rename to docs/data/api/use-radio-root.json diff --git a/docs/data/base/all-components/all-components.md b/docs/data/base/all-components/all-components.md deleted file mode 100644 index 005d1787bd..0000000000 --- a/docs/data/base/all-components/all-components.md +++ /dev/null @@ -1,5 +0,0 @@ -# Base UI components - -

Every Base UI component available so far, sorted alphabetically.

- -{{"component": "modules/all-components/AllComponents.js"}} diff --git a/docs/data/base/components/alert-dialog/AlertDialogIntroduction/css/index.js b/docs/data/base/components/alert-dialog/AlertDialogIntroduction/css/index.js deleted file mode 100644 index 6c34a8e923..0000000000 --- a/docs/data/base/components/alert-dialog/AlertDialogIntroduction/css/index.js +++ /dev/null @@ -1,117 +0,0 @@ -import * as React from 'react'; -import * as AlertDialog from '@base_ui/react/AlertDialog'; -import { useTheme } from '@mui/system'; - -export default function AlertDialogIntroduction() { - return ( - - - Subscribe - - - Subscribe - - Are you sure you want to subscribe? - -
- Yes - No -
-
-
- -
- ); -} - -function useIsDarkMode() { - const theme = useTheme(); - return theme.palette.mode === 'dark'; -} - -const grey = { - 900: '#0f172a', - 800: '#1e293b', - 700: '#334155', - 500: '#64748b', - 300: '#cbd5e1', - 200: '#e2e8f0', - 100: '#f1f5f9', - 50: '#f8fafc', -}; - -function Styles() { - // Replace this with your app logic for determining dark mode - const isDarkMode = useIsDarkMode(); - - return ( - - ); -} diff --git a/docs/data/base/components/alert-dialog/AlertDialogIntroduction/css/index.tsx b/docs/data/base/components/alert-dialog/AlertDialogIntroduction/css/index.tsx deleted file mode 100644 index 6c34a8e923..0000000000 --- a/docs/data/base/components/alert-dialog/AlertDialogIntroduction/css/index.tsx +++ /dev/null @@ -1,117 +0,0 @@ -import * as React from 'react'; -import * as AlertDialog from '@base_ui/react/AlertDialog'; -import { useTheme } from '@mui/system'; - -export default function AlertDialogIntroduction() { - return ( - - - Subscribe - - - Subscribe - - Are you sure you want to subscribe? - -
- Yes - No -
-
-
- -
- ); -} - -function useIsDarkMode() { - const theme = useTheme(); - return theme.palette.mode === 'dark'; -} - -const grey = { - 900: '#0f172a', - 800: '#1e293b', - 700: '#334155', - 500: '#64748b', - 300: '#cbd5e1', - 200: '#e2e8f0', - 100: '#f1f5f9', - 50: '#f8fafc', -}; - -function Styles() { - // Replace this with your app logic for determining dark mode - const isDarkMode = useIsDarkMode(); - - return ( - - ); -} diff --git a/docs/data/base/components/autocomplete/autocomplete.md b/docs/data/base/components/autocomplete/autocomplete.md deleted file mode 100644 index bade0ca0ed..0000000000 --- a/docs/data/base/components/autocomplete/autocomplete.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -productId: base-ui -title: React Autocomplete hook -hooks: useAutocomplete -githubLabel: 'component: autocomplete' -waiAria: https://www.w3.org/WAI/ARIA/apg/patterns/combobox/ ---- - -# Autocomplete - -

An autocomplete component is a text input enhanced by a panel of suggested options.

- -{{"component": "@mui/docs/ComponentLinkHeader", "design": false}} - -{{"component": "modules/components/ComponentPageTabs.js"}} diff --git a/docs/data/base/components/dialog/UnstyledDialogIntroduction/css/index.js b/docs/data/base/components/dialog/UnstyledDialogIntroduction/css/index.js deleted file mode 100644 index f50a332498..0000000000 --- a/docs/data/base/components/dialog/UnstyledDialogIntroduction/css/index.js +++ /dev/null @@ -1,133 +0,0 @@ -import * as React from 'react'; -import * as Dialog from '@base_ui/react/Dialog'; -import { useTheme } from '@mui/system'; - -export default function UnstyledDialogIntroduction() { - return ( - - - Subscribe - - - Subscribe - - Enter your email address to subscribe to our newsletter. - - -
- Subscribe - Cancel -
-
-
- -
- ); -} - -function useIsDarkMode() { - const theme = useTheme(); - return theme.palette.mode === 'dark'; -} - -const grey = { - 900: '#0f172a', - 800: '#1e293b', - 700: '#334155', - 500: '#64748b', - 300: '#cbd5e1', - 200: '#e2e8f0', - 100: '#f1f5f9', - 50: '#f8fafc', -}; - -function Styles() { - // Replace this with your app logic for determining dark mode - const isDarkMode = useIsDarkMode(); - - return ( - - ); -} diff --git a/docs/data/base/components/dialog/UnstyledDialogIntroduction/css/index.tsx b/docs/data/base/components/dialog/UnstyledDialogIntroduction/css/index.tsx deleted file mode 100644 index f50a332498..0000000000 --- a/docs/data/base/components/dialog/UnstyledDialogIntroduction/css/index.tsx +++ /dev/null @@ -1,133 +0,0 @@ -import * as React from 'react'; -import * as Dialog from '@base_ui/react/Dialog'; -import { useTheme } from '@mui/system'; - -export default function UnstyledDialogIntroduction() { - return ( - - - Subscribe - - - Subscribe - - Enter your email address to subscribe to our newsletter. - - -
- Subscribe - Cancel -
-
-
- -
- ); -} - -function useIsDarkMode() { - const theme = useTheme(); - return theme.palette.mode === 'dark'; -} - -const grey = { - 900: '#0f172a', - 800: '#1e293b', - 700: '#334155', - 500: '#64748b', - 300: '#cbd5e1', - 200: '#e2e8f0', - 100: '#f1f5f9', - 50: '#f8fafc', -}; - -function Styles() { - // Replace this with your app logic for determining dark mode - const isDarkMode = useIsDarkMode(); - - return ( - - ); -} diff --git a/docs/data/base/components/form-control/form-control.md b/docs/data/base/components/form-control/form-control.md deleted file mode 100644 index 53b4b88841..0000000000 --- a/docs/data/base/components/form-control/form-control.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -productId: base-ui -title: React Form Control component and hook -components: FormControl -hooks: useFormControlContext -githubLabel: 'component: FormControl' ---- - -# Form Control - -

The Form Control component is a utility that lets you associate a form input with auxiliary components, such as labels, error indicators, or helper text.

- -{{"component": "@mui/docs/ComponentLinkHeader", "design": false}} - -{{"component": "modules/components/ComponentPageTabs.js"}} diff --git a/docs/data/base/components/menu/MenuIntroduction/css/index.js b/docs/data/base/components/menu/MenuIntroduction/css/index.js deleted file mode 100644 index b30fd457ef..0000000000 --- a/docs/data/base/components/menu/MenuIntroduction/css/index.js +++ /dev/null @@ -1,174 +0,0 @@ -import * as React from 'react'; -import * as Menu from '@base_ui/react/Menu'; -import { useTheme } from '@mui/system'; - -export default function MenuIntroduction() { - const createHandleMenuClick = (menuItem) => { - return () => { - console.log(`Clicked on ${menuItem}`); - }; - }; - - return ( - - My account - - - - - Profile - - - Language settings - - - Log out - - - - - - ); -} - -const cyan = { - 50: '#E9F8FC', - 100: '#BDEBF4', - 200: '#99D8E5', - 300: '#66BACC', - 400: '#1F94AD', - 500: '#0D5463', - 600: '#094855', - 700: '#063C47', - 800: '#043039', - 900: '#022127', -}; - -const grey = { - 50: '#F3F6F9', - 100: '#E5EAF2', - 200: '#DAE2ED', - 300: '#C7D0DD', - 400: '#B0B8C4', - 500: '#9DA8B7', - 600: '#6B7A90', - 700: '#434D5B', - 800: '#303740', - 900: '#1C2025', -}; - -function useIsDarkMode() { - const theme = useTheme(); - return theme.palette.mode === 'dark'; -} - -function Styles() { - // Replace this with your app logic for determining dark mode - const isDarkMode = useIsDarkMode(); - - return ( - - ); -} diff --git a/docs/data/base/components/menu/MenuIntroduction/css/index.tsx b/docs/data/base/components/menu/MenuIntroduction/css/index.tsx deleted file mode 100644 index dccfabe449..0000000000 --- a/docs/data/base/components/menu/MenuIntroduction/css/index.tsx +++ /dev/null @@ -1,174 +0,0 @@ -import * as React from 'react'; -import * as Menu from '@base_ui/react/Menu'; -import { useTheme } from '@mui/system'; - -export default function MenuIntroduction() { - const createHandleMenuClick = (menuItem: string) => { - return () => { - console.log(`Clicked on ${menuItem}`); - }; - }; - - return ( - - My account - - - - - Profile - - - Language settings - - - Log out - - - - - - ); -} - -const cyan = { - 50: '#E9F8FC', - 100: '#BDEBF4', - 200: '#99D8E5', - 300: '#66BACC', - 400: '#1F94AD', - 500: '#0D5463', - 600: '#094855', - 700: '#063C47', - 800: '#043039', - 900: '#022127', -}; - -const grey = { - 50: '#F3F6F9', - 100: '#E5EAF2', - 200: '#DAE2ED', - 300: '#C7D0DD', - 400: '#B0B8C4', - 500: '#9DA8B7', - 600: '#6B7A90', - 700: '#434D5B', - 800: '#303740', - 900: '#1C2025', -}; - -function useIsDarkMode() { - const theme = useTheme(); - return theme.palette.mode === 'dark'; -} - -function Styles() { - // Replace this with your app logic for determining dark mode - const isDarkMode = useIsDarkMode(); - - return ( - - ); -} diff --git a/docs/data/base/components/popup/popup.md b/docs/data/base/components/popup/popup.md deleted file mode 100644 index 56caa39823..0000000000 --- a/docs/data/base/components/popup/popup.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -productId: base-ui -title: React Popup component -components: Popup -githubLabel: 'component: popup' -waiAria: https://www.w3.org/WAI/ARIA/apg/patterns/tooltip/ ---- - -# Popup - -

The Popup component is a utility that lets you display content in tooltips and popovers.

- -{{"component": "@mui/docs/ComponentLinkHeader", "design": false}} - -{{"component": "modules/components/ComponentPageTabs.js"}} diff --git a/docs/data/base/components/select/select.md b/docs/data/base/components/select/select.md deleted file mode 100644 index 56faa729cb..0000000000 --- a/docs/data/base/components/select/select.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -productId: base-ui -title: React Select components and hook -components: Select, Option, OptionGroup -hooks: useSelect, useOption, useOptionContextStabilizer -githubLabel: 'component: select' -waiAria: https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-select-only/ ---- - -# Select - -

The Select components let you create lists of options for users to choose from.

- -{{"component": "@mui/docs/ComponentLinkHeader", "design": false}} - -{{"component": "modules/components/ComponentPageTabs.js"}} diff --git a/docs/data/base/components/snackbar/snackbar.md b/docs/data/base/components/snackbar/snackbar.md deleted file mode 100644 index b7e4577895..0000000000 --- a/docs/data/base/components/snackbar/snackbar.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -productId: base-ui -title: React Snackbar component and hook -components: Snackbar -hooks: useSnackbar -githubLabel: 'component: snackbar' ---- - -# Snackbar - -

The Snackbar component informs users that an action has been or will be performed by the app.

- -{{"component": "@mui/docs/ComponentLinkHeader", "design": false}} - -{{"component": "modules/components/ComponentPageTabs.js"}} diff --git a/docs/data/base/components/table-pagination/table-pagination.md b/docs/data/base/components/table-pagination/table-pagination.md deleted file mode 100644 index 6f7eaf9473..0000000000 --- a/docs/data/base/components/table-pagination/table-pagination.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -productId: base-ui -title: React Table Pagination component -components: TablePagination -githubLabel: 'component: TablePagination' ---- - -# Table Pagination - -

Table Pagination is an interface tool for splitting up large amounts of data to make it easier for users to navigate.

- -{{"component": "@mui/docs/ComponentLinkHeader", "design": false}} - -{{"component": "modules/components/ComponentPageTabs.js"}} diff --git a/docs/data/base/components/textarea-autosize/textarea-autosize.md b/docs/data/base/components/textarea-autosize/textarea-autosize.md deleted file mode 100644 index 08b6ce3b06..0000000000 --- a/docs/data/base/components/textarea-autosize/textarea-autosize.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -productId: base-ui -title: Textarea Autosize React component -components: TextareaAutosize -githubLabel: 'component: TextareaAutosize' ---- - -# Textarea Autosize - -

The Textarea Autosize component gives you a textarea HTML element that automatically adjusts its height to match the length of the content within.

- -{{"component": "@mui/docs/ComponentLinkHeader", "design": false}} - -{{"component": "modules/components/ComponentPageTabs.js"}} diff --git a/docs/data/base/components/toggle-button-group/toggle-button-group.md b/docs/data/base/components/toggle-button-group/toggle-button-group.md deleted file mode 100644 index 4fa0dada85..0000000000 --- a/docs/data/base/components/toggle-button-group/toggle-button-group.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -productId: base-ui -title: React Toggle Button Group component -githubLabel: 'component: toggle button' ---- - -# Toggle Button Group 🚧 - -

Toggle Button Groups house sets of buttons with mutually exclusive actions.

- -:::warning -The Base UI Toggle Button Group component isn't available yet, but you can upvote [this GitHub issue](https://github.com/mui/base-ui/issues/31) to see it arrive sooner. -::: diff --git a/docs/data/base/getting-started/overview/overview.md b/docs/data/base/getting-started/overview/overview.md deleted file mode 100644 index a1173039a5..0000000000 --- a/docs/data/base/getting-started/overview/overview.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: Overview ---- - -# Base UI - Overview - -

Base UI is a library of headless ("unstyled") React components and low-level hooks. You gain complete control over your app's CSS and accessibility features.

- -## Introduction - -Base UI is a library of unstyled React UI components and hooks. -These components were extracted from [Material UI](https://mui.com/material-ui/), and are now available as a standalone package. -They feature the same robust engineering but without implementing Material Design. - -Base UI includes prebuilt components with production-ready functionality, along with low-level hooks for transferring that functionality to other components. - -With Base UI, you can rapidly build on top of our foundational components using any styling solution you choose—no need to override any default style engine or theme. - -:::info -Base UI is currently in alpha. - -We're adding new components and features regularly, and you're welcome to contribute! - -Look for the [open issues](https://github.com/mui/base-ui/issues) and [pull requests](https://github.com/mui/base-ui/pulls) in the `mui/base-ui` repository on GitHub to see what other community members are working on, and feel free to submit your own. -::: - -## Advantages of Base UI - -- **Ship faster:** Base UI gives you the foundational building blocks you need to assemble a sleek and sophisticated user interface in a fraction of the time that it would take to do it all from scratch. -- **You own the CSS:** unlike Material UI, which uses Emotion as a default style engine, Base UI has no built-in styling solution. - This means you have complete control over your app's CSS. -- **Accessibility:** Base UI components are built with accessibility in mind. - We do our best to make all components screen reader-friendly, and offer suggestions for optimizing accessibility throughout our documentation. - -## Base UI vs. Material UI - -Base UI features many of the same components as [Material UI](https://mui.com/material-ui/getting-started/), but without the Material Design implementation. - -Base UI is not packaged with any default theme or built-in style engine. -This makes it a great choice if you need complete control over how your app's CSS is implemented. - -You could think of Base UI as the "skeletal" or "headless" version of Material UI—in fact, future versions of Material UI will gradually adopt these components and hooks for their foundational structure. diff --git a/docs/data/base/getting-started/quickstart/quickstart.md b/docs/data/base/getting-started/quickstart/quickstart.md deleted file mode 100644 index 0311452022..0000000000 --- a/docs/data/base/getting-started/quickstart/quickstart.md +++ /dev/null @@ -1,40 +0,0 @@ -# Quickstart - -

Get started with Base UI, a library of headless ("unstyled") React UI components and low-level hooks.

- -:::info -If you're using Next.js 13.4 or later, check out the [Next.js App Router guide](/base-ui/guides/next-js-app-router/). -::: - -## Installation - -`@base_ui/react` is completely standalone – run one of the following commands to add Base UI to your React project: - - - -```bash npm -npm install @base_ui/react -``` - -```bash yarn -yarn add @base_ui/react -``` - -```bash pnpm -pnpm add @base_ui/react -``` - - - -### Peer dependencies - - - -Please note that [react](https://www.npmjs.com/package/react) and [react-dom](https://www.npmjs.com/package/react-dom) are peer dependencies, meaning you should ensure they are installed before installing Base UI. - -```json -"peerDependencies": { - "react": "^17.0.0 || ^18.0.0", - "react-dom": "^17.0.0 || ^18.0.0" -}, -``` diff --git a/docs/data/base/getting-started/usage/usage.md b/docs/data/base/getting-started/usage/usage.md deleted file mode 100644 index 7ed7f29202..0000000000 --- a/docs/data/base/getting-started/usage/usage.md +++ /dev/null @@ -1,66 +0,0 @@ -# Usage - -

Learn the basics of working with Base UI components.

- -## Responsive meta tag - -Base UI is a _mobile-first_ component library—we write code for mobile devices first, and then scale up the components as necessary using CSS media queries. - -To ensure proper rendering and touch zooming for all devices, add the responsive viewport meta tag to your `` element: - -```html - -``` - -## Shared props - -Base components are self-supporting and fully functional in isolation. - -Each component has its own unique API, but all _non-utility_ components accept the following shared props: - -### render - -The `render` prop lets you override the rendered element of the component. - -For example, the Base UI Switch component renders a `