@panneau/forms 3.0.54 → 3.0.56

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 CHANGED
@@ -1,5 +1,7 @@
1
- import React from 'react';
1
+ import _objectSpread from '@babel/runtime/helpers/objectSpread2';
2
+ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
2
3
  import PropTypes from 'prop-types';
4
+ import React from 'react';
3
5
  import { ComponentsProvider, FORMS_NAMESPACE } from '@panneau/core/contexts';
4
6
  import formHorizontal from '@panneau/form-horizontal';
5
7
  import formInline from '@panneau/form-inline';
@@ -26,18 +28,24 @@ var components = /*#__PURE__*/Object.freeze({
26
28
  TwoFactorEnable: TwoFactorEnable
27
29
  });
28
30
 
29
- /* eslint-disable react/jsx-props-no-spreading */
31
+ var _excluded = ["components", "children"];
30
32
  var propTypes = {
33
+ components: PropTypes.object,
34
+ // eslint-disable-line
31
35
  children: PropTypes.node
32
36
  };
33
37
  var defaultProps = {
38
+ components: null,
34
39
  children: null
35
40
  };
36
- var FormsProvider = function FormsProvider(props) {
41
+ var FormsProvider = function FormsProvider(_ref) {
42
+ var injectedComponents = _ref.components,
43
+ children = _ref.children,
44
+ props = _objectWithoutProperties(_ref, _excluded);
37
45
  return /*#__PURE__*/React.createElement(ComponentsProvider, Object.assign({
38
46
  namespace: FORMS_NAMESPACE,
39
- components: components
40
- }, props));
47
+ components: _objectSpread(_objectSpread({}, components), injectedComponents)
48
+ }, props), children);
41
49
  };
42
50
  FormsProvider.propTypes = propTypes;
43
51
  FormsProvider.defaultProps = defaultProps;
package/lib/index.js CHANGED
@@ -2,8 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var React = require('react');
5
+ var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
6
+ var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
6
7
  var PropTypes = require('prop-types');
8
+ var React = require('react');
7
9
  var contexts = require('@panneau/core/contexts');
8
10
  var formHorizontal = require('@panneau/form-horizontal');
9
11
  var formInline = require('@panneau/form-inline');
@@ -13,8 +15,10 @@ var formAuth = require('@panneau/form-auth');
13
15
 
14
16
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
15
17
 
16
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
18
+ var _objectSpread__default = /*#__PURE__*/_interopDefaultLegacy(_objectSpread);
19
+ var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
17
20
  var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
21
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
18
22
  var formHorizontal__default = /*#__PURE__*/_interopDefaultLegacy(formHorizontal);
19
23
  var formInline__default = /*#__PURE__*/_interopDefaultLegacy(formInline);
20
24
  var formNormal__default = /*#__PURE__*/_interopDefaultLegacy(formNormal);
@@ -39,18 +43,24 @@ var components = /*#__PURE__*/Object.freeze({
39
43
  TwoFactorEnable: formAuth.TwoFactorEnable
40
44
  });
41
45
 
42
- /* eslint-disable react/jsx-props-no-spreading */
46
+ var _excluded = ["components", "children"];
43
47
  var propTypes = {
48
+ components: PropTypes__default["default"].object,
49
+ // eslint-disable-line
44
50
  children: PropTypes__default["default"].node
45
51
  };
46
52
  var defaultProps = {
53
+ components: null,
47
54
  children: null
48
55
  };
49
- var FormsProvider = function FormsProvider(props) {
56
+ var FormsProvider = function FormsProvider(_ref) {
57
+ var injectedComponents = _ref.components,
58
+ children = _ref.children,
59
+ props = _objectWithoutProperties__default["default"](_ref, _excluded);
50
60
  return /*#__PURE__*/React__default["default"].createElement(contexts.ComponentsProvider, Object.assign({
51
61
  namespace: contexts.FORMS_NAMESPACE,
52
- components: components
53
- }, props));
62
+ components: _objectSpread__default["default"](_objectSpread__default["default"]({}, components), injectedComponents)
63
+ }, props), children);
54
64
  };
55
65
  FormsProvider.propTypes = propTypes;
56
66
  FormsProvider.defaultProps = defaultProps;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panneau/forms",
3
- "version": "3.0.54",
3
+ "version": "3.0.56",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "javascript"
@@ -66,15 +66,15 @@
66
66
  "dependencies": {
67
67
  "@babel/runtime": "^7.12.5",
68
68
  "@panneau/core": "^3.0.45",
69
- "@panneau/form-auth": "^3.0.54",
70
- "@panneau/form-horizontal": "^3.0.54",
71
- "@panneau/form-inline": "^3.0.54",
72
- "@panneau/form-normal": "^3.0.54",
73
- "@panneau/form-two-pane": "^3.0.54",
69
+ "@panneau/form-auth": "^3.0.55",
70
+ "@panneau/form-horizontal": "^3.0.55",
71
+ "@panneau/form-inline": "^3.0.55",
72
+ "@panneau/form-normal": "^3.0.55",
73
+ "@panneau/form-two-pane": "^3.0.55",
74
74
  "prop-types": "^15.7.2"
75
75
  },
76
76
  "publishConfig": {
77
77
  "access": "public"
78
78
  },
79
- "gitHead": "0804872a54016768d3d5c7ac03905204a9a2c5e3"
79
+ "gitHead": "1566926c838b9a963a67a018ef77d31a678be6e3"
80
80
  }