@mui/system 5.9.2 → 5.10.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 (70) hide show
  1. package/Box/Box.spec.d.ts +1 -1
  2. package/CHANGELOG.md +196 -5
  3. package/Container/Container.d.ts +13 -13
  4. package/Container/ContainerProps.d.ts +40 -40
  5. package/Container/containerClasses.d.ts +22 -22
  6. package/Container/createContainer.d.ts +18 -18
  7. package/Container/index.d.ts +1 -1
  8. package/README.md +1 -1
  9. package/Stack/Stack.d.ts +12 -0
  10. package/Stack/Stack.js +62 -0
  11. package/Stack/StackProps.d.ts +42 -0
  12. package/Stack/StackProps.js +5 -0
  13. package/Stack/createStack.d.ts +21 -0
  14. package/Stack/createStack.js +209 -0
  15. package/Stack/index.d.ts +5 -0
  16. package/Stack/index.js +65 -0
  17. package/Stack/package.json +6 -0
  18. package/Stack/stackClasses.d.ts +8 -0
  19. package/Stack/stackClasses.js +17 -0
  20. package/Unstable_Grid/Grid.d.ts +12 -12
  21. package/Unstable_Grid/GridProps.d.ts +162 -162
  22. package/Unstable_Grid/createGrid.d.ts +11 -11
  23. package/Unstable_Grid/gridClasses.d.ts +20 -20
  24. package/Unstable_Grid/gridGenerator.d.ts +26 -26
  25. package/Unstable_Grid/index.d.ts +5 -5
  26. package/breakpoints.d.ts +21 -0
  27. package/createBox.js +3 -1
  28. package/createBox.spec.d.ts +1 -1
  29. package/createStyled.js +30 -11
  30. package/createTheme/createSpacing.d.ts +10 -10
  31. package/cssVars/createCssVarsProvider.js +1 -1
  32. package/cssVars/createCssVarsProvider.spec.d.ts +1 -1
  33. package/cssVars/createGetCssVar.d.ts +5 -5
  34. package/cssVars/cssVarsParser.d.ts +65 -65
  35. package/cssVars/getInitColorSchemeScript.d.ts +45 -45
  36. package/cssVars/index.d.ts +3 -3
  37. package/cssVars/useCurrentColorScheme.d.ts +53 -53
  38. package/esm/Stack/Stack.js +51 -0
  39. package/esm/Stack/StackProps.js +1 -0
  40. package/esm/Stack/createStack.js +179 -0
  41. package/esm/Stack/index.js +5 -0
  42. package/esm/Stack/stackClasses.js +6 -0
  43. package/esm/createBox.js +3 -1
  44. package/esm/createStyled.js +28 -10
  45. package/esm/cssVars/createCssVarsProvider.js +1 -1
  46. package/esm/index.js +3 -1
  47. package/index.d.ts +4 -6
  48. package/index.js +25 -2
  49. package/index.spec.d.ts +1 -1
  50. package/legacy/Stack/Stack.js +51 -0
  51. package/legacy/Stack/StackProps.js +1 -0
  52. package/legacy/Stack/createStack.js +187 -0
  53. package/legacy/Stack/index.js +5 -0
  54. package/legacy/Stack/stackClasses.js +6 -0
  55. package/legacy/createBox.js +5 -1
  56. package/legacy/createStyled.js +31 -10
  57. package/legacy/cssVars/createCssVarsProvider.js +1 -1
  58. package/legacy/index.js +4 -2
  59. package/modern/Stack/Stack.js +51 -0
  60. package/modern/Stack/StackProps.js +1 -0
  61. package/modern/Stack/createStack.js +179 -0
  62. package/modern/Stack/index.js +5 -0
  63. package/modern/Stack/stackClasses.js +6 -0
  64. package/modern/createBox.js +3 -1
  65. package/modern/createStyled.js +28 -10
  66. package/modern/cssVars/createCssVarsProvider.js +1 -1
  67. package/modern/index.js +4 -2
  68. package/package.json +5 -5
  69. package/spacing.d.ts +6 -0
  70. 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,196 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 5.10.1
