@mui/system 5.6.3 → 5.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/Box/Box.spec.d.ts +1 -1
  2. package/CHANGELOG.md +238 -0
  3. package/Container/Container.d.ts +13 -0
  4. package/Container/Container.js +81 -0
  5. package/Container/ContainerProps.d.ts +40 -0
  6. package/Container/ContainerProps.js +5 -0
  7. package/Container/containerClasses.d.ts +22 -0
  8. package/Container/containerClasses.js +17 -0
  9. package/Container/createContainer.d.ts +18 -0
  10. package/Container/createContainer.js +172 -0
  11. package/Container/index.d.ts +5 -0
  12. package/Container/index.js +42 -0
  13. package/Container/package.json +6 -0
  14. package/ThemeProvider/ThemeProvider.d.ts +1 -1
  15. package/createBox.spec.d.ts +1 -1
  16. package/createStyled.js +3 -1
  17. package/createTheme/createBreakpoints.d.ts +5 -0
  18. package/createTheme/createSpacing.d.ts +10 -10
  19. package/cssVars/createCssVarsProvider.d.ts +25 -0
  20. package/cssVars/createCssVarsProvider.js +74 -57
  21. package/cssVars/createCssVarsProvider.spec.d.ts +1 -1
  22. package/cssVars/createGetCssVar.d.ts +5 -5
  23. package/cssVars/cssVarsParser.d.ts +70 -70
  24. package/cssVars/cssVarsParser.js +11 -9
  25. package/cssVars/getInitColorSchemeScript.d.ts +40 -12
  26. package/cssVars/getInitColorSchemeScript.js +4 -3
  27. package/cssVars/index.d.ts +2 -2
  28. package/cssVars/useCurrentColorScheme.d.ts +53 -50
  29. package/cssVars/useCurrentColorScheme.js +17 -7
  30. package/esm/Container/Container.js +70 -0
  31. package/esm/Container/ContainerProps.js +1 -0
  32. package/esm/Container/containerClasses.js +6 -0
  33. package/esm/Container/createContainer.js +151 -0
  34. package/esm/Container/index.js +3 -0
  35. package/esm/createStyled.js +3 -1
  36. package/esm/cssVars/createCssVarsProvider.js +76 -57
  37. package/esm/cssVars/cssVarsParser.js +11 -9
  38. package/esm/cssVars/getInitColorSchemeScript.js +4 -3
  39. package/esm/cssVars/useCurrentColorScheme.js +17 -7
  40. package/esm/index.js +4 -1
  41. package/index.d.ts +6 -0
  42. package/index.js +32 -2
  43. package/index.spec.d.ts +1 -1
  44. package/legacy/Container/Container.js +70 -0
  45. package/legacy/Container/ContainerProps.js +1 -0
  46. package/legacy/Container/containerClasses.js +6 -0
  47. package/legacy/Container/createContainer.js +148 -0
  48. package/legacy/Container/index.js +3 -0
  49. package/legacy/createStyled.js +3 -1
  50. package/legacy/cssVars/createCssVarsProvider.js +83 -55
  51. package/legacy/cssVars/cssVarsParser.js +11 -7
  52. package/legacy/cssVars/getInitColorSchemeScript.js +6 -3
  53. package/legacy/cssVars/useCurrentColorScheme.js +20 -9
  54. package/legacy/index.js +5 -2
  55. package/modern/Container/Container.js +70 -0
  56. package/modern/Container/ContainerProps.js +1 -0
  57. package/modern/Container/containerClasses.js +6 -0
  58. package/modern/Container/createContainer.js +151 -0
  59. package/modern/Container/index.js +3 -0
  60. package/modern/createStyled.js +3 -1
  61. package/modern/cssVars/createCssVarsProvider.js +76 -55
  62. package/modern/cssVars/cssVarsParser.js +11 -9
  63. package/modern/cssVars/getInitColorSchemeScript.js +4 -3
  64. package/modern/cssVars/useCurrentColorScheme.js +17 -7
  65. package/modern/index.js +5 -2
  66. package/package.json +5 -5
  67. 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,243 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 5.8.0
