@storybook/react 7.3.2 → 7.4.0-alpha.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.
- package/package.json +10 -9
- package/src/__test__/README.md +0 -3
- package/src/typings.d.ts +0 -48
- package/template/components/Button.jsx +0 -13
- package/template/components/Form.jsx +0 -36
- package/template/components/Html.jsx +0 -9
- package/template/components/Pre.jsx +0 -20
- package/template/stories/decorators.stories.tsx +0 -48
- package/template/stories/docgen-components/10017-ts-union/argTypes.snapshot +0 -36
- package/template/stories/docgen-components/10017-ts-union/docgen.snapshot +0 -34
- package/template/stories/docgen-components/10017-ts-union/input.tsx +0 -12
- package/template/stories/docgen-components/10017-ts-union/properties.snapshot +0 -32
- package/template/stories/docgen-components/10278-ts-multiple-components/argTypes.snapshot +0 -26
- package/template/stories/docgen-components/10278-ts-multiple-components/docgen.snapshot +0 -49
- package/template/stories/docgen-components/10278-ts-multiple-components/input.tsx +0 -27
- package/template/stories/docgen-components/10278-ts-multiple-components/properties.snapshot +0 -22
- package/template/stories/docgen-components/8140-js-prop-types-oneof/argTypes.snapshot +0 -127
- package/template/stories/docgen-components/8140-js-prop-types-oneof/docgen.snapshot +0 -97
- package/template/stories/docgen-components/8140-js-prop-types-oneof/input.jsx +0 -27
- package/template/stories/docgen-components/8140-js-prop-types-oneof/properties.snapshot +0 -89
- package/template/stories/docgen-components/8143-ts-imported-types/argTypes.snapshot +0 -27
- package/template/stories/docgen-components/8143-ts-imported-types/docgen.snapshot +0 -22
- package/template/stories/docgen-components/8143-ts-imported-types/input.tsx +0 -10
- package/template/stories/docgen-components/8143-ts-imported-types/properties.snapshot +0 -23
- package/template/stories/docgen-components/8143-ts-imported-types/types.ts +0 -3
- package/template/stories/docgen-components/8143-ts-react-fc-generics/argTypes.snapshot +0 -27
- package/template/stories/docgen-components/8143-ts-react-fc-generics/docgen.snapshot +0 -24
- package/template/stories/docgen-components/8143-ts-react-fc-generics/input.tsx +0 -10
- package/template/stories/docgen-components/8143-ts-react-fc-generics/properties.snapshot +0 -21
- package/template/stories/docgen-components/8428-js-static-prop-types/argTypes.snapshot +0 -25
- package/template/stories/docgen-components/8428-js-static-prop-types/docgen.snapshot +0 -39
- package/template/stories/docgen-components/8428-js-static-prop-types/input.jsx +0 -20
- package/template/stories/docgen-components/8428-js-static-prop-types/properties.snapshot +0 -21
- package/template/stories/docgen-components/8740-ts-multi-props/argTypes.snapshot +0 -27
- package/template/stories/docgen-components/8740-ts-multi-props/docgen.snapshot +0 -49
- package/template/stories/docgen-components/8740-ts-multi-props/input.tsx +0 -23
- package/template/stories/docgen-components/8740-ts-multi-props/properties.snapshot +0 -21
- package/template/stories/docgen-components/8894-9511-ts-forward-ref/argTypes.snapshot +0 -48
- package/template/stories/docgen-components/8894-9511-ts-forward-ref/docgen.snapshot +0 -39
- package/template/stories/docgen-components/8894-9511-ts-forward-ref/input.tsx +0 -31
- package/template/stories/docgen-components/8894-9511-ts-forward-ref/properties.snapshot +0 -34
- package/template/stories/docgen-components/9023-js-hoc/argTypes.snapshot +0 -89
- package/template/stories/docgen-components/9023-js-hoc/docgen.snapshot +0 -84
- package/template/stories/docgen-components/9023-js-hoc/input.jsx +0 -40
- package/template/stories/docgen-components/9023-js-hoc/properties.snapshot +0 -67
- package/template/stories/docgen-components/9399-js-proptypes-shape/argTypes.snapshot +0 -39
- package/template/stories/docgen-components/9399-js-proptypes-shape/docgen.snapshot +0 -48
- package/template/stories/docgen-components/9399-js-proptypes-shape/input.jsx +0 -16
- package/template/stories/docgen-components/9399-js-proptypes-shape/properties.snapshot +0 -35
- package/template/stories/docgen-components/9465-ts-type-props/argTypes.snapshot +0 -28
- package/template/stories/docgen-components/9465-ts-type-props/docgen.snapshot +0 -33
- package/template/stories/docgen-components/9465-ts-type-props/input.tsx +0 -12
- package/template/stories/docgen-components/9465-ts-type-props/properties.snapshot +0 -24
- package/template/stories/docgen-components/9493-ts-display-name/argTypes.snapshot +0 -62
- package/template/stories/docgen-components/9493-ts-display-name/docgen.snapshot +0 -50
- package/template/stories/docgen-components/9493-ts-display-name/input.tsx +0 -30
- package/template/stories/docgen-components/9493-ts-display-name/properties.snapshot +0 -52
- package/template/stories/docgen-components/9556-ts-react-default-exports/argTypes.snapshot +0 -28
- package/template/stories/docgen-components/9556-ts-react-default-exports/docgen.snapshot +0 -32
- package/template/stories/docgen-components/9556-ts-react-default-exports/input.tsx +0 -12
- package/template/stories/docgen-components/9556-ts-react-default-exports/properties.snapshot +0 -24
- package/template/stories/docgen-components/9575-ts-camel-case/argTypes.snapshot +0 -28
- package/template/stories/docgen-components/9575-ts-camel-case/docgen.snapshot +0 -38
- package/template/stories/docgen-components/9575-ts-camel-case/input.tsx +0 -26
- package/template/stories/docgen-components/9575-ts-camel-case/properties.snapshot +0 -24
- package/template/stories/docgen-components/9586-js-react-memo/argTypes.snapshot +0 -41
- package/template/stories/docgen-components/9586-js-react-memo/docgen.snapshot +0 -42
- package/template/stories/docgen-components/9586-js-react-memo/input.jsx +0 -15
- package/template/stories/docgen-components/9586-js-react-memo/properties.snapshot +0 -34
- package/template/stories/docgen-components/9591-ts-import-types/Bar.tsx +0 -3
- package/template/stories/docgen-components/9591-ts-import-types/argTypes.snapshot +0 -25
- package/template/stories/docgen-components/9591-ts-import-types/docgen.snapshot +0 -21
- package/template/stories/docgen-components/9591-ts-import-types/input.tsx +0 -10
- package/template/stories/docgen-components/9591-ts-import-types/properties.snapshot +0 -21
- package/template/stories/docgen-components/9626-js-default-values/argTypes.snapshot +0 -27
- package/template/stories/docgen-components/9626-js-default-values/docgen.snapshot +0 -25
- package/template/stories/docgen-components/9626-js-default-values/input.jsx +0 -5
- package/template/stories/docgen-components/9626-js-default-values/properties.snapshot +0 -21
- package/template/stories/docgen-components/9668-js-proptypes-no-jsdoc/argTypes.snapshot +0 -42
- package/template/stories/docgen-components/9668-js-proptypes-no-jsdoc/docgen.snapshot +0 -36
- package/template/stories/docgen-components/9668-js-proptypes-no-jsdoc/input.jsx +0 -13
- package/template/stories/docgen-components/9668-js-proptypes-no-jsdoc/properties.snapshot +0 -35
- package/template/stories/docgen-components/9721-ts-deprecated-jsdoc/argTypes.snapshot +0 -34
- package/template/stories/docgen-components/9721-ts-deprecated-jsdoc/docgen.snapshot +0 -38
- package/template/stories/docgen-components/9721-ts-deprecated-jsdoc/input.tsx +0 -12
- package/template/stories/docgen-components/9721-ts-deprecated-jsdoc/properties.snapshot +0 -30
- package/template/stories/docgen-components/9764-ts-extend-props/argTypes.snapshot +0 -72
- package/template/stories/docgen-components/9764-ts-extend-props/docgen.snapshot +0 -41
- package/template/stories/docgen-components/9764-ts-extend-props/input.tsx +0 -17
- package/template/stories/docgen-components/9764-ts-extend-props/properties.snapshot +0 -56
- package/template/stories/docgen-components/9827-ts-default-values/argTypes.snapshot +0 -72
- package/template/stories/docgen-components/9827-ts-default-values/docgen.snapshot +0 -52
- package/template/stories/docgen-components/9827-ts-default-values/input.tsx +0 -17
- package/template/stories/docgen-components/9827-ts-default-values/properties.snapshot +0 -56
- package/template/stories/docgen-components/9832-ts-enum-export/argTypes.snapshot +0 -3
- package/template/stories/docgen-components/9832-ts-enum-export/docgen.snapshot +0 -16
- package/template/stories/docgen-components/9832-ts-enum-export/input.tsx +0 -8
- package/template/stories/docgen-components/9832-ts-enum-export/properties.snapshot +0 -7
- package/template/stories/docgen-components/9922-ts-component-props/argTypes.snapshot +0 -25
- package/template/stories/docgen-components/9922-ts-component-props/docgen.snapshot +0 -35
- package/template/stories/docgen-components/9922-ts-component-props/input.tsx +0 -24
- package/template/stories/docgen-components/9922-ts-component-props/properties.snapshot +0 -21
- package/template/stories/docgen-components/js-class-component/argTypes.snapshot +0 -386
- package/template/stories/docgen-components/js-class-component/docgen.snapshot +0 -252
- package/template/stories/docgen-components/js-class-component/input.jsx +0 -57
- package/template/stories/docgen-components/js-class-component/properties.snapshot +0 -286
- package/template/stories/docgen-components/js-function-component/argTypes.snapshot +0 -386
- package/template/stories/docgen-components/js-function-component/docgen.snapshot +0 -236
- package/template/stories/docgen-components/js-function-component/input.jsx +0 -50
- package/template/stories/docgen-components/js-function-component/properties.snapshot +0 -286
- package/template/stories/docgen-components/js-function-component-inline-defaults/argTypes.snapshot +0 -386
- package/template/stories/docgen-components/js-function-component-inline-defaults/docgen.snapshot +0 -247
- package/template/stories/docgen-components/js-function-component-inline-defaults/input.jsx +0 -65
- package/template/stories/docgen-components/js-function-component-inline-defaults/properties.snapshot +0 -286
- package/template/stories/docgen-components/js-function-component-inline-defaults-no-propTypes/argTypes.snapshot +0 -237
- package/template/stories/docgen-components/js-function-component-inline-defaults-no-propTypes/docgen.snapshot +0 -124
- package/template/stories/docgen-components/js-function-component-inline-defaults-no-propTypes/input.jsx +0 -41
- package/template/stories/docgen-components/js-function-component-inline-defaults-no-propTypes/properties.snapshot +0 -151
- package/template/stories/docgen-components/js-proptypes/docgen.snapshot +0 -1770
- package/template/stories/docgen-components/js-proptypes/input.jsx +0 -497
- package/template/stories/docgen-components/jsdoc/argTypes.snapshot +0 -1129
- package/template/stories/docgen-components/jsdoc/docgen.snapshot +0 -548
- package/template/stories/docgen-components/jsdoc/input.jsx +0 -231
- package/template/stories/docgen-components/jsdoc/properties.snapshot +0 -1017
- package/template/stories/docgen-components/ts-function-component/argTypes.snapshot +0 -396
- package/template/stories/docgen-components/ts-function-component/docgen.snapshot +0 -241
- package/template/stories/docgen-components/ts-function-component/input.tsx +0 -52
- package/template/stories/docgen-components/ts-function-component/properties.snapshot +0 -296
- package/template/stories/docgen-components/ts-function-component-inline-defaults/argTypes.snapshot +0 -279
- package/template/stories/docgen-components/ts-function-component-inline-defaults/docgen.snapshot +0 -151
- package/template/stories/docgen-components/ts-function-component-inline-defaults/input.tsx +0 -80
- package/template/stories/docgen-components/ts-function-component-inline-defaults/properties.snapshot +0 -177
- package/template/stories/docgen-components/ts-html/argTypes.snapshot +0 -3
- package/template/stories/docgen-components/ts-html/docgen.snapshot +0 -12
- package/template/stories/docgen-components/ts-html/input.tsx +0 -12
- package/template/stories/docgen-components/ts-html/properties.snapshot +0 -7
- package/template/stories/docgen-components/ts-jsdoc/argTypes.snapshot +0 -3
- package/template/stories/docgen-components/ts-jsdoc/docgen.snapshot +0 -21
- package/template/stories/docgen-components/ts-jsdoc/input.tsx +0 -27
- package/template/stories/docgen-components/ts-jsdoc/properties.snapshot +0 -7
- package/template/stories/docgen-components/ts-types/argTypes.snapshot +0 -656
- package/template/stories/docgen-components/ts-types/docgen.snapshot +0 -317
- package/template/stories/docgen-components/ts-types/input.tsx +0 -130
- package/template/stories/docgen-components/ts-types/properties.snapshot +0 -410
- package/template/stories/errors.stories.tsx +0 -37
- package/template/stories/hooks.stories.tsx +0 -17
- package/template/stories/js-argtypes.stories.jsx +0 -91
- package/template/stories/react-mdx.stories.mdx +0 -26
- package/template/stories/teardown.stories.tsx +0 -23
- package/template/stories/ts-argtypes.stories.tsx +0 -104
|
@@ -1,1770 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`react component properties js-proptypes 1`] = `
|
|
4
|
-
"import React from 'react';
|
|
5
|
-
import PropTypes, { string, shape } from 'prop-types';
|
|
6
|
-
import { PRESET_SHAPE, SOME_PROP_TYPES } from './ext';
|
|
7
|
-
const NAMED_OBJECT = {
|
|
8
|
-
text: PropTypes.string.isRequired,
|
|
9
|
-
value: PropTypes.string.isRequired
|
|
10
|
-
};
|
|
11
|
-
const ANOTHER_OBJECT = {
|
|
12
|
-
foo: PropTypes.string,
|
|
13
|
-
bar: PropTypes.string
|
|
14
|
-
};
|
|
15
|
-
const NAMED_SHAPE = PropTypes.shape({
|
|
16
|
-
foo: PropTypes.string
|
|
17
|
-
});
|
|
18
|
-
export const POSITIONS = ['top-left', 'top-right', 'top-center'];
|
|
19
|
-
|
|
20
|
-
const FunctionalComponent = () => {
|
|
21
|
-
return /*#__PURE__*/React.createElement(\\"div\\", null, \\"FunctionalComponent!\\");
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
class ClassComponent extends React.PureComponent {
|
|
25
|
-
render() {
|
|
26
|
-
return /*#__PURE__*/React.createElement(\\"div\\", null, \\"ClassComponent!\\");
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function concat(a, b) {
|
|
32
|
-
return a + b;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function customPropType() {
|
|
36
|
-
return null;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const nestedCustomPropType = {
|
|
40
|
-
custom: customPropType
|
|
41
|
-
};
|
|
42
|
-
const SOME_INLINE_PROP_TYPES = {
|
|
43
|
-
/**
|
|
44
|
-
* Hey Hey!
|
|
45
|
-
*/
|
|
46
|
-
inlineString: PropTypes.string,
|
|
47
|
-
inlineBool: PropTypes.bool,
|
|
48
|
-
inlineNumber: PropTypes.number,
|
|
49
|
-
inlineObj: PropTypes.shape({
|
|
50
|
-
foo: PropTypes.string
|
|
51
|
-
}),
|
|
52
|
-
inlineArray: PropTypes.arrayOf(PropTypes.number),
|
|
53
|
-
inlineArrayOfObjects: PropTypes.arrayOf({
|
|
54
|
-
foo: PropTypes.string
|
|
55
|
-
}),
|
|
56
|
-
inlineFunctionalElement: PropTypes.element,
|
|
57
|
-
inlineFunctionalElementInline: PropTypes.element,
|
|
58
|
-
inlineFunctionalElementInlineReturningNull: PropTypes.element,
|
|
59
|
-
inlineHtmlElement: PropTypes.element,
|
|
60
|
-
inlineFunctionalElementInlineWithProps: PropTypes.element,
|
|
61
|
-
inlineFunctionalElementNamedInline: PropTypes.element,
|
|
62
|
-
inlineClassElement: PropTypes.element,
|
|
63
|
-
inlineClassElementWithProps: PropTypes.element,
|
|
64
|
-
inlineClassElementWithChildren: PropTypes.element,
|
|
65
|
-
inlineClassElementInline: PropTypes.element,
|
|
66
|
-
inlineFunc: PropTypes.func
|
|
67
|
-
};
|
|
68
|
-
const SOME_INLINE_DEFAULT_PROPS = {
|
|
69
|
-
inlineString: 'Inline prop default value',
|
|
70
|
-
inlineBool: true,
|
|
71
|
-
inlineNumber: 10,
|
|
72
|
-
inlineObj: {
|
|
73
|
-
foo: 'bar'
|
|
74
|
-
},
|
|
75
|
-
inlineArray: [1, 2, 3],
|
|
76
|
-
inlineArrayOfObjects: [{
|
|
77
|
-
foo: 'bar'
|
|
78
|
-
}, {
|
|
79
|
-
foo: 'bar'
|
|
80
|
-
}, {
|
|
81
|
-
foo: 'bar'
|
|
82
|
-
}, {
|
|
83
|
-
foo: 'bar'
|
|
84
|
-
}, {
|
|
85
|
-
foo: 'bar'
|
|
86
|
-
}],
|
|
87
|
-
inlineFunctionalElement: /*#__PURE__*/React.createElement(FunctionalComponent, null),
|
|
88
|
-
inlineFunctionalElementInline: () => {
|
|
89
|
-
return /*#__PURE__*/React.createElement(\\"div\\", null, \\"Inlined FunctionalComponent!\\");
|
|
90
|
-
},
|
|
91
|
-
inlineFunctionalElementInlineReturningNull: () => {
|
|
92
|
-
return null;
|
|
93
|
-
},
|
|
94
|
-
inlineHtmlElement: /*#__PURE__*/React.createElement(\\"div\\", null, \\"Hey!\\"),
|
|
95
|
-
inlineFunctionalElementInlineWithProps: ({
|
|
96
|
-
foo
|
|
97
|
-
}) => {
|
|
98
|
-
return /*#__PURE__*/React.createElement(\\"div\\", null, foo);
|
|
99
|
-
},
|
|
100
|
-
inlineFunctionalElementNamedInline: function InlinedFunctionalComponent() {
|
|
101
|
-
return /*#__PURE__*/React.createElement(\\"div\\", null, \\"Inlined FunctionalComponent!\\");
|
|
102
|
-
},
|
|
103
|
-
inlineClassElement: /*#__PURE__*/React.createElement(ClassComponent, null),
|
|
104
|
-
inlineClassElementWithProps: /*#__PURE__*/React.createElement(ClassComponent, {
|
|
105
|
-
className: \\"toto\\"
|
|
106
|
-
}),
|
|
107
|
-
inlineClassElementWithChildren: /*#__PURE__*/React.createElement(ClassComponent, null, /*#__PURE__*/React.createElement(\\"div\\", null, \\"hey!\\")),
|
|
108
|
-
inlineClassElementInline: class InlinedClassComponent extends React.PureComponent {
|
|
109
|
-
render() {
|
|
110
|
-
return /*#__PURE__*/React.createElement(\\"div\\", null, \\"Inlined ClassComponent!\\");
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
},
|
|
114
|
-
inlineFunc: function add(a, b) {
|
|
115
|
-
return a + b;
|
|
116
|
-
}
|
|
117
|
-
};
|
|
118
|
-
export const PropTypesProps = () => /*#__PURE__*/React.createElement(\\"div\\", null, \\"PropTypes!\\");
|
|
119
|
-
PropTypesProps.propTypes = {
|
|
120
|
-
any: PropTypes.any,
|
|
121
|
-
bool: PropTypes.bool,
|
|
122
|
-
string: PropTypes.string,
|
|
123
|
-
func: PropTypes.func,
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* A function with JSDoc tags.
|
|
127
|
-
*
|
|
128
|
-
* @param {string} foo - A foo value.
|
|
129
|
-
* @param {number} bar - A bar value.
|
|
130
|
-
* @returns {ComplexObject} - Returns a complex object.
|
|
131
|
-
*/
|
|
132
|
-
funcWithJsDoc: PropTypes.func,
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* @param {string} foo - A foo value.
|
|
136
|
-
* @param {number} bar - A bar value.
|
|
137
|
-
* @param {number} bar1 - A bar value.
|
|
138
|
-
* @param {number} bar2 - A bar value.
|
|
139
|
-
* @param {number} bar3 - A bar value.
|
|
140
|
-
* @param {number} bar4 - A bar value.
|
|
141
|
-
* @param {number} bar5 - A bar value.
|
|
142
|
-
* @returns {ComplexObject} - Returns a complex object.
|
|
143
|
-
*/
|
|
144
|
-
semiLongFuncWithJsDoc: PropTypes.func,
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* @param {string} foo - A foo value.
|
|
148
|
-
* @param {number} bar - A bar value.
|
|
149
|
-
* @param {number} bar1 - A bar value.
|
|
150
|
-
* @param {number} bar2 - A bar value.
|
|
151
|
-
* @param {number} bar3 - A bar value.
|
|
152
|
-
* @param {number} bar4 - A bar value.
|
|
153
|
-
* @param {number} bar5 - A bar value.
|
|
154
|
-
* @param {number} bar6 - A bar value.
|
|
155
|
-
* @param {number} bar7 - A bar value.
|
|
156
|
-
* @param {number} bar8 - A bar value.
|
|
157
|
-
* @param {number} bar9 - A bar value.
|
|
158
|
-
* @param {number} bar10 - A bar value.
|
|
159
|
-
* @returns {ComplexObject} - Returns a complex object.
|
|
160
|
-
*/
|
|
161
|
-
veryLongFuncWithJsDoc: PropTypes.func,
|
|
162
|
-
namedDefaultFunc: PropTypes.func,
|
|
163
|
-
number: PropTypes.number,
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* Plain object propType (use shape!!)
|
|
167
|
-
*/
|
|
168
|
-
obj: PropTypes.object,
|
|
169
|
-
symbol: PropTypes.symbol,
|
|
170
|
-
node: PropTypes.node,
|
|
171
|
-
useCustomPropType: customPropType,
|
|
172
|
-
useNestedCustomPropType: nestedCustomPropType.custom,
|
|
173
|
-
functionalElement: PropTypes.element,
|
|
174
|
-
functionalElementInline: PropTypes.element,
|
|
175
|
-
functionalElementNamedInline: PropTypes.element,
|
|
176
|
-
classElement: PropTypes.element,
|
|
177
|
-
classElementInline: PropTypes.element,
|
|
178
|
-
functionalElementType: PropTypes.elementType,
|
|
179
|
-
classElementType: PropTypes.elementType,
|
|
180
|
-
elementWithProps: PropTypes.elementType,
|
|
181
|
-
|
|
182
|
-
/**
|
|
183
|
-
* \`instanceOf\` is also supported and the custom type will be shown instead of \`instanceOf\`
|
|
184
|
-
*/
|
|
185
|
-
instanceOf: PropTypes.instanceOf(Set),
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* \`oneOf\` is basically an Enum which is also supported but can be pretty big.
|
|
189
|
-
*/
|
|
190
|
-
oneOfString: PropTypes.oneOf(['News', 'Photos']),
|
|
191
|
-
oneOfNumeric: PropTypes.oneOf([0, 1, 2, 3]),
|
|
192
|
-
oneOfShapes: PropTypes.oneOf([PropTypes.shape({
|
|
193
|
-
foo: PropTypes.string
|
|
194
|
-
}), PropTypes.shape({
|
|
195
|
-
bar: PropTypes.number
|
|
196
|
-
})]),
|
|
197
|
-
oneOfComplexShapes: PropTypes.oneOf([PropTypes.shape({
|
|
198
|
-
/**
|
|
199
|
-
* Just an internal propType for a shape.
|
|
200
|
-
* It's also required, and as you can see it supports multi-line comments!
|
|
201
|
-
*/
|
|
202
|
-
id: PropTypes.number.isRequired,
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* A simple non-required function
|
|
206
|
-
*/
|
|
207
|
-
func: PropTypes.func,
|
|
208
|
-
|
|
209
|
-
/**
|
|
210
|
-
* An \`arrayOf\` shape
|
|
211
|
-
*/
|
|
212
|
-
arr: PropTypes.arrayOf(PropTypes.shape({
|
|
213
|
-
/**
|
|
214
|
-
* 5-level deep propType definition and still works.
|
|
215
|
-
*/
|
|
216
|
-
index: PropTypes.number.isRequired
|
|
217
|
-
}))
|
|
218
|
-
}), shape({
|
|
219
|
-
bar: PropTypes.number
|
|
220
|
-
})]),
|
|
221
|
-
oneOfComplexType: PropTypes.oneOf([NAMED_OBJECT, ANOTHER_OBJECT]),
|
|
222
|
-
oneOfComponents: PropTypes.oneOf([FunctionalComponent, ClassComponent]),
|
|
223
|
-
oneOfEval: PropTypes.oneOf((() => ['News', 'Photos'])()),
|
|
224
|
-
oneOfVar: PropTypes.oneOf(POSITIONS),
|
|
225
|
-
oneOfNested: PropTypes.oneOf(['News', ['bottom-left', 'bottom-center', 'bottom-right']]),
|
|
226
|
-
oneOfNestedSimpleInlineObject: PropTypes.oneOf(['News', [{
|
|
227
|
-
foo: PropTypes.string
|
|
228
|
-
}]]),
|
|
229
|
-
oneOfNestedComplexInlineObject: PropTypes.oneOf(['News', [{
|
|
230
|
-
nested: {
|
|
231
|
-
foo: PropTypes.string
|
|
232
|
-
}
|
|
233
|
-
}]]),
|
|
234
|
-
oneOfNestedComplexShape: PropTypes.oneOf(['News', [{
|
|
235
|
-
nested: PropTypes.shape({
|
|
236
|
-
foo: PropTypes.string
|
|
237
|
-
})
|
|
238
|
-
}]]),
|
|
239
|
-
|
|
240
|
-
/**
|
|
241
|
-
* A multi-type prop is also valid and is displayed as \`Union<String|Message>\`
|
|
242
|
-
*/
|
|
243
|
-
oneOfType: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Set)]),
|
|
244
|
-
|
|
245
|
-
/**
|
|
246
|
-
* array of a primitive type
|
|
247
|
-
*/
|
|
248
|
-
arrayOfPrimitive: PropTypes.arrayOf(PropTypes.number),
|
|
249
|
-
arrayOfNamedObject: PropTypes.arrayOf(NAMED_OBJECT),
|
|
250
|
-
arrayOfShortInlineObject: PropTypes.arrayOf({
|
|
251
|
-
foo: PropTypes.string
|
|
252
|
-
}),
|
|
253
|
-
arrayOfInlineObject: PropTypes.arrayOf({
|
|
254
|
-
text: PropTypes.string.isRequired,
|
|
255
|
-
value: PropTypes.string.isRequired
|
|
256
|
-
}),
|
|
257
|
-
arrayOfComplexInlineObject: PropTypes.arrayOf({
|
|
258
|
-
text: PropTypes.string.isRequired,
|
|
259
|
-
value: PropTypes.string.isRequired,
|
|
260
|
-
shape: {
|
|
261
|
-
id: PropTypes.string.isRequired,
|
|
262
|
-
age: PropTypes.number.isRequired
|
|
263
|
-
}
|
|
264
|
-
}),
|
|
265
|
-
arrayOfShortShape: PropTypes.arrayOf(PropTypes.shape({
|
|
266
|
-
bar: PropTypes.string
|
|
267
|
-
})),
|
|
268
|
-
arrayOfComplexShape: PropTypes.arrayOf(PropTypes.shape({
|
|
269
|
-
/**
|
|
270
|
-
* Just an internal propType for a shape.
|
|
271
|
-
* It's also required, and as you can see it supports multi-line comments!
|
|
272
|
-
*/
|
|
273
|
-
id: PropTypes.number.isRequired,
|
|
274
|
-
|
|
275
|
-
/**
|
|
276
|
-
* A simple non-required function
|
|
277
|
-
*/
|
|
278
|
-
func: PropTypes.func,
|
|
279
|
-
|
|
280
|
-
/**
|
|
281
|
-
* An \`arrayOf\` shape
|
|
282
|
-
*/
|
|
283
|
-
arr: PropTypes.arrayOf(PropTypes.shape({
|
|
284
|
-
/**
|
|
285
|
-
* 5-level deep propType definition and still works.
|
|
286
|
-
*/
|
|
287
|
-
index: PropTypes.number.isRequired
|
|
288
|
-
}))
|
|
289
|
-
})),
|
|
290
|
-
arrayExternalShape: PropTypes.arrayOf(PropTypes.shape(PRESET_SHAPE)),
|
|
291
|
-
|
|
292
|
-
/**
|
|
293
|
-
* A simple \`objectOf\` propType.
|
|
294
|
-
*/
|
|
295
|
-
simpleObjectOf: PropTypes.objectOf(PropTypes.number),
|
|
296
|
-
objectOfShortInlineObject: PropTypes.objectOf({
|
|
297
|
-
foo: PropTypes.string
|
|
298
|
-
}),
|
|
299
|
-
objectOfInlineObject: PropTypes.objectOf({
|
|
300
|
-
foo: PropTypes.string,
|
|
301
|
-
bar: PropTypes.string,
|
|
302
|
-
barry: PropTypes.string
|
|
303
|
-
}),
|
|
304
|
-
objectOfShortShape: PropTypes.objectOf(PropTypes.shape({
|
|
305
|
-
foo: string
|
|
306
|
-
})),
|
|
307
|
-
|
|
308
|
-
/**
|
|
309
|
-
* A very complex \`objectOf\` propType.
|
|
310
|
-
*/
|
|
311
|
-
objectOfComplexShape: PropTypes.objectOf(PropTypes.shape({
|
|
312
|
-
/**
|
|
313
|
-
* Just an internal propType for a shape.
|
|
314
|
-
* It's also required, and as you can see it supports multi-line comments!
|
|
315
|
-
*/
|
|
316
|
-
id: PropTypes.number.isRequired,
|
|
317
|
-
|
|
318
|
-
/**
|
|
319
|
-
* A simple non-required function
|
|
320
|
-
*/
|
|
321
|
-
func: PropTypes.func,
|
|
322
|
-
|
|
323
|
-
/**
|
|
324
|
-
* An \`arrayOf\` shape
|
|
325
|
-
*/
|
|
326
|
-
arr: PropTypes.arrayOf(PropTypes.shape({
|
|
327
|
-
/**
|
|
328
|
-
* 5-level deep propType definition and still works.
|
|
329
|
-
*/
|
|
330
|
-
index: PropTypes.number.isRequired
|
|
331
|
-
}))
|
|
332
|
-
})),
|
|
333
|
-
namedObjectOf: PropTypes.objectOf(NAMED_OBJECT),
|
|
334
|
-
shapeShort: PropTypes.shape({
|
|
335
|
-
foo: string
|
|
336
|
-
}),
|
|
337
|
-
shapeLong: PropTypes.shape({
|
|
338
|
-
foo: string,
|
|
339
|
-
prop1: string,
|
|
340
|
-
prop2: string,
|
|
341
|
-
prop3: string,
|
|
342
|
-
prop4: string,
|
|
343
|
-
prop5: string,
|
|
344
|
-
prop6: string,
|
|
345
|
-
prop7: string
|
|
346
|
-
}),
|
|
347
|
-
|
|
348
|
-
/**
|
|
349
|
-
* propType for shape with nested arrayOf
|
|
350
|
-
*
|
|
351
|
-
* Also, multi-line description
|
|
352
|
-
*/
|
|
353
|
-
shapeComplex: PropTypes.shape({
|
|
354
|
-
/**
|
|
355
|
-
* Just an internal propType for a shape.
|
|
356
|
-
* It's also required, and as you can see it supports multi-line comments!
|
|
357
|
-
*/
|
|
358
|
-
id: PropTypes.number.isRequired,
|
|
359
|
-
|
|
360
|
-
/**
|
|
361
|
-
* A simple non-required function
|
|
362
|
-
*/
|
|
363
|
-
func: PropTypes.func,
|
|
364
|
-
|
|
365
|
-
/**
|
|
366
|
-
* An \`arrayOf\` shape
|
|
367
|
-
*/
|
|
368
|
-
arr: PropTypes.arrayOf(PropTypes.shape({
|
|
369
|
-
/**
|
|
370
|
-
* 5-level deep propType definition and still works.
|
|
371
|
-
*/
|
|
372
|
-
index: PropTypes.number.isRequired
|
|
373
|
-
})),
|
|
374
|
-
shape: PropTypes.shape({
|
|
375
|
-
shape: PropTypes.shape({
|
|
376
|
-
foo: PropTypes.string,
|
|
377
|
-
oneOf: PropTypes.oneOf(['one', 'two'])
|
|
378
|
-
})
|
|
379
|
-
}),
|
|
380
|
-
oneOf: PropTypes.oneOf(['one', 'two'])
|
|
381
|
-
}),
|
|
382
|
-
shapeWithArray: PropTypes.shape({
|
|
383
|
-
arr: PropTypes.arrayOf({
|
|
384
|
-
foo: PropTypes.string
|
|
385
|
-
})
|
|
386
|
-
}),
|
|
387
|
-
namedShape: NAMED_SHAPE,
|
|
388
|
-
namedObjectInShape: PropTypes.shape(NAMED_OBJECT),
|
|
389
|
-
exact: PropTypes.exact({
|
|
390
|
-
name: PropTypes.string,
|
|
391
|
-
quantity: PropTypes.number
|
|
392
|
-
}),
|
|
393
|
-
namedExact: PropTypes.exact(NAMED_OBJECT),
|
|
394
|
-
|
|
395
|
-
/**
|
|
396
|
-
* test string with a comment that has
|
|
397
|
-
* two identical lines
|
|
398
|
-
* two identical lines
|
|
399
|
-
*/
|
|
400
|
-
optionalString: PropTypes.string,
|
|
401
|
-
requiredString: PropTypes.string.isRequired,
|
|
402
|
-
nullDefaultValue: PropTypes.string,
|
|
403
|
-
undefinedDefaultValue: PropTypes.string,
|
|
404
|
-
...SOME_INLINE_PROP_TYPES,
|
|
405
|
-
...SOME_PROP_TYPES
|
|
406
|
-
};
|
|
407
|
-
PropTypesProps.defaultProps = {
|
|
408
|
-
any: 'Default any',
|
|
409
|
-
bool: false,
|
|
410
|
-
string: 'Default string',
|
|
411
|
-
func: () => {},
|
|
412
|
-
funcWithJsDoc: (foo, bar) => {
|
|
413
|
-
// eslint-disable-next-line
|
|
414
|
-
const yo = window.document; // eslint-disable-next-line
|
|
415
|
-
|
|
416
|
-
const pouf = souffle;
|
|
417
|
-
return {
|
|
418
|
-
foo,
|
|
419
|
-
bar
|
|
420
|
-
};
|
|
421
|
-
},
|
|
422
|
-
namedDefaultFunc: concat,
|
|
423
|
-
number: 5,
|
|
424
|
-
obj: {
|
|
425
|
-
key: 'value'
|
|
426
|
-
},
|
|
427
|
-
symbol: Symbol('Default symbol'),
|
|
428
|
-
node: /*#__PURE__*/React.createElement(\\"div\\", null, \\"Hello!\\"),
|
|
429
|
-
functionalElement: /*#__PURE__*/React.createElement(FunctionalComponent, {
|
|
430
|
-
className: \\"toto\\"
|
|
431
|
-
}),
|
|
432
|
-
functionalElementInline: () => {
|
|
433
|
-
return /*#__PURE__*/React.createElement(\\"div\\", null, \\"Inlined FunctionalComponent!\\");
|
|
434
|
-
},
|
|
435
|
-
functionalElementNamedInline: function InlinedFunctionalComponent() {
|
|
436
|
-
return /*#__PURE__*/React.createElement(\\"div\\", null, \\"Inlined FunctionalComponent!\\");
|
|
437
|
-
},
|
|
438
|
-
classElement: /*#__PURE__*/React.createElement(ClassComponent, null),
|
|
439
|
-
classElementInline: class InlinedClassComponent extends React.PureComponent {
|
|
440
|
-
render() {
|
|
441
|
-
return /*#__PURE__*/React.createElement(\\"div\\", null, \\"Inlined ClassComponent!\\");
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
},
|
|
445
|
-
functionalElementType: FunctionalComponent,
|
|
446
|
-
classElementType: ClassComponent,
|
|
447
|
-
elementWithProps: /*#__PURE__*/React.createElement(ClassComponent, {
|
|
448
|
-
className: \\"w8 h8 fill-marine-500\\"
|
|
449
|
-
}),
|
|
450
|
-
instanceOf: new Set(),
|
|
451
|
-
oneOfString: 'News',
|
|
452
|
-
oneOfNumeric: 1,
|
|
453
|
-
oneOfShapes: {
|
|
454
|
-
foo: 'bar'
|
|
455
|
-
},
|
|
456
|
-
oneOfComplexShapes: {
|
|
457
|
-
thing: {
|
|
458
|
-
id: 2,
|
|
459
|
-
func: () => {},
|
|
460
|
-
arr: []
|
|
461
|
-
}
|
|
462
|
-
},
|
|
463
|
-
oneOfComplexType: {
|
|
464
|
-
text: 'foo',
|
|
465
|
-
value: 'bar'
|
|
466
|
-
},
|
|
467
|
-
oneOfComponents: /*#__PURE__*/React.createElement(FunctionalComponent, null),
|
|
468
|
-
oneOfEval: 'Photos',
|
|
469
|
-
oneOfVar: 'top-right',
|
|
470
|
-
oneOfNested: 'top-right',
|
|
471
|
-
oneOfType: 'hello',
|
|
472
|
-
arrayOfPrimitive: [1, 2, 3],
|
|
473
|
-
arrayOfString: ['0px', '0px'],
|
|
474
|
-
arrayOfNamedObject: [{
|
|
475
|
-
text: 'foo',
|
|
476
|
-
value: 'bar'
|
|
477
|
-
}],
|
|
478
|
-
arrayOfShortInlineObject: [{
|
|
479
|
-
foo: 'bar'
|
|
480
|
-
}],
|
|
481
|
-
arrayOfInlineObject: [{
|
|
482
|
-
text: 'foo',
|
|
483
|
-
value: 'bar'
|
|
484
|
-
}],
|
|
485
|
-
arrayOfComplexInlineObject: [{
|
|
486
|
-
text: 'foo',
|
|
487
|
-
value: 'bar'
|
|
488
|
-
}],
|
|
489
|
-
arrayOfShortShape: [{
|
|
490
|
-
bar: 'foo'
|
|
491
|
-
}],
|
|
492
|
-
arrayOfComplexShape: [{
|
|
493
|
-
thing: {
|
|
494
|
-
id: 2,
|
|
495
|
-
func: () => {},
|
|
496
|
-
arr: []
|
|
497
|
-
}
|
|
498
|
-
}],
|
|
499
|
-
simpleObjectOf: {
|
|
500
|
-
key: 1
|
|
501
|
-
},
|
|
502
|
-
objectOfShortInlineObject: {
|
|
503
|
-
foo: 'bar'
|
|
504
|
-
},
|
|
505
|
-
objectOfInlineObject: {
|
|
506
|
-
foo: 'bar',
|
|
507
|
-
bar: 'foo'
|
|
508
|
-
},
|
|
509
|
-
objectOfShortShape: {
|
|
510
|
-
foo: 'bar'
|
|
511
|
-
},
|
|
512
|
-
objectOfComplexShape: {
|
|
513
|
-
thing: {
|
|
514
|
-
id: 2,
|
|
515
|
-
func: () => {},
|
|
516
|
-
arr: []
|
|
517
|
-
}
|
|
518
|
-
},
|
|
519
|
-
namedObjectOf: {
|
|
520
|
-
text: 'foo',
|
|
521
|
-
value: 'bar'
|
|
522
|
-
},
|
|
523
|
-
shapeShort: {
|
|
524
|
-
foo: 'bar'
|
|
525
|
-
},
|
|
526
|
-
shapeComplex: {
|
|
527
|
-
id: 3,
|
|
528
|
-
func: () => {},
|
|
529
|
-
arr: [],
|
|
530
|
-
shape: {
|
|
531
|
-
shape: {
|
|
532
|
-
foo: 'bar'
|
|
533
|
-
}
|
|
534
|
-
}
|
|
535
|
-
},
|
|
536
|
-
namedShape: {
|
|
537
|
-
foo: 'bar'
|
|
538
|
-
},
|
|
539
|
-
namedObjectInShape: {
|
|
540
|
-
text: 'foo',
|
|
541
|
-
value: 'bar'
|
|
542
|
-
},
|
|
543
|
-
exact: {
|
|
544
|
-
name: 'foo',
|
|
545
|
-
quantity: 2
|
|
546
|
-
},
|
|
547
|
-
namedExact: {
|
|
548
|
-
text: 'foo',
|
|
549
|
-
value: 'bar'
|
|
550
|
-
},
|
|
551
|
-
optionalString: 'Default String',
|
|
552
|
-
nullDefaultValue: null,
|
|
553
|
-
undefinedDefaultValue: undefined,
|
|
554
|
-
...SOME_INLINE_DEFAULT_PROPS
|
|
555
|
-
};
|
|
556
|
-
export const component = PropTypesProps;
|
|
557
|
-
PropTypesProps.__docgenInfo = {
|
|
558
|
-
\\"description\\": \\"\\",
|
|
559
|
-
\\"methods\\": [],
|
|
560
|
-
\\"displayName\\": \\"PropTypesProps\\",
|
|
561
|
-
\\"props\\": {
|
|
562
|
-
\\"any\\": {
|
|
563
|
-
\\"defaultValue\\": {
|
|
564
|
-
\\"value\\": \\"'Default any'\\",
|
|
565
|
-
\\"computed\\": false
|
|
566
|
-
},
|
|
567
|
-
\\"description\\": \\"\\",
|
|
568
|
-
\\"type\\": {
|
|
569
|
-
\\"name\\": \\"any\\"
|
|
570
|
-
},
|
|
571
|
-
\\"required\\": false
|
|
572
|
-
},
|
|
573
|
-
\\"bool\\": {
|
|
574
|
-
\\"defaultValue\\": {
|
|
575
|
-
\\"value\\": \\"false\\",
|
|
576
|
-
\\"computed\\": false
|
|
577
|
-
},
|
|
578
|
-
\\"description\\": \\"\\",
|
|
579
|
-
\\"type\\": {
|
|
580
|
-
\\"name\\": \\"bool\\"
|
|
581
|
-
},
|
|
582
|
-
\\"required\\": false
|
|
583
|
-
},
|
|
584
|
-
\\"string\\": {
|
|
585
|
-
\\"defaultValue\\": {
|
|
586
|
-
\\"value\\": \\"'Default string'\\",
|
|
587
|
-
\\"computed\\": false
|
|
588
|
-
},
|
|
589
|
-
\\"description\\": \\"\\",
|
|
590
|
-
\\"type\\": {
|
|
591
|
-
\\"name\\": \\"string\\"
|
|
592
|
-
},
|
|
593
|
-
\\"required\\": false
|
|
594
|
-
},
|
|
595
|
-
\\"func\\": {
|
|
596
|
-
\\"defaultValue\\": {
|
|
597
|
-
\\"value\\": \\"() => {}\\",
|
|
598
|
-
\\"computed\\": false
|
|
599
|
-
},
|
|
600
|
-
\\"description\\": \\"\\",
|
|
601
|
-
\\"type\\": {
|
|
602
|
-
\\"name\\": \\"func\\"
|
|
603
|
-
},
|
|
604
|
-
\\"required\\": false
|
|
605
|
-
},
|
|
606
|
-
\\"funcWithJsDoc\\": {
|
|
607
|
-
\\"defaultValue\\": {
|
|
608
|
-
\\"value\\": \\"(foo, bar) => {\\\\n // eslint-disable-next-line\\\\n const yo = window.document;\\\\n // eslint-disable-next-line\\\\n const pouf = souffle;\\\\n\\\\n return { foo, bar };\\\\n}\\",
|
|
609
|
-
\\"computed\\": false
|
|
610
|
-
},
|
|
611
|
-
\\"description\\": \\"A function with JSDoc tags.\\\\n\\\\n@param {string} foo - A foo value.\\\\n@param {number} bar - A bar value.\\\\n@returns {ComplexObject} - Returns a complex object.\\",
|
|
612
|
-
\\"type\\": {
|
|
613
|
-
\\"name\\": \\"func\\"
|
|
614
|
-
},
|
|
615
|
-
\\"required\\": false
|
|
616
|
-
},
|
|
617
|
-
\\"namedDefaultFunc\\": {
|
|
618
|
-
\\"defaultValue\\": {
|
|
619
|
-
\\"value\\": \\"function concat(a, b) {\\\\n return a + b;\\\\n}\\",
|
|
620
|
-
\\"computed\\": false
|
|
621
|
-
},
|
|
622
|
-
\\"description\\": \\"\\",
|
|
623
|
-
\\"type\\": {
|
|
624
|
-
\\"name\\": \\"func\\"
|
|
625
|
-
},
|
|
626
|
-
\\"required\\": false
|
|
627
|
-
},
|
|
628
|
-
\\"number\\": {
|
|
629
|
-
\\"defaultValue\\": {
|
|
630
|
-
\\"value\\": \\"5\\",
|
|
631
|
-
\\"computed\\": false
|
|
632
|
-
},
|
|
633
|
-
\\"description\\": \\"\\",
|
|
634
|
-
\\"type\\": {
|
|
635
|
-
\\"name\\": \\"number\\"
|
|
636
|
-
},
|
|
637
|
-
\\"required\\": false
|
|
638
|
-
},
|
|
639
|
-
\\"obj\\": {
|
|
640
|
-
\\"defaultValue\\": {
|
|
641
|
-
\\"value\\": \\"{\\\\n key: 'value',\\\\n}\\",
|
|
642
|
-
\\"computed\\": false
|
|
643
|
-
},
|
|
644
|
-
\\"description\\": \\"Plain object propType (use shape!!)\\",
|
|
645
|
-
\\"type\\": {
|
|
646
|
-
\\"name\\": \\"object\\"
|
|
647
|
-
},
|
|
648
|
-
\\"required\\": false
|
|
649
|
-
},
|
|
650
|
-
\\"symbol\\": {
|
|
651
|
-
\\"defaultValue\\": {
|
|
652
|
-
\\"value\\": \\"Symbol('Default symbol')\\",
|
|
653
|
-
\\"computed\\": true
|
|
654
|
-
},
|
|
655
|
-
\\"description\\": \\"\\",
|
|
656
|
-
\\"type\\": {
|
|
657
|
-
\\"name\\": \\"symbol\\"
|
|
658
|
-
},
|
|
659
|
-
\\"required\\": false
|
|
660
|
-
},
|
|
661
|
-
\\"node\\": {
|
|
662
|
-
\\"defaultValue\\": {
|
|
663
|
-
\\"value\\": \\"<div>Hello!</div>\\",
|
|
664
|
-
\\"computed\\": false
|
|
665
|
-
},
|
|
666
|
-
\\"description\\": \\"\\",
|
|
667
|
-
\\"type\\": {
|
|
668
|
-
\\"name\\": \\"node\\"
|
|
669
|
-
},
|
|
670
|
-
\\"required\\": false
|
|
671
|
-
},
|
|
672
|
-
\\"functionalElement\\": {
|
|
673
|
-
\\"defaultValue\\": {
|
|
674
|
-
\\"value\\": \\"<FunctionalComponent className=\\\\\\"toto\\\\\\" />\\",
|
|
675
|
-
\\"computed\\": false
|
|
676
|
-
},
|
|
677
|
-
\\"description\\": \\"\\",
|
|
678
|
-
\\"type\\": {
|
|
679
|
-
\\"name\\": \\"element\\"
|
|
680
|
-
},
|
|
681
|
-
\\"required\\": false
|
|
682
|
-
},
|
|
683
|
-
\\"functionalElementInline\\": {
|
|
684
|
-
\\"defaultValue\\": {
|
|
685
|
-
\\"value\\": \\"() => {\\\\n return <div>Inlined FunctionalComponent!</div>;\\\\n}\\",
|
|
686
|
-
\\"computed\\": false
|
|
687
|
-
},
|
|
688
|
-
\\"description\\": \\"\\",
|
|
689
|
-
\\"type\\": {
|
|
690
|
-
\\"name\\": \\"element\\"
|
|
691
|
-
},
|
|
692
|
-
\\"required\\": false
|
|
693
|
-
},
|
|
694
|
-
\\"functionalElementNamedInline\\": {
|
|
695
|
-
\\"defaultValue\\": {
|
|
696
|
-
\\"value\\": \\"function InlinedFunctionalComponent() {\\\\n return <div>Inlined FunctionalComponent!</div>;\\\\n}\\",
|
|
697
|
-
\\"computed\\": false
|
|
698
|
-
},
|
|
699
|
-
\\"description\\": \\"\\",
|
|
700
|
-
\\"type\\": {
|
|
701
|
-
\\"name\\": \\"element\\"
|
|
702
|
-
},
|
|
703
|
-
\\"required\\": false
|
|
704
|
-
},
|
|
705
|
-
\\"classElement\\": {
|
|
706
|
-
\\"defaultValue\\": {
|
|
707
|
-
\\"value\\": \\"<ClassComponent />\\",
|
|
708
|
-
\\"computed\\": false
|
|
709
|
-
},
|
|
710
|
-
\\"description\\": \\"\\",
|
|
711
|
-
\\"type\\": {
|
|
712
|
-
\\"name\\": \\"element\\"
|
|
713
|
-
},
|
|
714
|
-
\\"required\\": false
|
|
715
|
-
},
|
|
716
|
-
\\"classElementInline\\": {
|
|
717
|
-
\\"defaultValue\\": {
|
|
718
|
-
\\"value\\": \\"class InlinedClassComponent extends React.PureComponent {\\\\n render() {\\\\n return <div>Inlined ClassComponent!</div>;\\\\n }\\\\n}\\",
|
|
719
|
-
\\"computed\\": false
|
|
720
|
-
},
|
|
721
|
-
\\"description\\": \\"\\",
|
|
722
|
-
\\"type\\": {
|
|
723
|
-
\\"name\\": \\"element\\"
|
|
724
|
-
},
|
|
725
|
-
\\"required\\": false
|
|
726
|
-
},
|
|
727
|
-
\\"functionalElementType\\": {
|
|
728
|
-
\\"defaultValue\\": {
|
|
729
|
-
\\"value\\": \\"() => {\\\\n return <div>FunctionalComponent!</div>;\\\\n}\\",
|
|
730
|
-
\\"computed\\": false
|
|
731
|
-
},
|
|
732
|
-
\\"description\\": \\"\\",
|
|
733
|
-
\\"type\\": {
|
|
734
|
-
\\"name\\": \\"elementType\\"
|
|
735
|
-
},
|
|
736
|
-
\\"required\\": false
|
|
737
|
-
},
|
|
738
|
-
\\"classElementType\\": {
|
|
739
|
-
\\"defaultValue\\": {
|
|
740
|
-
\\"value\\": \\"class ClassComponent extends React.PureComponent {\\\\n render() {\\\\n return <div>ClassComponent!</div>;\\\\n }\\\\n}\\",
|
|
741
|
-
\\"computed\\": false
|
|
742
|
-
},
|
|
743
|
-
\\"description\\": \\"\\",
|
|
744
|
-
\\"type\\": {
|
|
745
|
-
\\"name\\": \\"elementType\\"
|
|
746
|
-
},
|
|
747
|
-
\\"required\\": false
|
|
748
|
-
},
|
|
749
|
-
\\"elementWithProps\\": {
|
|
750
|
-
\\"defaultValue\\": {
|
|
751
|
-
\\"value\\": \\"<ClassComponent className=\\\\\\"w8 h8 fill-marine-500\\\\\\" />\\",
|
|
752
|
-
\\"computed\\": false
|
|
753
|
-
},
|
|
754
|
-
\\"description\\": \\"\\",
|
|
755
|
-
\\"type\\": {
|
|
756
|
-
\\"name\\": \\"elementType\\"
|
|
757
|
-
},
|
|
758
|
-
\\"required\\": false
|
|
759
|
-
},
|
|
760
|
-
\\"instanceOf\\": {
|
|
761
|
-
\\"defaultValue\\": {
|
|
762
|
-
\\"value\\": \\"new Set()\\",
|
|
763
|
-
\\"computed\\": false
|
|
764
|
-
},
|
|
765
|
-
\\"description\\": \\"\`instanceOf\` is also supported and the custom type will be shown instead of \`instanceOf\`\\",
|
|
766
|
-
\\"type\\": {
|
|
767
|
-
\\"name\\": \\"instanceOf\\",
|
|
768
|
-
\\"value\\": \\"Set\\"
|
|
769
|
-
},
|
|
770
|
-
\\"required\\": false
|
|
771
|
-
},
|
|
772
|
-
\\"oneOfString\\": {
|
|
773
|
-
\\"defaultValue\\": {
|
|
774
|
-
\\"value\\": \\"'News'\\",
|
|
775
|
-
\\"computed\\": false
|
|
776
|
-
},
|
|
777
|
-
\\"description\\": \\"\`oneOf\` is basically an Enum which is also supported but can be pretty big.\\",
|
|
778
|
-
\\"type\\": {
|
|
779
|
-
\\"name\\": \\"enum\\",
|
|
780
|
-
\\"value\\": [{
|
|
781
|
-
\\"value\\": \\"'News'\\",
|
|
782
|
-
\\"computed\\": false
|
|
783
|
-
}, {
|
|
784
|
-
\\"value\\": \\"'Photos'\\",
|
|
785
|
-
\\"computed\\": false
|
|
786
|
-
}]
|
|
787
|
-
},
|
|
788
|
-
\\"required\\": false
|
|
789
|
-
},
|
|
790
|
-
\\"oneOfNumeric\\": {
|
|
791
|
-
\\"defaultValue\\": {
|
|
792
|
-
\\"value\\": \\"1\\",
|
|
793
|
-
\\"computed\\": false
|
|
794
|
-
},
|
|
795
|
-
\\"description\\": \\"\\",
|
|
796
|
-
\\"type\\": {
|
|
797
|
-
\\"name\\": \\"enum\\",
|
|
798
|
-
\\"value\\": [{
|
|
799
|
-
\\"value\\": \\"0\\",
|
|
800
|
-
\\"computed\\": false
|
|
801
|
-
}, {
|
|
802
|
-
\\"value\\": \\"1\\",
|
|
803
|
-
\\"computed\\": false
|
|
804
|
-
}, {
|
|
805
|
-
\\"value\\": \\"2\\",
|
|
806
|
-
\\"computed\\": false
|
|
807
|
-
}, {
|
|
808
|
-
\\"value\\": \\"3\\",
|
|
809
|
-
\\"computed\\": false
|
|
810
|
-
}]
|
|
811
|
-
},
|
|
812
|
-
\\"required\\": false
|
|
813
|
-
},
|
|
814
|
-
\\"oneOfShapes\\": {
|
|
815
|
-
\\"defaultValue\\": {
|
|
816
|
-
\\"value\\": \\"{ foo: 'bar' }\\",
|
|
817
|
-
\\"computed\\": false
|
|
818
|
-
},
|
|
819
|
-
\\"description\\": \\"\\",
|
|
820
|
-
\\"type\\": {
|
|
821
|
-
\\"name\\": \\"enum\\",
|
|
822
|
-
\\"value\\": [{
|
|
823
|
-
\\"value\\": \\"PropTypes.shape({ foo: PropTypes.string })\\",
|
|
824
|
-
\\"computed\\": true
|
|
825
|
-
}, {
|
|
826
|
-
\\"value\\": \\"PropTypes.shape({ bar: PropTypes.number })\\",
|
|
827
|
-
\\"computed\\": true
|
|
828
|
-
}]
|
|
829
|
-
},
|
|
830
|
-
\\"required\\": false
|
|
831
|
-
},
|
|
832
|
-
\\"oneOfComplexShapes\\": {
|
|
833
|
-
\\"defaultValue\\": {
|
|
834
|
-
\\"value\\": \\"{\\\\n thing: {\\\\n id: 2,\\\\n func: () => {},\\\\n arr: [],\\\\n },\\\\n}\\",
|
|
835
|
-
\\"computed\\": false
|
|
836
|
-
},
|
|
837
|
-
\\"description\\": \\"\\",
|
|
838
|
-
\\"type\\": {
|
|
839
|
-
\\"name\\": \\"enum\\",
|
|
840
|
-
\\"value\\": [{
|
|
841
|
-
\\"value\\": \\"PropTypes.shape({\\\\n /**\\\\n * Just an internal propType for a shape.\\\\n * It's also required, and as you can see it supports multi-line comments!\\\\n */\\\\n id: PropTypes.number.isRequired,\\\\n /**\\\\n * A simple non-required function\\\\n */\\\\n func: PropTypes.func,\\\\n /**\\\\n * An \`arrayOf\` shape\\\\n */\\\\n arr: PropTypes.arrayOf(\\\\n PropTypes.shape({\\\\n /**\\\\n * 5-level deep propType definition and still works.\\\\n */\\\\n index: PropTypes.number.isRequired,\\\\n })\\\\n ),\\\\n})\\",
|
|
842
|
-
\\"computed\\": true
|
|
843
|
-
}, {
|
|
844
|
-
\\"value\\": \\"shape({ bar: PropTypes.number })\\",
|
|
845
|
-
\\"computed\\": true
|
|
846
|
-
}]
|
|
847
|
-
},
|
|
848
|
-
\\"required\\": false
|
|
849
|
-
},
|
|
850
|
-
\\"oneOfComplexType\\": {
|
|
851
|
-
\\"defaultValue\\": {
|
|
852
|
-
\\"value\\": \\"{ text: 'foo', value: 'bar' }\\",
|
|
853
|
-
\\"computed\\": false
|
|
854
|
-
},
|
|
855
|
-
\\"description\\": \\"\\",
|
|
856
|
-
\\"type\\": {
|
|
857
|
-
\\"name\\": \\"enum\\",
|
|
858
|
-
\\"value\\": [{
|
|
859
|
-
\\"value\\": \\"{\\\\n text: PropTypes.string.isRequired,\\\\n value: PropTypes.string.isRequired,\\\\n}\\",
|
|
860
|
-
\\"computed\\": true
|
|
861
|
-
}, {
|
|
862
|
-
\\"value\\": \\"{\\\\n foo: PropTypes.string,\\\\n bar: PropTypes.string,\\\\n}\\",
|
|
863
|
-
\\"computed\\": true
|
|
864
|
-
}]
|
|
865
|
-
},
|
|
866
|
-
\\"required\\": false
|
|
867
|
-
},
|
|
868
|
-
\\"oneOfComponents\\": {
|
|
869
|
-
\\"defaultValue\\": {
|
|
870
|
-
\\"value\\": \\"<FunctionalComponent />\\",
|
|
871
|
-
\\"computed\\": false
|
|
872
|
-
},
|
|
873
|
-
\\"description\\": \\"\\",
|
|
874
|
-
\\"type\\": {
|
|
875
|
-
\\"name\\": \\"enum\\",
|
|
876
|
-
\\"value\\": [{
|
|
877
|
-
\\"value\\": \\"() => {\\\\n return <div>FunctionalComponent!</div>;\\\\n}\\",
|
|
878
|
-
\\"computed\\": true
|
|
879
|
-
}, {
|
|
880
|
-
\\"value\\": \\"class ClassComponent extends React.PureComponent {\\\\n render() {\\\\n return <div>ClassComponent!</div>;\\\\n }\\\\n}\\",
|
|
881
|
-
\\"computed\\": true
|
|
882
|
-
}]
|
|
883
|
-
},
|
|
884
|
-
\\"required\\": false
|
|
885
|
-
},
|
|
886
|
-
\\"oneOfEval\\": {
|
|
887
|
-
\\"defaultValue\\": {
|
|
888
|
-
\\"value\\": \\"'Photos'\\",
|
|
889
|
-
\\"computed\\": false
|
|
890
|
-
},
|
|
891
|
-
\\"description\\": \\"\\",
|
|
892
|
-
\\"type\\": {
|
|
893
|
-
\\"name\\": \\"enum\\",
|
|
894
|
-
\\"computed\\": true,
|
|
895
|
-
\\"value\\": \\"(() => ['News', 'Photos'])()\\"
|
|
896
|
-
},
|
|
897
|
-
\\"required\\": false
|
|
898
|
-
},
|
|
899
|
-
\\"oneOfVar\\": {
|
|
900
|
-
\\"defaultValue\\": {
|
|
901
|
-
\\"value\\": \\"'top-right'\\",
|
|
902
|
-
\\"computed\\": false
|
|
903
|
-
},
|
|
904
|
-
\\"description\\": \\"\\",
|
|
905
|
-
\\"type\\": {
|
|
906
|
-
\\"name\\": \\"enum\\",
|
|
907
|
-
\\"value\\": [{
|
|
908
|
-
\\"value\\": \\"'top-left'\\",
|
|
909
|
-
\\"computed\\": false
|
|
910
|
-
}, {
|
|
911
|
-
\\"value\\": \\"'top-right'\\",
|
|
912
|
-
\\"computed\\": false
|
|
913
|
-
}, {
|
|
914
|
-
\\"value\\": \\"'top-center'\\",
|
|
915
|
-
\\"computed\\": false
|
|
916
|
-
}]
|
|
917
|
-
},
|
|
918
|
-
\\"required\\": false
|
|
919
|
-
},
|
|
920
|
-
\\"oneOfNested\\": {
|
|
921
|
-
\\"defaultValue\\": {
|
|
922
|
-
\\"value\\": \\"'top-right'\\",
|
|
923
|
-
\\"computed\\": false
|
|
924
|
-
},
|
|
925
|
-
\\"description\\": \\"\\",
|
|
926
|
-
\\"type\\": {
|
|
927
|
-
\\"name\\": \\"enum\\",
|
|
928
|
-
\\"value\\": [{
|
|
929
|
-
\\"value\\": \\"'News'\\",
|
|
930
|
-
\\"computed\\": false
|
|
931
|
-
}, {
|
|
932
|
-
\\"value\\": \\"['bottom-left', 'bottom-center', 'bottom-right']\\",
|
|
933
|
-
\\"computed\\": true
|
|
934
|
-
}]
|
|
935
|
-
},
|
|
936
|
-
\\"required\\": false
|
|
937
|
-
},
|
|
938
|
-
\\"oneOfType\\": {
|
|
939
|
-
\\"defaultValue\\": {
|
|
940
|
-
\\"value\\": \\"'hello'\\",
|
|
941
|
-
\\"computed\\": false
|
|
942
|
-
},
|
|
943
|
-
\\"description\\": \\"A multi-type prop is also valid and is displayed as \`Union<String|Message>\`\\",
|
|
944
|
-
\\"type\\": {
|
|
945
|
-
\\"name\\": \\"union\\",
|
|
946
|
-
\\"value\\": [{
|
|
947
|
-
\\"name\\": \\"string\\"
|
|
948
|
-
}, {
|
|
949
|
-
\\"name\\": \\"instanceOf\\",
|
|
950
|
-
\\"value\\": \\"Set\\"
|
|
951
|
-
}]
|
|
952
|
-
},
|
|
953
|
-
\\"required\\": false
|
|
954
|
-
},
|
|
955
|
-
\\"arrayOfPrimitive\\": {
|
|
956
|
-
\\"defaultValue\\": {
|
|
957
|
-
\\"value\\": \\"[1, 2, 3]\\",
|
|
958
|
-
\\"computed\\": false
|
|
959
|
-
},
|
|
960
|
-
\\"description\\": \\"array of a primitive type\\",
|
|
961
|
-
\\"type\\": {
|
|
962
|
-
\\"name\\": \\"arrayOf\\",
|
|
963
|
-
\\"value\\": {
|
|
964
|
-
\\"name\\": \\"number\\"
|
|
965
|
-
}
|
|
966
|
-
},
|
|
967
|
-
\\"required\\": false
|
|
968
|
-
},
|
|
969
|
-
\\"arrayOfString\\": {
|
|
970
|
-
\\"defaultValue\\": {
|
|
971
|
-
\\"value\\": \\"['0px', '0px']\\",
|
|
972
|
-
\\"computed\\": false
|
|
973
|
-
},
|
|
974
|
-
\\"required\\": false
|
|
975
|
-
},
|
|
976
|
-
\\"arrayOfNamedObject\\": {
|
|
977
|
-
\\"defaultValue\\": {
|
|
978
|
-
\\"value\\": \\"[{ text: 'foo', value: 'bar' }]\\",
|
|
979
|
-
\\"computed\\": false
|
|
980
|
-
},
|
|
981
|
-
\\"description\\": \\"\\",
|
|
982
|
-
\\"type\\": {
|
|
983
|
-
\\"name\\": \\"arrayOf\\",
|
|
984
|
-
\\"value\\": {
|
|
985
|
-
\\"name\\": \\"custom\\",
|
|
986
|
-
\\"raw\\": \\"NAMED_OBJECT\\"
|
|
987
|
-
}
|
|
988
|
-
},
|
|
989
|
-
\\"required\\": false
|
|
990
|
-
},
|
|
991
|
-
\\"arrayOfShortInlineObject\\": {
|
|
992
|
-
\\"defaultValue\\": {
|
|
993
|
-
\\"value\\": \\"[{ foo: 'bar' }]\\",
|
|
994
|
-
\\"computed\\": false
|
|
995
|
-
},
|
|
996
|
-
\\"description\\": \\"\\",
|
|
997
|
-
\\"type\\": {
|
|
998
|
-
\\"name\\": \\"arrayOf\\",
|
|
999
|
-
\\"value\\": {
|
|
1000
|
-
\\"name\\": \\"custom\\",
|
|
1001
|
-
\\"raw\\": \\"{\\\\n foo: PropTypes.string,\\\\n}\\"
|
|
1002
|
-
}
|
|
1003
|
-
},
|
|
1004
|
-
\\"required\\": false
|
|
1005
|
-
},
|
|
1006
|
-
\\"arrayOfInlineObject\\": {
|
|
1007
|
-
\\"defaultValue\\": {
|
|
1008
|
-
\\"value\\": \\"[{ text: 'foo', value: 'bar' }]\\",
|
|
1009
|
-
\\"computed\\": false
|
|
1010
|
-
},
|
|
1011
|
-
\\"description\\": \\"\\",
|
|
1012
|
-
\\"type\\": {
|
|
1013
|
-
\\"name\\": \\"arrayOf\\",
|
|
1014
|
-
\\"value\\": {
|
|
1015
|
-
\\"name\\": \\"custom\\",
|
|
1016
|
-
\\"raw\\": \\"{\\\\n text: PropTypes.string.isRequired,\\\\n value: PropTypes.string.isRequired,\\\\n}\\"
|
|
1017
|
-
}
|
|
1018
|
-
},
|
|
1019
|
-
\\"required\\": false
|
|
1020
|
-
},
|
|
1021
|
-
\\"arrayOfComplexInlineObject\\": {
|
|
1022
|
-
\\"defaultValue\\": {
|
|
1023
|
-
\\"value\\": \\"[{ text: 'foo', value: 'bar' }]\\",
|
|
1024
|
-
\\"computed\\": false
|
|
1025
|
-
},
|
|
1026
|
-
\\"description\\": \\"\\",
|
|
1027
|
-
\\"type\\": {
|
|
1028
|
-
\\"name\\": \\"arrayOf\\",
|
|
1029
|
-
\\"value\\": {
|
|
1030
|
-
\\"name\\": \\"custom\\",
|
|
1031
|
-
\\"raw\\": \\"{\\\\n text: PropTypes.string.isRequired,\\\\n value: PropTypes.string.isRequired,\\\\n shape: {\\\\n id: PropTypes.string.isRequired,\\\\n age: PropTypes.number.isRequired,\\\\n },\\\\n}\\"
|
|
1032
|
-
}
|
|
1033
|
-
},
|
|
1034
|
-
\\"required\\": false
|
|
1035
|
-
},
|
|
1036
|
-
\\"arrayOfShortShape\\": {
|
|
1037
|
-
\\"defaultValue\\": {
|
|
1038
|
-
\\"value\\": \\"[{ bar: 'foo' }]\\",
|
|
1039
|
-
\\"computed\\": false
|
|
1040
|
-
},
|
|
1041
|
-
\\"description\\": \\"\\",
|
|
1042
|
-
\\"type\\": {
|
|
1043
|
-
\\"name\\": \\"arrayOf\\",
|
|
1044
|
-
\\"value\\": {
|
|
1045
|
-
\\"name\\": \\"shape\\",
|
|
1046
|
-
\\"value\\": {
|
|
1047
|
-
\\"bar\\": {
|
|
1048
|
-
\\"name\\": \\"string\\",
|
|
1049
|
-
\\"required\\": false
|
|
1050
|
-
}
|
|
1051
|
-
}
|
|
1052
|
-
}
|
|
1053
|
-
},
|
|
1054
|
-
\\"required\\": false
|
|
1055
|
-
},
|
|
1056
|
-
\\"arrayOfComplexShape\\": {
|
|
1057
|
-
\\"defaultValue\\": {
|
|
1058
|
-
\\"value\\": \\"[\\\\n {\\\\n thing: {\\\\n id: 2,\\\\n func: () => {},\\\\n arr: [],\\\\n },\\\\n },\\\\n]\\",
|
|
1059
|
-
\\"computed\\": false
|
|
1060
|
-
},
|
|
1061
|
-
\\"description\\": \\"\\",
|
|
1062
|
-
\\"type\\": {
|
|
1063
|
-
\\"name\\": \\"arrayOf\\",
|
|
1064
|
-
\\"value\\": {
|
|
1065
|
-
\\"name\\": \\"shape\\",
|
|
1066
|
-
\\"value\\": {
|
|
1067
|
-
\\"id\\": {
|
|
1068
|
-
\\"name\\": \\"number\\",
|
|
1069
|
-
\\"description\\": \\"Just an internal propType for a shape.\\\\n It's also required, and as you can see it supports multi-line comments!\\",
|
|
1070
|
-
\\"required\\": true
|
|
1071
|
-
},
|
|
1072
|
-
\\"func\\": {
|
|
1073
|
-
\\"name\\": \\"func\\",
|
|
1074
|
-
\\"description\\": \\"A simple non-required function\\",
|
|
1075
|
-
\\"required\\": false
|
|
1076
|
-
},
|
|
1077
|
-
\\"arr\\": {
|
|
1078
|
-
\\"name\\": \\"arrayOf\\",
|
|
1079
|
-
\\"value\\": {
|
|
1080
|
-
\\"name\\": \\"shape\\",
|
|
1081
|
-
\\"value\\": {
|
|
1082
|
-
\\"index\\": {
|
|
1083
|
-
\\"name\\": \\"number\\",
|
|
1084
|
-
\\"description\\": \\"5-level deep propType definition and still works.\\",
|
|
1085
|
-
\\"required\\": true
|
|
1086
|
-
}
|
|
1087
|
-
}
|
|
1088
|
-
},
|
|
1089
|
-
\\"description\\": \\"An \`arrayOf\` shape\\",
|
|
1090
|
-
\\"required\\": false
|
|
1091
|
-
}
|
|
1092
|
-
}
|
|
1093
|
-
}
|
|
1094
|
-
},
|
|
1095
|
-
\\"required\\": false
|
|
1096
|
-
},
|
|
1097
|
-
\\"simpleObjectOf\\": {
|
|
1098
|
-
\\"defaultValue\\": {
|
|
1099
|
-
\\"value\\": \\"{ key: 1 }\\",
|
|
1100
|
-
\\"computed\\": false
|
|
1101
|
-
},
|
|
1102
|
-
\\"description\\": \\"A simple \`objectOf\` propType.\\",
|
|
1103
|
-
\\"type\\": {
|
|
1104
|
-
\\"name\\": \\"objectOf\\",
|
|
1105
|
-
\\"value\\": {
|
|
1106
|
-
\\"name\\": \\"number\\"
|
|
1107
|
-
}
|
|
1108
|
-
},
|
|
1109
|
-
\\"required\\": false
|
|
1110
|
-
},
|
|
1111
|
-
\\"objectOfShortInlineObject\\": {
|
|
1112
|
-
\\"defaultValue\\": {
|
|
1113
|
-
\\"value\\": \\"{ foo: 'bar' }\\",
|
|
1114
|
-
\\"computed\\": false
|
|
1115
|
-
},
|
|
1116
|
-
\\"description\\": \\"\\",
|
|
1117
|
-
\\"type\\": {
|
|
1118
|
-
\\"name\\": \\"objectOf\\",
|
|
1119
|
-
\\"value\\": {
|
|
1120
|
-
\\"name\\": \\"custom\\",
|
|
1121
|
-
\\"raw\\": \\"{\\\\n foo: PropTypes.string,\\\\n}\\"
|
|
1122
|
-
}
|
|
1123
|
-
},
|
|
1124
|
-
\\"required\\": false
|
|
1125
|
-
},
|
|
1126
|
-
\\"objectOfInlineObject\\": {
|
|
1127
|
-
\\"defaultValue\\": {
|
|
1128
|
-
\\"value\\": \\"{ foo: 'bar', bar: 'foo' }\\",
|
|
1129
|
-
\\"computed\\": false
|
|
1130
|
-
},
|
|
1131
|
-
\\"description\\": \\"\\",
|
|
1132
|
-
\\"type\\": {
|
|
1133
|
-
\\"name\\": \\"objectOf\\",
|
|
1134
|
-
\\"value\\": {
|
|
1135
|
-
\\"name\\": \\"custom\\",
|
|
1136
|
-
\\"raw\\": \\"{\\\\n foo: PropTypes.string,\\\\n bar: PropTypes.string,\\\\n barry: PropTypes.string,\\\\n}\\"
|
|
1137
|
-
}
|
|
1138
|
-
},
|
|
1139
|
-
\\"required\\": false
|
|
1140
|
-
},
|
|
1141
|
-
\\"objectOfShortShape\\": {
|
|
1142
|
-
\\"defaultValue\\": {
|
|
1143
|
-
\\"value\\": \\"{ foo: 'bar' }\\",
|
|
1144
|
-
\\"computed\\": false
|
|
1145
|
-
},
|
|
1146
|
-
\\"description\\": \\"\\",
|
|
1147
|
-
\\"type\\": {
|
|
1148
|
-
\\"name\\": \\"objectOf\\",
|
|
1149
|
-
\\"value\\": {
|
|
1150
|
-
\\"name\\": \\"shape\\",
|
|
1151
|
-
\\"value\\": {
|
|
1152
|
-
\\"foo\\": {
|
|
1153
|
-
\\"name\\": \\"string\\",
|
|
1154
|
-
\\"required\\": false
|
|
1155
|
-
}
|
|
1156
|
-
}
|
|
1157
|
-
}
|
|
1158
|
-
},
|
|
1159
|
-
\\"required\\": false
|
|
1160
|
-
},
|
|
1161
|
-
\\"objectOfComplexShape\\": {
|
|
1162
|
-
\\"defaultValue\\": {
|
|
1163
|
-
\\"value\\": \\"{\\\\n thing: {\\\\n id: 2,\\\\n func: () => {},\\\\n arr: [],\\\\n },\\\\n}\\",
|
|
1164
|
-
\\"computed\\": false
|
|
1165
|
-
},
|
|
1166
|
-
\\"description\\": \\"A very complex \`objectOf\` propType.\\",
|
|
1167
|
-
\\"type\\": {
|
|
1168
|
-
\\"name\\": \\"objectOf\\",
|
|
1169
|
-
\\"value\\": {
|
|
1170
|
-
\\"name\\": \\"shape\\",
|
|
1171
|
-
\\"value\\": {
|
|
1172
|
-
\\"id\\": {
|
|
1173
|
-
\\"name\\": \\"number\\",
|
|
1174
|
-
\\"description\\": \\"Just an internal propType for a shape.\\\\n It's also required, and as you can see it supports multi-line comments!\\",
|
|
1175
|
-
\\"required\\": true
|
|
1176
|
-
},
|
|
1177
|
-
\\"func\\": {
|
|
1178
|
-
\\"name\\": \\"func\\",
|
|
1179
|
-
\\"description\\": \\"A simple non-required function\\",
|
|
1180
|
-
\\"required\\": false
|
|
1181
|
-
},
|
|
1182
|
-
\\"arr\\": {
|
|
1183
|
-
\\"name\\": \\"arrayOf\\",
|
|
1184
|
-
\\"value\\": {
|
|
1185
|
-
\\"name\\": \\"shape\\",
|
|
1186
|
-
\\"value\\": {
|
|
1187
|
-
\\"index\\": {
|
|
1188
|
-
\\"name\\": \\"number\\",
|
|
1189
|
-
\\"description\\": \\"5-level deep propType definition and still works.\\",
|
|
1190
|
-
\\"required\\": true
|
|
1191
|
-
}
|
|
1192
|
-
}
|
|
1193
|
-
},
|
|
1194
|
-
\\"description\\": \\"An \`arrayOf\` shape\\",
|
|
1195
|
-
\\"required\\": false
|
|
1196
|
-
}
|
|
1197
|
-
}
|
|
1198
|
-
}
|
|
1199
|
-
},
|
|
1200
|
-
\\"required\\": false
|
|
1201
|
-
},
|
|
1202
|
-
\\"namedObjectOf\\": {
|
|
1203
|
-
\\"defaultValue\\": {
|
|
1204
|
-
\\"value\\": \\"{ text: 'foo', value: 'bar' }\\",
|
|
1205
|
-
\\"computed\\": false
|
|
1206
|
-
},
|
|
1207
|
-
\\"description\\": \\"\\",
|
|
1208
|
-
\\"type\\": {
|
|
1209
|
-
\\"name\\": \\"objectOf\\",
|
|
1210
|
-
\\"value\\": {
|
|
1211
|
-
\\"name\\": \\"custom\\",
|
|
1212
|
-
\\"raw\\": \\"NAMED_OBJECT\\"
|
|
1213
|
-
}
|
|
1214
|
-
},
|
|
1215
|
-
\\"required\\": false
|
|
1216
|
-
},
|
|
1217
|
-
\\"shapeShort\\": {
|
|
1218
|
-
\\"defaultValue\\": {
|
|
1219
|
-
\\"value\\": \\"{ foo: 'bar' }\\",
|
|
1220
|
-
\\"computed\\": false
|
|
1221
|
-
},
|
|
1222
|
-
\\"description\\": \\"\\",
|
|
1223
|
-
\\"type\\": {
|
|
1224
|
-
\\"name\\": \\"shape\\",
|
|
1225
|
-
\\"value\\": {
|
|
1226
|
-
\\"foo\\": {
|
|
1227
|
-
\\"name\\": \\"string\\",
|
|
1228
|
-
\\"required\\": false
|
|
1229
|
-
}
|
|
1230
|
-
}
|
|
1231
|
-
},
|
|
1232
|
-
\\"required\\": false
|
|
1233
|
-
},
|
|
1234
|
-
\\"shapeComplex\\": {
|
|
1235
|
-
\\"defaultValue\\": {
|
|
1236
|
-
\\"value\\": \\"{\\\\n id: 3,\\\\n func: () => {},\\\\n arr: [],\\\\n shape: {\\\\n shape: {\\\\n foo: 'bar',\\\\n },\\\\n },\\\\n}\\",
|
|
1237
|
-
\\"computed\\": false
|
|
1238
|
-
},
|
|
1239
|
-
\\"description\\": \\"propType for shape with nested arrayOf\\\\n\\\\nAlso, multi-line description\\",
|
|
1240
|
-
\\"type\\": {
|
|
1241
|
-
\\"name\\": \\"shape\\",
|
|
1242
|
-
\\"value\\": {
|
|
1243
|
-
\\"id\\": {
|
|
1244
|
-
\\"name\\": \\"number\\",
|
|
1245
|
-
\\"description\\": \\"Just an internal propType for a shape.\\\\n It's also required, and as you can see it supports multi-line comments!\\",
|
|
1246
|
-
\\"required\\": true
|
|
1247
|
-
},
|
|
1248
|
-
\\"func\\": {
|
|
1249
|
-
\\"name\\": \\"func\\",
|
|
1250
|
-
\\"description\\": \\"A simple non-required function\\",
|
|
1251
|
-
\\"required\\": false
|
|
1252
|
-
},
|
|
1253
|
-
\\"arr\\": {
|
|
1254
|
-
\\"name\\": \\"arrayOf\\",
|
|
1255
|
-
\\"value\\": {
|
|
1256
|
-
\\"name\\": \\"shape\\",
|
|
1257
|
-
\\"value\\": {
|
|
1258
|
-
\\"index\\": {
|
|
1259
|
-
\\"name\\": \\"number\\",
|
|
1260
|
-
\\"description\\": \\"5-level deep propType definition and still works.\\",
|
|
1261
|
-
\\"required\\": true
|
|
1262
|
-
}
|
|
1263
|
-
}
|
|
1264
|
-
},
|
|
1265
|
-
\\"description\\": \\"An \`arrayOf\` shape\\",
|
|
1266
|
-
\\"required\\": false
|
|
1267
|
-
},
|
|
1268
|
-
\\"shape\\": {
|
|
1269
|
-
\\"name\\": \\"shape\\",
|
|
1270
|
-
\\"value\\": {
|
|
1271
|
-
\\"shape\\": {
|
|
1272
|
-
\\"name\\": \\"shape\\",
|
|
1273
|
-
\\"value\\": {
|
|
1274
|
-
\\"foo\\": {
|
|
1275
|
-
\\"name\\": \\"string\\",
|
|
1276
|
-
\\"required\\": false
|
|
1277
|
-
},
|
|
1278
|
-
\\"oneOf\\": {
|
|
1279
|
-
\\"name\\": \\"enum\\",
|
|
1280
|
-
\\"value\\": [{
|
|
1281
|
-
\\"value\\": \\"'one'\\",
|
|
1282
|
-
\\"computed\\": false
|
|
1283
|
-
}, {
|
|
1284
|
-
\\"value\\": \\"'two'\\",
|
|
1285
|
-
\\"computed\\": false
|
|
1286
|
-
}],
|
|
1287
|
-
\\"required\\": false
|
|
1288
|
-
}
|
|
1289
|
-
},
|
|
1290
|
-
\\"required\\": false
|
|
1291
|
-
}
|
|
1292
|
-
},
|
|
1293
|
-
\\"required\\": false
|
|
1294
|
-
},
|
|
1295
|
-
\\"oneOf\\": {
|
|
1296
|
-
\\"name\\": \\"enum\\",
|
|
1297
|
-
\\"value\\": [{
|
|
1298
|
-
\\"value\\": \\"'one'\\",
|
|
1299
|
-
\\"computed\\": false
|
|
1300
|
-
}, {
|
|
1301
|
-
\\"value\\": \\"'two'\\",
|
|
1302
|
-
\\"computed\\": false
|
|
1303
|
-
}],
|
|
1304
|
-
\\"required\\": false
|
|
1305
|
-
}
|
|
1306
|
-
}
|
|
1307
|
-
},
|
|
1308
|
-
\\"required\\": false
|
|
1309
|
-
},
|
|
1310
|
-
\\"namedShape\\": {
|
|
1311
|
-
\\"defaultValue\\": {
|
|
1312
|
-
\\"value\\": \\"{ foo: 'bar' }\\",
|
|
1313
|
-
\\"computed\\": false
|
|
1314
|
-
},
|
|
1315
|
-
\\"description\\": \\"\\",
|
|
1316
|
-
\\"type\\": {
|
|
1317
|
-
\\"name\\": \\"custom\\",
|
|
1318
|
-
\\"raw\\": \\"NAMED_SHAPE\\"
|
|
1319
|
-
},
|
|
1320
|
-
\\"required\\": false
|
|
1321
|
-
},
|
|
1322
|
-
\\"namedObjectInShape\\": {
|
|
1323
|
-
\\"defaultValue\\": {
|
|
1324
|
-
\\"value\\": \\"{ text: 'foo', value: 'bar' }\\",
|
|
1325
|
-
\\"computed\\": false
|
|
1326
|
-
},
|
|
1327
|
-
\\"description\\": \\"\\",
|
|
1328
|
-
\\"type\\": {
|
|
1329
|
-
\\"name\\": \\"shape\\",
|
|
1330
|
-
\\"value\\": {
|
|
1331
|
-
\\"text\\": {
|
|
1332
|
-
\\"name\\": \\"string\\",
|
|
1333
|
-
\\"required\\": true
|
|
1334
|
-
},
|
|
1335
|
-
\\"value\\": {
|
|
1336
|
-
\\"name\\": \\"string\\",
|
|
1337
|
-
\\"required\\": true
|
|
1338
|
-
}
|
|
1339
|
-
}
|
|
1340
|
-
},
|
|
1341
|
-
\\"required\\": false
|
|
1342
|
-
},
|
|
1343
|
-
\\"exact\\": {
|
|
1344
|
-
\\"defaultValue\\": {
|
|
1345
|
-
\\"value\\": \\"{ name: 'foo', quantity: 2 }\\",
|
|
1346
|
-
\\"computed\\": false
|
|
1347
|
-
},
|
|
1348
|
-
\\"description\\": \\"\\",
|
|
1349
|
-
\\"type\\": {
|
|
1350
|
-
\\"name\\": \\"exact\\",
|
|
1351
|
-
\\"value\\": {
|
|
1352
|
-
\\"name\\": {
|
|
1353
|
-
\\"name\\": \\"string\\",
|
|
1354
|
-
\\"required\\": false
|
|
1355
|
-
},
|
|
1356
|
-
\\"quantity\\": {
|
|
1357
|
-
\\"name\\": \\"number\\",
|
|
1358
|
-
\\"required\\": false
|
|
1359
|
-
}
|
|
1360
|
-
}
|
|
1361
|
-
},
|
|
1362
|
-
\\"required\\": false
|
|
1363
|
-
},
|
|
1364
|
-
\\"namedExact\\": {
|
|
1365
|
-
\\"defaultValue\\": {
|
|
1366
|
-
\\"value\\": \\"{ text: 'foo', value: 'bar' }\\",
|
|
1367
|
-
\\"computed\\": false
|
|
1368
|
-
},
|
|
1369
|
-
\\"description\\": \\"\\",
|
|
1370
|
-
\\"type\\": {
|
|
1371
|
-
\\"name\\": \\"exact\\",
|
|
1372
|
-
\\"value\\": {
|
|
1373
|
-
\\"text\\": {
|
|
1374
|
-
\\"name\\": \\"string\\",
|
|
1375
|
-
\\"required\\": true
|
|
1376
|
-
},
|
|
1377
|
-
\\"value\\": {
|
|
1378
|
-
\\"name\\": \\"string\\",
|
|
1379
|
-
\\"required\\": true
|
|
1380
|
-
}
|
|
1381
|
-
}
|
|
1382
|
-
},
|
|
1383
|
-
\\"required\\": false
|
|
1384
|
-
},
|
|
1385
|
-
\\"optionalString\\": {
|
|
1386
|
-
\\"defaultValue\\": {
|
|
1387
|
-
\\"value\\": \\"'Default String'\\",
|
|
1388
|
-
\\"computed\\": false
|
|
1389
|
-
},
|
|
1390
|
-
\\"description\\": \\"test string with a comment that has\\\\ntwo identical lines\\\\ntwo identical lines\\",
|
|
1391
|
-
\\"type\\": {
|
|
1392
|
-
\\"name\\": \\"string\\"
|
|
1393
|
-
},
|
|
1394
|
-
\\"required\\": false
|
|
1395
|
-
},
|
|
1396
|
-
\\"nullDefaultValue\\": {
|
|
1397
|
-
\\"defaultValue\\": {
|
|
1398
|
-
\\"value\\": \\"null\\",
|
|
1399
|
-
\\"computed\\": false
|
|
1400
|
-
},
|
|
1401
|
-
\\"description\\": \\"\\",
|
|
1402
|
-
\\"type\\": {
|
|
1403
|
-
\\"name\\": \\"string\\"
|
|
1404
|
-
},
|
|
1405
|
-
\\"required\\": false
|
|
1406
|
-
},
|
|
1407
|
-
\\"undefinedDefaultValue\\": {
|
|
1408
|
-
\\"defaultValue\\": {
|
|
1409
|
-
\\"value\\": \\"undefined\\",
|
|
1410
|
-
\\"computed\\": true
|
|
1411
|
-
},
|
|
1412
|
-
\\"description\\": \\"\\",
|
|
1413
|
-
\\"type\\": {
|
|
1414
|
-
\\"name\\": \\"string\\"
|
|
1415
|
-
},
|
|
1416
|
-
\\"required\\": false
|
|
1417
|
-
},
|
|
1418
|
-
\\"inlineString\\": {
|
|
1419
|
-
\\"defaultValue\\": {
|
|
1420
|
-
\\"value\\": \\"'Inline prop default value'\\",
|
|
1421
|
-
\\"computed\\": false
|
|
1422
|
-
},
|
|
1423
|
-
\\"description\\": \\"Hey Hey!\\",
|
|
1424
|
-
\\"type\\": {
|
|
1425
|
-
\\"name\\": \\"string\\"
|
|
1426
|
-
},
|
|
1427
|
-
\\"required\\": false
|
|
1428
|
-
},
|
|
1429
|
-
\\"inlineBool\\": {
|
|
1430
|
-
\\"defaultValue\\": {
|
|
1431
|
-
\\"value\\": \\"true\\",
|
|
1432
|
-
\\"computed\\": false
|
|
1433
|
-
},
|
|
1434
|
-
\\"description\\": \\"\\",
|
|
1435
|
-
\\"type\\": {
|
|
1436
|
-
\\"name\\": \\"bool\\"
|
|
1437
|
-
},
|
|
1438
|
-
\\"required\\": false
|
|
1439
|
-
},
|
|
1440
|
-
\\"inlineNumber\\": {
|
|
1441
|
-
\\"defaultValue\\": {
|
|
1442
|
-
\\"value\\": \\"10\\",
|
|
1443
|
-
\\"computed\\": false
|
|
1444
|
-
},
|
|
1445
|
-
\\"description\\": \\"\\",
|
|
1446
|
-
\\"type\\": {
|
|
1447
|
-
\\"name\\": \\"number\\"
|
|
1448
|
-
},
|
|
1449
|
-
\\"required\\": false
|
|
1450
|
-
},
|
|
1451
|
-
\\"inlineObj\\": {
|
|
1452
|
-
\\"defaultValue\\": {
|
|
1453
|
-
\\"value\\": \\"{ foo: 'bar' }\\",
|
|
1454
|
-
\\"computed\\": false
|
|
1455
|
-
},
|
|
1456
|
-
\\"description\\": \\"\\",
|
|
1457
|
-
\\"type\\": {
|
|
1458
|
-
\\"name\\": \\"shape\\",
|
|
1459
|
-
\\"value\\": {
|
|
1460
|
-
\\"foo\\": {
|
|
1461
|
-
\\"name\\": \\"string\\",
|
|
1462
|
-
\\"required\\": false
|
|
1463
|
-
}
|
|
1464
|
-
}
|
|
1465
|
-
},
|
|
1466
|
-
\\"required\\": false
|
|
1467
|
-
},
|
|
1468
|
-
\\"inlineArray\\": {
|
|
1469
|
-
\\"defaultValue\\": {
|
|
1470
|
-
\\"value\\": \\"[1, 2, 3]\\",
|
|
1471
|
-
\\"computed\\": false
|
|
1472
|
-
},
|
|
1473
|
-
\\"description\\": \\"\\",
|
|
1474
|
-
\\"type\\": {
|
|
1475
|
-
\\"name\\": \\"arrayOf\\",
|
|
1476
|
-
\\"value\\": {
|
|
1477
|
-
\\"name\\": \\"number\\"
|
|
1478
|
-
}
|
|
1479
|
-
},
|
|
1480
|
-
\\"required\\": false
|
|
1481
|
-
},
|
|
1482
|
-
\\"inlineArrayOfObjects\\": {
|
|
1483
|
-
\\"defaultValue\\": {
|
|
1484
|
-
\\"value\\": \\"[\\\\n { foo: 'bar' },\\\\n { foo: 'bar' },\\\\n { foo: 'bar' },\\\\n { foo: 'bar' },\\\\n { foo: 'bar' },\\\\n]\\",
|
|
1485
|
-
\\"computed\\": false
|
|
1486
|
-
},
|
|
1487
|
-
\\"description\\": \\"\\",
|
|
1488
|
-
\\"type\\": {
|
|
1489
|
-
\\"name\\": \\"arrayOf\\",
|
|
1490
|
-
\\"value\\": {
|
|
1491
|
-
\\"name\\": \\"custom\\",
|
|
1492
|
-
\\"raw\\": \\"{ foo: PropTypes.string }\\"
|
|
1493
|
-
}
|
|
1494
|
-
},
|
|
1495
|
-
\\"required\\": false
|
|
1496
|
-
},
|
|
1497
|
-
\\"inlineFunctionalElement\\": {
|
|
1498
|
-
\\"defaultValue\\": {
|
|
1499
|
-
\\"value\\": \\"<FunctionalComponent />\\",
|
|
1500
|
-
\\"computed\\": false
|
|
1501
|
-
},
|
|
1502
|
-
\\"description\\": \\"\\",
|
|
1503
|
-
\\"type\\": {
|
|
1504
|
-
\\"name\\": \\"element\\"
|
|
1505
|
-
},
|
|
1506
|
-
\\"required\\": false
|
|
1507
|
-
},
|
|
1508
|
-
\\"inlineFunctionalElementInline\\": {
|
|
1509
|
-
\\"defaultValue\\": {
|
|
1510
|
-
\\"value\\": \\"() => {\\\\n return <div>Inlined FunctionalComponent!</div>;\\\\n}\\",
|
|
1511
|
-
\\"computed\\": false
|
|
1512
|
-
},
|
|
1513
|
-
\\"description\\": \\"\\",
|
|
1514
|
-
\\"type\\": {
|
|
1515
|
-
\\"name\\": \\"element\\"
|
|
1516
|
-
},
|
|
1517
|
-
\\"required\\": false
|
|
1518
|
-
},
|
|
1519
|
-
\\"inlineFunctionalElementInlineReturningNull\\": {
|
|
1520
|
-
\\"defaultValue\\": {
|
|
1521
|
-
\\"value\\": \\"() => {\\\\n return null;\\\\n}\\",
|
|
1522
|
-
\\"computed\\": false
|
|
1523
|
-
},
|
|
1524
|
-
\\"description\\": \\"\\",
|
|
1525
|
-
\\"type\\": {
|
|
1526
|
-
\\"name\\": \\"element\\"
|
|
1527
|
-
},
|
|
1528
|
-
\\"required\\": false
|
|
1529
|
-
},
|
|
1530
|
-
\\"inlineHtmlElement\\": {
|
|
1531
|
-
\\"defaultValue\\": {
|
|
1532
|
-
\\"value\\": \\"<div>Hey!</div>\\",
|
|
1533
|
-
\\"computed\\": false
|
|
1534
|
-
},
|
|
1535
|
-
\\"description\\": \\"\\",
|
|
1536
|
-
\\"type\\": {
|
|
1537
|
-
\\"name\\": \\"element\\"
|
|
1538
|
-
},
|
|
1539
|
-
\\"required\\": false
|
|
1540
|
-
},
|
|
1541
|
-
\\"inlineFunctionalElementInlineWithProps\\": {
|
|
1542
|
-
\\"defaultValue\\": {
|
|
1543
|
-
\\"value\\": \\"({ foo }) => {\\\\n return <div>{foo}</div>;\\\\n}\\",
|
|
1544
|
-
\\"computed\\": false
|
|
1545
|
-
},
|
|
1546
|
-
\\"description\\": \\"\\",
|
|
1547
|
-
\\"type\\": {
|
|
1548
|
-
\\"name\\": \\"element\\"
|
|
1549
|
-
},
|
|
1550
|
-
\\"required\\": false
|
|
1551
|
-
},
|
|
1552
|
-
\\"inlineFunctionalElementNamedInline\\": {
|
|
1553
|
-
\\"defaultValue\\": {
|
|
1554
|
-
\\"value\\": \\"function InlinedFunctionalComponent() {\\\\n return <div>Inlined FunctionalComponent!</div>;\\\\n}\\",
|
|
1555
|
-
\\"computed\\": false
|
|
1556
|
-
},
|
|
1557
|
-
\\"description\\": \\"\\",
|
|
1558
|
-
\\"type\\": {
|
|
1559
|
-
\\"name\\": \\"element\\"
|
|
1560
|
-
},
|
|
1561
|
-
\\"required\\": false
|
|
1562
|
-
},
|
|
1563
|
-
\\"inlineClassElement\\": {
|
|
1564
|
-
\\"defaultValue\\": {
|
|
1565
|
-
\\"value\\": \\"<ClassComponent />\\",
|
|
1566
|
-
\\"computed\\": false
|
|
1567
|
-
},
|
|
1568
|
-
\\"description\\": \\"\\",
|
|
1569
|
-
\\"type\\": {
|
|
1570
|
-
\\"name\\": \\"element\\"
|
|
1571
|
-
},
|
|
1572
|
-
\\"required\\": false
|
|
1573
|
-
},
|
|
1574
|
-
\\"inlineClassElementWithProps\\": {
|
|
1575
|
-
\\"defaultValue\\": {
|
|
1576
|
-
\\"value\\": \\"<ClassComponent className=\\\\\\"toto\\\\\\" />\\",
|
|
1577
|
-
\\"computed\\": false
|
|
1578
|
-
},
|
|
1579
|
-
\\"description\\": \\"\\",
|
|
1580
|
-
\\"type\\": {
|
|
1581
|
-
\\"name\\": \\"element\\"
|
|
1582
|
-
},
|
|
1583
|
-
\\"required\\": false
|
|
1584
|
-
},
|
|
1585
|
-
\\"inlineClassElementWithChildren\\": {
|
|
1586
|
-
\\"defaultValue\\": {
|
|
1587
|
-
\\"value\\": \\"<ClassComponent>\\\\n <div>hey!</div>\\\\n</ClassComponent>\\",
|
|
1588
|
-
\\"computed\\": false
|
|
1589
|
-
},
|
|
1590
|
-
\\"description\\": \\"\\",
|
|
1591
|
-
\\"type\\": {
|
|
1592
|
-
\\"name\\": \\"element\\"
|
|
1593
|
-
},
|
|
1594
|
-
\\"required\\": false
|
|
1595
|
-
},
|
|
1596
|
-
\\"inlineClassElementInline\\": {
|
|
1597
|
-
\\"defaultValue\\": {
|
|
1598
|
-
\\"value\\": \\"class InlinedClassComponent extends React.PureComponent {\\\\n render() {\\\\n return <div>Inlined ClassComponent!</div>;\\\\n }\\\\n}\\",
|
|
1599
|
-
\\"computed\\": false
|
|
1600
|
-
},
|
|
1601
|
-
\\"description\\": \\"\\",
|
|
1602
|
-
\\"type\\": {
|
|
1603
|
-
\\"name\\": \\"element\\"
|
|
1604
|
-
},
|
|
1605
|
-
\\"required\\": false
|
|
1606
|
-
},
|
|
1607
|
-
\\"inlineFunc\\": {
|
|
1608
|
-
\\"defaultValue\\": {
|
|
1609
|
-
\\"value\\": \\"function add(a, b) {\\\\n return a + b;\\\\n}\\",
|
|
1610
|
-
\\"computed\\": false
|
|
1611
|
-
},
|
|
1612
|
-
\\"description\\": \\"\\",
|
|
1613
|
-
\\"type\\": {
|
|
1614
|
-
\\"name\\": \\"func\\"
|
|
1615
|
-
},
|
|
1616
|
-
\\"required\\": false
|
|
1617
|
-
},
|
|
1618
|
-
\\"semiLongFuncWithJsDoc\\": {
|
|
1619
|
-
\\"description\\": \\"@param {string} foo - A foo value.\\\\n@param {number} bar - A bar value.\\\\n@param {number} bar1 - A bar value.\\\\n@param {number} bar2 - A bar value.\\\\n@param {number} bar3 - A bar value.\\\\n@param {number} bar4 - A bar value.\\\\n@param {number} bar5 - A bar value.\\\\n@returns {ComplexObject} - Returns a complex object.\\",
|
|
1620
|
-
\\"type\\": {
|
|
1621
|
-
\\"name\\": \\"func\\"
|
|
1622
|
-
},
|
|
1623
|
-
\\"required\\": false
|
|
1624
|
-
},
|
|
1625
|
-
\\"veryLongFuncWithJsDoc\\": {
|
|
1626
|
-
\\"description\\": \\"@param {string} foo - A foo value.\\\\n@param {number} bar - A bar value.\\\\n@param {number} bar1 - A bar value.\\\\n@param {number} bar2 - A bar value.\\\\n@param {number} bar3 - A bar value.\\\\n@param {number} bar4 - A bar value.\\\\n@param {number} bar5 - A bar value.\\\\n@param {number} bar6 - A bar value.\\\\n@param {number} bar7 - A bar value.\\\\n@param {number} bar8 - A bar value.\\\\n@param {number} bar9 - A bar value.\\\\n@param {number} bar10 - A bar value.\\\\n@returns {ComplexObject} - Returns a complex object.\\",
|
|
1627
|
-
\\"type\\": {
|
|
1628
|
-
\\"name\\": \\"func\\"
|
|
1629
|
-
},
|
|
1630
|
-
\\"required\\": false
|
|
1631
|
-
},
|
|
1632
|
-
\\"useCustomPropType\\": {
|
|
1633
|
-
\\"description\\": \\"\\",
|
|
1634
|
-
\\"type\\": {
|
|
1635
|
-
\\"name\\": \\"custom\\",
|
|
1636
|
-
\\"raw\\": \\"customPropType\\"
|
|
1637
|
-
},
|
|
1638
|
-
\\"required\\": false
|
|
1639
|
-
},
|
|
1640
|
-
\\"useNestedCustomPropType\\": {
|
|
1641
|
-
\\"description\\": \\"\\",
|
|
1642
|
-
\\"type\\": {
|
|
1643
|
-
\\"name\\": \\"custom\\",
|
|
1644
|
-
\\"raw\\": \\"nestedCustomPropType.custom\\"
|
|
1645
|
-
},
|
|
1646
|
-
\\"required\\": false
|
|
1647
|
-
},
|
|
1648
|
-
\\"oneOfNestedSimpleInlineObject\\": {
|
|
1649
|
-
\\"description\\": \\"\\",
|
|
1650
|
-
\\"type\\": {
|
|
1651
|
-
\\"name\\": \\"enum\\",
|
|
1652
|
-
\\"value\\": [{
|
|
1653
|
-
\\"value\\": \\"'News'\\",
|
|
1654
|
-
\\"computed\\": false
|
|
1655
|
-
}, {
|
|
1656
|
-
\\"value\\": \\"[{ foo: PropTypes.string }]\\",
|
|
1657
|
-
\\"computed\\": true
|
|
1658
|
-
}]
|
|
1659
|
-
},
|
|
1660
|
-
\\"required\\": false
|
|
1661
|
-
},
|
|
1662
|
-
\\"oneOfNestedComplexInlineObject\\": {
|
|
1663
|
-
\\"description\\": \\"\\",
|
|
1664
|
-
\\"type\\": {
|
|
1665
|
-
\\"name\\": \\"enum\\",
|
|
1666
|
-
\\"value\\": [{
|
|
1667
|
-
\\"value\\": \\"'News'\\",
|
|
1668
|
-
\\"computed\\": false
|
|
1669
|
-
}, {
|
|
1670
|
-
\\"value\\": \\"[{ nested: { foo: PropTypes.string } }]\\",
|
|
1671
|
-
\\"computed\\": true
|
|
1672
|
-
}]
|
|
1673
|
-
},
|
|
1674
|
-
\\"required\\": false
|
|
1675
|
-
},
|
|
1676
|
-
\\"oneOfNestedComplexShape\\": {
|
|
1677
|
-
\\"description\\": \\"\\",
|
|
1678
|
-
\\"type\\": {
|
|
1679
|
-
\\"name\\": \\"enum\\",
|
|
1680
|
-
\\"value\\": [{
|
|
1681
|
-
\\"value\\": \\"'News'\\",
|
|
1682
|
-
\\"computed\\": false
|
|
1683
|
-
}, {
|
|
1684
|
-
\\"value\\": \\"[{ nested: PropTypes.shape({ foo: PropTypes.string }) }]\\",
|
|
1685
|
-
\\"computed\\": true
|
|
1686
|
-
}]
|
|
1687
|
-
},
|
|
1688
|
-
\\"required\\": false
|
|
1689
|
-
},
|
|
1690
|
-
\\"arrayExternalShape\\": {
|
|
1691
|
-
\\"description\\": \\"\\",
|
|
1692
|
-
\\"type\\": {
|
|
1693
|
-
\\"name\\": \\"arrayOf\\",
|
|
1694
|
-
\\"value\\": {
|
|
1695
|
-
\\"name\\": \\"shape\\",
|
|
1696
|
-
\\"value\\": \\"import { PRESET_SHAPE, SOME_PROP_TYPES } from './ext';\\",
|
|
1697
|
-
\\"computed\\": true
|
|
1698
|
-
}
|
|
1699
|
-
},
|
|
1700
|
-
\\"required\\": false
|
|
1701
|
-
},
|
|
1702
|
-
\\"shapeLong\\": {
|
|
1703
|
-
\\"description\\": \\"\\",
|
|
1704
|
-
\\"type\\": {
|
|
1705
|
-
\\"name\\": \\"shape\\",
|
|
1706
|
-
\\"value\\": {
|
|
1707
|
-
\\"foo\\": {
|
|
1708
|
-
\\"name\\": \\"string\\",
|
|
1709
|
-
\\"required\\": false
|
|
1710
|
-
},
|
|
1711
|
-
\\"prop1\\": {
|
|
1712
|
-
\\"name\\": \\"string\\",
|
|
1713
|
-
\\"required\\": false
|
|
1714
|
-
},
|
|
1715
|
-
\\"prop2\\": {
|
|
1716
|
-
\\"name\\": \\"string\\",
|
|
1717
|
-
\\"required\\": false
|
|
1718
|
-
},
|
|
1719
|
-
\\"prop3\\": {
|
|
1720
|
-
\\"name\\": \\"string\\",
|
|
1721
|
-
\\"required\\": false
|
|
1722
|
-
},
|
|
1723
|
-
\\"prop4\\": {
|
|
1724
|
-
\\"name\\": \\"string\\",
|
|
1725
|
-
\\"required\\": false
|
|
1726
|
-
},
|
|
1727
|
-
\\"prop5\\": {
|
|
1728
|
-
\\"name\\": \\"string\\",
|
|
1729
|
-
\\"required\\": false
|
|
1730
|
-
},
|
|
1731
|
-
\\"prop6\\": {
|
|
1732
|
-
\\"name\\": \\"string\\",
|
|
1733
|
-
\\"required\\": false
|
|
1734
|
-
},
|
|
1735
|
-
\\"prop7\\": {
|
|
1736
|
-
\\"name\\": \\"string\\",
|
|
1737
|
-
\\"required\\": false
|
|
1738
|
-
}
|
|
1739
|
-
}
|
|
1740
|
-
},
|
|
1741
|
-
\\"required\\": false
|
|
1742
|
-
},
|
|
1743
|
-
\\"shapeWithArray\\": {
|
|
1744
|
-
\\"description\\": \\"\\",
|
|
1745
|
-
\\"type\\": {
|
|
1746
|
-
\\"name\\": \\"shape\\",
|
|
1747
|
-
\\"value\\": {
|
|
1748
|
-
\\"arr\\": {
|
|
1749
|
-
\\"name\\": \\"arrayOf\\",
|
|
1750
|
-
\\"value\\": {
|
|
1751
|
-
\\"name\\": \\"custom\\",
|
|
1752
|
-
\\"raw\\": \\"{ foo: PropTypes.string }\\"
|
|
1753
|
-
},
|
|
1754
|
-
\\"required\\": false
|
|
1755
|
-
}
|
|
1756
|
-
}
|
|
1757
|
-
},
|
|
1758
|
-
\\"required\\": false
|
|
1759
|
-
},
|
|
1760
|
-
\\"requiredString\\": {
|
|
1761
|
-
\\"description\\": \\"\\",
|
|
1762
|
-
\\"type\\": {
|
|
1763
|
-
\\"name\\": \\"string\\"
|
|
1764
|
-
},
|
|
1765
|
-
\\"required\\": true
|
|
1766
|
-
}
|
|
1767
|
-
},
|
|
1768
|
-
\\"composes\\": [\\"./ext\\"]
|
|
1769
|
-
};"
|
|
1770
|
-
`;
|