@mui/system 5.8.7 → 5.9.2
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 +200 -4
- package/Unstable_Grid/Grid.d.ts +12 -0
- package/Unstable_Grid/Grid.js +195 -0
- package/Unstable_Grid/GridProps.d.ts +162 -0
- package/Unstable_Grid/GridProps.js +5 -0
- package/Unstable_Grid/createGrid.d.ts +11 -0
- package/Unstable_Grid/createGrid.js +199 -0
- package/Unstable_Grid/gridClasses.d.ts +20 -0
- package/Unstable_Grid/gridClasses.js +25 -0
- package/Unstable_Grid/gridGenerator.d.ts +26 -0
- package/Unstable_Grid/gridGenerator.js +275 -0
- package/Unstable_Grid/index.d.ts +5 -0
- package/Unstable_Grid/index.js +65 -0
- package/Unstable_Grid/package.json +6 -0
- package/breakpoints.js +1 -1
- package/{grid.js → cssGrid.js} +0 -0
- package/cssVars/useCurrentColorScheme.js +1 -1
- package/esm/Unstable_Grid/Grid.js +184 -0
- package/esm/Unstable_Grid/GridProps.js +1 -0
- package/esm/Unstable_Grid/createGrid.js +177 -0
- package/esm/Unstable_Grid/gridClasses.js +14 -0
- package/esm/Unstable_Grid/gridGenerator.js +236 -0
- package/esm/Unstable_Grid/index.js +5 -0
- package/esm/breakpoints.js +1 -1
- package/esm/{grid.js → cssGrid.js} +0 -0
- package/esm/cssVars/useCurrentColorScheme.js +1 -1
- package/esm/getThemeValue.js +1 -1
- package/esm/index.js +9 -3
- package/getThemeValue.js +3 -3
- package/index.d.ts +3 -0
- package/index.js +30 -7
- package/legacy/Unstable_Grid/Grid.js +184 -0
- package/legacy/Unstable_Grid/GridProps.js +1 -0
- package/legacy/Unstable_Grid/createGrid.js +191 -0
- package/legacy/Unstable_Grid/gridClasses.js +27 -0
- package/legacy/Unstable_Grid/gridGenerator.js +245 -0
- package/legacy/Unstable_Grid/index.js +5 -0
- package/legacy/breakpoints.js +1 -1
- package/legacy/{grid.js → cssGrid.js} +0 -0
- package/legacy/cssVars/useCurrentColorScheme.js +1 -1
- package/legacy/getThemeValue.js +1 -1
- package/legacy/index.js +10 -4
- package/modern/Unstable_Grid/Grid.js +184 -0
- package/modern/Unstable_Grid/GridProps.js +1 -0
- package/modern/Unstable_Grid/createGrid.js +175 -0
- package/modern/Unstable_Grid/gridClasses.js +14 -0
- package/modern/Unstable_Grid/gridGenerator.js +232 -0
- package/modern/Unstable_Grid/index.js +5 -0
- package/modern/breakpoints.js +1 -1
- package/modern/{grid.js → cssGrid.js} +0 -0
- package/modern/cssVars/useCurrentColorScheme.js +1 -1
- package/modern/getThemeValue.js +1 -1
- package/modern/index.js +10 -4
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,201 @@
|
|
|
1
1
|
# [Versions](https://mui.com/versions/)
|
|
2
2
|
|
|
3
|
+
## 5.9.2
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v5.9.1..master -->
|
|
6
|
+
|
|
7
|
+
_Jul 25, 2022_
|
|
8
|
+
|
|
9
|
+
A big thanks to the 16 contributors who made this release possible. Here are some highlights ✨:
|
|
10
|
+
|
|
11
|
+
- 🧪 Ensure all Base components are `OverridableComponent` (#33506) @michaldudak
|
|
12
|
+
- 🧪 Various improvements on the Material `Stack` component (#33548, #33588, #33549) @hbjORbj
|
|
13
|
+
- Many other 🐛 bug fixes and 📚 documentation improvements
|
|
14
|
+
|
|
15
|
+
### `@mui/material@5.9.2`
|
|
16
|
+
|
|
17
|
+
- ​<!-- 34 -->Revert "[Tooltip] Fix children mouse over detection (#32321)" @oliviertassinari
|
|
18
|
+
- ​<!-- 19 -->[FormHelperText] Fix unable to create new variants (#33589) @DinhBaoTran
|
|
19
|
+
- ​<!-- 18 -->[ImageList] Remove vertical spacing between items in masonry layout (#33593) @michaldudak
|
|
20
|
+
- ​<!-- 13 -->[LoadingButton] Refactor duplicate code (#33570) @ZeeshanTamboli
|
|
21
|
+
- ​<!-- 12 -->[Modal] Explain the meaning of deprecation of the BackdropComponent prop (#33591) @michaldudak
|
|
22
|
+
- ​<!-- 11 -->[Stack] Fix unit test failure (#33588) @hbjORbj
|
|
23
|
+
- ​<!-- 10 -->[Stack] Fix default `flexDirection` value with responsive prop (#33549) @hbjORbj
|
|
24
|
+
- ​<!-- 09 -->[Stack] Ensure that `marginundefined` doesn't occur in styling (#33548) @hbjORbj
|
|
25
|
+
- ​<!-- 08 -->[Tabs] Fix `indicatorColor` prop type (#33569) @ZeeshanTamboli
|
|
26
|
+
- ​<!-- 07 -->[Tabs] Add TypeScript interface to augment tab indicator color in theme (#33333) @AHeiming
|
|
27
|
+
|
|
28
|
+
### `@mui/base@5.0.0-alpha.91`
|
|
29
|
+
|
|
30
|
+
- ​<!-- 33 -->[Base] Make PopperUnstyled `component` overridable (#33573) @siriwatknp
|
|
31
|
+
- ​<!-- 32 -->[Base] Ensure all components are OverridableComponent (#33506) @michaldudak
|
|
32
|
+
|
|
33
|
+
### `@mui/joy@5.0.0-alpha.38`
|
|
34
|
+
|
|
35
|
+
- ​<!-- 17 -->[Select] Add new component in Joy (#33630) @siriwatknp
|
|
36
|
+
- ​<!-- 15 -->[Joy] Add Text field documentation (#33430, #33631) @danilo-leal
|
|
37
|
+
- ​<!-- 14 -->[Joy] Add menu components (#31789) @siriwatknp
|
|
38
|
+
|
|
39
|
+
### Docs
|
|
40
|
+
|
|
41
|
+
- ​<!-- 31 -->[blog] Fix 404 link to Algolia docs search (dd4308d) @oliviertassinari
|
|
42
|
+
- ​<!-- 28 -->[docs] Add accessibility tips (#33633) @siriwatknp
|
|
43
|
+
- ​<!-- 27 -->[docs] Fix production deploy of codesandboxes (#33608) @oliviertassinari
|
|
44
|
+
- ​<!-- 26 -->[docs] Show border on `palette.background.paper` in dark mode docs (#33611) @ZeeshanTamboli
|
|
45
|
+
- ​<!-- 25 -->[docs] Fix typo in Joy UI dark mode page (#33620) @bairamau
|
|
46
|
+
- ​<!-- 24 -->[docs] Final polish on Base docs - formatting and style consistency (#33156) @samuelsycamore
|
|
47
|
+
- ​<!-- 23 -->[docs] Fix `CssBaseline` import in example code (#33614) @dd-ssc
|
|
48
|
+
- ​<!-- 22 -->[docs] Fix Toolpad docs redirection (#33524) @bharatkashyap
|
|
49
|
+
- ​<!-- 21 -->[docs] Fix link to Snackbar customization section in Alert docs (#33586) @ZeeshanTamboli
|
|
50
|
+
- ​<!-- 20 -->[docs] Fix `placement choices` typo in Tooltip docs (#33571) @MonstraG
|
|
51
|
+
- ​<!-- 05 -->[website] Update home page's sponsor grid (#33528) @danilo-leal
|
|
52
|
+
- ​<!-- 04 -->[website] Add Vytautas to the about page (#33567) @bytasv
|
|
53
|
+
- ​<!-- 03 -->[website] Improve newsletter input design (#33585) @danilo-leal
|
|
54
|
+
- ​<!-- 02 -->[website] Add YouTube link to footer (#33580) @gerdadesign
|
|
55
|
+
- ​<!-- 01 -->[website] Clarify scope of technical support (#33435) @joserodolfofreitas
|
|
56
|
+
|
|
57
|
+
### Core
|
|
58
|
+
|
|
59
|
+
- ​<!-- 30 -->[core] Swallow ad blocker fetch fail (#33617) @oliviertassinari
|
|
60
|
+
- ​<!-- 29 -->[core] Fix dep security by resolving `thenify` to latest (#33612) @siriwatknp
|
|
61
|
+
- ​<!-- 06 -->[test] Remove `view` option from Event in Snackbar tests (#33555) @ZeeshanTamboli
|
|
62
|
+
|
|
63
|
+
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
|
|
64
|
+
|
|
65
|
+
## 5.9.1
|
|
66
|
+
|
|
67
|
+
<!-- generated comparing v5.9.0..master -->
|
|
68
|
+
|
|
69
|
+
_Jul 18, 2022_
|
|
70
|
+
|
|
71
|
+
A big thanks to the 17 contributors who made this release possible. This release is mainly about 🐛 bug fixes and 📚 documentation improvements
|
|
72
|
+
|
|
73
|
+
### `@mui/material@5.9.1`
|
|
74
|
+
|
|
75
|
+
- ​<!-- 24 -->[Autocomplete] Fix disabling component crashing when focused (#31313) @mzedel
|
|
76
|
+
- ​<!-- 07 -->[Grid] Avoid scrollbar in demo (#33527) @oliviertassinari
|
|
77
|
+
- ​<!-- 05 -->[Slider] Fix transition of tooltips on vertical slider (#33009) @abhinav-22-tech
|
|
78
|
+
- ​<!-- 01 -->[TouchRipple] Fix crash on android where `event.touches` are an empty array (#32974) @lukeggchapman
|
|
79
|
+
|
|
80
|
+
### `@mui/system@5.9.1`
|
|
81
|
+
|
|
82
|
+
- ​<!-- 04 -->[system] Add flag to switch negative margin approach in Grid (#33484) @siriwatknp
|
|
83
|
+
- ​<!-- 03 -->[system] Remove needless optional chaining check in `createEmptyBreakpointObject` method (#33482) @ZeeshanTamboli
|
|
84
|
+
|
|
85
|
+
### `@mui/base@5.0.0-alpha.90`
|
|
86
|
+
|
|
87
|
+
- ​<!-- 23 -->[base] Export types used by components' props (#33522) @michaldudak
|
|
88
|
+
- ​<!-- 22 -->[base] Add missing type definitions in useControllableReducer (#33496) @michaldudak
|
|
89
|
+
- ​<!-- 06 -->[SelectUnstyled] Do not call onChange unnecessarily (#33408) @michaldudak
|
|
90
|
+
|
|
91
|
+
### `@mui/lab@5.0.0-alpha.91`
|
|
92
|
+
|
|
93
|
+
- ​<!-- 02 -->[TimelineDot] Add TimelineDotPropsColorOverrides interface to extend color options (#33466) @lolaignatova
|
|
94
|
+
|
|
95
|
+
### Docs
|
|
96
|
+
|
|
97
|
+
- ​<!-- 19 -->[docs] Add note about CssBaseline in the dark mode page (#33108) @GabrielaLokelani
|
|
98
|
+
- ​<!-- 18 -->[docs] Fix typos in the Interoperability page (#33273) @HexM7
|
|
99
|
+
- ​<!-- 17 -->[docs] Improve the `useTheme` documentation (#33508) @rickstaa
|
|
100
|
+
- ​<!-- 16 -->[docs] Fix 301 redirections (#33521) @oliviertassinari
|
|
101
|
+
- ​<!-- 15 -->[docs] Link the same codesandbox as in the docs (#33472) @oliviertassinari
|
|
102
|
+
- ​<!-- 14 -->[docs] Fix copy search false positives (#33438) @oliviertassinari
|
|
103
|
+
- ​<!-- 13 -->[docs] Fix typo (#33520) @aravindpanicker
|
|
104
|
+
- ​<!-- 12 -->[docs] Update Tailwind docs to include step about updating popover containers (#33315) @ajhenry
|
|
105
|
+
- ​<!-- 11 -->[docs] Add yarn command for Roboto font in Material UI's typography.md (#33485) @anthonypz
|
|
106
|
+
- ​<!-- 10 -->[docs] Add new community content to the Material UI Learn page (#32927) @Nikhilthadani
|
|
107
|
+
- ​<!-- 09 -->[examples] Change createEmotionCache to use `insertionPoint` (#32104) @ANTARES-KOR
|
|
108
|
+
- ​<!-- 08 -->[examples] Fix error in Next.js example with @mui/styles (#33456) @paustria
|
|
109
|
+
|
|
110
|
+
### Core
|
|
111
|
+
|
|
112
|
+
- ​<!-- 21 -->[core] Cleanup experiments (#33547) @siriwatknp
|
|
113
|
+
- ​<!-- 20 -->[core] Update CHANGELOG to include pickers breaking change (#33486) @siriwatknp
|
|
114
|
+
|
|
115
|
+
All contributors of this release in alphabetical order: @abhinav-22-tech, @ajhenry, @ANTARES-KOR, @anthonypz, @aravindpanicker, @GabrielaLokelani, @HexM7, @lolaignatova, @lukeggchapman, @michaldudak, @mzedel, @Nikhilthadani, @oliviertassinari, @paustria, @rickstaa, @siriwatknp, @ZeeshanTamboli
|
|
116
|
+
|
|
117
|
+
## 5.9.0
|
|
118
|
+
|
|
119
|
+
<!-- generated comparing v5.8.7..master -->
|
|
120
|
+
|
|
121
|
+
_Jul 12, 2022_
|
|
122
|
+
|
|
123
|
+
A big thanks to the 19 contributors who made this release possible. Here are some highlights ✨:
|
|
124
|
+
|
|
125
|
+
- 🧪 Exported Grid v2 as `Unstable_Grid2` (#33479) @siriwatknp
|
|
126
|
+
- 📖 Added a guide for using Joy UI and Material UI together (#33396) @siriwatknp
|
|
127
|
+
- 🐛 Fixed a few bugs in Material UI components. Thanks to @ZeeshanTamboli, @ivan-ngchakming, and @joebingham-wk.
|
|
128
|
+
- ⚠️ **[BREAKING CHANGE]** Date pickers were removed from the lab. Learn how to migrate by visiting the [migration guide](https://mui.com/x/react-date-pickers/migration-lab/). (#33386) @flaviendelangle
|
|
129
|
+
- many other 🐛 bug fixes and 📚 documentation improvements
|
|
130
|
+
- our documentation site is now running with React 18! (#33196) @mnajdova
|
|
131
|
+
|
|
132
|
+
### `@mui/material@5.9.0`
|
|
133
|
+
|
|
134
|
+
- [CssBaseline] Fixes in overriding style (#33338) @ZeeshanTamboli
|
|
135
|
+
- [Autocomplete] Remove unnecessary `clsx` wrapper for single className (#33398) @ZeeshanTamboli
|
|
136
|
+
- [Grid] Export new grid as unstable (#33479) @siriwatknp
|
|
137
|
+
- [Tooltip] Fix children mouse over detection (#32321) @ivan-ngchakming
|
|
138
|
+
- [TypeScript] getCssVar autocomplete for Material UI (#33464) @siriwatknp
|
|
139
|
+
- [TypeScript] Fix theme options components types to use `Theme` (#33434) @siriwatknp
|
|
140
|
+
- [TypeScript] Reexports necessary types for module augmentation (#33397) @siriwatknp
|
|
141
|
+
- [ScopedCssBaseline] Add sx typings (#33474) @joebingham-wk
|
|
142
|
+
|
|
143
|
+
### `@mui/system@5.9.0`
|
|
144
|
+
|
|
145
|
+
- [System] Add offset feature to Grid (#33415) @siriwatknp
|
|
146
|
+
- [system] Add new `Grid` implementation (#32746) @siriwatknp
|
|
147
|
+
|
|
148
|
+
### `@mui/lab@5.0.0-alpha.90`
|
|
149
|
+
|
|
150
|
+
**⚠️ Breaking changes**
|
|
151
|
+
|
|
152
|
+
- [lab] Remove the pickers (#33386) @flaviendelangle
|
|
153
|
+
|
|
154
|
+
The pickers are moved to MUI X, check out the [migration guide](https://mui.com/x/react-date-pickers/migration-lab/).
|
|
155
|
+
|
|
156
|
+
**Changes**
|
|
157
|
+
|
|
158
|
+
- [Masonry] Support rem/em values for spacing prop (#33384) @hbjORbj
|
|
159
|
+
|
|
160
|
+
### `@mui/base@5.0.0-alpha.89`
|
|
161
|
+
|
|
162
|
+
- Base] Change the order of class names merged in useSlotProps (#33383) @michaldudak
|
|
163
|
+
- [ModalUnstyled] Accept callbacks in componentsProps (#33181) @michaldudak
|
|
164
|
+
- [SelectUnstyled] Accept callbacks in componentsProps (#33197) @michaldudak
|
|
165
|
+
- [TabsUnstyled] Accept callbacks in componentsProps (#33284) @michaldudak
|
|
166
|
+
|
|
167
|
+
### `@mui/joy@5.0.0-alpha.36`
|
|
168
|
+
|
|
169
|
+
- [Joy] Add guide about using Joy and Material UI together (#33396) @siriwatknp
|
|
170
|
+
- [Joy] Fix variants color palette regressions (#33394) @danilo-leal
|
|
171
|
+
|
|
172
|
+
### Docs
|
|
173
|
+
|
|
174
|
+
- [docs] Correcting small grammatical error (#33393) @robyyo
|
|
175
|
+
- [docs] Link to the correct package on Joy component pages (#33439) @cherniavskii
|
|
176
|
+
- [docs] Fix e2e tests (#33477) @siriwatknp
|
|
177
|
+
- [docs] Fix dead links (#33462) @oliviertassinari
|
|
178
|
+
- [docs] Cleanup the migration (#33463) @siriwatknp
|
|
179
|
+
- [docs] Fix broken Sponsoring services links @samuelsycamore
|
|
180
|
+
- [docs] Improve repo README with light/dark logos, relative links and more (#33356) @samuelsycamore
|
|
181
|
+
- [docs] Update links to MUI X Overview and Introduction pages (#33201) @samuelsycamore
|
|
182
|
+
- [docs] Update to React 18 (#33196) @mnajdova
|
|
183
|
+
- [docs] Simplify "Upload button" demo (#33326) @baharalidurrani
|
|
184
|
+
- [docs] Add "refine" demo to showcase (#33240) @omeraplak
|
|
185
|
+
- [docs] Add webpack alias for legacy utils package (#33376) @jgbae
|
|
186
|
+
- [docs] Improve external link icons synonyms (#33257) @davidgarciab
|
|
187
|
+
- [examples] Update MUI Base with Tailwind CSS to use the latest versions of the dependencies (#33401) @mnajdova
|
|
188
|
+
- [examples] Add MUI base example (#33154) @siriwatknp
|
|
189
|
+
|
|
190
|
+
### Core
|
|
191
|
+
|
|
192
|
+
- [core] Fix @mui/monorepo regression for the import of the docs infra (#33390) @Janpot
|
|
193
|
+
- [core] Remove old babel resolve rule (#33432) @oliviertassinari
|
|
194
|
+
- [website] Shorten the plan descriptions on the pricing page (#32984) @joserodolfofreitas
|
|
195
|
+
- [website] Link EULA in the license quantity section (#33292) @oliviertassinari
|
|
196
|
+
|
|
197
|
+
All contributors of this release in alphabetical order: @baharalidurrani, @cherniavskii, @danilo-leal, @davidgarciab, @flaviendelangle, @hbjORbj, @ivan-ngchakming, @Janpot, @jgbae, @joebingham-wk, @joserodolfofreitas, @michaldudak, @mnajdova, @oliviertassinari, @omeraplak, @robyyo, @samuelsycamore, @siriwatknp, @ZeeshanTamboli
|
|
198
|
+
|
|
3
199
|
## 5.8.7
|
|
4
200
|
|
|
5
201
|
<!-- generated comparing v5.8.6..master -->
|
|
@@ -1930,7 +2126,7 @@ A big thanks to the 16 contributors who made this release possible. Here are som
|
|
|
1930
2126
|
- ​<!-- 19 -->[docs] Sync translations with Crowdin (#30067) @l10nbot
|
|
1931
2127
|
- ​<!-- 18 -->[docs] Fix link on "Custom variables" section in the Theming page #30100 @danilo-leal
|
|
1932
2128
|
- ​<!-- 17 -->[docs] Fix justifyContent option in the Grid interactive demo (#30117) @danilo-leal
|
|
1933
|
-
- ​<!-- 16 -->[docs] Add tip to help access the docs of a previous version when finding answers in
|
|
2129
|
+
- ​<!-- 16 -->[docs] Add tip to help access the docs of a previous version when finding answers in Stack Overflow (#30101) @danilo-leal
|
|
1934
2130
|
- ​<!-- 15 -->[docs] Fix import example inside Unstyled Backdrop section (#30098) @TheodosiouTh
|
|
1935
2131
|
- ​<!-- 01 -->[website] Column pinning and Tree data are out (#30136) @oliviertassinari
|
|
1936
2132
|
- ​<!-- 07 -->[survey] Remove survey promotion items (#30122) @danilo-leal
|
|
@@ -2011,7 +2207,7 @@ A big thanks to the 25 contributors who made this release possible. Here are som
|
|
|
2011
2207
|
- ​<!-- 21 -->[docs] Update nextjs-typescript-example (#29974) @huydhoang
|
|
2012
2208
|
- ​<!-- 20 -->[docs] Add missing global state classes to API docs generator (#29945) @michaldudak
|
|
2013
2209
|
- ​<!-- 19 -->[docs] Fix benchmarks folder link (#29981) @fourjr
|
|
2014
|
-
- ​<!-- 18 -->[docs] Improve wording in
|
|
2210
|
+
- ​<!-- 18 -->[docs] Improve wording in Stack Overflow section of support page (#29956) @ronwarner
|
|
2015
2211
|
- ​<!-- 17 -->[docs] Remove Black Friday sale notification (#29936) @mbrookes
|
|
2016
2212
|
- ​<!-- 16 -->[examples] Fix typos in the Remix example (#30071) @MichaelDeBoey
|
|
2017
2213
|
- ​<!-- 15 -->[examples] Add Remix example (#29952) @mnajdova
|
|
@@ -2024,7 +2220,7 @@ A big thanks to the 25 contributors who made this release possible. Here are som
|
|
|
2024
2220
|
### Core
|
|
2025
2221
|
|
|
2026
2222
|
- ​<!-- 31 -->[core] Batch small changes (#30042) @oliviertassinari
|
|
2027
|
-
- ​<!-- 28 -->[core] Transition to a new
|
|
2223
|
+
- ​<!-- 28 -->[core] Transition to a new Stack Overflow tag (#29967) @oliviertassinari
|
|
2028
2224
|
|
|
2029
2225
|
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
|
|
2030
2226
|
|
|
@@ -5710,7 +5906,7 @@ A big thanks to the 30 contributors who made this release possible. Here are som
|
|
|
5710
5906
|
#### Breaking changes
|
|
5711
5907
|
|
|
5712
5908
|
- ​<!-- 91 -->[types] Rename the exported `Omit` type in `@material-ui/types`. (#24795) @petyosi
|
|
5713
|
-
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
|
|
5909
|
+
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).
|
|
5714
5910
|
|
|
5715
5911
|
```diff
|
|
5716
5912
|
-import { Omit } from '@material-ui/types';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Demos:
|
|
4
|
+
*
|
|
5
|
+
* - [Grid (Material UI)](https://mui.com/material-ui/react-grid/)
|
|
6
|
+
*
|
|
7
|
+
* API:
|
|
8
|
+
*
|
|
9
|
+
* - [Grid API](https://mui.com/system/api/grid/)
|
|
10
|
+
*/
|
|
11
|
+
declare const Grid: import("@mui/types").OverridableComponent<import("./GridProps").GridTypeMap<{}, "div">>;
|
|
12
|
+
export default Grid;
|
|
@@ -0,0 +1,195 @@
|
|
|
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 _createGrid = _interopRequireDefault(require("./createGrid"));
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* Demos:
|
|
17
|
+
*
|
|
18
|
+
* - [Grid (Material UI)](https://mui.com/material-ui/react-grid/)
|
|
19
|
+
*
|
|
20
|
+
* API:
|
|
21
|
+
*
|
|
22
|
+
* - [Grid API](https://mui.com/system/api/grid/)
|
|
23
|
+
*/
|
|
24
|
+
const Grid = (0, _createGrid.default)();
|
|
25
|
+
process.env.NODE_ENV !== "production" ? Grid.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
|
+
* The number of columns.
|
|
40
|
+
* @default 12
|
|
41
|
+
*/
|
|
42
|
+
columns: _propTypes.default
|
|
43
|
+
/* @typescript-to-proptypes-ignore */
|
|
44
|
+
.oneOfType([_propTypes.default.arrayOf(_propTypes.default.number), _propTypes.default.number, _propTypes.default.object]),
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Defines the horizontal space between the type `item` components.
|
|
48
|
+
* It overrides the value of the `spacing` prop.
|
|
49
|
+
*/
|
|
50
|
+
columnSpacing: _propTypes.default
|
|
51
|
+
/* @typescript-to-proptypes-ignore */
|
|
52
|
+
.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.string]),
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* If `true`, the component will have the flex *container* behavior.
|
|
56
|
+
* You should be wrapping *items* with a *container*.
|
|
57
|
+
* @default false
|
|
58
|
+
*/
|
|
59
|
+
container: _propTypes.default.bool,
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Defines the `flex-direction` style property.
|
|
63
|
+
* It is applied for all screen sizes.
|
|
64
|
+
* @default 'row'
|
|
65
|
+
*/
|
|
66
|
+
direction: _propTypes.default
|
|
67
|
+
/* @typescript-to-proptypes-ignore */
|
|
68
|
+
.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]),
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* If `true`, the negative margin and padding are apply only to the top and left sides of the grid.
|
|
72
|
+
*/
|
|
73
|
+
disableEqualOverflow: _propTypes.default.bool,
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* If a number, it sets the number of columns the grid item uses.
|
|
77
|
+
* It can't be greater than the total number of columns of the container (12 by default).
|
|
78
|
+
* If 'auto', the grid item's width matches its content.
|
|
79
|
+
* If false, the prop is ignored.
|
|
80
|
+
* If true, the grid item's width grows to use the space available in the grid container.
|
|
81
|
+
* The value is applied for the `lg` breakpoint and wider screens if not overridden.
|
|
82
|
+
* @default false
|
|
83
|
+
*/
|
|
84
|
+
lg: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number, _propTypes.default.bool]),
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* If a number, it sets the margin-left equals to the number of columns the grid item uses.
|
|
88
|
+
* If 'auto', the grid item push itself to the right-end of the container.
|
|
89
|
+
* The value is applied for the `lg` breakpoint and wider screens if not overridden.
|
|
90
|
+
*/
|
|
91
|
+
lgOffset: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number]),
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* If a number, it sets the number of columns the grid item uses.
|
|
95
|
+
* It can't be greater than the total number of columns of the container (12 by default).
|
|
96
|
+
* If 'auto', the grid item's width matches its content.
|
|
97
|
+
* If false, the prop is ignored.
|
|
98
|
+
* If true, the grid item's width grows to use the space available in the grid container.
|
|
99
|
+
* The value is applied for the `md` breakpoint and wider screens if not overridden.
|
|
100
|
+
* @default false
|
|
101
|
+
*/
|
|
102
|
+
md: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number, _propTypes.default.bool]),
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* If a number, it sets the margin-left equals to the number of columns the grid item uses.
|
|
106
|
+
* If 'auto', the grid item push itself to the right-end of the container.
|
|
107
|
+
* The value is applied for the `md` breakpoint and wider screens if not overridden.
|
|
108
|
+
*/
|
|
109
|
+
mdOffset: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number]),
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Defines the vertical space between the type `item` components.
|
|
113
|
+
* It overrides the value of the `spacing` prop.
|
|
114
|
+
*/
|
|
115
|
+
rowSpacing: _propTypes.default
|
|
116
|
+
/* @typescript-to-proptypes-ignore */
|
|
117
|
+
.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.string]),
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* If a number, it sets the number of columns the grid item uses.
|
|
121
|
+
* It can't be greater than the total number of columns of the container (12 by default).
|
|
122
|
+
* If 'auto', the grid item's width matches its content.
|
|
123
|
+
* If false, the prop is ignored.
|
|
124
|
+
* If true, the grid item's width grows to use the space available in the grid container.
|
|
125
|
+
* The value is applied for the `sm` breakpoint and wider screens if not overridden.
|
|
126
|
+
* @default false
|
|
127
|
+
*/
|
|
128
|
+
sm: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number, _propTypes.default.bool]),
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* If a number, it sets the margin-left equals to the number of columns the grid item uses.
|
|
132
|
+
* If 'auto', the grid item push itself to the right-end of the container.
|
|
133
|
+
* The value is applied for the `sm` breakpoint and wider screens if not overridden.
|
|
134
|
+
*/
|
|
135
|
+
smOffset: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number]),
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Defines the space between the type `item` components.
|
|
139
|
+
* It can only be used on a type `container` component.
|
|
140
|
+
* @default 0
|
|
141
|
+
*/
|
|
142
|
+
spacing: _propTypes.default
|
|
143
|
+
/* @typescript-to-proptypes-ignore */
|
|
144
|
+
.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.string]),
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* @ignore
|
|
148
|
+
*/
|
|
149
|
+
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]),
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Defines the `flex-wrap` style property.
|
|
153
|
+
* It's applied for all screen sizes.
|
|
154
|
+
* @default 'wrap'
|
|
155
|
+
*/
|
|
156
|
+
wrap: _propTypes.default.oneOf(['nowrap', 'wrap-reverse', 'wrap']),
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* If a number, it sets the number of columns the grid item uses.
|
|
160
|
+
* It can't be greater than the total number of columns of the container (12 by default).
|
|
161
|
+
* If 'auto', the grid item's width matches its content.
|
|
162
|
+
* If false, the prop is ignored.
|
|
163
|
+
* If true, the grid item's width grows to use the space available in the grid container.
|
|
164
|
+
* The value is applied for the `xl` breakpoint and wider screens if not overridden.
|
|
165
|
+
* @default false
|
|
166
|
+
*/
|
|
167
|
+
xl: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number, _propTypes.default.bool]),
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* If a number, it sets the margin-left equals to the number of columns the grid item uses.
|
|
171
|
+
* If 'auto', the grid item push itself to the right-end of the container.
|
|
172
|
+
* The value is applied for the `xl` breakpoint and wider screens if not overridden.
|
|
173
|
+
*/
|
|
174
|
+
xlOffset: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number]),
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* If a number, it sets the number of columns the grid item uses.
|
|
178
|
+
* It can't be greater than the total number of columns of the container (12 by default).
|
|
179
|
+
* If 'auto', the grid item's width matches its content.
|
|
180
|
+
* If false, the prop is ignored.
|
|
181
|
+
* If true, the grid item's width grows to use the space available in the grid container.
|
|
182
|
+
* The value is applied for all the screen sizes with the lowest priority.
|
|
183
|
+
* @default false
|
|
184
|
+
*/
|
|
185
|
+
xs: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number, _propTypes.default.bool]),
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* If a number, it sets the margin-left equals to the number of columns the grid item uses.
|
|
189
|
+
* If 'auto', the grid item push itself to the right-end of the container.
|
|
190
|
+
* The value is applied for the `xs` breakpoint and wider screens if not overridden.
|
|
191
|
+
*/
|
|
192
|
+
xsOffset: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number])
|
|
193
|
+
} : void 0;
|
|
194
|
+
var _default = Grid;
|
|
195
|
+
exports.default = _default;
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { OverrideProps, IfEquals } from '@mui/types';
|
|
3
|
+
import { SxProps } from '../styleFunctionSx';
|
|
4
|
+
import { Theme, Breakpoint, BreakpointOverrides } from '../createTheme';
|
|
5
|
+
import { SystemProps } from '../Box';
|
|
6
|
+
declare type ResponsiveStyleValue<T> = T | Array<T | null> | {
|
|
7
|
+
[key in Breakpoint]?: T | null;
|
|
8
|
+
};
|
|
9
|
+
export declare type GridDirection = 'row' | 'row-reverse' | 'column' | 'column-reverse';
|
|
10
|
+
export declare type GridSpacing = number | string;
|
|
11
|
+
export declare type GridWrap = 'nowrap' | 'wrap' | 'wrap-reverse';
|
|
12
|
+
export declare type GridSize = 'auto' | number;
|
|
13
|
+
export interface GridDefaultBreakpoints {
|
|
14
|
+
/**
|
|
15
|
+
* If a number, it sets the number of columns the grid item uses.
|
|
16
|
+
* It can't be greater than the total number of columns of the container (12 by default).
|
|
17
|
+
* If 'auto', the grid item's width matches its content.
|
|
18
|
+
* If false, the prop is ignored.
|
|
19
|
+
* If true, the grid item's width grows to use the space available in the grid container.
|
|
20
|
+
* The value is applied for the `lg` breakpoint and wider screens if not overridden.
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
23
|
+
lg?: boolean | GridSize;
|
|
24
|
+
/**
|
|
25
|
+
* If a number, it sets the margin-left equals to the number of columns the grid item uses.
|
|
26
|
+
* If 'auto', the grid item push itself to the right-end of the container.
|
|
27
|
+
* The value is applied for the `lg` breakpoint and wider screens if not overridden.
|
|
28
|
+
*/
|
|
29
|
+
lgOffset?: GridSize;
|
|
30
|
+
/**
|
|
31
|
+
* If a number, it sets the number of columns the grid item uses.
|
|
32
|
+
* It can't be greater than the total number of columns of the container (12 by default).
|
|
33
|
+
* If 'auto', the grid item's width matches its content.
|
|
34
|
+
* If false, the prop is ignored.
|
|
35
|
+
* If true, the grid item's width grows to use the space available in the grid container.
|
|
36
|
+
* The value is applied for the `md` breakpoint and wider screens if not overridden.
|
|
37
|
+
* @default false
|
|
38
|
+
*/
|
|
39
|
+
md?: boolean | GridSize;
|
|
40
|
+
/**
|
|
41
|
+
* If a number, it sets the margin-left equals to the number of columns the grid item uses.
|
|
42
|
+
* If 'auto', the grid item push itself to the right-end of the container.
|
|
43
|
+
* The value is applied for the `md` breakpoint and wider screens if not overridden.
|
|
44
|
+
*/
|
|
45
|
+
mdOffset?: GridSize;
|
|
46
|
+
/**
|
|
47
|
+
* If a number, it sets the number of columns the grid item uses.
|
|
48
|
+
* It can't be greater than the total number of columns of the container (12 by default).
|
|
49
|
+
* If 'auto', the grid item's width matches its content.
|
|
50
|
+
* If false, the prop is ignored.
|
|
51
|
+
* If true, the grid item's width grows to use the space available in the grid container.
|
|
52
|
+
* The value is applied for the `sm` breakpoint and wider screens if not overridden.
|
|
53
|
+
* @default false
|
|
54
|
+
*/
|
|
55
|
+
sm?: boolean | GridSize;
|
|
56
|
+
/**
|
|
57
|
+
* If a number, it sets the margin-left equals to the number of columns the grid item uses.
|
|
58
|
+
* If 'auto', the grid item push itself to the right-end of the container.
|
|
59
|
+
* The value is applied for the `sm` breakpoint and wider screens if not overridden.
|
|
60
|
+
*/
|
|
61
|
+
smOffset?: GridSize;
|
|
62
|
+
/**
|
|
63
|
+
* If a number, it sets the number of columns the grid item uses.
|
|
64
|
+
* It can't be greater than the total number of columns of the container (12 by default).
|
|
65
|
+
* If 'auto', the grid item's width matches its content.
|
|
66
|
+
* If false, the prop is ignored.
|
|
67
|
+
* If true, the grid item's width grows to use the space available in the grid container.
|
|
68
|
+
* The value is applied for the `xl` breakpoint and wider screens if not overridden.
|
|
69
|
+
* @default false
|
|
70
|
+
*/
|
|
71
|
+
xl?: boolean | GridSize;
|
|
72
|
+
/**
|
|
73
|
+
* If a number, it sets the margin-left equals to the number of columns the grid item uses.
|
|
74
|
+
* If 'auto', the grid item push itself to the right-end of the container.
|
|
75
|
+
* The value is applied for the `xl` breakpoint and wider screens if not overridden.
|
|
76
|
+
*/
|
|
77
|
+
xlOffset?: GridSize;
|
|
78
|
+
/**
|
|
79
|
+
* If a number, it sets the number of columns the grid item uses.
|
|
80
|
+
* It can't be greater than the total number of columns of the container (12 by default).
|
|
81
|
+
* If 'auto', the grid item's width matches its content.
|
|
82
|
+
* If false, the prop is ignored.
|
|
83
|
+
* If true, the grid item's width grows to use the space available in the grid container.
|
|
84
|
+
* The value is applied for all the screen sizes with the lowest priority.
|
|
85
|
+
* @default false
|
|
86
|
+
*/
|
|
87
|
+
xs?: boolean | GridSize;
|
|
88
|
+
/**
|
|
89
|
+
* If a number, it sets the margin-left equals to the number of columns the grid item uses.
|
|
90
|
+
* If 'auto', the grid item push itself to the right-end of the container.
|
|
91
|
+
* The value is applied for the `xs` breakpoint and wider screens if not overridden.
|
|
92
|
+
*/
|
|
93
|
+
xsOffset?: GridSize;
|
|
94
|
+
}
|
|
95
|
+
declare type CustomBreakpoints = Partial<Record<Breakpoint, boolean | GridSize> & Record<`${Breakpoint}Offset`, GridSize>>;
|
|
96
|
+
interface BreakpointOverridesEmpty {
|
|
97
|
+
}
|
|
98
|
+
declare type Breakpoints = IfEquals<BreakpointOverrides, BreakpointOverridesEmpty, GridDefaultBreakpoints, CustomBreakpoints>;
|
|
99
|
+
export interface GridBaseProps extends Breakpoints {
|
|
100
|
+
/**
|
|
101
|
+
* The content of the component.
|
|
102
|
+
*/
|
|
103
|
+
children?: React.ReactNode;
|
|
104
|
+
/**
|
|
105
|
+
* The number of columns.
|
|
106
|
+
* @default 12
|
|
107
|
+
*/
|
|
108
|
+
columns?: ResponsiveStyleValue<number>;
|
|
109
|
+
/**
|
|
110
|
+
* Defines the horizontal space between the type `item` components.
|
|
111
|
+
* It overrides the value of the `spacing` prop.
|
|
112
|
+
*/
|
|
113
|
+
columnSpacing?: ResponsiveStyleValue<GridSpacing>;
|
|
114
|
+
/**
|
|
115
|
+
* If `true`, the component will have the flex *container* behavior.
|
|
116
|
+
* You should be wrapping *items* with a *container*.
|
|
117
|
+
* @default false
|
|
118
|
+
*/
|
|
119
|
+
container?: boolean;
|
|
120
|
+
/**
|
|
121
|
+
* Defines the `flex-direction` style property.
|
|
122
|
+
* It is applied for all screen sizes.
|
|
123
|
+
* @default 'row'
|
|
124
|
+
*/
|
|
125
|
+
direction?: ResponsiveStyleValue<GridDirection>;
|
|
126
|
+
/**
|
|
127
|
+
* If `true`, the negative margin and padding are apply only to the top and left sides of the grid.
|
|
128
|
+
*/
|
|
129
|
+
disableEqualOverflow?: boolean;
|
|
130
|
+
/**
|
|
131
|
+
* Defines the vertical space between the type `item` components.
|
|
132
|
+
* It overrides the value of the `spacing` prop.
|
|
133
|
+
*/
|
|
134
|
+
rowSpacing?: ResponsiveStyleValue<GridSpacing>;
|
|
135
|
+
/**
|
|
136
|
+
* Defines the space between the type `item` components.
|
|
137
|
+
* It can only be used on a type `container` component.
|
|
138
|
+
* @default 0
|
|
139
|
+
*/
|
|
140
|
+
spacing?: ResponsiveStyleValue<GridSpacing> | undefined;
|
|
141
|
+
/**
|
|
142
|
+
* Defines the `flex-wrap` style property.
|
|
143
|
+
* It's applied for all screen sizes.
|
|
144
|
+
* @default 'wrap'
|
|
145
|
+
*/
|
|
146
|
+
wrap?: GridWrap;
|
|
147
|
+
}
|
|
148
|
+
export interface GridOwnerState extends GridBaseProps {
|
|
149
|
+
nested: boolean;
|
|
150
|
+
gridSize: Partial<Record<Breakpoint, GridSize | boolean>>;
|
|
151
|
+
gridOffset: Partial<Record<Breakpoint, GridSize>>;
|
|
152
|
+
}
|
|
153
|
+
export interface GridTypeMap<P = {}, D extends React.ElementType = 'div'> {
|
|
154
|
+
props: P & GridBaseProps & {
|
|
155
|
+
sx?: SxProps<Theme>;
|
|
156
|
+
} & SystemProps<Theme>;
|
|
157
|
+
defaultComponent: D;
|
|
158
|
+
}
|
|
159
|
+
export declare type GridProps<D extends React.ElementType = GridTypeMap['defaultComponent'], P = {
|
|
160
|
+
component?: React.ElementType;
|
|
161
|
+
}> = OverrideProps<GridTypeMap<P, D>, D>;
|
|
162
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { OverridableComponent } from '@mui/types';
|
|
3
|
+
import { GridTypeMap } from './GridProps';
|
|
4
|
+
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>;
|
|
5
|
+
declare function useThemePropsDefault<T>(props: T): T & {};
|
|
6
|
+
export default function createGrid(options?: {
|
|
7
|
+
createStyledComponent?: typeof defaultCreateStyledComponent;
|
|
8
|
+
useThemeProps?: typeof useThemePropsDefault;
|
|
9
|
+
componentName?: string;
|
|
10
|
+
}): OverridableComponent<GridTypeMap<{}, "div">>;
|
|
11
|
+
export {};
|