@mui/system 5.2.5 → 5.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Box/Box.d.ts CHANGED
@@ -123,6 +123,7 @@ export const typography: SimpleStyleFunction<
123
123
  | 'letterSpacing'
124
124
  | 'lineHeight'
125
125
  | 'textAlign'
126
+ | 'textTransform'
126
127
  >;
127
128
 
128
129
  // compose.js
package/CHANGELOG.md CHANGED
@@ -1,4 +1,348 @@
1
- ### [Versions](https://mui.com/versions/)
1
+ # [Versions](https://mui.com/versions/)
2
+
3
+ ## 5.4.0
4
+
5
+ <!-- generated comparing v5.3.1..master -->
6
+
7
+ _Feb 1, 2022_
8
+
9
+ A big thanks to the 22 contributors who made this release possible. Here are some highlights ✨:
10
+
11
+ - 🛠 @goncalovf added an example project using [MUI with Vite.js](https://github.com/mui-org/material-ui/tree/master/examples/vitejs) (#28241)
12
+ - Number of 🐛 bug fixes and 📚 documentation improvements.
13
+
14
+ ### `@mui/material@5.4.0`
15
+
16
+ #### Breaking changes
17
+
18
+ - &#8203;<!-- 27 -->[core] Do not reexport Base from Material (#30853) @michaldudak
19
+
20
+ All Base components were exported from the `@mui/material` package and treated as stable even though the `@mui/base` package is in development. It could create a lot of confusion if developers start using Base components, depend on them, and demand quality found in "proper" Material components. We admit it was a mistake to reexport these components without marking them as unstable.
21
+
22
+ Developers are still encouraged to evaluate the Base components, but they should do so by explicitly installing the `@mui/base` package.
23
+
24
+ This is technically a breaking change as it removes a number of components from the `@mui/material` package. However, we believe that removing the components now and potentially breaking the codebases will do less harm than introducing "silent" breaking changes to Base components while continuing reexporting them from `@mui/material`.
25
+
26
+ Note: the utility components, such as ClickAwayListener, NoSsr, Portal, and TextareaAutosize continue to be exported from both `@mui/material` and `@mui/base`.
27
+
28
+ If you're encountering build errors after upgrading @mui/material, do the following:
29
+
30
+ 1. Install @mui/base: npm install @mui/base or yarn add @mui/base
31
+ 2. Make sure the version of @mui/base match the version of @mui/material
32
+ 3. Change the import paths of unstyled components from @mui/material to @mui/base, e.g.:
33
+
34
+ ```diff
35
+ - @import ButtonUnstyled from '@mui/material/ButtonUnstyled';
36
+ + @import ButtonUnstyled from '@mui/base/ButtonUnstyled';
37
+ ```
38
+
39
+ #### Changes
40
+
41
+ - &#8203;<!-- 30 -->[Autocomplete] Add `readOnly` prop (#30706) @ZeeshanTamboli
42
+ - &#8203;<!-- 29 -->[Autocomplete] Fix typos in the page (#30737) @austinewuncler
43
+ - &#8203;<!-- 14 -->[FormControlLabel][formgroup] add Mui-error class (#30656) @alisasanib
44
+ - &#8203;<!-- 13 -->[Grid] Fix prop check for applying wrap-reverse (#30813) @Hubbz
45
+ - &#8203;<!-- 07 -->[TextField] Remove notch when no label is added (#30560) @alisasanib
46
+ - &#8203;<!-- 06 -->[TextField] Remove usage of dangerouslySetInnerHTML (#30776) @Jack-Works
47
+ - &#8203;<!-- 05 -->[TreeView] Select node when key `Enter` is pressed (#30795) @dryrainbow
48
+ - &#8203;<!-- 04 -->[useMediaQuery] Ensure no tearing in React 18 (#30655) @eps1lon
49
+
50
+ ### `@mui/base@5.0.0-alpha.67`
51
+
52
+ - &#8203;<!-- 11 -->[SelectUnstyled] Create unstyled select (+ hook) (#30113) @michaldudak
53
+
54
+ ### `@mui/lab@5.0.0-alpha.67`
55
+
56
+ - &#8203;<!-- 23 -->[DateTimePicker] Fix month view highlight wrong tab (#30773) @DiegoYungh
57
+ - &#8203;<!-- 12 -->[pickers] Enable the sx props on all components (#30749) @boutahlilsoufiane
58
+
59
+ ### Docs
60
+
61
+ - &#8203;<!-- 28 -->[blog] Introducing callback support in style overrides (#30668) @siriwatknp
62
+ - &#8203;<!-- 23 -->[docs] Add notifications for the blog posts (#30852) @siriwatknp
63
+ - &#8203;<!-- 22 -->[docs] Improve the interoperability guide (#30785) @mnajdova
64
+ - &#8203;<!-- 21 -->[docs] Improve the Getting Started documentation content (#30808) @mnajdova
65
+ - &#8203;<!-- 20 -->[docs] Fix typo in ad fallback (#30823) @cherniavskii
66
+ - &#8203;<!-- 19 -->[docs] Change ThemeProvider API links (#30705) @atakanzen
67
+ - &#8203;<!-- 18 -->[docs] Retain vendor prefixing in rtl example (#30710) @ryancogswell
68
+ - &#8203;<!-- 17 -->[docs] Fix typo in the Popper ScrollPlayground demo (#30780) @tanyabouman
69
+ - &#8203;<!-- 16 -->[docs] Small fixes on the jss-to-tss migration guide (#30734) @garronej
70
+ - &#8203;<!-- 15 -->[examples] Add Vite.js example (#28241) @goncalovf
71
+
72
+ ### Core
73
+
74
+ - &#8203;<!-- 29 -->[core] Clarify the label, to match with MUI X (#30831) @oliviertassinari
75
+ - &#8203;<!-- 26 -->[core] Remove none code related instructions from git (#30843) @oliviertassinari
76
+ - &#8203;<!-- 25 -->[core] Fix typos in comments for scripts (#30809) @aefox
77
+ - &#8203;<!-- 24 -->[core] Fix 301 link in the blog @oliviertassinari
78
+ - &#8203;<!-- 10 -->[test] Fix tests on Node 16 (#30819) @michaldudak
79
+ - &#8203;<!-- 09 -->[test] Add explicit types to support noImplicityAny=false (#30798) @m4theushw
80
+ - &#8203;<!-- 08 -->[test] Support React.useId format in \*DescriptionOf (#30657) @eps1lon
81
+ - &#8203;<!-- 03 -->[website] Fix SEO issues (#30829) @oliviertassinari
82
+ - &#8203;<!-- 02 -->[website] Add designer position page (#30708) @danilo-leal
83
+ - &#8203;<!-- 01 -->[website] Polish /about page (#30747) @oliviertassinari
84
+
85
+ All contributors of this release in alphabetical order: @aefox, @alisasanib, @atakanzen, @austinewuncler, @boutahlilsoufiane, @cherniavskii, @danilo-leal, @DiegoYungh, @dryrainbow, @eps1lon, @garronej, @goncalovf, @Hubbz, @Jack-Works, @m4theushw, @michaldudak, @mnajdova, @oliviertassinari, @ryancogswell, @siriwatknp, @tanyabouman, @ZeeshanTamboli
86
+
87
+ ## 5.3.1
88
+
89
+ <!-- generated comparing v5.3.0..master -->
90
+
91
+ _Jan 24, 2022_
92
+
93
+ A big thanks to the 12 contributors who made this release possible. Here are some highlights ✨:
94
+
95
+ - 🛠 @mnajdova added interoperability guide for using Tailwind CSS (#30700)
96
+ - A meaningful number of 🐛 bug fixes and 📚 documentation improvements.
97
+
98
+ ### `@mui/icons-material@5.3.1`
99
+
100
+ - &#8203;<!-- 04 -->[icons] Fix naming typos (#30512) @MrHBS
101
+ - &#8203;<!-- 03 -->[icons] Makes material-icons work with Joy (#30681) @siriwatknp
102
+
103
+ ### `@mui/base@5.0.0-alpha.66`
104
+
105
+ - &#8203;<!-- 02 -->[SliderUnstyled] Improve typings on some internal utils (#30614) @mnajdova
106
+
107
+ ### Core
108
+
109
+ - &#8203;<!-- 24 -->[core] Batch small changes (#30690) @oliviertassinari
110
+ - &#8203;<!-- 23 -->[core] Add new structure to ignore list crowdin (#30608) @siriwatknp
111
+ - &#8203;<!-- 22 -->[core] Correct version in package.json (#30677) @michaldudak
112
+ - &#8203;<!-- 01 -->[test] Fix buildApiUtils tests on Windows (#30698) @michaldudak
113
+
114
+ ### Docs
115
+
116
+ - &#8203;<!-- 26 -->[blog] Enable blog index (#30724) @siriwatknp
117
+ - &#8203;<!-- 25 -->[blog] Introducing the Row Grouping feature (#30598) @alexfauquette
118
+ - &#8203;<!-- 21 -->[docs] Fix SEO crawl errors (#30733) @oliviertassinari
119
+ - &#8203;<!-- 20 -->[docs] Update migration-v4.md (#30721) @ddecrulle
120
+ - &#8203;<!-- 19 -->[docs] Fix migration issues detected by `ahrefs` (#30751) @siriwatknp
121
+ - &#8203;<!-- 18 -->[docs] Add interoprability guide for using Tailwind CSS (#30700) @mnajdova
122
+ - &#8203;<!-- 17 -->[docs] Fix typo in containedSizeMedium class (#30723) @aaneitchik
123
+ - &#8203;<!-- 16 -->[docs] Hotfix the wrong URL in X marketing page (#30729) @siriwatknp
124
+ - &#8203;<!-- 15 -->[docs] Post migration preparation fix (#30716) @siriwatknp
125
+ - &#8203;<!-- 14 -->[docs] Update remix example to restore from error pages (#30592) @mnajdova
126
+ - &#8203;<!-- 13 -->[docs] Use new URLs when enable_redirects is true (#30704) @siriwatknp
127
+ - &#8203;<!-- 12 -->[docs] Add a missing bracket in the migration-v4 guide (#30616) @chaosmirage
128
+ - &#8203;<!-- 11 -->[docs] Add Checkbox color prop change (#30697) @aaneitchik
129
+ - &#8203;<!-- 10 -->[docs] Fix migration to have singular urls (#30695) @siriwatknp
130
+ - &#8203;<!-- 09 -->[docs] Update UXPin link to new landing page (#30691) @Evomatic
131
+ - &#8203;<!-- 08 -->[docs] Close user menu on click in the responsive app bar demo (#30664) @NoahYarian
132
+ - &#8203;<!-- 07 -->[docs] Clear the difference between UI and React components (#29930) @oliviertassinari
133
+ - &#8203;<!-- 06 -->[docs] Make Autocomplete docs gender neutral (#30679) @exequielbc
134
+ - &#8203;<!-- 05 -->[docs] Update doc structure for X components (#30684) @siriwatknp
135
+
136
+ All contributors of this release in alphabetical order: @aaneitchik, @alexfauquette, @chaosmirage, @ddecrulle, @Evomatic, @exequielbc, @michaldudak, @mnajdova, @MrHBS, @NoahYarian, @oliviertassinari, @siriwatknp
137
+
138
+ ## 5.3.0
139
+
140
+ <!-- generated comparing v5.2.8..master -->
141
+
142
+ _Jan 17, 2022_
143
+
144
+ A big thanks to the 15 contributors who made this release possible. Here are some highlights ✨:
145
+
146
+ - 🛠 @siriwatknp added support for callbacks in styleOverrides (#30524)
147
+ - 🧩 @ZeeshanTamboli and @VicHofs improved customization of components (#30515, #30212)
148
+ - 🛠 @hbjORbj fixed the use of ResizeObserver in Masonry component (#29896)
149
+ - 📄 @danilo-leal and @siriwatknp created our own blog home page (#30121)
150
+
151
+ ### `@mui/material@5.3.0`
152
+
153
+ - [Autocomplete] Add ability to pass props to `Paper` component (#30515) @ZeeshanTamboli
154
+ - [Select] Add defaultOpen prop (#30212) @VicHofs
155
+
156
+ ### `@mui/system@5.3.0`
157
+
158
+ - [system][box, grid, typography] `textTransform` prop should work directly on component (#30437) @hbjORbj
159
+ - [system] Support callback value in `styleOverrides` slot (#30524) @siriwatknp
160
+
161
+ ### `@mui/lab@5.0.0-alpha.65`
162
+
163
+ - [Masonry] Observe every masonry child to trigger computation when needed (#29896) @hbjORbj
164
+ - [MobileDatePicker] Fix calling onOpen when readOnly is true (#30561) @alisasanib
165
+
166
+ ### `@mui/codemod@5.3.0`
167
+
168
+ - [codemod] Bump `jscodeshift` to remove `colors` dependency (#30578) @siriwatknp
169
+
170
+ ### `@mui/styled-engine-sc@5.3.0`
171
+
172
+ - [styled-engine-sc] Add the withConfig API to enable using the babel plugin for styled-comonents (#30589) @mnajdova
173
+
174
+ ### `@mui/joy@5.0.0-alpha.11`
175
+
176
+ - [Joy] Add `SvgIcon` component (#30570) @hbjORbj
177
+
178
+ ### `@mui/base@5.0.0-alpha.65`
179
+
180
+ - [SliderUnstyled] Add useSlider hook and polish (#30094) @mnajdova
181
+
182
+ ### Docs
183
+
184
+ - [docs] End code block in test/README.md (#30531) @yaboi
185
+ - [docs] Remove redundant grouping in /components/radio-buttons/ (#30065) @eps1lon
186
+ - [docs] Update migration scripts and e2e tests (#30583) @siriwatknp
187
+ - [docs] Fix migration guides for versions older than v4 (#30595) @kkirsche
188
+ - [docs] Inform about specific files for DataGrid locales (#30411) @alexfauquette
189
+ - [docs] jss-to-tss migration advise to drop clsx in favor of cx (#30527) @garronej
190
+ - [docs] Fix integration with MUI X (#30593) @oliviertassinari
191
+ - [docs] Adding peer dependencies explanation on @mui/lab README.md (#30532) @glaucoheitor
192
+ - [docs] Add missing quote in migration docs (#30587) @Atralbus
193
+ - [docs] Update link to Doit sponsor (#30586) @oliviertassinari
194
+ - [docs] Add products identifier and drawer (#30283) @siriwatknp
195
+ - [website] Fix code button with installation command (#30622) @danilo-leal
196
+ - [website] Add a Blog index page (#30121) @danilo-leal
197
+ - [website] Migrate Twitter from @MaterialUI to @MUI_hq @oliviertassinari
198
+ - [website] Add Andrii to the About Us page (#30581) @cherniavskii
199
+
200
+ ### Core
201
+
202
+ - [core] Revert changes to peer dependencies (#30662) @oliviertassinari
203
+ - [core] Renovate should not try to update node (#30659) @oliviertassinari
204
+ - [core] Remove dead files (#30663) @oliviertassinari
205
+ - [core] Fix outdated TypeScript template (#30596) @oliviertassinari
206
+ - [core] Remove extra `</p>` from header of README.md (#30530) @yaboi
207
+ - [core] Fix `docs:api` script for Windows OS (#30533) @ZeeshanTamboli
208
+
209
+ All contributors of this release in alphabetical order: @alexfauquette, @alisasanib, @Atralbus, @cherniavskii, @danilo-leal, @eps1lon, @garronej, @glaucoheitor, @hbjORbj, @kkirsche, @mnajdova, @oliviertassinari, @siriwatknp, @VicHofs, @yaboi, @ZeeshanTamboli
210
+
211
+ ## 5.2.8
212
+
213
+ <!-- generated comparing v5.2.7..master -->
214
+
215
+ _Jan 10, 2022_
216
+
217
+ A big thanks to the 10 contributors who made this release possible. Here are some highlights ✨:
218
+
219
+ - A meaningful number of 🐛 bug fixes and 📚 documentation improvements.
220
+
221
+ ### `@mui/material@5.2.8`
222
+
223
+ - &#8203;<!-- 05 -->[TextField][inputlabel] Remove `pointer-events: none` property (#30493) @hbjORbj
224
+ - &#8203;<!-- 02 -->[Slider] Add `input` slot to components and componentsProps (#30362) @alexandre-lelain
225
+
226
+ ### `@mui/joy@5.0.0-alpha.10`
227
+
228
+ - &#8203;<!-- 04 -->[Joy] Add `Typography` component (#30489) @siriwatknp
229
+ - &#8203;<!-- 03 -->[Joy] Add functional `Switch` component (#30487) @siriwatknp
230
+
231
+ ### Docs
232
+
233
+ - &#8203;<!-- 18 -->[docs] Update markdown parser to remove backticks from description (#30495) @aefox
234
+ - &#8203;<!-- 17 -->[docs] Fix the crash when applying custom colors (#30563) @siriwatknp
235
+ - &#8203;<!-- 16 -->[docs] Location change of Sebastian (#30528) @eps1lon
236
+ - &#8203;<!-- 15 -->[docs] Lint markdown in the CI (#30395) @oliviertassinari
237
+ - &#8203;<!-- 14 -->[docs] Fix `componentsProps` API docs and PropTypes (#30502) @ZeeshanTamboli
238
+ - &#8203;<!-- 13 -->[docs] Codemod doc for overriding styles using tss (#30499) @garronej
239
+ - &#8203;<!-- 12 -->[docs] fix edge case when replacing data-grid url for migration (#30505) @siriwatknp
240
+ - &#8203;<!-- 11 -->[docs] fix replace url for migration (#30503) @siriwatknp
241
+ - &#8203;<!-- 10 -->[docs] Prepare scripts for migrating to new structure (#30386) @siriwatknp
242
+ - &#8203;<!-- 09 -->[docs] Adjust RTL Guide demos to fully support RTL (#30387) @noam-honig
243
+ - &#8203;<!-- 08 -->[docs] Move @eps1lon to community (#30473) @oliviertassinari
244
+ - &#8203;<!-- 07 -->[docs] Fix typo and spelling in the-sx-prop.md (#30482) @aefox
245
+ - &#8203;<!-- 06 -->[docs] More general docs polishing (#30371) @danilo-leal
246
+ - &#8203;<!-- 01 -->[website] Add José on the /about page (#30492) @danilo-leal
247
+
248
+ All contributors of this release in alphabetical order: @aefox, @alexandre-lelain, @danilo-leal, @eps1lon, @garronej, @hbjORbj, @noam-honig, @oliviertassinari, @siriwatknp, @ZeeshanTamboli
249
+
250
+ ## 5.2.7
251
+
252
+ <!-- generated comparing v5.2.6..master -->
253
+
254
+ _Jan 3, 2022_
255
+
256
+ A big thanks to the 14 contributors who made this release possible. Here are some highlights ✨:
257
+
258
+ - 📓 Improvements on the Vietnamese (vi-VN) and Finnish (fi-FI) locales (#30426, #30442) @hckhanh @Certificate
259
+ - And more 🐛 bug fixes and 📚 documentation improvements.
260
+
261
+ ### `@mui/material@5.2.7`
262
+
263
+ - &#8203;<!-- 14 -->[Autocomplete] Fix calling onChange for duplicate values (#30374) @alisasanib
264
+ - &#8203;<!-- 13 -->[Avatar] Fix TypeScript error on imgProps (#30255) @ahmad-reza619
265
+ - &#8203;<!-- 12 -->[Badge] Fix `classes` prop TypeScript type (#30427) @ZeeshanTamboli
266
+ - &#8203;<!-- 03 -->[SvgIcon] Allow viewBox to inherit from Component through inheritViewBox prop (#29954) @alex-dikusar
267
+ - &#8203;<!-- 04 -->[SvgIcon] Correct API docs and code style (#30470) @michaldudak
268
+
269
+ ### Docs
270
+
271
+ - &#8203;<!-- 11 -->[blog] 2021 (#30425) @oliviertassinari
272
+ - &#8203;<!-- 15 -->[docs] Fix typo on the Grid docs page (#30446) @abhi45
273
+ - &#8203;<!-- 07 -->[docs] Fix `useMediaQuery` SSR example to v5 theme API (#30454) @ValentinH
274
+ - &#8203;<!-- 11 -->[docs] Improve the migration guide and add examples for transforming to `tss-react` (#30388) @mnajdova
275
+ - &#8203;<!-- 09 -->[docs] Make the reference to the select clearer (#30460) @boazrymland
276
+ - &#8203;<!-- 08 -->[docs] Sync translations with Crowdin (#30385) @l10nbot
277
+ - &#8203;<!-- 06 -->[example] Avoid double rendering in the Remix example (#30366) @mnajdova
278
+ - &#8203;<!-- 05 -->[i18n] improve viVN locale (#30426) @hckhanh
279
+ - &#8203;<!-- 04 -->[l10n] Improve fiFI locale (#30442) @Certificate
280
+ - &#8203;<!-- 02 -->[website] Add new batch of open roles (#30282) @oliviertassinari
281
+ - &#8203;<!-- 01 -->[website] Refactor page context with next router (#30020) @siriwatknp
282
+
283
+ ### Core
284
+
285
+ - &#8203;<!-- 13 -->[core] Automatically close issues that are incomplete and inactive (#30459) @oliviertassinari
286
+ - &#8203;<!-- 10 -->[core] Remove contrib tweet (#30455) @oliviertassinari
287
+
288
+ All contributors of this release in alphabetical order: @abhi45, @ahmad-reza619, @alex-dikusar, @alisasanib, @boazrymland, @Certificate, @hckhanh, @l10nbot, @michaldudak, @mnajdova, @oliviertassinari, @siriwatknp, @ValentinH, @ZeeshanTamboli
289
+
290
+ ## 5.2.6
291
+
292
+ <!-- generated comparing v5.2.5..master -->
293
+
294
+ _Dec 27, 2021_
295
+
296
+ A big thanks to the 14 contributors who made this release possible. Here are some highlights ✨:
297
+
298
+ - 📓 The Norwegian Bokmål (nb-NO) locale was added (#27520) @wogsland
299
+ - 🛠 Introduced a new `useBadge` hook in the `@mui/base` package (#30246) @mnajdova
300
+ - And more 🐛 bug fixes and 📚 documentation improvements.
301
+
302
+ ### `@mui/material@5.2.6`
303
+
304
+ - &#8203;<!-- 24 -->[ButtonGroup] Fix typo in ButtonGroupContext's interface (#30376) @kealjones-wk
305
+ - &#8203;<!-- 03 -->[l10n] Add Norwegian Bokmål (nb-NO) locale (#27520) @wogsland
306
+
307
+ ### `@mui/base@5.0.0-alpha.62`
308
+
309
+ - &#8203;<!-- 26 -->[BadgeUnstyled] Add useBadge hook (#30246) @mnajdova
310
+
311
+ ### `@mui/joy@5.0.0-alpha.8`
312
+
313
+ - &#8203;<!-- 04 -->[Joy] Button API (#29962) @siriwatknp
314
+
315
+ ### Docs
316
+
317
+ - &#8203;<!-- 27 -->[docs] Fix color coercion (#30319) @Janpot
318
+ - &#8203;<!-- 25 -->[blog] Fix file import conflict resolution (#30391) @oliviertassinari
319
+ - &#8203;<!-- 21 -->[docs] Fix crash on Safari because of unsupported lookahead feature (#30345) @cherniavskii
320
+ - &#8203;<!-- 20 -->[docs] Update to new website domain (#30396) @ryota-murakami
321
+ - &#8203;<!-- 19 -->[docs] Fix text from material-ui to @mui to reflect v5 name changes (#30393) @pupudu
322
+ - &#8203;<!-- 18 -->[docs] Fix a11y in Menu demos (#30378) @ZeeshanTamboli
323
+ - &#8203;<!-- 17 -->[docs] Document how to unmount transition child (#30382) @oliviertassinari
324
+ - &#8203;<!-- 16 -->[docs] The current standard for quotes is QUOTATION MARK @oliviertassinari
325
+ - &#8203;<!-- 15 -->[docs] Fix 404 links (#30380) @oliviertassinari
326
+ - &#8203;<!-- 14 -->[docs] Fix Breadcrumb description (#30307) @jamesmelzer
327
+ - &#8203;<!-- 13 -->[docs] Modify injection order for Gatsby and SSR examples (#30358) @ShuPink
328
+ - &#8203;<!-- 12 -->[docs] Improve the translation experience (#30373) @oliviertassinari
329
+ - &#8203;<!-- 11 -->[docs] Sync translations with Crowdin (#30176) @l10nbot
330
+ - &#8203;<!-- 10 -->[docs] Fix link to /size-snapshot (#30363) @oliviertassinari
331
+ - &#8203;<!-- 09 -->[docs] Fix incorrect aria label in SpeedDial demo (#30354) @chwallen
332
+ - &#8203;<!-- 08 -->[docs] Fix incorrect number of breakpoint helpers (#30353) @chwallen
333
+ - &#8203;<!-- 07 -->[docs] Update outdated links (#30260) @oliviertassinari
334
+ - &#8203;<!-- 06 -->[docs] Support redirects from old urls to /material/\* (#30286) @siriwatknp
335
+ - &#8203;<!-- 05 -->[examples] Fix CSS modules integration (#30381) @oliviertassinari
336
+ - &#8203;<!-- 02 -->[website] Fix SEO issues (#30372) @oliviertassinari
337
+ - &#8203;<!-- 01 -->[website] Sync sponsors (#30259) @oliviertassinari
338
+
339
+ ### Core
340
+
341
+ - &#8203;<!-- 28 -->[core] Rename Material-UI to MUI (#30338) @ZeeshanTamboli
342
+ - &#8203;<!-- 23 -->[core] Fix warning in dev mode (#30368) @oliviertassinari
343
+ - &#8203;<!-- 22 -->[core] Update `buildApi` script to support new structure (#30245) @siriwatknp
344
+
345
+ All contributors of this release in alphabetical order: @cherniavskii, @chwallen, @jamesmelzer, @Janpot, @kealjones-wk, @l10nbot, @mnajdova, @oliviertassinari, @pupudu, @ryota-murakami, @ShuPink, @siriwatknp, @wogsland, @ZeeshanTamboli
2
346
 
3
347
  ## 5.2.5
4
348
 
@@ -1128,7 +1472,7 @@ A big thanks to the 18 contributors who made this release possible. Here are som
1128
1472
 
1129
1473
  replace `@material-ui/*` prefix with `@mui/*`:
1130
1474
 
1131
- ```
1475
+ ```sh
1132
1476
  @material-ui/system -> @mui/system
1133
1477
  @material-ui/styles -> @mui/styles
1134
1478
  @material-ui/lab -> @mui/lab
@@ -1141,7 +1485,7 @@ A big thanks to the 18 contributors who made this release possible. Here are som
1141
1485
 
1142
1486
  except these 3 packages that are renamed.
1143
1487
 
1144
- ```
1488
+ ```sh
1145
1489
  @material-ui/core => @mui/material // represents Material Design components.
1146
1490
  @material-ui/icons => @mui/icons-material // represents Material Design icons.
1147
1491
  @material-ui/unstyled => @mui/base // fully functional components with minimum styles.
@@ -2514,6 +2858,7 @@ A big thanks to the 16 contributors who made this release possible. Here are som
2514
2858
  ```
2515
2859
 
2516
2860
  - &#8203;<!-- 63 -->[Autocomplete] Rename getOptionSelected to isOptionEqualToValue (#26173) @m4theushw
2861
+
2517
2862
  ```diff
2518
2863
  <Autocomplete
2519
2864
  - getOptionSelected={(option, value) => option.title === value.title}
@@ -4087,7 +4432,7 @@ All contributors of this release in alphabetical order: @artola, @CyanoFresh, @d
4087
4432
 
4088
4433
  ## 5.0.0-alpha.23
4089
4434
 
4090
- ###### _Jan 14, 2021_
4435
+ _Jan 14, 2021_
4091
4436
 
4092
4437
  A big thanks to the 15 contributors who made this release possible. Here are some highlights ✨:
4093
4438
 
@@ -4202,7 +4547,7 @@ A big thanks to the 15 contributors who made this release possible. Here are som
4202
4547
 
4203
4548
  ## 5.0.0-alpha.22
4204
4549
 
4205
- ###### _Jan 4, 2021_
4550
+ _Jan 4, 2021_
4206
4551
 
4207
4552
  A big thanks to the 14 contributors who made this release possible. Here are some highlights ✨:
4208
4553
 
@@ -4254,7 +4599,7 @@ A big thanks to the 14 contributors who made this release possible. Here are som
4254
4599
 
4255
4600
  ## 5.0.0-alpha.21
4256
4601
 
4257
- ###### _Dec 30, 2020_
4602
+ _Dec 30, 2020_
4258
4603
 
4259
4604
  A big thanks to the 14 contributors who made this release possible. Here are some highlights ✨:
4260
4605
 
@@ -4327,7 +4672,7 @@ A big thanks to the 14 contributors who made this release possible. Here are som
4327
4672
 
4328
4673
  ## 5.0.0-alpha.20
4329
4674
 
4330
- ###### _Dec 21, 2020_
4675
+ _Dec 21, 2020_
4331
4676
 
4332
4677
  A big thanks to the 13 contributors who made this release possible. Here are some highlights ✨:
4333
4678
 
@@ -4405,7 +4750,7 @@ A big thanks to the 13 contributors who made this release possible. Here are som
4405
4750
 
4406
4751
  ## 5.0.0-alpha.19
4407
4752
 
4408
- ###### _Dec 13, 2020_
4753
+ _Dec 13, 2020_
4409
4754
 
4410
4755
  A big thanks to the 24 contributors who made this release possible. Here are some highlights ✨:
4411
4756
 
@@ -4533,7 +4878,7 @@ A big thanks to the 24 contributors who made this release possible. Here are som
4533
4878
 
4534
4879
  ## 5.0.0-alpha.18
4535
4880
 
4536
- ###### _Dec 3, 2020_
4881
+ _Dec 3, 2020_
4537
4882
 
4538
4883
  A big thanks to the 17 contributors who made this release possible. Here are some highlights ✨:
4539
4884
 
@@ -4625,7 +4970,7 @@ A big thanks to the 17 contributors who made this release possible. Here are som
4625
4970
 
4626
4971
  ## 5.0.0-alpha.17
4627
4972
 
4628
- ###### _Nov 23, 2020_
4973
+ _Nov 23, 2020_
4629
4974
 
4630
4975
  A big thanks to the 18 contributors who made this release possible. Here are some highlights ✨:
4631
4976
 
@@ -4792,7 +5137,7 @@ A big thanks to the 18 contributors who made this release possible. Here are som
4792
5137
 
4793
5138
  ## 5.0.0-alpha.16
4794
5139
 
4795
- ###### _Nov 14, 2020_
5140
+ _Nov 14, 2020_
4796
5141
 
4797
5142
  A big thanks to the 34 contributors who made this release possible. Here are some highlights ✨:
4798
5143
 
@@ -4896,7 +5241,7 @@ A big thanks to the 34 contributors who made this release possible. Here are som
4896
5241
 
4897
5242
  ## 5.0.0-alpha.15
4898
5243
 
4899
- ###### _Nov 4, 2020_
5244
+ _Nov 4, 2020_
4900
5245
 
4901
5246
  A big thanks to the 20 contributors who made this release possible. Here are some highlights ✨:
4902
5247
 
@@ -5008,7 +5353,7 @@ A big thanks to the 20 contributors who made this release possible. Here are som
5008
5353
 
5009
5354
  ## 5.0.0-alpha.14
5010
5355
 
5011
- ###### _Oct 23, 2020_
5356
+ _Oct 23, 2020_
5012
5357
 
5013
5358
  A big thanks to the 23 contributors who made this release possible.
5014
5359
  Here are some highlights ✨:
@@ -5059,12 +5404,14 @@ Here are some highlights ✨:
5059
5404
  You can read [their migration guide](https://popper.js.org/docs/v2/migration-guide/) or the following summary:
5060
5405
 
5061
5406
  - The CSS prefixes have changed:
5407
+
5062
5408
  ```diff
5063
5409
  popper: {
5064
5410
  zIndex: 1,
5065
5411
  - '&[x-placement*="bottom"] $arrow': {
5066
5412
  + '&[data-popper-placement*="bottom"] $arrow': {
5067
5413
  ```
5414
+
5068
5415
  - Method names have changed.
5069
5416
 
5070
5417
  ```diff
@@ -5179,7 +5526,7 @@ Here are some highlights ✨:
5179
5526
 
5180
5527
  ## 5.0.0-alpha.13
5181
5528
 
5182
- ###### _Oct 17, 2020_
5529
+ _Oct 17, 2020_
5183
5530
 
5184
5531
  A big thanks to the 25 contributors who made this release possible.
5185
5532
  Here are some highlights ✨:
@@ -5305,7 +5652,7 @@ Here are some highlights ✨:
5305
5652
 
5306
5653
  ## 5.0.0-alpha.12
5307
5654
 
5308
- ###### _Oct 11, 2020_
5655
+ _Oct 11, 2020_
5309
5656
 
5310
5657
  A big thanks to the 45 contributors who made this release possible.
5311
5658
  Here are some highlights ✨:
@@ -5529,7 +5876,7 @@ Here are some highlights ✨:
5529
5876
 
5530
5877
  ## 5.0.0-alpha.11
5531
5878
 
5532
- ###### _Sep 26, 2020_
5879
+ _Sep 26, 2020_
5533
5880
 
5534
5881
  A big thanks to the 29 contributors who made this release possible.
5535
5882
  Here are some highlights ✨:
@@ -5545,7 +5892,7 @@ Here are some highlights ✨:
5545
5892
  Last but not least, the change allows us to take advantage dynamic style props. We will use them for dynamic color props, variant props, and new style props (an improved [system](https://mui.com/system/basics/)).
5546
5893
 
5547
5894
  This change has been in our roadmap for more than a year.
5548
- We announced it in the [v4 release blog post](https://medium.com/material-ui/material-ui-v4-is-out-4b7587d1e701) as a direction v5 would take.
5895
+ We announced it in the [v4 release blog post](https://mui.com/blog/material-ui-v4-is-out/) as a direction v5 would take.
5549
5896
 
5550
5897
  - 🛠 A first iteration on the unstyled components.
5551
5898
 
@@ -5763,7 +6110,7 @@ More documentation are coming.
5763
6110
 
5764
6111
  ## 5.0.0-alpha.10
5765
6112
 
5766
- ###### _Sep 15, 2020_
6113
+ _Sep 15, 2020_
5767
6114
 
5768
6115
  A big thanks to the 16 contributors who made this release possible.
5769
6116
  Here are some highlights ✨:
@@ -5828,13 +6175,13 @@ Here are some highlights ✨:
5828
6175
 
5829
6176
  Before:
5830
6177
 
5831
- ```
6178
+ ```sh
5832
6179
  theme.spacing(2) => 16
5833
6180
  ```
5834
6181
 
5835
6182
  After:
5836
6183
 
5837
- ```
6184
+ ```sh
5838
6185
  theme.spacing(2) => '16px'
5839
6186
  ```
5840
6187
 
@@ -5893,7 +6240,7 @@ Here are some highlights ✨:
5893
6240
 
5894
6241
  ## 5.0.0-alpha.9
5895
6242
 
5896
- ###### _Sep 6, 2020_
6243
+ _Sep 6, 2020_
5897
6244
 
5898
6245
  A big thanks to the 14 contributors who made this release possible.
5899
6246
  Here are some highlights ✨:
@@ -5946,7 +6293,7 @@ Here are some highlights ✨:
5946
6293
 
5947
6294
  ## 5.0.0-alpha.8
5948
6295
 
5949
- ###### _Aug 31, 2020_
6296
+ _Aug 31, 2020_
5950
6297
 
5951
6298
  A big thanks to the 19 contributors who made this release possible.
5952
6299
  Here are some highlights ✨:
@@ -6122,7 +6469,7 @@ const theme = createMuiTheme({
6122
6469
 
6123
6470
  ## 5.0.0-alpha.7
6124
6471
 
6125
- ###### _Aug 22, 2020_
6472
+ _Aug 22, 2020_
6126
6473
 
6127
6474
  A big thanks to the 22 contributors who made this release possible.
6128
6475
  Here are some highlights ✨:
@@ -6252,7 +6599,7 @@ Here are some highlights ✨:
6252
6599
 
6253
6600
  ## 5.0.0-alpha.6
6254
6601
 
6255
- ###### _Aug 13, 2020_
6602
+ _Aug 13, 2020_
6256
6603
 
6257
6604
  A big thanks to the 26 contributors who made this release possible.
6258
6605
  Here are some highlights ✨:
@@ -6295,7 +6642,7 @@ Here are some highlights ✨:
6295
6642
 
6296
6643
  ### `@material-ui/core@v5.0.0-alpha.6`
6297
6644
 
6298
- ### Breaking changes
6645
+ #### Breaking changes
6299
6646
 
6300
6647
  - [Avatar] Rename variant circle -> circular for consistency (#22015) @kodai3
6301
6648
  Rename `circle` to `circular` for consistency. The possible values should be adjectives, not nouns:
@@ -6454,7 +6801,7 @@ Here are some highlights ✨:
6454
6801
  +},
6455
6802
  ```
6456
6803
 
6457
- ### Changes
6804
+ #### Changes
6458
6805
 
6459
6806
  - [Avatar] Custom variant (#22139) @mnajdova
6460
6807
  - [Badge] Add missing class key (#22095) @kodai3
@@ -6474,7 +6821,7 @@ Here are some highlights ✨:
6474
6821
 
6475
6822
  ### `@material-ui/lab@v5.0.0-alpha.6`
6476
6823
 
6477
- ### Breaking changes
6824
+ #### Breaking changes
6478
6825
 
6479
6826
  - [Skeleton] Rename variant circle -> circular and rect -> rectangular for consistency (#22053) @kodai3
6480
6827
  Rename `circle` to `circular` and `rect` to `rectangular` for consistency. The possible values should be adjectives, not nouns:
@@ -6486,7 +6833,7 @@ Here are some highlights ✨:
6486
6833
  +<Skeleton variant="rectangular">
6487
6834
  ```
6488
6835
 
6489
- ### Changes
6836
+ #### Changes
6490
6837
 
6491
6838
  - [Autocomplete] Add support for "{label: string}" data type as a default for "options" (#21992) @DanailH
6492
6839
  - [TreeView] Add disabled prop (#20133) @netochaves
@@ -6538,7 +6885,7 @@ Here are some highlights ✨:
6538
6885
 
6539
6886
  ## 5.0.0-alpha.5
6540
6887
 
6541
- ###### _July 28, 2020_
6888
+ _July 28, 2020_
6542
6889
 
6543
6890
  A big thanks to the 18 contributors who made this release possible.
6544
6891
 
@@ -6609,7 +6956,7 @@ A big thanks to the 18 contributors who made this release possible.
6609
6956
 
6610
6957
  ## 5.0.0-alpha.4
6611
6958
 
6612
- ###### _July 19, 2020_
6959
+ _July 19, 2020_
6613
6960
 
6614
6961
  A big thanks to the 11 contributors who made this release possible.
6615
6962
 
@@ -6651,7 +6998,7 @@ A big thanks to the 11 contributors who made this release possible.
6651
6998
 
6652
6999
  ## 5.0.0-alpha.3
6653
7000
 
6654
- ###### _July 12, 2020_
7001
+ _July 12, 2020_
6655
7002
 
6656
7003
  A big thanks to the 14 contributors who made this release possible.
6657
7004
 
@@ -6700,7 +7047,7 @@ A big thanks to the 14 contributors who made this release possible.
6700
7047
 
6701
7048
  ## 5.0.0-alpha.2
6702
7049
 
6703
- ###### _July 4, 2020_
7050
+ _July 4, 2020_
6704
7051
 
6705
7052
  A big thanks to the 16 contributors who made this release possible.
6706
7053
 
@@ -6762,7 +7109,7 @@ A big thanks to the 16 contributors who made this release possible.
6762
7109
 
6763
7110
  ## 5.0.0-alpha.1
6764
7111
 
6765
- ###### _June 27, 2020_
7112
+ _June 27, 2020_
6766
7113
 
6767
7114
  A big thanks to the 33 contributors who made this release possible. Here are some highlights ✨:
6768
7115
 
@@ -6878,6 +7225,7 @@ A big thanks to the 33 contributors who made this release possible. Here are som
6878
7225
  ```
6879
7226
 
6880
7227
  - [Accordion] typescript: The `event` in `onChange` is no longer typed as a `React.ChangeEvent` but `React.SyntheticEvent`.
7228
+
6881
7229
  ```diff
6882
7230
  -<Accordion onChange={(event: React.ChangeEvent<{}>, expanded: boolean) => {}} />
6883
7231
  +<Accordion onChange={(event: React.SyntheticEvent, expanded: boolean) => {}} />
@@ -10,7 +10,7 @@ export interface ThemeProviderProps<Theme = DefaultTheme> {
10
10
  * It should preferably be used at **the root of your component tree**.
11
11
  * API:
12
12
  *
13
- * - [ThemeProvider API](https://mui.com/api/theme-provider/)
13
+ * - [ThemeProvider API](/customization/theming/#themeprovider)
14
14
  */
15
15
  export default function ThemeProvider<T = DefaultTheme>(
16
16
  props: ThemeProviderProps<T>,
package/createStyled.js CHANGED
@@ -156,7 +156,11 @@ function createStyled(input = {}) {
156
156
  const styleOverrides = getStyleOverrides(componentName, theme);
157
157
 
158
158
  if (styleOverrides) {
159
- return overridesResolver(props, styleOverrides);
159
+ const resolvedStyleOverrides = {};
160
+ Object.entries(styleOverrides).forEach(([slotKey, slotStyle]) => {
161
+ resolvedStyleOverrides[slotKey] = typeof slotStyle === 'function' ? slotStyle(props) : slotStyle;
162
+ });
163
+ return overridesResolver(props, resolvedStyleOverrides);
160
164
  }
161
165
 
162
166
  return null;
@@ -218,6 +222,10 @@ function createStyled(input = {}) {
218
222
  return Component;
219
223
  };
220
224
 
225
+ if (defaultStyledResolver.withConfig) {
226
+ muiStyledResolver.withConfig = defaultStyledResolver.withConfig;
227
+ }
228
+
221
229
  return muiStyledResolver;
222
230
  };
223
231
  }
@@ -32,6 +32,8 @@ var _getInitColorSchemeScript = _interopRequireWildcard(require("./getInitColorS
32
32
 
33
33
  var _useCurrentColorScheme = _interopRequireDefault(require("./useCurrentColorScheme"));
34
34
 
35
+ var _createGetCssVar = _interopRequireDefault(require("./createGetCssVar"));
36
+
35
37
  var _jsxRuntime = require("react/jsx-runtime");
36
38
 
37
39
  const _excluded = ["colorSchemes"],
@@ -151,7 +153,8 @@ function createCssVarsProvider(options) {
151
153
  colorSchemes,
152
154
  vars: rootVars,
153
155
  spacing: themeProp.spacing ? (0, _createSpacing.default)(themeProp.spacing) : systemSpacing,
154
- breakpoints: themeProp.breakpoints ? (0, _createBreakpoints.default)(themeProp.breakpoints) : systemBreakpoints
156
+ breakpoints: themeProp.breakpoints ? (0, _createBreakpoints.default)(themeProp.breakpoints) : systemBreakpoints,
157
+ getCssVar: (0, _createGetCssVar.default)(prefix)
155
158
  });
156
159
  const styleSheet = {};
157
160
  Object.entries(colorSchemes).forEach(([key, scheme]) => {
@@ -0,0 +1,5 @@
1
+ /**
2
+ * The benefit of this function is to help developers get CSS var from theme without specifying the whole variable
3
+ * and they does not need to remember the prefix (defined once).
4
+ */
5
+ export default function createGetCssVar<T extends string = string>(prefix?: string): <AdditionalVars extends string = never>(field: T | AdditionalVars, ...vars: (T | AdditionalVars)[]) => string;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = createGetCssVar;
7
+
8
+ /**
9
+ * The benefit of this function is to help developers get CSS var from theme without specifying the whole variable
10
+ * and they does not need to remember the prefix (defined once).
11
+ */
12
+ function createGetCssVar(prefix = '') {
13
+ function appendVar(...vars) {
14
+ if (!vars.length) {
15
+ return '';
16
+ }
17
+
18
+ return `, var(--${prefix ? `${prefix}-` : ''}${vars[0]}${appendVar(...vars.slice(1))})`;
19
+ } // AdditionalVars makes `getCssVar` less strict, so it can be use like this `getCssVar('non-mui-variable')` without type error.
20
+
21
+
22
+ const getCssVar = (field, ...vars) => {
23
+ return `var(--${prefix ? `${prefix}-` : ''}${field}${appendVar(...vars)})`;
24
+ };
25
+
26
+ return getCssVar;
27
+ }
@@ -138,7 +138,11 @@ export default function createStyled(input = {}) {
138
138
  const styleOverrides = getStyleOverrides(componentName, theme);
139
139
 
140
140
  if (styleOverrides) {
141
- return overridesResolver(props, styleOverrides);
141
+ const resolvedStyleOverrides = {};
142
+ Object.entries(styleOverrides).forEach(([slotKey, slotStyle]) => {
143
+ resolvedStyleOverrides[slotKey] = typeof slotStyle === 'function' ? slotStyle(props) : slotStyle;
144
+ });
145
+ return overridesResolver(props, resolvedStyleOverrides);
142
146
  }
143
147
 
144
148
  return null;
@@ -201,6 +205,10 @@ export default function createStyled(input = {}) {
201
205
  return Component;
202
206
  };
203
207
 
208
+ if (defaultStyledResolver.withConfig) {
209
+ muiStyledResolver.withConfig = defaultStyledResolver.withConfig;
210
+ }
211
+
204
212
  return muiStyledResolver;
205
213
  };
206
214
  }
@@ -14,6 +14,7 @@ import cssVarsParser from './cssVarsParser';
14
14
  import ThemeProvider from '../ThemeProvider';
15
15
  import getInitColorSchemeScript, { DEFAULT_ATTRIBUTE, DEFAULT_MODE_STORAGE_KEY } from './getInitColorSchemeScript';
16
16
  import useCurrentColorScheme from './useCurrentColorScheme';
17
+ import createGetCssVar from './createGetCssVar';
17
18
  import { jsx as _jsx } from "react/jsx-runtime";
18
19
  import { jsxs as _jsxs } from "react/jsx-runtime";
19
20
  export const DISABLE_CSS_TRANSITION = '*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}';
@@ -126,7 +127,8 @@ export default function createCssVarsProvider(options) {
126
127
  colorSchemes,
127
128
  vars: rootVars,
128
129
  spacing: themeProp.spacing ? createSpacing(themeProp.spacing) : systemSpacing,
129
- breakpoints: themeProp.breakpoints ? createBreakpoints(themeProp.breakpoints) : systemBreakpoints
130
+ breakpoints: themeProp.breakpoints ? createBreakpoints(themeProp.breakpoints) : systemBreakpoints,
131
+ getCssVar: createGetCssVar(prefix)
130
132
  });
131
133
  const styleSheet = {};
132
134
  Object.entries(colorSchemes).forEach(([key, scheme]) => {
@@ -0,0 +1,20 @@
1
+ /**
2
+ * The benefit of this function is to help developers get CSS var from theme without specifying the whole variable
3
+ * and they does not need to remember the prefix (defined once).
4
+ */
5
+ export default function createGetCssVar(prefix = '') {
6
+ function appendVar(...vars) {
7
+ if (!vars.length) {
8
+ return '';
9
+ }
10
+
11
+ return `, var(--${prefix ? `${prefix}-` : ''}${vars[0]}${appendVar(...vars.slice(1))})`;
12
+ } // AdditionalVars makes `getCssVar` less strict, so it can be use like this `getCssVar('non-mui-variable')` without type error.
13
+
14
+
15
+ const getCssVar = (field, ...vars) => {
16
+ return `var(--${prefix ? `${prefix}-` : ''}${field}${appendVar(...vars)})`;
17
+ };
18
+
19
+ return getCssVar;
20
+ }
package/esm/index.js CHANGED
@@ -38,4 +38,5 @@ export { default as useTheme } from './useTheme';
38
38
  export { default as useThemeWithoutDefault } from './useThemeWithoutDefault';
39
39
  export * from './colorManipulator';
40
40
  export { default as ThemeProvider } from './ThemeProvider';
41
- export { default as unstable_createCssVarsProvider } from './cssVars/createCssVarsProvider';
41
+ export { default as unstable_createCssVarsProvider } from './cssVars/createCssVarsProvider';
42
+ export { default as unstable_createGetCssVar } from './cssVars/createGetCssVar';
package/esm/typography.js CHANGED
@@ -19,6 +19,9 @@ export const fontWeight = style({
19
19
  export const letterSpacing = style({
20
20
  prop: 'letterSpacing'
21
21
  });
22
+ export const textTransform = style({
23
+ prop: 'textTransform'
24
+ });
22
25
  export const lineHeight = style({
23
26
  prop: 'lineHeight'
24
27
  });
@@ -30,5 +33,5 @@ export const typographyVariant = style({
30
33
  cssProperty: false,
31
34
  themeKey: 'typography'
32
35
  });
33
- const typography = compose(typographyVariant, fontFamily, fontSize, fontStyle, fontWeight, letterSpacing, lineHeight, textAlign);
36
+ const typography = compose(typographyVariant, fontFamily, fontSize, fontStyle, fontWeight, letterSpacing, lineHeight, textAlign, textTransform);
34
37
  export default typography;
package/index.d.ts CHANGED
@@ -88,6 +88,7 @@ export const fontWeight: SimpleStyleFunction<'fontWeight'>;
88
88
  export const letterSpacing: SimpleStyleFunction<'letterSpacing'>;
89
89
  export const lineHeight: SimpleStyleFunction<'lineHeight'>;
90
90
  export const textAlign: SimpleStyleFunction<'textAlign'>;
91
+ export const textTransform: SimpleStyleFunction<'textTransform'>;
91
92
  export type TypographyProps = PropsFor<typeof typography>;
92
93
 
93
94
  // eslint-disable-next-line @typescript-eslint/naming-convention
@@ -161,4 +162,5 @@ export { default as ThemeProvider } from './ThemeProvider';
161
162
  export * from './ThemeProvider';
162
163
 
163
164
  export { default as unstable_createCssVarsProvider } from './cssVars';
165
+ export { default as unstable_createGetCssVar } from './cssVars/createGetCssVar';
164
166
  export * from './cssVars';
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.2.5
1
+ /** @license MUI v5.4.0
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -49,7 +49,8 @@ var _exportNames = {
49
49
  useTheme: true,
50
50
  useThemeWithoutDefault: true,
51
51
  ThemeProvider: true,
52
- unstable_createCssVarsProvider: true
52
+ unstable_createCssVarsProvider: true,
53
+ unstable_createGetCssVar: true
53
54
  };
54
55
  Object.defineProperty(exports, "Box", {
55
56
  enumerable: true,
@@ -243,6 +244,12 @@ Object.defineProperty(exports, "unstable_createCssVarsProvider", {
243
244
  return _createCssVarsProvider.default;
244
245
  }
245
246
  });
247
+ Object.defineProperty(exports, "unstable_createGetCssVar", {
248
+ enumerable: true,
249
+ get: function () {
250
+ return _createGetCssVar.default;
251
+ }
252
+ });
246
253
  Object.defineProperty(exports, "unstable_extendSxProp", {
247
254
  enumerable: true,
248
255
  get: function () {
@@ -468,6 +475,8 @@ var _ThemeProvider = _interopRequireDefault(require("./ThemeProvider"));
468
475
 
469
476
  var _createCssVarsProvider = _interopRequireDefault(require("./cssVars/createCssVarsProvider"));
470
477
 
478
+ var _createGetCssVar = _interopRequireDefault(require("./cssVars/createGetCssVar"));
479
+
471
480
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
472
481
 
473
482
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -1,4 +1,5 @@
1
1
  import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
2
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
3
  import _extends from "@babel/runtime/helpers/esm/extends";
3
4
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
5
  import styledEngineStyled from '@mui/styled-engine';
@@ -139,7 +140,15 @@ export default function createStyled() {
139
140
  var styleOverrides = getStyleOverrides(componentName, theme);
140
141
 
141
142
  if (styleOverrides) {
142
- return overridesResolver(props, styleOverrides);
143
+ var resolvedStyleOverrides = {};
144
+ Object.entries(styleOverrides).forEach(function (_ref2) {
145
+ var _ref3 = _slicedToArray(_ref2, 2),
146
+ slotKey = _ref3[0],
147
+ slotStyle = _ref3[1];
148
+
149
+ resolvedStyleOverrides[slotKey] = typeof slotStyle === 'function' ? slotStyle(props) : slotStyle;
150
+ });
151
+ return overridesResolver(props, resolvedStyleOverrides);
143
152
  }
144
153
 
145
154
  return null;
@@ -171,9 +180,9 @@ export default function createStyled() {
171
180
  transformedStyleArg.raw = [].concat(_toConsumableArray(styleArg.raw), _toConsumableArray(placeholders));
172
181
  } else if (typeof styleArg === 'function') {
173
182
  // If the type is function, we need to define the default theme.
174
- transformedStyleArg = function transformedStyleArg(_ref2) {
175
- var themeInput = _ref2.theme,
176
- other = _objectWithoutProperties(_ref2, ["theme"]);
183
+ transformedStyleArg = function transformedStyleArg(_ref4) {
184
+ var themeInput = _ref4.theme,
185
+ other = _objectWithoutProperties(_ref4, ["theme"]);
177
186
 
178
187
  return styleArg(_extends({
179
188
  theme: isEmpty(themeInput) ? defaultTheme : themeInput
@@ -200,6 +209,10 @@ export default function createStyled() {
200
209
  return Component;
201
210
  };
202
211
 
212
+ if (defaultStyledResolver.withConfig) {
213
+ muiStyledResolver.withConfig = defaultStyledResolver.withConfig;
214
+ }
215
+
203
216
  return muiStyledResolver;
204
217
  };
205
218
  }
@@ -13,6 +13,7 @@ import cssVarsParser from './cssVarsParser';
13
13
  import ThemeProvider from '../ThemeProvider';
14
14
  import getInitColorSchemeScript, { DEFAULT_ATTRIBUTE, DEFAULT_MODE_STORAGE_KEY } from './getInitColorSchemeScript';
15
15
  import useCurrentColorScheme from './useCurrentColorScheme';
16
+ import createGetCssVar from './createGetCssVar';
16
17
  import { jsx as _jsx } from "react/jsx-runtime";
17
18
  import { jsxs as _jsxs } from "react/jsx-runtime";
18
19
  export var DISABLE_CSS_TRANSITION = '*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}';
@@ -132,7 +133,8 @@ export default function createCssVarsProvider(options) {
132
133
  colorSchemes: colorSchemes,
133
134
  vars: rootVars,
134
135
  spacing: themeProp.spacing ? createSpacing(themeProp.spacing) : systemSpacing,
135
- breakpoints: themeProp.breakpoints ? createBreakpoints(themeProp.breakpoints) : systemBreakpoints
136
+ breakpoints: themeProp.breakpoints ? createBreakpoints(themeProp.breakpoints) : systemBreakpoints,
137
+ getCssVar: createGetCssVar(prefix)
136
138
  });
137
139
  var styleSheet = {};
138
140
  Object.entries(colorSchemes).forEach(function (_ref2) {
@@ -0,0 +1,32 @@
1
+ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
2
+
3
+ /**
4
+ * The benefit of this function is to help developers get CSS var from theme without specifying the whole variable
5
+ * and they does not need to remember the prefix (defined once).
6
+ */
7
+ export default function createGetCssVar() {
8
+ var prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
9
+
10
+ function appendVar() {
11
+ for (var _len = arguments.length, vars = new Array(_len), _key = 0; _key < _len; _key++) {
12
+ vars[_key] = arguments[_key];
13
+ }
14
+
15
+ if (!vars.length) {
16
+ return '';
17
+ }
18
+
19
+ return ", var(--".concat(prefix ? "".concat(prefix, "-") : '').concat(vars[0]).concat(appendVar.apply(void 0, _toConsumableArray(vars.slice(1))), ")");
20
+ } // AdditionalVars makes `getCssVar` less strict, so it can be use like this `getCssVar('non-mui-variable')` without type error.
21
+
22
+
23
+ var getCssVar = function getCssVar(field) {
24
+ for (var _len2 = arguments.length, vars = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
25
+ vars[_key2 - 1] = arguments[_key2];
26
+ }
27
+
28
+ return "var(--".concat(prefix ? "".concat(prefix, "-") : '').concat(field).concat(appendVar.apply(void 0, vars), ")");
29
+ };
30
+
31
+ return getCssVar;
32
+ }
package/legacy/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.2.5
1
+ /** @license MUI v5.4.0
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -43,4 +43,5 @@ export { default as useTheme } from './useTheme';
43
43
  export { default as useThemeWithoutDefault } from './useThemeWithoutDefault';
44
44
  export * from './colorManipulator';
45
45
  export { default as ThemeProvider } from './ThemeProvider';
46
- export { default as unstable_createCssVarsProvider } from './cssVars/createCssVarsProvider';
46
+ export { default as unstable_createCssVarsProvider } from './cssVars/createCssVarsProvider';
47
+ export { default as unstable_createGetCssVar } from './cssVars/createGetCssVar';
@@ -19,6 +19,9 @@ export var fontWeight = style({
19
19
  export var letterSpacing = style({
20
20
  prop: 'letterSpacing'
21
21
  });
22
+ export var textTransform = style({
23
+ prop: 'textTransform'
24
+ });
22
25
  export var lineHeight = style({
23
26
  prop: 'lineHeight'
24
27
  });
@@ -30,5 +33,5 @@ export var typographyVariant = style({
30
33
  cssProperty: false,
31
34
  themeKey: 'typography'
32
35
  });
33
- var typography = compose(typographyVariant, fontFamily, fontSize, fontStyle, fontWeight, letterSpacing, lineHeight, textAlign);
36
+ var typography = compose(typographyVariant, fontFamily, fontSize, fontStyle, fontWeight, letterSpacing, lineHeight, textAlign, textTransform);
34
37
  export default typography;
@@ -136,7 +136,11 @@ export default function createStyled(input = {}) {
136
136
  const styleOverrides = getStyleOverrides(componentName, theme);
137
137
 
138
138
  if (styleOverrides) {
139
- return overridesResolver(props, styleOverrides);
139
+ const resolvedStyleOverrides = {};
140
+ Object.entries(styleOverrides).forEach(([slotKey, slotStyle]) => {
141
+ resolvedStyleOverrides[slotKey] = typeof slotStyle === 'function' ? slotStyle(props) : slotStyle;
142
+ });
143
+ return overridesResolver(props, resolvedStyleOverrides);
140
144
  }
141
145
 
142
146
  return null;
@@ -199,6 +203,10 @@ export default function createStyled(input = {}) {
199
203
  return Component;
200
204
  };
201
205
 
206
+ if (defaultStyledResolver.withConfig) {
207
+ muiStyledResolver.withConfig = defaultStyledResolver.withConfig;
208
+ }
209
+
202
210
  return muiStyledResolver;
203
211
  };
204
212
  }
@@ -14,6 +14,7 @@ import cssVarsParser from './cssVarsParser';
14
14
  import ThemeProvider from '../ThemeProvider';
15
15
  import getInitColorSchemeScript, { DEFAULT_ATTRIBUTE, DEFAULT_MODE_STORAGE_KEY } from './getInitColorSchemeScript';
16
16
  import useCurrentColorScheme from './useCurrentColorScheme';
17
+ import createGetCssVar from './createGetCssVar';
17
18
  import { jsx as _jsx } from "react/jsx-runtime";
18
19
  import { jsxs as _jsxs } from "react/jsx-runtime";
19
20
  export const DISABLE_CSS_TRANSITION = '*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}';
@@ -124,7 +125,8 @@ export default function createCssVarsProvider(options) {
124
125
  colorSchemes,
125
126
  vars: rootVars,
126
127
  spacing: themeProp.spacing ? createSpacing(themeProp.spacing) : systemSpacing,
127
- breakpoints: themeProp.breakpoints ? createBreakpoints(themeProp.breakpoints) : systemBreakpoints
128
+ breakpoints: themeProp.breakpoints ? createBreakpoints(themeProp.breakpoints) : systemBreakpoints,
129
+ getCssVar: createGetCssVar(prefix)
128
130
  });
129
131
  const styleSheet = {};
130
132
  Object.entries(colorSchemes).forEach(([key, scheme]) => {
@@ -0,0 +1,20 @@
1
+ /**
2
+ * The benefit of this function is to help developers get CSS var from theme without specifying the whole variable
3
+ * and they does not need to remember the prefix (defined once).
4
+ */
5
+ export default function createGetCssVar(prefix = '') {
6
+ function appendVar(...vars) {
7
+ if (!vars.length) {
8
+ return '';
9
+ }
10
+
11
+ return `, var(--${prefix ? `${prefix}-` : ''}${vars[0]}${appendVar(...vars.slice(1))})`;
12
+ } // AdditionalVars makes `getCssVar` less strict, so it can be use like this `getCssVar('non-mui-variable')` without type error.
13
+
14
+
15
+ const getCssVar = (field, ...vars) => {
16
+ return `var(--${prefix ? `${prefix}-` : ''}${field}${appendVar(...vars)})`;
17
+ };
18
+
19
+ return getCssVar;
20
+ }
package/modern/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.2.5
1
+ /** @license MUI v5.4.0
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -43,4 +43,5 @@ export { default as useTheme } from './useTheme';
43
43
  export { default as useThemeWithoutDefault } from './useThemeWithoutDefault';
44
44
  export * from './colorManipulator';
45
45
  export { default as ThemeProvider } from './ThemeProvider';
46
- export { default as unstable_createCssVarsProvider } from './cssVars/createCssVarsProvider';
46
+ export { default as unstable_createCssVarsProvider } from './cssVars/createCssVarsProvider';
47
+ export { default as unstable_createGetCssVar } from './cssVars/createGetCssVar';
@@ -19,6 +19,9 @@ export const fontWeight = style({
19
19
  export const letterSpacing = style({
20
20
  prop: 'letterSpacing'
21
21
  });
22
+ export const textTransform = style({
23
+ prop: 'textTransform'
24
+ });
22
25
  export const lineHeight = style({
23
26
  prop: 'lineHeight'
24
27
  });
@@ -30,5 +33,5 @@ export const typographyVariant = style({
30
33
  cssProperty: false,
31
34
  themeKey: 'typography'
32
35
  });
33
- const typography = compose(typographyVariant, fontFamily, fontSize, fontStyle, fontWeight, letterSpacing, lineHeight, textAlign);
36
+ const typography = compose(typographyVariant, fontFamily, fontSize, fontStyle, fontWeight, letterSpacing, lineHeight, textAlign, textTransform);
34
37
  export default typography;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/system",
3
- "version": "5.2.5",
3
+ "version": "5.4.0",
4
4
  "private": false,
5
5
  "author": "MUI Team",
6
6
  "description": "CSS utilities for rapidly laying out custom designs.",
@@ -29,7 +29,7 @@
29
29
  "@emotion/react": "^11.5.0",
30
30
  "@emotion/styled": "^11.3.0",
31
31
  "@types/react": "^16.8.6 || ^17.0.0",
32
- "react": "^17.0.2"
32
+ "react": "^17.0.0"
33
33
  },
34
34
  "peerDependenciesMeta": {
35
35
  "@types/react": {
@@ -43,11 +43,11 @@
43
43
  }
44
44
  },
45
45
  "dependencies": {
46
- "@babel/runtime": "^7.16.3",
47
- "@mui/private-theming": "^5.2.3",
48
- "@mui/styled-engine": "^5.2.5",
46
+ "@babel/runtime": "^7.16.7",
47
+ "@mui/private-theming": "^5.3.0",
48
+ "@mui/styled-engine": "^5.3.0",
49
49
  "@mui/types": "^7.1.0",
50
- "@mui/utils": "^5.2.3",
50
+ "@mui/utils": "^5.3.0",
51
51
  "clsx": "^1.1.1",
52
52
  "csstype": "^3.0.10",
53
53
  "prop-types": "^15.7.2"
@@ -49,6 +49,7 @@ export type SystemStyleObject<Theme extends object = {}> =
49
49
  | SystemCssProperties<Theme>
50
50
  | CSSPseudoSelectorProps<Theme>
51
51
  | CSSSelectorObject<Theme>
52
+ | { [cssVariable: string]: string | number }
52
53
  | null;
53
54
 
54
55
  /**
package/typography.js CHANGED
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.typographyVariant = exports.textAlign = exports.lineHeight = exports.letterSpacing = exports.fontWeight = exports.fontStyle = exports.fontSize = exports.fontFamily = exports.default = void 0;
8
+ exports.typographyVariant = exports.textTransform = exports.textAlign = exports.lineHeight = exports.letterSpacing = exports.fontWeight = exports.fontStyle = exports.fontSize = exports.fontFamily = exports.default = void 0;
9
9
 
10
10
  var _style = _interopRequireDefault(require("./style"));
11
11
 
@@ -35,6 +35,10 @@ const letterSpacing = (0, _style.default)({
35
35
  prop: 'letterSpacing'
36
36
  });
37
37
  exports.letterSpacing = letterSpacing;
38
+ const textTransform = (0, _style.default)({
39
+ prop: 'textTransform'
40
+ });
41
+ exports.textTransform = textTransform;
38
42
  const lineHeight = (0, _style.default)({
39
43
  prop: 'lineHeight'
40
44
  });
@@ -49,6 +53,6 @@ const typographyVariant = (0, _style.default)({
49
53
  themeKey: 'typography'
50
54
  });
51
55
  exports.typographyVariant = typographyVariant;
52
- const typography = (0, _compose.default)(typographyVariant, fontFamily, fontSize, fontStyle, fontWeight, letterSpacing, lineHeight, textAlign);
56
+ const typography = (0, _compose.default)(typographyVariant, fontFamily, fontSize, fontStyle, fontWeight, letterSpacing, lineHeight, textAlign, textTransform);
53
57
  var _default = typography;
54
58
  exports.default = _default;