-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
/
index.d.ts
156 lines (124 loc) · 5.03 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
import {
ComposedStyleFunction,
StyleFunction,
PropsFor,
SimpleStyleFunction,
borders,
display,
flexbox,
grid,
palette,
positions,
shadows,
sizing,
typography,
} from './Box';
// disable automatic export
export {};
// borders.js
export const border: SimpleStyleFunction<'border'>;
export const borderTop: SimpleStyleFunction<'borderTop'>;
export const borderRight: SimpleStyleFunction<'borderRight'>;
export const borderBottom: SimpleStyleFunction<'borderBottom'>;
export const borderLeft: SimpleStyleFunction<'borderLeft'>;
export const borderColor: SimpleStyleFunction<'borderColor'>;
export const borderRadius: SimpleStyleFunction<'borderRadius'>;
export type BordersProps = PropsFor<typeof borders>;
// breakpoints.js
type DefaultBreakPoints = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
export function handleBreakpoints<Props>(
props: Props,
propValue: any,
styleFromPropValue: (value: any) => any,
): any;
/**
* @returns An enhanced stylefunction that considers breakpoints
*/
export function breakpoints<Props, Breakpoints extends string = DefaultBreakPoints>(
styleFunction: StyleFunction<Props>,
): StyleFunction<Partial<Record<Breakpoints, Props>> & Props>;
// restructures the breakpoints in the in the correct order and merges all styles args
export function mergeBreakpointsInOrder(
breakpointsInput: { keys: string[]; up: (key: string) => string },
...styles: object[]
): object;
export function compose<T extends Array<StyleFunction<any>>>(...args: T): ComposedStyleFunction<T>;
export type DisplayProps = PropsFor<typeof display>;
// flexbox.js
export type FlexboxProps = PropsFor<typeof flexbox>;
// grid.js
export type GridProps = PropsFor<typeof grid>;
// palette.js
export const color: SimpleStyleFunction<'color'>;
export const bgcolor: SimpleStyleFunction<'bgcolor'>;
export type PaletteProps = PropsFor<typeof palette>;
export type PositionsProps = PropsFor<typeof positions>;
export type ShadowsProps = PropsFor<typeof shadows>;
// * sizing.js TODO
export const width: SimpleStyleFunction<'width'>;
export const maxWidth: SimpleStyleFunction<'maxWidth'>;
export const minWidth: SimpleStyleFunction<'minWidth'>;
export const height: SimpleStyleFunction<'height'>;
export const maxHeight: SimpleStyleFunction<'maxHeight'>;
export const minHeight: SimpleStyleFunction<'minHeight'>;
export const sizeWidth: SimpleStyleFunction<'sizeWidth'>;
export const sizeHeight: SimpleStyleFunction<'sizeHeight'>;
export const boxSizing: SimpleStyleFunction<'boxSizing'>;
export type SizingProps = PropsFor<typeof sizing>;
// typography.js
export const typographyVariant: SimpleStyleFunction<'typography'>;
export const fontFamily: SimpleStyleFunction<'fontFamily'>;
export const fontSize: SimpleStyleFunction<'fontSize'>;
export const fontStyle: SimpleStyleFunction<'fontStyle'>;
export const fontWeight: SimpleStyleFunction<'fontWeight'>;
export const letterSpacing: SimpleStyleFunction<'letterSpacing'>;
export const lineHeight: SimpleStyleFunction<'lineHeight'>;
export const textAlign: SimpleStyleFunction<'textAlign'>;
export type TypographyProps = PropsFor<typeof typography>;
// eslint-disable-next-line @typescript-eslint/naming-convention
export function unstable_getThemeValue(prop: string, value: any, theme: object): any;
/**
* The `css` function accepts arrays as values for mobile-first responsive styles.
* Note that this extends to non-theme values also. For example `display=['none', 'block']`
* will also works.
*/
export type ResponsiveStyleValue<T> = T | Array<T | null> | { [key: string]: T | null };
export { DefaultTheme } from '@material-ui/private-theming';
export {
css,
keyframes,
GlobalStyles,
GlobalStylesProps,
StyledEngineProvider,
} from '@material-ui/styled-engine';
export * from './style';
export * from './spacing';
export {
default as unstable_styleFunctionSx,
extendSxProp as unstable_extendSxProp,
} from './styleFunctionSx';
export * from './styleFunctionSx';
export { default as Box } from './Box';
export * from './Box';
export { default as createBox } from './createBox';
export * from './createBox';
export { default as createStyled } from './createStyled';
export * from './createStyled';
export { default as styled } from './styled';
export * from './styled';
export { default as createTheme } from './createTheme';
export * from './createTheme';
export { default as createBreakpoints } from './createTheme/createBreakpoints';
export * from './createTheme/createBreakpoints';
export { default as createSpacing } from './createTheme/createSpacing';
export { SpacingOptions, Spacing } from './createTheme/createSpacing';
export { default as shape } from './createTheme/shape';
export * from './createTheme/shape';
export { default as useThemeProps, getThemeProps } from './useThemeProps';
export { default as useTheme } from './useTheme';
export * from './useTheme';
export { default as useThemeWithoutDefault } from './useThemeWithoutDefault';
export * from './useThemeWithoutDefault';
export * from './colorManipulator';
export { default as ThemeProvider } from './ThemeProvider';
export * from './ThemeProvider';