diff --git a/.browserslistrc b/.browserslistrc index b2736700825997..3630a85dc0733a 100644 --- a/.browserslistrc +++ b/.browserslistrc @@ -24,7 +24,7 @@ firefox 78 ios_saf 12.2 kaios 2.5 op_mini all -op_mob 76 +op_mob 73 opera 76 safari 14 samsung 13.0 @@ -44,7 +44,7 @@ firefox 78 ios_saf 12.2 kaios 2.5 op_mini all -op_mob 76 +op_mob 73 opera 76 safari 14 samsung 13.0 diff --git a/.circleci/config.yml b/.circleci/config.yml index 2df244d1f83bf3..c02db6aebd18d1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -44,7 +44,7 @@ defaults: &defaults AWS_REGION_ARTIFACTS: eu-central-1 working_directory: /tmp/material-ui docker: - - image: cimg/node:18.16 + - image: cimg/node:18.17 # CircleCI has disabled the cache across forks for security reasons. # Following their official statement, it was a quick solution, they @@ -136,7 +136,7 @@ jobs: steps: - run: name: Should not have any git not staged - command: git diff --exit-code + command: git add -A && git diff --exit-code --staged - run: name: Check for duplicated packages command: yarn deduplicate @@ -199,7 +199,7 @@ jobs: - install_js - run: name: Eslint - command: yarn lint:ci + command: yarn eslint:ci - run: name: Stylelint command: yarn stylelint @@ -222,29 +222,35 @@ jobs: command: yarn proptypes - run: name: '`yarn proptypes` changes committed?' - command: git diff --exit-code + command: git add -A && git diff --exit-code --staged + - run: + name: 'Write "use client" directive' + command: yarn rsc:build + - run: + name: '`yarn rsc:build` changes detected, "use client" missing from exports' + command: git add -A && git diff --exit-code --staged - run: name: Generate the documentation command: yarn docs:api - run: name: '`yarn docs:api` changes committed?' - command: git diff --exit-code + command: git add -A && git diff --exit-code --staged - run: name: Update the navigation translations command: yarn docs:i18n - run: name: '`yarn docs:i18n` changes committed?' - command: git diff --exit-code + command: git add -A && git diff --exit-code --staged - run: name: '`yarn extract-error-codes` changes committed?' command: | yarn extract-error-codes - git diff --exit-code + git add -A && git diff --exit-code --staged - run: name: '`yarn docs:link-check` changes committed?' command: | yarn docs:link-check - git diff --exit-code + git add -A && git diff --exit-code --staged test_types: <<: *defaults resource_class: 'medium+' @@ -266,15 +272,6 @@ jobs: yarn workspace @mui/material typescript:module-augmentation yarn workspace @mui/base typescript:module-augmentation yarn workspace @mui/joy typescript:module-augmentation - - - restore_cache: - name: Restore generated declaration files - keys: - # #default-branch-switch - # We assume that the target branch is `master` and that declaration files are persisted in commit order. - # "If there are multiple matches, the most recently generated cache will be used." - - typescript-declaration-files-master - - run: name: Diff declaration files command: | @@ -283,7 +280,6 @@ jobs: git add -f packages/mui-utils/build || echo '/utils declarations do not exist' yarn lerna run build:types git --no-pager diff - - run: name: Any defect declaration files? command: node scripts/testBuiltTypes.mjs @@ -348,7 +344,7 @@ jobs: <<: *defaults resource_class: 'medium+' docker: - - image: mcr.microsoft.com/playwright:v1.35.1-focal + - image: mcr.microsoft.com/playwright:v1.36.2-focal environment: NODE_ENV: development # Needed if playwright is in `devDependencies` steps: @@ -378,7 +374,7 @@ jobs: test_e2e: <<: *defaults docker: - - image: mcr.microsoft.com/playwright:v1.35.1-focal + - image: mcr.microsoft.com/playwright:v1.36.2-focal environment: NODE_ENV: development # Needed if playwright is in `devDependencies` steps: @@ -397,7 +393,7 @@ jobs: test_e2e_website: <<: *defaults docker: - - image: mcr.microsoft.com/playwright:v1.35.1-focal + - image: mcr.microsoft.com/playwright:v1.36.2-focal environment: NODE_ENV: development # Needed if playwright is in `devDependencies` steps: @@ -412,7 +408,7 @@ jobs: test_profile: <<: *defaults docker: - - image: mcr.microsoft.com/playwright:v1.35.1-focal + - image: mcr.microsoft.com/playwright:v1.36.2-focal environment: NODE_ENV: development # Needed if playwright is in `devDependencies` steps: @@ -439,7 +435,7 @@ jobs: test_regressions: <<: *defaults docker: - - image: mcr.microsoft.com/playwright:v1.35.1-focal + - image: mcr.microsoft.com/playwright:v1.36.2-focal environment: NODE_ENV: development # Needed if playwright is in `devDependencies` steps: @@ -493,7 +489,7 @@ jobs: <<: *defaults working_directory: /tmp/material-ui/test/bundling/fixtures/next-webpack4/ docker: - - image: mcr.microsoft.com/playwright:v1.35.1-focal + - image: mcr.microsoft.com/playwright:v1.36.2-focal environment: NODE_ENV: development # Needed if playwright is in `devDependencies` steps: @@ -517,7 +513,7 @@ jobs: <<: *defaults working_directory: /tmp/material-ui/test/bundling/fixtures/next-webpack5/ docker: - - image: mcr.microsoft.com/playwright:v1.35.1-focal + - image: mcr.microsoft.com/playwright:v1.36.2-focal environment: NODE_ENV: development # Needed if playwright is in `devDependencies` steps: @@ -541,7 +537,7 @@ jobs: <<: *defaults working_directory: /tmp/material-ui/test/bundling/fixtures/create-react-app/ docker: - - image: mcr.microsoft.com/playwright:v1.35.1-focal + - image: mcr.microsoft.com/playwright:v1.36.2-focal environment: NODE_ENV: development # Needed if playwright is in `devDependencies` steps: @@ -565,7 +561,7 @@ jobs: <<: *defaults working_directory: /tmp/material-ui/test/bundling/fixtures/snowpack/ docker: - - image: mcr.microsoft.com/playwright:v1.35.1-focal + - image: mcr.microsoft.com/playwright:v1.36.2-focal environment: NODE_ENV: development # Needed if playwright is in `devDependencies` steps: @@ -589,7 +585,7 @@ jobs: <<: *defaults working_directory: /tmp/material-ui/test/bundling/fixtures/vite/ docker: - - image: mcr.microsoft.com/playwright:v1.35.1-focal + - image: mcr.microsoft.com/playwright:v1.36.2-focal environment: NODE_ENV: development # Needed if playwright is in `devDependencies` steps: @@ -613,7 +609,7 @@ jobs: <<: *defaults working_directory: /tmp/material-ui/test/bundling/fixtures/esbuild/ docker: - - image: mcr.microsoft.com/playwright:v1.35.1-focal + - image: mcr.microsoft.com/playwright:v1.36.2-focal environment: NODE_ENV: development # Needed if playwright is in `devDependencies` steps: @@ -641,7 +637,7 @@ jobs: <<: *defaults working_directory: /tmp/material-ui/test/bundling/fixtures/gatsby/ docker: - - image: mcr.microsoft.com/playwright:v1.35.1-focal + - image: mcr.microsoft.com/playwright:v1.36.2-focal environment: NODE_ENV: development # Needed if playwright is in `devDependencies` steps: @@ -743,7 +739,7 @@ jobs: test_benchmark: <<: *defaults docker: - - image: mcr.microsoft.com/playwright:v1.35.1-focal + - image: mcr.microsoft.com/playwright:v1.36.2-focal environment: NODE_ENV: development # Needed if playwright is in `devDependencies` steps: diff --git a/.codesandbox/ci.json b/.codesandbox/ci.json index 5afb5c27d36021..5c7949333fbc54 100644 --- a/.codesandbox/ci.json +++ b/.codesandbox/ci.json @@ -36,10 +36,10 @@ }, "sandboxes": [ "material-ui-issue-latest-s2dsx", - "/examples/material-cra", - "/examples/material-cra-ts", - "/examples/joy-cra-ts", - "/examples/base-cra-ts" + "/examples/material-ui-cra", + "/examples/material-ui-cra-ts", + "/examples/joy-ui-cra-ts", + "/examples/base-ui-cra-ts" ], "silent": true } diff --git a/.eslintignore b/.eslintignore index b1ce3558845757..301ee5891779e4 100644 --- a/.eslintignore +++ b/.eslintignore @@ -4,10 +4,11 @@ /coverage /docs/export /docs/pages/playground/ -/examples/material-cra*/src/serviceWorker.js -/examples/material-gatsby/public/ -/examples/material-preact/config -/examples/material-preact/scripts +/examples/material-ui-cra*/src/serviceWorker.js +/examples/material-ui-gatsby/public/ +/examples/material-ui-preact/config +/examples/material-ui-preact/scripts +/examples/material-ui-nextjs/src /packages/mui-codemod/lib /packages/mui-codemod/src/*/*.test/* /packages/mui-icons-material/fixtures diff --git a/.eslintrc.js b/.eslintrc.js index 0e9064bab274ed..7dd94d3ec46a51 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -34,7 +34,7 @@ module.exports = { 'eslint-plugin-material-ui', 'eslint-plugin-react-hooks', '@typescript-eslint/eslint-plugin', - 'filenames', + 'eslint-plugin-filenames', ], settings: { 'import/resolver': { @@ -201,6 +201,7 @@ module.exports = { 'react/no-invalid-html-attribute': 'off', 'react/jsx-no-useless-fragment': ['error', { allowExpressions: true }], + 'lines-around-directive': 'off', }, overrides: [ { @@ -275,6 +276,7 @@ module.exports = { ], }, }, + // Next.js entry points pages { files: ['docs/pages/**/*.js'], rules: { @@ -283,12 +285,7 @@ module.exports = { }, // demos { - files: [ - 'docs/src/pages/**/*.js', - 'docs/src/pages/**/*.tsx', - 'docs/data/**/*.js', - 'docs/data/**/*.tsx', - ], + files: ['docs/src/pages/**/*{.tsx,.js}', 'docs/data/**/*{.tsx,.js}'], rules: { // This most often reports data that is defined after the component definition. // This is safe to do and helps readability of the demo code since the data is mostly irrelevant. @@ -299,12 +296,12 @@ module.exports = { }, }, { - files: ['docs/data/**/*.tsx'], + files: ['docs/data/**/*{.tsx,.js}'], excludedFiles: [ 'docs/data/joy/getting-started/templates/**/*.tsx', - 'docs/data/**/css/*.tsx', - 'docs/data/**/system/*.tsx', - 'docs/data/**/tailwind/*.tsx', + 'docs/data/**/css/*{.tsx,.js}', + 'docs/data/**/system/*{.tsx,.js}', + 'docs/data/**/tailwind/*{.tsx,.js}', ], rules: { 'filenames/match-exported': ['error'], @@ -459,5 +456,12 @@ module.exports = { 'import/extensions': ['error', 'ignorePackages'], }, }, + { + files: ['packages/mui-base/src/**/**{.ts,.tsx}'], + rules: { + 'import/no-default-export': 'error', + 'import/prefer-default-export': 'off', + }, + }, ], }; diff --git a/.github/ISSUE_TEMPLATE/5.priority-support.yml b/.github/ISSUE_TEMPLATE/5.priority-support.yml index e457a59c754a6b..bae40bb08b931e 100644 --- a/.github/ISSUE_TEMPLATE/5.priority-support.yml +++ b/.github/ISSUE_TEMPLATE/5.priority-support.yml @@ -1,5 +1,5 @@ name: 'Priority support: SLA ⏰' -description: I'm a Premium plan user and I have the priority support add-on, I can't find a solution to my problem with MUI X. +description: I'm an MUI X Premium user and we have purchased the Priority Support add-on. I can't find a solution to my problem with MUI Core (Material UI, Base UI, MUI System, and Joy UI). title: '[question] ' labels: ['status: needs triage', 'support: unknown'] body: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 925ec9398578c8..3158a8832f9cca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,7 +30,7 @@ jobs: # fetch all tags which are required for `yarn release:changelog` fetch-depth: 0 - name: Use Node.js 18.x - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 + uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 with: node-version: 18 cache: 'yarn' # https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-dependencies diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index d7d95c1c7709d2..208868c39ed252 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -19,7 +19,7 @@ jobs: uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@f6e388ebf0efc915c6c5b165b019ee61a6746a38 # v2.20.1 + uses: github/codeql-action/init@0ba4244466797eb048eb91a6cd43d5c03ca8bd05 # v2.21.2 with: languages: typescript config-file: ./.github/codeql/codeql-config.yml @@ -30,4 +30,4 @@ jobs: # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs # queries: security-extended,security-and-quality - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@f6e388ebf0efc915c6c5b165b019ee61a6746a38 # v2.20.1 + uses: github/codeql-action/analyze@0ba4244466797eb048eb91a6cd43d5c03ca8bd05 # v2.21.2 diff --git a/.github/workflows/ensure-triage-label.yml b/.github/workflows/ensure-triage-label.yml new file mode 100644 index 00000000000000..9012948368960f --- /dev/null +++ b/.github/workflows/ensure-triage-label.yml @@ -0,0 +1,31 @@ +name: Ensure triage label is present +on: + label: + types: + - deleted + issues: + types: + - opened +jobs: + label_issues: + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6 + with: + script: | + const { data: labels } = await github.rest.issues.listLabelsOnIssue({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + }); + + if (labels.length <= 0) { + await github.rest.issues.addLabels({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + labels: ['status: needs triage'] + }) + } diff --git a/.github/workflows/mark-duplicate.yml b/.github/workflows/mark-duplicate.yml index 5c0468b4358e93..832b62ae598da6 100644 --- a/.github/workflows/mark-duplicate.yml +++ b/.github/workflows/mark-duplicate.yml @@ -14,7 +14,7 @@ jobs: issues: write steps: - name: mark-duplicate - uses: actions-cool/issues-helper@65840f57fe2b3b9a796776577b6b19d2a16adc72 # v3.4.0 + uses: actions-cool/issues-helper@25379ae1ea683ac484497214db131ab8f003a52b # v3.5.1 with: actions: 'mark-duplicate' token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/priority-support-validation-prompt.yml b/.github/workflows/priority-support-validation-prompt.yml index 582c4e442e9d03..cfc1c889df4bfb 100644 --- a/.github/workflows/priority-support-validation-prompt.yml +++ b/.github/workflows/priority-support-validation-prompt.yml @@ -29,13 +29,13 @@ jobs: with: issue-number: ${{ github.event.issue.number }} body: | - You have created a priority support request ⏰. Please validate your support key using the link below: + You have created a support request under the ["Priority Support"](https://mui.com/legal/technical-support-sla/#priority-support) terms, which is a paid add-on to MUI X Premium ⏰. Please validate your support key using the link below: https://tools-public.mui.com/prod/pages/jyhs86t?repo=mui-x&issueId=${{ github.event.issue.number }} - Do not share you support key in this issue! + Do not share your support key in this issue! - Priority support will only be provided to verified customers. Once you have verified your support key, we will remove the `support: unknown` label and add the `support: priority` label to this issue. Only then the time for the SLA will start counting. + Priority support is only provided to verified customers. Once you have verified your support key, we will remove the `support: unknown` label and add the `support: priority` label to this issue. Only then the time for the SLA will start counting. - name: Update comment if: ${{ steps.findComment.outputs.comment-id != '' && contains(github.event.label.name, 'priority') }} diff --git a/.github/workflows/scorecards.yml b/.github/workflows/scorecards.yml index 2de8593964210c..740f5645a9798e 100644 --- a/.github/workflows/scorecards.yml +++ b/.github/workflows/scorecards.yml @@ -43,6 +43,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard. - name: Upload to code-scanning - uses: github/codeql-action/upload-sarif@f6e388ebf0efc915c6c5b165b019ee61a6746a38 # v2.20.1 + uses: github/codeql-action/upload-sarif@0ba4244466797eb048eb91a6cd43d5c03ca8bd05 # v2.21.2 with: sarif_file: results.sarif diff --git a/.markdownlint-cli2.cjs b/.markdownlint-cli2.cjs index d97f6eae10ec86..2fad76ea77860a 100644 --- a/.markdownlint-cli2.cjs +++ b/.markdownlint-cli2.cjs @@ -1,6 +1,7 @@ const straightQuotes = require('./packages/markdownlint-rule-mui/straight-quotes'); const gitDiff = require('./packages/markdownlint-rule-mui/git-diff'); const tableAlignment = require('./packages/markdownlint-rule-mui/table-alignment'); +const terminalLanguage = require('./packages/markdownlint-rule-mui/terminal-language'); // https://github.com/DavidAnson/markdownlint#rules--aliases module.exports = { @@ -33,8 +34,9 @@ module.exports = { straightQuotes: true, gitDiff: true, tableAlignment: true, + terminalLanguage: true, }, - customRules: [straightQuotes, gitDiff, tableAlignment], + customRules: [straightQuotes, gitDiff, tableAlignment, terminalLanguage], ignores: [ 'CHANGELOG.old.md', '**/node_modules/**', diff --git a/.stylelintrc.js b/.stylelintrc.js index 90e28d4802339a..3fbebcc38f0350 100644 --- a/.stylelintrc.js +++ b/.stylelintrc.js @@ -1,5 +1,4 @@ module.exports = { - processors: ['stylelint-processor-styled-components'], extends: 'stylelint-config-standard', ignoreFiles: [ // TypeScript declaration files contain no styles. @@ -7,14 +6,22 @@ module.exports = { '**/*.d.ts', ], rules: { - 'value-no-vendor-prefix': true, - 'property-no-vendor-prefix': true, + 'alpha-value-notation': null, + 'custom-property-pattern': null, + 'declaration-colon-newline-after': null, + 'function-parentheses-newline-inside': null, // not compatible with prettier + 'media-feature-range-notation': null, 'no-empty-source': null, 'no-missing-end-of-source-newline': null, - 'declaration-colon-newline-after': null, + 'selector-class-pattern': null, + 'string-no-newline': null, // not compatible with prettier 'value-keyword-case': null, 'value-list-comma-newline-after': null, // not compatible with prettier - 'function-parentheses-newline-inside': null, // not compatible with prettier - 'string-no-newline': null, // not compatible with prettier }, + overrides: [ + { + files: ['**/*.js', '**/*.cjs', '**/*.mjs', '**/*.jsx', '**/*.ts', '**/*.tsx'], + customSyntax: 'postcss-styled-syntax', + }, + ], }; diff --git a/CHANGELOG.md b/CHANGELOG.md index d12a21ee892c35..0a5802f8cf6ac8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,497 @@ # [Versions](https://mui.com/versions/) +## 5.14.4 + + + +_Aug 8, 2023_ + +A big thanks to the 18 contributors who made this release possible. Here are some highlights ✨: + +- 🎉 Added [Number input](https://mui.com/base-ui/react-number-input) component & [useNumberInput](https://mui.com/base-ui/react-number-input#hook) hook in [Base UI](https://mui.com/base-ui/getting-started/) @mj12albert + +### `@mui/material@5.14.4` + +- ​[Checkbox][material] Add size classes (#38182) @michaldudak +- ​[Typography] Improve inherit variant logic (#38123) @ZeeshanTamboli + +### `@mui/system@5.14.4` + +- ​Revert "[Box] Remove `component` from TypeMap (#38168)" (#38356) @michaldudak + +### `@mui/base@5.0.0-beta.10` + +#### Breaking changes + +- ​[base] Ban default exports (#38200) @michaldudak + + Base UI default exports were changed to named ones. Previously we had a mix of default and named ones. + This was changed to improve consistency and avoid problems some bundlers have with default exports. + See https://github.com/mui/material-ui/issues/21862 for more context. + + ```diff + - import Button, { buttonClasses } from '@mui/base/Button'; + + import { Button, buttonClasses } from '@mui/base/Button'; + - import BaseMenu from '@mui/base/Menu'; + + import { Menu as BaseMenu } from '@mui/base/Menu'; + ``` + + Additionally, the `ClassNameGenerator` has been moved to the directory matching its name: + + ```diff + - import ClassNameGenerator from '@mui/base/className'; + + import { ClassNameGenerator } from '@mui/base/ClassNameGenerator'; + ``` + + A codemod is provided to help with the migration: + + ```bash + npx @mui/codemod v5.0.0/base-use-named-imports + ``` + +#### Changes + +- ​[base] Create useNumberInput and NumberInput (#36119) @mj12albert +- ​[Select][base] Fix flicker on click of controlled Select button (#37855) @VishruthR +- ​[Dropdown] Fix imports of types (#38296) @yash-thakur + +### `@mui/joy@5.0.0-beta.1` + +- ​[joy-ui][MenuButton] Fix disable of `MenuButton` (#38342) @sai6855 + +### Docs + +- ​[docs][AppBar] Fix `ResponsiveAppBar` demo logo href (#38346) @iownthegame +- ​[docs][base] Add Tailwind CSS + plain CSS demo on the Button page (#38240) @alisasanib +- ​[docs][Menu][base] Remove `Unstyled` prefix from demos' function names (#38270) @sai6855 +- ​[docs] Add themeable component guide (#37908) @siriwatknp +- ​[docs] Fix Joy UI demo background color (#38307) @oliviertassinari +- ​[docs] Update API docs for Number Input component (#38301) @ZeeshanTamboli +- ​[docs][joy-ui] Revise the theme typography page (#38285) @danilo-leal +- ​[docs][joy-ui] Add TS demo for Menu Bar (#38308) @sai6855 +- ​[docs][joy-ui] Updated Typography callout at getting started (#38289) @zanivan +- ​[docs][joy-ui] Fix the Inter font installation instructions (#38284) @danilo-leal +- ​[docs][material] Add note to Autocomplete about ref forwarding (#38305) @samuelsycamore +- ​[docs][Skeleton] Make the demos feel more realistic (#38212) @oliviertassinari + +- ​[examples] Swap Next.js examples between App Router and Pages Router; update naming convention (#38204) @samuelsycamore +- ​[examples][material-ui] Add Material UI + Next.js (App Router) example in JS (#38323) @samuelsycamore +- ​[blog] Discord announcement blog (#38258) @richbustos +- ​[blog] Fix 301 links to Toolpad @oliviertassinari +- ​[website] Updating Charts demo with real charts usage for MUI X marketing page (#38317) @richbustos +- ​[website] Adjust styles of the Product section on the homepage (#38366) @danilo-leal +- ​[website] Add Nora teamMember card to 'About' (#38358) @noraleonte +- ​[website] Fix image layout shift (#38326) @oliviertassinari + +### Core + +- ​[core] Fix docs demo export function consistency (#38191) @oliviertassinari +- ​[core] Fix the link-check script on Windows (#38276) @michaldudak +- ​[core] Use @testing-library/user-event direct API (#38325) @mj12albert +- ​[core] Port GitHub workflow for ensuring triage label is present (#38312) @DanailH +- ​[docs-infra] Consider files ending with .types.ts as props files (#37533) @mnajdova +- ​[docs-infra] Fix skip to content design (#38304) @oliviertassinari +- ​[docs-infra] Add a general round of polish to the API content display (#38282) @danilo-leal +- ​[docs-infra] Make the side nav collapse animation snappier (#38259) @danilo-leal +- ​[docs-infra] New Component API design followup (#38183) @cherniavskii +- ​[test] Remove unnecessary `async` keyword from test (#38373) @ZeeshanTamboli + +All contributors of this release in alphabetical order: @alisasanib, @cherniavskii, @DanailH, @danilo-leal, @iownthegame, @michaldudak, @mj12albert, @mnajdova, @noraleonte, @oliviertassinari, @richbustos, @sai6855, @samuelsycamore, @siriwatknp, @VishruthR, @yash-thakur, @zanivan, @ZeeshanTamboli + +## 5.14.3 + + + +_Jul 31, 2023_ + +A big thanks to the 17 contributors who made this release possible. Here are some highlights ✨: + +- 🚀 [Joy UI](https://mui.com/joy-ui/getting-started/) is now in Beta +- ✨ Refine [Joy UI](https://mui.com/joy-ui/getting-started/)'s default theme @siriwatknp @zanivan +- 🎉 Added Dropdown higher-level menu component [Base UI](https://mui.com/base-ui/getting-started/) @michaldudak +- 💫 Added Material You [Badge](https://mui.com/material-ui/react-badge/#material-you-version) to `material-next` (#37850) @DiegoAndai + +### `@mui/material@5.14.3` + +- ​[Autocomplete][material][joy] Add default `getOptionLabel` prop in ownerState (#38100) @DSK9012 +- ​[Menu][Divider][material] Do not allow focus on Divider when inside Menu list (#38102) @divyammadhok +- ​[typescript][material] Rename one letter type parameters (#38155) @michaldudak +- ​[Menu][material] Fixes slots and slotProps overriding defaults completely (#37902) @gitstart +- ​[Theme][material] Add missing styleOverrides type for theme MuiStack (#38189) @DiegoAndai +- ​[typescript][material] Add `component` field to `*Props` types (#38084) @michaldudak + +### `@mui/base@5.0.0-beta.9` + +#### Breaking changes + +- ​[Dropdown][base][joy] Introduce higher-level menu component (#37667) @michaldudak + +#### Other changes + +- ​[typescript][base] Rename one letter type parameters (#38171) @michaldudak + +### `@mui/joy@5.0.0-beta.0` + +- ​[joy] Refine the default theme (#36843) @siriwatknp + +### `@mui/material-next@6.0.0-alpha.95` + +- ​[Badge][material-next] Add Badge component (#37850) @DiegoAndai +- ​[Chip][material-next] Copy chip component from material (#38053) @DiegoAndai +- ​[typescript][material-next] Rename one letter type parameters (#38172) @michaldudak + +### `@mui/system@5.14.3` + +- ​[Box][system] Remove `component` from TypeMap (#38168) @michaldudak +- ​[Stack][system] Fix CSS selector (#37525) @sai6855 + +### Docs + +- ​[docs] Update Joy UI's package README (#38262) @ZeeshanTamboli +- ​[docs][base-ui] Add new batch of coming soon pages (#38025) @danilo-leal +- ​[docs] fix links to standardized examples (#38193) @emmanuel-ferdman +- ​[docs-infra] Small design polish to the Diamond Sponsor container (#38257) @danilo-leal +- ​[docs-infra] Show props in the table of content (#38173) @alexfauquette +- ​[docs-infra] Polish API page design (#38196) @oliviertassinari +- ​[docs-infra] Search with productCategory when product is missing (#38239) @oliviertassinari +- ​[docs][material] Revise and update Examples doc (#38205) @samuelsycamore +- ​[docs] Fix typo in notifications.json @mbrookes +- ​[docs-infra] Remove leftover standardNavIcon (#38252) @DiegoAndai +- ​[docs][base] Add Tailwind CSS & plain CSS demos on the Popper page (#37953) @zanivan +- ​[docs][Button][joy] Improve `loading` prop documentation (#38156) @sai6855 +- ​[docs] Prepare docs infra for Tree View migration to X (#38202) @flaviendelangle +- ​[docs] Fix SEO issues reported by ahrefs @oliviertassinari +- ​[docs] Fix palette pages - live edit not working (#38195) @oliviertassinari +- ​[docs] Add Google Analytics action for the styling menu (#38085) @mnajdova +- ​[docs] Fix Discord redirection chain @oliviertassinari +- ​[docs] Cover pnpm in more places (#38161) @oliviertassinari +- ​[docs] Avoid broken link (#38154) @oliviertassinari +- ​[docs] Add notification for beta release of Toolpad (#38152) @prakhargupta1 +- ​[docs-infra] Remove sidenav icons (#38174) @oliviertassinari +- ​[docs-infra] Fix search ranking when no productId (#38162) @oliviertassinari +- ​[docs-infra] Adjust the side nav for deeper nested items (#38047) @cherniavskii +- ​[docs][joy] Update TS file of adding more typography levels demo to match the corresponding JS file's styles (#38232) @ZeeshanTamboli +- ​[docs][joy] Add TS demo for reusable component section in approaches page (#38210) @sai6855 +- ​[docs][joy] Add TS demo for theme typography new level customization (#38199) @sai6855 + +### Core + +- ​[blog] Fix blog post slug Base UI (#38254) @oliviertassinari +- ​[core] Use native Node's fetch instead of node-fetch package (#38263) @michaldudak +- ​[core] Remove dead code @oliviertassinari +- ​[core] Polish Stack test to closer CSS injection order @oliviertassinari +- ​[core] Remove unnecessary `Required` utility type from Typography font style type (#38203) @ZeeshanTamboli +- ​[core] Fix generate Proptypes script skipping unstable items (#38198) @mj12albert +- ​[website] Adding Rich Bustos Twitter handle in bio (#38213) @richbustos +- ​[website] Prepare importing data from HiBob (#38238) @oliviertassinari +- ​[website] Sync team member with HiBob, add Raffaella (#38201) @rluzists1 + +All contributors of this release in alphabetical order: @cherniavskii, @DiegoAndai, @divyammadhok, @DSK9012, @flaviendelangle, @gitstart, @michaldudak, @mj12albert, @mnajdova, @oliviertassinari, @prakhargupta1, @richbustos, @rluzists1, @sai6855, @siriwatknp, @zanivan, @ZeeshanTamboli + +## 5.14.2 + + + +_Jul 25, 2023_ + +A big thanks to the 23 contributors who made this release possible. + +### @mui/material@5.14.2 + +- ​Revert "[core] Adds `component` prop to `OverrideProps` type (#35924)" (#38150) @michaldudak +- ​[Chip][material] Fix base cursor style to be "auto" not "default" (#38076) @DiegoAndai +- ​[Tabs] Refactor IntersectionObserver logic (#38133) @ZeeshanTamboli +- ​[Tabs] Fix and improve visibility of tab scroll buttons using the IntersectionObserver API (#36071) @SaidMarar + +### @mui/joy@5.0.0-alpha.89 + +- ​[Joy] Replace leftover `Joy-` prefix with `Mui-` (#38086) @siriwatknp +- ​[Skeleton][joy] Fix WebkitMaskImage CSS property (#38077) @Bestwebdesign +- ​[Link][Joy UI] Fix font inherit (#38124) @oliviertassinari + +### Docs + +- ​[docs] Add listbox placement demo for Select (#38130) @sai6855 +- ​[docs][base] Add Tailwind CSS & plain CSS demo on the Tabs page (#37910) @mnajdova +- ​[docs][base] Add Tailwind CSS & plain CSS demos on the Textarea page (#37943) @zanivan +- ​[docs] Fix Joy UI menu example (#38140) @harikrishnanp +- ​[docs] Remove translations section from contributing guide (#38125) @nikohoffren +- ​[docs] Fix Base UI Button Tailwind CSS padding @oliviertassinari +- ​[docs] Mention in hompage hero that Core is free (#38075) @mbrookes +- ​[docs] Fix a typo in notifications.json (#38078) @mbrookes +- ​[docs] Add Tailwind CSS & plain CSS demo on the table pagination page (#37937) @mnajdova +- ​[docs] Implement the new API display design (#37405) @alexfauquette +- ​[docs] Update migration installation code blocks (#38028) @danilo-leal +- ​[docs][joy] Revise the Joy UI Link page (#37829) @danilo-leal +- ​[docs][joy] Add playground for Card component (#37820) @Studio384 +- ​[docs][joy] Add adjustments to the color inversion page (#37143) @danilo-leal +- ​[docs][material] Improve documentation about adding custom colors (#37743) @DiegoAndai +- ​[examples] Fix Joy UI Next.js App Router font loading (#38095) @IgnacioUtrilla +- ​[examples] Fix material-next Font Usage with next/font (#38026) @onderonur + +### Core + +- ​[blog] Update Discord invite link in Toolpad beta announcement (#38143) @samuelsycamore +- ​[blog] Update discord server link (#38131) @prakhargupta1 +- ​[core] Fix rsc-builder removing the first line (#38134) @michaldudak +- ​[core] Remove the deprecation rule in tslint (#38087) @michaldudak +- ​[website] Mobile navigation: Toolpad to Beta (#38146) @bharatkashyap +- ​[website] Fix typo on pricing page @oliviertassinari +- ​[website] Fix a few regression (#38050) @oliviertassinari +- ​[website] Update Demo footers on MUI X landing page (#38027) @richbustos +- ​[website] Fix 301 redirection to base index page @oliviertassinari +- ​[website] Fix Cell selection feature name (#38029) @oliviertassinari +- ​[website] Improve button look (#38052) @oliviertassinari +- ​[website] Link new core page to new Base UI landing page (#38030) @mj12albert +- ​[website] Polish pricing page (#37975) @oliviertassinari +- ​[test] Fail the CI when new unexpected files are created (#38039) @oliviertassinari +- ​[test] Fix linting error by matching main component demo name to filename (#38122) @ZeeshanTamboli + +All contributors of this release in alphabetical order: @alexfauquette, @Bestwebdesign, @bharatkashyap, @danilo-leal, @DiegoAndai, @harikrishnanp, @IgnacioUtrilla, @mbrookes, @michaldudak, @mj12albert, @mnajdova, @nikohoffren, @oliviertassinari, @onderonur, @prakhargupta1, @richbustos, @sai6855, @SaidMarar, @samuelsycamore, @siriwatknp, @Studio384, @zanivan, @ZeeshanTamboli + +## 5.14.1 + + + +_Jul 19, 2023_ + +A big thanks to the 24 contributors who made this release possible. Here are some highlights ✨: + +- 💫 Introducing some new components for Joy UI: + - [Skeleton](https://mui.com/joy-ui/react-skeleton/) component (#37893) @siriwatknp + - [ToggleButton](https://mui.com/joy-ui/react-toggle-button-group/) (#37716) @siriwatknp +- 🎉 Base UI has its own [landing page](https://www.mui.com/base-ui)! +- 🐛 bug fixes, 📚 documentation, and ⚙️ infrastructure improvements. + +### `@mui/material@5.14.1` + +- ​[FormControlLabel] Fix misplaced asterisk when `labelPlacement` is provided (#37831) @ZeeshanTamboli +- ​[Slider][material] Fix type dependency on @types/prop-types (#37853) @Methuselah96 +- ​[Menu] Add MuiMenuList to createTheme components key (#37956) @mj12albert +- ​[Modal] Remove deprecated `BackdropComponent` and `BackdropProps` from tests (#38018) @sai6855 + +### `@mui/material-next@6.0.0-alpha.93` + +- ​[Slider][material-next] Add use client directive to useSliderElementsOverlap (#37955) @mj12albert +- ​[Button][material-next] Fix some event handlers being ignored (#37647) @DiegoAndai + +### `@mui/base@5.0.0-beta.8` + +- ​[Autocomplete] Make touch and click behavior on an option consistent (#37972) @divyammadhok + +### `@mui/joy@5.0.0-alpha.88` + +- ​[Joy][Select] Fix type error caused by custom variant (#37996) @OmPr366 +- ​[ToggleButton][Joy] Add `ToggleButton` component (#37716) @siriwatknp +- ​[Skeleton] Add Joy UI `Skeleton` component (#37893) @siriwatknp + +### `@mui/utils@5.14.1` + +- ​[utils] Add function overload for `useEventCallback` (#37827) @cherniavskii + +### Docs + +- ​[docs][base] Add Tailwind CSS & plain CSS demo on the form control page (#37914) @mnajdova +- ​[docs][base] Make Base UI Select demos denser (#37836) @zanivan +- ​[docs] Link Material UI from the landing page (#37971) @oliviertassinari +- ​[docs] Fix the empty /components page (#38010) @brijeshb42 +- ​[docs] Checkout template follows user's color scheme preference (#37928) @OndrejHj04 +- ​[docs] Disable ad for onboarding pages (#37998) @oliviertassinari +- ​[docs] Fix broken link to Base UI Next.js App Router (#37973) @oliviertassinari +- ​[docs] Fix typo in next-js-app-router.md (#37974) @ericbrian +- ​[docs] Add pnpm commands to Material UI Installation page (#36650) @officialrajdeepsingh +- ​[docs] Link charts in the roadmap (#37944) @oliviertassinari +- ​[docs] Improve changelog @oliviertassinari +- ​[docs] Improve the Select docs (#37279) @michaldudak +- ​[docs][menu] Add Tailwind CSS & plain CSS demo on the Menu page (#37856) @mnajdova +- ​[example] Update EmotionCacheProvider to work with GlobalStyles (#37962) @siriwatknp + +### Core + +- ​[blog] Add blog post about support for Next.js App Router (#37929) @samuelsycamore +- ​[blog] Blog MUI X pro statement removed (#38015) @prakhargupta1 +- ​[blog] Add Toolpad beta announcement blog (#37799) @prakhargupta1 +- ​[core] Increase space available for sidenav @oliviertassinari +- ​[core] Adds `component` prop to `OverrideProps` type (#35924) @sai6855 +- ​[core] Fix rsc build step in CI (#38019) @mj12albert +- ​[core] Remove nx dependency (#37964) @Janpot +- ​[core] Lock `@types/node` to v18 (#37965) @ZeeshanTamboli +- ​[core] Update priority support issue template and prompt (#37824) @DanailH +- ​[core] Remove warnings in docs:api (#37858) @alexfauquette +- ​[core] Make rimraf work after a major update (#37930) @michaldudak +- ​[docs-infra] Change the Diamond Sponsor block positioning on the side nav (#37933) @danilo-leal +- ​[docs-infra] Support backticks in the codeblocks (#37950) @cherniavskii +- ​[docs-infra] Improve performance hideToolbar: true (#37969) @oliviertassinari +- ​[docs-infra] Fix button label on mobile (#37997) @oliviertassinari +- ​[docs-infra] Square drawer corners (#37970) @oliviertassinari +- ​[docs-infra] Improve tab contrast in codeblock (#38000) @oliviertassinari +- ​[docs-infra] Fix API generation for Base UI (#37941) @oliviertassinari +- ​[docs-infra] Fix layout shift on xGrid (#37954) @oliviertassinari +- ​[docs-infra] Update installation commands to use the new tabs code component (#37927) @danilo-leal +- ​[docs-infra] Improve disableToc={true} support (#37931) @oliviertassinari +- ​[docs-infra] Remove icons and tweak the design of the side nav (#37860) @danilo-leal +- ​[docs-infra] Fix TypeScrit error in demo export (#37830) @oliviertassinari +- ​[notifications] Add notification for first Charts release (#37679) @joserodolfofreitas +- ​[website] Add Base UI marketing page (#36622) @siriwatknp +- ​[website] Update MUI X landing page (#37966) @cherniavskii +- ​[website] Fix a11y issues (#37999) @oliviertassinari +- ​[website] Make the Core page refer to group of products (#37608) @danilo-leal +- ​[website] Add perpetual option to pricing page (#35504) @joserodolfofreitas + +All contributors of this release in alphabetical order: @alexfauquette, @brijeshb42, @cherniavskii, @DanailH, @danilo-leal, @DiegoAndai, @divyammadhok, @ericbrian, @Janpot, @joserodolfofreitas, @Methuselah96, @michaldudak, @mj12albert, @mnajdova, @officialrajdeepsingh, @oliviertassinari, @OmPr366, @OndrejHj04, @prakhargupta1, @sai6855, @samuelsycamore, @siriwatknp, @zanivan, @ZeeshanTamboli + +## 5.14.0 + + + +_Jul 11, 2023_ + +A big thanks to the 15 contributors who made this release possible. Here are some highlights ✨: + +- 💫 Material UI, Joy UI, and Base UI are compatible with [NextJS App Router](https://nextjs.org/docs/app) (#37656) @mj12albert +- 📚 Added new guides for integrating with Next.js 13 App Router (#37656) @mj12albert + - Ⓜ️ [Material UI guide](https://mui.com/material-ui/guides/next-js-app-router/) + - 🅙 [Joy UI guide](https://mui.com/joy-ui/guides/next-js-app-router/) + - 🅱️ [Base UI guide](https://mui.com/base-ui/guides/next-js-app-router/) +- 🐛 bug fixes, 📚 documentation, and ⚙️ infrastructure improvements. + +### `@mui/material@5.14.0` + +- [Autocomplete] Enable global customization of different options (#36971) @nicolas-ot + +### `@mui/material-next@6.0.0-alpha.92` + +- [Slider][material-next] Slider restructure and style improvements (#37644) @DiegoAndai + +### `@mui/joy@5.0.0-alpha.87` + +- [ButtonGroup] Fix style for single Button (#37692) @MaybePixem +- Fix theme typography fallback value (#37845) @siriwatknp + +### `@mui/icons-material@5.14.0` + +- [icons-material] Rebuild icons with `"use client"` (#37894) @mj12albert + +### Docs + +- [docs] Polish Ukraine banner (#37905) @oliviertassinari +- [docs] Reduce Ukraine banner size (#34795) @oliviertassinari +- [docs] Add callouts about controlled vs uncontrolled components in Core docs (#37849) @samuelsycamore +- [docs] Add missing Portal elements to Tailwind CSS interoperability guide (#37807) @enrique-ramirez +- [docs] Small pickers migration improvement (#37815) @alexfauquette +- [docs] Fix pickers product name (#37825) @LukasTy +- [docs][Joy][Link] Set `variant` and `color` defaults for the playground (#37817) @Studio384 +- [docs][Joy][Table] Add `undefined` as an option to `stripe` (#37816) @Studio384 +- [docs][base] Add Tailwind CSS & plain CSS demo on the Snackbar page (#37812) @mnajdova +- [docs][base] Add Tailwind CSS & plain CSS demo on Badge page (#37768) @mnajdova +- [docs][base] Fix Nested modal demo positioning (#37506) @gitstart +- [docs][base] Add Tailwind CSS & plain CSS demo on the Switch page (#37728) @mnajdova +- [docs-infra] Remove code tags in ToC (#37834) @cherniavskii +- [docs-infra] Fixes in API pages generation (#37813) @mnajdova +- [docs-infra] Add test case when using sh (#37818) @oliviertassinari +- [docs-infra] Use icons instead of words for the code copy button (#37664) @danilo-leal +- [docs-infra] Fix code parser (#37828) @alexfauquette +- [docs-infra] Fix `marked` deprecation warning (#37769) @alexfauquette +- [docs-infra] Allows to use codeblock in the docs (#37643) @alexfauquette +- [docs-infra][joy] Change Joy UI's playground variant selector (#37821) @danilo-leal + +### Core + +- [core] Prepend "use-client" directive + add docs and examples for using MUI libraries with Next.js App Router (#37656) @mj12albert +- [core] Fix imports to React (#37863) @oliviertassinari +- [core] Disambiguate eslint plugin name @oliviertassinari +- [core] Sync the lint script name with the other repositories @oliviertassinari +- [core] Point to Crowdin directly @oliviertassinari +- [website] Sync career page (#37847) @oliviertassinari + +All contributors of this release in alphabetical order: @alexfauquette, @cherniavskii, @danilo-leal, @DiegoAndai, @enrique-ramirez, @gitstart, @LukasTy, @MaybePixem, @mj12albert, @mnajdova, @nicolas-ot, @oliviertassinari, @samuelsycamore, @siriwatknp, @Studio384 + +## 5.13.7 + + + +_Jul 4, 2023_ + +A big thanks to the 21 contributors who made this release possible. +This release focuses primarily on 🐛 bug fixes, 📚 documentation, and ⚙️ infrastructure improvements. + +### `@mui/material@5.13.7` + +- [OutlinedInput] Fix form control properties in `ownerState` (#37668) @vonagam + +### `@mui/system@5.13.7` + +- [Stack] Fix spacing when there are ` + ); +} diff --git a/docs/data/base/components/badge/UnstyledBadge/css/index.tsx b/docs/data/base/components/badge/UnstyledBadge/css/index.tsx new file mode 100644 index 00000000000000..45c108191e6660 --- /dev/null +++ b/docs/data/base/components/badge/UnstyledBadge/css/index.tsx @@ -0,0 +1,97 @@ +import * as React from 'react'; +import { Badge } from '@mui/base/Badge'; +import { useTheme } from '@mui/system'; + +export default function UnstyledBadge() { + return ( + + + + + + + ); +} + +const cyan = { + 50: '#E9F8FC', + 100: '#BDEBF4', + 200: '#99D8E5', + 300: '#66BACC', + 400: '#1F94AD', + 500: '#0D5463', + 600: '#094855', + 700: '#063C47', + 800: '#043039', + 900: '#022127', +}; + +const grey = { + 300: '#afb8c1', + 400: '#bdbdbd', + 900: '#24292f', +}; + +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/badge/UnstyledBadge/css/index.tsx.preview b/docs/data/base/components/badge/UnstyledBadge/css/index.tsx.preview new file mode 100644 index 00000000000000..a1f344f2a6d616 --- /dev/null +++ b/docs/data/base/components/badge/UnstyledBadge/css/index.tsx.preview @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/docs/data/base/components/badge/UnstyledBadge.js b/docs/data/base/components/badge/UnstyledBadge/system/index.js similarity index 96% rename from docs/data/base/components/badge/UnstyledBadge.js rename to docs/data/base/components/badge/UnstyledBadge/system/index.js index 13358f49052d19..9444b19da8c047 100644 --- a/docs/data/base/components/badge/UnstyledBadge.js +++ b/docs/data/base/components/badge/UnstyledBadge/system/index.js @@ -1,6 +1,6 @@ import * as React from 'react'; import { styled, Box } from '@mui/system'; -import Badge, { badgeClasses } from '@mui/base/Badge'; +import { Badge, badgeClasses } from '@mui/base/Badge'; function BadgeContent() { return ( diff --git a/docs/data/base/components/badge/UnstyledBadge.tsx b/docs/data/base/components/badge/UnstyledBadge/system/index.tsx similarity index 96% rename from docs/data/base/components/badge/UnstyledBadge.tsx rename to docs/data/base/components/badge/UnstyledBadge/system/index.tsx index 13358f49052d19..9444b19da8c047 100644 --- a/docs/data/base/components/badge/UnstyledBadge.tsx +++ b/docs/data/base/components/badge/UnstyledBadge/system/index.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import { styled, Box } from '@mui/system'; -import Badge, { badgeClasses } from '@mui/base/Badge'; +import { Badge, badgeClasses } from '@mui/base/Badge'; function BadgeContent() { return ( diff --git a/docs/data/base/components/badge/UnstyledBadge.tsx.preview b/docs/data/base/components/badge/UnstyledBadge/system/index.tsx.preview similarity index 100% rename from docs/data/base/components/badge/UnstyledBadge.tsx.preview rename to docs/data/base/components/badge/UnstyledBadge/system/index.tsx.preview diff --git a/docs/data/base/components/badge/UnstyledBadge/tailwind/index.js b/docs/data/base/components/badge/UnstyledBadge/tailwind/index.js new file mode 100644 index 00000000000000..e3d33107e70c19 --- /dev/null +++ b/docs/data/base/components/badge/UnstyledBadge/tailwind/index.js @@ -0,0 +1,33 @@ +import * as React from 'react'; +import { Badge } from '@mui/base/Badge'; +import { useTheme } from '@mui/system'; + +function useIsDarkMode() { + const theme = useTheme(); + return theme.palette.mode === 'dark'; +} + +export default function UnstyledBadge() { + // Replace this with your app logic for determining dark mode + const isDarkMode = useIsDarkMode(); + + return ( +
+ + + +
+ ); +} diff --git a/docs/data/base/components/badge/UnstyledBadge/tailwind/index.tsx b/docs/data/base/components/badge/UnstyledBadge/tailwind/index.tsx new file mode 100644 index 00000000000000..e3d33107e70c19 --- /dev/null +++ b/docs/data/base/components/badge/UnstyledBadge/tailwind/index.tsx @@ -0,0 +1,33 @@ +import * as React from 'react'; +import { Badge } from '@mui/base/Badge'; +import { useTheme } from '@mui/system'; + +function useIsDarkMode() { + const theme = useTheme(); + return theme.palette.mode === 'dark'; +} + +export default function UnstyledBadge() { + // Replace this with your app logic for determining dark mode + const isDarkMode = useIsDarkMode(); + + return ( +
+ + + +
+ ); +} diff --git a/docs/data/base/components/badge/UnstyledBadge/tailwind/index.tsx.preview b/docs/data/base/components/badge/UnstyledBadge/tailwind/index.tsx.preview new file mode 100644 index 00000000000000..07cf50c20fbad1 --- /dev/null +++ b/docs/data/base/components/badge/UnstyledBadge/tailwind/index.tsx.preview @@ -0,0 +1,15 @@ + + + \ No newline at end of file diff --git a/docs/data/base/components/badge/UnstyledBadgeIntroduction.js b/docs/data/base/components/badge/UnstyledBadgeIntroduction.js index d1f80b91912b8a..6f117fa8300f22 100644 --- a/docs/data/base/components/badge/UnstyledBadgeIntroduction.js +++ b/docs/data/base/components/badge/UnstyledBadgeIntroduction.js @@ -1,6 +1,6 @@ import * as React from 'react'; import { styled, Box } from '@mui/system'; -import Badge, { badgeClasses } from '@mui/base/Badge'; +import { Badge, badgeClasses } from '@mui/base/Badge'; const blue = { 100: '#DAECFF', diff --git a/docs/data/base/components/badge/UnstyledBadgeIntroduction.tsx b/docs/data/base/components/badge/UnstyledBadgeIntroduction.tsx index d1f80b91912b8a..6f117fa8300f22 100644 --- a/docs/data/base/components/badge/UnstyledBadgeIntroduction.tsx +++ b/docs/data/base/components/badge/UnstyledBadgeIntroduction.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import { styled, Box } from '@mui/system'; -import Badge, { badgeClasses } from '@mui/base/Badge'; +import { Badge, badgeClasses } from '@mui/base/Badge'; const blue = { 100: '#DAECFF', diff --git a/docs/data/base/components/badge/badge.md b/docs/data/base/components/badge/badge.md index 8f90a8157ebfa5..3daa904159c622 100644 --- a/docs/data/base/components/badge/badge.md +++ b/docs/data/base/components/badge/badge.md @@ -30,7 +30,7 @@ The Badge component creates a badge that is applied to its child element. After [installation](/base-ui/getting-started/quickstart/#installation), you can start building with this component using the following basic elements: ```jsx -import Badge from '@mui/base/Badge'; +import { Badge } from '@mui/base/Badge'; export default function MyApp() { return {/* the element that the badge is attached to */}; @@ -96,7 +96,7 @@ The same applies for props specific to custom primitive elements: ## Hook ```jsx -import useBadge from '@mui/base/useBadge'; +import { useBadge } from '@mui/base/useBadge'; ``` The `useBadge` hook lets you apply the functionality of a badge to a fully custom component. @@ -125,7 +125,7 @@ When this content is a number, there are additional props you can use for furthe The following demo shows how to create and style a typical numerical badge that's attached to a generic box element: -{{"demo": "UnstyledBadge.js", "defaultCodeOpen": false}} +{{"demo": "UnstyledBadge", "defaultCodeOpen": false}} ### Badge visibility diff --git a/docs/data/base/components/button/UnstyledButtonCustom.js b/docs/data/base/components/button/UnstyledButtonCustom.js index 9f6cfce57f11da..5567b32e254eb5 100644 --- a/docs/data/base/components/button/UnstyledButtonCustom.js +++ b/docs/data/base/components/button/UnstyledButtonCustom.js @@ -1,6 +1,6 @@ import * as React from 'react'; import PropTypes from 'prop-types'; -import Button, { buttonClasses } from '@mui/base/Button'; +import { Button, buttonClasses } from '@mui/base/Button'; import { styled } from '@mui/system'; const ButtonRoot = React.forwardRef(function ButtonRoot(props, ref) { @@ -101,7 +101,7 @@ const CustomButtonRoot = styled(ButtonRoot)( & .content { font-size: 0.875rem; font-family: IBM Plex Sans, sans-serif; - font-weight: 500; + font-weight: 600; line-height: 1.5; height: 100%; display: flex; diff --git a/docs/data/base/components/button/UnstyledButtonCustom.tsx b/docs/data/base/components/button/UnstyledButtonCustom.tsx index d83d9e9417a75d..b3bfb2c396466e 100644 --- a/docs/data/base/components/button/UnstyledButtonCustom.tsx +++ b/docs/data/base/components/button/UnstyledButtonCustom.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import Button, { ButtonProps, buttonClasses } from '@mui/base/Button'; +import { Button, ButtonProps, buttonClasses } from '@mui/base/Button'; import { styled, Theme } from '@mui/system'; const ButtonRoot = React.forwardRef(function ButtonRoot( @@ -102,7 +102,7 @@ const CustomButtonRoot = styled(ButtonRoot)( & .content { font-size: 0.875rem; font-family: IBM Plex Sans, sans-serif; - font-weight: 500; + font-weight: 600; line-height: 1.5; height: 100%; display: flex; diff --git a/docs/data/base/components/button/UnstyledButtonIntroduction.js b/docs/data/base/components/button/UnstyledButtonIntroduction.js index c3aa3ef4574905..bf13578424e76b 100644 --- a/docs/data/base/components/button/UnstyledButtonIntroduction.js +++ b/docs/data/base/components/button/UnstyledButtonIntroduction.js @@ -1,5 +1,5 @@ import * as React from 'react'; -import Button, { buttonClasses } from '@mui/base/Button'; +import { Button, buttonClasses } from '@mui/base/Button'; import { styled } from '@mui/system'; import Stack from '@mui/material/Stack'; @@ -27,11 +27,12 @@ const grey = { const CustomButton = styled(Button)( ({ theme }) => ` font-family: IBM Plex Sans, sans-serif; - font-weight: bold; + font-weight: 600; font-size: 0.875rem; + line-height: 1.5; background-color: ${blue[500]}; - padding: 12px 24px; - border-radius: 12px; + padding: 8px 16px; + border-radius: 8px; color: white; transition: all 150ms ease; cursor: pointer; diff --git a/docs/data/base/components/button/UnstyledButtonIntroduction.tsx b/docs/data/base/components/button/UnstyledButtonIntroduction.tsx index c3aa3ef4574905..bf13578424e76b 100644 --- a/docs/data/base/components/button/UnstyledButtonIntroduction.tsx +++ b/docs/data/base/components/button/UnstyledButtonIntroduction.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import Button, { buttonClasses } from '@mui/base/Button'; +import { Button, buttonClasses } from '@mui/base/Button'; import { styled } from '@mui/system'; import Stack from '@mui/material/Stack'; @@ -27,11 +27,12 @@ const grey = { const CustomButton = styled(Button)( ({ theme }) => ` font-family: IBM Plex Sans, sans-serif; - font-weight: bold; + font-weight: 600; font-size: 0.875rem; + line-height: 1.5; background-color: ${blue[500]}; - padding: 12px 24px; - border-radius: 12px; + padding: 8px 16px; + border-radius: 8px; color: white; transition: all 150ms ease; cursor: pointer; diff --git a/docs/data/base/components/button/UnstyledButtonIntroduction/css/index.js b/docs/data/base/components/button/UnstyledButtonIntroduction/css/index.js new file mode 100644 index 00000000000000..3dae77721c653b --- /dev/null +++ b/docs/data/base/components/button/UnstyledButtonIntroduction/css/index.js @@ -0,0 +1,59 @@ +import * as React from 'react'; +import { Button, buttonClasses } from '@mui/base/Button'; +import Stack from '@mui/material/Stack'; + +export default function UnstyledButtonsIntroduction() { + return ( + + + + + + + + ); +} + +const cyan = { + 50: '#E9F8FC', + 100: '#BDEBF4', + 200: '#99D8E5', + 300: '#66BACC', + 400: '#1F94AD', + 500: '#0D5463', + 600: '#094855', + 700: '#063C47', + 800: '#043039', + 900: '#022127', +}; + +function Styles() { + return ( + + ); +} diff --git a/docs/data/base/components/button/UnstyledButtonIntroduction/css/index.tsx b/docs/data/base/components/button/UnstyledButtonIntroduction/css/index.tsx new file mode 100644 index 00000000000000..3dae77721c653b --- /dev/null +++ b/docs/data/base/components/button/UnstyledButtonIntroduction/css/index.tsx @@ -0,0 +1,59 @@ +import * as React from 'react'; +import { Button, buttonClasses } from '@mui/base/Button'; +import Stack from '@mui/material/Stack'; + +export default function UnstyledButtonsIntroduction() { + return ( + + + + + + + + ); +} + +const cyan = { + 50: '#E9F8FC', + 100: '#BDEBF4', + 200: '#99D8E5', + 300: '#66BACC', + 400: '#1F94AD', + 500: '#0D5463', + 600: '#094855', + 700: '#063C47', + 800: '#043039', + 900: '#022127', +}; + +function Styles() { + return ( + + ); +} diff --git a/docs/data/base/components/button/UnstyledButtonIntroduction/css/index.tsx.preview b/docs/data/base/components/button/UnstyledButtonIntroduction/css/index.tsx.preview new file mode 100644 index 00000000000000..2d592aac5304f0 --- /dev/null +++ b/docs/data/base/components/button/UnstyledButtonIntroduction/css/index.tsx.preview @@ -0,0 +1,9 @@ + + + + + + + \ No newline at end of file diff --git a/docs/data/base/components/button/UnstyledButtonIntroduction/system/index.js b/docs/data/base/components/button/UnstyledButtonIntroduction/system/index.js new file mode 100644 index 00000000000000..49175792bc2e54 --- /dev/null +++ b/docs/data/base/components/button/UnstyledButtonIntroduction/system/index.js @@ -0,0 +1,60 @@ +import * as React from 'react'; +import { Button, buttonClasses } from '@mui/base/Button'; +import { styled } from '@mui/system'; +import Stack from '@mui/material/Stack'; + +export default function UnstyledButtonsIntroduction() { + return ( + + Button + Disabled + + ); +} + +const blue = { + 500: '#007FFF', + 600: '#0072E5', + 700: '#0059B2', +}; + +const grey = { + 100: '#eaeef2', + 300: '#afb8c1', + 900: '#24292f', +}; + +const CustomButton = styled(Button)( + ({ theme }) => ` + font-family: IBM Plex Sans, sans-serif; + font-weight: 600; + font-size: 0.875rem; + line-height: 1.5; + background-color: ${blue[500]}; + padding: 8px 16px; + border-radius: 8px; + color: white; + transition: all 150ms ease; + cursor: pointer; + border: none; + box-shadow: 0px 4px 30px ${theme.palette.mode === 'dark' ? grey[900] : grey[100]}; + + &:hover { + background-color: ${blue[600]}; + } + + &.${buttonClasses.active} { + background-color: ${blue[700]}; + } + + &.${buttonClasses.focusVisible} { + box-shadow: 0 3px 20px 0 rgba(61, 71, 82, 0.1), 0 0 0 5px rgba(0, 127, 255, 0.5); + outline: none; + } + + &.${buttonClasses.disabled} { + opacity: 0.5; + cursor: not-allowed; + } + `, +); diff --git a/docs/data/base/components/button/UnstyledButtonIntroduction/system/index.tsx b/docs/data/base/components/button/UnstyledButtonIntroduction/system/index.tsx new file mode 100644 index 00000000000000..49175792bc2e54 --- /dev/null +++ b/docs/data/base/components/button/UnstyledButtonIntroduction/system/index.tsx @@ -0,0 +1,60 @@ +import * as React from 'react'; +import { Button, buttonClasses } from '@mui/base/Button'; +import { styled } from '@mui/system'; +import Stack from '@mui/material/Stack'; + +export default function UnstyledButtonsIntroduction() { + return ( + + Button + Disabled + + ); +} + +const blue = { + 500: '#007FFF', + 600: '#0072E5', + 700: '#0059B2', +}; + +const grey = { + 100: '#eaeef2', + 300: '#afb8c1', + 900: '#24292f', +}; + +const CustomButton = styled(Button)( + ({ theme }) => ` + font-family: IBM Plex Sans, sans-serif; + font-weight: 600; + font-size: 0.875rem; + line-height: 1.5; + background-color: ${blue[500]}; + padding: 8px 16px; + border-radius: 8px; + color: white; + transition: all 150ms ease; + cursor: pointer; + border: none; + box-shadow: 0px 4px 30px ${theme.palette.mode === 'dark' ? grey[900] : grey[100]}; + + &:hover { + background-color: ${blue[600]}; + } + + &.${buttonClasses.active} { + background-color: ${blue[700]}; + } + + &.${buttonClasses.focusVisible} { + box-shadow: 0 3px 20px 0 rgba(61, 71, 82, 0.1), 0 0 0 5px rgba(0, 127, 255, 0.5); + outline: none; + } + + &.${buttonClasses.disabled} { + opacity: 0.5; + cursor: not-allowed; + } + `, +); diff --git a/docs/data/base/components/button/UnstyledButtonIntroduction/system/index.tsx.preview b/docs/data/base/components/button/UnstyledButtonIntroduction/system/index.tsx.preview new file mode 100644 index 00000000000000..702ae5216245c1 --- /dev/null +++ b/docs/data/base/components/button/UnstyledButtonIntroduction/system/index.tsx.preview @@ -0,0 +1,2 @@ +Button +Disabled \ No newline at end of file diff --git a/docs/data/base/components/button/UnstyledButtonIntroduction/tailwind/index.js b/docs/data/base/components/button/UnstyledButtonIntroduction/tailwind/index.js new file mode 100644 index 00000000000000..b30badf8f1a3dd --- /dev/null +++ b/docs/data/base/components/button/UnstyledButtonIntroduction/tailwind/index.js @@ -0,0 +1,32 @@ +import * as React from 'react'; +import PropTypes from 'prop-types'; +import { Button } from '@mui/base/Button'; +import Stack from '@mui/material/Stack'; +import clsx from 'clsx'; + +export default function UnstyledButtonsIntroduction() { + return ( + + Button + Disabled + + ); +} + +const CustomButton = React.forwardRef((props, ref) => { + const { className, ...other } = props; + return ( + - + + Disabled ); } + +const CustomButton = React.forwardRef((props, ref) => { + const { className, ...other } = props; + return ( + - + + Disabled ); } + +const CustomButton = React.forwardRef( + (props, ref) => { + const { className, ...other } = props; + return ( + - \ No newline at end of file + +Disabled \ No newline at end of file diff --git a/docs/data/base/components/button/UnstyledButtonsSpan.js b/docs/data/base/components/button/UnstyledButtonsSpan.js index 32713a7cfa6e62..933e4a5f645325 100644 --- a/docs/data/base/components/button/UnstyledButtonsSpan.js +++ b/docs/data/base/components/button/UnstyledButtonsSpan.js @@ -1,5 +1,5 @@ import * as React from 'react'; -import Button, { buttonClasses } from '@mui/base/Button'; +import { Button, buttonClasses } from '@mui/base/Button'; import { styled } from '@mui/system'; import Stack from '@mui/material/Stack'; @@ -21,15 +21,16 @@ const blue = { }; const CustomButton = styled(Button)` - font-family: IBM Plex Sans, sans-serif; - font-weight: bold; + font-family: 'IBM Plex Sans', sans-serif; font-size: 0.875rem; + line-height: 1.5; background-color: ${blue[500]}; - padding: 12px 24px; - border-radius: 12px; color: white; - transition: all 150ms ease; + border-radius: 8px; + font-weight: 600; + padding: 8px 16px; cursor: pointer; + transition: all 150ms ease; border: none; &:hover { @@ -43,7 +44,7 @@ const CustomButton = styled(Button)` } &.${buttonClasses.focusVisible} { - box-shadow: 0 4px 20px 0 rgba(61, 71, 82, 0.1), 0 0 0 5px rgba(0, 127, 255, 0.5); + box-shadow: 0 4px 20px 0 rgb(61 71 82 / 0.1), 0 0 0 5px rgb(0 127 255 / 0.5); outline: none; } diff --git a/docs/data/base/components/button/UnstyledButtonsSpan.tsx b/docs/data/base/components/button/UnstyledButtonsSpan.tsx index 169bc5fa9e6366..3053b5791037f6 100644 --- a/docs/data/base/components/button/UnstyledButtonsSpan.tsx +++ b/docs/data/base/components/button/UnstyledButtonsSpan.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import Button, { buttonClasses, ButtonTypeMap } from '@mui/base/Button'; +import { Button, buttonClasses, ButtonTypeMap } from '@mui/base/Button'; import { styled } from '@mui/system'; import Stack from '@mui/material/Stack'; import { PolymorphicComponent } from '@mui/base/utils'; @@ -22,15 +22,16 @@ const blue = { }; const CustomButton = styled(Button)` - font-family: IBM Plex Sans, sans-serif; - font-weight: bold; + font-family: 'IBM Plex Sans', sans-serif; font-size: 0.875rem; + line-height: 1.5; background-color: ${blue[500]}; - padding: 12px 24px; - border-radius: 12px; color: white; - transition: all 150ms ease; + border-radius: 8px; + font-weight: 600; + padding: 8px 16px; cursor: pointer; + transition: all 150ms ease; border: none; &:hover { @@ -44,7 +45,7 @@ const CustomButton = styled(Button)` } &.${buttonClasses.focusVisible} { - box-shadow: 0 4px 20px 0 rgba(61, 71, 82, 0.1), 0 0 0 5px rgba(0, 127, 255, 0.5); + box-shadow: 0 4px 20px 0 rgb(61 71 82 / 0.1), 0 0 0 5px rgb(0 127 255 / 0.5); outline: none; } diff --git a/docs/data/base/components/button/UnstyledButtonsSpan/css/index.js b/docs/data/base/components/button/UnstyledButtonsSpan/css/index.js new file mode 100644 index 00000000000000..07b3949ac8f65e --- /dev/null +++ b/docs/data/base/components/button/UnstyledButtonsSpan/css/index.js @@ -0,0 +1,62 @@ +import * as React from 'react'; +import { Button, buttonClasses } from '@mui/base/Button'; +import Stack from '@mui/material/Stack'; + +export default function UnstyledButtonsSpan() { + return ( + + + + + + + + ); +} + +const cyan = { + 50: '#E9F8FC', + 100: '#BDEBF4', + 200: '#99D8E5', + 300: '#66BACC', + 400: '#1F94AD', + 500: '#0D5463', + 600: '#094855', + 700: '#063C47', + 800: '#043039', + 900: '#022127', +}; + +function Styles() { + return ( + + ); +} diff --git a/docs/data/base/components/button/UnstyledButtonsSpan/css/index.tsx b/docs/data/base/components/button/UnstyledButtonsSpan/css/index.tsx new file mode 100644 index 00000000000000..07b3949ac8f65e --- /dev/null +++ b/docs/data/base/components/button/UnstyledButtonsSpan/css/index.tsx @@ -0,0 +1,62 @@ +import * as React from 'react'; +import { Button, buttonClasses } from '@mui/base/Button'; +import Stack from '@mui/material/Stack'; + +export default function UnstyledButtonsSpan() { + return ( + + + + + + + + ); +} + +const cyan = { + 50: '#E9F8FC', + 100: '#BDEBF4', + 200: '#99D8E5', + 300: '#66BACC', + 400: '#1F94AD', + 500: '#0D5463', + 600: '#094855', + 700: '#063C47', + 800: '#043039', + 900: '#022127', +}; + +function Styles() { + return ( + + ); +} diff --git a/docs/data/base/components/button/UnstyledButtonsSpan/css/index.tsx.preview b/docs/data/base/components/button/UnstyledButtonsSpan/css/index.tsx.preview new file mode 100644 index 00000000000000..f5854b7a13d486 --- /dev/null +++ b/docs/data/base/components/button/UnstyledButtonsSpan/css/index.tsx.preview @@ -0,0 +1,11 @@ + + + + + + + \ No newline at end of file diff --git a/docs/data/base/components/button/UnstyledButtonsSpan/system/index.js b/docs/data/base/components/button/UnstyledButtonsSpan/system/index.js new file mode 100644 index 00000000000000..45dd963617f567 --- /dev/null +++ b/docs/data/base/components/button/UnstyledButtonsSpan/system/index.js @@ -0,0 +1,53 @@ +import * as React from 'react'; +import { Button, buttonClasses } from '@mui/base/Button'; +import { styled } from '@mui/system'; +import Stack from '@mui/material/Stack'; + +export default function UnstyledButtonsSpan() { + return ( + + Button + + Disabled + + + ); +} + +const blue = { + 500: '#007FFF', + 600: '#0072E5', + 700: '#0059B2', +}; + +const CustomButton = styled(Button)` + font-family: 'IBM Plex Sans', sans-serif; + font-size: 0.875rem; + line-height: 1.5; + background-color: ${blue[500]}; + color: white; + border-radius: 8px; + font-weight: 600; + padding: 8px 16px; + cursor: pointer; + transition: all 150ms ease; + border: none; + + &:hover { + background-color: ${blue[600]}; + } + + &.${buttonClasses.active} { + background-color: ${blue[700]}; + } + + &.${buttonClasses.focusVisible} { + box-shadow: 0 4px 20px 0 rgb(61 71 82 / 0.1), 0 0 0 5px rgb(0 127 255 / 0.5); + outline: none; + } + + &.${buttonClasses.disabled} { + opacity: 0.5; + cursor: not-allowed; + } +`; diff --git a/docs/data/base/components/button/UnstyledButtonsSpan/system/index.tsx b/docs/data/base/components/button/UnstyledButtonsSpan/system/index.tsx new file mode 100644 index 00000000000000..28456f29f69b20 --- /dev/null +++ b/docs/data/base/components/button/UnstyledButtonsSpan/system/index.tsx @@ -0,0 +1,54 @@ +import * as React from 'react'; +import { Button, buttonClasses, ButtonTypeMap } from '@mui/base/Button'; +import { styled } from '@mui/system'; +import Stack from '@mui/material/Stack'; +import { PolymorphicComponent } from '@mui/base/utils'; + +export default function UnstyledButtonsSpan() { + return ( + + Button + + Disabled + + + ); +} + +const blue = { + 500: '#007FFF', + 600: '#0072E5', + 700: '#0059B2', +}; + +const CustomButton = styled(Button)` + font-family: 'IBM Plex Sans', sans-serif; + font-size: 0.875rem; + line-height: 1.5; + background-color: ${blue[500]}; + color: white; + border-radius: 8px; + font-weight: 600; + padding: 8px 16px; + cursor: pointer; + transition: all 150ms ease; + border: none; + + &:hover { + background-color: ${blue[600]}; + } + + &.${buttonClasses.active} { + background-color: ${blue[700]}; + } + + &.${buttonClasses.focusVisible} { + box-shadow: 0 4px 20px 0 rgb(61 71 82 / 0.1), 0 0 0 5px rgb(0 127 255 / 0.5); + outline: none; + } + + &.${buttonClasses.disabled} { + opacity: 0.5; + cursor: not-allowed; + } +` as PolymorphicComponent; diff --git a/docs/data/base/components/button/UnstyledButtonsSpan/system/index.tsx.preview b/docs/data/base/components/button/UnstyledButtonsSpan/system/index.tsx.preview new file mode 100644 index 00000000000000..c38f8399833ef2 --- /dev/null +++ b/docs/data/base/components/button/UnstyledButtonsSpan/system/index.tsx.preview @@ -0,0 +1,4 @@ +Button + + Disabled + \ No newline at end of file diff --git a/docs/data/base/components/button/UnstyledButtonsSpan/tailwind/index.js b/docs/data/base/components/button/UnstyledButtonsSpan/tailwind/index.js new file mode 100644 index 00000000000000..48ae57c61675e9 --- /dev/null +++ b/docs/data/base/components/button/UnstyledButtonsSpan/tailwind/index.js @@ -0,0 +1,36 @@ +import * as React from 'react'; +import PropTypes from 'prop-types'; +import { Button } from '@mui/base/Button'; +import Stack from '@mui/material/Stack'; +import clsx from 'clsx'; + +export default function UnstyledButtonsSimple() { + return ( + + + Button + + + Disabled + + + ); +} + +const CustomButton = React.forwardRef((props, ref) => { + const { className, ...other } = props; + return ( + ; @@ -71,7 +71,7 @@ If you provide a non-interactive element such as a ``, the Button componen Compare the attributes on the `` in this demo with the Button from the previous demo—try inspecting them both with your browser's dev tools: -{{"demo": "UnstyledButtonsSpan.js"}} +{{"demo": "UnstyledButtonsSpan"}} :::warning If a Button is customized with a non-button element (for instance, `