@dhis2-ui/header-bar 9.12.0-alpha.4 → 9.13.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.
- package/build/cjs/locales/pt/translations.json +3 -2
- package/build/cjs/notification-icon.js +1 -4
- package/build/cjs/profile/use-on-doc-click.test.js +3 -3
- package/build/es/locales/pt/translations.json +3 -2
- package/build/es/notification-icon.js +1 -4
- package/build/es/profile/use-on-doc-click.test.js +1 -1
- package/package.json +19 -19
|
@@ -17,8 +17,9 @@
|
|
|
17
17
|
"Account": "Conta",
|
|
18
18
|
"Help": "Ajuda",
|
|
19
19
|
"About DHIS2": "Sobre DHIS2",
|
|
20
|
-
"Logout": "",
|
|
20
|
+
"Logout": " Terminar sessão",
|
|
21
21
|
"New {{appName}} version available": "",
|
|
22
22
|
"New app version available": "",
|
|
23
|
-
"Click to reload": ""
|
|
23
|
+
"Click to reload": "",
|
|
24
|
+
"header bar profile": ""
|
|
24
25
|
}
|
|
@@ -24,7 +24,7 @@ function icon(kind) {
|
|
|
24
24
|
}
|
|
25
25
|
const NotificationIcon = _ref => {
|
|
26
26
|
let {
|
|
27
|
-
count,
|
|
27
|
+
count = 0,
|
|
28
28
|
href,
|
|
29
29
|
kind,
|
|
30
30
|
dataTestId,
|
|
@@ -47,9 +47,6 @@ const NotificationIcon = _ref => {
|
|
|
47
47
|
}, [`a.__jsx-style-dynamic-selector{position:relative;margin:0;cursor:pointer;padding:0 ${_uiConstants.spacers.dp12};height:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}`, "a.__jsx-style-dynamic-selector:focus{outline:2px solid white;outline-offset:-2px;}", "a.__jsx-style-dynamic-selector:focus.__jsx-style-dynamic-selector:not(:focus-visible){outline:none;}", "a.__jsx-style-dynamic-selector:hover{background:#1a557f;}", "a.__jsx-style-dynamic-selector:active{background:#104067;}", `span.__jsx-style-dynamic-selector{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;z-index:1;position:absolute;top:3px;inset-inline-end:2px;min-width:18px;min-height:18px;border-radius:${_uiConstants.spacers.dp12};box-shadow:0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px 0 rgba(0,0,0,0.06);background-color:${_uiConstants.theme.secondary500};color:${_uiConstants.colors.white};font-size:13px;font-weight:600;line-height:15px;text-align:center;cursor:inherit;padding:0 ${_uiConstants.spacers.dp4};}`]));
|
|
48
48
|
};
|
|
49
49
|
exports.NotificationIcon = NotificationIcon;
|
|
50
|
-
NotificationIcon.defaultProps = {
|
|
51
|
-
count: 0
|
|
52
|
-
};
|
|
53
50
|
NotificationIcon.propTypes = {
|
|
54
51
|
'aria-label': _propTypes.default.string.isRequired,
|
|
55
52
|
href: _propTypes.default.string.isRequired,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _react = require("@testing-library/react");
|
|
4
4
|
var _useOnDocClick = require("./use-on-doc-click.js");
|
|
5
5
|
describe('useOnDocClick', () => {
|
|
6
6
|
let eventListenerMap = {};
|
|
@@ -20,7 +20,7 @@ describe('useOnDocClick', () => {
|
|
|
20
20
|
const containerRef = {
|
|
21
21
|
current: el
|
|
22
22
|
};
|
|
23
|
-
(0,
|
|
23
|
+
(0, _react.renderHook)(() => (0, _useOnDocClick.useOnDocClick)(containerRef, hide));
|
|
24
24
|
eventListenerMap.click({
|
|
25
25
|
target: document.body
|
|
26
26
|
});
|
|
@@ -31,7 +31,7 @@ describe('useOnDocClick', () => {
|
|
|
31
31
|
const containerRef = {
|
|
32
32
|
current: el
|
|
33
33
|
};
|
|
34
|
-
(0,
|
|
34
|
+
(0, _react.renderHook)(() => (0, _useOnDocClick.useOnDocClick)(containerRef, hide));
|
|
35
35
|
eventListenerMap.click({
|
|
36
36
|
target: el
|
|
37
37
|
});
|
|
@@ -17,8 +17,9 @@
|
|
|
17
17
|
"Account": "Conta",
|
|
18
18
|
"Help": "Ajuda",
|
|
19
19
|
"About DHIS2": "Sobre DHIS2",
|
|
20
|
-
"Logout": "",
|
|
20
|
+
"Logout": " Terminar sessão",
|
|
21
21
|
"New {{appName}} version available": "",
|
|
22
22
|
"New app version available": "",
|
|
23
|
-
"Click to reload": ""
|
|
23
|
+
"Click to reload": "",
|
|
24
|
+
"header bar profile": ""
|
|
24
25
|
}
|
|
@@ -17,7 +17,7 @@ function icon(kind) {
|
|
|
17
17
|
}
|
|
18
18
|
export const NotificationIcon = _ref => {
|
|
19
19
|
let {
|
|
20
|
-
count,
|
|
20
|
+
count = 0,
|
|
21
21
|
href,
|
|
22
22
|
kind,
|
|
23
23
|
dataTestId,
|
|
@@ -39,9 +39,6 @@ export const NotificationIcon = _ref => {
|
|
|
39
39
|
dynamic: [spacers.dp12, spacers.dp12, theme.secondary500, colors.white, spacers.dp4]
|
|
40
40
|
}, [`a.__jsx-style-dynamic-selector{position:relative;margin:0;cursor:pointer;padding:0 ${spacers.dp12};height:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}`, "a.__jsx-style-dynamic-selector:focus{outline:2px solid white;outline-offset:-2px;}", "a.__jsx-style-dynamic-selector:focus.__jsx-style-dynamic-selector:not(:focus-visible){outline:none;}", "a.__jsx-style-dynamic-selector:hover{background:#1a557f;}", "a.__jsx-style-dynamic-selector:active{background:#104067;}", `span.__jsx-style-dynamic-selector{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;z-index:1;position:absolute;top:3px;inset-inline-end:2px;min-width:18px;min-height:18px;border-radius:${spacers.dp12};box-shadow:0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px 0 rgba(0,0,0,0.06);background-color:${theme.secondary500};color:${colors.white};font-size:13px;font-weight:600;line-height:15px;text-align:center;cursor:inherit;padding:0 ${spacers.dp4};}`]));
|
|
41
41
|
};
|
|
42
|
-
NotificationIcon.defaultProps = {
|
|
43
|
-
count: 0
|
|
44
|
-
};
|
|
45
42
|
NotificationIcon.propTypes = {
|
|
46
43
|
'aria-label': PropTypes.string.isRequired,
|
|
47
44
|
href: PropTypes.string.isRequired,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dhis2-ui/header-bar",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.13.0",
|
|
4
4
|
"description": "UI HeaderBar",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -29,26 +29,26 @@
|
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"@dhis2/app-runtime": "^3",
|
|
31
31
|
"@dhis2/d2-i18n": "^1",
|
|
32
|
-
"react": "^16.13",
|
|
33
|
-
"react-dom": "^16.13",
|
|
32
|
+
"react": "^16.13 || ^18",
|
|
33
|
+
"react-dom": "^16.13 || ^18",
|
|
34
34
|
"styled-jsx": "^4"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@dhis2-ui/box": "9.
|
|
38
|
-
"@dhis2-ui/button": "9.
|
|
39
|
-
"@dhis2-ui/card": "9.
|
|
40
|
-
"@dhis2-ui/center": "9.
|
|
41
|
-
"@dhis2-ui/divider": "9.
|
|
42
|
-
"@dhis2-ui/input": "9.
|
|
43
|
-
"@dhis2-ui/layer": "9.
|
|
44
|
-
"@dhis2-ui/loader": "9.
|
|
45
|
-
"@dhis2-ui/logo": "9.
|
|
46
|
-
"@dhis2-ui/menu": "9.
|
|
47
|
-
"@dhis2-ui/modal": "9.
|
|
48
|
-
"@dhis2-ui/user-avatar": "9.
|
|
37
|
+
"@dhis2-ui/box": "9.13.0",
|
|
38
|
+
"@dhis2-ui/button": "9.13.0",
|
|
39
|
+
"@dhis2-ui/card": "9.13.0",
|
|
40
|
+
"@dhis2-ui/center": "9.13.0",
|
|
41
|
+
"@dhis2-ui/divider": "9.13.0",
|
|
42
|
+
"@dhis2-ui/input": "9.13.0",
|
|
43
|
+
"@dhis2-ui/layer": "9.13.0",
|
|
44
|
+
"@dhis2-ui/loader": "9.13.0",
|
|
45
|
+
"@dhis2-ui/logo": "9.13.0",
|
|
46
|
+
"@dhis2-ui/menu": "9.13.0",
|
|
47
|
+
"@dhis2-ui/modal": "9.13.0",
|
|
48
|
+
"@dhis2-ui/user-avatar": "9.13.0",
|
|
49
49
|
"@dhis2/prop-types": "^3.1.2",
|
|
50
|
-
"@dhis2/ui-constants": "9.
|
|
51
|
-
"@dhis2/ui-icons": "9.
|
|
50
|
+
"@dhis2/ui-constants": "9.13.0",
|
|
51
|
+
"@dhis2/ui-icons": "9.13.0",
|
|
52
52
|
"classnames": "^2.3.1",
|
|
53
53
|
"moment": "^2.29.1",
|
|
54
54
|
"prop-types": "^15.7.2"
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@dhis2/app-runtime": "^3.9.0",
|
|
62
62
|
"@dhis2/d2-i18n": "^1.1.0",
|
|
63
|
-
"react": "
|
|
64
|
-
"react-dom": "
|
|
63
|
+
"react": "^18.3.1",
|
|
64
|
+
"react-dom": "^18.3.1",
|
|
65
65
|
"styled-jsx": "^4.0.1"
|
|
66
66
|
},
|
|
67
67
|
"types": "types"
|