@mui/system 5.11.15 → 5.12.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/CHANGELOG.md +139 -26
- package/GlobalStyles/GlobalStyles.d.ts +13 -0
- package/GlobalStyles/GlobalStyles.js +45 -0
- package/GlobalStyles/index.d.ts +2 -0
- package/GlobalStyles/index.js +26 -0
- package/GlobalStyles/package.json +6 -0
- package/ThemeProvider/ThemeProvider.d.ts +4 -0
- package/ThemeProvider/ThemeProvider.js +43 -17
- package/createBox.d.ts +1 -0
- package/createBox.js +2 -1
- package/createStyled.d.ts +1 -0
- package/createStyled.js +34 -24
- package/cssVars/createCssVarsProvider.d.ts +22 -7
- package/cssVars/createCssVarsProvider.js +7 -3
- package/esm/GlobalStyles/GlobalStyles.js +35 -0
- package/esm/GlobalStyles/index.js +2 -0
- package/esm/ThemeProvider/ThemeProvider.js +44 -18
- package/esm/createBox.js +2 -1
- package/esm/createStyled.js +34 -24
- package/esm/cssVars/createCssVarsProvider.js +7 -3
- package/esm/index.js +2 -1
- package/esm/useThemeProps/useThemeProps.js +6 -2
- package/esm/useThemeWithoutDefault.js +3 -2
- package/index.d.ts +2 -2
- package/index.js +4 -3
- package/legacy/GlobalStyles/GlobalStyles.js +35 -0
- package/legacy/GlobalStyles/index.js +2 -0
- package/legacy/ThemeProvider/ThemeProvider.js +44 -19
- package/legacy/createBox.js +3 -2
- package/legacy/createStyled.js +34 -17
- package/legacy/cssVars/createCssVarsProvider.js +18 -14
- package/legacy/index.js +3 -2
- package/legacy/useThemeProps/useThemeProps.js +5 -1
- package/legacy/useThemeWithoutDefault.js +3 -2
- package/modern/GlobalStyles/GlobalStyles.js +35 -0
- package/modern/GlobalStyles/index.js +2 -0
- package/modern/ThemeProvider/ThemeProvider.js +44 -18
- package/modern/createBox.js +2 -1
- package/modern/createStyled.js +34 -24
- package/modern/cssVars/createCssVarsProvider.js +7 -3
- package/modern/index.js +3 -2
- package/modern/useThemeProps/useThemeProps.js +6 -2
- package/modern/useThemeWithoutDefault.js +3 -2
- package/package.json +6 -6
- package/useThemeProps/useThemeProps.d.ts +6 -1
- package/useThemeProps/useThemeProps.js +6 -2
- package/useThemeWithoutDefault.js +5 -2
- package/Box/Box.spec.d.ts +0 -1
- package/createBox.spec.d.ts +0 -1
- package/cssVars/createCssVarsProvider.spec.d.ts +0 -1
- package/index.spec.d.ts +0 -1
- package/styleFunctionSx/styleFunctionSx.spec.d.ts +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,118 @@
|
|
|
1
1
|
# [Versions](https://mui.com/versions/)
|
|
2
2
|
|
|
3
|
+
## 5.12.0
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v5.11.16..master -->
|
|
6
|
+
|
|
7
|
+
_Apr 11, 2023_
|
|
8
|
+
|
|
9
|
+
A big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
|
|
10
|
+
|
|
11
|
+
- 💫 Added [theme scope](https://mui.com/material-ui/guides/styled-engine/#theme-scoping) for using multiple design systems (#36664) @siriwatknp
|
|
12
|
+
- 🐛 bug fixes and 📚 documentation improvements.
|
|
13
|
+
|
|
14
|
+
### `@mui/system@5.12.0`
|
|
15
|
+
|
|
16
|
+
- ​<!-- 05 -->[system] Introduce theme scope for using multiple design systems (#36664) @siriwatknp
|
|
17
|
+
|
|
18
|
+
### `@mui/base@5.0.0-alpha.125`
|
|
19
|
+
|
|
20
|
+
- ​<!-- 06 -->[PopperUnstyled] Do not merge internal `ownerState` with `ownerState` from props (#36599) @hbjORbj
|
|
21
|
+
|
|
22
|
+
### `@mui/joy@5.0.0-alpha.75`
|
|
23
|
+
|
|
24
|
+
- ​<!-- 08 -->[Joy] Add tests for slots/slotProps for all components (#36828) @hbjORbj
|
|
25
|
+
- ​<!-- 07 -->[Joy] Support `slots`/`slotsProps` for every component (components with only root slot too) (#36540) @hbjORbj
|
|
26
|
+
|
|
27
|
+
### Docs
|
|
28
|
+
|
|
29
|
+
- ​<!-- 23 -->[docs][Backdrop] Improvements to the docs (#34244) @alirezahekmati
|
|
30
|
+
- ​<!-- 20 -->[docs] Fix base API redirects (#36833) @mnajdova
|
|
31
|
+
- ​<!-- 19 -->[docs] Improve perf on tab APIs (#36832) @mnajdova
|
|
32
|
+
- ​<!-- 18 -->[docs] Revert CircularProgress component text to be proper noun instead (#36837) @ZeeshanTamboli
|
|
33
|
+
- ​<!-- 17 -->[docs] Simplify language redirection @oliviertassinari
|
|
34
|
+
- ​<!-- 16 -->[docs] Add missing `readOnly` state class in the list (#36788) @ZeeshanTamboli
|
|
35
|
+
- ​<!-- 15 -->[docs] Improve side nav scroll into view (#36732) @oliviertassinari
|
|
36
|
+
- ​<!-- 14 -->[docs][base & joy] Display "Classes" Section in API docs (#36589) @hbjORbj
|
|
37
|
+
- ​<!-- 13 -->[docs] Fix 100+ typos throughout the Material UI docs (#36194) @Lioness100
|
|
38
|
+
- ​<!-- 12 -->[docs] Change "coming soon" chip color (#36786) @danilo-leal
|
|
39
|
+
- ​<!-- 11 -->[docs][Joy] Fix wrong prop descriptions (#36826) @hbjORbj
|
|
40
|
+
- ​<!-- 10 -->[docs][material] Highlight global state classes in CSS table in API docs (#36633) @hbjORbj
|
|
41
|
+
- ​<!-- 09 -->[examples] Fix `SliderUnstyled` slots `key` name (#36830) @sai6855
|
|
42
|
+
- ​<!-- 04 -->[Tabs] Improve useTab() API page (#36725) @oliviertassinari
|
|
43
|
+
|
|
44
|
+
### Core
|
|
45
|
+
|
|
46
|
+
- ​<!-- 22 -->[core] Increase margin to scroll @oliviertassinari
|
|
47
|
+
- ​<!-- 21 -->[core] Replace MUI Base with Base UI (#36716) @mnajdova
|
|
48
|
+
- ​<!-- 03 -->[website] Fix broken career website links @oliviertassinari
|
|
49
|
+
- ​<!-- 02 -->[website] Fix backlinks to homepage (#36801) @oliviertassinari
|
|
50
|
+
- ​<!-- 01 -->[website] Tweaks to the Designer position ad (#36771) @danilo-leal
|
|
51
|
+
|
|
52
|
+
All contributors of this release in alphabetical order: @alirezahekmati, @danilo-leal, @hbjORbj, @Lioness100, @mnajdova, @oliviertassinari, @sai6855, @siriwatknp, @ZeeshanTamboli
|
|
53
|
+
|
|
54
|
+
## 5.11.16
|
|
55
|
+
|
|
56
|
+
<!-- generated comparing v5.11.15..master -->
|
|
57
|
+
|
|
58
|
+
_Apr 4, 2023_
|
|
59
|
+
|
|
60
|
+
A big thanks to the 17 contributors who made this release possible. Here are some highlights ✨:
|
|
61
|
+
|
|
62
|
+
- 💅 Added tabs on API pages of Base UI to switch between component and hook references (#35938) @mnajdova
|
|
63
|
+
- 🐛 bug fixes and 📚 documentation improvements.
|
|
64
|
+
|
|
65
|
+
### `@mui/material@5.11.16`
|
|
66
|
+
|
|
67
|
+
- [Autocomplete] Listen for click on the root element (#36369) @sai6855
|
|
68
|
+
- [Autocomplete] Fix navigation issue on mouse hover (#35196) @sai6855
|
|
69
|
+
- [Card] Fix Card focus effect overflowing parent card (#36329) @mj12albert
|
|
70
|
+
- [Grid] Missing slot (#36765) @siriwatknp
|
|
71
|
+
- [Select] Make error part of the `ownerState` to enable overriding styles with it in theme (#36422) @gitstart
|
|
72
|
+
- [Slider] Fix ValueLabel UI issues comes when size="small" and orientation="vertical (#36738) @yushanwebdev
|
|
73
|
+
|
|
74
|
+
### `@mui/icons-material@5.11.16`
|
|
75
|
+
|
|
76
|
+
- [icons] Do not ignore popular icons (#36608) @michaldudak
|
|
77
|
+
|
|
78
|
+
### `@mui/joy@5.0.0-alpha.74`
|
|
79
|
+
|
|
80
|
+
- [Joy] Add `ModalOverflow` component (#36262) @siriwatknp
|
|
81
|
+
- [Joy] Fix `Checkbox` custom color prop type warning (#36691) @amal-qb
|
|
82
|
+
|
|
83
|
+
### Docs
|
|
84
|
+
|
|
85
|
+
- [docs][base] Add return type for `useFormControlUnstyledContext` hook (#36302) @HeVictor
|
|
86
|
+
- [docs][base] Move styles to the bottom of demos code for `FormControl` (#36579) @gitstart
|
|
87
|
+
- [docs][base] Move styles to the bottom of demos code for `Menu` (#36582) @gitstart
|
|
88
|
+
- [docs][base] Move styles code to bottom in the `Button` demos (#36590) @sai6855
|
|
89
|
+
- [docs][base] Show components & hooks API on the components page (#35938) @mnajdova
|
|
90
|
+
- [docs] Describe slotProps in MUI Base customization doc (#36206) @michaldudak
|
|
91
|
+
- [docs] Fix double API page redirection (#36743) @oliviertassinari
|
|
92
|
+
- [docs] Remove hash property and leverage pathname (#36764) @siriwatknp
|
|
93
|
+
- [docs] Introduce markdown permalink to source (#36729) @oliviertassinari
|
|
94
|
+
- [docs] Tabs API add slots section (#36769) @mnajdova
|
|
95
|
+
- [docs] Update feedbacks management on slack (#36705) @alexfauquette
|
|
96
|
+
- [docs] Fix Joy UI URL to tokens (#36742) @oliviertassinari
|
|
97
|
+
- [docs] Add toggle-button coming soon page (#36618) @siriwatknp
|
|
98
|
+
- [docs] Fix typo on the Joy UI theme builder (#36734) @danilo-leal
|
|
99
|
+
- [docs] Fix small typo (#36727) @RBerthier
|
|
100
|
+
- [docs] Fix Joy UI template broken image loading @oliviertassinari
|
|
101
|
+
- [docs] Hide the default API column if it's empty (#36715) @mnajdova
|
|
102
|
+
- [docs] Update Material UI Related Projects page (#34203) @viclafouch
|
|
103
|
+
- [docs] Revise Joy UI "Circular Progress" page (#36126) @LadyBluenotes
|
|
104
|
+
- [docs] Revise Joy UI "Radio" page (#35893) @DevinCLane
|
|
105
|
+
- [docs] Support Google Analytics 4 (#36123) @alexfauquette
|
|
106
|
+
- [docs][material] Keep consistency in description of classes (#36631) @hbjORbj
|
|
107
|
+
- [docs] Remove redundant files and fix regression (#36775) @ZeeshanTamboli
|
|
108
|
+
|
|
109
|
+
### Core
|
|
110
|
+
|
|
111
|
+
- [blog] Compress images @oliviertassinari
|
|
112
|
+
- [core] Remove unused token (#36722) @oliviertassinari
|
|
113
|
+
|
|
114
|
+
All contributors of this release in alphabetical order: @alexfauquette, @amal-qb, @danilo-leal, @DevinCLane, @gitstart, @hbjORbj, @HeVictor, @LadyBluenotes, @michaldudak, @mj12albert, @mnajdova, @oliviertassinari, @RBerthier, @sai6855, @siriwatknp, @viclafouch, @yushanwebdev
|
|
115
|
+
|
|
3
116
|
## 5.11.15
|
|
4
117
|
|
|
5
118
|
<!-- generated comparing v5.11.14..master -->
|
|
@@ -128,12 +241,12 @@ _Mar 14, 2023_
|
|
|
128
241
|
|
|
129
242
|
A big thanks to the 13 contributors who made this release possible. Here are some highlights ✨:
|
|
130
243
|
|
|
131
|
-
- @michaldudak added an option for [disabling the generation](https://mui.com/base/getting-started/customization/#disabling-default-css-classes) of the default classes in
|
|
244
|
+
- @michaldudak added an option for [disabling the generation](https://mui.com/base/getting-started/customization/#disabling-default-css-classes) of the default classes in Base UI (#35963)
|
|
132
245
|
- other 🐛 bug fixes and 📚 documentation improvements.
|
|
133
246
|
|
|
134
247
|
### `@mui/material@5.11.13`
|
|
135
248
|
|
|
136
|
-
- ​<!-- 13 -->[core] Bump
|
|
249
|
+
- ​<!-- 13 -->[core] Bump Base UI's version in Material UI (#36492) @hbjORbj
|
|
137
250
|
- ​<!-- 17 -->[material] Export `shouldSkipGeneratingVar` from Material UI (#36489) @siriwatknp
|
|
138
251
|
- ​<!-- 06 -->[Typography] Apply font properties to typography inherit variant (#33621) @oyar99
|
|
139
252
|
|
|
@@ -283,7 +396,7 @@ A big thanks to the 17 contributors who made this release possible. Here are som
|
|
|
283
396
|
- ​<!-- 23 -->[docs] Add instructions for deploying docs without a release (#36301) @cherniavskii
|
|
284
397
|
- ​<!-- 22 -->[docs] Fix 301 redirections on the docs @oliviertassinari
|
|
285
398
|
- ​<!-- 21 -->[docs] Update MUI X banner to reflect stable release (#36354) @MBilalShafi
|
|
286
|
-
- ​<!-- 20 -->[docs] Clarify the future plan for integrating
|
|
399
|
+
- ​<!-- 20 -->[docs] Clarify the future plan for integrating Base UI in Material UI (#36365) @mnajdova
|
|
287
400
|
- ​<!-- 19 -->[docs] Improve visual look of loose lists (#36190) @oliviertassinari
|
|
288
401
|
- ​<!-- 18 -->[docs] Fix @mui/styles example links (#36331) @oliviertassinari
|
|
289
402
|
- ​<!-- 17 -->[docs][joy] Build TS versions for List component demos (#36382) @sai6855
|
|
@@ -313,7 +426,7 @@ _Feb 27, 2023_
|
|
|
313
426
|
|
|
314
427
|
A big thanks to the 15 contributors who made this release possible. Here are some highlights ✨:
|
|
315
428
|
|
|
316
|
-
- 📚 added API documentation for the slots in
|
|
429
|
+
- 📚 added API documentation for the slots in Base UI and Joy UI by @hbjORbj, for e.g. [SliderUnstyled API](https://mui.com/base/api/slider-unstyled/#slots)
|
|
317
430
|
- other 🐛 bug fixes and 📚 documentation improvements.
|
|
318
431
|
|
|
319
432
|
### `@mui/material@5.11.11`
|
|
@@ -550,7 +663,7 @@ A big thanks to the 14 contributors who made this release possible. Here are som
|
|
|
550
663
|
- ​<!-- 16 -->[docs] Improve inline preview's information (#35974) @oliviertassinari
|
|
551
664
|
- ​<!-- 15 -->[docs] Fix wrong v5 migration instructions (#36022) @oliviertassinari
|
|
552
665
|
- ​<!-- 14 -->[docs] Fix autocomplete render group key warning in the demo (#36025) @chuanyu0201
|
|
553
|
-
- ​<!-- 13 -->[docs] Add hooks API pages for
|
|
666
|
+
- ​<!-- 13 -->[docs] Add hooks API pages for Base UI (#35828) @mnajdova
|
|
554
667
|
- ​<!-- 12 -->[docs] Fix grammar typo (#36016) @alexownejazayeri
|
|
555
668
|
- ​<!-- 11 -->[docs][joy] Add JSDoc for the `AutocompleteProps` type (#36039) @ArthurPedroti
|
|
556
669
|
|
|
@@ -766,7 +879,7 @@ This release was mostly about 🐛 bug fixes and 📚 documentation improvements
|
|
|
766
879
|
|
|
767
880
|
- [docs] Improve pickers lab migration stressing `mui-x` usage (#35740) @LukasTy
|
|
768
881
|
- [docs] Fix incorrectly named AccessibleTable demo component (#35832) @HeVictor
|
|
769
|
-
- [docs] Clarify where to find docs for
|
|
882
|
+
- [docs] Clarify where to find docs for Base UI components in Material UI (#35799) @samuelsycamore
|
|
770
883
|
- [docs] Fix typos (#35814) @alexfauquette
|
|
771
884
|
- [docs] Revise and expand the Joy UI Card page (#35745) @samuelsycamore
|
|
772
885
|
- [docs] Fix navigation layout shift (#35679) @oliviertassinari
|
|
@@ -877,7 +990,7 @@ _Dec 26, 2022_
|
|
|
877
990
|
|
|
878
991
|
A big thanks to the 20 contributors who made this release possible. Here are some highlights ✨:
|
|
879
992
|
|
|
880
|
-
- ⚙️ Several
|
|
993
|
+
- ⚙️ Several Base UI components were converted to TypeScript by @trizotti, @leventdeniz and @danhuynhdev (#35005, #34793, #34771)
|
|
881
994
|
- Many other 🐛 bug fixes abd 📚 documentation improvements.
|
|
882
995
|
|
|
883
996
|
### `@mui/material@5.11.2`
|
|
@@ -1054,7 +1167,7 @@ A big thanks to the 19 contributors who made this release possible. Here are som
|
|
|
1054
1167
|
- [docs] Refactor `ToggleButtonSizes` demo (#35375) @Armanio
|
|
1055
1168
|
- [docs] Standardize the usage of callouts in the MUI Core docs (#35361) @samuelsycamore
|
|
1056
1169
|
- [docs] Format feedback to add a link to the commented section (#35381) @alexfauquette
|
|
1057
|
-
- [docs] Direct users from Material UI to
|
|
1170
|
+
- [docs] Direct users from Material UI to Base UI for duplicated components (#35293) @samuelsycamore
|
|
1058
1171
|
- [docs] Fix typo in FormControl API docs (#35449) @Spanishiwa
|
|
1059
1172
|
- [docs] Update callouts design (#35390) @danilo-leal
|
|
1060
1173
|
- [website] New wave of open roles (#35240) @mnajdova
|
|
@@ -1129,7 +1242,7 @@ A big thanks to the 15 contributors who made this release possible. Here are som
|
|
|
1129
1242
|
- ​<!-- 14 -->[docs] Improve the autogenerated "Unstyled" and "API" text (#35185) @samuelsycamore
|
|
1130
1243
|
- ​<!-- 13 -->[docs] Fix ad margin on API pages (#35201) @oliviertassinari
|
|
1131
1244
|
- ​<!-- 12 -->[docs] Revise and expand the Joy UI "Badge" page (#35199) @samuelsycamore
|
|
1132
|
-
- ​<!-- 11 -->[docs] Update
|
|
1245
|
+
- ​<!-- 11 -->[docs] Update Base UI docs with latest style conventions (#35034) @samuelsycamore
|
|
1133
1246
|
- ​<!-- 09 -->[l10n] Improve Chinese (Taiwan) zh-TW locale (#35328) @happyincent
|
|
1134
1247
|
- ​<!-- 02 -->[website] Update MUI stats: GitHub stars, Twitter followers, etc. (#35318) @nomandhoni-cs
|
|
1135
1248
|
|
|
@@ -1462,7 +1575,7 @@ _Oct 25, 2022_
|
|
|
1462
1575
|
|
|
1463
1576
|
A big thanks to the 10 contributors who made this release possible. Here are some highlights ✨:
|
|
1464
1577
|
|
|
1465
|
-
- 🔧 Moved `components` to `slots` prop starting at
|
|
1578
|
+
- 🔧 Moved `components` to `slots` prop starting at Base UI to create consistency across products
|
|
1466
1579
|
- Many other 🐛 bug fixes, 📚 documentation, and ⚙️ infrastructure improvements
|
|
1467
1580
|
|
|
1468
1581
|
### `@mui/material@5.10.11`
|
|
@@ -1544,7 +1657,7 @@ A big thanks to the 21 contributors who made this release possible. Here are som
|
|
|
1544
1657
|
|
|
1545
1658
|
- 🖌 Thanks to the efforts of @bharatkashyap and @nihgwu, we now have editable demos across our docs (#34454)!
|
|
1546
1659
|
- 🚀 The Tooltip component has been added to Joy UI by @hbjORbj (#34509).
|
|
1547
|
-
- ⚙️ We started converting the remaining JS components in
|
|
1660
|
+
- ⚙️ We started converting the remaining JS components in Base UI to TypeScript.
|
|
1548
1661
|
@mbayucot finished the first PR with the conversion of the NoSsr code (#34735).
|
|
1549
1662
|
- And more 🐛 bug fixes and 📚 documentation improvements.
|
|
1550
1663
|
|
|
@@ -1675,7 +1788,7 @@ _Oct 3, 2022_
|
|
|
1675
1788
|
|
|
1676
1789
|
A big thanks to the 18 contributors who made this release possible. Here are some highlights ✨:
|
|
1677
1790
|
|
|
1678
|
-
- 🚀 [SnackbarUnstyled](https://mui.com/base/react-snackbar/) component & headless hook are added to
|
|
1791
|
+
- 🚀 [SnackbarUnstyled](https://mui.com/base/react-snackbar/) component & headless hook are added to Base UI (#33227) @ZeeshanTamboli
|
|
1679
1792
|
- 📚 [CSS variables documentation](https://mui.com/material-ui/experimental-api/css-theme-variables/overview/) for Material UI has been added by @siriwatknp (#33958)
|
|
1680
1793
|
- And more 🐛 bug fixes and 📚 documentation improvements.
|
|
1681
1794
|
|
|
@@ -1777,7 +1890,7 @@ A big thanks to the 21 contributors who made this release possible. Here are som
|
|
|
1777
1890
|
|
|
1778
1891
|
### Docs
|
|
1779
1892
|
|
|
1780
|
-
- [blog]
|
|
1893
|
+
- [blog] Base UI announcement typo fixed (#34409) @prakhargupta1
|
|
1781
1894
|
- [blog] Fix typo in date-pickers v5 stable (#34386) @alexfauquette
|
|
1782
1895
|
- [blog] Update date on date pickers v5 release blog post (#34406) @joserodolfofreitas
|
|
1783
1896
|
- [docs] Update `useMenu` and `useMenuItem` hooks demo (#34166) @ZeeshanTamboli
|
|
@@ -1863,7 +1976,7 @@ This release was mostly about 🐛 bug fixes and 📚 documentation improvements
|
|
|
1863
1976
|
- [docs] Fix 301 link to external projects @oliviertassinari
|
|
1864
1977
|
- [docs] Move 12 component names to Title Case (#34188) @oliviertassinari
|
|
1865
1978
|
- [docs] Fix broken links (#34320) @alexfauquette
|
|
1866
|
-
- [docs] Add notification for
|
|
1979
|
+
- [docs] Add notification for Base UI announcement post (#34295) @samuelsycamore
|
|
1867
1980
|
- [website] Fix MUI X subscribe email border style (#34330) @oliviertassinari
|
|
1868
1981
|
- [website] Improve security header @oliviertassinari
|
|
1869
1982
|
|
|
@@ -1884,7 +1997,7 @@ _Sep 12, 2022_
|
|
|
1884
1997
|
|
|
1885
1998
|
A big thanks to the 12 contributors who made this release possible. Here are some highlights ✨:
|
|
1886
1999
|
|
|
1887
|
-
- 🚀 [Blog post](https://mui.com/blog/introducing-mui-base/) for announcing the release of the
|
|
2000
|
+
- 🚀 [Blog post](https://mui.com/blog/introducing-mui-base/) for announcing the release of the Base UI package is out thanks to @michaldudak.
|
|
1888
2001
|
- 🚀 Added [`Alert`](https://mui.com/joy-ui/react-alert/), [`Modal`](https://mui.com/joy-ui/react-modal/), [`ListSubheader`](https://mui.com/joy-ui/react-list-subheader/), [`FormControl`](https://mui.com/joy-ui/react-form-control/), [`CircularProgress`](https://mui.com/joy-ui/react-circular-progress/) components to Joy UI (#33859) @hbjORbj @siriwatknp
|
|
1889
2002
|
- And more 🐛 bug fixes and 📚 documentation improvements.
|
|
1890
2003
|
|
|
@@ -1907,7 +2020,7 @@ A big thanks to the 12 contributors who made this release possible. Here are som
|
|
|
1907
2020
|
|
|
1908
2021
|
### Docs
|
|
1909
2022
|
|
|
1910
|
-
- ​<!-- 16 -->[blog] Introducing
|
|
2023
|
+
- ​<!-- 16 -->[blog] Introducing Base UI (#33778) @michaldudak
|
|
1911
2024
|
- ​<!-- 13 -->[docs] Fix spelling error (#34209) @ChrystianDeMatos
|
|
1912
2025
|
- ​<!-- 12 -->[docs] Improve link to the security policy (#34219) @oliviertassinari
|
|
1913
2026
|
- ​<!-- 11 -->[docs] Fix typo in Joy UI's `Usage` docs (#34200) @zillion504
|
|
@@ -2462,7 +2575,7 @@ A big thanks to the 19 contributors who made this release possible. Here are som
|
|
|
2462
2575
|
- [docs] Add "refine" demo to showcase (#33240) @omeraplak
|
|
2463
2576
|
- [docs] Add webpack alias for legacy utils package (#33376) @jgbae
|
|
2464
2577
|
- [docs] Improve external link icons synonyms (#33257) @davidgarciab
|
|
2465
|
-
- [examples] Update
|
|
2578
|
+
- [examples] Update Base UI with Tailwind CSS to use the latest versions of the dependencies (#33401) @mnajdova
|
|
2466
2579
|
- [examples] Add MUI base example (#33154) @siriwatknp
|
|
2467
2580
|
|
|
2468
2581
|
### Core
|
|
@@ -2636,7 +2749,7 @@ A big thanks to the 14 contributors who made this release possible. Here are som
|
|
|
2636
2749
|
- ​<!-- 28 -->[blog] Update Blogpost to clear confusion on "no impact" disclaimer. (#33131) @joserodolfofreitas
|
|
2637
2750
|
- ​<!-- 27 -->[blog] Add post about v5 Migration guide update (#33063) @samuelsycamore
|
|
2638
2751
|
- ​<!-- 26 -->[blog] Fix display on Safari (#33102) @oliviertassinari
|
|
2639
|
-
- ​<!-- 18 -->[docs] Add guide on how to use
|
|
2752
|
+
- ​<!-- 18 -->[docs] Add guide on how to use Base UI with Tailwind CSS (#33100) @mnajdova
|
|
2640
2753
|
- ​<!-- 17 -->[docs] Improve Joy template UX (#33159) @siriwatknp
|
|
2641
2754
|
- ​<!-- 16 -->[docs] Update Shadow DOM guide (#33160) @cherniavskii
|
|
2642
2755
|
- ​<!-- 15 -->[docs] Fix SEO regressions (#33106) @oliviertassinari
|
|
@@ -2714,7 +2827,7 @@ A big thanks to the 24 contributors who made this release possible. Here are som
|
|
|
2714
2827
|
- ​<!-- 31 -->[docs] Move codesandbox to MUI org (#33122) @oliviertassinari
|
|
2715
2828
|
- ​<!-- 30 -->[docs] Add Shadow DOM guide (#33007) @cherniavskii
|
|
2716
2829
|
- ​<!-- 29 -->[docs] Fix typo in Material UI overview page (#33087) @oliviertassinari
|
|
2717
|
-
- ​<!-- 28 -->[docs] Miscellaneous fixes in `
|
|
2830
|
+
- ​<!-- 28 -->[docs] Miscellaneous fixes in `Base UI` docs (#33091) @ZeeshanTamboli
|
|
2718
2831
|
- ​<!-- 27 -->[docs] Fix GitHub capitalization (#33071) @oliviertassinari
|
|
2719
2832
|
- ​<!-- 26 -->[docs] Fix a typo in `InputUnstyled` docs (#33077) @ZeeshanTamboli
|
|
2720
2833
|
- ​<!-- 25 -->[docs] Add notification for Joy blog post (#33059) @siriwatknp
|
|
@@ -3150,7 +3263,7 @@ A big thanks to the 13 contributors who made this release possible. Here are som
|
|
|
3150
3263
|
- ​<!-- 24 -->[docs] Base Button style revisions and final review (#32380) @samuelsycamore
|
|
3151
3264
|
- ​<!-- 23 -->[docs] Base NoSsr style revisions and final review (#32254) @samuelsycamore
|
|
3152
3265
|
- ​<!-- 22 -->[docs] Correctly capitalize Ctrl @oliviertassinari
|
|
3153
|
-
- ​<!-- 21 -->[docs] Fix styling in `Basic Popper` demo on the
|
|
3266
|
+
- ​<!-- 21 -->[docs] Fix styling in `Basic Popper` demo on the Base UI docs (#32488) @ZeeshanTamboli
|
|
3154
3267
|
- ​<!-- 20 -->[docs] Add "Overview" page to Base docs (#32310) @samuelsycamore
|
|
3155
3268
|
- ​<!-- 19 -->[docs] Add copy button to code block (#32390) @siriwatknp
|
|
3156
3269
|
- ​<!-- 18 -->[docs] Base Tabs style revisions and final review (#32423) @samuelsycamore
|
|
@@ -3404,7 +3517,7 @@ A big thanks to the 15 contributors who made this release possible. Here are som
|
|
|
3404
3517
|
|
|
3405
3518
|
- ​<!-- 28 -->[core] Update peer deps to support React 18 (#32063) @eps1lon
|
|
3406
3519
|
- ​<!-- 27 -->[core] Fix running docs:api on Windows (#32091) @michaldudak
|
|
3407
|
-
- ​<!-- 26 -->[core] Fix api build script for
|
|
3520
|
+
- ​<!-- 26 -->[core] Fix api build script for Base UI (#32081) @siriwatknp
|
|
3408
3521
|
|
|
3409
3522
|
All contributors of this release in alphabetical order: @apeltop, @eps1lon, @flaviendelangle, @garronej, @ivan-ngchakming, @m4theushw, @MatthijsMud, @michaldudak, @mnajdova, @oliviertassinari, @psjishnu, @raigoinabox, @samuelsycamore, @siriwatknp, @TkaczykAdam
|
|
3410
3523
|
|
|
@@ -3631,7 +3744,7 @@ A big thanks to the 16 contributors who made this release possible. Here are som
|
|
|
3631
3744
|
|
|
3632
3745
|
- ​<!-- 24 -->[ClassNameGenerator] Prevent all `base` imports (#31297) @siriwatknp
|
|
3633
3746
|
|
|
3634
|
-
`unstable_ClassNameGenerator` has been moved from `utils` to `className` folder to prevent all
|
|
3747
|
+
`unstable_ClassNameGenerator` has been moved from `utils` to `className` folder to prevent all Base UI module imports. If you use the module, please update the import as suggested in the diff below:
|
|
3635
3748
|
|
|
3636
3749
|
```diff
|
|
3637
3750
|
-import { unstable_ClassNameGenerator } from '@mui/material/utils';
|
|
@@ -5406,7 +5519,7 @@ _Sep 1, 2021_
|
|
|
5406
5519
|
A big thanks to the 18 contributors who made this release possible. Here are some highlights ✨:
|
|
5407
5520
|
|
|
5408
5521
|
- 🎉 Renamed packages to `@mui/*` as part of rebranding the company, following the strategy of expanding the library scope beyond Material Design. For more details about it, check the [GitHub discussion](https://github.com/mui/material-ui/discussions/27803).
|
|
5409
|
-
- 🛠 Added `mui-replace` codemod for migrating `@material-ui/*` to new packages `@mui/*`. Check out this [codemod detail](https://github.com/mui/material-ui/blob/
|
|
5522
|
+
- 🛠 Added `mui-replace` codemod for migrating `@material-ui/*` to new packages `@mui/*`. Check out this [codemod detail](https://github.com/mui/material-ui/blob/v5.0.0/packages/mui-codemod/README.md#mui-replace) or head to [migration guide](https://mui.com/material-ui/migration/migration-v4/#preset-safe)
|
|
5410
5523
|
- 🧪 Added new `<Mansory>` component to the lab, [check it out](https://mui.com/components/masonry/). It has been crafted by our first intern, @hbjORbj 👏!
|
|
5411
5524
|
|
|
5412
5525
|
### `@mui/material@5.0.0-rc.0`
|
|
@@ -5438,7 +5551,7 @@ A big thanks to the 18 contributors who made this release possible. Here are som
|
|
|
5438
5551
|
|
|
5439
5552
|
> **Note**: `@mui/base` (previously `@material-ui/unstyled`) is not the same as `@material-ui/core`.
|
|
5440
5553
|
|
|
5441
|
-
We encourage you to use the [codemod](https://github.com/mui/material-ui/blob/
|
|
5554
|
+
We encourage you to use the [codemod](https://github.com/mui/material-ui/blob/v5.0.0/packages/mui-codemod/README.md#mui-replace) for smooth migration.
|
|
5442
5555
|
|
|
5443
5556
|
#### Changes
|
|
5444
5557
|
|
|
@@ -6573,7 +6686,7 @@ A big thanks to the 14 contributors who made this release possible. Here are som
|
|
|
6573
6686
|
|
|
6574
6687
|
- 👩🎤 We have completed the migration to emotion of all the components (`@material-ui/core` and `@material-ui/lab`) @siriwatknp, @mnajdova.
|
|
6575
6688
|
- 📦 Save [10 kB gzipped](https://bundlephobia.com/package/@material-ui/core@5.0.0-alpha.34) by removing the dependency on `@material-ui/styles` (JSS) from the core and the lab (#26377, #26382, #26376) @mnajdova.
|
|
6576
|
-
- ⚒️ Add many new [codemods](https://github.com/mui/material-ui/blob/
|
|
6689
|
+
- ⚒️ Add many new [codemods](https://github.com/mui/material-ui/blob/v5.0.0/packages/mui-codemod/README.md) to automate the migration from v4 to v5 (#24867) @mbrookes.
|
|
6577
6690
|
- And many more 🐛 bug fixes and 📚 improvements.
|
|
6578
6691
|
|
|
6579
6692
|
### `@material-ui/core@5.0.0-alpha.35`
|
|
@@ -8841,7 +8954,7 @@ A big thanks to the 17 contributors who made this release possible. Here are som
|
|
|
8841
8954
|
|
|
8842
8955
|
- [Box] Remove deprecated props (#23716) @mnajdova
|
|
8843
8956
|
All props are now available under the `sx` prop. A deprecation will be landing in v4.
|
|
8844
|
-
Thanks to @mbrookes developers can automate the migration with a [codemod](https://github.com/mui/material-ui/blob/
|
|
8957
|
+
Thanks to @mbrookes developers can automate the migration with a [codemod](https://github.com/mui/material-ui/blob/v5.0.0/packages/mui-codemod/README.md#box-sx-prop).
|
|
8845
8958
|
|
|
8846
8959
|
```diff
|
|
8847
8960
|
-<Box p={2} bgcolor="primary.main">
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Interpolation } from '@mui/styled-engine';
|
|
3
|
+
import { Theme as SystemTheme } from '../createTheme';
|
|
4
|
+
export interface GlobalStylesProps<Theme = SystemTheme> {
|
|
5
|
+
styles: Interpolation<Theme>;
|
|
6
|
+
defaultTheme?: object;
|
|
7
|
+
themeId?: string;
|
|
8
|
+
}
|
|
9
|
+
declare function GlobalStyles<Theme = SystemTheme>({ styles, themeId, defaultTheme, }: GlobalStylesProps<Theme>): JSX.Element;
|
|
10
|
+
declare namespace GlobalStyles {
|
|
11
|
+
var propTypes: any;
|
|
12
|
+
}
|
|
13
|
+
export default GlobalStyles;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var React = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
+
var _styledEngine = require("@mui/styled-engine");
|
|
11
|
+
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
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); }
|
|
14
|
+
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; }
|
|
15
|
+
function GlobalStyles({
|
|
16
|
+
styles,
|
|
17
|
+
themeId,
|
|
18
|
+
defaultTheme = {}
|
|
19
|
+
}) {
|
|
20
|
+
const upperTheme = (0, _useTheme.default)(defaultTheme);
|
|
21
|
+
const globalStyles = typeof styles === 'function' ? styles(themeId ? upperTheme[themeId] || upperTheme : upperTheme) : styles;
|
|
22
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styledEngine.GlobalStyles, {
|
|
23
|
+
styles: globalStyles
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
process.env.NODE_ENV !== "production" ? GlobalStyles.propTypes /* remove-proptypes */ = {
|
|
27
|
+
// ----------------------------- Warning --------------------------------
|
|
28
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
29
|
+
// | To update them edit TypeScript types and run "yarn proptypes" |
|
|
30
|
+
// ----------------------------------------------------------------------
|
|
31
|
+
/**
|
|
32
|
+
* @ignore
|
|
33
|
+
*/
|
|
34
|
+
defaultTheme: _propTypes.default.object,
|
|
35
|
+
/**
|
|
36
|
+
* @ignore
|
|
37
|
+
*/
|
|
38
|
+
styles: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_propTypes.default.array, _propTypes.default.func, _propTypes.default.number, _propTypes.default.object, _propTypes.default.string, _propTypes.default.bool]),
|
|
39
|
+
/**
|
|
40
|
+
* @ignore
|
|
41
|
+
*/
|
|
42
|
+
themeId: _propTypes.default.string
|
|
43
|
+
} : void 0;
|
|
44
|
+
var _default = GlobalStyles;
|
|
45
|
+
exports.default = _default;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _exportNames = {};
|
|
7
|
+
Object.defineProperty(exports, "default", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () {
|
|
10
|
+
return _GlobalStyles.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _GlobalStyles = _interopRequireWildcard(require("./GlobalStyles"));
|
|
14
|
+
Object.keys(_GlobalStyles).forEach(function (key) {
|
|
15
|
+
if (key === "default" || key === "__esModule") return;
|
|
16
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
17
|
+
if (key in exports && exports[key] === _GlobalStyles[key]) return;
|
|
18
|
+
Object.defineProperty(exports, key, {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _GlobalStyles[key];
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
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); }
|
|
26
|
+
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; }
|
|
@@ -5,6 +5,10 @@ export interface ThemeProviderProps<Theme = DefaultTheme> {
|
|
|
5
5
|
* Your component tree.
|
|
6
6
|
*/
|
|
7
7
|
children?: React.ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* The design system's unique id for getting the corresponded theme when there are multiple design systems.
|
|
10
|
+
*/
|
|
11
|
+
themeId?: string;
|
|
8
12
|
/**
|
|
9
13
|
* A theme object. You can provide a function to extend the outer theme.
|
|
10
14
|
*/
|
|
@@ -5,42 +5,64 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
8
9
|
var React = _interopRequireWildcard(require("react"));
|
|
9
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
11
|
var _privateTheming = require("@mui/private-theming");
|
|
11
12
|
var _utils = require("@mui/utils");
|
|
12
13
|
var _styledEngine = require("@mui/styled-engine");
|
|
13
|
-
var
|
|
14
|
+
var _useThemeWithoutDefault = _interopRequireDefault(require("../useThemeWithoutDefault"));
|
|
14
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
16
|
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); }
|
|
16
17
|
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; }
|
|
17
18
|
const EMPTY_THEME = {};
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
function useThemeScoping(themeId, upperTheme, localTheme, isPrivate = false) {
|
|
20
|
+
return React.useMemo(() => {
|
|
21
|
+
const resolvedTheme = themeId ? upperTheme[themeId] || upperTheme : upperTheme;
|
|
22
|
+
if (typeof localTheme === 'function') {
|
|
23
|
+
const mergedTheme = localTheme(resolvedTheme);
|
|
24
|
+
const result = themeId ? (0, _extends2.default)({}, upperTheme, {
|
|
25
|
+
[themeId]: mergedTheme
|
|
26
|
+
}) : mergedTheme;
|
|
27
|
+
// must return a function for the private theme to NOT merge with the upper theme.
|
|
28
|
+
// see the test case "use provided theme from a callback" in ThemeProvider.test.js
|
|
29
|
+
if (isPrivate) {
|
|
30
|
+
return () => result;
|
|
31
|
+
}
|
|
32
|
+
return result;
|
|
33
|
+
}
|
|
34
|
+
return themeId ? (0, _extends2.default)({}, upperTheme, {
|
|
35
|
+
[themeId]: localTheme
|
|
36
|
+
}) : (0, _extends2.default)({}, upperTheme, localTheme);
|
|
37
|
+
}, [themeId, upperTheme, localTheme, isPrivate]);
|
|
24
38
|
}
|
|
25
|
-
process.env.NODE_ENV !== "production" ? InnerThemeProvider.propTypes = {
|
|
26
|
-
/**
|
|
27
|
-
* Your component tree.
|
|
28
|
-
*/
|
|
29
|
-
children: _propTypes.default.node
|
|
30
|
-
} : void 0;
|
|
31
39
|
|
|
32
40
|
/**
|
|
33
41
|
* This component makes the `theme` available down the React tree.
|
|
34
42
|
* It should preferably be used at **the root of your component tree**.
|
|
43
|
+
*
|
|
44
|
+
* <ThemeProvider theme={theme}> // existing use case
|
|
45
|
+
* <ThemeProvider theme={{ id: theme }}> // theme scoping
|
|
35
46
|
*/
|
|
36
47
|
function ThemeProvider(props) {
|
|
37
48
|
const {
|
|
38
49
|
children,
|
|
39
|
-
theme: localTheme
|
|
50
|
+
theme: localTheme,
|
|
51
|
+
themeId
|
|
40
52
|
} = props;
|
|
53
|
+
const upperTheme = (0, _useThemeWithoutDefault.default)(EMPTY_THEME);
|
|
54
|
+
const upperPrivateTheme = (0, _privateTheming.useTheme)() || EMPTY_THEME;
|
|
55
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
56
|
+
if (upperTheme === null && typeof localTheme === 'function' || themeId && upperTheme && !upperTheme[themeId] && typeof localTheme === 'function') {
|
|
57
|
+
console.error(['MUI: You are providing a theme function prop to the ThemeProvider component:', '<ThemeProvider theme={outerTheme => outerTheme} />', '', 'However, no outer theme is present.', 'Make sure a theme is already injected higher in the React tree ' + 'or provide a theme object.'].join('\n'));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
const engineTheme = useThemeScoping(themeId, upperTheme, localTheme);
|
|
61
|
+
const privateTheme = useThemeScoping(themeId, upperPrivateTheme, localTheme, true);
|
|
41
62
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_privateTheming.ThemeProvider, {
|
|
42
|
-
theme:
|
|
43
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
63
|
+
theme: privateTheme,
|
|
64
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_styledEngine.ThemeContext.Provider, {
|
|
65
|
+
value: engineTheme,
|
|
44
66
|
children: children
|
|
45
67
|
})
|
|
46
68
|
});
|
|
@@ -57,7 +79,11 @@ process.env.NODE_ENV !== "production" ? ThemeProvider.propTypes /* remove-propty
|
|
|
57
79
|
/**
|
|
58
80
|
* A theme object. You can provide a function to extend the outer theme.
|
|
59
81
|
*/
|
|
60
|
-
theme: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]).isRequired
|
|
82
|
+
theme: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]).isRequired,
|
|
83
|
+
/**
|
|
84
|
+
* The design system's unique id for getting the corresponded theme when there are multiple design systems.
|
|
85
|
+
*/
|
|
86
|
+
themeId: _propTypes.default.string
|
|
61
87
|
} : void 0;
|
|
62
88
|
if (process.env.NODE_ENV !== 'production') {
|
|
63
89
|
process.env.NODE_ENV !== "production" ? ThemeProvider.propTypes = (0, _utils.exactProp)(ThemeProvider.propTypes) : void 0;
|
package/createBox.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export default function createBox<
|
|
|
6
6
|
T extends object = SystemTheme,
|
|
7
7
|
AdditionalProps extends Record<string, unknown> = {},
|
|
8
8
|
>(options?: {
|
|
9
|
+
themeId?: string;
|
|
9
10
|
defaultTheme: T;
|
|
10
11
|
defaultClassName?: string;
|
|
11
12
|
generateClassName?: (componentName: string) => string;
|
package/createBox.js
CHANGED
|
@@ -18,6 +18,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
18
18
|
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; }
|
|
19
19
|
function createBox(options = {}) {
|
|
20
20
|
const {
|
|
21
|
+
themeId,
|
|
21
22
|
defaultTheme,
|
|
22
23
|
defaultClassName = 'MuiBox-root',
|
|
23
24
|
generateClassName
|
|
@@ -37,7 +38,7 @@ function createBox(options = {}) {
|
|
|
37
38
|
as: component,
|
|
38
39
|
ref: ref,
|
|
39
40
|
className: (0, _clsx.default)(className, generateClassName ? generateClassName(defaultClassName) : defaultClassName),
|
|
40
|
-
theme: theme
|
|
41
|
+
theme: themeId ? theme[themeId] || theme : theme
|
|
41
42
|
}, other));
|
|
42
43
|
});
|
|
43
44
|
return Box;
|
package/createStyled.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ export type CreateMUIStyled<T extends object = DefaultTheme> = CreateMUIStyledSt
|
|
|
31
31
|
>;
|
|
32
32
|
|
|
33
33
|
export default function createStyled<T extends object = DefaultTheme>(options?: {
|
|
34
|
+
themeId?: string;
|
|
34
35
|
defaultTheme?: T;
|
|
35
36
|
rootShouldForwardProp?: (prop: PropertyKey) => boolean;
|
|
36
37
|
slotShouldForwardProp?: (prop: PropertyKey) => boolean;
|