@panneau/forms 1.0.2-alpha.0 → 1.0.3-alpha.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/es/index.js +37 -3
- package/lib/index.js +45 -18
- package/package.json +32 -32
package/es/index.js
CHANGED
|
@@ -1,3 +1,37 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { ComponentsProvider, FORMS_NAMESPACE } from '@panneau/core/contexts';
|
|
4
|
+
import formHorizontal from '@panneau/form-horizontal';
|
|
5
|
+
import formInline from '@panneau/form-inline';
|
|
6
|
+
import formNormal from '@panneau/form-normal';
|
|
7
|
+
import formTwoPane from '@panneau/form-two-pane';
|
|
8
|
+
|
|
9
|
+
// Import forms
|
|
10
|
+
|
|
11
|
+
var components = /*#__PURE__*/Object.freeze({
|
|
12
|
+
__proto__: null,
|
|
13
|
+
Horizontal: formHorizontal,
|
|
14
|
+
Inline: formInline,
|
|
15
|
+
Normal: formNormal,
|
|
16
|
+
TwoPane: formTwoPane
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
/* eslint-disable react/jsx-props-no-spreading */
|
|
20
|
+
var propTypes = {
|
|
21
|
+
children: PropTypes.node
|
|
22
|
+
};
|
|
23
|
+
var defaultProps = {
|
|
24
|
+
children: null
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
var FormsProvider = function FormsProvider(props) {
|
|
28
|
+
return /*#__PURE__*/React.createElement(ComponentsProvider, Object.assign({
|
|
29
|
+
namespace: FORMS_NAMESPACE,
|
|
30
|
+
components: components
|
|
31
|
+
}, props));
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
FormsProvider.propTypes = propTypes;
|
|
35
|
+
FormsProvider.defaultProps = defaultProps;
|
|
36
|
+
|
|
37
|
+
export { FormsProvider as default };
|
package/lib/index.js
CHANGED
|
@@ -1,23 +1,50 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var PropTypes = require('prop-types');
|
|
7
|
+
var contexts = require('@panneau/core/contexts');
|
|
8
|
+
var formHorizontal = require('@panneau/form-horizontal');
|
|
9
|
+
var formInline = require('@panneau/form-inline');
|
|
10
|
+
var formNormal = require('@panneau/form-normal');
|
|
11
|
+
var formTwoPane = require('@panneau/form-two-pane');
|
|
12
|
+
|
|
13
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
14
|
+
|
|
15
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
16
|
+
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
17
|
+
var formHorizontal__default = /*#__PURE__*/_interopDefaultLegacy(formHorizontal);
|
|
18
|
+
var formInline__default = /*#__PURE__*/_interopDefaultLegacy(formInline);
|
|
19
|
+
var formNormal__default = /*#__PURE__*/_interopDefaultLegacy(formNormal);
|
|
20
|
+
var formTwoPane__default = /*#__PURE__*/_interopDefaultLegacy(formTwoPane);
|
|
21
|
+
|
|
22
|
+
// Import forms
|
|
23
|
+
|
|
24
|
+
var components = /*#__PURE__*/Object.freeze({
|
|
25
|
+
__proto__: null,
|
|
26
|
+
Horizontal: formHorizontal__default["default"],
|
|
27
|
+
Inline: formInline__default["default"],
|
|
28
|
+
Normal: formNormal__default["default"],
|
|
29
|
+
TwoPane: formTwoPane__default["default"]
|
|
19
30
|
});
|
|
20
31
|
|
|
21
|
-
|
|
32
|
+
/* eslint-disable react/jsx-props-no-spreading */
|
|
33
|
+
var propTypes = {
|
|
34
|
+
children: PropTypes__default["default"].node
|
|
35
|
+
};
|
|
36
|
+
var defaultProps = {
|
|
37
|
+
children: null
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
var FormsProvider = function FormsProvider(props) {
|
|
41
|
+
return /*#__PURE__*/React__default["default"].createElement(contexts.ComponentsProvider, Object.assign({
|
|
42
|
+
namespace: contexts.FORMS_NAMESPACE,
|
|
43
|
+
components: components
|
|
44
|
+
}, props));
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
FormsProvider.propTypes = propTypes;
|
|
48
|
+
FormsProvider.defaultProps = defaultProps;
|
|
22
49
|
|
|
23
|
-
|
|
50
|
+
exports["default"] = FormsProvider;
|
package/package.json
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/forms",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.0.3-alpha.0",
|
|
4
|
+
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
|
-
"
|
|
7
|
-
"javascript",
|
|
8
|
-
"form",
|
|
9
|
-
"dashboard"
|
|
6
|
+
"javascript"
|
|
10
7
|
],
|
|
11
|
-
"homepage": "https://github.com/folkloreinc/panneau-js
|
|
8
|
+
"homepage": "https://github.com/folkloreinc/panneau-js",
|
|
12
9
|
"repository": {
|
|
13
10
|
"type": "git",
|
|
14
11
|
"url": "git+https://github.com/folkloreinc/panneau-js.git"
|
|
@@ -25,43 +22,46 @@
|
|
|
25
22
|
{
|
|
26
23
|
"name": "Nicolas Roy-Bourdages",
|
|
27
24
|
"email": "nrb@folklore.email"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "Julien Carignan",
|
|
28
|
+
"email": "jc@folklore.email"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "Théo Gjini",
|
|
32
|
+
"email": "tg@folklore.email"
|
|
28
33
|
}
|
|
29
34
|
],
|
|
35
|
+
"license": "ISC",
|
|
30
36
|
"main": "lib/index.js",
|
|
31
37
|
"module": "es/index.js",
|
|
32
38
|
"files": [
|
|
33
39
|
"lib",
|
|
34
40
|
"es",
|
|
35
|
-
"
|
|
41
|
+
"assets"
|
|
36
42
|
],
|
|
37
43
|
"scripts": {
|
|
38
|
-
"
|
|
39
|
-
"clean": "rm -rf dist && rm -rf lib && rm -rf es",
|
|
40
|
-
"webpack:dist": "../../node_modules/.bin/webpack --config ./webpack.config.js --progress --colors",
|
|
41
|
-
"webpack": "npm run webpack:dist",
|
|
42
|
-
"babel:es": "BABEL_ENV=es ../../node_modules/.bin/babel src --out-dir es --ignore src/**/*.story.jsx,src/**/*.test.jsx",
|
|
43
|
-
"babel:cjs": "BABEL_ENV=cjs ../../node_modules/.bin/babel src --out-dir lib --ignore src/**/*.story.jsx,src/**/*.test.jsx",
|
|
44
|
-
"babel": "npm run babel:es && npm run babel:cjs",
|
|
45
|
-
"build": "npm run babel",
|
|
46
|
-
"prepare": "npm run clean && npm run build",
|
|
47
|
-
"start": "npm run storybook"
|
|
48
|
-
},
|
|
49
|
-
"dependencies": {
|
|
50
|
-
"@babel/runtime": "^7.5.5",
|
|
51
|
-
"@panneau/core": "^1.0.1-alpha.0",
|
|
52
|
-
"@panneau/form-normal": "^1.0.2-alpha.0",
|
|
53
|
-
"@panneau/form-preview": "^1.0.2-alpha.0",
|
|
54
|
-
"invariant": "^2.2.2",
|
|
55
|
-
"lodash": "^4.17.4",
|
|
56
|
-
"prop-types": "^15.7.0"
|
|
44
|
+
"prepare": "../../scripts/prepare-package.sh --scss"
|
|
57
45
|
},
|
|
58
46
|
"devDependencies": {
|
|
59
|
-
"react": "^16.
|
|
60
|
-
"react-dom": "^16.
|
|
47
|
+
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
48
|
+
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
|
|
61
49
|
},
|
|
62
50
|
"peerDependencies": {
|
|
63
|
-
"react": "^16.8.0",
|
|
64
|
-
"react-dom": "^16.8.0"
|
|
51
|
+
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
52
|
+
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
|
|
53
|
+
},
|
|
54
|
+
"dependencies": {
|
|
55
|
+
"@babel/runtime": "^7.12.5",
|
|
56
|
+
"@panneau/core": "^1.0.3-alpha.0",
|
|
57
|
+
"@panneau/form-horizontal": "^1.0.3-alpha.0",
|
|
58
|
+
"@panneau/form-inline": "^1.0.3-alpha.0",
|
|
59
|
+
"@panneau/form-normal": "^1.0.3-alpha.0",
|
|
60
|
+
"@panneau/form-two-pane": "^1.0.3-alpha.0",
|
|
61
|
+
"prop-types": "^15.7.2"
|
|
62
|
+
},
|
|
63
|
+
"publishConfig": {
|
|
64
|
+
"access": "public"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "7f9c472b97c79a5c81da30730549acdde2de5c9f"
|
|
67
67
|
}
|