@mui/system 5.11.4 → 5.11.7

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/Box/Box.d.ts CHANGED
@@ -170,9 +170,9 @@ export type SystemProps<Theme extends object = {}> = {
170
170
  | ((theme: Theme) => ResponsiveStyleValue<AllSystemCSSProperties[K]>);
171
171
  };
172
172
 
173
- export interface BoxTypeMap<P = {}, D extends React.ElementType = 'div'> {
173
+ export interface BoxTypeMap<P = {}, D extends React.ElementType = 'div', T extends object = Theme> {
174
174
  props: P &
175
- SystemProps<Theme> & {
175
+ SystemProps<T> & {
176
176
  children?: React.ReactNode;
177
177
  /**
178
178
  * The component used for the root node.
@@ -183,7 +183,7 @@ export interface BoxTypeMap<P = {}, D extends React.ElementType = 'div'> {
183
183
  /**
184
184
  * The system prop that allows defining system overrides as well as additional CSS styles.
185
185
  */
186
- sx?: SxProps<Theme>;
186
+ sx?: SxProps<T>;
187
187
  };
188
188
  defaultComponent: D;
189
189
  }
package/Box/Box.spec.d.ts CHANGED
@@ -1 +1 @@
1
- export {};
1
+ export {};
package/CHANGELOG.md CHANGED
@@ -1,5 +1,223 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 5.11.7
4
+
5
+ <!-- generated comparing v5.11.6..master -->
6
+
7
+ _Jan 31, 2023_
8
+
9
+ A big thanks to the 15 contributors who made this release possible. Here are some highlights ✨:
10
+
11
+ - @siriwatknp added `Table` component to Joy UI (#35872)
12
+ - many other 🐛 bug fixes and 📚 documentation improvements
13
+
14
+ ### `@mui/material@5.11.7`
15
+
16
+ - &#8203;<!-- 30 -->[Autocomplete] Prevent reset scroll position when new options are added (#35735) @sai6855
17
+ - &#8203;<!-- 24 -->[CssVarsProvider] Skip `unstable_sxConfig` variables (#35932) @siriwatknp
18
+ - &#8203;<!-- 10 -->[InputLabel] Add missing `component` type (#35852) @sai6855
19
+ - &#8203;<!-- 05 -->[Tooltip] Fix tooltip position (#35909) @marktoman
20
+
21
+ ### `@mui/base@5.0.0-alpha.116`
22
+
23
+ - &#8203;<!-- 29 -->[ListboxUnstyled] Fix option state highlighted to prevent unnecessary focus (#35838) @SaidMarar
24
+
25
+ ### `@mui/joy@5.0.0-alpha.65`
26
+
27
+ #### Breaking changes
28
+
29
+ - &#8203;<!-- 05 -->[Joy] Replace `Joy[Component]` classname with `Mui[Component]` classname for all slots of components (#35718) @hbjORbj
30
+
31
+ - Renames the classname prefix of all Joy UI components from `'Joy'` to `'Mui'`.
32
+
33
+ ```diff
34
+ <Button
35
+ -sx={{ '& .JoyButton-root': { '& .JoyButton-button': {} } }}
36
+ +sx={{ '& .MuiButton-root': { '& .MuiButton-button': {} } }}
37
+ />
38
+ ```
39
+
40
+ You can use this [codemod](https://github.com/mui/material-ui/blob/master/packages/mui-codemod/README.md#joy-rename-classname-prefix) to help with the migration.
41
+
42
+ - &#8203;<!-- 04 -->[Joy] Replace `row` prop with `orientation` prop in all Joy UI components (#35721) @hbjORbj
43
+
44
+ - Transforms `row` prop to `orientation` prop across `Card`, `List` and `RadioGroup` components in Joy UI.
45
+
46
+ ```diff
47
+ <Card
48
+ -row
49
+ +orientation={"horizontal"}
50
+ />
51
+ ```
52
+
53
+ You can use this [codemod](https://github.com/mui/material-ui/blob/master/packages/mui-codemod/README.md#joy-rename-row-prop) to help with the migration.
54
+
55
+ #### Changes
56
+
57
+ - &#8203;<!-- 26 -->[Joy][Checkbox] Display correct icon in checkbox (#35943) @sai6855
58
+ - &#8203;<!-- 09 -->[Joy] Add `Table` component (#35872) @siriwatknp
59
+ - &#8203;<!-- 08 -->[Joy] Miscellaneous fixes (#35953) @siriwatknp
60
+
61
+ ### Docs
62
+
63
+ - &#8203;<!-- 28 -->[blog] Add RSS feed (#35777) @gorjiali
64
+ - &#8203;<!-- 27 -->[blog] Prevent horizontal scroll on blog posts (#35948) @oliviertassinari
65
+ - &#8203;<!-- 23 -->[docs] Add to codemod README about an added script (#35999) @hbjORbj
66
+ - &#8203;<!-- 22 -->[docs] Add a warning about to clear the local storage when `defaultMode` changes (#35937) @ArthurPedroti
67
+ - &#8203;<!-- 21 -->[docs] Fix Joy UI variables playground (#35950) @siriwatknp
68
+ - &#8203;<!-- 20 -->[docs] Fix typos in base components docs (#35985) @HeVictor
69
+ - &#8203;<!-- 19 -->[docs] Fix event's label reported to GA (#35930) @oliviertassinari
70
+ - &#8203;<!-- 18 -->[docs] Standardize "no longer" / "not documented" callouts in Material UI docs (#35957) @samuelsycamore
71
+ - &#8203;<!-- 17 -->[docs] Revise and expand Joy UI Checkbox doc (#35817) @samuelsycamore
72
+ - &#8203;<!-- 16 -->[docs] Add docs notification to Date and Time Pickers revamped (#35935) @joserodolfofreitas
73
+ - &#8203;<!-- 15 -->[docs] Update community theme builder to forked updated one (#35928) @idebeijer
74
+ - &#8203;<!-- 14 -->[docs] Add Joy default theme viewer (#35554) @siriwatknp
75
+ - &#8203;<!-- 13 -->[docs][joy] Fixed a typo in `Using icon libraries` page (#35989) @badalsaibo
76
+ - &#8203;<!-- 12 -->[docs][joy] Removed Badge info from Chip docs (#35955) @Vivek-Prajapatii
77
+ - &#8203;<!-- 11 -->[docs][system] Fix border color of Boxes in demos of `Configure the sx prop` page in dark mode (#35961) @ZeeshanTamboli
78
+
79
+ ### Core
80
+
81
+ - &#8203;<!-- 25 -->[core] Boolean props always have a default value of `false` in API docs (#35913) @hbjORbj
82
+ - &#8203;<!-- 04 -->[core] Improve types for usePreviousProps (#35833) @sai6855
83
+ - &#8203;<!-- 03 -->[website] Fix 404 link to store (#35973) @oliviertassinari
84
+ - &#8203;<!-- 02 -->[website] Fix 302 of diamond sponsor link @oliviertassinari
85
+ - &#8203;<!-- 01 -->[website] Fix outdated YouTube link @oliviertassinari
86
+
87
+ All contributors of this release in alphabetical order: @ArthurPedroti, @badalsaibo, @gorjiali, @hbjORbj, @HeVictor, @idebeijer, @joserodolfofreitas, @marktoman, @oliviertassinari, @sai6855, @SaidMarar, @samuelsycamore, @siriwatknp, @Vivek-Prajapatii, @ZeeshanTamboli
88
+
89
+ ## 5.11.6
90
+
91
+ <!-- generated comparing v5.11.5..master -->
92
+
93
+ _Jan 23, 2023_
94
+
95
+ A big thanks to the 13 contributors who made this release possible. Here are some highlights ✨:
96
+
97
+ - @ZeeshanTamboli improved the logic for handling the value label in the `SliderUnstyled` (#35805)
98
+ - many other 🐛 bug fixes and 📚 documentation improvements
99
+
100
+ ### `@mui/material@5.11.6`
101
+
102
+ - &#8203;<!-- 15 -->[Box] Fix usage of not supported features in TypeScript 3.5 (#35877) @mnajdova
103
+ - &#8203;<!-- 14 -->[Button] Fix border color for secondary disabled button (#35866) @SaidMarar
104
+ - &#8203;<!-- 03 -->[SwipeableDrawer] Add callback to customise touchstart ignore for swipeable drawer (#30759) @tech-meppem
105
+
106
+ ### `@mui/base@5.0.0-alpha.115`
107
+
108
+ #### Breaking changes
109
+
110
+ - &#8203;<!-- 04 -->[SliderUnstyled] Improved logic for displaying the value label (#35805) @ZeeshanTamboli
111
+
112
+ - The `valueLabelDisplay` prop is removed from `SliderUnstyled`. The prop was not working as intended in `SliderUnstyled` (See #35398). You can instead provide a `valueLabel` slot with the `slots` prop API to show the value label:
113
+
114
+ ```diff
115
+ - <SliderUnstyled valueLabelDisplay="on" />
116
+ + <SliderUnstyled slots={{ valueLabel: SliderValueLabel }} />
117
+ ```
118
+
119
+ The following demo shows how to show a value label when it is hovered over with the thumb: https://mui.com/base/react-slider/#value-label
120
+
121
+ - The following classes are removed from `sliderUnstyledClasses` since they are not needed for the value label:
122
+
123
+ ```diff
124
+ - valueLabel
125
+ - valueLabelOpen
126
+ - valueLabelCircle
127
+ - valueLabelLabel
128
+ ```
129
+
130
+ In the custom value label component, you can define your own classNames and target them with CSS.
131
+
132
+ - The `SliderValueLabelUnstyled` component is removed from SliderUnstyled. You should provide your own custom component for the value label.
133
+
134
+ - To avoid using `React.cloneElement` API in value label, the component hierarchy structure of the value label is changed. The value label is now inside the Thumb slot - `Thumb` -> `Input`, `ValueLabel`.
135
+
136
+ #### Changes
137
+
138
+ - &#8203;<!-- 05 -->[InputUnstyled] Fix externally provided `inputRef` is ignored (#35807) @sai6855
139
+
140
+ ### `@mui/joy@5.0.0-alpha.64`
141
+
142
+ - &#8203;<!-- 17 -->[Avatar][joy] Remove `imgProps` prop and add Codemod script for migration (#35859) @hbjORbj
143
+
144
+ ### Docs
145
+
146
+ - &#8203;<!-- 16 -->[blog] Date and time pickers revamped (#35486) @joserodolfofreitas
147
+ - &#8203;<!-- 10 -->[docs] Fix incorrect breakpoint use (#34948) @rosita-dmello
148
+ - &#8203;<!-- 09 -->[docs] Replace react-virtualized with react-virtuoso in Table (#35700) @petyosi
149
+ - &#8203;<!-- 08 -->[docs] Fix account menu demo not closing with keyboard. (#35870) @mj12albert
150
+ - &#8203;<!-- 07 -->[docs] Fix typos in the docs of Joy UI (#35876) @HeVictor
151
+ - &#8203;<!-- 06 -->[docs] Fix wording in `Color` page (#35873) @oliv37
152
+
153
+ ### Core
154
+
155
+ - &#8203;<!-- 13 -->[core] Fix release changelog to handle commits with empty author field (#35921) @mnajdova
156
+ - &#8203;<!-- 12 -->[core] Revert `docs-utilities` migration to TypeScript and fix type (#35881) @ZeeshanTamboli
157
+ - &#8203;<!-- 11 -->[core] Migrate internal `docs-utilities` package to TypeScript (#35846) @ZeeshanTamboli
158
+ - &#8203;<!-- 02 -->[website] Designer don't spend their time writing code @oliviertassinari
159
+ - &#8203;<!-- 01 -->[website] Emphasis the technical background need for this role @oliviertassinari
160
+
161
+ All contributors of this release in alphabetical order: @HeVictor, @hbjORbj, @joserodolfofreitas, @mj12albert, @mnajdova, @oliv37, @oliviertassinari, @petyosi, @rosita-dmello, @sai6855, @SaidMarar, @tech-meppem, @ZeeshanTamboli
162
+
163
+ ## 5.11.5
164
+
165
+ <!-- generated comparing v5.11.4..master -->
166
+
167
+ _Jan 17, 2023_
168
+
169
+ A big thanks to the 17 contributors who made this release possible.
170
+ This release was mostly about 🐛 bug fixes and 📚 documentation improvements.
171
+
172
+ ### `@mui/material@5.11.5`
173
+
174
+ - [Material UI] Custom channel token should suppress the warning (#35804) @siriwatknp
175
+ - [Autocomplete] Fix value type when `strictNullChecks` is `false` (#35367) @fenghan34
176
+ - [Slider] Replace `SliderUnstyled` with `useSlider` hook (#35770) @ZeeshanTamboli
177
+ - [l10n] Add Belarusian translation (#35742) @volhalink
178
+
179
+ ### `@mui/system@5.11.5`
180
+
181
+ - [system] Improve the `createBox` types (#35532) @mnajdova
182
+
183
+ ### `@mui/codemod@5.11.5`
184
+
185
+ - Add `joy-text-field-to-input` codemod (#35462) @hbjORbj
186
+
187
+ ### `@mui/base@5.0.0-alpha.114`
188
+
189
+ - [base] Fix typos (#35802) @nnmax
190
+ - [Slider] Convert code to TypeScript (#35445) @sai6855
191
+
192
+ ### `@mui/joy@5.0.0-alpha.63`
193
+
194
+ - [Tabs][joy] Don't apply `:hover, :active` styles when `selected` (#35750) @sai6855
195
+ - Remove `TextField` component and replace its usage in docs with `FormControl`/`FormLabel`/`Input` (#35462) @hbjORbj
196
+ - [TextField] Throw error with migration message (#35845) @siriwatknp
197
+ - Miscellaneous fixes (#35847) @siriwatknp
198
+
199
+ ### Docs
200
+
201
+ - [docs] Improve pickers lab migration stressing `mui-x` usage (#35740) @LukasTy
202
+ - [docs] Fix incorrectly named AccessibleTable demo component (#35832) @HeVictor
203
+ - [docs] Clarify where to find docs for MUI Base components in Material UI (#35799) @samuelsycamore
204
+ - [docs] Fix typos (#35814) @alexfauquette
205
+ - [docs] Revise and expand the Joy UI Card page (#35745) @samuelsycamore
206
+ - [docs] Fix navigation layout shift (#35679) @oliviertassinari
207
+ - [docs] Fix typo in the Composition page (#35774) @msoyka
208
+ - [docs][joy] Update Customization section code example to use the correct API (#35765) @pupudu
209
+ - [docs][joy] Fix grammar in `Typography` docs (#35796) @atrefonas
210
+ - [examples] Remove `next-env.d.ts` from Next.js examples (#35772) @Juneezee
211
+
212
+ ### Core
213
+
214
+ - [website] Improve pricing page (#35767) @oliviertassinari
215
+ - [website] Add Greg in about page (#35816) @oliviertassinari
216
+ - [website] Update the Accessibility Engineer role (#35751) @oliviertassinari
217
+ - [website] Add docs for MUI for Figma @oliviertassinari
218
+
219
+ All contributors of this release in alphabetical order: @alexfauquette, @atrefonas, @fenghan34, @hbjORbj, @HeVictor, @Juneezee, @LukasTy, @mnajdova, @msoyka, @nnmax, @oliviertassinari, @pupudu, @sai6855, @samuelsycamore, @siriwatknp, @volhalink, @ZeeshanTamboli
220
+
3
221
  ## 5.11.4
4
222
 
5
223
  <!-- generated comparing v5.11.3..master -->
@@ -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 {};
package/Stack/Stack.d.ts CHANGED
@@ -1,13 +1,13 @@
1
- /**
2
- *
3
- * Demos:
4
- *
5
- * - [Stack (Material UI)](https://mui.com/material-ui/react-stack/)
6
- * - [Stack (MUI System)](https://mui.com/system/react-stack/)
7
- *
8
- * API:
9
- *
10
- * - [Stack API](https://mui.com/system/api/stack/)
11
- */
12
- declare const Stack: import("@mui/types").OverridableComponent<import("./StackProps").StackTypeMap<{}, "div">>;
13
- export default Stack;
1
+ /**
2
+ *
3
+ * Demos:
4
+ *
5
+ * - [Stack (Material UI)](https://mui.com/material-ui/react-stack/)
6
+ * - [Stack (MUI System)](https://mui.com/system/react-stack/)
7
+ *
8
+ * API:
9
+ *
10
+ * - [Stack API](https://mui.com/system/api/stack/)
11
+ */
12
+ declare const Stack: import("@mui/types").OverridableComponent<import("./StackProps").StackTypeMap<{}, "div">>;
13
+ export default Stack;
@@ -1,42 +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 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
- }
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 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
+ }
@@ -1,21 +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 extends {}>(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 {};
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 extends {}>(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 {};
package/Stack/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- export { default } from './Stack';
2
- export { default as createStack } from './createStack';
3
- export * from './StackProps';
4
- export { default as stackClasses } from './stackClasses';
5
- export * from './stackClasses';
1
+ export { default } from './Stack';
2
+ export { default as createStack } from './createStack';
3
+ export * from './StackProps';
4
+ export { default as stackClasses } from './stackClasses';
5
+ export * from './stackClasses';
@@ -1,8 +1,8 @@
1
- export interface StackClasses {
2
- /** Styles applied to the root element. */
3
- root: string;
4
- }
5
- export type StackClassKey = keyof StackClasses;
6
- export declare function getStackUtilityClass(slot: string): string;
7
- declare const stackClasses: StackClasses;
8
- export default stackClasses;
1
+ export interface StackClasses {
2
+ /** Styles applied to the root element. */
3
+ root: string;
4
+ }
5
+ export type StackClassKey = keyof StackClasses;
6
+ export declare function getStackUtilityClass(slot: string): string;
7
+ declare const stackClasses: StackClasses;
8
+ export default stackClasses;
@@ -1,12 +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;
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;