@mui/system 5.9.1 → 5.10.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.
Files changed (69) hide show
  1. package/Box/Box.spec.d.ts +1 -1
  2. package/CHANGELOG.md +200 -9
  3. package/Container/Container.d.ts +13 -13
  4. package/Container/ContainerProps.d.ts +40 -40
  5. package/Container/containerClasses.d.ts +22 -22
  6. package/Container/createContainer.d.ts +18 -18
  7. package/README.md +1 -1
  8. package/Stack/Stack.d.ts +12 -0
  9. package/Stack/Stack.js +62 -0
  10. package/Stack/StackProps.d.ts +42 -0
  11. package/Stack/StackProps.js +5 -0
  12. package/Stack/createStack.d.ts +21 -0
  13. package/Stack/createStack.js +209 -0
  14. package/Stack/index.d.ts +5 -0
  15. package/Stack/index.js +65 -0
  16. package/Stack/package.json +6 -0
  17. package/Stack/stackClasses.d.ts +8 -0
  18. package/Stack/stackClasses.js +17 -0
  19. package/Unstable_Grid/Grid.d.ts +12 -12
  20. package/Unstable_Grid/GridProps.d.ts +162 -162
  21. package/Unstable_Grid/createGrid.d.ts +11 -11
  22. package/Unstable_Grid/gridClasses.d.ts +20 -20
  23. package/Unstable_Grid/gridGenerator.d.ts +26 -26
  24. package/Unstable_Grid/index.d.ts +5 -5
  25. package/breakpoints.d.ts +21 -0
  26. package/createBox.js +3 -1
  27. package/createBox.spec.d.ts +1 -1
  28. package/createStyled.js +30 -11
  29. package/createTheme/createSpacing.d.ts +10 -10
  30. package/cssVars/createCssVarsProvider.js +1 -1
  31. package/cssVars/createCssVarsProvider.spec.d.ts +1 -1
  32. package/cssVars/createGetCssVar.d.ts +5 -5
  33. package/cssVars/cssVarsParser.d.ts +65 -65
  34. package/cssVars/getInitColorSchemeScript.d.ts +45 -45
  35. package/cssVars/index.d.ts +3 -3
  36. package/cssVars/useCurrentColorScheme.d.ts +53 -53
  37. package/esm/Stack/Stack.js +51 -0
  38. package/esm/Stack/StackProps.js +1 -0
  39. package/esm/Stack/createStack.js +179 -0
  40. package/esm/Stack/index.js +5 -0
  41. package/esm/Stack/stackClasses.js +6 -0
  42. package/esm/createBox.js +3 -1
  43. package/esm/createStyled.js +28 -10
  44. package/esm/cssVars/createCssVarsProvider.js +1 -1
  45. package/esm/index.js +3 -1
  46. package/index.d.ts +4 -6
  47. package/index.js +25 -2
  48. package/index.spec.d.ts +1 -1
  49. package/legacy/Stack/Stack.js +51 -0
  50. package/legacy/Stack/StackProps.js +1 -0
  51. package/legacy/Stack/createStack.js +187 -0
  52. package/legacy/Stack/index.js +5 -0
  53. package/legacy/Stack/stackClasses.js +6 -0
  54. package/legacy/createBox.js +5 -1
  55. package/legacy/createStyled.js +31 -10
  56. package/legacy/cssVars/createCssVarsProvider.js +1 -1
  57. package/legacy/index.js +4 -2
  58. package/modern/Stack/Stack.js +51 -0
  59. package/modern/Stack/StackProps.js +1 -0
  60. package/modern/Stack/createStack.js +179 -0
  61. package/modern/Stack/index.js +5 -0
  62. package/modern/Stack/stackClasses.js +6 -0
  63. package/modern/createBox.js +3 -1
  64. package/modern/createStyled.js +28 -10
  65. package/modern/cssVars/createCssVarsProvider.js +1 -1
  66. package/modern/index.js +4 -2
  67. package/package.json +6 -6
  68. package/spacing.d.ts +6 -0
  69. package/styleFunctionSx/styleFunctionSx.spec.d.ts +1 -1
