| 1 |
/// <reference types="react" /> |
| 2 |
export interface FlexProps extends React.HTMLProps<HTMLDivElement> { |
| 3 |
/** content rendered inside the Flex layout */ |
| 4 |
children?: React.ReactNode; |
| 5 |
/** additional classes added to the Flex layout */ |
| 6 |
className?: string; |
| 7 |
/** Spacers at various breakpoints */ |
| 8 |
spacer?: { |
| 9 |
default?: 'spacerNone' | 'spacerXs' | 'spacerSm' | 'spacerMd' | 'spacerLg' | 'spacerXl' | 'spacer2xl' | 'spacer3xl' | 'spacer4xl'; |
| 10 |
sm?: 'spacerNone' | 'spacerXs' | 'spacerSm' | 'spacerMd' | 'spacerLg' | 'spacerXl' | 'spacer2xl' | 'spacer3xl' | 'spacer4xl'; |
| 11 |
md?: 'spacerNone' | 'spacerXs' | 'spacerSm' | 'spacerMd' | 'spacerLg' | 'spacerXl' | 'spacer2xl' | 'spacer3xl' | 'spacer4xl'; |
| 12 |
lg?: 'spacerNone' | 'spacerXs' | 'spacerSm' | 'spacerMd' | 'spacerLg' | 'spacerXl' | 'spacer2xl' | 'spacer3xl' | 'spacer4xl'; |
| 13 |
xl?: 'spacerNone' | 'spacerXs' | 'spacerSm' | 'spacerMd' | 'spacerLg' | 'spacerXl' | 'spacer2xl' | 'spacer3xl' | 'spacer4xl'; |
| 14 |
'2xl'?: 'spacerNone' | 'spacerXs' | 'spacerSm' | 'spacerMd' | 'spacerLg' | 'spacerXl' | 'spacer2xl' | 'spacer3xl' | 'spacer4xl'; |
| 15 |
}; |
| 16 |
/** Space items at various breakpoints */ |
| 17 |
spaceItems?: { |
| 18 |
default?: 'spaceItemsNone' | 'spaceItemsXs' | 'spaceItemsSm' | 'spaceItemsMd' | 'spaceItemsLg' | 'spaceItemsXl' | 'spaceItems2xl' | 'spaceItems3xl' | 'spaceItems4xl'; |
| 19 |
sm?: 'spaceItemsNone' | 'spaceItemsXs' | 'spaceItemsSm' | 'spaceItemsMd' | 'spaceItemsLg' | 'spaceItemsXl' | 'spaceItems2xl' | 'spaceItems3xl' | 'spaceItems4xl'; |
| 20 |
md?: 'spaceItemsNone' | 'spaceItemsXs' | 'spaceItemsSm' | 'spaceItemsMd' | 'spaceItemsLg' | 'spaceItemsXl' | 'spaceItems2xl' | 'spaceItems3xl' | 'spaceItems4xl'; |
| 21 |
lg?: 'spaceItemsNone' | 'spaceItemsXs' | 'spaceItemsSm' | 'spaceItemsMd' | 'spaceItemsLg' | 'spaceItemsXl' | 'spaceItems2xl' | 'spaceItems3xl' | 'spaceItems4xl'; |
| 22 |
xl?: 'spaceItemsNone' | 'spaceItemsXs' | 'spaceItemsSm' | 'spaceItemsMd' | 'spaceItemsLg' | 'spaceItemsXl' | 'spaceItems2xl' | 'spaceItems3xl' | 'spaceItems4xl'; |
| 23 |
'2xl'?: 'spaceItemsNone' | 'spaceItemsXs' | 'spaceItemsSm' | 'spaceItemsMd' | 'spaceItemsLg' | 'spaceItemsXl' | 'spaceItems2xl' | 'spaceItems3xl' | 'spaceItems4xl'; |
| 24 |
}; |
| 25 |
/** Gap between items at various breakpoints. This will override spacers for the main axis. */ |
| 26 |
gap?: { |
| 27 |
default?: 'gap' | 'gapNone' | 'gapXs' | 'gapSm' | 'gapMd' | 'gapLg' | 'gapXl' | 'gap2xl' | 'gap3xl' | 'gap4xl'; |
| 28 |
sm?: 'gap' | 'gapNone' | 'gapXs' | 'gapSm' | 'gapMd' | 'gapLg' | 'gapXl' | 'gap2xl' | 'gap3xl' | 'gap4xl'; |
| 29 |
md?: 'gap' | 'gapNone' | 'gapXs' | 'gapSm' | 'gapMd' | 'gapLg' | 'gapXl' | 'gap2xl' | 'gap3xl' | 'gap4xl'; |
| 30 |
lg?: 'gap' | 'gapNone' | 'gapXs' | 'gapSm' | 'gapMd' | 'gapLg' | 'gapXl' | 'gap2xl' | 'gap3xl' | 'gap4xl'; |
| 31 |
xl?: 'gap' | 'gapNone' | 'gapXs' | 'gapSm' | 'gapMd' | 'gapLg' | 'gapXl' | 'gap2xl' | 'gap3xl' | 'gap4xl'; |
| 32 |
'2xl'?: 'gap' | 'gapNone' | 'gapXs' | 'gapSm' | 'gapMd' | 'gapLg' | 'gapXl' | 'gap2xl' | 'gap3xl' | 'gap4xl'; |
| 33 |
}; |
| 34 |
/** Gap between rows at various breakpoints. This will override spacers for the main axis. */ |
| 35 |
rowGap?: { |
| 36 |
default?: 'rowGap' | 'rowGapNone' | 'rowGapXs' | 'rowGapSm' | 'rowGapMd' | 'rowGapLg' | 'rowGapXl' | 'rowGap2xl' | 'rowGap3xl' | 'rowGap4xl'; |
| 37 |
sm?: 'rowGap' | 'rowGapNone' | 'rowGapXs' | 'rowGapSm' | 'rowGapMd' | 'rowGapLg' | 'rowGapXl' | 'rowGap2xl' | 'rowGap3xl' | 'rowGap4xl'; |
| 38 |
md?: 'rowGap' | 'rowGapNone' | 'rowGapXs' | 'rowGapSm' | 'rowGapMd' | 'rowGapLg' | 'rowGapXl' | 'rowGap2xl' | 'rowGap3xl' | 'rowGap4xl'; |
| 39 |
lg?: 'rowGap' | 'rowGapNone' | 'rowGapXs' | 'rowGapSm' | 'rowGapMd' | 'rowGapLg' | 'rowGapXl' | 'rowGap2xl' | 'rowGap3xl' | 'rowGap4xl'; |
| 40 |
xl?: 'rowGap' | 'rowGapNone' | 'rowGapXs' | 'rowGapSm' | 'rowGapMd' | 'rowGapLg' | 'rowGapXl' | 'rowGap2xl' | 'rowGap3xl' | 'rowGap4xl'; |
| 41 |
'2xl'?: 'rowGap' | 'rowGapNone' | 'rowGapXs' | 'rowGapSm' | 'rowGapMd' | 'rowGapLg' | 'rowGapXl' | 'rowGap2xl' | 'rowGap3xl' | 'rowGap4xl'; |
| 42 |
}; |
| 43 |
/** Gap beween columns at various breakpoints. This will override spacers for the main axis. */ |
| 44 |
columnGap?: { |
| 45 |
default?: 'columnGap' | 'columnGapNone' | 'columnGapXs' | 'columnGapSm' | 'columnGapMd' | 'columnGapLg' | 'columnGapXl' | 'columnGap2xl' | 'columnGap3xl' | 'columnGap4xl'; |
| 46 |
sm?: 'columnGap' | 'columnGapNone' | 'columnGapXs' | 'columnGapSm' | 'columnGapMd' | 'columnGapLg' | 'columnGapXl' | 'columnGap2xl' | 'columnGap3xl' | 'columnGap4xl'; |
| 47 |
md?: 'columnGap' | 'columnGapNone' | 'columnGapXs' | 'columnGapSm' | 'columnGapMd' | 'columnGapLg' | 'columnGapXl' | 'columnGap2xl' | 'columnGap3xl' | 'columnGap4xl'; |
| 48 |
lg?: 'columnGap' | 'columnGapNone' | 'columnGapXs' | 'columnGapSm' | 'columnGapMd' | 'columnGapLg' | 'columnGapXl' | 'columnGap2xl' | 'columnGap3xl' | 'columnGap4xl'; |
| 49 |
xl?: 'columnGap' | 'columnGapNone' | 'columnGapXs' | 'columnGapSm' | 'columnGapMd' | 'columnGapLg' | 'columnGapXl' | 'columnGap2xl' | 'columnGap3xl' | 'columnGap4xl'; |
| 50 |
'2xl'?: 'columnGap' | 'columnGapNone' | 'columnGapXs' | 'columnGapSm' | 'columnGapMd' | 'columnGapLg' | 'columnGapXl' | 'columnGap2xl' | 'columnGap3xl' | 'columnGap4xl'; |
| 51 |
}; |
| 52 |
/** Whether to add flex: grow at various breakpoints */ |
| 53 |
grow?: { |
| 54 |
default?: 'grow'; |
| 55 |
sm?: 'grow'; |
| 56 |
md?: 'grow'; |
| 57 |
lg?: 'grow'; |
| 58 |
xl?: 'grow'; |
| 59 |
'2xl'?: 'grow'; |
| 60 |
}; |
| 61 |
/** Whether to add flex: shrink at various breakpoints */ |
| 62 |
shrink?: { |
| 63 |
default?: 'shrink'; |
| 64 |
sm?: 'shrink'; |
| 65 |
md?: 'shrink'; |
| 66 |
lg?: 'shrink'; |
| 67 |
xl?: 'shrink'; |
| 68 |
'2xl'?: 'shrink'; |
| 69 |
}; |
| 70 |
/** Value to add for flex property at various breakpoints */ |
| 71 |
flex?: { |
| 72 |
default?: 'flexDefault' | 'flexNone' | 'flex_1' | 'flex_2' | 'flex_3' | 'flex_4'; |
| 73 |
sm?: 'flexDefault' | 'flexNone' | 'flex_1' | 'flex_2' | 'flex_3' | 'flex_4'; |
| 74 |
md?: 'flexDefault' | 'flexNone' | 'flex_1' | 'flex_2' | 'flex_3' | 'flex_4'; |
| 75 |
lg?: 'flexDefault' | 'flexNone' | 'flex_1' | 'flex_2' | 'flex_3' | 'flex_4'; |
| 76 |
xl?: 'flexDefault' | 'flexNone' | 'flex_1' | 'flex_2' | 'flex_3' | 'flex_4'; |
| 77 |
'2xl'?: 'flexDefault' | 'flexNone' | 'flex_1' | 'flex_2' | 'flex_3' | 'flex_4'; |
| 78 |
}; |
| 79 |
/** Value to add for flex-direction property at various breakpoints */ |
| 80 |
direction?: { |
| 81 |
default?: 'column' | 'columnReverse' | 'row' | 'rowReverse'; |
| 82 |
sm?: 'column' | 'columnReverse' | 'row' | 'rowReverse'; |
| 83 |
md?: 'column' | 'columnReverse' | 'row' | 'rowReverse'; |
| 84 |
lg?: 'column' | 'columnReverse' | 'row' | 'rowReverse'; |
| 85 |
xl?: 'column' | 'columnReverse' | 'row' | 'rowReverse'; |
| 86 |
'2xl'?: 'column' | 'columnReverse' | 'row' | 'rowReverse'; |
| 87 |
}; |
| 88 |
/** Value to add for align-items property at various breakpoints */ |
| 89 |
alignItems?: { |
| 90 |
default?: 'alignItemsFlexStart' | 'alignItemsFlexEnd' | 'alignItemsCenter' | 'alignItemsStretch' | 'alignItemsBaseline'; |
| 91 |
sm?: 'alignItemsFlexStart' | 'alignItemsFlexEnd' | 'alignItemsCenter' | 'alignItemsStretch' | 'alignItemsBaseline'; |
| 92 |
md?: 'alignItemsFlexStart' | 'alignItemsFlexEnd' | 'alignItemsCenter' | 'alignItemsStretch' | 'alignItemsBaseline'; |
| 93 |
lg?: 'alignItemsFlexStart' | 'alignItemsFlexEnd' | 'alignItemsCenter' | 'alignItemsStretch' | 'alignItemsBaseline'; |
| 94 |
xl?: 'alignItemsFlexStart' | 'alignItemsFlexEnd' | 'alignItemsCenter' | 'alignItemsStretch' | 'alignItemsBaseline'; |
| 95 |
'2xl'?: 'alignItemsFlexStart' | 'alignItemsFlexEnd' | 'alignItemsCenter' | 'alignItemsStretch' | 'alignItemsBaseline'; |
| 96 |
}; |
| 97 |
/** Value to add for align-content property at various breakpoints */ |
| 98 |
alignContent?: { |
| 99 |
default?: 'alignContentFlexStart' | 'alignContentFlexEnd' | 'alignContentCenter' | 'alignContentStretch' | 'alignContentSpaceBetween' | 'alignContentSpaceAround'; |
| 100 |
sm?: 'alignContentFlexStart' | 'alignContentFlexEnd' | 'alignContentCenter' | 'alignContentStretch' | 'alignContentSpaceBetween' | 'alignContentSpaceAround'; |
| 101 |
md?: 'alignContentFlexStart' | 'alignContentFlexEnd' | 'alignContentCenter' | 'alignContentStretch' | 'alignContentSpaceBetween' | 'alignContentSpaceAround'; |
| 102 |
lg?: 'alignContentFlexStart' | 'alignContentFlexEnd' | 'alignContentCenter' | 'alignContentStretch' | 'alignContentSpaceBetween' | 'alignContentSpaceAround'; |
| 103 |
xl?: 'alignContentFlexStart' | 'alignContentFlexEnd' | 'alignContentCenter' | 'alignContentStretch' | 'alignContentSpaceBetween' | 'alignContentSpaceAround'; |
| 104 |
'2xl'?: 'alignContentFlexStart' | 'alignContentFlexEnd' | 'alignContentCenter' | 'alignContentStretch' | 'alignContentSpaceBetween' | 'alignContentSpaceAround'; |
| 105 |
}; |
| 106 |
/** Value to add for align-self property at various breakpoints */ |
| 107 |
alignSelf?: { |
| 108 |
default?: 'alignSelfFlexStart' | 'alignSelfFlexEnd' | 'alignSelfCenter' | 'alignSelfStretch' | 'alignSelfBaseline'; |
| 109 |
sm?: 'alignSelfFlexStart' | 'alignSelfFlexEnd' | 'alignSelfCenter' | 'alignSelfStretch' | 'alignSelfBaseline'; |
| 110 |
md?: 'alignSelfFlexStart' | 'alignSelfFlexEnd' | 'alignSelfCenter' | 'alignSelfStretch' | 'alignSelfBaseline'; |
| 111 |
lg?: 'alignSelfFlexStart' | 'alignSelfFlexEnd' | 'alignSelfCenter' | 'alignSelfStretch' | 'alignSelfBaseline'; |
| 112 |
xl?: 'alignSelfFlexStart' | 'alignSelfFlexEnd' | 'alignSelfCenter' | 'alignSelfStretch' | 'alignSelfBaseline'; |
| 113 |
'2xl'?: 'alignSelfFlexStart' | 'alignSelfFlexEnd' | 'alignSelfCenter' | 'alignSelfStretch' | 'alignSelfBaseline'; |
| 114 |
}; |
| 115 |
/** Value to use for margin: auto at various breakpoints */ |
| 116 |
align?: { |
| 117 |
default?: 'alignLeft' | 'alignRight'; |
| 118 |
sm?: 'alignLeft' | 'alignRight'; |
| 119 |
md?: 'alignLeft' | 'alignRight'; |
| 120 |
lg?: 'alignLeft' | 'alignRight'; |
| 121 |
xl?: 'alignLeft' | 'alignRight'; |
| 122 |
'2xl'?: 'alignLeft' | 'alignRight'; |
| 123 |
}; |
| 124 |
/** Value to add for justify-content property at various breakpoints */ |
| 125 |
justifyContent?: { |
| 126 |
default?: 'justifyContentFlexStart' | 'justifyContentFlexEnd' | 'justifyContentCenter' | 'justifyContentSpaceBetween' | 'justifyContentSpaceAround' | 'justifyContentSpaceEvenly'; |
| 127 |
sm?: 'justifyContentFlexStart' | 'justifyContentFlexEnd' | 'justifyContentCenter' | 'justifyContentSpaceBetween' | 'justifyContentSpaceAround' | 'justifyContentSpaceEvenly'; |
| 128 |
md?: 'justifyContentFlexStart' | 'justifyContentFlexEnd' | 'justifyContentCenter' | 'justifyContentSpaceBetween' | 'justifyContentSpaceAround' | 'justifyContentSpaceEvenly'; |
| 129 |
lg?: 'justifyContentFlexStart' | 'justifyContentFlexEnd' | 'justifyContentCenter' | 'justifyContentSpaceBetween' | 'justifyContentSpaceAround' | 'justifyContentSpaceEvenly'; |
| 130 |
xl?: 'justifyContentFlexStart' | 'justifyContentFlexEnd' | 'justifyContentCenter' | 'justifyContentSpaceBetween' | 'justifyContentSpaceAround' | 'justifyContentSpaceEvenly'; |
| 131 |
'2xl'?: 'justifyContentFlexStart' | 'justifyContentFlexEnd' | 'justifyContentCenter' | 'justifyContentSpaceBetween' | 'justifyContentSpaceAround' | 'justifyContentSpaceEvenly'; |
| 132 |
}; |
| 133 |
/** Value to set to display property at various breakpoints */ |
| 134 |
display?: { |
| 135 |
default?: 'inlineFlex'; |
| 136 |
sm?: 'flex' | 'inlineFlex'; |
| 137 |
md?: 'flex' | 'inlineFlex'; |
| 138 |
lg?: 'flex' | 'inlineFlex'; |
| 139 |
xl?: 'flex' | 'inlineFlex'; |
| 140 |
'2xl'?: 'flex' | 'inlineFlex'; |
| 141 |
}; |
| 142 |
/** Whether to set width: 100% at various breakpoints */ |
| 143 |
fullWidth?: { |
| 144 |
default?: 'fullWidth'; |
| 145 |
sm?: 'fullWidth'; |
| 146 |
md?: 'fullWidth'; |
| 147 |
lg?: 'fullWidth'; |
| 148 |
xl?: 'fullWidth'; |
| 149 |
'2xl'?: 'fullWidth'; |
| 150 |
}; |
| 151 |
/** Value to set for flex-wrap property at various breakpoints */ |
| 152 |
flexWrap?: { |
| 153 |
default?: 'wrap' | 'wrapReverse' | 'nowrap'; |
| 154 |
sm?: 'wrap' | 'wrapReverse' | 'nowrap'; |
| 155 |
md?: 'wrap' | 'wrapReverse' | 'nowrap'; |
| 156 |
lg?: 'wrap' | 'wrapReverse' | 'nowrap'; |
| 157 |
xl?: 'wrap' | 'wrapReverse' | 'nowrap'; |
| 158 |
'2xl'?: 'wrap' | 'wrapReverse' | 'nowrap'; |
| 159 |
}; |
| 160 |
/** Modifies the flex layout element order property */ |
| 161 |
order?: { |
| 162 |
default?: string; |
| 163 |
md?: string; |
| 164 |
lg?: string; |
| 165 |
xl?: string; |
| 166 |
'2xl'?: string; |
| 167 |
}; |
| 168 |
/** Sets the base component to render. defaults to div */ |
| 169 |
component?: React.ElementType<any> | React.ComponentType<any>; |
| 170 |
} |
| 171 |
export declare const Flex: React.FunctionComponent<FlexProps>; |
| 172 |
//# sourceMappingURL=Flex.d.ts.map |