@mui/system 5.15.12 → 5.15.13
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 +96 -0
- package/RtlProvider/index.d.ts +11 -0
- package/RtlProvider/index.js +35 -0
- package/RtlProvider/package.json +6 -0
- package/ThemeProvider/ThemeProvider.js +6 -1
- package/esm/RtlProvider/index.js +25 -0
- package/esm/ThemeProvider/ThemeProvider.js +6 -1
- package/esm/index.js +2 -0
- package/index.js +20 -1
- package/legacy/RtlProvider/index.js +22 -0
- package/legacy/ThemeProvider/ThemeProvider.js +6 -1
- package/legacy/index.js +3 -1
- package/modern/RtlProvider/index.js +25 -0
- package/modern/ThemeProvider/ThemeProvider.js +6 -1
- package/modern/index.js +3 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,97 @@
|
|
|
1
1
|
# [Versions](https://mui.com/versions/)
|
|
2
2
|
|
|
3
|
+
## v5.15.13
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v5.15.12..master -->
|
|
6
|
+
|
|
7
|
+
_Mar 12, 2024_
|
|
8
|
+
|
|
9
|
+
A big thanks to the 15 contributors who made this release possible. Here are some highights ✨
|
|
10
|
+
|
|
11
|
+
- The Material UI free Checkout template got a design uplift (#41447) @zanivan
|
|
12
|
+
|
|
13
|
+
### `@mui/material@5.15.13`
|
|
14
|
+
|
|
15
|
+
- [Alert] Add `slots` and `slotProps` type to theme (#41324) @sai6855
|
|
16
|
+
- [Autocomplete] Fix the options list being added to the DOM in `freeSolo` mode even when there are no options, causing style problems (#41300) @rakeshmusturi
|
|
17
|
+
- Add `paperChannel` token (#41447) @siriwatknp
|
|
18
|
+
- [Switch] Convert to support CSS extraction (#41367) @alexfauquette
|
|
19
|
+
- [Tooltip] Support event handlers with extra parameters (#41320) @LukasTy
|
|
20
|
+
|
|
21
|
+
### `@mui/system@5.15.13`
|
|
22
|
+
|
|
23
|
+
- [RtlProvider] Add component & hook (#41241) @mnajdova
|
|
24
|
+
|
|
25
|
+
### `@mui/utils@5.15.13`
|
|
26
|
+
|
|
27
|
+
- [utils] Fix visually hidden styles' margin unit (#41477) @michaldudak
|
|
28
|
+
|
|
29
|
+
### `@mui/codemod@5.15.13`
|
|
30
|
+
|
|
31
|
+
- Fix merging of slotProps and componentProps (#41323) @sai6855
|
|
32
|
+
|
|
33
|
+
### `@mui/base@5.0.0-beta.39`
|
|
34
|
+
|
|
35
|
+
- [material-ui][joy-ui][Autocomplete] Keep in sync highlighted index when the option still exists (#41306) @CGNonofr
|
|
36
|
+
- [FormControl] Export `FormControlOwnerState` type from index (#41287) @michaeldfoley
|
|
37
|
+
- [material-ui][TextareaAutosize] Fix inline style not getting applied (#41369) @ZeeshanTamboli
|
|
38
|
+
|
|
39
|
+
### `@pigment-css/react@0.0.2`
|
|
40
|
+
|
|
41
|
+
- Handle more scenarios while transforming sx prop (#41372) @brijeshb42
|
|
42
|
+
- Improve testing of fixtures (#41389) @brijeshb42
|
|
43
|
+
- Fix `keyframes` serialize styles error (#41395) @siriwatknp
|
|
44
|
+
- Use class selector instead of class value (#41442) @brijeshb42
|
|
45
|
+
- [next] Warn about unsupported turbo mode in Next.js (#41445) @brijeshb42
|
|
46
|
+
|
|
47
|
+
### Docs
|
|
48
|
+
|
|
49
|
+
- [material-ui] Refine checkout template (#40967) @zanivan
|
|
50
|
+
- [material-ui] Add docs for complementary List components (#41329) @anle9650
|
|
51
|
+
- [material-ui] Add docs for complementary Dialog components (#41313) @jwithington
|
|
52
|
+
- [material-ui] Fix Templates live preview link (#41467) @danilo-leal
|
|
53
|
+
- [material-ui] Polish out the templates page (#41468) @zanivan
|
|
54
|
+
- [material-ui] Adjust the Templates card design (#41450) @danilo-leal
|
|
55
|
+
- [joy-ui] Remove unnecessary styles in color inversion footer demo (#41419) @cipherlogs
|
|
56
|
+
- [joy-ui] Update case studies chip background color (#41413) @cipherlogs
|
|
57
|
+
- [joy-ui] Remove wrong CSS prop from the Sign-in-side template (#41383) @cipherlogs
|
|
58
|
+
- [joy-ui] Fix broken link on the Color Inversion page (#41407) @cipherlogs
|
|
59
|
+
- [pigment] Add example and guide section (#41249) @siriwatknp
|
|
60
|
+
- [pigment-css] Brand name nonbreaking space (#41438) @oliviertassinari
|
|
61
|
+
- [pigment-css] Fix import on the README (#41411) @danilo-leal
|
|
62
|
+
- [pigment-css] Edit starter template links on README (#41409) @danilo-leal
|
|
63
|
+
- [pigment-css] Tweak the examples and edit READMEs (#41408) @danilo-leal
|
|
64
|
+
- [pigment-css] Adjust the bit about CSS vars on the README (#41463) @danilo-leal
|
|
65
|
+
- Finish brand name fixes #41438 @oliviertassinari
|
|
66
|
+
- Remove noreferrer @oliviertassinari
|
|
67
|
+
- Fix v4 docs <b> appearing in notifications (#41390) @peterwangsc
|
|
68
|
+
- Update GitHub project links (#41370) @danilo-leal
|
|
69
|
+
|
|
70
|
+
### Core
|
|
71
|
+
|
|
72
|
+
- [pigment] Make all Pigment CSS packages public (#41404) @brijeshb42
|
|
73
|
+
- [pigment] Rename directories to match package names (#41453) @brijeshb42
|
|
74
|
+
- [pigment-css] Example fix leading spaces (#41439) @oliviertassinari
|
|
75
|
+
- [code-infra] Add short note about e2e-website workflow schedule (#41355) @Janpot
|
|
76
|
+
- [code-infra] Add alias for icon types (#41248) @Janpot
|
|
77
|
+
- [code-infra] Reduce concurrency of typescript:ci further (#41392) @Janpot
|
|
78
|
+
- [code-infra] Reduce concurrency for test_types ci job (#41385) @Janpot
|
|
79
|
+
- [code-infra] Adapt API code generator to Base UI repo needs (#41475) @michaldudak
|
|
80
|
+
- [docs-infra] Don't generate preview files for the templates (#41379) @mnajdova
|
|
81
|
+
- [docs-infra] Fix pigment css apps path in the render mui demos script (#41476) @mnajdova
|
|
82
|
+
- [docs-infra] move feedback to ESM (#41381) @alexfauquette
|
|
83
|
+
- [docs-infra] Improve color contrast throughout (#41387) @danilo-leal
|
|
84
|
+
- [docs-infra] Simplify Algolia crawler config (#41312) @oliviertassinari
|
|
85
|
+
- [docs-infra] Adjust the tabs and layout selection design (#41084) @danilo-leal
|
|
86
|
+
- [blog] Update the Base UI post with links to dedicated repo (#41358) @danilo-leal
|
|
87
|
+
- [website] Update the Careers page role (#41384) @danilo-leal
|
|
88
|
+
- [website] Compress about images @oliviertassinari
|
|
89
|
+
- [website] Improve color contrast on the homepage (#41465) @danilo-leal
|
|
90
|
+
- [examples] Add pigment-css-vite-ts starter example (#41196) @siriwatknp
|
|
91
|
+
- [examples] Add pigment-css-nextjs-ts starter project (#41105) @siriwatknp
|
|
92
|
+
|
|
93
|
+
All contributors of this release in alphabetical order: @alexfauquette, @brijeshb42, @CGNonofr, @cipherlogs, @danilo-leal, @Janpot, @michaeldfoley, @mnajdova, @oliviertassinari, @peterwangsc, @rakeshmusturi, @sai6855, @siriwatknp, @zanivan, @ZeeshanTamboli
|
|
94
|
+
|
|
3
95
|
## v5.15.12
|
|
4
96
|
|
|
5
97
|
<!-- generated comparing v5.15.11..master -->
|
|
@@ -9,6 +101,10 @@ _Mar 5, 2024_
|
|
|
9
101
|
A big thanks to the 21 contributors who made this release possible.
|
|
10
102
|
This release was mostly about 🐛 bug fixes and 📚 documentation improvements.
|
|
11
103
|
|
|
104
|
+
### `@pigment-css/react@0.0.1`, `@pigment-css/nextjs-plugin@0.0.1`, `@pigment-css/vite-plugin@0.0.1`, & `@pigment-css/unplugin@0.0.1`
|
|
105
|
+
|
|
106
|
+
- This is the first public release of our new zero-runtime CSS-in-JS library, Pigment CSS.
|
|
107
|
+
|
|
12
108
|
### `@mui/material@5.15.12`
|
|
13
109
|
|
|
14
110
|
- ​<!-- 52 -->Support props callback type in theme variants (#40946) @ZeeshanTamboli
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.useRtl = exports.default = void 0;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
10
|
+
var React = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
const _excluded = ["value"];
|
|
14
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
15
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
16
|
+
const RtlContext = /*#__PURE__*/React.createContext();
|
|
17
|
+
function RtlProvider(_ref) {
|
|
18
|
+
let {
|
|
19
|
+
value
|
|
20
|
+
} = _ref,
|
|
21
|
+
props = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded);
|
|
22
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(RtlContext.Provider, (0, _extends2.default)({
|
|
23
|
+
value: value != null ? value : true
|
|
24
|
+
}, props));
|
|
25
|
+
}
|
|
26
|
+
process.env.NODE_ENV !== "production" ? RtlProvider.propTypes = {
|
|
27
|
+
children: _propTypes.default.node,
|
|
28
|
+
value: _propTypes.default.bool
|
|
29
|
+
} : void 0;
|
|
30
|
+
const useRtl = () => {
|
|
31
|
+
const value = React.useContext(RtlContext);
|
|
32
|
+
return value != null ? value : false;
|
|
33
|
+
};
|
|
34
|
+
exports.useRtl = useRtl;
|
|
35
|
+
var _default = exports.default = RtlProvider;
|
|
@@ -13,6 +13,7 @@ var _privateTheming = require("@mui/private-theming");
|
|
|
13
13
|
var _exactProp = _interopRequireDefault(require("@mui/utils/exactProp"));
|
|
14
14
|
var _styledEngine = require("@mui/styled-engine");
|
|
15
15
|
var _useThemeWithoutDefault = _interopRequireDefault(require("../useThemeWithoutDefault"));
|
|
16
|
+
var _RtlProvider = _interopRequireDefault(require("../RtlProvider"));
|
|
16
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
18
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
18
19
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -60,11 +61,15 @@ function ThemeProvider(props) {
|
|
|
60
61
|
}
|
|
61
62
|
const engineTheme = useThemeScoping(themeId, upperTheme, localTheme);
|
|
62
63
|
const privateTheme = useThemeScoping(themeId, upperPrivateTheme, localTheme, true);
|
|
64
|
+
const rtlValue = engineTheme.direction === 'rtl';
|
|
63
65
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_privateTheming.ThemeProvider, {
|
|
64
66
|
theme: privateTheme,
|
|
65
67
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_styledEngine.ThemeContext.Provider, {
|
|
66
68
|
value: engineTheme,
|
|
67
|
-
children:
|
|
69
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_RtlProvider.default, {
|
|
70
|
+
value: rtlValue,
|
|
71
|
+
children: children
|
|
72
|
+
})
|
|
68
73
|
})
|
|
69
74
|
});
|
|
70
75
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
const _excluded = ["value"];
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import PropTypes from 'prop-types';
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
const RtlContext = /*#__PURE__*/React.createContext();
|
|
8
|
+
function RtlProvider(_ref) {
|
|
9
|
+
let {
|
|
10
|
+
value
|
|
11
|
+
} = _ref,
|
|
12
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
13
|
+
return /*#__PURE__*/_jsx(RtlContext.Provider, _extends({
|
|
14
|
+
value: value != null ? value : true
|
|
15
|
+
}, props));
|
|
16
|
+
}
|
|
17
|
+
process.env.NODE_ENV !== "production" ? RtlProvider.propTypes = {
|
|
18
|
+
children: PropTypes.node,
|
|
19
|
+
value: PropTypes.bool
|
|
20
|
+
} : void 0;
|
|
21
|
+
export const useRtl = () => {
|
|
22
|
+
const value = React.useContext(RtlContext);
|
|
23
|
+
return value != null ? value : false;
|
|
24
|
+
};
|
|
25
|
+
export default RtlProvider;
|
|
@@ -7,6 +7,7 @@ import { ThemeProvider as MuiThemeProvider, useTheme as usePrivateTheme } from '
|
|
|
7
7
|
import exactProp from '@mui/utils/exactProp';
|
|
8
8
|
import { ThemeContext as StyledEngineThemeContext } from '@mui/styled-engine';
|
|
9
9
|
import useThemeWithoutDefault from '../useThemeWithoutDefault';
|
|
10
|
+
import RtlProvider from '../RtlProvider';
|
|
10
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
12
|
const EMPTY_THEME = {};
|
|
12
13
|
function useThemeScoping(themeId, upperTheme, localTheme, isPrivate = false) {
|
|
@@ -52,11 +53,15 @@ function ThemeProvider(props) {
|
|
|
52
53
|
}
|
|
53
54
|
const engineTheme = useThemeScoping(themeId, upperTheme, localTheme);
|
|
54
55
|
const privateTheme = useThemeScoping(themeId, upperPrivateTheme, localTheme, true);
|
|
56
|
+
const rtlValue = engineTheme.direction === 'rtl';
|
|
55
57
|
return /*#__PURE__*/_jsx(MuiThemeProvider, {
|
|
56
58
|
theme: privateTheme,
|
|
57
59
|
children: /*#__PURE__*/_jsx(StyledEngineThemeContext.Provider, {
|
|
58
60
|
value: engineTheme,
|
|
59
|
-
children:
|
|
61
|
+
children: /*#__PURE__*/_jsx(RtlProvider, {
|
|
62
|
+
value: rtlValue,
|
|
63
|
+
children: children
|
|
64
|
+
})
|
|
60
65
|
})
|
|
61
66
|
});
|
|
62
67
|
}
|
package/esm/index.js
CHANGED
|
@@ -51,6 +51,8 @@ export { default as unstable_cssVarsParser } from './cssVars/cssVarsParser';
|
|
|
51
51
|
export { default as unstable_prepareCssVars } from './cssVars/prepareCssVars';
|
|
52
52
|
export { default as unstable_createCssVarsTheme } from './cssVars/createCssVarsTheme';
|
|
53
53
|
export { default as responsivePropType } from './responsivePropType';
|
|
54
|
+
export { default as RtlProvider } from './RtlProvider';
|
|
55
|
+
export * from './RtlProvider';
|
|
54
56
|
|
|
55
57
|
/** ----------------- */
|
|
56
58
|
/** Layout components */
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/system v5.15.
|
|
2
|
+
* @mui/system v5.15.13
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
@@ -60,6 +60,7 @@ var _exportNames = {
|
|
|
60
60
|
unstable_prepareCssVars: true,
|
|
61
61
|
unstable_createCssVarsTheme: true,
|
|
62
62
|
responsivePropType: true,
|
|
63
|
+
RtlProvider: true,
|
|
63
64
|
createContainer: true,
|
|
64
65
|
Container: true,
|
|
65
66
|
Unstable_Grid: true,
|
|
@@ -83,6 +84,12 @@ Object.defineProperty(exports, "GlobalStyles", {
|
|
|
83
84
|
return _GlobalStyles.default;
|
|
84
85
|
}
|
|
85
86
|
});
|
|
87
|
+
Object.defineProperty(exports, "RtlProvider", {
|
|
88
|
+
enumerable: true,
|
|
89
|
+
get: function () {
|
|
90
|
+
return _RtlProvider.default;
|
|
91
|
+
}
|
|
92
|
+
});
|
|
86
93
|
Object.defineProperty(exports, "Stack", {
|
|
87
94
|
enumerable: true,
|
|
88
95
|
get: function () {
|
|
@@ -520,6 +527,18 @@ var _cssVarsParser = _interopRequireDefault(require("./cssVars/cssVarsParser"));
|
|
|
520
527
|
var _prepareCssVars = _interopRequireDefault(require("./cssVars/prepareCssVars"));
|
|
521
528
|
var _createCssVarsTheme = _interopRequireDefault(require("./cssVars/createCssVarsTheme"));
|
|
522
529
|
var _responsivePropType = _interopRequireDefault(require("./responsivePropType"));
|
|
530
|
+
var _RtlProvider = _interopRequireWildcard(require("./RtlProvider"));
|
|
531
|
+
Object.keys(_RtlProvider).forEach(function (key) {
|
|
532
|
+
if (key === "default" || key === "__esModule") return;
|
|
533
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
534
|
+
if (key in exports && exports[key] === _RtlProvider[key]) return;
|
|
535
|
+
Object.defineProperty(exports, key, {
|
|
536
|
+
enumerable: true,
|
|
537
|
+
get: function () {
|
|
538
|
+
return _RtlProvider[key];
|
|
539
|
+
}
|
|
540
|
+
});
|
|
541
|
+
});
|
|
523
542
|
var _createContainer = _interopRequireDefault(require("./Container/createContainer"));
|
|
524
543
|
var _Container = _interopRequireWildcard(require("./Container"));
|
|
525
544
|
Object.keys(_Container).forEach(function (key) {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
var RtlContext = /*#__PURE__*/React.createContext();
|
|
7
|
+
function RtlProvider(_ref) {
|
|
8
|
+
var value = _ref.value,
|
|
9
|
+
props = _objectWithoutProperties(_ref, ["value"]);
|
|
10
|
+
return /*#__PURE__*/_jsx(RtlContext.Provider, _extends({
|
|
11
|
+
value: value != null ? value : true
|
|
12
|
+
}, props));
|
|
13
|
+
}
|
|
14
|
+
process.env.NODE_ENV !== "production" ? RtlProvider.propTypes = {
|
|
15
|
+
children: PropTypes.node,
|
|
16
|
+
value: PropTypes.bool
|
|
17
|
+
} : void 0;
|
|
18
|
+
export var useRtl = function useRtl() {
|
|
19
|
+
var value = React.useContext(RtlContext);
|
|
20
|
+
return value != null ? value : false;
|
|
21
|
+
};
|
|
22
|
+
export default RtlProvider;
|
|
@@ -8,6 +8,7 @@ import { ThemeProvider as MuiThemeProvider, useTheme as usePrivateTheme } from '
|
|
|
8
8
|
import exactProp from '@mui/utils/exactProp';
|
|
9
9
|
import { ThemeContext as StyledEngineThemeContext } from '@mui/styled-engine';
|
|
10
10
|
import useThemeWithoutDefault from '../useThemeWithoutDefault';
|
|
11
|
+
import RtlProvider from '../RtlProvider';
|
|
11
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
13
|
var EMPTY_THEME = {};
|
|
13
14
|
function useThemeScoping(themeId, upperTheme, localTheme) {
|
|
@@ -50,11 +51,15 @@ function ThemeProvider(props) {
|
|
|
50
51
|
}
|
|
51
52
|
var engineTheme = useThemeScoping(themeId, upperTheme, localTheme);
|
|
52
53
|
var privateTheme = useThemeScoping(themeId, upperPrivateTheme, localTheme, true);
|
|
54
|
+
var rtlValue = engineTheme.direction === 'rtl';
|
|
53
55
|
return /*#__PURE__*/_jsx(MuiThemeProvider, {
|
|
54
56
|
theme: privateTheme,
|
|
55
57
|
children: /*#__PURE__*/_jsx(StyledEngineThemeContext.Provider, {
|
|
56
58
|
value: engineTheme,
|
|
57
|
-
children:
|
|
59
|
+
children: /*#__PURE__*/_jsx(RtlProvider, {
|
|
60
|
+
value: rtlValue,
|
|
61
|
+
children: children
|
|
62
|
+
})
|
|
58
63
|
})
|
|
59
64
|
});
|
|
60
65
|
}
|
package/legacy/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/system v5.15.
|
|
2
|
+
* @mui/system v5.15.13
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
@@ -58,6 +58,8 @@ export { default as unstable_cssVarsParser } from './cssVars/cssVarsParser';
|
|
|
58
58
|
export { default as unstable_prepareCssVars } from './cssVars/prepareCssVars';
|
|
59
59
|
export { default as unstable_createCssVarsTheme } from './cssVars/createCssVarsTheme';
|
|
60
60
|
export { default as responsivePropType } from './responsivePropType';
|
|
61
|
+
export { default as RtlProvider } from './RtlProvider';
|
|
62
|
+
export * from './RtlProvider';
|
|
61
63
|
|
|
62
64
|
/** ----------------- */
|
|
63
65
|
/** Layout components */
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
const _excluded = ["value"];
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import PropTypes from 'prop-types';
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
const RtlContext = /*#__PURE__*/React.createContext();
|
|
8
|
+
function RtlProvider(_ref) {
|
|
9
|
+
let {
|
|
10
|
+
value
|
|
11
|
+
} = _ref,
|
|
12
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
13
|
+
return /*#__PURE__*/_jsx(RtlContext.Provider, _extends({
|
|
14
|
+
value: value ?? true
|
|
15
|
+
}, props));
|
|
16
|
+
}
|
|
17
|
+
process.env.NODE_ENV !== "production" ? RtlProvider.propTypes = {
|
|
18
|
+
children: PropTypes.node,
|
|
19
|
+
value: PropTypes.bool
|
|
20
|
+
} : void 0;
|
|
21
|
+
export const useRtl = () => {
|
|
22
|
+
const value = React.useContext(RtlContext);
|
|
23
|
+
return value ?? false;
|
|
24
|
+
};
|
|
25
|
+
export default RtlProvider;
|
|
@@ -7,6 +7,7 @@ import { ThemeProvider as MuiThemeProvider, useTheme as usePrivateTheme } from '
|
|
|
7
7
|
import exactProp from '@mui/utils/exactProp';
|
|
8
8
|
import { ThemeContext as StyledEngineThemeContext } from '@mui/styled-engine';
|
|
9
9
|
import useThemeWithoutDefault from '../useThemeWithoutDefault';
|
|
10
|
+
import RtlProvider from '../RtlProvider';
|
|
10
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
12
|
const EMPTY_THEME = {};
|
|
12
13
|
function useThemeScoping(themeId, upperTheme, localTheme, isPrivate = false) {
|
|
@@ -52,11 +53,15 @@ function ThemeProvider(props) {
|
|
|
52
53
|
}
|
|
53
54
|
const engineTheme = useThemeScoping(themeId, upperTheme, localTheme);
|
|
54
55
|
const privateTheme = useThemeScoping(themeId, upperPrivateTheme, localTheme, true);
|
|
56
|
+
const rtlValue = engineTheme.direction === 'rtl';
|
|
55
57
|
return /*#__PURE__*/_jsx(MuiThemeProvider, {
|
|
56
58
|
theme: privateTheme,
|
|
57
59
|
children: /*#__PURE__*/_jsx(StyledEngineThemeContext.Provider, {
|
|
58
60
|
value: engineTheme,
|
|
59
|
-
children:
|
|
61
|
+
children: /*#__PURE__*/_jsx(RtlProvider, {
|
|
62
|
+
value: rtlValue,
|
|
63
|
+
children: children
|
|
64
|
+
})
|
|
60
65
|
})
|
|
61
66
|
});
|
|
62
67
|
}
|
package/modern/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/system v5.15.
|
|
2
|
+
* @mui/system v5.15.13
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
@@ -58,6 +58,8 @@ export { default as unstable_cssVarsParser } from './cssVars/cssVarsParser';
|
|
|
58
58
|
export { default as unstable_prepareCssVars } from './cssVars/prepareCssVars';
|
|
59
59
|
export { default as unstable_createCssVarsTheme } from './cssVars/createCssVarsTheme';
|
|
60
60
|
export { default as responsivePropType } from './responsivePropType';
|
|
61
|
+
export { default as RtlProvider } from './RtlProvider';
|
|
62
|
+
export * from './RtlProvider';
|
|
61
63
|
|
|
62
64
|
/** ----------------- */
|
|
63
65
|
/** Layout components */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/system",
|
|
3
|
-
"version": "5.15.
|
|
3
|
+
"version": "5.15.13",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"description": "MUI System is a set of CSS utilities to help you build custom designs more efficiently. It makes it possible to rapidly lay out custom designs.",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"clsx": "^2.1.0",
|
|
31
31
|
"csstype": "^3.1.3",
|
|
32
32
|
"prop-types": "^15.8.1",
|
|
33
|
-
"@mui/
|
|
34
|
-
"@mui/private-theming": "^5.15.12",
|
|
33
|
+
"@mui/private-theming": "^5.15.13",
|
|
35
34
|
"@mui/types": "^7.2.13",
|
|
35
|
+
"@mui/utils": "^5.15.13",
|
|
36
36
|
"@mui/styled-engine": "^5.15.11"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|