@elliemae/ds-props-helpers 2.3.1 → 2.3.2-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -33,7 +33,7 @@ const documentedPropType = {
33
33
  format: addPropTypeDocumentationField('format'),
34
34
  global: addPropTypeDocumentationField('global'),
35
35
  hidden: addPropTypeDocumentationField('hidden'),
36
- xstyled: addPropTypeDocumentationField('hidden')
36
+ xstyled: addPropTypeDocumentationField('xstyled')
37
37
  };
38
38
 
39
39
  const createPropType = type => {
@@ -27,7 +27,7 @@ const documentedPropType = {
27
27
  format: addPropTypeDocumentationField('format'),
28
28
  global: addPropTypeDocumentationField('global'),
29
29
  hidden: addPropTypeDocumentationField('hidden'),
30
- xstyled: addPropTypeDocumentationField('hidden')
30
+ xstyled: addPropTypeDocumentationField('xstyled')
31
31
  };
32
32
 
33
33
  const createPropType = type => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-props-helpers",
3
- "version": "2.3.1",
3
+ "version": "2.3.2-next.0",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Props Helpers",
6
6
  "module": "./esm/index.js",
@@ -51,6 +51,10 @@
51
51
  "import": "./esm/validation/errorTemplates.js",
52
52
  "require": "./cjs/validation/errorTemplates.js"
53
53
  },
54
+ "./tests/xstyledProps/TestComponent": {
55
+ "import": "./esm/tests/xstyledProps/TestComponent.js",
56
+ "require": "./cjs/tests/xstyledProps/TestComponent.js"
57
+ },
54
58
  "./tests/validation/test.schema": {
55
59
  "import": "./esm/tests/validation/test.schema.js",
56
60
  "require": "./cjs/tests/validation/test.schema.js"
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- import { DocumentedReactComponent } from './types';
3
- export default function describe<C>(ComponentInstance: React.ComponentType<C>): DocumentedReactComponent<C>;
2
+ import { Hook, DocumentedReactComponent } from './types';
3
+ export default function describe<C, R>(ComponentInstance: React.ComponentType<C> | Hook<C, R>): DocumentedReactComponent<C>;
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- import { ComponentDocumentation, TypescriptDocumentation } from './types';
3
- export default function descToTypescript<C>(component: React.ComponentType<C>, reactDesc: ComponentDocumentation): TypescriptDocumentation;
2
+ import { ComponentDocumentation, Hook, TypescriptDocumentation } from './types';
3
+ export default function descToTypescript<C, R>(component: React.ComponentType<C> | Hook<C, R>, reactDesc: ComponentDocumentation): TypescriptDocumentation;
@@ -75,6 +75,10 @@ export declare type DocumentedReactComponent<T> = React.ComponentType<T> & {
75
75
  toTypescript: unknown;
76
76
  propTypesValue: ValidationMap<Record<string, unknown>>;
77
77
  };
78
+ export declare type Hook<T = unknown, S = unknown> = ((props: T) => S) & {
79
+ displayName?: string;
80
+ name?: string;
81
+ };
78
82
  export declare type DocumentedPropType = ReactDescT;
79
83
  export declare type PropTypesObj = {
80
84
  any: DocumentedPropType;
@@ -0,0 +1 @@
1
+ export function TestComponent(props: any): JSX.Element;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,5 @@
1
1
  import type { SizingProps, SpaceProps, LayoutProps } from '@xstyled/styled-components';
2
- declare type XstyledProps = SpaceProps & SizingProps & LayoutProps;
2
+ export declare type XstyledProps = SpaceProps & SizingProps & LayoutProps;
3
3
  declare type PropsWithXstyled<T> = T & XstyledProps;
4
4
  export declare const useGetXstyledProps: <T>(props: PropsWithXstyled<T>) => XstyledProps;
5
5
  export {};