@micromag/element-webview 0.4.48 → 0.4.50

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 +37 -34
  2. package/package.json +4 -4
package/es/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import classNames from 'classnames';
3
- import React from 'react';
4
3
  import { useIntl } from 'react-intl';
5
4
  import { Close } from '@micromag/core/components';
6
5
  import Button from '@micromag/element-button';
6
+ import { jsxs, jsx } from 'react/jsx-runtime';
7
7
 
8
8
  var styles = {"container":"micromag-element-webview-container","iframe":"micromag-element-webview-iframe","top":"micromag-element-webview-top","close":"micromag-element-webview-close"};
9
9
 
@@ -23,43 +23,46 @@ function WebView(_ref) {
23
23
  _ref$className = _ref.className,
24
24
  className = _ref$className === void 0 ? null : _ref$className;
25
25
  var intl = useIntl();
26
- return /*#__PURE__*/React.createElement("div", {
26
+ return /*#__PURE__*/jsxs("div", {
27
27
  className: classNames([styles.container, className, _defineProperty(_defineProperty({}, styles.hidden, !focusable), styles.closeable, closeable)]),
28
28
  style: {
29
29
  width: width,
30
30
  height: height
31
- }
32
- }, closeable ? /*#__PURE__*/React.createElement("div", {
33
- className: styles.top
34
- }, /*#__PURE__*/React.createElement(Button, {
35
- className: styles.close,
36
- "aria-label": intl.formatMessage({
37
- id: "cXt3NU",
38
- defaultMessage: [{
39
- "type": 0,
40
- "value": "Close Popup"
41
- }]
42
- }),
43
- focusable: focusable,
44
- onClick: onClose
45
- }, /*#__PURE__*/React.createElement(Close, {
46
- className: styles.closeIcon
47
- }))) : null, /*#__PURE__*/React.createElement("iframe", {
48
- className: styles.iframe,
49
- "aria-hidden": !focusable ? 'true' : null,
50
- tabIndex: focusable ? '0' : '-1',
51
- title: intl.formatMessage({
52
- id: "17zT4Q",
53
- defaultMessage: [{
54
- "type": 0,
55
- "value": "Popup"
56
- }]
57
- }),
58
- src: url || 'about:blank',
59
- allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",
60
- referrerPolicy: "strict-origin-when-cross-origin",
61
- allowFullScreen: true
62
- }));
31
+ },
32
+ children: [closeable ? /*#__PURE__*/jsx("div", {
33
+ className: styles.top,
34
+ children: /*#__PURE__*/jsx(Button, {
35
+ className: styles.close,
36
+ "aria-label": intl.formatMessage({
37
+ id: "cXt3NU",
38
+ defaultMessage: [{
39
+ "type": 0,
40
+ "value": "Close Popup"
41
+ }]
42
+ }),
43
+ focusable: focusable,
44
+ onClick: onClose,
45
+ children: /*#__PURE__*/jsx(Close, {
46
+ className: styles.closeIcon
47
+ })
48
+ })
49
+ }) : null, /*#__PURE__*/jsx("iframe", {
50
+ className: styles.iframe,
51
+ "aria-hidden": !focusable ? 'true' : null,
52
+ tabIndex: focusable ? '0' : '-1',
53
+ title: intl.formatMessage({
54
+ id: "17zT4Q",
55
+ defaultMessage: [{
56
+ "type": 0,
57
+ "value": "Popup"
58
+ }]
59
+ }),
60
+ src: url || 'about:blank',
61
+ allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",
62
+ referrerPolicy: "strict-origin-when-cross-origin",
63
+ allowFullScreen: true
64
+ })]
65
+ });
63
66
  }
64
67
 
65
68
  export { WebView as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/element-webview",
3
- "version": "0.4.48",
3
+ "version": "0.4.50",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -60,8 +60,8 @@
60
60
  },
61
61
  "dependencies": {
62
62
  "@babel/runtime": "^7.28.6",
63
- "@micromag/core": "^0.4.48",
64
- "@micromag/element-button": "^0.4.48",
63
+ "@micromag/core": "^0.4.50",
64
+ "@micromag/element-button": "^0.4.50",
65
65
  "classnames": "^2.2.6",
66
66
  "lodash": "^4.17.23",
67
67
  "react-intl": "^8.1.3 || ^10.0.0",
@@ -71,6 +71,6 @@
71
71
  "access": "public",
72
72
  "registry": "https://registry.npmjs.org/"
73
73
  },
74
- "gitHead": "d6772865be1ee3f2d19288ebfbf4b9b6860f4cd7",
74
+ "gitHead": "940d5ca98f8f448b79eaa3e2fa685c3ee95185b8",
75
75
  "types": "es/index.d.ts"
76
76
  }