@khanacademy/wonder-blocks-popover 5.1.0 → 5.1.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @khanacademy/wonder-blocks-popover
2
2
 
3
+ ## 5.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - ee8d95a: Rollback rollup version from v4 to v2 to prevent an issue with CJS builds in unit tests
8
+ - Updated dependencies [ee8d95a]
9
+ - @khanacademy/wonder-blocks-core@12.1.1
10
+ - @khanacademy/wonder-blocks-icon-button@6.1.1
11
+ - @khanacademy/wonder-blocks-modal@7.1.1
12
+ - @khanacademy/wonder-blocks-tokens@4.2.1
13
+ - @khanacademy/wonder-blocks-tooltip@4.1.1
14
+ - @khanacademy/wonder-blocks-typography@3.1.1
15
+
3
16
  ## 5.1.0
4
17
 
5
18
  ### Minor Changes
package/dist/es/index.js CHANGED
@@ -145,7 +145,7 @@ class PopoverEventListener extends React.Component {
145
145
  });
146
146
  return;
147
147
  }
148
- const node = ReactDOM.findDOMNode((_this$props$contentRe = this.props.contentRef) == null ? undefined : _this$props$contentRe.current);
148
+ const node = ReactDOM.findDOMNode((_this$props$contentRe = this.props.contentRef) == null ? void 0 : _this$props$contentRe.current);
149
149
  if (node && !node.contains(e.target)) {
150
150
  e.preventDefault();
151
151
  e.stopPropagation();
@@ -211,8 +211,8 @@ class InitialFocus extends React.Component {
211
211
  class FocusManager extends React.Component {
212
212
  constructor(...args) {
213
213
  super(...args);
214
- this.nextElementAfterPopover = undefined;
215
- this.rootNode = undefined;
214
+ this.nextElementAfterPopover = void 0;
215
+ this.rootNode = void 0;
216
216
  this.elementsThatCanBeFocusableInsidePopover = [];
217
217
  this.firstFocusableElementInPopover = null;
218
218
  this.lastFocusableElementInPopover = null;
package/dist/index.js CHANGED
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var _extends = require('@babel/runtime/helpers/extends');
4
6
  var React = require('react');
5
7
  var ReactDOM = require('react-dom');
@@ -12,7 +14,10 @@ var wonderBlocksTypography = require('@khanacademy/wonder-blocks-typography');
12
14
  var xIcon = require('@phosphor-icons/core/regular/x.svg');
13
15
  var IconButton = require('@khanacademy/wonder-blocks-icon-button');
14
16
 
15
- function _interopNamespaceDefault(e) {
17
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
18
+
19
+ function _interopNamespace(e) {
20
+ if (e && e.__esModule) return e;
16
21
  var n = Object.create(null);
17
22
  if (e) {
18
23
  Object.keys(e).forEach(function (k) {
@@ -25,12 +30,15 @@ function _interopNamespaceDefault(e) {
25
30
  }
26
31
  });
27
32
  }
28
- n.default = e;
33
+ n["default"] = e;
29
34
  return Object.freeze(n);
30
35
  }
31
36
 
32
- var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
33
- var ReactDOM__namespace = /*#__PURE__*/_interopNamespaceDefault(ReactDOM);
37
+ var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
38
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
39
+ var ReactDOM__namespace = /*#__PURE__*/_interopNamespace(ReactDOM);
40
+ var xIcon__default = /*#__PURE__*/_interopDefaultLegacy(xIcon);
41
+ var IconButton__default = /*#__PURE__*/_interopDefaultLegacy(IconButton);
34
42
 
35
43
  const defaultContext = {
36
44
  close: undefined,
@@ -65,7 +73,7 @@ class PopoverAnchor extends React__namespace.Component {
65
73
  });
66
74
  return React__namespace.cloneElement(renderedChildren, sharedProps);
67
75
  } else {
68
- return React__namespace.cloneElement(children, _extends({}, children.props, sharedProps, {
76
+ return React__namespace.cloneElement(children, _extends__default["default"]({}, children.props, sharedProps, {
69
77
  onClick: children.props.onClick ? e => {
70
78
  e.stopPropagation();
71
79
  children.props.onClick();
@@ -167,7 +175,7 @@ class PopoverEventListener extends React__namespace.Component {
167
175
  });
168
176
  return;
169
177
  }
170
- const node = ReactDOM__namespace.findDOMNode((_this$props$contentRe = this.props.contentRef) == null ? undefined : _this$props$contentRe.current);
178
+ const node = ReactDOM__namespace.findDOMNode((_this$props$contentRe = this.props.contentRef) == null ? void 0 : _this$props$contentRe.current);
171
179
  if (node && !node.contains(e.target)) {
172
180
  e.preventDefault();
173
181
  e.stopPropagation();
@@ -233,8 +241,8 @@ class InitialFocus extends React__namespace.Component {
233
241
  class FocusManager extends React__namespace.Component {
234
242
  constructor(...args) {
235
243
  super(...args);
236
- this.nextElementAfterPopover = undefined;
237
- this.rootNode = undefined;
244
+ this.nextElementAfterPopover = void 0;
245
+ this.rootNode = void 0;
238
246
  this.elementsThatCanBeFocusableInsidePopover = [];
239
247
  this.firstFocusableElementInPopover = null;
240
248
  this.lastFocusableElementInPopover = null;
@@ -484,7 +492,7 @@ class Popover extends React__namespace.Component {
484
492
  placement: placement,
485
493
  rootBoundary: rootBoundary,
486
494
  viewportPadding: viewportPadding
487
- }, props => React__namespace.createElement(PopoverDialog, _extends({}, props, {
495
+ }, props => React__namespace.createElement(PopoverDialog, _extends__default["default"]({}, props, {
488
496
  "aria-label": ariaLabel,
489
497
  "aria-describedby": describedBy,
490
498
  "aria-labelledby": ariaLabelledBy,
@@ -569,8 +577,8 @@ class CloseButton extends React__namespace.Component {
569
577
  return React__namespace.createElement(PopoverContext.Consumer, null, ({
570
578
  close
571
579
  }) => {
572
- return React__namespace.createElement(IconButton, {
573
- icon: xIcon,
580
+ return React__namespace.createElement(IconButton__default["default"], {
581
+ icon: xIcon__default["default"],
574
582
  "aria-label": ariaLabel,
575
583
  onClick: close,
576
584
  kind: light ? "primary" : "tertiary",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@khanacademy/wonder-blocks-popover",
3
- "version": "5.1.0",
3
+ "version": "5.1.1",
4
4
  "design": "v1",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -13,12 +13,12 @@
13
13
  "license": "MIT",
14
14
  "dependencies": {
15
15
  "@babel/runtime": "^7.24.5",
16
- "@khanacademy/wonder-blocks-core": "12.1.0",
17
- "@khanacademy/wonder-blocks-icon-button": "6.1.0",
18
- "@khanacademy/wonder-blocks-modal": "7.1.0",
19
- "@khanacademy/wonder-blocks-tokens": "4.2.0",
20
- "@khanacademy/wonder-blocks-tooltip": "4.1.0",
21
- "@khanacademy/wonder-blocks-typography": "3.1.0"
16
+ "@khanacademy/wonder-blocks-core": "12.1.1",
17
+ "@khanacademy/wonder-blocks-icon-button": "6.1.1",
18
+ "@khanacademy/wonder-blocks-modal": "7.1.1",
19
+ "@khanacademy/wonder-blocks-tokens": "4.2.1",
20
+ "@khanacademy/wonder-blocks-tooltip": "4.1.1",
21
+ "@khanacademy/wonder-blocks-typography": "3.1.1"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "@phosphor-icons/core": "^2.0.2",
@@ -29,7 +29,7 @@
29
29
  "react-popper": "^2.0.0"
30
30
  },
31
31
  "devDependencies": {
32
- "@khanacademy/wb-dev-build-settings": "2.1.0"
32
+ "@khanacademy/wb-dev-build-settings": "2.1.1"
33
33
  },
34
34
  "scripts": {
35
35
  "test": "echo \"Error: no test specified\" && exit 1"