@mui/system 7.0.0-beta.0 → 7.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (235) hide show
  1. package/Box/Box.d.ts +72 -0
  2. package/Box/boxClasses.d.ts +7 -0
  3. package/Box/index.d.ts +4 -0
  4. package/CHANGELOG.md +15 -0
  5. package/CSSProperties.d.ts +7 -0
  6. package/Container/Container.d.ts +13 -0
  7. package/Container/ContainerProps.d.ts +40 -0
  8. package/Container/containerClasses.d.ts +22 -0
  9. package/Container/createContainer.d.ts +18 -0
  10. package/Container/index.d.ts +4 -0
  11. package/DefaultPropsProvider/DefaultPropsProvider.d.ts +18 -0
  12. package/DefaultPropsProvider/index.d.ts +1 -0
  13. package/GlobalStyles/GlobalStyles.d.ts +17 -0
  14. package/GlobalStyles/index.d.ts +2 -0
  15. package/Grid/Grid.d.ts +13 -0
  16. package/Grid/GridProps.d.ts +103 -0
  17. package/Grid/createGrid.d.ts +13 -0
  18. package/Grid/deleteLegacyGridProps.d.ts +11 -0
  19. package/Grid/gridClasses.d.ts +20 -0
  20. package/Grid/gridGenerator.d.ts +42 -0
  21. package/Grid/index.d.ts +7 -0
  22. package/Grid/traverseBreakpoints.d.ts +7 -0
  23. package/InitColorSchemeScript/InitColorSchemeScript.d.ts +51 -0
  24. package/InitColorSchemeScript/index.d.ts +2 -0
  25. package/RtlProvider/index.d.ts +8 -0
  26. package/Stack/Stack.d.ts +14 -0
  27. package/Stack/StackProps.d.ts +53 -0
  28. package/Stack/createStack.d.ts +24 -0
  29. package/Stack/index.d.ts +5 -0
  30. package/Stack/stackClasses.d.ts +8 -0
  31. package/ThemeProvider/ThemeProvider.d.ts +24 -0
  32. package/ThemeProvider/index.d.ts +2 -0
  33. package/borders/borders.d.ts +13 -0
  34. package/borders/index.d.ts +2 -0
  35. package/breakpoints/breakpoints.d.ts +19 -0
  36. package/breakpoints/index.d.ts +2 -0
  37. package/colorManipulator/colorManipulator.d.ts +25 -0
  38. package/colorManipulator/index.d.ts +1 -0
  39. package/compose/compose.d.ts +2 -0
  40. package/compose/index.d.ts +1 -0
  41. package/createBox/createBox.d.ts +9 -0
  42. package/createBox/index.d.ts +1 -0
  43. package/createBreakpoints/createBreakpoints.d.ts +78 -0
  44. package/createBreakpoints/index.d.ts +3 -0
  45. package/createStyled/createStyled.d.ts +27 -0
  46. package/createStyled/index.d.ts +2 -0
  47. package/createTheme/applyStyles.d.ts +67 -0
  48. package/createTheme/createSpacing.d.ts +10 -0
  49. package/createTheme/createTheme.d.ts +54 -0
  50. package/createTheme/index.d.ts +4 -0
  51. package/createTheme/shape.d.ts +6 -0
  52. package/cssContainerQueries/cssContainerQueries.d.ts +23 -0
  53. package/cssContainerQueries/index.d.ts +3 -0
  54. package/cssGrid/cssGrid.d.ts +2 -0
  55. package/cssGrid/index.d.ts +2 -0
  56. package/cssVars/createCssVarsProvider.d.ts +129 -0
  57. package/cssVars/createCssVarsTheme.d.ts +15 -0
  58. package/cssVars/createGetCssVar.d.ts +5 -0
  59. package/cssVars/cssVarsParser.d.ts +64 -0
  60. package/cssVars/getColorSchemeSelector.d.ts +1 -0
  61. package/cssVars/index.d.ts +7 -0
  62. package/cssVars/prepareCssVars.d.ts +16 -0
  63. package/cssVars/prepareTypographyVars.d.ts +4 -0
  64. package/cssVars/useCurrentColorScheme.d.ts +54 -0
  65. package/display/display.d.ts +2 -0
  66. package/display/index.d.ts +2 -0
  67. package/esm/index.js +1 -1
  68. package/esm/version/index.js +2 -2
  69. package/flexbox/flexbox.d.ts +2 -0
  70. package/flexbox/index.d.ts +2 -0
  71. package/getThemeValue/getThemeValue.d.ts +1 -0
  72. package/getThemeValue/index.d.ts +2 -0
  73. package/index.d.ts +79 -0
  74. package/index.js +1 -1
  75. package/memoTheme.d.ts +12 -0
  76. package/memoize/index.d.ts +1 -0
  77. package/memoize/memoize.d.ts +1 -0
  78. package/merge/index.d.ts +1 -0
  79. package/merge/merge.d.ts +1 -0
  80. package/modern/Box/Box.d.ts +72 -0
  81. package/modern/Box/boxClasses.d.ts +7 -0
  82. package/modern/Box/index.d.ts +4 -0
  83. package/modern/CSSProperties.d.ts +7 -0
  84. package/modern/Container/Container.d.ts +13 -0
  85. package/modern/Container/ContainerProps.d.ts +40 -0
  86. package/modern/Container/containerClasses.d.ts +22 -0
  87. package/modern/Container/createContainer.d.ts +18 -0
  88. package/modern/Container/index.d.ts +4 -0
  89. package/modern/DefaultPropsProvider/DefaultPropsProvider.d.ts +18 -0
  90. package/modern/DefaultPropsProvider/index.d.ts +1 -0
  91. package/modern/GlobalStyles/GlobalStyles.d.ts +17 -0
  92. package/modern/GlobalStyles/index.d.ts +2 -0
  93. package/modern/Grid/Grid.d.ts +13 -0
  94. package/modern/Grid/GridProps.d.ts +103 -0
  95. package/modern/Grid/createGrid.d.ts +13 -0
  96. package/modern/Grid/deleteLegacyGridProps.d.ts +11 -0
  97. package/modern/Grid/gridClasses.d.ts +20 -0
  98. package/modern/Grid/gridGenerator.d.ts +42 -0
  99. package/modern/Grid/index.d.ts +7 -0
  100. package/modern/Grid/traverseBreakpoints.d.ts +7 -0
  101. package/modern/InitColorSchemeScript/InitColorSchemeScript.d.ts +51 -0
  102. package/modern/InitColorSchemeScript/index.d.ts +2 -0
  103. package/modern/RtlProvider/index.d.ts +8 -0
  104. package/modern/Stack/Stack.d.ts +14 -0
  105. package/modern/Stack/StackProps.d.ts +53 -0
  106. package/modern/Stack/createStack.d.ts +24 -0
  107. package/modern/Stack/index.d.ts +5 -0
  108. package/modern/Stack/stackClasses.d.ts +8 -0
  109. package/modern/ThemeProvider/ThemeProvider.d.ts +24 -0
  110. package/modern/ThemeProvider/index.d.ts +2 -0
  111. package/modern/borders/borders.d.ts +13 -0
  112. package/modern/borders/index.d.ts +2 -0
  113. package/modern/breakpoints/breakpoints.d.ts +19 -0
  114. package/modern/breakpoints/index.d.ts +2 -0
  115. package/modern/colorManipulator/colorManipulator.d.ts +25 -0
  116. package/modern/colorManipulator/index.d.ts +1 -0
  117. package/modern/compose/compose.d.ts +2 -0
  118. package/modern/compose/index.d.ts +1 -0
  119. package/modern/createBox/createBox.d.ts +9 -0
  120. package/modern/createBox/index.d.ts +1 -0
  121. package/modern/createBreakpoints/createBreakpoints.d.ts +78 -0
  122. package/modern/createBreakpoints/index.d.ts +3 -0
  123. package/modern/createStyled/createStyled.d.ts +27 -0
  124. package/modern/createStyled/index.d.ts +2 -0
  125. package/modern/createTheme/applyStyles.d.ts +67 -0
  126. package/modern/createTheme/createSpacing.d.ts +10 -0
  127. package/modern/createTheme/createTheme.d.ts +54 -0
  128. package/modern/createTheme/index.d.ts +4 -0
  129. package/modern/createTheme/shape.d.ts +6 -0
  130. package/modern/cssContainerQueries/cssContainerQueries.d.ts +23 -0
  131. package/modern/cssContainerQueries/index.d.ts +3 -0
  132. package/modern/cssGrid/cssGrid.d.ts +2 -0
  133. package/modern/cssGrid/index.d.ts +2 -0
  134. package/modern/cssVars/createCssVarsProvider.d.ts +129 -0
  135. package/modern/cssVars/createCssVarsTheme.d.ts +15 -0
  136. package/modern/cssVars/createGetCssVar.d.ts +5 -0
  137. package/modern/cssVars/cssVarsParser.d.ts +64 -0
  138. package/modern/cssVars/getColorSchemeSelector.d.ts +1 -0
  139. package/modern/cssVars/index.d.ts +7 -0
  140. package/modern/cssVars/prepareCssVars.d.ts +16 -0
  141. package/modern/cssVars/prepareTypographyVars.d.ts +4 -0
  142. package/modern/cssVars/useCurrentColorScheme.d.ts +54 -0
  143. package/modern/display/display.d.ts +2 -0
  144. package/modern/display/index.d.ts +2 -0
  145. package/modern/flexbox/flexbox.d.ts +2 -0
  146. package/modern/flexbox/index.d.ts +2 -0
  147. package/modern/getThemeValue/getThemeValue.d.ts +1 -0
  148. package/modern/getThemeValue/index.d.ts +2 -0
  149. package/modern/index.d.ts +79 -0
  150. package/modern/index.js +1 -1
  151. package/modern/memoTheme.d.ts +12 -0
  152. package/modern/memoize/index.d.ts +1 -0
  153. package/modern/memoize/memoize.d.ts +1 -0
  154. package/modern/merge/index.d.ts +1 -0
  155. package/modern/merge/merge.d.ts +1 -0
  156. package/modern/palette/index.d.ts +2 -0
  157. package/modern/palette/palette.d.ts +4 -0
  158. package/modern/positions/index.d.ts +2 -0
  159. package/modern/positions/positions.d.ts +2 -0
  160. package/modern/preprocessStyles.d.ts +5 -0
  161. package/modern/propsToClassKey/index.d.ts +1 -0
  162. package/modern/propsToClassKey/propsToClassKey.d.ts +1 -0
  163. package/modern/responsivePropType/index.d.ts +1 -0
  164. package/modern/responsivePropType/responsivePropType.d.ts +2 -0
  165. package/modern/shadows/index.d.ts +1 -0
  166. package/modern/shadows/shadows.d.ts +2 -0
  167. package/modern/sizing/index.d.ts +2 -0
  168. package/modern/sizing/sizing.d.ts +11 -0
  169. package/modern/spacing/index.d.ts +2 -0
  170. package/modern/spacing/spacing.d.ts +18 -0
  171. package/modern/style/index.d.ts +2 -0
  172. package/modern/style/style.d.ts +19 -0
  173. package/modern/styleFunctionSx/AliasesCSSProperties.d.ts +269 -0
  174. package/modern/styleFunctionSx/OverwriteCSSProperties.d.ts +54 -0
  175. package/modern/styleFunctionSx/StandardCssProperties.d.ts +2 -0
  176. package/modern/styleFunctionSx/defaultSxConfig.d.ts +15 -0
  177. package/modern/styleFunctionSx/extendSxProp.d.ts +4 -0
  178. package/modern/styleFunctionSx/index.d.ts +9 -0
  179. package/modern/styleFunctionSx/styleFunctionSx.d.ts +62 -0
  180. package/modern/styled/index.d.ts +1 -0
  181. package/modern/styled/styled.d.ts +3 -0
  182. package/modern/typography/index.d.ts +2 -0
  183. package/modern/typography/typography.d.ts +11 -0
  184. package/modern/useMediaQuery/index.d.ts +2 -0
  185. package/modern/useMediaQuery/useMediaQuery.d.ts +32 -0
  186. package/modern/useTheme/index.d.ts +2 -0
  187. package/modern/useTheme/useTheme.d.ts +2 -0
  188. package/modern/useThemeProps/getThemeProps.d.ts +16 -0
  189. package/modern/useThemeProps/index.d.ts +3 -0
  190. package/modern/useThemeProps/useThemeProps.d.ts +14 -0
  191. package/modern/useThemeWithoutDefault/index.d.ts +1 -0
  192. package/modern/useThemeWithoutDefault/useThemeWithoutDefault.d.ts +1 -0
  193. package/modern/version/index.d.ts +6 -0
  194. package/modern/version/index.js +2 -2
  195. package/package.json +6 -5
  196. package/palette/index.d.ts +2 -0
  197. package/palette/palette.d.ts +4 -0
  198. package/positions/index.d.ts +2 -0
  199. package/positions/positions.d.ts +2 -0
  200. package/preprocessStyles.d.ts +5 -0
  201. package/propsToClassKey/index.d.ts +1 -0
  202. package/propsToClassKey/propsToClassKey.d.ts +1 -0
  203. package/responsivePropType/index.d.ts +1 -0
  204. package/responsivePropType/responsivePropType.d.ts +2 -0
  205. package/shadows/index.d.ts +1 -0
  206. package/shadows/shadows.d.ts +2 -0
  207. package/sizing/index.d.ts +2 -0
  208. package/sizing/sizing.d.ts +11 -0
  209. package/spacing/index.d.ts +2 -0
  210. package/spacing/spacing.d.ts +18 -0
  211. package/style/index.d.ts +2 -0
  212. package/style/style.d.ts +19 -0
  213. package/styleFunctionSx/AliasesCSSProperties.d.ts +269 -0
  214. package/styleFunctionSx/OverwriteCSSProperties.d.ts +54 -0
  215. package/styleFunctionSx/StandardCssProperties.d.ts +2 -0
  216. package/styleFunctionSx/defaultSxConfig.d.ts +15 -0
  217. package/styleFunctionSx/extendSxProp.d.ts +4 -0
  218. package/styleFunctionSx/index.d.ts +9 -0
  219. package/styleFunctionSx/styleFunctionSx.d.ts +62 -0
  220. package/styled/index.d.ts +1 -0
  221. package/styled/styled.d.ts +3 -0
  222. package/tsconfig.build.tsbuildinfo +1 -1
  223. package/typography/index.d.ts +2 -0
  224. package/typography/typography.d.ts +11 -0
  225. package/useMediaQuery/index.d.ts +2 -0
  226. package/useMediaQuery/useMediaQuery.d.ts +32 -0
  227. package/useTheme/index.d.ts +2 -0
  228. package/useTheme/useTheme.d.ts +2 -0
  229. package/useThemeProps/getThemeProps.d.ts +16 -0
  230. package/useThemeProps/index.d.ts +3 -0
  231. package/useThemeProps/useThemeProps.d.ts +14 -0
  232. package/useThemeWithoutDefault/index.d.ts +1 -0
  233. package/useThemeWithoutDefault/useThemeWithoutDefault.d.ts +1 -0
  234. package/version/index.d.ts +6 -0
  235. package/version/index.js +2 -2
