@mui/system 9.1.1 → 9.1.2

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 (112) hide show
  1. package/Box/Box.d.mts +15 -19
  2. package/Box/Box.d.ts +15 -19
  3. package/Box/Box.js +16 -1
  4. package/Box/Box.mjs +17 -1
  5. package/Box/index.js +12 -2
  6. package/Box/index.mjs +1 -0
  7. package/CHANGELOG.md +36 -0
  8. package/Container/index.d.mts +1 -1
  9. package/Container/index.d.ts +1 -1
  10. package/Grid/Grid.js +0 -1
  11. package/Grid/Grid.mjs +0 -1
  12. package/Grid/GridProps.d.mts +0 -1
  13. package/Grid/GridProps.d.ts +0 -1
  14. package/InitColorSchemeScript/InitColorSchemeScript.d.mts +2 -1
  15. package/InitColorSchemeScript/InitColorSchemeScript.d.ts +2 -1
  16. package/InitColorSchemeScript/InitColorSchemeScript.js +34 -1
  17. package/InitColorSchemeScript/InitColorSchemeScript.mjs +33 -1
  18. package/ThemeProvider/ThemeProvider.d.mts +9 -6
  19. package/ThemeProvider/ThemeProvider.d.ts +9 -6
  20. package/ThemeProvider/ThemeProvider.js +3 -2
  21. package/ThemeProvider/ThemeProvider.mjs +3 -2
  22. package/ThemeProvider/index.d.mts +1 -1
  23. package/ThemeProvider/index.d.ts +1 -1
  24. package/borders/borders.d.mts +14 -12
  25. package/borders/borders.d.ts +14 -12
  26. package/borders/borders.js +2 -4
  27. package/borders/borders.mjs +3 -4
  28. package/breakpoints/breakpoints.d.mts +13 -16
  29. package/breakpoints/breakpoints.d.ts +13 -16
  30. package/breakpoints/breakpoints.js +17 -16
  31. package/breakpoints/breakpoints.mjs +17 -16
  32. package/compose/compose.d.mts +3 -10
  33. package/compose/compose.d.ts +3 -10
  34. package/compose/compose.js +0 -2
  35. package/compose/compose.mjs +0 -2
  36. package/createBox/createBox.d.mts +4 -4
  37. package/createBox/createBox.d.ts +4 -4
  38. package/createBreakpoints/createBreakpoints.d.mts +3 -54
  39. package/createBreakpoints/createBreakpoints.d.ts +3 -54
  40. package/createBreakpoints/createBreakpoints.js +6 -8
  41. package/createBreakpoints/createBreakpoints.mjs +6 -8
  42. package/createBreakpoints/index.d.mts +0 -1
  43. package/createBreakpoints/index.d.ts +0 -1
  44. package/createTheme/shape.d.mts +2 -2
  45. package/createTheme/shape.d.ts +2 -2
  46. package/cssGrid/cssGrid.d.mts +13 -13
  47. package/cssGrid/cssGrid.d.ts +13 -13
  48. package/cssGrid/cssGrid.js +0 -8
  49. package/cssGrid/cssGrid.mjs +0 -9
  50. package/cssVars/createCssVarsProvider.js +2 -2
  51. package/cssVars/createCssVarsProvider.mjs +2 -2
  52. package/cssVars/useCurrentColorScheme.js +1 -0
  53. package/cssVars/useCurrentColorScheme.mjs +1 -0
  54. package/display/display.d.mts +49 -1
  55. package/display/display.d.ts +49 -1
  56. package/display/display.js +2 -1
  57. package/display/display.mjs +2 -1
  58. package/flexbox/flexbox.d.mts +14 -14
  59. package/flexbox/flexbox.d.ts +14 -14
  60. package/getThemeValue/getThemeValue.d.mts +2 -1
  61. package/getThemeValue/getThemeValue.d.ts +2 -1
  62. package/getThemeValue/getThemeValue.js +6 -2
  63. package/getThemeValue/getThemeValue.mjs +7 -3
  64. package/index.js +1 -1
  65. package/index.mjs +1 -1
  66. package/memoize/memoize.d.mts +1 -1
  67. package/memoize/memoize.d.ts +1 -1
  68. package/package.json +59 -59
  69. package/palette/palette.d.mts +4 -3
  70. package/palette/palette.d.ts +4 -3
  71. package/palette/palette.js +1 -0
  72. package/palette/palette.mjs +2 -0
  73. package/positions/positions.d.mts +49 -1
  74. package/positions/positions.d.ts +49 -1
  75. package/positions/positions.js +2 -1
  76. package/positions/positions.mjs +2 -1
  77. package/propsToClassKey/propsToClassKey.d.mts +5 -0
  78. package/propsToClassKey/propsToClassKey.d.ts +5 -0
  79. package/propsToClassKey/propsToClassKey.js +1 -1
  80. package/propsToClassKey/propsToClassKey.mjs +1 -1
  81. package/shadows/shadows.d.mts +4 -4
  82. package/shadows/shadows.d.ts +4 -4
  83. package/sizing/sizing.d.mts +10 -10
  84. package/sizing/sizing.d.ts +10 -10
  85. package/sizing/sizing.js +7 -2
  86. package/sizing/sizing.mjs +5 -1
  87. package/spacing/spacing.d.mts +10 -14
  88. package/spacing/spacing.d.ts +10 -14
  89. package/spacing/spacing.js +17 -13
  90. package/spacing/spacing.mjs +16 -9
  91. package/styleFunctionSx/defaultSxConfig.d.mts +1 -1
  92. package/styleFunctionSx/defaultSxConfig.d.ts +1 -1
  93. package/styleFunctionSx/extendSxProp.d.mts +4 -2
  94. package/styleFunctionSx/extendSxProp.d.ts +4 -2
  95. package/styled/styled.d.mts +1 -1
  96. package/styled/styled.d.ts +1 -1
  97. package/typography/typography.d.mts +10 -10
  98. package/typography/typography.d.ts +10 -10
  99. package/useTheme/useTheme.d.mts +4 -2
  100. package/useTheme/useTheme.d.ts +4 -2
  101. package/useThemeProps/getThemeProps.d.mts +2 -2
  102. package/useThemeProps/getThemeProps.d.ts +2 -2
  103. package/useThemeProps/index.d.mts +1 -1
  104. package/useThemeProps/index.d.ts +1 -1
  105. package/useThemeProps/useThemeProps.js +7 -6
  106. package/useThemeProps/useThemeProps.mjs +7 -6
  107. package/useThemeWithoutDefault/useThemeWithoutDefault.d.mts +2 -1
  108. package/useThemeWithoutDefault/useThemeWithoutDefault.d.ts +2 -1
  109. package/useThemeWithoutDefault/useThemeWithoutDefault.js +2 -2
  110. package/useThemeWithoutDefault/useThemeWithoutDefault.mjs +2 -2
  111. package/version/index.js +2 -2
  112. package/version/index.mjs +2 -2
