@mui/system 5.8.6 → 5.9.1

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 (74) hide show
  1. package/CHANGELOG.md +185 -0
  2. package/Unstable_Grid/Grid.d.ts +12 -0
  3. package/Unstable_Grid/Grid.js +195 -0
  4. package/Unstable_Grid/GridProps.d.ts +162 -0
  5. package/Unstable_Grid/GridProps.js +5 -0
  6. package/Unstable_Grid/createGrid.d.ts +11 -0
  7. package/Unstable_Grid/createGrid.js +199 -0
  8. package/Unstable_Grid/gridClasses.d.ts +20 -0
  9. package/Unstable_Grid/gridClasses.js +25 -0
  10. package/Unstable_Grid/gridGenerator.d.ts +26 -0
  11. package/Unstable_Grid/gridGenerator.js +275 -0
  12. package/Unstable_Grid/index.d.ts +5 -0
  13. package/Unstable_Grid/index.js +65 -0
  14. package/Unstable_Grid/package.json +6 -0
  15. package/breakpoints.js +1 -1
  16. package/{grid.js → cssGrid.js} +0 -0
  17. package/cssVars/createCssVarsProvider.d.ts +13 -18
  18. package/cssVars/createCssVarsProvider.js +11 -16
  19. package/cssVars/createGetCssVar.d.ts +1 -1
  20. package/cssVars/createGetCssVar.js +2 -2
  21. package/cssVars/cssVarsParser.d.ts +4 -9
  22. package/cssVars/cssVarsParser.js +4 -19
  23. package/cssVars/index.d.ts +2 -1
  24. package/cssVars/index.js +9 -1
  25. package/cssVars/useCurrentColorScheme.js +1 -1
  26. package/esm/Unstable_Grid/Grid.js +184 -0
  27. package/esm/Unstable_Grid/GridProps.js +1 -0
  28. package/esm/Unstable_Grid/createGrid.js +177 -0
  29. package/esm/Unstable_Grid/gridClasses.js +14 -0
  30. package/esm/Unstable_Grid/gridGenerator.js +236 -0
  31. package/esm/Unstable_Grid/index.js +5 -0
  32. package/esm/breakpoints.js +1 -1
  33. package/esm/{grid.js → cssGrid.js} +0 -0
  34. package/esm/cssVars/createCssVarsProvider.js +11 -15
  35. package/esm/cssVars/createGetCssVar.js +2 -2
  36. package/esm/cssVars/cssVarsParser.js +4 -19
  37. package/esm/cssVars/index.js +2 -1
  38. package/esm/cssVars/useCurrentColorScheme.js +1 -1
  39. package/esm/getThemeValue.js +1 -1
  40. package/esm/index.js +9 -3
  41. package/getThemeValue.js +3 -3
  42. package/index.d.ts +3 -0
  43. package/index.js +30 -7
  44. package/legacy/Unstable_Grid/Grid.js +184 -0
  45. package/legacy/Unstable_Grid/GridProps.js +1 -0
  46. package/legacy/Unstable_Grid/createGrid.js +191 -0
  47. package/legacy/Unstable_Grid/gridClasses.js +27 -0
  48. package/legacy/Unstable_Grid/gridGenerator.js +245 -0
  49. package/legacy/Unstable_Grid/index.js +5 -0
  50. package/legacy/breakpoints.js +1 -1
  51. package/legacy/{grid.js → cssGrid.js} +0 -0
  52. package/legacy/cssVars/createCssVarsProvider.js +11 -16
  53. package/legacy/cssVars/createGetCssVar.js +3 -3
  54. package/legacy/cssVars/cssVarsParser.js +4 -20
  55. package/legacy/cssVars/index.js +2 -1
  56. package/legacy/cssVars/useCurrentColorScheme.js +1 -1
  57. package/legacy/getThemeValue.js +1 -1
  58. package/legacy/index.js +10 -4
  59. package/modern/Unstable_Grid/Grid.js +184 -0
  60. package/modern/Unstable_Grid/GridProps.js +1 -0
  61. package/modern/Unstable_Grid/createGrid.js +175 -0
  62. package/modern/Unstable_Grid/gridClasses.js +14 -0
  63. package/modern/Unstable_Grid/gridGenerator.js +232 -0
  64. package/modern/Unstable_Grid/index.js +5 -0
  65. package/modern/breakpoints.js +1 -1
  66. package/modern/{grid.js → cssGrid.js} +0 -0
  67. package/modern/cssVars/createCssVarsProvider.js +11 -15
  68. package/modern/cssVars/createGetCssVar.js +2 -2
  69. package/modern/cssVars/cssVarsParser.js +4 -19
  70. package/modern/cssVars/index.js +2 -1
  71. package/modern/cssVars/useCurrentColorScheme.js +1 -1
  72. package/modern/getThemeValue.js +1 -1
  73. package/modern/index.js +10 -4
  74. package/package.json +5 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,190 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 5.9.1
