@clayui/badge 3.111.0 → 3.129.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/lib/index.d.ts CHANGED
@@ -24,5 +24,5 @@ interface IProps extends React.HTMLAttributes<HTMLSpanElement> {
24
24
  */
25
25
  translucent?: boolean;
26
26
  }
27
- declare const ClayBadge: React.ForwardRefExoticComponent<IProps & React.RefAttributes<HTMLSpanElement>>;
28
- export default ClayBadge;
27
+ declare const Badge: React.ForwardRefExoticComponent<IProps & React.RefAttributes<HTMLSpanElement>>;
28
+ export default Badge;
package/lib/index.js CHANGED
@@ -4,30 +4,25 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _classnames = _interopRequireDefault(require("classnames"));
9
-
10
8
  var _react = _interopRequireDefault(require("react"));
11
-
12
9
  var _excluded = ["className", "dark", "displayType", "label", "translucent"];
13
-
14
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
16
- function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
17
-
18
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
19
-
20
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
21
-
22
- var ClayBadge = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
10
+ /**
11
+ * SPDX-FileCopyrightText: © 2019 Liferay, Inc. <https://liferay.com>
12
+ * SPDX-License-Identifier: BSD-3-Clause
13
+ */
14
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) { ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } } return n; }, _extends.apply(null, arguments); }
16
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) { o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } } return i; }
17
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) { if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } } return t; }
18
+ var Badge = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
23
19
  var className = _ref.className,
24
- dark = _ref.dark,
25
- _ref$displayType = _ref.displayType,
26
- displayType = _ref$displayType === void 0 ? 'primary' : _ref$displayType,
27
- label = _ref.label,
28
- translucent = _ref.translucent,
29
- otherProps = _objectWithoutProperties(_ref, _excluded);
30
-
20
+ dark = _ref.dark,
21
+ _ref$displayType = _ref.displayType,
22
+ displayType = _ref$displayType === void 0 ? 'primary' : _ref$displayType,
23
+ label = _ref.label,
24
+ translucent = _ref.translucent,
25
+ otherProps = _objectWithoutProperties(_ref, _excluded);
31
26
  if (displayType === 'beta') {
32
27
  displayType = 'info';
33
28
  translucent = true;
@@ -36,7 +31,6 @@ var ClayBadge = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
36
31
  displayType = 'info';
37
32
  translucent = true;
38
33
  }
39
-
40
34
  return /*#__PURE__*/_react.default.createElement("span", _extends({}, otherProps, {
41
35
  className: (0, _classnames.default)('badge', "badge-".concat(displayType), className, {
42
36
  'badge-translucent': translucent,
@@ -47,7 +41,5 @@ var ClayBadge = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
47
41
  className: "badge-item badge-item-expand"
48
42
  }, label));
49
43
  });
50
-
51
- ClayBadge.displayName = 'ClayBadge';
52
- var _default = ClayBadge;
53
- exports.default = _default;
44
+ Badge.displayName = 'ClayBadge';
45
+ var _default = exports.default = Badge;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clayui/badge",
3
- "version": "3.111.0",
3
+ "version": "3.129.0",
4
4
  "description": "ClayBadge component",
5
5
  "license": "BSD-3-Clause",
6
6
  "repository": "https://github.com/liferay/clay",
@@ -28,11 +28,11 @@
28
28
  },
29
29
  "peerDependencies": {
30
30
  "@clayui/css": "3.x",
31
- "react": "^16.12.0",
32
- "react-dom": "^16.12.0"
31
+ "react": "^18.2.0",
32
+ "react-dom": "^18.2.0"
33
33
  },
34
34
  "browserslist": [
35
35
  "extends browserslist-config-clay"
36
36
  ],
37
- "gitHead": "7dae7b1ba2f61516876e5799dc95045a5adb2c18"
37
+ "gitHead": "f563be12a87d6fcf03706d235618e5512de63463"
38
38
  }