package/Box/Box.spec.d.ts CHANGED
@@ -1 +1 @@
1
- export {};
1
+ export {};
package/CHANGELOG.md CHANGED
@@ -1,5 +1,196 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 5.10.0
4
+
5
+ <!-- generated comparing v5.9.3..master -->
6
+
7
+ _Aug 8, 2022_
8
+
9
+ A big thanks to the 16 contributors who made this release possible. Here are some highlights ✨:
10
+
11
+ - ✨ [Stack](https://mui.com/system/react-stack/) component is added to MUI System and Joy UI #33760 #33800 @mnajdova
12
+ - ✨ [Breadcrumbs](https://mui.com/joy-ui/react-breadcrumbs/) component is added to Joy UI (#32697) @hbjORbj
13
+ - Many other 🐛 bug fixes, 📚 documentation, and ⚙️ infrastructure improvements
14
+
15
+ ### `@mui/material@5.10.0`
16
+
17
+ - [Grid] Prevent crash if spacing is set to zero in theme (#33777) @PunitSoniME
18
+ - [Grid] Export interface `RegularBreakpoints` to fix type error (#33751) @ZeeshanTamboli
19
+ - [Skeleton] Add `rounded` variant (#33687) @siriwatknp
20
+ - [Stepper] Fix classes for icon container (#33734) @pratikkarad
21
+ - [TableCell] Enable size prop overrides via module augmentation (#33816) @brentertz
22
+ - [Tooltip] Fix tooltip arrow css var background (#33753) @TimoWilhelm
23
+ - [useScrollTrigger] Add passive flag to scroll trigger event listener #32437 (#33749) @Dsalazar1685
24
+
25
+ ### `@mui/system@5.10.0`
26
+
27
+ - Fix unnecessary styles created from `sx` (#33752) @siriwatknp
28
+ - Fix duplicated styles in Box (#33774) @iamxukai
29
+ - Don't spread props to DOM for string tags (#33761) @siriwatknp
30
+ - Add `Stack` component (#33760) @mnajdova
31
+
32
+ ### `@mui/joy@5.0.0-alpha.40`
33
+
34
+ - [Stack] Add new component (#33800) @mnajdova
35
+ - [Breadcrumbs] Add `Breadcrumbs` component (#32697) @hbjORbj
36
+ - [Card] Fix wrong api description for `size` prop (#33862) @hbjORbj
37
+ - Miscellaneous fixes (#33796, #33750) @siriwatknp
38
+
39
+ ### Docs
40
+
41
+ - [docs] Create, revise, and expand System "Getting started" docs (#33503) @samuelsycamore
42
+ - [docs] Test new image best practice @oliviertassinari
43
+ - [docs] Fix typo in the ClickAwayListerner name (#33813) @pawelsmigielski
44
+ - [docs] Fix link to `Basics` section in `Trap Focus` docs (#33772) @ZeeshanTamboli
45
+ - [docs] z-index added in popper when used by split button (#33763) @PunitSoniME
46
+ - [docs] Improve the guide for using @mui/base with Tailwind CSS (#33670) @mnajdova
47
+ - [docs] Fix warnings related to Next.js' links (#33693) @mnajdova
48
+ - [docs] Add notification to aggregation blogpost (#33745) @joserodolfofreitas
49
+ - [docs] Add Grid version 2 docs (#33554) @siriwatknp
50
+ - [examples] Fix `NextLinkComposedProps` type error (#33842) @adham618
51
+
52
+ ### Core
53
+
54
+ - [blog] Add social card to Tenerife retreat post (#33764)
55
+ - [blog] Fix blue outline bug (#33707) @oliviertassinari
56
+ - [blog] Improve the width of the layout (#33706) @oliviertassinari@samuelsycamore
57
+ - [core] Remove unnecessary packageName attribute from pages (#33488) @cherniavskii
58
+ - [core] Remove duplicated CODE_OF_CONDUCT (#33702) @oliviertassinari
59
+ - [core] Update Playwright packages together (#33737) @michaldudak
60
+ - [website] Fix notifications not being marked as read in production (#33756) @cherniavskii
61
+
62
+ All contributors of this release in alphabetical order: @adham618, @brentertz, @cherniavskii, @Dsalazar1685, @hbjORbj, @iamxukai, @joserodolfofreitas, @michaldudak, @mnajdova, @oliviertassinari, @pawelsmigielski, @pratikkarad, @PunitSoniME, @siriwatknp, @TimoWilhelm, @ZeeshanTamboli
63
+
64
+ ## 5.9.3
65
+
66
+ <!-- generated comparing v5.9.2..master -->
67
+
68
+ _Aug 1, 2022_
69
+
70
+ A big thanks to the 15 contributors who made this release possible. Here are some highlights ✨:
71
+
72
+ - 🖼️ @garronej worked on improving the support of Emotion packages in the System (#33205)
73
+ - Many other 🐛 bug fixes, 📚 documentation, and ⚙️ infrastructure improvements
74
+
75
+ ### `@mui/material@5.9.3`
76
+
77
+ - [Chip] Assign classnames and associated styles for `filled` variant (#33587) @hbjORbj
78
+ - [Grid] Fix `columnSpacing` and `rowSpacing` props ignore higher breakpoints with 0 (#33480) @ZeeshanTamboli
79
+ - [Input] Add the readOnly state class (#33654) @michaldudak
80
+ - [Stack] Responsive styles based on breakpoints should be in the correct order (#33552) @hbjORbj
81
+
82
+ ### `@mui/system@5.9.3`
83
+
84
+ - [system] Make @emotion/\* fully supported in the System (#33205) @garronej
85
+
86
+ ### `@mui/codemod@5.9.3`
87
+
88
+ - [codemod] Fix theme-spacing performance (#33691) @siriwatknp
89
+ - [codemod] Support @mui import for variant-prop (#33692) @siriwatknp
90
+
91
+ ### `@mui/styled-engine-sc@5.9.3`
92
+
93
+ - [styled-engine-sc] Add missing @babel/runtime dependency (#33741) @MonstraG
94
+
95
+ ### `@mui/joy@5.0.0-alpha.38`
96
+
97
+ - [Joy] Add Tabs components (#33664) @siriwatknp
98
+ - [Joy] Miscellaneous fixes (#33685) @siriwatknp
99
+ - [Joy] Update read.me content (#33643) @danilo-leal
100
+
101
+ ### Docs
102
+
103
+ - [blog] Add blog post about company retreat in Tenerife 🏝 (#33566) @samuelsycamore
104
+ - [blog] Add blog post to announce the aggregation feature (#33595) @joserodolfofreitas
105
+ - [blog] Fix horizontal scrollbar with code snippets (#33648) @joserodolfofreitas
106
+ - [docs] Fix a typo in the code in `Sorting & selecting` Table demo (#33674) @mracette
107
+ - [docs] Fix en-US format in the Skeleton demo (#33699) @husseinsaad98
108
+ - [docs] Update module reference for `usePagination` (#33675) @fullstackzach
109
+ - [docs] Fix code examples in `styled` API vs `sx` prop docs (#33665) @ZeeshanTamboli
110
+ - [docs][system] Throw an informative error when `theme.vars` is used in `createTheme` and mention this in the theming docs (#33619) @hbjORbj
111
+ - [website] Remove legacy redirect @oliviertassinari
112
+ - [website] Add new legal pages (#33650) @oliviertassinari
113
+ - [website] Clarify when a license in development is required (#33668) @oliviertassinari
114
+ - [website] Update links to rows pages (#33739) @cherniavskii
115
+ - [website] Update pricing table to add aggregation and row pinning (#33659) @joserodolfofreitas
116
+
117
+ ### Core
118
+
119
+ - [core] Replace `getInitialProps` with `getStaticProps` (#33684) @mnajdova
120
+ - [core] Remove accidentally added files (#33636) @michaldudak
121
+ - [core] Update packages with security issues (#33679) @michaldudak
122
+ - [core] Add React 17 nightly build (#33594) @mnajdova
123
+ - [core] Update lerna to 5.2.0 (#33635) @michaldudak
124
+ - [core] Prepare isolation of Next.js X app (#33649) @oliviertassinari
125
+ - [core] Remove thenify version override from package.json resolutions (#33638) @michaldudak
126
+ - [core] Update Node.js to 14 on CircleCI, CodeSandbox, and Netlify (#33642) @michaldudak
127
+ - [test] Replace istanbul-instrumenter-loader with babel-plugin-istanbul (#33666) @michaldudak
128
+ - [test] Run TypeScript module augmentation tests for Joy UI in CI (#33667) @ZeeshanTamboli
129
+
130
+ All contributors of this release in alphabetical order: @cherniavskii, @danilo-leal, @fullstackzach, @garronej, @hbjORbj, @husseinsaad98, @joserodolfofreitas, @michaldudak, @mnajdova, @MonstraG, @mracette, @oliviertassinari, @samuelsycamore, @siriwatknp, @ZeeshanTamboli
131
+
132
+ ## 5.9.2
133
+
134
+ <!-- generated comparing v5.9.1..master -->
135
+
136
+ _Jul 25, 2022_
137
+
138
+ A big thanks to the 16 contributors who made this release possible. Here are some highlights ✨:
139
+
140
+ - 🧪 Ensure all Base components are `OverridableComponent` (#33506) @michaldudak
141
+ - 🧪 Various improvements on the Material `Stack` component (#33548, #33588, #33549) @hbjORbj
142
+ - Many other 🐛 bug fixes and 📚 documentation improvements
143
+
144
+ ### `@mui/material@5.9.2`
145
+
146
+ - &#8203;<!-- 34 -->Revert "[Tooltip] Fix children mouse over detection (#32321)" @oliviertassinari
147
+ - &#8203;<!-- 19 -->[FormHelperText] Fix unable to create new variants (#33589) @DinhBaoTran
148
+ - &#8203;<!-- 18 -->[ImageList] Remove vertical spacing between items in masonry layout (#33593) @michaldudak
149
+ - &#8203;<!-- 13 -->[LoadingButton] Refactor duplicate code (#33570) @ZeeshanTamboli
150
+ - &#8203;<!-- 12 -->[Modal] Explain the meaning of deprecation of the BackdropComponent prop (#33591) @michaldudak
151
+ - &#8203;<!-- 11 -->[Stack] Fix unit test failure (#33588) @hbjORbj
152
+ - &#8203;<!-- 10 -->[Stack] Fix default `flexDirection` value with responsive prop (#33549) @hbjORbj
153
+ - &#8203;<!-- 09 -->[Stack] Ensure that `marginundefined` doesn't occur in styling (#33548) @hbjORbj
154
+ - &#8203;<!-- 08 -->[Tabs] Fix `indicatorColor` prop type (#33569) @ZeeshanTamboli
155
+ - &#8203;<!-- 07 -->[Tabs] Add TypeScript interface to augment tab indicator color in theme (#33333) @AHeiming
156
+
157
+ ### `@mui/base@5.0.0-alpha.91`
158
+
159
+ - &#8203;<!-- 33 -->[Base] Make PopperUnstyled `component` overridable (#33573) @siriwatknp
160
+ - &#8203;<!-- 32 -->[Base] Ensure all components are OverridableComponent (#33506) @michaldudak
161
+
162
+ ### `@mui/joy@5.0.0-alpha.38`
163
+
164
+ - &#8203;<!-- 17 -->[Select] Add new component in Joy (#33630) @siriwatknp
165
+ - &#8203;<!-- 15 -->[Joy] Add Text field documentation (#33430, #33631) @danilo-leal
166
+ - &#8203;<!-- 14 -->[Joy] Add menu components (#31789) @siriwatknp
167
+
168
+ ### Docs
169
+
170
+ - &#8203;<!-- 31 -->[blog] Fix 404 link to Algolia docs search (dd4308d) @oliviertassinari
171
+ - &#8203;<!-- 28 -->[docs] Add accessibility tips (#33633) @siriwatknp
172
+ - &#8203;<!-- 27 -->[docs] Fix production deploy of codesandboxes (#33608) @oliviertassinari
173
+ - &#8203;<!-- 26 -->[docs] Show border on `palette.background.paper` in dark mode docs (#33611) @ZeeshanTamboli
174
+ - &#8203;<!-- 25 -->[docs] Fix typo in Joy UI dark mode page (#33620) @bairamau
175
+ - &#8203;<!-- 24 -->[docs] Final polish on Base docs - formatting and style consistency (#33156) @samuelsycamore
176
+ - &#8203;<!-- 23 -->[docs] Fix `CssBaseline` import in example code (#33614) @dd-ssc
177
+ - &#8203;<!-- 22 -->[docs] Fix Toolpad docs redirection (#33524) @bharatkashyap
178
+ - &#8203;<!-- 21 -->[docs] Fix link to Snackbar customization section in Alert docs (#33586) @ZeeshanTamboli
179
+ - &#8203;<!-- 20 -->[docs] Fix `placement choices` typo in Tooltip docs (#33571) @MonstraG
180
+ - &#8203;<!-- 05 -->[website] Update home page's sponsor grid (#33528) @danilo-leal
181
+ - &#8203;<!-- 04 -->[website] Add Vytautas to the about page (#33567) @bytasv
182
+ - &#8203;<!-- 03 -->[website] Improve newsletter input design (#33585) @danilo-leal
183
+ - &#8203;<!-- 02 -->[website] Add YouTube link to footer (#33580) @gerdadesign
184
+ - &#8203;<!-- 01 -->[website] Clarify scope of technical support (#33435) @joserodolfofreitas
185
+
186
+ ### Core
187
+
188
+ - &#8203;<!-- 30 -->[core] Swallow ad blocker fetch fail (#33617) @oliviertassinari
189
+ - &#8203;<!-- 29 -->[core] Fix dep security by resolving `thenify` to latest (#33612) @siriwatknp
190
+ - &#8203;<!-- 06 -->[test] Remove `view` option from Event in Snackbar tests (#33555) @ZeeshanTamboli
191
+
192
+ All contributors of this release in alphabetical order: @AHeiming, @bairamau, @bharatkashyap, @bytasv, @danilo-leal, @dd-ssc, @DinhBaoTran, @gerdadesign, @hbjORbj, @joserodolfofreitas, @michaldudak, @MonstraG, @oliviertassinari, @samuelsycamore, @siriwatknp, @ZeeshanTamboli
193
+
3
194
  ## 5.9.1
4
195
 
5
196
  <!-- generated comparing v5.9.0..master -->
@@ -97,7 +288,7 @@ A big thanks to the 19 contributors who made this release possible. Here are som
97
288
 
98
289
  ### `@mui/base@5.0.0-alpha.89`
99
290
 
100
- - Base] Change the order of class names merged in useSlotProps (#33383) @michaldudak
291
+ - [Base] Change the order of class names merged in useSlotProps (#33383) @michaldudak
101
292
  - [ModalUnstyled] Accept callbacks in componentsProps (#33181) @michaldudak
102
293
  - [SelectUnstyled] Accept callbacks in componentsProps (#33197) @michaldudak
103
294
  - [TabsUnstyled] Accept callbacks in componentsProps (#33284) @michaldudak
@@ -2064,7 +2255,7 @@ A big thanks to the 16 contributors who made this release possible. Here are som
2064
2255
  - &#8203;<!-- 19 -->[docs] Sync translations with Crowdin (#30067) @l10nbot
2065
2256
  - &#8203;<!-- 18 -->[docs] Fix link on "Custom variables" section in the Theming page #30100 @danilo-leal
2066
2257
  - &#8203;<!-- 17 -->[docs] Fix justifyContent option in the Grid interactive demo (#30117) @danilo-leal
2067
- - &#8203;<!-- 16 -->[docs] Add tip to help access the docs of a previous version when finding answers in StackOverflow (#30101) @danilo-leal
2258
+ - &#8203;<!-- 16 -->[docs] Add tip to help access the docs of a previous version when finding answers in Stack Overflow (#30101) @danilo-leal
2068
2259
  - &#8203;<!-- 15 -->[docs] Fix import example inside Unstyled Backdrop section (#30098) @TheodosiouTh
2069
2260
  - &#8203;<!-- 01 -->[website] Column pinning and Tree data are out (#30136) @oliviertassinari
2070
2261
  - &#8203;<!-- 07 -->[survey] Remove survey promotion items (#30122) @danilo-leal
@@ -2145,7 +2336,7 @@ A big thanks to the 25 contributors who made this release possible. Here are som
2145
2336
  - &#8203;<!-- 21 -->[docs] Update nextjs-typescript-example (#29974) @huydhoang
2146
2337
  - &#8203;<!-- 20 -->[docs] Add missing global state classes to API docs generator (#29945) @michaldudak
2147
2338
  - &#8203;<!-- 19 -->[docs] Fix benchmarks folder link (#29981) @fourjr
2148
- - &#8203;<!-- 18 -->[docs] Improve wording in StackOverflow section of support page (#29956) @ronwarner
2339
+ - &#8203;<!-- 18 -->[docs] Improve wording in Stack Overflow section of support page (#29956) @ronwarner
2149
2340
  - &#8203;<!-- 17 -->[docs] Remove Black Friday sale notification (#29936) @mbrookes
2150
2341
  - &#8203;<!-- 16 -->[examples] Fix typos in the Remix example (#30071) @MichaelDeBoey
2151
2342
  - &#8203;<!-- 15 -->[examples] Add Remix example (#29952) @mnajdova
@@ -2158,7 +2349,7 @@ A big thanks to the 25 contributors who made this release possible. Here are som
2158
2349
  ### Core
2159
2350
 
2160
2351
  - &#8203;<!-- 31 -->[core] Batch small changes (#30042) @oliviertassinari
2161
- - &#8203;<!-- 28 -->[core] Transition to a new StackOverflow tag (#29967) @oliviertassinari
2352
+ - &#8203;<!-- 28 -->[core] Transition to a new Stack Overflow tag (#29967) @oliviertassinari
2162
2353
 
2163
2354
  All contributors of this release in alphabetical order: @chao813, @daniel-sachs, @danilo-leal, @Domino987, @eduardomcv, @flaviendelangle, @fourjr, @genzyy, @hbjORbj, @huydhoang, @jayeclark, @jonathanrtuck, @kkorach, @l10nbot, @mbrookes, @MichaelDeBoey, @michaldudak, @mnajdova, @oliviertassinari, @ronwarner, @Semigradsky, @siriwatknp, @tasugi, @ThewBear, @ZeeshanTamboli
2164
2355
 
@@ -5844,7 +6035,7 @@ A big thanks to the 30 contributors who made this release possible. Here are som
5844
6035
  #### Breaking changes
5845
6036
 
5846
6037
  - &#8203;<!-- 91 -->[types] Rename the exported `Omit` type in `@material-ui/types`. (#24795) @petyosi
5847
- The module is now called `DistributiveOmit`. The change removes the confusion with the built-in `Omit` helper introduced in TypeScript v3.5. The built-in `Omit`, while similar, is non-distributive. This leads to differences when applied to union types. [See this StackOverflow answer for further details](https://stackoverflow.com/a/57103940/1009797).
6038
+ The module is now called `DistributiveOmit`. The change removes the confusion with the built-in `Omit` helper introduced in TypeScript v3.5. The built-in `Omit`, while similar, is non-distributive. This leads to differences when applied to union types. [See this Stack Overflow answer for further details](https://stackoverflow.com/a/57103940/1009797).
5848
6039
 
5849
6040
  ```diff
5850
6041
  -import { Omit } from '@material-ui/types';
@@ -6750,7 +6941,7 @@ A big thanks to the 34 contributors who made this release possible. Here are som
6750
6941
 
6751
6942
  While the source code is currently hosted in the [main repository](https://github.com/mui/material-ui), we might move it to the [x repository](https://github.com/mui/mui-x) in the future, depending on what is easier for the commercial date range picker. The date picker will stay open source no matter what.
6752
6943
 
6753
- - 📚 Revamp the documentation for [the system](https://mui.com/system/basics/). The System contains CSS utilities. The documentation now promotes the use of the `sx` prop. It's ideal for adding one-off styles, e.g. padding, but when pushed to its limits, it can be used to implement quickly a complete page.
6944
+ - 📚 Revamp the documentation for [the system](https://mui.com/system/getting-started/overview/). The System contains CSS utilities. The documentation now promotes the use of the `sx` prop. It's ideal for adding one-off styles, e.g. padding, but when pushed to its limits, it can be used to implement quickly a complete page.
6754
6945
  - 👩‍🎨 Upgrade emotion to v11 (#23007) @mnajdova.
6755
6946
  - And many more 🐛 bug fixes and 📚 improvements.
6756
6947
 
@@ -7152,7 +7343,7 @@ Here are some highlights ✨:
7152
7343
  If you target IE11, you need to use the new bundle (`legacy`). We are treating IE11 as a second class-citizen, which is a continuation of the direction taken in #22873.
7153
7344
 
7154
7345
  - 🚀 Improve the internal benchmark suite (#22923, #23058) @mnajdova.
7155
- This was a prerequisite step to improve the [system](https://mui.com/system/basics/). We needed to be able to measure performance. After #22945, we have measured that the `Box` component is x3 faster in v5-alpha compared to v4.
7346
+ This was a prerequisite step to improve the [system](https://mui.com/system/getting-started/overview/). We needed to be able to measure performance. After #22945, we have measured that the `Box` component is x3 faster in v5-alpha compared to v4.
7156
7347
  - ✏️ A new blog post: [Q3 2020 Update](https://mui.com/blog/2020-q3-update/) (#23055) @oliviertassinari.
7157
7348
  - 🐙 Migrate more tests to react-testing-library @deiga, @Morteza-Jenabzadeh, @nicholas-l.
7158
7349
  - And many more 🐛 bug fixes and 📚 improvements.
@@ -7493,7 +7684,7 @@ Here are some highlights ✨:
7493
7684
 
7494
7685
  The new styling solution saves 2kB gzipped in the bundle compared to JSS, and about 14 kB gzipped if you were already using emotion or styled-components.
7495
7686
 
7496
- 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/)).
7687
+ 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/getting-started/overview/)).
7497
7688
 
7498
7689
  This change has been in our roadmap for more than a year.
7499
7690
  We announced it in the [v4 release blog post](https://mui.com/blog/material-ui-v4-is-out/) as a direction v5 would take.
@@ -8746,7 +8937,7 @@ A big thanks to the 33 contributors who made this release possible. Here are som
8746
8937
  />
8747
8938
  ```
8748
8939
 
8749
- - [Typography] Replace the `srOnly` prop so as to not duplicate the capabilities of [System](https://mui.com/system/basics/) (#21413) @mnajdova.
8940
+ - [Typography] Replace the `srOnly` prop so as to not duplicate the capabilities of [System](https://mui.com/system/getting-started/overview/) (#21413) @mnajdova.
8750
8941
 
8751
8942
  ```diff
8752
8943
  -import Typography from '@material-ui/core/Typography';
@@ -1,13 +1,13 @@
1
- /**
2
- *
3
- * Demos:
4
- *
5
- * - [Container (Material UI)](https://mui.com/material-ui/react-container/)
6
- * - [Container (MUI System)](https://mui.com/system/react-container/)
7
- *
8
- * API:
9
- *
10
- * - [Container API](https://mui.com/system/api/container/)
11
- */
12
- declare const Container: import("@mui/types").OverridableComponent<import("./ContainerProps").ContainerTypeMap<{}, "div">>;
13
- export default Container;
1
+ /**
2
+ *
3
+ * Demos:
4
+ *
5
+ * - [Container (Material UI)](https://mui.com/material-ui/react-container/)
6
+ * - [Container (MUI System)](https://mui.com/system/react-container/)
7
+ *
8
+ * API:
9
+ *
10
+ * - [Container API](https://mui.com/system/api/container/)
11
+ */
12
+ declare const Container: import("@mui/types").OverridableComponent<import("./ContainerProps").ContainerTypeMap<{}, "div">>;
13
+ export default Container;
@@ -1,40 +1,40 @@
1
- import * as React from 'react';
2
- import { OverrideProps } from '@mui/types';
3
- import { SxProps } from '../styleFunctionSx';
4
- import { Theme, Breakpoint } from '../createTheme';
5
- import { ContainerClasses } from './containerClasses';
6
- export interface ContainerTypeMap<P = {}, D extends React.ElementType = 'div'> {
7
- props: P & {
8
- children?: React.ReactNode;
9
- /**
10
- * Override or extend the styles applied to the component.
11
- */
12
- classes?: Partial<ContainerClasses>;
13
- /**
14
- * If `true`, the left and right padding is removed.
15
- * @default false
16
- */
17
- disableGutters?: boolean;
18
- /**
19
- * Set the max-width to match the min-width of the current breakpoint.
20
- * This is useful if you'd prefer to design for a fixed set of sizes
21
- * instead of trying to accommodate a fully fluid viewport.
22
- * It's fluid by default.
23
- * @default false
24
- */
25
- fixed?: boolean;
26
- /**
27
- * Determine the max-width of the container.
28
- * The container width grows with the size of the screen.
29
- * Set to `false` to disable `maxWidth`.
30
- * @default 'lg'
31
- */
32
- maxWidth?: Breakpoint | false;
33
- /**
34
- * The system prop that allows defining system overrides as well as additional CSS styles.
35
- */
36
- sx?: SxProps<Theme>;
37
- };
38
- defaultComponent: D;
39
- }
40
- export declare type ContainerProps<D extends React.ElementType = ContainerTypeMap['defaultComponent'], P = {}> = OverrideProps<ContainerTypeMap<P, D>, D>;
1
+ import * as React from 'react';
2
+ import { OverrideProps } from '@mui/types';
3
+ import { SxProps } from '../styleFunctionSx';
4
+ import { Theme, Breakpoint } from '../createTheme';
5
+ import { ContainerClasses } from './containerClasses';
6
+ export interface ContainerTypeMap<P = {}, D extends React.ElementType = 'div'> {
7
+ props: P & {
8
+ children?: React.ReactNode;
9
+ /**
10
+ * Override or extend the styles applied to the component.
11
+ */
12
+ classes?: Partial<ContainerClasses>;
13
+ /**
14
+ * If `true`, the left and right padding is removed.
15
+ * @default false
16
+ */
17
+ disableGutters?: boolean;
18
+ /**
19
+ * Set the max-width to match the min-width of the current breakpoint.
20
+ * This is useful if you'd prefer to design for a fixed set of sizes
21
+ * instead of trying to accommodate a fully fluid viewport.
22
+ * It's fluid by default.
23
+ * @default false
24
+ */
25
+ fixed?: boolean;
26
+ /**
27
+ * Determine the max-width of the container.
28
+ * The container width grows with the size of the screen.
29
+ * Set to `false` to disable `maxWidth`.
30
+ * @default 'lg'
31
+ */
32
+ maxWidth?: Breakpoint | false;
33
+ /**
34
+ * The system prop that allows defining system overrides as well as additional CSS styles.
35
+ */
36
+ sx?: SxProps<Theme>;
37
+ };
38
+ defaultComponent: D;
39
+ }
40
+ export declare type ContainerProps<D extends React.ElementType = ContainerTypeMap['defaultComponent'], P = {}> = OverrideProps<ContainerTypeMap<P, D>, D>;
@@ -1,22 +1,22 @@
1
- export interface ContainerClasses {
2
- /** Styles applied to the root element. */
3
- root: string;
4
- /** Styles applied to the root element if `disableGutters={true}`. */
5
- disableGutters: string;
6
- /** Styles applied to the root element if `fixed={true}`. */
7
- fixed: string;
8
- /** Styles applied to the root element if `maxWidth="xs"`. */
9
- maxWidthXs: string;
10
- /** Styles applied to the root element if `maxWidth="sm"`. */
11
- maxWidthSm: string;
12
- /** Styles applied to the root element if `maxWidth="md"`. */
13
- maxWidthMd: string;
14
- /** Styles applied to the root element if `maxWidth="lg"`. */
15
- maxWidthLg: string;
16
- /** Styles applied to the root element if `maxWidth="xl"`. */
17
- maxWidthXl: string;
18
- }
19
- export declare type ContainerClassKey = keyof ContainerClasses;
20
- export declare function getContainerUtilityClass(slot: string): string;
21
- declare const containerClasses: ContainerClasses;
22
- export default containerClasses;
1
+ export interface ContainerClasses {
2
+ /** Styles applied to the root element. */
3
+ root: string;
4
+ /** Styles applied to the root element if `disableGutters={true}`. */
5
+ disableGutters: string;
6
+ /** Styles applied to the root element if `fixed={true}`. */
7
+ fixed: string;
8
+ /** Styles applied to the root element if `maxWidth="xs"`. */
9
+ maxWidthXs: string;
10
+ /** Styles applied to the root element if `maxWidth="sm"`. */
11
+ maxWidthSm: string;
12
+ /** Styles applied to the root element if `maxWidth="md"`. */
13
+ maxWidthMd: string;
14
+ /** Styles applied to the root element if `maxWidth="lg"`. */
15
+ maxWidthLg: string;
16
+ /** Styles applied to the root element if `maxWidth="xl"`. */
17
+ maxWidthXl: string;
18
+ }
19
+ export declare type ContainerClassKey = keyof ContainerClasses;
20
+ export declare function getContainerUtilityClass(slot: string): string;
21
+ declare const containerClasses: ContainerClasses;
22
+ export default containerClasses;
@@ -1,18 +1,18 @@
1
- import * as React from 'react';
2
- import { Interpolation, StyledComponent } from '@mui/styled-engine';
3
- import { OverridableComponent } from '@mui/types';
4
- import { ContainerProps, ContainerTypeMap } from './ContainerProps';
5
- import { Theme as DefaultTheme } from '../createTheme';
6
- interface StyleFnProps<Theme> extends ContainerProps {
7
- theme: Theme;
8
- ownerState: ContainerProps;
9
- }
10
- declare type RequiredThemeStructure = Pick<DefaultTheme, 'breakpoints' | 'spacing'>;
11
- export default function createContainer<Theme extends RequiredThemeStructure = DefaultTheme>(options?: {
12
- createStyledComponent?: (...styles: Array<Interpolation<StyleFnProps<Theme>>>) => StyledComponent<ContainerProps>;
13
- useThemeProps?: (inProps: ContainerProps) => ContainerProps & {
14
- component?: React.ElementType;
15
- };
16
- componentName?: string;
17
- }): OverridableComponent<ContainerTypeMap<{}, "div">>;
18
- export {};
1
+ import * as React from 'react';
2
+ import { Interpolation, StyledComponent } from '@mui/styled-engine';
3
+ import { OverridableComponent } from '@mui/types';
4
+ import { ContainerProps, ContainerTypeMap } from './ContainerProps';
5
+ import { Theme as DefaultTheme } from '../createTheme';
6
+ interface StyleFnProps<Theme> extends ContainerProps {
7
+ theme: Theme;
8
+ ownerState: ContainerProps;
9
+ }
10
+ declare type RequiredThemeStructure = Pick<DefaultTheme, 'breakpoints' | 'spacing'>;
11
+ export default function createContainer<Theme extends RequiredThemeStructure = DefaultTheme>(options?: {
12
+ createStyledComponent?: (...styles: Array<Interpolation<StyleFnProps<Theme>>>) => StyledComponent<ContainerProps>;
13
+ useThemeProps?: (inProps: ContainerProps) => ContainerProps & {
14
+ component?: React.ElementType;
15
+ };
16
+ componentName?: string;
17
+ }): OverridableComponent<ContainerTypeMap<{}, "div">>;
18
+ export {};
package/README.md CHANGED
@@ -20,4 +20,4 @@ yarn add @mui/system @emotion/react @emotion/styled
20
20
 
21
21
  <!-- #default-branch-switch -->
22
22
 
23
- [The documentation](https://mui.com/system/basics/)
23
+ [The documentation](https://mui.com/system/getting-started/overview/)
@@ -0,0 +1,12 @@
1
+ /**
2
+ *
3
+ * Demos:
4
+ *
5
+ * - [Stack (Material UI)](https://mui.com/material-ui/react-stack/)
6
+ *
7
+ * API:
8
+ *
9
+ * - [Stack API](https://mui.com/system/api/stack/)
10
+ */
11
+ declare const Stack: import("@mui/types").OverridableComponent<import("./StackProps").StackTypeMap<{}, "div">>;
12
+ export default Stack;
package/Stack/Stack.js ADDED
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = void 0;
9
+
10
+ var _propTypes = _interopRequireDefault(require("prop-types"));
11
+
12
+ var _createStack = _interopRequireDefault(require("./createStack"));
13
+
14
+ /**
15
+ *
16
+ * Demos:
17
+ *
18
+ * - [Stack (Material UI)](https://mui.com/material-ui/react-stack/)
19
+ *
20
+ * API:
21
+ *
22
+ * - [Stack API](https://mui.com/system/api/stack/)
23
+ */
24
+ const Stack = (0, _createStack.default)();
25
+ process.env.NODE_ENV !== "production" ? Stack.propTypes
26
+ /* remove-proptypes */
27
+ = {
28
+ // ----------------------------- Warning --------------------------------
29
+ // | These PropTypes are generated from the TypeScript type definitions |
30
+ // | To update them edit TypeScript types and run "yarn proptypes" |
31
+ // ----------------------------------------------------------------------
32
+
33
+ /**
34
+ * The content of the component.
35
+ */
36
+ children: _propTypes.default.node,
37
+
38
+ /**
39
+ * Defines the `flex-direction` style property.
40
+ * It is applied for all screen sizes.
41
+ * @default 'column'
42
+ */
43
+ direction: _propTypes.default.oneOfType([_propTypes.default.oneOf(['column-reverse', 'column', 'row-reverse', 'row']), _propTypes.default.arrayOf(_propTypes.default.oneOf(['column-reverse', 'column', 'row-reverse', 'row'])), _propTypes.default.object]),
44
+
45
+ /**
46
+ * Add an element between each child.
47
+ */
48
+ divider: _propTypes.default.node,
49
+
50
+ /**
51
+ * Defines the space between immediate children.
52
+ * @default 0
53
+ */
54
+ spacing: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.string]),
55
+
56
+ /**
57
+ * The system prop, which allows defining system overrides as well as additional CSS styles.
58
+ */
59
+ sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object])
60
+ } : void 0;
61
+ var _default = Stack;
62
+ exports.default = _default;
@@ -0,0 +1,42 @@
1
+ import * as React from 'react';
2
+ import { OverrideProps } from '@mui/types';
3
+ import { ResponsiveStyleValue, SxProps } from '../styleFunctionSx';
4
+ import { SystemProps } from '../Box';
5
+ import { Theme } from '../createTheme';
6
+ export interface StackBaseProps {
7
+ /**
8
+ * The content of the component.
9
+ */
10
+ children?: React.ReactNode;
11
+ /**
12
+ * Defines the `flex-direction` style property.
13
+ * It is applied for all screen sizes.
14
+ * @default 'column'
15
+ */
16
+ direction?: ResponsiveStyleValue<'row' | 'row-reverse' | 'column' | 'column-reverse'>;
17
+ /**
18
+ * Defines the space between immediate children.
19
+ * @default 0
20
+ */
21
+ spacing?: ResponsiveStyleValue<number | string>;
22
+ /**
23
+ * Add an element between each child.
24
+ */
25
+ divider?: React.ReactNode;
26
+ }
27
+ export interface StackTypeMap<P = {}, D extends React.ElementType = 'div'> {
28
+ props: P & StackBaseProps & {
29
+ /**
30
+ * The system prop, which allows defining system overrides as well as additional CSS styles.
31
+ */
32
+ sx?: SxProps<Theme>;
33
+ } & SystemProps<Theme>;
34
+ defaultComponent: D;
35
+ }
36
+ export declare type StackProps<D extends React.ElementType = StackTypeMap['defaultComponent'], P = {
37
+ component?: React.ElementType;
38
+ }> = OverrideProps<StackTypeMap<P, D>, D>;
39
+ export interface StackOwnerState {
40
+ direction: StackProps['direction'];
41
+ spacing: StackProps['spacing'];
42
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1,21 @@
1
+ import * as React from 'react';
2
+ import { OverridableComponent } from '@mui/types';
3
+ import { StackTypeMap, StackOwnerState } from './StackProps';
4
+ import { Breakpoints } from '../createTheme/createBreakpoints';
5
+ import { Spacing } from '../createTheme/createSpacing';
6
+ interface StyleFunctionProps {
7
+ theme: {
8
+ breakpoints: Breakpoints;
9
+ spacing: Spacing;
10
+ };
11
+ ownerState: StackOwnerState;
12
+ }
13
+ declare const defaultCreateStyledComponent: import("@mui/styled-engine").CreateStyledComponent<import("../createStyled").MUIStyledCommonProps<any>, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.ClassAttributes<HTMLDivElement> | keyof React.HTMLAttributes<HTMLDivElement>>, {}, any>;
14
+ declare function useThemePropsDefault<T>(props: T): T & {};
15
+ export declare const style: ({ ownerState, theme }: StyleFunctionProps) => any;
16
+ export default function createStack(options?: {
17
+ createStyledComponent?: typeof defaultCreateStyledComponent;
18
+ useThemeProps?: typeof useThemePropsDefault;
19
+ componentName?: string;
20
+ }): OverridableComponent<StackTypeMap<{}, "div">>;
21
+ export {};