@mui/system 6.0.0-alpha.0 → 6.0.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/CHANGELOG.md +243 -4
  2. package/Container/Container.d.ts +1 -1
  3. package/Stack/Stack.d.ts +1 -1
  4. package/Stack/createStack.d.ts +1 -1
  5. package/Unstable_Grid/Grid.d.ts +1 -1
  6. package/Unstable_Grid/createGrid.d.ts +1 -1
  7. package/breakpoints/breakpoints.js +19 -1
  8. package/createTheme/createSpacing.d.ts +2 -2
  9. package/createTheme/createSpacing.js +7 -8
  10. package/createTheme/createTheme.d.ts +2 -1
  11. package/createTheme/createTheme.js +2 -0
  12. package/cssContainerQueries/cssContainerQueries.d.ts +24 -0
  13. package/cssContainerQueries/cssContainerQueries.js +68 -0
  14. package/cssContainerQueries/index.d.ts +3 -0
  15. package/cssContainerQueries/index.js +2 -0
  16. package/cssContainerQueries/package.json +6 -0
  17. package/cssVars/createCssVarsProvider.js +3 -0
  18. package/cssVars/cssVarsParser.d.ts +1 -1
  19. package/cssVars/cssVarsParser.js +3 -2
  20. package/index.d.ts +2 -0
  21. package/index.js +2 -1
  22. package/modern/breakpoints/breakpoints.js +19 -1
  23. package/modern/createTheme/createSpacing.js +7 -8
  24. package/modern/createTheme/createTheme.js +2 -0
  25. package/modern/cssContainerQueries/cssContainerQueries.js +68 -0
  26. package/modern/cssContainerQueries/index.js +2 -0
  27. package/modern/cssVars/createCssVarsProvider.js +3 -0
  28. package/modern/cssVars/cssVarsParser.js +3 -2
  29. package/modern/index.js +2 -1
  30. package/modern/spacing/spacing.js +24 -21
  31. package/modern/styleFunctionSx/styleFunctionSx.js +2 -1
  32. package/node/breakpoints/breakpoints.js +19 -1
  33. package/node/createTheme/createSpacing.js +7 -8
  34. package/node/createTheme/createTheme.js +2 -0
  35. package/node/cssContainerQueries/cssContainerQueries.js +79 -0
  36. package/node/cssContainerQueries/index.js +32 -0
  37. package/node/cssVars/createCssVarsProvider.js +3 -0
  38. package/node/cssVars/cssVarsParser.js +3 -2
  39. package/node/index.js +9 -1
  40. package/node/spacing/spacing.js +24 -21
  41. package/node/styleFunctionSx/styleFunctionSx.js +2 -1
  42. package/package.json +5 -5
  43. package/spacing/spacing.js +24 -21
  44. package/styleFunctionSx/styleFunctionSx.js +2 -1
  45. package/legacy/Box/Box.js +0 -30
  46. package/legacy/Box/boxClasses.js +0 -3
  47. package/legacy/Box/index.js +0 -5
  48. package/legacy/Container/Container.js +0 -61
  49. package/legacy/Container/ContainerProps.js +0 -1
  50. package/legacy/Container/containerClasses.js +0 -7
  51. package/legacy/Container/createContainer.js +0 -140
  52. package/legacy/Container/index.js +0 -5
  53. package/legacy/GlobalStyles/GlobalStyles.js +0 -37
  54. package/legacy/GlobalStyles/index.js +0 -4
  55. package/legacy/RtlProvider/index.js +0 -22
  56. package/legacy/Stack/Stack.js +0 -62
  57. package/legacy/Stack/StackProps.js +0 -1
  58. package/legacy/Stack/createStack.js +0 -180
  59. package/legacy/Stack/index.js +0 -7
  60. package/legacy/Stack/stackClasses.js +0 -7
  61. package/legacy/ThemeProvider/ThemeProvider.js +0 -87
  62. package/legacy/ThemeProvider/index.js +0 -3
  63. package/legacy/Unstable_Grid/Grid.js +0 -177
  64. package/legacy/Unstable_Grid/GridProps.js +0 -1
  65. package/legacy/Unstable_Grid/createGrid.js +0 -184
  66. package/legacy/Unstable_Grid/gridClasses.js +0 -28
  67. package/legacy/Unstable_Grid/gridGenerator.js +0 -216
  68. package/legacy/Unstable_Grid/index.js +0 -8
  69. package/legacy/Unstable_Grid/traverseBreakpoints.js +0 -48
  70. package/legacy/borders/borders.js +0 -51
  71. package/legacy/borders/index.js +0 -4
  72. package/legacy/breakpoints/breakpoints.js +0 -162
  73. package/legacy/breakpoints/index.js +0 -4
  74. package/legacy/colorManipulator/colorManipulator.js +0 -356
  75. package/legacy/colorManipulator/index.js +0 -3
  76. package/legacy/compose/compose.js +0 -32
  77. package/legacy/compose/index.js +0 -3
  78. package/legacy/createBox/createBox.js +0 -38
  79. package/legacy/createBox/index.js +0 -3
  80. package/legacy/createStyled/createStyled.js +0 -250
  81. package/legacy/createStyled/index.js +0 -4
  82. package/legacy/createTheme/applyStyles.js +0 -73
  83. package/legacy/createTheme/createBreakpoints.js +0 -83
  84. package/legacy/createTheme/createSpacing.js +0 -36
  85. package/legacy/createTheme/createTheme.js +0 -49
  86. package/legacy/createTheme/index.js +0 -3
  87. package/legacy/createTheme/shape.js +0 -4
  88. package/legacy/cssGrid/cssGrid.js +0 -91
  89. package/legacy/cssGrid/index.js +0 -4
  90. package/legacy/cssVars/createCssVarsProvider.js +0 -335
  91. package/legacy/cssVars/createCssVarsTheme.js +0 -13
  92. package/legacy/cssVars/createGetCssVar.js +0 -30
  93. package/legacy/cssVars/cssVarsParser.js +0 -140
  94. package/legacy/cssVars/getInitColorSchemeScript.js +0 -28
  95. package/legacy/cssVars/index.js +0 -6
  96. package/legacy/cssVars/prepareCssVars.js +0 -92
  97. package/legacy/cssVars/useCurrentColorScheme.js +0 -237
  98. package/legacy/display/display.js +0 -29
  99. package/legacy/display/index.js +0 -4
  100. package/legacy/flexbox/flexbox.js +0 -43
  101. package/legacy/flexbox/index.js +0 -4
  102. package/legacy/getThemeValue/getThemeValue.js +0 -47
  103. package/legacy/getThemeValue/index.js +0 -4
  104. package/legacy/index.js +0 -72
  105. package/legacy/memoize/index.js +0 -3
  106. package/legacy/memoize/memoize.js +0 -9
  107. package/legacy/merge/index.js +0 -3
  108. package/legacy/merge/merge.js +0 -10
  109. package/legacy/palette/index.js +0 -4
  110. package/legacy/palette/palette.js +0 -26
  111. package/legacy/positions/index.js +0 -4
  112. package/legacy/positions/positions.js +0 -22
  113. package/legacy/propsToClassKey/index.js +0 -3
  114. package/legacy/propsToClassKey/propsToClassKey.js +0 -24
  115. package/legacy/responsivePropType/index.js +0 -3
  116. package/legacy/responsivePropType/responsivePropType.js +0 -3
  117. package/legacy/shadows/index.js +0 -3
  118. package/legacy/shadows/shadows.js +0 -6
  119. package/legacy/sizing/index.js +0 -4
  120. package/legacy/sizing/sizing.js +0 -65
  121. package/legacy/spacing/index.js +0 -4
  122. package/legacy/spacing/spacing.js +0 -158
  123. package/legacy/style/index.js +0 -4
  124. package/legacy/style/style.js +0 -73
  125. package/legacy/styleFunctionSx/defaultSxConfig.js +0 -293
  126. package/legacy/styleFunctionSx/extendSxProp.js +0 -45
  127. package/legacy/styleFunctionSx/index.js +0 -4
  128. package/legacy/styleFunctionSx/styleFunctionSx.js +0 -126
  129. package/legacy/styled/index.js +0 -3
  130. package/legacy/styled/styled.js +0 -3
  131. package/legacy/typography/index.js +0 -4
  132. package/legacy/typography/typography.js +0 -37
  133. package/legacy/useMediaQuery/index.js +0 -2
  134. package/legacy/useMediaQuery/useMediaQuery.js +0 -145
  135. package/legacy/useTheme/index.js +0 -4
  136. package/legacy/useTheme/useTheme.js +0 -10
  137. package/legacy/useThemeProps/getThemeProps.js +0 -10
  138. package/legacy/useThemeProps/index.js +0 -4
  139. package/legacy/useThemeProps/useThemeProps.js +0 -20
  140. package/legacy/useThemeWithoutDefault/index.js +0 -3
  141. package/legacy/useThemeWithoutDefault/useThemeWithoutDefault.js +0 -13
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/system",
3
- "version": "6.0.0-alpha.0",
3
+ "version": "6.0.0-alpha.3",
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.",
@@ -26,14 +26,14 @@
26
26
  "url": "https://opencollective.com/mui-org"