package/CHANGELOG.md DELETED
@@ -1,85 +0,0 @@
1
- # Change Log
2
-
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
-
6
- # [3.111.0](https://github.com/liferay/clay/compare/v3.110.0...v3.111.0) (2024-02-15)
7
-
8
- **Note:** Version bump only for package @clayui/badge
9
-
10
- # [3.107.0](https://github.com/liferay/clay/compare/v3.106.1...v3.107.0) (2023-11-27)
11
-
12
- ### Features
13
-
14
- - **@clayui/badge:** Adds attributes translucent and dark ([77162ef](https://github.com/liferay/clay/commit/77162efe62cd3822f4a64e23b3469e46cee5c530))
15
-
16
- ## [3.106.1](https://github.com/liferay/clay/compare/v3.106.0...v3.106.1) (2023-10-26)
17
-
18
- **Note:** Version bump only for package @clayui/badge
19
-
20
- # [3.106.0](https://github.com/liferay/clay/compare/v3.105.0...v3.106.0) (2023-10-25)
21
-
22
- ### Bug Fixes
23
-
24
- - remove 'src' dir from being packaged with npm ([9383e8d](https://github.com/liferay/clay/commit/9383e8d8abb25ca3396e7c6e4dfa53bbc72691c5))
25
- - use package's directory for baseDir when generating type ([0a5c710](https://github.com/liferay/clay/commit/0a5c710092f36243bc8d5487f70e831295715072))
26
-
27
- # [3.100.0](https://github.com/liferay/clay/compare/v3.99.4...v3.100.0) (2023-07-13)
28
-
29
- ### Features
30
-
31
- - **@clayui/badge:** Adds display type beta-dark ([2f53849](https://github.com/liferay/clay/commit/2f5384940aff5909753adeecd8a2f9c12d3dab89))
32
-
33
- # [3.92.0](https://github.com/liferay/clay/compare/v3.91.0...v3.92.0) (2023-04-06)
34
-
35
- **Note:** Version bump only for package @clayui/badge
36
-
37
- # [3.56.0](https://github.com/liferay/clay/compare/v3.55.0...v3.56.0) (2022-05-09)
38
-
39
- **Note:** Version bump only for package @clayui/badge
40
-
41
- # [3.40.0](https://github.com/liferay/clay/compare/v3.39.0...v3.40.0) (2021-11-17)
42
-
43
- **Note:** Version bump only for package @clayui/badge
44
-
45
- # [3.39.0](https://github.com/liferay/clay/compare/v3.38.0...v3.39.0) (2021-10-29)
46
-
47
- **Note:** Version bump only for package @clayui/badge
48
-
49
- # [3.38.0](https://github.com/liferay/clay/compare/v3.37.0...v3.38.0) (2021-10-22)
50
-
51
- **Note:** Version bump only for package @clayui/badge
52
-
53
- # [3.37.0](https://github.com/liferay/clay/compare/v3.36.0...v3.37.0) (2021-10-06)
54
-
55
- **Note:** Version bump only for package @clayui/badge
56
-
57
- # [3.32.0](https://github.com/liferay/clay/compare/v3.31.0...v3.32.0) (2021-07-28)
58
-
59
- **Note:** Version bump only for package @clayui/badge
60
-
61
- # [3.2.0](https://github.com/liferay/clay/compare/@clayui/badge@3.1.0...@clayui/badge@3.2.0) (2020-10-01)
62
-
63
- ### Features
64
-
65
- - **clayui.com:** Add JSP code example to Badge ([caa9ecc](https://github.com/liferay/clay/commit/caa9ecc))
66
- - **clayui.com:** Move API tables to new files and update document tabs, rename files to use singular naming instead of plural, change mainTabURL of pagination-bar to a proper one ([d812ee9](https://github.com/liferay/clay/commit/d812ee9))
67
- - add displayName for all components ([cc3211d](https://github.com/liferay/clay/commit/cc3211d))
68
-
69
- # [3.1.0](https://github.com/liferay/clay/compare/@clayui/badge@3.0.2...@clayui/badge@3.1.0) (2020-05-21)
70
-
71
- ### Features
72
-
73
- - **clayui.com:** Improve component docs by updating content - Badge, Breadcrumb, Dual List Box, Loading Indicator, Localized Input & Multi Step Nav ([c4ad126](https://github.com/liferay/clay/commit/c4ad126))
74
-
75
- ## [3.0.2](https://github.com/liferay/clay/compare/@clayui/badge@3.0.1...@clayui/badge@3.0.2) (2020-04-24)
76
-
77
- **Note:** Version bump only for package @clayui/badge
78
-
79
- ## 3.0.1 (2020-02-28)
80
-
81
- ### Bug Fixes
82
-
83
- - update components to include 'types' and 'ts:main' package keys ([9e24b59](https://github.com/liferay/clay/commit/9e24b59))
84
- - **@clayui/badge:** Forward ClayBadge refs ([98576ab](https://github.com/liferay/clay/commit/98576ab))
85
- - **@clayui/badge:** improve types ([683d776](https://github.com/liferay/clay/commit/683d776))