@mui/system 5.13.2 → 5.13.6
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 +226 -4
- package/Unstable_Grid/gridGenerator.d.ts +1 -6
- package/Unstable_Grid/gridGenerator.js +8 -51
- package/Unstable_Grid/index.d.ts +1 -0
- package/Unstable_Grid/index.js +9 -1
- package/Unstable_Grid/traverseBreakpoints.d.ts +7 -0
- package/Unstable_Grid/traverseBreakpoints.js +50 -0
- package/cssVars/createCssVarsProvider.js +6 -0
- package/esm/Unstable_Grid/gridGenerator.js +1 -42
- package/esm/Unstable_Grid/index.js +2 -1
- package/esm/Unstable_Grid/traverseBreakpoints.js +42 -0
- package/esm/cssVars/createCssVarsProvider.js +6 -0
- package/index.js +1 -1
- package/legacy/Unstable_Grid/gridGenerator.js +3 -48
- package/legacy/Unstable_Grid/index.js +2 -1
- package/legacy/Unstable_Grid/traverseBreakpoints.js +48 -0
- package/legacy/index.js +1 -1
- package/modern/Unstable_Grid/gridGenerator.js +1 -42
- package/modern/Unstable_Grid/index.js +2 -1
- package/modern/Unstable_Grid/traverseBreakpoints.js +42 -0
- package/modern/cssVars/createCssVarsProvider.js +6 -0
- package/modern/index.js +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,227 @@
|
|
|
1
1
|
# [Versions](https://mui.com/versions/)
|
|
2
2
|
|
|
3
|
+
## 5.13.6
|
|
4
|
+
|
|
5
|
+
_Jun 21, 2023_
|
|
6
|
+
|
|
7
|
+
A big thanks to the 25 contributors who made this release possible. Here are some highlights ✨:
|
|
8
|
+
|
|
9
|
+
- 💫 Added [Slider](https://mui.com/material-ui/react-slider/#material-you-version) component using the new Material You design language (#37520) @DiegoAndai.
|
|
10
|
+
- 📚 Added [examples](https://github.com/mui/material-ui/tree/master/examples/material-next-app-router-ts) showcasing how you can use Material UI with next.js's app directory (#37315) @smo043
|
|
11
|
+
|
|
12
|
+
### `@mui/material@5.13.6`
|
|
13
|
+
|
|
14
|
+
- ​<!-- 45 -->[Autocomplete] Fixed autocomplete's existing option selection (#37012) @bencevoros
|
|
15
|
+
- ​<!-- 44 -->[Autocomplete] Add hint demos to Material UI and Joy UI docs (#37496) @sai6855
|
|
16
|
+
- ​<!-- 13 -->[Masonry] Fix ResizeObserver loop limit exceeded error (#37208) @hbjORbj
|
|
17
|
+
- ​<!-- 11 -->[Tooltip][material] Improve warning when Tooltip receives string child (#37530) @DiegoAndai
|
|
18
|
+
- ​<!-- 10 -->[Modal] Add missing members to ModalOwnProps (#37568) @ivp-dev
|
|
19
|
+
- ​<!-- 09 -->[Slider] Arrow keys control does not work with float numbers (#37071) @gitstart
|
|
20
|
+
- ​<!-- 08 -->[SvgIcon] allow `svg` as a child (#37231) @siriwatknp
|
|
21
|
+
- ​<!-- 07 -->[Timeline] Add alternate reverse position (#37311) @abhinavkmrru
|
|
22
|
+
- ​<!-- 06 -->[Tooltip] Fix type of sx prop in `slotProps` (#37550) @SuperKXT
|
|
23
|
+
- ​<!-- 05 -->[TouchRipple] perf: avoid calling `clearTimeout()` (#37512) @romgrk
|
|
24
|
+
|
|
25
|
+
### `@mui/material-next@6.0.0-alpha.90`
|
|
26
|
+
|
|
27
|
+
- ​<!-- 12 -->[Material You] Add Slider component with Material You design (#37520) @DiegoAndai
|
|
28
|
+
|
|
29
|
+
### `@mui/joy@5.0.0-alpha.85`
|
|
30
|
+
|
|
31
|
+
- ​<!-- 37 -->[ButtonGroup][joy] Missing border when spacing is more than zero (#37577) @siriwatknp
|
|
32
|
+
- ​<!-- 36 -->[CardActions][joy] Add `CardActions` component (#37441) @siriwatknp
|
|
33
|
+
- ​<!-- 14 -->[Menu][joy] Fix closing of `Menu` in demos (#36917) @sai6855
|
|
34
|
+
|
|
35
|
+
### `@mui/base@5.0.0-beta.5`
|
|
36
|
+
|
|
37
|
+
- ​<!-- 39 -->[Menu][base] Add the resetHighlight action (#37392) @michaldudak
|
|
38
|
+
- ​<!-- 38 -->[Select][base] Expose the `areOptionsEqual` prop (#37615) @michaldudak
|
|
39
|
+
|
|
40
|
+
### `@mui/utils@5.13.2`
|
|
41
|
+
|
|
42
|
+
- ​<!-- 04 -->[utils] Allow nested imports in @mui/utils to speed up build (#37586) @flaviendelangle
|
|
43
|
+
|
|
44
|
+
### Docs
|
|
45
|
+
|
|
46
|
+
- ​<!-- 43 -->[docs][base] Improve Base UI all components images (#37590) @danilo-leal
|
|
47
|
+
- ​<!-- 42 -->[docs][base] Add pages for coming soon components (#37575) @danilo-leal
|
|
48
|
+
- ​<!-- 41 -->[docs][base] Add a Snackbar introduction demo (#37602) @danilo-leal
|
|
49
|
+
- ​<!-- 40 -->[docs][base] Add page for all Base UI components (#37536) @danilo-leal
|
|
50
|
+
- ​<!-- 33 -->[docs] Fix scrollbar on snackbar page (#37657) @oliviertassinari
|
|
51
|
+
- ​<!-- 32 -->[docs] Switch order of snackbar buttons in demos (#37389) @Primajin
|
|
52
|
+
- ​<!-- 31 -->[docs] Add support for Tailwind CSS and plain CSS demos (#37319) @mnajdova
|
|
53
|
+
- ​<!-- 30 -->[docs] Tree view color fix for dark mode in Gmail example (#37051) @PunitSoniME
|
|
54
|
+
- ​<!-- 29 -->[docs] Inline the Base UI demo (#37603) @oliviertassinari
|
|
55
|
+
- ​<!-- 28 -->[docs] Fix typo in themed components page (#37598) @vinayr
|
|
56
|
+
- ​<!-- 27 -->[docs] Fix render inline code in CSS description generation (#37448) @alexfauquette
|
|
57
|
+
- ​<!-- 26 -->[docs] Add styles to styled argument list (#37558) @DiegoAndai
|
|
58
|
+
- ​<!-- 25 -->[docs] Improve awkward wording in READMEs of example projects (#37110) @DIWAKARKASHYAP
|
|
59
|
+
- ​<!-- 24 -->[docs] Fix small base -> base-ui migration issue (#37594) @oliviertassinari
|
|
60
|
+
- ​<!-- 23 -->[docs] Fix GitHub typo (#37578) @oliviertassinari
|
|
61
|
+
- ​<!-- 22 -->[docs] Improve release guide (#37547) @DiegoAndai
|
|
62
|
+
- ​<!-- 21 -->[docs] Review fixes to the Material UI's "Example projects" page (#37444) @danilo-leal
|
|
63
|
+
- ​<!-- 17 -->[docs][joy] Add a messages template (#37546) @sernstberger
|
|
64
|
+
- ​<!-- 16 -->[docs][joy] Add pages for coming soon Joy UI components (#36920) @danilo-leal
|
|
65
|
+
- ​<!-- 15 -->[docs][joy] Add design and consistency tweaks to the Playground (#37580) @danilo-leal
|
|
66
|
+
- ​<!-- 37 -->[docs] Add and revise Base UI + Create React App examples (#36825) @samuelsycamore
|
|
67
|
+
- ​<!-- 20 -->[docs-infra] Fix demos border radius (#37658) @oliviertassinari
|
|
68
|
+
- ​<!-- 19 -->[docs-infra] Add analyticsTags to Algolia (#37600) @Janpot
|
|
69
|
+
- ​<!-- 18 -->[docs-infra] Simplify product id handling (#37593) @oliviertassinari
|
|
70
|
+
- ​<!-- 35 -->[CHANGELOG] Add missing release date for v5.13.5 @oliviertassinari
|
|
71
|
+
- ​<!-- 16 -->[examples] Shell command fix in the readme file of material-next-app-router-ts example (#37675) @bablukpik
|
|
72
|
+
- ​<!-- 15 -->[examples] Next.js v13 app router with Material UI (#37315) @smo043
|
|
73
|
+
|
|
74
|
+
### Core
|
|
75
|
+
|
|
76
|
+
- ​<!-- 34 -->[core] Update to Node.js v18 for `test-dev` CI (#37604) @ZeeshanTamboli
|
|
77
|
+
- ​<!-- 39 -->[core] Add priority support issue template (#37671) @DanailH
|
|
78
|
+
- ​<!-- 03 -->[website] Update roadmap page (#37587) @cherniavskii
|
|
79
|
+
- ​<!-- 02 -->[website] Add CSP to limit iframes to self @oliviertassinari
|
|
80
|
+
- ​<!-- 01 -->[website] Link mui-x Stack Overflow in footer link (#37509) @richbustos
|
|
81
|
+
|
|
82
|
+
All contributors of this release in alphabetical order: @abhinavkmrru, @alexfauquette, @bencevoros, @cherniavskii, @danilo-leal, @DiegoAndai, @DIWAKARKASHYAP, @flaviendelangle, @gitstart, @hbjORbj, @ivp-dev, @Janpot, @michaldudak, @mnajdova, @oliviertassinari, @Primajin, @PunitSoniME, @richbustos, @romgrk, @sai6855, @sernstberger, @siriwatknp, @SuperKXT, @vinayr, @ZeeshanTamboli
|
|
83
|
+
|
|
84
|
+
## 5.13.5
|
|
85
|
+
|
|
86
|
+
_Jun 12, 2023_
|
|
87
|
+
|
|
88
|
+
A big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
|
|
89
|
+
|
|
90
|
+
- 💫 Added `ButtonGroup` component in Joy UI (#37407) @siriwatknp.
|
|
91
|
+
- 🐛 bug fixes and 📚 documentation improvements.
|
|
92
|
+
|
|
93
|
+
### `@mui/material@5.13.5`
|
|
94
|
+
|
|
95
|
+
- ​<!-- 03 -->[Material][Popover] Add support for virtual element as anchorEl (#37465) @DiegoAndai
|
|
96
|
+
|
|
97
|
+
### `@mui/joy@5.0.0-alpha.84`
|
|
98
|
+
|
|
99
|
+
- ​<!-- 20 -->[ButtonGroup][joy] Replace `detached` prop with `spacing`. (#37562) @siriwatknp
|
|
100
|
+
- ​<!-- 19 -->[ButtonGroup][joy] Add `ButtonGroup` component (#37407) @siriwatknp
|
|
101
|
+
- ​<!-- 04 -->[Input][joy] Simplify focus with `:focus-within` and add examples (#37385) @siriwatknp
|
|
102
|
+
|
|
103
|
+
### Docs
|
|
104
|
+
|
|
105
|
+
- ​<!-- 17 -->[docs] Move Toolpad from alpha to beta (#37288) @bharatkashyap
|
|
106
|
+
- ​<!-- 16 -->[docs] Add usage of createCssVarsProvider (#37513) @brijeshb42
|
|
107
|
+
- ​<!-- 15 -->[docs] Update /base url references to /base-ui (#37412) @brijeshb42
|
|
108
|
+
- ​<!-- 14 -->[docs] Skip components and hooks due to duplicate index (#37539) @siriwatknp
|
|
109
|
+
- ​<!-- 13 -->[docs] Polish Sign in to your account joy demo (#37498) @oliviertassinari
|
|
110
|
+
- ​<!-- 12 -->[docs] Remove outdated Material UI FAQ @oliviertassinari
|
|
111
|
+
- ​<!-- 11 -->[docs] Fix crash access to localStorage in Firefox (#37518) @brijeshb42
|
|
112
|
+
- ​<!-- 10 -->[docs-infra] Enforce max length on description (#37565) @oliviertassinari
|
|
113
|
+
- ​<!-- 09 -->[docs-infra] Mandatory versions (#37497) @oliviertassinari
|
|
114
|
+
- ​<!-- 08 -->[docs-infra] Fix lighthouse img size issue (#37415) @oliviertassinari
|
|
115
|
+
- ​<!-- 07 -->[docs][joy] Replace JoyInput with Input component in JoyUI Text Field documentation (#37548) @musama619
|
|
116
|
+
- ​<!-- 06 -->[docs][joy] Add typography introduction demo component (#37553) @sernstberger
|
|
117
|
+
- ​<!-- 05 -->[docs][joy] Add a rental dashboard template (#37453) @sernstberger
|
|
118
|
+
|
|
119
|
+
### Core
|
|
120
|
+
|
|
121
|
+
- ​<!-- 21 -->Move the React Community Engineer - X in Open Roles (#37552) @DanailH
|
|
122
|
+
- ​<!-- 18 -->[core] Update Node.js version to v18 on CircleCI, CodeSandbox, and Netlify (#37173) @ZeeshanTamboli
|
|
123
|
+
- ​<!-- 02 -->[website] RIDI gold sponsorship end (#37517) @oliviertassinari
|
|
124
|
+
- ​<!-- 01 -->[website] Update X landing page (#37387) @cherniavskii
|
|
125
|
+
|
|
126
|
+
All contributors of this release in alphabetical order: @brijeshb42, @cherniavskii, @DanailH, @DiegoAndai, @musama619, @oliviertassinari, @sernstberger, @siriwatknp, @ZeeshanTamboli
|
|
127
|
+
|
|
128
|
+
## 5.13.4
|
|
129
|
+
|
|
130
|
+
<!-- generated comparing v5.13.3..master -->
|
|
131
|
+
|
|
132
|
+
_Jun 5, 2023_
|
|
133
|
+
|
|
134
|
+
A big thanks to the 12 contributors who made this release possible. Here are some highlights ✨:
|
|
135
|
+
|
|
136
|
+
### `@mui/material@5.13.4`
|
|
137
|
+
|
|
138
|
+
- ​<!-- 20 -->[Autocomplete][material] Add missing `focusVisible` class in AutocompleteClasses (#37502) @sai6855
|
|
139
|
+
- ​<!-- 04 -->[Menu][material] Fix MenuPaper class composition precedence (#37390) @DiegoAndai
|
|
140
|
+
- ​<!-- 03 -->[MenuList] Fix to allow conditional rendering for a menu item under ListSubheader (#36890) @danielplewes
|
|
141
|
+
- ​<!-- 02 -->[Stepper] Handle progress bar of mobile stepper when `steps` is one (#37079) @gitstart
|
|
142
|
+
|
|
143
|
+
### `@mui/base@5.0.0-beta.4`
|
|
144
|
+
|
|
145
|
+
- ​<!-- 16 -->[Input][base] Fix calling slotProps event handlers (#37463) @sai6855
|
|
146
|
+
|
|
147
|
+
### `@mui/joy@5.0.0-alpha.82`
|
|
148
|
+
|
|
149
|
+
- ​<!-- 19 -->[Avatar][joy] Fallback to `alt` when `src` or `srcSet` are not defined (#37469) @vishalthatipamula0219
|
|
150
|
+
- ​<!-- 15 -->[Card][joy] Improve usability of card family (#37474) @siriwatknp
|
|
151
|
+
|
|
152
|
+
### Docs
|
|
153
|
+
|
|
154
|
+
- ​<!-- 18 -->[docs][base] useAutocomplete demos & docs (#37029) @mj12albert
|
|
155
|
+
- ​<!-- 17 -->[docs][base] Remove usage of `component` prop in docs (#37462) @sai6855
|
|
156
|
+
- ​<!-- 13 -->[docs] Fix docs redirections @oliviertassinari
|
|
157
|
+
- ​<!-- 12 -->[docs] Fix Fluent -> Fluent UI @oliviertassinari
|
|
158
|
+
- ​<!-- 11 -->[docs] Fix MUI Base -> Base UI @oliviertassinari
|
|
159
|
+
- ​<!-- 10 -->[docs] Add base-vite-tailwind example repo (#36994) @mj12albert
|
|
160
|
+
- ​<!-- 09 -->[docs] Fix search bar layout shift (#37460) @oliviertassinari
|
|
161
|
+
- ​<!-- 08 -->[docs] Tweak Material UI's "Showcase" page design (#37259) @danilo-leal
|
|
162
|
+
- ​<!-- 07 -->[docs] Tweak Material UI's "Template" page design (#37260) @danilo-leal
|
|
163
|
+
- ​<!-- 06 -->[docs] Fix "Language" page removal leftovers (#37408) @danilo-leal
|
|
164
|
+
- ​<!-- 05 -->[docs] Move contents of css-variables to sibling pages (#37411) @brijeshb42
|
|
165
|
+
|
|
166
|
+
### Core
|
|
167
|
+
|
|
168
|
+
- ​<!-- 14 -->[core] Do not let Renovate handle `examples` packages updates (#37386) @ZeeshanTamboli
|
|
169
|
+
- ​<!-- 01 -->[website] Add header filters to the pricing table (#37455) @MBilalShafi
|
|
170
|
+
|
|
171
|
+
All contributors of this release in alphabetical order: @brijeshb42, @danielplewes, @danilo-leal, @DiegoAndai, @gitstart, @MBilalShafi, @mj12albert, @oliviertassinari, @sai6855, @siriwatknp, @vishalthatipamula0219, @ZeeshanTamboli
|
|
172
|
+
|
|
173
|
+
## 5.13.3
|
|
174
|
+
|
|
175
|
+
<!-- generated comparing v5.13.2..master -->
|
|
176
|
+
|
|
177
|
+
_May 29, 2023_
|
|
178
|
+
|
|
179
|
+
A big thanks to the 15 contributors who made this release possible.
|
|
180
|
+
This release focuses primarily on 🐛 bug fixes and 📚 documentation improvements.
|
|
181
|
+
|
|
182
|
+
### `@mui/material@5.13.3
|
|
183
|
+
|
|
184
|
+
- ​<!-- 22 -->[Autocomplete] Accept external Listbox ref (#37325) @sai6855
|
|
185
|
+
- ​<!-- 06 -->[Modal] Pass `className` from `BackdropProps` (#37399) @hbjORbj
|
|
186
|
+
|
|
187
|
+
### `@mui/base@5.0.0-beta.3`
|
|
188
|
+
|
|
189
|
+
- ​<!-- 20 -->[base] Maintain nodes document order in compound components (#36857) @michaldudak
|
|
190
|
+
- ​<!-- 19 -->[base][joy] Prevent persisting hover state styles onclick on mobile (#36704) @gitstart
|
|
191
|
+
- ​<!-- 18 -->[Menu][base] MenuItem as a link does not work (#37242) @nicolas-ot
|
|
192
|
+
- ​<!-- 17 -->[MenuItem][Base] Pass idGenerator function (#37364) @sai6855
|
|
193
|
+
- ​<!-- 16 -->[Slider][Base] Add Vertical slider demo (#37357) @sai6855
|
|
194
|
+
|
|
195
|
+
### `@mui/joy@5.0.0-alpha.82`
|
|
196
|
+
|
|
197
|
+
- ​<!-- 23 -->[Select][joy] Fix popup does not close (#37435) @siriwatknp
|
|
198
|
+
- ​<!-- 21 -->[Badge][Joy] Fix `slots` element type in API docs (#37329) @zignis
|
|
199
|
+
- ​<!-- 04 -->[Select] [joy] Handle long text content (#37289) @akash191095
|
|
200
|
+
- ​<!-- 07 -->[Tooltip][Joy] Interactive doesn't work (#37159) @nicolas-ot
|
|
201
|
+
|
|
202
|
+
### `@mui/codemod@5.13.3
|
|
203
|
+
|
|
204
|
+
- ​<!-- 05 -->[mui-codemod] Add missing script to README (#37377) @hbjORbj
|
|
205
|
+
|
|
206
|
+
### Docs
|
|
207
|
+
|
|
208
|
+
- ​<!-- 14 -->[docs] Clarify Hidden down props as exclusive (#36927) @canac
|
|
209
|
+
- ​<!-- 13 -->[docs] Add refine to Material UI "Related projects" and "More advanced example projects" pages (#37308) @necatiozmen
|
|
210
|
+
- ​<!-- 12 -->[docs] Remove todo link from sidebar (#37373) @brijeshb42
|
|
211
|
+
- ​<!-- 11 -->[docs] Clarify the peer dependency with react (#37360) @oliviertassinari
|
|
212
|
+
- ​<!-- 10 -->[docs] Divider vertical middle prop migration (#36840) @JhonnK08
|
|
213
|
+
- ​<!-- 09 -->[docs] Fix branding theme tabs and navigation bar regressions (#37362) @ZeeshanTamboli
|
|
214
|
+
- ​<!-- 08 -->[docs-infra] Throw on incorrect internal links (#37326) @oliviertassinari
|
|
215
|
+
|
|
216
|
+
### Core
|
|
217
|
+
|
|
218
|
+
- ​<!-- 15 -->[core] Include scoped JSX namespace when resolving props (#37404) @LukasTy
|
|
219
|
+
- ​<!-- 03 -->[test][useMediaQuery] Change SSR test description (#37403) @zignis
|
|
220
|
+
- ​<!-- 02 -->[website] Sync with Ashby @oliviertassinari
|
|
221
|
+
- ​<!-- 01 -->[website] Add David to about page (#37379) @DavidCnoops
|
|
222
|
+
|
|
223
|
+
All contributors of this release in alphabetical order: @akash191095, @brijeshb42, @canac, @DavidCnoops, @gitstart, @hbjORbj, @JhonnK08, @LukasTy, @michaldudak, @necatiozmen, @nicolas-ot, @oliviertassinari, @sai6855, @ZeeshanTamboli, @zignis
|
|
224
|
+
|
|
3
225
|
## 5.13.2
|
|
4
226
|
|
|
5
227
|
<!-- generated comparing v5.13.1..master -->
|
|
@@ -668,7 +890,7 @@ _Mar 14, 2023_
|
|
|
668
890
|
|
|
669
891
|
A big thanks to the 13 contributors who made this release possible. Here are some highlights ✨:
|
|
670
892
|
|
|
671
|
-
- @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)
|
|
893
|
+
- @michaldudak added an option for [disabling the generation](https://mui.com/base-ui/getting-started/customization/#disabling-default-css-classes) of the default classes in Base UI (#35963)
|
|
672
894
|
- other 🐛 bug fixes and 📚 documentation improvements.
|
|
673
895
|
|
|
674
896
|
### `@mui/material@5.11.13`
|
|
@@ -853,7 +1075,7 @@ _Feb 27, 2023_
|
|
|
853
1075
|
|
|
854
1076
|
A big thanks to the 15 contributors who made this release possible. Here are some highlights ✨:
|
|
855
1077
|
|
|
856
|
-
- 📚 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)
|
|
1078
|
+
- 📚 added API documentation for the slots in Base UI and Joy UI by @hbjORbj, for e.g. [SliderUnstyled API](https://mui.com/base-ui/api/slider-unstyled/#slots)
|
|
857
1079
|
- other 🐛 bug fixes and 📚 documentation improvements.
|
|
858
1080
|
|
|
859
1081
|
### `@mui/material@5.11.11`
|
|
@@ -1222,7 +1444,7 @@ A big thanks to the 13 contributors who made this release possible. Here are som
|
|
|
1222
1444
|
+ <SliderUnstyled slots={{ valueLabel: SliderValueLabel }} />
|
|
1223
1445
|
```
|
|
1224
1446
|
|
|
1225
|
-
The following demo shows how to show a value label when it is hovered over with the thumb: https://mui.com/base/react-slider/#value-label
|
|
1447
|
+
The following demo shows how to show a value label when it is hovered over with the thumb: https://mui.com/base-ui/react-slider/#value-label
|
|
1226
1448
|
|
|
1227
1449
|
- The following classes are removed from `sliderUnstyledClasses` since they are not needed for the value label:
|
|
1228
1450
|
|
|
@@ -2215,7 +2437,7 @@ _Oct 3, 2022_
|
|
|
2215
2437
|
|
|
2216
2438
|
A big thanks to the 18 contributors who made this release possible. Here are some highlights ✨:
|
|
2217
2439
|
|
|
2218
|
-
- 🚀 [SnackbarUnstyled](https://mui.com/base/react-snackbar/) component & headless hook are added to Base UI (#33227) @ZeeshanTamboli
|
|
2440
|
+
- 🚀 [SnackbarUnstyled](https://mui.com/base-ui/react-snackbar/) component & headless hook are added to Base UI (#33227) @ZeeshanTamboli
|
|
2219
2441
|
- 📚 [CSS variables documentation](https://mui.com/material-ui/experimental-api/css-theme-variables/overview/) for Material UI has been added by @siriwatknp (#33958)
|
|
2220
2442
|
- And more 🐛 bug fixes and 📚 documentation improvements.
|
|
2221
2443
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Breakpoints
|
|
1
|
+
import { Breakpoints } from '../createTheme/createBreakpoints';
|
|
2
2
|
import { Spacing } from '../createTheme/createSpacing';
|
|
3
3
|
import { ResponsiveStyleValue } from '../styleFunctionSx';
|
|
4
4
|
import { GridDirection, GridOwnerState } from './GridProps';
|
|
@@ -11,11 +11,6 @@ interface Props {
|
|
|
11
11
|
parentDisableEqualOverflow?: boolean;
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
interface Iterator<T> {
|
|
15
|
-
(appendStyle: (responsiveStyles: Record<string, any>, style: object) => void, value: T): void;
|
|
16
|
-
}
|
|
17
|
-
export declare const filterBreakpointKeys: (breakpointsKeys: Breakpoint[], responsiveKeys: string[]) => Breakpoint[];
|
|
18
|
-
export declare const traverseBreakpoints: <T = unknown>(breakpoints: Breakpoints, responsive: Record<string, any> | T | T[] | undefined, iterator: Iterator<T>) => void;
|
|
19
14
|
export declare const generateGridSizeStyles: ({ theme, ownerState }: Props) => {};
|
|
20
15
|
export declare const generateGridOffsetStyles: ({ theme, ownerState }: Props) => {};
|
|
21
16
|
export declare const generateGridColumnsStyles: ({ theme, ownerState }: Props) => {
|
|
@@ -4,8 +4,9 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.
|
|
7
|
+
exports.generateSpacingClassNames = exports.generateSizeClassNames = exports.generateGridStyles = exports.generateGridSizeStyles = exports.generateGridRowSpacingStyles = exports.generateGridOffsetStyles = exports.generateGridDirectionStyles = exports.generateGridColumnsStyles = exports.generateGridColumnSpacingStyles = exports.generateDirectionClasses = void 0;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
var _traverseBreakpoints = require("./traverseBreakpoints");
|
|
9
10
|
function appendLevel(level) {
|
|
10
11
|
if (!level) {
|
|
11
12
|
return '';
|
|
@@ -34,57 +35,13 @@ function getParentColumns(ownerState) {
|
|
|
34
35
|
}
|
|
35
36
|
return `var(--Grid-columns${appendLevel(ownerState.unstable_level - 1)})`;
|
|
36
37
|
}
|
|
37
|
-
const filterBreakpointKeys = (breakpointsKeys, responsiveKeys) => breakpointsKeys.filter(key => responsiveKeys.includes(key));
|
|
38
|
-
exports.filterBreakpointKeys = filterBreakpointKeys;
|
|
39
|
-
const traverseBreakpoints = (breakpoints, responsive, iterator) => {
|
|
40
|
-
const smallestBreakpoint = breakpoints.keys[0]; // the keys is sorted from smallest to largest by `createBreakpoints`.
|
|
41
|
-
|
|
42
|
-
if (Array.isArray(responsive)) {
|
|
43
|
-
responsive.forEach((breakpointValue, index) => {
|
|
44
|
-
iterator((responsiveStyles, style) => {
|
|
45
|
-
if (index <= breakpoints.keys.length - 1) {
|
|
46
|
-
if (index === 0) {
|
|
47
|
-
Object.assign(responsiveStyles, style);
|
|
48
|
-
} else {
|
|
49
|
-
responsiveStyles[breakpoints.up(breakpoints.keys[index])] = style;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}, breakpointValue);
|
|
53
|
-
});
|
|
54
|
-
} else if (responsive && typeof responsive === 'object') {
|
|
55
|
-
// prevent null
|
|
56
|
-
// responsive could be a very big object, pick the smallest responsive values
|
|
57
|
-
|
|
58
|
-
const keys = Object.keys(responsive).length > breakpoints.keys.length ? breakpoints.keys : filterBreakpointKeys(breakpoints.keys, Object.keys(responsive));
|
|
59
|
-
keys.forEach(key => {
|
|
60
|
-
if (breakpoints.keys.indexOf(key) !== -1) {
|
|
61
|
-
// @ts-ignore already checked that responsive is an object
|
|
62
|
-
const breakpointValue = responsive[key];
|
|
63
|
-
if (breakpointValue !== undefined) {
|
|
64
|
-
iterator((responsiveStyles, style) => {
|
|
65
|
-
if (smallestBreakpoint === key) {
|
|
66
|
-
Object.assign(responsiveStyles, style);
|
|
67
|
-
} else {
|
|
68
|
-
responsiveStyles[breakpoints.up(key)] = style;
|
|
69
|
-
}
|
|
70
|
-
}, breakpointValue);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
} else if (typeof responsive === 'number' || typeof responsive === 'string') {
|
|
75
|
-
iterator((responsiveStyles, style) => {
|
|
76
|
-
Object.assign(responsiveStyles, style);
|
|
77
|
-
}, responsive);
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
exports.traverseBreakpoints = traverseBreakpoints;
|
|
81
38
|
const generateGridSizeStyles = ({
|
|
82
39
|
theme,
|
|
83
40
|
ownerState
|
|
84
41
|
}) => {
|
|
85
42
|
const getSelfSpacing = createGetSelfSpacing(ownerState);
|
|
86
43
|
const styles = {};
|
|
87
|
-
traverseBreakpoints(theme.breakpoints, ownerState.gridSize, (appendStyle, value) => {
|
|
44
|
+
(0, _traverseBreakpoints.traverseBreakpoints)(theme.breakpoints, ownerState.gridSize, (appendStyle, value) => {
|
|
88
45
|
let style = {};
|
|
89
46
|
if (value === true) {
|
|
90
47
|
style = {
|
|
@@ -119,7 +76,7 @@ const generateGridOffsetStyles = ({
|
|
|
119
76
|
ownerState
|
|
120
77
|
}) => {
|
|
121
78
|
const styles = {};
|
|
122
|
-
traverseBreakpoints(theme.breakpoints, ownerState.gridOffset, (appendStyle, value) => {
|
|
79
|
+
(0, _traverseBreakpoints.traverseBreakpoints)(theme.breakpoints, ownerState.gridOffset, (appendStyle, value) => {
|
|
123
80
|
let style = {};
|
|
124
81
|
if (value === 'auto') {
|
|
125
82
|
style = {
|
|
@@ -148,7 +105,7 @@ const generateGridColumnsStyles = ({
|
|
|
148
105
|
} : {
|
|
149
106
|
'--Grid-columns': 12
|
|
150
107
|
};
|
|
151
|
-
traverseBreakpoints(theme.breakpoints, ownerState.columns, (appendStyle, value) => {
|
|
108
|
+
(0, _traverseBreakpoints.traverseBreakpoints)(theme.breakpoints, ownerState.columns, (appendStyle, value) => {
|
|
152
109
|
appendStyle(styles, {
|
|
153
110
|
[`--Grid-columns${appendLevel(ownerState.unstable_level)}`]: value
|
|
154
111
|
});
|
|
@@ -169,7 +126,7 @@ const generateGridRowSpacingStyles = ({
|
|
|
169
126
|
// It will be overridden if spacing props are provided
|
|
170
127
|
[`--Grid-rowSpacing${appendLevel(ownerState.unstable_level)}`]: getParentSpacing('row')
|
|
171
128
|
} : {};
|
|
172
|
-
traverseBreakpoints(theme.breakpoints, ownerState.rowSpacing, (appendStyle, value) => {
|
|
129
|
+
(0, _traverseBreakpoints.traverseBreakpoints)(theme.breakpoints, ownerState.rowSpacing, (appendStyle, value) => {
|
|
173
130
|
var _theme$spacing;
|
|
174
131
|
appendStyle(styles, {
|
|
175
132
|
[`--Grid-rowSpacing${appendLevel(ownerState.unstable_level)}`]: typeof value === 'string' ? value : (_theme$spacing = theme.spacing) == null ? void 0 : _theme$spacing.call(theme, value)
|
|
@@ -191,7 +148,7 @@ const generateGridColumnSpacingStyles = ({
|
|
|
191
148
|
// It will be overridden if spacing props are provided
|
|
192
149
|
[`--Grid-columnSpacing${appendLevel(ownerState.unstable_level)}`]: getParentSpacing('column')
|
|
193
150
|
} : {};
|
|
194
|
-
traverseBreakpoints(theme.breakpoints, ownerState.columnSpacing, (appendStyle, value) => {
|
|
151
|
+
(0, _traverseBreakpoints.traverseBreakpoints)(theme.breakpoints, ownerState.columnSpacing, (appendStyle, value) => {
|
|
195
152
|
var _theme$spacing2;
|
|
196
153
|
appendStyle(styles, {
|
|
197
154
|
[`--Grid-columnSpacing${appendLevel(ownerState.unstable_level)}`]: typeof value === 'string' ? value : (_theme$spacing2 = theme.spacing) == null ? void 0 : _theme$spacing2.call(theme, value)
|
|
@@ -208,7 +165,7 @@ const generateGridDirectionStyles = ({
|
|
|
208
165
|
return {};
|
|
209
166
|
}
|
|
210
167
|
const styles = {};
|
|
211
|
-
traverseBreakpoints(theme.breakpoints, ownerState.direction, (appendStyle, value) => {
|
|
168
|
+
(0, _traverseBreakpoints.traverseBreakpoints)(theme.breakpoints, ownerState.direction, (appendStyle, value) => {
|
|
212
169
|
appendStyle(styles, {
|
|
213
170
|
flexDirection: value
|
|
214
171
|
});
|
package/Unstable_Grid/index.d.ts
CHANGED
package/Unstable_Grid/index.js
CHANGED
|
@@ -6,7 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
var _exportNames = {
|
|
8
8
|
createGrid: true,
|
|
9
|
-
gridClasses: true
|
|
9
|
+
gridClasses: true,
|
|
10
|
+
unstable_traverseBreakpoints: true
|
|
10
11
|
};
|
|
11
12
|
Object.defineProperty(exports, "createGrid", {
|
|
12
13
|
enumerable: true,
|
|
@@ -26,6 +27,12 @@ Object.defineProperty(exports, "gridClasses", {
|
|
|
26
27
|
return _gridClasses.default;
|
|
27
28
|
}
|
|
28
29
|
});
|
|
30
|
+
Object.defineProperty(exports, "unstable_traverseBreakpoints", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return _traverseBreakpoints.traverseBreakpoints;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
29
36
|
var _Grid = _interopRequireDefault(require("./Grid"));
|
|
30
37
|
var _createGrid = _interopRequireDefault(require("./createGrid"));
|
|
31
38
|
var _GridProps = require("./GridProps");
|
|
@@ -52,5 +59,6 @@ Object.keys(_gridClasses).forEach(function (key) {
|
|
|
52
59
|
}
|
|
53
60
|
});
|
|
54
61
|
});
|
|
62
|
+
var _traverseBreakpoints = require("./traverseBreakpoints");
|
|
55
63
|
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); }
|
|
56
64
|
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; }
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Breakpoints, Breakpoint } from '../createTheme/createBreakpoints';
|
|
2
|
+
export declare const filterBreakpointKeys: (breakpointsKeys: Breakpoint[], responsiveKeys: string[]) => Breakpoint[];
|
|
3
|
+
interface Iterator<T> {
|
|
4
|
+
(appendStyle: (responsiveStyles: Record<string, any>, style: object) => void, value: T): void;
|
|
5
|
+
}
|
|
6
|
+
export declare const traverseBreakpoints: <T = unknown>(breakpoints: Breakpoints, responsive: Record<string, any> | T | T[] | undefined, iterator: Iterator<T>) => void;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.traverseBreakpoints = exports.filterBreakpointKeys = void 0;
|
|
7
|
+
const filterBreakpointKeys = (breakpointsKeys, responsiveKeys) => breakpointsKeys.filter(key => responsiveKeys.includes(key));
|
|
8
|
+
exports.filterBreakpointKeys = filterBreakpointKeys;
|
|
9
|
+
const traverseBreakpoints = (breakpoints, responsive, iterator) => {
|
|
10
|
+
const smallestBreakpoint = breakpoints.keys[0]; // the keys is sorted from smallest to largest by `createBreakpoints`.
|
|
11
|
+
|
|
12
|
+
if (Array.isArray(responsive)) {
|
|
13
|
+
responsive.forEach((breakpointValue, index) => {
|
|
14
|
+
iterator((responsiveStyles, style) => {
|
|
15
|
+
if (index <= breakpoints.keys.length - 1) {
|
|
16
|
+
if (index === 0) {
|
|
17
|
+
Object.assign(responsiveStyles, style);
|
|
18
|
+
} else {
|
|
19
|
+
responsiveStyles[breakpoints.up(breakpoints.keys[index])] = style;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}, breakpointValue);
|
|
23
|
+
});
|
|
24
|
+
} else if (responsive && typeof responsive === 'object') {
|
|
25
|
+
// prevent null
|
|
26
|
+
// responsive could be a very big object, pick the smallest responsive values
|
|
27
|
+
|
|
28
|
+
const keys = Object.keys(responsive).length > breakpoints.keys.length ? breakpoints.keys : filterBreakpointKeys(breakpoints.keys, Object.keys(responsive));
|
|
29
|
+
keys.forEach(key => {
|
|
30
|
+
if (breakpoints.keys.indexOf(key) !== -1) {
|
|
31
|
+
// @ts-ignore already checked that responsive is an object
|
|
32
|
+
const breakpointValue = responsive[key];
|
|
33
|
+
if (breakpointValue !== undefined) {
|
|
34
|
+
iterator((responsiveStyles, style) => {
|
|
35
|
+
if (smallestBreakpoint === key) {
|
|
36
|
+
Object.assign(responsiveStyles, style);
|
|
37
|
+
} else {
|
|
38
|
+
responsiveStyles[breakpoints.up(key)] = style;
|
|
39
|
+
}
|
|
40
|
+
}, breakpointValue);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
} else if (typeof responsive === 'number' || typeof responsive === 'string') {
|
|
45
|
+
iterator((responsiveStyles, style) => {
|
|
46
|
+
Object.assign(responsiveStyles, style);
|
|
47
|
+
}, responsive);
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
exports.traverseBreakpoints = traverseBreakpoints;
|
|
@@ -25,6 +25,12 @@ exports.DISABLE_CSS_TRANSITION = DISABLE_CSS_TRANSITION;
|
|
|
25
25
|
function createCssVarsProvider(options) {
|
|
26
26
|
const {
|
|
27
27
|
themeId,
|
|
28
|
+
/**
|
|
29
|
+
* This `theme` object needs to follow a certain structure to
|
|
30
|
+
* be used correctly by the finel `CssVarsProvider`. It should have a
|
|
31
|
+
* `colorSchemes` key with the light and dark (and any other) palette.
|
|
32
|
+
* It should also ideally have a vars object created using `prepareCssVars`.
|
|
33
|
+
*/
|
|
28
34
|
theme: defaultTheme = {},
|
|
29
35
|
attribute: defaultAttribute = _getInitColorSchemeScript.DEFAULT_ATTRIBUTE,
|
|
30
36
|
modeStorageKey: defaultModeStorageKey = _getInitColorSchemeScript.DEFAULT_MODE_STORAGE_KEY,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import { traverseBreakpoints } from './traverseBreakpoints';
|
|
2
3
|
function appendLevel(level) {
|
|
3
4
|
if (!level) {
|
|
4
5
|
return '';
|
|
@@ -27,48 +28,6 @@ function getParentColumns(ownerState) {
|
|
|
27
28
|
}
|
|
28
29
|
return `var(--Grid-columns${appendLevel(ownerState.unstable_level - 1)})`;
|
|
29
30
|
}
|
|
30
|
-
export const filterBreakpointKeys = (breakpointsKeys, responsiveKeys) => breakpointsKeys.filter(key => responsiveKeys.includes(key));
|
|
31
|
-
export const traverseBreakpoints = (breakpoints, responsive, iterator) => {
|
|
32
|
-
const smallestBreakpoint = breakpoints.keys[0]; // the keys is sorted from smallest to largest by `createBreakpoints`.
|
|
33
|
-
|
|
34
|
-
if (Array.isArray(responsive)) {
|
|
35
|
-
responsive.forEach((breakpointValue, index) => {
|
|
36
|
-
iterator((responsiveStyles, style) => {
|
|
37
|
-
if (index <= breakpoints.keys.length - 1) {
|
|
38
|
-
if (index === 0) {
|
|
39
|
-
Object.assign(responsiveStyles, style);
|
|
40
|
-
} else {
|
|
41
|
-
responsiveStyles[breakpoints.up(breakpoints.keys[index])] = style;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}, breakpointValue);
|
|
45
|
-
});
|
|
46
|
-
} else if (responsive && typeof responsive === 'object') {
|
|
47
|
-
// prevent null
|
|
48
|
-
// responsive could be a very big object, pick the smallest responsive values
|
|
49
|
-
|
|
50
|
-
const keys = Object.keys(responsive).length > breakpoints.keys.length ? breakpoints.keys : filterBreakpointKeys(breakpoints.keys, Object.keys(responsive));
|
|
51
|
-
keys.forEach(key => {
|
|
52
|
-
if (breakpoints.keys.indexOf(key) !== -1) {
|
|
53
|
-
// @ts-ignore already checked that responsive is an object
|
|
54
|
-
const breakpointValue = responsive[key];
|
|
55
|
-
if (breakpointValue !== undefined) {
|
|
56
|
-
iterator((responsiveStyles, style) => {
|
|
57
|
-
if (smallestBreakpoint === key) {
|
|
58
|
-
Object.assign(responsiveStyles, style);
|
|
59
|
-
} else {
|
|
60
|
-
responsiveStyles[breakpoints.up(key)] = style;
|
|
61
|
-
}
|
|
62
|
-
}, breakpointValue);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
} else if (typeof responsive === 'number' || typeof responsive === 'string') {
|
|
67
|
-
iterator((responsiveStyles, style) => {
|
|
68
|
-
Object.assign(responsiveStyles, style);
|
|
69
|
-
}, responsive);
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
31
|
export const generateGridSizeStyles = ({
|
|
73
32
|
theme,
|
|
74
33
|
ownerState
|
|
@@ -2,4 +2,5 @@ export { default } from './Grid';
|
|
|
2
2
|
export { default as createGrid } from './createGrid';
|
|
3
3
|
export * from './GridProps';
|
|
4
4
|
export { default as gridClasses } from './gridClasses';
|
|
5
|
-
export * from './gridClasses';
|
|
5
|
+
export * from './gridClasses';
|
|
6
|
+
export { traverseBreakpoints as unstable_traverseBreakpoints } from './traverseBreakpoints';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export const filterBreakpointKeys = (breakpointsKeys, responsiveKeys) => breakpointsKeys.filter(key => responsiveKeys.includes(key));
|
|
2
|
+
export const traverseBreakpoints = (breakpoints, responsive, iterator) => {
|
|
3
|
+
const smallestBreakpoint = breakpoints.keys[0]; // the keys is sorted from smallest to largest by `createBreakpoints`.
|
|
4
|
+
|
|
5
|
+
if (Array.isArray(responsive)) {
|
|
6
|
+
responsive.forEach((breakpointValue, index) => {
|
|
7
|
+
iterator((responsiveStyles, style) => {
|
|
8
|
+
if (index <= breakpoints.keys.length - 1) {
|
|
9
|
+
if (index === 0) {
|
|
10
|
+
Object.assign(responsiveStyles, style);
|
|
11
|
+
} else {
|
|
12
|
+
responsiveStyles[breakpoints.up(breakpoints.keys[index])] = style;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}, breakpointValue);
|
|
16
|
+
});
|
|
17
|
+
} else if (responsive && typeof responsive === 'object') {
|
|
18
|
+
// prevent null
|
|
19
|
+
// responsive could be a very big object, pick the smallest responsive values
|
|
20
|
+
|
|
21
|
+
const keys = Object.keys(responsive).length > breakpoints.keys.length ? breakpoints.keys : filterBreakpointKeys(breakpoints.keys, Object.keys(responsive));
|
|
22
|
+
keys.forEach(key => {
|
|
23
|
+
if (breakpoints.keys.indexOf(key) !== -1) {
|
|
24
|
+
// @ts-ignore already checked that responsive is an object
|
|
25
|
+
const breakpointValue = responsive[key];
|
|
26
|
+
if (breakpointValue !== undefined) {
|
|
27
|
+
iterator((responsiveStyles, style) => {
|
|
28
|
+
if (smallestBreakpoint === key) {
|
|
29
|
+
Object.assign(responsiveStyles, style);
|
|
30
|
+
} else {
|
|
31
|
+
responsiveStyles[breakpoints.up(key)] = style;
|
|
32
|
+
}
|
|
33
|
+
}, breakpointValue);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
} else if (typeof responsive === 'number' || typeof responsive === 'string') {
|
|
38
|
+
iterator((responsiveStyles, style) => {
|
|
39
|
+
Object.assign(responsiveStyles, style);
|
|
40
|
+
}, responsive);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
@@ -16,6 +16,12 @@ export const DISABLE_CSS_TRANSITION = '*{-webkit-transition:none!important;-moz-
|
|
|
16
16
|
export default function createCssVarsProvider(options) {
|
|
17
17
|
const {
|
|
18
18
|
themeId,
|
|
19
|
+
/**
|
|
20
|
+
* This `theme` object needs to follow a certain structure to
|
|
21
|
+
* be used correctly by the finel `CssVarsProvider`. It should have a
|
|
22
|
+
* `colorSchemes` key with the light and dark (and any other) palette.
|
|
23
|
+
* It should also ideally have a vars object created using `prepareCssVars`.
|
|
24
|
+
*/
|
|
19
25
|
theme: defaultTheme = {},
|
|
20
26
|
attribute: defaultAttribute = DEFAULT_ATTRIBUTE,
|
|
21
27
|
modeStorageKey: defaultModeStorageKey = DEFAULT_MODE_STORAGE_KEY,
|
package/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
1
|
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
5
|
+
import { traverseBreakpoints } from './traverseBreakpoints';
|
|
5
6
|
function appendLevel(level) {
|
|
6
7
|
if (!level) {
|
|
7
8
|
return '';
|
|
@@ -30,52 +31,6 @@ function getParentColumns(ownerState) {
|
|
|
30
31
|
}
|
|
31
32
|
return "var(--Grid-columns".concat(appendLevel(ownerState.unstable_level - 1), ")");
|
|
32
33
|
}
|
|
33
|
-
export var filterBreakpointKeys = function filterBreakpointKeys(breakpointsKeys, responsiveKeys) {
|
|
34
|
-
return breakpointsKeys.filter(function (key) {
|
|
35
|
-
return responsiveKeys.includes(key);
|
|
36
|
-
});
|
|
37
|
-
};
|
|
38
|
-
export var traverseBreakpoints = function traverseBreakpoints(breakpoints, responsive, iterator) {
|
|
39
|
-
var smallestBreakpoint = breakpoints.keys[0]; // the keys is sorted from smallest to largest by `createBreakpoints`.
|
|
40
|
-
|
|
41
|
-
if (Array.isArray(responsive)) {
|
|
42
|
-
responsive.forEach(function (breakpointValue, index) {
|
|
43
|
-
iterator(function (responsiveStyles, style) {
|
|
44
|
-
if (index <= breakpoints.keys.length - 1) {
|
|
45
|
-
if (index === 0) {
|
|
46
|
-
_extends(responsiveStyles, style);
|
|
47
|
-
} else {
|
|
48
|
-
responsiveStyles[breakpoints.up(breakpoints.keys[index])] = style;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}, breakpointValue);
|
|
52
|
-
});
|
|
53
|
-
} else if (responsive && _typeof(responsive) === 'object') {
|
|
54
|
-
// prevent null
|
|
55
|
-
// responsive could be a very big object, pick the smallest responsive values
|
|
56
|
-
|
|
57
|
-
var keys = Object.keys(responsive).length > breakpoints.keys.length ? breakpoints.keys : filterBreakpointKeys(breakpoints.keys, Object.keys(responsive));
|
|
58
|
-
keys.forEach(function (key) {
|
|
59
|
-
if (breakpoints.keys.indexOf(key) !== -1) {
|
|
60
|
-
// @ts-ignore already checked that responsive is an object
|
|
61
|
-
var breakpointValue = responsive[key];
|
|
62
|
-
if (breakpointValue !== undefined) {
|
|
63
|
-
iterator(function (responsiveStyles, style) {
|
|
64
|
-
if (smallestBreakpoint === key) {
|
|
65
|
-
_extends(responsiveStyles, style);
|
|
66
|
-
} else {
|
|
67
|
-
responsiveStyles[breakpoints.up(key)] = style;
|
|
68
|
-
}
|
|
69
|
-
}, breakpointValue);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
} else if (typeof responsive === 'number' || typeof responsive === 'string') {
|
|
74
|
-
iterator(function (responsiveStyles, style) {
|
|
75
|
-
_extends(responsiveStyles, style);
|
|
76
|
-
}, responsive);
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
34
|
export var generateGridSizeStyles = function generateGridSizeStyles(_ref) {
|
|
80
35
|
var theme = _ref.theme,
|
|
81
36
|
ownerState = _ref.ownerState;
|
|
@@ -2,4 +2,5 @@ export { default } from './Grid';
|
|
|
2
2
|
export { default as createGrid } from './createGrid';
|
|
3
3
|
export * from './GridProps';
|
|
4
4
|
export { default as gridClasses } from './gridClasses';
|
|
5
|
-
export * from './gridClasses';
|
|
5
|
+
export * from './gridClasses';
|
|
6
|
+
export { traverseBreakpoints as unstable_traverseBreakpoints } from './traverseBreakpoints';
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
2
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
+
export var filterBreakpointKeys = function filterBreakpointKeys(breakpointsKeys, responsiveKeys) {
|
|
4
|
+
return breakpointsKeys.filter(function (key) {
|
|
5
|
+
return responsiveKeys.includes(key);
|
|
6
|
+
});
|
|
7
|
+
};
|
|
8
|
+
export var traverseBreakpoints = function traverseBreakpoints(breakpoints, responsive, iterator) {
|
|
9
|
+
var smallestBreakpoint = breakpoints.keys[0]; // the keys is sorted from smallest to largest by `createBreakpoints`.
|
|
10
|
+
|
|
11
|
+
if (Array.isArray(responsive)) {
|
|
12
|
+
responsive.forEach(function (breakpointValue, index) {
|
|
13
|
+
iterator(function (responsiveStyles, style) {
|
|
14
|
+
if (index <= breakpoints.keys.length - 1) {
|
|
15
|
+
if (index === 0) {
|
|
16
|
+
_extends(responsiveStyles, style);
|
|
17
|
+
} else {
|
|
18
|
+
responsiveStyles[breakpoints.up(breakpoints.keys[index])] = style;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}, breakpointValue);
|
|
22
|
+
});
|
|
23
|
+
} else if (responsive && _typeof(responsive) === 'object') {
|
|
24
|
+
// prevent null
|
|
25
|
+
// responsive could be a very big object, pick the smallest responsive values
|
|
26
|
+
|
|
27
|
+
var keys = Object.keys(responsive).length > breakpoints.keys.length ? breakpoints.keys : filterBreakpointKeys(breakpoints.keys, Object.keys(responsive));
|
|
28
|
+
keys.forEach(function (key) {
|
|
29
|
+
if (breakpoints.keys.indexOf(key) !== -1) {
|
|
30
|
+
// @ts-ignore already checked that responsive is an object
|
|
31
|
+
var breakpointValue = responsive[key];
|
|
32
|
+
if (breakpointValue !== undefined) {
|
|
33
|
+
iterator(function (responsiveStyles, style) {
|
|
34
|
+
if (smallestBreakpoint === key) {
|
|
35
|
+
_extends(responsiveStyles, style);
|
|
36
|
+
} else {
|
|
37
|
+
responsiveStyles[breakpoints.up(key)] = style;
|
|
38
|
+
}
|
|
39
|
+
}, breakpointValue);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
} else if (typeof responsive === 'number' || typeof responsive === 'string') {
|
|
44
|
+
iterator(function (responsiveStyles, style) {
|
|
45
|
+
_extends(responsiveStyles, style);
|
|
46
|
+
}, responsive);
|
|
47
|
+
}
|
|
48
|
+
};
|
package/legacy/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import { traverseBreakpoints } from './traverseBreakpoints';
|
|
2
3
|
function appendLevel(level) {
|
|
3
4
|
if (!level) {
|
|
4
5
|
return '';
|
|
@@ -27,48 +28,6 @@ function getParentColumns(ownerState) {
|
|
|
27
28
|
}
|
|
28
29
|
return `var(--Grid-columns${appendLevel(ownerState.unstable_level - 1)})`;
|
|
29
30
|
}
|
|
30
|
-
export const filterBreakpointKeys = (breakpointsKeys, responsiveKeys) => breakpointsKeys.filter(key => responsiveKeys.includes(key));
|
|
31
|
-
export const traverseBreakpoints = (breakpoints, responsive, iterator) => {
|
|
32
|
-
const smallestBreakpoint = breakpoints.keys[0]; // the keys is sorted from smallest to largest by `createBreakpoints`.
|
|
33
|
-
|
|
34
|
-
if (Array.isArray(responsive)) {
|
|
35
|
-
responsive.forEach((breakpointValue, index) => {
|
|
36
|
-
iterator((responsiveStyles, style) => {
|
|
37
|
-
if (index <= breakpoints.keys.length - 1) {
|
|
38
|
-
if (index === 0) {
|
|
39
|
-
Object.assign(responsiveStyles, style);
|
|
40
|
-
} else {
|
|
41
|
-
responsiveStyles[breakpoints.up(breakpoints.keys[index])] = style;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}, breakpointValue);
|
|
45
|
-
});
|
|
46
|
-
} else if (responsive && typeof responsive === 'object') {
|
|
47
|
-
// prevent null
|
|
48
|
-
// responsive could be a very big object, pick the smallest responsive values
|
|
49
|
-
|
|
50
|
-
const keys = Object.keys(responsive).length > breakpoints.keys.length ? breakpoints.keys : filterBreakpointKeys(breakpoints.keys, Object.keys(responsive));
|
|
51
|
-
keys.forEach(key => {
|
|
52
|
-
if (breakpoints.keys.indexOf(key) !== -1) {
|
|
53
|
-
// @ts-ignore already checked that responsive is an object
|
|
54
|
-
const breakpointValue = responsive[key];
|
|
55
|
-
if (breakpointValue !== undefined) {
|
|
56
|
-
iterator((responsiveStyles, style) => {
|
|
57
|
-
if (smallestBreakpoint === key) {
|
|
58
|
-
Object.assign(responsiveStyles, style);
|
|
59
|
-
} else {
|
|
60
|
-
responsiveStyles[breakpoints.up(key)] = style;
|
|
61
|
-
}
|
|
62
|
-
}, breakpointValue);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
} else if (typeof responsive === 'number' || typeof responsive === 'string') {
|
|
67
|
-
iterator((responsiveStyles, style) => {
|
|
68
|
-
Object.assign(responsiveStyles, style);
|
|
69
|
-
}, responsive);
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
31
|
export const generateGridSizeStyles = ({
|
|
73
32
|
theme,
|
|
74
33
|
ownerState
|
|
@@ -2,4 +2,5 @@ export { default } from './Grid';
|
|
|
2
2
|
export { default as createGrid } from './createGrid';
|
|
3
3
|
export * from './GridProps';
|
|
4
4
|
export { default as gridClasses } from './gridClasses';
|
|
5
|
-
export * from './gridClasses';
|
|
5
|
+
export * from './gridClasses';
|
|
6
|
+
export { traverseBreakpoints as unstable_traverseBreakpoints } from './traverseBreakpoints';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export const filterBreakpointKeys = (breakpointsKeys, responsiveKeys) => breakpointsKeys.filter(key => responsiveKeys.includes(key));
|
|
2
|
+
export const traverseBreakpoints = (breakpoints, responsive, iterator) => {
|
|
3
|
+
const smallestBreakpoint = breakpoints.keys[0]; // the keys is sorted from smallest to largest by `createBreakpoints`.
|
|
4
|
+
|
|
5
|
+
if (Array.isArray(responsive)) {
|
|
6
|
+
responsive.forEach((breakpointValue, index) => {
|
|
7
|
+
iterator((responsiveStyles, style) => {
|
|
8
|
+
if (index <= breakpoints.keys.length - 1) {
|
|
9
|
+
if (index === 0) {
|
|
10
|
+
Object.assign(responsiveStyles, style);
|
|
11
|
+
} else {
|
|
12
|
+
responsiveStyles[breakpoints.up(breakpoints.keys[index])] = style;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}, breakpointValue);
|
|
16
|
+
});
|
|
17
|
+
} else if (responsive && typeof responsive === 'object') {
|
|
18
|
+
// prevent null
|
|
19
|
+
// responsive could be a very big object, pick the smallest responsive values
|
|
20
|
+
|
|
21
|
+
const keys = Object.keys(responsive).length > breakpoints.keys.length ? breakpoints.keys : filterBreakpointKeys(breakpoints.keys, Object.keys(responsive));
|
|
22
|
+
keys.forEach(key => {
|
|
23
|
+
if (breakpoints.keys.indexOf(key) !== -1) {
|
|
24
|
+
// @ts-ignore already checked that responsive is an object
|
|
25
|
+
const breakpointValue = responsive[key];
|
|
26
|
+
if (breakpointValue !== undefined) {
|
|
27
|
+
iterator((responsiveStyles, style) => {
|
|
28
|
+
if (smallestBreakpoint === key) {
|
|
29
|
+
Object.assign(responsiveStyles, style);
|
|
30
|
+
} else {
|
|
31
|
+
responsiveStyles[breakpoints.up(key)] = style;
|
|
32
|
+
}
|
|
33
|
+
}, breakpointValue);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
} else if (typeof responsive === 'number' || typeof responsive === 'string') {
|
|
38
|
+
iterator((responsiveStyles, style) => {
|
|
39
|
+
Object.assign(responsiveStyles, style);
|
|
40
|
+
}, responsive);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
@@ -16,6 +16,12 @@ export const DISABLE_CSS_TRANSITION = '*{-webkit-transition:none!important;-moz-
|
|
|
16
16
|
export default function createCssVarsProvider(options) {
|
|
17
17
|
const {
|
|
18
18
|
themeId,
|
|
19
|
+
/**
|
|
20
|
+
* This `theme` object needs to follow a certain structure to
|
|
21
|
+
* be used correctly by the finel `CssVarsProvider`. It should have a
|
|
22
|
+
* `colorSchemes` key with the light and dark (and any other) palette.
|
|
23
|
+
* It should also ideally have a vars object created using `prepareCssVars`.
|
|
24
|
+
*/
|
|
19
25
|
theme: defaultTheme = {},
|
|
20
26
|
attribute: defaultAttribute = DEFAULT_ATTRIBUTE,
|
|
21
27
|
modeStorageKey: defaultModeStorageKey = DEFAULT_MODE_STORAGE_KEY,
|
package/modern/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/system",
|
|
3
|
-
"version": "5.13.
|
|
3
|
+
"version": "5.13.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"description": "CSS utilities for rapidly laying out custom designs.",
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@babel/runtime": "^7.
|
|
46
|
+
"@babel/runtime": "^7.22.5",
|
|
47
47
|
"@mui/private-theming": "^5.13.1",
|
|
48
48
|
"@mui/styled-engine": "^5.13.2",
|
|
49
49
|
"@mui/types": "^7.2.4",
|
|
50
|
-
"@mui/utils": "^5.13.
|
|
50
|
+
"@mui/utils": "^5.13.6",
|
|
51
51
|
"clsx": "^1.2.1",
|
|
52
52
|
"csstype": "^3.1.2",
|
|
53
53
|
"prop-types": "^15.8.1"
|