@mui/system 5.14.6 → 5.14.8

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,27 +170,29 @@ export type SystemProps<Theme extends object = {}> = {
170
170
  | ((theme: Theme) => ResponsiveStyleValue<AllSystemCSSProperties[K]>);
171
171
  };
172
172
 
173
+ export interface BoxOwnProps<Theme extends object = SystemTheme> extends SystemProps<SystemTheme> {
174
+ children?: React.ReactNode;
175
+ /**
176
+ * The component used for the root node.
177
+ * Either a string to use a HTML element or a component.
178
+ */
179
+ component?: React.ElementType;
180
+ ref?: React.Ref<unknown>;
181
+ /**
182
+ * The system prop that allows defining system overrides as well as additional CSS styles.
183
+ */
184
+ sx?: SxProps<Theme>;
185
+ }
186
+
173
187
  export interface BoxTypeMap<
174
188
  AdditionalProps = {},
175
189
  RootComponent extends React.ElementType = 'div',
176
190
  Theme extends object = SystemTheme,
177
191
  > {
178
- props: AdditionalProps &
179
- SystemProps<Theme> & {
180
- children?: React.ReactNode;
181
- /**
182
- * The component used for the root node.
183
- * Either a string to use a HTML element or a component.
184
- */
185
- component?: React.ElementType;
186
- ref?: React.Ref<unknown>;
187
- /**
188
- * The system prop that allows defining system overrides as well as additional CSS styles.
189
- */
190
- sx?: SxProps<Theme>;
191
- };
192
+ props: AdditionalProps & BoxOwnProps<Theme>;
192
193
  defaultComponent: RootComponent;
193
194
  }
