UNPKG

58.7 kBTypeScriptView Raw
1import * as CSS from "csstype";
2
3export function get(obj: any, ...paths: Array<string | number>): any;
4
5export type ObjectOrArray<T, K extends keyof any = keyof any> = T[] | Record<K, T | Record<K, T> | T[]>;
6
7export type Scale = ObjectOrArray<number | string>;
8
9export type TLengthStyledSystem = string | 0 | number;
10
11export interface Theme<TLength = TLengthStyledSystem> {
12 breakpoints?: ObjectOrArray<number | string | symbol> | undefined;
13 mediaQueries?: { [size: string]: string } | undefined;
14 space?: ObjectOrArray<CSS.Property.Margin<number | string>> | undefined;
15 fontSizes?: ObjectOrArray<CSS.Property.FontSize<number>> | undefined;
16 colors?: ObjectOrArray<CSS.Property.Color> | undefined;
17 fonts?: ObjectOrArray<CSS.Property.FontFamily> | undefined;
18 fontWeights?: ObjectOrArray<CSS.Property.FontWeight> | undefined;
19 lineHeights?: ObjectOrArray<CSS.Property.LineHeight<TLength>> | undefined;
20 letterSpacings?: ObjectOrArray<CSS.Property.LetterSpacing<TLength>> | undefined;
21 sizes?: ObjectOrArray<CSS.Property.Height<{}> | CSS.Property.Width<{}>> | undefined;
22 borders?: ObjectOrArray<CSS.Property.Border<{}>> | undefined;
23 borderStyles?: ObjectOrArray<CSS.Property.Border<{}>> | undefined;
24 borderWidths?: ObjectOrArray<CSS.Property.BorderWidth<TLength>> | undefined;
25 radii?: ObjectOrArray<CSS.Property.BorderRadius<TLength>> | undefined;
26 shadows?: ObjectOrArray<CSS.Property.BoxShadow> | undefined;
27 zIndices?: ObjectOrArray<CSS.Property.ZIndex> | undefined;
28 buttons?: ObjectOrArray<CSS.StandardProperties> | undefined;
29 colorStyles?: ObjectOrArray<CSS.StandardProperties> | undefined;
30 textStyles?: ObjectOrArray<CSS.StandardProperties> | undefined;
31}
32
33export type RequiredTheme = Required<Theme>;
34
35export type ResponsiveValue<
36 T,
37 ThemeType extends Theme = RequiredTheme,
38> = T | null | Array<T | null> | { [key in ThemeValue<"breakpoints", ThemeType> & string | number]?: T };
39
40export type ThemeValue<K extends keyof ThemeType, ThemeType, TVal = any> = ThemeType[K] extends TVal[] ? number
41 : ThemeType[K] extends Record<infer E, TVal> ? E
42 : ThemeType[K] extends ObjectOrArray<infer F> ? F
43 : never;
44
45export interface SpaceProps<ThemeType extends Theme = RequiredTheme, TVal = ThemeValue<"space", ThemeType>> {
46 /** Margin on top, left, bottom and right */
47 m?: ResponsiveValue<TVal, ThemeType> | undefined;
48 /** Margin on top, left, bottom and right */
49 margin?: ResponsiveValue<TVal, ThemeType> | undefined;
50 /** Margin on top */
51 mt?: ResponsiveValue<TVal, ThemeType> | undefined;
52 /** Margin on top */
53 marginTop?: ResponsiveValue<TVal, ThemeType> | undefined;
54 /** Margin on right */
55 mr?: ResponsiveValue<TVal, ThemeType> | undefined;
56 /** Margin on right */
57 marginRight?: ResponsiveValue<TVal, ThemeType> | undefined;
58 /** Margin on bottom */
59 mb?: ResponsiveValue<TVal, ThemeType> | undefined;
60 /** Margin on bottom */
61 marginBottom?: ResponsiveValue<TVal, ThemeType> | undefined;
62 /** Margin on left */
63 ml?: ResponsiveValue<TVal, ThemeType> | undefined;
64 /** Margin on left */
65 marginLeft?: ResponsiveValue<TVal, ThemeType> | undefined;
66 /** Margin on left and right */
67 mx?: ResponsiveValue<TVal, ThemeType> | undefined;
68 /** Margin on left and right */
69 marginX?: ResponsiveValue<TVal, ThemeType> | undefined;
70 /** Margin on top and bottom */
71 my?: ResponsiveValue<TVal, ThemeType> | undefined;
72 /** Margin on top and bottom */
73 marginY?: ResponsiveValue<TVal, ThemeType> | undefined;
74 /** Padding on top, left, bottom and right */
75 p?: ResponsiveValue<TVal, ThemeType> | undefined;
76 /** Padding on top, left, bottom and right */
77 padding?: ResponsiveValue<TVal, ThemeType> | undefined;
78 /** Padding on top */
79 pt?: ResponsiveValue<TVal, ThemeType> | undefined;
80 /** Padding on top */
81 paddingTop?: ResponsiveValue<TVal, ThemeType> | undefined;
82 /** Padding on right */
83 pr?: ResponsiveValue<TVal, ThemeType> | undefined;
84 /** Padding on right */
85 paddingRight?: ResponsiveValue<TVal, ThemeType> | undefined;
86 /** Padding on bottom */
87 pb?: ResponsiveValue<TVal, ThemeType> | undefined;
88 /** Padding on bottom */
89 paddingBottom?: ResponsiveValue<TVal, ThemeType> | undefined;
90 /** Padding on left */
91 pl?: ResponsiveValue<TVal, ThemeType> | undefined;
92 /** Padding on left */
93 paddingLeft?: ResponsiveValue<TVal, ThemeType> | undefined;
94 /** Padding on left and right */
95 px?: ResponsiveValue<TVal, ThemeType> | undefined;
96 /** Padding on left and right */
97 paddingX?: ResponsiveValue<TVal, ThemeType> | undefined;
98 /** Padding on top and bottom */
99 py?: ResponsiveValue<TVal, ThemeType> | undefined;
100 /** Padding on top and bottom */
101 paddingY?: ResponsiveValue<TVal, ThemeType> | undefined;
102}
103
104// Preserved to support v4 shim:
105// https://github.com/styled-system/styled-system/blob/master/packages/styled-system/src/index.js#L108
106export interface LowLevelStyleFunctionArguments<N, S> {
107 prop: string;
108 cssProperty?: string | undefined;
109 alias?: string | undefined;
110 key?: string | undefined;
111 transformValue?: ((n: N, scale?: S) => any) | undefined;
112 scale?: S | undefined;
113 // new v5 api
114 properties?: string[] | undefined;
115}
116
117// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
118export function style<N = string | number, S = Scale>(
119 args: LowLevelStyleFunctionArguments<N, S>,
120): styleFn;
121
122export interface styleFn {
123 (...args: any[]): any;
124
125 config?: object | undefined;
126 propNames?: string[] | undefined;
127 cache?: object | undefined;
128}
129
130export interface ConfigFunction {
131 (value: any, scale: Scale | undefined, props: any): any;
132 /** A string referencing a key in the `theme` object. */
133 scale?: string;
134 /** A fallback scale object for when there isn't one defined in the `theme` object. */
135 defaults?: Scale;
136}
137
138export interface ConfigStyle {
139 /** The CSS property to use in the returned style object (overridden by `properties` if present). */
140 property?: keyof CSS.Properties | undefined;
141 /**
142 * An array of multiple properties (e.g. `['marginLeft', 'marginRight']`) to which this style's value will be
143 * assigned (overrides `property` when present).
144 */
145 properties?: Array<keyof CSS.Properties> | undefined;
146 /** A string referencing a key in the `theme` object. */
147 scale?: string | undefined;
148 /** A fallback scale object for when there isn't one defined in the `theme` object. */
149 defaultScale?: Scale | undefined;
150 /** A function to transform the raw value based on the scale. */
151 transform?: ((value: any, scale?: Scale) => any) | undefined;
152}
153
154export interface Config {
155 /** Property name exposed for use in components */
156 [customStyleName: string]: ConfigStyle | ConfigFunction | boolean;
157}
158
159export function compose(...parsers: styleFn[]): styleFn;
160
161export function system(styleDefinitions: Config): styleFn;
162
163export function createParser(config: ConfigStyle): styleFn;
164
165export function createStyleFunction(args: ConfigStyle): styleFn;
166
167export interface VariantArgs<
168 TStyle = object,
169 K extends string = string,
170 TPropName = string,
171> {
172 key?: string | undefined;
173 /** Component prop, defaults to "variant" */
174 prop?: TPropName | undefined;
175 /** theme key for variant definitions */
176 scale?: string | undefined;
177 /** inline theme aware variants definitions */
178 variants?:
179 | {
180 [key in K]: TStyle;
181 }
182 | undefined;
183}
184
185export function variant<
186 // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
187 TStyle = object,
188 // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
189 K extends string = string,
190 // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
191 TPropName = string,
192>(
193 props: VariantArgs<TStyle, K, TPropName>,
194): (...args: any[]) => any;
195/**
196 * Converts shorthand or longhand margin and padding props to margin and padding CSS declarations
197 *
198 * - Numbers from 0-4 (or the length of theme.space) are converted to values on the spacing scale.
199 * - Negative values can be used for negative margins.
200 * - Numbers greater than the length of the theme.space array are converted to raw pixel values.
201 * - String values are passed as raw CSS values.
202 * - Array values are converted into responsive values.
203 */
204
205export const space: styleFn;
206
207export interface MarginProps<ThemeType extends Theme = RequiredTheme> extends
208 Pick<
209 SpaceProps<ThemeType>,
210 | "m"
211 | "margin"
212 | "mt"
213 | "marginTop"
214 | "mb"
215 | "marginBottom"
216 | "ml"
217 | "marginLeft"
218 | "mr"
219 | "marginRight"
220 | "my"
221 | "marginY"
222 | "mx"
223 | "marginX"
224 >
225{
226}
227
228export interface MarginTopProps<ThemeType extends Theme = RequiredTheme>
229 extends Pick<SpaceProps<ThemeType>, "mt" | "marginTop">
230{
231}
232
233export interface MarginBottomProps<ThemeType extends Theme = RequiredTheme>
234 extends Pick<SpaceProps<ThemeType>, "mb" | "marginBottom">
235{
236}
237
238export interface MarginLeftProps<ThemeType extends Theme = RequiredTheme>
239 extends Pick<SpaceProps<ThemeType>, "ml" | "marginLeft">
240{
241}
242
243export interface MarginRightProps<ThemeType extends Theme = RequiredTheme>
244 extends Pick<SpaceProps<ThemeType>, "mr" | "marginRight">
245{
246}
247
248export const margin: styleFn;
249export const marginTop: styleFn;
250export const marginBottom: styleFn;
251export const marginLeft: styleFn;
252export const marginRight: styleFn;
253
254export interface PaddingProps<ThemeType extends Theme = RequiredTheme> extends
255 Pick<
256 SpaceProps<ThemeType>,
257 | "p"
258 | "padding"
259 | "pt"
260 | "paddingTop"
261 | "pb"
262 | "paddingBottom"
263 | "pl"
264 | "paddingLeft"
265 | "pr"
266 | "paddingRight"
267 | "py"
268 | "paddingY"
269 | "px"
270 | "paddingX"
271 >
272{
273}
274
275export interface PaddingTopProps<ThemeType extends Theme = RequiredTheme>
276 extends Pick<SpaceProps<ThemeType>, "pt" | "paddingTop">
277{
278}
279
280export interface PaddingBottomProps<ThemeType extends Theme = RequiredTheme>
281 extends Pick<SpaceProps<ThemeType>, "pb" | "paddingBottom">
282{
283}
284
285export interface PaddingLeftProps<ThemeType extends Theme = RequiredTheme>
286 extends Pick<SpaceProps<ThemeType>, "pl" | "paddingLeft">
287{
288}
289
290export interface PaddingRightProps<ThemeType extends Theme = RequiredTheme>
291 extends Pick<SpaceProps<ThemeType>, "pr" | "paddingRight">
292{
293}
294
295export const padding: styleFn;
296export const paddingTop: styleFn;
297export const paddingBottom: styleFn;
298export const paddingLeft: styleFn;
299export const paddingRight: styleFn;
300
301/**
302 * Color
303 */
304
305export interface TextColorProps<ThemeType extends Theme = RequiredTheme, TVal = ThemeValue<"colors", ThemeType>> {
306 /**
307 * The color utility parses a component's `color` and `bg` props and converts them into CSS declarations.
308 * By default the raw value of the prop is returned.
309 *
310 * Color palettes can be configured with the ThemeProvider to use keys as prop values, with support for dot notation.
311 * Array values are converted into responsive values.
312 *
313 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/color)
314 */
315 color?: ResponsiveValue<TVal, ThemeType> | undefined;
316}
317
318export const textColor: styleFn;
319
320export interface BackgroundColorProps<ThemeType extends Theme = RequiredTheme, TVal = ThemeValue<"colors", ThemeType>> {
321 /**
322 * The color utility parses a component's `color` and `bg` props and converts them into CSS declarations.
323 * By default the raw value of the prop is returned.
324 *
325 * Color palettes can be configured with the ThemeProvider to use keys as prop values, with support for dot notation.
326 * Array values are converted into responsive values.
327 *
328 * [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/background-color)
329 */
330 bg?: ResponsiveValue<TVal, ThemeType> | undefined;
331 backgroundColor?: ResponsiveValue<TVal, ThemeType> | undefined;
332}
333
334export const backgroundColor: styleFn;
335
336export interface ColorProps<ThemeType extends Theme = RequiredTheme, TVal = ThemeValue<"colors", ThemeType>>
337 extends TextColorProps<ThemeType, TVal>, BackgroundColorProps<ThemeType, TVal>, OpacityProps
338{
339}
340
341export const color: styleFn;
342
343/**
344 * Typography
345 */
346
347export function getPx(n: any, scale: any): string;
348
349export interface FontSizeProps<ThemeType extends Theme = RequiredTheme, TVal = ThemeValue<"fontSizes", ThemeType>> {
350 /**
351 * The fontSize utility parses a component's `fontSize` prop and converts it into a CSS font-size declaration.
352 *
353 * - Numbers from 0-8 (or `theme.fontSizes.length`) are converted to values on the [font size scale](#default-theme).
354 * - Numbers greater than `theme.fontSizes.length` are converted to raw pixel values.
355 * - String values are passed as raw CSS values.
356 * - And array values are converted into responsive values.
357 */
358 fontSize?: ResponsiveValue<TVal, ThemeType> | undefined;
359}
360
361export const fontSize: styleFn;
362
363export interface FontFamilyProps<ThemeType extends Theme = RequiredTheme> {
364 fontFamily?: ResponsiveValue<CSS.Property.FontFamily, ThemeType> | undefined;
365}
366
367export const fontFamily: styleFn;
368
369export interface FontWeightProps<ThemeType extends Theme = RequiredTheme, TVal = ThemeValue<"fontWeights", ThemeType>> {
370 /**
371 * The font-weight CSS property specifies the weight (or boldness) of the font.
372 *
373 * The font weights available to you will depend on the font-family you are using. Some fonts are only available in normal and bold.
374 *
375 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight)
376 */
377 fontWeight?: ResponsiveValue<TVal, ThemeType> | undefined;
378}
379
380export const fontWeight: styleFn;
381
382export interface LineHeightProps<ThemeType extends Theme = RequiredTheme, TVal = ThemeValue<"lineHeights", ThemeType>> {
383 /**
384 * The line-height CSS property sets the amount of space used for lines, such as in text. On block-level elements,
385 * it specifies the minimum height of line boxes within the element.
386 *
387 * On non-replaced inline elements, it specifies the height that is used to calculate line box height.
388 *
389 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/line-height)
390 */
391 lineHeight?: ResponsiveValue<TVal, ThemeType> | undefined;
392}
393
394export const lineHeight: styleFn;
395
396export interface TextAlignProps<ThemeType extends Theme = RequiredTheme> {
397 /**
398 * The text-align CSS property specifies the horizontal alignment of an inline or table-cell box.
399 *
400 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align)
401 */
402 textAlign?: ResponsiveValue<CSS.Property.TextAlign, ThemeType> | undefined;
403}
404
405export const textAlign: styleFn;
406
407export interface FontStyleProps<ThemeType extends Theme = RequiredTheme> {
408 /**
409 * The font-style CSS property specifies whether a font should be styled with a normal, italic,
410 * or oblique face from its font-family.
411 *
412 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/font-style)
413 */
414 fontStyle?: ResponsiveValue<CSS.Property.FontStyle, ThemeType> | undefined;
415}
416
417export const fontStyle: styleFn;
418
419export interface LetterSpacingProps<
420 ThemeType extends Theme = RequiredTheme,
421 TVal = ThemeValue<"letterSpacings", ThemeType>,
422> {
423 /**
424 * The letter-spacing CSS property sets the spacing behavior between text characters.
425 *
426 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/letter-spacing)
427 */
428 letterSpacing?: ResponsiveValue<TVal, ThemeType> | undefined;
429}
430
431export const letterSpacing: styleFn;
432
433/**
434 * A convenience style group containing props related to typography such as fontFamily, fontSize, fontWeight, etc.
435 *
436 * - String values are passed as raw CSS values.
437 * - Array values are converted into responsive values.
438 */
439export interface TypographyProps<ThemeType extends Theme = RequiredTheme>
440 extends
441 FontFamilyProps<ThemeType>,
442 FontSizeProps<ThemeType>,
443 FontWeightProps<ThemeType>,
444 LineHeightProps<ThemeType>,
445 LetterSpacingProps<ThemeType>,
446 FontStyleProps<ThemeType>,
447 TextAlignProps<ThemeType>
448{
449}
450
451export const typography: styleFn;
452
453/**
454 * Layout
455 */
456
457export interface DisplayProps<ThemeType extends Theme = RequiredTheme> {
458 /**
459 * The display CSS property defines the display type of an element, which consists of the two basic qualities
460 * of how an element generates boxes — the outer display type defining how the box participates in flow layout,
461 * and the inner display type defining how the children of the box are laid out.
462 *
463 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/display)
464 */
465 display?: ResponsiveValue<CSS.Property.Display, ThemeType> | undefined;
466}
467
468export const display: styleFn;
469
470export interface WidthProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.Property.Width<TLengthStyledSystem>> {
471 /**
472 * The width utility parses a component's `width` prop and converts it into a CSS width declaration.
473 *
474 * - Numbers from 0-1 are converted to percentage widths.
475 * - Numbers greater than 1 are converted to pixel values.
476 * - String values are passed as raw CSS values.
477 * - And arrays are converted to responsive width styles.
478 */
479 width?: ResponsiveValue<TVal, ThemeType> | undefined;
480}
481
482export const width: styleFn;
483
484export interface MaxWidthProps<
485 ThemeType extends Theme = RequiredTheme,
486 TVal = CSS.Property.MaxWidth<TLengthStyledSystem>,
487> {
488 /**
489 * The max-width CSS property sets the maximum width of an element.
490 * It prevents the used value of the width property from becoming larger than the value specified by max-width.
491 *
492 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/max-width)
493 */
494 maxWidth?: ResponsiveValue<TVal, ThemeType> | undefined;
495}
496
497export const maxWidth: styleFn;
498
499export interface MinWidthProps<
500 ThemeType extends Theme = RequiredTheme,
501 TVal = CSS.Property.MinWidth<TLengthStyledSystem>,
502> {
503 /**
504 * The min-width CSS property sets the minimum width of an element.
505 * It prevents the used value of the width property from becoming smaller than the value specified for min-width.
506 *
507 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/min-width)
508 */
509 minWidth?: ResponsiveValue<TVal, ThemeType> | undefined;
510}
511
512export const minWidth: styleFn;
513
514export interface HeightProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.Property.Height<TLengthStyledSystem>> {
515 /**
516 * The height CSS property specifies the height of an element. By default, the property defines the height of the
517 * content area. If box-sizing is set to border-box, however, it instead determines the height of the border area.
518 *
519 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/height)
520 */
521 height?: ResponsiveValue<TVal, ThemeType> | undefined;
522}
523
524export const height: styleFn;
525
526export interface MaxHeightProps<
527 ThemeType extends Theme = RequiredTheme,
528 TVal = CSS.Property.MaxHeight<TLengthStyledSystem>,
529> {
530 /**
531 * The max-height CSS property sets the maximum height of an element. It prevents the used value of the height
532 * property from becoming larger than the value specified for max-height.
533 *
534 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/max-height)
535 */
536 maxHeight?: ResponsiveValue<TVal, ThemeType> | undefined;
537}
538
539export const maxHeight: styleFn;
540
541export interface MinHeightProps<
542 ThemeType extends Theme = RequiredTheme,
543 TVal = CSS.Property.MinHeight<TLengthStyledSystem>,
544> {
545 /**
546 * The min-height CSS property sets the minimum height of an element. It prevents the used value of the height
547 * property from becoming smaller than the value specified for min-height.
548 *
549 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/display)
550 */
551 minHeight?: ResponsiveValue<TVal, ThemeType> | undefined;
552}
553
554export const minHeight: styleFn;
555
556export interface SizeProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.Property.Height<TLengthStyledSystem>> {
557 size?: ResponsiveValue<TVal, ThemeType> | undefined;
558}
559
560export const size: styleFn;
561
562export interface VerticalAlignProps<
563 ThemeType extends Theme = RequiredTheme,
564 TVal = CSS.Property.VerticalAlign<TLengthStyledSystem>,
565> {
566 /**
567 * The vertical-align CSS property specifies sets vertical alignment of an inline or table-cell box.
568 *
569 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/vertical-align)
570 */
571 verticalAlign?: ResponsiveValue<TVal, ThemeType> | undefined;
572}
573
574export const verticalAlign: styleFn;
575
576/**
577 * Flexbox
578 */
579export interface AlignItemsProps<ThemeType extends Theme = RequiredTheme> {
580 /**
581 * The CSS align-items property sets the align-self value on all direct children as a group. The align-self
582 * property sets the alignment of an item within its containing block.
583 *
584 * In Flexbox it controls the alignment of items on the Cross Axis, in Grid Layout it controls the alignment
585 * of items on the Block Axis within their grid area.
586 *
587 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/align-items)
588 */
589 alignItems?: ResponsiveValue<CSS.Property.AlignItems, ThemeType> | undefined;
590}
591
592export const alignItems: styleFn;
593
594export interface AlignContentProps<ThemeType extends Theme = RequiredTheme> {
595 /**
596 * The CSS align-content property sets how the browser distributes space between and around content items
597 * along the cross-axis of a flexbox container, and the main-axis of a grid container.
598 *
599 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/align-content)
600 */
601 alignContent?: ResponsiveValue<CSS.Property.AlignContent, ThemeType> | undefined;
602}
603
604export const alignContent: styleFn;
605
606export interface JustifyItemsProps<ThemeType extends Theme = RequiredTheme> {
607 /**
608 * The CSS justify-items property defines the default justify-self for all items of the box, giving them all
609 * a default way of justifying each box along the appropriate axis.
610 *
611 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/justify-items)
612 */
613 justifyItems?: ResponsiveValue<CSS.Property.JustifyItems, ThemeType> | undefined;
614}
615
616export const justifyItems: styleFn;
617
618export interface JustifyContentProps<ThemeType extends Theme = RequiredTheme> {
619 /**
620 * The CSS justify-content property defines how the browser distributes space between and around content items
621 * along the main-axis of a flex container, and the inline axis of a grid container.
622 *
623 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content)
624 */
625 justifyContent?: ResponsiveValue<CSS.Property.JustifyContent, ThemeType> | undefined;
626}
627
628export const justifyContent: styleFn;
629
630export interface FlexWrapProps<ThemeType extends Theme = RequiredTheme> {
631 /**
632 * The flex-wrap CSS property sets whether flex items are forced onto one line or can wrap onto multiple lines.
633 * If wrapping is allowed, it sets the direction that lines are stacked.
634 *
635 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/flex-wrap)
636 */
637 flexWrap?: ResponsiveValue<CSS.Property.FlexWrap, ThemeType> | undefined;
638}
639
640export const flexWrap: styleFn;
641
642export interface FlexBasisProps<
643 ThemeType extends Theme = RequiredTheme,
644 TVal = CSS.Property.FlexBasis<TLengthStyledSystem>,
645> {
646 // TODO: The FlexBasisValue currently really only exists for documentation
647 // purposes, because flex-basis also accepts `Nem` and `Npx` strings.
648 // Not sure there’s a way to still have the union values show up as
649 // auto-completion results.
650 flexBasis?: ResponsiveValue<TVal, ThemeType> | undefined;
651}
652
653export const flexBasis: styleFn;
654
655export interface FlexDirectionProps<ThemeType extends Theme = RequiredTheme> {
656 /**
657 * The flex-direction CSS property specifies how flex items are placed in the flex container defining the main
658 * axis and the direction (normal or reversed).
659 *
660 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/flex-direction)
661 */
662 flexDirection?: ResponsiveValue<CSS.Property.FlexDirection, ThemeType> | undefined;
663}
664
665export const flexDirection: styleFn;
666
667export interface FlexProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.Property.Flex<TLengthStyledSystem>> {
668 /**
669 * The flex CSS property specifies how a flex item will grow or shrink so as to fit the space available in
670 * its flex container. This is a shorthand property that sets flex-grow, flex-shrink, and flex-basis.
671 *
672 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/flex)
673 */
674 flex?: ResponsiveValue<TVal, ThemeType> | undefined;
675}
676
677export const flex: styleFn;
678
679export interface JustifySelfProps<ThemeType extends Theme = RequiredTheme> {
680 /**
681 * The CSS justify-self property set the way a box is justified inside its alignment container along
682 * the appropriate axis.
683 *
684 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/justify-self)
685 */
686 justifySelf?: ResponsiveValue<CSS.Property.JustifySelf, ThemeType> | undefined;
687}
688
689export const justifySelf: styleFn;
690
691export interface AlignSelfProps<ThemeType extends Theme = RequiredTheme> {
692 /**
693 * The align-self CSS property aligns flex items of the current flex line overriding the align-items value.
694 *
695 * If any of the item's cross-axis margin is set to auto, then align-self is ignored. In Grid layout align-self
696 * aligns the item inside the grid area.
697 *
698 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/align-self)
699 */
700 alignSelf?: ResponsiveValue<CSS.Property.AlignSelf, ThemeType> | undefined;
701}
702
703export const alignSelf: styleFn;
704
705export interface OrderProps<ThemeType extends Theme = RequiredTheme> {
706 /**
707 * The order CSS property sets the order to lay out an item in a flex or grid container. Items in a container
708 * are sorted by ascending order value and then by their source code order.
709 *
710 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/order)
711 */
712 order?: ResponsiveValue<CSS.Property.Order, ThemeType> | undefined;
713}
714
715export const order: styleFn;
716
717export interface FlexGrowProps<ThemeType extends Theme = RequiredTheme> {
718 /**
719 * The flex-grow CSS property sets the flex grow factor of a flex item main size. It specifies how much of the
720 * remaining space in the flex container should be assigned to the item (the flex grow factor).
721 *
722 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/flex-grow)
723 */
724 flexGrow?: ResponsiveValue<CSS.Property.FlexGrow, ThemeType> | undefined;
725}
726
727export const flexGrow: styleFn;
728
729export interface FlexShrinkProps<ThemeType extends Theme = RequiredTheme> {
730 /**
731 * The flex-shrink CSS property sets the flex shrink factor of a flex item. If the size of all flex items is larger
732 * than the flex container, items shrink to fit according to flex-shrink.
733 *
734 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/flex-shrink)
735 */
736 flexShrink?: ResponsiveValue<CSS.Property.FlexShrink, ThemeType> | undefined;
737}
738
739export const flexShrink: styleFn;
740
741/**
742 * A convenience style group containing props related to flexbox.
743 *
744 * - String values are passed as raw CSS values.
745 * - Array values are converted into responsive values.
746 */
747export interface FlexboxProps<ThemeType extends Theme = RequiredTheme>
748 extends
749 AlignItemsProps<ThemeType>,
750 AlignContentProps<ThemeType>,
751 JustifyItemsProps<ThemeType>,
752 JustifyContentProps<ThemeType>,
753 FlexWrapProps<ThemeType>,
754 FlexDirectionProps<ThemeType>,
755 FlexProps<ThemeType>,
756 FlexGrowProps<ThemeType>,
757 FlexShrinkProps<ThemeType>,
758 FlexBasisProps<ThemeType>,
759 JustifySelfProps<ThemeType>,
760 AlignSelfProps<ThemeType>,
761 OrderProps<ThemeType>
762{
763}
764
765export const flexbox: styleFn;
766
767/**
768 * Grid Layout
769 */
770
771export interface GridGapProps<
772 ThemeType extends Theme = RequiredTheme,
773 TVal = CSS.Property.GridGap<TLengthStyledSystem>,
774> {
775 /**
776 * The gap CSS property sets the gaps (gutters) between rows and columns. It is a shorthand for row-gap
777 * and column-gap.
778 *
779 * @deprecated use gap
780 *
781 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/gap)
782 */
783 gridGap?: ResponsiveValue<TVal, ThemeType> | undefined;
784}
785
786export const gridGap: styleFn;
787
788export interface GridColumnGapProps<
789 ThemeType extends Theme = RequiredTheme,
790 TVal = CSS.Property.GridColumnGap<TLengthStyledSystem>,
791> {
792 /**
793 * The column-gap CSS property sets the size of the gap (gutter) between an element's columns.
794 *
795 * @deprecated use column-gap
796 *
797 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/column-gap)
798 */
799 gridColumnGap?: ResponsiveValue<TVal, ThemeType> | undefined;
800}
801
802export const gridColumnGap: styleFn;
803
804export interface GridRowGapProps<
805 ThemeType extends Theme = RequiredTheme,
806 TVal = CSS.Property.GridRowGap<TLengthStyledSystem>,
807> {
808 /**
809 * The row-gap CSS property sets the size of the gap (gutter) between an element's rows.
810 *
811 * @deprecated use row-gap
812 *
813 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/row-gap)
814 */
815 gridRowGap?: ResponsiveValue<TVal, ThemeType> | undefined;
816}
817
818export const gridRowGap: styleFn;
819
820export interface GridColumnProps<ThemeType extends Theme = RequiredTheme> {
821 /**
822 * The grid-column CSS property is a shorthand property for grid-column-start and grid-column-end specifying
823 * a grid item's size and location within the grid column by contributing a line, a span, or nothing (automatic)
824 * to its grid placement, thereby specifying the inline-start and inline-end edge of its grid area.
825 *
826 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column)
827 */
828 gridColumn?: ResponsiveValue<CSS.Property.GridColumn, ThemeType> | undefined;
829}
830
831export const gridColumn: styleFn;
832
833export interface GridRowProps<ThemeType extends Theme = RequiredTheme> {
834 /**
835 * The grid-row CSS property is a shorthand property for grid-row-start and grid-row-end specifying a grid item’s
836 * size and location within the grid row by contributing a line, a span, or nothing (automatic) to its grid
837 * placement, thereby specifying the inline-start and inline-end edge of its grid area.
838 *
839 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row)
840 */
841 gridRow?: ResponsiveValue<CSS.Property.GridRow, ThemeType> | undefined;
842}
843
844export const gridRow: styleFn;
845
846export interface GridAutoFlowProps<ThemeType extends Theme = RequiredTheme> {
847 /**
848 * The grid-auto-flow CSS property controls how the auto-placement algorithm works, specifying exactly
849 * how auto-placed items get flowed into the grid.
850 *
851 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-flow)
852 */
853 gridAutoFlow?: ResponsiveValue<CSS.Property.GridAutoFlow, ThemeType> | undefined;
854}
855
856export const gridAutoFlow: styleFn;
857
858export interface GridAutoColumnsProps<
859 ThemeType extends Theme = RequiredTheme,
860 TVal = CSS.Property.GridAutoColumns<TLengthStyledSystem>,
861> {
862 /**
863 * The grid-auto-columns CSS property specifies the size of an implicitly-created grid column track.
864 *
865 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-columns)
866 */
867 gridAutoColumns?: ResponsiveValue<TVal, ThemeType> | undefined;
868}
869
870export const gridAutoColumns: styleFn;
871
872export interface GridAutoRowsProps<
873 ThemeType extends Theme = RequiredTheme,
874 TVal = CSS.Property.GridAutoRows<TLengthStyledSystem>,
875> {
876 /**
877 * The grid-auto-rows CSS property specifies the size of an implicitly-created grid row track.
878 *
879 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-rows)
880 */
881 gridAutoRows?: ResponsiveValue<TVal, ThemeType> | undefined;
882}
883
884export const gridAutoRows: styleFn;
885
886export interface GridTemplateColumnsProps<
887 ThemeType extends Theme = RequiredTheme,
888 TVal = CSS.Property.GridTemplateColumns<TLengthStyledSystem>,
889> {
890 /**
891 * The grid-template-columns CSS property defines the line names and track sizing functions of the grid columns.
892 *
893 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-columns)
894 */
895 gridTemplateColumns?: ResponsiveValue<TVal, ThemeType> | undefined;
896}
897
898export const gridTemplateColumns: styleFn;
899
900export interface GridTemplateRowsProps<
901 ThemeType extends Theme = RequiredTheme,
902 TVal = CSS.Property.GridTemplateRows<TLengthStyledSystem>,
903> {
904 /**
905 * The grid-template-rows CSS property defines the line names and track sizing functions of the grid rows.
906 *
907 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/row-template-rows)
908 */
909 gridTemplateRows?: ResponsiveValue<TVal, ThemeType> | undefined;
910}
911
912export const gridTemplateRows: styleFn;
913
914export interface GridTemplateAreasProps<ThemeType extends Theme = RequiredTheme> {
915 /**
916 * The grid-template-areas CSS property specifies named grid areas.
917 *
918 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-areas)
919 */
920 gridTemplateAreas?: ResponsiveValue<CSS.Property.GridTemplateAreas, ThemeType> | undefined;
921}
922
923export const gridTemplateAreas: styleFn;
924
925export interface GridAreaProps<ThemeType extends Theme = RequiredTheme> {
926 /**
927 * The grid-area CSS property is a shorthand property for grid-row-start, grid-column-start, grid-row-end
928 * and grid-column-end, specifying a grid item’s size and location within the grid row by contributing a line,
929 * a span, or nothing (automatic) to its grid placement, thereby specifying the edges of its grid area.
930 *
931 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-area)
932 */
933 gridArea?: ResponsiveValue<CSS.Property.GridArea, ThemeType> | undefined;
934}
935
936export const gridArea: styleFn;
937
938/**
939 * A convenience style group containing props related to grid.
940 *
941 * - String values are passed as raw CSS values.
942 * - Array values are converted into responsive values.
943 */
944export interface GridProps<ThemeType extends Theme = RequiredTheme>
945 extends
946 GridGapProps<ThemeType>,
947 GridColumnGapProps<ThemeType>,
948 GridRowGapProps<ThemeType>,
949 GridColumnProps<ThemeType>,
950 GridRowProps<ThemeType>,
951 GridAutoFlowProps<ThemeType>,
952 GridAutoColumnsProps<ThemeType>,
953 GridAutoRowsProps<ThemeType>,
954 GridTemplateColumnsProps<ThemeType>,
955 GridTemplateRowsProps<ThemeType>,
956 GridTemplateAreasProps<ThemeType>,
957 GridAreaProps<ThemeType>
958{
959}
960
961export const grid: styleFn;
962
963/**
964 * A convenience style group containing props related to layout such as width, height, and display.
965 *
966 * - For length props, Numbers from 0-4 (or the length of theme.sizes) are converted to values on the spacing scale.
967 * - For length props, Numbers greater than the length of the theme.sizes array are converted to raw pixel values.
968 * - String values are passed as raw CSS values.
969 * - Array values are converted into responsive values.
970 */
971export interface LayoutProps<ThemeType extends Theme = RequiredTheme>
972 extends
973 WidthProps<ThemeType>,
974 HeightProps<ThemeType>,
975 MinWidthProps<ThemeType>,
976 MinHeightProps<ThemeType>,
977 MaxWidthProps<ThemeType>,
978 MaxHeightProps<ThemeType>,
979 DisplayProps<ThemeType>,
980 VerticalAlignProps<ThemeType>,
981 SizeProps<ThemeType>,
982 OverflowProps<ThemeType>
983{
984}
985
986export const layout: styleFn;
987
988/**
989 * Borders
990 */
991
992export interface BorderWidthProps<
993 ThemeType extends Theme = RequiredTheme,
994 TVal = ThemeValue<"borderWidths", ThemeType>,
995> {
996 /**
997 * The border-width shorthand CSS property sets the width of all sides of an element's border.
998 *
999 * [MDN * reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-width)
1000 */
1001 borderWidth?: ResponsiveValue<TVal, ThemeType> | undefined;
1002 /**
1003 * The border-top-width CSS property sets the width of the top border of an element.
1004 *
1005 * [MDN * reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-width)
1006 */
1007 borderTopWidth?: ResponsiveValue<TVal, ThemeType> | undefined;
1008 /**
1009 * The border-bottom-width CSS property sets the width of the bottom border of an element.
1010 *
1011 * [MDN * reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-width)
1012 */
1013 borderBottomWidth?: ResponsiveValue<TVal, ThemeType> | undefined;
1014 /**
1015 * The border-left-width CSS property sets the width of the left border of an element.
1016 *
1017 * [MDN * reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-left-width)
1018 */
1019 borderLeftWidth?: ResponsiveValue<TVal, ThemeType> | undefined;
1020 /**
1021 * The border-right-width CSS property sets the width of the right border of an element.
1022 *
1023 * [MDN * reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-right-width)
1024 */
1025 borderRightWidth?: ResponsiveValue<TVal, ThemeType> | undefined;
1026}
1027
1028export const borderWidth: styleFn;
1029
1030export interface BorderStyleProps<ThemeType extends Theme = RequiredTheme> {
1031 /**
1032 * The border-style shorthand CSS property sets the style of all sides of an element's border.
1033 *
1034 * [MDN * reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-style)
1035 */
1036 borderStyle?: ResponsiveValue<CSS.Property.BorderStyle, ThemeType> | undefined;
1037 /**
1038 * The border-top-style CSS property sets the line style of an element's top border.
1039 *
1040 * [MDN * reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-style)
1041 */
1042 borderTopStyle?: ResponsiveValue<CSS.Property.BorderTopStyle, ThemeType> | undefined;
1043 /**
1044 * The border-bottom-style CSS property sets the line style of an element's bottom border.
1045 *
1046 * [MDN * reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-style)
1047 */
1048 borderBottomStyle?: ResponsiveValue<CSS.Property.BorderBottomStyle, ThemeType> | undefined;
1049 /**
1050 * The border-left-style CSS property sets the line style of an element's left border.
1051 *
1052 * [MDN * reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-left-style)
1053 */
1054 borderLeftStyle?: ResponsiveValue<CSS.Property.BorderLeftStyle, ThemeType> | undefined;
1055 /**
1056 * The border-right-style CSS property sets the line style of an element's right border.
1057 *
1058 * [MDN * reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-right-style)
1059 */
1060 borderRightStyle?: ResponsiveValue<CSS.Property.BorderRightStyle, ThemeType> | undefined;
1061}
1062
1063export const borderStyle: styleFn;
1064
1065export interface BorderColorProps<ThemeType extends Theme = RequiredTheme, TVal = ThemeValue<"colors", ThemeType>> {
1066 /**
1067 * The border-color shorthand CSS property sets the color of all sides of an element's border.
1068 *
1069 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-color)
1070 */
1071 borderColor?: ResponsiveValue<TVal, ThemeType> | undefined;
1072 /**
1073 * The border-top-color CSS property sets the color of an element's top border. It can also be set with the shorthand CSS properties border-color or border-top.
1074 *
1075 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-color)
1076 */
1077 borderTopColor?: ResponsiveValue<TVal, ThemeType> | undefined;
1078 /**
1079 * The border-bottom-color CSS property sets the color of an element's bottom border. It can also be set with the shorthand CSS properties border-color or border-bottom.
1080 *
1081 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-color)
1082 */
1083 borderBottomColor?: ResponsiveValue<TVal, ThemeType> | undefined;
1084 /**
1085 * The border-left-color CSS property sets the color of an element's left border. It can also be set with the shorthand CSS properties border-color or border-left.
1086 *
1087 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-left-color)
1088 */
1089 borderLeftColor?: ResponsiveValue<TVal, ThemeType> | undefined;
1090 /**
1091 * The border-right-color CSS property sets the color of an element's right border. It can also be set with the shorthand CSS properties border-color or border-right.
1092 *
1093 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-right-color)
1094 */
1095 borderRightColor?: ResponsiveValue<TVal, ThemeType> | undefined;
1096}
1097
1098export const borderColor: styleFn;
1099
1100export interface BorderTopProps<
1101 ThemeType extends Theme = RequiredTheme,
1102 TVal = CSS.Property.BorderTop<TLengthStyledSystem>,
1103> {
1104 /**
1105 * The border-top CSS property is a shorthand that sets the values of border-top-width, border-top-style,
1106 * and border-top-color. These properties describe an element's top border.
1107 *
1108 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-top)
1109 */
1110 borderTop?: ResponsiveValue<TVal, ThemeType> | undefined;
1111}
1112
1113export const borderTop: styleFn;
1114
1115export interface BorderRightProps<
1116 ThemeType extends Theme = RequiredTheme,
1117 TVal = CSS.Property.BorderRight<TLengthStyledSystem>,
1118> {
1119 /**
1120 * The border-right CSS property is a shorthand that sets border-right-width, border-right-style,
1121 * and border-right-color. These properties set an element's right border.
1122 *
1123 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-right)
1124 */
1125 borderRight?: ResponsiveValue<TVal, ThemeType> | undefined;
1126}
1127
1128export const borderRight: styleFn;
1129
1130export interface BorderBottomProps<
1131 ThemeType extends Theme = RequiredTheme,
1132 TVal = CSS.Property.BorderBottom<TLengthStyledSystem>,
1133> {
1134 /**
1135 * The border-bottom CSS property sets an element's bottom border. It's a shorthand for
1136 * border-bottom-width, border-bottom-style and border-bottom-color.
1137 *
1138 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom)
1139 */
1140 borderBottom?: ResponsiveValue<TVal, ThemeType> | undefined;
1141}
1142
1143export const borderBottom: styleFn;
1144
1145export interface BorderLeftProps<
1146 ThemeType extends Theme = RequiredTheme,
1147 TVal = CSS.Property.BorderLeft<TLengthStyledSystem>,
1148> {
1149 /**
1150 * The border-left CSS property is a shorthand that sets the values of border-left-width,
1151 * border-left-style, and border-left-color. These properties describe an element's left border.
1152 *
1153 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-left)
1154 */
1155 borderLeft?: ResponsiveValue<TVal, ThemeType> | undefined;
1156}
1157
1158export const borderLeft: styleFn;
1159
1160export interface BorderRadiusProps<ThemeType extends Theme = RequiredTheme, TVal = ThemeValue<"radii", ThemeType>> {
1161 /**
1162 * The border-radius CSS property rounds the corners of an element's outer border edge. You can set a single
1163 * radius to make circular corners, or two radii to make elliptical corners.
1164 *
1165 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius)
1166 */
1167 borderRadius?: ResponsiveValue<TVal, ThemeType> | undefined;
1168 /**
1169 * The border-top-left-radius CSS property rounds the top-left corner of an element.
1170 *
1171 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-left-radius)
1172 */
1173 borderTopLeftRadius?: ResponsiveValue<TVal, ThemeType> | undefined;
1174 /**
1175 * The border-top-right-radius CSS property rounds the top-right corner of an element.
1176 *
1177 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-right-radius)
1178 */
1179 borderTopRightRadius?: ResponsiveValue<TVal, ThemeType> | undefined;
1180 /**
1181 * The border-bottom-left-radius CSS property rounds the bottom-left corner of an element.
1182 *
1183 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-left-radius)
1184 */
1185 borderBottomLeftRadius?: ResponsiveValue<TVal, ThemeType> | undefined;
1186 /**
1187 * The border-bottom-right-radius CSS property rounds the bottom-right corner of an element.
1188 *
1189 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-right-radius)
1190 */
1191 borderBottomRightRadius?: ResponsiveValue<TVal, ThemeType> | undefined;
1192}
1193
1194export const borderRadius: styleFn;
1195
1196export interface BordersProps<ThemeType extends Theme = RequiredTheme>
1197 extends
1198 BorderProps<ThemeType>,
1199 BorderTopProps<ThemeType>,
1200 BorderRightProps<ThemeType>,
1201 BorderBottomProps<ThemeType>,
1202 BorderLeftProps<ThemeType>,
1203 BorderWidthProps<ThemeType>,
1204 BorderColorProps<ThemeType>,
1205 BorderStyleProps<ThemeType>,
1206 BorderRadiusProps<ThemeType>
1207{
1208}
1209
1210export const borders: styleFn;
1211
1212export interface BorderProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.Property.Border<TLengthStyledSystem>>
1213 extends
1214 BorderWidthProps<ThemeType>,
1215 BorderStyleProps<ThemeType>,
1216 BorderColorProps<ThemeType>,
1217 BorderRadiusProps<ThemeType>,
1218 BorderTopProps<ThemeType>,
1219 BorderRightProps<ThemeType>,
1220 BorderBottomProps<ThemeType>,
1221 BorderLeftProps<ThemeType>
1222{
1223 /**
1224 * The border CSS property sets an element's border. It's a shorthand for border-width, border-style,
1225 * and border-color.
1226 *
1227 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border)
1228 */
1229 border?: ResponsiveValue<TVal, ThemeType> | undefined;
1230 borderX?: ResponsiveValue<TVal, ThemeType> | undefined;
1231 borderY?: ResponsiveValue<TVal, ThemeType> | undefined;
1232}
1233
1234export const border: styleFn;
1235
1236export interface BoxShadowProps<ThemeType extends Theme = RequiredTheme> {
1237 /**
1238 * The box-shadow CSS property adds shadow effects around an element's frame. You can set multiple effects separated
1239 * by commas. A box shadow is described by X and Y offsets relative to the element, blur and spread radii and color.
1240 *
1241 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow)
1242 */
1243 boxShadow?: ResponsiveValue<CSS.Property.BoxShadow | number, ThemeType> | undefined;
1244}
1245
1246export const boxShadow: styleFn;
1247
1248export interface TextShadowProps<ThemeType extends Theme = RequiredTheme> {
1249 /**
1250 * The `text-shadow` CSS property adds shadows to text. It accepts a comma-separated list of shadows to be applied
1251 * to the text and any of its `decorations`. Each shadow is described by some combination of X and Y offsets from
1252 * the element, blur radius, and color.
1253 *
1254 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow)
1255 */
1256 textShadow?: ResponsiveValue<CSS.Property.TextShadow | number, ThemeType> | undefined;
1257}
1258
1259export const textShadow: styleFn;
1260
1261export interface ShadowProps<ThemeType extends Theme = RequiredTheme>
1262 extends BoxShadowProps<ThemeType>, TextShadowProps<ThemeType>
1263{
1264}
1265
1266export const shadow: styleFn;
1267
1268export interface OpacityProps<ThemeType extends Theme = RequiredTheme> {
1269 /**
1270 * The opacity CSS property sets the transparency of an element or the degree to which content
1271 * behind an element is visible.
1272 *
1273 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/opacity)
1274 */
1275 opacity?: ResponsiveValue<CSS.Property.Opacity, ThemeType> | undefined;
1276}
1277
1278export const opacity: styleFn;
1279
1280export interface OverflowProps<ThemeType extends Theme = RequiredTheme> {
1281 /**
1282 * The overflow CSS property sets what to do when an element's content is too big to fit in its block
1283 * formatting context. It is a shorthand for overflow-x and overflow-y.
1284 *
1285 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/overflow)
1286 */
1287 overflow?: ResponsiveValue<CSS.Property.Overflow, ThemeType> | undefined;
1288 /**
1289 * The overflow-x CSS property sets what shows when content overflows a block-level element's left
1290 * and right edges. This may be nothing, a scroll bar, or the overflow content.
1291 *
1292 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-x)
1293 */
1294 overflowX?: ResponsiveValue<CSS.Property.OverflowX, ThemeType> | undefined;
1295 /**
1296 * The overflow-y CSS property sets what shows when content overflows a block-level element's top
1297 * and bottom edges. This may be nothing, a scroll bar, or the overflow content.
1298 *
1299 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-y)
1300 */
1301 overflowY?: ResponsiveValue<CSS.Property.OverflowY, ThemeType> | undefined;
1302}
1303
1304export const overflow: styleFn;
1305export const overflowX: styleFn;
1306export const overflowY: styleFn;
1307
1308/**
1309 * Background
1310 */
1311
1312export interface BackgroundImageProps<ThemeType extends Theme = RequiredTheme> {
1313 /**
1314 * The background-image CSS property sets one or more background images on an element.
1315 *
1316 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/background-image)
1317 */
1318 backgroundImage?: ResponsiveValue<CSS.Property.BackgroundImage, ThemeType> | undefined;
1319}
1320
1321export const backgroundImage: styleFn;
1322
1323export interface BackgroundSizeProps<
1324 ThemeType extends Theme = RequiredTheme,
1325 TVal = CSS.Property.BackgroundSize<TLengthStyledSystem>,
1326> {
1327 /**
1328 * The background-size CSS property sets the size of the element's background image. The
1329 * image can be left to its natural size, stretched, or constrained to fit the available space.
1330 *
1331 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size)
1332 */
1333 backgroundSize?: ResponsiveValue<TVal, ThemeType> | undefined;
1334}
1335
1336export const backgroundSize: styleFn;
1337
1338export interface BackgroundPositionProps<
1339 ThemeType extends Theme = RequiredTheme,
1340 TVal = CSS.Property.BackgroundPosition<TLengthStyledSystem>,
1341> {
1342 /**
1343 * The background-position CSS property sets the initial position for each background image. The
1344 * position is relative to the position layer set by background-origin.
1345 *
1346 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/background-position)
1347 */
1348 backgroundPosition?: ResponsiveValue<TVal, ThemeType> | undefined;
1349}
1350
1351export const backgroundPosition: styleFn;
1352
1353export interface BackgroundRepeatProps<ThemeType extends Theme = RequiredTheme> {
1354 /**
1355 * The background-repeat CSS property sets how background images are repeated. A background
1356 * image can be repeated along the horizontal and vertical axes, or not repeated at all.
1357 *
1358 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/background-repeat)
1359 */
1360 backgroundRepeat?: ResponsiveValue<CSS.Property.BackgroundRepeat, ThemeType> | undefined;
1361}
1362
1363export const backgroundRepeat: styleFn;
1364
1365export interface BackgroundProps<
1366 ThemeType extends Theme = RequiredTheme,
1367 TVal = CSS.Property.Background<TLengthStyledSystem>,
1368> extends
1369 BackgroundImageProps<ThemeType>,
1370 BackgroundSizeProps<ThemeType>,
1371 BackgroundPositionProps<ThemeType>,
1372 BackgroundRepeatProps<ThemeType>
1373{
1374 /**
1375 * The background shorthand CSS property sets all background style properties at once,
1376 * such as color, image, origin and size, repeat method, and others.
1377 *
1378 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/background)
1379 */
1380 background?: ResponsiveValue<TVal, ThemeType> | undefined;
1381}
1382
1383export const background: styleFn;
1384
1385/**
1386 * Position
1387 */
1388
1389export interface ZIndexProps<ThemeType extends Theme = RequiredTheme> {
1390 /**
1391 * The z-index CSS property sets the z-order of a positioned element and its descendants or
1392 * flex items. Overlapping elements with a larger z-index cover those with a smaller one.
1393 *
1394 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/z-index)
1395 */
1396 zIndex?: ResponsiveValue<CSS.Property.ZIndex, ThemeType> | undefined;
1397}
1398
1399export const zIndex: styleFn;
1400
1401export interface TopProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.Property.Top<TLengthStyledSystem>> {
1402 /**
1403 * The top CSS property participates in specifying the vertical position of a
1404 * positioned element. It has no effect on non-positioned elements.
1405 *
1406 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/top)
1407 */
1408 top?: ResponsiveValue<TVal, ThemeType> | undefined;
1409}
1410
1411export const top: styleFn;
1412
1413export interface RightProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.Property.Right<TLengthStyledSystem>> {
1414 /**
1415 * The right CSS property participates in specifying the horizontal position of a
1416 * positioned element. It has no effect on non-positioned elements.
1417 *
1418 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/right)
1419 */
1420 right?: ResponsiveValue<TVal, ThemeType> | undefined;
1421}
1422
1423export const right: styleFn;
1424
1425export interface BottomProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.Property.Bottom<TLengthStyledSystem>> {
1426 /**
1427 * The bottom CSS property participates in specifying the vertical position of a
1428 * positioned element. It has no effect on non-positioned elements.
1429 *
1430 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/top)
1431 */
1432 bottom?: ResponsiveValue<TVal, ThemeType> | undefined;
1433}
1434
1435export const bottom: styleFn;
1436
1437export interface LeftProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.Property.Left<TLengthStyledSystem>> {
1438 /**
1439 * The left CSS property participates in specifying the horizontal position
1440 * of a positioned element. It has no effect on non-positioned elements.
1441 *
1442 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/left)
1443 */
1444 left?: ResponsiveValue<TVal, ThemeType> | undefined;
1445}
1446
1447export const left: styleFn;
1448
1449export interface PositionProps<ThemeType extends Theme = RequiredTheme>
1450 extends
1451 ZIndexProps<ThemeType>,
1452 TopProps<ThemeType>,
1453 RightProps<ThemeType>,
1454 BottomProps<ThemeType>,
1455 LeftProps<ThemeType>
1456{
1457 /**
1458 * The position CSS property specifies how an element is positioned in a document.
1459 * The top, right, bottom, and left properties determine the final location of positioned elements.
1460 *
1461 * [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/position)
1462 */
1463 position?: ResponsiveValue<CSS.Property.Position, ThemeType> | undefined;
1464}
1465
1466export const position: styleFn;
1467
1468export interface ButtonStyleProps<ThemeType extends Theme = RequiredTheme> {
1469 variant?: ResponsiveValue<string, ThemeType> | undefined;
1470}
1471
1472export const buttonStyle: styleFn;
1473
1474export interface TextStyleProps<ThemeType extends Theme = RequiredTheme> {
1475 textStyle?: ResponsiveValue<string, ThemeType> | undefined;
1476}
1477
1478export const textStyle: styleFn;
1479
1480export interface ColorStyleProps<ThemeType extends Theme = RequiredTheme> {
1481 colors?: ResponsiveValue<string, ThemeType> | undefined;
1482}
1483
1484export const colorStyle: styleFn;
1485
1486export interface StylesProps {
1487 space: typeof space;
1488 margin: typeof margin;
1489 marginTop: typeof marginTop;
1490 marginBottom: typeof marginBottom;
1491 marginLeft: typeof marginLeft;
1492 marginRight: typeof marginRight;
1493 padding: typeof padding;
1494 paddingTop: typeof paddingTop;
1495 paddingBottom: typeof paddingBottom;
1496 paddingLeft: typeof paddingLeft;
1497 paddingRight: typeof paddingRight;
1498 width: typeof width;
1499 fontSize: typeof fontSize;
1500 textColor: typeof textColor;
1501 backgroundColor: typeof backgroundColor;
1502 color: typeof color;
1503 fontFamily: typeof fontFamily;
1504 textAlign: typeof textAlign;
1505 lineHeight: typeof lineHeight;
1506 fontWeight: typeof fontWeight;
1507 fontStyle: typeof fontStyle;
1508 letterSpacing: typeof letterSpacing;
1509 display: typeof display;
1510 maxWidth: typeof maxWidth;
1511 minWidth: typeof minWidth;
1512 height: typeof height;
1513 maxHeight: typeof maxHeight;
1514 minHeight: typeof minHeight;
1515 size: typeof size;
1516 verticalAlign: typeof verticalAlign;
1517 alignItems: typeof alignItems;
1518 alignContent: typeof alignContent;
1519 justifyItems: typeof justifyItems;
1520 justifyContent: typeof justifyContent;
1521 flexWrap: typeof flexWrap;
1522 flexBasis: typeof flexBasis;
1523 flexDirection: typeof flexDirection;
1524 flex: typeof flex;
1525 justifySelf: typeof justifySelf;
1526 alignSelf: typeof alignSelf;
1527 order: typeof order;
1528 gridGap: typeof gridGap;
1529 gridColumnGap: typeof gridColumnGap;
1530 gridRowGap: typeof gridRowGap;
1531 gridColumn: typeof gridColumn;
1532 gridRow: typeof gridRow;
1533 gridAutoFlow: typeof gridAutoFlow;
1534 gridAutoColumns: typeof gridAutoColumns;
1535 gridAutoRows: typeof gridAutoRows;
1536 gridTemplateColumns: typeof gridTemplateColumns;
1537 gridTemplateRows: typeof gridTemplateRows;
1538 gridTemplateAreas: typeof gridTemplateAreas;
1539 gridArea: typeof gridArea;
1540 border: typeof border;
1541 borderTop: typeof borderTop;
1542 borderRight: typeof borderRight;
1543 borderBottom: typeof borderBottom;
1544 borderLeft: typeof borderLeft;
1545 borders: typeof borders;
1546 borderColor: typeof borderColor;
1547 borderRadius: typeof borderRadius;
1548 boxShadow: typeof boxShadow;
1549 opacity: typeof opacity;
1550 overflow: typeof overflow;
1551 background: typeof background;
1552 backgroundImage: typeof backgroundImage;
1553 backgroundPosition: typeof backgroundPosition;
1554 backgroundRepeat: typeof backgroundRepeat;
1555 backgroundSize: typeof backgroundSize;
1556 position: typeof position;
1557 zIndex: typeof zIndex;
1558 top: typeof top;
1559 right: typeof right;
1560 bottom: typeof bottom;
1561 left: typeof left;
1562 textStyle: typeof textStyle;
1563 colorStyle: typeof colorStyle;
1564 buttonStyle: typeof buttonStyle;
1565}
1566
1567export const styles: StylesProps;