@@ -1,4 +1,52 @@
1
- import { PropsFor, SimpleStyleFunction } from "../style/index.mjs";
1
+ import type { PropsFor, SimpleStyleFunction } from "../style/index.mjs";
2
+ export declare const position: import("../index.mjs").StyleFunction<{
3
+ position?: unknown;
4
+ } & {
5
+ theme?: object | undefined;
6
+ }> & {
7
+ filterProps: string[];
8
+ propTypes: any;
9
+ };
10
+ export declare const zIndex: import("../index.mjs").StyleFunction<{
11
+ zIndex?: unknown;
12
+ } & {
13
+ theme?: object | undefined;
14
+ }> & {
15
+ filterProps: string[];
16
+ propTypes: any;
17
+ };
18
+ export declare const top: import("../index.mjs").StyleFunction<{
19
+ top?: unknown;
20
+ } & {
21
+ theme?: object | undefined;
22
+ }> & {
23
+ filterProps: string[];
24
+ propTypes: any;
25
+ };
26
+ export declare const right: import("../index.mjs").StyleFunction<{
27
+ right?: unknown;
28
+ } & {
29
+ theme?: object | undefined;
30
+ }> & {
31
+ filterProps: string[];
32
+ propTypes: any;
33
+ };
34
+ export declare const bottom: import("../index.mjs").StyleFunction<{
35
+ bottom?: unknown;
36
+ } & {
37
+ theme?: object | undefined;
38
+ }> & {
39
+ filterProps: string[];
40
+ propTypes: any;
41
+ };
42
+ export declare const left: import("../index.mjs").StyleFunction<{
43
+ left?: unknown;
44
+ } & {
45
+ theme?: object | undefined;
46
+ }> & {
47
+ filterProps: string[];
48
+ propTypes: any;
49
+ };
2
50
  declare const positions: SimpleStyleFunction<'zIndex' | 'position' | 'top' | 'right' | 'bottom' | 'left'>;
3
51
  export type PositionsProps = PropsFor<typeof positions>;
4
52
  export default positions;
@@ -1,4 +1,52 @@
1
- import { PropsFor, SimpleStyleFunction } from "../style/index.js";
1
+ import type { PropsFor, SimpleStyleFunction } from "../style/index.js";
2
+ export declare const position: import("../index.js").StyleFunction<{
3
+ position?: unknown;
4
+ } & {
5
+ theme?: object | undefined;
6
+ }> & {
7
+ filterProps: string[];
8
+ propTypes: any;
9
+ };
10
+ export declare const zIndex: import("../index.js").StyleFunction<{
11
+ zIndex?: unknown;
12
+ } & {
13
+ theme?: object | undefined;
14
+ }> & {
15
+ filterProps: string[];
16
+ propTypes: any;
17
+ };
18
+ export declare const top: import("../index.js").StyleFunction<{
19
+ top?: unknown;
20
+ } & {
21
+ theme?: object | undefined;
22
+ }> & {
23
+ filterProps: string[];
24
+ propTypes: any;
25
+ };
26
+ export declare const right: import("../index.js").StyleFunction<{
27
+ right?: unknown;
28
+ } & {
29
+ theme?: object | undefined;
30
+ }> & {
31
+ filterProps: string[];
32
+ propTypes: any;
33
+ };
34
+ export declare const bottom: import("../index.js").StyleFunction<{
35
+ bottom?: unknown;
36
+ } & {
37
+ theme?: object | undefined;
38
+ }> & {
39
+ filterProps: string[];
40
+ propTypes: any;
41
+ };
42
+ export declare const left: import("../index.js").StyleFunction<{
43
+ left?: unknown;
44
+ } & {
45
+ theme?: object | undefined;
46
+ }> & {
47
+ filterProps: string[];
48
+ propTypes: any;
49
+ };
2
50
  declare const positions: SimpleStyleFunction<'zIndex' | 'position' | 'top' | 'right' | 'bottom' | 'left'>;
3
51
  export type PositionsProps = PropsFor<typeof positions>;
4
52
  export default positions;