27
27
  },
28
28
  "dependencies": {
29
- "@babel/runtime": "^7.23.9",
29
+ "@babel/runtime": "^7.24.4",
30
30
  "clsx": "^2.1.0",
31
31
  "csstype": "^3.1.3",
32
32
  "prop-types": "^15.8.1",
33
- "@mui/utils": "^5.15.14",
34
- "@mui/private-theming": "^5.15.14",
33
+ "@mui/private-theming": "^6.0.0-alpha.3",
34
+ "@mui/styled-engine": "^6.0.0-alpha.3",
35
35
  "@mui/types": "^7.2.14",
36
- "@mui/styled-engine": "^6.0.0-alpha.0"
36
+ "@mui/utils": "^6.0.0-alpha.3"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "@emotion/react": "^11.5.0",
@@ -43,25 +43,29 @@ export const marginKeys = ['m', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'margin', 'm
43
43
  export const paddingKeys = ['p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'paddingX', 'paddingY', 'paddingInline', 'paddingInlineStart', 'paddingInlineEnd', 'paddingBlock', 'paddingBlockStart', 'paddingBlockEnd'];
44
44
  const spacingKeys = [...marginKeys, ...paddingKeys];
45
45
  export function createUnaryUnit(theme, themeKey, defaultValue, propName) {
46
- const themeSpacing = getPath(theme, themeKey, false) ?? defaultValue;
47
- if (typeof themeSpacing === 'number') {
48
- return abs => {
49
- if (typeof abs === 'string') {
50
- return abs;
46
+ const themeSpacing = getPath(theme, themeKey, true) ?? defaultValue;
47
+ if (typeof themeSpacing === 'number' || typeof themeSpacing === 'string') {
48
+ return val => {
49
+ if (typeof val === 'string') {
50
+ return val;
51
51
  }
52
52
  if (process.env.NODE_ENV !== 'production') {
53
- if (typeof abs !== 'number') {
54
- console.error(`MUI: Expected ${propName} argument to be a number or a string, got ${abs}.`);
53
+ if (typeof val !== 'number') {
54
+ console.error(`MUI: Expected ${propName} argument to be a number or a string, got ${val}.`);
55
55
  }
56
56
  }
57
- return themeSpacing * abs;
57
+ if (typeof themeSpacing === 'string') {
58
+ return `calc(${val} * ${themeSpacing})`;
59
+ }
60
+ return themeSpacing * val;
58
61
  };
59
62
  }
60
63
  if (Array.isArray(themeSpacing)) {
61
- return abs => {
62
- if (typeof abs === 'string') {
63
- return abs;
64
+ return val => {
65
+ if (typeof val === 'string') {
66
+ return val;
64
67
  }
68
+ const abs = Math.abs(val);
65
69
  if (process.env.NODE_ENV !== 'production') {
66
70
  if (!Number.isInteger(abs)) {
67
71
  console.error([`MUI: The \`theme.${themeKey}\` array type cannot be combined with non integer values.` + `You should either use an integer value that can be used as index, or define the \`theme.${themeKey}\` as a number.`].join('\n'));
@@ -69,7 +73,14 @@ export function createUnaryUnit(theme, themeKey, defaultValue, propName) {
69
73
  console.error([`MUI: The value provided (${abs}) overflows.`, `The supported values are: ${JSON.stringify(themeSpacing)}.`, `${abs} > ${themeSpacing.length - 1}, you need to add the missing values.`].join('\n'));
70
74
  }
71
75
  }
72
- return themeSpacing[abs];
76
+ const transformed = themeSpacing[abs];
77
+ if (val >= 0) {
78
+ return transformed;
79
+ }
80
+ if (typeof transformed === 'number') {
81
+ return -transformed;
82
+ }
83
+ return `-${transformed}`;
73
84
  };
74
85
  }
75
86
  if (typeof themeSpacing === 'function') {
@@ -87,15 +98,7 @@ export function getValue(transformer, propValue) {
87
98
  if (typeof propValue === 'string' || propValue == null) {
88
99
  return propValue;
89
100
  }
90
- const abs = Math.abs(propValue);
91
- const transformed = transformer(abs);
92
- if (propValue >= 0) {
93
- return transformed;
94
- }
95
- if (typeof transformed === 'number') {
96
- return -transformed;
97
- }
98
- return `-${transformed}`;
101
+ return transformer(propValue);
99
102
  }
100
103
  export function getStyleFromPropValue(cssProperties, transformer) {
101
104
  return propValue => cssProperties.reduce((acc, cssProperty) => {
@@ -2,6 +2,7 @@ import capitalize from '@mui/utils/capitalize';
2
2
  import merge from '../merge';
3
3
  import { getPath, getStyleValue as getValue } from '../style';
4
4
  import { handleBreakpoints, createEmptyBreakpointObject, removeUnusedBreakpoints } from '../breakpoints';
5
+ import { sortContainerQueries } from '../cssContainerQueries';
5
6
  import defaultSxConfig from './defaultSxConfig';
6
7
  function objectsHaveSameKeys(...objects) {
7
8
  const allKeys = objects.reduce((keys, object) => keys.concat(Object.keys(object)), []);
@@ -115,7 +116,7 @@ export function unstable_createStyleFunctionSx() {
115
116
  }
116
117
  }
117
118
  });
118
- return removeUnusedBreakpoints(breakpointsKeys, css);
119
+ return sortContainerQueries(theme, removeUnusedBreakpoints(breakpointsKeys, css));
119
120
  }
120
121
  return Array.isArray(sx) ? sx.map(traverse) : traverse(sx);
121
122
  }
package/legacy/Box/Box.js DELETED
@@ -1,30 +0,0 @@
1
- 'use client';
2
-
3
- import PropTypes from 'prop-types';
4
- import ClassNameGenerator from '@mui/utils/ClassNameGenerator';
5
- import createBox from '../createBox';
6
- import boxClasses from './boxClasses';
7
- var Box = createBox({
8
- defaultClassName: boxClasses.root,
9
- generateClassName: ClassNameGenerator.generate
10
- });
11
- process.env.NODE_ENV !== "production" ? Box.propTypes /* remove-proptypes */ = {
12
- // ┌────────────────────────────── Warning ──────────────────────────────┐
13
- // │ These PropTypes are generated from the TypeScript type definitions. │
14
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
15
- // └─────────────────────────────────────────────────────────────────────┘
16
- /**
17
- * @ignore
18
- */
19
- children: PropTypes.node,
20
- /**
21
- * The component used for the root node.
22
- * Either a string to use a HTML element or a component.
23
- */
24
- component: PropTypes.elementType,
25
- /**
26
- * The system prop that allows defining system overrides as well as additional CSS styles.
27
- */
28
- sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
29
- } : void 0;
30
- export default Box;
@@ -1,3 +0,0 @@
1
- import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
2
- var boxClasses = generateUtilityClasses('MuiBox', ['root']);
3
- export default boxClasses;
@@ -1,5 +0,0 @@
1
- 'use client';
2
-
3
- export { default } from './Box';
4
- export { default as boxClasses } from './boxClasses';
5
- export * from './boxClasses';
@@ -1,61 +0,0 @@
1
- 'use client';
2
-
3
- import PropTypes from 'prop-types';
4
- import createContainer from './createContainer';
5
-
6
- /**
7
- *
8
- * Demos:
9
- *
10
- * - [Container (Material UI)](https://mui.com/material-ui/react-container/)
11
- * - [Container (MUI System)](https://mui.com/system/react-container/)
12
- *
13
- * API:
14
- *
15
- * - [Container API](https://mui.com/system/api/container/)
16
- */
17
- var Container = createContainer();
18
- process.env.NODE_ENV !== "production" ? Container.propTypes /* remove-proptypes */ = {
19
- // ┌────────────────────────────── Warning ──────────────────────────────┐
20
- // │ These PropTypes are generated from the TypeScript type definitions. │
21
- // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
22
- // └─────────────────────────────────────────────────────────────────────┘
23
- /**
24
- * @ignore
25
- */
26
- children: PropTypes.node,
27
- /**
28
- * Override or extend the styles applied to the component.
29
- */
30
- classes: PropTypes.object,
31
- /**
32
- * The component used for the root node.
33
- * Either a string to use a HTML element or a component.
34
- */
35
- component: PropTypes.elementType,
36
- /**
37
- * If `true`, the left and right padding is removed.
38
- * @default false
39
- */
40
- disableGutters: PropTypes.bool,
41
- /**
42
- * Set the max-width to match the min-width of the current breakpoint.
43
- * This is useful if you'd prefer to design for a fixed set of sizes
44
- * instead of trying to accommodate a fully fluid viewport.
45
- * It's fluid by default.
46
- * @default false
47
- */
48
- fixed: PropTypes.bool,
49
- /**
50
- * Determine the max-width of the container.
51
- * The container width grows with the size of the screen.
52
- * Set to `false` to disable `maxWidth`.
53
- * @default 'lg'
54
- */
55
- maxWidth: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl', false]), PropTypes.string]),
56
- /**
57
- * The system prop that allows defining system overrides as well as additional CSS styles.
58
- */
59
- sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
60
- } : void 0;
61
- export default Container;
@@ -1 +0,0 @@
1
- export {};
@@ -1,7 +0,0 @@
1
- import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
2
- import generateUtilityClass from '@mui/utils/generateUtilityClass';
3
- export function getContainerUtilityClass(slot) {
4
- return generateUtilityClass('MuiContainer', slot);
5
- }
6
- var containerClasses = generateUtilityClasses('MuiContainer', ['root', 'disableGutters', 'fixed', 'maxWidthXs', 'maxWidthSm', 'maxWidthMd', 'maxWidthLg', 'maxWidthXl']);
7
- export default containerClasses;
@@ -1,140 +0,0 @@
1
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
- import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
3
- import _extends from "@babel/runtime/helpers/esm/extends";
4
- import * as React from 'react';
5
- import PropTypes from 'prop-types';
6
- import clsx from 'clsx';
7
- import generateUtilityClass from '@mui/utils/generateUtilityClass';
8
- import composeClasses from '@mui/utils/composeClasses';
9
- import capitalize from '@mui/utils/capitalize';
10
- import useThemePropsSystem from '../useThemeProps';
11
- import systemStyled from '../styled';
12
- import createTheme from '../createTheme';
13
- import { jsx as _jsx } from "react/jsx-runtime";
14
- var defaultTheme = createTheme();
15
- var defaultCreateStyledComponent = systemStyled('div', {
16
- name: 'MuiContainer',
17
- slot: 'Root',
18
- overridesResolver: function overridesResolver(props, styles) {
19
- var ownerState = props.ownerState;
20
- return [styles.root, styles["maxWidth".concat(capitalize(String(ownerState.maxWidth)))], ownerState.fixed && styles.fixed, ownerState.disableGutters && styles.disableGutters];
21
- }
22
- });
23
- var useThemePropsDefault = function useThemePropsDefault(inProps) {
24
- return useThemePropsSystem({
25
- props: inProps,
26
- name: 'MuiContainer',
27
- defaultTheme: defaultTheme
28
- });
29
- };
30
- var useUtilityClasses = function useUtilityClasses(ownerState, componentName) {
31
- var getContainerUtilityClass = function getContainerUtilityClass(slot) {
32
- return generateUtilityClass(componentName, slot);
33
- };
34
- var classes = ownerState.classes,
35
- fixed = ownerState.fixed,
36
- disableGutters = ownerState.disableGutters,
37
- maxWidth = ownerState.maxWidth;
38
- var slots = {
39
- root: ['root', maxWidth && "maxWidth".concat(capitalize(String(maxWidth))), fixed && 'fixed', disableGutters && 'disableGutters']
40
- };
41
- return composeClasses(slots, getContainerUtilityClass, classes);
42
- };
43
- export default function createContainer() {
44
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
45
- var _options$createStyled = options.createStyledComponent,
46
- createStyledComponent = _options$createStyled === void 0 ? defaultCreateStyledComponent : _options$createStyled,
47
- _options$useThemeProp = options.useThemeProps,
48
- useThemeProps = _options$useThemeProp === void 0 ? useThemePropsDefault : _options$useThemeProp,
49
- _options$componentNam = options.componentName,
50
- componentName = _options$componentNam === void 0 ? 'MuiContainer' : _options$componentNam;
51
- var ContainerRoot = createStyledComponent(function (_ref) {
52
- var theme = _ref.theme,
53
- ownerState = _ref.ownerState;
54
- return _extends({
55
- width: '100%',
56
- marginLeft: 'auto',
57
- boxSizing: 'border-box',
58
- marginRight: 'auto',
59
- display: 'block'
60
- }, !ownerState.disableGutters && _defineProperty({
61
- paddingLeft: theme.spacing(2),
62
- paddingRight: theme.spacing(2)
63
- }, theme.breakpoints.up('sm'), {
64
- paddingLeft: theme.spacing(3),
65
- paddingRight: theme.spacing(3)
66
- }));
67
- }, function (_ref3) {
68
- var theme = _ref3.theme,
69
- ownerState = _ref3.ownerState;
70
- return ownerState.fixed && Object.keys(theme.breakpoints.values).reduce(function (acc, breakpointValueKey) {
71
- var breakpoint = breakpointValueKey;
72
- var value = theme.breakpoints.values[breakpoint];
73
- if (value !== 0) {
74
- // @ts-ignore
75
- acc[theme.breakpoints.up(breakpoint)] = {
76
- maxWidth: "".concat(value).concat(theme.breakpoints.unit)
77
- };
78
- }
79
- return acc;
80
- }, {});
81
- }, function (_ref4) {
82
- var theme = _ref4.theme,
83
- ownerState = _ref4.ownerState;
84
- return _extends({}, ownerState.maxWidth === 'xs' && _defineProperty({}, theme.breakpoints.up('xs'), {
85
- // @ts-ignore module augmentation fails if custom breakpoints are used
86
- maxWidth: Math.max(theme.breakpoints.values.xs, 444)
87
- }), ownerState.maxWidth &&
88
- // @ts-ignore module augmentation fails if custom breakpoints are used
89
- ownerState.maxWidth !== 'xs' && _defineProperty({}, theme.breakpoints.up(ownerState.maxWidth), {
90
- // @ts-ignore module augmentation fails if custom breakpoints are used
91
- maxWidth: "".concat(theme.breakpoints.values[ownerState.maxWidth]).concat(theme.breakpoints.unit)
92
- }));
93
- });
94
- var Container = /*#__PURE__*/React.forwardRef(function Container(inProps, ref) {
95
- var props = useThemeProps(inProps);
96
- var className = props.className,
97
- _props$component = props.component,
98
- component = _props$component === void 0 ? 'div' : _props$component,
99
- _props$disableGutters = props.disableGutters,
100
- disableGutters = _props$disableGutters === void 0 ? false : _props$disableGutters,
101
- _props$fixed = props.fixed,
102
- fixed = _props$fixed === void 0 ? false : _props$fixed,
103
- _props$maxWidth = props.maxWidth,
104
- maxWidth = _props$maxWidth === void 0 ? 'lg' : _props$maxWidth,
105
- classesProp = props.classes,
106
- other = _objectWithoutProperties(props, ["className", "component", "disableGutters", "fixed", "maxWidth", "classes"]);
107
- var ownerState = _extends({}, props, {
108
- component: component,
109
- disableGutters: disableGutters,
110
- fixed: fixed,
111
- maxWidth: maxWidth
112
- });
113
-
114
- // @ts-ignore module augmentation fails if custom breakpoints are used
115
- var classes = useUtilityClasses(ownerState, componentName);
116
- return (
117
- /*#__PURE__*/
118
- // @ts-ignore theme is injected by the styled util
119
- _jsx(ContainerRoot, _extends({
120
- as: component
121
- // @ts-ignore module augmentation fails if custom breakpoints are used
122
- ,
123
- ownerState: ownerState,
124
- className: clsx(classes.root, className),
125
- ref: ref
126
- }, other))
127
- );
128
- });
129
- process.env.NODE_ENV !== "production" ? Container.propTypes /* remove-proptypes */ = {
130
- children: PropTypes.node,
131
- classes: PropTypes.object,
132
- className: PropTypes.string,
133
- component: PropTypes.elementType,
134
- disableGutters: PropTypes.bool,
135
- fixed: PropTypes.bool,
136
- maxWidth: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl', false]), PropTypes.string]),
137
- sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
138
- } : void 0;
139
- return Container;
140
- }
@@ -1,5 +0,0 @@
1
- 'use client';
2
-
3
- export { default } from './Container';
4
- export { default as containerClasses } from './containerClasses';
5
- export * from './containerClasses';
@@ -1,37 +0,0 @@
1
- 'use client';
2
-
3
- import * as React from 'react';
4
- import PropTypes from 'prop-types';
5
- import { GlobalStyles as MuiGlobalStyles } from '@mui/styled-engine';
6
- import useTheme from '../useTheme';
7
- import { jsx as _jsx } from "react/jsx-runtime";
8
- function GlobalStyles(_ref) {
9
- var styles = _ref.styles,
10
- themeId = _ref.themeId,
11
- _ref$defaultTheme = _ref.defaultTheme,
12
- defaultTheme = _ref$defaultTheme === void 0 ? {} : _ref$defaultTheme;
13
- var upperTheme = useTheme(defaultTheme);
14
- var globalStyles = typeof styles === 'function' ? styles(themeId ? upperTheme[themeId] || upperTheme : upperTheme) : styles;
15
- return /*#__PURE__*/_jsx(MuiGlobalStyles, {
16
- styles: globalStyles
17
- });
18
- }
19
- process.env.NODE_ENV !== "production" ? GlobalStyles.propTypes /* remove-proptypes */ = {
20
- // ┌────────────────────────────── Warning ──────────────────────────────┐
21
- // │ These PropTypes are generated from the TypeScript type definitions. │
22
- // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
23
- // └─────────────────────────────────────────────────────────────────────┘
24
- /**
25
- * @ignore
26
- */
27
- defaultTheme: PropTypes.object,
28
- /**
29
- * @ignore
30
- */
31
- styles: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.array, PropTypes.func, PropTypes.number, PropTypes.object, PropTypes.string, PropTypes.bool]),
32
- /**
33
- * @ignore
34
- */
35
- themeId: PropTypes.string
36
- } : void 0;
37
- export default GlobalStyles;
@@ -1,4 +0,0 @@
1
- 'use client';
2
-
3
- export { default } from './GlobalStyles';
4
- export * from './GlobalStyles';
@@ -1,22 +0,0 @@
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;
@@ -1,62 +0,0 @@
1
- 'use client';
2
-
3
- import PropTypes from 'prop-types';
4
- import createStack from './createStack';
5
- /**
6
- *
7
- * Demos:
8
- *
9
- * - [Stack (Joy UI)](https://mui.com/joy-ui/react-stack/)
10
- * - [Stack (Material UI)](https://mui.com/material-ui/react-stack/)
11
- * - [Stack (MUI System)](https://mui.com/system/react-stack/)
12
- *
13
- * API:
14
- *
15
- * - [Stack API](https://mui.com/system/api/stack/)
16
- */
17
- var Stack = createStack();
18
- process.env.NODE_ENV !== "production" ? Stack.propTypes /* remove-proptypes */ = {
19
- // ┌────────────────────────────── Warning ──────────────────────────────┐
20
- // │ These PropTypes are generated from the TypeScript type definitions. │
21
- // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
22
- // └─────────────────────────────────────────────────────────────────────┘
23
- /**
24
- * The content of the component.
25
- */
26
- children: PropTypes.node,
27
- /**
28
- * The component used for the root node.
29
- * Either a string to use a HTML element or a component.
30
- */
31
- component: PropTypes.elementType,
32
- /**
33
- * Defines the `flex-direction` style property.
34
- * It is applied for all screen sizes.
35
- * @default 'column'
36
- */
37
- direction: PropTypes.oneOfType([PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row']), PropTypes.arrayOf(PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row'])), PropTypes.object]),
38
- /**
39
- * Add an element between each child.
40
- */
41
- divider: PropTypes.node,
42
- /**
43
- * Defines the space between immediate children.
44
- * @default 0
45
- */
46
- spacing: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.string]),
47
- /**
48
- * The system prop, which allows defining system overrides as well as additional CSS styles.
49
- */
50
- sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
51
- /**
52
- * If `true`, the CSS flexbox `gap` is used instead of applying `margin` to children.
53
- *
54
- * While CSS `gap` removes the [known limitations](https://mui.com/joy-ui/react-stack/#limitations),
55
- * it is not fully supported in some browsers. We recommend checking https://caniuse.com/?search=flex%20gap before using this flag.
56
- *
57
- * To enable this flag globally, follow the theme's default props configuration.
58
- * @default false
59
- */
60
- useFlexGap: PropTypes.bool
61
- } : void 0;
62
- export default Stack;
@@ -1 +0,0 @@
1
- export {};