🤖 Merge PR #46435 Bump all packages to CSSType@3 by @frenic

* Bump CSSType@3

* Fix theme-ui test errors caused by `string & {}` hack
This commit is contained in:
Fredrik Nicol 2020-07-31 22:17:44 +02:00 committed by GitHub
parent 50ad98d3af
commit e9d633263c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
25 changed files with 222 additions and 225 deletions

View File

@ -1,6 +1,6 @@
{
"private": true,
"dependencies": {
"csstype": "^2.2.0"
"csstype": "^3.0.2"
}
}

View File

@ -1,6 +1,6 @@
{
"private": true,
"dependencies": {
"csstype": "^2.2.0"
"csstype": "^3.0.2"
}
}

View File

@ -1,6 +1,6 @@
{
"private": true,
"dependencies": {
"csstype": "^2.2.0"
"csstype": "^3.0.2"
}
}

View File

@ -1,6 +1,6 @@
{
"private": true,
"dependencies": {
"csstype": "^2.2.0"
"csstype": "^3.0.2"
}
}

View File

@ -1,6 +1,6 @@
{
"private": true,
"dependencies": {
"csstype": "^2.2.0"
"csstype": "^3.0.2"
}
}

View File

@ -1,6 +1,6 @@
{
"private": true,
"dependencies": {
"csstype": "^2.2.0"
"csstype": "^3.0.2"
}
}

View File

@ -1,6 +1,6 @@
{
"private": true,
"dependencies": {
"csstype": "^2.2.0"
"csstype": "^3.0.2"
}
}

View File

@ -1,6 +1,6 @@
{
"private": true,
"dependencies": {
"csstype": "^2.2.0"
"csstype": "^3.0.2"
}
}

View File

@ -1,6 +1,6 @@
{
"private": true,
"dependencies": {
"csstype": "^2.0.0"
"csstype": "^3.0.2"
}
}

View File

@ -1,6 +1,6 @@
{
"private": true,
"dependencies": {
"csstype": "^2.2.0"
"csstype": "^3.0.2"
}
}

View File

@ -1,6 +1,6 @@
{
"private": true,
"dependencies": {
"csstype": "^2.2.0"
"csstype": "^3.0.2"
}
}

View File

