@dhis2-ui/cover 10.16.3-alpha.1 → 10.16.4
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/build/cjs/cover.js
CHANGED
|
@@ -16,25 +16,22 @@ const createClickHandler = onClick => event => {
|
|
|
16
16
|
onClick({}, event);
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
|
-
const Cover =
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
const Cover = ({
|
|
20
|
+
children,
|
|
21
|
+
className,
|
|
22
|
+
dataTest = 'dhis2-uicore-componentcover',
|
|
23
|
+
onClick,
|
|
24
|
+
translucent
|
|
25
|
+
}) => /*#__PURE__*/_react.default.createElement("div", {
|
|
26
|
+
onClick: createClickHandler(onClick),
|
|
27
|
+
"data-test": dataTest,
|
|
28
|
+
className: _style.default.dynamic([["3798453419", [_uiConstants.layers.applicationTop]]]) + " " + ((0, _classnames.default)(className, {
|
|
25
29
|
translucent
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
translucent
|
|
32
|
-
}) || "")
|
|
33
|
-
}, children, /*#__PURE__*/_react.default.createElement(_style.default, {
|
|
34
|
-
id: "3798453419",
|
|
35
|
-
dynamic: [_uiConstants.layers.applicationTop]
|
|
36
|
-
}, [`div.__jsx-style-dynamic-selector{position:absolute;top:0;right:0;bottom:0;left:0;z-index:${_uiConstants.layers.applicationTop};}`, "div.translucent.__jsx-style-dynamic-selector{background:rgba(33,43,54,0.4);}"]));
|
|
37
|
-
};
|
|
30
|
+
}) || "")
|
|
31
|
+
}, children, /*#__PURE__*/_react.default.createElement(_style.default, {
|
|
32
|
+
id: "3798453419",
|
|
33
|
+
dynamic: [_uiConstants.layers.applicationTop]
|
|
34
|
+
}, [`div.__jsx-style-dynamic-selector{position:absolute;top:0;right:0;bottom:0;left:0;z-index:${_uiConstants.layers.applicationTop};}`, "div.translucent.__jsx-style-dynamic-selector{background:rgba(33,43,54,0.4);}"]));
|
|
38
35
|
exports.Cover = Cover;
|
|
39
36
|
Cover.propTypes = {
|
|
40
37
|
children: _propTypes.default.node,
|
|
@@ -14,8 +14,7 @@ var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preproces
|
|
|
14
14
|
cy.get('[data-test="dhis2-uicore-componentcover"]').click();
|
|
15
15
|
});
|
|
16
16
|
(0, _cypressCucumberPreprocessor.When)('the user clicks on the button coordinates', () => {
|
|
17
|
-
cy.getPositionsBySelectors('button').then(
|
|
18
|
-
let [rect] = _ref;
|
|
17
|
+
cy.getPositionsBySelectors('button').then(([rect]) => {
|
|
19
18
|
// Get button center coordinates
|
|
20
19
|
const buttonCenterX = rect.left + rect.width / 2;
|
|
21
20
|
const buttonCenterY = rect.top + rect.height / 2;
|
package/build/es/cover.js
CHANGED
|
@@ -9,25 +9,22 @@ const createClickHandler = onClick => event => {
|
|
|
9
9
|
onClick({}, event);
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
|
-
const Cover =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
const Cover = ({
|
|
13
|
+
children,
|
|
14
|
+
className,
|
|
15
|
+
dataTest = 'dhis2-uicore-componentcover',
|
|
16
|
+
onClick,
|
|
17
|
+
translucent
|
|
18
|
+
}) => /*#__PURE__*/React.createElement("div", {
|
|
19
|
+
onClick: createClickHandler(onClick),
|
|
20
|
+
"data-test": dataTest,
|
|
21
|
+
className: _JSXStyle.dynamic([["3798453419", [layers.applicationTop]]]) + " " + (cx(className, {
|
|
18
22
|
translucent
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
translucent
|
|
25
|
-
}) || "")
|
|
26
|
-
}, children, /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
27
|
-
id: "3798453419",
|
|
28
|
-
dynamic: [layers.applicationTop]
|
|
29
|
-
}, [`div.__jsx-style-dynamic-selector{position:absolute;top:0;right:0;bottom:0;left:0;z-index:${layers.applicationTop};}`, "div.translucent.__jsx-style-dynamic-selector{background:rgba(33,43,54,0.4);}"]));
|
|
30
|
-
};
|
|
23
|
+
}) || "")
|
|
24
|
+
}, children, /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
25
|
+
id: "3798453419",
|
|
26
|
+
dynamic: [layers.applicationTop]
|
|
27
|
+
}, [`div.__jsx-style-dynamic-selector{position:absolute;top:0;right:0;bottom:0;left:0;z-index:${layers.applicationTop};}`, "div.translucent.__jsx-style-dynamic-selector{background:rgba(33,43,54,0.4);}"]));
|
|
31
28
|
Cover.propTypes = {
|
|
32
29
|
children: PropTypes.node,
|
|
33
30
|
className: PropTypes.string,
|
|
@@ -12,8 +12,7 @@ When('the user clicks on the Cover', () => {
|
|
|
12
12
|
cy.get('[data-test="dhis2-uicore-componentcover"]').click();
|
|
13
13
|
});
|
|
14
14
|
When('the user clicks on the button coordinates', () => {
|
|
15
|
-
cy.getPositionsBySelectors('button').then(
|
|
16
|
-
let [rect] = _ref;
|
|
15
|
+
cy.getPositionsBySelectors('button').then(([rect]) => {
|
|
17
16
|
// Get button center coordinates
|
|
18
17
|
const buttonCenterX = rect.left + rect.width / 2;
|
|
19
18
|
const buttonCenterY = rect.top + rect.height / 2;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dhis2-ui/cover",
|
|
3
|
-
"version": "10.16.
|
|
3
|
+
"version": "10.16.4",
|
|
4
4
|
"description": "UI Cover",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@dhis2/prop-types": "^3.1.2",
|
|
36
|
-
"@dhis2/ui-constants": "10.16.
|
|
36
|
+
"@dhis2/ui-constants": "10.16.4",
|
|
37
37
|
"classnames": "^2.3.1",
|
|
38
38
|
"prop-types": "^15.7.2"
|
|
39
39
|
},
|