@dhis2-ui/modal 8.2.6 → 8.3.0

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.
@@ -6,7 +6,7 @@ var _steps = require("cypress-cucumber-preprocessor/steps");
6
6
  cy.visitStory('Modal', 'With onClose');
7
7
  });
8
8
  (0, _steps.When)('the Screencover is clicked above the modal', () => {
9
- cy.get('[data-test="dhis2-uicore-layer"]').click('top');
9
+ cy.get('[data-test="dhis2-uicore-layer"] > .backdrop').click('top');
10
10
  });
11
11
  (0, _steps.Then)('the onClose handler is called', () => {
12
12
  cy.window().should(win => {
@@ -17,7 +17,7 @@ var _steps = require("cypress-cucumber-preprocessor/steps");
17
17
  cy.visitStory('Modal', 'Bottom-aligned, with onClose');
18
18
  });
19
19
  (0, _steps.When)('the Screencover is clicked below the modal', () => {
20
- cy.get('[data-test="dhis2-uicore-layer"]').click('bottom');
20
+ cy.get('[data-test="dhis2-uicore-layer"] > .backdrop').click('bottom');
21
21
  });
22
22
  (0, _steps.Given)('a Modal with onClose handler is rendered', () => {
23
23
  cy.visitStory('Modal', 'With onClose');
@@ -47,7 +47,7 @@ const Modal = _ref => {
47
47
  } = _ref;
48
48
  const layerStyles = resolveLayerStyles(hide);
49
49
  return /*#__PURE__*/_react.default.createElement(_layer.Layer, {
50
- onClick: onClose,
50
+ onBackdropClick: onClose,
51
51
  className: layerStyles.className,
52
52
  translucent: !hide
53
53
  }, /*#__PURE__*/_react.default.createElement(_center.Center, {
@@ -3,7 +3,7 @@ Given('a top-aligned Modal with onClose handler is rendered', () => {
3
3
  cy.visitStory('Modal', 'With onClose');
4
4
  });
5
5
  When('the Screencover is clicked above the modal', () => {
6
- cy.get('[data-test="dhis2-uicore-layer"]').click('top');
6
+ cy.get('[data-test="dhis2-uicore-layer"] > .backdrop').click('top');
7
7
  });
8
8
  Then('the onClose handler is called', () => {
9
9
  cy.window().should(win => {
@@ -14,7 +14,7 @@ Given('a bottom-aligned Modal with onClose handler is rendered', () => {
14
14
  cy.visitStory('Modal', 'Bottom-aligned, with onClose');
15
15
  });
16
16
  When('the Screencover is clicked below the modal', () => {
17
- cy.get('[data-test="dhis2-uicore-layer"]').click('bottom');
17
+ cy.get('[data-test="dhis2-uicore-layer"] > .backdrop').click('bottom');
18
18
  });
19
19
  Given('a Modal with onClose handler is rendered', () => {
20
20
  cy.visitStory('Modal', 'With onClose');
@@ -30,7 +30,7 @@ export const Modal = _ref => {
30
30
  } = _ref;
31
31
  const layerStyles = resolveLayerStyles(hide);
32
32
  return /*#__PURE__*/React.createElement(Layer, {
33
- onClick: onClose,
33
+ onBackdropClick: onClose,
34
34
  className: layerStyles.className,
35
35
  translucent: !hide
36
36
  }, /*#__PURE__*/React.createElement(Center, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2-ui/modal",
3
- "version": "8.2.6",
3
+ "version": "8.3.0",
4
4
  "description": "UI Modal",
5
5
  "repository": {
6
6
  "type": "git",
@@ -31,13 +31,13 @@
31
31
  "styled-jsx": "^4"
32
32
  },
33
33
  "dependencies": {
34
- "@dhis2/prop-types": "^3.0.0-beta.1",
35
- "@dhis2-ui/card": "8.2.6",
36
- "@dhis2-ui/center": "8.2.6",
37
- "@dhis2-ui/layer": "8.2.6",
38
- "@dhis2-ui/portal": "8.2.6",
39
- "@dhis2/ui-constants": "8.2.6",
40
- "@dhis2/ui-icons": "8.2.6",
34
+ "@dhis2/prop-types": "^3.1.2",
35
+ "@dhis2-ui/card": "8.3.0",
36
+ "@dhis2-ui/center": "8.3.0",
37
+ "@dhis2-ui/layer": "8.3.0",
38
+ "@dhis2-ui/portal": "8.3.0",
39
+ "@dhis2/ui-constants": "8.3.0",
40
+ "@dhis2/ui-icons": "8.3.0",
41
41
  "classnames": "^2.3.1",
42
42
  "prop-types": "^15.7.2"
43
43
  },