@panneau/element-modal 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.
Files changed (2) hide show
  1. package/es/index.js +19 -14
  2. package/package.json +6 -6
package/es/index.js CHANGED
@@ -4,6 +4,7 @@ import { useMemo, useEffect, useRef } from 'react';
4
4
  import { getDisplayName } from '@panneau/core/utils';
5
5
  import ReactDOM from 'react-dom';
6
6
  import { useModal } from '@panneau/core/contexts';
7
+ import { jsx } from 'react/jsx-runtime';
7
8
  import { useKeyboardKeys, KEYCODES } from '@panneau/core/hooks';
8
9
 
9
10
  function ModalPortal(_ref) {
@@ -59,15 +60,18 @@ function Modal(_ref) {
59
60
  onClose: onClose
60
61
  };
61
62
  }, [title, onClose]);
62
- return /*#__PURE__*/React.createElement(ModalPortal, {
63
+ return /*#__PURE__*/jsx(ModalPortal, {
63
64
  id: finalId,
64
- data: data
65
- }, /*#__PURE__*/React.createElement("div", {
66
- className: classNames([styles.modal, _defineProperty({}, styles[position], position !== null)])
67
- }, /*#__PURE__*/React.createElement("div", {
68
- className: classNames(['modal', 'fade', 'show', 'd-block', styles.inner]),
69
- tabIndex: -1
70
- }, children)));
65
+ data: data,
66
+ children: /*#__PURE__*/jsx("div", {
67
+ className: classNames([styles.modal, _defineProperty({}, styles[position], position !== null)]),
68
+ children: /*#__PURE__*/jsx("div", {
69
+ className: classNames(['modal', 'fade', 'show', 'd-block', styles.inner]),
70
+ tabIndex: -1,
71
+ children: children
72
+ })
73
+ })
74
+ });
71
75
  }
72
76
 
73
77
  function Modals(_ref) {
@@ -98,16 +102,17 @@ function Modals(_ref) {
98
102
  }
99
103
  }, [modals]);
100
104
  useKeyboardKeys(_defineProperty({}, KEYCODES.ESCAPE, closeLastModal));
101
- return /*#__PURE__*/React.createElement("div", {
105
+ return /*#__PURE__*/jsx("div", {
102
106
  className: classNames([styles.modalsContainer, _defineProperty({}, className, className !== null)]),
103
107
  "data-bs-theme": theme !== null ? theme : undefined,
104
108
  style: {
105
109
  color: theme === 'dark' ? '#FFF' : undefined
106
- }
107
- }, /*#__PURE__*/React.createElement("div", {
108
- className: classNames([styles.modals, _defineProperty({}, styles.hasModals, modals !== null && modals.length > 0)]),
109
- ref: containerRef
110
- }));
110
+ },
111
+ children: /*#__PURE__*/jsx("div", {
112
+ className: classNames([styles.modals, _defineProperty({}, styles.hasModals, modals !== null && modals.length > 0)]),
113
+ ref: containerRef
114
+ })
115
+ });
111
116
  }
112
117
 
113
118
  export { Modal, ModalPortal, Modals, Modal as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panneau/element-modal",
3
- "version": "4.0.2",
3
+ "version": "4.0.5",
4
4
  "description": "Modal element",
5
5
  "keywords": [
6
6
  "javascript"
@@ -51,10 +51,10 @@
51
51
  },
52
52
  "dependencies": {
53
53
  "@babel/runtime": "^7.12.5",
54
- "@panneau/core": "^4.0.2",
55
- "@panneau/element-button": "^4.0.2",
56
- "@panneau/element-icon": "^4.0.2",
57
- "@panneau/element-label": "^4.0.2",
54
+ "@panneau/core": "^4.0.5",
55
+ "@panneau/element-button": "^4.0.5",
56
+ "@panneau/element-icon": "^4.0.5",
57
+ "@panneau/element-label": "^4.0.5",
58
58
  "classnames": "^2.5.1",
59
59
  "prop-types": "^15.7.2",
60
60
  "react-intl": "^5.15.8 || ^6.0.0 || ^7.0.0"
@@ -62,5 +62,5 @@
62
62
  "publishConfig": {
63
63
  "access": "public"
64
64
  },
65
- "gitHead": "53ad0f27e467992c23158732e0f7d39d8615780b"
65
+ "gitHead": "ac8b065e8c7ada1d176d15eff1c0fa53599ad31f"
66
66
  }