@@ -8,149 +8,18 @@ import {
88 OverwriteCSSProperties ,
99 AliasesCSSProperties ,
1010} from '../styleFunctionSx' ;
11-
12- export type PropsFor < SomeStyleFunction > =
13- SomeStyleFunction extends StyleFunction < infer Props > ? Props : never ;
14- export type StyleFunction < Props > = ( props : Props ) => any ;
15- export type SimpleStyleFunction < PropKey extends keyof any > = StyleFunction <
16- Partial < Record < PropKey , any > >
17- > & { filterProps : string [ ] } ;
18-
19- // borders.js
20- export declare const borders : SimpleStyleFunction <
21- | 'border'
22- | 'borderTop'
23- | 'borderRight'
24- | 'borderBottom'
25- | 'borderLeft'
26- | 'borderColor'
27- | 'borderRadius'
28- > ;
29-
30- export declare const display : SimpleStyleFunction <
31- 'display' | 'displayPrint' | 'overflow' | 'textOverflow' | 'visibility' | 'whiteSpace'
32- > ;
33-
34- export declare const flexbox : SimpleStyleFunction <
35- | 'flexBasis'
36- | 'flexDirection'
37- | 'flexWrap'
38- | 'justifyContent'
39- | 'alignItems'
40- | 'alignContent'
41- | 'order'
42- | 'flex'
43- | 'flexGrow'
44- | 'flexShrink'
45- | 'alignSelf'
46- | 'justifyItems'
47- | 'justifySelf'
48- > ;
49-
50- export declare const grid : SimpleStyleFunction <
51- | 'gap'
52- | 'columnGap'
53- | 'rowGap'
54- | 'gridColumn'
55- | 'gridRow'
56- | 'gridAutoFlow'
57- | 'gridAutoColumns'
58- | 'gridAutoRows'
59- | 'gridTemplateColumns'
60- | 'gridTemplateRows'
61- | 'gridTemplateAreas'
62- | 'gridArea'
63- > ;
64-
65- export declare const palette : SimpleStyleFunction < 'bgcolor' | 'color' > ;
66-
67- export declare const positions : SimpleStyleFunction <
68- 'zIndex' | 'position' | 'top' | 'right' | 'bottom' | 'left'
69- > ;
70-
71- export declare const shadows : SimpleStyleFunction < 'boxShadow' > ;
72-
73- export declare const sizing : SimpleStyleFunction <
74- | 'width'
75- | 'maxWidth'
76- | 'minWidth'
77- | 'height'
78- | 'maxHeight'
79- | 'minHeight'
80- | 'sizeWidth'
81- | 'sizeHeight'
82- | 'boxSizing'
83- > ;
84-
85- export declare const spacing : SimpleStyleFunction <
86- | 'm'
87- | 'mt'
88- | 'mr'
89- | 'mb'
90- | 'ml'
91- | 'mx'
92- | 'my'
93- | 'p'
94- | 'pt'
95- | 'pr'
96- | 'pb'
97- | 'pl'
98- | 'px'
99- | 'py'
100- | 'margin'
101- | 'marginTop'
102- | 'marginRight'
103- | 'marginBottom'
104- | 'marginLeft'
105- | 'marginX'
106- | 'marginY'
107- | 'marginInline'
108- | 'marginInlineStart'
109- | 'marginInlineEnd'
110- | 'marginBlock'
111- | 'marginBlockStart'
112- | 'marginBlockEnd'
113- | 'padding'
114- | 'paddingTop'
115- | 'paddingRight'
116- | 'paddingBottom'
117- | 'paddingLeft'
118- | 'paddingX'
119- | 'paddingY'
120- | 'paddingInline'
121- | 'paddingInlineStart'
122- | 'paddingInlineEnd'
123- | 'paddingBlock'
124- | 'paddingBlockStart'
125- | 'paddingBlockEnd'
126- > ;
127-
128- export declare const typography : SimpleStyleFunction <
129- | 'typography'
130- | 'fontFamily'
131- | 'fontSize'
132- | 'fontStyle'
133- | 'fontWeight'
134- | 'letterSpacing'
135- | 'lineHeight'
136- | 'textAlign'
137- | 'textTransform'
138- > ;
139-
140- // compose.js
141- /**
142- * given a list of StyleFunction return the intersection of the props each individual
143- * StyleFunction requires.
144- *
145- * If `firstFn` requires { color: string } and `secondFn` requires { spacing: number }
146- * their composed function requires { color: string, spacing: number }
147- */
148- type ComposedArg < T > = T extends Array < ( arg : infer P ) => any > ? P : never ;
149- type ComposedOwnerState < T > = ComposedArg < T > ;
150-
151- export type ComposedStyleFunction < T extends Array < StyleFunction < any > > > = StyleFunction <
152- ComposedOwnerState < T >
153- > & { filterProps : string [ ] } ;
11+ import { PropsFor } from '../style' ;
12+ import { ComposedStyleFunction } from '../compose' ;
13+ import borders from '../borders' ;
14+ import display from '../display' ;
15+ import flexbox from '../flexbox' ;
16+ import grid from '../cssGrid' ;
17+ import palette from '../palette' ;
18+ import positions from '../positions' ;
19+ import shadows from '../shadows' ;
20+ import sizing from '../sizing' ;
21+ import spacing from '../spacing' ;
22+ import typography from '../typography' ;
15423
15524export interface CustomSystemProps extends AliasesCSSProperties , OverwriteCSSProperties { }
15625
0 commit comments