@storybook/react 7.0.0-alpha.8 → 7.0.0-beta.1

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.
Files changed (181) hide show
  1. package/dist/chunk-LSK4KSW4.mjs +1 -0
  2. package/dist/config.d.ts +11 -13
  3. package/dist/config.js +3 -7
  4. package/dist/config.mjs +3 -7
  5. package/dist/index.d.ts +57 -37
  6. package/dist/index.js +1 -1
  7. package/dist/index.mjs +1 -1
  8. package/dist/types-0a347bb9.d.ts +10 -0
  9. package/jest.config.js +7 -0
  10. package/package.json +27 -22
  11. package/template/cli/.eslintrc.json +5 -0
  12. package/template/cli/js/Button.jsx +50 -0
  13. package/template/cli/js/Button.stories.js +39 -0
  14. package/template/cli/js/Header.jsx +59 -0
  15. package/template/cli/js/Header.stories.js +22 -0
  16. package/template/cli/js/Page.jsx +69 -0
  17. package/template/cli/js/Page.stories.js +25 -0
  18. package/template/cli/ts/Button.stories.ts +44 -0
  19. package/template/cli/ts/Button.tsx +48 -0
  20. package/template/cli/ts/Header.stories.ts +26 -0
  21. package/template/cli/ts/Header.tsx +56 -0
  22. package/template/cli/ts/Page.stories.ts +29 -0
  23. package/template/cli/ts/Page.tsx +73 -0
  24. package/template/cli/ts-legacy/Button.stories.ts +45 -0
  25. package/template/cli/ts-legacy/Button.tsx +48 -0
  26. package/template/cli/ts-legacy/Header.stories.ts +24 -0
  27. package/template/cli/ts-legacy/Header.tsx +56 -0
  28. package/template/cli/ts-legacy/Page.stories.ts +29 -0
  29. package/template/cli/ts-legacy/Page.tsx +73 -0
  30. package/template/components/Button.jsx +13 -0
  31. package/template/components/Form.jsx +36 -0
  32. package/template/components/Html.jsx +9 -0
  33. package/template/components/Pre.jsx +20 -0
  34. package/template/components/index.js +9 -0
  35. package/template/stories/decorators.stories.tsx +28 -0
  36. package/template/stories/docgen-components/10017-ts-union/argTypes.snapshot +36 -0
  37. package/template/stories/docgen-components/10017-ts-union/docgen.snapshot +34 -0
  38. package/template/stories/docgen-components/10017-ts-union/input.tsx +12 -0
  39. package/template/stories/docgen-components/10017-ts-union/properties.snapshot +32 -0
  40. package/template/stories/docgen-components/10278-ts-multiple-components/argTypes.snapshot +26 -0
  41. package/template/stories/docgen-components/10278-ts-multiple-components/docgen.snapshot +49 -0
  42. package/template/stories/docgen-components/10278-ts-multiple-components/input.tsx +27 -0
  43. package/template/stories/docgen-components/10278-ts-multiple-components/properties.snapshot +22 -0
  44. package/template/stories/docgen-components/8140-js-prop-types-oneof/argTypes.snapshot +127 -0
  45. package/template/stories/docgen-components/8140-js-prop-types-oneof/docgen.snapshot +97 -0
  46. package/template/stories/docgen-components/8140-js-prop-types-oneof/input.jsx +27 -0
  47. package/template/stories/docgen-components/8140-js-prop-types-oneof/properties.snapshot +89 -0
  48. package/template/stories/docgen-components/8143-ts-imported-types/argTypes.snapshot +27 -0
  49. package/template/stories/docgen-components/8143-ts-imported-types/docgen.snapshot +22 -0
  50. package/template/stories/docgen-components/8143-ts-imported-types/input.tsx +10 -0
  51. package/template/stories/docgen-components/8143-ts-imported-types/properties.snapshot +23 -0
  52. package/template/stories/docgen-components/8143-ts-imported-types/types.ts +3 -0
  53. package/template/stories/docgen-components/8143-ts-react-fc-generics/argTypes.snapshot +27 -0
  54. package/template/stories/docgen-components/8143-ts-react-fc-generics/docgen.snapshot +24 -0
  55. package/template/stories/docgen-components/8143-ts-react-fc-generics/input.tsx +10 -0
  56. package/template/stories/docgen-components/8143-ts-react-fc-generics/properties.snapshot +21 -0
  57. package/template/stories/docgen-components/8428-js-static-prop-types/argTypes.snapshot +25 -0
  58. package/template/stories/docgen-components/8428-js-static-prop-types/docgen.snapshot +39 -0
  59. package/template/stories/docgen-components/8428-js-static-prop-types/input.jsx +20 -0
  60. package/template/stories/docgen-components/8428-js-static-prop-types/properties.snapshot +21 -0
  61. package/template/stories/docgen-components/8740-ts-multi-props/argTypes.snapshot +27 -0
  62. package/template/stories/docgen-components/8740-ts-multi-props/docgen.snapshot +49 -0
  63. package/template/stories/docgen-components/8740-ts-multi-props/input.tsx +23 -0
  64. package/template/stories/docgen-components/8740-ts-multi-props/properties.snapshot +21 -0
  65. package/template/stories/docgen-components/8894-9511-ts-forward-ref/argTypes.snapshot +48 -0
  66. package/template/stories/docgen-components/8894-9511-ts-forward-ref/docgen.snapshot +39 -0
  67. package/template/stories/docgen-components/8894-9511-ts-forward-ref/input.tsx +31 -0
  68. package/template/stories/docgen-components/8894-9511-ts-forward-ref/properties.snapshot +34 -0
  69. package/template/stories/docgen-components/9023-js-hoc/argTypes.snapshot +89 -0
  70. package/template/stories/docgen-components/9023-js-hoc/docgen.snapshot +84 -0
  71. package/template/stories/docgen-components/9023-js-hoc/input.jsx +40 -0
  72. package/template/stories/docgen-components/9023-js-hoc/properties.snapshot +67 -0
  73. package/template/stories/docgen-components/9399-js-proptypes-shape/argTypes.snapshot +39 -0
  74. package/template/stories/docgen-components/9399-js-proptypes-shape/docgen.snapshot +48 -0
  75. package/template/stories/docgen-components/9399-js-proptypes-shape/input.jsx +16 -0
  76. package/template/stories/docgen-components/9399-js-proptypes-shape/properties.snapshot +35 -0
  77. package/template/stories/docgen-components/9465-ts-type-props/argTypes.snapshot +28 -0
  78. package/template/stories/docgen-components/9465-ts-type-props/docgen.snapshot +33 -0
  79. package/template/stories/docgen-components/9465-ts-type-props/input.tsx +12 -0
  80. package/template/stories/docgen-components/9465-ts-type-props/properties.snapshot +24 -0
  81. package/template/stories/docgen-components/9493-ts-display-name/argTypes.snapshot +62 -0
  82. package/template/stories/docgen-components/9493-ts-display-name/docgen.snapshot +50 -0
  83. package/template/stories/docgen-components/9493-ts-display-name/input.tsx +30 -0
  84. package/template/stories/docgen-components/9493-ts-display-name/properties.snapshot +52 -0
  85. package/template/stories/docgen-components/9556-ts-react-default-exports/argTypes.snapshot +28 -0
  86. package/template/stories/docgen-components/9556-ts-react-default-exports/docgen.snapshot +32 -0
  87. package/template/stories/docgen-components/9556-ts-react-default-exports/input.tsx +12 -0
  88. package/template/stories/docgen-components/9556-ts-react-default-exports/properties.snapshot +24 -0
  89. package/template/stories/docgen-components/9575-ts-camel-case/argTypes.snapshot +28 -0
  90. package/template/stories/docgen-components/9575-ts-camel-case/docgen.snapshot +38 -0
  91. package/template/stories/docgen-components/9575-ts-camel-case/input.tsx +26 -0
  92. package/template/stories/docgen-components/9575-ts-camel-case/properties.snapshot +24 -0
  93. package/template/stories/docgen-components/9586-js-react-memo/argTypes.snapshot +41 -0
  94. package/template/stories/docgen-components/9586-js-react-memo/docgen.snapshot +42 -0
  95. package/template/stories/docgen-components/9586-js-react-memo/input.jsx +15 -0
  96. package/template/stories/docgen-components/9586-js-react-memo/properties.snapshot +34 -0
  97. package/template/stories/docgen-components/9591-ts-import-types/Bar.tsx +3 -0
  98. package/template/stories/docgen-components/9591-ts-import-types/argTypes.snapshot +25 -0
  99. package/template/stories/docgen-components/9591-ts-import-types/docgen.snapshot +21 -0
  100. package/template/stories/docgen-components/9591-ts-import-types/input.tsx +10 -0
  101. package/template/stories/docgen-components/9591-ts-import-types/properties.snapshot +21 -0
  102. package/template/stories/docgen-components/9626-js-default-values/argTypes.snapshot +27 -0
  103. package/template/stories/docgen-components/9626-js-default-values/docgen.snapshot +25 -0
  104. package/template/stories/docgen-components/9626-js-default-values/input.jsx +5 -0
  105. package/template/stories/docgen-components/9626-js-default-values/properties.snapshot +21 -0
  106. package/template/stories/docgen-components/9668-js-proptypes-no-jsdoc/argTypes.snapshot +42 -0
  107. package/template/stories/docgen-components/9668-js-proptypes-no-jsdoc/docgen.snapshot +36 -0
  108. package/template/stories/docgen-components/9668-js-proptypes-no-jsdoc/input.jsx +13 -0
  109. package/template/stories/docgen-components/9668-js-proptypes-no-jsdoc/properties.snapshot +35 -0
  110. package/template/stories/docgen-components/9721-ts-deprecated-jsdoc/argTypes.snapshot +53 -0
  111. package/template/stories/docgen-components/9721-ts-deprecated-jsdoc/docgen.snapshot +45 -0
  112. package/template/stories/docgen-components/9721-ts-deprecated-jsdoc/input.tsx +18 -0
  113. package/template/stories/docgen-components/9721-ts-deprecated-jsdoc/properties.snapshot +43 -0
  114. package/template/stories/docgen-components/9764-ts-extend-props/argTypes.snapshot +72 -0
  115. package/template/stories/docgen-components/9764-ts-extend-props/docgen.snapshot +41 -0
  116. package/template/stories/docgen-components/9764-ts-extend-props/input.tsx +17 -0
  117. package/template/stories/docgen-components/9764-ts-extend-props/properties.snapshot +56 -0
  118. package/template/stories/docgen-components/9827-ts-default-values/argTypes.snapshot +72 -0
  119. package/template/stories/docgen-components/9827-ts-default-values/docgen.snapshot +52 -0
  120. package/template/stories/docgen-components/9827-ts-default-values/input.tsx +17 -0
  121. package/template/stories/docgen-components/9827-ts-default-values/properties.snapshot +56 -0
  122. package/template/stories/docgen-components/9832-ts-enum-export/argTypes.snapshot +3 -0
  123. package/template/stories/docgen-components/9832-ts-enum-export/docgen.snapshot +16 -0
  124. package/template/stories/docgen-components/9832-ts-enum-export/input.tsx +8 -0
  125. package/template/stories/docgen-components/9832-ts-enum-export/properties.snapshot +7 -0
  126. package/template/stories/docgen-components/9922-ts-component-props/argTypes.snapshot +25 -0
  127. package/template/stories/docgen-components/9922-ts-component-props/docgen.snapshot +35 -0
  128. package/template/stories/docgen-components/9922-ts-component-props/input.tsx +24 -0
  129. package/template/stories/docgen-components/9922-ts-component-props/properties.snapshot +21 -0
  130. package/template/stories/docgen-components/imported.js +1 -0
  131. package/template/stories/docgen-components/js-class-component/argTypes.snapshot +386 -0
  132. package/template/stories/docgen-components/js-class-component/docgen.snapshot +252 -0
  133. package/template/stories/docgen-components/js-class-component/input.jsx +57 -0
  134. package/template/stories/docgen-components/js-class-component/properties.snapshot +286 -0
  135. package/template/stories/docgen-components/js-function-component/argTypes.snapshot +386 -0
  136. package/template/stories/docgen-components/js-function-component/docgen.snapshot +236 -0
  137. package/template/stories/docgen-components/js-function-component/input.jsx +50 -0
  138. package/template/stories/docgen-components/js-function-component/properties.snapshot +286 -0
  139. package/template/stories/docgen-components/js-function-component-inline-defaults/argTypes.snapshot +386 -0
  140. package/template/stories/docgen-components/js-function-component-inline-defaults/docgen.snapshot +247 -0
  141. package/template/stories/docgen-components/js-function-component-inline-defaults/input.jsx +65 -0
  142. package/template/stories/docgen-components/js-function-component-inline-defaults/properties.snapshot +286 -0
  143. package/template/stories/docgen-components/js-function-component-inline-defaults-no-propTypes/argTypes.snapshot +237 -0
  144. package/template/stories/docgen-components/js-function-component-inline-defaults-no-propTypes/docgen.snapshot +124 -0
  145. package/template/stories/docgen-components/js-function-component-inline-defaults-no-propTypes/input.jsx +41 -0
  146. package/template/stories/docgen-components/js-function-component-inline-defaults-no-propTypes/properties.snapshot +151 -0
  147. package/template/stories/docgen-components/js-proptypes/docgen.snapshot +1770 -0
  148. package/template/stories/docgen-components/js-proptypes/ext.js +13 -0
  149. package/template/stories/docgen-components/js-proptypes/input.jsx +497 -0
  150. package/template/stories/docgen-components/jsdoc/argTypes.snapshot +969 -0
  151. package/template/stories/docgen-components/jsdoc/docgen.snapshot +548 -0
  152. package/template/stories/docgen-components/jsdoc/input.jsx +231 -0
  153. package/template/stories/docgen-components/jsdoc/properties.snapshot +857 -0
  154. package/template/stories/docgen-components/ts-function-component/argTypes.snapshot +396 -0
  155. package/template/stories/docgen-components/ts-function-component/docgen.snapshot +241 -0
  156. package/template/stories/docgen-components/ts-function-component/input.tsx +52 -0
  157. package/template/stories/docgen-components/ts-function-component/properties.snapshot +296 -0
  158. package/template/stories/docgen-components/ts-function-component-inline-defaults/argTypes.snapshot +279 -0
  159. package/template/stories/docgen-components/ts-function-component-inline-defaults/docgen.snapshot +151 -0
  160. package/template/stories/docgen-components/ts-function-component-inline-defaults/input.tsx +80 -0
  161. package/template/stories/docgen-components/ts-function-component-inline-defaults/properties.snapshot +177 -0
  162. package/template/stories/docgen-components/ts-html/argTypes.snapshot +3 -0
  163. package/template/stories/docgen-components/ts-html/docgen.snapshot +12 -0
  164. package/template/stories/docgen-components/ts-html/input.tsx +12 -0
  165. package/template/stories/docgen-components/ts-html/properties.snapshot +7 -0
  166. package/template/stories/docgen-components/ts-jsdoc/argTypes.snapshot +3 -0
  167. package/template/stories/docgen-components/ts-jsdoc/docgen.snapshot +21 -0
  168. package/template/stories/docgen-components/ts-jsdoc/input.tsx +27 -0
  169. package/template/stories/docgen-components/ts-jsdoc/properties.snapshot +7 -0
  170. package/template/stories/docgen-components/ts-types/argTypes.snapshot +656 -0
  171. package/template/stories/docgen-components/ts-types/docgen.snapshot +317 -0
  172. package/template/stories/docgen-components/ts-types/input.tsx +130 -0
  173. package/template/stories/docgen-components/ts-types/properties.snapshot +410 -0
  174. package/template/stories/errors.stories.tsx +37 -0
  175. package/template/stories/hooks.stories.tsx +17 -0
  176. package/template/stories/js-argtypes.stories.jsx +91 -0
  177. package/template/stories/react-mdx.stories.mdx +26 -0
  178. package/template/stories/ts-argtypes.stories.tsx +81 -0
  179. package/LICENSE +0 -21
  180. package/dist/chunk-DGYCFUMN.mjs +0 -1
  181. package/dist/types-9f8d440a.d.ts +0 -17
