@dhis2-ui/layer 10.0.0-alpha.5 → 10.0.0-alpha.7
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/layer.js
CHANGED
|
@@ -15,12 +15,12 @@ const Layer = _ref => {
|
|
|
15
15
|
let {
|
|
16
16
|
children,
|
|
17
17
|
className,
|
|
18
|
-
dataTest,
|
|
18
|
+
dataTest = 'dhis2-uicore-layer',
|
|
19
19
|
disablePortal,
|
|
20
|
-
level,
|
|
20
|
+
level = 'auto',
|
|
21
21
|
onBackdropClick,
|
|
22
22
|
onClick,
|
|
23
|
-
position,
|
|
23
|
+
position = 'fixed',
|
|
24
24
|
translucent
|
|
25
25
|
} = _ref;
|
|
26
26
|
const resolvedOnClick = onBackdropClick || onClick;
|
|
@@ -42,11 +42,6 @@ const Layer = _ref => {
|
|
|
42
42
|
}, ["div.jsx-4284133831{-webkit-inset-block-start:0;-ms-intb-rlock-start:0;inset-block-start:0;inset-inline-start:0;min-height:100vh;min-width:100vw;}", "div.fixed.jsx-4284133831{position:fixed;height:100vh;width:100vw;}", "div.absolute.jsx-4284133831{position:absolute;height:100%;width:100%;}", "div.translucent.jsx-4284133831{background-color:rgba(33,43,54,0.4);}", "div.backdrop.jsx-4284133831{position:absolute;inset:0;z-index:-1;}"])));
|
|
43
43
|
};
|
|
44
44
|
exports.Layer = Layer;
|
|
45
|
-
Layer.defaultProps = {
|
|
46
|
-
position: 'fixed',
|
|
47
|
-
dataTest: 'dhis2-uicore-layer',
|
|
48
|
-
level: 'auto'
|
|
49
|
-
};
|
|
50
45
|
Layer.propTypes = {
|
|
51
46
|
children: _propTypes2.default.node,
|
|
52
47
|
className: _propTypes2.default.string,
|
|
@@ -41,7 +41,9 @@ var _default = exports.default = {
|
|
|
41
41
|
},
|
|
42
42
|
// Handle weird treatment of non-literal defaultProps (see Transfer.stories)
|
|
43
43
|
args: {
|
|
44
|
-
|
|
44
|
+
position: 'fixed',
|
|
45
|
+
dataTest: 'dhis2-uicore-layer',
|
|
46
|
+
level: 'auto'
|
|
45
47
|
}
|
|
46
48
|
};
|
|
47
49
|
const Template = args => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_layer.Layer, args), /*#__PURE__*/_react.default.createElement("h1", null, "Text behind the layer"), /*#__PURE__*/_react.default.createElement("p", null, "Lorem ipsum"));
|
package/build/es/layer.js
CHANGED
|
@@ -8,12 +8,12 @@ const Layer = _ref => {
|
|
|
8
8
|
let {
|
|
9
9
|
children,
|
|
10
10
|
className,
|
|
11
|
-
dataTest,
|
|
11
|
+
dataTest = 'dhis2-uicore-layer',
|
|
12
12
|
disablePortal,
|
|
13
|
-
level,
|
|
13
|
+
level = 'auto',
|
|
14
14
|
onBackdropClick,
|
|
15
15
|
onClick,
|
|
16
|
-
position,
|
|
16
|
+
position = 'fixed',
|
|
17
17
|
translucent
|
|
18
18
|
} = _ref;
|
|
19
19
|
const resolvedOnClick = onBackdropClick || onClick;
|
|
@@ -34,11 +34,6 @@ const Layer = _ref => {
|
|
|
34
34
|
id: "4284133831"
|
|
35
35
|
}, ["div.jsx-4284133831{-webkit-inset-block-start:0;-ms-intb-rlock-start:0;inset-block-start:0;inset-inline-start:0;min-height:100vh;min-width:100vw;}", "div.fixed.jsx-4284133831{position:fixed;height:100vh;width:100vw;}", "div.absolute.jsx-4284133831{position:absolute;height:100%;width:100%;}", "div.translucent.jsx-4284133831{background-color:rgba(33,43,54,0.4);}", "div.backdrop.jsx-4284133831{position:absolute;inset:0;z-index:-1;}"])));
|
|
36
36
|
};
|
|
37
|
-
Layer.defaultProps = {
|
|
38
|
-
position: 'fixed',
|
|
39
|
-
dataTest: 'dhis2-uicore-layer',
|
|
40
|
-
level: 'auto'
|
|
41
|
-
};
|
|
42
37
|
Layer.propTypes = {
|
|
43
38
|
children: PropTypes.node,
|
|
44
39
|
className: PropTypes.string,
|
|
@@ -34,7 +34,9 @@ export default {
|
|
|
34
34
|
},
|
|
35
35
|
// Handle weird treatment of non-literal defaultProps (see Transfer.stories)
|
|
36
36
|
args: {
|
|
37
|
-
|
|
37
|
+
position: 'fixed',
|
|
38
|
+
dataTest: 'dhis2-uicore-layer',
|
|
39
|
+
level: 'auto'
|
|
38
40
|
}
|
|
39
41
|
};
|
|
40
42
|
const Template = args => /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Layer, args), /*#__PURE__*/React.createElement("h1", null, "Text behind the layer"), /*#__PURE__*/React.createElement("p", null, "Lorem ipsum"));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dhis2-ui/layer",
|
|
3
|
-
"version": "10.0.0-alpha.
|
|
3
|
+
"version": "10.0.0-alpha.7",
|
|
4
4
|
"description": "UI Layer",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@dhis2/prop-types": "^3.1.2",
|
|
36
|
-
"@dhis2-ui/portal": "10.0.0-alpha.
|
|
37
|
-
"@dhis2/ui-constants": "10.0.0-alpha.
|
|
36
|
+
"@dhis2-ui/portal": "10.0.0-alpha.7",
|
|
37
|
+
"@dhis2/ui-constants": "10.0.0-alpha.7",
|
|
38
38
|
"classnames": "^2.3.1",
|
|
39
39
|
"prop-types": "^15.7.2"
|
|
40
40
|
},
|