4
+
5
+ <!-- generated comparing v5.10.0..master -->
6
+
7
+ _Aug 15, 2022_
8
+
9
+ A big thanks to the 18 contributors who made this release possible. This release was mostly around 🐛 bug fixes and 📚 documentation improvements.
10
+
11
+ ### `@mui/material@5.10.1`
12
+
13
+ - &#8203;<!-- 04 -->[TableCell] Enable variant overrides via TypeScript module augmentation (#33856) @arjunvijayanathakurup
14
+
15
+ ### `@mui/system@5.10.1`
16
+
17
+ - &#8203;<!-- 05 -->[system] Fix `ContainerProps` export (#33923) @bugzpodder
18
+
19
+ ### `@mui/base@5.0.0-alpha.93`
20
+
21
+ - &#8203;<!-- 31 -->[TrapFocus] Removes invisible tabbable elements from (#33543) @EthanStandel
22
+ - &#8203;<!-- 30 -->[Input][base] Pass the rows prop to the underlying textarea (#33873) @michaldudak
23
+ - &#8203;<!-- 06 -->[SelectUnstyled] Add ability to post the select's value when submitting a form (#33697) @michaldudak
24
+
25
+ ### `@mui/joy@5.0.0-alpha.41`
26
+
27
+ - &#8203;<!-- 07 -->[IconButton][joy] Fix large IconButton scaling (#33885) @cherewaty
28
+
29
+ ### Docs
30
+
31
+ - &#8203;<!-- 23 -->[docs] Expand on a11y section for Material UI `Link` component (#32839) @TKrishnasamy
32
+ - &#8203;<!-- 22 -->[docs] Fix typo in Joy UI's `AspectRatio` docs (#33895) @IsaacInsoll
33
+ - &#8203;<!-- 21 -->[docs] Improve the Base Usage page (#33272) @samuelsycamore
34
+ - &#8203;<!-- 20 -->[docs] Avoid refreshing the page when button on demo is clicked (#33852) @PunitSoniME
35
+ - &#8203;<!-- 19 -->[docs] Improve the HorizontalNonLinearStepper demo styling (#33886) @hayawata3626
36
+ - &#8203;<!-- 18 -->[docs] Remove dead NoSsr in the demos (#33910) @oliviertassinari
37
+ - &#8203;<!-- 17 -->[docs] Fix the reopening menu problem in MenuUnstyled demo (#33890) @michaldudak
38
+ - &#8203;<!-- 24 -->[docs] Fix a few link issues (#33909) @oliviertassinari
39
+ - &#8203;<!-- 16 -->[docs] Explain the icons package dependencies (#33592) @michaldudak
40
+ - &#8203;<!-- 15 -->[docs] Fix reported SEO issues (#33818) @oliviertassinari
41
+ - &#8203;<!-- 14 -->[docs] Add permanent notifications back (#33843) @oliviertassinari
42
+ - &#8203;<!-- 13 -->[docs] Enforce description for all pages (#33698) @oliviertassinari
43
+ - &#8203;<!-- 12 -->[docs] Clarify difference in startup times between named and default imports (#33109) @cmdcolin
44
+ - &#8203;<!-- 11 -->[docs] Update transform function in the sx prop sizing docs (#33850) @ZeeshanTamboli
45
+ - &#8203;<!-- 10 -->[docs] Adding missing accessibility labels (#33782) @PunitSoniME
46
+ - &#8203;<!-- 09 -->[docs] Fix `/system/getting-started/advanced/` does not exist (#33867) @MonstraG
47
+ - &#8203;<!-- 32 -->[docs] New Crowdin updates (#32213) @l10nbot
48
+ - &#8203;<!-- 08 -->[examples] Fix broken path to favicon.ico (#33906) @mmostafavi
49
+ - &#8203;<!-- 02 -->[website] Add new FAQ to pricing page (#33553) @oliviertassinari
50
+ - &#8203;<!-- 03 -->[website] Miscellaneous improvements to the marketing pages (#33897) @danilo-leal
51
+
52
+ ### Core
53
+
54
+ - &#8203;<!-- 29 -->[core] Add the download tracker package (#33899) @michaldudak
55
+ - &#8203;<!-- 28 -->[core] Use proper external build id for Argos uploads (#33929) @cherniavskii
56
+ - &#8203;<!-- 27 -->[core] Enforce 70 as the max width on the title on the docs (#33819) @oliviertassinari
57
+ - &#8203;<!-- 26 -->[core] Clear yarn installation warning (#33776) @michaldudak
58
+ - &#8203;<!-- 25 -->[core] Bump yarn to 1.22.19 (#33656) @michaldudak
59
+ - &#8203;<!-- 24 -->[core] Remove outdated Next.js options (#33845) @oliviertassinari
60
+ - &#8203;<!-- 34 -->[core] Add the download tracker build script (#33941) @michaldudak
61
+ - &#8203;<!-- 01 -->[website] Allow /r/store- redirection pattern @oliviertassinari
62
+
63
+ All contributors of this release in alphabetical order: @arjunvijayanathakurup, @bugzpodder, @cherewaty, @cherniavskii, @cmdcolin, @danilo-leal, @EthanStandel, @hayawata3626, @IsaacInsoll, @l10nbot, @michaldudak, @mmostafavi, @MonstraG, @oliviertassinari, @PunitSoniME, @samuelsycamore, @TKrishnasamy, @ZeeshanTamboli
64
+
65
+ ## 5.10.0
66
+
67
+ <!-- generated comparing v5.9.3..master -->
68
+
69
+ _Aug 8, 2022_
70
+
71
+ A big thanks to the 16 contributors who made this release possible. Here are some highlights ✨:
72
+
73
+ - ✨ [Stack](https://mui.com/system/react-stack/) component is added to MUI System and Joy UI #33760 #33800 @mnajdova
74
+ - ✨ [Breadcrumbs](https://mui.com/joy-ui/react-breadcrumbs/) component is added to Joy UI (#32697) @hbjORbj
75
+ - Many other 🐛 bug fixes, 📚 documentation, and ⚙️ infrastructure improvements
76
+
77
+ ### `@mui/material@5.10.0`
78
+
79
+ - [Grid] Prevent crash if spacing is set to zero in theme (#33777) @PunitSoniME
80
+ - [Grid] Export interface `RegularBreakpoints` to fix type error (#33751) @ZeeshanTamboli
81
+ - [Skeleton] Add `rounded` variant (#33687) @siriwatknp
82
+ - [Stepper] Fix classes for icon container (#33734) @pratikkarad
83
+ - [TableCell] Enable size prop overrides via module augmentation (#33816) @brentertz
84
+ - [Tooltip] Fix tooltip arrow css var background (#33753) @TimoWilhelm
85
+ - [useScrollTrigger] Add passive flag to scroll trigger event listener #32437 (#33749) @Dsalazar1685
86
+
87
+ ### `@mui/system@5.10.0`
88
+
89
+ - Fix unnecessary styles created from `sx` (#33752) @siriwatknp
90
+ - Fix duplicated styles in Box (#33774) @iamxukai
91
+ - Don't spread props to DOM for string tags (#33761) @siriwatknp
92
+ - Add `Stack` component (#33760) @mnajdova
93
+
94
+ ### `@mui/joy@5.0.0-alpha.40`
95
+
96
+ - [Stack] Add new component (#33800) @mnajdova
97
+ - [Breadcrumbs] Add `Breadcrumbs` component (#32697) @hbjORbj
98
+ - [Card] Fix wrong api description for `size` prop (#33862) @hbjORbj
99
+ - Miscellaneous fixes (#33796, #33750) @siriwatknp
100
+
101
+ ### Docs
102
+
103
+ - [docs] Create, revise, and expand System "Getting started" docs (#33503) @samuelsycamore
104
+ - [docs] Test new image best practice @oliviertassinari
105
+ - [docs] Fix typo in the ClickAwayListerner name (#33813) @pawelsmigielski
106
+ - [docs] Fix link to `Basics` section in `Trap Focus` docs (#33772) @ZeeshanTamboli
107
+ - [docs] z-index added in popper when used by split button (#33763) @PunitSoniME
108
+ - [docs] Improve the guide for using @mui/base with Tailwind CSS (#33670) @mnajdova
109
+ - [docs] Fix warnings related to Next.js' links (#33693) @mnajdova
110
+ - [docs] Add notification to aggregation blogpost (#33745) @joserodolfofreitas
111
+ - [docs] Add Grid version 2 docs (#33554) @siriwatknp
112
+ - [examples] Fix `NextLinkComposedProps` type error (#33842) @adham618
113
+
114
+ ### Core
115
+
116
+ - [blog] Add social card to Tenerife retreat post (#33764)
117
+ - [blog] Fix blue outline bug (#33707) @oliviertassinari
118
+ - [blog] Improve the width of the layout (#33706) @oliviertassinari@samuelsycamore
119
+ - [core] Remove unnecessary packageName attribute from pages (#33488) @cherniavskii
120
+ - [core] Remove duplicated CODE_OF_CONDUCT (#33702) @oliviertassinari
121
+ - [core] Update Playwright packages together (#33737) @michaldudak
122
+ - [website] Fix notifications not being marked as read in production (#33756) @cherniavskii
123
+
124
+ All contributors of this release in alphabetical order: @adham618, @brentertz, @cherniavskii, @Dsalazar1685, @hbjORbj, @iamxukai, @joserodolfofreitas, @michaldudak, @mnajdova, @oliviertassinari, @pawelsmigielski, @pratikkarad, @PunitSoniME, @siriwatknp, @TimoWilhelm, @ZeeshanTamboli
125
+
126
+ ## 5.9.3
127
+
128
+ <!-- generated comparing v5.9.2..master -->
129
+
130
+ _Aug 1, 2022_
131
+
132
+ A big thanks to the 15 contributors who made this release possible. Here are some highlights ✨:
133
+
134
+ - 🖼️ @garronej worked on improving the support of Emotion packages in the System (#33205)
135
+ - Many other 🐛 bug fixes, 📚 documentation, and ⚙️ infrastructure improvements
136
+
137
+ ### `@mui/material@5.9.3`
138
+
139
+ - [Chip] Assign classnames and associated styles for `filled` variant (#33587) @hbjORbj
140
+ - [Grid] Fix `columnSpacing` and `rowSpacing` props ignore higher breakpoints with 0 (#33480) @ZeeshanTamboli
141
+ - [Input] Add the readOnly state class (#33654) @michaldudak
142
+ - [Stack] Responsive styles based on breakpoints should be in the correct order (#33552) @hbjORbj
143
+
144
+ ### `@mui/system@5.9.3`
145
+
146
+ - [system] Make @emotion/\* fully supported in the System (#33205) @garronej
147
+
148
+ ### `@mui/codemod@5.9.3`
149
+
150
+ - [codemod] Fix theme-spacing performance (#33691) @siriwatknp
151
+ - [codemod] Support @mui import for variant-prop (#33692) @siriwatknp
152
+
153
+ ### `@mui/styled-engine-sc@5.9.3`
154
+
155
+ - [styled-engine-sc] Add missing @babel/runtime dependency (#33741) @MonstraG
156
+
157
+ ### `@mui/joy@5.0.0-alpha.38`
158
+
159
+ - [Joy] Add Tabs components (#33664) @siriwatknp
160
+ - [Joy] Miscellaneous fixes (#33685) @siriwatknp
161
+ - [Joy] Update read.me content (#33643) @danilo-leal
162
+
163
+ ### Docs
164
+
165
+ - [blog] Add blog post about company retreat in Tenerife 🏝 (#33566) @samuelsycamore
166
+ - [blog] Add blog post to announce the aggregation feature (#33595) @joserodolfofreitas
167
+ - [blog] Fix horizontal scrollbar with code snippets (#33648) @joserodolfofreitas
168
+ - [docs] Fix a typo in the code in `Sorting & selecting` Table demo (#33674) @mracette
169
+ - [docs] Fix en-US format in the Skeleton demo (#33699) @husseinsaad98
170
+ - [docs] Update module reference for `usePagination` (#33675) @fullstackzach
171
+ - [docs] Fix code examples in `styled` API vs `sx` prop docs (#33665) @ZeeshanTamboli
172
+ - [docs][system] Throw an informative error when `theme.vars` is used in `createTheme` and mention this in the theming docs (#33619) @hbjORbj
173
+ - [website] Remove legacy redirect @oliviertassinari
174
+ - [website] Add new legal pages (#33650) @oliviertassinari
175
+ - [website] Clarify when a license in development is required (#33668) @oliviertassinari
176
+ - [website] Update links to rows pages (#33739) @cherniavskii
177
+ - [website] Update pricing table to add aggregation and row pinning (#33659) @joserodolfofreitas
178
+
179
+ ### Core
180
+
181
+ - [core] Replace `getInitialProps` with `getStaticProps` (#33684) @mnajdova
182
+ - [core] Remove accidentally added files (#33636) @michaldudak
183
+ - [core] Update packages with security issues (#33679) @michaldudak
184
+ - [core] Add React 17 nightly build (#33594) @mnajdova
185
+ - [core] Update lerna to 5.2.0 (#33635) @michaldudak
186
+ - [core] Prepare isolation of Next.js X app (#33649) @oliviertassinari
187
+ - [core] Remove thenify version override from package.json resolutions (#33638) @michaldudak
188
+ - [core] Update Node.js to 14 on CircleCI, CodeSandbox, and Netlify (#33642) @michaldudak
189
+ - [test] Replace istanbul-instrumenter-loader with babel-plugin-istanbul (#33666) @michaldudak
190
+ - [test] Run TypeScript module augmentation tests for Joy UI in CI (#33667) @ZeeshanTamboli
191
+
192
+ All contributors of this release in alphabetical order: @cherniavskii, @danilo-leal, @fullstackzach, @garronej, @hbjORbj, @husseinsaad98, @joserodolfofreitas, @michaldudak, @mnajdova, @MonstraG, @mracette, @oliviertassinari, @samuelsycamore, @siriwatknp, @ZeeshanTamboli
193
+
3
194
  ## 5.9.2
4
195
 
5
196
  <!-- generated comparing v5.9.1..master -->
@@ -159,7 +350,7 @@ A big thanks to the 19 contributors who made this release possible. Here are som
159
350
 
160
351
  ### `@mui/base@5.0.0-alpha.89`
161
352
 
162
- - Base] Change the order of class names merged in useSlotProps (#33383) @michaldudak
353
+ - [Base] Change the order of class names merged in useSlotProps (#33383) @michaldudak
163
354
  - [ModalUnstyled] Accept callbacks in componentsProps (#33181) @michaldudak
164
355
  - [SelectUnstyled] Accept callbacks in componentsProps (#33197) @michaldudak
165
356
  - [TabsUnstyled] Accept callbacks in componentsProps (#33284) @michaldudak
@@ -6812,7 +7003,7 @@ A big thanks to the 34 contributors who made this release possible. Here are som
6812
7003
 
6813
7004
  While the source code is currently hosted in the [main repository](https://github.com/mui/material-ui), we might move it to the [x repository](https://github.com/mui/mui-x) in the future, depending on what is easier for the commercial date range picker. The date picker will stay open source no matter what.
6814
7005
 
6815
- - 📚 Revamp the documentation for [the system](https://mui.com/system/basics/). The System contains CSS utilities. The documentation now promotes the use of the `sx` prop. It's ideal for adding one-off styles, e.g. padding, but when pushed to its limits, it can be used to implement quickly a complete page.
7006
+ - 📚 Revamp the documentation for [the system](https://mui.com/system/getting-started/overview/). The System contains CSS utilities. The documentation now promotes the use of the `sx` prop. It's ideal for adding one-off styles, e.g. padding, but when pushed to its limits, it can be used to implement quickly a complete page.
6816
7007
  - 👩‍🎨 Upgrade emotion to v11 (#23007) @mnajdova.
6817
7008
  - And many more 🐛 bug fixes and 📚 improvements.
6818
7009
 
@@ -7214,7 +7405,7 @@ Here are some highlights ✨:
7214
7405
  If you target IE11, you need to use the new bundle (`legacy`). We are treating IE11 as a second class-citizen, which is a continuation of the direction taken in #22873.
7215
7406
 
7216
7407
  - 🚀 Improve the internal benchmark suite (#22923, #23058) @mnajdova.
7217
- This was a prerequisite step to improve the [system](https://mui.com/system/basics/). We needed to be able to measure performance. After #22945, we have measured that the `Box` component is x3 faster in v5-alpha compared to v4.
7408
+ This was a prerequisite step to improve the [system](https://mui.com/system/getting-started/overview/). We needed to be able to measure performance. After #22945, we have measured that the `Box` component is x3 faster in v5-alpha compared to v4.
7218
7409
  - ✏️ A new blog post: [Q3 2020 Update](https://mui.com/blog/2020-q3-update/) (#23055) @oliviertassinari.
7219
7410
  - 🐙 Migrate more tests to react-testing-library @deiga, @Morteza-Jenabzadeh, @nicholas-l.
7220
7411
  - And many more 🐛 bug fixes and 📚 improvements.
@@ -7555,7 +7746,7 @@ Here are some highlights ✨:
7555
7746
 
7556
7747
  The new styling solution saves 2kB gzipped in the bundle compared to JSS, and about 14 kB gzipped if you were already using emotion or styled-components.
7557
7748
 
7558
- Last but not least, the change allows us to take advantage dynamic style props. We will use them for dynamic color props, variant props, and new style props (an improved [system](https://mui.com/system/basics/)).
7749
+ Last but not least, the change allows us to take advantage dynamic style props. We will use them for dynamic color props, variant props, and new style props (an improved [system](https://mui.com/system/getting-started/overview/)).
7559
7750
 
7560
7751
  This change has been in our roadmap for more than a year.
7561
7752
  We announced it in the [v4 release blog post](https://mui.com/blog/material-ui-v4-is-out/) as a direction v5 would take.
@@ -8808,7 +8999,7 @@ A big thanks to the 33 contributors who made this release possible. Here are som
8808
8999
  />
8809
9000
  ```
8810
9001
 
8811
- - [Typography] Replace the `srOnly` prop so as to not duplicate the capabilities of [System](https://mui.com/system/basics/) (#21413) @mnajdova.
9002
+ - [Typography] Replace the `srOnly` prop so as to not duplicate the capabilities of [System](https://mui.com/system/getting-started/overview/) (#21413) @mnajdova.
8812
9003
 
8813
9004
  ```diff
8814
9005
  -import Typography from '@material-ui/core/Typography';
@@ -1,13 +1,13 @@
1
- /**
2
- *
3
- * Demos:
4
- *
5
- * - [Container (Material UI)](https://mui.com/material-ui/react-container/)
6
- * - [Container (MUI System)](https://mui.com/system/react-container/)
7
- *
8
- * API:
9
- *
10
- * - [Container API](https://mui.com/system/api/container/)
11
- */
12
- declare const Container: import("@mui/types").OverridableComponent<import("./ContainerProps").ContainerTypeMap<{}, "div">>;
13
- export default Container;
1
+ /**
2
+ *
3
+ * Demos:
4
+ *
5
+ * - [Container (Material UI)](https://mui.com/material-ui/react-container/)
6
+ * - [Container (MUI System)](https://mui.com/system/react-container/)
7
+ *
8
+ * API:
9
+ *
10
+ * - [Container API](https://mui.com/system/api/container/)
11
+ */
12
+ declare const Container: import("@mui/types").OverridableComponent<import("./ContainerProps").ContainerTypeMap<{}, "div">>;
13
+ export default Container;
@@ -1,40 +1,40 @@
1
- import * as React from 'react';
2
- import { OverrideProps } from '@mui/types';
3
- import { SxProps } from '../styleFunctionSx';
4
- import { Theme, Breakpoint } from '../createTheme';
5
- import { ContainerClasses } from './containerClasses';
6
- export interface ContainerTypeMap<P = {}, D extends React.ElementType = 'div'> {
7
- props: P & {
8
- children?: React.ReactNode;
9
- /**
10
- * Override or extend the styles applied to the component.
11
- */
12
- classes?: Partial<ContainerClasses>;
13
- /**
14
- * If `true`, the left and right padding is removed.
15
- * @default false
16
- */
17
- disableGutters?: boolean;
18
- /**
19
- * Set the max-width to match the min-width of the current breakpoint.
20
- * This is useful if you'd prefer to design for a fixed set of sizes
21
- * instead of trying to accommodate a fully fluid viewport.
22
- * It's fluid by default.
23
- * @default false
24
- */
25
- fixed?: boolean;
26
- /**
27
- * Determine the max-width of the container.
28
- * The container width grows with the size of the screen.
29
- * Set to `false` to disable `maxWidth`.
30
- * @default 'lg'
31
- */
32
- maxWidth?: Breakpoint | false;
33
- /**
34
- * The system prop that allows defining system overrides as well as additional CSS styles.
35
- */
36
- sx?: SxProps<Theme>;
37
- };
38
- defaultComponent: D;
39
- }
40
- export declare type ContainerProps<D extends React.ElementType = ContainerTypeMap['defaultComponent'], P = {}> = OverrideProps<ContainerTypeMap<P, D>, D>;
1
+ import * as React from 'react';
2
+ import { OverrideProps } from '@mui/types';
3
+ import { SxProps } from '../styleFunctionSx';
4
+ import { Theme, Breakpoint } from '../createTheme';
5
+ import { ContainerClasses } from './containerClasses';
6
+ export interface ContainerTypeMap<P = {}, D extends React.ElementType = 'div'> {
7
+ props: P & {
8
+ children?: React.ReactNode;
9
+ /**
10
+ * Override or extend the styles applied to the component.
11
+ */
12
+ classes?: Partial<ContainerClasses>;
13
+ /**
14
+ * If `true`, the left and right padding is removed.
15
+ * @default false
16
+ */
17
+ disableGutters?: boolean;
18
+ /**
19
+ * Set the max-width to match the min-width of the current breakpoint.
20
+ * This is useful if you'd prefer to design for a fixed set of sizes
21
+ * instead of trying to accommodate a fully fluid viewport.
22
+ * It's fluid by default.
23
+ * @default false
24
+ */
25
+ fixed?: boolean;
26
+ /**
27
+ * Determine the max-width of the container.
28
+ * The container width grows with the size of the screen.
29
+ * Set to `false` to disable `maxWidth`.
30
+ * @default 'lg'
31
+ */
32
+ maxWidth?: Breakpoint | false;
33
+ /**
34
+ * The system prop that allows defining system overrides as well as additional CSS styles.
35
+ */
36
+ sx?: SxProps<Theme>;
37
+ };
38
+ defaultComponent: D;
39
+ }
40
+ export declare type ContainerProps<D extends React.ElementType = ContainerTypeMap['defaultComponent'], P = {}> = OverrideProps<ContainerTypeMap<P, D>, D>;
@@ -1,22 +1,22 @@
1
- export interface ContainerClasses {
2
- /** Styles applied to the root element. */
3
- root: string;
4
- /** Styles applied to the root element if `disableGutters={true}`. */
5
- disableGutters: string;
6
- /** Styles applied to the root element if `fixed={true}`. */
7
- fixed: string;
8
- /** Styles applied to the root element if `maxWidth="xs"`. */
9
- maxWidthXs: string;
10
- /** Styles applied to the root element if `maxWidth="sm"`. */
11
- maxWidthSm: string;
12
- /** Styles applied to the root element if `maxWidth="md"`. */
13
- maxWidthMd: string;
14
- /** Styles applied to the root element if `maxWidth="lg"`. */
15
- maxWidthLg: string;
16
- /** Styles applied to the root element if `maxWidth="xl"`. */
17
- maxWidthXl: string;
18
- }
19
- export declare type ContainerClassKey = keyof ContainerClasses;
20
- export declare function getContainerUtilityClass(slot: string): string;
21
- declare const containerClasses: ContainerClasses;
22
- export default containerClasses;
1
+ export interface ContainerClasses {
2
+ /** Styles applied to the root element. */
3
+ root: string;
4
+ /** Styles applied to the root element if `disableGutters={true}`. */
5
+ disableGutters: string;
6
+ /** Styles applied to the root element if `fixed={true}`. */
7
+ fixed: string;
8
+ /** Styles applied to the root element if `maxWidth="xs"`. */
9
+ maxWidthXs: string;
10
+ /** Styles applied to the root element if `maxWidth="sm"`. */
11
+ maxWidthSm: string;
12
+ /** Styles applied to the root element if `maxWidth="md"`. */
13
+ maxWidthMd: string;
14
+ /** Styles applied to the root element if `maxWidth="lg"`. */
15
+ maxWidthLg: string;
16
+ /** Styles applied to the root element if `maxWidth="xl"`. */
17
+ maxWidthXl: string;
18
+ }
19
+ export declare type ContainerClassKey = keyof ContainerClasses;
20
+ export declare function getContainerUtilityClass(slot: string): string;
21
+ declare const containerClasses: ContainerClasses;
22
+ export default containerClasses;
@@ -1,18 +1,18 @@
1
- import * as React from 'react';
2
- import { Interpolation, StyledComponent } from '@mui/styled-engine';
3
- import { OverridableComponent } from '@mui/types';
4
- import { ContainerProps, ContainerTypeMap } from './ContainerProps';
5
- import { Theme as DefaultTheme } from '../createTheme';
6
- interface StyleFnProps<Theme> extends ContainerProps {
7
- theme: Theme;
8
- ownerState: ContainerProps;
9
- }
10
- declare type RequiredThemeStructure = Pick<DefaultTheme, 'breakpoints' | 'spacing'>;
11
- export default function createContainer<Theme extends RequiredThemeStructure = DefaultTheme>(options?: {
12
- createStyledComponent?: (...styles: Array<Interpolation<StyleFnProps<Theme>>>) => StyledComponent<ContainerProps>;
13
- useThemeProps?: (inProps: ContainerProps) => ContainerProps & {
14
- component?: React.ElementType;
15
- };
16
- componentName?: string;
17
- }): OverridableComponent<ContainerTypeMap<{}, "div">>;
18
- export {};
1
+ import * as React from 'react';
2
+ import { Interpolation, StyledComponent } from '@mui/styled-engine';
3
+ import { OverridableComponent } from '@mui/types';
4
+ import { ContainerProps, ContainerTypeMap } from './ContainerProps';
5
+ import { Theme as DefaultTheme } from '../createTheme';
6
+ interface StyleFnProps<Theme> extends ContainerProps {
7
+ theme: Theme;
8
+ ownerState: ContainerProps;
9
+ }
10
+ declare type RequiredThemeStructure = Pick<DefaultTheme, 'breakpoints' | 'spacing'>;
11
+ export default function createContainer<Theme extends RequiredThemeStructure = DefaultTheme>(options?: {
12
+ createStyledComponent?: (...styles: Array<Interpolation<StyleFnProps<Theme>>>) => StyledComponent<ContainerProps>;
13
+ useThemeProps?: (inProps: ContainerProps) => ContainerProps & {
14
+ component?: React.ElementType;
15
+ };
16
+ componentName?: string;
17
+ }): OverridableComponent<ContainerTypeMap<{}, "div">>;
18
+ export {};
@@ -1,5 +1,5 @@
1
1
  export { default } from './Container';
2
- export * from './Container';
2
+ export * from './ContainerProps';
3
3
 
4
4
  export { default as containerClasses } from './containerClasses';
5
5
  export * from './containerClasses';
package/README.md CHANGED
@@ -20,4 +20,4 @@ yarn add @mui/system @emotion/react @emotion/styled
20
20
 
21
21
  <!-- #default-branch-switch -->
22
22
 
23
- [The documentation](https://mui.com/system/basics/)
23
+ [The documentation](https://mui.com/system/getting-started/overview/)
@@ -0,0 +1,12 @@
1
+ /**
2
+ *
3
+ * Demos:
4
+ *
5
+ * - [Stack (Material UI)](https://mui.com/material-ui/react-stack/)
6
+ *
7
+ * API:
8
+ *
9
+ * - [Stack API](https://mui.com/system/api/stack/)
10
+ */
11
+ declare const Stack: import("@mui/types").OverridableComponent<import("./StackProps").StackTypeMap<{}, "div">>;
12
+ export default Stack;
package/Stack/Stack.js ADDED
@@ -0,0 +1,62 @@
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 _createStack = _interopRequireDefault(require("./createStack"));
13
+
14
+ /**
15
+ *
16
+ * Demos:
17
+ *
18
+ * - [Stack (Material UI)](https://mui.com/material-ui/react-stack/)
19
+ *
20
+ * API:
21
+ *
22
+ * - [Stack API](https://mui.com/system/api/stack/)
23
+ */
24
+ const Stack = (0, _createStack.default)();
25
+ process.env.NODE_ENV !== "production" ? Stack.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
+ * Defines the `flex-direction` style property.
40
+ * It is applied for all screen sizes.
41
+ * @default 'column'
42
+ */
43
+ direction: _propTypes.default.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]),
44
+
45
+ /**
46
+ * Add an element between each child.
47
+ */
48
+ divider: _propTypes.default.node,
49
+
50
+ /**
51
+ * Defines the space between immediate children.
52
+ * @default 0
53
+ */
54
+ spacing: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.string]),
55
+
56
+ /**
57
+ * The system prop, which allows defining system overrides as well as additional CSS styles.
58
+ */
59
+ 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])
60
+ } : void 0;
61
+ var _default = Stack;
62
+ exports.default = _default;
@@ -0,0 +1,42 @@
1
+ import * as React from 'react';
2
+ import { OverrideProps } from '@mui/types';
3
+ import { ResponsiveStyleValue, SxProps } from '../styleFunctionSx';
4
+ import { SystemProps } from '../Box';
5
+ import { Theme } from '../createTheme';
6
+ export interface StackBaseProps {
7
+ /**
8
+ * The content of the component.
9
+ */
10
+ children?: React.ReactNode;
11
+ /**
12
+ * Defines the `flex-direction` style property.
13
+ * It is applied for all screen sizes.
14
+ * @default 'column'
15
+ */
16
+ direction?: ResponsiveStyleValue<'row' | 'row-reverse' | 'column' | 'column-reverse'>;
17
+ /**
18
+ * Defines the space between immediate children.
19
+ * @default 0
20
+ */
21
+ spacing?: ResponsiveStyleValue<number | string>;
22
+ /**
23
+ * Add an element between each child.
24
+ */
25
+ divider?: React.ReactNode;
26
+ }
27
+ export interface StackTypeMap<P = {}, D extends React.ElementType = 'div'> {
28
+ props: P & StackBaseProps & {
29
+ /**
30
+ * The system prop, which allows defining system overrides as well as additional CSS styles.
31
+ */
32
+ sx?: SxProps<Theme>;
33
+ } & SystemProps<Theme>;
34
+ defaultComponent: D;
35
+ }
36
+ export declare type StackProps<D extends React.ElementType = StackTypeMap['defaultComponent'], P = {
37
+ component?: React.ElementType;
38
+ }> = OverrideProps<StackTypeMap<P, D>, D>;
39
+ export interface StackOwnerState {
40
+ direction: StackProps['direction'];
41
+ spacing: StackProps['spacing'];
42
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1,21 @@
1
+ import * as React from 'react';
2
+ import { OverridableComponent } from '@mui/types';
3
+ import { StackTypeMap, StackOwnerState } from './StackProps';
4
+ import { Breakpoints } from '../createTheme/createBreakpoints';
5
+ import { Spacing } from '../createTheme/createSpacing';
6
+ interface StyleFunctionProps {
7
+ theme: {
8
+ breakpoints: Breakpoints;
9
+ spacing: Spacing;
10
+ };
11
+ ownerState: StackOwnerState;
12
+ }
13
+ 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>;
14
+ declare function useThemePropsDefault<T>(props: T): T & {};
15
+ export declare const style: ({ ownerState, theme }: StyleFunctionProps) => any;
16
+ export default function createStack(options?: {
17
+ createStyledComponent?: typeof defaultCreateStyledComponent;
18
+ useThemeProps?: typeof useThemePropsDefault;
19
+ componentName?: string;
20
+ }): OverridableComponent<StackTypeMap<{}, "div">>;
21
+ export {};