@dhis2-ui/alert 7.1.0 → 7.2.2

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.
@@ -7,10 +7,10 @@ exports.Action = void 0;
7
7
 
8
8
  var _style = _interopRequireDefault(require("styled-jsx/style"));
9
9
 
10
- var _propTypes = _interopRequireDefault(require("@dhis2/prop-types"));
11
-
12
10
  var _uiConstants = require("@dhis2/ui-constants");
13
11
 
12
+ var _propTypes = _interopRequireDefault(require("prop-types"));
13
+
14
14
  var _react = _interopRequireWildcard(require("react"));
15
15
 
16
16
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -7,10 +7,12 @@ exports.actionsPropType = exports.Actions = void 0;
7
7
 
8
8
  var _style = _interopRequireDefault(require("styled-jsx/style"));
9
9
 
10
- var _propTypes = _interopRequireDefault(require("@dhis2/prop-types"));
10
+ var _propTypes = require("@dhis2/prop-types");
11
11
 
12
12
  var _uiConstants = require("@dhis2/ui-constants");
13
13
 
14
+ var _propTypes2 = _interopRequireDefault(require("prop-types"));
15
+
14
16
  var _react = _interopRequireDefault(require("react"));
15
17
 
16
18
  var _action = require("./action.js");
@@ -42,15 +44,13 @@ const Actions = ({
42
44
  };
43
45
 
44
46
  exports.Actions = Actions;
45
-
46
- const actionsPropType = _propTypes.default.arrayWithLength(0, 2, _propTypes.default.shape({
47
- label: _propTypes.default.string.isRequired,
48
- onClick: _propTypes.default.func.isRequired
47
+ const actionsPropType = (0, _propTypes.arrayWithLength)(0, 2, _propTypes2.default.shape({
48
+ label: _propTypes2.default.string.isRequired,
49
+ onClick: _propTypes2.default.func.isRequired
49
50
  }));
50
-
51
51
  exports.actionsPropType = actionsPropType;
52
52
  Actions.propTypes = {
53
- dataTest: _propTypes.default.string.isRequired,
54
- hide: _propTypes.default.func.isRequired,
53
+ dataTest: _propTypes2.default.string.isRequired,
54
+ hide: _propTypes2.default.func.isRequired,
55
55
  actions: actionsPropType
56
56
  };
@@ -7,12 +7,12 @@ exports.Dismiss = void 0;
7
7
 
8
8
  var _style = _interopRequireDefault(require("styled-jsx/style"));
9
9
 
10
- var _propTypes = _interopRequireDefault(require("@dhis2/prop-types"));
11
-
12
10
  var _uiConstants = require("@dhis2/ui-constants");
13
11
 
14
12
  var _uiIcons = require("@dhis2/ui-icons");
15
13
 
14
+ var _propTypes = _interopRequireDefault(require("prop-types"));
15
+
16
16
  var _react = _interopRequireDefault(require("react"));
17
17
 
18
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -7,12 +7,14 @@ exports.iconPropType = exports.Icon = void 0;
7
7
 
8
8
  var _style = _interopRequireDefault(require("styled-jsx/style"));
9
9
 
10
- var _propTypes = _interopRequireDefault(require("@dhis2/prop-types"));
10
+ var _propTypes = require("@dhis2/prop-types");
11
11
 
12
12
  var _uiConstants = require("@dhis2/ui-constants");
13
13
 
14
14
  var _uiIcons = require("@dhis2/ui-icons");
15
15
 
16
+ var _propTypes2 = _interopRequireDefault(require("prop-types"));
17
+
16
18
  var _react = _interopRequireDefault(require("react"));
17
19
 
18
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -55,12 +57,12 @@ StatusIcon.defaultProps = {
55
57
  defaultTo: null
56
58
  };
57
59
  StatusIcon.propTypes = {
58
- className: _propTypes.default.string,
59
- defaultTo: _propTypes.default.element,
60
- error: _propTypes.default.bool,
61
- info: _propTypes.default.bool,
62
- valid: _propTypes.default.bool,
63
- warning: _propTypes.default.bool
60
+ className: _propTypes2.default.string,
61
+ defaultTo: _propTypes2.default.element,
62
+ error: _propTypes2.default.bool,
63
+ info: _propTypes2.default.bool,
64
+ valid: _propTypes2.default.bool,
65
+ warning: _propTypes2.default.bool
64
66
  };
65
67
 
66
68
  const Icon = ({
@@ -91,14 +93,12 @@ const Icon = ({
91
93
 
92
94
  exports.Icon = Icon;
93
95
 
94
- const iconPropType = _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.element]);
96
+ const iconPropType = _propTypes2.default.oneOfType([_propTypes2.default.bool, _propTypes2.default.element]);
95
97
 
96
98
  exports.iconPropType = iconPropType;
97
-
98
- const alertStatePropType = _propTypes.default.mutuallyExclusive(['success', 'warning', 'critical', 'info'], _propTypes.default.bool);
99
-
99
+ const alertStatePropType = (0, _propTypes.mutuallyExclusive)(['success', 'warning', 'critical', 'info'], _propTypes2.default.bool);
100
100
  Icon.propTypes = {
101
- dataTest: _propTypes.default.string.isRequired,
101
+ dataTest: _propTypes2.default.string.isRequired,
102
102
  critical: alertStatePropType,
103
103
  icon: iconPropType,
104
104
  info: alertStatePropType,
@@ -7,7 +7,7 @@ exports.Message = void 0;
7
7
 
8
8
  var _style = _interopRequireDefault(require("styled-jsx/style"));
9
9
 
10
- var _propTypes = _interopRequireDefault(require("@dhis2/prop-types"));
10
+ var _propTypes = _interopRequireDefault(require("prop-types"));
11
11
 
12
12
  var _react = _interopRequireDefault(require("react"));
13
13
 
@@ -2,8 +2,8 @@ import _JSXStyle from "styled-jsx/style";
2
2
 
3
3
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
4
 
5
- import propTypes from '@dhis2/prop-types';
6
5
  import { spacers } from '@dhis2/ui-constants';
6
+ import PropTypes from 'prop-types';
7
7
  import React, { Component } from 'react';
8
8
 
9
9
  class Action extends Component {
@@ -30,9 +30,9 @@ class Action extends Component {
30
30
  }
31
31
 
32
32
  Action.propTypes = {
33
- dataTest: propTypes.string.isRequired,
34
- hide: propTypes.func.isRequired,
35
- label: propTypes.string.isRequired,
36
- onClick: propTypes.func.isRequired
33
+ dataTest: PropTypes.string.isRequired,
34
+ hide: PropTypes.func.isRequired,
35
+ label: PropTypes.string.isRequired,
36
+ onClick: PropTypes.func.isRequired
37
37
  };
38
38
  export { Action };
@@ -2,8 +2,9 @@ import _JSXStyle from "styled-jsx/style";
2
2
 
3
3
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
4
 
5
- import propTypes from '@dhis2/prop-types';
5
+ import { arrayWithLength } from '@dhis2/prop-types';
6
6
  import { spacers } from '@dhis2/ui-constants';
7
+ import PropTypes from 'prop-types';
7
8
  import React from 'react';
8
9
  import { Action } from './action.js';
9
10
 
@@ -29,13 +30,13 @@ const Actions = ({
29
30
  }, [`div.__jsx-style-dynamic-selector{margin-left:${spacers.dp48};margin-right:-${spacers.dp12};}`]));
30
31
  };
31
32
 
32
- const actionsPropType = propTypes.arrayWithLength(0, 2, propTypes.shape({
33
- label: propTypes.string.isRequired,
34
- onClick: propTypes.func.isRequired
33
+ const actionsPropType = arrayWithLength(0, 2, PropTypes.shape({
34
+ label: PropTypes.string.isRequired,
35
+ onClick: PropTypes.func.isRequired
35
36
  }));
36
37
  Actions.propTypes = {
37
- dataTest: propTypes.string.isRequired,
38
- hide: propTypes.func.isRequired,
38
+ dataTest: PropTypes.string.isRequired,
39
+ hide: PropTypes.func.isRequired,
39
40
  actions: actionsPropType
40
41
  };
41
42
  export { Actions, actionsPropType };
@@ -1,7 +1,7 @@
1
1
  import _JSXStyle from "styled-jsx/style";
2
- import propTypes from '@dhis2/prop-types';
3
2
  import { spacers } from '@dhis2/ui-constants';
4
3
  import { IconCross24 } from '@dhis2/ui-icons';
4
+ import PropTypes from 'prop-types';
5
5
  import React from 'react';
6
6
 
7
7
  const Dismiss = ({
@@ -17,7 +17,7 @@ const Dismiss = ({
17
17
  }, [`div.__jsx-style-dynamic-selector{margin-left:${spacers.dp16};min-height:32px;min-width:32px;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;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;border-radius:5px;}`, "div.__jsx-style-dynamic-selector:hover{cursor:pointer;background:rgba(0,0,0,0.15);}", "div.__jsx-style-dynamic-selector:active{background:rgba(0,0,0,0.25);}", "div.__jsx-style-dynamic-selector svg{width:18px;height:18px;}"]));
18
18
 
19
19
  Dismiss.propTypes = {
20
- dataTest: propTypes.string.isRequired,
21
- onClick: propTypes.func.isRequired
20
+ dataTest: PropTypes.string.isRequired,
21
+ onClick: PropTypes.func.isRequired
22
22
  };
23
23
  export { Dismiss };
@@ -1,7 +1,8 @@
1
1
  import _JSXStyle from "styled-jsx/style";
2
- import propTypes from '@dhis2/prop-types';
2
+ import { mutuallyExclusive } from '@dhis2/prop-types';
3
3
  import { spacers, colors } from '@dhis2/ui-constants';
4
4
  import { IconErrorFilled24, IconInfoFilled24, IconWarningFilled24, IconCheckmark24 } from '@dhis2/ui-icons';
5
+ import PropTypes from 'prop-types';
5
6
  import React from 'react';
6
7
 
7
8
  const StatusIcon = ({
@@ -42,12 +43,12 @@ StatusIcon.defaultProps = {
42
43
  defaultTo: null
43
44
  };
44
45
  StatusIcon.propTypes = {
45
- className: propTypes.string,
46
- defaultTo: propTypes.element,
47
- error: propTypes.bool,
48
- info: propTypes.bool,
49
- valid: propTypes.bool,
50
- warning: propTypes.bool
46
+ className: PropTypes.string,
47
+ defaultTo: PropTypes.element,
48
+ error: PropTypes.bool,
49
+ info: PropTypes.bool,
50
+ valid: PropTypes.bool,
51
+ warning: PropTypes.bool
51
52
  };
52
53
 
53
54
  const Icon = ({
@@ -76,10 +77,10 @@ const Icon = ({
76
77
  }, [`div.__jsx-style-dynamic-selector{margin-right:${spacers.dp16};}`]));
77
78
  };
78
79
 
79
- const iconPropType = propTypes.oneOfType([propTypes.bool, propTypes.element]);
80
- const alertStatePropType = propTypes.mutuallyExclusive(['success', 'warning', 'critical', 'info'], propTypes.bool);
80
+ const iconPropType = PropTypes.oneOfType([PropTypes.bool, PropTypes.element]);
81
+ const alertStatePropType = mutuallyExclusive(['success', 'warning', 'critical', 'info'], PropTypes.bool);
81
82
  Icon.propTypes = {
82
- dataTest: propTypes.string.isRequired,
83
+ dataTest: PropTypes.string.isRequired,
83
84
  critical: alertStatePropType,
84
85
  icon: iconPropType,
85
86
  info: alertStatePropType,
@@ -1,5 +1,5 @@
1
1
  import _JSXStyle from "styled-jsx/style";
2
- import propTypes from '@dhis2/prop-types';
2
+ import PropTypes from 'prop-types';
3
3
  import React from 'react';
4
4
 
5
5
  const Message = ({
@@ -11,6 +11,6 @@ const Message = ({
11
11
  }, ["div.jsx-3951482246{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;min-width:240px;}"]));
12
12
 
13
13
  Message.propTypes = {
14
- children: propTypes.string.isRequired
14
+ children: PropTypes.string.isRequired
15
15
  };
16
16
  export { Message };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2-ui/alert",
3
- "version": "7.1.0",
3
+ "version": "7.2.2",
4
4
  "description": "UI Alert",
5
5
  "repository": {
6
6
  "type": "git",
@@ -31,10 +31,10 @@
31
31
  "styled-jsx": "^4"
32
32
  },
33
33
  "dependencies": {
34
- "@dhis2-ui/portal": "7.1.0",
35
- "@dhis2/prop-types": "^1.6.4",
36
- "@dhis2/ui-constants": "7.1.0",
37
- "@dhis2/ui-icons": "7.1.0",
34
+ "@dhis2/prop-types": "^3.0.0-beta.1",
35
+ "@dhis2-ui/portal": "7.2.2",
36
+ "@dhis2/ui-constants": "7.2.2",
37
+ "@dhis2/ui-icons": "7.2.2",
38
38
  "classnames": "^2.3.1",
39
39
  "prop-types": "^15.7.2"
40
40
  },