@clayui/badge 3.107.0 → 3.128.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 +2 -2
- package/lib/index.js +17 -25
- package/package.json +2 -3
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
|
|
28
|
-
export default
|
|
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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
function _objectWithoutPropertiesLoose(
|
|
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
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
-
|
|
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.
|
|
3
|
+
"version": "3.128.0",
|
|
4
4
|
"description": "ClayBadge component",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"repository": "https://github.com/liferay/clay",
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
"scripts": {
|
|
18
18
|
"build": "cross-env NODE_ENV=production babel src --root-mode upward --out-dir lib --extensions .ts,.tsx",
|
|
19
19
|
"buildTypes": "cross-env NODE_ENV=production tsc --project ./tsconfig.declarations.json",
|
|
20
|
-
"prepublishOnly": "yarn build && yarn buildTypes",
|
|
21
20
|
"test": "jest --config ../../jest.config.js"
|
|
22
21
|
},
|
|
23
22
|
"keywords": [
|
|
@@ -35,5 +34,5 @@
|
|
|
35
34
|
"browserslist": [
|
|
36
35
|
"extends browserslist-config-clay"
|
|
37
36
|
],
|
|
38
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "98d935035547358645741cbc137cae53a596f568"
|
|
39
38
|
}
|