Comparing version 4.0.0-1 to 4.0.0-2
@@ -7,3 +7,3 @@ import * as cache from './cache'; | ||
export { configureSafeHref } from './utils/safeHref'; | ||
export { BoxProps, BoxOwnProps, EnhancerProps, PropsOf } from './types/box-types'; | ||
export { BoxProps, BoxOwnProps, EnhancerProps, PropsOf, PolymorphicBoxProps, BoxComponent } from './types/box-types'; | ||
export { background, borderRadius, borders, boxShadow, dimensions, flex, interaction, layout, list, opacity, overflow, position, spacing, text, transform, propTypes, propNames, propAliases, propEnhancers } from './enhancers/index'; | ||
@@ -10,0 +10,0 @@ export declare const hydrate: typeof cache.hydrate; |
@@ -5,4 +5,4 @@ import React from 'react'; | ||
export declare type Without<T, K> = Pick<T, Exclude<keyof T, K>>; | ||
export declare type PropsOf<E extends keyof JSX.IntrinsicElements | React.JSXElementConstructor<any>> = JSX.LibraryManagedAttributes<E, React.ComponentPropsWithRef<E>>; | ||
export declare type BoxOwnProps<E extends React.ElementType = React.ElementType> = EnhancerProps & { | ||
export declare type PropsOf<E extends keyof JSX.IntrinsicElements | React.JSXElementConstructor<any>> = E extends React.JSXElementConstructor<infer P> ? JSX.LibraryManagedAttributes<E, P> : React.ComponentPropsWithRef<E>; | ||
export declare type BoxOwnProps<E extends React.ElementType = React.ElementType, P = {}> = Without<EnhancerProps, keyof P> & { | ||
is?: E; | ||
@@ -12,1 +12,3 @@ allowUnsafeHref?: boolean; | ||
export declare type BoxProps<E extends React.ElementType> = BoxOwnProps<E> & Without<PropsOf<E>, keyof BoxOwnProps>; | ||
export declare type PolymorphicBoxProps<E extends React.ElementType, P = {}> = BoxOwnProps<E, P> & Without<PropsOf<E>, keyof (BoxOwnProps & P)> & P; | ||
export declare type BoxComponent<P = {}, D extends React.ElementType = React.ElementType> = <E extends React.ElementType = D>(props: PolymorphicBoxProps<E, P>) => JSX.Element; |
{ | ||
"name": "ui-box", | ||
"version": "4.0.0-1", | ||
"version": "4.0.0-2", | ||
"description": "Blazing Fast React UI Primitive", | ||
@@ -5,0 +5,0 @@ "contributors": [ |
164499
2314