@@ -0,0 +1,25 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`react component properties 9591-ts-import-types 1`] = `
4
+ Object {
5
+ "other": Object {
6
+ "control": Object {
7
+ "type": "number",
8
+ },
9
+ "description": "",
10
+ "name": "other",
11
+ "table": Object {
12
+ "defaultValue": null,
13
+ "jsDocTags": undefined,
14
+ "type": Object {
15
+ "detail": undefined,
16
+ "summary": "number",
17
+ },
18
+ },
19
+ "type": Object {
20
+ "name": "number",
21
+ "required": false,
22
+ },
23
+ },
24
+ }
25
+ `;
@@ -0,0 +1,21 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`react component properties 9591-ts-import-types 1`] = `
4
+ "import React from 'react';
5
+ const Other = props => /*#__PURE__*/React.createElement(\\"span\\", props, \\"Other\\");
6
+ export const component = Other;
7
+ Other.__docgenInfo = {
8
+ \\"description\\": \\"\\",
9
+ \\"methods\\": [],
10
+ \\"displayName\\": \\"Other\\",
11
+ \\"props\\": {
12
+ \\"other\\": {
13
+ \\"required\\": false,
14
+ \\"tsType\\": {
15
+ \\"name\\": \\"number\\"
16
+ },
17
+ \\"description\\": \\"\\"
18
+ }
19
+ }
20
+ };"
21
+ `;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import type { BarProps } from './Bar';
3
+
4
+ type OtherProps = BarProps & {
5
+ other?: number;
6
+ };
7
+
8
+ const Other = (props: OtherProps) => <span {...props}>Other</span>;
9
+
10
+ export const component = Other;
@@ -0,0 +1,21 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`react component properties 9591-ts-import-types 1`] = `
4
+ Object {
5
+ "rows": Array [
6
+ Object {
7
+ "defaultValue": null,
8
+ "description": "",
9
+ "name": "other",
10
+ "required": false,
11
+ "sbType": Object {
12
+ "name": "number",
13
+ },
14
+ "type": Object {
15
+ "detail": undefined,
16
+ "summary": "number",
17
+ },
18
+ },
19
+ ],
20
+ }
21
+ `;
@@ -0,0 +1,27 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`react component properties 9626-js-default-values 1`] = `
4
+ Object {
5
+ "title": Object {
6
+ "control": Object {
7
+ "type": "object",
8
+ },
9
+ "description": undefined,
10
+ "name": "title",
11
+ "table": Object {
12
+ "defaultValue": Object {
13
+ "detail": undefined,
14
+ "summary": "'Beta'",
15
+ },
16
+ "jsDocTags": undefined,
17
+ "type": Object {
18
+ "detail": undefined,
19
+ "summary": "unknown",
20
+ },
21
+ },
22
+ "type": Object {
23
+ "required": false,
24
+ },
25
+ },
26
+ }
27
+ `;
@@ -0,0 +1,25 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`react component properties 9626-js-default-values 1`] = `
4
+ "import React from 'react';
5
+
6
+ // eslint-disable-next-line react/prop-types
7
+ export const Tag = ({
8
+ title = 'Beta'
9
+ }) => /*#__PURE__*/React.createElement(\\"div\\", null, title);
10
+ export const component = Tag;
11
+ Tag.__docgenInfo = {
12
+ \\"description\\": \\"\\",
13
+ \\"methods\\": [],
14
+ \\"displayName\\": \\"Tag\\",
15
+ \\"props\\": {
16
+ \\"title\\": {
17
+ \\"defaultValue\\": {
18
+ \\"value\\": \\"'Beta'\\",
19
+ \\"computed\\": false
20
+ },
21
+ \\"required\\": false
22
+ }
23
+ }
24
+ };"
25
+ `;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+
3
+ // eslint-disable-next-line react/prop-types
4
+ export const Tag = ({ title = 'Beta' }) => <div>{title}</div>;
5
+ export const component = Tag;
@@ -0,0 +1,21 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`react component properties 9626-js-default-values 1`] = `
4
+ Object {
5
+ "rows": Array [
6
+ Object {
7
+ "defaultValue": Object {
8
+ "detail": undefined,
9
+ "summary": "'Beta'",
10
+ },
11
+ "description": undefined,
12
+ "name": "title",
13
+ "required": false,
14
+ "type": Object {
15
+ "detail": undefined,
16
+ "summary": "unknown",
17
+ },
18
+ },
19
+ ],
20
+ }
21
+ `;
@@ -0,0 +1,42 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`react component properties 9668-js-proptypes-no-jsdoc 1`] = `
4
+ Object {
5
+ "heads": Object {
6
+ "control": Object {
7
+ "type": "object",
8
+ },
9
+ "description": "",
10
+ "name": "heads",
11
+ "table": Object {
12
+ "defaultValue": null,
13
+ "jsDocTags": undefined,
14
+ "type": Object {
15
+ "detail": undefined,
16
+ "summary": "array",
17
+ },
18
+ },
19
+ "type": Object {
20
+ "name": "array",
21
+ "required": true,
22
+ "value": undefined,
23
+ },
24
+ },
25
+ "onAddClick": Object {
26
+ "description": "",
27
+ "name": "onAddClick",
28
+ "table": Object {
29
+ "defaultValue": null,
30
+ "jsDocTags": undefined,
31
+ "type": Object {
32
+ "detail": undefined,
33
+ "summary": "func",
34
+ },
35
+ },
36
+ "type": Object {
37
+ "name": "function",
38
+ "required": false,
39
+ },
40
+ },
41
+ }
42
+ `;
@@ -0,0 +1,36 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`react component properties 9668-js-proptypes-no-jsdoc 1`] = `
4
+ "/* eslint-disable react/forbid-prop-types */
5
+ /* eslint-disable react/require-default-props */
6
+ /* eslint-disable react/no-unused-prop-types */
7
+ import React from 'react';
8
+ import PropTypes from 'prop-types';
9
+ const CCTable = props => /*#__PURE__*/React.createElement(React.Fragment, null, JSON.stringify(props));
10
+ CCTable.propTypes = {
11
+ heads: PropTypes.array.isRequired,
12
+ onAddClick: PropTypes.func
13
+ };
14
+ export const component = CCTable;
15
+ CCTable.__docgenInfo = {
16
+ \\"description\\": \\"\\",
17
+ \\"methods\\": [],
18
+ \\"displayName\\": \\"CCTable\\",
19
+ \\"props\\": {
20
+ \\"heads\\": {
21
+ \\"description\\": \\"\\",
22
+ \\"type\\": {
23
+ \\"name\\": \\"array\\"
24
+ },
25
+ \\"required\\": true
26
+ },
27
+ \\"onAddClick\\": {
28
+ \\"description\\": \\"\\",
29
+ \\"type\\": {
30
+ \\"name\\": \\"func\\"
31
+ },
32
+ \\"required\\": false
33
+ }
34
+ }
35
+ };"
36
+ `;
@@ -0,0 +1,13 @@
1
+ /* eslint-disable react/forbid-prop-types */
2
+ /* eslint-disable react/require-default-props */
3
+ /* eslint-disable react/no-unused-prop-types */
4
+ import React from 'react';
5
+ import PropTypes from 'prop-types';
6
+
7
+ const CCTable = (props) => <>{JSON.stringify(props)}</>;
8
+ CCTable.propTypes = {
9
+ heads: PropTypes.array.isRequired,
10
+ onAddClick: PropTypes.func,
11
+ };
12
+
13
+ export const component = CCTable;
@@ -0,0 +1,35 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`react component properties 9668-js-proptypes-no-jsdoc 1`] = `
4
+ Object {
5
+ "rows": Array [
6
+ Object {
7
+ "defaultValue": null,
8
+ "description": "",
9
+ "name": "heads",
10
+ "required": true,
11
+ "sbType": Object {
12
+ "name": "array",
13
+ "value": undefined,
14
+ },
15
+ "type": Object {
16
+ "detail": undefined,
17
+ "summary": "array",
18
+ },
19
+ },
20
+ Object {
21
+ "defaultValue": null,
22
+ "description": "",
23
+ "name": "onAddClick",
24
+ "required": false,
25
+ "sbType": Object {
26
+ "name": "function",
27
+ },
28
+ "type": Object {
29
+ "detail": undefined,
30
+ "summary": "func",
31
+ },
32
+ },
33
+ ],
34
+ }
35
+ `;
@@ -0,0 +1,53 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`react component properties 9721-ts-deprecated-jsdoc 1`] = `
4
+ Object {
5
+ "size": Object {
6
+ "control": Object {
7
+ "type": "object",
8
+ },
9
+ "description": "The size (replaces width)",
10
+ "name": "size",
11
+ "table": Object {
12
+ "defaultValue": null,
13
+ "jsDocTags": undefined,
14
+ "type": Object {
15
+ "detail": undefined,
16
+ "summary": "signature",
17
+ },
18
+ },
19
+ "type": Object {
20
+ "name": "object",
21
+ "raw": "{ width: number; height: number }",
22
+ "required": true,
23
+ "value": Object {
24
+ "height": Object {
25
+ "name": "number",
26
+ },
27
+ "width": Object {
28
+ "name": "number",
29
+ },
30
+ },
31
+ },
32
+ },
33
+ "width": Object {
34
+ "control": Object {
35
+ "type": "number",
36
+ },
37
+ "description": "",
38
+ "name": "width",
39
+ "table": Object {
40
+ "defaultValue": null,
41
+ "jsDocTags": undefined,
42
+ "type": Object {
43
+ "detail": undefined,
44
+ "summary": "number",
45
+ },
46
+ },
47
+ "type": Object {
48
+ "name": "number",
49
+ "required": true,
50
+ },
51
+ },
52
+ }
53
+ `;
@@ -0,0 +1,45 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`react component properties 9721-ts-deprecated-jsdoc 1`] = `
4
+ "import React from 'react';
5
+ const Foo = props => /*#__PURE__*/React.createElement(React.Fragment, null, JSON.stringify(props));
6
+ export const component = Foo;
7
+ Foo.__docgenInfo = {
8
+ \\"description\\": \\"\\",
9
+ \\"methods\\": [],
10
+ \\"displayName\\": \\"Foo\\",
11
+ \\"props\\": {
12
+ \\"width\\": {
13
+ \\"required\\": true,
14
+ \\"tsType\\": {
15
+ \\"name\\": \\"number\\"
16
+ },
17
+ \\"description\\": \\"@deprecated Do not use! Use \`size\` instead!\\\\n\\\\nWidth of foo\\"
18
+ },
19
+ \\"size\\": {
20
+ \\"required\\": true,
21
+ \\"tsType\\": {
22
+ \\"name\\": \\"signature\\",
23
+ \\"type\\": \\"object\\",
24
+ \\"raw\\": \\"{ width: number; height: number }\\",
25
+ \\"signature\\": {
26
+ \\"properties\\": [{
27
+ \\"key\\": \\"width\\",
28
+ \\"value\\": {
29
+ \\"name\\": \\"number\\",
30
+ \\"required\\": true
31
+ }
32
+ }, {
33
+ \\"key\\": \\"height\\",
34
+ \\"value\\": {
35
+ \\"name\\": \\"number\\",
36
+ \\"required\\": true
37
+ }
38
+ }]
39
+ }
40
+ },
41
+ \\"description\\": \\"The size (replaces width)\\"
42
+ }
43
+ }
44
+ };"
45
+ `;
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+
3
+ interface FooProps {
4
+ /**
5
+ * @deprecated Do not use! Use `size` instead!
6
+ *
7
+ * Width of foo
8
+ */
9
+ width: number;
10
+ /**
11
+ * The size (replaces width)
12
+ */
13
+ size: { width: number; height: number };
14
+ }
15
+
16
+ const Foo: React.FC<FooProps> = (props: FooProps) => <>{JSON.stringify(props)}</>;
17
+
18
+ export const component = Foo;
@@ -0,0 +1,43 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`react component properties 9721-ts-deprecated-jsdoc 1`] = `
4
+ Object {
5
+ "rows": Array [
6
+ Object {
7
+ "defaultValue": null,
8
+ "description": "",
9
+ "name": "width",
10
+ "required": true,
11
+ "sbType": Object {
12
+ "name": "number",
13
+ },
14
+ "type": Object {
15
+ "detail": undefined,
16
+ "summary": "number",
17
+ },
18
+ },
19
+ Object {
20
+ "defaultValue": null,
21
+ "description": "The size (replaces width)",
22
+ "name": "size",
23
+ "required": true,
24
+ "sbType": Object {
25
+ "name": "object",
26
+ "raw": "{ width: number; height: number }",
27
+ "value": Object {
28
+ "height": Object {
29
+ "name": "number",
30
+ },
31
+ "width": Object {
32
+ "name": "number",
33
+ },
34
+ },
35
+ },
36
+ "type": Object {
37
+ "detail": undefined,
38
+ "summary": "signature",
39
+ },
40
+ },
41
+ ],
42
+ }
43
+ `;
@@ -0,0 +1,72 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`react component properties 9764-ts-extend-props 1`] = `
4
+ Object {
5
+ "checked": Object {
6
+ "control": Object {
7
+ "type": "boolean",
8
+ },
9
+ "description": "",
10
+ "name": "checked",
11
+ "table": Object {
12
+ "defaultValue": null,
13
+ "jsDocTags": undefined,
14
+ "type": Object {
15
+ "detail": undefined,
16
+ "summary": "boolean",
17
+ },
18
+ },
19
+ "type": Object {
20
+ "name": "boolean",
21
+ "required": false,
22
+ },
23
+ },
24
+ "defaultChecked": Object {
25
+ "control": Object {
26
+ "type": "boolean",
27
+ },
28
+ "description": "",
29
+ "name": "defaultChecked",
30
+ "table": Object {
31
+ "defaultValue": null,
32
+ "jsDocTags": undefined,
33
+ "type": Object {
34
+ "detail": undefined,
35
+ "summary": "boolean",
36
+ },
37
+ },
38
+ "type": Object {
39
+ "name": "boolean",
40
+ "required": false,
41
+ },
42
+ },
43
+ "value": Object {
44
+ "control": Object {
45
+ "type": "object",
46
+ },
47
+ "description": "The input content value",
48
+ "name": "value",
49
+ "table": Object {
50
+ "defaultValue": null,
51
+ "jsDocTags": undefined,
52
+ "type": Object {
53
+ "detail": undefined,
54
+ "summary": "union",
55
+ },
56
+ },
57
+ "type": Object {
58
+ "name": "union",
59
+ "raw": "string | number",
60
+ "required": false,
61
+ "value": Array [
62
+ Object {
63
+ "name": "string",
64
+ },
65
+ Object {
66
+ "name": "number",
67
+ },
68
+ ],
69
+ },
70
+ },
71
+ }
72
+ `;
@@ -0,0 +1,41 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`react component properties 9764-ts-extend-props 1`] = `
4
+ "import React from 'react';
5
+ const Radio = props => /*#__PURE__*/React.createElement(React.Fragment, null, JSON.stringify(props));
6
+ export const component = Radio;
7
+ Radio.__docgenInfo = {
8
+ \\"description\\": \\"\\",
9
+ \\"methods\\": [],
10
+ \\"displayName\\": \\"Radio\\",
11
+ \\"props\\": {
12
+ \\"value\\": {
13
+ \\"required\\": false,
14
+ \\"tsType\\": {
15
+ \\"name\\": \\"union\\",
16
+ \\"raw\\": \\"string | number\\",
17
+ \\"elements\\": [{
18
+ \\"name\\": \\"string\\"
19
+ }, {
20
+ \\"name\\": \\"number\\"
21
+ }]
22
+ },
23
+ \\"description\\": \\"The input content value\\"
24
+ },
25
+ \\"defaultChecked\\": {
26
+ \\"required\\": false,
27
+ \\"tsType\\": {
28
+ \\"name\\": \\"boolean\\"
29
+ },
30
+ \\"description\\": \\"\\"
31
+ },
32
+ \\"checked\\": {
33
+ \\"required\\": false,
34
+ \\"tsType\\": {
35
+ \\"name\\": \\"boolean\\"
36
+ },
37
+ \\"description\\": \\"\\"
38
+ }
39
+ }
40
+ };"
41
+ `;
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+
3
+ interface InputProps {
4
+ /**
5
+ * The input content value
6
+ */
7
+ value?: string | number;
8
+ }
9
+
10
+ interface RadioProps extends InputProps {
11
+ defaultChecked?: boolean;
12
+ checked?: boolean;
13
+ }
14
+
15
+ const Radio: React.FC<RadioProps> = (props: RadioProps) => <>{JSON.stringify(props)}</>;
16
+
17
+ export const component = Radio;
@@ -0,0 +1,56 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`react component properties 9764-ts-extend-props 1`] = `
4
+ Object {
5
+ "rows": Array [
6
+ Object {
7
+ "defaultValue": null,
8
+ "description": "The input content value",
9
+ "name": "value",
10
+ "required": false,
11
+ "sbType": Object {
12
+ "name": "union",
13
+ "raw": "string | number",
14
+ "value": Array [
15
+ Object {
16
+ "name": "string",
17
+ },
18
+ Object {
19
+ "name": "number",
20
+ },
21
+ ],
22
+ },
23
+ "type": Object {
24
+ "detail": undefined,
25
+ "summary": "union",
26
+ },
27
+ },
28
+ Object {
29
+ "defaultValue": null,
30
+ "description": "",
31
+ "name": "defaultChecked",
32
+ "required": false,
33
+ "sbType": Object {
34
+ "name": "boolean",
35
+ },
36
+ "type": Object {
37
+ "detail": undefined,
38
+ "summary": "boolean",
39
+ },
40
+ },
41
+ Object {
42
+ "defaultValue": null,
43
+ "description": "",
44
+ "name": "checked",
45
+ "required": false,
46
+ "sbType": Object {
47
+ "name": "boolean",
48
+ },
49
+ "type": Object {
50
+ "detail": undefined,
51
+ "summary": "boolean",
52
+ },
53
+ },
54
+ ],
55
+ }
56
+ `;