@mui/system 5.10.13 → 5.10.14

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 (206) hide show
  1. package/Box/Box.js +1 -10
  2. package/Box/Box.spec.d.ts +1 -1
  3. package/Box/index.js +0 -2
  4. package/CHANGELOG.md +70 -2
  5. package/Container/Container.d.ts +13 -13
  6. package/Container/Container.js +2 -17
  7. package/Container/ContainerProps.d.ts +40 -40
  8. package/Container/containerClasses.d.ts +22 -22
  9. package/Container/containerClasses.js +0 -3
  10. package/Container/createContainer.d.ts +18 -18
  11. package/Container/createContainer.js +15 -37
  12. package/Container/index.js +0 -6
  13. package/Stack/Stack.d.ts +13 -13
  14. package/Stack/Stack.js +1 -12
  15. package/Stack/StackProps.d.ts +42 -42
  16. package/Stack/createStack.d.ts +21 -21
  17. package/Stack/createStack.js +10 -48
  18. package/Stack/index.d.ts +5 -5
  19. package/Stack/index.js +0 -9
  20. package/Stack/stackClasses.d.ts +8 -8
  21. package/Stack/stackClasses.js +0 -3
  22. package/ThemeProvider/ThemeProvider.js +2 -22
  23. package/ThemeProvider/index.js +0 -2
  24. package/Unstable_Grid/Grid.d.ts +12 -12
  25. package/Unstable_Grid/Grid.js +6 -42
  26. package/Unstable_Grid/GridProps.d.ts +162 -162
  27. package/Unstable_Grid/createGrid.d.ts +11 -11
  28. package/Unstable_Grid/createGrid.js +19 -49
  29. package/Unstable_Grid/gridClasses.d.ts +20 -20
  30. package/Unstable_Grid/gridClasses.js +8 -7
  31. package/Unstable_Grid/gridGenerator.d.ts +29 -28
  32. package/Unstable_Grid/gridGenerator.js +22 -63
  33. package/Unstable_Grid/index.d.ts +5 -5
  34. package/Unstable_Grid/index.js +0 -9
  35. package/borders.js +0 -14
  36. package/breakpoints.js +3 -32
  37. package/colorManipulator.js +13 -55
  38. package/compose.js +0 -7
  39. package/createBox.js +5 -20
  40. package/createBox.spec.d.ts +1 -1
  41. package/createStyled.js +27 -71
  42. package/createTheme/createBreakpoints.js +22 -37
  43. package/createTheme/createSpacing.d.ts +10 -10
  44. package/createTheme/createSpacing.js +4 -8
  45. package/createTheme/createTheme.js +6 -16
  46. package/createTheme/index.js +0 -2
  47. package/cssGrid.js +0 -21
  48. package/cssVars/createCssVarsProvider.js +24 -72
  49. package/cssVars/createCssVarsProvider.spec.d.ts +1 -1
  50. package/cssVars/createGetCssVar.d.ts +5 -5
  51. package/cssVars/createGetCssVar.js +2 -7
  52. package/cssVars/cssVarsParser.d.ts +65 -65
  53. package/cssVars/cssVarsParser.js +3 -15
  54. package/cssVars/getInitColorSchemeScript.d.ts +42 -42
  55. package/cssVars/getInitColorSchemeScript.js +0 -6
  56. package/cssVars/index.d.ts +3 -3
  57. package/cssVars/index.js +0 -3
  58. package/cssVars/useCurrentColorScheme.d.ts +53 -53
  59. package/cssVars/useCurrentColorScheme.js +20 -49
  60. package/display.js +0 -6
  61. package/esm/Box/Box.js +1 -6
  62. package/esm/Container/Container.js +3 -14
  63. package/esm/Container/createContainer.js +15 -25
  64. package/esm/Stack/Stack.js +1 -9
  65. package/esm/Stack/createStack.js +10 -29
  66. package/esm/ThemeProvider/ThemeProvider.js +2 -11
  67. package/esm/Unstable_Grid/Grid.js +6 -39
  68. package/esm/Unstable_Grid/createGrid.js +18 -35
  69. package/esm/Unstable_Grid/gridClasses.js +8 -4
  70. package/esm/Unstable_Grid/gridGenerator.js +20 -38
  71. package/esm/borders.js +0 -6
  72. package/esm/breakpoints.js +7 -22
  73. package/esm/colorManipulator.js +13 -43
  74. package/esm/compose.js +0 -5
  75. package/esm/createBox.js +5 -7
  76. package/esm/createStyled.js +27 -64
  77. package/esm/createTheme/createBreakpoints.js +22 -34
  78. package/esm/createTheme/createSpacing.js +4 -7
  79. package/esm/createTheme/createTheme.js +6 -9
  80. package/esm/cssGrid.js +0 -9
  81. package/esm/cssVars/createCssVarsProvider.js +24 -58
  82. package/esm/cssVars/createGetCssVar.js +2 -6
  83. package/esm/cssVars/cssVarsParser.js +3 -11
  84. package/esm/cssVars/useCurrentColorScheme.js +20 -44
  85. package/esm/getThemeValue.js +0 -2
  86. package/esm/index.js +1 -2
  87. package/esm/memoize.js +0 -1
  88. package/esm/merge.js +0 -3
  89. package/esm/palette.js +0 -3
  90. package/esm/propsToClassKey.js +4 -7
  91. package/esm/sizing.js +0 -5
  92. package/esm/spacing.js +3 -23
  93. package/esm/style.js +2 -19
  94. package/esm/styleFunctionSx/extendSxProp.js +3 -10
  95. package/esm/styleFunctionSx/styleFunctionSx.js +3 -16
  96. package/esm/sx/sx.js +0 -2
  97. package/esm/useTheme.js +0 -2
  98. package/esm/useThemeProps/getThemeProps.js +0 -2
  99. package/esm/useThemeWithoutDefault.js +0 -3
  100. package/flexbox.js +0 -4
  101. package/getThemeValue.js +0 -14
  102. package/index.js +1 -55
  103. package/index.spec.d.ts +1 -1
  104. package/legacy/Box/Box.js +1 -6
  105. package/legacy/Container/Container.js +3 -14
  106. package/legacy/Container/createContainer.js +29 -39
  107. package/legacy/Stack/Stack.js +1 -9
  108. package/legacy/Stack/createStack.js +17 -37
  109. package/legacy/ThemeProvider/ThemeProvider.js +3 -12
  110. package/legacy/Unstable_Grid/Grid.js +6 -39
  111. package/legacy/Unstable_Grid/createGrid.js +34 -53
  112. package/legacy/Unstable_Grid/gridGenerator.js +36 -58
  113. package/legacy/borders.js +0 -6
  114. package/legacy/breakpoints.js +9 -28
  115. package/legacy/colorManipulator.js +16 -48
  116. package/legacy/compose.js +0 -6
  117. package/legacy/createBox.js +9 -11
  118. package/legacy/createStyled.js +27 -68
  119. package/legacy/createTheme/createBreakpoints.js +20 -33
  120. package/legacy/createTheme/createSpacing.js +4 -9
  121. package/legacy/createTheme/createTheme.js +7 -13
  122. package/legacy/cssGrid.js +0 -9
  123. package/legacy/cssVars/createCssVarsProvider.js +90 -129
  124. package/legacy/cssVars/createGetCssVar.js +2 -10
  125. package/legacy/cssVars/cssVarsParser.js +7 -20
  126. package/legacy/cssVars/getInitColorSchemeScript.js +14 -15
  127. package/legacy/cssVars/useCurrentColorScheme.js +43 -69
  128. package/legacy/getThemeValue.js +0 -3
  129. package/legacy/index.js +2 -3
  130. package/legacy/memoize.js +0 -1
  131. package/legacy/merge.js +0 -3
  132. package/legacy/palette.js +0 -3
  133. package/legacy/propsToClassKey.js +2 -5
  134. package/legacy/sizing.js +0 -5
  135. package/legacy/spacing.js +6 -27
  136. package/legacy/style.js +6 -24
  137. package/legacy/styleFunctionSx/extendSxProp.js +3 -11
  138. package/legacy/styleFunctionSx/styleFunctionSx.js +6 -21
  139. package/legacy/sx/sx.js +0 -2
  140. package/legacy/useTheme.js +0 -2
  141. package/legacy/useThemeProps/getThemeProps.js +2 -4
  142. package/legacy/useThemeProps/useThemeProps.js +2 -2
  143. package/legacy/useThemeWithoutDefault.js +0 -3
  144. package/memoize.js +0 -2
  145. package/merge.js +0 -5
  146. package/modern/Box/Box.js +1 -6
  147. package/modern/Container/Container.js +3 -14
  148. package/modern/Container/createContainer.js +15 -25
  149. package/modern/Stack/Stack.js +1 -9
  150. package/modern/Stack/createStack.js +10 -29
  151. package/modern/ThemeProvider/ThemeProvider.js +2 -11
  152. package/modern/Unstable_Grid/Grid.js +6 -39
  153. package/modern/Unstable_Grid/createGrid.js +18 -34
  154. package/modern/Unstable_Grid/gridClasses.js +8 -4
  155. package/modern/Unstable_Grid/gridGenerator.js +20 -36
  156. package/modern/borders.js +0 -6
  157. package/modern/breakpoints.js +7 -21
  158. package/modern/colorManipulator.js +13 -43
  159. package/modern/compose.js +0 -5
  160. package/modern/createBox.js +5 -7
  161. package/modern/createStyled.js +27 -63
  162. package/modern/createTheme/createBreakpoints.js +22 -34
  163. package/modern/createTheme/createSpacing.js +4 -7
  164. package/modern/createTheme/createTheme.js +6 -9
  165. package/modern/cssGrid.js +0 -9
  166. package/modern/cssVars/createCssVarsProvider.js +24 -58
  167. package/modern/cssVars/createGetCssVar.js +2 -6
  168. package/modern/cssVars/cssVarsParser.js +3 -11
  169. package/modern/cssVars/useCurrentColorScheme.js +20 -44
  170. package/modern/getThemeValue.js +0 -2
  171. package/modern/index.js +2 -3
  172. package/modern/memoize.js +0 -1
  173. package/modern/merge.js +0 -3
  174. package/modern/palette.js +0 -3
  175. package/modern/propsToClassKey.js +4 -7
  176. package/modern/sizing.js +0 -4
  177. package/modern/spacing.js +3 -22
  178. package/modern/style.js +2 -19
  179. package/modern/styleFunctionSx/extendSxProp.js +3 -10
  180. package/modern/styleFunctionSx/styleFunctionSx.js +3 -16
  181. package/modern/sx/sx.js +0 -2
  182. package/modern/useTheme.js +0 -2
  183. package/modern/useThemeProps/getThemeProps.js +0 -2
  184. package/modern/useThemeWithoutDefault.js +0 -3
  185. package/package.json +6 -6
  186. package/palette.js +0 -6
  187. package/positions.js +0 -6
  188. package/propsToClassKey.js +4 -10
  189. package/responsivePropType.js +0 -3
  190. package/shadows.js +0 -3
  191. package/sizing.js +0 -11
  192. package/spacing.js +3 -37
  193. package/style.js +2 -24
  194. package/styleFunctionSx/extendSxProp.js +3 -15
  195. package/styleFunctionSx/index.js +0 -5
  196. package/styleFunctionSx/styleFunctionSx.js +3 -21
  197. package/styleFunctionSx/styleFunctionSx.spec.d.ts +1 -1
  198. package/styled.js +0 -3
  199. package/sx/index.js +0 -2
  200. package/sx/sx.js +0 -4
  201. package/typography.js +0 -4
  202. package/useTheme.js +0 -6
  203. package/useThemeProps/getThemeProps.js +0 -4
  204. package/useThemeProps/index.js +0 -3
  205. package/useThemeProps/useThemeProps.js +0 -4
  206. package/useThemeWithoutDefault.js +0 -4
