@panneau/modal-dialog 4.0.2 → 4.0.5
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 +43 -33
- package/package.json +8 -8
package/es/index.js
CHANGED
|
@@ -5,6 +5,7 @@ import Button from '@panneau/element-button';
|
|
|
5
5
|
import Buttons from '@panneau/element-buttons';
|
|
6
6
|
import Label from '@panneau/element-label';
|
|
7
7
|
import Modal from '@panneau/element-modal';
|
|
8
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
8
9
|
|
|
9
10
|
var styles = {"container":"panneau-modal-dialog-container","closeOutside":"panneau-modal-dialog-closeOutside","closeOutsideButton":"panneau-modal-dialog-closeOutsideButton"};
|
|
10
11
|
|
|
@@ -29,40 +30,49 @@ function ModalDialog(_ref) {
|
|
|
29
30
|
_ref$className = _ref.className,
|
|
30
31
|
className = _ref$className === void 0 ? null : _ref$className;
|
|
31
32
|
var onCloseButtonOutside = header === null && title === null && onClose !== null || withCloseOutside && onClose !== null;
|
|
32
|
-
return /*#__PURE__*/
|
|
33
|
+
return /*#__PURE__*/jsx(Modal, {
|
|
33
34
|
id: id,
|
|
34
|
-
onClose: onClose
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
35
|
+
onClose: onClose,
|
|
36
|
+
children: /*#__PURE__*/jsx("div", {
|
|
37
|
+
className: classNames(['modal-dialog', styles.container, _defineProperty(_defineProperty(_defineProperty({}, "modal-".concat(size), size !== null), styles.closeOutside, onCloseButtonOutside), className, className !== null)]),
|
|
38
|
+
role: "dialog",
|
|
39
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
40
|
+
className: "modal-content",
|
|
41
|
+
children: [onCloseButtonOutside ? /*#__PURE__*/jsx(Button, {
|
|
42
|
+
type: "button",
|
|
43
|
+
className: classNames([styles.closeOutsideButton, 'btn', 'btn-close', 'bg-light',
|
|
44
|
+
// 'btn-close-white',
|
|
45
|
+
'btn-secondary', 'p-2']),
|
|
46
|
+
"aria-label": "Close",
|
|
47
|
+
onClick: onClose
|
|
48
|
+
}) : null, header !== null ? header : /*#__PURE__*/jsxs("div", {
|
|
49
|
+
className: classNames([{
|
|
50
|
+
'modal-header': title !== null
|
|
51
|
+
}]),
|
|
52
|
+
children: [title !== null ? /*#__PURE__*/jsx("h5", {
|
|
53
|
+
className: "modal-title pe-2",
|
|
54
|
+
children: isMessage(title) ? /*#__PURE__*/jsx(Label, {
|
|
55
|
+
children: title
|
|
56
|
+
}) : title
|
|
57
|
+
}) : null, title !== null && onClose !== null ? /*#__PURE__*/jsx(Button, {
|
|
58
|
+
type: "button",
|
|
59
|
+
className: classNames(['btn-close', 'close']),
|
|
60
|
+
"aria-label": "Close",
|
|
61
|
+
onClick: onClose
|
|
62
|
+
}) : null]
|
|
63
|
+
}), /*#__PURE__*/jsx("div", {
|
|
64
|
+
className: classNames(['modal-body', styles.body]),
|
|
65
|
+
children: children
|
|
66
|
+
}), footer !== null || buttons !== null ? /*#__PURE__*/jsxs("div", {
|
|
67
|
+
className: classNames(['modal-footer', styles.footer]),
|
|
68
|
+
children: [footer !== null ? footer : null, buttons !== null ? /*#__PURE__*/jsx(Buttons, {
|
|
69
|
+
items: buttons,
|
|
70
|
+
className: styles.buttons
|
|
71
|
+
}) : null]
|
|
72
|
+
}) : null]
|
|
73
|
+
})
|
|
74
|
+
})
|
|
75
|
+
});
|
|
66
76
|
}
|
|
67
77
|
|
|
68
78
|
export { ModalDialog as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/modal-dialog",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.5",
|
|
4
4
|
"description": "Default modal",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -59,12 +59,12 @@
|
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"@babel/runtime": "^7.12.5",
|
|
62
|
-
"@panneau/core": "^4.0.
|
|
63
|
-
"@panneau/element-button": "^4.0.
|
|
64
|
-
"@panneau/element-buttons": "^4.0.
|
|
65
|
-
"@panneau/element-label": "^4.0.
|
|
66
|
-
"@panneau/element-modal": "^4.0.
|
|
67
|
-
"@panneau/themes": "^4.0.
|
|
62
|
+
"@panneau/core": "^4.0.5",
|
|
63
|
+
"@panneau/element-button": "^4.0.5",
|
|
64
|
+
"@panneau/element-buttons": "^4.0.5",
|
|
65
|
+
"@panneau/element-label": "^4.0.5",
|
|
66
|
+
"@panneau/element-modal": "^4.0.5",
|
|
67
|
+
"@panneau/themes": "^4.0.5",
|
|
68
68
|
"classnames": "^2.5.1",
|
|
69
69
|
"lodash-es": "^4.17.21",
|
|
70
70
|
"prop-types": "^15.7.2",
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"publishConfig": {
|
|
74
74
|
"access": "public"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "ac8b065e8c7ada1d176d15eff1c0fa53599ad31f"
|
|
77
77
|
}
|