@mui/system 5.12.3 → 5.13.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.
- package/CHANGELOG.md +124 -0
- package/Container/Container.d.ts +13 -13
- package/Container/ContainerProps.d.ts +40 -40
- package/Container/containerClasses.d.ts +22 -22
- package/Container/createContainer.d.ts +18 -18
- package/Container/createContainer.js +41 -35
- package/GlobalStyles/GlobalStyles.d.ts +13 -13
- package/GlobalStyles/index.d.ts +2 -2
- package/Stack/Stack.d.ts +14 -14
- package/Stack/StackProps.d.ts +53 -53
- package/Stack/createStack.d.ts +21 -21
- package/Stack/createStack.js +24 -26
- package/Stack/index.d.ts +5 -5
- package/Stack/stackClasses.d.ts +8 -8
- package/ThemeProvider/ThemeProvider.js +9 -5
- package/Unstable_Grid/Grid.d.ts +12 -12
- package/Unstable_Grid/GridProps.d.ts +185 -185
- package/Unstable_Grid/createGrid.d.ts +11 -11
- package/Unstable_Grid/createGrid.js +21 -23
- package/Unstable_Grid/gridClasses.d.ts +20 -20
- package/Unstable_Grid/gridGenerator.d.ts +38 -38
- package/Unstable_Grid/gridGenerator.js +20 -18
- package/Unstable_Grid/index.d.ts +5 -5
- package/breakpoints.js +7 -6
- package/createBox.js +9 -12
- package/createStyled.js +40 -32
- package/createTheme/createBreakpoints.js +24 -26
- package/createTheme/createSpacing.d.ts +10 -10
- package/createTheme/createTheme.js +18 -14
- package/cssVars/createCssVarsProvider.js +21 -20
- package/cssVars/createCssVarsTheme.d.ts +15 -15
- package/cssVars/createCssVarsTheme.js +10 -10
- package/cssVars/createGetCssVar.d.ts +5 -5
- package/cssVars/cssVarsParser.d.ts +64 -64
- package/cssVars/getInitColorSchemeScript.d.ts +42 -42
- package/cssVars/index.d.ts +5 -5
- package/cssVars/prepareCssVars.d.ts +16 -16
- package/cssVars/prepareCssVars.js +13 -12
- package/cssVars/useCurrentColorScheme.d.ts +53 -53
- package/cssVars/useCurrentColorScheme.js +17 -11
- package/esm/Container/createContainer.js +41 -35
- package/esm/Stack/createStack.js +24 -26
- package/esm/ThemeProvider/ThemeProvider.js +9 -5
- package/esm/Unstable_Grid/createGrid.js +21 -23
- package/esm/Unstable_Grid/gridGenerator.js +20 -17
- package/esm/breakpoints.js +7 -6
- package/esm/createBox.js +9 -12
- package/esm/createStyled.js +38 -31
- package/esm/createTheme/createBreakpoints.js +24 -25
- package/esm/createTheme/createTheme.js +18 -14
- package/esm/cssVars/createCssVarsProvider.js +21 -20
- package/esm/cssVars/createCssVarsTheme.js +10 -10
- package/esm/cssVars/prepareCssVars.js +13 -12
- package/esm/cssVars/useCurrentColorScheme.js +17 -10
- package/esm/propsToClassKey.js +3 -5
- package/esm/styleFunctionSx/extendSxProp.js +14 -10
- package/index.js +1 -1
- package/legacy/Container/createContainer.js +7 -6
- package/legacy/Stack/createStack.js +6 -5
- package/legacy/ThemeProvider/ThemeProvider.js +4 -3
- package/legacy/Unstable_Grid/createGrid.js +6 -4
- package/legacy/Unstable_Grid/gridGenerator.js +6 -4
- package/legacy/breakpoints.js +5 -3
- package/legacy/createBox.js +4 -2
- package/legacy/createStyled.js +13 -11
- package/legacy/createTheme/createBreakpoints.js +4 -3
- package/legacy/createTheme/createTheme.js +6 -4
- package/legacy/cssVars/createCssVarsProvider.js +6 -5
- package/legacy/cssVars/createCssVarsTheme.js +4 -2
- package/legacy/cssVars/prepareCssVars.js +5 -3
- package/legacy/cssVars/useCurrentColorScheme.js +9 -7
- package/legacy/index.js +1 -1
- package/legacy/styleFunctionSx/extendSxProp.js +6 -4
- package/modern/Container/createContainer.js +41 -35
- package/modern/Stack/createStack.js +24 -26
- package/modern/ThemeProvider/ThemeProvider.js +9 -5
- package/modern/Unstable_Grid/createGrid.js +21 -23
- package/modern/Unstable_Grid/gridGenerator.js +20 -17
- package/modern/breakpoints.js +7 -6
- package/modern/createBox.js +9 -12
- package/modern/createStyled.js +38 -31
- package/modern/createTheme/createBreakpoints.js +24 -25
- package/modern/createTheme/createTheme.js +18 -14
- package/modern/cssVars/createCssVarsProvider.js +21 -20
- package/modern/cssVars/createCssVarsTheme.js +10 -10
- package/modern/cssVars/prepareCssVars.js +13 -12
- package/modern/cssVars/useCurrentColorScheme.js +17 -10
- package/modern/index.js +1 -1
- package/modern/propsToClassKey.js +3 -5
- package/modern/styleFunctionSx/extendSxProp.js +14 -10
- package/package.json +3 -3
- package/propsToClassKey.js +3 -6
- package/styleFunctionSx/extendSxProp.js +14 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,129 @@
|
|
|
1
1
|
# [Versions](https://mui.com/versions/)
|
|
2
2
|
|
|
3
|
+
## 5.13.1
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v5.13.0..master -->
|
|
6
|
+
|
|
7
|
+
_May 16, 2023_
|
|
8
|
+
|
|
9
|
+
A big thanks to the 25 contributors who made this release possible. Here are some highlights ✨:
|
|
10
|
+
|
|
11
|
+
- 🌏 Added Central Myanmar (my-MY), Malay (ms-MS), Nepali (ne-NP), Tagalog (tl-TL) locales (#37017) @cccEric
|
|
12
|
+
- 🐛 bug fixes and 📚 documentation improvements.
|
|
13
|
+
|
|
14
|
+
### `@mui/material@5.13.1`
|
|
15
|
+
|
|
16
|
+
- [Autocomplete] Allow tooltip text selection (#36503) @safeamiiir
|
|
17
|
+
- [Dialog] Fixed broken dialog when using maxWidth="xs" and custom breakpoint unit (#37237) @jguddas
|
|
18
|
+
- [l10n] Add Central Myanmar (my-MY), Malay (ms-MS), Nepali (ne-NP), Tagalog (tl-TL) locales (#37017) @cccEric
|
|
19
|
+
|
|
20
|
+
### `@mui/utils@5.13.1`
|
|
21
|
+
|
|
22
|
+
- [utils] Fix downstream bundlers remove React 17 useId compatibility (#37183) @nickiaconis
|
|
23
|
+
|
|
24
|
+
### `@mui/base@5.0.0-beta.1`
|
|
25
|
+
|
|
26
|
+
- [Select][base] Keep focus on the trigger element when listbox is open (#37244) @michaldudak
|
|
27
|
+
|
|
28
|
+
### `@mui/joy@5.0.0-alpha.80`
|
|
29
|
+
|
|
30
|
+
- [Autocomplete] Fixed scroll into view (#37217) @sai6855
|
|
31
|
+
- [AutocompleteOption][Avatar] js test replaced with ts test (#37088) @PunitSoniME
|
|
32
|
+
- [Breadcrumbs] Replace js-tests with ts-tests (#37107) @mauwaz
|
|
33
|
+
- [RadioGroup] Turn JS test to TS test (#37138) @uuxxx
|
|
34
|
+
- [SvgIcon] Turn JS test to TS test (#37151) @nicolas-ot
|
|
35
|
+
- [Tooltip] Turn JS test to TS test (#37149) @nicolas-ot
|
|
36
|
+
- [Typography] Convert Typography test to TypeScript (#37165) @DerTimonius
|
|
37
|
+
- [Sheet][Slider][Stack][Switch] Replace js-tests with ts-tests (#37139) @mauwaz
|
|
38
|
+
- Miscellaneous fixes (#37274) @siriwatknp
|
|
39
|
+
|
|
40
|
+
### Docs
|
|
41
|
+
|
|
42
|
+
- [docs] Remove upload button (#36844) @Bastian
|
|
43
|
+
- [docs] Update link to overriding component structure guide (#36870) @hbjORbj
|
|
44
|
+
- [docs] Fix Material Design templates (#37187) @oliviertassinari
|
|
45
|
+
- [docs] Fix link to Joy UI GitHub issues @oliviertassinari
|
|
46
|
+
- [docs] Show default value for `filterOptions` prop in Autocomplete's API docs (#37230) @ZeeshanTamboli
|
|
47
|
+
- [docs] Add summary and improve `test_static` CI doc in CONTRIBUTING readme file (#36711) @kriskw1999
|
|
48
|
+
- [docs] Update theme customization typescript (#35551) @siriwatknp
|
|
49
|
+
- [docs] Add Joy Frames X web blocks template (#37203) @siriwatknp
|
|
50
|
+
- [docs] Change Base UI `alpha` to `beta` in README (#37228) @ZeeshanTamboli
|
|
51
|
+
- [docs] Improve Base UI overview page (#37227) @mnajdova
|
|
52
|
+
- [docs] Update Joy + Material guide (#36911) @cherniavskii
|
|
53
|
+
|
|
54
|
+
### Core
|
|
55
|
+
|
|
56
|
+
- [core] Remove `toEqualDateTime` chai matcher (#37073) @flaviendelangle
|
|
57
|
+
- [core] Check dependency cycles inside packages directory only (#37223) @michaldudak
|
|
58
|
+
- [core] Remove outdated babel proposal plugins (#36795) @kkocdko
|
|
59
|
+
- [website] Add Diego to About Us page (#37284) @DiegoAndai
|
|
60
|
+
- [website] Add Victor teamMember card to 'About' (#37283) @zanivan
|
|
61
|
+
- [website] Add Rich to the 'About' page (#37221) @richbustos
|
|
62
|
+
|
|
63
|
+
All contributors of this release in alphabetical order: @Bastian, @binh1298, @cccEric, @cherniavskii, @DerTimonius, @DiegoAndai, @flaviendelangle, @hbjORbj, @jguddas, @kkocdko, @kriskw1999, @mauwaz, @michaldudak, @mnajdova, @nickiaconis, @nicolas-ot, @oliviertassinari, @PunitSoniME, @richbustos, @safeamiiir, @sai6855, @siriwatknp, @uuxxx, @zanivan, @ZeeshanTamboli
|
|
64
|
+
|
|
65
|
+
## 5.13.0
|
|
66
|
+
|
|
67
|
+
<!-- generated comparing v5.12.3..master -->
|
|
68
|
+
|
|
69
|
+
_May 10, 2023_
|
|
70
|
+
|
|
71
|
+
A big thanks to the 18 contributors who made this release possible. Here are some highlights ✨:
|
|
72
|
+
|
|
73
|
+
- 🚀 Base UI is now in beta - all planned breaking changes are now complete!
|
|
74
|
+
- 🗺 We have a new [project roadmap](https://github.com/orgs/mui/projects/18/views/1) on GitHub where you can learn about what's coming next.
|
|
75
|
+
- 🐛 Various bug fixes, 📚 documentation and 🧪 testing improvements
|
|
76
|
+
|
|
77
|
+
### `@mui/material@5.13.0`
|
|
78
|
+
|
|
79
|
+
- [Autocomplete] Support `ChipComponent` type (#37112) @sai6855
|
|
80
|
+
- [AppBar] Fix component type (#37172) @sai6855
|
|
81
|
+
- [Select] Simplify handleChange in SelectInput (#37040) @ulrichstark
|
|
82
|
+
|
|
83
|
+
### `@mui/joy@5.0.0-alpha.79`
|
|
84
|
+
|
|
85
|
+
- [Input][joy] Improve alignment on date fields (#37146) @wewakekumar
|
|
86
|
+
- [Alery][joy] Turn JS test to TS test (#37077) @hbjORbj
|
|
87
|
+
- [AspectRatio][joy] js test replaced with ts test (#37087) @PunitSoniME
|
|
88
|
+
- [Badge][AvatarGroup][joy] js test replaced with ts test (#37089) @PunitSoniME
|
|
89
|
+
- [Box][Card][MenuList][joy] Turn JS test to TS test (#37126) @uuxxx
|
|
90
|
+
- [List][Menu][joy] Turn JS test to TS test (#37123) @uuxxx
|
|
91
|
+
- [test][Joy] Remove duplicate Avatar test (#37201) @zignis
|
|
92
|
+
- [test][joy] js test cases converted to ts (#37117) @PunitSoniME
|
|
93
|
+
- [Button][joy] Convert Button test to typescript (#37181) @akash191095
|
|
94
|
+
- [CardContent][CardCover][CardOverflow][Chip][ChipDelete][joy] js text case converted to ts (#37116) @PunitSoniME
|
|
95
|
+
- [Radio][IconButton][Checkbox][Option][joy] Switch to TypeScript unit test (#37137) @DerTimonius
|
|
96
|
+
|
|
97
|
+
### `@mui/base@5.0.0-beta.0`
|
|
98
|
+
|
|
99
|
+
- [Select][base] Do not call onChange after initial render (#37141) @michaldudak
|
|
100
|
+
- [Select][base] Rename the `optionStringifier` prop (#37118) @michaldudak
|
|
101
|
+
- [typescript][base] Fix types of components callbacks parameters (#37169) @michaldudak
|
|
102
|
+
- [Select], [TablePagination] Use more descriptive parameter names (#37064) @michaldudak
|
|
103
|
+
|
|
104
|
+
### Docs
|
|
105
|
+
|
|
106
|
+
- [docs] Stray design tweaks to Base UI demos (#37003) @danilo-leal
|
|
107
|
+
- [docs] Move outdated CSS prefixing docs (#36710) @kriskw1999
|
|
108
|
+
- [docs] Improve "Example projects" page design (#37007) @danilo-leal
|
|
109
|
+
- [docs] Redirect NoSsr, Portal and TextareaAutosize to Base UI API page (#37175) @ZeeshanTamboli
|
|
110
|
+
- [docs] Demonstrate `TextField` customization using theme style overrides (#36805) @ZeeshanTamboli
|
|
111
|
+
- [docs] Tweak the "Edit this page" button icon (#37142) @danilo-leal
|
|
112
|
+
- [docs] Update links to the public roadmap (#36995) @mnajdova
|
|
113
|
+
- [docs] Improve Multiselect demo styling (#37120) @michaldudak
|
|
114
|
+
- [Stack] Fix import description @oliviertassinari
|
|
115
|
+
|
|
116
|
+
### Core
|
|
117
|
+
|
|
118
|
+
- [blog] Fix images using "MUI Base" instead of "Base UI" (#37044) @danilo-leal
|
|
119
|
+
- [core] Add VSCode extensions recommendations (#37166) @michaldudak
|
|
120
|
+
- [test] `e2e-website` related minor fixes (#37204) @ZeeshanTamboli
|
|
121
|
+
- [website] Update the active positions (#37075) @DanailH
|
|
122
|
+
- [website] Add Romain to the About page (#37124) @romgrk
|
|
123
|
+
- [website] Make Toolpad alpha labels consistent (#37125) @gerdadesign
|
|
124
|
+
|
|
125
|
+
All contributors of this release in alphabetical order: @akash191095, @DanailH, @danilo-leal, @DerTimonius, @gerdadesign, @hbjORbj, @kriskw1999, @michaldudak, @mnajdova, @oliviertassinari, @PunitSoniME, @romgrk, @sai6855, @ulrichstark, @uuxxx, @wewakekumar, @ZeeshanTamboli, @zignis
|
|
126
|
+
|
|
3
127
|
## 5.12.3
|
|
4
128
|
|
|
5
129
|
<!-- generated comparing v5.12.2..master -->
|
package/Container/Container.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* Demos:
|
|
4
|
-
*
|
|
5
|
-
* - [Container (Material UI)](https://mui.com/material-ui/react-container/)
|
|
6
|
-
* - [Container (MUI System)](https://mui.com/system/react-container/)
|
|
7
|
-
*
|
|
8
|
-
* API:
|
|
9
|
-
*
|
|
10
|
-
* - [Container API](https://mui.com/system/api/container/)
|
|
11
|
-
*/
|
|
12
|
-
declare const Container: import("@mui/types").OverridableComponent<import("./ContainerProps").ContainerTypeMap<{}, "div">>;
|
|
13
|
-
export default Container;
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Demos:
|
|
4
|
+
*
|
|
5
|
+
* - [Container (Material UI)](https://mui.com/material-ui/react-container/)
|
|
6
|
+
* - [Container (MUI System)](https://mui.com/system/react-container/)
|
|
7
|
+
*
|
|
8
|
+
* API:
|
|
9
|
+
*
|
|
10
|
+
* - [Container API](https://mui.com/system/api/container/)
|
|
11
|
+
*/
|
|
12
|
+
declare const Container: import("@mui/types").OverridableComponent<import("./ContainerProps").ContainerTypeMap<{}, "div">>;
|
|
13
|
+
export default Container;
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { OverrideProps } from '@mui/types';
|
|
3
|
-
import { SxProps } from '../styleFunctionSx';
|
|
4
|
-
import { Theme, Breakpoint } from '../createTheme';
|
|
5
|
-
import { ContainerClasses } from './containerClasses';
|
|
6
|
-
export interface ContainerTypeMap<P = {}, D extends React.ElementType = 'div'> {
|
|
7
|
-
props: P & {
|
|
8
|
-
children?: React.ReactNode;
|
|
9
|
-
/**
|
|
10
|
-
* Override or extend the styles applied to the component.
|
|
11
|
-
*/
|
|
12
|
-
classes?: Partial<ContainerClasses>;
|
|
13
|
-
/**
|
|
14
|
-
* If `true`, the left and right padding is removed.
|
|
15
|
-
* @default false
|
|
16
|
-
*/
|
|
17
|
-
disableGutters?: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* Set the max-width to match the min-width of the current breakpoint.
|
|
20
|
-
* This is useful if you'd prefer to design for a fixed set of sizes
|
|
21
|
-
* instead of trying to accommodate a fully fluid viewport.
|
|
22
|
-
* It's fluid by default.
|
|
23
|
-
* @default false
|
|
24
|
-
*/
|
|
25
|
-
fixed?: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* Determine the max-width of the container.
|
|
28
|
-
* The container width grows with the size of the screen.
|
|
29
|
-
* Set to `false` to disable `maxWidth`.
|
|
30
|
-
* @default 'lg'
|
|
31
|
-
*/
|
|
32
|
-
maxWidth?: Breakpoint | false;
|
|
33
|
-
/**
|
|
34
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
35
|
-
*/
|
|
36
|
-
sx?: SxProps<Theme>;
|
|
37
|
-
};
|
|
38
|
-
defaultComponent: D;
|
|
39
|
-
}
|
|
40
|
-
export 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 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 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 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
|
-
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
|
+
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 {};
|
|
@@ -5,8 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = createContainer;
|
|
8
|
-
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
9
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
8
|
var React = _interopRequireWildcard(require("react"));
|
|
11
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
10
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
@@ -15,7 +13,6 @@ var _useThemeProps = _interopRequireDefault(require("../useThemeProps"));
|
|
|
15
13
|
var _styled = _interopRequireDefault(require("../styled"));
|
|
16
14
|
var _createTheme = _interopRequireDefault(require("../createTheme"));
|
|
17
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
|
-
const _excluded = ["className", "component", "disableGutters", "fixed", "maxWidth", "classes"];
|
|
19
16
|
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); }
|
|
20
17
|
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; }
|
|
21
18
|
const defaultTheme = (0, _createTheme.default)();
|
|
@@ -59,20 +56,22 @@ function createContainer(options = {}) {
|
|
|
59
56
|
const ContainerRoot = createStyledComponent(({
|
|
60
57
|
theme,
|
|
61
58
|
ownerState
|
|
62
|
-
}) => (
|
|
59
|
+
}) => ({
|
|
63
60
|
width: '100%',
|
|
64
61
|
marginLeft: 'auto',
|
|
65
62
|
boxSizing: 'border-box',
|
|
66
63
|
marginRight: 'auto',
|
|
67
|
-
display: 'block'
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
64
|
+
display: 'block',
|
|
65
|
+
// Fix IE11 layout when used with main.
|
|
66
|
+
...(!ownerState.disableGutters && {
|
|
67
|
+
paddingLeft: theme.spacing(2),
|
|
68
|
+
paddingRight: theme.spacing(2),
|
|
69
|
+
// @ts-ignore module augmentation fails if custom breakpoints are used
|
|
70
|
+
[theme.breakpoints.up('sm')]: {
|
|
71
|
+
paddingLeft: theme.spacing(3),
|
|
72
|
+
paddingRight: theme.spacing(3)
|
|
73
|
+
}
|
|
74
|
+
})
|
|
76
75
|
}), ({
|
|
77
76
|
theme,
|
|
78
77
|
ownerState
|
|
@@ -89,51 +88,58 @@ function createContainer(options = {}) {
|
|
|
89
88
|
}, {}), ({
|
|
90
89
|
theme,
|
|
91
90
|
ownerState
|
|
92
|
-
}) => (
|
|
91
|
+
}) => ({
|
|
93
92
|
// @ts-ignore module augmentation fails if custom breakpoints are used
|
|
94
|
-
|
|
93
|
+
...(ownerState.maxWidth === 'xs' && {
|
|
95
94
|
// @ts-ignore module augmentation fails if custom breakpoints are used
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
95
|
+
[theme.breakpoints.up('xs')]: {
|
|
96
|
+
// @ts-ignore module augmentation fails if custom breakpoints are used
|
|
97
|
+
maxWidth: Math.max(theme.breakpoints.values.xs, 444)
|
|
98
|
+
}
|
|
99
|
+
}),
|
|
100
|
+
...(ownerState.maxWidth &&
|
|
101
101
|
// @ts-ignore module augmentation fails if custom breakpoints are used
|
|
102
|
-
|
|
102
|
+
ownerState.maxWidth !== 'xs' && {
|
|
103
103
|
// @ts-ignore module augmentation fails if custom breakpoints are used
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
[theme.breakpoints.up(ownerState.maxWidth)]: {
|
|
105
|
+
// @ts-ignore module augmentation fails if custom breakpoints are used
|
|
106
|
+
maxWidth: `${theme.breakpoints.values[ownerState.maxWidth]}${theme.breakpoints.unit}`
|
|
107
|
+
}
|
|
108
|
+
})
|
|
106
109
|
}));
|
|
107
110
|
const Container = /*#__PURE__*/React.forwardRef(function Container(inProps, ref) {
|
|
108
111
|
const props = useThemeProps(inProps);
|
|
109
112
|
const {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
other
|
|
117
|
-
|
|
113
|
+
className,
|
|
114
|
+
component = 'div',
|
|
115
|
+
disableGutters = false,
|
|
116
|
+
fixed = false,
|
|
117
|
+
maxWidth = 'lg',
|
|
118
|
+
classes: classesProp,
|
|
119
|
+
...other
|
|
120
|
+
} = props;
|
|
121
|
+
const ownerState = {
|
|
122
|
+
...props,
|
|
118
123
|
component,
|
|
119
124
|
disableGutters,
|
|
120
125
|
fixed,
|
|
121
126
|
maxWidth
|
|
122
|
-
}
|
|
127
|
+
};
|
|
123
128
|
|
|
124
129
|
// @ts-ignore module augmentation fails if custom breakpoints are used
|
|
125
130
|
const classes = useUtilityClasses(ownerState, componentName);
|
|
126
131
|
return (
|
|
127
132
|
/*#__PURE__*/
|
|
128
133
|
// @ts-ignore theme is injected by the styled util
|
|
129
|
-
(0, _jsxRuntime.jsx)(ContainerRoot,
|
|
134
|
+
(0, _jsxRuntime.jsx)(ContainerRoot, {
|
|
130
135
|
as: component
|
|
131
136
|
// @ts-ignore module augmentation fails if custom breakpoints are used
|
|
132
137
|
,
|
|
133
138
|
ownerState: ownerState,
|
|
134
139
|
className: (0, _clsx.default)(classes.root, className),
|
|
135
|
-
ref: ref
|
|
136
|
-
|
|
140
|
+
ref: ref,
|
|
141
|
+
...other
|
|
142
|
+
})
|
|
137
143
|
);
|
|
138
144
|
});
|
|
139
145
|
process.env.NODE_ENV !== "production" ? Container.propTypes /* remove-proptypes */ = {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { Interpolation } from '@mui/styled-engine';
|
|
3
|
-
import { Theme as SystemTheme } from '../createTheme';
|
|
4
|
-
export interface GlobalStylesProps<Theme = SystemTheme> {
|
|
5
|
-
styles: Interpolation<Theme>;
|
|
6
|
-
defaultTheme?: object;
|
|
7
|
-
themeId?: string;
|
|
8
|
-
}
|
|
9
|
-
declare function GlobalStyles<Theme = SystemTheme>({ styles, themeId, defaultTheme, }: GlobalStylesProps<Theme>): JSX.Element;
|
|
10
|
-
declare namespace GlobalStyles {
|
|
11
|
-
var propTypes: any;
|
|
12
|
-
}
|
|
13
|
-
export default GlobalStyles;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Interpolation } from '@mui/styled-engine';
|
|
3
|
+
import { Theme as SystemTheme } from '../createTheme';
|
|
4
|
+
export interface GlobalStylesProps<Theme = SystemTheme> {
|
|
5
|
+
styles: Interpolation<Theme>;
|
|
6
|
+
defaultTheme?: object;
|
|
7
|
+
themeId?: string;
|
|
8
|
+
}
|
|
9
|
+
declare function GlobalStyles<Theme = SystemTheme>({ styles, themeId, defaultTheme, }: GlobalStylesProps<Theme>): JSX.Element;
|
|
10
|
+
declare namespace GlobalStyles {
|
|
11
|
+
var propTypes: any;
|
|
12
|
+
}
|
|
13
|
+
export default GlobalStyles;
|
package/GlobalStyles/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default } from './GlobalStyles';
|
|
2
|
-
export * from './GlobalStyles';
|
|
1
|
+
export { default } from './GlobalStyles';
|
|
2
|
+
export * from './GlobalStyles';
|
package/Stack/Stack.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* Demos:
|
|
4
|
-
*
|
|
5
|
-
* - [Stack (Joy UI)](https://mui.com/joy-ui/react-stack/)
|
|
6
|
-
* - [Stack (Material UI)](https://mui.com/material-ui/react-stack/)
|
|
7
|
-
* - [Stack (MUI System)](https://mui.com/system/react-stack/)
|
|
8
|
-
*
|
|
9
|
-
* API:
|
|
10
|
-
*
|
|
11
|
-
* - [Stack API](https://mui.com/system/api/stack/)
|
|
12
|
-
*/
|
|
13
|
-
declare const Stack: import("@mui/types").OverridableComponent<import("./StackProps").StackTypeMap<{}, "div">>;
|
|
14
|
-
export default Stack;
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Demos:
|
|
4
|
+
*
|
|
5
|
+
* - [Stack (Joy UI)](https://mui.com/joy-ui/react-stack/)
|
|
6
|
+
* - [Stack (Material UI)](https://mui.com/material-ui/react-stack/)
|
|
7
|
+
* - [Stack (MUI System)](https://mui.com/system/react-stack/)
|
|
8
|
+
*
|
|
9
|
+
* API:
|
|
10
|
+
*
|
|
11
|
+
* - [Stack API](https://mui.com/system/api/stack/)
|
|
12
|
+
*/
|
|
13
|
+
declare const Stack: import("@mui/types").OverridableComponent<import("./StackProps").StackTypeMap<{}, "div">>;
|
|
14
|
+
export default Stack;
|
package/Stack/StackProps.d.ts
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
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
|
-
* If `true`, the CSS flexbox `gap` is used instead of applying `margin` to children.
|
|
28
|
-
*
|
|
29
|
-
* While CSS `gap` removes the [known limitations](https://mui.com/joy-ui/react-stack/#limitations),
|
|
30
|
-
* it is not fully supported in some browsers. We recommend checking https://caniuse.com/?search=flex%20gap before using this flag.
|
|
31
|
-
*
|
|
32
|
-
* To enable this flag globally, follow the theme's default props configuration.
|
|
33
|
-
* @default false
|
|
34
|
-
*/
|
|
35
|
-
useFlexGap?: boolean;
|
|
36
|
-
}
|
|
37
|
-
export interface StackTypeMap<P = {}, D extends React.ElementType = 'div'> {
|
|
38
|
-
props: P & StackBaseProps & {
|
|
39
|
-
/**
|
|
40
|
-
* The system prop, which allows defining system overrides as well as additional CSS styles.
|
|
41
|
-
*/
|
|
42
|
-
sx?: SxProps<Theme>;
|
|
43
|
-
} & SystemProps<Theme>;
|
|
44
|
-
defaultComponent: D;
|
|
45
|
-
}
|
|
46
|
-
export type StackProps<D extends React.ElementType = StackTypeMap['defaultComponent'], P = {
|
|
47
|
-
component?: React.ElementType;
|
|
48
|
-
}> = OverrideProps<StackTypeMap<P, D>, D>;
|
|
49
|
-
export interface StackOwnerState {
|
|
50
|
-
direction: StackProps['direction'];
|
|
51
|
-
spacing: StackProps['spacing'];
|
|
52
|
-
useFlexGap: boolean;
|
|
53
|
-
}
|
|
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
|
+
* If `true`, the CSS flexbox `gap` is used instead of applying `margin` to children.
|
|
28
|
+
*
|
|
29
|
+
* While CSS `gap` removes the [known limitations](https://mui.com/joy-ui/react-stack/#limitations),
|
|
30
|
+
* it is not fully supported in some browsers. We recommend checking https://caniuse.com/?search=flex%20gap before using this flag.
|
|
31
|
+
*
|
|
32
|
+
* To enable this flag globally, follow the theme's default props configuration.
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
35
|
+
useFlexGap?: boolean;
|
|
36
|
+
}
|
|
37
|
+
export interface StackTypeMap<P = {}, D extends React.ElementType = 'div'> {
|
|
38
|
+
props: P & StackBaseProps & {
|
|
39
|
+
/**
|
|
40
|
+
* The system prop, which allows defining system overrides as well as additional CSS styles.
|
|
41
|
+
*/
|
|
42
|
+
sx?: SxProps<Theme>;
|
|
43
|
+
} & SystemProps<Theme>;
|
|
44
|
+
defaultComponent: D;
|
|
45
|
+
}
|
|
46
|
+
export type StackProps<D extends React.ElementType = StackTypeMap['defaultComponent'], P = {
|
|
47
|
+
component?: React.ElementType;
|
|
48
|
+
}> = OverrideProps<StackTypeMap<P, D>, D>;
|
|
49
|
+
export interface StackOwnerState {
|
|
50
|
+
direction: StackProps['direction'];
|
|
51
|
+
spacing: StackProps['spacing'];
|
|
52
|
+
useFlexGap: boolean;
|
|
53
|
+
}
|