@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.
- package/Box/Box.d.mts +15 -19
- package/Box/Box.d.ts +15 -19
- package/Box/Box.js +16 -1
- package/Box/Box.mjs +17 -1
- package/Box/index.js +12 -2
- package/Box/index.mjs +1 -0
- package/CHANGELOG.md +36 -0
- package/Container/index.d.mts +1 -1
- package/Container/index.d.ts +1 -1
- package/Grid/Grid.js +0 -1
- package/Grid/Grid.mjs +0 -1
- package/Grid/GridProps.d.mts +0 -1
- package/Grid/GridProps.d.ts +0 -1
- package/InitColorSchemeScript/InitColorSchemeScript.d.mts +2 -1
- package/InitColorSchemeScript/InitColorSchemeScript.d.ts +2 -1
- package/InitColorSchemeScript/InitColorSchemeScript.js +34 -1
- package/InitColorSchemeScript/InitColorSchemeScript.mjs +33 -1
- package/ThemeProvider/ThemeProvider.d.mts +9 -6
- package/ThemeProvider/ThemeProvider.d.ts +9 -6
- package/ThemeProvider/ThemeProvider.js +3 -2
- package/ThemeProvider/ThemeProvider.mjs +3 -2
- package/ThemeProvider/index.d.mts +1 -1
- package/ThemeProvider/index.d.ts +1 -1
- package/borders/borders.d.mts +14 -12
- package/borders/borders.d.ts +14 -12
- package/borders/borders.js +2 -4
- package/borders/borders.mjs +3 -4
- package/breakpoints/breakpoints.d.mts +13 -16
- package/breakpoints/breakpoints.d.ts +13 -16
- package/breakpoints/breakpoints.js +17 -16
- package/breakpoints/breakpoints.mjs +17 -16
- package/compose/compose.d.mts +3 -10
- package/compose/compose.d.ts +3 -10
- package/compose/compose.js +0 -2
- package/compose/compose.mjs +0 -2
- package/createBox/createBox.d.mts +4 -4
- package/createBox/createBox.d.ts +4 -4
- package/createBreakpoints/createBreakpoints.d.mts +3 -54
- package/createBreakpoints/createBreakpoints.d.ts +3 -54
- package/createBreakpoints/createBreakpoints.js +6 -8
- package/createBreakpoints/createBreakpoints.mjs +6 -8
- package/createBreakpoints/index.d.mts +0 -1
- package/createBreakpoints/index.d.ts +0 -1
- package/createTheme/shape.d.mts +2 -2
- package/createTheme/shape.d.ts +2 -2
- package/cssGrid/cssGrid.d.mts +13 -13
- package/cssGrid/cssGrid.d.ts +13 -13
- package/cssGrid/cssGrid.js +0 -8
- package/cssGrid/cssGrid.mjs +0 -9
- package/cssVars/createCssVarsProvider.js +2 -2
- package/cssVars/createCssVarsProvider.mjs +2 -2
- package/cssVars/useCurrentColorScheme.js +1 -0
- package/cssVars/useCurrentColorScheme.mjs +1 -0
- package/display/display.d.mts +49 -1
- package/display/display.d.ts +49 -1
- package/display/display.js +2 -1
- package/display/display.mjs +2 -1
- package/flexbox/flexbox.d.mts +14 -14
- package/flexbox/flexbox.d.ts +14 -14
- package/getThemeValue/getThemeValue.d.mts +2 -1
- package/getThemeValue/getThemeValue.d.ts +2 -1
- package/getThemeValue/getThemeValue.js +6 -2
- package/getThemeValue/getThemeValue.mjs +7 -3
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/memoize/memoize.d.mts +1 -1
- package/memoize/memoize.d.ts +1 -1
- package/package.json +59 -59
- package/palette/palette.d.mts +4 -3
- package/palette/palette.d.ts +4 -3
- package/palette/palette.js +1 -0
- package/palette/palette.mjs +2 -0
- package/positions/positions.d.mts +49 -1
- package/positions/positions.d.ts +49 -1
- package/positions/positions.js +2 -1
- package/positions/positions.mjs +2 -1
- package/propsToClassKey/propsToClassKey.d.mts +5 -0
- package/propsToClassKey/propsToClassKey.d.ts +5 -0
- package/propsToClassKey/propsToClassKey.js +1 -1
- package/propsToClassKey/propsToClassKey.mjs +1 -1
- package/shadows/shadows.d.mts +4 -4
- package/shadows/shadows.d.ts +4 -4
- package/sizing/sizing.d.mts +10 -10
- package/sizing/sizing.d.ts +10 -10
- package/sizing/sizing.js +7 -2
- package/sizing/sizing.mjs +5 -1
- package/spacing/spacing.d.mts +10 -14
- package/spacing/spacing.d.ts +10 -14
- package/spacing/spacing.js +17 -13
- package/spacing/spacing.mjs +16 -9
- package/styleFunctionSx/defaultSxConfig.d.mts +1 -1
- package/styleFunctionSx/defaultSxConfig.d.ts +1 -1
- package/styleFunctionSx/extendSxProp.d.mts +4 -2
- package/styleFunctionSx/extendSxProp.d.ts +4 -2
- package/styled/styled.d.mts +1 -1
- package/styled/styled.d.ts +1 -1
- package/typography/typography.d.mts +10 -10
- package/typography/typography.d.ts +10 -10
- package/useTheme/useTheme.d.mts +4 -2
- package/useTheme/useTheme.d.ts +4 -2
- package/useThemeProps/getThemeProps.d.mts +2 -2
- package/useThemeProps/getThemeProps.d.ts +2 -2
- package/useThemeProps/index.d.mts +1 -1
- package/useThemeProps/index.d.ts +1 -1
- package/useThemeProps/useThemeProps.js +7 -6
- package/useThemeProps/useThemeProps.mjs +7 -6
- package/useThemeWithoutDefault/useThemeWithoutDefault.d.mts +2 -1
- package/useThemeWithoutDefault/useThemeWithoutDefault.d.ts +2 -1
- package/useThemeWithoutDefault/useThemeWithoutDefault.js +2 -2
- package/useThemeWithoutDefault/useThemeWithoutDefault.mjs +2 -2
- package/version/index.js +2 -2
- 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;
|
package/positions/positions.d.ts
CHANGED
|
@@ -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;
|
package/positions/positions.js
CHANGED
|
@@ -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
|
-
|
|
29
|
+
const positions = (0, _compose.default)(position, zIndex, top, right, bottom, left);
|
|
30
|
+
var _default = exports.default = positions;
|
package/positions/positions.mjs
CHANGED
|
@@ -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
|
|
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
|
|
9
|
+
* @param props - the properties for which the classKey should be created.
|
|
10
10
|
*/
|
|
11
11
|
export default function propsToClassKey(props) {
|
|
12
12
|
const {
|
package/shadows/shadows.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PropsFor, SimpleStyleFunction } from "../style/index.mjs";
|
|
2
|
-
declare const
|
|
3
|
-
export type ShadowsProps = PropsFor<typeof
|
|
4
|
-
export default
|
|
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;
|
package/shadows/shadows.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PropsFor, SimpleStyleFunction } from "../style/index.js";
|
|
2
|
-
declare const
|
|
3
|
-
export type ShadowsProps = PropsFor<typeof
|
|
4
|
-
export default
|
|
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;
|
package/sizing/sizing.d.mts
CHANGED
|
@@ -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;
|
package/sizing/sizing.d.ts
CHANGED
|
@@ -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] ||
|
|
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
|
|
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
|
}
|
package/spacing/spacing.d.mts
CHANGED
|
@@ -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
|
|
4
|
-
export function createUnarySpacing<Spacing>(theme: {
|
|
3
|
+
export declare function createUnaryUnit<Spacing>(theme: {
|
|
5
4
|
spacing: Spacing;
|
|
6
|
-
}): Spacing extends number ? (abs:
|
|
7
|
-
|
|
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
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
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;
|
package/spacing/spacing.d.ts
CHANGED
|
@@ -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
|
|
4
|
-
export function createUnarySpacing<Spacing>(theme: {
|
|
3
|
+
export declare function createUnaryUnit<Spacing>(theme: {
|
|
5
4
|
spacing: Spacing;
|
|
6
|
-
}): Spacing extends number ? (abs:
|
|
7
|
-
|
|
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
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
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;
|
package/spacing/spacing.js
CHANGED
|
@@ -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 =
|
|
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
|
|
149
|
+
function marginFn(props) {
|
|
149
150
|
return style(props, marginKeys);
|
|
150
151
|
}
|
|
151
|
-
|
|
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
|
-
|
|
156
|
-
|
|
156
|
+
marginFn.filterProps = marginKeys;
|
|
157
|
+
const margin = exports.margin = marginFn;
|
|
158
|
+
function paddingFn(props) {
|
|
157
159
|
return style(props, paddingKeys);
|
|
158
160
|
}
|
|
159
|
-
|
|
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
|
-
|
|
164
|
-
|
|
165
|
+
paddingFn.filterProps = paddingKeys;
|
|
166
|
+
const padding = exports.padding = paddingFn;
|
|
167
|
+
function spacingFn(props) {
|
|
165
168
|
return style(props, spacingKeys);
|
|
166
169
|
}
|
|
167
|
-
|
|
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
|
-
|
|
174
|
+
spacingFn.filterProps = spacingKeys;
|
|
175
|
+
const spacing = spacingFn;
|
|
172
176
|
var _default = exports.default = spacing;
|
package/spacing/spacing.mjs
CHANGED
|
@@ -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
|
-
|
|
139
|
+
function marginFn(props) {
|
|
136
140
|
return style(props, marginKeys);
|
|
137
141
|
}
|
|
138
|
-
|
|
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
|
-
|
|
143
|
-
export
|
|
146
|
+
marginFn.filterProps = marginKeys;
|
|
147
|
+
export const margin = marginFn;
|
|
148
|
+
function paddingFn(props) {
|
|
144
149
|
return style(props, paddingKeys);
|
|
145
150
|
}
|
|
146
|
-
|
|
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
|
-
|
|
151
|
-
|
|
155
|
+
paddingFn.filterProps = paddingKeys;
|
|
156
|
+
export const padding = paddingFn;
|
|
157
|
+
function spacingFn(props) {
|
|
152
158
|
return style(props, spacingKeys);
|
|
153
159
|
}
|
|
154
|
-
|
|
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
|
-
|
|
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
|
-
} = {
|
|
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
|
-
} = {
|
|
4
|
+
} = {
|
|
5
|
+
sx?: SxProps<any> | undefined;
|
|
6
|
+
}>(props: Props): Props;
|
package/styled/styled.d.mts
CHANGED
package/styled/styled.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { PropsFor, SimpleStyleFunction } from "../style/index.mjs";
|
|
2
|
-
export const
|
|
3
|
-
export const
|
|
4
|
-
export const
|
|
5
|
-
export const
|
|
6
|
-
export const
|
|
7
|
-
export const
|
|
8
|
-
export const lineHeight: SimpleStyleFunction<'lineHeight'>;
|
|
9
|
-
export const textAlign: SimpleStyleFunction<'textAlign'>;
|
|
10
|
-
export const
|
|
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
|
|
3
|
-
export const
|
|
4
|
-
export const
|
|
5
|
-
export const
|
|
6
|
-
export const
|
|
7
|
-
export const
|
|
8
|
-
export const lineHeight: SimpleStyleFunction<'lineHeight'>;
|
|
9
|
-
export const textAlign: SimpleStyleFunction<'textAlign'>;
|
|
10
|
-
export const
|
|
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;
|
package/useTheme/useTheme.d.mts
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
import { Theme } from "../createTheme/index.mjs";
|
|
2
|
-
export
|
|
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;
|
package/useTheme/useTheme.d.ts
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
import { Theme } from "../createTheme/index.js";
|
|
2
|
-
export
|
|
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 {};
|
package/useThemeProps/index.d.ts
CHANGED