@panneau/modal-dialog 3.0.222 → 3.0.224

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 +12 -9
  2. package/lib/index.js +0 -91
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panneau/modal-dialog",
3
- "version": "3.0.222",
3
+ "version": "3.0.224",
4
4
  "description": "Default modal",
5
5
  "keywords": [
6
6
  "javascript"
@@ -33,8 +33,11 @@
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
+ },
38
41
  "files": [
39
42
  "lib",
40
43
  "es",
@@ -54,12 +57,12 @@
54
57
  },
55
58
  "dependencies": {
56
59
  "@babel/runtime": "^7.12.5",
57
- "@panneau/core": "^3.0.222",
58
- "@panneau/element-button": "^3.0.222",
59
- "@panneau/element-buttons": "^3.0.222",
60
- "@panneau/element-label": "^3.0.222",
61
- "@panneau/element-modal": "^3.0.222",
62
- "@panneau/themes": "^3.0.222",
60
+ "@panneau/core": "^3.0.224",
61
+ "@panneau/element-button": "^3.0.224",
62
+ "@panneau/element-buttons": "^3.0.224",
63
+ "@panneau/element-label": "^3.0.224",
64
+ "@panneau/element-modal": "^3.0.224",
65
+ "@panneau/themes": "^3.0.224",
63
66
  "classnames": "^2.5.1",
64
67
  "lodash": "^4.17.21",
65
68
  "prop-types": "^15.7.2",
@@ -68,5 +71,5 @@
68
71
  "publishConfig": {
69
72
  "access": "public"
70
73
  },
71
- "gitHead": "1d7f6c2943965c2c26fb6ce1d8f3c85eb88b2146"
74
+ "gitHead": "c95bd465867c4c7d112bf0ed66036574cc05c627"
72
75
  }
package/lib/index.js DELETED
@@ -1,91 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var _defineProperty = require('@babel/runtime/helpers/defineProperty');
6
- var classNames = require('classnames');
7
- var PropTypes = require('prop-types');
8
- var React = require('react');
9
- var core = require('@panneau/core');
10
- var utils = require('@panneau/core/utils');
11
- var Button = require('@panneau/element-button');
12
- var Buttons = require('@panneau/element-buttons');
13
- var Label = require('@panneau/element-label');
14
- var Modal = require('@panneau/element-modal');
15
-
16
- var styles = {"container":"panneau-modal-dialog-container","closeOutside":"panneau-modal-dialog-closeOutside","closeOutsideButton":"panneau-modal-dialog-closeOutsideButton"};
17
-
18
- var propTypes = {
19
- id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
20
- title: core.PropTypes.label,
21
- size: PropTypes.string,
22
- header: PropTypes.node,
23
- children: PropTypes.node,
24
- footer: PropTypes.node,
25
- buttons: core.PropTypes.buttons,
26
- onClose: PropTypes.func,
27
- withCloseOutside: PropTypes.bool,
28
- className: PropTypes.string
29
- };
30
- var defaultProps = {
31
- title: null,
32
- size: null,
33
- header: null,
34
- children: null,
35
- footer: null,
36
- buttons: null,
37
- onClose: null,
38
- withCloseOutside: false,
39
- className: null
40
- };
41
- var ModalDialog = function ModalDialog(_ref) {
42
- var id = _ref.id,
43
- title = _ref.title,
44
- size = _ref.size,
45
- header = _ref.header,
46
- children = _ref.children,
47
- buttons = _ref.buttons,
48
- footer = _ref.footer,
49
- onClose = _ref.onClose,
50
- withCloseOutside = _ref.withCloseOutside,
51
- className = _ref.className;
52
- var onCloseButtonOutside = header === null && title === null && onClose !== null || withCloseOutside && onClose !== null;
53
- return /*#__PURE__*/React.createElement(Modal, {
54
- id: id
55
- }, /*#__PURE__*/React.createElement("div", {
56
- className: classNames(['modal-dialog', styles.container, _defineProperty(_defineProperty(_defineProperty({}, "modal-".concat(size), size !== null), styles.closeOutside, onCloseButtonOutside), className, className)]),
57
- role: "dialog"
58
- }, /*#__PURE__*/React.createElement("div", {
59
- className: "modal-content"
60
- }, onCloseButtonOutside ? /*#__PURE__*/React.createElement(Button, {
61
- type: "button",
62
- className: classNames([styles.closeOutsideButton, 'btn', 'btn-close', 'bg-light',
63
- // 'btn-close-white',
64
- 'btn-secondary', 'p-2']),
65
- "aria-label": "Close",
66
- onClick: onClose
67
- }) : null, header !== null ? header : /*#__PURE__*/React.createElement("div", {
68
- className: classNames([{
69
- 'modal-header': title !== null
70
- }])
71
- }, title !== null ? /*#__PURE__*/React.createElement("h5", {
72
- className: "modal-title pe-2"
73
- }, utils.isMessage ? /*#__PURE__*/React.createElement(Label, null, title) : title) : null, title !== null && onClose !== null ? /*#__PURE__*/React.createElement(Button, {
74
- type: "button",
75
- className: classNames(['btn-close', 'close']),
76
- "aria-label": "Close",
77
- onClick: onClose
78
- }) : null), /*#__PURE__*/React.createElement("div", {
79
- className: classNames(['modal-body', styles.body])
80
- }, children), footer !== null || buttons !== null ? /*#__PURE__*/React.createElement("div", {
81
- className: classNames(['modal-footer', styles.footer])
82
- }, footer !== null ? footer : null, buttons !== null ? /*#__PURE__*/React.createElement(Buttons, {
83
- items: buttons,
84
- className: styles.buttons
85
- }) : null) : null)));
86
- };
87
- ModalDialog.propTypes = propTypes;
88
- ModalDialog.defaultProps = defaultProps;
89
- var Dialog = ModalDialog;
90
-
91
- exports.default = Dialog;