@dhis2-ui/alert 10.0.0-alpha.6 → 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/alert-bar/alert-bar.js +3 -8
- package/build/cjs/alert-bar/icon.js +1 -4
- package/build/cjs/alert-stack/alert-stack.js +1 -4
- package/build/es/alert-bar/alert-bar.js +3 -8
- package/build/es/alert-bar/icon.js +1 -4
- package/build/es/alert-stack/alert-stack.js +1 -4
- package/package.json +4 -4
@@ -23,10 +23,10 @@ const AlertBar = _ref => {
|
|
23
23
|
children,
|
24
24
|
className,
|
25
25
|
critical,
|
26
|
-
dataTest,
|
27
|
-
duration,
|
26
|
+
dataTest = 'dhis2-uicore-alertbar',
|
27
|
+
duration = 8000,
|
28
28
|
hidden,
|
29
|
-
icon,
|
29
|
+
icon = true,
|
30
30
|
permanent,
|
31
31
|
success,
|
32
32
|
warning,
|
@@ -132,11 +132,6 @@ const AlertBar = _ref => {
|
|
132
132
|
};
|
133
133
|
exports.AlertBar = AlertBar;
|
134
134
|
const alertTypePropType = (0, _propTypes.mutuallyExclusive)(['success', 'warning', 'critical'], _propTypes2.default.bool);
|
135
|
-
AlertBar.defaultProps = {
|
136
|
-
duration: 8000,
|
137
|
-
dataTest: 'dhis2-uicore-alertbar',
|
138
|
-
icon: true
|
139
|
-
};
|
140
135
|
AlertBar.propTypes = {
|
141
136
|
/** An array of 0-2 action objects
|
142
137
|
`[{label: "Save", onClick: clickHandler}]`*/
|
@@ -17,7 +17,7 @@ const StatusIcon = _ref => {
|
|
17
17
|
warning,
|
18
18
|
valid,
|
19
19
|
info,
|
20
|
-
defaultTo
|
20
|
+
defaultTo = null
|
21
21
|
} = _ref;
|
22
22
|
if (error) {
|
23
23
|
return /*#__PURE__*/_react.default.createElement(_uiIcons.IconErrorFilled24, {
|
@@ -41,9 +41,6 @@ const StatusIcon = _ref => {
|
|
41
41
|
}
|
42
42
|
return defaultTo;
|
43
43
|
};
|
44
|
-
StatusIcon.defaultProps = {
|
45
|
-
defaultTo: null
|
46
|
-
};
|
47
44
|
StatusIcon.propTypes = {
|
48
45
|
defaultTo: _propTypes2.default.element,
|
49
46
|
error: _propTypes2.default.bool,
|
@@ -15,7 +15,7 @@ const AlertStack = _ref => {
|
|
15
15
|
let {
|
16
16
|
className,
|
17
17
|
children,
|
18
|
-
dataTest
|
18
|
+
dataTest = 'dhis2-uicore-alertstack'
|
19
19
|
} = _ref;
|
20
20
|
return /*#__PURE__*/_react.default.createElement(_portal.Portal, null, /*#__PURE__*/_react.default.createElement("div", {
|
21
21
|
"data-test": dataTest,
|
@@ -26,9 +26,6 @@ const AlertStack = _ref => {
|
|
26
26
|
}, [`div.__jsx-style-dynamic-selector{position:fixed;top:auto;inset-inline-end:auto;bottom:0;inset-inline-start:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);z-index:${_uiConstants.layers.alert};display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column-reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse;pointer-events:none;}`, "div.__jsx-style-dynamic-selector:dir(rtl){-webkit-transform:translateX(50%);-ms-transform:translateX(50%);transform:translateX(50%);}"])));
|
27
27
|
};
|
28
28
|
exports.AlertStack = AlertStack;
|
29
|
-
AlertStack.defaultProps = {
|
30
|
-
dataTest: 'dhis2-uicore-alertstack'
|
31
|
-
};
|
32
29
|
AlertStack.propTypes = {
|
33
30
|
children: _propTypes.default.node,
|
34
31
|
className: _propTypes.default.string,
|
@@ -14,10 +14,10 @@ const AlertBar = _ref => {
|
|
14
14
|
children,
|
15
15
|
className,
|
16
16
|
critical,
|
17
|
-
dataTest,
|
18
|
-
duration,
|
17
|
+
dataTest = 'dhis2-uicore-alertbar',
|
18
|
+
duration = 8000,
|
19
19
|
hidden,
|
20
|
-
icon,
|
20
|
+
icon = true,
|
21
21
|
permanent,
|
22
22
|
success,
|
23
23
|
warning,
|
@@ -122,11 +122,6 @@ const AlertBar = _ref => {
|
|
122
122
|
}, styles));
|
123
123
|
};
|
124
124
|
const alertTypePropType = mutuallyExclusive(['success', 'warning', 'critical'], PropTypes.bool);
|
125
|
-
AlertBar.defaultProps = {
|
126
|
-
duration: 8000,
|
127
|
-
dataTest: 'dhis2-uicore-alertbar',
|
128
|
-
icon: true
|
129
|
-
};
|
130
125
|
AlertBar.propTypes = {
|
131
126
|
/** An array of 0-2 action objects
|
132
127
|
`[{label: "Save", onClick: clickHandler}]`*/
|
@@ -10,7 +10,7 @@ const StatusIcon = _ref => {
|
|
10
10
|
warning,
|
11
11
|
valid,
|
12
12
|
info,
|
13
|
-
defaultTo
|
13
|
+
defaultTo = null
|
14
14
|
} = _ref;
|
15
15
|
if (error) {
|
16
16
|
return /*#__PURE__*/React.createElement(IconErrorFilled24, {
|
@@ -34,9 +34,6 @@ const StatusIcon = _ref => {
|
|
34
34
|
}
|
35
35
|
return defaultTo;
|
36
36
|
};
|
37
|
-
StatusIcon.defaultProps = {
|
38
|
-
defaultTo: null
|
39
|
-
};
|
40
37
|
StatusIcon.propTypes = {
|
41
38
|
defaultTo: PropTypes.element,
|
42
39
|
error: PropTypes.bool,
|
@@ -8,7 +8,7 @@ export const AlertStack = _ref => {
|
|
8
8
|
let {
|
9
9
|
className,
|
10
10
|
children,
|
11
|
-
dataTest
|
11
|
+
dataTest = 'dhis2-uicore-alertstack'
|
12
12
|
} = _ref;
|
13
13
|
return /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement("div", {
|
14
14
|
"data-test": dataTest,
|
@@ -18,9 +18,6 @@ export const AlertStack = _ref => {
|
|
18
18
|
dynamic: [layers.alert]
|
19
19
|
}, [`div.__jsx-style-dynamic-selector{position:fixed;top:auto;inset-inline-end:auto;bottom:0;inset-inline-start:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);z-index:${layers.alert};display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column-reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse;pointer-events:none;}`, "div.__jsx-style-dynamic-selector:dir(rtl){-webkit-transform:translateX(50%);-ms-transform:translateX(50%);transform:translateX(50%);}"])));
|
20
20
|
};
|
21
|
-
AlertStack.defaultProps = {
|
22
|
-
dataTest: 'dhis2-uicore-alertstack'
|
23
|
-
};
|
24
21
|
AlertStack.propTypes = {
|
25
22
|
children: PropTypes.node,
|
26
23
|
className: PropTypes.string,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@dhis2-ui/alert",
|
3
|
-
"version": "10.0.0-alpha.
|
3
|
+
"version": "10.0.0-alpha.7",
|
4
4
|
"description": "UI Alert",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -33,9 +33,9 @@
|
|
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.
|
38
|
-
"@dhis2/ui-icons": "10.0.0-alpha.
|
36
|
+
"@dhis2-ui/portal": "10.0.0-alpha.7",
|
37
|
+
"@dhis2/ui-constants": "10.0.0-alpha.7",
|
38
|
+
"@dhis2/ui-icons": "10.0.0-alpha.7",
|
39
39
|
"classnames": "^2.3.1",
|
40
40
|
"prop-types": "^15.7.2"
|
41
41
|
},
|