@mui/system 5.8.0 → 5.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Box/Box.spec.d.ts +1 -1
- package/CHANGELOG.md +203 -6
- package/Container/Container.d.ts +13 -13
- package/Container/ContainerProps.d.ts +40 -40
- package/Container/containerClasses.d.ts +22 -22
- package/Container/createContainer.d.ts +18 -18
- package/createBox.spec.d.ts +1 -1
- package/createTheme/createSpacing.d.ts +10 -10
- package/cssVars/createCssVarsProvider.d.ts +15 -15
- package/cssVars/createCssVarsProvider.js +23 -9
- package/cssVars/createCssVarsProvider.spec.d.ts +1 -1
- package/cssVars/createGetCssVar.d.ts +5 -5
- package/cssVars/cssVarsParser.d.ts +70 -70
- package/cssVars/getInitColorSchemeScript.d.ts +40 -40
- package/cssVars/getInitColorSchemeScript.js +3 -3
- package/cssVars/index.d.ts +2 -2
- package/cssVars/useCurrentColorScheme.d.ts +53 -53
- package/esm/cssVars/createCssVarsProvider.js +23 -9
- package/esm/cssVars/getInitColorSchemeScript.js +3 -3
- package/esm/spacing.js +1 -1
- package/esm/style.js +2 -2
- package/index.js +1 -1
- package/index.spec.d.ts +1 -1
- package/legacy/cssVars/createCssVarsProvider.js +30 -9
- package/legacy/cssVars/getInitColorSchemeScript.js +3 -3
- package/legacy/index.js +1 -1
- package/legacy/spacing.js +1 -1
- package/legacy/style.js +3 -1
- package/modern/cssVars/createCssVarsProvider.js +23 -9
- package/modern/cssVars/getInitColorSchemeScript.js +3 -3
- package/modern/index.js +1 -1
- package/modern/spacing.js +1 -1
- package/modern/style.js +2 -2
- package/package.json +2 -2
- package/spacing.js +1 -1
- package/style.js +2 -2
- 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,202 @@
|
|
|
1
1
|
# [Versions](https://mui.com/versions/)
|
|
2
2
|
|
|
3
|
+
## 5.8.3
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v5.8.2..master -->
|
|
6
|
+
|
|
7
|
+
_Jun 7, 2022_
|
|
8
|
+
|
|
9
|
+
A big thanks to the 15 contributors who made this release possible.
|
|
10
|
+
This release is mostly about 🐛 bug fixes and 📚 documentation improvements.
|
|
11
|
+
|
|
12
|
+
## `@mui/material@5.8.3`
|
|
13
|
+
|
|
14
|
+
- [Alert] Constrain message width and allow overflow (#32747) @Janpot
|
|
15
|
+
- [Checkbox] Add support for CSS variables (#32579) @haneenmahd
|
|
16
|
+
- [Slider] Fix positioning of tooltips on vertical slider (#32919) @abhinav-22-tech
|
|
17
|
+
|
|
18
|
+
## `@mui/system@5.8.3`
|
|
19
|
+
|
|
20
|
+
- [system] Configurable attributes for libraries (#32971) @siriwatknp
|
|
21
|
+
|
|
22
|
+
## `@mui/codemod@5.8.3
|
|
23
|
+
|
|
24
|
+
- [codemod] Fix infinite loop in jss-to-tss-react and add TODO (#33048) @ryancogswell
|
|
25
|
+
|
|
26
|
+
## `@mui/lab@5.0.0-alpha.85`
|
|
27
|
+
|
|
28
|
+
- [pickers] Add deprecations when importing pickers from the lab (#32950) @flaviendelangle
|
|
29
|
+
|
|
30
|
+
## `@mui/joy@5.0.0-alpha.31`
|
|
31
|
+
|
|
32
|
+
- [Joy] Add `Slider` component and demos (#32694) @hbjORbj
|
|
33
|
+
- [Joy] Add articles about customization approaches (#32887) @siriwatknp
|
|
34
|
+
- [Joy] Add automatic adjustment page to core features (#32980) @siriwatknp
|
|
35
|
+
- [Joy] Add docs about dark mode (#33002) @siriwatknp
|
|
36
|
+
- [Joy] Add template UIs & first look blog post (#32791) @danilo-leal
|
|
37
|
+
|
|
38
|
+
## `@mui/base@5.0.0-alpha.84`
|
|
39
|
+
|
|
40
|
+
- [base] Remove @mui/system in tests (#32945) @kevinji
|
|
41
|
+
- [ButtonUnstyled] Accept callbacks in componentsProps (#32991) @michaldudak
|
|
42
|
+
- [SwitchUnstyled] Accept callbacks in componentsProps (#32993) @michaldudak
|
|
43
|
+
- [TablePaginationUnstyled] Define ownerState and slot props' types (#32905) @michaldudak
|
|
44
|
+
- [TabPanelUnstyled] Define ownerState and slot props' types (#32928) @michaldudak
|
|
45
|
+
- [TabsListUnstyled] Define ownerState and slot props' types (#32925) @michaldudak
|
|
46
|
+
|
|
47
|
+
## Docs
|
|
48
|
+
|
|
49
|
+
- [blog] Fix anchor link scroll (#32994) @oliviertassinari
|
|
50
|
+
- [docs] Add "Migration" section to sidebar and revise v4-v5 content (#32740) @samuelsycamore
|
|
51
|
+
- [docs] Add What doesn't count as a breaking change? (#32850) @oliviertassinari
|
|
52
|
+
- [docs] Fix 301 link @oliviertassinari
|
|
53
|
+
- [docs] Fix icon color in `BadgeUnstyled` docs (#32976) @ZeeshanTamboli
|
|
54
|
+
- [docs] Improve product identifier (#32707) @danilo-leal
|
|
55
|
+
- [docs] Improve UX with back to top (#32896) @oliviertassinari
|
|
56
|
+
- [docs] Polish overview page to Material UI (#32954) @oliviertassinari
|
|
57
|
+
- [docs] Redirect older URLs (#33037) @oliviertassinari
|
|
58
|
+
- [docs] Remove pickers page from the Lab section (#32961) @DanailH
|
|
59
|
+
- [docs] Show product identifier on updated MUI X Introduction pages (#32966) @samuelsycamore
|
|
60
|
+
- [docs] Throw on 301 links (#32939) @oliviertassinari
|
|
61
|
+
- [website] Add Gerda to the about page (#33038) @danilo-leal
|
|
62
|
+
- [website] Polish the pricing page (#32811) @oliviertassinari
|
|
63
|
+
- [website] Remove unnecessary `address` dependency (#32957) @michaldudak
|
|
64
|
+
|
|
65
|
+
## Core
|
|
66
|
+
|
|
67
|
+
- [core] Improve icon synonyms (#32742) @oliviertassinari
|
|
68
|
+
- [core] Prepare Next.js config for React 18 (#32963) @michaldudak
|
|
69
|
+
- [core] Remove dead logic (#32940) @oliviertassinari
|
|
70
|
+
- [core] Update dependencies to fix security vulnerabilities (#32947) @michaldudak
|
|
71
|
+
- Add security link to README for Tidelift @mbrookes
|
|
72
|
+
|
|
73
|
+
All contributors of this release in alphabetical order: @abhinav-22-tech, @DanailH, @danilo-leal, @flaviendelangle, @haneenmahd, @hbjORbj, @Janpot, @kevinji, @mbrookes, @michaldudak, @oliviertassinari, @ryancogswell, @samuelsycamore, @siriwatknp, @ZeeshanTamboli
|
|
74
|
+
|
|
75
|
+
## 5.8.2
|
|
76
|
+
|
|
77
|
+
<!-- generated comparing v5.8.1..master -->
|
|
78
|
+
|
|
79
|
+
_May 30, 2022_
|
|
80
|
+
|
|
81
|
+
A big thanks to the 8 contributors who made this release possible. Here are some highlights ✨:
|
|
82
|
+
|
|
83
|
+
- 🐛 bug fixes and 📚 documentation improvements.
|
|
84
|
+
|
|
85
|
+
### `@mui/system@5.8.2`
|
|
86
|
+
|
|
87
|
+
- ​<!-- 04 -->[system] Add `getColorSchemeSelector` util (#32868) @siriwatknp
|
|
88
|
+
|
|
89
|
+
### `@mui/lab@5.0.0-alpha.84`
|
|
90
|
+
|
|
91
|
+
- ​<!-- 07 -->[Masonry] Place items to the left when there are less objects than specified in `column` prop (#32873) @hbjORbj
|
|
92
|
+
|
|
93
|
+
### `@mui/base@5.0.0-alpha.83`
|
|
94
|
+
|
|
95
|
+
- ​<!-- 24 -->[BadgeUnstyled] Define ownerState and slot props' types (#32750) @michaldudak
|
|
96
|
+
- ​<!-- 06 -->[SliderUnstyled] Define ownerState and slot props' types (#32739) @michaldudak
|
|
97
|
+
- ​<!-- 05 -->[SwitchUnstyled] Define ownerState and slot props' types (#32573) @michaldudak
|
|
98
|
+
- ​<!-- 03 -->[TabsUnstyled] Define ownerState and slot props' types (#32918) @michaldudak
|
|
99
|
+
- ​<!-- 02 -->[TabUnstyled] Define ownerState and slot props' types (#32915) @michaldudak
|
|
100
|
+
|
|
101
|
+
### `@mui/joy@5.0.0-alpha.30`
|
|
102
|
+
|
|
103
|
+
- ​<!-- 13 -->[Joy] use `textColor` prop for Typography and Link (#32938) @siriwatknp
|
|
104
|
+
- ​<!-- 12 -->[Joy] Make variants for more flexible (#32931) @siriwatknp
|
|
105
|
+
- ​<!-- 11 -->[Joy] Improve automatic adjustment (#32923) @siriwatknp
|
|
106
|
+
- ​<!-- 10 -->[Joy] Add `Chip` doc (#32819) @hbjORbj
|
|
107
|
+
- ​<!-- 09 -->[Joy] Add `AspectRatio` demos (#32848) @siriwatknp
|
|
108
|
+
- ​<!-- 08 -->[Joy] Fix wrong urls (#32883) @siriwatknp
|
|
109
|
+
|
|
110
|
+
### Docs
|
|
111
|
+
|
|
112
|
+
- ​<!-- 24 -->[docs] Iterate on the job ad for React engineer in Core (#32900) @mnajdova
|
|
113
|
+
- ​<!-- 23 -->[blog] Fix avatar image resolution (#32890) @oliviertassinari
|
|
114
|
+
- ​<!-- 19 -->[docs] Link the first page of the product (#32943) @oliviertassinari
|
|
115
|
+
- ​<!-- 18 -->[docs] Batch small changes (#32170) @michaldudak
|
|
116
|
+
- ​<!-- 17 -->[docs] Allow function prop to return undefined (#32766) @m4theushw
|
|
117
|
+
- ​<!-- 16 -->[docs] Fix wrong link to Material Icons (#32847) @oliviertassinari
|
|
118
|
+
- ​<!-- 15 -->[docs] Fix ClassNameGenerator content (#32800) @siriwatknp
|
|
119
|
+
- ​<!-- 14 -->[docs] Fix navigation links (#32851) @oliviertassinari
|
|
120
|
+
- ​<!-- 14 -->[docs] Document the `size` prop for InputLabel (#32936) @romelperez
|
|
121
|
+
- ​<!-- 21 -->[docs] Add note about transparent background on the outlined Alert variant (#32810) @aaarichter
|
|
122
|
+
- ​<!-- 01 -->[website] Update the careers's page with the new roles (#32535) @oliviertassinari
|
|
123
|
+
|
|
124
|
+
### Core
|
|
125
|
+
|
|
126
|
+
- ​<!-- 22 -->[core] Improve the incomplete issues workflow (#32878) @mnajdova
|
|
127
|
+
- ​<!-- 21 -->[core] Add CI check that the PR has label (#32886) @mnajdova
|
|
128
|
+
- ​<!-- 20 -->[core] Avoid leaking @babel/runtime (#32874) @oliviertassinari
|
|
129
|
+
|
|
130
|
+
All contributors of this release in alphabetical order: @aaarichter, @hbjORbj, @m4theushw, @michaldudak, @mnajdova, @oliviertassinari, @romelperez, @siriwatknp
|
|
131
|
+
|
|
132
|
+
## 5.8.1
|
|
133
|
+
|
|
134
|
+
<!-- generated comparing v5.8.0..master -->
|
|
135
|
+
|
|
136
|
+
_May 23, 2022_
|
|
137
|
+
|
|
138
|
+
A big thanks to the 21 contributors who made this release possible. Here are some highlights ✨:
|
|
139
|
+
|
|
140
|
+
- 💅 Added CSS variables support for two more Material UI components by @diggis00 and @alisasanib
|
|
141
|
+
- And more 🐛 bug fixes and 📚 documentation improvements.
|
|
142
|
+
|
|
143
|
+
### `@mui/material@5.8.1`
|
|
144
|
+
|
|
145
|
+
- ​<!-- 33 -->[Alert] Fix missing `ownerState` on the `action` slot (#32801) @mnajdova
|
|
146
|
+
- ​<!-- 20 -->[Fab] Make the `color` prop type extendable (#31830) @paales
|
|
147
|
+
- ​<!-- 14 -->[ListItemButton] Render as link if href specified (#32403) @o-dubrovskyi
|
|
148
|
+
- ​<!-- 13 -->[Paper] Add support for CSS variables (#32570) @diggis00
|
|
149
|
+
- ​<!-- 11 -->[Radio] Add support for CSS variables (#32599) @alisasanib
|
|
150
|
+
- ​<!-- 10 -->[Slider] Prevent rendering for marks that are out of the min & max bounds (#32436) @abriginets
|
|
151
|
+
- ​<!-- 09 -->[Slider] Slider having marks should be customizable in theme (#32816) @ZeeshanTamboli
|
|
152
|
+
- ​<!-- 03 -->[TouchRipple] Allows call imperative methods without event (#31955) @alexfauquette
|
|
153
|
+
|
|
154
|
+
### `@mui/system@5.8.1`
|
|
155
|
+
|
|
156
|
+
- ​<!-- 07 -->[system] Simplify stylesheet injection logic (#32869) @siriwatknp
|
|
157
|
+
- ​<!-- 06 -->[system] Fix color scheme specificity (#32628) @siriwatknp
|
|
158
|
+
- ​<!-- 05 -->[system] Fix `borderRadius` errors when used inside `CssVarsProvider` (#32817) @mnajdova
|
|
159
|
+
- ​<!-- 04 -->[system] Fix toolbar media query mixin getting merged in wrong order (#32713) @ZeeshanTamboli
|
|
160
|
+
|
|
161
|
+
### `@mui/lab@5.0.0-alpha.83`
|
|
162
|
+
|
|
163
|
+
- ​<!-- 15 -->[lab] Add missing `peerDependencies` (#32623) @nate-summercook
|
|
164
|
+
- ​<!-- 12 -->[pickers] Update @mui/x-date-pickers to be usable with React 18 (#32828) @flaviendelangle
|
|
165
|
+
|
|
166
|
+
### `@mui/base@5.0.0-alpha.82`
|
|
167
|
+
|
|
168
|
+
- ​<!-- 08 -->[SliderUnstyled] Fix `disabledSwap` not being respected in `onChangeCommitted` (#32647) @JeanPetrov
|
|
169
|
+
|
|
170
|
+
### `@mui/joy@5.0.0-alpha.29`
|
|
171
|
+
|
|
172
|
+
- ​<!-- 19 -->[Joy] Show Joy pages on master (#32866) @siriwatknp
|
|
173
|
+
- ​<!-- 18 -->[Joy] Add an overview page (#32836) @danilo-leal
|
|
174
|
+
- ​<!-- 17 -->[Joy] Add doc for the card components (#32825) @siriwatknp
|
|
175
|
+
- ​<!-- 16 -->[Joy] Miscellaneous fixes (#32815) @siriwatknp
|
|
176
|
+
|
|
177
|
+
### Docs
|
|
178
|
+
|
|
179
|
+
- ​<!-- 31 -->[docs] Simplify header DOM structure (#32844) @oliviertassinari
|
|
180
|
+
- ​<!-- 30 -->[docs] Fix CodeSandbox & StackBlitz generation (#32726) @siriwatknp
|
|
181
|
+
- ​<!-- 29 -->[docs] Fix urls to columns pages in pricing table (#32842) @alexfauquette
|
|
182
|
+
- ​<!-- 28 -->[docs] Fix Tailwind CSS integration docs (#32512) @robertwt7
|
|
183
|
+
- ​<!-- 27 -->[docs] Fixed wrong command for the `link-underline-hover` codemod (#32793) @veronikaslc
|
|
184
|
+
- ​<!-- 26 -->[docs] Fixed broken link on the icons page (#32780) @SamuelMaddox
|
|
185
|
+
- ​<!-- 25 -->[docs] Add "back to top" button (#30441) @VibhorJaiswal
|
|
186
|
+
- ​<!-- 24 -->[docs] Fix typo in notifications @mbrookes
|
|
187
|
+
- ​<!-- 32 -->[docs] New WAI-ARIA guidelines location (#32865) @oliviertassinari
|
|
188
|
+
- ​<!-- 23 -->[docs] Mention the ESLint plugin for detecting unused classes in tss-react (#32666) @garronej
|
|
189
|
+
- ​<!-- 22 -->[docs] Update `useAutocomplete` demos to use `Mui-focused` class (#32757) @ZeeshanTamboli
|
|
190
|
+
- ​<!-- 21 -->[examples] Fix `NextLinkComposedProps` gives a TypeScript error (#32655) @ZeeshanTamboli
|
|
191
|
+
- ​<!-- 01 -->[website] Add Pedro to About Us page (#32803) @apedroferreira
|
|
192
|
+
|
|
193
|
+
### Core
|
|
194
|
+
|
|
195
|
+
- ​<!-- 32 -->[core] Upgrade MUI X dependency (#32824) @oliviertassinari
|
|
196
|
+
- ​<!-- 02 -->[typescript] Allow module augmentation for `Mixins` (#32798) @mnajdova
|
|
197
|
+
|
|
198
|
+
All contributors of this release in alphabetical order: @abriginets, @alexfauquette, @alisasanib, @apedroferreira, @danilo-leal, @diggis00, @flaviendelangle, @garronej, @JeanPetrov, @mbrookes, @mnajdova, @nate-summercook, @o-dubrovskyi, @oliviertassinari, @paales, @robertwt7, @SamuelMaddox, @siriwatknp, @veronikaslc, @VibhorJaiswal, @ZeeshanTamboli
|
|
199
|
+
|
|
3
200
|
## 5.8.0
|
|
4
201
|
|
|
5
202
|
<!-- generated comparing v5.7.0..master -->
|
|
@@ -923,7 +1120,7 @@ A big thanks to the 16 contributors who made this release possible. Here are som
|
|
|
923
1120
|
- [docs] Fix force redirection to a different locale (#30967) @oliviertassinari
|
|
924
1121
|
- [docs] Add live Tailwind CSS demo (#30966) @oliviertassinari
|
|
925
1122
|
- [website] Add banner for promoting priority open roles (#31076) @danilo-leal
|
|
926
|
-
- [website] Open Full-stack Engineer role for studio (#31038) @
|
|
1123
|
+
- [website] Open Full-stack Engineer role for studio (#31038) @prakhargupta1
|
|
927
1124
|
- [website] Minor security improvements (#31062) @oliviertassinari
|
|
928
1125
|
- [website] Improve title of open roles (#30963) @DanailH
|
|
929
1126
|
- [website] Add BIMI avatar (#30444) @oliviertassinari
|
|
@@ -938,7 +1135,7 @@ A big thanks to the 16 contributors who made this release possible. Here are som
|
|
|
938
1135
|
- [test] Test if certain Base members are exported from Material UI (#31067) @michaldudak
|
|
939
1136
|
- [core] Remove dead code (#31064) @oliviertassinari
|
|
940
1137
|
|
|
941
|
-
All contributors of this release in alphabetical order: @agauravdev, @alisasanib, @DanailH, @danilo-leal, @huyenltnguyen, @l10nbot, @liradb2000, @mbrookes, @michaldudak, @mnajdova, @
|
|
1138
|
+
All contributors of this release in alphabetical order: @agauravdev, @alisasanib, @DanailH, @danilo-leal, @huyenltnguyen, @l10nbot, @liradb2000, @mbrookes, @michaldudak, @mnajdova, @prakhargupta1, @oliviertassinari, @ryohey, @samuelsycamore, @siriwatknp, @sydneyjodon-wk
|
|
942
1139
|
|
|
943
1140
|
## 5.4.1
|
|
944
1141
|
|
|
@@ -1648,14 +1845,14 @@ This is an early release to fix `export 'useId' (imported as 'React') was not fo
|
|
|
1648
1845
|
- ​<!-- 9 -->[core] Fix PR run detection in test_bundle_size_monitor (#29879) @eps1lon
|
|
1649
1846
|
- ​<!-- 8 -->[core] Move bundle size monitoring to CircleCI (#29876) @eps1lon
|
|
1650
1847
|
- ​<!-- 7 -->[docs] Add keys to Responsive AppBar demo (#29884) @mbrookes
|
|
1651
|
-
- ​<!-- 6 -->[docs] MUI's 2021 Developer survey (#29765) @
|
|
1848
|
+
- ​<!-- 6 -->[docs] MUI's 2021 Developer survey (#29765) @prakhargupta1
|
|
1652
1849
|
- ​<!-- 5 -->[docs] Smoother image loading UX (#29858) @oliviertassinari
|
|
1653
1850
|
- ​<!-- 4 -->[Select] Fix select display value with React Nodes (#29836) @kegi
|
|
1654
1851
|
- ​<!-- 3 -->[system] Add `experimental_sx` utility (#29833) @mnajdova
|
|
1655
1852
|
- ​<!-- 2 -->[test] Ignore "detected multiple renderers" warning for now (#29854) @eps1lon
|
|
1656
1853
|
- ​<!-- 1 -->[useMediaQuery][utils] Remove usage of React 18 APIs (#29870) @eps1lon
|
|
1657
1854
|
|
|
1658
|
-
All contributors of this release in alphabetical order: @eps1lon, @karakib2k18, @kegi, @mbrookes, @mnajdova, @
|
|
1855
|
+
All contributors of this release in alphabetical order: @eps1lon, @karakib2k18, @kegi, @mbrookes, @mnajdova, @prakhargupta1, @oliviertassinari
|
|
1659
1856
|
|
|
1660
1857
|
## 5.2.0
|
|
1661
1858
|
|
|
@@ -2473,7 +2670,7 @@ _Sep 1, 2021_
|
|
|
2473
2670
|
A big thanks to the 18 contributors who made this release possible. Here are some highlights ✨:
|
|
2474
2671
|
|
|
2475
2672
|
- 🎉 Renamed packages to `@mui/*` as part of rebranding the company, following the strategy of expanding the library scope beyond Material Design. For more details about it, check the [GitHub discussion](https://github.com/mui/material-ui/discussions/27803).
|
|
2476
|
-
- 🛠 Added `mui-replace` codemod for migrating `@material-ui/*` to new packages `@mui/*`. Check out this [codemod detail](https://github.com/mui/material-ui/blob/next/packages/mui-codemod/README.md#mui-replace) or head to [migration guide](https://mui.com/material-ui/
|
|
2673
|
+
- 🛠 Added `mui-replace` codemod for migrating `@material-ui/*` to new packages `@mui/*`. Check out this [codemod detail](https://github.com/mui/material-ui/blob/next/packages/mui-codemod/README.md#mui-replace) or head to [migration guide](https://mui.com/material-ui/migration/migration-v4/#preset-safe)
|
|
2477
2674
|
- 🧪 Added new `<Mansory>` component to the lab, [check it out](https://mui.com/components/masonry/). It has been crafted by our first intern, @hbjORbj 👏!
|
|
2478
2675
|
|
|
2479
2676
|
### `@mui/material@5.0.0-rc.0`
|
|
@@ -3878,7 +4075,7 @@ A big thanks to the 16 contributors who made this release possible. Here are som
|
|
|
3878
4075
|
/>
|
|
3879
4076
|
```
|
|
3880
4077
|
|
|
3881
|
-
> Follow [this link](https://mui.com/material-ui/
|
|
4078
|
+
> Follow [this link](https://mui.com/material-ui/migration/migration-v4/) for full migration from v4 => v5
|
|
3882
4079
|
|
|
3883
4080
|
#### Changes
|
|
3884
4081
|
|
package/Container/Container.d.ts
CHANGED
|
@@ -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/createBox.spec.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export declare type SpacingOptions = number | Spacing | ((abs: number) => number | string) | ((abs: number | string) => number | string) | ReadonlyArray<string | number>;
|
|
2
|
-
export declare type SpacingArgument = number | string;
|
|
3
|
-
export interface Spacing {
|
|
4
|
-
(): string;
|
|
5
|
-
(value: number): string;
|
|
6
|
-
(topBottom: SpacingArgument, rightLeft: SpacingArgument): string;
|
|
7
|
-
(top: SpacingArgument, rightLeft: SpacingArgument, bottom: SpacingArgument): string;
|
|
8
|
-
(top: SpacingArgument, right: SpacingArgument, bottom: SpacingArgument, left: SpacingArgument): string;
|
|
9
|
-
}
|
|
10
|
-
export default function createSpacing(spacingInput?: SpacingOptions): Spacing;
|
|
1
|
+
export declare type SpacingOptions = number | Spacing | ((abs: number) => number | string) | ((abs: number | string) => number | string) | ReadonlyArray<string | number>;
|
|
2
|
+
export declare type SpacingArgument = number | string;
|
|
3
|
+
export interface Spacing {
|
|
4
|
+
(): string;
|
|
5
|
+
(value: number): string;
|
|
6
|
+
(topBottom: SpacingArgument, rightLeft: SpacingArgument): string;
|
|
7
|
+
(top: SpacingArgument, rightLeft: SpacingArgument, bottom: SpacingArgument): string;
|
|
8
|
+
(top: SpacingArgument, right: SpacingArgument, bottom: SpacingArgument, left: SpacingArgument): string;
|
|
9
|
+
}
|
|
10
|
+
export default function createSpacing(spacingInput?: SpacingOptions): Spacing;
|
|
@@ -8,6 +8,21 @@ export interface ColorSchemeContextValue<SupportedColorScheme extends string>
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export interface CssVarsProviderConfig<ColorScheme extends string> {
|
|
11
|
+
/**
|
|
12
|
+
* DOM attribute for applying color scheme
|
|
13
|
+
* @default 'data-color-scheme'
|
|
14
|
+
*/
|
|
15
|
+
attribute?: string;
|
|
16
|
+
/**
|
|
17
|
+
* localStorage key used to store application `mode`
|
|
18
|
+
* @default 'mode'
|
|
19
|
+
*/
|
|
20
|
+
modeStorageKey?: string;
|
|
21
|
+
/**
|
|
22
|
+
* localStorage key used to store `colorScheme`
|
|
23
|
+
* @default 'color-scheme'
|
|
24
|
+
*/
|
|
25
|
+
colorSchemeStorageKey?: string;
|
|
11
26
|
/**
|
|
12
27
|
* Design system default color scheme.
|
|
13
28
|
* - provides string if the design system has one default color scheme (either light or dark)
|
|
@@ -41,16 +56,6 @@ export interface CreateCssVarsProviderResult<ColorScheme extends string, ThemeIn
|
|
|
41
56
|
props: React.PropsWithChildren<
|
|
42
57
|
Partial<CssVarsProviderConfig<ColorScheme>> & {
|
|
43
58
|
theme?: ThemeInput;
|
|
44
|
-
/**
|
|
45
|
-
* localStorage key used to store application `mode`
|
|
46
|
-
* @default 'mui-mode'
|
|
47
|
-
*/
|
|
48
|
-
modeStorageKey?: string;
|
|
49
|
-
/**
|
|
50
|
-
* DOM attribute for applying color scheme
|
|
51
|
-
* @default 'data-mui-color-scheme'
|
|
52
|
-
*/
|
|
53
|
-
attribute?: string;
|
|
54
59
|
/**
|
|
55
60
|
* The document used to perform `disableTransitionOnChange` feature
|
|
56
61
|
* @default document
|
|
@@ -66,11 +71,6 @@ export interface CreateCssVarsProviderResult<ColorScheme extends string, ThemeIn
|
|
|
66
71
|
* @default ':root'
|
|
67
72
|
*/
|
|
68
73
|
colorSchemeSelector?: string;
|
|
69
|
-
/**
|
|
70
|
-
* localStorage key used to store `colorScheme`
|
|
71
|
-
* @default 'mui-color-scheme'
|
|
72
|
-
*/
|
|
73
|
-
colorSchemeStorageKey?: string;
|
|
74
74
|
/**
|
|
75
75
|
* The window that attaches the 'storage' event listener
|
|
76
76
|
* @default window
|
|
@@ -44,6 +44,9 @@ exports.DISABLE_CSS_TRANSITION = DISABLE_CSS_TRANSITION;
|
|
|
44
44
|
function createCssVarsProvider(options) {
|
|
45
45
|
const {
|
|
46
46
|
theme: defaultTheme = {},
|
|
47
|
+
attribute: defaultAttribute = _getInitColorSchemeScript.DEFAULT_ATTRIBUTE,
|
|
48
|
+
modeStorageKey: defaultModeStorageKey = _getInitColorSchemeScript.DEFAULT_MODE_STORAGE_KEY,
|
|
49
|
+
colorSchemeStorageKey: defaultColorSchemeStorageKey = _getInitColorSchemeScript.DEFAULT_COLOR_SCHEME_STORAGE_KEY,
|
|
47
50
|
defaultMode: desisgnSystemMode = 'light',
|
|
48
51
|
defaultColorScheme: designSystemColorScheme,
|
|
49
52
|
disableTransitionOnChange: designSystemTransitionOnChange = false,
|
|
@@ -73,9 +76,9 @@ function createCssVarsProvider(options) {
|
|
|
73
76
|
children,
|
|
74
77
|
theme: themeProp = defaultTheme,
|
|
75
78
|
prefix = designSystemPrefix,
|
|
76
|
-
modeStorageKey =
|
|
77
|
-
colorSchemeStorageKey =
|
|
78
|
-
attribute =
|
|
79
|
+
modeStorageKey = defaultModeStorageKey,
|
|
80
|
+
colorSchemeStorageKey = defaultColorSchemeStorageKey,
|
|
81
|
+
attribute = defaultAttribute,
|
|
79
82
|
defaultMode = desisgnSystemMode,
|
|
80
83
|
defaultColorScheme = designSystemColorScheme,
|
|
81
84
|
disableTransitionOnChange = designSystemTransitionOnChange,
|
|
@@ -141,9 +144,11 @@ function createCssVarsProvider(options) {
|
|
|
141
144
|
colorSchemes,
|
|
142
145
|
prefix,
|
|
143
146
|
vars: rootVars,
|
|
144
|
-
getCssVar: (0, _createGetCssVar.default)(prefix)
|
|
147
|
+
getCssVar: (0, _createGetCssVar.default)(prefix),
|
|
148
|
+
getColorSchemeSelector: targetColorScheme => `[${attribute}="${targetColorScheme}"] &`
|
|
145
149
|
});
|
|
146
|
-
const
|
|
150
|
+
const defaultColorSchemeStyleSheet = {};
|
|
151
|
+
const otherColorSchemesStyleSheet = {};
|
|
147
152
|
Object.entries(colorSchemes).forEach(([key, scheme]) => {
|
|
148
153
|
const {
|
|
149
154
|
css,
|
|
@@ -179,9 +184,9 @@ function createCssVarsProvider(options) {
|
|
|
179
184
|
})();
|
|
180
185
|
|
|
181
186
|
if (key === resolvedDefaultColorScheme) {
|
|
182
|
-
|
|
187
|
+
defaultColorSchemeStyleSheet[colorSchemeSelector] = css;
|
|
183
188
|
} else {
|
|
184
|
-
|
|
189
|
+
otherColorSchemesStyleSheet[`${colorSchemeSelector === ':root' ? '' : colorSchemeSelector}[${attribute}="${key}"]`] = css;
|
|
185
190
|
}
|
|
186
191
|
});
|
|
187
192
|
React.useEffect(() => {
|
|
@@ -248,7 +253,9 @@ function createCssVarsProvider(options) {
|
|
|
248
253
|
[colorSchemeSelector]: rootCss
|
|
249
254
|
}
|
|
250
255
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_styledEngine.GlobalStyles, {
|
|
251
|
-
styles:
|
|
256
|
+
styles: defaultColorSchemeStyleSheet
|
|
257
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_styledEngine.GlobalStyles, {
|
|
258
|
+
styles: otherColorSchemesStyleSheet
|
|
252
259
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ThemeProvider.default, {
|
|
253
260
|
theme: resolveTheme ? resolveTheme(theme) : theme,
|
|
254
261
|
children: children
|
|
@@ -328,9 +335,16 @@ function createCssVarsProvider(options) {
|
|
|
328
335
|
*/
|
|
329
336
|
theme: _propTypes.default.object
|
|
330
337
|
} : void 0;
|
|
338
|
+
|
|
339
|
+
const getInitColorSchemeScript = params => (0, _getInitColorSchemeScript.default)((0, _extends2.default)({
|
|
340
|
+
attribute: defaultAttribute,
|
|
341
|
+
colorSchemeStorageKey: defaultColorSchemeStorageKey,
|
|
342
|
+
modeStorageKey: defaultModeStorageKey
|
|
343
|
+
}, params));
|
|
344
|
+
|
|
331
345
|
return {
|
|
332
346
|
CssVarsProvider,
|
|
333
347
|
useColorScheme,
|
|
334
|
-
getInitColorSchemeScript
|
|
348
|
+
getInitColorSchemeScript
|
|
335
349
|
};
|
|
336
350
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The benefit of this function is to help developers get CSS var from theme without specifying the whole variable
|
|
3
|
-
* and they does not need to remember the prefix (defined once).
|
|
4
|
-
*/
|
|
5
|
-
export default function createGetCssVar<T extends string = string>(prefix?: string): <AdditionalVars extends string = never>(field: T | AdditionalVars, ...vars: (T | AdditionalVars)[]) => string;
|
|
1
|
+
/**
|
|
2
|
+
* The benefit of this function is to help developers get CSS var from theme without specifying the whole variable
|
|
3
|
+
* and they does not need to remember the prefix (defined once).
|
|
4
|
+
*/
|
|
5
|
+
export default function createGetCssVar<T extends string = string>(prefix?: string): <AdditionalVars extends string = never>(field: T | AdditionalVars, ...vars: (T | AdditionalVars)[]) => string;
|