@@ -0,0 +1,103 @@
1
+ import * as React from 'react';
2
+ import { OverrideProps, PartiallyRequired } from '@mui/types';
3
+ import { SxProps } from "../styleFunctionSx/index.js";
4
+ import { Theme, Breakpoint } from "../createTheme/index.js";
5
+ import { SystemProps } from "../Box/index.js";
6
+ type ResponsiveStyleValue<T> = T | Array<T | null> | { [key in Breakpoint]?: T | null };
7
+ export type GridDirection = 'row' | 'row-reverse' | 'column' | 'column-reverse';
8
+ export type GridSpacing = number | string;
9
+ export type GridWrap = 'nowrap' | 'wrap' | 'wrap-reverse';
10
+ export type GridSize = 'auto' | 'grow' | number | false;
11
+ export type GridOffset = 'auto' | number;
12
+ export interface GridBaseProps {
13
+ /**
14
+ * The content of the component.
15
+ */
16
+ children?: React.ReactNode;
17
+ /**
18
+ * The number of columns.
19
+ * @default 12
20
+ */
21
+ columns?: ResponsiveStyleValue<number>;
22
+ /**
23
+ * Defines the horizontal space between the type `item` components.
24
+ * It overrides the value of the `spacing` prop.
25
+ */
26
+ columnSpacing?: ResponsiveStyleValue<GridSpacing>;
27
+ /**
28
+ * If `true`, the component will have the flex *container* behavior.
29
+ * You should be wrapping *items* with a *container*.
30
+ * @default false
31
+ */
32
+ container?: boolean;
33
+ /**
34
+ * Defines the `flex-direction` style property.
35
+ * It is applied for all screen sizes.
36
+ * @default 'row'
37
+ */
38
+ direction?: ResponsiveStyleValue<GridDirection>;
39
+ /**
40
+ * Defines the offset value for the type `item` components.
41
+ */
42
+ offset?: ResponsiveStyleValue<GridOffset>;
43
+ /**
44
+ * @internal
45
+ * The level of the grid starts from `0` and increases when the grid nests
46
+ * inside another grid. Nesting is defined as a container Grid being a direct
47
+ * child of a container Grid.
48
+ *
49
+ * ```js
50
+ * <Grid container> // level 0
51
+ * <Grid container> // level 1
52
+ * <Grid container> // level 2
53
+ * ```
54
+ *
55
+ * Only consecutive grid is considered nesting. A grid container will start at
56
+ * `0` if there are non-Grid container element above it.
57
+ *
58
+ * ```js
59
+ * <Grid container> // level 0
60
+ * <div>
61
+ * <Grid container> // level 0
62
+ * ```
63
+ *
64
+ * ```js
65
+ * <Grid container> // level 0
66
+ * <Grid>
67
+ * <Grid container> // level 0
68
+ * ```
69
+ */
70
+ unstable_level?: number;
71
+ /**
72
+ * Defines the vertical space between the type `item` components.
73
+ * It overrides the value of the `spacing` prop.
74
+ */
75
+ rowSpacing?: ResponsiveStyleValue<GridSpacing>;
76
+ /**
77
+ * Defines the size of the the type `item` components.
78
+ */
79
+ size?: ResponsiveStyleValue<GridSize>;
80
+ /**
81
+ * Defines the space between the type `item` components.
82
+ * It can only be used on a type `container` component.
83
+ * @default 0
84
+ */
85
+ spacing?: ResponsiveStyleValue<GridSpacing> | undefined;
86
+ /**
87
+ * Defines the `flex-wrap` style property.
88
+ * It's applied for all screen sizes.
89
+ * @default 'wrap'
90
+ */
91
+ wrap?: GridWrap;
92
+ }
93
+ export type GridOwnerState = PartiallyRequired<GridBaseProps, 'size' | 'offset' | 'unstable_level'>;
94
+ export interface GridTypeMap<AdditionalProps = {}, DefaultComponent extends React.ElementType = 'div'> {
95
+ props: AdditionalProps & GridBaseProps & {
96
+ sx?: SxProps<Theme>;
97
+ } & SystemProps<Theme>;
98
+ defaultComponent: DefaultComponent;
99
+ }
100
+ export type GridProps<RootComponent extends React.ElementType = GridTypeMap['defaultComponent'], AdditionalProps = {
101
+ component?: React.ElementType;
102
+ }> = OverrideProps<GridTypeMap<AdditionalProps, RootComponent>, RootComponent>;
103
+ export {};
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ import { OverridableComponent } from '@mui/types';
3
+ import useThemeSystem from "../useTheme/index.js";
4
+ import { GridTypeMap } from "./GridProps.js";
5
+ declare const defaultCreateStyledComponent: import("@mui/styled-engine").CreateStyledComponent<import("../createStyled/index.js").MUIStyledCommonProps<any>, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.ClassAttributes<HTMLDivElement> | keyof React.HTMLAttributes<HTMLDivElement>>, {}, any>;
6
+ declare function useThemePropsDefault<T extends {}>(props: T): T;
7
+ export default function createGrid(options?: {
8
+ createStyledComponent?: typeof defaultCreateStyledComponent;
9
+ useThemeProps?: typeof useThemePropsDefault;
10
+ useTheme?: typeof useThemeSystem;
11
+ componentName?: string;
12
+ }): OverridableComponent<GridTypeMap<{}, "div">>;
13
+ export {};
@@ -0,0 +1,11 @@
1
+ import { Breakpoint, Breakpoints } from "../createTheme/index.js";
2
+ /**
3
+ * Deletes the legacy Grid component props from the `props` object and warns once about them if found.
4
+ *
5
+ * @param {object} props The props object to remove the legacy Grid props from.
6
+ * @param {Breakpoints} breakpoints The breakpoints object.
7
+ */
8
+ export default function deleteLegacyGridProps(props: {
9
+ item?: boolean;
10
+ zeroMinWidth?: boolean;
11
+ } & Partial<Record<Breakpoint, 'auto' | number | boolean>> & Record<string, any>, breakpoints: Breakpoints): void;
@@ -0,0 +1,20 @@
1
+ export interface GridClasses {
2
+ /** Styles applied to the root element. */
3
+ root: string;
4
+ /** Styles applied to the root element if `container={true}`. */
5
+ container: string;
6
+ /** Styles applied to the root element if `direction="column"`. */
7
+ 'direction-xs-column': string;
8
+ /** Styles applied to the root element if `direction="column-reverse"`. */
9
+ 'direction-xs-column-reverse': string;
10
+ /** Styles applied to the root element if `direction="row-reverse"`. */
11
+ 'direction-xs-row-reverse': string;
12
+ /** Styles applied to the root element if `wrap="nowrap"`. */
13
+ 'wrap-xs-nowrap': string;
14
+ /** Styles applied to the root element if `wrap="reverse"`. */
15
+ 'wrap-xs-wrap-reverse': string;
16
+ }
17
+ export type GridClassKey = keyof GridClasses;
18
+ export declare function getGridUtilityClass(slot: string): string;
19
+ declare const gridClasses: GridClasses;
20
+ export default gridClasses;
@@ -0,0 +1,42 @@
1
+ import { Breakpoints } from "../createBreakpoints/createBreakpoints.js";
2
+ import { Spacing } from "../createTheme/createSpacing.js";
3
+ import { ResponsiveStyleValue } from "../styleFunctionSx/index.js";
4
+ import { GridDirection, GridOwnerState } from "./GridProps.js";
5
+ interface Props {
6
+ theme: {
7
+ breakpoints: Breakpoints;
8
+ spacing?: Spacing;
9
+ };
10
+ ownerState: GridOwnerState;
11
+ }
12
+ export declare const generateGridSizeStyles: ({
13
+ theme,
14
+ ownerState
15
+ }: Props) => {};
16
+ export declare const generateGridOffsetStyles: ({
17
+ theme,
18
+ ownerState
19
+ }: Props) => {};
20
+ export declare const generateGridColumnsStyles: ({
21
+ theme,
22
+ ownerState
23
+ }: Props) => {};
24
+ export declare const generateGridRowSpacingStyles: ({
25
+ theme,
26
+ ownerState
27
+ }: Props) => {};
28
+ export declare const generateGridColumnSpacingStyles: ({
29
+ theme,
30
+ ownerState
31
+ }: Props) => {};
32
+ export declare const generateGridDirectionStyles: ({
33
+ theme,
34
+ ownerState
35
+ }: Props) => {};
36
+ export declare const generateGridStyles: ({
37
+ ownerState
38
+ }: Props) => {};
39
+ export declare const generateSizeClassNames: (size: GridOwnerState["size"]) => string[];
40
+ export declare const generateSpacingClassNames: (spacing: GridOwnerState["spacing"], smallestBreakpoint?: string) => string[];
41
+ export declare const generateDirectionClasses: (direction: ResponsiveStyleValue<GridDirection> | undefined) => string[];
42
+ export {};
@@ -0,0 +1,7 @@
1
+ export { default } from "./Grid.js";
2
+ export { default as createGrid } from "./createGrid.js";
3
+ export * from "./GridProps.js";
4
+ export { default as gridClasses } from "./gridClasses.js";
5
+ export * from "./gridClasses.js";
6
+ export { traverseBreakpoints as unstable_traverseBreakpoints } from "./traverseBreakpoints.js";
7
+ export { generateDirectionClasses as unstable_generateDirectionClasses, generateSizeClassNames as unstable_generateSizeClassNames, generateSpacingClassNames as unstable_generateSpacingClassNames } from "./gridGenerator.js";
@@ -0,0 +1,7 @@
1
+ import { Breakpoints, Breakpoint } from "../createBreakpoints/createBreakpoints.js";
2
+ export declare const filterBreakpointKeys: (breakpointsKeys: Breakpoint[], responsiveKeys: string[]) => Breakpoint[];
3
+ interface Iterator<T> {
4
+ (appendStyle: (responsiveStyles: Record<string, any>, style: object) => void, value: T): void;
5
+ }
6
+ export declare const traverseBreakpoints: <T = unknown>(breakpoints: Breakpoints, responsive: T | T[] | Record<string, any> | undefined, iterator: Iterator<T>) => void;
7
+ export {};
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Split this component for RSC import
3
+ */
4
+ import * as React from 'react';
5
+ export declare const DEFAULT_MODE_STORAGE_KEY = "mode";
6
+ export declare const DEFAULT_COLOR_SCHEME_STORAGE_KEY = "color-scheme";
7
+ export declare const DEFAULT_ATTRIBUTE = "data-color-scheme";
8
+ export interface InitColorSchemeScriptProps {
9
+ /**
10
+ * The default mode when the storage is empty (user's first visit).
11
+ * @default 'system'
12
+ */
13
+ defaultMode?: 'system' | 'light' | 'dark';
14
+ /**
15
+ * The default color scheme to be used on the light mode.
16
+ * @default 'light'
17
+ */
18
+ defaultLightColorScheme?: string;
19
+ /**
20
+ * The default color scheme to be used on the dark mode.
21
+ * * @default 'dark'
22
+ */
23
+ defaultDarkColorScheme?: string;
24
+ /**
25
+ * The node (provided as string) used to attach the color-scheme attribute.
26
+ * @default 'document.documentElement'
27
+ */
28
+ colorSchemeNode?: string;
29
+ /**
30
+ * localStorage key used to store `mode`.
31
+ * @default 'mode'
32
+ */
33
+ modeStorageKey?: string;
34
+ /**
35
+ * localStorage key used to store `colorScheme`.
36
+ * @default 'color-scheme'
37
+ */
38
+ colorSchemeStorageKey?: string;
39
+ /**
40
+ * DOM attribute for applying color scheme.
41
+ * @default 'data-color-scheme'
42
+ * @example '.mode-%s' // for class based color scheme
43
+ * @example '[data-mode-%s]' // for data-attribute without '='
44
+ */
45
+ attribute?: 'class' | 'data' | string;
46
+ /**
47
+ * Nonce string to pass to the inline script for CSP headers.
48
+ */
49
+ nonce?: string | undefined;
50
+ }
51
+ export default function InitColorSchemeScript(options?: InitColorSchemeScriptProps): React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { default } from "./InitColorSchemeScript.js";
2
+ export type { InitColorSchemeScriptProps } from "./InitColorSchemeScript.js";
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ interface RtlProviderProps {
3
+ children?: React.ReactNode;
4
+ value?: boolean;
5
+ }
6
+ declare const RtlProvider: React.FC<RtlProviderProps>;
7
+ export const useRtl: () => boolean;
8
+ export default RtlProvider;
@@ -0,0 +1,14 @@
1
+ /**
2
+ *
3
+ * Demos:
4
+ *
5
+ * - [Stack (Joy UI)](https://mui.com/joy-ui/react-stack/)
6
+ * - [Stack (Material UI)](https://mui.com/material-ui/react-stack/)
7
+ * - [Stack (MUI System)](https://mui.com/system/react-stack/)
8
+ *
9
+ * API:
10
+ *
11
+ * - [Stack API](https://mui.com/system/api/stack/)
12
+ */
13
+ declare const Stack: import("@mui/types").OverridableComponent<import("./StackProps.js").StackTypeMap<{}, "div">>;
14
+ export default Stack;
@@ -0,0 +1,53 @@
1
+ import * as React from 'react';
2
+ import { OverrideProps } from '@mui/types';
3
+ import { ResponsiveStyleValue, SxProps } from "../styleFunctionSx/index.js";
4
+ import { SystemProps } from "../Box/index.js";
5
+ import { Theme } from "../createTheme/index.js";
6
+ export interface StackBaseProps {
7
+ /**
8
+ * The content of the component.
9
+ */
10
+ children?: React.ReactNode;
11
+ /**
12
+ * Defines the `flex-direction` style property.
13
+ * It is applied for all screen sizes.
14
+ * @default 'column'
15
+ */
16
+ direction?: ResponsiveStyleValue<'row' | 'row-reverse' | 'column' | 'column-reverse'>;
17
+ /**
18
+ * Defines the space between immediate children.
19
+ * @default 0
20
+ */
21
+ spacing?: ResponsiveStyleValue<number | string>;
22
+ /**
23
+ * Add an element between each child.
24
+ */
25
+ divider?: React.ReactNode;
26
+ /**
27
+ * If `true`, the CSS flexbox `gap` is used instead of applying `margin` to children.
28
+ *
29
+ * While CSS `gap` removes the [known limitations](https://mui.com/joy-ui/react-stack/#limitations),
30
+ * it is not fully supported in some browsers. We recommend checking https://caniuse.com/?search=flex%20gap before using this flag.
31
+ *
32
+ * To enable this flag globally, follow the theme's default props configuration.
33
+ * @default false
34
+ */
35
+ useFlexGap?: boolean;
36
+ }
37
+ export interface StackTypeMap<AdditionalProps = {}, DefaultComponent extends React.ElementType = 'div'> {
38
+ props: AdditionalProps & StackBaseProps & {
39
+ /**
40
+ * The system prop, which allows defining system overrides as well as additional CSS styles.
41
+ */
42
+ sx?: SxProps<Theme>;
43
+ } & SystemProps<Theme>;
44
+ defaultComponent: DefaultComponent;
45
+ }
46
+ export type StackProps<RootComponent extends React.ElementType = StackTypeMap['defaultComponent'], AdditionalProps = {
47
+ component?: React.ElementType;
48
+ }> = OverrideProps<StackTypeMap<AdditionalProps, RootComponent>, RootComponent>;
49
+ export interface StackOwnerState {
50
+ direction: StackProps['direction'];
51
+ spacing: StackProps['spacing'];
52
+ useFlexGap: boolean;
53
+ }
@@ -0,0 +1,24 @@
1
+ import * as React from 'react';
2
+ import { OverridableComponent } from '@mui/types';
3
+ import { StackTypeMap, StackOwnerState } from "./StackProps.js";
4
+ import { Breakpoints } from "../createBreakpoints/createBreakpoints.js";
5
+ import { Spacing } from "../createTheme/createSpacing.js";
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/index.js").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: ({
16
+ ownerState,
17
+ theme
18
+ }: StyleFunctionProps) => any;
19
+ export default function createStack(options?: {
20
+ createStyledComponent?: typeof defaultCreateStyledComponent;
21
+ useThemeProps?: typeof useThemePropsDefault;
22
+ componentName?: string;
23
+ }): OverridableComponent<StackTypeMap<{}, "div">>;
24
+ export {};
@@ -0,0 +1,5 @@
1
+ export { default } from "./Stack.js";
2
+ export { default as createStack } from "./createStack.js";
3
+ export * from "./StackProps.js";
4
+ export { default as stackClasses } from "./stackClasses.js";
5
+ export * from "./stackClasses.js";
@@ -0,0 +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;
@@ -0,0 +1,24 @@
1
+ import { DefaultTheme } from '@mui/private-theming';
2
+ export interface ThemeProviderProps<Theme = DefaultTheme> {
3
+ /**
4
+ * Your component tree.
5
+ */
6
+ children?: React.ReactNode;
7
+ /**
8
+ * The design system's unique id for getting the corresponded theme when there are multiple design systems.
9
+ */
10
+ themeId?: string;
11
+ /**
12
+ * A theme object. You can provide a function to extend the outer theme.
13
+ */
14
+ theme: Partial<Theme> | ((outerTheme: Theme) => Theme);
15
+ }
16
+
17
+ /**
18
+ * This component makes the `theme` available down the React tree.
19
+ * It should preferably be used at **the root of your component tree**.
20
+ * API:
21
+ *
22
+ * - [ThemeProvider API](https://mui.com/material-ui/customization/theming/#themeprovider)
23
+ */
24
+ export default function ThemeProvider<T = DefaultTheme>(props: ThemeProviderProps<T>): React.ReactElement<ThemeProviderProps<T>>;
@@ -0,0 +1,2 @@
1
+ export { default } from "./ThemeProvider.js";
2
+ export * from "./ThemeProvider.js";
@@ -0,0 +1,13 @@
1
+ import { PropsFor, SimpleStyleFunction, borders } from "../Box/index.js";
2
+ export const border: SimpleStyleFunction<'border'>;
3
+ export const borderTop: SimpleStyleFunction<'borderTop'>;
4
+ export const borderRight: SimpleStyleFunction<'borderRight'>;
5
+ export const borderBottom: SimpleStyleFunction<'borderBottom'>;
6
+ export const borderLeft: SimpleStyleFunction<'borderLeft'>;
7
+ export const borderColor: SimpleStyleFunction<'borderColor'>;
8
+ export const borderTopColor: SimpleStyleFunction<'borderTopColor'>;
9
+ export const borderRightColor: SimpleStyleFunction<'borderRightColor'>;
10
+ export const borderBottomColor: SimpleStyleFunction<'borderBottomColor'>;
11
+ export const borderLeftColor: SimpleStyleFunction<'borderLeftColor'>;
12
+ export const borderRadius: SimpleStyleFunction<'borderRadius'>;
13
+ export type BordersProps = PropsFor<typeof borders>;
@@ -0,0 +1,2 @@
1
+ export { default } from "./borders.js";
2
+ export * from "./borders.js";
@@ -0,0 +1,19 @@
1
+ import { CSSObject } from '@mui/styled-engine';
2
+ import { Breakpoints } from "../createBreakpoints/createBreakpoints.js";
3
+ import type { Breakpoint } from "../createTheme/index.js";
4
+ import { ResponsiveStyleValue } from "../styleFunctionSx/index.js";
5
+ import { StyleFunction } from "../Box/index.js";
6
+ export interface ResolveBreakpointValuesOptions<T> {
7
+ values: ResponsiveStyleValue<T>;
8
+ breakpoints?: Breakpoints['values'];
9
+ base?: Record<string, boolean>;
10
+ }
11
+ export function resolveBreakpointValues<T>(options: ResolveBreakpointValuesOptions<T>): Record<string, T>;
12
+ export function mergeBreakpointsInOrder(breakpoints: Breakpoints, styles: CSSObject[]): CSSObject;
13
+ export function handleBreakpoints<Props>(props: Props, propValue: any, styleFromPropValue: (value: any, breakpoint?: Breakpoint) => any): any;
14
+ type DefaultBreakPoints = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
15
+
16
+ /**
17
+ * @returns An enhanced stylefunction that considers breakpoints
18
+ */
19
+ export default function breakpoints<Props, Breakpoints extends string = DefaultBreakPoints>(styleFunction: StyleFunction<Props>): StyleFunction<Partial<Record<Breakpoints, Props>> & Props>;
@@ -0,0 +1,2 @@
1
+ export { default } from "./breakpoints.js";
2
+ export * from "./breakpoints.js";
@@ -0,0 +1,25 @@
1
+ /* eslint-disable @typescript-eslint/naming-convention */
2
+ export type ColorFormat = 'rgb' | 'rgba' | 'hsl' | 'hsla' | 'color';
3
+ export interface ColorObject {
4
+ type: ColorFormat;
5
+ values: [number, number, number] | [number, number, number, number];
6
+ colorSpace?: 'srgb' | 'display-p3' | 'a98-rgb' | 'prophoto-rgb' | 'rec-2020';
7
+ }
8
+ export function hexToRgb(hex: string): string;
9
+ export function rgbToHex(color: string): string;
10
+ export function hslToRgb(color: string): string;
11
+ export function decomposeColor(color: string): ColorObject;
12
+ export function colorChannel(color: string): string;
13
+ export function private_safeColorChannel(color: string, warning?: string): string;
14
+ export function recomposeColor(color: ColorObject): string;
15
+ export function getContrastRatio(foreground: string, background: string): number;
16
+ export function getLuminance(color: string): number;
17
+ export function emphasize(color: string, coefficient?: number): string;
18
+ export function private_safeEmphasize(color: string, coefficient?: number, warning?: string): string;
19
+ export function alpha(color: string, value: number): string;
20
+ export function private_safeAlpha(color: string, value: number, warning?: string): string;
21
+ export function darken(color: string, coefficient: number): string;
22
+ export function private_safeDarken(color: string, coefficient: number, warning?: string): string;
23
+ export function lighten(color: string, coefficient: number): string;
24
+ export function private_safeLighten(color: string, coefficient: number, warning?: string): string;
25
+ export function blend(background: string, overlay: string, opacity: number, gamma?: number): string;
@@ -0,0 +1 @@
1
+ export * from "./colorManipulator.js";
@@ -0,0 +1,2 @@
1
+ import { ComposedStyleFunction, StyleFunction } from "../Box/index.js";
2
+ export default function compose<T extends Array<StyleFunction<any>>>(...args: T): ComposedStyleFunction<T>;
@@ -0,0 +1 @@
1
+ export { default } from "./compose.js";
@@ -0,0 +1,9 @@
1
+ import { OverridableComponent } from '@mui/types';
2
+ import { BoxTypeMap } from "../Box/index.js";
3
+ import { Theme as SystemTheme } from "../createTheme/index.js";
4
+ export default function createBox<T extends object = SystemTheme, AdditionalProps extends Record<string, unknown> = {}>(options?: {
5
+ themeId?: string;
6
+ defaultTheme: T;
7
+ defaultClassName?: string;
8
+ generateClassName?: (componentName: string) => string;
9
+ }): OverridableComponent<BoxTypeMap<AdditionalProps, 'div', T>>;
@@ -0,0 +1 @@
1
+ export { default } from "./createBox.js";
@@ -0,0 +1,78 @@
1
+ import { OverridableStringUnion } from '@mui/types';
2
+ export interface BreakpointOverrides {}
3
+ export type Breakpoint = OverridableStringUnion<'xs' | 'sm' | 'md' | 'lg' | 'xl', BreakpointOverrides>;
4
+ export const keys: Breakpoint[];
5
+
6
+ // Keep in sync with docs/src/pages/customization/breakpoints/breakpoints.md
7
+ // #host-reference
8
+ export interface Breakpoints {
9
+ keys: Breakpoint[];
10
+ /**
11
+ * Each breakpoint (a key) matches with a fixed screen width (a value).
12
+ * @default {
13
+ * // extra-small
14
+ * xs: 0,
15
+ * // small
16
+ * sm: 600,
17
+ * // medium
18
+ * md: 900,
19
+ * // large
20
+ * lg: 1200,
21
+ * // extra-large
22
+ * xl: 1536,
23
+ * }
24
+ */
25
+ values: { [key in Breakpoint]: number };
26
+ /**
27
+ * @param key - A breakpoint key (`xs`, `sm`, etc.) or a screen width number in px.
28
+ * @returns A media query string ready to be used with most styling solutions, which matches screen widths greater than the screen size given by the breakpoint key (inclusive).
29
+ * @see [API documentation](https://next.mui.com/material-ui/customization/breakpoints/#theme-breakpoints-up-key-media-query)
30
+ */
31
+ up: (key: Breakpoint | number) => string;
32
+ /**
33
+ * @param key - A breakpoint key (`xs`, `sm`, etc.) or a screen width number in px.
34
+ * @returns A media query string ready to be used with most styling solutions, which matches screen widths less than the screen size given by the breakpoint key (exclusive).
35
+ * @see [API documentation](https://next.mui.com/material-ui/customization/breakpoints/#theme-breakpoints-down-key-media-query)
36
+ */
37
+ down: (key: Breakpoint | number) => string;
38
+ /**
39
+ * @param start - A breakpoint key (`xs`, `sm`, etc.) or a screen width number in px.
40
+ * @param end - A breakpoint key (`xs`, `sm`, etc.) or a screen width number in px.
41
+ * @returns A media query string ready to be used with most styling solutions, which matches screen widths greater than
42
+ * the screen size given by the breakpoint key in the first argument (inclusive) and less than the screen size given by the breakpoint key in the second argument (exclusive).
43
+ * @see [API documentation](https://next.mui.com/material-ui/customization/breakpoints/#theme-breakpoints-between-start-end-media-query)
44
+ */
45
+ between: (start: Breakpoint | number, end: Breakpoint | number) => string;
46
+ /**
47
+ * @param key - A breakpoint key (`xs`, `sm`, etc.) or a screen width number in px.
48
+ * @returns A media query string ready to be used with most styling solutions, which matches screen widths starting from
49
+ * the screen size given by the breakpoint key (inclusive) and stopping at the screen size given by the next breakpoint key (exclusive).
50
+ * @see [API documentation](https://next.mui.com/material-ui/customization/breakpoints/#theme-breakpoints-only-key-media-query)
51
+ */
52
+ only: (key: Breakpoint) => string;
53
+ /**
54
+ * @param key - A breakpoint key (`xs`, `sm`, etc.).
55
+ * @returns A media query string ready to be used with most styling solutions, which matches screen widths stopping at
56
+ * the screen size given by the breakpoint key (exclusive) and starting at the screen size given by the next breakpoint key (inclusive).
57
+ */
58
+ not: (key: Breakpoint) => string;
59
+ /**
60
+ * The unit used for the breakpoint's values.
61
+ * @default 'px'
62
+ */
63
+ unit?: string | undefined;
64
+ }
65
+ export interface BreakpointsOptions extends Partial<Breakpoints> {
66
+ /**
67
+ * The increment divided by 100 used to implement exclusive breakpoints.
68
+ * For example, `step: 5` means that `down(500)` will result in `'(max-width: 499.95px)'`.
69
+ * @default 5
70
+ */
71
+ step?: number | undefined;
72
+ /**
73
+ * The unit used for the breakpoint's values.
74
+ * @default 'px'
75
+ */
76
+ unit?: string | undefined;
77
+ }
78
+ export default function createBreakpoints(options: BreakpointsOptions): Breakpoints;
@@ -0,0 +1,3 @@
1
+ /** This export is intended for internal integration with Pigment CSS */
2
+ /* eslint-disable import/prefer-default-export */
3
+ export { default as unstable_createBreakpoints } from "./createBreakpoints.js";
@@ -0,0 +1,27 @@
1
+ import * as React from 'react';
2
+ import { CreateMUIStyled as CreateMUIStyledStyledEngine, CSSInterpolation } from '@mui/styled-engine';
3
+ import styleFunctionSx, { SxProps } from "../styleFunctionSx/index.js";
4
+ import { Theme as DefaultTheme } from "../createTheme/index.js";
5
+ export function shouldForwardProp(propName: PropertyKey): boolean;
6
+ export interface MUIStyledCommonProps<Theme extends object = DefaultTheme> {
7
+ theme?: Theme;
8
+ as?: React.ElementType;
9
+ sx?: SxProps<Theme>;
10
+ }
11
+ export interface MuiStyledOptions {
12
+ name?: string;
13
+ slot?: string;
14
+ // The difference between Interpolation and CSSInterpolation is that the former supports functions based on props
15
+ // If we want to support props in the overrides, we will need to change the CSSInterpolation to Interpolation<Props>
16
+ overridesResolver?: (props: any, styles: Record<string, CSSInterpolation>) => CSSInterpolation;
17
+ skipVariantsResolver?: boolean;
18
+ skipSx?: boolean;
19
+ }
20
+ export type CreateMUIStyled<Theme extends object = DefaultTheme> = CreateMUIStyledStyledEngine<MUIStyledCommonProps<Theme>, MuiStyledOptions, Theme>;
21
+ export default function createStyled<Theme extends object = DefaultTheme>(options?: {
22
+ themeId?: string;
23
+ defaultTheme?: Theme;
24
+ rootShouldForwardProp?: (prop: PropertyKey) => boolean;
25
+ slotShouldForwardProp?: (prop: PropertyKey) => boolean;
26
+ styleFunctionSx?: typeof styleFunctionSx;
27
+ }): CreateMUIStyled<Theme>;
@@ -0,0 +1,2 @@
1
+ export { default } from "./createStyled.js";
2
+ export * from "./createStyled.js";