@twilio-paste/types
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [1.1.0](https://github.com/twilio-labs/paste/compare/@twilio-paste/types@1.0.0...@twilio-paste/types@1.1.0) (2019-10-31) | ||
### Features | ||
* update types package to styled-system v5 format ([#154](https://github.com/twilio-labs/paste/issues/154)) ([117c41e](https://github.com/twilio-labs/paste/commit/117c41e463b11440582e740c28cc067c06d16e67)) | ||
# 1.0.0 (2019-10-29) | ||
@@ -8,0 +19,0 @@ |
@@ -0,30 +1,47 @@ | ||
import * as CSS from 'csstype'; | ||
import { ThemeShape } from '@twilio-paste/theme-tokens'; | ||
import { ResponsiveValue, BorderStyleProps } from 'styled-system'; | ||
declare type Radii = ResponsiveValue<keyof ThemeShape['radii']>; | ||
import { ResponsiveValue } from 'styled-system'; | ||
export declare type BorderRadius = ResponsiveValue<keyof ThemeShape['radii']>; | ||
export declare type BorderWidth = ResponsiveValue<keyof ThemeShape['borderWidths']>; | ||
export declare type BorderColor = ResponsiveValue<keyof ThemeShape['borderColors']>; | ||
export interface BorderRadiusProps { | ||
borderRadius?: Radii; | ||
borderBottomLeftRadius?: Radii; | ||
borderBottomRightRadius?: Radii; | ||
borderTopLeftRadius?: Radii; | ||
borderTopRightRadius?: Radii; | ||
borderRadius?: BorderRadius; | ||
borderBottomLeftRadius?: BorderRadius; | ||
borderBottomRightRadius?: BorderRadius; | ||
borderTopLeftRadius?: BorderRadius; | ||
borderTopRightRadius?: BorderRadius; | ||
} | ||
declare type BorderWidths = ResponsiveValue<keyof ThemeShape['borderWidths']>; | ||
export interface BorderWidthProps { | ||
borderWidth?: BorderWidths; | ||
borderBottomWidth?: BorderWidths; | ||
borderLeftWidth?: BorderWidths; | ||
borderRightWidth?: BorderWidths; | ||
borderTopWidth?: BorderWidths; | ||
borderWidth?: BorderWidth; | ||
borderBottomWidth?: BorderWidth; | ||
borderLeftWidth?: BorderWidth; | ||
borderRightWidth?: BorderWidth; | ||
borderTopWidth?: BorderWidth; | ||
} | ||
declare type BorderColors = ResponsiveValue<keyof ThemeShape['borderColors']>; | ||
export interface BorderColorProps { | ||
borderColor?: BorderColors; | ||
borderBottomColor?: BorderColors; | ||
borderLeftColor?: BorderColors; | ||
borderRightColor?: BorderColors; | ||
borderTopColor?: BorderColors; | ||
borderColor?: BorderColor; | ||
borderBottomColor?: BorderColor; | ||
borderLeftColor?: BorderColor; | ||
borderRightColor?: BorderColor; | ||
borderTopColor?: BorderColor; | ||
} | ||
export interface BorderProps extends BorderWidthProps, BorderStyleProps, BorderRadiusProps, BorderColorProps { | ||
export declare type BorderStyle = ResponsiveValue<CSS.BorderStyleProperty>; | ||
export declare type BorderTopStyle = ResponsiveValue<CSS.BorderTopStyleProperty>; | ||
export declare type BorderRightStyle = ResponsiveValue<CSS.BorderRightStyleProperty>; | ||
export declare type BorderBottomStyle = ResponsiveValue<CSS.BorderBottomStyleProperty>; | ||
export declare type BorderLeftStyle = ResponsiveValue<CSS.BorderLeftStyleProperty>; | ||
export interface BorderStyleProps { | ||
borderStyle?: BorderStyle; | ||
borderTopStyle?: BorderTopStyle; | ||
borderRightStyle?: BorderRightStyle; | ||
borderBottomStyle?: BorderBottomStyle; | ||
borderLeftStyle?: BorderLeftStyle; | ||
} | ||
export {}; | ||
export interface BorderProps extends BorderWidthProps, BorderStyleProps, BorderColorProps, BorderRadiusProps { | ||
border?: never; | ||
borderTop?: never; | ||
borderRight?: never; | ||
borderBottom?: never; | ||
borderLeft?: never; | ||
} | ||
//# sourceMappingURL=border.d.ts.map |
@@ -1,8 +0,9 @@ | ||
export * from './backgroundColor'; | ||
export * from './background'; | ||
export * from './border'; | ||
export * from './boxShadow'; | ||
export * from './font'; | ||
export * from './sizing'; | ||
export * from './spacing'; | ||
export * from './zIndex'; | ||
export * from './flexbox'; | ||
export * from './layout'; | ||
export * from './position'; | ||
export * from './shadow'; | ||
export * from './space'; | ||
export * from './typography'; | ||
//# sourceMappingURL=index.d.ts.map |
{ | ||
"name": "@twilio-paste/types", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Shared typescript typings for Paste", | ||
@@ -42,3 +42,3 @@ "author": "Twilio Inc.", | ||
}, | ||
"gitHead": "3f8786355696cd4d1df5281cb7f0f18cfd2b8ebe" | ||
"gitHead": "82780d3fc81ecc80e655f08a794e4d42a2efff38" | ||
} |
# @twilio-paste/types | ||
Typescript typings used in multiple Paste packages | ||
## Notes | ||
This package exports types mimicking the styled-system high level grouping here: https://styled-system.com/api. There are cases where we differ from styled-system due to our token implementation. Specifically: | ||
- We don't have a `color` grouping. You can either: | ||
- Use the `BackgroundColor` and `TextColor` types that are exported individually | ||
- Use `TypographyProps` (which includes textColor) or `BackgroundProps` (which includes backgroundColor) | ||
- The `Shadow` typing forbids `textShadow` currently, until we have tokens for those. | ||
- The `background` and `border` shorthands are also forbidden because it makes it tough to type as tokens. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21478
28
179
14
2