195
+
194
196
  /**
195
197
  *
196
198
  * Demos:
package/CHANGELOG.md CHANGED
@@ -1,5 +1,139 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 5.14.8
4
+
5
+ <!-- generated comparing v5.14.7..master -->
6
+
7
+ _Sep 5, 2023_
8
+
9
+ A big thanks to the 25 contributors who made this release possible.
10
+
11
+ ### `@mui/material@5.14.8`
12
+
13
+ - &#8203;<!-- 53 -->ImageItemList fix incorrect (below) rendering (#38452) @omriklein
14
+ - &#8203;<!-- 42 -->[Button] Add demo for file upload (#38786) @anle9650
15
+ - &#8203;<!-- 12 -->[Slider] Add missing classes for `Slider` `InputLabel` `InputBase` `Radio` (#38401) @sai6855
16
+ - &#8203;<!-- 11 -->[Select] Merge slotProps.paper with internal Paper props (#38703) @michaldudak
17
+ - &#8203;<!-- 09 -->[Tabs] Fix `ref` type (#38717) @ZeeshanTamboli
18
+ - &#8203;<!-- 08 -->[TabScrollButton] Extend ButtonBase types (#38719) @ZeeshanTamboli
19
+
20
+ ### `@mui/base@5.0.0-beta.14`
21
+
22
+ - &#8203;<!-- 50 -->[Autocomplete] Type multiple values with readonly arrays. (#38253) @pcorpet
23
+ - &#8203;<!-- 07 -->[TextField] Fix unstable height of memoized multiline TextField component (#37135) @amal-qb
24
+
25
+ ### `@mui/joy@5.0.0-beta.5`
26
+
27
+ - &#8203;<!-- 53 -->[Accordion] Fix incorrect display of classname (#38695) @sai6855
28
+ - &#8203;<!-- 51 -->[AspectRatio] Correct `ratio` prop description (#38743) @sai6855
29
+ - &#8203;<!-- 43 -->[Button] Fix disablity of button (#38673) @sai6855
30
+ - &#8203;<!-- 35 -->[design] Stray design tweaks to components (#38476) @zanivan
31
+ - &#8203;<!-- 05 -->[Typography] Added position only when Skeleton is a direct child (#38799) @siriwatknp
32
+
33
+ ### `@mui/lab@5.0.0-alpha.143`
34
+
35
+ - &#8203;<!-- 06 -->[TreeView] Use Tree View from MUI X in the lab (#38261) @flaviendelangle
36
+ - &#8203;<!-- 13 -->[LoadingButton] Fix HTML rule button > div forbidden nesting (#38584) @oliviertassinari
37
+
38
+ ### `@mui/system@5.14.8`
39
+
40
+ - &#8203;<!-- 11 -->[system] Fix the inconsistent types of the `mergeBreakpointsInOrder` function (#38749) @imevanc
41
+ - &#8203;<!-- 10 -->[system] Fix maxWidth incorrectly resolving breakpoints with non-pixel units (#38633) @mj12albert
42
+ - &#8203;<!-- 05 -->[typescript] Introduce \*OwnProps interfaces for components (#36798) @szalonna
43
+
44
+ ### Docs
45
+
46
+ - &#8203;<!-- 52 -->Update changelog (#38704) @mj12albert
47
+ - &#8203;<!-- 49 -->[docs][Autocomplete] Require referentially stable value (#38734) @michaldudak
48
+ - &#8203;<!-- 48 -->[docs][base-ui] Add type parameter to the button in prepareForSlot demo (#38640) @michaldudak
49
+ - &#8203;<!-- 47 -->[docs][base-ui] Fix the broken image in the Tailwind CSS guide (#38721) @michaldudak
50
+ - &#8203;<!-- 46 -->[docs][base-ui]: Working With Tailwind Guide - revises example code to avoid import errors (#38693) @christophermorin
51
+ - &#8203;<!-- 45 -->[docs][base] Add Tailwind CSS + plain CSS demo on the Menu page (#38618) @alisasanib
52
+ - &#8203;<!-- 44 -->[blog] Clearer blog release title @oliviertassinari
53
+ - &#8203;<!-- 43 -->[blog] Add a post for the Tree View migration (#38407) @flaviendelangle
54
+ - &#8203;<!-- 34 -->[docs] Fix broken links to Next.js docs (#38764) @ruflair
55
+ - &#8203;<!-- 33 -->[docs] Trim trailing whitespace (#38793) @oliviertassinari
56
+ - &#8203;<!-- 32 -->[docs] Fix a typo in lab-tree-view-to-mui-x.md @mbrookes
57
+ - &#8203;<!-- 31 -->[docs] Clean up not used Usage files (#38715) @danilo-leal
58
+ - &#8203;<!-- 30 -->[docs] Improve theme builder exceptions (#38709) @jyash97
59
+ - &#8203;<!-- 29 -->[docs] Polish Slider demos (#38759) @oliviertassinari
60
+ - &#8203;<!-- 28 -->[docs] Fix Joy UI docs link regression (#38761) @oliviertassinari
61
+ - &#8203;<!-- 27 -->[docs] Fix typo @oliviertassinari
62
+ - &#8203;<!-- 26 -->[docs] Fix e.g. typo (#38748) @oliviertassinari
63
+ - &#8203;<!-- 25 -->[docs] Fix Next.js pages router example redirect link (#38750) @sai6855
64
+ - &#8203;<!-- 24 -->[docs] Fix SEO issue broken links @oliviertassinari
65
+ - &#8203;<!-- 23 -->[docs] Improve SSR example reference (#38651) @oliviertassinari
66
+ - &#8203;<!-- 17 -->[docs][joy-ui] Integrate a count-up feature to the Linear Progress (#38738) @anon-phantom
67
+ - &#8203;<!-- 16 -->[docs][joy-ui] Fix Link's `overlay` prop demo (#38702) @danilo-leal
68
+ - &#8203;<!-- 15 -->[docs][joy-ui] Polish the Stack page (#38623) @danilo-leal
69
+ - &#8203;<!-- 14 -->[docs][material-ui] Adjust simple Slide demo (#38646) @rajgop1
70
+
71
+ ### Core
72
+
73
+ - &#8203;<!-- 43 -->[core] Re-add nx and setup build caching (#38752) @brijeshb42
74
+ - &#8203;<!-- 41 -->[core] Remove dead code seoTitle @oliviertassinari
75
+ - &#8203;<!-- 40 -->[core] Use immutable refs (#38762) @oliviertassinari
76
+ - &#8203;<!-- 39 -->[core] Rework `typescript-to-proptypes` to share the AST parsing with `parseStyles` (#38517) @flaviendelangle
77
+ - &#8203;<!-- 38 -->[core] Fix CI @oliviertassinari
78
+ - &#8203;<!-- 37 -->[core] Remove unnecessary `@types/webpack` package (#38720) @ZeeshanTamboli
79
+ - &#8203;<!-- 36 -->[core] Remove duplicate prop @oliviertassinari
80
+
81
+ - &#8203;<!-- 22 -->[docs-infra] Fix mobile display in CodeSandbox (#38767) @oliviertassinari
82
+ - &#8203;<!-- 21 -->[docs-infra] Remove legacy GA (#37579) @alexfauquette
83
+ - &#8203;<!-- 20 -->[docs-infra] Fix emotion :first-child console log (#38690) @oliviertassinari
84
+ - &#8203;<!-- 19 -->[docs-infra] Fix leaking callout content (#38712) @danilo-leal
85
+ - &#8203;<!-- 18 -->[docs-infra] Remove emoji from callouts (#38694) @danilo-leal
86
+
87
+ - &#8203;<!-- 04 -->[website] Fix out of date discount value @oliviertassinari
88
+ - &#8203;<!-- 03 -->[website] Fix out-of-date label on Toolpad (#38744) @bharatkashyap
89
+ - &#8203;<!-- 02 -->[website] Fine-tune branding buttons box shadows (#38731) @danilo-leal
90
+ - &#8203;<!-- 01 -->[website] Fix pricing table style (#38681) @alexfauquette
91
+
92
+ All contributors of this release in alphabetical order: @alexfauquette, @alisasanib, @amal-qb, @anle9650, @anon-phantom, @bharatkashyap, @brijeshb42, @christophermorin, @danilo-leal, @flaviendelangle, @imevanc, @jyash97, @mbrookes, @michaldudak, @mj12albert, @oliviertassinari, @omriklein, @pcorpet, @rajgop1, @ruflair, @sai6855, @siriwatknp, @szalonna, @zanivan, @ZeeshanTamboli
93
+
94
+ ## 5.14.7
95
+
96
+ <!-- generated comparing v5.14.6..master -->
97
+
98
+ _Aug 29, 2023_
99
+
100
+ A big thanks to the 11 contributors who made this release possible. This release focuses primarily on 🐛 bug fixes, 📚 documentation, and ⚙️ infrastructure improvements.
101
+
102
+ ### `@mui/material@5.14.7`
103
+
104
+ - [Autocomplete] Fix listbox opened unexpectedly when component is `disabled` (#38611) @mj12albert
105
+ - [Select][material-ui] Fix select menu moving on scroll when disableScrollLock is true (#37773) @VishruthR
106
+
107
+ ### `@mui/base@5.0.0-beta.13`
108
+
109
+ - [useButton][base-ui] Accept arbitrary props in getRootProps and forward them (#38475) @DiegoAndai
110
+
111
+ ### `@mui/zero-runtime@0.0.1-alpha.1`
112
+
113
+ - [system][zero][tag] Add support for sx prop (#38535) @brijeshb42
114
+
115
+ ### Docs
116
+
117
+ - [docs] Number Input docs fixes (#38521) @mj12albert
118
+ - [docs] Show all the code in the usage section (#38691) @oliviertassinari
119
+ - [docs][joy-ui] Change the customization and how-to guides docs tree (#38396) @danilo-leal
120
+ - [docs][lab][LoadingButton] Improve `loading` prop documentation (#38625) @sai6855
121
+ - [docs][material-ui] Format `key` prop JSDoc description in `Snackbar` component code correctly (#38603) @jaydenseric
122
+
123
+ ### Core
124
+
125
+ - [core] Add use-client to custom icons (#38132) @mj12albert
126
+ - [core] Remove unnecessary `@types/jsdom` (#38657) @renovate[bot]
127
+ - [core] Improve sponsors GA labels (#38649) @oliviertassinari
128
+ - [core] Fix ESM issues with regression tests (#37963) @Janpot
129
+ - [core] Potential fix for intermittent ci crashes in e2e test (#38614) @Janpot
130
+ - [docs-infra] Mark unstable components with a chip in the nav drawer (#38573) @michaldudak
131
+ - [docs-infra] Adjust the Material You playground demo design (#38636) @danilo-leal
132
+ - [docs-infra] Hide the SkipLink button if user prefers reduced motion (#38632) @DerTimonius
133
+ - [website] Add tiny fixes the homepage Sponsors section (#38635) @danilo-leal
134
+
135
+ All contributors of this release in alphabetical order: @brijeshb42, @danilo-leal, @DerTimonius, @DiegoAndai, @Janpot, @jaydenseric, @mj12albert, @oliviertassinari, @renovate[bot], @sai6855, @VishruthR
136
+
3
137
  ## 5.14.6
4
138
 
5
139
  <!-- generated comparing v5.14.5..master -->
@@ -539,7 +673,7 @@ A big thanks to the 15 contributors who made this release possible. Here are som
539
673
  - 💫 Material UI, Joy UI, and Base UI are compatible with [NextJS App Router](https://nextjs.org/docs/app) (#37656) @mj12albert
540
674
  - 📚 Added new guides for integrating with Next.js 13 App Router (#37656) @mj12albert
541
675
  - Ⓜ️ [Material UI guide](https://mui.com/material-ui/guides/next-js-app-router/)
542
- - 🅙 [Joy UI guide](https://mui.com/joy-ui/guides/next-js-app-router/)
676
+ - 🅙 [Joy UI guide](https://mui.com/joy-ui/integrations/next-js-app-router/)
543
677
  - 🅱️ [Base UI guide](https://mui.com/base-ui/guides/next-js-app-router/)
544
678
  - 🐛 bug fixes, 📚 documentation, and ⚙️ infrastructure improvements.
545
679
 
@@ -10677,7 +10811,7 @@ A big thanks to the 20 contributors who made this release possible. Here are som
10677
10811
  - [Avatar] Fix usage of srcset property (#23286) @matheuspiment
10678
10812
  - [ClickAwayListener] Fix mounting behavior in Portals in React 17 (#23315) @eps1lon
10679
10813
  - [core] Allow React 17 (#23311) @eps1lon
10680
- - [Icon] Fix translation, e.g Google Translate (#23237) @cbeltrangomez84
10814
+ - [Icon] Fix translation, e.g. Google Translate (#23237) @cbeltrangomez84
10681
10815
  - [LinearProgress] Fix Safari's bug during composition of different paint (#23293) @montogeek
10682
10816
  - [Radio] Fix dot misalignment in Safari (#23239) @anasufana
10683
10817
  - [styled-engine] Fix tagged template syntax with multiple expressions (#23269) @eps1lon
package/esm/sizing.js CHANGED
@@ -11,10 +11,20 @@ export const width = style({
11
11
  export const maxWidth = props => {
12
12
  if (props.maxWidth !== undefined && props.maxWidth !== null) {
13
13
  const styleFromPropValue = propValue => {
14
- var _props$theme;
14
+ var _props$theme, _props$theme2;
15
15
  const breakpoint = ((_props$theme = props.theme) == null || (_props$theme = _props$theme.breakpoints) == null || (_props$theme = _props$theme.values) == null ? void 0 : _props$theme[propValue]) || breakpointsValues[propValue];
16
+ if (!breakpoint) {
17
+ return {
18
+ maxWidth: sizingTransform(propValue)
19
+ };
20
+ }
21
+ if (((_props$theme2 = props.theme) == null || (_props$theme2 = _props$theme2.breakpoints) == null ? void 0 : _props$theme2.unit) !== 'px') {
22
+ return {
23
+ maxWidth: `${breakpoint}${props.theme.breakpoints.unit}`
24
+ };
25
+ }
16
26
  return {
17
- maxWidth: breakpoint || sizingTransform(propValue)
27
+ maxWidth: breakpoint
18
28
  };
19
29
  };
20
30
  return handleBreakpoints(props, props.maxWidth, styleFromPropValue);
package/index.d.ts CHANGED
@@ -32,7 +32,7 @@ export type BordersProps = PropsFor<typeof borders>;
32
32
 
33
33
  // breakpoints.js
34
34
  type DefaultBreakPoints = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
35
- export { handleBreakpoints } from './breakpoints';
35
+ export { handleBreakpoints, mergeBreakpointsInOrder } from './breakpoints';
36
36
 
37
37
  /**
38
38
  * @returns An enhanced stylefunction that considers breakpoints
@@ -41,12 +41,6 @@ export function breakpoints<Props, Breakpoints extends string = DefaultBreakPoin
41
41
  styleFunction: StyleFunction<Props>,
42
42
  ): StyleFunction<Partial<Record<Breakpoints, Props>> & Props>;
43
43
 
44
- // restructures the breakpoints in the in the correct order and merges all styles args
45
- export function mergeBreakpointsInOrder(
46
- breakpointsInput: { keys: string[]; up: (key: string) => string },
47
- ...styles: object[]
48
- ): object;
49
-
50
44
  export function compose<T extends Array<StyleFunction<any>>>(...args: T): ComposedStyleFunction<T>;
51
45
 
52
46
  export type DisplayProps = PropsFor<typeof display>;
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/system v5.14.6
2
+ * @mui/system v5.14.8
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
package/legacy/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/system v5.14.6
2
+ * @mui/system v5.14.8
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
package/legacy/sizing.js CHANGED
@@ -11,10 +11,20 @@ export var width = style({
11
11
  export var maxWidth = function maxWidth(props) {
12
12
  if (props.maxWidth !== undefined && props.maxWidth !== null) {
13
13
  var styleFromPropValue = function styleFromPropValue(propValue) {
14
- var _props$theme;
14
+ var _props$theme, _props$theme2;
15
15
  var breakpoint = ((_props$theme = props.theme) == null || (_props$theme = _props$theme.breakpoints) == null || (_props$theme = _props$theme.values) == null ? void 0 : _props$theme[propValue]) || breakpointsValues[propValue];
16
+ if (!breakpoint) {
17
+ return {
18
+ maxWidth: sizingTransform(propValue)
19
+ };
20
+ }
21
+ if (((_props$theme2 = props.theme) == null || (_props$theme2 = _props$theme2.breakpoints) == null ? void 0 : _props$theme2.unit) !== 'px') {
22
+ return {
23
+ maxWidth: "".concat(breakpoint).concat(props.theme.breakpoints.unit)
24
+ };
25
+ }
16
26
  return {
17
- maxWidth: breakpoint || sizingTransform(propValue)
27
+ maxWidth: breakpoint
18
28
  };
19
29
  };
20
30
  return handleBreakpoints(props, props.maxWidth, styleFromPropValue);
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/system v5.14.6
2
+ * @mui/system v5.14.8
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
package/modern/sizing.js CHANGED
@@ -12,8 +12,18 @@ export const maxWidth = props => {
12
12
  if (props.maxWidth !== undefined && props.maxWidth !== null) {
13
13
  const styleFromPropValue = propValue => {
14
14
  const breakpoint = props.theme?.breakpoints?.values?.[propValue] || breakpointsValues[propValue];
15
+ if (!breakpoint) {
16
+ return {
17
+ maxWidth: sizingTransform(propValue)
18
+ };
19
+ }
20
+ if (props.theme?.breakpoints?.unit !== 'px') {
21
+ return {
22
+ maxWidth: `${breakpoint}${props.theme.breakpoints.unit}`
23
+ };
24
+ }
15
25
  return {
16
- maxWidth: breakpoint || sizingTransform(propValue)
26
+ maxWidth: breakpoint
17
27
  };
18
28
  };
19
29
  return handleBreakpoints(props, props.maxWidth, styleFromPropValue);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/system",
3
- "version": "5.14.6",
3
+ "version": "5.14.8",
4
4
  "private": false,
5
5
  "author": "MUI Team",
6
6
  "description": "CSS utilities for rapidly laying out custom designs.",
@@ -44,10 +44,10 @@
44
44
  },
45
45
  "dependencies": {
46
46
  "@babel/runtime": "^7.22.10",
47
- "@mui/private-theming": "^5.14.6",
48
- "@mui/styled-engine": "^5.14.6",
47
+ "@mui/private-theming": "^5.14.8",
48
+ "@mui/styled-engine": "^5.14.8",
49
49
  "@mui/types": "^7.2.4",
50
- "@mui/utils": "^5.14.6",
50
+ "@mui/utils": "^5.14.8",
51
51
  "clsx": "^2.0.0",
52
52
  "csstype": "^3.1.2",
53
53
  "prop-types": "^15.8.1"
package/sizing.js CHANGED
@@ -21,10 +21,20 @@ exports.width = width;
21
21
  const maxWidth = props => {
22
22
  if (props.maxWidth !== undefined && props.maxWidth !== null) {
23
23
  const styleFromPropValue = propValue => {
24
- var _props$theme;
24
+ var _props$theme, _props$theme2;
25
25
  const breakpoint = ((_props$theme = props.theme) == null || (_props$theme = _props$theme.breakpoints) == null || (_props$theme = _props$theme.values) == null ? void 0 : _props$theme[propValue]) || _breakpoints.values[propValue];
26
+ if (!breakpoint) {
27
+ return {
28
+ maxWidth: sizingTransform(propValue)
29
+ };
30
+ }
31
+ if (((_props$theme2 = props.theme) == null || (_props$theme2 = _props$theme2.breakpoints) == null ? void 0 : _props$theme2.unit) !== 'px') {
32
+ return {
33
+ maxWidth: `${breakpoint}${props.theme.breakpoints.unit}`
34
+ };
35
+ }
26
36
  return {
27
- maxWidth: breakpoint || sizingTransform(propValue)
37
+ maxWidth: breakpoint
28
38
  };
29
39
  };
30
40
  return (0, _breakpoints.handleBreakpoints)(props, props.maxWidth, styleFromPropValue);