neue Homepage auf react basis

This commit is contained in:
2026-08-07 21:39:30 +02:00
parent 164bdd19ad
commit ee89442c04
52191 changed files with 1230242 additions and 58 deletions
+829
View File
@@ -0,0 +1,829 @@
# [Versions](https://mui.com/material-ui/getting-started/versions/)
## 9.3.0
<!-- generated comparing v9.2.0..master -->
_Aug 4, 2026_
A big thanks to the 18 contributors who made this release possible. Here are some highlights ✨:
- ♿️ Keyboard navigation in the [Toggle Button Group](https://mui.com/material-ui/react-toggle-button/) now follows the roving tabindex pattern.
- ♿️ The [Autocomplete](https://mui.com/material-ui/react-autocomplete/) announces its loading and no options messages through a new `status` slot.
### `@mui/material@9.3.0`
- [autocomplete] Wrap the no results and loading messages in an aria live region (#48690) @silviuaavram
- [buttongroup] Respect global disableRipple / disableFocusRipple in grouped buttons (#48762) @siriwatknp
- [checkbox][radio] Respect global disableRipple from MuiButtonBase defaultProps (#48795) @siriwatknp
- [formcontrollabel] Add missing `labelPlacementEnd` class (#48843) @siriwatknp
- [listitembutton] Fix typos in component code (#48868) @ZeeshanTamboli
- [menuitem] Add `aria-checked` for checkbox and radio menu items (#48651) @siriwatknp
- [modal] Replace custom findIndexOf with findIndex (#48827) @ZeeshanTamboli
- [modal][dialog] Fix scrollbar compensation in Shadow DOM (#48826) @ZeeshanTamboli
- [select] Fix endAdornment overlapping the open indicator (#48723) @siriwatknp
- [tablepagination] Add focus style to default InputBase used in Select (#48871) @silviuaavram
- [togglebuttongroup] Add roving tabindex keyboard navigation (#48849) @silviuaavram
### `@mui/system@9.3.0`
- Prevent prototype pollution in cssVarsParser (#48822) @Janpot
### `@mui/codemod@9.3.0`
- Don't leak state between files in v5.0.0/path-imports (#48797) @manbearwiz
- Remove use of eval() (#48701) @oliviertassinari
- Transform all style exports in `v5.0.0/path-imports` codemod (#48800) @manbearwiz
### Docs
- Clarify `container` prop inheritance for Shadow DOM (#48670) @Juan-C-Ceballos
- Clarify third-party script risk in CSP unsafe-inline note (#48787) @Janpot
- Document `box-sx-prop` codemod (#48888) @SR0725
- Document Grid direction column removal in v9 upgrade guide (#48880) @kalayciburak
- Fix color contrast in GitHub labels example (#48844) @silviuaavram
- Fix per-page canonical URL and stale SEO link (#48789) @brijeshb42
- Fix redirect loop on the Design Kits page (#48869) @Janpot
- Fix typo 'overriden' -> 'overridden' in CHANGELOG (#48785) @ZhouYinLong-lab
- Improve TransferList examples (#48845) @silviuaavram
- Link a new theme generator tool (#48847) @mansourcodes
- Remove broken learning resource links (#48598) @morning-verlu
- Update the 9.2.0 changelog (#48763) @silviuaavram
- [autocomplete] Clarify how to render custom start and end adornments (#48883) @DebadityaHait
- [drawer] Clarify clipped AppBar spacing (#48887) @rushijagani-dev
- [menu] Fix stale `selected` prop reference in Selected menu section (#48879) @LukasTy
- [skeleton] Document preserving typography sizing with custom border radius (#48596) @meaqua9420
### Core
- [blog] Fix caret annotation broken by Prettier wrapping (#48884) @bernardobelchior
- [code-infra] Automate team sync on about page (#48794) @brijeshb42
- [code-infra] Bump @mui/internal-code-infra to 0.0.4-canary.101 (#48878) @Janpot
- [code-infra] Fix Dependabot alerts (#48756) @Janpot
- [code-infra] Fix team sync PR creation (#48911) @brijeshb42
- [code-infra] Pin node version in publish CI (#48799) @brijeshb42
- [core-docs] Tighten service worker host check (#48581) @Janpot
- [docs-infra] Change branch name to the allowed one (#48910) @brijeshb42
All contributors of this release in alphabetical order: @bernardobelchior, @brijeshb42, @DebadityaHait, @Janpot, @Juan-C-Ceballos, @kalayciburak, @LukasTy, @manbearwiz, @mansourcodes, @meaqua9420, @morning-verlu, @oliviertassinari, @rushijagani-dev, @silviuaavram, @siriwatknp, @SR0725, @ZeeshanTamboli, @ZhouYinLong-lab
## 9.2.0
<!-- generated comparing v9.1.2..master -->
_Jul 3, 2026_
A big thanks to the 9 contributors who made this release possible.
- ⚙️ Add support for [`data-*` attributes on `slotProps`](https://mui.com/material-ui/guides/typescript/#allowing-data-attributes-on-slotprops).
### `@mui/material@9.2.0`
- [l10n] Add missing MuiPagination localization to zh-CN locale (#48741) @greymoth-jp
- [select] Guard display ref during mouse down (#48744) @michelengelen
### `@mui/utils@9.2.0`
- [utils] Add opt-in `DataAttributesOverrides` augmentation for slot props (#48554) @LukasTy
### Docs
- [docs] Improve Icon Dialog responsiveness on small screens (#48639) @Prakash1185
- [docs] Fix invalid UTF-8 in skill references (#48739) @mturac
### Core
- [code-infra] Resolve Renovate dashboard warnings (#48700) @Sushantplive
- [code-infra] Validate npm publishing through dry run (#48691) @brijeshb42
- [code-infra] Run prettier after renovate update (#48754) @Janpot
- [code-infra] Fix 'A11y results committed?' check on react-pinned nightly jobs (#48740) @Janpot
- [core] Remove leftover Joy UI references (#48719) @siriwatknp
- [code-infra] Bump react-router to 7.15.1 (#48725) @Janpot
- [docs-infra] Drive docs analytics IDs via ANALYTICS_ENV (#48694) @Janpot
- [docs-infra] Pre-render API page descriptions (#48693) @brijeshb42
- [code-infra][icons-material] Build lib/package.json with code-infra --no-expand (#48689) @Janpot
- [code-infra] Fix react@18/next nightly workflow (#48635) @Janpot
All contributors of this release in alphabetical order: @brijeshb42, @greymoth-jp, @Janpot, @LukasTy, @michelengelen, @mturac, @Prakash1185, @siriwatknp, @Sushantplive
## 9.1.2
<!-- generated comparing v9.1.1..master -->
_Jun 23, 2026_
A big thanks to the 5 contributors who made this release possible.
### `@mui/material@9.1.2`
- [autocomplete] Don't submit forms when committing `freeSolo` value with Enter key (#48679) @mj12albert
- [transitions] Fix RTG import in ESM (#48645) @mj12albert
### `@mui/system@9.1.2`
- [InitColorSchemeScript] Fix script tag warning in Next.js 16 dev mode (#48671) @siriwatknp
### Docs
- Fix typos in release instructions (#48687) @brijeshb42
- Update @mui/x-\* packages to latest (#48661) @Janpot
### Core
- [code-infra] Convert leaf @mui/system .js+.d.ts pairs to TypeScript (part 1) (#48578) @Janpot
- [code-infra] Bump to latest code-infra packages (#48672) @brijeshb42
- [code-infra] Resolve remaining minimatch advisory (#48662) @Janpot
- [code-infra] Bump nx to resolve minimatch advisory (#48658) @Janpot
- [core] Drop @babel/\* pnpm overrides (#48710) @Janpot
- [docs-infra] Revert "Pin StackBlitz demo vite to v7 and plugin-react to v5" (#48709) @Janpot
- [docs-infra] Fix code-block copy button broken on direct page load (#48653) @brijeshb42
- [test] Stabilize Data Grid demo data in Argos screenshots (#48654) @LukasTy
All contributors of this release in alphabetical order: @brijeshb42, @Janpot, @LukasTy, @mj12albert, @siriwatknp
## 9.1.1
<!-- generated comparing v9.1.0..master -->
_Jun 11, 2026_
A big thanks to the 9 contributors who made this release possible.
### `@mui/material@9.1.1`
- [Autocomplete] Update fullWidth prop documentation (#48626) @vipin8797
- [ButtonBase] Fix focus ripple lingering after blur (#48650) @siriwatknp
- [InitColorSchemeScript] Server-render in tests for React 19.3 (#48604) @Janpot
- [Transition] Mount child in same commit when opening from unmounted (#48649) @siriwatknp
### `@mui/styled-engine@9.1.1`
- [styled-engine] Prevent enableCssLayer styles from being overridden by unlayered styles (#48603) @Janpot
### Docs
- Send SOURCE to Brevo on newsletter subscribe (#48633) @aemartos
- fix TypeScript heading capitalization (#48619) @ifer47
- Remove outdated security section (#48628) @oliviertassinari
- [legal] Update EULA links on website (#48642) @rluzists1
### Core
- Update dependencies to resolve Dependabot security alerts (#48641) @Janpot
- [core-docs] Pin StackBlitz demo vite to v7 and plugin-react to v5 (#48643) @Janpot
- [code-infra] Port codebase to use tsgo (#48616) @brijeshb42
- [docs-infra] Fix immutable cache headers for /\_next/static assets (#48655) @brijeshb42
- [docs-infra] Run link checker during docs build instead of as separate CI step (#48634) @Janpot
- [docs-infra] Support turbopack for docs (#48569) @brijeshb42
- [test] Cover docs landing-page composites with Argos (#48589) @LukasTy
All contributors of this release in alphabetical order: @aemartos, @brijeshb42, @ifer47, @Janpot, @LukasTy, @oliviertassinari, @rluzists1, @siriwatknp, @vipin8797
## 9.1.0
<!-- generated comparing v9.0.1..master -->
_Jun 8, 2026_
A big thanks to the 15 contributors who made this release possible. Here are some highlights ✨:
- ⚙️ Support for the [prefers-reduced-motion](https://mui.com/material-ui/transitions/#reduced-motion) setting.
- ♿️ Improved support for Windows High Contrast mode with the [enhanceHighContrast](https://mui.com/material-ui/customization/palette/#windows-high-contrast-mode) theme wrapper.
### `@mui/material@9.1.0`
- [autocomplete] Enable clearing highlight when mouse leaves popup (#48354) @mj12albert
- [autocomplete] Fix `freeSolo` controlled values cleared by initial `null` (#48611) @mj12albert
- [autocomplete] Fix item removal when it receives focus from VoiceOver before using Backspace (#48572) @silviuaavram
- [autocomplete] Fix `resetHighlightOnMouseLeave` JSdoc (#48536) @mj12albert
- [autocomplete] Guard against null inputRef during unmount (#48617) @noam3127
- [badge] Add `aria-hidden` to badge content and polish docs demos (#48471) @mj12albert
- [badge] Use inline CSS variables for anchorOrigin/overlap positioning (#48549) @siriwatknp
- [button] Fix customized flex gap styles (#48542) @mj12albert
- [dialog] Fix unwanted `DialogPaper` focus ring (#48535) @mj12albert
- [focus trap] Fix incorrect tab order when `tabIndex >= 1` (#48546) @mj12albert
- [progress] Show runtime errors only once (#48591) @silviuaavram
- [select] Allow spacebar to select elements (#48615) @silviuaavram
- [select] Support typeahead when closed (#48563) @mj12albert
- [step button] Choose higher contrast ripple color for dark mode focus (#48612) @silviuaavram
- [stepper] Include StepConnector inside Step element (#48492) @silviuaavram
- [stepper] Proper support for vertical alternativeLabel (#48485) @silviuaavram
- [tabs] Fix React 18 roving tabindex and dedupe invalid-value warning (#48605) @Janpot
- [theme] Add HighContrast theme enhancer (#48319) @silviuaavram
- [timeline item] Fix extra ::before spacing when TimelineOppositeContent is present (#46663) @tyalau
- [tooltip] Prevent stuck-open tooltip when child becomes disabled (#48606) @Janpot
- [transitions] Custom `Transition` component (#48325) @mj12albert
- [transitions] Support `prefers-reduced-motion` (#48357) @mj12albert
### `@mui/utils@9.1.0`
- [utils] Prevent prototype pollution in fastDeepAssign (#48580) @Janpot
### Docs
- [docs] Add function `slotProps` documentation (#48574) @mj12albert
- [docs] Clarify styled-components version compatibility (#48533) @nightt5879
- [docs] Fix broken URLs (#48520) @oliviertassinari
- [docs] Fix invalid JSON in Zed MCP setup example (#48490) @pavan-sh
- [docs] Mention release version for enhanceHighContrast (#48609) @silviuaavram
- [docs] Remove outdated MUI X v8 notification (#48600) @cherniavskii
- [docs] Remove redundant enhanceHighContrast information (#48632) @silviuaavram
- [docs-infra] Decrease loaded bundle size on docs (#48584) @brijeshb42
- [docs-infra] Drop multi-locale plumbing from API pages (#48370) @brijeshb42
- [docs-infra] Fix Cookie banner heading (#48529) @oliviertassinari
- [docs-infra] Infinitely cache all static assets (#48627) @brijeshb42
- [docs-infra] Remove outdated noSEOadvantage entries (#48527) @oliviertassinari
- [docs-infra] Restore build-only invariant throws via `NEXT_RUNTIME` guard (#48475) @Janpot
- [docs-infra] Test HTML validation in broken links checker (#48088) @Janpot
- [docs][icons] Fix Font Awesome Chip demo in dark mode (#48576) @siriwatknp
- [docs][icons] Remove redundant font awesome demo (#48493) @ZeeshanTamboli
- [docs][modal] Add nested modal guidance (#46507) @JakeSaterlay
- [docs][stepper] Fix focus management in examples (#48494) @silviuaavram
### Core
- Eslint markdown (#48371) @Janpot
- [agents] Fix some docs links (#48561) @silviuaavram
- [blog] Copy editing improvement on v9 announcement blog posts (#48543) @joserodolfofreitas
- [code-infra] Cleanup unused jss packages (#48590) @brijeshb42
- [code-infra] Collapse canary workflows into nightly and nightly-cron (#48556) @Janpot
- [code-infra] Convert @mui/private-theming to TypeScript (#48565) @Janpot
- [code-infra] Convert @mui/styled-engine to TypeScript (#48544) @Janpot
- [code-infra] Convert @mui/styled-engine-sc to TypeScript (#48577) @Janpot
- [code-infra] Fix duplicate resource_class in test_regressions CI job (#48601) @LukasTy
- [code-infra] Make @mui/internal-docs-utils compatible with TypeScript 6 (#48594) @Janpot
- [code-infra] Migrate CircleCI jobs to Gen2 resource classes (#48593) @LukasTy
- [code-infra] Parallelize visual regression screenshots (#48557) @Janpot
- [code-infra] Run nightly-cron on v7.x (#48579) @Janpot
- [core] Fix typescript@next typecheck (#48587) @Janpot
- [pnpm] Add security settings to pnpm-workspace.yaml (#48582) @Janpot
- [styled-engine-sc] Fix compatibility with Vite and Vitest (#48558) @mj12albert
- [test] Add axe-core tests for mui-material (#48341) @siriwatknp
- [test] Configure Tailwind CSS in the visual-regression app (#48575) @Janpot
All contributors of this release in alphabetical order: @brijeshb42, @cherniavskii, @JakeSaterlay, @Janpot, @joserodolfofreitas, @LukasTy, @mj12albert, @nightt5879, @noam3127, @oliviertassinari, @pavan-sh, @silviuaavram, @siriwatknp, @tyalau, @ZeeshanTamboli
## 9.0.1
<!-- generated comparing v9.0.0..master -->
_May 6, 2026_
A big thanks to the 25 contributors who made this release possible.
### `@mui/material@9.0.1`
- [accessibility] HighContrast mode on Avatar, Badge, Slider and Switch (#48320) @silviuaavram
- [autocomplete] Fix highlight sync and scroll preservation (#48322) @mj12albert
- [autocomplete] Fix input value and clear (#48263) @mj12albert
- [autocomplete] Fix iOS group scrollbar overflow (#48400) @oliviertassinari
- [autocomplete] Fix popper rendering issues (#48327) @mj12albert
- [autocomplete] Improve highlight tracking and selection state (#48219) @mj12albert
- [button] Fix `startIcon` alignment (#48332) @mj12albert
- [button][button base] Document `type` attribute (#48146) @mj12albert
- [button][fab][menu item][list item button] Remove duplicated className entries (#48213) @silviuaavram
- [checkbox] Set `aria-checked=mixed` when indeterminate (#48147) @mj12albert
- [circularprogress][linearprogress] Improve accessibility (#48172) @silviuaavram
- [dialog][drawer][focus trap] Fix initial focus target (#48280) @mj12albert
- [drawer] Fix swipe close flicker (#48372) @mj12albert
- [drawer] Fix transition jump (#48308) @mj12albert
- [focus trap] Remove IE 11-specific focus safety check from FocusTrap cleanup (#48368) @ZeeshanTamboli
- [form controls] Add internal `useFormControlState` hook (#48344) @mj12albert
- [icon button] Remove unused color palette mapping in styles (#48353) @sai6855
- [icons] Revert to using wildcard export paths (#48381) @brijeshb42
- [input] Fix layout shift with display: flex (#43839) @oliviertassinari
- [input] Prevent `notched` prop leaking into DOM (#48281) @mj12albert
- [input base] Place aria-label on the input element (#48283) @silviuaavram
- [inputs] Fix autofocus in SSR environment (#48290) @mj12albert
- [List] Fix sticky subheader overlapping iOS scrollbar (#48375) @sandeshdamkondwar
- [popper] Persist positioning styles when popperOptions changes reference (#48121) @mj12albert
- [select] Stop using combobox element for labeling (#48251) @silviuaavram
- [select] Support single-pointer-cycle selection and pointer cancellation (#48328) @mj12albert
- [switch] Fix incorrect `role` with `slotProps.input` (#48469) @mj12albert
- [tabs] Fix scrollable tabs blocking pointer events (#48166) @mj12albert
- [textfield] Fix autofill styles always in dark mode when CSS variables is used (#48244) @ZeeshanTamboli
- [tooltip] Simplify RTL styles using CSS logical properties (#48351) @sai6855
- [tooltip] Close Tooltip when its child becomes disabled (#44507) @chudesno
- [typography] Fix `h4` variant when using `responsiveFontSizes()` (#48314) @mj12albert
- [useMediaQuery] Fix crash in Firefox extension (#45196) @Mr-Quin
### `@mui/system@9.0.1`
- [system] Fix theme mutation when using responsive typography shorthand in sx (#48266) @tomups
### `@mui/codemod@9.0.1`
- [codemod] Add --jsx option to `v9.0.0/system-props` codemod (#48315) @siriwatknp
- [codemod] Add packageName support to the v9 system props codemod (#48253) @franco-dias
### `@mui/utils@9.0.1`
- [utils] Add shadow dom utils (#48256) @mj12albert
- [utils] Fix `resolveProps` receiving empty string className (#48289) @SAY-5
- [utils] Remove unnecessary `excludeKeys` from `extractEventHandlers` (#48481) @ZeeshanTamboli
### Docs
- [docs][autocomplete] Add demo with Tanstack Query `useInfiniteQuery` (#48356) @mj12albert
- [docs] Add agent skills for styling, theming, Next.js, and Tailwind CSS integrations (#48187) @mapache-salvaje
- [docs] Cleanup `@mui/base` (#48278) @mj12albert
- [docs] Fix create-playground script (#48380) @imazizbohra
- [docs] Fix date range calendar demo after MUI X v9 update (#48262) @LukasTy
- [docs] Fix icon search modal (#48255) @mj12albert
- [docs] Fix Material UI and MUI system "Upgrade to v9" docs (#48245) @ZeeshanTamboli
- [docs] Fix Popover JSdoc (#48310) @nitzan-treg
- [docs] Fix RTL toggle highlight in docs settings drawer (#48476) @sai6855
- [docs] Fix typos (#48155) @ayushshukla1807
- [docs] Fix typos (#48270) @pavan-sh
- [docs] Fix versions page (#48261) @mnajdova
- [docs] Fix vision grammar (#48477) @pavan-sh
- [docs] Improve accessibility for select examples (#48250) @silviuaavram
- [docs] Improve CSP guide with required directives (#48258) @Janpot
- [docs] Link to agent skills in relevant docs (#48387) @mapache-salvaje
- [docs] Make NumberField described by helper text (#48257) @silviuaavram
- [docs] Remove esm.sh references and endorsement (#44649) (#48330) @starboyvarun
- [docs] Remove generated CSS utility component doc (#48383) @mj12albert
- [docs] Remove incorrect message from experiments page and hide `/experiments` from crawlers (#48297) @ZeeshanTamboli
- [docs] Remove outdated references of .ttf and .woff (#48399) @oliviertassinari
- [docs] Restore wider maxWidth for `disableToc` pages (#48260) @LukasTy
- [docs] Show v9 announcement banner (#48242) @mnajdova
- [docs] Sync team members from frontend-public endpoint (#48273) @Janpot
- [docs] Update AGENTS.md testing section (#48392) @mj12albert
- [docs] Update e2e test README and test error message (#48285) @ZeeshanTamboli
- [docs] Update menu examples to always have aria-expanded (#48211) @silviuaavram
- [docs] Update MUI Treasury links (#47760) @siriwatknp
- [docs] Update MUI X dependencies to v9.0.0 (#48231) @siriwatknp
- [docs] Update MUI X roadmap section (#48316) @siriwatknp
- [docs] Update WCAG links and version from 2.1 to 2.2 (#48379) @mj12albert
- [docs] Use `React.useId()` for demo IDs (#48300) @Janpot
### Core
- [blog] Introducing Material UI and MUI X v9 (#48157) @joserodolfofreitas
- [code-infra] bundle size check internal core docs (#48390) @Janpot
- [code-infra] Deduplicate vale script (#48385) @brijeshb42
- [code-infra] Fix type shadowing (#48389) @Janpot
- [code-infra] Migrate to vite from webpack for e2e tests (#48248) @brijeshb42
- [code-infra] Remove a few ts-ignore comments (#43265) @Janpot
- [code-infra] Remove no longer needed `eslint-import-resolver-webpack` package (#48207) @ZeeshanTamboli
- [code-infra] Remove references to @mui/base and @mui/joy (#48358) @brijeshb42
- [code-infra] Use vale rules from code-infra package (#48173) @brijeshb42
- [core] Remove next.mui.com links (#48240) @mnajdova
- [core-docs] Use type-only imports for type-only references (#48386) @JCQuintas
- [docs-infra] Add x-chat to MuiProductId type and product switcher (#48209) @hasdfa
- [docs-infra] Fix duplicate JSDoc in proptypes generation (#48304) @brijeshb42
- [docs-infra] Fix duplicate JSDoc in proptypes generation for merged declarations (#48296) @brijeshb42
- [docs-infra] Fix import of cjs react-simple-code-editor in esm (#48349) @brijeshb42
- [docs-infra] Fix tab index on Base UI tab (#48345) @brijeshb42
- [docs-infra] Migrate docs app container/frame components (#48182) @brijeshb42
- [docs-infra] Migrate MarkdownDocs component to docs package (#48227) @brijeshb42
- [docs-infra] Re-apply changes from previous revert (#48243) @brijeshb42
- [docs-infra] Remove infra around the i18n setup (#48360) @brijeshb42
- [docs-infra] Rename package to @mui/internal-api-docs-builder (#48230) @brijeshb42
- [docs-infra] Revert JSDoc in proptypes generation for merged declarations (#48301) @brijeshb42
- [docs-infra] Revert Migrate docs app container/frame components (#48239) @brijeshb42
- [docs-infra] Revert Migrate MarkdownDocs component to docs package (#48238) @brijeshb42
- [internal] Add missing #host-reference (#48226) @silviuaavram
- [internal] Move changelog and update security page for post v9 release (#48298) @siriwatknp
- [internal] Remove outdated .woff files (#48398) @oliviertassinari
- [test] Fix autocomplete test description (#48395) @ZeeshanTamboli
All contributors of this release in alphabetical order: @ayushshukla1807, @brijeshb42, @chudesno, @franco-dias, @hasdfa, @imazizbohra, @Janpot, @JCQuintas, @joserodolfofreitas, @LukasTy, @mapache-salvaje, @mj12albert, @mnajdova, @Mr-Quin, @nitzan-treg, @oliviertassinari, @pavan-sh, @sai6855, @sandeshdamkondwar, @SAY-5, @silviuaavram, @siriwatknp, @starboyvarun, @tomups, @ZeeshanTamboli
## 9.0.0
<!-- generated comparing v9.0.0-beta.1..master -->
_Apr 7, 2026_
A big thanks to the 7 contributors who made this release possible.
🥳 We're excited to announce the stable release of Material UI v9! This major release focus on accessibility improvements, sx prop performance, and cleanup of deprecated APIs.
For more details, check out the [upgrade guide](https://mui.com/material-ui/migration/upgrade-to-v9/).
### `@mui/material@9.0.0`
- [slider] Use pointer events instead of mouse events (#48164) @mj12albert
- [switch] Add border to make it visible in high contrast mode (#48180) @silviuaavram
- [transitions] Performance improvements & misc fixes (#48151) @mj12albert
- Remove unnecessary overridesResolvers from styled components (#48204) @sai6855
### Core
- [code-infra] Setup workflow to publish internal packages (#47952) @brijeshb42
- [core-docs] Add `x-scheduler` to `MuiProductId` type (#48185) @rita-codes
- [docs-infra] Add scheduler to product switcher (#48208) @rita-codes
- [internal] Prepare libraries for v9 stable release (#48206) @siriwatknp
All contributors of this release in alphabetical order: @brijeshb42, @mj12albert, @noraleonte, @rita-codes, @sai6855, @silviuaavram, @siriwatknp
## 9.0.0-beta.1
<!-- generated comparing v9.0.0-beta.0..master -->
_Apr 2, 2026_
A big thanks to the 11 contributors who made this release possible.
### `@mui/material@9.0.0-beta.1`
#### Breaking Changes
- [grid] Remove 'column' and 'column-reverse' options from `direction` prop (#47564) @sai6855
- [icons] Remove legacy `*Outline` icons (#48116) @mj12albert
- [list-item-icon] Use theme spacing instead of hardcoded minWidth (#46597) @adiitxa
#### Changes
- [all components] Fix `slotProps.transition` types (#48153) @mj12albert
- [alert][dialog] Accessibility improvements (#48113) @silviuaavram
- [autocomplete] Fix helper text focusing input when clicked (#48156) @mj12albert
- [button-base] Add `nativeButton` prop (#47989) @mj12albert
- [input] Fix high contrast cutoff on first character (#48150) @silviuaavram
- [menu] Fix empty roving focus container (#48114) @mj12albert
- [utils] Explicitly register roving tab items with parent (#48122) @mj12albert
### Docs
- Fix HTML validation errors (#48107) @Janpot
- Fix duplicate IDs and HTML validation issues (#48095) @Janpot
- Fix the dark mode footer row shadow for the Data Grid on the advanced components page (#48149) @arminmeh
- Improve jsdom section (#48098) @oliviertassinari
- Update "Deprecated APIs removed" section to h2 in "Upgrade to v9" docs (#48115) @ZeeshanTamboli
- [docs][progress] Label all demo components (#48143) @mj12albert
- [docs-infra] Add x-scheduler to component API URL resolver (#48097) @rita-codes
- [docs-infra] Resolve some redirects (#48165) @Janpot
- [docs-infra] Update v9 Search Index (#48028) @dav-is
### Core
- [code-infra] Discover exports for bundle size report (#48170) @Janpot
- [internal] Fix use of ellipsis (#48096) @oliviertassinari
- [test] Add screenshot test for Virtualized Table (#47947) @mnajdova
- [test] Remove `componentsProp` from `describeConformance` tests (#48142) @ZeeshanTamboli
- [theme] Do not create channel tokens for custom colors when `nativeColor` is used (#47765) @ZeeshanTamboli
All contributors of this release in alphabetical order: @adiitxa, @arminmeh, @dav-is, @Janpot, @mj12albert, @mnajdova, @oliviertassinari, @rita-codes, @sai6855, @silviuaavram, @ZeeshanTamboli
## 9.0.0-beta.0
<!-- generated comparing v9.0.0-alpha.4..master -->
_Mar 25, 2026_
A big thanks to the 8 contributors who made this release possible.
### `@mui/material@9.0.0-beta.0`
#### Breaking Changes
- [linear-progress] Remove deprecated CSS classes (#48068) @mj12albert
- [list-item, list-item-text] Remove deprecated props (#48042) @siriwatknp
- [button-group] Remove deprecated classes (#48043) @siriwatknp
- [card] Remove deprecated CardHeader props (#47995) @silviuaavram
- [checkbox][radio][switch] Remove deprecated inputProps and inputRef (#48059) @siriwatknp
- [chip] Remove deprecated classes (#48046) @silviuaavram
- [dialog][modal][drawer][swipeabledrawer] Remove deprecated props and classes (#48039) @silviuaavram
- [divider] Remove deprecated CSS classes (#48075) @siriwatknp
- [drawer] Remove deprecated CSS classes (#48077) @siriwatknp
- [image-list-item-bar] Remove deprecated CSS classes (#48064) @siriwatknp
- [inputs] Remove deprecated props & classes (#48071) @mj12albert
- [material-ui] Remove unnecessary overridesResolvers from styled components (#48082) @ZeeshanTamboli
- [material-ui][system] Remove deprecated system props from Box, Stack, Typography (#48072) @siriwatknp
- [pagination-item] Remove deprecated CSS classes (#48076) @siriwatknp
- [pagination-item] Remove deprecated props (#48038) @siriwatknp
- [rating] Remove deprecated IconContainerComponent (#48019) @siriwatknp
- [select] Remove deprecated CSS classes (#48065) @mj12albert
- [slider] Remove deprecated CSS classes (#48074) @siriwatknp
- [step-connector][step-content][step-label] Remove deprecated props and classes (#48058) @siriwatknp
- [tabs][tab] Remove deprecated CSS classes (#48078) @siriwatknp
- [table-pagination][table-sort-label] Remove deprecated props and classes (#48060) @siriwatknp
- [toggle-button-group] Remove deprecated classes (#48061) @siriwatknp
#### Changes
- [system] Improve performance when using sx prop (#44254) @romgrk
### `@mui/codemod@9.0.0-beta.0`
- [codemod] Add missing codemod links in upgrade guide (#48069) @silviuaavram
### Docs
- Mention all breaking changes in changelog (#48091) @silviuaavram
- Fix link to upgrade-to-v9 docs in release CHANGELOG (#48081) @ZeeshanTamboli
### Core
- Update browserslistrc (#48085) @silviuaavram
- [code-infra] Prevent major version updates of bundler/framework packages in bundling fixtures (#48062) @Copilot
- [code-infra][icons-material] Avoid material utils barrel in createSvgIcon (#48029) @anchmelev
- [docs-infra] Migrate more leaf components to mui-docs (#48018) @brijeshb42
All contributors of this release in alphabetical order: @anchmelev, @brijeshb42, @Copilot, @mj12albert, @romgrk, @silviuaavram, @siriwatknp, @ZeeshanTamboli
## 9.0.0-alpha.4
<!-- generated comparing v9.0.0-alpha.3..master -->
_Mar 20, 2026_
A big thanks to the 11 contributors who made this release possible.
### `@mui/material@9.0.0-alpha.4`
#### Breaking Changes
- [accordion] Remove deprecated props (#47963) @silviuaavram
- `TransitionComponent`
- `TransitionProps`
- [accordionsummary] Remove deprecated CSS class (#48006) @silviuaavram
- `contentGutters`
- [alert] Remove deprecated CSS classes (#48011) @silviuaavram
- `standardSuccess`
- `standardInfo`
- `standardWarning`
- `standardError`
- `outlinedSuccess`
- `outlinedInfo`
- `outlinedWarning`
- `outlinedError`
- `filledSuccess`
- `filledInfo`
- `filledWarning`
- `filledError`
- [alert] Remove deprecated props (#47965) @silviuaavram
- `components`
- `componentsProps`
- [autocomplete] Remove deprecated props (#47864) @ZeeshanTamboli
- `ChipProps`
- `componentsProps`
- `ListboxComponent`
- `ListboxProps`
- `PaperComponent`
- `PopperComponent`
- `renderTags`
- [avatar] Remove deprecated props (#47966) @silviuaavram
- `imgProps`
- [avatargroup] Remove deprecated props (#47968) @silviuaavram
- `componentsProps`
- [backdrop] Remove deprecated props (#47991) @silviuaavram
- `components`
- `componentsProps`
- `TransitionComponent`
- [badge] Remove deprecated props (#47993) @silviuaavram
- `components`
- `componentsProps`
- [button] Remove deprecated CSS classes (#48012) @silviuaavram
- Color variant classes: `textInherit`, `outlinedPrimary`, `containedSecondary`, etc.
- Size classes: `textSizeSmall`, `iconSizeMedium`, etc.
- [circularprogress] Remove deprecated CSS classes (#48014) @silviuaavram
- `circleDeterminate`
- `circleIndeterminate`
- [divider] Remove deprecated prop (#48013) @atharva3333
- `light`
- [formcontrollabel] Remove deprecated props (#48032) @atharva3333
- `componentsProps`
- [menu] Remove deprecated props (#48021) @siriwatknp
- `MenuListProps`
- `PaperProps`
- `TransitionProps`
- [mobilestepper] Remove deprecated props (#48041) @siriwatknp
- `LinearProgressProps`
- [popover] Remove deprecated props (#48021) @siriwatknp
- `BackdropComponent`
- `BackdropProps`
- `PaperProps`
- `TransitionComponent`
- `TransitionProps`
- [popper] Remove deprecated props (#48020) @siriwatknp
- `components`
- `componentsProps`
- [select] Remove deprecated props passed via `MenuProps` (#48021) @siriwatknp
- `MenuListProps`
- `PaperProps`
- `TransitionProps`
- [slider] Remove deprecated props (#47996) @siriwatknp
- `components`
- `componentsProps`
- [speeddial] Remove deprecated props (#47998) @siriwatknp
- `TransitionComponent`
- `TransitionProps`
- [speeddialaction] Remove deprecated props (#47998) @siriwatknp
- `FabProps`
- `tooltipTitle`
- `tooltipPlacement`
- `tooltipOpen`
- `TooltipClasses`
- [tabs] Remove deprecated props (#48017) @siriwatknp
- `ScrollButtonComponent`
- `TabIndicatorProps`
- `TabScrollButtonProps`
- `slots.StartScrollButtonIcon`
- `slots.EndScrollButtonIcon`
- [textfield] Remove deprecated props (#47878) @ZeeshanTamboli
- `InputProps`
- `inputProps`
- `SelectProps`
- `InputLabelProps`
- `FormHelperTextProps`
- [tooltip] Remove deprecated props (#47988) @siriwatknp
- `components`
- `componentsProps`
- `PopperComponent`
- `PopperProps`
- `TransitionComponent`
- `TransitionProps`
- [typography] Remove deprecated prop (#47986) @siriwatknp
- `paragraph`
- [buttonbase] Key handlers should not run on a disabled non-native button (#48003) @mj12albert
- [tablepagination] Format pagination numbers according to locale (#47803) @siriwatknp
- [textfield] Use non-native label for `<TextField select/>` (#47958) @mj12albert
Check out the [v9 upgrade guide](https://mui.com/material-ui/migration/upgrade-to-v9/).
#### Changes
- [autocomplete] Optimize selected option lookup (#47953) @anchmelev
- [buttonbase] Fix native button detection (#47985) @mj12albert
- [inputbase] Fix test using removed InputProps on TextField (#48000) @siriwatknp
- [popper] Add missing classes export (#48031) @mj12albert
- [select] Fix focus visible always set on menu item (#47912) @silviuaavram
- [slider] Fix focus visible styles incorrectly applied by pointer (#47894) @mj12albert
- [slider] Accept readonly array for the value prop (#47936) @pcorpet
### `@mui/codemod@9.0.0-alpha.4`
- [codemod] Add slot key rename to `tabs-props` codemod and add to README (#48035) @siriwatknp
- [codemod] Add card-header-props migration guide (#48005) @siriwatknp
### Docs
- [blog] Lowercase 2026-MUI-X-price-changes blog post URL (#47871) @Janpot
- [docs] Wide docs layout (#47950) @noraleonte
- [docs] Mention the list of props removed in upgrade guide (#48010) @silviuaavram
- [docs] Update Autocomplete deprecated props removal migration guide docs (#47990) @ZeeshanTamboli
- [docs-infra] Extract shared App component from \_app into @mui/docs (#47933) @brijeshb42
- [docs-infra] Expose global theme object (#47964) @Janpot
- [docs][system] Update `styled` API docs for easier understanding (#47957) @olivier-lxo
### Core
- [code-infra] Add pkg-pr-new as dev dependency (#47992) @Janpot
- [code-infra] Remove CI coverage collection and upload to Codecov (#47930) @Janpot
- [core] Migrate to ESLint 10 (#47872) @brijeshb42
- [core] Remove GridLegacy component (#47956) @siriwatknp
All contributors of this release in alphabetical order: @anchmelev, @atharva3333, @brijeshb42, @Janpot, @mj12albert, @noraleonte, @olivier-lxo, @pcorpet, @silviuaavram, @siriwatknp, @ZeeshanTamboli
## 9.0.0-alpha.3
<!-- generated comparing v9.0.0-alpha.2..master -->
_Mar 12, 2026_
A big thanks to the 10 contributors who made this release possible. Here are some highlights ✨:
- 📖 A new [Menubar](https://mui.com/material-ui/react-menubar/) component page integrated with [Base UI](https://base-ui.com/react/components/menubar)
- ♿️ Improved the Roving TabIndex keyboard navigation for the Stepper, Tabs and MenuList components.
### `@mui/material@9.0.0-alpha.3`
#### Breaking Changes
- [stepper][menulist][tabs] Improve accessibility (#47687) @silviuaavram
#### Changes
- [autocomplete] Add `root` slot (#47852) @GerardasB
- [autocomplete] Fix popup reopening on window focus regain with openOnFocus (#47790) @aman44444
- [autocomplete] Support full slots for clearIndicator and popupIndicator (#47891) @silviuaavram
- [material-ui] Partially revert "[material-ui] Clean up duplicated CSS rules (#47838)" (#47927) @sai6855
### Docs
- [docs][codemod] Add v7 migration docs for deprecated Autocomplete APIs and Autocomplete codemod (#47945) @ZeeshanTamboli
- [docs] Update faq about vendor chunks (#47747) @Janpot
- [docs] Use direct palette vars in Tailwind v4 snippet (#47940) @Ahmad-Alaziz
- [docs][menubar] Add Menubar component page (#47616) @siriwatknp
### Core
- [core] Fix the release prepare steps (#47951) @silviuaavram
- [core] Remove Joy UI code and docs (#47939) @mnajdova
- [code-infra] Add previously missed export of themeCssVarsAugmentation (#47918) @brijeshb42
- [docs-infra] Import font module for nextjs transpilation (#47935) @brijeshb42
- [docs-infra] Migrate simpler modules from docs to mui-docs (#47897) @brijeshb42
- [test] Fix detached anchorEl elements in tests (#47929) @Janpot
All contributors of this release in alphabetical order: @Ahmad-Alaziz, @aman44444, @brijeshb42, @GerardasB, @Janpot, @mnajdova, @sai6855, @silviuaavram, @siriwatknp, @ZeeshanTamboli
## 9.0.0-alpha.2
<!-- generated comparing v9.0.0-alpha.1..master -->
_Mar 5, 2026_
A big thanks to the 4 contributors who made this release possible.
### @mui/material@9.0.0-alpha.2
- Clean up duplicated CSS rules (#47838) @sai6855
### @mui/system@9.0.0-alpha.2
- Refactor sortContainerQueries to define regex outside of sort function (#47817) @sai6855
### Docs
- Move shared components to @mui/docs package (#47672) @Janpot
- Fix small typo in NumberField page (#47877) @arthur-plazanet
### Core
- [code-infra] Reduce paths for attw checks (#47896) @brijeshb42
- [docs-infra] Run syncTeamMembers (#47900) @Janpot
All contributors of this release in alphabetical order: @arthur-plazanet, @brijeshb42, @Janpot, @sai6855
## 9.0.0-alpha.1
<!-- generated comparing v9.0.0-alpha.0..master -->
_Feb 26, 2026_
A big thanks to the 13 contributors who made this release possible. Here are some highlights ✨:
### @mui/material@9.0.0-alpha.1
#### Breaking Changes
- [Autocomplete] Prevents Autocomplete menu from opening on right click (#47797) @silviuaavram
- [Backdrop] Remove aria-hidden by default (#47798) @silviuaavram
- [ButtonBase] Ensure that onClick propagates when non-native button is clicked (#47800) @silviuaavram
- [Dialog][Modal] Remove `disableEscapeKeyDown` prop (#47695) @silviuaavram
- [Grid] Remove system props support (#47846) @siriwatknp
- [theme] Remove MuiTouchRipple from theme component types (#47849) @siriwatknp
- [useAutocomplete] Improve isOptionEqualToValue value argument type (#47801) @silviuaavram
#### Changes
- [TableCell][theme] Apply `alpha` before color mixing to border bottom color when nativeColor + cssVariables is used (#47762) @ZeeshanTamboli
- [Tooltip] Fix error is thrown when wrapping an input which is disabled while focused (#47684) @ZeeshanTamboli
### Docs
- [docs] Add updated community theme resource (#47847) @PeterTYLiu
- [docs] Few copy fixes (#47806) @pavan-sh
- [docs] Fix IPA reader link in blog post (#47796) @pavan-sh
- [docs] Fix JSX in Overriding component structure docs (#47799) @ZeeshanTamboli
- [docs] Fix the keyboard navigation in GroupedMenu example (#47842) @silviuaavram
- [docs] Fix Theme builder video (#47835) @oliviertassinari
- [docs] Update pricing sankey as done (#47795) @alexfauquette
- [docs][system] Update sizing docs to clarify `(0, 1]` behavior. (#47845) @matthias-ccri
### Core
- [blog] Blogpost for upcoming price changes for MUI X (#47748) @DanailH
- [code-infra] Detect browser envs that don't support layout (#47813) @Janpot
- [code-infra] Enable undefined addition to optional properties (#47750) @brijeshb42
- [code-infra] Exclusively enable test mode in jsdom (#47812) @Janpot
- [code-infra] Fix console.warn during test (#47802) @Janpot
- [code-infra] Remove vale as a workspace dependency (#47860) @brijeshb42
- [code-infra] Setup flat build for packages (#47670) @brijeshb42
- [code-infra] Upgrade react-docgen to v8 (#47685) @JCQuintas
- [docs-infra] Reapply Cookie Banner with Design Fixes (#47744) @dav-is
- [internal] Remove legacy MUI Base API docs (#47804) @ZeeshanTamboli
All contributors of this release in alphabetical order: @alexfauquette, @brijeshb42, @DanailH, @dav-is, @Janpot, @JCQuintas, @matthias-ccri, @oliviertassinari, @pavan-sh, @PeterTYLiu, @silviuaavram, @siriwatknp, @ZeeshanTamboli
## 9.0.0-alpha.0
<!-- generated comparing v7.3.8..master -->
_Feb 17, 2026_
A big thanks to the 3 contributors who made this release possible.
### @mui/material@9.0.0-alpha.0
- [theme] Generate `color-mix` value on top of default generated Material UI CSS variables (#47767) @ZeeshanTamboli
### Docs
- [docs] Make tooltips describe their visible text triggers (#47658) @silviuaavram
- [docs][theme] Fix `nativeColor` docs (#47759) @ZeeshanTamboli
### Core
- [blog] A pattern for opt-in type-only breaking changes in minor versions (#47622) @bernardobelchior
- [internal] Prepare libraries for first v9 alpha release (#47756) @silviuaavram
All contributors of this release in alphabetical order: @bernardobelchior, @silviuaavram, @ZeeshanTamboli
## Older versions
Changes before 9.x are listed in our [changelog for older versions](https://github.com/mui/material-ui/blob/HEAD/CHANGELOG.old.md).
Note: v8 is skipped to align the release version with MUI X v9.
@@ -0,0 +1,7 @@
import type * as React from 'react';
import { type Interpolation } from '@emotion/react';
export interface GlobalStylesProps<Theme = {}> {
defaultTheme?: object | undefined;
styles: Interpolation<Theme>;
}
export default function GlobalStyles<Theme = {}>(props: GlobalStylesProps<Theme>): React.JSX.Element;
@@ -0,0 +1,7 @@
import type * as React from 'react';
import { type Interpolation } from '@emotion/react';
export interface GlobalStylesProps<Theme = {}> {
defaultTheme?: object | undefined;
styles: Interpolation<Theme>;
}
export default function GlobalStyles<Theme = {}>(props: GlobalStylesProps<Theme>): React.JSX.Element;
+28
View File
@@ -0,0 +1,28 @@
"use strict";
'use client';
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = GlobalStyles;
var _propTypes = _interopRequireDefault(require("prop-types"));
var _react = require("@emotion/react");
var _jsxRuntime = require("react/jsx-runtime");
function isEmpty(obj) {
return obj === undefined || obj === null || Object.keys(obj).length === 0;
}
function GlobalStyles(props) {
const {
styles,
defaultTheme = {}
} = props;
const globalStyles = typeof styles === 'function' ? themeInput => styles(isEmpty(themeInput) ? defaultTheme : themeInput) : styles;
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_react.Global, {
styles: globalStyles
});
}
process.env.NODE_ENV !== "production" ? GlobalStyles.propTypes /* remove-proptypes */ = {
defaultTheme: _propTypes.default.object,
styles: _propTypes.default.oneOfType([_propTypes.default.array, _propTypes.default.string, _propTypes.default.object, _propTypes.default.func])
} : void 0;
+22
View File
@@ -0,0 +1,22 @@
'use client';
import PropTypes from 'prop-types';
import { Global } from '@emotion/react';
import { jsx as _jsx } from "react/jsx-runtime";
function isEmpty(obj) {
return obj === undefined || obj === null || Object.keys(obj).length === 0;
}
export default function GlobalStyles(props) {
const {
styles,
defaultTheme = {}
} = props;
const globalStyles = typeof styles === 'function' ? themeInput => styles(isEmpty(themeInput) ? defaultTheme : themeInput) : styles;
return /*#__PURE__*/_jsx(Global, {
styles: globalStyles
});
}
process.env.NODE_ENV !== "production" ? GlobalStyles.propTypes /* remove-proptypes */ = {
defaultTheme: PropTypes.object,
styles: PropTypes.oneOfType([PropTypes.array, PropTypes.string, PropTypes.object, PropTypes.func])
} : void 0;
+2
View File
@@ -0,0 +1,2 @@
export { default } from "./GlobalStyles.mjs";
export type * from "./GlobalStyles.mjs";
+2
View File
@@ -0,0 +1,2 @@
export { default } from "./GlobalStyles.js";
export type * from "./GlobalStyles.js";
+13
View File
@@ -0,0 +1,13 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function () {
return _GlobalStyles.default;
}
});
var _GlobalStyles = _interopRequireDefault(require("./GlobalStyles"));
+1
View File
@@ -0,0 +1 @@
export { default } from "./GlobalStyles.mjs";
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2014 Call-Em-All
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+11
View File
@@ -0,0 +1,11 @@
# @mui/styled-engine
This package is a wrapper around the `@emotion/react` package.
It also provides a shared interface that can be used with other styled engines, like styled-components.
It is used internally in the `@mui/system` package.
## Documentation
<!-- #host-reference -->
Visit [https://mui.com/material-ui/integrations/styled-components/](https://mui.com/material-ui/integrations/styled-components/) to view the full documentation.
@@ -0,0 +1,7 @@
import * as React from 'react';
export interface StyledEngineProviderProps {
children?: React.ReactNode;
enableCssLayer?: boolean | undefined;
injectFirst?: boolean | undefined;
}
export default function StyledEngineProvider(props: StyledEngineProviderProps): React.JSX.Element;
@@ -0,0 +1,7 @@
import * as React from 'react';
export interface StyledEngineProviderProps {
children?: React.ReactNode;
enableCssLayer?: boolean | undefined;
injectFirst?: boolean | undefined;
}
export default function StyledEngineProvider(props: StyledEngineProviderProps): React.JSX.Element;
@@ -0,0 +1,148 @@
"use strict";
'use client';
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.TEST_INTERNALS_DO_NOT_USE = void 0;
exports.default = StyledEngineProvider;
var React = _interopRequireWildcard(require("react"));
var _propTypes = _interopRequireDefault(require("prop-types"));
var _react2 = require("@emotion/react");
var _cache = _interopRequireDefault(require("@emotion/cache"));
var _sheet = require("@emotion/sheet");
var _jsxRuntime = require("react/jsx-runtime");
// To fix [Jest performance](https://github.com/mui/material-ui/issues/45638).
const cacheMap = new Map();
// Need to add a private variable to test the generated CSS from Emotion, this is the simplest way to do it.
// We can't test the CSS from `style` tag easily because the `speedy: true` (produce empty text content) is enabled by Emotion.
// Even if we disable it, JSDOM needs extra configuration to be able to parse `@layer` CSS.
/**
* @internal
*/
const TEST_INTERNALS_DO_NOT_USE = exports.TEST_INTERNALS_DO_NOT_USE = {
/**
* to intercept the generated CSS before inserting to the style tag, so that we can check the generated CSS.
*
* let rule;
* TEST_INTERNALS_DO_NOT_USE.insert = (...args) => {
* rule = args[0];
* };
*
* expect(rule).to.equal(...);
*/
insert: undefined
};
// We might be able to remove this when this issue is fixed:
// https://github.com/emotion-js/emotion/issues/2790
const createEmotionCache = (options, CustomSheet) => {
const cache = (0, _cache.default)(options);
// Do the same as https://github.com/emotion-js/emotion/blob/main/packages/cache/src/index.js#L238-L245
cache.sheet = new CustomSheet({
key: cache.key,
nonce: cache.sheet.nonce,
container: cache.sheet.container,
speedy: cache.sheet.isSpeedy,
prepend: cache.sheet.prepend,
insertionPoint: cache.sheet.insertionPoint
});
return cache;
};
let insertionPoint;
if (typeof document === 'object') {
// Use `insertionPoint` over `prepend`(deprecated) because it can be controlled for GlobalStyles injection order
// For more information, see https://github.com/mui/material-ui/issues/44597
insertionPoint = document.querySelector('[name="emotion-insertion-point"]');
if (!insertionPoint) {
insertionPoint = document.createElement('meta');
insertionPoint.setAttribute('name', 'emotion-insertion-point');
insertionPoint.setAttribute('content', '');
const head = document.querySelector('head');
if (head) {
head.prepend(insertionPoint);
}
}
}
function getCache(injectFirst, enableCssLayer) {
if (injectFirst || enableCssLayer) {
/**
* This is for client-side apps only.
* A custom sheet is required to make the GlobalStyles API injected above the insertion point.
* This is because the [sheet](https://github.com/emotion-js/emotion/blob/main/packages/react/src/global.js#L94-L99) does not consume the options.
*/
class MyStyleSheet extends _sheet.StyleSheet {
insert(rule, options) {
if (TEST_INTERNALS_DO_NOT_USE.insert) {
return TEST_INTERNALS_DO_NOT_USE.insert(rule, options);
}
if (this.key && this.key.endsWith('global')) {
this.before = insertionPoint;
}
return super.insert(rule, options);
}
}
const emotionCache = createEmotionCache({
// Use a dedicated key for the cascade-layer cache so its generated class
// names (e.g. `mui-fyswvn`) can never collide with identically-hashed
// UNLAYERED classes from the default/`injectFirst` cache (key `css`).
// A collision lets an unlayered `.css-xxx` rule beat the layered one,
// defeating MUI's own styles.
key: enableCssLayer ? 'mui' : 'css',
insertionPoint: injectFirst ? insertionPoint : undefined
}, MyStyleSheet);
if (enableCssLayer) {
const prevInsert = emotionCache.insert;
emotionCache.insert = (...args) => {
if (!args[1].styles.match(/^@layer\s+[^{]*$/)) {
// avoid nested @layer
args[1].styles = `@layer mui {${args[1].styles}}`;
}
return prevInsert(...args);
};
}
return emotionCache;
}
return undefined;
}
function StyledEngineProvider(props) {
const {
injectFirst,
enableCssLayer,
children
} = props;
const cache = React.useMemo(() => {
const cacheKey = `${injectFirst}-${enableCssLayer}`;
if (typeof document === 'object' && cacheMap.has(cacheKey)) {
return cacheMap.get(cacheKey);
}
const fresh = getCache(injectFirst, enableCssLayer);
cacheMap.set(cacheKey, fresh);
return fresh;
}, [injectFirst, enableCssLayer]);
return cache ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_react2.CacheProvider, {
value: cache,
children: children
}) : children;
}
process.env.NODE_ENV !== "production" ? StyledEngineProvider.propTypes /* remove-proptypes */ = {
/**
* Your component tree.
*/
children: _propTypes.default.node,
/**
* If `true`, the styles are wrapped in `@layer mui`.
* Learn more about [Cascade layers](https://developer.mozilla.org/en-US/docs/Learn_web_development/Core/Styling_basics/Cascade_layers).
*/
enableCssLayer: _propTypes.default.bool,
/**
* By default, the styles are injected last in the <head> element of the page.
* As a result, they gain more specificity than any other style sheet.
* If you want to override MUI's styles, set this prop.
*/
injectFirst: _propTypes.default.bool
} : void 0;
@@ -0,0 +1,140 @@
'use client';
import * as React from 'react';
import PropTypes from 'prop-types';
import { CacheProvider } from '@emotion/react';
import createCache from '@emotion/cache';
import { StyleSheet } from '@emotion/sheet';
import { jsx as _jsx } from "react/jsx-runtime";
// To fix [Jest performance](https://github.com/mui/material-ui/issues/45638).
const cacheMap = new Map();
// Need to add a private variable to test the generated CSS from Emotion, this is the simplest way to do it.
// We can't test the CSS from `style` tag easily because the `speedy: true` (produce empty text content) is enabled by Emotion.
// Even if we disable it, JSDOM needs extra configuration to be able to parse `@layer` CSS.
/**
* @internal
*/
export const TEST_INTERNALS_DO_NOT_USE = {
/**
* to intercept the generated CSS before inserting to the style tag, so that we can check the generated CSS.
*
* let rule;
* TEST_INTERNALS_DO_NOT_USE.insert = (...args) => {
* rule = args[0];
* };
*
* expect(rule).to.equal(...);
*/
insert: undefined
};
// We might be able to remove this when this issue is fixed:
// https://github.com/emotion-js/emotion/issues/2790
const createEmotionCache = (options, CustomSheet) => {
const cache = createCache(options);
// Do the same as https://github.com/emotion-js/emotion/blob/main/packages/cache/src/index.js#L238-L245
cache.sheet = new CustomSheet({
key: cache.key,
nonce: cache.sheet.nonce,
container: cache.sheet.container,
speedy: cache.sheet.isSpeedy,
prepend: cache.sheet.prepend,
insertionPoint: cache.sheet.insertionPoint
});
return cache;
};
let insertionPoint;
if (typeof document === 'object') {
// Use `insertionPoint` over `prepend`(deprecated) because it can be controlled for GlobalStyles injection order
// For more information, see https://github.com/mui/material-ui/issues/44597
insertionPoint = document.querySelector('[name="emotion-insertion-point"]');
if (!insertionPoint) {
insertionPoint = document.createElement('meta');
insertionPoint.setAttribute('name', 'emotion-insertion-point');
insertionPoint.setAttribute('content', '');
const head = document.querySelector('head');
if (head) {
head.prepend(insertionPoint);
}
}
}
function getCache(injectFirst, enableCssLayer) {
if (injectFirst || enableCssLayer) {
/**
* This is for client-side apps only.
* A custom sheet is required to make the GlobalStyles API injected above the insertion point.
* This is because the [sheet](https://github.com/emotion-js/emotion/blob/main/packages/react/src/global.js#L94-L99) does not consume the options.
*/
class MyStyleSheet extends StyleSheet {
insert(rule, options) {
if (TEST_INTERNALS_DO_NOT_USE.insert) {
return TEST_INTERNALS_DO_NOT_USE.insert(rule, options);
}
if (this.key && this.key.endsWith('global')) {
this.before = insertionPoint;
}
return super.insert(rule, options);
}
}
const emotionCache = createEmotionCache({
// Use a dedicated key for the cascade-layer cache so its generated class
// names (e.g. `mui-fyswvn`) can never collide with identically-hashed
// UNLAYERED classes from the default/`injectFirst` cache (key `css`).
// A collision lets an unlayered `.css-xxx` rule beat the layered one,
// defeating MUI's own styles.
key: enableCssLayer ? 'mui' : 'css',
insertionPoint: injectFirst ? insertionPoint : undefined
}, MyStyleSheet);
if (enableCssLayer) {
const prevInsert = emotionCache.insert;
emotionCache.insert = (...args) => {
if (!args[1].styles.match(/^@layer\s+[^{]*$/)) {
// avoid nested @layer
args[1].styles = `@layer mui {${args[1].styles}}`;
}
return prevInsert(...args);
};
}
return emotionCache;
}
return undefined;
}
export default function StyledEngineProvider(props) {
const {
injectFirst,
enableCssLayer,
children
} = props;
const cache = React.useMemo(() => {
const cacheKey = `${injectFirst}-${enableCssLayer}`;
if (typeof document === 'object' && cacheMap.has(cacheKey)) {
return cacheMap.get(cacheKey);
}
const fresh = getCache(injectFirst, enableCssLayer);
cacheMap.set(cacheKey, fresh);
return fresh;
}, [injectFirst, enableCssLayer]);
return cache ? /*#__PURE__*/_jsx(CacheProvider, {
value: cache,
children: children
}) : children;
}
process.env.NODE_ENV !== "production" ? StyledEngineProvider.propTypes /* remove-proptypes */ = {
/**
* Your component tree.
*/
children: PropTypes.node,
/**
* If `true`, the styles are wrapped in `@layer mui`.
* Learn more about [Cascade layers](https://developer.mozilla.org/en-US/docs/Learn_web_development/Core/Styling_basics/Cascade_layers).
*/
enableCssLayer: PropTypes.bool,
/**
* By default, the styles are injected last in the <head> element of the page.
* As a result, they gain more specificity than any other style sheet.
* If you want to override MUI's styles, set this prop.
*/
injectFirst: PropTypes.bool
} : void 0;
@@ -0,0 +1,2 @@
export { default } from "./StyledEngineProvider.mjs";
export type * from "./StyledEngineProvider.mjs";
@@ -0,0 +1,2 @@
export { default } from "./StyledEngineProvider.js";
export type * from "./StyledEngineProvider.js";
+13
View File
@@ -0,0 +1,13 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function () {
return _StyledEngineProvider.default;
}
});
var _StyledEngineProvider = _interopRequireDefault(require("./StyledEngineProvider"));
@@ -0,0 +1 @@
export { default } from "./StyledEngineProvider.mjs";
+109
View File
@@ -0,0 +1,109 @@
import { type CreateStyled, type StyledComponent, type StyledOptions } from '@emotion/styled';
import type * as CSS from 'csstype';
import { type PropsOf } from '@emotion/react';
export type { CreateStyled, StyledComponent, StyledOptions, StyledTags } from '@emotion/styled';
declare const _default: CreateStyled;
export default _default;
/**
* For internal usage in `@mui/system` package
*/
export declare function internal_mutateStyles(tag: React.ElementType, processor: (styles: any) => any): void;
export declare function internal_serializeStyles<P>(styles: Interpolation<P>): object;
export { ThemeContext, keyframes, css } from '@emotion/react';
export { default as StyledEngineProvider } from "./StyledEngineProvider/index.mjs";
export { default as GlobalStyles } from "./GlobalStyles/index.mjs";
export type { GlobalStylesProps } from "./GlobalStyles/index.mjs";
export type MUIStyledComponent<ComponentProps extends {}, SpecificComponentProps extends {} = {}, JSXProps extends {} = {}> = StyledComponent<ComponentProps, SpecificComponentProps, JSXProps>;
export interface SerializedStyles {
name: string;
styles: string;
map?: string | undefined;
next?: SerializedStyles | undefined;
}
export type CSSProperties = CSS.PropertiesFallback<number | string>;
export type CSSPropertiesWithMultiValues = { [K in keyof CSSProperties]: CSSProperties[K] | ReadonlyArray<Extract<CSSProperties[K], string>> };
export type CSSPseudos = { [K in CSS.Pseudos]?: unknown | CSSObject };
export interface CSSOthersObject {
[propertiesName: string]: unknown | CSSInterpolation;
}
export type CSSPseudosForCSSObject = { [K in CSS.Pseudos]?: CSSObject };
export interface ArrayCSSInterpolation extends ReadonlyArray<CSSInterpolation> {}
export interface CSSOthersObjectForCSSObject {
[propertiesName: string]: CSSInterpolation;
}
export interface CSSObject extends CSSPropertiesWithMultiValues, CSSPseudos, CSSOthersObject {}
export interface ComponentSelector {
__emotion_styles: any;
}
export type Keyframes = {
name: string;
styles: string;
anim: number;
toString: () => string;
} & string;
export type Equal<A, B, T, F> = A extends B ? (B extends A ? T : F) : F;
export type InterpolationPrimitive = null | undefined | boolean | number | string | ComponentSelector | Keyframes | SerializedStyles | CSSObject;
export type CSSInterpolation = InterpolationPrimitive | ArrayCSSInterpolation;
export interface FunctionInterpolation<Props> {
(props: Props): Interpolation<Props>;
}
export interface ArrayInterpolation<Props> extends ReadonlyArray<Interpolation<Props>> {}
export type Interpolation<Props> = null | undefined | boolean | number | string | ComponentSelector | Keyframes | SerializedStyles | CSSPropertiesWithMultiValues | (CSSObject & {
variants?: Array<{
props: (Props extends {
ownerState: infer O;
} ? Partial<Omit<Props, 'ownerState'> & O> : Partial<Props>) | ((props: Props extends {
ownerState: infer O;
} ? Props & O & {
ownerState: O;
} : Props) => boolean);
style: CSSObject | ((args: Props extends {
theme: any;
} ? {
theme: Props['theme'];
} : any) => CSSObject);
}> | undefined;
}) | ArrayInterpolation<Props> | FunctionInterpolation<Props>;
export declare function shouldForwardProp(propName: PropertyKey): boolean;
/** Same as StyledOptions but shouldForwardProp must be a type guard */
export interface FilteringStyledOptions<Props, ForwardedProps extends keyof Props = keyof Props> {
label?: string | undefined;
shouldForwardProp?(propName: PropertyKey): propName is ForwardedProps;
target?: string | undefined;
}
/**
* @typeparam ComponentProps Props which will be included when withComponent is called
* @typeparam SpecificComponentProps Props which will *not* be included when withComponent is called
*/
export interface CreateStyledComponent<ComponentProps extends {}, SpecificComponentProps extends {} = {}, JSXProps extends {} = {}, T extends object = {}> {
(...styles: Array<Interpolation<ComponentProps & SpecificComponentProps & {
theme: T;
}>>): StyledComponent<ComponentProps, SpecificComponentProps, JSXProps>;
/**
* @typeparam AdditionalProps Additional props to add to your styled component
*/
<AdditionalProps extends {}>(...styles: Array<Interpolation<ComponentProps & SpecificComponentProps & AdditionalProps & {
theme: T;
}>>): StyledComponent<ComponentProps & AdditionalProps, SpecificComponentProps, JSXProps>;
(template: TemplateStringsArray, ...styles: Array<Interpolation<ComponentProps & SpecificComponentProps & {
theme: T;
}>>): StyledComponent<ComponentProps, SpecificComponentProps, JSXProps>;
/**
* @typeparam AdditionalProps Additional props to add to your styled component
*/
<AdditionalProps extends {}>(template: TemplateStringsArray, ...styles: Array<Interpolation<ComponentProps & SpecificComponentProps & AdditionalProps & {
theme: T;
}>>): StyledComponent<ComponentProps & AdditionalProps, SpecificComponentProps, JSXProps>;
}
export interface CreateMUIStyled<MUIStyledCommonProps extends {}, MuiStyledOptions, Theme extends object> {
<C extends React.ComponentClass<React.ComponentProps<C>>, ForwardedProps extends keyof React.ComponentProps<C> = keyof React.ComponentProps<C>>(component: C, options: FilteringStyledOptions<React.ComponentProps<C>, ForwardedProps> & MuiStyledOptions): CreateStyledComponent<Pick<PropsOf<C>, ForwardedProps> & MUIStyledCommonProps, {}, {
ref?: React.Ref<InstanceType<C>> | undefined;
}, Theme>;
<C extends React.ComponentClass<React.ComponentProps<C>>>(component: C, options?: StyledOptions<PropsOf<C> & MUIStyledCommonProps> & MuiStyledOptions): CreateStyledComponent<PropsOf<C> & MUIStyledCommonProps, {}, {
ref?: React.Ref<InstanceType<C>> | undefined;
}, Theme>;
<C extends React.JSXElementConstructor<React.ComponentProps<C>>, ForwardedProps extends keyof React.ComponentProps<C> = keyof React.ComponentProps<C>>(component: C, options: FilteringStyledOptions<React.ComponentProps<C>, ForwardedProps> & MuiStyledOptions): CreateStyledComponent<Pick<PropsOf<C>, ForwardedProps> & MUIStyledCommonProps, {}, {}, Theme>;
<C extends React.JSXElementConstructor<React.ComponentProps<C>>>(component: C, options?: StyledOptions<PropsOf<C> & MUIStyledCommonProps> & MuiStyledOptions): CreateStyledComponent<PropsOf<C> & MUIStyledCommonProps, {}, {}, Theme>;
<Tag extends keyof React.JSX.IntrinsicElements, ForwardedProps extends keyof React.JSX.IntrinsicElements[Tag] = keyof React.JSX.IntrinsicElements[Tag]>(tag: Tag, options: FilteringStyledOptions<React.JSX.IntrinsicElements[Tag], ForwardedProps> & MuiStyledOptions): CreateStyledComponent<MUIStyledCommonProps, Pick<React.JSX.IntrinsicElements[Tag], ForwardedProps>, {}, Theme>;
<Tag extends keyof React.JSX.IntrinsicElements>(tag: Tag, options?: StyledOptions<MUIStyledCommonProps> & MuiStyledOptions): CreateStyledComponent<MUIStyledCommonProps, React.JSX.IntrinsicElements[Tag], {}, Theme>;
}
+109
View File
@@ -0,0 +1,109 @@
import { type CreateStyled, type StyledComponent, type StyledOptions } from '@emotion/styled';
import type * as CSS from 'csstype';
import { type PropsOf } from '@emotion/react';
export type { CreateStyled, StyledComponent, StyledOptions, StyledTags } from '@emotion/styled';
declare const _default: CreateStyled;
export default _default;
/**
* For internal usage in `@mui/system` package
*/
export declare function internal_mutateStyles(tag: React.ElementType, processor: (styles: any) => any): void;
export declare function internal_serializeStyles<P>(styles: Interpolation<P>): object;
export { ThemeContext, keyframes, css } from '@emotion/react';
export { default as StyledEngineProvider } from "./StyledEngineProvider/index.js";
export { default as GlobalStyles } from "./GlobalStyles/index.js";
export type { GlobalStylesProps } from "./GlobalStyles/index.js";
export type MUIStyledComponent<ComponentProps extends {}, SpecificComponentProps extends {} = {}, JSXProps extends {} = {}> = StyledComponent<ComponentProps, SpecificComponentProps, JSXProps>;
export interface SerializedStyles {
name: string;
styles: string;
map?: string | undefined;
next?: SerializedStyles | undefined;
}
export type CSSProperties = CSS.PropertiesFallback<number | string>;
export type CSSPropertiesWithMultiValues = { [K in keyof CSSProperties]: CSSProperties[K] | ReadonlyArray<Extract<CSSProperties[K], string>> };
export type CSSPseudos = { [K in CSS.Pseudos]?: unknown | CSSObject };
export interface CSSOthersObject {
[propertiesName: string]: unknown | CSSInterpolation;
}
export type CSSPseudosForCSSObject = { [K in CSS.Pseudos]?: CSSObject };
export interface ArrayCSSInterpolation extends ReadonlyArray<CSSInterpolation> {}
export interface CSSOthersObjectForCSSObject {
[propertiesName: string]: CSSInterpolation;
}
export interface CSSObject extends CSSPropertiesWithMultiValues, CSSPseudos, CSSOthersObject {}
export interface ComponentSelector {
__emotion_styles: any;
}
export type Keyframes = {
name: string;
styles: string;
anim: number;
toString: () => string;
} & string;
export type Equal<A, B, T, F> = A extends B ? (B extends A ? T : F) : F;
export type InterpolationPrimitive = null | undefined | boolean | number | string | ComponentSelector | Keyframes | SerializedStyles | CSSObject;
export type CSSInterpolation = InterpolationPrimitive | ArrayCSSInterpolation;
export interface FunctionInterpolation<Props> {
(props: Props): Interpolation<Props>;
}
export interface ArrayInterpolation<Props> extends ReadonlyArray<Interpolation<Props>> {}
export type Interpolation<Props> = null | undefined | boolean | number | string | ComponentSelector | Keyframes | SerializedStyles | CSSPropertiesWithMultiValues | (CSSObject & {
variants?: Array<{
props: (Props extends {
ownerState: infer O;
} ? Partial<Omit<Props, 'ownerState'> & O> : Partial<Props>) | ((props: Props extends {
ownerState: infer O;
} ? Props & O & {
ownerState: O;
} : Props) => boolean);
style: CSSObject | ((args: Props extends {
theme: any;
} ? {
theme: Props['theme'];
} : any) => CSSObject);
}> | undefined;
}) | ArrayInterpolation<Props> | FunctionInterpolation<Props>;
export declare function shouldForwardProp(propName: PropertyKey): boolean;
/** Same as StyledOptions but shouldForwardProp must be a type guard */
export interface FilteringStyledOptions<Props, ForwardedProps extends keyof Props = keyof Props> {
label?: string | undefined;
shouldForwardProp?(propName: PropertyKey): propName is ForwardedProps;
target?: string | undefined;
}
/**
* @typeparam ComponentProps Props which will be included when withComponent is called
* @typeparam SpecificComponentProps Props which will *not* be included when withComponent is called
*/
export interface CreateStyledComponent<ComponentProps extends {}, SpecificComponentProps extends {} = {}, JSXProps extends {} = {}, T extends object = {}> {
(...styles: Array<Interpolation<ComponentProps & SpecificComponentProps & {
theme: T;
}>>): StyledComponent<ComponentProps, SpecificComponentProps, JSXProps>;
/**
* @typeparam AdditionalProps Additional props to add to your styled component
*/
<AdditionalProps extends {}>(...styles: Array<Interpolation<ComponentProps & SpecificComponentProps & AdditionalProps & {
theme: T;
}>>): StyledComponent<ComponentProps & AdditionalProps, SpecificComponentProps, JSXProps>;
(template: TemplateStringsArray, ...styles: Array<Interpolation<ComponentProps & SpecificComponentProps & {
theme: T;
}>>): StyledComponent<ComponentProps, SpecificComponentProps, JSXProps>;
/**
* @typeparam AdditionalProps Additional props to add to your styled component
*/
<AdditionalProps extends {}>(template: TemplateStringsArray, ...styles: Array<Interpolation<ComponentProps & SpecificComponentProps & AdditionalProps & {
theme: T;
}>>): StyledComponent<ComponentProps & AdditionalProps, SpecificComponentProps, JSXProps>;
}
export interface CreateMUIStyled<MUIStyledCommonProps extends {}, MuiStyledOptions, Theme extends object> {
<C extends React.ComponentClass<React.ComponentProps<C>>, ForwardedProps extends keyof React.ComponentProps<C> = keyof React.ComponentProps<C>>(component: C, options: FilteringStyledOptions<React.ComponentProps<C>, ForwardedProps> & MuiStyledOptions): CreateStyledComponent<Pick<PropsOf<C>, ForwardedProps> & MUIStyledCommonProps, {}, {
ref?: React.Ref<InstanceType<C>> | undefined;
}, Theme>;
<C extends React.ComponentClass<React.ComponentProps<C>>>(component: C, options?: StyledOptions<PropsOf<C> & MUIStyledCommonProps> & MuiStyledOptions): CreateStyledComponent<PropsOf<C> & MUIStyledCommonProps, {}, {
ref?: React.Ref<InstanceType<C>> | undefined;
}, Theme>;
<C extends React.JSXElementConstructor<React.ComponentProps<C>>, ForwardedProps extends keyof React.ComponentProps<C> = keyof React.ComponentProps<C>>(component: C, options: FilteringStyledOptions<React.ComponentProps<C>, ForwardedProps> & MuiStyledOptions): CreateStyledComponent<Pick<PropsOf<C>, ForwardedProps> & MUIStyledCommonProps, {}, {}, Theme>;
<C extends React.JSXElementConstructor<React.ComponentProps<C>>>(component: C, options?: StyledOptions<PropsOf<C> & MUIStyledCommonProps> & MuiStyledOptions): CreateStyledComponent<PropsOf<C> & MUIStyledCommonProps, {}, {}, Theme>;
<Tag extends keyof React.JSX.IntrinsicElements, ForwardedProps extends keyof React.JSX.IntrinsicElements[Tag] = keyof React.JSX.IntrinsicElements[Tag]>(tag: Tag, options: FilteringStyledOptions<React.JSX.IntrinsicElements[Tag], ForwardedProps> & MuiStyledOptions): CreateStyledComponent<MUIStyledCommonProps, Pick<React.JSX.IntrinsicElements[Tag], ForwardedProps>, {}, Theme>;
<Tag extends keyof React.JSX.IntrinsicElements>(tag: Tag, options?: StyledOptions<MUIStyledCommonProps> & MuiStyledOptions): CreateStyledComponent<MUIStyledCommonProps, React.JSX.IntrinsicElements[Tag], {}, Theme>;
}
+109
View File
@@ -0,0 +1,109 @@
/**
* @mui/styled-engine v9.3.0
*
* @license MIT
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
'use client';
/* eslint-disable no-underscore-dangle */
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "GlobalStyles", {
enumerable: true,
get: function () {
return _GlobalStyles.default;
}
});
Object.defineProperty(exports, "StyledEngineProvider", {
enumerable: true,
get: function () {
return _StyledEngineProvider.default;
}
});
Object.defineProperty(exports, "ThemeContext", {
enumerable: true,
get: function () {
return _react.ThemeContext;
}
});
Object.defineProperty(exports, "css", {
enumerable: true,
get: function () {
return _react.css;
}
});
exports.default = void 0;
exports.internal_mutateStyles = internal_mutateStyles;
exports.internal_serializeStyles = internal_serializeStyles;
Object.defineProperty(exports, "keyframes", {
enumerable: true,
get: function () {
return _react.keyframes;
}
});
var _styled = _interopRequireDefault(require("@emotion/styled"));
var _serialize = require("@emotion/serialize");
var _react = require("@emotion/react");
var _StyledEngineProvider = _interopRequireDefault(require("./StyledEngineProvider"));
var _GlobalStyles = _interopRequireDefault(require("./GlobalStyles"));
// Re-export the public type surface of `@emotion/styled`. Explicit names rather
// than `export type *`: an `export *` (even type-only) is disallowed by the
// `'use client'` Next.js lint rule. Names locally redeclared below intentionally
// shadow Emotion's and are not re-exported here.
function styled(tag, options) {
// Emotion's `styled` overloads each expect a specific tag/component shape;
// none accept the broadened `React.ElementType` union, so cast the passthrough.
const stylesFactory = (0, _styled.default)(tag, options);
if (process.env.NODE_ENV !== 'production') {
return (...styles) => {
const component = typeof tag === 'string' ? `"${tag}"` : 'component';
if (styles.length === 0) {
console.error([`MUI: Seems like you called \`styled(${component})()\` without a \`style\` argument.`, 'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join('\n'));
} else if (styles.some(style => style === undefined)) {
console.error(`MUI: the styled(${component})(...args) API requires all its args to be defined.`);
}
return stylesFactory(...styles);
};
}
return stylesFactory;
}
var _default = exports.default = styled;
/**
* For internal usage in `@mui/system` package
*/
// eslint-disable-next-line @typescript-eslint/naming-convention
function internal_mutateStyles(tag, processor) {
// Emotion attaches all the styles as `__emotion_styles`.
// Ref: https://github.com/emotion-js/emotion/blob/16d971d0da229596d6bcc39d282ba9753c9ee7cf/packages/styled/src/base.js#L186
if (Array.isArray(tag.__emotion_styles)) {
tag.__emotion_styles = processor(tag.__emotion_styles);
}
}
// Emotion only accepts an array, but we want to avoid allocations
const wrapper = [];
// eslint-disable-next-line @typescript-eslint/naming-convention
function internal_serializeStyles(styles) {
wrapper[0] = styles;
return (0, _serialize.serializeStyles)(wrapper);
}
// TODO v6 - check if we can drop the unknown, as it breaks the autocomplete
// For more info on why it was added, see https://github.com/mui/material-ui/pull/26228
// TODO v6 - check if we can drop the unknown, as it breaks the autocomplete
// For more info on why it was added, see https://github.com/mui/material-ui/pull/26228
// Omit variants as a key, because we have a special handling for it
/** Same as StyledOptions but shouldForwardProp must be a type guard */
/**
* @typeparam ComponentProps Props which will be included when withComponent is called
* @typeparam SpecificComponentProps Props which will *not* be included when withComponent is called
*/
+74
View File
@@ -0,0 +1,74 @@
/**
* @mui/styled-engine v9.3.0
*
* @license MIT
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use client';
/* eslint-disable no-underscore-dangle */
import emStyled from '@emotion/styled';
import { serializeStyles as emSerializeStyles } from '@emotion/serialize';
// Re-export the public type surface of `@emotion/styled`. Explicit names rather
// than `export type *`: an `export *` (even type-only) is disallowed by the
// `'use client'` Next.js lint rule. Names locally redeclared below intentionally
// shadow Emotion's and are not re-exported here.
function styled(tag, options) {
// Emotion's `styled` overloads each expect a specific tag/component shape;
// none accept the broadened `React.ElementType` union, so cast the passthrough.
const stylesFactory = emStyled(tag, options);
if (process.env.NODE_ENV !== 'production') {
return (...styles) => {
const component = typeof tag === 'string' ? `"${tag}"` : 'component';
if (styles.length === 0) {
console.error([`MUI: Seems like you called \`styled(${component})()\` without a \`style\` argument.`, 'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join('\n'));
} else if (styles.some(style => style === undefined)) {
console.error(`MUI: the styled(${component})(...args) API requires all its args to be defined.`);
}
return stylesFactory(...styles);
};
}
return stylesFactory;
}
export default styled;
/**
* For internal usage in `@mui/system` package
*/
// eslint-disable-next-line @typescript-eslint/naming-convention
export function internal_mutateStyles(tag, processor) {
// Emotion attaches all the styles as `__emotion_styles`.
// Ref: https://github.com/emotion-js/emotion/blob/16d971d0da229596d6bcc39d282ba9753c9ee7cf/packages/styled/src/base.js#L186
if (Array.isArray(tag.__emotion_styles)) {
tag.__emotion_styles = processor(tag.__emotion_styles);
}
}
// Emotion only accepts an array, but we want to avoid allocations
const wrapper = [];
// eslint-disable-next-line @typescript-eslint/naming-convention
export function internal_serializeStyles(styles) {
wrapper[0] = styles;
return emSerializeStyles(wrapper);
}
export { ThemeContext, keyframes, css } from '@emotion/react';
export { default as StyledEngineProvider } from "./StyledEngineProvider/index.mjs";
export { default as GlobalStyles } from "./GlobalStyles/index.mjs";
// TODO v6 - check if we can drop the unknown, as it breaks the autocomplete
// For more info on why it was added, see https://github.com/mui/material-ui/pull/26228
// TODO v6 - check if we can drop the unknown, as it breaks the autocomplete
// For more info on why it was added, see https://github.com/mui/material-ui/pull/26228
// Omit variants as a key, because we have a special handling for it
/** Same as StyledOptions but shouldForwardProp must be a type guard */
/**
* @typeparam ComponentProps Props which will be included when withComponent is called
* @typeparam SpecificComponentProps Props which will *not* be included when withComponent is called
*/
+102
View File
@@ -0,0 +1,102 @@
{
"name": "@mui/styled-engine",
"version": "9.3.0",
"author": "MUI Team",
"description": "styled() API wrapper package for emotion.",
"license": "MIT",
"keywords": [
"react",
"react-component",
"mui",
"emotion"
],
"repository": {
"type": "git",
"url": "git+https://github.com/mui/material-ui.git",
"directory": "packages/mui-styled-engine"
},
"bugs": {
"url": "https://github.com/mui/material-ui/issues"
},
"homepage": "https://mui.com/system/styled/",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/mui-org"
},
"dependencies": {
"@babel/runtime": "^7.29.7",
"@emotion/cache": "^11.14.0",
"@emotion/serialize": "^1.3.3",
"@emotion/sheet": "^1.4.0",
"csstype": "^3.2.3",
"prop-types": "^15.8.1"
},
"peerDependencies": {
"@emotion/react": "^11.4.1",
"@emotion/styled": "^11.3.0",
"react": "^17.0.0 || ^18.0.0 || ^19.0.0"
},
"peerDependenciesMeta": {
"@emotion/react": {
"optional": true
},
"@emotion/styled": {
"optional": true
}
},
"sideEffects": false,
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=14.0.0"
},
"type": "commonjs",
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"types": "./index.d.mts",
"default": "./index.mjs"
},
"require": {
"types": "./index.d.ts",
"default": "./index.js"
},
"default": {
"types": "./index.d.mts",
"default": "./index.mjs"
}
},
"./GlobalStyles": {
"import": {
"types": "./GlobalStyles/index.d.mts",
"default": "./GlobalStyles/index.mjs"
},
"require": {
"types": "./GlobalStyles/index.d.ts",
"default": "./GlobalStyles/index.js"
},
"default": {
"types": "./GlobalStyles/index.d.mts",
"default": "./GlobalStyles/index.mjs"
}
},
"./StyledEngineProvider": {
"import": {
"types": "./StyledEngineProvider/index.d.mts",
"default": "./StyledEngineProvider/index.mjs"
},
"require": {
"types": "./StyledEngineProvider/index.d.ts",
"default": "./StyledEngineProvider/index.js"
},
"default": {
"types": "./StyledEngineProvider/index.d.mts",
"default": "./StyledEngineProvider/index.mjs"
}
}
},
"main": "./index.js",
"types": "./index.d.ts"
}