package/Box/Box.js CHANGED
@@ -1,36 +1,27 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = void 0;
9
-
10
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
-
12
9
  var _createBox = _interopRequireDefault(require("../createBox"));
13
-
14
10
  const Box = (0, _createBox.default)();
15
- process.env.NODE_ENV !== "production" ? Box.propTypes
16
- /* remove-proptypes */
17
- = {
11
+ process.env.NODE_ENV !== "production" ? Box.propTypes /* remove-proptypes */ = {
18
12
  // ----------------------------- Warning --------------------------------
19
13
  // | These PropTypes are generated from the TypeScript type definitions |
20
14
  // | To update them edit the d.ts file and run "yarn proptypes" |
21
15
  // ----------------------------------------------------------------------
22
-
23
16
  /**
24
17
  * @ignore
25
18
  */
26
19
  children: _propTypes.default.node,
27
-
28
20
  /**
29
21
  * The component used for the root node.
30
22
  * Either a string to use a HTML element or a component.
31
23
  */
32
24
  component: _propTypes.default.elementType,
33
-
34
25
  /**
35
26
  * The system prop that allows defining system overrides as well as additional CSS styles.
36
27
  */
package/Box/Box.spec.d.ts CHANGED
@@ -1 +1 @@
1
- export {};
1
+ export {};
package/Box/index.js CHANGED
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
@@ -11,5 +10,4 @@ Object.defineProperty(exports, "default", {
11
10
  return _Box.default;
12
11
  }
13
12
  });
14
-
15
13
  var _Box = _interopRequireDefault(require("./Box"));
package/CHANGELOG.md CHANGED
@@ -1,5 +1,73 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## v5.10.14
4
+
5
+ <!-- generated comparing v5.10.13..master -->
6
+
7
+ _Nov 14, 2022_
8
+
9
+ A big thanks to the 17 contributors who made this release possible. Here are some highlights ✨:
10
+
11
+ - 🚀 @siriwatknp added the Autocomplete component to the Joy UI (#34315)
12
+ - ♿ @sfavello improved the accessibility of the Material UI's Autocomplete by adding support for the Delete key (#33822)
13
+ - Many other 🐛 bug fixes, 📚 documentation, and ⚙️ infrastructure improvements.
14
+
15
+ ### `@mui/material@5.10.14`
16
+
17
+ - [Material UI] Add `palette.background.defaultChannel` token (#35061) @siriwatknp
18
+ - [Autocomplete] Remove tags with the Delete key (#33822) @sfavello
19
+ - [IconButton] custom color causes type error (#34521) @kushagra010
20
+
21
+ ### `@mui/system@5.10.14`
22
+
23
+ - [Unstable_Gridv2] sorted responsize keys based on breakpoint value (#34987) @sai6855
24
+
25
+ ### `@mui/joy@5.0.0-alpha.54`
26
+
27
+ - [Joy] Export `FormControl`, `LinearProgress` and `ListSubheader` components from `@mui/joy` (#35003) @Studio384
28
+ - [Joy] Miscellaneous fixes (#35044) @siriwatknp
29
+ - [Joy] Add `Autocomplete` component (#34315) @siriwatknp
30
+ - [Joy] Saturate a bit the gray palette (#35148) @danilo-leal
31
+ - [Autocomplete][joy] Fix types (#35153) @siriwatknp
32
+
33
+ ### Docs
34
+
35
+ - [blog] Fix font size of code blocks on iOS @oliviertassinari
36
+ - [docs] Accessibility - increase default contrastThreshold for WCAG AA compliance (#34901) @kennethbigler
37
+ - [docs] Correct the keepMounted section on the Drawer page (#35076) @michaldudak
38
+ - [docs] Fix code editor styles mismatches (#35108) @oliviertassinari
39
+ - [docs] Allows to access the next MUI-X (#34798) @alexfauquette
40
+ - [docs] Fix bugs with live edit demos (#35106) @oliviertassinari
41
+ - [docs] Fix `MarkdownElement` regression from adding CSS variables (#35096) @siriwatknp
42
+ - [docs] Add a new gold sponsor (#35089) @hbjORbj
43
+ - [docs] Fix scroll issue on expanded live demos (#35064) @bharatkashyap
44
+ - [docs] Improve alignment of the sponsors @oliviertassinari
45
+ - [docs] Improve code font family v2 (#35053) @oliviertassinari
46
+ - [docs] Upgrade to Next.js 13 (#35001) @mnajdova
47
+ - [docs] Fix typo in changelog @oliviertassinari
48
+ - [docs] Update Joy UI templates to use latest components (#35058) @siriwatknp
49
+ - [website] Fix design kits showcase throwing an error (#35093) @cherniavskii
50
+ - [website] Fix margin bug on CTA @oliviertassinari
51
+ - [website] Link respective repositories in product pages (#35046) @sidtohan
52
+ - [website] Migrate blog pages to use CSS theme variables (#34976) @siriwatknp
53
+ - [website] Update DoiT International logo and links with new brand (#35030) @ofir5300
54
+ - [website] Improve visual design app bar (#35111) @oliviertassinari
55
+
56
+ ### Core
57
+
58
+ - [core] Convert scripts to ES modules (#35036) @michaldudak
59
+ - [core] Show the whole version to make blame easier @oliviertassinari
60
+ - [core] Polish GitHub Action version @oliviertassinari
61
+ - [core] Ignore icons to speed up CodeQL @oliviertassinari
62
+ - [core] Feedback on branch protection @oliviertassinari
63
+ - [core] Revert CI (#35098) @siriwatknp
64
+ - [core] Fix job name to match the CI (#35097) @siriwatknp
65
+ - [core] ESLint fixes for tests (#34924) @Janpot
66
+ - [core] Ignore unrelated folders from github actions (#35028) @siriwatknp
67
+ - [core] Use pretty-quick instead of custom script (#34062) @Janpot
68
+
69
+ All contributors of this release in alphabetical order: @alexfauquette, @bharatkashyap, @cherniavskii, @danilo-leal, @hbjORbj, @Janpot, @kennethbigler, @kushagra010, @michaldudak, @mnajdova, @ofir5300, @oliviertassinari, @sai6855, @sfavello, @sidtohan, @siriwatknp, @Studio384
70
+
3
71
  ## v5.10.13
4
72
 
5
73
  <!-- generated comparing v5.10.12..master -->
@@ -9,7 +77,7 @@ _Nov 7, 2022_
9
77
  A big thanks to the 12 contributors who made this release possible. Here are some highlights ✨:
10
78
 
11
79
  - 🚀 The slots API has been introduced to the Material UI package by @michaldudak (#34873).
12
- - 🔥 Live editting of demos is stabilized by @oliviertassinari (#34870).
80
+ - 🔥 Live editing of demos is stabilized by @oliviertassinari (#34870).
13
81
  - Many other 🐛 bug fixes, 📚 documentation, and ⚙️ infrastructure improvements.
14
82
 
15
83
  ### `@mui/material@5.10.13`
@@ -8875,7 +8943,7 @@ _Sep 6, 2020_
8875
8943
  A big thanks to the 14 contributors who made this release possible.
8876
8944
  Here are some highlights ✨:
8877
8945
 
8878
- - 💎 A new diamond sponsor: [DoiT](https://www.doit-intl.com/), thank you!
8946
+ - 💎 A new diamond sponsor: [DoiT](https://www.doit.com/), thank you!
8879
8947
  - 📚 Include the default value of the props in IntelliSense (#22447) @eps1lon
8880
8948
  - ⚛️ More source migrated to TypeScript and testing-library (#22441) @baterson
8881
8949
  - And many more 🐛 bug fixes and 📚 improvements.
@@ -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,16 +1,12 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = void 0;
9
-
10
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
-
12
9
  var _createContainer = _interopRequireDefault(require("./createContainer"));
13
-
14
10
  /**
15
11
  *
16
12
  * Demos:
@@ -23,36 +19,29 @@ var _createContainer = _interopRequireDefault(require("./createContainer"));
23
19
  * - [Container API](https://mui.com/system/api/container/)
24
20
  */
25
21
  const Container = (0, _createContainer.default)();
26
- process.env.NODE_ENV !== "production" ? Container.propTypes
27
- /* remove-proptypes */
28
- = {
22
+ process.env.NODE_ENV !== "production" ? Container.propTypes /* remove-proptypes */ = {
29
23
  // ----------------------------- Warning --------------------------------
30
24
  // | These PropTypes are generated from the TypeScript type definitions |
31
25
  // | To update them edit TypeScript types and run "yarn proptypes" |
32
26
  // ----------------------------------------------------------------------
33
-
34
27
  /**
35
28
  * @ignore
36
29
  */
37
30
  children: _propTypes.default.node,
38
-
39
31
  /**
40
32
  * Override or extend the styles applied to the component.
41
33
  */
42
34
  classes: _propTypes.default.object,
43
-
44
35
  /**
45
36
  * The component used for the root node.
46
37
  * Either a string to use a HTML element or a component.
47
38
  */
48
39
  component: _propTypes.default.elementType,
49
-
50
40
  /**
51
41
  * If `true`, the left and right padding is removed.
52
42
  * @default false
53
43
  */
54
44
  disableGutters: _propTypes.default.bool,
55
-
56
45
  /**
57
46
  * Set the max-width to match the min-width of the current breakpoint.
58
47
  * This is useful if you'd prefer to design for a fixed set of sizes
@@ -61,17 +50,13 @@ process.env.NODE_ENV !== "production" ? Container.propTypes
61
50
  * @default false
62
51
  */
63
52
  fixed: _propTypes.default.bool,
64
-
65
53
  /**
66
54
  * Determine the max-width of the container.
67
55
  * The container width grows with the size of the screen.
68
56
  * Set to `false` to disable `maxWidth`.
69
57
  * @default 'lg'
70
58
  */
71
- maxWidth: _propTypes.default
72
- /* @typescript-to-proptypes-ignore */
73
- .oneOfType([_propTypes.default.oneOf(['xs', 'sm', 'md', 'lg', 'xl', false]), _propTypes.default.string]),
74
-
59
+ maxWidth: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_propTypes.default.oneOf(['xs', 'sm', 'md', 'lg', 'xl', false]), _propTypes.default.string]),
75
60
  /**
76
61
  * The system prop that allows defining system overrides as well as additional CSS styles.
77
62
  */
@@ -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;
@@ -5,13 +5,10 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  exports.getContainerUtilityClass = getContainerUtilityClass;
8
-
9
8
  var _utils = require("@mui/utils");
10
-
11
9
  function getContainerUtilityClass(slot) {
12
10
  return (0, _utils.unstable_generateUtilityClass)('MuiContainer', slot);
13
11
  }
14
-
15
12
  const containerClasses = (0, _utils.unstable_generateUtilityClasses)('MuiContainer', ['root', 'disableGutters', 'fixed', 'maxWidthXs', 'maxWidthSm', 'maxWidthMd', 'maxWidthLg', 'maxWidthXl']);
16
13
  var _default = containerClasses;
17
14
  exports.default = _default;
@@ -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 {};
@@ -1,38 +1,23 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = createContainer;
9
-
10
8
  var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
11
-
12
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
-
14
10
  var React = _interopRequireWildcard(require("react"));
15
-
16
11
  var _propTypes = _interopRequireDefault(require("prop-types"));
17
-
18
12
  var _clsx = _interopRequireDefault(require("clsx"));
19
-
20
13
  var _utils = require("@mui/utils");
21
-
22
14
  var _useThemeProps = _interopRequireDefault(require("../useThemeProps"));
23
-
24
15
  var _styled = _interopRequireDefault(require("../styled"));
25
-
26
16
  var _createTheme = _interopRequireDefault(require("../createTheme"));
27
-
28
17
  var _jsxRuntime = require("react/jsx-runtime");
29
-
30
18
  const _excluded = ["className", "component", "disableGutters", "fixed", "maxWidth", "classes"];
31
-
32
19
  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
20
  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
21
  const defaultTheme = (0, _createTheme.default)();
37
22
  const defaultCreateStyledComponent = (0, _styled.default)('div', {
38
23
  name: 'MuiContainer',
@@ -44,18 +29,15 @@ const defaultCreateStyledComponent = (0, _styled.default)('div', {
44
29
  return [styles.root, styles[`maxWidth${(0, _utils.unstable_capitalize)(String(ownerState.maxWidth))}`], ownerState.fixed && styles.fixed, ownerState.disableGutters && styles.disableGutters];
45
30
  }
46
31
  });
47
-
48
32
  const useThemePropsDefault = inProps => (0, _useThemeProps.default)({
49
33
  props: inProps,
50
34
  name: 'MuiContainer',
51
35
  defaultTheme
52
36
  });
53
-
54
37
  const useUtilityClasses = (ownerState, componentName) => {
55
38
  const getContainerUtilityClass = slot => {
56
39
  return (0, _utils.unstable_generateUtilityClass)(componentName, slot);
57
40
  };
58
-
59
41
  const {
60
42
  classes,
61
43
  fixed,
@@ -67,7 +49,6 @@ const useUtilityClasses = (ownerState, componentName) => {
67
49
  };
68
50
  return (0, _utils.unstable_composeClasses)(slots, getContainerUtilityClass, classes);
69
51
  };
70
-
71
52
  function createContainer(options = {}) {
72
53
  const {
73
54
  // This will allow adding custom styled fn (for example for custom sx style function)
@@ -98,14 +79,12 @@ function createContainer(options = {}) {
98
79
  }) => ownerState.fixed && Object.keys(theme.breakpoints.values).reduce((acc, breakpointValueKey) => {
99
80
  const breakpoint = breakpointValueKey;
100
81
  const value = theme.breakpoints.values[breakpoint];
101
-
102
82
  if (value !== 0) {
103
83
  // @ts-ignore
104
84
  acc[theme.breakpoints.up(breakpoint)] = {
105
85
  maxWidth: `${value}${theme.breakpoints.unit}`
106
86
  };
107
87
  }
108
-
109
88
  return acc;
110
89
  }, {}), ({
111
90
  theme,
@@ -116,7 +95,8 @@ function createContainer(options = {}) {
116
95
  // @ts-ignore module augmentation fails if custom breakpoints are used
117
96
  maxWidth: Math.max(theme.breakpoints.values.xs, 444)
118
97
  }
119
- }, ownerState.maxWidth && // @ts-ignore module augmentation fails if custom breakpoints are used
98
+ }, ownerState.maxWidth &&
99
+ // @ts-ignore module augmentation fails if custom breakpoints are used
120
100
  ownerState.maxWidth !== 'xs' && {
121
101
  // @ts-ignore module augmentation fails if custom breakpoints are used
122
102
  [theme.breakpoints.up(ownerState.maxWidth)]: {
@@ -127,26 +107,28 @@ function createContainer(options = {}) {
127
107
  const Container = /*#__PURE__*/React.forwardRef(function Container(inProps, ref) {
128
108
  const props = useThemeProps(inProps);
129
109
  const {
130
- className,
131
- component = 'div',
132
- disableGutters = false,
133
- fixed = false,
134
- maxWidth = 'lg'
135
- } = props,
136
- other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
110
+ className,
111
+ component = 'div',
112
+ disableGutters = false,
113
+ fixed = false,
114
+ maxWidth = 'lg'
115
+ } = props,
116
+ other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
137
117
  const ownerState = (0, _extends2.default)({}, props, {
138
118
  component,
139
119
  disableGutters,
140
120
  fixed,
141
121
  maxWidth
142
- }); // @ts-ignore module augmentation fails if custom breakpoints are used
122
+ });
143
123
 
124
+ // @ts-ignore module augmentation fails if custom breakpoints are used
144
125
  const classes = useUtilityClasses(ownerState, componentName);
145
126
  return (
146
127
  /*#__PURE__*/
147
128
  // @ts-ignore theme is injected by the styled util
148
129
  (0, _jsxRuntime.jsx)(ContainerRoot, (0, _extends2.default)({
149
- as: component // @ts-ignore module augmentation fails if custom breakpoints are used
130
+ as: component
131
+ // @ts-ignore module augmentation fails if custom breakpoints are used
150
132
  ,
151
133
  ownerState: ownerState,
152
134
  className: (0, _clsx.default)(classes.root, className),
@@ -154,18 +136,14 @@ function createContainer(options = {}) {
154
136
  }, other))
155
137
  );
156
138
  });
157
- process.env.NODE_ENV !== "production" ? Container.propTypes
158
- /* remove-proptypes */
159
- = {
139
+ process.env.NODE_ENV !== "production" ? Container.propTypes /* remove-proptypes */ = {
160
140
  children: _propTypes.default.node,
161
141
  classes: _propTypes.default.object,
162
142
  className: _propTypes.default.string,
163
143
  component: _propTypes.default.elementType,
164
144
  disableGutters: _propTypes.default.bool,
165
145
  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]),
146
+ maxWidth: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_propTypes.default.oneOf(['xs', 'sm', 'md', 'lg', 'xl', false]), _propTypes.default.string]),
169
147
  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
148
  } : void 0;
171
149
  return Container;
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
@@ -20,11 +19,8 @@ Object.defineProperty(exports, "default", {
20
19
  return _Container.default;
21
20
  }
22
21
  });
23
-
24
22
  var _Container = _interopRequireDefault(require("./Container"));
25
-
26
23
  var _containerClasses = _interopRequireWildcard(require("./containerClasses"));
27
-
28
24
  Object.keys(_containerClasses).forEach(function (key) {
29
25
  if (key === "default" || key === "__esModule") return;
30
26
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -36,7 +32,5 @@ Object.keys(_containerClasses).forEach(function (key) {
36
32
  }
37
33
  });
38
34
  });
39
-
40
35
  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); }
41
-
42
36
  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; }
package/Stack/Stack.d.ts CHANGED
@@ -1,13 +1,13 @@
1
- /**
2
- *
3
- * Demos:
4
- *
5
- * - [Stack (Material UI)](https://mui.com/material-ui/react-stack/)
6
- * - [Stack (MUI System)](https://mui.com/system/react-stack/)
7
- *
8
- * API:
9
- *
10
- * - [Stack API](https://mui.com/system/api/stack/)
11
- */
12
- declare const Stack: import("@mui/types").OverridableComponent<import("./StackProps").StackTypeMap<{}, "div">>;
13
- export default Stack;
1
+ /**
2
+ *
3
+ * Demos:
4
+ *
5
+ * - [Stack (Material UI)](https://mui.com/material-ui/react-stack/)
6
+ * - [Stack (MUI System)](https://mui.com/system/react-stack/)
7
+ *
8
+ * API:
9
+ *
10
+ * - [Stack API](https://mui.com/system/api/stack/)
11
+ */
12
+ declare const Stack: import("@mui/types").OverridableComponent<import("./StackProps").StackTypeMap<{}, "div">>;
13
+ export default Stack;