@panneau/form-two-pane 3.0.223 → 3.0.226

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +14 -9
  2. package/lib/index.js +0 -78
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panneau/form-two-pane",
3
- "version": "3.0.223",
3
+ "version": "3.0.226",
4
4
  "description": "Two-pane resource forms",
5
5
  "keywords": [
6
6
  "javascript"
@@ -33,8 +33,13 @@
33
33
  }
34
34
  ],
35
35
  "license": "ISC",
36
- "main": "lib/index.js",
36
+ "type": "module",
37
37
  "module": "es/index.js",
38
+ "exports": {
39
+ ".": "./es/index.js",
40
+ "./assets/css/styles": "./assets/css/styles.css",
41
+ "./assets/css/styles.css": "./assets/css/styles.css"
42
+ },
38
43
  "files": [
39
44
  "lib",
40
45
  "es",
@@ -54,12 +59,12 @@
54
59
  },
55
60
  "dependencies": {
56
61
  "@babel/runtime": "^7.12.5",
57
- "@panneau/core": "^3.0.223",
58
- "@panneau/data": "^3.0.223",
59
- "@panneau/element-button": "^3.0.223",
60
- "@panneau/element-form": "^3.0.223",
61
- "@panneau/field-fields": "^3.0.223",
62
- "@panneau/themes": "^3.0.223",
62
+ "@panneau/core": "^3.0.224",
63
+ "@panneau/data": "^3.0.224",
64
+ "@panneau/element-button": "^3.0.226",
65
+ "@panneau/element-form": "^3.0.226",
66
+ "@panneau/field-fields": "^3.0.226",
67
+ "@panneau/themes": "^3.0.224",
63
68
  "classnames": "^2.5.1",
64
69
  "lodash": "^4.17.21",
65
70
  "prop-types": "^15.7.2",
@@ -68,5 +73,5 @@
68
73
  "publishConfig": {
69
74
  "access": "public"
70
75
  },
71
- "gitHead": "14196bd955b0e44cbc214e00f3189b3216f3fa53"
76
+ "gitHead": "9615a4d3021e9ad9b15be01e998dd6f366f8f705"
72
77
  }
package/lib/index.js DELETED
@@ -1,78 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var _defineProperty = require('@babel/runtime/helpers/defineProperty');
6
- var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
7
- var classNames = require('classnames');
8
- var PropTypes = require('prop-types');
9
- var React = require('react');
10
- var core = require('@panneau/core');
11
- var contexts = require('@panneau/core/contexts');
12
- var Form = require('@panneau/element-form');
13
-
14
- var styles = {};
15
-
16
- var _excluded = ["fields", "status", "value", "setValue", "onSubmit", "buttons", "children", "className"];
17
- var propTypes = {
18
- fields: PropTypes.objectOf(PropTypes.shape({})).isRequired,
19
- value: PropTypes.object,
20
- // eslint-disable-line react/forbid-prop-types
21
- setValue: PropTypes.func,
22
- onChange: PropTypes.func.isRequired,
23
- onSubmit: PropTypes.func.isRequired,
24
- status: core.PropTypes.formStatus,
25
- generalError: PropTypes.string,
26
- errors: PropTypes.objectOf(PropTypes.arrayOf(PropTypes.string)),
27
- buttons: PropTypes.arrayOf(PropTypes.shape({
28
- type: PropTypes.oneOf(['submit', 'button', 'link', 'reset']),
29
- id: PropTypes.string,
30
- label: PropTypes.string,
31
- position: PropTypes.string,
32
- onClick: PropTypes.func
33
- })),
34
- children: PropTypes.node,
35
- className: PropTypes.string
36
- };
37
- var defaultProps = {
38
- status: null,
39
- value: null,
40
- setValue: null,
41
- generalError: null,
42
- errors: null,
43
- buttons: null,
44
- children: null,
45
- className: null
46
- };
47
- var TwoPaneForm = function TwoPaneForm(_ref) {
48
- var fields = _ref.fields,
49
- status = _ref.status,
50
- value = _ref.value,
51
- setValue = _ref.setValue,
52
- onSubmit = _ref.onSubmit,
53
- buttons = _ref.buttons,
54
- children = _ref.children,
55
- className = _ref.className,
56
- props = _objectWithoutProperties(_ref, _excluded);
57
- var FieldsComponent = contexts.useFieldComponent('fields');
58
- var onChange = setValue || null;
59
- return /*#__PURE__*/React.createElement("div", {
60
- className: "d-flex"
61
- }, /*#__PURE__*/React.createElement(Form, Object.assign({
62
- className: classNames([styles.container, 'form', 'w-50', _defineProperty({}, className, className !== null)]),
63
- status: status,
64
- buttons: buttons,
65
- onSubmit: onSubmit
66
- }, props), /*#__PURE__*/React.createElement(FieldsComponent, {
67
- fields: fields,
68
- value: value,
69
- onChange: onChange
70
- })), /*#__PURE__*/React.createElement("div", {
71
- className: "w-50"
72
- }, children));
73
- };
74
- TwoPaneForm.propTypes = propTypes;
75
- TwoPaneForm.defaultProps = defaultProps;
76
- var TwoPane = TwoPaneForm;
77
-
78
- exports.default = TwoPane;