4
+
5
+ <!-- generated comparing v5.9.0..master -->
6
+
7
+ _Jul 18, 2022_
8
+
9
+ A big thanks to the 17 contributors who made this release possible. This release is mainly about 🐛 bug fixes and 📚 documentation improvements
10
+
11
+ ### `@mui/material@5.9.1`
12
+
13
+ - &#8203;<!-- 24 -->[Autocomplete] Fix disabling component crashing when focused (#31313) @mzedel
14
+ - &#8203;<!-- 07 -->[Grid] Avoid scrollbar in demo (#33527) @oliviertassinari
15
+ - &#8203;<!-- 05 -->[Slider] Fix transition of tooltips on vertical slider (#33009) @abhinav-22-tech
16
+ - &#8203;<!-- 01 -->[TouchRipple] Fix crash on android where `event.touches` are an empty array (#32974) @lukeggchapman
17
+
18
+ ### `@mui/system@5.9.1`
19
+
20
+ - &#8203;<!-- 04 -->[system] Add flag to switch negative margin approach in Grid (#33484) @siriwatknp
21
+ - &#8203;<!-- 03 -->[system] Remove needless optional chaining check in `createEmptyBreakpointObject` method (#33482) @ZeeshanTamboli
22
+
23
+ ### `@mui/base@5.0.0-alpha.90`
24
+
25
+ - &#8203;<!-- 23 -->[base] Export types used by components' props (#33522) @michaldudak
26
+ - &#8203;<!-- 22 -->[base] Add missing type definitions in useControllableReducer (#33496) @michaldudak
27
+ - &#8203;<!-- 06 -->[SelectUnstyled] Do not call onChange unnecessarily (#33408) @michaldudak
28
+
29
+ ### `@mui/lab@5.0.0-alpha.91`
30
+
31
+ - &#8203;<!-- 02 -->[TimelineDot] Add TimelineDotPropsColorOverrides interface to extend color options (#33466) @lolaignatova
32
+
33
+ ### Docs
34
+
35
+ - &#8203;<!-- 19 -->[docs] Add note about CssBaseline in the dark mode page (#33108) @GabrielaLokelani
36
+ - &#8203;<!-- 18 -->[docs] Fix typos in the Interoperability page (#33273) @HexM7
37
+ - &#8203;<!-- 17 -->[docs] Improve the `useTheme` documentation (#33508) @rickstaa
38
+ - &#8203;<!-- 16 -->[docs] Fix 301 redirections (#33521) @oliviertassinari
39
+ - &#8203;<!-- 15 -->[docs] Link the same codesandbox as in the docs (#33472) @oliviertassinari
40
+ - &#8203;<!-- 14 -->[docs] Fix copy search false positives (#33438) @oliviertassinari
41
+ - &#8203;<!-- 13 -->[docs] Fix typo (#33520) @aravindpanicker
42
+ - &#8203;<!-- 12 -->[docs] Update Tailwind docs to include step about updating popover containers (#33315) @ajhenry
43
+ - &#8203;<!-- 11 -->[docs] Add yarn command for Roboto font in Material UI's typography.md (#33485) @anthonypz
44
+ - &#8203;<!-- 10 -->[docs] Add new community content to the Material UI Learn page (#32927) @Nikhilthadani
45
+ - &#8203;<!-- 09 -->[examples] Change createEmotionCache to use `insertionPoint` (#32104) @ANTARES-KOR
46
+ - &#8203;<!-- 08 -->[examples] Fix error in Next.js example with @mui/styles (#33456) @paustria
47
+
48
+ ### Core
49
+
50
+ - &#8203;<!-- 21 -->[core] Cleanup experiments (#33547) @siriwatknp
51
+ - &#8203;<!-- 20 -->[core] Update CHANGELOG to include pickers breaking change (#33486) @siriwatknp
52
+
53
+ All contributors of this release in alphabetical order: @abhinav-22-tech, @ajhenry, @ANTARES-KOR, @anthonypz, @aravindpanicker, @GabrielaLokelani, @HexM7, @lolaignatova, @lukeggchapman, @michaldudak, @mzedel, @Nikhilthadani, @oliviertassinari, @paustria, @rickstaa, @siriwatknp, @ZeeshanTamboli
54
+
55
+ ## 5.9.0
56
+
57
+ <!-- generated comparing v5.8.7..master -->
58
+
59
+ _Jul 12, 2022_
60
+
61
+ A big thanks to the 19 contributors who made this release possible. Here are some highlights ✨:
62
+
63
+ - 🧪 Exported Grid v2 as `Unstable_Grid2` (#33479) @siriwatknp
64
+ - 📖 Added a guide for using Joy UI and Material UI together (#33396) @siriwatknp
65
+ - 🐛 Fixed a few bugs in Material UI components. Thanks to @ZeeshanTamboli, @ivan-ngchakming, and @joebingham-wk.
66
+ - ⚠️ **[BREAKING CHANGE]** Date pickers were removed from the lab. Learn how to migrate by visiting the [migration guide](https://mui.com/x/react-date-pickers/migration-lab/). (#33386) @flaviendelangle
67
+ - many other 🐛 bug fixes and 📚 documentation improvements
68
+ - our documentation site is now running with React 18! (#33196) @mnajdova
69
+
70
+ ### `@mui/material@5.9.0`
71
+
72
+ - [CssBaseline] Fixes in overriding style (#33338) @ZeeshanTamboli
73
+ - [Autocomplete] Remove unnecessary `clsx` wrapper for single className (#33398) @ZeeshanTamboli
74
+ - [Grid] Export new grid as unstable (#33479) @siriwatknp
75
+ - [Tooltip] Fix children mouse over detection (#32321) @ivan-ngchakming
76
+ - [TypeScript] getCssVar autocomplete for Material UI (#33464) @siriwatknp
77
+ - [TypeScript] Fix theme options components types to use `Theme` (#33434) @siriwatknp
78
+ - [TypeScript] Reexports necessary types for module augmentation (#33397) @siriwatknp
79
+ - [ScopedCssBaseline] Add sx typings (#33474) @joebingham-wk
80
+
81
+ ### `@mui/system@5.9.0`
82
+
83
+ - [System] Add offset feature to Grid (#33415) @siriwatknp
84
+ - [system] Add new `Grid` implementation (#32746) @siriwatknp
85
+
86
+ ### `@mui/lab@5.0.0-alpha.90`
87
+
88
+ **⚠️ Breaking changes**
89
+
90
+ - [lab] Remove the pickers (#33386) @flaviendelangle
91
+
92
+ The pickers are moved to MUI X, check out the [migration guide](https://mui.com/x/react-date-pickers/migration-lab/).
93
+
94
+ **Changes**
95
+
96
+ - [Masonry] Support rem/em values for spacing prop (#33384) @hbjORbj
97
+
98
+ ### `@mui/base@5.0.0-alpha.89`
99
+
100
+ - Base] Change the order of class names merged in useSlotProps (#33383) @michaldudak
101
+ - [ModalUnstyled] Accept callbacks in componentsProps (#33181) @michaldudak
102
+ - [SelectUnstyled] Accept callbacks in componentsProps (#33197) @michaldudak
103
+ - [TabsUnstyled] Accept callbacks in componentsProps (#33284) @michaldudak
104
+
105
+ ### `@mui/joy@5.0.0-alpha.36`
106
+
107
+ - [Joy] Add guide about using Joy and Material UI together (#33396) @siriwatknp
108
+ - [Joy] Fix variants color palette regressions (#33394) @danilo-leal
109
+
110
+ ### Docs
111
+
112
+ - [docs] Correcting small grammatical error (#33393) @robyyo
113
+ - [docs] Link to the correct package on Joy component pages (#33439) @cherniavskii
114
+ - [docs] Fix e2e tests (#33477) @siriwatknp
115
+ - [docs] Fix dead links (#33462) @oliviertassinari
116
+ - [docs] Cleanup the migration (#33463) @siriwatknp
117
+ - [docs] Fix broken Sponsoring services links @samuelsycamore
118
+ - [docs] Improve repo README with light/dark logos, relative links and more (#33356) @samuelsycamore
119
+ - [docs] Update links to MUI X Overview and Introduction pages (#33201) @samuelsycamore
120
+ - [docs] Update to React 18 (#33196) @mnajdova
121
+ - [docs] Simplify "Upload button" demo (#33326) @baharalidurrani
122
+ - [docs] Add "refine" demo to showcase (#33240) @omeraplak
123
+ - [docs] Add webpack alias for legacy utils package (#33376) @jgbae
124
+ - [docs] Improve external link icons synonyms (#33257) @davidgarciab
125
+ - [examples] Update MUI Base with Tailwind CSS to use the latest versions of the dependencies (#33401) @mnajdova
126
+ - [examples] Add MUI base example (#33154) @siriwatknp
127
+
128
+ ### Core
129
+
130
+ - [core] Fix @mui/monorepo regression for the import of the docs infra (#33390) @Janpot
131
+ - [core] Remove old babel resolve rule (#33432) @oliviertassinari
132
+ - [website] Shorten the plan descriptions on the pricing page (#32984) @joserodolfofreitas
133
+ - [website] Link EULA in the license quantity section (#33292) @oliviertassinari
134
+
135
+ All contributors of this release in alphabetical order: @baharalidurrani, @cherniavskii, @danilo-leal, @davidgarciab, @flaviendelangle, @hbjORbj, @ivan-ngchakming, @Janpot, @jgbae, @joebingham-wk, @joserodolfofreitas, @michaldudak, @mnajdova, @oliviertassinari, @omeraplak, @robyyo, @samuelsycamore, @siriwatknp, @ZeeshanTamboli
136
+
137
+ ## 5.8.7
138
+
139
+ <!-- generated comparing v5.8.6..master -->
140
+
141
+ _Jul 4, 2022_
142
+
143
+ A big thanks to the 13 contributors who made this release possible. Here are some highlights ✨:
144
+
145
+ - 🐛 Fixed an issue causing Typescript errors when building a project with Material UI v5.8.6 (@michaldudak)
146
+ - 🐛 Fixed a few bugs in Material UI components. Thanks @henriqueholtz, @jake-collibra, @MattiasMartens and @TimoWilhelm!
147
+ - many other 🐛 bug fixes and 📚 documentation improvements
148
+
149
+ ### `@mui/material@5.8.7`
150
+
151
+ - [Autocomplete] Add some missing props in `useAutocomplete` (#33269) @henriqueholtz
152
+ - [Autocomplete] Extend `componentsProps` to include `popper` and `popupIndicator` slots (#33283) @jake-collibra
153
+ - [Select] Annotate empty string as valid value prop (#33088) @MattiasMartens
154
+ - [SnackbarContent] Fix message text color with css var provider (#33285) @TimoWilhelm
155
+
156
+ ### `@mui/styled-engine@5.8.7`
157
+
158
+ - [styled-engine] Add missing type dependency on csstype (#33310) @Methuselah96
159
+
160
+ ### `@mui/system@5.8.7`
161
+
162
+ - [system] Simplify theme input types for `CssVarsProvider` (#33381) @siriwatknp
163
+ - [system] Export required types (#33324) @michaldudak
164
+
165
+ ### `@mui/joy@5.0.0-alpha.35`
166
+
167
+ - [Joy] Add radio button documentation (#33254) @siriwatknp
168
+ - [Joy] Add switch documentation (#33302) @siriwatknp
169
+ - [Joy] Batch a couple of documentation refinements (#33158)
170
+ - [Joy] Enable Joy and Material UI compatibility (#33379) @siriwatknp
171
+
172
+ ### `@mui/base@5.0.0-alpha.88`
173
+
174
+ - [base] Remove a type incompatible with Typescript 3.5 (#33361) @michaldudak
175
+ - [BadgeUnstyled] Export BadgeUnstyledOwnProps interface to fix typescript compiler error (#33314) @aaronlademann-wf
176
+ - [TablePaginationUnstyled] Accept callbacks in componentsProps (#33309) @michaldudak
177
+
178
+ ### Docs
179
+
180
+ - [docs] Fix Link typings in the react-router example (#32308) @aaarichter
181
+ - [docs] Add caveat about class components with Tooltip (#33325) @joshkel
182
+ - [docs] Fix SEO issues (#33288) @oliviertassinari
183
+ - [docs] Fix Slider's "player" demo (#33267) @xlianghang
184
+ - [website] Link MUI Toolpad in mui.com (#33287) @oliviertassinari
185
+
186
+ All contributors of this release in alphabetical order: @aaarichter, @aaronlademann-wf, @danilo-leal, @henriqueholtz, @jake-collibra, @joshkel, @MattiasMartens, @Methuselah96, @michaldudak, @oliviertassinari, @siriwatknp, @TimoWilhelm, @xlianghang
187
+
3
188
  ## 5.8.6
4
189
 
5
190
  <!-- generated comparing v5.8.5..master -->
@@ -0,0 +1,12 @@
1
+ /**
2
+ *
3
+ * Demos:
4
+ *
5
+ * - [Grid (Material UI)](https://mui.com/material-ui/react-grid/)
6
+ *
7
+ * API:
8
+ *
9
+ * - [Grid API](https://mui.com/system/api/grid/)
10
+ */
11
+ declare const Grid: import("@mui/types").OverridableComponent<import("./GridProps").GridTypeMap<{}, "div">>;
12
+ export default Grid;
@@ -0,0 +1,195 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = void 0;
9
+
10
+ var _propTypes = _interopRequireDefault(require("prop-types"));
11
+
12
+ var _createGrid = _interopRequireDefault(require("./createGrid"));
13
+
14
+ /**
15
+ *
16
+ * Demos:
17
+ *
18
+ * - [Grid (Material UI)](https://mui.com/material-ui/react-grid/)
19
+ *
20
+ * API:
21
+ *
22
+ * - [Grid API](https://mui.com/system/api/grid/)
23
+ */
24
+ const Grid = (0, _createGrid.default)();
25
+ process.env.NODE_ENV !== "production" ? Grid.propTypes
26
+ /* remove-proptypes */
27
+ = {
28
+ // ----------------------------- Warning --------------------------------
29
+ // | These PropTypes are generated from the TypeScript type definitions |
30
+ // | To update them edit TypeScript types and run "yarn proptypes" |
31
+ // ----------------------------------------------------------------------
32
+
33
+ /**
34
+ * The content of the component.
35
+ */
36
+ children: _propTypes.default.node,
37
+
38
+ /**
39
+ * The number of columns.
40
+ * @default 12
41
+ */
42
+ columns: _propTypes.default
43
+ /* @typescript-to-proptypes-ignore */
44
+ .oneOfType([_propTypes.default.arrayOf(_propTypes.default.number), _propTypes.default.number, _propTypes.default.object]),
45
+
46
+ /**
47
+ * Defines the horizontal space between the type `item` components.
48
+ * It overrides the value of the `spacing` prop.
49
+ */
50
+ columnSpacing: _propTypes.default
51
+ /* @typescript-to-proptypes-ignore */
52
+ .oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.string]),
53
+
54
+ /**
55
+ * If `true`, the component will have the flex *container* behavior.
56
+ * You should be wrapping *items* with a *container*.
57
+ * @default false
58
+ */
59
+ container: _propTypes.default.bool,
60
+
61
+ /**
62
+ * Defines the `flex-direction` style property.
63
+ * It is applied for all screen sizes.
64
+ * @default 'row'
65
+ */
66
+ direction: _propTypes.default
67
+ /* @typescript-to-proptypes-ignore */
68
+ .oneOfType([_propTypes.default.oneOf(['column-reverse', 'column', 'row-reverse', 'row']), _propTypes.default.arrayOf(_propTypes.default.oneOf(['column-reverse', 'column', 'row-reverse', 'row'])), _propTypes.default.object]),
69
+
70
+ /**
71
+ * If `true`, the negative margin and padding are apply only to the top and left sides of the grid.
72
+ */
73
+ disableEqualOverflow: _propTypes.default.bool,
74
+
75
+ /**
76
+ * If a number, it sets the number of columns the grid item uses.
77
+ * It can't be greater than the total number of columns of the container (12 by default).
78
+ * If 'auto', the grid item's width matches its content.
79
+ * If false, the prop is ignored.
80
+ * If true, the grid item's width grows to use the space available in the grid container.
81
+ * The value is applied for the `lg` breakpoint and wider screens if not overridden.
82
+ * @default false
83
+ */
84
+ lg: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number, _propTypes.default.bool]),
85
+
86
+ /**
87
+ * If a number, it sets the margin-left equals to the number of columns the grid item uses.
88
+ * If 'auto', the grid item push itself to the right-end of the container.
89
+ * The value is applied for the `lg` breakpoint and wider screens if not overridden.
90
+ */
91
+ lgOffset: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number]),
92
+
93
+ /**
94
+ * If a number, it sets the number of columns the grid item uses.
95
+ * It can't be greater than the total number of columns of the container (12 by default).
96
+ * If 'auto', the grid item's width matches its content.
97
+ * If false, the prop is ignored.
98
+ * If true, the grid item's width grows to use the space available in the grid container.
99
+ * The value is applied for the `md` breakpoint and wider screens if not overridden.
100
+ * @default false
101
+ */
102
+ md: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number, _propTypes.default.bool]),
103
+
104
+ /**
105
+ * If a number, it sets the margin-left equals to the number of columns the grid item uses.
106
+ * If 'auto', the grid item push itself to the right-end of the container.
107
+ * The value is applied for the `md` breakpoint and wider screens if not overridden.
108
+ */
109
+ mdOffset: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number]),
110
+
111
+ /**
112
+ * Defines the vertical space between the type `item` components.
113
+ * It overrides the value of the `spacing` prop.
114
+ */
115
+ rowSpacing: _propTypes.default
116
+ /* @typescript-to-proptypes-ignore */
117
+ .oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.string]),
118
+
119
+ /**
120
+ * If a number, it sets the number of columns the grid item uses.
121
+ * It can't be greater than the total number of columns of the container (12 by default).
122
+ * If 'auto', the grid item's width matches its content.
123
+ * If false, the prop is ignored.
124
+ * If true, the grid item's width grows to use the space available in the grid container.
125
+ * The value is applied for the `sm` breakpoint and wider screens if not overridden.
126
+ * @default false
127
+ */
128
+ sm: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number, _propTypes.default.bool]),
129
+
130
+ /**
131
+ * If a number, it sets the margin-left equals to the number of columns the grid item uses.
132
+ * If 'auto', the grid item push itself to the right-end of the container.
133
+ * The value is applied for the `sm` breakpoint and wider screens if not overridden.
134
+ */
135
+ smOffset: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number]),
136
+
137
+ /**
138
+ * Defines the space between the type `item` components.
139
+ * It can only be used on a type `container` component.
140
+ * @default 0
141
+ */
142
+ spacing: _propTypes.default
143
+ /* @typescript-to-proptypes-ignore */
144
+ .oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.string]),
145
+
146
+ /**
147
+ * @ignore
148
+ */
149
+ sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
150
+
151
+ /**
152
+ * Defines the `flex-wrap` style property.
153
+ * It's applied for all screen sizes.
154
+ * @default 'wrap'
155
+ */
156
+ wrap: _propTypes.default.oneOf(['nowrap', 'wrap-reverse', 'wrap']),
157
+
158
+ /**
159
+ * If a number, it sets the number of columns the grid item uses.
160
+ * It can't be greater than the total number of columns of the container (12 by default).
161
+ * If 'auto', the grid item's width matches its content.
162
+ * If false, the prop is ignored.
163
+ * If true, the grid item's width grows to use the space available in the grid container.
164
+ * The value is applied for the `xl` breakpoint and wider screens if not overridden.
165
+ * @default false
166
+ */
167
+ xl: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number, _propTypes.default.bool]),
168
+
169
+ /**
170
+ * If a number, it sets the margin-left equals to the number of columns the grid item uses.
171
+ * If 'auto', the grid item push itself to the right-end of the container.
172
+ * The value is applied for the `xl` breakpoint and wider screens if not overridden.
173
+ */
174
+ xlOffset: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number]),
175
+
176
+ /**
177
+ * If a number, it sets the number of columns the grid item uses.
178
+ * It can't be greater than the total number of columns of the container (12 by default).
179
+ * If 'auto', the grid item's width matches its content.
180
+ * If false, the prop is ignored.
181
+ * If true, the grid item's width grows to use the space available in the grid container.
182
+ * The value is applied for all the screen sizes with the lowest priority.
183
+ * @default false
184
+ */
185
+ xs: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number, _propTypes.default.bool]),
186
+
187
+ /**
188
+ * If a number, it sets the margin-left equals to the number of columns the grid item uses.
189
+ * If 'auto', the grid item push itself to the right-end of the container.
190
+ * The value is applied for the `xs` breakpoint and wider screens if not overridden.
191
+ */
192
+ xsOffset: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number])
193
+ } : void 0;
194
+ var _default = Grid;
195
+ exports.default = _default;
@@ -0,0 +1,162 @@
1
+ import * as React from 'react';
2
+ import { OverrideProps, IfEquals } from '@mui/types';
3
+ import { SxProps } from '../styleFunctionSx';
4
+ import { Theme, Breakpoint, BreakpointOverrides } from '../createTheme';
5
+ import { SystemProps } from '../Box';
6
+ declare type ResponsiveStyleValue<T> = T | Array<T | null> | {
7
+ [key in Breakpoint]?: T | null;
8
+ };
9
+ export declare type GridDirection = 'row' | 'row-reverse' | 'column' | 'column-reverse';
10
+ export declare type GridSpacing = number | string;
11
+ export declare type GridWrap = 'nowrap' | 'wrap' | 'wrap-reverse';
12
+ export declare type GridSize = 'auto' | number;
13
+ export interface GridDefaultBreakpoints {
14
+ /**
15
+ * If a number, it sets the number of columns the grid item uses.
16
+ * It can't be greater than the total number of columns of the container (12 by default).
17
+ * If 'auto', the grid item's width matches its content.
18
+ * If false, the prop is ignored.
19
+ * If true, the grid item's width grows to use the space available in the grid container.
20
+ * The value is applied for the `lg` breakpoint and wider screens if not overridden.
21
+ * @default false
22
+ */
23
+ lg?: boolean | GridSize;
24
+ /**
25
+ * If a number, it sets the margin-left equals to the number of columns the grid item uses.
26
+ * If 'auto', the grid item push itself to the right-end of the container.
27
+ * The value is applied for the `lg` breakpoint and wider screens if not overridden.
28
+ */
29
+ lgOffset?: GridSize;
30
+ /**
31
+ * If a number, it sets the number of columns the grid item uses.
32
+ * It can't be greater than the total number of columns of the container (12 by default).
33
+ * If 'auto', the grid item's width matches its content.
34
+ * If false, the prop is ignored.
35
+ * If true, the grid item's width grows to use the space available in the grid container.
36
+ * The value is applied for the `md` breakpoint and wider screens if not overridden.
37
+ * @default false
38
+ */
39
+ md?: boolean | GridSize;
40
+ /**
41
+ * If a number, it sets the margin-left equals to the number of columns the grid item uses.
42
+ * If 'auto', the grid item push itself to the right-end of the container.
43
+ * The value is applied for the `md` breakpoint and wider screens if not overridden.
44
+ */
45
+ mdOffset?: GridSize;
46
+ /**
47
+ * If a number, it sets the number of columns the grid item uses.
48
+ * It can't be greater than the total number of columns of the container (12 by default).
49
+ * If 'auto', the grid item's width matches its content.
50
+ * If false, the prop is ignored.
51
+ * If true, the grid item's width grows to use the space available in the grid container.
52
+ * The value is applied for the `sm` breakpoint and wider screens if not overridden.
53
+ * @default false
54
+ */
55
+ sm?: boolean | GridSize;
56
+ /**
57
+ * If a number, it sets the margin-left equals to the number of columns the grid item uses.
58
+ * If 'auto', the grid item push itself to the right-end of the container.
59
+ * The value is applied for the `sm` breakpoint and wider screens if not overridden.
60
+ */
61
+ smOffset?: GridSize;
62
+ /**
63
+ * If a number, it sets the number of columns the grid item uses.
64
+ * It can't be greater than the total number of columns of the container (12 by default).
65
+ * If 'auto', the grid item's width matches its content.
66
+ * If false, the prop is ignored.
67
+ * If true, the grid item's width grows to use the space available in the grid container.
68
+ * The value is applied for the `xl` breakpoint and wider screens if not overridden.
69
+ * @default false
70
+ */
71
+ xl?: boolean | GridSize;
72
+ /**
73
+ * If a number, it sets the margin-left equals to the number of columns the grid item uses.
74
+ * If 'auto', the grid item push itself to the right-end of the container.
75
+ * The value is applied for the `xl` breakpoint and wider screens if not overridden.
76
+ */
77
+ xlOffset?: GridSize;
78
+ /**
79
+ * If a number, it sets the number of columns the grid item uses.
80
+ * It can't be greater than the total number of columns of the container (12 by default).
81
+ * If 'auto', the grid item's width matches its content.
82
+ * If false, the prop is ignored.
83
+ * If true, the grid item's width grows to use the space available in the grid container.
84
+ * The value is applied for all the screen sizes with the lowest priority.
85
+ * @default false
86
+ */
87
+ xs?: boolean | GridSize;
88
+ /**
89
+ * If a number, it sets the margin-left equals to the number of columns the grid item uses.
90
+ * If 'auto', the grid item push itself to the right-end of the container.
91
+ * The value is applied for the `xs` breakpoint and wider screens if not overridden.
92
+ */
93
+ xsOffset?: GridSize;
94
+ }
95
+ declare type CustomBreakpoints = Partial<Record<Breakpoint, boolean | GridSize> & Record<`${Breakpoint}Offset`, GridSize>>;
96
+ interface BreakpointOverridesEmpty {
97
+ }
98
+ declare type Breakpoints = IfEquals<BreakpointOverrides, BreakpointOverridesEmpty, GridDefaultBreakpoints, CustomBreakpoints>;
99
+ export interface GridBaseProps extends Breakpoints {
100
+ /**
101
+ * The content of the component.
102
+ */
103
+ children?: React.ReactNode;
104
+ /**
105
+ * The number of columns.
106
+ * @default 12
107
+ */
108
+ columns?: ResponsiveStyleValue<number>;
109
+ /**
110
+ * Defines the horizontal space between the type `item` components.
111
+ * It overrides the value of the `spacing` prop.
112
+ */
113
+ columnSpacing?: ResponsiveStyleValue<GridSpacing>;
114
+ /**
115
+ * If `true`, the component will have the flex *container* behavior.
116
+ * You should be wrapping *items* with a *container*.
117
+ * @default false
118
+ */
119
+ container?: boolean;
120
+ /**
121
+ * Defines the `flex-direction` style property.
122
+ * It is applied for all screen sizes.
123
+ * @default 'row'
124
+ */
125
+ direction?: ResponsiveStyleValue<GridDirection>;
126
+ /**
127
+ * If `true`, the negative margin and padding are apply only to the top and left sides of the grid.
128
+ */
129
+ disableEqualOverflow?: boolean;
130
+ /**
131
+ * Defines the vertical space between the type `item` components.
132
+ * It overrides the value of the `spacing` prop.
133
+ */
134
+ rowSpacing?: ResponsiveStyleValue<GridSpacing>;
135
+ /**
136
+ * Defines the space between the type `item` components.
137
+ * It can only be used on a type `container` component.
138
+ * @default 0
139
+ */
140
+ spacing?: ResponsiveStyleValue<GridSpacing> | undefined;
141
+ /**
142
+ * Defines the `flex-wrap` style property.
143
+ * It's applied for all screen sizes.
144
+ * @default 'wrap'
145
+ */
146
+ wrap?: GridWrap;
147
+ }
148
+ export interface GridOwnerState extends GridBaseProps {
149
+ nested: boolean;
150
+ gridSize: Partial<Record<Breakpoint, GridSize | boolean>>;
151
+ gridOffset: Partial<Record<Breakpoint, GridSize>>;
152
+ }
153
+ export interface GridTypeMap<P = {}, D extends React.ElementType = 'div'> {
154
+ props: P & GridBaseProps & {
155
+ sx?: SxProps<Theme>;
156
+ } & SystemProps<Theme>;
157
+ defaultComponent: D;
158
+ }
159
+ export declare type GridProps<D extends React.ElementType = GridTypeMap['defaultComponent'], P = {
160
+ component?: React.ElementType;
161
+ }> = OverrideProps<GridTypeMap<P, D>, D>;
162
+ export {};
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1,11 @@
1
+ import * as React from 'react';
2
+ import { OverridableComponent } from '@mui/types';
3
+ import { GridTypeMap } from './GridProps';
4
+ declare const defaultCreateStyledComponent: import("@mui/styled-engine").CreateStyledComponent<import("../createStyled").MUIStyledCommonProps<any>, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.ClassAttributes<HTMLDivElement> | keyof React.HTMLAttributes<HTMLDivElement>>, {}, any>;
5
+ declare function useThemePropsDefault<T>(props: T): T & {};
6
+ export default function createGrid(options?: {
7
+ createStyledComponent?: typeof defaultCreateStyledComponent;
8
+ useThemeProps?: typeof useThemePropsDefault;
9
+ componentName?: string;
10
+ }): OverridableComponent<GridTypeMap<{}, "div">>;
11
+ export {};