Comparing version 3.0.0 to 3.0.1
@@ -30,3 +30,6 @@ "use strict"; | ||
Box.displayName = 'Box'; | ||
Box.propTypes = Object.assign({}, enhancers_1.propTypes, { innerRef: prop_types_1.default.func, is: prop_types_1.default.oneOfType([prop_types_1.default.string, prop_types_1.default.func]) }); | ||
Box.propTypes = Object.assign({}, enhancers_1.propTypes, { innerRef: prop_types_1.default.oneOfType([ | ||
prop_types_1.default.func, | ||
prop_types_1.default.shape({ current: prop_types_1.default.element }) | ||
]), is: prop_types_1.default.oneOfType([prop_types_1.default.string, prop_types_1.default.func]) }); | ||
Box.defaultProps = { | ||
@@ -38,2 +41,2 @@ innerRef: null, | ||
exports.default = Box; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYm94LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2JveC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7QUFBQSxrREFBeUI7QUFDekIsNERBQWtDO0FBRWxDLDJDQUFxQztBQUNyQyxvRUFBMEM7QUFFMUMsTUFBTSxHQUFHLEdBQWlCLENBQUMsRUFBNEMsRUFBRSxFQUFFO1FBQWhELEVBQUUsRUFBRSxHQUFHLEtBQUssRUFBRSxRQUFRLEVBQUUsUUFBUSxPQUFZLEVBQVYsa0RBQVE7SUFDbkUsK0RBQStEO0lBQy9ELE1BQU0sRUFBQyxTQUFTLEVBQUUsYUFBYSxFQUFFLFdBQVcsRUFBQyxHQUFHLHVCQUFZLENBQUMsS0FBSyxDQUFDLENBQUE7SUFFbkUsV0FBVyxDQUFDLFNBQVMsR0FBRyxTQUFTLENBQUE7SUFFakMsSUFBSSxRQUFRLEVBQUU7UUFDWixXQUFXLENBQUMsR0FBRyxHQUFHLFFBQVEsQ0FBQTtLQUMzQjtJQUVELE9BQU8sZUFBSyxDQUFDLGFBQWEsQ0FBQyxFQUFFLEVBQUUsV0FBVy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LEVBQUU7UUFDWixXQUFXLENBQUMsR0FBRyxHQUFHLFFBQVEsQ0FBQTtLQUMzQjtJQUVELE9BQU8sZUFBSyxDQUFDLGFBQWEsQ0FBQyxFQUFFLEVBQUUsV0FBVyxFQUFFLFFBQVEsQ0FBQyxDQUFBO0FBQ3ZELENBQUMsQ0FBQTtBQUVELEdBQUcsQ0FBQyxXQUFXLEdBQUcsS0FBSyxDQUFBO0FBRXZCLEdBQUcsQ0FBQyxTQUFTLHFCQUNSLHFCQUFTLElBQ1osUUFBUSxFQUFFLG9CQUFTLENBQUMsU0FBUyxDQUFDO1FBQzVCLG9CQUFTLENBQUMsSUFBSTtRQUNkLG9CQUFTLENBQUMsS0FBSyxDQUFDLEVBQUUsT0FBTyxFQUFFLG9CQUFTLENBQUMsT0FBTyxFQUFFLENBQUM7S0FDaEQsQ0FBQyxFQUNGLEVBQUUsRUFBRSxvQkFBUyxDQUFDLFNBQVMsQ0FBQyxDQUFDLG9CQUFTLENBQUMsTUFBTSxFQUFFLG9CQUFTLENBQUMsSUFBSSxDQUFDLENBQUMsR0FDNUQsQ0FBQTtBQUVELEdBQUcsQ0FBQyxZQUFZLEdBQUc7SUFDakIsUUFBUSxFQUFFLElBQUk7SUFDZCxFQUFFLEVBQUUsS0FBSztJQUNULFNBQVMsRUFBRSxZQUFZO0NBQ3hCLENBQUE7QUFFRCxrQkFBZSxHQUFHLENBQUEifQ== |
import React from 'react'; | ||
import { EnhancerProps } from './enhancers'; | ||
import { DomNodes } from './dom-nodes'; | ||
export { EnhancerProps }; | ||
/** | ||
@@ -14,2 +16,6 @@ * @template T Object | ||
/** | ||
* Custom Ref to handle `is` prop | ||
*/ | ||
export declare type RefType<T> = T extends keyof DomNodes ? DomNodes[T] : T extends typeof React.Component ? T['prototype'] : never; | ||
/** | ||
* Remove box props from object `T` if they're present | ||
@@ -23,3 +29,3 @@ * @template T Object | ||
*/ | ||
declare type InheritedProps<T extends Is> = WithoutBoxProps<React.ComponentProps<T>>; | ||
declare type InheritedProps<T extends Is> = WithoutBoxProps<React.ComponentPropsWithoutRef<T>>; | ||
/** | ||
@@ -39,3 +45,3 @@ * Generic component props with "is" prop | ||
*/ | ||
innerRef?: React.Ref<T>; | ||
innerRef?: ((ref: RefType<T>) => void) | React.RefObject<RefType<T>>; | ||
}; | ||
@@ -48,2 +54,1 @@ export interface BoxComponent { | ||
} | ||
export {}; |
{ | ||
"name": "ui-box", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "Blazing Fast React UI Primitive", | ||
@@ -5,0 +5,0 @@ "contributors": [ |
182290
77
2481