@mui/system 9.1.1 → 9.2.0
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 +74 -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/Stack/Stack.js +1 -1
- package/Stack/Stack.mjs +1 -1
- package/Stack/StackProps.d.mts +1 -1
- package/Stack/StackProps.d.ts +1 -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 +3 -3
- package/version/index.mjs +3 -3
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
// Sorted ASC by size. That's important.
|
|
2
2
|
// It can't be configured as it's used statically for propTypes.
|
|
3
3
|
export const breakpointKeys = ['xs', 'sm', 'md', 'lg', 'xl'];
|
|
4
|
+
|
|
5
|
+
// Keep in sync with docs/src/pages/customization/breakpoints/breakpoints.md
|
|
6
|
+
// #host-reference
|
|
7
|
+
|
|
4
8
|
const sortBreakpointsValues = values => {
|
|
5
9
|
const breakpointsAsArray = Object.keys(values).map(key => ({
|
|
6
10
|
key,
|
|
@@ -19,18 +23,12 @@ const sortBreakpointsValues = values => {
|
|
|
19
23
|
// Keep in mind that @media is inclusive by the CSS specification.
|
|
20
24
|
export default function createBreakpoints(breakpoints) {
|
|
21
25
|
const {
|
|
22
|
-
// The breakpoint **start** at this value.
|
|
23
|
-
// For instance with the first breakpoint xs: [xs, sm).
|
|
24
26
|
values = {
|
|
25
27
|
xs: 0,
|
|
26
|
-
// phone
|
|
27
28
|
sm: 600,
|
|
28
|
-
// tablet
|
|
29
29
|
md: 900,
|
|
30
|
-
// small laptop
|
|
31
30
|
lg: 1200,
|
|
32
|
-
|
|
33
|
-
xl: 1536 // large screen
|
|
31
|
+
xl: 1536
|
|
34
32
|
},
|
|
35
33
|
unit = 'px',
|
|
36
34
|
step = 5,
|
|
@@ -72,7 +70,7 @@ export default function createBreakpoints(breakpoints) {
|
|
|
72
70
|
mediaKeys.push(up(keys[i]));
|
|
73
71
|
}
|
|
74
72
|
return {
|
|
75
|
-
keys,
|
|
73
|
+
keys: keys,
|
|
76
74
|
values: sortedValues,
|
|
77
75
|
up,
|
|
78
76
|
down,
|
package/createTheme/shape.d.mts
CHANGED
package/createTheme/shape.d.ts
CHANGED
package/cssGrid/cssGrid.d.mts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { PropsFor, SimpleStyleFunction } from "../style/index.mjs";
|
|
2
|
-
export const gap: SimpleStyleFunction<'gap'>;
|
|
3
|
-
export const columnGap: SimpleStyleFunction<'columnGap'>;
|
|
4
|
-
export const rowGap: SimpleStyleFunction<'rowGap'>;
|
|
5
|
-
export const gridColumn: SimpleStyleFunction<'gridColumn'>;
|
|
6
|
-
export const gridRow: SimpleStyleFunction<'gridRow'>;
|
|
7
|
-
export const gridAutoFlow: SimpleStyleFunction<'gridAutoFlow'>;
|
|
8
|
-
export const gridAutoColumns: SimpleStyleFunction<'gridAutoColumns'>;
|
|
9
|
-
export const gridAutoRows: SimpleStyleFunction<'gridAutoRows'>;
|
|
10
|
-
export const gridTemplateColumns: SimpleStyleFunction<'gridTemplateColumns'>;
|
|
11
|
-
export const gridTemplateRows: SimpleStyleFunction<'gridTemplateRows'>;
|
|
12
|
-
export const gridTemplateAreas: SimpleStyleFunction<'gridTemplateAreas'>;
|
|
13
|
-
export const gridArea: SimpleStyleFunction<'gridArea'>;
|
|
1
|
+
import type { PropsFor, SimpleStyleFunction } from "../style/index.mjs";
|
|
2
|
+
export declare const gap: SimpleStyleFunction<'gap'>;
|
|
3
|
+
export declare const columnGap: SimpleStyleFunction<'columnGap'>;
|
|
4
|
+
export declare const rowGap: SimpleStyleFunction<'rowGap'>;
|
|
5
|
+
export declare const gridColumn: SimpleStyleFunction<'gridColumn'>;
|
|
6
|
+
export declare const gridRow: SimpleStyleFunction<'gridRow'>;
|
|
7
|
+
export declare const gridAutoFlow: SimpleStyleFunction<'gridAutoFlow'>;
|
|
8
|
+
export declare const gridAutoColumns: SimpleStyleFunction<'gridAutoColumns'>;
|
|
9
|
+
export declare const gridAutoRows: SimpleStyleFunction<'gridAutoRows'>;
|
|
10
|
+
export declare const gridTemplateColumns: SimpleStyleFunction<'gridTemplateColumns'>;
|
|
11
|
+
export declare const gridTemplateRows: SimpleStyleFunction<'gridTemplateRows'>;
|
|
12
|
+
export declare const gridTemplateAreas: SimpleStyleFunction<'gridTemplateAreas'>;
|
|
13
|
+
export declare const gridArea: SimpleStyleFunction<'gridArea'>;
|
|
14
14
|
declare const grid: SimpleStyleFunction<'gap' | 'columnGap' | 'rowGap' | 'gridColumn' | 'gridRow' | 'gridAutoFlow' | 'gridAutoColumns' | 'gridAutoRows' | 'gridTemplateColumns' | 'gridTemplateRows' | 'gridTemplateAreas' | 'gridArea'>;
|
|
15
15
|
export type CssGridProps = PropsFor<typeof grid>;
|
|
16
16
|
export default grid;
|
package/cssGrid/cssGrid.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { PropsFor, SimpleStyleFunction } from "../style/index.js";
|
|
2
|
-
export const gap: SimpleStyleFunction<'gap'>;
|
|
3
|
-
export const columnGap: SimpleStyleFunction<'columnGap'>;
|
|
4
|
-
export const rowGap: SimpleStyleFunction<'rowGap'>;
|
|
5
|
-
export const gridColumn: SimpleStyleFunction<'gridColumn'>;
|
|
6
|
-
export const gridRow: SimpleStyleFunction<'gridRow'>;
|
|
7
|
-
export const gridAutoFlow: SimpleStyleFunction<'gridAutoFlow'>;
|
|
8
|
-
export const gridAutoColumns: SimpleStyleFunction<'gridAutoColumns'>;
|
|
9
|
-
export const gridAutoRows: SimpleStyleFunction<'gridAutoRows'>;
|
|
10
|
-
export const gridTemplateColumns: SimpleStyleFunction<'gridTemplateColumns'>;
|
|
11
|
-
export const gridTemplateRows: SimpleStyleFunction<'gridTemplateRows'>;
|
|
12
|
-
export const gridTemplateAreas: SimpleStyleFunction<'gridTemplateAreas'>;
|
|
13
|
-
export const gridArea: SimpleStyleFunction<'gridArea'>;
|
|
1
|
+
import type { PropsFor, SimpleStyleFunction } from "../style/index.js";
|
|
2
|
+
export declare const gap: SimpleStyleFunction<'gap'>;
|
|
3
|
+
export declare const columnGap: SimpleStyleFunction<'columnGap'>;
|
|
4
|
+
export declare const rowGap: SimpleStyleFunction<'rowGap'>;
|
|
5
|
+
export declare const gridColumn: SimpleStyleFunction<'gridColumn'>;
|
|
6
|
+
export declare const gridRow: SimpleStyleFunction<'gridRow'>;
|
|
7
|
+
export declare const gridAutoFlow: SimpleStyleFunction<'gridAutoFlow'>;
|
|
8
|
+
export declare const gridAutoColumns: SimpleStyleFunction<'gridAutoColumns'>;
|
|
9
|
+
export declare const gridAutoRows: SimpleStyleFunction<'gridAutoRows'>;
|
|
10
|
+
export declare const gridTemplateColumns: SimpleStyleFunction<'gridTemplateColumns'>;
|
|
11
|
+
export declare const gridTemplateRows: SimpleStyleFunction<'gridTemplateRows'>;
|
|
12
|
+
export declare const gridTemplateAreas: SimpleStyleFunction<'gridTemplateAreas'>;
|
|
13
|
+
export declare const gridArea: SimpleStyleFunction<'gridArea'>;
|
|
14
14
|
declare const grid: SimpleStyleFunction<'gap' | 'columnGap' | 'rowGap' | 'gridColumn' | 'gridRow' | 'gridAutoFlow' | 'gridAutoColumns' | 'gridAutoRows' | 'gridTemplateColumns' | 'gridTemplateRows' | 'gridTemplateAreas' | 'gridArea'>;
|
|
15
15
|
export type CssGridProps = PropsFor<typeof grid>;
|
|
16
16
|
export default grid;
|
package/cssGrid/cssGrid.js
CHANGED
|
@@ -10,8 +10,6 @@ var _compose = _interopRequireDefault(require("../compose"));
|
|
|
10
10
|
var _spacing = require("../spacing");
|
|
11
11
|
var _breakpoints = require("../breakpoints");
|
|
12
12
|
var _responsivePropType = _interopRequireDefault(require("../responsivePropType"));
|
|
13
|
-
// false positive
|
|
14
|
-
// eslint-disable-next-line react/function-component-definition
|
|
15
13
|
const gap = props => {
|
|
16
14
|
if (props.gap !== undefined && props.gap !== null) {
|
|
17
15
|
const transformer = (0, _spacing.createUnaryUnit)(props.theme, 'spacing', 8, 'gap');
|
|
@@ -27,9 +25,6 @@ gap.propTypes = process.env.NODE_ENV !== 'production' ? {
|
|
|
27
25
|
gap: _responsivePropType.default
|
|
28
26
|
} : {};
|
|
29
27
|
gap.filterProps = ['gap'];
|
|
30
|
-
|
|
31
|
-
// false positive
|
|
32
|
-
// eslint-disable-next-line react/function-component-definition
|
|
33
28
|
const columnGap = props => {
|
|
34
29
|
if (props.columnGap !== undefined && props.columnGap !== null) {
|
|
35
30
|
const transformer = (0, _spacing.createUnaryUnit)(props.theme, 'spacing', 8, 'columnGap');
|
|
@@ -45,9 +40,6 @@ columnGap.propTypes = process.env.NODE_ENV !== 'production' ? {
|
|
|
45
40
|
columnGap: _responsivePropType.default
|
|
46
41
|
} : {};
|
|
47
42
|
columnGap.filterProps = ['columnGap'];
|
|
48
|
-
|
|
49
|
-
// false positive
|
|
50
|
-
// eslint-disable-next-line react/function-component-definition
|
|
51
43
|
const rowGap = props => {
|
|
52
44
|
if (props.rowGap !== undefined && props.rowGap !== null) {
|
|
53
45
|
const transformer = (0, _spacing.createUnaryUnit)(props.theme, 'spacing', 8, 'rowGap');
|
package/cssGrid/cssGrid.mjs
CHANGED
|
@@ -3,9 +3,6 @@ import compose from "../compose/index.mjs";
|
|
|
3
3
|
import { createUnaryUnit, getValue } from "../spacing/index.mjs";
|
|
4
4
|
import { handleBreakpoints } from "../breakpoints/index.mjs";
|
|
5
5
|
import responsivePropType from "../responsivePropType/index.mjs";
|
|
6
|
-
|
|
7
|
-
// false positive
|
|
8
|
-
// eslint-disable-next-line react/function-component-definition
|
|
9
6
|
export const gap = props => {
|
|
10
7
|
if (props.gap !== undefined && props.gap !== null) {
|
|
11
8
|
const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'gap');
|
|
@@ -20,9 +17,6 @@ gap.propTypes = process.env.NODE_ENV !== 'production' ? {
|
|
|
20
17
|
gap: responsivePropType
|
|
21
18
|
} : {};
|
|
22
19
|
gap.filterProps = ['gap'];
|
|
23
|
-
|
|
24
|
-
// false positive
|
|
25
|
-
// eslint-disable-next-line react/function-component-definition
|
|
26
20
|
export const columnGap = props => {
|
|
27
21
|
if (props.columnGap !== undefined && props.columnGap !== null) {
|
|
28
22
|
const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'columnGap');
|
|
@@ -37,9 +31,6 @@ columnGap.propTypes = process.env.NODE_ENV !== 'production' ? {
|
|
|
37
31
|
columnGap: responsivePropType
|
|
38
32
|
} : {};
|
|
39
33
|
columnGap.filterProps = ['columnGap'];
|
|
40
|
-
|
|
41
|
-
// false positive
|
|
42
|
-
// eslint-disable-next-line react/function-component-definition
|
|
43
34
|
export const rowGap = props => {
|
|
44
35
|
if (props.rowGap !== undefined && props.rowGap !== null) {
|
|
45
36
|
const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'rowGap');
|
|
@@ -14,7 +14,7 @@ var _styledEngine = require("@mui/styled-engine");
|
|
|
14
14
|
var _privateTheming = require("@mui/private-theming");
|
|
15
15
|
var _useEnhancedEffect = _interopRequireDefault(require("@mui/utils/useEnhancedEffect"));
|
|
16
16
|
var _ThemeProvider = _interopRequireDefault(require("../ThemeProvider"));
|
|
17
|
-
var _InitColorSchemeScript =
|
|
17
|
+
var _InitColorSchemeScript = require("../InitColorSchemeScript/InitColorSchemeScript");
|
|
18
18
|
var _useCurrentColorScheme = _interopRequireDefault(require("./useCurrentColorScheme"));
|
|
19
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
20
|
const DISABLE_CSS_TRANSITION = exports.DISABLE_CSS_TRANSITION = '*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}';
|
|
@@ -332,7 +332,7 @@ function createCssVarsProvider(options) {
|
|
|
332
332
|
} : void 0;
|
|
333
333
|
const defaultLightColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.light;
|
|
334
334
|
const defaultDarkColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.dark;
|
|
335
|
-
const getInitColorSchemeScript = params => (0, _InitColorSchemeScript.
|
|
335
|
+
const getInitColorSchemeScript = params => (0, _InitColorSchemeScript.buildInitColorSchemeScript)({
|
|
336
336
|
colorSchemeStorageKey: defaultColorSchemeStorageKey,
|
|
337
337
|
defaultLightColorScheme,
|
|
338
338
|
defaultDarkColorScheme,
|
|
@@ -6,7 +6,7 @@ import { GlobalStyles } from '@mui/styled-engine';
|
|
|
6
6
|
import { useTheme as muiUseTheme } from '@mui/private-theming';
|
|
7
7
|
import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
|
|
8
8
|
import ThemeProvider from "../ThemeProvider/index.mjs";
|
|
9
|
-
import
|
|
9
|
+
import { buildInitColorSchemeScript, DEFAULT_COLOR_SCHEME_STORAGE_KEY, DEFAULT_MODE_STORAGE_KEY } from "../InitColorSchemeScript/InitColorSchemeScript.mjs";
|
|
10
10
|
import useCurrentColorScheme from "./useCurrentColorScheme.mjs";
|
|
11
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
12
|
export const DISABLE_CSS_TRANSITION = '*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}';
|
|
@@ -324,7 +324,7 @@ export default function createCssVarsProvider(options) {
|
|
|
324
324
|
} : void 0;
|
|
325
325
|
const defaultLightColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.light;
|
|
326
326
|
const defaultDarkColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.dark;
|
|
327
|
-
const getInitColorSchemeScript = params =>
|
|
327
|
+
const getInitColorSchemeScript = params => buildInitColorSchemeScript({
|
|
328
328
|
colorSchemeStorageKey: defaultColorSchemeStorageKey,
|
|
329
329
|
defaultLightColorScheme,
|
|
330
330
|
defaultDarkColorScheme,
|
|
@@ -82,6 +82,7 @@ function useCurrentColorScheme(options) {
|
|
|
82
82
|
});
|
|
83
83
|
const [isClient, setIsClient] = React.useState(noSsr || !isMultiSchemes);
|
|
84
84
|
React.useEffect(() => {
|
|
85
|
+
// eslint-disable-next-line react-hooks/set-state-in-effect
|
|
85
86
|
setIsClient(true); // to rerender the component after hydration
|
|
86
87
|
}, []);
|
|
87
88
|
const colorScheme = getColorScheme(state);
|
|
@@ -73,6 +73,7 @@ export default function useCurrentColorScheme(options) {
|
|
|
73
73
|
});
|
|
74
74
|
const [isClient, setIsClient] = React.useState(noSsr || !isMultiSchemes);
|
|
75
75
|
React.useEffect(() => {
|
|
76
|
+
// eslint-disable-next-line react-hooks/set-state-in-effect
|
|
76
77
|
setIsClient(true); // to rerender the component after hydration
|
|
77
78
|
}, []);
|
|
78
79
|
const colorScheme = getColorScheme(state);
|
package/display/display.d.mts
CHANGED
|
@@ -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 displayPrint: import("../index.mjs").StyleFunction<{
|
|
3
|
+
displayPrint?: unknown;
|
|
4
|
+
} & {
|
|
5
|
+
theme?: object | undefined;
|
|
6
|
+
}> & {
|
|
7
|
+
filterProps: string[];
|
|
8
|
+
propTypes: any;
|
|
9
|
+
};
|
|
10
|
+
export declare const displayRaw: import("../index.mjs").StyleFunction<{
|
|
11
|
+
display?: unknown;
|
|
12
|
+
} & {
|
|
13
|
+
theme?: object | undefined;
|
|
14
|
+
}> & {
|
|
15
|
+
filterProps: string[];
|
|
16
|
+
propTypes: any;
|
|
17
|
+
};
|
|
18
|
+
export declare const overflow: import("../index.mjs").StyleFunction<{
|
|
19
|
+
overflow?: unknown;
|
|
20
|
+
} & {
|
|
21
|
+
theme?: object | undefined;
|
|
22
|
+
}> & {
|
|
23
|
+
filterProps: string[];
|
|
24
|
+
propTypes: any;
|
|
25
|
+
};
|
|
26
|
+
export declare const textOverflow: import("../index.mjs").StyleFunction<{
|
|
27
|
+
textOverflow?: unknown;
|
|
28
|
+
} & {
|
|
29
|
+
theme?: object | undefined;
|
|
30
|
+
}> & {
|
|
31
|
+
filterProps: string[];
|
|
32
|
+
propTypes: any;
|
|
33
|
+
};
|
|
34
|
+
export declare const visibility: import("../index.mjs").StyleFunction<{
|
|
35
|
+
visibility?: unknown;
|
|
36
|
+
} & {
|
|
37
|
+
theme?: object | undefined;
|
|
38
|
+
}> & {
|
|
39
|
+
filterProps: string[];
|
|
40
|
+
propTypes: any;
|
|
41
|
+
};
|
|
42
|
+
export declare const whiteSpace: import("../index.mjs").StyleFunction<{
|
|
43
|
+
whiteSpace?: unknown;
|
|
44
|
+
} & {
|
|
45
|
+
theme?: object | undefined;
|
|
46
|
+
}> & {
|
|
47
|
+
filterProps: string[];
|
|
48
|
+
propTypes: any;
|
|
49
|
+
};
|
|
2
50
|
declare const display: SimpleStyleFunction<'display' | 'displayPrint' | 'overflow' | 'textOverflow' | 'visibility' | 'whiteSpace'>;
|
|
3
51
|
export type DisplayProps = PropsFor<typeof display>;
|
|
4
52
|
export default display;
|
package/display/display.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 displayPrint: import("../index.js").StyleFunction<{
|
|
3
|
+
displayPrint?: unknown;
|
|
4
|
+
} & {
|
|
5
|
+
theme?: object | undefined;
|
|
6
|
+
}> & {
|
|
7
|
+
filterProps: string[];
|
|
8
|
+
propTypes: any;
|
|
9
|
+
};
|
|
10
|
+
export declare const displayRaw: import("../index.js").StyleFunction<{
|
|
11
|
+
display?: unknown;
|
|
12
|
+
} & {
|
|
13
|
+
theme?: object | undefined;
|
|
14
|
+
}> & {
|
|
15
|
+
filterProps: string[];
|
|
16
|
+
propTypes: any;
|
|
17
|
+
};
|
|
18
|
+
export declare const overflow: import("../index.js").StyleFunction<{
|
|
19
|
+
overflow?: unknown;
|
|
20
|
+
} & {
|
|
21
|
+
theme?: object | undefined;
|
|
22
|
+
}> & {
|
|
23
|
+
filterProps: string[];
|
|
24
|
+
propTypes: any;
|
|
25
|
+
};
|
|
26
|
+
export declare const textOverflow: import("../index.js").StyleFunction<{
|
|
27
|
+
textOverflow?: unknown;
|
|
28
|
+
} & {
|
|
29
|
+
theme?: object | undefined;
|
|
30
|
+
}> & {
|
|
31
|
+
filterProps: string[];
|
|
32
|
+
propTypes: any;
|
|
33
|
+
};
|
|
34
|
+
export declare const visibility: import("../index.js").StyleFunction<{
|
|
35
|
+
visibility?: unknown;
|
|
36
|
+
} & {
|
|
37
|
+
theme?: object | undefined;
|
|
38
|
+
}> & {
|
|
39
|
+
filterProps: string[];
|
|
40
|
+
propTypes: any;
|
|
41
|
+
};
|
|
42
|
+
export declare const whiteSpace: import("../index.js").StyleFunction<{
|
|
43
|
+
whiteSpace?: unknown;
|
|
44
|
+
} & {
|
|
45
|
+
theme?: object | undefined;
|
|
46
|
+
}> & {
|
|
47
|
+
filterProps: string[];
|
|
48
|
+
propTypes: any;
|
|
49
|
+
};
|
|
2
50
|
declare const display: SimpleStyleFunction<'display' | 'displayPrint' | 'overflow' | 'textOverflow' | 'visibility' | 'whiteSpace'>;
|
|
3
51
|
export type DisplayProps = PropsFor<typeof display>;
|
|
4
52
|
export default display;
|
package/display/display.js
CHANGED
|
@@ -31,4 +31,5 @@ const visibility = exports.visibility = (0, _style.default)({
|
|
|
31
31
|
const whiteSpace = exports.whiteSpace = (0, _style.default)({
|
|
32
32
|
prop: 'whiteSpace'
|
|
33
33
|
});
|
|
34
|
-
|
|
34
|
+
const display = (0, _compose.default)(displayPrint, displayRaw, overflow, textOverflow, visibility, whiteSpace);
|
|
35
|
+
var _default = exports.default = display;
|
package/display/display.mjs
CHANGED
|
@@ -24,4 +24,5 @@ export const visibility = style({
|
|
|
24
24
|
export const whiteSpace = style({
|
|
25
25
|
prop: 'whiteSpace'
|
|
26
26
|
});
|
|
27
|
-
|
|
27
|
+
const display = compose(displayPrint, displayRaw, overflow, textOverflow, visibility, whiteSpace);
|
|
28
|
+
export default display;
|
package/flexbox/flexbox.d.mts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { PropsFor, SimpleStyleFunction } from "../style/index.mjs";
|
|
2
|
-
export const flexBasis: SimpleStyleFunction<'flexBasis'>;
|
|
3
|
-
export const flexDirection: SimpleStyleFunction<'flexDirection'>;
|
|
4
|
-
export const flexWrap: SimpleStyleFunction<'flexWrap'>;
|
|
5
|
-
export const justifyContent: SimpleStyleFunction<'justifyContent'>;
|
|
6
|
-
export const alignItems: SimpleStyleFunction<'alignItems'>;
|
|
7
|
-
export const alignContent: SimpleStyleFunction<'alignContent'>;
|
|
8
|
-
export const order: SimpleStyleFunction<'order'>;
|
|
9
|
-
export const flex: SimpleStyleFunction<'flex'>;
|
|
10
|
-
export const flexGrow: SimpleStyleFunction<'flexGrow'>;
|
|
11
|
-
export const flexShrink: SimpleStyleFunction<'flexShrink'>;
|
|
12
|
-
export const alignSelf: SimpleStyleFunction<'alignSelf'>;
|
|
13
|
-
export const justifyItems: SimpleStyleFunction<'justifyItems'>;
|
|
14
|
-
export const justifySelf: SimpleStyleFunction<'justifySelf'>;
|
|
1
|
+
import type { PropsFor, SimpleStyleFunction } from "../style/index.mjs";
|
|
2
|
+
export declare const flexBasis: SimpleStyleFunction<'flexBasis'>;
|
|
3
|
+
export declare const flexDirection: SimpleStyleFunction<'flexDirection'>;
|
|
4
|
+
export declare const flexWrap: SimpleStyleFunction<'flexWrap'>;
|
|
5
|
+
export declare const justifyContent: SimpleStyleFunction<'justifyContent'>;
|
|
6
|
+
export declare const alignItems: SimpleStyleFunction<'alignItems'>;
|
|
7
|
+
export declare const alignContent: SimpleStyleFunction<'alignContent'>;
|
|
8
|
+
export declare const order: SimpleStyleFunction<'order'>;
|
|
9
|
+
export declare const flex: SimpleStyleFunction<'flex'>;
|
|
10
|
+
export declare const flexGrow: SimpleStyleFunction<'flexGrow'>;
|
|
11
|
+
export declare const flexShrink: SimpleStyleFunction<'flexShrink'>;
|
|
12
|
+
export declare const alignSelf: SimpleStyleFunction<'alignSelf'>;
|
|
13
|
+
export declare const justifyItems: SimpleStyleFunction<'justifyItems'>;
|
|
14
|
+
export declare const justifySelf: SimpleStyleFunction<'justifySelf'>;
|
|
15
15
|
declare const flexbox: SimpleStyleFunction<'flexBasis' | 'flexDirection' | 'flexWrap' | 'justifyContent' | 'alignItems' | 'alignContent' | 'order' | 'flex' | 'flexGrow' | 'flexShrink' | 'alignSelf' | 'justifyItems' | 'justifySelf'>;
|
|
16
16
|
export type FlexboxProps = PropsFor<typeof flexbox>;
|
|
17
17
|
export default flexbox;
|
package/flexbox/flexbox.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { PropsFor, SimpleStyleFunction } from "../style/index.js";
|
|
2
|
-
export const flexBasis: SimpleStyleFunction<'flexBasis'>;
|
|
3
|
-
export const flexDirection: SimpleStyleFunction<'flexDirection'>;
|
|
4
|
-
export const flexWrap: SimpleStyleFunction<'flexWrap'>;
|
|
5
|
-
export const justifyContent: SimpleStyleFunction<'justifyContent'>;
|
|
6
|
-
export const alignItems: SimpleStyleFunction<'alignItems'>;
|
|
7
|
-
export const alignContent: SimpleStyleFunction<'alignContent'>;
|
|
8
|
-
export const order: SimpleStyleFunction<'order'>;
|
|
9
|
-
export const flex: SimpleStyleFunction<'flex'>;
|
|
10
|
-
export const flexGrow: SimpleStyleFunction<'flexGrow'>;
|
|
11
|
-
export const flexShrink: SimpleStyleFunction<'flexShrink'>;
|
|
12
|
-
export const alignSelf: SimpleStyleFunction<'alignSelf'>;
|
|
13
|
-
export const justifyItems: SimpleStyleFunction<'justifyItems'>;
|
|
14
|
-
export const justifySelf: SimpleStyleFunction<'justifySelf'>;
|
|
1
|
+
import type { PropsFor, SimpleStyleFunction } from "../style/index.js";
|
|
2
|
+
export declare const flexBasis: SimpleStyleFunction<'flexBasis'>;
|
|
3
|
+
export declare const flexDirection: SimpleStyleFunction<'flexDirection'>;
|
|
4
|
+
export declare const flexWrap: SimpleStyleFunction<'flexWrap'>;
|
|
5
|
+
export declare const justifyContent: SimpleStyleFunction<'justifyContent'>;
|
|
6
|
+
export declare const alignItems: SimpleStyleFunction<'alignItems'>;
|
|
7
|
+
export declare const alignContent: SimpleStyleFunction<'alignContent'>;
|
|
8
|
+
export declare const order: SimpleStyleFunction<'order'>;
|
|
9
|
+
export declare const flex: SimpleStyleFunction<'flex'>;
|
|
10
|
+
export declare const flexGrow: SimpleStyleFunction<'flexGrow'>;
|
|
11
|
+
export declare const flexShrink: SimpleStyleFunction<'flexShrink'>;
|
|
12
|
+
export declare const alignSelf: SimpleStyleFunction<'alignSelf'>;
|
|
13
|
+
export declare const justifyItems: SimpleStyleFunction<'justifyItems'>;
|
|
14
|
+
export declare const justifySelf: SimpleStyleFunction<'justifySelf'>;
|
|
15
15
|
declare const flexbox: SimpleStyleFunction<'flexBasis' | 'flexDirection' | 'flexWrap' | 'justifyContent' | 'alignItems' | 'alignContent' | 'order' | 'flex' | 'flexGrow' | 'flexShrink' | 'alignSelf' | 'justifyItems' | 'justifySelf'>;
|
|
16
16
|
export type FlexboxProps = PropsFor<typeof flexbox>;
|
|
17
17
|
export default flexbox;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
declare function getThemeValue(prop: string, value: any, theme: object): any;
|
|
2
|
+
export default getThemeValue;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
declare function getThemeValue(prop: string, value: any, theme: object): any;
|
|
2
|
+
export default getThemeValue;
|
|
@@ -27,6 +27,8 @@ const filterPropsMapping = {
|
|
|
27
27
|
spacing: _spacing.default.filterProps,
|
|
28
28
|
typography: _typography.default.filterProps
|
|
29
29
|
};
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
30
32
|
const styleFunctionMapping = exports.styleFunctionMapping = {
|
|
31
33
|
borders: _borders.default,
|
|
32
34
|
display: _display.default,
|
|
@@ -39,10 +41,12 @@ const styleFunctionMapping = exports.styleFunctionMapping = {
|
|
|
39
41
|
spacing: _spacing.default,
|
|
40
42
|
typography: _typography.default
|
|
41
43
|
};
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
42
46
|
const propToStyleFunction = exports.propToStyleFunction = Object.keys(filterPropsMapping).reduce((acc, styleFnName) => {
|
|
43
|
-
filterPropsMapping[styleFnName]
|
|
47
|
+
for (const propName of filterPropsMapping[styleFnName]) {
|
|
44
48
|
acc[propName] = styleFunctionMapping[styleFnName];
|
|
45
|
-
}
|
|
49
|
+
}
|
|
46
50
|
return acc;
|
|
47
51
|
}, {});
|
|
48
52
|
function getThemeValue(prop, value, theme) {
|
|
@@ -20,6 +20,8 @@ const filterPropsMapping = {
|
|
|
20
20
|
spacing: spacing.filterProps,
|
|
21
21
|
typography: typography.filterProps
|
|
22
22
|
};
|
|
23
|
+
|
|
24
|
+
/** @internal */
|
|
23
25
|
export const styleFunctionMapping = {
|
|
24
26
|
borders,
|
|
25
27
|
display,
|
|
@@ -27,15 +29,17 @@ export const styleFunctionMapping = {
|
|
|
27
29
|
grid,
|
|
28
30
|
positions,
|
|
29
31
|
palette,
|
|
30
|
-
shadows,
|
|
32
|
+
shadows: shadows,
|
|
31
33
|
sizing,
|
|
32
34
|
spacing,
|
|
33
35
|
typography
|
|
34
36
|
};
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
35
39
|
export const propToStyleFunction = Object.keys(filterPropsMapping).reduce((acc, styleFnName) => {
|
|
36
|
-
filterPropsMapping[styleFnName]
|
|
40
|
+
for (const propName of filterPropsMapping[styleFnName]) {
|
|
37
41
|
acc[propName] = styleFunctionMapping[styleFnName];
|
|
38
|
-
}
|
|
42
|
+
}
|
|
39
43
|
return acc;
|
|
40
44
|
}, {});
|
|
41
45
|
function getThemeValue(prop, value, theme) {
|
package/index.js
CHANGED
package/index.mjs
CHANGED
package/memoize/memoize.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function memoize<ArgType = any, ReturnType = any>(fn: (arg: ArgType) => ReturnType): (arg: ArgType) => ReturnType;
|
|
1
|
+
export default function memoize<ArgType extends keyof any = any, ReturnType = any>(fn: (arg: ArgType) => ReturnType): (arg: ArgType) => ReturnType;
|
package/memoize/memoize.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function memoize<ArgType = any, ReturnType = any>(fn: (arg: ArgType) => ReturnType): (arg: ArgType) => ReturnType;
|
|
1
|
+
export default function memoize<ArgType extends keyof any = any, ReturnType = any>(fn: (arg: ArgType) => ReturnType): (arg: ArgType) => ReturnType;
|