@khanacademy/wonder-blocks-modal 7.1.0 → 7.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 +15 -0
- package/dist/es/index.js +7 -7
- package/dist/index.js +24 -16
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @khanacademy/wonder-blocks-modal
|
|
2
2
|
|
|
3
|
+
## 7.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-breadcrumbs@3.1.1
|
|
10
|
+
- @khanacademy/wonder-blocks-core@12.1.1
|
|
11
|
+
- @khanacademy/wonder-blocks-icon-button@6.1.1
|
|
12
|
+
- @khanacademy/wonder-blocks-layout@3.1.1
|
|
13
|
+
- @khanacademy/wonder-blocks-theming@3.1.1
|
|
14
|
+
- @khanacademy/wonder-blocks-timing@7.0.1
|
|
15
|
+
- @khanacademy/wonder-blocks-tokens@4.2.1
|
|
16
|
+
- @khanacademy/wonder-blocks-typography@3.1.1
|
|
17
|
+
|
|
3
18
|
## 7.1.0
|
|
4
19
|
|
|
5
20
|
### Minor Changes
|
package/dist/es/index.js
CHANGED
|
@@ -246,7 +246,7 @@ const FOCUSABLE_ELEMENTS$1 = 'button, [href], input, select, textarea, [tabindex
|
|
|
246
246
|
class FocusTrap extends React.Component {
|
|
247
247
|
constructor(...args) {
|
|
248
248
|
super(...args);
|
|
249
|
-
this.modalRoot =
|
|
249
|
+
this.modalRoot = void 0;
|
|
250
250
|
this.getModalRoot = node => {
|
|
251
251
|
if (!node) {
|
|
252
252
|
return;
|
|
@@ -438,11 +438,11 @@ class ScrollDisabler extends React.Component {
|
|
|
438
438
|
return null;
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
|
-
ScrollDisabler.oldOverflow =
|
|
442
|
-
ScrollDisabler.oldPosition =
|
|
443
|
-
ScrollDisabler.oldScrollY =
|
|
444
|
-
ScrollDisabler.oldWidth =
|
|
445
|
-
ScrollDisabler.oldTop =
|
|
441
|
+
ScrollDisabler.oldOverflow = void 0;
|
|
442
|
+
ScrollDisabler.oldPosition = void 0;
|
|
443
|
+
ScrollDisabler.oldScrollY = void 0;
|
|
444
|
+
ScrollDisabler.oldWidth = void 0;
|
|
445
|
+
ScrollDisabler.oldTop = void 0;
|
|
446
446
|
ScrollDisabler.numModalsOpened = 0;
|
|
447
447
|
|
|
448
448
|
const defaultContext = {
|
|
@@ -454,7 +454,7 @@ ModalContext.displayName = "ModalContext";
|
|
|
454
454
|
class ModalLauncher extends React.Component {
|
|
455
455
|
constructor(...args) {
|
|
456
456
|
super(...args);
|
|
457
|
-
this.lastElementFocusedOutsideModal =
|
|
457
|
+
this.lastElementFocusedOutsideModal = void 0;
|
|
458
458
|
this.state = {
|
|
459
459
|
opened: false
|
|
460
460
|
};
|
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 wonderBlocksCore = require('@khanacademy/wonder-blocks-core');
|
|
@@ -13,7 +15,10 @@ var xIcon = require('@phosphor-icons/core/regular/x.svg');
|
|
|
13
15
|
var IconButton = require('@khanacademy/wonder-blocks-icon-button');
|
|
14
16
|
var wonderBlocksLayout = require('@khanacademy/wonder-blocks-layout');
|
|
15
17
|
|
|
16
|
-
function
|
|
18
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
19
|
+
|
|
20
|
+
function _interopNamespace(e) {
|
|
21
|
+
if (e && e.__esModule) return e;
|
|
17
22
|
var n = Object.create(null);
|
|
18
23
|
if (e) {
|
|
19
24
|
Object.keys(e).forEach(function (k) {
|
|
@@ -26,13 +31,16 @@ function _interopNamespaceDefault(e) {
|
|
|
26
31
|
}
|
|
27
32
|
});
|
|
28
33
|
}
|
|
29
|
-
n
|
|
34
|
+
n["default"] = e;
|
|
30
35
|
return Object.freeze(n);
|
|
31
36
|
}
|
|
32
37
|
|
|
33
|
-
var
|
|
34
|
-
var
|
|
35
|
-
var
|
|
38
|
+
var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
|
|
39
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
40
|
+
var tokens__namespace = /*#__PURE__*/_interopNamespace(tokens);
|
|
41
|
+
var ReactDOM__namespace = /*#__PURE__*/_interopNamespace(ReactDOM);
|
|
42
|
+
var xIcon__default = /*#__PURE__*/_interopDefaultLegacy(xIcon);
|
|
43
|
+
var IconButton__default = /*#__PURE__*/_interopDefaultLegacy(IconButton);
|
|
36
44
|
|
|
37
45
|
const theme$1 = {
|
|
38
46
|
color: {
|
|
@@ -122,7 +130,7 @@ const ModalDialogCore = React__namespace.forwardRef(function ModalDialogCore(pro
|
|
|
122
130
|
}, above));
|
|
123
131
|
});
|
|
124
132
|
const ModalDialog = React__namespace.forwardRef(function ModalDialog(props, ref) {
|
|
125
|
-
return React__namespace.createElement(ThemeModalDialog, null, React__namespace.createElement(ModalDialogCore,
|
|
133
|
+
return React__namespace.createElement(ThemeModalDialog, null, React__namespace.createElement(ModalDialogCore, _extends__default["default"]({}, props, {
|
|
126
134
|
ref: ref
|
|
127
135
|
})));
|
|
128
136
|
});
|
|
@@ -268,7 +276,7 @@ const FOCUSABLE_ELEMENTS$1 = 'button, [href], input, select, textarea, [tabindex
|
|
|
268
276
|
class FocusTrap extends React__namespace.Component {
|
|
269
277
|
constructor(...args) {
|
|
270
278
|
super(...args);
|
|
271
|
-
this.modalRoot =
|
|
279
|
+
this.modalRoot = void 0;
|
|
272
280
|
this.getModalRoot = node => {
|
|
273
281
|
if (!node) {
|
|
274
282
|
return;
|
|
@@ -386,7 +394,7 @@ class ModalBackdrop extends React__namespace.Component {
|
|
|
386
394
|
const backdropProps = {
|
|
387
395
|
[ModalLauncherPortalAttributeName]: true
|
|
388
396
|
};
|
|
389
|
-
return React__namespace.createElement(wonderBlocksCore.View,
|
|
397
|
+
return React__namespace.createElement(wonderBlocksCore.View, _extends__default["default"]({
|
|
390
398
|
style: styles$1.modalPositioner,
|
|
391
399
|
onMouseDown: this.handleMouseDown,
|
|
392
400
|
onMouseUp: this.handleMouseUp,
|
|
@@ -460,11 +468,11 @@ class ScrollDisabler extends React__namespace.Component {
|
|
|
460
468
|
return null;
|
|
461
469
|
}
|
|
462
470
|
}
|
|
463
|
-
ScrollDisabler.oldOverflow =
|
|
464
|
-
ScrollDisabler.oldPosition =
|
|
465
|
-
ScrollDisabler.oldScrollY =
|
|
466
|
-
ScrollDisabler.oldWidth =
|
|
467
|
-
ScrollDisabler.oldTop =
|
|
471
|
+
ScrollDisabler.oldOverflow = void 0;
|
|
472
|
+
ScrollDisabler.oldPosition = void 0;
|
|
473
|
+
ScrollDisabler.oldScrollY = void 0;
|
|
474
|
+
ScrollDisabler.oldWidth = void 0;
|
|
475
|
+
ScrollDisabler.oldTop = void 0;
|
|
468
476
|
ScrollDisabler.numModalsOpened = 0;
|
|
469
477
|
|
|
470
478
|
const defaultContext = {
|
|
@@ -476,7 +484,7 @@ ModalContext.displayName = "ModalContext";
|
|
|
476
484
|
class ModalLauncher extends React__namespace.Component {
|
|
477
485
|
constructor(...args) {
|
|
478
486
|
super(...args);
|
|
479
|
-
this.lastElementFocusedOutsideModal =
|
|
487
|
+
this.lastElementFocusedOutsideModal = void 0;
|
|
480
488
|
this.state = {
|
|
481
489
|
opened: false
|
|
482
490
|
};
|
|
@@ -663,8 +671,8 @@ class CloseButton extends React__namespace.Component {
|
|
|
663
671
|
if (closeModal && onClick) {
|
|
664
672
|
throw new Error("You've specified 'onClose' on a modal when using ModalLauncher. Please specify 'onClose' on the ModalLauncher instead");
|
|
665
673
|
}
|
|
666
|
-
return React__namespace.createElement(
|
|
667
|
-
icon:
|
|
674
|
+
return React__namespace.createElement(IconButton__default["default"], {
|
|
675
|
+
icon: xIcon__default["default"],
|
|
668
676
|
"aria-label": "Close modal",
|
|
669
677
|
onClick: onClick || closeModal,
|
|
670
678
|
kind: light ? "primary" : "tertiary",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@khanacademy/wonder-blocks-modal",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.1",
|
|
4
4
|
"design": "v2",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@babel/runtime": "^7.24.5",
|
|
16
|
-
"@khanacademy/wonder-blocks-breadcrumbs": "3.1.
|
|
17
|
-
"@khanacademy/wonder-blocks-core": "12.1.
|
|
18
|
-
"@khanacademy/wonder-blocks-icon-button": "6.1.
|
|
19
|
-
"@khanacademy/wonder-blocks-layout": "3.1.
|
|
20
|
-
"@khanacademy/wonder-blocks-theming": "3.1.
|
|
21
|
-
"@khanacademy/wonder-blocks-timing": "7.0.
|
|
22
|
-
"@khanacademy/wonder-blocks-tokens": "4.2.
|
|
23
|
-
"@khanacademy/wonder-blocks-typography": "3.1.
|
|
16
|
+
"@khanacademy/wonder-blocks-breadcrumbs": "3.1.1",
|
|
17
|
+
"@khanacademy/wonder-blocks-core": "12.1.1",
|
|
18
|
+
"@khanacademy/wonder-blocks-icon-button": "6.1.1",
|
|
19
|
+
"@khanacademy/wonder-blocks-layout": "3.1.1",
|
|
20
|
+
"@khanacademy/wonder-blocks-theming": "3.1.1",
|
|
21
|
+
"@khanacademy/wonder-blocks-timing": "7.0.1",
|
|
22
|
+
"@khanacademy/wonder-blocks-tokens": "4.2.1",
|
|
23
|
+
"@khanacademy/wonder-blocks-typography": "3.1.1"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"@phosphor-icons/core": "^2.0.2",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@khanacademy/wonder-blocks-breadcrumbs": "^3.0.8",
|
|
33
|
-
"@khanacademy/wb-dev-build-settings": "2.1.
|
|
33
|
+
"@khanacademy/wb-dev-build-settings": "2.1.1"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"test": "echo \"Error: no test specified\" && exit 1"
|