4
+
5
+ <!-- generated comparing v5.7.0..master -->
6
+
7
+ _May 17, 2022_
8
+
9
+ A big thanks to the 14 contributors who made this release possible. Here are some highlights ✨:
10
+
11
+ - 🚀 [Blog post](https://mui.com/blog/premium-plan-release/) for announcing the release of the Premium plan of MUI X is out thanks to @joserodolfofreitas.
12
+ - Codemod for `jss` to `tss-react` migration is out thanks to @ryancogswell
13
+ - And more 🐛 bug fixes and 📚 documentation improvements.
14
+
15
+ ### `@mui/material@5.8.0`
16
+
17
+ - &#8203;<!-- 37 -->[Autocomplete] Fix `getInputProps` TypeScript return type (#32730) @ZeeshanTamboli
18
+ - &#8203;<!-- 36 -->[Autocomplete] Forward props to renderTags() (#32637) @emlai
19
+ - &#8203;<!-- 35 -->[Badge] Fix TypeScript error when adding style overrides for Badge (#32745) @ZeeshanTamboli
20
+ - &#8203;<!-- 09 -->[Menu] Fix context menu open position (#32661) @oliviertassinari
21
+
22
+ ### `@mui/system@5.8.0`
23
+
24
+ - &#8203;<!-- 05 -->[system] Add `Container` component and `createContainer` factory (#32263) @mnajdova
25
+
26
+ ### `@mui/base@5.0.0-alpha.81`
27
+
28
+ - &#8203;<!-- 15 -->[InputUnstyled] Support callbacks in componentsProps (#32271) @michaldudak
29
+ - &#8203;<!-- 14 -->[InputUnstyled] Define ownerState and slot props' types (#32491) @michaldudak
30
+ - &#8203;<!-- 08 -->[MenuUnstyled] Demos improvements (#32714) @michaldudak
31
+ - &#8203;<!-- 07 -->[OptionUnstyled] Define ownerState and slot props' types (#32717) @michaldudak
32
+
33
+ ### `@mui/joy@5.0.0-alpha.28`
34
+
35
+ - &#8203;<!-- 13 -->[Joy] Add Badge doc (#32790) @siriwatknp
36
+ - &#8203;<!-- 12 -->[Joy] Add global variant feature page (#32695) @siriwatknp
37
+ - &#8203;<!-- 11 -->[Joy] Add avatar page (#32711) @siriwatknp
38
+
39
+ ### `@mui/codemod@5.8.0`
40
+
41
+ - &#8203;<!-- 33 -->[codemod] Add jss to tss-react codemod (#31802) @ryancogswell
42
+
43
+ ### Docs
44
+
45
+ - &#8203;<!-- 34 -->[blog] Add release post for MUI X Premium (#32720) @joserodolfofreitas
46
+ - &#8203;<!-- 29 -->[docs] Fix wrong code snippet for overriding styles in theme with a callback value (#32781) @ZeeshanTamboli
47
+ - &#8203;<!-- 28 -->[docs] Update Crowdin logo (#32782) @andrii-bodnar
48
+ - &#8203;<!-- 27 -->[docs] Improve callouts design (#32709) @danilo-leal
49
+ - &#8203;<!-- 26 -->[docs] Revise the "Understanding MUI packages" article (#32382) @danilo-leal
50
+ - &#8203;<!-- 25 -->[docs] Fix link to the material icons (#32771) @oliviertassinari
51
+ - &#8203;<!-- 24 -->[docs] Add notification for Premium release blog post (#32728) @joserodolfofreitas
52
+ - &#8203;<!-- 23 -->[docs] Base Portal style revisions and final review (#32157) @samuelsycamore
53
+ - &#8203;<!-- 22 -->[docs] Add joy to docs package.json (#32744) @siriwatknp
54
+ - &#8203;<!-- 21 -->[docs] Fix TOC-related styles not being applied when disableAd=true (#32733) @cherniavskii
55
+ - &#8203;<!-- 20 -->[docs] Add TypeScript guide on the polymorphic components (#32168) @mnajdova
56
+ - &#8203;<!-- 19 -->[docs] Fix warning mode pass to React.Fragment (#32729) @siriwatknp
57
+ - &#8203;<!-- 18 -->[docs] Revise Showcase copy for clarity + audit appList (#31946) @samuelsycamore
58
+ - &#8203;<!-- 17 -->[examples] Update remix example's tsconfig with required values (#32723) @michaldudak
59
+ - &#8203;<!-- 16 -->[examples] Update to use React 18's createRoot (#32506) @mnajdova
60
+ - &#8203;<!-- 10 -->[l10n] Fix typos and translations on arSD and arEG locales (#31848) @shadigaafar
61
+ - &#8203;<!-- 04 -->[website] Improve communication about MUI X components that are still wip (#32708) @danilo-leal
62
+ - &#8203;<!-- 03 -->[website] Remove scrollbar on x-axis (#32291) @MrHBS
63
+ - &#8203;<!-- 02 -->[website] Update the pricing page for the MUI X premium plan release (#32458) @joserodolfofreitas
64
+ - &#8203;<!-- 01 -->[website] Update sponsors (#32725) @oliviertassinari
65
+
66
+ ### Core
67
+
68
+ - &#8203;<!-- 32 -->[core] Enabled Renovate's lockfile maintenance (#32635) @michaldudak
69
+ - &#8203;<!-- 31 -->[core] Extract `MuiPage` interface to separate file (#32715) @cherniavskii
70
+ - &#8203;<!-- 30 -->[core] Remove unnecessary `spacing` parameter from `createMixins` method (#32690) @ZeeshanTamboli
71
+ - &#8203;<!-- 06 -->[private-classnames] Remove package and move everything to utils (#32758) @mnajdova
72
+
73
+ All contributors of this release in alphabetical order: @andrii-bodnar, @cherniavskii, @danilo-leal, @emlai, @joserodolfofreitas, @michaldudak, @mnajdova, @MrHBS, @oliviertassinari, @ryancogswell, @samuelsycamore, @shadigaafar, @siriwatknp, @ZeeshanTamboli
74
+
75
+ ## 5.7.0
76
+
77
+ <!-- generated comparing v5.6.4..master -->
78
+
79
+ _May 10, 2022_
80
+
81
+ A big thanks to the 27 contributors who made this release possible. Here are some highlights ✨:
82
+
83
+ 🛠 This release is all about supporting CSS variables in many Material UI components.
84
+ Kudos to all contributors!
85
+
86
+ ### `@mui/material@5.7.0`
87
+
88
+ - [StepLabel, StepIcon] Add support for CSS variables (#32609) @vicasas
89
+ - [Table, TableRow] Add support for CSS variables (#32614) @vicasas
90
+ - [AppBar] Add a logo component for the responsive app bar demo (#32374) @ameetmadan
91
+ - [Autocomplete] Fix clearing single array values (#32626) @mikepricedev
92
+ - [Autocomplete] Fix keep listbox open on left/right keys when inputValue is not empty (#31407) @alisasanib
93
+ - [Autocomplete] Add support for CSS variables (#32598) @ZeeshanTamboli
94
+ - [Autocomplete] Render `endAdornment` only when necessary (#32386) @g1eny0ung
95
+ - [ButtonGroup] Add support for CSS variables (#32498) @vicasas
96
+ - [CardActionArea] Add support for CSS variables (#32554) @vicasas
97
+ - [ClickAwayListener] Allow pointer up/down events to event handler (#32264) @vladjerca
98
+ - [CssBaseline] Add support for CSS vars (#32618) @haneenmahd
99
+ - [Dialog] Add support for CSS variables (#32555) @vicasas
100
+ - [Divider] Add support for CSS variables (#32519) @vicasas
101
+ - [Drawer] Add support for CSS variables (#32565) @nghiamvt
102
+ - [Fab] Add support for CSS variables (#32564) @alisasanib
103
+ - [FormControlLabel] Add support for CSS variables (#32588) @elliefoote
104
+ - [FormHelperText] Add support for CSS variables (#32596) @ZeeshanTamboli
105
+ - [FormLabel] Add support for CSS variables (#32602) @ZeeshanTamboli
106
+ - [Icon] Add support for CSS variables (#32595) @Jamaalwbrown
107
+ - [IconButton] Add support for CSS variables (#32590) @Ariyapong
108
+ - [ImageListItemBar] Add support for CSS variables (#32578) @vicasas
109
+ - [Input] Support CSS variables (#32128) @ivan-ngchakming
110
+ - [InputAdornment] Add support CSS variables (#32607) @vicasas
111
+ - [Link] Fix style overrides color prop (#32653) @siriwatknp
112
+ - [ListItem] Add support for CSS variables (#32580) @dan-mba
113
+ - [ListItemButton] Add support for CSS variables (#32582) @dan-mba
114
+ - [ListItemIcon] Add support for CSS variables (#32583) @dan-mba
115
+ - [ListSubheader] Add support for CSS variables (#32584) @dan-mba
116
+ - [MenuItem] Add support for CSS variables (#32561) @nghiamvt
117
+ - [MobileStepper] Add support for CSS vars (#32606) @haneenmahd
118
+ - [Modal] Add support for CSS variables (#32605) @haneenmahd
119
+ - [PaginationItem] Add support for CSS vars (#32612) @haneenmahd
120
+ - [Rating] Add support for CSS variables (#32556) @vicasas
121
+ - [Snackbar] Add support for CSS variables (#32603) @gin1314
122
+ - [SpeedDial] Add support for CSS variables (#32613) @alisasanib
123
+ - [Stepper] Export useStepperContext (#31398) @pzi
124
+ - [SvgIcon] Add support for CSS variables (#32610) @vicasas
125
+ - [TablePagination] Add support for CSS variables (#32615) @haneenmahd
126
+ - [TableSortLabel]: Add support for CSS vars (#32616) @haneenmahd
127
+ - [Tabs] Add support for CSS variables (#32547) @ZeeshanTamboli
128
+ - [ToggleButton] Add support for CSS variables (#32600) @Ariyapong
129
+ - [ToggleButtonGroup] Add support for CSS variables (#32617) @haneenmahd
130
+ - [Tooltip] Add support for CSS variables (#32594) @gin1314
131
+
132
+ ### `@mui/system@5.7.0`
133
+
134
+ - [System] Support CSS variables for iframes & custom nodes (#32496) @siriwatknp
135
+
136
+ ### `@mui/base@5.0.0-alpha.80`
137
+
138
+ - [ButtonUnstyled] Fix keyboard navigation on customized elements (#32204) @michaldudak
139
+
140
+ ### `@mui/private-classnames@5.7.0`
141
+
142
+ - [classnames] Add new package for classnames utils (#32502) @mnajdova
143
+
144
+ ### Docs
145
+
146
+ - [docs] Correct links to prevent 301 redirects (#32692) @michaldudak
147
+ - [docs] Move, split, and revise "Unstyled components" page (#32562) @samuelsycamore
148
+ - [docs] Nest `ListItemButton` in `ListItem` in the Drawer examples (#31987) @stefanprobst
149
+ - [docs] Apply callouts in the Material UI docs (#32567) @danilo-leal
150
+ - [docs] Show product identifier on new X pages (#32657) @cherniavskii
151
+ - [docs] Fix copy button childNode not found (#32652) @siriwatknp
152
+ - [docs] Split install commands in isolated code blocks (#32566) @danilo-leal
153
+ - [docs] Base Switch style revisions and final review (#32376) @samuelsycamore
154
+ - [docs] Adds Badge link to Base doc nav (#32619) @samuelsycamore
155
+ - [docs] Base Installation style revisions and final review (#32483) @samuelsycamore
156
+ - [docs] Fix broken redirection (#32581) @oliviertassinari
157
+ - [docs] Allows to use `import '<library name>'` in demonstrations (#32492) @alexfauquette
158
+ - [docs] Hide copy button on search icon dialog (#32577) @siriwatknp
159
+ - [docs] Use full API link for ThemeProvider (#32549) @jcvidiri
160
+ - [Joy] Add principles page (#32648) @siriwatknp
161
+ - [Joy] Add Button page (#32576) @siriwatknp
162
+ - [Joy] Add "Quick start" and "Tutorial" pages (#32383) @siriwatknp
163
+ - [website] Add store to the footer and "hiring" chip adjustment (#32650) @danilo-leal
164
+ - [website] Optimize conversion to store (#32646) @oliviertassinari
165
+ - [website] Remove copy button on marketing pages (#32649) @siriwatknp
166
+ - [website] Add missing space in copy label (#32638) @flaviendelangle
167
+
168
+ ### Core
169
+
170
+ - [core] Security updates (#32636) @michaldudak
171
+ - [core] Fix `docs:dev` not working after upgrading `next` to 12.1.0 (#32552) @cherniavskii
172
+ - [core] Update minimist to fix security vulnerability (#32575) @michaldudak
173
+
174
+ All contributors of this release in alphabetical order: @alexfauquette, @alisasanib, @ameetmadan, @Ariyapong, @cherniavskii, @dan-mba, @danilo-leal, @elliefoote, @flaviendelangle, @g1eny0ung, @gin1314, @haneenmahd, @ivan-ngchakming, @Jamaalwbrown, @jcvidiri, @michaldudak, @mikepricedev, @mnajdova, @nghiamvt, @oliviertassinari, @pzi, @samuelsycamore, @siriwatknp, @stefanprobst, @vicasas, @vladjerca, @ZeeshanTamboli
175
+
176
+ ## 5.6.4
177
+
178
+ <!-- generated comparing v5.6.3..master -->
179
+
180
+ _May 2, 2022_
181
+
182
+ A big thanks to the 13 contributors who made this release possible. Here are some highlights ✨:
183
+
184
+ - 💅 5 Material UI components were updated to support CSS variables by @ZeeshanTamboli & @vicasas
185
+ - And more 🐛 bug fixes and 📚 improvements.
186
+
187
+ ### `@mui/material@5.6.4`
188
+
189
+ - &#8203;<!-- 37 -->[Accordion] Add support for CSS variables (#32542) @ZeeshanTamboli
190
+ - &#8203;<!-- 36 -->[AvatarGroup] Add support for CSS variables (#32507) @vicasas
191
+ - &#8203;<!-- 35 -->[Badge] Add support for CSS variables (#32516) @vicasas
192
+ - &#8203;<!-- 34 -->[BottomNavigation] Add support for CSS variables (#32517) @vicasas
193
+ - &#8203;<!-- 33 -->[CircularProgress] Add support for CSS variables (#32543) @ZeeshanTamboli
194
+ - &#8203;<!-- 07 -->[FilledInput] Fix type error from undefined `color` (#32258) @hbjORbj
195
+ - &#8203;<!-- 02 -->[l10n] Fix typo in csCZ translation of Pagination component (#32509) @Martin005
196
+ - &#8203;<!-- 01 -->[Tabs] Fix `TabIndicatorProps` prop missing `sx` prop (#32503) @b-novikov-ipersonality
197
+
198
+ ### `@mui/codemod@5.6.4`
199
+
200
+ - &#8203;<!-- 32 -->[codemod] Leave numeric arguments to breakpoints functions unchanged (#32426) @ryancogswell
201
+ - &#8203;<!-- 31 -->[codemod] Allow for line breaks within theme.spacing parentheses (#32432) @ryancogswell
202
+
203
+ ### `@mui/joy@5.0.0-alpha.26`
204
+
205
+ - &#8203;<!-- 06 -->[Joy] Miscellaneous fixes (#32541) @siriwatknp
206
+ - &#8203;<!-- 05 -->[Joy] Add `extendSxProp` to Link (#32505) @siriwatknp
207
+ - &#8203;<!-- 04 -->[Joy] Rename variants (#32489) @siriwatknp
208
+ - &#8203;<!-- 03 -->[Joy] Add `extendTheme` (#32450) @siriwatknp
209
+
210
+ ### Docs
211
+
212
+ - &#8203;<!-- 30 -->[docs] SEO fixes (#32515) @oliviertassinari
213
+ - &#8203;<!-- 29 -->[docs] Replace `Overriding nested component styles` anchor link with text (#32487) @ZeeshanTamboli
214
+ - &#8203;<!-- 28 -->[docs] Update the list of external domains (#32514) @oliviertassinari
215
+ - &#8203;<!-- 27 -->[docs] Update Material UI code snippets for React 18 (#32361) @samuelsycamore
216
+ - &#8203;<!-- 26 -->[docs] Base TextareaAutosize style revisions and final review (#32481) @samuelsycamore
217
+ - &#8203;<!-- 25 -->[docs] Base ClickAwayListener style revisions and final review (#32156) @samuelsycamore
218
+ - &#8203;<!-- 24 -->[docs] Base Button style revisions and final review (#32380) @samuelsycamore
219
+ - &#8203;<!-- 23 -->[docs] Base NoSsr style revisions and final review (#32254) @samuelsycamore
220
+ - &#8203;<!-- 22 -->[docs] Correctly capitalize Ctrl @oliviertassinari
221
+ - &#8203;<!-- 21 -->[docs] Fix styling in `Basic Popper` demo on the MUI Base docs (#32488) @ZeeshanTamboli
222
+ - &#8203;<!-- 20 -->[docs] Add "Overview" page to Base docs (#32310) @samuelsycamore
223
+ - &#8203;<!-- 19 -->[docs] Add copy button to code block (#32390) @siriwatknp
224
+ - &#8203;<!-- 18 -->[docs] Base Tabs style revisions and final review (#32423) @samuelsycamore
225
+ - &#8203;<!-- 17 -->[docs] Base Popper style revisions and final review (#32412) @samuelsycamore
226
+ - &#8203;<!-- 16 -->[docs] Improve sidenav for MUI X (#32435) @oliviertassinari
227
+ - &#8203;<!-- 15 -->[docs] Don't redirect on deploy preview (#32399) @m4theushw
228
+ - &#8203;<!-- 14 -->[docs] A few SEO fixes (#32431) @oliviertassinari
229
+ - &#8203;<!-- 13 -->[docs] Update links to the new Group & Pivot pages (#32410) @flaviendelangle
230
+ - &#8203;<!-- 12 -->[docs] Support callouts (#32402) @siriwatknp
231
+ - &#8203;<!-- 11 -->[docs] Fix import path in the Snackbar article #32462 @mongolyy
232
+ - &#8203;<!-- 10 -->[docs] Fix grammar mistake in shadows.md (#32454) @HexM7
233
+ - &#8203;<!-- 09 -->[docs] Improve unstyled button docs (#32429) @oliviertassinari
234
+
235
+ ### Core
236
+
237
+ - &#8203;<!-- 08 -->[experiment] Add template for testing Material UI components with CSS variables (#32500) @siriwatknp
238
+
239
+ All contributors of this release in alphabetical order: @b-novikov-ipersonality, @flaviendelangle, @hbjORbj, @HexM7, @m4theushw, @Martin005, @mongolyy, @oliviertassinari, @ryancogswell, @samuelsycamore, @siriwatknp, @vicasas, @ZeeshanTamboli
240
+
3
241
  ## 5.6.3
4
242
 
5
243
  <!-- generated comparing v5.6.2..master -->
@@ -0,0 +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;
@@ -0,0 +1,81 @@
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 _createContainer = _interopRequireDefault(require("./createContainer"));
13
+
14
+ /**
15
+ *
16
+ * Demos:
17
+ *
18
+ * - [Container (Material UI)](https://mui.com/material-ui/react-container/)
19
+ * - [Container (MUI System)](https://mui.com/system/react-container/)
20
+ *
21
+ * API:
22
+ *
23
+ * - [Container API](https://mui.com/system/api/container/)
24
+ */
25
+ const Container = (0, _createContainer.default)();
26
+ process.env.NODE_ENV !== "production" ? Container.propTypes
27
+ /* remove-proptypes */
28
+ = {
29
+ // ----------------------------- Warning --------------------------------
30
+ // | These PropTypes are generated from the TypeScript type definitions |
31
+ // | To update them edit TypeScript types and run "yarn proptypes" |
32
+ // ----------------------------------------------------------------------
33
+
34
+ /**
35
+ * @ignore
36
+ */
37
+ children: _propTypes.default.node,
38
+
39
+ /**
40
+ * Override or extend the styles applied to the component.
41
+ */
42
+ classes: _propTypes.default.object,
43
+
44
+ /**
45
+ * The component used for the root node.
46
+ * Either a string to use a HTML element or a component.
47
+ */
48
+ component: _propTypes.default.elementType,
49
+
50
+ /**
51
+ * If `true`, the left and right padding is removed.
52
+ * @default false
53
+ */
54
+ disableGutters: _propTypes.default.bool,
55
+
56
+ /**
57
+ * Set the max-width to match the min-width of the current breakpoint.
58
+ * This is useful if you'd prefer to design for a fixed set of sizes
59
+ * instead of trying to accommodate a fully fluid viewport.
60
+ * It's fluid by default.
61
+ * @default false
62
+ */
63
+ fixed: _propTypes.default.bool,
64
+
65
+ /**
66
+ * Determine the max-width of the container.
67
+ * The container width grows with the size of the screen.
68
+ * Set to `false` to disable `maxWidth`.
69
+ * @default 'lg'
70
+ */
71
+ maxWidth: _propTypes.default
72
+ /* @typescript-to-proptypes-ignore */
73
+ .oneOfType([_propTypes.default.oneOf(['xs', 'sm', 'md', 'lg', 'xl', false]), _propTypes.default.string]),
74
+
75
+ /**
76
+ * The system prop that allows defining system overrides as well as additional CSS styles.
77
+ */
78
+ 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])
79
+ } : void 0;
80
+ var _default = Container;
81
+ exports.default = _default;
@@ -0,0 +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>;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +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;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ exports.getContainerUtilityClass = getContainerUtilityClass;
8
+
9
+ var _utils = require("@mui/utils");
10
+
11
+ function getContainerUtilityClass(slot) {
12
+ return (0, _utils.unstable_generateUtilityClass)('MuiContainer', slot);
13
+ }
14
+
15
+ const containerClasses = (0, _utils.unstable_generateUtilityClasses)('MuiContainer', ['root', 'disableGutters', 'fixed', 'maxWidthXs', 'maxWidthSm', 'maxWidthMd', 'maxWidthLg', 'maxWidthXl']);
16
+ var _default = containerClasses;
17
+ exports.default = _default;
@@ -0,0 +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 {};
@@ -0,0 +1,172 @@
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 = createContainer;
9
+
10
+ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
11
+
12
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
+
14
+ var React = _interopRequireWildcard(require("react"));
15
+
16
+ var _propTypes = _interopRequireDefault(require("prop-types"));
17
+
18
+ var _clsx = _interopRequireDefault(require("clsx"));
19
+
20
+ var _utils = require("@mui/utils");
21
+
22
+ var _useThemeProps = _interopRequireDefault(require("../useThemeProps"));
23
+
24
+ var _styled = _interopRequireDefault(require("../styled"));
25
+
26
+ var _createTheme = _interopRequireDefault(require("../createTheme"));
27
+
28
+ var _jsxRuntime = require("react/jsx-runtime");
29
+
30
+ const _excluded = ["className", "component", "disableGutters", "fixed", "maxWidth", "classes"];
31
+
32
+ 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); }
33
+
34
+ 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; }
35
+
36
+ const defaultTheme = (0, _createTheme.default)();
37
+ const defaultCreateStyledComponent = (0, _styled.default)('div', {
38
+ name: 'MuiContainer',
39
+ slot: 'Root',
40
+ overridesResolver: (props, styles) => {
41
+ const {
42
+ ownerState
43
+ } = props;
44
+ return [styles.root, styles[`maxWidth${(0, _utils.unstable_capitalize)(String(ownerState.maxWidth))}`], ownerState.fixed && styles.fixed, ownerState.disableGutters && styles.disableGutters];
45
+ }
46
+ });
47
+
48
+ const useThemePropsDefault = inProps => (0, _useThemeProps.default)({
49
+ props: inProps,
50
+ name: 'MuiContainer',
51
+ defaultTheme
52
+ });
53
+
54
+ const useUtilityClasses = (ownerState, componentName) => {
55
+ const getContainerUtilityClass = slot => {
56
+ return (0, _utils.unstable_generateUtilityClass)(componentName, slot);
57
+ };
58
+
59
+ const {
60
+ classes,
61
+ fixed,
62
+ disableGutters,
63
+ maxWidth
64
+ } = ownerState;
65
+ const slots = {
66
+ root: ['root', maxWidth && `maxWidth${(0, _utils.unstable_capitalize)(String(maxWidth))}`, fixed && 'fixed', disableGutters && 'disableGutters']
67
+ };
68
+ return (0, _utils.unstable_composeClasses)(slots, getContainerUtilityClass, classes);
69
+ };
70
+
71
+ function createContainer(options = {}) {
72
+ const {
73
+ // This will allow adding custom styled fn (for example for custom sx style function)
74
+ createStyledComponent = defaultCreateStyledComponent,
75
+ useThemeProps = useThemePropsDefault,
76
+ componentName = 'MuiContainer'
77
+ } = options;
78
+ const ContainerRoot = createStyledComponent(({
79
+ theme,
80
+ ownerState
81
+ }) => (0, _extends2.default)({
82
+ width: '100%',
83
+ marginLeft: 'auto',
84
+ boxSizing: 'border-box',
85
+ marginRight: 'auto',
86
+ display: 'block'
87
+ }, !ownerState.disableGutters && {
88
+ paddingLeft: theme.spacing(2),
89
+ paddingRight: theme.spacing(2),
90
+ // @ts-ignore module augmentation fails if custom breakpoints are used
91
+ [theme.breakpoints.up('sm')]: {
92
+ paddingLeft: theme.spacing(3),
93
+ paddingRight: theme.spacing(3)
94
+ }
95
+ }), ({
96
+ theme,
97
+ ownerState
98
+ }) => ownerState.fixed && Object.keys(theme.breakpoints.values).reduce((acc, breakpointValueKey) => {
99
+ const breakpoint = breakpointValueKey;
100
+ const value = theme.breakpoints.values[breakpoint];
101
+
102
+ if (value !== 0) {
103
+ // @ts-ignore
104
+ acc[theme.breakpoints.up(breakpoint)] = {
105
+ maxWidth: `${value}${theme.breakpoints.unit}`
106
+ };
107
+ }
108
+
109
+ return acc;
110
+ }, {}), ({
111
+ theme,
112
+ ownerState
113
+ }) => (0, _extends2.default)({}, ownerState.maxWidth === 'xs' && {
114
+ // @ts-ignore module augmentation fails if custom breakpoints are used
115
+ [theme.breakpoints.up('xs')]: {
116
+ // @ts-ignore module augmentation fails if custom breakpoints are used
117
+ maxWidth: Math.max(theme.breakpoints.values.xs, 444)
118
+ }
119
+ }, ownerState.maxWidth && // @ts-ignore module augmentation fails if custom breakpoints are used
120
+ ownerState.maxWidth !== 'xs' && {
121
+ // @ts-ignore module augmentation fails if custom breakpoints are used
122
+ [theme.breakpoints.up(ownerState.maxWidth)]: {
123
+ // @ts-ignore module augmentation fails if custom breakpoints are used
124
+ maxWidth: `${theme.breakpoints.values[ownerState.maxWidth]}${theme.breakpoints.unit}`
125
+ }
126
+ }));
127
+ const Container = /*#__PURE__*/React.forwardRef(function Container(inProps, ref) {
128
+ const props = useThemeProps(inProps);
129
+ const {
130
+ className,
131
+ component = 'div',
132
+ disableGutters = false,
133
+ fixed = false,
134
+ maxWidth = 'lg'
135
+ } = props,
136
+ other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
137
+ const ownerState = (0, _extends2.default)({}, props, {
138
+ component,
139
+ disableGutters,
140
+ fixed,
141
+ maxWidth
142
+ }); // @ts-ignore module augmentation fails if custom breakpoints are used
143
+
144
+ const classes = useUtilityClasses(ownerState, componentName);
145
+ return (
146
+ /*#__PURE__*/
147
+ // @ts-ignore theme is injected by the styled util
148
+ (0, _jsxRuntime.jsx)(ContainerRoot, (0, _extends2.default)({
149
+ as: component // @ts-ignore module augmentation fails if custom breakpoints are used
150
+ ,
151
+ ownerState: ownerState,
152
+ className: (0, _clsx.default)(classes.root, className),
153
+ ref: ref
154
+ }, other))
155
+ );
156
+ });
157
+ process.env.NODE_ENV !== "production" ? Container.propTypes
158
+ /* remove-proptypes */
159
+ = {
160
+ children: _propTypes.default.node,
161
+ classes: _propTypes.default.object,
162
+ className: _propTypes.default.string,
163
+ component: _propTypes.default.elementType,
164
+ disableGutters: _propTypes.default.bool,
165
+ fixed: _propTypes.default.bool,
166
+ maxWidth: _propTypes.default
167
+ /* @typescript-to-proptypes-ignore */
168
+ .oneOfType([_propTypes.default.oneOf(['xs', 'sm', 'md', 'lg', 'xl', false]), _propTypes.default.string]),
169
+ 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])
170
+ } : void 0;
171
+ return Container;
172
+ }
@@ -0,0 +1,5 @@
1
+ export { default } from './Container';
2
+ export * from './Container';
3
+
4
+ export { default as containerClasses } from './containerClasses';
5
+ export * from './containerClasses';