@panneau/modal-dialog 3.0.163 → 3.0.164
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 +17 -13
- package/lib/index.js +6 -2
- package/package.json +8 -8
package/es/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
|
-
import PropTypes
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { PropTypes } from '@panneau/core';
|
|
5
|
+
import { PropTypes as PropTypes$1 } from '@panneau/core';
|
|
6
6
|
import { isMessage } from '@panneau/core/utils';
|
|
7
7
|
import Button from '@panneau/element-button';
|
|
8
8
|
import Buttons from '@panneau/element-buttons';
|
|
@@ -12,15 +12,16 @@ import Modal from '@panneau/element-modal';
|
|
|
12
12
|
var styles = {"container":"panneau-modal-dialog-container","closeOutside":"panneau-modal-dialog-closeOutside","closeOutsideButton":"panneau-modal-dialog-closeOutsideButton"};
|
|
13
13
|
|
|
14
14
|
var propTypes = {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
15
|
+
id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
|
|
16
|
+
title: PropTypes$1.label,
|
|
17
|
+
size: PropTypes.string,
|
|
18
|
+
header: PropTypes.node,
|
|
19
|
+
children: PropTypes.node,
|
|
20
|
+
footer: PropTypes.node,
|
|
21
|
+
buttons: PropTypes$1.buttons,
|
|
22
|
+
onClose: PropTypes.func,
|
|
23
|
+
withCloseOutside: PropTypes.bool,
|
|
24
|
+
className: PropTypes.string
|
|
24
25
|
};
|
|
25
26
|
var defaultProps = {
|
|
26
27
|
title: null,
|
|
@@ -34,7 +35,8 @@ var defaultProps = {
|
|
|
34
35
|
className: null
|
|
35
36
|
};
|
|
36
37
|
var ModalDialog = function ModalDialog(_ref) {
|
|
37
|
-
var
|
|
38
|
+
var id = _ref.id,
|
|
39
|
+
title = _ref.title,
|
|
38
40
|
size = _ref.size,
|
|
39
41
|
header = _ref.header,
|
|
40
42
|
children = _ref.children,
|
|
@@ -44,7 +46,9 @@ var ModalDialog = function ModalDialog(_ref) {
|
|
|
44
46
|
withCloseOutside = _ref.withCloseOutside,
|
|
45
47
|
className = _ref.className;
|
|
46
48
|
var onCloseButtonOutside = header === null && title === null && onClose !== null || withCloseOutside && onClose !== null;
|
|
47
|
-
return /*#__PURE__*/React.createElement(Modal,
|
|
49
|
+
return /*#__PURE__*/React.createElement(Modal, {
|
|
50
|
+
id: id
|
|
51
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
48
52
|
className: classNames(['modal-dialog', styles.container, _defineProperty(_defineProperty(_defineProperty({}, "modal-".concat(size), size !== null), styles.closeOutside, onCloseButtonOutside), className, className)]),
|
|
49
53
|
role: "dialog"
|
|
50
54
|
}, /*#__PURE__*/React.createElement("div", {
|
package/lib/index.js
CHANGED
|
@@ -16,6 +16,7 @@ var Modal = require('@panneau/element-modal');
|
|
|
16
16
|
var styles = {"container":"panneau-modal-dialog-container","closeOutside":"panneau-modal-dialog-closeOutside","closeOutsideButton":"panneau-modal-dialog-closeOutsideButton"};
|
|
17
17
|
|
|
18
18
|
var propTypes = {
|
|
19
|
+
id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
|
|
19
20
|
title: core.PropTypes.label,
|
|
20
21
|
size: PropTypes.string,
|
|
21
22
|
header: PropTypes.node,
|
|
@@ -38,7 +39,8 @@ var defaultProps = {
|
|
|
38
39
|
className: null
|
|
39
40
|
};
|
|
40
41
|
var ModalDialog = function ModalDialog(_ref) {
|
|
41
|
-
var
|
|
42
|
+
var id = _ref.id,
|
|
43
|
+
title = _ref.title,
|
|
42
44
|
size = _ref.size,
|
|
43
45
|
header = _ref.header,
|
|
44
46
|
children = _ref.children,
|
|
@@ -48,7 +50,9 @@ var ModalDialog = function ModalDialog(_ref) {
|
|
|
48
50
|
withCloseOutside = _ref.withCloseOutside,
|
|
49
51
|
className = _ref.className;
|
|
50
52
|
var onCloseButtonOutside = header === null && title === null && onClose !== null || withCloseOutside && onClose !== null;
|
|
51
|
-
return /*#__PURE__*/React.createElement(Modal,
|
|
53
|
+
return /*#__PURE__*/React.createElement(Modal, {
|
|
54
|
+
id: id
|
|
55
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
52
56
|
className: classNames(['modal-dialog', styles.container, _defineProperty(_defineProperty(_defineProperty({}, "modal-".concat(size), size !== null), styles.closeOutside, onCloseButtonOutside), className, className)]),
|
|
53
57
|
role: "dialog"
|
|
54
58
|
}, /*#__PURE__*/React.createElement("div", {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/modal-dialog",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.164",
|
|
4
4
|
"description": "Default modal",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -54,12 +54,12 @@
|
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@babel/runtime": "^7.12.5",
|
|
57
|
-
"@panneau/core": "^3.0.
|
|
58
|
-
"@panneau/element-button": "^3.0.
|
|
59
|
-
"@panneau/element-buttons": "^3.0.
|
|
60
|
-
"@panneau/element-label": "^3.0.
|
|
61
|
-
"@panneau/element-modal": "^3.0.
|
|
62
|
-
"@panneau/themes": "^3.0.
|
|
57
|
+
"@panneau/core": "^3.0.164",
|
|
58
|
+
"@panneau/element-button": "^3.0.164",
|
|
59
|
+
"@panneau/element-buttons": "^3.0.164",
|
|
60
|
+
"@panneau/element-label": "^3.0.164",
|
|
61
|
+
"@panneau/element-modal": "^3.0.164",
|
|
62
|
+
"@panneau/themes": "^3.0.164",
|
|
63
63
|
"classnames": "^2.5.1",
|
|
64
64
|
"lodash": "^4.17.21",
|
|
65
65
|
"prop-types": "^15.7.2",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"publishConfig": {
|
|
69
69
|
"access": "public"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "7a1511eb7b08a09cfcf708d1ca314a12155e9bd8"
|
|
72
72
|
}
|