@storybook/react 7.0.0-alpha.7 → 7.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-LSK4KSW4.mjs +1 -0
- package/dist/config.d.ts +11 -13
- package/dist/config.js +3 -7
- package/dist/config.mjs +3 -7
- package/dist/index.d.ts +57 -37
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/types-0a347bb9.d.ts +10 -0
- package/jest.config.js +7 -0
- package/package.json +27 -22
- package/template/cli/.eslintrc.json +5 -0
- package/template/cli/js/Button.jsx +50 -0
- package/template/cli/js/Button.stories.js +39 -0
- package/template/cli/js/Header.jsx +59 -0
- package/template/cli/js/Header.stories.js +22 -0
- package/template/cli/js/Page.jsx +69 -0
- package/template/cli/js/Page.stories.js +25 -0
- package/template/cli/ts/Button.stories.ts +44 -0
- package/template/cli/ts/Button.tsx +48 -0
- package/template/cli/ts/Header.stories.ts +26 -0
- package/template/cli/ts/Header.tsx +56 -0
- package/template/cli/ts/Page.stories.ts +29 -0
- package/template/cli/ts/Page.tsx +73 -0
- package/template/cli/ts-legacy/Button.stories.ts +45 -0
- package/template/cli/ts-legacy/Button.tsx +48 -0
- package/template/cli/ts-legacy/Header.stories.ts +24 -0
- package/template/cli/ts-legacy/Header.tsx +56 -0
- package/template/cli/ts-legacy/Page.stories.ts +29 -0
- package/template/cli/ts-legacy/Page.tsx +73 -0
- package/template/components/Button.jsx +13 -0
- package/template/components/Form.jsx +36 -0
- package/template/components/Html.jsx +9 -0
- package/template/components/Pre.jsx +20 -0
- package/template/components/index.js +9 -0
- package/template/stories/decorators.stories.tsx +28 -0
- package/template/stories/docgen-components/10017-ts-union/argTypes.snapshot +36 -0
- package/template/stories/docgen-components/10017-ts-union/docgen.snapshot +34 -0
- package/template/stories/docgen-components/10017-ts-union/input.tsx +12 -0
- package/template/stories/docgen-components/10017-ts-union/properties.snapshot +32 -0
- package/template/stories/docgen-components/10278-ts-multiple-components/argTypes.snapshot +26 -0
- package/template/stories/docgen-components/10278-ts-multiple-components/docgen.snapshot +49 -0
- package/template/stories/docgen-components/10278-ts-multiple-components/input.tsx +27 -0
- package/template/stories/docgen-components/10278-ts-multiple-components/properties.snapshot +22 -0
- package/template/stories/docgen-components/8140-js-prop-types-oneof/argTypes.snapshot +127 -0
- package/template/stories/docgen-components/8140-js-prop-types-oneof/docgen.snapshot +97 -0
- package/template/stories/docgen-components/8140-js-prop-types-oneof/input.jsx +27 -0
- package/template/stories/docgen-components/8140-js-prop-types-oneof/properties.snapshot +89 -0
- package/template/stories/docgen-components/8143-ts-imported-types/argTypes.snapshot +27 -0
- package/template/stories/docgen-components/8143-ts-imported-types/docgen.snapshot +22 -0
- package/template/stories/docgen-components/8143-ts-imported-types/input.tsx +10 -0
- package/template/stories/docgen-components/8143-ts-imported-types/properties.snapshot +23 -0
- package/template/stories/docgen-components/8143-ts-imported-types/types.ts +3 -0
- package/template/stories/docgen-components/8143-ts-react-fc-generics/argTypes.snapshot +27 -0
- package/template/stories/docgen-components/8143-ts-react-fc-generics/docgen.snapshot +24 -0
- package/template/stories/docgen-components/8143-ts-react-fc-generics/input.tsx +10 -0
- package/template/stories/docgen-components/8143-ts-react-fc-generics/properties.snapshot +21 -0
- package/template/stories/docgen-components/8428-js-static-prop-types/argTypes.snapshot +25 -0
- package/template/stories/docgen-components/8428-js-static-prop-types/docgen.snapshot +39 -0
- package/template/stories/docgen-components/8428-js-static-prop-types/input.jsx +20 -0
- package/template/stories/docgen-components/8428-js-static-prop-types/properties.snapshot +21 -0
- package/template/stories/docgen-components/8740-ts-multi-props/argTypes.snapshot +27 -0
- package/template/stories/docgen-components/8740-ts-multi-props/docgen.snapshot +49 -0
- package/template/stories/docgen-components/8740-ts-multi-props/input.tsx +23 -0
- package/template/stories/docgen-components/8740-ts-multi-props/properties.snapshot +21 -0
- package/template/stories/docgen-components/8894-9511-ts-forward-ref/argTypes.snapshot +48 -0
- package/template/stories/docgen-components/8894-9511-ts-forward-ref/docgen.snapshot +39 -0
- package/template/stories/docgen-components/8894-9511-ts-forward-ref/input.tsx +31 -0
- package/template/stories/docgen-components/8894-9511-ts-forward-ref/properties.snapshot +34 -0
- package/template/stories/docgen-components/9023-js-hoc/argTypes.snapshot +89 -0
- package/template/stories/docgen-components/9023-js-hoc/docgen.snapshot +84 -0
- package/template/stories/docgen-components/9023-js-hoc/input.jsx +40 -0
- package/template/stories/docgen-components/9023-js-hoc/properties.snapshot +67 -0
- package/template/stories/docgen-components/9399-js-proptypes-shape/argTypes.snapshot +39 -0
- package/template/stories/docgen-components/9399-js-proptypes-shape/docgen.snapshot +48 -0
- package/template/stories/docgen-components/9399-js-proptypes-shape/input.jsx +16 -0
- package/template/stories/docgen-components/9399-js-proptypes-shape/properties.snapshot +35 -0
- package/template/stories/docgen-components/9465-ts-type-props/argTypes.snapshot +28 -0
- package/template/stories/docgen-components/9465-ts-type-props/docgen.snapshot +33 -0
- package/template/stories/docgen-components/9465-ts-type-props/input.tsx +12 -0
- package/template/stories/docgen-components/9465-ts-type-props/properties.snapshot +24 -0
- package/template/stories/docgen-components/9493-ts-display-name/argTypes.snapshot +62 -0
- package/template/stories/docgen-components/9493-ts-display-name/docgen.snapshot +50 -0
- package/template/stories/docgen-components/9493-ts-display-name/input.tsx +30 -0
- package/template/stories/docgen-components/9493-ts-display-name/properties.snapshot +52 -0
- package/template/stories/docgen-components/9556-ts-react-default-exports/argTypes.snapshot +28 -0
- package/template/stories/docgen-components/9556-ts-react-default-exports/docgen.snapshot +32 -0
- package/template/stories/docgen-components/9556-ts-react-default-exports/input.tsx +12 -0
- package/template/stories/docgen-components/9556-ts-react-default-exports/properties.snapshot +24 -0
- package/template/stories/docgen-components/9575-ts-camel-case/argTypes.snapshot +28 -0
- package/template/stories/docgen-components/9575-ts-camel-case/docgen.snapshot +38 -0
- package/template/stories/docgen-components/9575-ts-camel-case/input.tsx +26 -0
- package/template/stories/docgen-components/9575-ts-camel-case/properties.snapshot +24 -0
- package/template/stories/docgen-components/9586-js-react-memo/argTypes.snapshot +41 -0
- package/template/stories/docgen-components/9586-js-react-memo/docgen.snapshot +42 -0
- package/template/stories/docgen-components/9586-js-react-memo/input.jsx +15 -0
- package/template/stories/docgen-components/9586-js-react-memo/properties.snapshot +34 -0
- package/template/stories/docgen-components/9591-ts-import-types/Bar.tsx +3 -0
- package/template/stories/docgen-components/9591-ts-import-types/argTypes.snapshot +25 -0
- package/template/stories/docgen-components/9591-ts-import-types/docgen.snapshot +21 -0
- package/template/stories/docgen-components/9591-ts-import-types/input.tsx +10 -0
- package/template/stories/docgen-components/9591-ts-import-types/properties.snapshot +21 -0
- package/template/stories/docgen-components/9626-js-default-values/argTypes.snapshot +27 -0
- package/template/stories/docgen-components/9626-js-default-values/docgen.snapshot +25 -0
- package/template/stories/docgen-components/9626-js-default-values/input.jsx +5 -0
- package/template/stories/docgen-components/9626-js-default-values/properties.snapshot +21 -0
- package/template/stories/docgen-components/9668-js-proptypes-no-jsdoc/argTypes.snapshot +42 -0
- package/template/stories/docgen-components/9668-js-proptypes-no-jsdoc/docgen.snapshot +36 -0
- package/template/stories/docgen-components/9668-js-proptypes-no-jsdoc/input.jsx +13 -0
- package/template/stories/docgen-components/9668-js-proptypes-no-jsdoc/properties.snapshot +35 -0
- package/template/stories/docgen-components/9721-ts-deprecated-jsdoc/argTypes.snapshot +53 -0
- package/template/stories/docgen-components/9721-ts-deprecated-jsdoc/docgen.snapshot +45 -0
- package/template/stories/docgen-components/9721-ts-deprecated-jsdoc/input.tsx +18 -0
- package/template/stories/docgen-components/9721-ts-deprecated-jsdoc/properties.snapshot +43 -0
- package/template/stories/docgen-components/9764-ts-extend-props/argTypes.snapshot +72 -0
- package/template/stories/docgen-components/9764-ts-extend-props/docgen.snapshot +41 -0
- package/template/stories/docgen-components/9764-ts-extend-props/input.tsx +17 -0
- package/template/stories/docgen-components/9764-ts-extend-props/properties.snapshot +56 -0
- package/template/stories/docgen-components/9827-ts-default-values/argTypes.snapshot +72 -0
- package/template/stories/docgen-components/9827-ts-default-values/docgen.snapshot +52 -0
- package/template/stories/docgen-components/9827-ts-default-values/input.tsx +17 -0
- package/template/stories/docgen-components/9827-ts-default-values/properties.snapshot +56 -0
- package/template/stories/docgen-components/9832-ts-enum-export/argTypes.snapshot +3 -0
- package/template/stories/docgen-components/9832-ts-enum-export/docgen.snapshot +16 -0
- package/template/stories/docgen-components/9832-ts-enum-export/input.tsx +8 -0
- package/template/stories/docgen-components/9832-ts-enum-export/properties.snapshot +7 -0
- package/template/stories/docgen-components/9922-ts-component-props/argTypes.snapshot +25 -0
- package/template/stories/docgen-components/9922-ts-component-props/docgen.snapshot +35 -0
- package/template/stories/docgen-components/9922-ts-component-props/input.tsx +24 -0
- package/template/stories/docgen-components/9922-ts-component-props/properties.snapshot +21 -0
- package/template/stories/docgen-components/imported.js +1 -0
- package/template/stories/docgen-components/js-class-component/argTypes.snapshot +386 -0
- package/template/stories/docgen-components/js-class-component/docgen.snapshot +252 -0
- package/template/stories/docgen-components/js-class-component/input.jsx +57 -0
- package/template/stories/docgen-components/js-class-component/properties.snapshot +286 -0
- package/template/stories/docgen-components/js-function-component/argTypes.snapshot +386 -0
- package/template/stories/docgen-components/js-function-component/docgen.snapshot +236 -0
- package/template/stories/docgen-components/js-function-component/input.jsx +50 -0
- package/template/stories/docgen-components/js-function-component/properties.snapshot +286 -0
- package/template/stories/docgen-components/js-function-component-inline-defaults/argTypes.snapshot +386 -0
- package/template/stories/docgen-components/js-function-component-inline-defaults/docgen.snapshot +247 -0
- package/template/stories/docgen-components/js-function-component-inline-defaults/input.jsx +65 -0
- package/template/stories/docgen-components/js-function-component-inline-defaults/properties.snapshot +286 -0
- package/template/stories/docgen-components/js-function-component-inline-defaults-no-propTypes/argTypes.snapshot +237 -0
- package/template/stories/docgen-components/js-function-component-inline-defaults-no-propTypes/docgen.snapshot +124 -0
- package/template/stories/docgen-components/js-function-component-inline-defaults-no-propTypes/input.jsx +41 -0
- package/template/stories/docgen-components/js-function-component-inline-defaults-no-propTypes/properties.snapshot +151 -0
- package/template/stories/docgen-components/js-proptypes/docgen.snapshot +1770 -0
- package/template/stories/docgen-components/js-proptypes/ext.js +13 -0
- package/template/stories/docgen-components/js-proptypes/input.jsx +497 -0
- package/template/stories/docgen-components/jsdoc/argTypes.snapshot +969 -0
- package/template/stories/docgen-components/jsdoc/docgen.snapshot +548 -0
- package/template/stories/docgen-components/jsdoc/input.jsx +231 -0
- package/template/stories/docgen-components/jsdoc/properties.snapshot +857 -0
- package/template/stories/docgen-components/ts-function-component/argTypes.snapshot +396 -0
- package/template/stories/docgen-components/ts-function-component/docgen.snapshot +241 -0
- package/template/stories/docgen-components/ts-function-component/input.tsx +52 -0
- package/template/stories/docgen-components/ts-function-component/properties.snapshot +296 -0
- package/template/stories/docgen-components/ts-function-component-inline-defaults/argTypes.snapshot +279 -0
- package/template/stories/docgen-components/ts-function-component-inline-defaults/docgen.snapshot +151 -0
- package/template/stories/docgen-components/ts-function-component-inline-defaults/input.tsx +80 -0
- package/template/stories/docgen-components/ts-function-component-inline-defaults/properties.snapshot +177 -0
- package/template/stories/docgen-components/ts-html/argTypes.snapshot +3 -0
- package/template/stories/docgen-components/ts-html/docgen.snapshot +12 -0
- package/template/stories/docgen-components/ts-html/input.tsx +12 -0
- package/template/stories/docgen-components/ts-html/properties.snapshot +7 -0
- package/template/stories/docgen-components/ts-jsdoc/argTypes.snapshot +3 -0
- package/template/stories/docgen-components/ts-jsdoc/docgen.snapshot +21 -0
- package/template/stories/docgen-components/ts-jsdoc/input.tsx +27 -0
- package/template/stories/docgen-components/ts-jsdoc/properties.snapshot +7 -0
- package/template/stories/docgen-components/ts-types/argTypes.snapshot +656 -0
- package/template/stories/docgen-components/ts-types/docgen.snapshot +317 -0
- package/template/stories/docgen-components/ts-types/input.tsx +130 -0
- package/template/stories/docgen-components/ts-types/properties.snapshot +410 -0
- package/template/stories/errors.stories.tsx +37 -0
- package/template/stories/hooks.stories.tsx +17 -0
- package/template/stories/js-argtypes.stories.jsx +91 -0
- package/template/stories/react-mdx.stories.mdx +26 -0
- package/template/stories/ts-argtypes.stories.tsx +81 -0
- package/LICENSE +0 -21
- package/dist/chunk-DGYCFUMN.mjs +0 -1
- package/dist/types-9f8d440a.d.ts +0 -17
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`react component properties 8140-js-prop-types-oneof 1`] = `
|
|
4
|
+
Object {
|
|
5
|
+
"blank": Object {
|
|
6
|
+
"control": Object {
|
|
7
|
+
"type": "boolean",
|
|
8
|
+
},
|
|
9
|
+
"description": "No background or border if static alert",
|
|
10
|
+
"name": "blank",
|
|
11
|
+
"table": Object {
|
|
12
|
+
"defaultValue": null,
|
|
13
|
+
"jsDocTags": undefined,
|
|
14
|
+
"type": Object {
|
|
15
|
+
"detail": undefined,
|
|
16
|
+
"summary": "bool",
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
"type": Object {
|
|
20
|
+
"name": "boolean",
|
|
21
|
+
"required": false,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
"icon": Object {
|
|
25
|
+
"control": Object {
|
|
26
|
+
"type": "text",
|
|
27
|
+
},
|
|
28
|
+
"description": "Allows icon override, accepts material icon name",
|
|
29
|
+
"name": "icon",
|
|
30
|
+
"table": Object {
|
|
31
|
+
"defaultValue": null,
|
|
32
|
+
"jsDocTags": undefined,
|
|
33
|
+
"type": Object {
|
|
34
|
+
"detail": undefined,
|
|
35
|
+
"summary": "string",
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
"type": Object {
|
|
39
|
+
"name": "string",
|
|
40
|
+
"required": false,
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
"message": Object {
|
|
44
|
+
"control": Object {
|
|
45
|
+
"type": "text",
|
|
46
|
+
},
|
|
47
|
+
"description": "",
|
|
48
|
+
"name": "message",
|
|
49
|
+
"table": Object {
|
|
50
|
+
"defaultValue": null,
|
|
51
|
+
"jsDocTags": undefined,
|
|
52
|
+
"type": Object {
|
|
53
|
+
"detail": undefined,
|
|
54
|
+
"summary": "string",
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
"type": Object {
|
|
58
|
+
"name": "string",
|
|
59
|
+
"required": true,
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
"mode": Object {
|
|
63
|
+
"control": Object {
|
|
64
|
+
"type": "radio",
|
|
65
|
+
},
|
|
66
|
+
"description": "",
|
|
67
|
+
"name": "mode",
|
|
68
|
+
"options": Array [
|
|
69
|
+
"static",
|
|
70
|
+
"timed",
|
|
71
|
+
],
|
|
72
|
+
"table": Object {
|
|
73
|
+
"defaultValue": Object {
|
|
74
|
+
"detail": undefined,
|
|
75
|
+
"summary": "'static'",
|
|
76
|
+
},
|
|
77
|
+
"jsDocTags": undefined,
|
|
78
|
+
"type": Object {
|
|
79
|
+
"detail": undefined,
|
|
80
|
+
"summary": "'static' | 'timed'",
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
"type": Object {
|
|
84
|
+
"name": "enum",
|
|
85
|
+
"required": false,
|
|
86
|
+
"value": Array [
|
|
87
|
+
"static",
|
|
88
|
+
"timed",
|
|
89
|
+
],
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
"type": Object {
|
|
93
|
+
"control": Object {
|
|
94
|
+
"type": "radio",
|
|
95
|
+
},
|
|
96
|
+
"description": "",
|
|
97
|
+
"name": "type",
|
|
98
|
+
"options": Array [
|
|
99
|
+
"success",
|
|
100
|
+
"warning",
|
|
101
|
+
"error",
|
|
102
|
+
"primary",
|
|
103
|
+
],
|
|
104
|
+
"table": Object {
|
|
105
|
+
"defaultValue": Object {
|
|
106
|
+
"detail": undefined,
|
|
107
|
+
"summary": "'warning'",
|
|
108
|
+
},
|
|
109
|
+
"jsDocTags": undefined,
|
|
110
|
+
"type": Object {
|
|
111
|
+
"detail": undefined,
|
|
112
|
+
"summary": "'success' | 'warning' | 'error' | 'primary'",
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
"type": Object {
|
|
116
|
+
"name": "enum",
|
|
117
|
+
"required": false,
|
|
118
|
+
"value": Array [
|
|
119
|
+
"success",
|
|
120
|
+
"warning",
|
|
121
|
+
"error",
|
|
122
|
+
"primary",
|
|
123
|
+
],
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
}
|
|
127
|
+
`;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`react component properties 8140-js-prop-types-oneof 1`] = `
|
|
4
|
+
"/* eslint-disable react/require-default-props */
|
|
5
|
+
/* eslint-disable react/no-unused-prop-types */
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import PropTypes from 'prop-types';
|
|
8
|
+
const Alert = props => /*#__PURE__*/React.createElement(React.Fragment, null, JSON.stringify(props));
|
|
9
|
+
Alert.defaultProps = {
|
|
10
|
+
mode: 'static',
|
|
11
|
+
type: 'warning'
|
|
12
|
+
};
|
|
13
|
+
Alert.propTypes = {
|
|
14
|
+
mode: PropTypes.oneOf(['static', 'timed']),
|
|
15
|
+
type: PropTypes.oneOf(['success', 'warning', 'error', 'primary']),
|
|
16
|
+
message: PropTypes.string.isRequired,
|
|
17
|
+
/**
|
|
18
|
+
* No background or border if static alert
|
|
19
|
+
*/
|
|
20
|
+
blank: PropTypes.bool,
|
|
21
|
+
/**
|
|
22
|
+
* Allows icon override, accepts material icon name
|
|
23
|
+
*/
|
|
24
|
+
icon: PropTypes.string
|
|
25
|
+
};
|
|
26
|
+
export const component = Alert;
|
|
27
|
+
Alert.__docgenInfo = {
|
|
28
|
+
\\"description\\": \\"\\",
|
|
29
|
+
\\"methods\\": [],
|
|
30
|
+
\\"displayName\\": \\"Alert\\",
|
|
31
|
+
\\"props\\": {
|
|
32
|
+
\\"mode\\": {
|
|
33
|
+
\\"defaultValue\\": {
|
|
34
|
+
\\"value\\": \\"'static'\\",
|
|
35
|
+
\\"computed\\": false
|
|
36
|
+
},
|
|
37
|
+
\\"description\\": \\"\\",
|
|
38
|
+
\\"type\\": {
|
|
39
|
+
\\"name\\": \\"enum\\",
|
|
40
|
+
\\"value\\": [{
|
|
41
|
+
\\"value\\": \\"'static'\\",
|
|
42
|
+
\\"computed\\": false
|
|
43
|
+
}, {
|
|
44
|
+
\\"value\\": \\"'timed'\\",
|
|
45
|
+
\\"computed\\": false
|
|
46
|
+
}]
|
|
47
|
+
},
|
|
48
|
+
\\"required\\": false
|
|
49
|
+
},
|
|
50
|
+
\\"type\\": {
|
|
51
|
+
\\"defaultValue\\": {
|
|
52
|
+
\\"value\\": \\"'warning'\\",
|
|
53
|
+
\\"computed\\": false
|
|
54
|
+
},
|
|
55
|
+
\\"description\\": \\"\\",
|
|
56
|
+
\\"type\\": {
|
|
57
|
+
\\"name\\": \\"enum\\",
|
|
58
|
+
\\"value\\": [{
|
|
59
|
+
\\"value\\": \\"'success'\\",
|
|
60
|
+
\\"computed\\": false
|
|
61
|
+
}, {
|
|
62
|
+
\\"value\\": \\"'warning'\\",
|
|
63
|
+
\\"computed\\": false
|
|
64
|
+
}, {
|
|
65
|
+
\\"value\\": \\"'error'\\",
|
|
66
|
+
\\"computed\\": false
|
|
67
|
+
}, {
|
|
68
|
+
\\"value\\": \\"'primary'\\",
|
|
69
|
+
\\"computed\\": false
|
|
70
|
+
}]
|
|
71
|
+
},
|
|
72
|
+
\\"required\\": false
|
|
73
|
+
},
|
|
74
|
+
\\"message\\": {
|
|
75
|
+
\\"description\\": \\"\\",
|
|
76
|
+
\\"type\\": {
|
|
77
|
+
\\"name\\": \\"string\\"
|
|
78
|
+
},
|
|
79
|
+
\\"required\\": true
|
|
80
|
+
},
|
|
81
|
+
\\"blank\\": {
|
|
82
|
+
\\"description\\": \\"No background or border if static alert\\",
|
|
83
|
+
\\"type\\": {
|
|
84
|
+
\\"name\\": \\"bool\\"
|
|
85
|
+
},
|
|
86
|
+
\\"required\\": false
|
|
87
|
+
},
|
|
88
|
+
\\"icon\\": {
|
|
89
|
+
\\"description\\": \\"Allows icon override, accepts material icon name\\",
|
|
90
|
+
\\"type\\": {
|
|
91
|
+
\\"name\\": \\"string\\"
|
|
92
|
+
},
|
|
93
|
+
\\"required\\": false
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
};"
|
|
97
|
+
`;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/* eslint-disable react/require-default-props */
|
|
2
|
+
/* eslint-disable react/no-unused-prop-types */
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
|
|
6
|
+
const Alert = (props) => <>{JSON.stringify(props)}</>;
|
|
7
|
+
|
|
8
|
+
Alert.defaultProps = {
|
|
9
|
+
mode: 'static',
|
|
10
|
+
type: 'warning',
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
Alert.propTypes = {
|
|
14
|
+
mode: PropTypes.oneOf(['static', 'timed']),
|
|
15
|
+
type: PropTypes.oneOf(['success', 'warning', 'error', 'primary']),
|
|
16
|
+
message: PropTypes.string.isRequired,
|
|
17
|
+
/**
|
|
18
|
+
* No background or border if static alert
|
|
19
|
+
*/
|
|
20
|
+
blank: PropTypes.bool,
|
|
21
|
+
/**
|
|
22
|
+
* Allows icon override, accepts material icon name
|
|
23
|
+
*/
|
|
24
|
+
icon: PropTypes.string,
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export const component = Alert;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`react component properties 8140-js-prop-types-oneof 1`] = `
|
|
4
|
+
Object {
|
|
5
|
+
"rows": Array [
|
|
6
|
+
Object {
|
|
7
|
+
"defaultValue": Object {
|
|
8
|
+
"detail": undefined,
|
|
9
|
+
"summary": "'static'",
|
|
10
|
+
},
|
|
11
|
+
"description": "",
|
|
12
|
+
"name": "mode",
|
|
13
|
+
"required": false,
|
|
14
|
+
"sbType": Object {
|
|
15
|
+
"name": "enum",
|
|
16
|
+
"value": Array [
|
|
17
|
+
"static",
|
|
18
|
+
"timed",
|
|
19
|
+
],
|
|
20
|
+
},
|
|
21
|
+
"type": Object {
|
|
22
|
+
"detail": undefined,
|
|
23
|
+
"summary": "'static' | 'timed'",
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
Object {
|
|
27
|
+
"defaultValue": Object {
|
|
28
|
+
"detail": undefined,
|
|
29
|
+
"summary": "'warning'",
|
|
30
|
+
},
|
|
31
|
+
"description": "",
|
|
32
|
+
"name": "type",
|
|
33
|
+
"required": false,
|
|
34
|
+
"sbType": Object {
|
|
35
|
+
"name": "enum",
|
|
36
|
+
"value": Array [
|
|
37
|
+
"success",
|
|
38
|
+
"warning",
|
|
39
|
+
"error",
|
|
40
|
+
"primary",
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
"type": Object {
|
|
44
|
+
"detail": undefined,
|
|
45
|
+
"summary": "'success' | 'warning' | 'error' | 'primary'",
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
Object {
|
|
49
|
+
"defaultValue": null,
|
|
50
|
+
"description": "",
|
|
51
|
+
"name": "message",
|
|
52
|
+
"required": true,
|
|
53
|
+
"sbType": Object {
|
|
54
|
+
"name": "string",
|
|
55
|
+
},
|
|
56
|
+
"type": Object {
|
|
57
|
+
"detail": undefined,
|
|
58
|
+
"summary": "string",
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
Object {
|
|
62
|
+
"defaultValue": null,
|
|
63
|
+
"description": "No background or border if static alert",
|
|
64
|
+
"name": "blank",
|
|
65
|
+
"required": false,
|
|
66
|
+
"sbType": Object {
|
|
67
|
+
"name": "boolean",
|
|
68
|
+
},
|
|
69
|
+
"type": Object {
|
|
70
|
+
"detail": undefined,
|
|
71
|
+
"summary": "bool",
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
Object {
|
|
75
|
+
"defaultValue": null,
|
|
76
|
+
"description": "Allows icon override, accepts material icon name",
|
|
77
|
+
"name": "icon",
|
|
78
|
+
"required": false,
|
|
79
|
+
"sbType": Object {
|
|
80
|
+
"name": "string",
|
|
81
|
+
},
|
|
82
|
+
"type": Object {
|
|
83
|
+
"detail": undefined,
|
|
84
|
+
"summary": "string",
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
}
|
|
89
|
+
`;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`react component properties 8143-ts-imported-types 1`] = `
|
|
4
|
+
Object {
|
|
5
|
+
"bar": Object {
|
|
6
|
+
"control": Object {
|
|
7
|
+
"type": "object",
|
|
8
|
+
},
|
|
9
|
+
"description": "",
|
|
10
|
+
"name": "bar",
|
|
11
|
+
"table": Object {
|
|
12
|
+
"defaultValue": null,
|
|
13
|
+
"jsDocTags": undefined,
|
|
14
|
+
"type": Object {
|
|
15
|
+
"detail": undefined,
|
|
16
|
+
"summary": "Foo['bar']",
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
"type": Object {
|
|
20
|
+
"name": "other",
|
|
21
|
+
"raw": "Foo['bar']",
|
|
22
|
+
"required": true,
|
|
23
|
+
"value": "Foo['bar']",
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
}
|
|
27
|
+
`;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`react component properties 8143-ts-imported-types 1`] = `
|
|
4
|
+
"import React from 'react';
|
|
5
|
+
export const FooComponent = foo => /*#__PURE__*/React.createElement(React.Fragment, null, JSON.stringify(foo));
|
|
6
|
+
export const component = FooComponent;
|
|
7
|
+
FooComponent.__docgenInfo = {
|
|
8
|
+
\\"description\\": \\"\\",
|
|
9
|
+
\\"methods\\": [],
|
|
10
|
+
\\"displayName\\": \\"FooComponent\\",
|
|
11
|
+
\\"props\\": {
|
|
12
|
+
\\"bar\\": {
|
|
13
|
+
\\"required\\": true,
|
|
14
|
+
\\"tsType\\": {
|
|
15
|
+
\\"name\\": \\"Foo['bar']\\",
|
|
16
|
+
\\"raw\\": \\"Foo['bar']\\"
|
|
17
|
+
},
|
|
18
|
+
\\"description\\": \\"\\"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
};"
|
|
22
|
+
`;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`react component properties 8143-ts-imported-types 1`] = `
|
|
4
|
+
Object {
|
|
5
|
+
"rows": Array [
|
|
6
|
+
Object {
|
|
7
|
+
"defaultValue": null,
|
|
8
|
+
"description": "",
|
|
9
|
+
"name": "bar",
|
|
10
|
+
"required": true,
|
|
11
|
+
"sbType": Object {
|
|
12
|
+
"name": "other",
|
|
13
|
+
"raw": "Foo['bar']",
|
|
14
|
+
"value": "Foo['bar']",
|
|
15
|
+
},
|
|
16
|
+
"type": Object {
|
|
17
|
+
"detail": undefined,
|
|
18
|
+
"summary": "Foo['bar']",
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
}
|
|
23
|
+
`;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`react component properties 8143-ts-react-fc-generics 1`] = `
|
|
4
|
+
Object {
|
|
5
|
+
"padding": Object {
|
|
6
|
+
"control": Object {
|
|
7
|
+
"type": "object",
|
|
8
|
+
},
|
|
9
|
+
"description": undefined,
|
|
10
|
+
"name": "padding",
|
|
11
|
+
"table": Object {
|
|
12
|
+
"defaultValue": Object {
|
|
13
|
+
"detail": undefined,
|
|
14
|
+
"summary": "'0'",
|
|
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,24 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`react component properties 8143-ts-react-fc-generics 1`] = `
|
|
4
|
+
"import React from 'react';
|
|
5
|
+
export const Text = ({
|
|
6
|
+
padding = '0',
|
|
7
|
+
margin
|
|
8
|
+
}) => /*#__PURE__*/React.createElement(React.Fragment, null, \\"Text\\");
|
|
9
|
+
export const component = Text;
|
|
10
|
+
Text.__docgenInfo = {
|
|
11
|
+
\\"description\\": \\"\\",
|
|
12
|
+
\\"methods\\": [],
|
|
13
|
+
\\"displayName\\": \\"Text\\",
|
|
14
|
+
\\"props\\": {
|
|
15
|
+
\\"padding\\": {
|
|
16
|
+
\\"defaultValue\\": {
|
|
17
|
+
\\"value\\": \\"'0'\\",
|
|
18
|
+
\\"computed\\": false
|
|
19
|
+
},
|
|
20
|
+
\\"required\\": false
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
};"
|
|
24
|
+
`;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`react component properties 8143-ts-react-fc-generics 1`] = `
|
|
4
|
+
Object {
|
|
5
|
+
"rows": Array [
|
|
6
|
+
Object {
|
|
7
|
+
"defaultValue": Object {
|
|
8
|
+
"detail": undefined,
|
|
9
|
+
"summary": "'0'",
|
|
10
|
+
},
|
|
11
|
+
"description": undefined,
|
|
12
|
+
"name": "padding",
|
|
13
|
+
"required": false,
|
|
14
|
+
"type": Object {
|
|
15
|
+
"detail": undefined,
|
|
16
|
+
"summary": "unknown",
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
}
|
|
21
|
+
`;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`react component properties 8428-js-static-prop-types 1`] = `
|
|
4
|
+
Object {
|
|
5
|
+
"test": Object {
|
|
6
|
+
"control": Object {
|
|
7
|
+
"type": "text",
|
|
8
|
+
},
|
|
9
|
+
"description": "Please work...",
|
|
10
|
+
"name": "test",
|
|
11
|
+
"table": Object {
|
|
12
|
+
"defaultValue": null,
|
|
13
|
+
"jsDocTags": undefined,
|
|
14
|
+
"type": Object {
|
|
15
|
+
"detail": undefined,
|
|
16
|
+
"summary": "string",
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
"type": Object {
|
|
20
|
+
"name": "string",
|
|
21
|
+
"required": false,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
}
|
|
25
|
+
`;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`react component properties 8428-js-static-prop-types 1`] = `
|
|
4
|
+
"function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, \\"string\\"); return typeof key === \\"symbol\\" ? key : String(key); }
|
|
6
|
+
function _toPrimitive(input, hint) { if (typeof input !== \\"object\\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \\"default\\"); if (typeof res !== \\"object\\") return res; throw new TypeError(\\"@@toPrimitive must return a primitive value.\\"); } return (hint === \\"string\\" ? String : Number)(input); }
|
|
7
|
+
/* eslint-disable react/no-unused-prop-types */
|
|
8
|
+
/* eslint-disable react/require-default-props */
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import PropTypes from 'prop-types';
|
|
11
|
+
|
|
12
|
+
// eslint-disable-next-line react/prefer-stateless-function
|
|
13
|
+
export default class Test extends React.Component {
|
|
14
|
+
render() {
|
|
15
|
+
return /*#__PURE__*/React.createElement(\\"div\\", null, \\"test\\");
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
_defineProperty(Test, \\"propTypes\\", {
|
|
19
|
+
/**
|
|
20
|
+
* Please work...
|
|
21
|
+
*/
|
|
22
|
+
test: PropTypes.string
|
|
23
|
+
});
|
|
24
|
+
export const component = Test;
|
|
25
|
+
Test.__docgenInfo = {
|
|
26
|
+
\\"description\\": \\"\\",
|
|
27
|
+
\\"methods\\": [],
|
|
28
|
+
\\"displayName\\": \\"Test\\",
|
|
29
|
+
\\"props\\": {
|
|
30
|
+
\\"test\\": {
|
|
31
|
+
\\"description\\": \\"Please work...\\",
|
|
32
|
+
\\"type\\": {
|
|
33
|
+
\\"name\\": \\"string\\"
|
|
34
|
+
},
|
|
35
|
+
\\"required\\": false
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
};"
|
|
39
|
+
`;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/* eslint-disable react/no-unused-prop-types */
|
|
2
|
+
/* eslint-disable react/require-default-props */
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
|
|
6
|
+
// eslint-disable-next-line react/prefer-stateless-function
|
|
7
|
+
export default class Test extends React.Component {
|
|
8
|
+
static propTypes = {
|
|
9
|
+
/**
|
|
10
|
+
* Please work...
|
|
11
|
+
*/
|
|
12
|
+
test: PropTypes.string,
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
render() {
|
|
16
|
+
return <div>test</div>;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const component = Test;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`react component properties 8428-js-static-prop-types 1`] = `
|
|
4
|
+
Object {
|
|
5
|
+
"rows": Array [
|
|
6
|
+
Object {
|
|
7
|
+
"defaultValue": null,
|
|
8
|
+
"description": "Please work...",
|
|
9
|
+
"name": "test",
|
|
10
|
+
"required": false,
|
|
11
|
+
"sbType": Object {
|
|
12
|
+
"name": "string",
|
|
13
|
+
},
|
|
14
|
+
"type": Object {
|
|
15
|
+
"detail": undefined,
|
|
16
|
+
"summary": "string",
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
}
|
|
21
|
+
`;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`react component properties 8740-ts-multi-props 1`] = `
|
|
4
|
+
Object {
|
|
5
|
+
"size": Object {
|
|
6
|
+
"control": Object {
|
|
7
|
+
"type": "object",
|
|
8
|
+
},
|
|
9
|
+
"description": undefined,
|
|
10
|
+
"name": "size",
|
|
11
|
+
"table": Object {
|
|
12
|
+
"defaultValue": Object {
|
|
13
|
+
"detail": undefined,
|
|
14
|
+
"summary": "'a'",
|
|
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
|
+
`;
|