@ -1,7 +1,7 @@
{
"private": true,
"dependencies": {
"csstype": "^2.2.0"
"csstype": "^3.0.2"
},
"types": "index",
"typesVersions": {

View File

@ -36,20 +36,20 @@ export type TLengthStyledSystem = string | 0 | number;
export interface Theme<TLength = TLengthStyledSystem> {
breakpoints?: ObjectOrArray<number | string | symbol>;
mediaQueries?: { [size: string]: string };
space?: ObjectOrArray<CSS.MarginProperty<number | string>>;
fontSizes?: ObjectOrArray<CSS.FontSizeProperty<number>>;
colors?: ObjectOrArray<CSS.ColorProperty>;
fonts?: ObjectOrArray<CSS.FontFamilyProperty>;
fontWeights?: ObjectOrArray<CSS.FontWeightProperty>;
lineHeights?: ObjectOrArray<CSS.LineHeightProperty<TLength>>;
letterSpacings?: ObjectOrArray<CSS.LetterSpacingProperty<TLength>>;
sizes?: ObjectOrArray<CSS.HeightProperty<{}> | CSS.WidthProperty<{}>>;
borders?: ObjectOrArray<CSS.BorderProperty<{}>>;
borderStyles?: ObjectOrArray<CSS.BorderProperty<{}>>;
borderWidths?: ObjectOrArray<CSS.BorderWidthProperty<TLength>>;
radii?: ObjectOrArray<CSS.BorderRadiusProperty<TLength>>;
shadows?: ObjectOrArray<CSS.BoxShadowProperty>;
zIndices?: ObjectOrArray<CSS.ZIndexProperty>;
space?: ObjectOrArray<CSS.Property.Margin<number | string>>;
fontSizes?: ObjectOrArray<CSS.Property.FontSize<number>>;
colors?: ObjectOrArray<CSS.Property.Color>;
fonts?: ObjectOrArray<CSS.Property.FontFamily>;
fontWeights?: ObjectOrArray<CSS.Property.FontWeight>;
lineHeights?: ObjectOrArray<CSS.Property.LineHeight<TLength>>;
letterSpacings?: ObjectOrArray<CSS.Property.LetterSpacing<TLength>>;
sizes?: ObjectOrArray<CSS.Property.Height<{}> | CSS.Property.Width<{}>>;
borders?: ObjectOrArray<CSS.Property.Border<{}>>;
borderStyles?: ObjectOrArray<CSS.Property.Border<{}>>;
borderWidths?: ObjectOrArray<CSS.Property.BorderWidth<TLength>>;
radii?: ObjectOrArray<CSS.Property.BorderRadius<TLength>>;
shadows?: ObjectOrArray<CSS.Property.BoxShadow>;
zIndices?: ObjectOrArray<CSS.Property.ZIndex>;
buttons?: ObjectOrArray<CSS.StandardProperties>;
colorStyles?: ObjectOrArray<CSS.StandardProperties>;
textStyles?: ObjectOrArray<CSS.StandardProperties>;
@ -354,7 +354,7 @@ export interface FontSizeProps<ThemeType extends Theme = RequiredTheme, TVal = T
export const fontSize: styleFn;
export interface FontFamilyProps<ThemeType extends Theme = RequiredTheme> {
fontFamily?: ResponsiveValue<CSS.FontFamilyProperty, ThemeType>;
fontFamily?: ResponsiveValue<CSS.Property.FontFamily, ThemeType>;
}
export const fontFamily: styleFn;
@ -392,7 +392,7 @@ export interface TextAlignProps<ThemeType extends Theme = RequiredTheme> {
*
* [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align)
*/
textAlign?: ResponsiveValue<CSS.TextAlignProperty, ThemeType>;
textAlign?: ResponsiveValue<CSS.Property.TextAlign, ThemeType>;
}
export const textAlign: styleFn;
@ -404,7 +404,7 @@ export interface FontStyleProps<ThemeType extends Theme = RequiredTheme> {
*
* [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/font-style)
*/
fontStyle?: ResponsiveValue<CSS.FontStyleProperty, ThemeType>;
fontStyle?: ResponsiveValue<CSS.Property.FontStyle, ThemeType>;
}
export const fontStyle: styleFn;
@ -450,12 +450,12 @@ export interface DisplayProps<ThemeType extends Theme = RequiredTheme> {
*
* [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/display)
*/
display?: ResponsiveValue<CSS.DisplayProperty, ThemeType>;
display?: ResponsiveValue<CSS.Property.Display, ThemeType>;
}
export const display: styleFn;
export interface WidthProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.WidthProperty<TLengthStyledSystem>> {
export interface WidthProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.Property.Width<TLengthStyledSystem>> {
/**
* The width utility parses a component's `width` prop and converts it into a CSS width declaration.
*
@ -469,7 +469,7 @@ export interface WidthProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.
export const width: styleFn;
export interface MaxWidthProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.MaxWidthProperty<TLengthStyledSystem>> {
export interface MaxWidthProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.Property.MaxWidth<TLengthStyledSystem>> {
/**
* The max-width CSS property sets the maximum width of an element.
* It prevents the used value of the width property from becoming larger than the value specified by max-width.
@ -481,7 +481,7 @@ export interface MaxWidthProps<ThemeType extends Theme = RequiredTheme, TVal = C
export const maxWidth: styleFn;
export interface MinWidthProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.MinWidthProperty<TLengthStyledSystem>> {
export interface MinWidthProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.Property.MinWidth<TLengthStyledSystem>> {
/**
* The min-width CSS property sets the minimum width of an element.
* It prevents the used value of the width property from becoming smaller than the value specified for min-width.
@ -493,7 +493,7 @@ export interface MinWidthProps<ThemeType extends Theme = RequiredTheme, TVal = C
export const minWidth: styleFn;
export interface HeightProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.HeightProperty<TLengthStyledSystem>> {
export interface HeightProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.Property.Height<TLengthStyledSystem>> {
/**
* The height CSS property specifies the height of an element. By default, the property defines the height of the
* content area. If box-sizing is set to border-box, however, it instead determines the height of the border area.
@ -505,7 +505,7 @@ export interface HeightProps<ThemeType extends Theme = RequiredTheme, TVal = CSS
export const height: styleFn;
export interface MaxHeightProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.MaxHeightProperty<TLengthStyledSystem>> {
export interface MaxHeightProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.Property.MaxHeight<TLengthStyledSystem>> {
/**
* The max-height CSS property sets the maximum height of an element. It prevents the used value of the height
* property from becoming larger than the value specified for max-height.
@ -517,7 +517,7 @@ export interface MaxHeightProps<ThemeType extends Theme = RequiredTheme, TVal =
export const maxHeight: styleFn;
export interface MinHeightProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.MinHeightProperty<TLengthStyledSystem>> {
export interface MinHeightProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.Property.MinHeight<TLengthStyledSystem>> {
/**
* The min-height CSS property sets the minimum height of an element. It prevents the used value of the height
* property from becoming smaller than the value specified for min-height.
@ -529,13 +529,13 @@ export interface MinHeightProps<ThemeType extends Theme = RequiredTheme, TVal =
export const minHeight: styleFn;
export interface SizeProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.HeightProperty<TLengthStyledSystem>> {
export interface SizeProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.Property.Height<TLengthStyledSystem>> {
size?: ResponsiveValue<TVal, ThemeType>;
}
export const size: styleFn;
export interface VerticalAlignProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.VerticalAlignProperty<TLengthStyledSystem>> {
export interface VerticalAlignProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.Property.VerticalAlign<TLengthStyledSystem>> {
/**
* The vertical-align CSS property specifies sets vertical alignment of an inline or table-cell box.
*
@ -559,7 +559,7 @@ export interface AlignItemsProps<ThemeType extends Theme = RequiredTheme> {
*
* [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/align-items)
*/
alignItems?: ResponsiveValue<CSS.AlignItemsProperty, ThemeType>;
alignItems?: ResponsiveValue<CSS.Property.AlignItems, ThemeType>;
}
export const alignItems: styleFn;
@ -571,7 +571,7 @@ export interface AlignContentProps<ThemeType extends Theme = RequiredTheme> {
*
* [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/align-content)
*/
alignContent?: ResponsiveValue<CSS.AlignContentProperty, ThemeType>;
alignContent?: ResponsiveValue<CSS.Property.AlignContent, ThemeType>;
}
export const alignContent: styleFn;
@ -583,7 +583,7 @@ export interface JustifyItemsProps<ThemeType extends Theme = RequiredTheme> {
*
* [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/justify-items)
*/
justifyItems?: ResponsiveValue<CSS.JustifyItemsProperty, ThemeType>;
justifyItems?: ResponsiveValue<CSS.Property.JustifyItems, ThemeType>;
}
export const justifyItems: styleFn;
@ -595,7 +595,7 @@ export interface JustifyContentProps<ThemeType extends Theme = RequiredTheme> {
*
* [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content)
*/
justifyContent?: ResponsiveValue<CSS.JustifyContentProperty, ThemeType>;
justifyContent?: ResponsiveValue<CSS.Property.JustifyContent, ThemeType>;
}
export const justifyContent: styleFn;
@ -607,12 +607,12 @@ export interface FlexWrapProps<ThemeType extends Theme = RequiredTheme> {
*
* [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/flex-wrap)
*/
flexWrap?: ResponsiveValue<CSS.FlexWrapProperty, ThemeType>;
flexWrap?: ResponsiveValue<CSS.Property.FlexWrap, ThemeType>;
}
export const flexWrap: styleFn;
export interface FlexBasisProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.FlexBasisProperty<TLengthStyledSystem>> {
export interface FlexBasisProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.Property.FlexBasis<TLengthStyledSystem>> {
// TODO: The FlexBasisValue currently really only exists for documentation
// purposes, because flex-basis also accepts `Nem` and `Npx` strings.
// Not sure theres a way to still have the union values show up as
@ -629,12 +629,12 @@ export interface FlexDirectionProps<ThemeType extends Theme = RequiredTheme> {
*
* [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/flex-direction)
*/
flexDirection?: ResponsiveValue<CSS.FlexDirectionProperty, ThemeType>;
flexDirection?: ResponsiveValue<CSS.Property.FlexDirection, ThemeType>;
}
export const flexDirection: styleFn;
export interface FlexProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.FlexProperty<TLengthStyledSystem>> {
export interface FlexProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.Property.Flex<TLengthStyledSystem>> {
/**
* The flex CSS property specifies how a flex item will grow or shrink so as to fit the space available in
* its flex container. This is a shorthand property that sets flex-grow, flex-shrink, and flex-basis.
@ -653,7 +653,7 @@ export interface JustifySelfProps<ThemeType extends Theme = RequiredTheme> {
*
* [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/justify-self)
*/
justifySelf?: ResponsiveValue<CSS.JustifySelfProperty, ThemeType>;
justifySelf?: ResponsiveValue<CSS.Property.JustifySelf, ThemeType>;
}
export const justifySelf: styleFn;
@ -667,7 +667,7 @@ export interface AlignSelfProps<ThemeType extends Theme = RequiredTheme> {
*
* [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/align-self)
*/
alignSelf?: ResponsiveValue<CSS.AlignSelfProperty, ThemeType>;
alignSelf?: ResponsiveValue<CSS.Property.AlignSelf, ThemeType>;
}
export const alignSelf: styleFn;
@ -679,7 +679,7 @@ export interface OrderProps<ThemeType extends Theme = RequiredTheme> {
*
* [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/order)
*/
order?: ResponsiveValue<CSS.GlobalsNumber, ThemeType>;
order?: ResponsiveValue<CSS.Property.Order, ThemeType>;
}
export const order: styleFn;
@ -691,7 +691,7 @@ export interface FlexGrowProps<ThemeType extends Theme = RequiredTheme> {
*
* [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/flex-grow)
*/
flexGrow?: ResponsiveValue<CSS.GlobalsNumber, ThemeType>;
flexGrow?: ResponsiveValue<CSS.Property.FlexGrow, ThemeType>;
}
export const flexGrow: styleFn;
@ -703,7 +703,7 @@ export interface FlexShrinkProps<ThemeType extends Theme = RequiredTheme> {
*
* [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/flex-shrink)
*/
flexShrink?: ResponsiveValue<CSS.GlobalsNumber, ThemeType>;
flexShrink?: ResponsiveValue<CSS.Property.FlexShrink, ThemeType>;
}
export const flexShrink: styleFn;
@ -736,7 +736,7 @@ export const flexbox: styleFn;
* Grid Layout
*/
export interface GridGapProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.GridGapProperty<TLengthStyledSystem>> {
export interface GridGapProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.Property.GridGap<TLengthStyledSystem>> {
/**
* The gap CSS property sets the gaps (gutters) between rows and columns. It is a shorthand for row-gap
* and column-gap.
@ -750,7 +750,7 @@ export interface GridGapProps<ThemeType extends Theme = RequiredTheme, TVal = CS
export const gridGap: styleFn;
export interface GridColumnGapProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.GridColumnGapProperty<TLengthStyledSystem>> {
export interface GridColumnGapProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.Property.GridColumnGap<TLengthStyledSystem>> {
/**
* The column-gap CSS property sets the size of the gap (gutter) between an element's columns.
*
@ -763,7 +763,7 @@ export interface GridColumnGapProps<ThemeType extends Theme = RequiredTheme, TVa
export const gridColumnGap: styleFn;
export interface GridRowGapProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.GridRowGapProperty<TLengthStyledSystem>> {
export interface GridRowGapProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.Property.GridRowGap<TLengthStyledSystem>> {
/**
* The row-gap CSS property sets the size of the gap (gutter) between an element's rows.
*
@ -784,7 +784,7 @@ export interface GridColumnProps<ThemeType extends Theme = RequiredTheme> {
*
* [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column)
*/
gridColumn?: ResponsiveValue<CSS.GridColumnProperty, ThemeType>;
gridColumn?: ResponsiveValue<CSS.Property.GridColumn, ThemeType>;
}
export const gridColumn: styleFn;
@ -797,7 +797,7 @@ export interface GridRowProps<ThemeType extends Theme = RequiredTheme> {
*
* [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row)
*/
gridRow?: ResponsiveValue<CSS.GridRowProperty, ThemeType>;
gridRow?: ResponsiveValue<CSS.Property.GridRow, ThemeType>;
}
export const gridRow: styleFn;
@ -809,12 +809,12 @@ export interface GridAutoFlowProps<ThemeType extends Theme = RequiredTheme> {
*
* [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-flow)
*/
gridAutoFlow?: ResponsiveValue<CSS.GridAutoFlowProperty, ThemeType>;
gridAutoFlow?: ResponsiveValue<CSS.Property.GridAutoFlow, ThemeType>;
}
export const gridAutoFlow: styleFn;
export interface GridAutoColumnsProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.GridAutoColumnsProperty<TLengthStyledSystem>> {
export interface GridAutoColumnsProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.Property.GridAutoColumns<TLengthStyledSystem>> {
/**
* The grid-auto-columns CSS property specifies the size of an implicitly-created grid column track.
*
@ -825,7 +825,7 @@ export interface GridAutoColumnsProps<ThemeType extends Theme = RequiredTheme, T
export const gridAutoColumns: styleFn;
export interface GridAutoRowsProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.GridAutoRowsProperty<TLengthStyledSystem>> {
export interface GridAutoRowsProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.Property.GridAutoRows<TLengthStyledSystem>> {
/**
* The grid-auto-rows CSS property specifies the size of an implicitly-created grid row track.
*
@ -836,7 +836,7 @@ export interface GridAutoRowsProps<ThemeType extends Theme = RequiredTheme, TVal
export const gridAutoRows: styleFn;
export interface GridTemplateColumnsProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.GridTemplateColumnsProperty<TLengthStyledSystem>> {
export interface GridTemplateColumnsProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.Property.GridTemplateColumns<TLengthStyledSystem>> {
/**
* The grid-template-columns CSS property defines the line names and track sizing functions of the grid columns.
*
@ -847,7 +847,7 @@ export interface GridTemplateColumnsProps<ThemeType extends Theme = RequiredThem
export const gridTemplateColumns: styleFn;
export interface GridTemplateRowsProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.GridTemplateRowsProperty<TLengthStyledSystem>> {
export interface GridTemplateRowsProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.Property.GridTemplateRows<TLengthStyledSystem>> {
/**
* The grid-template-rows CSS property defines the line names and track sizing functions of the grid rows.
*
@ -864,7 +864,7 @@ export interface GridTemplateAreasProps<ThemeType extends Theme = RequiredTheme>
*
* [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-areas)
*/
gridTemplateAreas?: ResponsiveValue<CSS.GridTemplateAreasProperty, ThemeType>;
gridTemplateAreas?: ResponsiveValue<CSS.Property.GridTemplateAreas, ThemeType>;
}
export const gridTemplateAreas: styleFn;
@ -877,7 +877,7 @@ export interface GridAreaProps<ThemeType extends Theme = RequiredTheme> {
*
* [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-area)
*/
gridArea?: ResponsiveValue<CSS.GridAreaProperty, ThemeType>;
gridArea?: ResponsiveValue<CSS.Property.GridArea, ThemeType>;
}
export const gridArea: styleFn;
@ -973,31 +973,31 @@ export interface BorderStyleProps<ThemeType extends Theme = RequiredTheme> {
*
* [MDN * reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-style)
*/
borderStyle?: ResponsiveValue<CSS.BorderStyleProperty, ThemeType>;
borderStyle?: ResponsiveValue<CSS.Property.BorderStyle, ThemeType>;
/**
* The border-top-style CSS property sets the line style of an element's top border.
*
* [MDN * reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-style)
*/
borderTopStyle?: ResponsiveValue<CSS.BorderTopStyleProperty, ThemeType>;
borderTopStyle?: ResponsiveValue<CSS.Property.BorderTopStyle, ThemeType>;
/**
* The border-bottom-style CSS property sets the line style of an element's bottom border.
*
* [MDN * reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-style)
*/
borderBottomStyle?: ResponsiveValue<CSS.BorderBottomStyleProperty, ThemeType>;
borderBottomStyle?: ResponsiveValue<CSS.Property.BorderBottomStyle, ThemeType>;
/**
* The border-left-style CSS property sets the line style of an element's left border.
*
* [MDN * reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-left-style)
*/
borderLeftStyle?: ResponsiveValue<CSS.BorderLeftStyleProperty, ThemeType>;
borderLeftStyle?: ResponsiveValue<CSS.Property.BorderLeftStyle, ThemeType>;
/**
* The border-right-style CSS property sets the line style of an element's right border.
*
* [MDN * reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-right-style)
*/
borderRightStyle?: ResponsiveValue<CSS.BorderRightStyleProperty, ThemeType>;
borderRightStyle?: ResponsiveValue<CSS.Property.BorderRightStyle, ThemeType>;
}
export const borderStyle: styleFn;
@ -1037,7 +1037,7 @@ export interface BorderColorProps<ThemeType extends Theme = RequiredTheme, TVal
export const borderColor: styleFn;
export interface BorderTopProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.BorderTopProperty<TLengthStyledSystem>> {
export interface BorderTopProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.Property.BorderTop<TLengthStyledSystem>> {
/**
* The border-top CSS property is a shorthand that sets the values of border-top-width, border-top-style,
* and border-top-color. These properties describe an element's top border.
@ -1049,7 +1049,7 @@ export interface BorderTopProps<ThemeType extends Theme = RequiredTheme, TVal =
export const borderTop: styleFn;
export interface BorderRightProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.BorderRightProperty<TLengthStyledSystem>> {
export interface BorderRightProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.Property.BorderRight<TLengthStyledSystem>> {
/**
* The border-right CSS property is a shorthand that sets border-right-width, border-right-style,
* and border-right-color. These properties set an element's right border.
@ -1061,7 +1061,7 @@ export interface BorderRightProps<ThemeType extends Theme = RequiredTheme, TVal
export const borderRight: styleFn;
export interface BorderBottomProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.BorderBottomProperty<TLengthStyledSystem>> {
export interface BorderBottomProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.Property.BorderBottom<TLengthStyledSystem>> {
/**
* The border-bottom CSS property sets an element's bottom border. It's a shorthand for
* border-bottom-width, border-bottom-style and border-bottom-color.
@ -1073,7 +1073,7 @@ export interface BorderBottomProps<ThemeType extends Theme = RequiredTheme, TVal
export const borderBottom: styleFn;
export interface BorderLeftProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.BorderLeftProperty<TLengthStyledSystem>> {
export interface BorderLeftProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.Property.BorderLeft<TLengthStyledSystem>> {
/**
* The border-left CSS property is a shorthand that sets the values of border-left-width,
* border-left-style, and border-left-color. These properties describe an element's left border.
@ -1135,7 +1135,7 @@ export interface BordersProps<ThemeType extends Theme = RequiredTheme>
export const borders: styleFn;
export interface BorderProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.BorderProperty<TLengthStyledSystem>>
export interface BorderProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.Property.Border<TLengthStyledSystem>>
extends BorderWidthProps<ThemeType>,
BorderStyleProps<ThemeType>,
BorderColorProps<ThemeType>,
@ -1164,7 +1164,7 @@ export interface BoxShadowProps<ThemeType extends Theme = RequiredTheme> {
*
* [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow)
*/
boxShadow?: ResponsiveValue<CSS.BoxShadowProperty | number, ThemeType>;
boxShadow?: ResponsiveValue<CSS.Property.BoxShadow | number, ThemeType>;
}
export const boxShadow: styleFn;
@ -1177,7 +1177,7 @@ export interface TextShadowProps<ThemeType extends Theme = RequiredTheme> {
*
* [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow)
*/
textShadow?: ResponsiveValue<CSS.TextShadowProperty | number, ThemeType>;
textShadow?: ResponsiveValue<CSS.Property.TextShadow | number, ThemeType>;
}
export const textShadow: styleFn;
@ -1194,7 +1194,7 @@ export interface OpacityProps<ThemeType extends Theme = RequiredTheme> {
*
* [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/opacity)
*/
opacity?: ResponsiveValue<CSS.GlobalsNumber, ThemeType>;
opacity?: ResponsiveValue<CSS.Property.Opacity, ThemeType>;
}
export const opacity: styleFn;
@ -1206,21 +1206,21 @@ export interface OverflowProps<ThemeType extends Theme = RequiredTheme> {
*
* [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/overflow)
*/
overflow?: ResponsiveValue<CSS.OverflowProperty, ThemeType>;
overflow?: ResponsiveValue<CSS.Property.Overflow, ThemeType>;
/**
* The overflow-x CSS property sets what shows when content overflows a block-level element's left
* and right edges. This may be nothing, a scroll bar, or the overflow content.
*
* [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-x)
*/
overflowX?: ResponsiveValue<CSS.OverflowXProperty, ThemeType>;
overflowX?: ResponsiveValue<CSS.Property.OverflowX, ThemeType>;
/**
* The overflow-y CSS property sets what shows when content overflows a block-level element's top
* and bottom edges. This may be nothing, a scroll bar, or the overflow content.
*
* [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-y)
*/
overflowY?: ResponsiveValue<CSS.OverflowYProperty, ThemeType>;
overflowY?: ResponsiveValue<CSS.Property.OverflowY, ThemeType>;
}
export const overflow: styleFn;
@ -1235,12 +1235,12 @@ export interface BackgroundImageProps<ThemeType extends Theme = RequiredTheme> {
*
* [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/background-image)
*/
backgroundImage?: ResponsiveValue<CSS.BackgroundImageProperty, ThemeType>;
backgroundImage?: ResponsiveValue<CSS.Property.BackgroundImage, ThemeType>;
}
export const backgroundImage: styleFn;
export interface BackgroundSizeProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.BackgroundSizeProperty<TLengthStyledSystem>> {
export interface BackgroundSizeProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.Property.BackgroundSize<TLengthStyledSystem>> {
/**
* The background-size CSS property sets the size of the element's background image. The
* image can be left to its natural size, stretched, or constrained to fit the available space.
@ -1252,7 +1252,7 @@ export interface BackgroundSizeProps<ThemeType extends Theme = RequiredTheme, TV
export const backgroundSize: styleFn;
export interface BackgroundPositionProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.BackgroundPositionProperty<TLengthStyledSystem>> {
export interface BackgroundPositionProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.Property.BackgroundPosition<TLengthStyledSystem>> {
/**
* The background-position CSS property sets the initial position for each background image. The
* position is relative to the position layer set by background-origin.
@ -1271,12 +1271,12 @@ export interface BackgroundRepeatProps<ThemeType extends Theme = RequiredTheme>
*
* [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/background-repeat)
*/
backgroundRepeat?: ResponsiveValue<CSS.BackgroundRepeatProperty, ThemeType>;
backgroundRepeat?: ResponsiveValue<CSS.Property.BackgroundRepeat, ThemeType>;
}
export const backgroundRepeat: styleFn;
export interface BackgroundProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.BackgroundProperty<TLengthStyledSystem>>
export interface BackgroundProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.Property.Background<TLengthStyledSystem>>
extends BackgroundImageProps<ThemeType>,
BackgroundSizeProps<ThemeType>,
BackgroundPositionProps<ThemeType>,
@ -1303,12 +1303,12 @@ export interface ZIndexProps<ThemeType extends Theme = RequiredTheme> {
*
* [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/z-index)
*/
zIndex?: ResponsiveValue<CSS.ZIndexProperty, ThemeType>;
zIndex?: ResponsiveValue<CSS.Property.ZIndex, ThemeType>;
}
export const zIndex: styleFn;
export interface TopProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.TopProperty<TLengthStyledSystem>> {
export interface TopProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.Property.Top<TLengthStyledSystem>> {
/**
* The top CSS property participates in specifying the vertical position of a
* positioned element. It has no effect on non-positioned elements.
@ -1320,7 +1320,7 @@ export interface TopProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.To
export const top: styleFn;
export interface RightProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.RightProperty<TLengthStyledSystem>> {
export interface RightProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.Property.Right<TLengthStyledSystem>> {
/**
* The right CSS property participates in specifying the horizontal position of a
* positioned element. It has no effect on non-positioned elements.
@ -1332,7 +1332,7 @@ export interface RightProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.
export const right: styleFn;
export interface BottomProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.BottomProperty<TLengthStyledSystem>> {
export interface BottomProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.Property.Bottom<TLengthStyledSystem>> {
/**
* The bottom CSS property participates in specifying the vertical position of a
* positioned element. It has no effect on non-positioned elements.
@ -1344,7 +1344,7 @@ export interface BottomProps<ThemeType extends Theme = RequiredTheme, TVal = CSS
export const bottom: styleFn;
export interface LeftProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.LeftProperty<TLengthStyledSystem>> {
export interface LeftProps<ThemeType extends Theme = RequiredTheme, TVal = CSS.Property.Left<TLengthStyledSystem>> {
/**
* The left CSS property participates in specifying the horizontal position
* of a positioned element. It has no effect on non-positioned elements.
@ -1368,7 +1368,7 @@ export interface PositionProps<ThemeType extends Theme = RequiredTheme> extends
*
* [MDN reference](https://developer.mozilla.org/en-US/docs/Web/CSS/position)
*/
position?: ResponsiveValue<CSS.PositionProperty, ThemeType>;
position?: ResponsiveValue<CSS.Property.Position, ThemeType>;
}
export const position: styleFn;

View File

@ -1,6 +1,6 @@
{
"private": true,
"dependencies": {
"csstype": "^2.6.9"
"csstype": "^3.0.2"
}
}

View File

@ -1,6 +1,6 @@
{
"private": true,
"dependencies": {
"csstype": "^2.6.10"
"csstype": "^3.0.2"
}
}

View File

@ -321,7 +321,7 @@ export interface OverwriteCSSProperties {
*
* @see https://developer.mozilla.org/docs/Web/CSS/box-shadow
*/
boxShadow?: CSS.BoxShadowProperty | number;
boxShadow?: CSS.Property.BoxShadow | number;
/**
* The **`font-weight`** CSS property specifies the weight (or boldness) of the font. The font weights available to you will depend on the `font-family` you are using. Some fonts are only
* available in `normal` and `bold`.
@ -334,7 +334,7 @@ export interface OverwriteCSSProperties {
*
* @see https://developer.mozilla.org/docs/Web/CSS/font-weight
*/
fontWeight?: CSS.FontWeightProperty | string;
fontWeight?: CSS.Property.FontWeight | string;
/**
* The **`z-index`** CSS property sets the z-order of a positioned element and its descendants or flex items. Overlapping elements with a larger z-index cover those with a smaller one.
*
@ -346,7 +346,7 @@ export interface OverwriteCSSProperties {
*
* @see https://developer.mozilla.org/docs/Web/CSS/z-index
*/
zIndex?: CSS.ZIndexProperty | string;
zIndex?: CSS.Property.ZIndex | string;
}
/**
@ -417,7 +417,7 @@ export type SystemStyleObject =
* Helper to define theme values.
*
* Theme values can be nested, but their value eventually has to match a certain `CSSProperty`.
* E.g. `colors.light.primary`, `primary` has to be from type `CSS.ColorProperty`.
* E.g. `colors.light.primary`, `primary` has to be from type `CSS.Property.Color`.
*/
export type ThemeValue<T> =
| T[]
@ -449,7 +449,7 @@ export interface ScaleThemeProperties {
*
* @see https://styled-system.com/table#color
*/
colors?: ThemeValue<CSS.ColorProperty>;
colors?: ThemeValue<CSS.Property.Color>;
/**
* | Prop | CSS Property | Theme Field |
* | :---------------- | :----------------------------- | :---------- |
@ -470,7 +470,7 @@ export interface ScaleThemeProperties {
*
* @see https://styled-system.com/table#space
*/
space?: ThemeValue<CSS.MarginProperty<number> & CSS.PaddingProperty<number>>;
space?: ThemeValue<CSS.Property.Margin<number> & CSS.Property.Padding<number>>;
/**
* | Prop | CSS Property | Theme Field |
* | :--------- | :----------- | :---------- |
@ -478,7 +478,7 @@ export interface ScaleThemeProperties {
*
* @see https://styled-system.com/table#typography
*/
fonts?: ThemeValue<CSS.FontFamilyProperty>;
fonts?: ThemeValue<CSS.Property.FontFamily>;
/**
* | Prop | CSS Property | Theme Field |
* | :------- | :----------- | :---------- |
@ -486,7 +486,7 @@ export interface ScaleThemeProperties {
*
* @see https://styled-system.com/table#typography
*/
fontSizes?: ThemeValue<CSS.FontSizeProperty<number>>;
fontSizes?: ThemeValue<CSS.Property.FontSize<number>>;
/**
* | Prop | CSS Property | Theme Field |
* | :--------- | :----------- | :---------- |
@ -494,7 +494,7 @@ export interface ScaleThemeProperties {
*
* @see https://styled-system.com/table#typography
*/
fontWeights?: ThemeValue<CSS.FontWeightProperty>;
fontWeights?: ThemeValue<CSS.Property.FontWeight>;
/**
* | Prop | CSS Property | Theme Field |
* | :--------- | :----------- | :---------- |
@ -502,7 +502,7 @@ export interface ScaleThemeProperties {
*
* @see https://styled-system.com/table#typography
*/
lineHeights?: ThemeValue<CSS.LineHeightProperty<string>>;
lineHeights?: ThemeValue<CSS.Property.LineHeight<string>>;
/**
* | Prop | CSS Property | Theme Field |
* | :------------ | :------------- | :------------- |
@ -510,7 +510,7 @@ export interface ScaleThemeProperties {
*
* @see https://styled-system.com/table#typography
*/
letterSpacings?: ThemeValue<CSS.LetterSpacingProperty<string | number>>;
letterSpacings?: ThemeValue<CSS.Property.LetterSpacing<string | number>>;
/**
* | Prop | CSS Property | Theme Field |
* | :----------- | :------------------------- | :---------- |
@ -524,7 +524,7 @@ export interface ScaleThemeProperties {
*
* @see https://styled-system.com/table#border
*/
borders?: ThemeValue<CSS.BorderProperty<{}>>;
borders?: ThemeValue<CSS.Property.Border<{}>>;
/**
* | Prop | CSS Property | Theme Field |
* | :---------- | :----------- | :----------- |
@ -532,7 +532,7 @@ export interface ScaleThemeProperties {
*
* @see https://styled-system.com/table#border
*/
borderWidths?: ThemeValue<CSS.BorderWidthProperty<{}>>;
borderWidths?: ThemeValue<CSS.Property.BorderWidth<{}>>;
/**
* | Prop | CSS Property | Theme Field |
* | :---------- | :----------- | :----------- |
@ -540,7 +540,7 @@ export interface ScaleThemeProperties {
*
* @see https://styled-system.com/table#border
*/
borderStyles?: ThemeValue<CSS.LineStyle>;
borderStyles?: ThemeValue<CSS.Property.BorderStyle>;
/**
* | Prop | CSS Property | Theme Field |
* | :----------- | :------------ | :---------- |
@ -548,7 +548,7 @@ export interface ScaleThemeProperties {
*
* @see https://styled-system.com/table#border
*/
radii?: ThemeValue<CSS.BorderRadiusProperty<{}>>;
radii?: ThemeValue<CSS.Property.BorderRadius<{}>>;
/**
* | Prop | CSS Property | Theme Field |
* | :--------- | :----------- | :---------- |
@ -557,7 +557,7 @@ export interface ScaleThemeProperties {
*
* @see https://styled-system.com/table#shadow
*/
shadows?: ThemeValue<CSS.BoxShadowProperty>;
shadows?: ThemeValue<CSS.Property.BoxShadow>;
/**
* | Prop | CSS Property | Theme Field |
* | :------ | :----------- | :---------- |
@ -565,7 +565,7 @@ export interface ScaleThemeProperties {
*
* @see https://styled-system.com/table#position
*/
zIndices?: ThemeValue<CSS.ZIndexProperty>;
zIndices?: ThemeValue<CSS.Property.ZIndex>;
/**
* | Prop | CSS Property | Theme Field |
* | :-------- | :----------- | :---------- |
@ -579,7 +579,7 @@ export interface ScaleThemeProperties {
*
* @see https://styled-system.com/table#layout
*/
sizes?: ThemeValue<CSS.HeightProperty<{}> | CSS.WidthProperty<{}>>;
sizes?: ThemeValue<CSS.Property.Height<{}> | CSS.Property.Width<{}>>;
}
/**

View File

@ -1,6 +1,6 @@
{
"private": true,
"dependencies": {
"csstype": "^2.6.6"
"csstype": "^3.0.2"
}
}

View File

@ -1,6 +1,6 @@
{
"private": true,
"dependencies": {
"csstype": "^2.2.0"
"csstype": "^3.0.2"
}
}

View File

@ -7,7 +7,7 @@
import * as CSS from 'csstype';
export type Properties = CSS.Properties<string | number>;
export type FontFace = CSS.FontFace;
export type FontFace = CSS.AtRule.FontFace;
export interface KeyframesPercentageObject {
[key: string]: Properties;
}

View File

@ -1,6 +1,6 @@
{
"private": true,
"dependencies": {
"csstype": "^2.6.4"
"csstype": "^3.0.2"
}
}

View File

@ -41,43 +41,43 @@ export function ThemeProvider<Theme>(props: ThemeProviderProps<Theme>): React.Re
* the name for the root color palette.
*/
export type ColorMode = {
[k: string]: CSS.ColorProperty | ObjectOrArray<CSS.ColorProperty>;
[k: string]: CSS.Property.Color | ObjectOrArray<CSS.Property.Color>;
} & {
/**
* Body background color
*/
background: CSS.ColorProperty;
background: CSS.Property.Color;
/**
* Body foreground color
*/
text: CSS.ColorProperty;
text: CSS.Property.Color;
/**
* Primary brand color for links, buttons, etc.
*/
primary?: CSS.ColorProperty;
primary?: CSS.Property.Color;
/**
* A secondary brand color for alternative styling
*/
secondary?: CSS.ColorProperty;
secondary?: CSS.Property.Color;
/**
* A contrast color for emphasizing UI
*/
accent?: CSS.ColorProperty;
accent?: CSS.Property.Color;
/**
* A background color for highlighting text
*/
highlight?: CSS.ColorProperty;
highlight?: CSS.Property.Color;
/**
* A faint color for backgrounds, borders, and accents that do not require
* high contrast with the background color
*/
muted?: CSS.ColorProperty;
muted?: CSS.Property.Color;
};
export interface Theme extends Omit<StyledSystemTheme, 'colors' | 'buttons'> {

View File

@ -2,6 +2,6 @@
"private": true,
"dependencies": {
"@emotion/serialize": "^0.11.15",
"csstype": "^2.6.6"
"csstype": "^3.0.2"
}
}

View File

@ -210,10 +210,8 @@ function cssUtility() {
// test: text and background are required
// $ExpectType string
colorMode.text;
// $ExpectType string
colorMode.background;
colorMode.text = '';
colorMode.background = '';
// test: arbitrary keys can hold colors or color scales
@ -224,6 +222,5 @@ function cssUtility() {
// test: interoperable base colors don't contain nested scales
// $ExpectType (string | undefined)[]
const baseColors = [colorMode.primary, colorMode.secondary, colorMode.muted, colorMode.highlight, colorMode.accent];
const baseColors: Array<string | undefined> = [colorMode.primary, colorMode.secondary, colorMode.muted, colorMode.highlight, colorMode.accent];
}

View File

@ -57,7 +57,7 @@ export const color: StyleFunc;
export interface ColorProps {
// Clash with HTMLAttributes interface declared in React module
// that includes a non-standard HTML attribute `color?: string`.
// Type here should be `ResponsiveValue<CSS.ColorProperty>`.
// Type here should be `ResponsiveValue<CSS.Property.Color>`.
readonly color?: any;
}
@ -67,11 +67,11 @@ export const transition: StyleFunc;
export const basics: StyleFunc;
export interface OpacityProps {
readonly opacity?: ResponsiveValue<CSS.GlobalsNumber>;
readonly opacity?: ResponsiveValue<CSS.Property.Opacity>;
}
export interface OverflowProps {
readonly overflow?: ResponsiveValue<CSS.OverflowProperty>;
readonly overflow?: ResponsiveValue<CSS.Property.Overflow>;
}
export interface TransitionProps {
@ -99,69 +99,69 @@ export const py: StyleFunc;
export const space: StyleFunc;
export interface MarginProps<TLength = StyledSystemLength> {
readonly m?: ResponsiveValue<CSS.MarginTopProperty<TLength>>;
readonly margin?: ResponsiveValue<CSS.MarginTopProperty<TLength>>;
readonly m?: ResponsiveValue<CSS.Property.MarginTop<TLength>>;
readonly margin?: ResponsiveValue<CSS.Property.MarginTop<TLength>>;
}
export interface MarginTopProps<TLength = StyledSystemLength> {
readonly mt?: ResponsiveValue<CSS.MarginTopProperty<TLength>>;
readonly marginTop?: ResponsiveValue<CSS.MarginTopProperty<TLength>>;
readonly mt?: ResponsiveValue<CSS.Property.MarginTop<TLength>>;
readonly marginTop?: ResponsiveValue<CSS.Property.MarginTop<TLength>>;
}
export interface MarginRightProps<TLength = StyledSystemLength> {
readonly mr?: ResponsiveValue<CSS.MarginRightProperty<TLength>>;
readonly marginRight?: ResponsiveValue<CSS.MarginRightProperty<TLength>>;
readonly mr?: ResponsiveValue<CSS.Property.MarginRight<TLength>>;
readonly marginRight?: ResponsiveValue<CSS.Property.MarginRight<TLength>>;
}
export interface MarginBottomProps<TLength = StyledSystemLength> {
readonly mb?: ResponsiveValue<CSS.MarginBottomProperty<TLength>>;
readonly marginBottom?: ResponsiveValue<CSS.MarginBottomProperty<TLength>>;
readonly mb?: ResponsiveValue<CSS.Property.MarginBottom<TLength>>;
readonly marginBottom?: ResponsiveValue<CSS.Property.MarginBottom<TLength>>;
}
export interface MarginLeftProps<TLength = StyledSystemLength> {
readonly ml?: ResponsiveValue<CSS.MarginLeftProperty<TLength>>;
readonly marginLeft?: ResponsiveValue<CSS.MarginLeftProperty<TLength>>;
readonly ml?: ResponsiveValue<CSS.Property.MarginLeft<TLength>>;
readonly marginLeft?: ResponsiveValue<CSS.Property.MarginLeft<TLength>>;
}
export interface MarginXProps<TLength = StyledSystemLength> {
readonly mx?: ResponsiveValue<CSS.MarginLeftProperty<TLength>>;
readonly mx?: ResponsiveValue<CSS.Property.MarginLeft<TLength>>;
}
export interface MarginYProps<TLength = StyledSystemLength> {
readonly my?: ResponsiveValue<CSS.MarginTopProperty<TLength>>;
readonly my?: ResponsiveValue<CSS.Property.MarginTop<TLength>>;
}
export interface PaddingProps<TLength = StyledSystemLength> {
readonly p?: ResponsiveValue<CSS.PaddingProperty<TLength>>;
readonly padding?: ResponsiveValue<CSS.PaddingProperty<TLength>>;
readonly p?: ResponsiveValue<CSS.Property.Padding<TLength>>;
readonly padding?: ResponsiveValue<CSS.Property.Padding<TLength>>;
}
export interface PaddingTopProps<TLength = StyledSystemLength> {
readonly pt?: ResponsiveValue<CSS.PaddingTopProperty<TLength>>;
readonly paddingTop?: ResponsiveValue<CSS.PaddingTopProperty<TLength>>;
readonly pt?: ResponsiveValue<CSS.Property.PaddingTop<TLength>>;
readonly paddingTop?: ResponsiveValue<CSS.Property.PaddingTop<TLength>>;
}
export interface PaddingRightProps<TLength = StyledSystemLength> {
readonly pr?: ResponsiveValue<CSS.PaddingRightProperty<TLength>>;
readonly paddingRight?: ResponsiveValue<CSS.PaddingRightProperty<TLength>>;
readonly pr?: ResponsiveValue<CSS.Property.PaddingRight<TLength>>;
readonly paddingRight?: ResponsiveValue<CSS.Property.PaddingRight<TLength>>;
}
export interface PaddingBottomProps<TLength = StyledSystemLength> {
readonly pb?: ResponsiveValue<CSS.PaddingBottomProperty<TLength>>;
readonly paddingBottom?: ResponsiveValue<CSS.PaddingBottomProperty<TLength>>;
readonly pb?: ResponsiveValue<CSS.Property.PaddingBottom<TLength>>;
readonly paddingBottom?: ResponsiveValue<CSS.Property.PaddingBottom<TLength>>;
}
export interface PaddingLeftProps<TLength = StyledSystemLength> {
readonly pl?: ResponsiveValue<CSS.PaddingLeftProperty<TLength>>;
readonly paddingLeft?: ResponsiveValue<CSS.PaddingLeftProperty<TLength>>;
readonly pl?: ResponsiveValue<CSS.Property.PaddingLeft<TLength>>;
readonly paddingLeft?: ResponsiveValue<CSS.Property.PaddingLeft<TLength>>;
}
export interface PaddingXProps<TLength = StyledSystemLength> {
readonly px?: ResponsiveValue<CSS.PaddingLeftProperty<TLength>>;
readonly px?: ResponsiveValue<CSS.Property.PaddingLeft<TLength>>;
}
export interface PaddingYProps<TLength = StyledSystemLength> {
readonly py?: ResponsiveValue<CSS.PaddingTopProperty<TLength>>;
readonly py?: ResponsiveValue<CSS.Property.PaddingTop<TLength>>;
}
export interface SpaceProps
@ -194,39 +194,39 @@ export const verticalAlign: StyleFunc;
export const layout: StyleFunc;
export interface DisplayProps {
readonly display?: ResponsiveValue<CSS.DisplayProperty>;
readonly display?: ResponsiveValue<CSS.Property.Display>;
}
export interface WidthProps<TLength = StyledSystemLength> {
readonly width?: ResponsiveValue<CSS.WidthProperty<TLength>>;
readonly width?: ResponsiveValue<CSS.Property.Width<TLength>>;
}
export interface HeightProps<TLength = StyledSystemLength> {
readonly height?: ResponsiveValue<CSS.HeightProperty<TLength>>;
readonly height?: ResponsiveValue<CSS.Property.Height<TLength>>;
}
export interface MaxWidthProps<TLength = StyledSystemLength> {
readonly maxWidth?: ResponsiveValue<CSS.MaxWidthProperty<TLength>>;
readonly maxWidth?: ResponsiveValue<CSS.Property.MaxWidth<TLength>>;
}
export interface MaxHeightProps<TLength = StyledSystemLength> {
readonly maxHeight?: ResponsiveValue<CSS.MaxHeightProperty<TLength>>;
readonly maxHeight?: ResponsiveValue<CSS.Property.MaxHeight<TLength>>;
}
export interface MinWidthProps<TLength = StyledSystemLength> {
readonly minWidth?: ResponsiveValue<CSS.MinWidthProperty<TLength>>;
readonly minWidth?: ResponsiveValue<CSS.Property.MinWidth<TLength>>;
}
export interface MinHeightProps<TLength = StyledSystemLength> {
readonly minHeight?: ResponsiveValue<CSS.MinHeightProperty<TLength>>;
readonly minHeight?: ResponsiveValue<CSS.Property.MinHeight<TLength>>;
}
export interface SizeProps<TLength = StyledSystemLength> {
readonly size?: ResponsiveValue<CSS.HeightProperty<TLength>>;
readonly size?: ResponsiveValue<CSS.Property.Height<TLength>>;
}
export interface VerticalAlignProps<TLength = StyledSystemLength> {
readonly verticalAlign?: ResponsiveValue<CSS.VerticalAlignProperty<TLength>>;
readonly verticalAlign?: ResponsiveValue<CSS.Property.VerticalAlign<TLength>>;
}
export interface LayoutProps
@ -269,35 +269,35 @@ export const textTransform: StyleFunc;
export const typography: StyleFunc;
export interface FontFamilyProps {
readonly fontFamily?: ResponsiveValue<CSS.FontFamilyProperty | number>;
readonly fontFamily?: ResponsiveValue<CSS.Property.FontFamily | number>;
}
export interface FontSizeProps<TLength = StyledSystemLength> {
readonly fontSize?: ResponsiveValue<CSS.FontSizeProperty<TLength>>;
readonly fontSize?: ResponsiveValue<CSS.Property.FontSize<TLength>>;
}
export interface LineHeightProps<TLength = StyledSystemLength> {
readonly lineHeight?: ResponsiveValue<CSS.LineHeightProperty<TLength>>;
readonly lineHeight?: ResponsiveValue<CSS.Property.LineHeight<TLength>>;
}
export interface FontWeightProps {
readonly fontWeight?: ResponsiveValue<CSS.FontWeightProperty | AliasKey>;
readonly fontWeight?: ResponsiveValue<CSS.Property.FontWeight | AliasKey>;
}
export interface FontStyleProps {
readonly fontStyle?: ResponsiveValue<CSS.FontStyleProperty>;
readonly fontStyle?: ResponsiveValue<CSS.Property.FontStyle>;
}
export interface TextAlignProps {
readonly textAlign?: ResponsiveValue<CSS.TextAlignProperty>;
readonly textAlign?: ResponsiveValue<CSS.Property.TextAlign>;
}
export interface LetterSpacingProps<TLength = StyledSystemLength> {
readonly letterSpacing?: ResponsiveValue<CSS.LetterSpacingProperty<TLength>>;
readonly letterSpacing?: ResponsiveValue<CSS.Property.LetterSpacing<TLength>>;
}
export interface TextTransformProps {
readonly textTransform?: ResponsiveValue<CSS.TextTransformProperty>;
readonly textTransform?: ResponsiveValue<CSS.Property.TextTransform>;
}
export interface TypographyProps
@ -327,47 +327,47 @@ export const order: StyleFunc;
export const flexboxes: StyleFunc;
export interface AlignItemsProps {
readonly alignItems?: ResponsiveValue<CSS.AlignItemsProperty>;
readonly alignItems?: ResponsiveValue<CSS.Property.AlignItems>;
}
export interface AlignContentProps {
readonly alignContent?: ResponsiveValue<CSS.AlignContentProperty>;
readonly alignContent?: ResponsiveValue<CSS.Property.AlignContent>;
}
export interface JustifyContentProps {
readonly justifyContent?: ResponsiveValue<CSS.JustifyContentProperty>;
readonly justifyContent?: ResponsiveValue<CSS.Property.JustifyContent>;
}
export interface JustifyItemsProps {
readonly justifyItems?: ResponsiveValue<CSS.JustifyItemsProperty>;
readonly justifyItems?: ResponsiveValue<CSS.Property.JustifyItems>;
}
export interface FlexWrapProps {
readonly flexWrap?: ResponsiveValue<CSS.FlexWrapProperty>;
readonly flexWrap?: ResponsiveValue<CSS.Property.FlexWrap>;
}
export interface FlexBasisProps<TLength = StyledSystemLength> {
readonly flexBasis?: ResponsiveValue<CSS.FlexBasisProperty<TLength>>;
readonly flexBasis?: ResponsiveValue<CSS.Property.FlexBasis<TLength>>;
}
export interface FlexDirectionProps {
readonly flexDirection?: ResponsiveValue<CSS.FlexDirectionProperty>;
readonly flexDirection?: ResponsiveValue<CSS.Property.FlexDirection>;
}
export interface FlexProps<TLength = StyledSystemLength> {
readonly flex?: ResponsiveValue<CSS.FlexProperty<TLength>>;
readonly flex?: ResponsiveValue<CSS.Property.Flex<TLength>>;
}
export interface JustifySelfProps {
readonly justifySelf?: ResponsiveValue<CSS.JustifySelfProperty>;
readonly justifySelf?: ResponsiveValue<CSS.Property.JustifySelf>;
}
export interface AlignSelfProps {
readonly alignSelf?: ResponsiveValue<CSS.AlignSelfProperty>;
readonly alignSelf?: ResponsiveValue<CSS.Property.AlignSelf>;
}
export interface OrderProps {
readonly order?: ResponsiveValue<CSS.GlobalsNumber>;
readonly order?: ResponsiveValue<CSS.Property.Order>;
}
export interface FlexboxesProps
@ -401,52 +401,52 @@ export const gridArea: StyleFunc;
export const grids: StyleFunc;
export interface GridGapProps<TLength = StyledSystemLength> {
readonly gridGap?: ResponsiveValue<CSS.GridGapProperty<TLength>>;
readonly gridGap?: ResponsiveValue<CSS.Property.GridGap<TLength>>;
}
export interface GridColumnGapProps<TLength = StyledSystemLength> {
readonly gridColumnGap?: ResponsiveValue<CSS.GridColumnGapProperty<TLength>>;
readonly gridColumnGap?: ResponsiveValue<CSS.Property.GridColumnGap<TLength>>;
}
export interface GridRowGapProps<TLength = StyledSystemLength> {
readonly gridRowGap?: ResponsiveValue<CSS.GridRowGapProperty<TLength>>;
readonly gridRowGap?: ResponsiveValue<CSS.Property.GridRowGap<TLength>>;
}
export interface GridColumnProps {
readonly gridColumn?: ResponsiveValue<CSS.GridColumnProperty>;
readonly gridColumn?: ResponsiveValue<CSS.Property.GridColumn>;
}
export interface GridRowProps {
readonly gridRow?: ResponsiveValue<CSS.GridRowProperty>;
readonly gridRow?: ResponsiveValue<CSS.Property.GridRow>;
}
export interface GridAutoFlowProps {
readonly gridAutoFlow?: ResponsiveValue<CSS.GridAutoFlowProperty>;
readonly gridAutoFlow?: ResponsiveValue<CSS.Property.GridAutoFlow>;
}
export interface GridAutoColumnsProps<TLength = StyledSystemLength> {
readonly gridAutoColumns?: ResponsiveValue<CSS.GridAutoColumnsProperty<TLength>>;
readonly gridAutoColumns?: ResponsiveValue<CSS.Property.GridAutoColumns<TLength>>;
}
export interface GridAutoRowsProps<TLength = StyledSystemLength> {
readonly gridAutoRows?: ResponsiveValue<CSS.GridAutoRowsProperty<TLength>>;
readonly gridAutoRows?: ResponsiveValue<CSS.Property.GridAutoRows<TLength>>;
}
export interface GridTemplateColumnsProps<TLength = StyledSystemLength> {
readonly gridTemplateColumns?: ResponsiveValue<CSS.GridTemplateColumnsProperty<TLength>>;
readonly gridTemplateColumns?: ResponsiveValue<CSS.Property.GridTemplateColumns<TLength>>;
}
export interface GridTemplateRowsProps<TLength = StyledSystemLength> {
readonly gridTemplateRows?: ResponsiveValue<CSS.GridTemplateRowsProperty<TLength>>;
readonly gridTemplateRows?: ResponsiveValue<CSS.Property.GridTemplateRows<TLength>>;
}
export interface GridTemplateAreasProps {
readonly gridTemplateAreas?: ResponsiveValue<CSS.GridTemplateAreasProperty>;
readonly gridTemplateAreas?: ResponsiveValue<CSS.Property.GridTemplateAreas>;
}
export interface GridAreaProps {
// Number allowed here but is converted into px value, which is invalid.
// readonly gridArea?: ResponsiveValue<CSS.GridAreaProperty>;
// readonly gridArea?: ResponsiveValue<CSS.Property.GridArea>;
readonly gridArea?: ResponsiveValue<string>;
}
@ -475,28 +475,28 @@ export const backgroundRepeat: StyleFunc;
export const backgrounds: StyleFunc;
export interface BackgroundProps {
readonly background?: ResponsiveValue<CSS.BackgroundProperty<string>>;
readonly background?: ResponsiveValue<CSS.Property.Background<string>>;
}
export interface BackgroundColorProps<TLength = StyledSystemLength> {
readonly bg?: ResponsiveValue<CSS.BackgroundProperty<TLength>>;
readonly backgroundColor?: ResponsiveValue<CSS.BackgroundProperty<TLength>>;
readonly bg?: ResponsiveValue<CSS.Property.Background<TLength>>;
readonly backgroundColor?: ResponsiveValue<CSS.Property.Background<TLength>>;
}
export interface BackgroundImageProps {
readonly backgroundImage?: ResponsiveValue<CSS.BackgroundImageProperty>;
readonly backgroundImage?: ResponsiveValue<CSS.Property.BackgroundImage>;
}
export interface BackgroundSizeProps<TLength = StyledSystemLength> {
readonly backgroundSize?: ResponsiveValue<CSS.BackgroundSizeProperty<TLength>>;
readonly backgroundSize?: ResponsiveValue<CSS.Property.BackgroundSize<TLength>>;
}
export interface BackgroundPositionProps<TLength = StyledSystemLength> {
readonly backgroundPosition?: ResponsiveValue<CSS.BackgroundPositionProperty<TLength>>;
readonly backgroundPosition?: ResponsiveValue<CSS.Property.BackgroundPosition<TLength>>;
}
export interface BackgroundRepeatProps {
readonly backgroundRepeat?: ResponsiveValue<CSS.BackgroundRepeatProperty>;
readonly backgroundRepeat?: ResponsiveValue<CSS.Property.BackgroundRepeat>;
}
export interface BackgroundsProps
@ -518,27 +518,27 @@ export const left: StyleFunc;
export const positioning: StyleFunc;
export interface PositionProps {
readonly position?: ResponsiveValue<CSS.PositionProperty>;
readonly position?: ResponsiveValue<CSS.Property.Position>;
}
export interface ZIndexProps {
readonly zIndex?: ResponsiveValue<CSS.ZIndexProperty | AliasKey>;
readonly zIndex?: ResponsiveValue<CSS.Property.ZIndex | AliasKey>;
}
export interface TopProps<TLength = StyledSystemLength> {
readonly top?: ResponsiveValue<CSS.TopProperty<TLength>>;
readonly top?: ResponsiveValue<CSS.Property.Top<TLength>>;
}
export interface RightProps<TLength = StyledSystemLength> {
readonly right?: ResponsiveValue<CSS.RightProperty<TLength>>;
readonly right?: ResponsiveValue<CSS.Property.Right<TLength>>;
}
export interface BottomProps<TLength = StyledSystemLength> {
readonly bottom?: ResponsiveValue<CSS.BottomProperty<TLength>>;
readonly bottom?: ResponsiveValue<CSS.Property.Bottom<TLength>>;
}
export interface LeftProps<TLength = StyledSystemLength> {
readonly left?: ResponsiveValue<CSS.LeftProperty<TLength>>;
readonly left?: ResponsiveValue<CSS.Property.Left<TLength>>;
}
export interface PositioningProps extends PositionProps, ZIndexProps, TopProps, RightProps, BottomProps, LeftProps {}
@ -561,55 +561,55 @@ export const borderRadius: StyleFunc;
export const borders: StyleFunc;
export interface BorderProps<TLength = StyledSystemLength> {
readonly border?: ResponsiveValue<CSS.BorderProperty<TLength>>;
readonly border?: ResponsiveValue<CSS.Property.Border<TLength>>;
}
export interface BorderColorProps {
readonly borderColor?: ResponsiveValue<CSS.BorderColorProperty>;
readonly borderColor?: ResponsiveValue<CSS.Property.BorderColor>;
}
export interface BorderTopProps<TLength = StyledSystemLength> {
readonly borderTop?: ResponsiveValue<CSS.BorderTopProperty<TLength>>;
readonly borderTop?: ResponsiveValue<CSS.Property.BorderTop<TLength>>;
}
export interface BorderTopColorProps {
readonly borderTopColor?: ResponsiveValue<CSS.BorderColorProperty>;
readonly borderTopColor?: ResponsiveValue<CSS.Property.BorderColor>;
}
export interface BorderRightProps<TLength = StyledSystemLength> {
readonly borderRight?: ResponsiveValue<CSS.BorderRightProperty<TLength>>;
readonly borderRight?: ResponsiveValue<CSS.Property.BorderRight<TLength>>;
}
export interface BorderRightColorProps {
readonly borderRightColor?: ResponsiveValue<CSS.BorderColorProperty>;
readonly borderRightColor?: ResponsiveValue<CSS.Property.BorderColor>;
}
export interface BorderBottomProps<TLength = StyledSystemLength> {
readonly borderBottom?: ResponsiveValue<CSS.BorderBottomProperty<TLength>>;
readonly borderBottom?: ResponsiveValue<CSS.Property.BorderBottom<TLength>>;
}
export interface BorderBottomColorProps {
readonly borderBottomColor?: ResponsiveValue<CSS.BorderColorProperty>;
readonly borderBottomColor?: ResponsiveValue<CSS.Property.BorderColor>;
}
export interface BorderLeftProps<TLength = StyledSystemLength> {
readonly borderLeft?: ResponsiveValue<CSS.BorderLeftProperty<TLength>>;
readonly borderLeft?: ResponsiveValue<CSS.Property.BorderLeft<TLength>>;
}
export interface BorderLeftColorProps {
readonly borderLeftColor?: ResponsiveValue<CSS.BorderColorProperty>;
readonly borderLeftColor?: ResponsiveValue<CSS.Property.BorderColor>;
}
export interface BorderWidthProps<TLength = StyledSystemLength> {
readonly borderWidth?: ResponsiveValue<CSS.BorderWidthProperty<TLength>>;
readonly borderWidth?: ResponsiveValue<CSS.Property.BorderWidth<TLength>>;
}
export interface BorderStyleProps {
readonly borderStyle?: ResponsiveValue<CSS.BorderStyleProperty | number>;
readonly borderStyle?: ResponsiveValue<CSS.Property.BorderStyle | number>;
}
export interface BorderRadiusProps<TLength = StyledSystemLength> {
readonly borderRadius?: ResponsiveValue<CSS.BorderRadiusProperty<TLength>>;
readonly borderRadius?: ResponsiveValue<CSS.Property.BorderRadius<TLength>>;
}
export interface BordersProps
@ -634,11 +634,11 @@ export const textShadow: StyleFunc;
export const shadows: StyleFunc;
export interface BoxShadowProps {
readonly boxShadow?: ResponsiveValue<CSS.BoxShadowProperty | number>;
readonly boxShadow?: ResponsiveValue<CSS.Property.BoxShadow | number>;
}
export interface TextShadowProps {
readonly textShadow?: ResponsiveValue<CSS.TextShadowProperty | number>;
readonly textShadow?: ResponsiveValue<CSS.Property.TextShadow | number>;
}
export interface ShadowsProps extends BoxShadowProps, TextShadowProps {}

View File

@ -1,6 +1,6 @@
{
"private": true,
"dependencies": {
"csstype": "^2.6.6"
"csstype": "^3.0.2"
}
}