@dhis2-ui/notice-box 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/notice-box-content.js +6 -7
- package/build/cjs/notice-box-icon.js +8 -9
- package/build/cjs/notice-box-message.js +5 -6
- package/build/cjs/notice-box-title.js +5 -6
- package/build/cjs/notice-box.js +11 -12
- package/build/es/notice-box-content.js +6 -7
- package/build/es/notice-box-icon.js +8 -9
- package/build/es/notice-box-message.js +5 -6
- package/build/es/notice-box-title.js +5 -6
- package/build/es/notice-box.js +11 -12
- package/package.json +3 -3
|
@@ -11,13 +11,12 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
11
11
|
var _noticeBoxMessage = require("./notice-box-message.js");
|
|
12
12
|
var _noticeBoxTitle = require("./notice-box-title.js");
|
|
13
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
-
const NoticeBoxContent =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
} = _ref;
|
|
14
|
+
const NoticeBoxContent = ({
|
|
15
|
+
children,
|
|
16
|
+
dataTest = 'dhis2-uicore-noticebox-content',
|
|
17
|
+
title,
|
|
18
|
+
dense = false
|
|
19
|
+
}) => {
|
|
21
20
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
22
21
|
"data-test": dataTest,
|
|
23
22
|
className: _style.default.dynamic([["11178332", [dense ? '2px' : _uiConstants.spacers.dp8, dense ? '0' : '3px']]])
|
|
@@ -11,15 +11,14 @@ var _uiIcons = require("@dhis2/ui-icons");
|
|
|
11
11
|
var _propTypes2 = _interopRequireDefault(require("prop-types"));
|
|
12
12
|
var _react = _interopRequireDefault(require("react"));
|
|
13
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
-
const NoticeBoxIcon =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} = _ref;
|
|
14
|
+
const NoticeBoxIcon = ({
|
|
15
|
+
valid,
|
|
16
|
+
warning,
|
|
17
|
+
error,
|
|
18
|
+
dataTest,
|
|
19
|
+
dense = false,
|
|
20
|
+
icon
|
|
21
|
+
}) => {
|
|
23
22
|
const marginInlineEnd = dense ? _uiConstants.spacers.dp8 : _uiConstants.spacers.dp12;
|
|
24
23
|
if (icon != null) {
|
|
25
24
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -9,12 +9,11 @@ var _uiConstants = require("@dhis2/ui-constants");
|
|
|
9
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
-
const NoticeBoxMessage =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
} = _ref;
|
|
12
|
+
const NoticeBoxMessage = ({
|
|
13
|
+
children,
|
|
14
|
+
dataTest,
|
|
15
|
+
dense = false
|
|
16
|
+
}) => {
|
|
18
17
|
if (!children) {
|
|
19
18
|
return null;
|
|
20
19
|
}
|
|
@@ -9,12 +9,11 @@ var _uiConstants = require("@dhis2/ui-constants");
|
|
|
9
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
-
const NoticeBoxTitle =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
} = _ref;
|
|
12
|
+
const NoticeBoxTitle = ({
|
|
13
|
+
title,
|
|
14
|
+
dataTest,
|
|
15
|
+
dense = false
|
|
16
|
+
}) => {
|
|
18
17
|
if (!title) {
|
|
19
18
|
return null;
|
|
20
19
|
}
|
package/build/cjs/notice-box.js
CHANGED
|
@@ -13,18 +13,17 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
13
13
|
var _noticeBoxContent = require("./notice-box-content.js");
|
|
14
14
|
var _noticeBoxIcon = require("./notice-box-icon.js");
|
|
15
15
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
|
-
const NoticeBox =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
} = _ref;
|
|
16
|
+
const NoticeBox = ({
|
|
17
|
+
className,
|
|
18
|
+
children,
|
|
19
|
+
dataTest = 'dhis2-uicore-noticebox',
|
|
20
|
+
title,
|
|
21
|
+
warning,
|
|
22
|
+
error,
|
|
23
|
+
valid,
|
|
24
|
+
dense = false,
|
|
25
|
+
icon
|
|
26
|
+
}) => {
|
|
28
27
|
const classnames = (0, _classnames.default)(className, 'root', {
|
|
29
28
|
warning,
|
|
30
29
|
error,
|
|
@@ -4,13 +4,12 @@ import PropTypes from 'prop-types';
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { NoticeBoxMessage } from './notice-box-message.js';
|
|
6
6
|
import { NoticeBoxTitle } from './notice-box-title.js';
|
|
7
|
-
export const NoticeBoxContent =
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
} = _ref;
|
|
7
|
+
export const NoticeBoxContent = ({
|
|
8
|
+
children,
|
|
9
|
+
dataTest = 'dhis2-uicore-noticebox-content',
|
|
10
|
+
title,
|
|
11
|
+
dense = false
|
|
12
|
+
}) => {
|
|
14
13
|
return /*#__PURE__*/React.createElement("div", {
|
|
15
14
|
"data-test": dataTest,
|
|
16
15
|
className: _JSXStyle.dynamic([["11178332", [dense ? '2px' : spacers.dp8, dense ? '0' : '3px']]])
|
|
@@ -4,15 +4,14 @@ import { colors, spacers } from '@dhis2/ui-constants';
|
|
|
4
4
|
import { IconCheckmarkCircle16, IconCheckmarkCircle24, IconErrorFilled16, IconErrorFilled24, IconInfoFilled16, IconInfoFilled24, IconWarningFilled16, IconWarningFilled24 } from '@dhis2/ui-icons';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import React from 'react';
|
|
7
|
-
export const NoticeBoxIcon =
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} = _ref;
|
|
7
|
+
export const NoticeBoxIcon = ({
|
|
8
|
+
valid,
|
|
9
|
+
warning,
|
|
10
|
+
error,
|
|
11
|
+
dataTest,
|
|
12
|
+
dense = false,
|
|
13
|
+
icon
|
|
14
|
+
}) => {
|
|
16
15
|
const marginInlineEnd = dense ? spacers.dp8 : spacers.dp12;
|
|
17
16
|
if (icon != null) {
|
|
18
17
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -2,12 +2,11 @@ import _JSXStyle from "styled-jsx/style";
|
|
|
2
2
|
import { colors } from '@dhis2/ui-constants';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import React from 'react';
|
|
5
|
-
export const NoticeBoxMessage =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
} = _ref;
|
|
5
|
+
export const NoticeBoxMessage = ({
|
|
6
|
+
children,
|
|
7
|
+
dataTest,
|
|
8
|
+
dense = false
|
|
9
|
+
}) => {
|
|
11
10
|
if (!children) {
|
|
12
11
|
return null;
|
|
13
12
|
}
|
|
@@ -2,12 +2,11 @@ import _JSXStyle from "styled-jsx/style";
|
|
|
2
2
|
import { colors } from '@dhis2/ui-constants';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import React from 'react';
|
|
5
|
-
export const NoticeBoxTitle =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
} = _ref;
|
|
5
|
+
export const NoticeBoxTitle = ({
|
|
6
|
+
title,
|
|
7
|
+
dataTest,
|
|
8
|
+
dense = false
|
|
9
|
+
}) => {
|
|
11
10
|
if (!title) {
|
|
12
11
|
return null;
|
|
13
12
|
}
|
package/build/es/notice-box.js
CHANGED
|
@@ -6,18 +6,17 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import { NoticeBoxContent } from './notice-box-content.js';
|
|
8
8
|
import { NoticeBoxIcon } from './notice-box-icon.js';
|
|
9
|
-
export const NoticeBox =
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
} = _ref;
|
|
9
|
+
export const NoticeBox = ({
|
|
10
|
+
className,
|
|
11
|
+
children,
|
|
12
|
+
dataTest = 'dhis2-uicore-noticebox',
|
|
13
|
+
title,
|
|
14
|
+
warning,
|
|
15
|
+
error,
|
|
16
|
+
valid,
|
|
17
|
+
dense = false,
|
|
18
|
+
icon
|
|
19
|
+
}) => {
|
|
21
20
|
const classnames = cx(className, 'root', {
|
|
22
21
|
warning,
|
|
23
22
|
error,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dhis2-ui/notice-box",
|
|
3
|
-
"version": "10.16.
|
|
3
|
+
"version": "10.16.4",
|
|
4
4
|
"description": "UI NoticeBox",
|
|
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-constants": "10.16.
|
|
37
|
-
"@dhis2/ui-icons": "10.16.
|
|
36
|
+
"@dhis2/ui-constants": "10.16.4",
|
|
37
|
+
"@dhis2/ui-icons": "10.16.4",
|
|
38
38
|
"classnames": "^2.3.1",
|
|
39
39
|
"prop-types": "^15.7.2"
|
|
40
40
|
},
|