@dhis2-ui/tag 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/tag.js CHANGED
@@ -15,14 +15,14 @@ var _tagText = require("./tag-text.js");
15
15
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
16
16
  const Tag = _ref => {
17
17
  let {
18
- maxWidth,
18
+ maxWidth = '240px',
19
19
  neutral,
20
20
  negative,
21
21
  positive,
22
22
  icon,
23
23
  bold,
24
24
  className,
25
- dataTest,
25
+ dataTest = 'dhis2-uicore-tag',
26
26
  children
27
27
  } = _ref;
28
28
  return /*#__PURE__*/_react.default.createElement("div", {
@@ -44,10 +44,6 @@ const Tag = _ref => {
44
44
  };
45
45
  exports.Tag = Tag;
46
46
  const tagVariantPropType = (0, _propTypes.mutuallyExclusive)(['neutral', 'positive', 'negative'], _propTypes2.default.bool);
47
- Tag.defaultProps = {
48
- dataTest: 'dhis2-uicore-tag',
49
- maxWidth: '240px'
50
- };
51
47
  Tag.propTypes = {
52
48
  /** Use bold tags where it is important that the tag is seen by the user in an information dense interface. Bold tags should be reserved for edge cases and not overused. */
53
49
  bold: _propTypes2.default.bool,
package/build/es/tag.js CHANGED
@@ -8,14 +8,14 @@ import { TagIcon } from './tag-icon.js';
8
8
  import { TagText } from './tag-text.js';
9
9
  export const Tag = _ref => {
10
10
  let {
11
- maxWidth,
11
+ maxWidth = '240px',
12
12
  neutral,
13
13
  negative,
14
14
  positive,
15
15
  icon,
16
16
  bold,
17
17
  className,
18
- dataTest,
18
+ dataTest = 'dhis2-uicore-tag',
19
19
  children
20
20
  } = _ref;
21
21
  return /*#__PURE__*/React.createElement("div", {
@@ -36,10 +36,6 @@ export const Tag = _ref => {
36
36
  }, [`div.__jsx-style-dynamic-selector{padding:5px 6px;border-radius:3px;background-color:${colors.grey300};fill:${colors.grey700};color:${colors.grey900};max-width:${maxWidth};display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-size:13px;height:23px;}`, `.negative.__jsx-style-dynamic-selector{background-color:${colors.red100};fill:${colors.red800};color:${colors.red900};}`, `.neutral.__jsx-style-dynamic-selector{background-color:${colors.blue100};fill:${colors.blue800};color:${colors.blue900};}`, `.positive.__jsx-style-dynamic-selector{background-color:${colors.green100};fill:${colors.green800};color:${colors.green900};}`, `.bold.__jsx-style-dynamic-selector{font-weight:700;background-color:${colors.grey700};color:${colors.white};fill:${colors.white};}`, `.bold.neutral.__jsx-style-dynamic-selector{background-color:${colors.blue800};color:${colors.blue050};fill:${colors.white};}`, `.bold.positive.__jsx-style-dynamic-selector{background-color:${colors.green700};color:${colors.green050};fill:${colors.white};}`, `.bold.negative.__jsx-style-dynamic-selector{background-color:${colors.red700};color:${colors.red050};fill:${colors.white};}`]));
37
37
  };
38
38
  const tagVariantPropType = mutuallyExclusive(['neutral', 'positive', 'negative'], PropTypes.bool);
39
- Tag.defaultProps = {
40
- dataTest: 'dhis2-uicore-tag',
41
- maxWidth: '240px'
42
- };
43
39
  Tag.propTypes = {
44
40
  /** Use bold tags where it is important that the tag is seen by the user in an information dense interface. Bold tags should be reserved for edge cases and not overused. */
45
41
  bold: PropTypes.bool,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2-ui/tag",
3
- "version": "9.12.0-alpha.4",
3
+ "version": "9.13.0",
4
4
  "description": "UI Tag",
5
5
  "repository": {
6
6
  "type": "git",
@@ -27,13 +27,13 @@
27
27
  "test": "d2-app-scripts test --jestConfig ../../jest.config.shared.js"
28
28
  },
29
29
  "peerDependencies": {
30
- "react": "^16.13",
31
- "react-dom": "^16.13",
30
+ "react": "^16.13 || ^18",
31
+ "react-dom": "^16.13 || ^18",
32
32
  "styled-jsx": "^4"
33
33
  },
34
34
  "dependencies": {
35
35
  "@dhis2/prop-types": "^3.1.2",
36
- "@dhis2/ui-constants": "9.12.0-alpha.4",
36
+ "@dhis2/ui-constants": "9.13.0",
37
37
  "classnames": "^2.3.1",
38
38
  "prop-types": "^15.7.2"
39
39
  },
@@ -42,8 +42,8 @@
42
42
  "types"
43
43
  ],
44
44
  "devDependencies": {
45
- "react": "16.13",
46
- "react-dom": "16.13",
45
+ "react": "^18.3.1",
46
+ "react-dom": "^18.3.1",
47
47
  "styled-jsx": "^4.0.1"
48
48
  },
49
49
  "types": "types"