@@ -26,4 +26,5 @@ const bottom = exports.bottom = (0, _style.default)({
26
26
  const left = exports.left = (0, _style.default)({
27
27
  prop: 'left'
28
28
  });
29
- var _default = exports.default = (0, _compose.default)(position, zIndex, top, right, bottom, left);
29
+ const positions = (0, _compose.default)(position, zIndex, top, right, bottom, left);
30
+ var _default = exports.default = positions;
@@ -19,4 +19,5 @@ export const bottom = style({
19
19
  export const left = style({
20
20
  prop: 'left'
21
21
  });
22
- export default compose(position, zIndex, top, right, bottom, left);
22
+ const positions = compose(position, zIndex, top, right, bottom, left);
23
+ export default positions;
@@ -1 +1,6 @@
1
+ /**
2
+ * Generates string classKey based on the properties provided. It starts with the
3
+ * variant if defined, and then it appends all other properties in alphabetical order.
4
+ * @param props - the properties for which the classKey should be created.
5
+ */
1
6
  export default function propsToClassKey(props: object): string;
@@ -1 +1,6 @@
1
+ /**
2
+ * Generates string classKey based on the properties provided. It starts with the
3
+ * variant if defined, and then it appends all other properties in alphabetical order.
4
+ * @param props - the properties for which the classKey should be created.
5
+ */
1
6
  export default function propsToClassKey(props: object): string;
@@ -13,7 +13,7 @@ function isEmpty(string) {
13
13
  /**
14
14
  * Generates string classKey based on the properties provided. It starts with the
15
15
  * variant if defined, and then it appends all other properties in alphabetical order.
16
- * @param {object} props - the properties for which the classKey should be created.
16
+ * @param props - the properties for which the classKey should be created.
17
17
  */
18
18
  function propsToClassKey(props) {
19
19
  const {
@@ -6,7 +6,7 @@ function isEmpty(string) {
6
6
  /**
7
7
  * Generates string classKey based on the properties provided. It starts with the
8
8
  * variant if defined, and then it appends all other properties in alphabetical order.
9
- * @param {object} props - the properties for which the classKey should be created.
9
+ * @param props - the properties for which the classKey should be created.
10
10
  */
11
11
  export default function propsToClassKey(props) {
12
12
  const {
@@ -1,4 +1,4 @@
1
- import { PropsFor, SimpleStyleFunction } from "../style/index.mjs";
2
- declare const shadows: SimpleStyleFunction<'boxShadow'>;
3
- export type ShadowsProps = PropsFor<typeof shadows>;
4
- export default shadows;
1
+ import type { PropsFor, SimpleStyleFunction } from "../style/index.mjs";
2
+ declare const boxShadow: SimpleStyleFunction<'boxShadow'>;
3
+ export type ShadowsProps = PropsFor<typeof boxShadow>;
4
+ export default boxShadow;
@@ -1,4 +1,4 @@
1
- import { PropsFor, SimpleStyleFunction } from "../style/index.js";
2
- declare const shadows: SimpleStyleFunction<'boxShadow'>;
3
- export type ShadowsProps = PropsFor<typeof shadows>;
4
- export default shadows;
1
+ import type { PropsFor, SimpleStyleFunction } from "../style/index.js";
2
+ declare const boxShadow: SimpleStyleFunction<'boxShadow'>;
3
+ export type ShadowsProps = PropsFor<typeof boxShadow>;
4
+ export default boxShadow;
@@ -1,13 +1,13 @@
1
- import { PropsFor, SimpleStyleFunction } from "../style/index.mjs";
2
- export const width: SimpleStyleFunction<'width'>;
3
- export const maxWidth: SimpleStyleFunction<'maxWidth'>;
4
- export const minWidth: SimpleStyleFunction<'minWidth'>;
5
- export const height: SimpleStyleFunction<'height'>;
6
- export const maxHeight: SimpleStyleFunction<'maxHeight'>;
7
- export const minHeight: SimpleStyleFunction<'minHeight'>;
8
- export const sizeWidth: SimpleStyleFunction<'sizeWidth'>;
9
- export const sizeHeight: SimpleStyleFunction<'sizeHeight'>;
10
- export const boxSizing: SimpleStyleFunction<'boxSizing'>;
1
+ import type { PropsFor, SimpleStyleFunction } from "../style/index.mjs";
2
+ export declare const width: SimpleStyleFunction<'width'>;
3
+ export declare const maxWidth: SimpleStyleFunction<'maxWidth'>;
4
+ export declare const minWidth: SimpleStyleFunction<'minWidth'>;
5
+ export declare const height: SimpleStyleFunction<'height'>;
6
+ export declare const maxHeight: SimpleStyleFunction<'maxHeight'>;
7
+ export declare const minHeight: SimpleStyleFunction<'minHeight'>;
8
+ export declare const sizeWidth: SimpleStyleFunction<'sizeWidth'>;
9
+ export declare const sizeHeight: SimpleStyleFunction<'sizeHeight'>;
10
+ export declare const boxSizing: SimpleStyleFunction<'boxSizing'>;
11
11
  declare const sizing: SimpleStyleFunction<'width' | 'maxWidth' | 'minWidth' | 'height' | 'maxHeight' | 'minHeight' | 'sizeWidth' | 'sizeHeight' | 'boxSizing'>;
12
12
  export type SizingProps = PropsFor<typeof sizing>;
13
13
  export default sizing;
@@ -1,13 +1,13 @@
1
- import { PropsFor, SimpleStyleFunction } from "../style/index.js";
2
- export const width: SimpleStyleFunction<'width'>;
3
- export const maxWidth: SimpleStyleFunction<'maxWidth'>;
4
- export const minWidth: SimpleStyleFunction<'minWidth'>;
5
- export const height: SimpleStyleFunction<'height'>;
6
- export const maxHeight: SimpleStyleFunction<'maxHeight'>;
7
- export const minHeight: SimpleStyleFunction<'minHeight'>;
8
- export const sizeWidth: SimpleStyleFunction<'sizeWidth'>;
9
- export const sizeHeight: SimpleStyleFunction<'sizeHeight'>;
10
- export const boxSizing: SimpleStyleFunction<'boxSizing'>;
1
+ import type { PropsFor, SimpleStyleFunction } from "../style/index.js";
2
+ export declare const width: SimpleStyleFunction<'width'>;
3
+ export declare const maxWidth: SimpleStyleFunction<'maxWidth'>;
4
+ export declare const minWidth: SimpleStyleFunction<'minWidth'>;
5
+ export declare const height: SimpleStyleFunction<'height'>;
6
+ export declare const maxHeight: SimpleStyleFunction<'maxHeight'>;
7
+ export declare const minHeight: SimpleStyleFunction<'minHeight'>;
8
+ export declare const sizeWidth: SimpleStyleFunction<'sizeWidth'>;
9
+ export declare const sizeHeight: SimpleStyleFunction<'sizeHeight'>;
10
+ export declare const boxSizing: SimpleStyleFunction<'boxSizing'>;
11
11
  declare const sizing: SimpleStyleFunction<'width' | 'maxWidth' | 'minWidth' | 'height' | 'maxHeight' | 'minHeight' | 'sizeWidth' | 'sizeHeight' | 'boxSizing'>;
12
12
  export type SizingProps = PropsFor<typeof sizing>;
13
13
  export default sizing;
package/sizing/sizing.js CHANGED
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
@@ -9,7 +10,11 @@ exports.sizingTransform = sizingTransform;
9
10
  exports.width = void 0;
10
11
  var _style = _interopRequireDefault(require("../style"));
11
12
  var _compose = _interopRequireDefault(require("../compose"));
12
- var _breakpoints = require("../breakpoints");
13
+ var _breakpoints = _interopRequireWildcard(require("../breakpoints"));
14
+ var breakpointsModule = _breakpoints;
15
+ const breakpointsValues = breakpointsModule.values;
16
+
17
+ /** @internal */
13
18
  function sizingTransform(value) {
14
19
  return value <= 1 && value !== 0 ? `${value * 100}%` : value;
15
20
  }
@@ -20,7 +25,7 @@ const width = exports.width = (0, _style.default)({
20
25
  const maxWidth = props => {
21
26
  if (props.maxWidth !== undefined && props.maxWidth !== null) {
22
27
  const styleFromPropValue = propValue => {
23
- const breakpoint = props.theme?.breakpoints?.values?.[propValue] || _breakpoints.values[propValue];
28
+ const breakpoint = props.theme?.breakpoints?.values?.[propValue] || breakpointsValues[propValue];
24
29
  if (!breakpoint) {
25
30
  return {
26
31
  maxWidth: sizingTransform(propValue)
package/sizing/sizing.mjs CHANGED
@@ -1,6 +1,10 @@
1
1
  import style from "../style/index.mjs";
2
2
  import compose from "../compose/index.mjs";
3
- import { handleBreakpoints, values as breakpointsValues } from "../breakpoints/index.mjs";
3
+ import { handleBreakpoints } from "../breakpoints/index.mjs";
4
+ import * as breakpointsModule from "../breakpoints/index.mjs";
5
+ const breakpointsValues = breakpointsModule.values;
6
+
7
+ /** @internal */
4
8
  export function sizingTransform(value) {
5
9
  return value <= 1 && value !== 0 ? `${value * 100}%` : value;
6
10
  }
@@ -1,20 +1,16 @@
1
- import { SimpleStyleFunction, PropsFor } from "../style/index.mjs";
1
+ import type { SimpleStyleFunction, PropsFor } from "../style/index.mjs";
2
2
  export type SpacingValueType = string | number | null | undefined;
3
- export type SpacingProps = PropsFor<typeof spacing>;
4
- export function createUnarySpacing<Spacing>(theme: {
3
+ export declare function createUnaryUnit<Spacing>(theme: {
5
4
  spacing: Spacing;
6
- }): Spacing extends number ? (abs: number | string) => number | number : Spacing extends any[] ? <Index extends number>(abs: Index | string) => Spacing[Index] | string : Spacing extends ((...args: unknown[]) => unknown) ? Spacing :
7
- // warns in Dev
8
- () => undefined;
9
- export function createUnaryUnit<Spacing>(theme: {
5
+ }, themeKey: string, defaultValue: Spacing, propName: string): Spacing extends number ? (abs: SpacingValueType) => number | number : Spacing extends any[] ? <Index extends number>(abs: Index | string) => Spacing[Index] | string : Spacing extends ((...args: unknown[]) => unknown) ? Spacing : () => undefined;
6
+ export declare function createUnarySpacing<Spacing>(theme: {
10
7
  spacing: Spacing;
11
- }, themeKey: string, defaultValue: Spacing, propName: string): Spacing extends number ? (abs: SpacingValueType) => number | number : Spacing extends any[] ? <Index extends number>(abs: Index | string) => Spacing[Index] | string : Spacing extends ((...args: unknown[]) => unknown) ? Spacing :
12
- // warns in Dev
13
- () => undefined;
14
- export const margin: SimpleStyleFunction<'m' | 'mt' | 'mr' | 'mb' | 'ml' | 'mx' | 'my' | 'margin' | 'marginTop' | 'marginRight' | 'marginBottom' | 'marginLeft' | 'marginX' | 'marginY' | 'marginInline' | 'marginInlineStart' | 'marginInlineEnd' | 'marginBlock' | 'marginBlockStart' | 'marginBlockEnd'>;
8
+ }): Spacing extends number ? (abs: number | string) => number | number : Spacing extends any[] ? <Index extends number>(abs: Index | string) => Spacing[Index] | string : Spacing extends ((...args: unknown[]) => unknown) ? Spacing : () => undefined;
9
+ export declare function getValue(transformer: (prop: SpacingValueType) => SpacingValueType, propValue: SpacingValueType): SpacingValueType;
10
+ export declare const margin: SimpleStyleFunction<'m' | 'mt' | 'mr' | 'mb' | 'ml' | 'mx' | 'my' | 'margin' | 'marginTop' | 'marginRight' | 'marginBottom' | 'marginLeft' | 'marginX' | 'marginY' | 'marginInline' | 'marginInlineStart' | 'marginInlineEnd' | 'marginBlock' | 'marginBlockStart' | 'marginBlockEnd'>;
15
11
  export type MarginProps = PropsFor<typeof margin>;
16
- export const padding: SimpleStyleFunction<'p' | 'pt' | 'pr' | 'pb' | 'pl' | 'px' | 'py' | 'padding' | 'paddingTop' | 'paddingRight' | 'paddingBottom' | 'paddingLeft' | 'paddingX' | 'paddingY' | 'paddingInline' | 'paddingInlineStart' | 'paddingInlineEnd' | 'paddingBlock' | 'paddingBlockStart' | 'paddingBlockEnd'>;
17
- declare const spacing: SimpleStyleFunction<'m' | 'mt' | 'mr' | 'mb' | 'ml' | 'mx' | 'my' | 'p' | 'pt' | 'pr' | 'pb' | 'pl' | 'px' | 'py' | 'margin' | 'marginTop' | 'marginRight' | 'marginBottom' | 'marginLeft' | 'marginX' | 'marginY' | 'marginInline' | 'marginInlineStart' | 'marginInlineEnd' | 'marginBlock' | 'marginBlockStart' | 'marginBlockEnd' | 'padding' | 'paddingTop' | 'paddingRight' | 'paddingBottom' | 'paddingLeft' | 'paddingX' | 'paddingY' | 'paddingInline' | 'paddingInlineStart' | 'paddingInlineEnd' | 'paddingBlock' | 'paddingBlockStart' | 'paddingBlockEnd'>;
18
- export function getValue(transformer: (prop: SpacingValueType) => SpacingValueType, propValue: SpacingValueType): SpacingValueType;
12
+ export declare const padding: SimpleStyleFunction<'p' | 'pt' | 'pr' | 'pb' | 'pl' | 'px' | 'py' | 'padding' | 'paddingTop' | 'paddingRight' | 'paddingBottom' | 'paddingLeft' | 'paddingX' | 'paddingY' | 'paddingInline' | 'paddingInlineStart' | 'paddingInlineEnd' | 'paddingBlock' | 'paddingBlockStart' | 'paddingBlockEnd'>;
19
13
  export type PaddingProps = PropsFor<typeof padding>;
14
+ declare const spacing: SimpleStyleFunction<'m' | 'mt' | 'mr' | 'mb' | 'ml' | 'mx' | 'my' | 'p' | 'pt' | 'pr' | 'pb' | 'pl' | 'px' | 'py' | 'margin' | 'marginTop' | 'marginRight' | 'marginBottom' | 'marginLeft' | 'marginX' | 'marginY' | 'marginInline' | 'marginInlineStart' | 'marginInlineEnd' | 'marginBlock' | 'marginBlockStart' | 'marginBlockEnd' | 'padding' | 'paddingTop' | 'paddingRight' | 'paddingBottom' | 'paddingLeft' | 'paddingX' | 'paddingY' | 'paddingInline' | 'paddingInlineStart' | 'paddingInlineEnd' | 'paddingBlock' | 'paddingBlockStart' | 'paddingBlockEnd'>;
15
+ export type SpacingProps = PropsFor<typeof spacing>;
20
16
  export default spacing;
@@ -1,20 +1,16 @@
1
- import { SimpleStyleFunction, PropsFor } from "../style/index.js";
1
+ import type { SimpleStyleFunction, PropsFor } from "../style/index.js";
2
2
  export type SpacingValueType = string | number | null | undefined;
3
- export type SpacingProps = PropsFor<typeof spacing>;
4
- export function createUnarySpacing<Spacing>(theme: {
3
+ export declare function createUnaryUnit<Spacing>(theme: {
5
4
  spacing: Spacing;
6
- }): Spacing extends number ? (abs: number | string) => number | number : Spacing extends any[] ? <Index extends number>(abs: Index | string) => Spacing[Index] | string : Spacing extends ((...args: unknown[]) => unknown) ? Spacing :
7
- // warns in Dev
8
- () => undefined;
9
- export function createUnaryUnit<Spacing>(theme: {
5
+ }, themeKey: string, defaultValue: Spacing, propName: string): Spacing extends number ? (abs: SpacingValueType) => number | number : Spacing extends any[] ? <Index extends number>(abs: Index | string) => Spacing[Index] | string : Spacing extends ((...args: unknown[]) => unknown) ? Spacing : () => undefined;
6
+ export declare function createUnarySpacing<Spacing>(theme: {
10
7
  spacing: Spacing;
11
- }, themeKey: string, defaultValue: Spacing, propName: string): Spacing extends number ? (abs: SpacingValueType) => number | number : Spacing extends any[] ? <Index extends number>(abs: Index | string) => Spacing[Index] | string : Spacing extends ((...args: unknown[]) => unknown) ? Spacing :
12
- // warns in Dev
13
- () => undefined;
14
- export const margin: SimpleStyleFunction<'m' | 'mt' | 'mr' | 'mb' | 'ml' | 'mx' | 'my' | 'margin' | 'marginTop' | 'marginRight' | 'marginBottom' | 'marginLeft' | 'marginX' | 'marginY' | 'marginInline' | 'marginInlineStart' | 'marginInlineEnd' | 'marginBlock' | 'marginBlockStart' | 'marginBlockEnd'>;
8
+ }): Spacing extends number ? (abs: number | string) => number | number : Spacing extends any[] ? <Index extends number>(abs: Index | string) => Spacing[Index] | string : Spacing extends ((...args: unknown[]) => unknown) ? Spacing : () => undefined;
9
+ export declare function getValue(transformer: (prop: SpacingValueType) => SpacingValueType, propValue: SpacingValueType): SpacingValueType;
10
+ export declare const margin: SimpleStyleFunction<'m' | 'mt' | 'mr' | 'mb' | 'ml' | 'mx' | 'my' | 'margin' | 'marginTop' | 'marginRight' | 'marginBottom' | 'marginLeft' | 'marginX' | 'marginY' | 'marginInline' | 'marginInlineStart' | 'marginInlineEnd' | 'marginBlock' | 'marginBlockStart' | 'marginBlockEnd'>;
15
11
  export type MarginProps = PropsFor<typeof margin>;
16
- export const padding: SimpleStyleFunction<'p' | 'pt' | 'pr' | 'pb' | 'pl' | 'px' | 'py' | 'padding' | 'paddingTop' | 'paddingRight' | 'paddingBottom' | 'paddingLeft' | 'paddingX' | 'paddingY' | 'paddingInline' | 'paddingInlineStart' | 'paddingInlineEnd' | 'paddingBlock' | 'paddingBlockStart' | 'paddingBlockEnd'>;
17
- declare const spacing: SimpleStyleFunction<'m' | 'mt' | 'mr' | 'mb' | 'ml' | 'mx' | 'my' | 'p' | 'pt' | 'pr' | 'pb' | 'pl' | 'px' | 'py' | 'margin' | 'marginTop' | 'marginRight' | 'marginBottom' | 'marginLeft' | 'marginX' | 'marginY' | 'marginInline' | 'marginInlineStart' | 'marginInlineEnd' | 'marginBlock' | 'marginBlockStart' | 'marginBlockEnd' | 'padding' | 'paddingTop' | 'paddingRight' | 'paddingBottom' | 'paddingLeft' | 'paddingX' | 'paddingY' | 'paddingInline' | 'paddingInlineStart' | 'paddingInlineEnd' | 'paddingBlock' | 'paddingBlockStart' | 'paddingBlockEnd'>;
18
- export function getValue(transformer: (prop: SpacingValueType) => SpacingValueType, propValue: SpacingValueType): SpacingValueType;
12
+ export declare const padding: SimpleStyleFunction<'p' | 'pt' | 'pr' | 'pb' | 'pl' | 'px' | 'py' | 'padding' | 'paddingTop' | 'paddingRight' | 'paddingBottom' | 'paddingLeft' | 'paddingX' | 'paddingY' | 'paddingInline' | 'paddingInlineStart' | 'paddingInlineEnd' | 'paddingBlock' | 'paddingBlockStart' | 'paddingBlockEnd'>;
19
13
  export type PaddingProps = PropsFor<typeof padding>;
14
+ declare const spacing: SimpleStyleFunction<'m' | 'mt' | 'mr' | 'mb' | 'ml' | 'mx' | 'my' | 'p' | 'pt' | 'pr' | 'pb' | 'pl' | 'px' | 'py' | 'margin' | 'marginTop' | 'marginRight' | 'marginBottom' | 'marginLeft' | 'marginX' | 'marginY' | 'marginInline' | 'marginInlineStart' | 'marginInlineEnd' | 'marginBlock' | 'marginBlockStart' | 'marginBlockEnd' | 'padding' | 'paddingTop' | 'paddingRight' | 'paddingBottom' | 'paddingLeft' | 'paddingX' | 'paddingY' | 'paddingInline' | 'paddingInlineStart' | 'paddingInlineEnd' | 'paddingBlock' | 'paddingBlockStart' | 'paddingBlockEnd'>;
15
+ export type SpacingProps = PropsFor<typeof spacing>;
20
16
  export default spacing;
@@ -8,10 +8,7 @@ exports.createUnarySpacing = createUnarySpacing;
8
8
  exports.createUnaryUnit = createUnaryUnit;
9
9
  exports.default = void 0;
10
10
  exports.getValue = getValue;
11
- exports.margin = margin;
12
- exports.marginKeys = void 0;
13
- exports.padding = padding;
14
- exports.paddingKeys = void 0;
11
+ exports.paddingKeys = exports.padding = exports.marginKeys = exports.margin = void 0;
15
12
  var _responsivePropType = _interopRequireDefault(require("../responsivePropType"));
16
13
  var _breakpoints = require("../breakpoints");
17
14
  var _style = require("../style");
@@ -53,7 +50,11 @@ for (const keyProperty in properties) {
53
50
  for (const key in aliases) {
54
51
  CSS_PROPERTIES[key] = CSS_PROPERTIES[aliases[key]];
55
52
  }
53
+
54
+ /** @internal */
56
55
  const marginKeys = exports.marginKeys = new Set(['m', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'marginInline', 'marginInlineStart', 'marginInlineEnd', 'marginBlock', 'marginBlockStart', 'marginBlockEnd']);
56
+
57
+ /** @internal */
57
58
  const paddingKeys = exports.paddingKeys = new Set(['p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'paddingX', 'paddingY', 'paddingInline', 'paddingInlineStart', 'paddingInlineEnd', 'paddingBlock', 'paddingBlockStart', 'paddingBlockEnd']);
58
59
  const spacingKeys = new Set([...marginKeys, ...paddingKeys]);
59
60
  function createUnaryUnit(theme, themeKey, defaultValue, propName) {
@@ -145,28 +146,31 @@ function style(props, keys) {
145
146
  }
146
147
  return result;
147
148
  }
148
- function margin(props) {
149
+ function marginFn(props) {
149
150
  return style(props, marginKeys);
150
151
  }
151
- margin.propTypes = process.env.NODE_ENV !== 'production' ? Array.from(marginKeys).reduce((obj, key) => {
152
+ marginFn.propTypes = process.env.NODE_ENV !== 'production' ? Array.from(marginKeys).reduce((obj, key) => {
152
153
  obj[key] = _responsivePropType.default;
153
154
  return obj;
154
155
  }, {}) : {};
155
- margin.filterProps = marginKeys;
156
- function padding(props) {
156
+ marginFn.filterProps = marginKeys;
157
+ const margin = exports.margin = marginFn;
158
+ function paddingFn(props) {
157
159
  return style(props, paddingKeys);
158
160
  }
159
- padding.propTypes = process.env.NODE_ENV !== 'production' ? Array.from(paddingKeys).reduce((obj, key) => {
161
+ paddingFn.propTypes = process.env.NODE_ENV !== 'production' ? Array.from(paddingKeys).reduce((obj, key) => {
160
162
  obj[key] = _responsivePropType.default;
161
163
  return obj;
162
164
  }, {}) : {};
163
- padding.filterProps = paddingKeys;
164
- function spacing(props) {
165
+ paddingFn.filterProps = paddingKeys;
166
+ const padding = exports.padding = paddingFn;
167
+ function spacingFn(props) {
165
168
  return style(props, spacingKeys);
166
169
  }
167
- spacing.propTypes = process.env.NODE_ENV !== 'production' ? Array.from(spacingKeys).reduce((obj, key) => {
170
+ spacingFn.propTypes = process.env.NODE_ENV !== 'production' ? Array.from(spacingKeys).reduce((obj, key) => {
168
171
  obj[key] = _responsivePropType.default;
169
172
  return obj;
170
173
  }, {}) : {};
171
- spacing.filterProps = spacingKeys;
174
+ spacingFn.filterProps = spacingKeys;
175
+ const spacing = spacingFn;
172
176
  var _default = exports.default = spacing;
@@ -40,7 +40,11 @@ for (const keyProperty in properties) {
40
40
  for (const key in aliases) {
41
41
  CSS_PROPERTIES[key] = CSS_PROPERTIES[aliases[key]];
42
42
  }
43
+
44
+ /** @internal */
43
45
  export const marginKeys = new Set(['m', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'marginInline', 'marginInlineStart', 'marginInlineEnd', 'marginBlock', 'marginBlockStart', 'marginBlockEnd']);
46
+
47
+ /** @internal */
44
48
  export const paddingKeys = new Set(['p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'paddingX', 'paddingY', 'paddingInline', 'paddingInlineStart', 'paddingInlineEnd', 'paddingBlock', 'paddingBlockStart', 'paddingBlockEnd']);
45
49
  const spacingKeys = new Set([...marginKeys, ...paddingKeys]);
46
50
  export function createUnaryUnit(theme, themeKey, defaultValue, propName) {
@@ -132,28 +136,31 @@ function style(props, keys) {
132
136
  }
133
137
  return result;
134
138
  }
135
- export function margin(props) {
139
+ function marginFn(props) {
136
140
  return style(props, marginKeys);
137
141
  }
138
- margin.propTypes = process.env.NODE_ENV !== 'production' ? Array.from(marginKeys).reduce((obj, key) => {
142
+ marginFn.propTypes = process.env.NODE_ENV !== 'production' ? Array.from(marginKeys).reduce((obj, key) => {
139
143
  obj[key] = responsivePropType;
140
144
  return obj;
141
145
  }, {}) : {};
142
- margin.filterProps = marginKeys;
143
- export function padding(props) {
146
+ marginFn.filterProps = marginKeys;
147
+ export const margin = marginFn;
148
+ function paddingFn(props) {
144
149
  return style(props, paddingKeys);
145
150
  }
146
- padding.propTypes = process.env.NODE_ENV !== 'production' ? Array.from(paddingKeys).reduce((obj, key) => {
151
+ paddingFn.propTypes = process.env.NODE_ENV !== 'production' ? Array.from(paddingKeys).reduce((obj, key) => {
147
152
  obj[key] = responsivePropType;
148
153
  return obj;
149
154
  }, {}) : {};
150
- padding.filterProps = paddingKeys;
151
- function spacing(props) {
155
+ paddingFn.filterProps = paddingKeys;
156
+ export const padding = paddingFn;
157
+ function spacingFn(props) {
152
158
  return style(props, spacingKeys);
153
159
  }
154
- spacing.propTypes = process.env.NODE_ENV !== 'production' ? Array.from(spacingKeys).reduce((obj, key) => {
160
+ spacingFn.propTypes = process.env.NODE_ENV !== 'production' ? Array.from(spacingKeys).reduce((obj, key) => {
155
161
  obj[key] = responsivePropType;
156
162
  return obj;
157
163
  }, {}) : {};
158
- spacing.filterProps = spacingKeys;
164
+ spacingFn.filterProps = spacingKeys;
165
+ const spacing = spacingFn;
159
166
  export default spacing;
@@ -1,4 +1,4 @@
1
- import { StyleFunction, TransformFunction } from "../style/index.mjs";
1
+ import type { StyleFunction, TransformFunction } from "../style/index.mjs";
2
2
  type SimpleStyleFunction<PropKey extends keyof any> = StyleFunction<Partial<Record<PropKey, any>>>;
3
3
  export interface SxConfigRecord {
4
4
  cssProperty?: keyof React.CSSProperties | false | undefined;
@@ -1,4 +1,4 @@
1
- import { StyleFunction, TransformFunction } from "../style/index.js";
1
+ import type { StyleFunction, TransformFunction } from "../style/index.js";
2
2
  type SimpleStyleFunction<PropKey extends keyof any> = StyleFunction<Partial<Record<PropKey, any>>>;
3
3
  export interface SxConfigRecord {
4
4
  cssProperty?: keyof React.CSSProperties | false | undefined;
@@ -1,4 +1,6 @@
1
- import { SxProps } from "./styleFunctionSx.mjs";
1
+ import type { SxProps } from "./styleFunctionSx.mjs";
2
2
  export default function extendSxProp<Props extends {
3
3
  sx?: SxProps<any> | undefined;
4
- } = {}>(props: Props): Props;
4
+ } = {
5
+ sx?: SxProps<any> | undefined;
6
+ }>(props: Props): Props;
@@ -1,4 +1,6 @@
1
- import { SxProps } from "./styleFunctionSx.js";
1
+ import type { SxProps } from "./styleFunctionSx.js";
2
2
  export default function extendSxProp<Props extends {
3
3
  sx?: SxProps<any> | undefined;
4
- } = {}>(props: Props): Props;
4
+ } = {
5
+ sx?: SxProps<any> | undefined;
6
+ }>(props: Props): Props;
@@ -1,3 +1,3 @@
1
- import { CreateMUIStyled } from "../createStyled/index.mjs";
1
+ import type { CreateMUIStyled } from "../createStyled/index.mjs";
2
2
  declare const styled: CreateMUIStyled;
3
3
  export default styled;
@@ -1,3 +1,3 @@
1
- import { CreateMUIStyled } from "../createStyled/index.js";
1
+ import type { CreateMUIStyled } from "../createStyled/index.js";
2
2
  declare const styled: CreateMUIStyled;
3
3
  export default styled;
@@ -1,13 +1,13 @@
1
- import { PropsFor, SimpleStyleFunction } from "../style/index.mjs";
2
- export const typographyVariant: SimpleStyleFunction<'typography'>;
3
- export const fontFamily: SimpleStyleFunction<'fontFamily'>;
4
- export const fontSize: SimpleStyleFunction<'fontSize'>;
5
- export const fontStyle: SimpleStyleFunction<'fontStyle'>;
6
- export const fontWeight: SimpleStyleFunction<'fontWeight'>;
7
- export const letterSpacing: SimpleStyleFunction<'letterSpacing'>;
8
- export const lineHeight: SimpleStyleFunction<'lineHeight'>;
9
- export const textAlign: SimpleStyleFunction<'textAlign'>;
10
- export const textTransform: SimpleStyleFunction<'textTransform'>;
1
+ import type { PropsFor, SimpleStyleFunction } from "../style/index.mjs";
2
+ export declare const fontFamily: SimpleStyleFunction<'fontFamily'>;
3
+ export declare const fontSize: SimpleStyleFunction<'fontSize'>;
4
+ export declare const fontStyle: SimpleStyleFunction<'fontStyle'>;
5
+ export declare const fontWeight: SimpleStyleFunction<'fontWeight'>;
6
+ export declare const letterSpacing: SimpleStyleFunction<'letterSpacing'>;
7
+ export declare const textTransform: SimpleStyleFunction<'textTransform'>;
8
+ export declare const lineHeight: SimpleStyleFunction<'lineHeight'>;
9
+ export declare const textAlign: SimpleStyleFunction<'textAlign'>;
10
+ export declare const typographyVariant: SimpleStyleFunction<'typography'>;
11
11
  declare const typography: SimpleStyleFunction<'typography' | 'fontFamily' | 'fontSize' | 'fontStyle' | 'fontWeight' | 'letterSpacing' | 'lineHeight' | 'textAlign' | 'textTransform'>;
12
12
  export type TypographyProps = PropsFor<typeof typography>;
13
13
  export default typography;
@@ -1,13 +1,13 @@
1
- import { PropsFor, SimpleStyleFunction } from "../style/index.js";
2
- export const typographyVariant: SimpleStyleFunction<'typography'>;
3
- export const fontFamily: SimpleStyleFunction<'fontFamily'>;
4
- export const fontSize: SimpleStyleFunction<'fontSize'>;
5
- export const fontStyle: SimpleStyleFunction<'fontStyle'>;
6
- export const fontWeight: SimpleStyleFunction<'fontWeight'>;
7
- export const letterSpacing: SimpleStyleFunction<'letterSpacing'>;
8
- export const lineHeight: SimpleStyleFunction<'lineHeight'>;
9
- export const textAlign: SimpleStyleFunction<'textAlign'>;
10
- export const textTransform: SimpleStyleFunction<'textTransform'>;
1
+ import type { PropsFor, SimpleStyleFunction } from "../style/index.js";
2
+ export declare const fontFamily: SimpleStyleFunction<'fontFamily'>;
3
+ export declare const fontSize: SimpleStyleFunction<'fontSize'>;
4
+ export declare const fontStyle: SimpleStyleFunction<'fontStyle'>;
5
+ export declare const fontWeight: SimpleStyleFunction<'fontWeight'>;
6
+ export declare const letterSpacing: SimpleStyleFunction<'letterSpacing'>;
7
+ export declare const textTransform: SimpleStyleFunction<'textTransform'>;
8
+ export declare const lineHeight: SimpleStyleFunction<'lineHeight'>;
9
+ export declare const textAlign: SimpleStyleFunction<'textAlign'>;
10
+ export declare const typographyVariant: SimpleStyleFunction<'typography'>;
11
11
  declare const typography: SimpleStyleFunction<'typography' | 'fontFamily' | 'fontSize' | 'fontStyle' | 'fontWeight' | 'letterSpacing' | 'lineHeight' | 'textAlign' | 'textTransform'>;
12
12
  export type TypographyProps = PropsFor<typeof typography>;
13
13
  export default typography;
@@ -1,2 +1,4 @@
1
- import { Theme } from "../createTheme/index.mjs";
2
- export default function useTheme<T = Theme>(defaultTheme?: T): T;
1
+ import type { Theme } from "../createTheme/index.mjs";
2
+ export declare const systemDefaultTheme: Theme;
3
+ declare function useTheme<T = Theme>(defaultTheme?: T): T;
4
+ export default useTheme;
@@ -1,2 +1,4 @@
1
- import { Theme } from "../createTheme/index.js";
2
- export default function useTheme<T = Theme>(defaultTheme?: T): T;
1
+ import type { Theme } from "../createTheme/index.js";
2
+ export declare const systemDefaultTheme: Theme;
3
+ declare function useTheme<T = Theme>(defaultTheme?: T): T;
4
+ export default useTheme;
@@ -1,4 +1,3 @@
1
- export {};
2
1
  type ThemedProps<Theme, Name extends keyof any> = Theme extends {
3
2
  components: Record<Name, {
4
3
  defaultProps: infer Props;
@@ -8,4 +7,5 @@ export default function getThemeProps<Theme, Props, Name extends keyof any>(para
8
7
  props: Props;
9
8
  name: Name;
10
9
  theme?: Theme | undefined;
11
- }): Props & ThemedProps<Theme, Name>;
10
+ }): Props & ThemedProps<Theme, Name>;
11
+ export {};
@@ -1,4 +1,3 @@
1
- export {};
2
1
  type ThemedProps<Theme, Name extends keyof any> = Theme extends {
3
2
  components: Record<Name, {
4
3
  defaultProps: infer Props;
@@ -8,4 +7,5 @@ export default function getThemeProps<Theme, Props, Name extends keyof any>(para
8
7
  props: Props;
9
8
  name: Name;
10
9
  theme?: Theme | undefined;
11
- }): Props & ThemedProps<Theme, Name>;
10
+ }): Props & ThemedProps<Theme, Name>;
11
+ export {};
@@ -1,3 +1,3 @@
1
1
  export { default } from "./useThemeProps.mjs";
2
- export * from "./useThemeProps.mjs";
2
+ export type * from "./useThemeProps.mjs";
3
3
  export { default as getThemeProps } from "./getThemeProps.mjs";
@@ -1,3 +1,3 @@
1
1
  export { default } from "./useThemeProps.js";
2
- export * from "./useThemeProps.js";
2
+ export type * from "./useThemeProps.js";
3
3
  export { default as getThemeProps } from "./getThemeProps.js";