@atlaskit/badge 16.0.0 → 16.1.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/CHANGELOG.md +6 -0
- package/dist/cjs/badge.js +1 -20
- package/dist/es2019/badge.js +1 -19
- package/dist/esm/badge.js +1 -19
- package/package.json +4 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/badge
|
|
2
2
|
|
|
3
|
+
## 16.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#94806](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/94806) [`6f40240a7290`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/6f40240a7290) - Removed feature flag from previous release, keeping the newer changes.
|
|
8
|
+
|
|
3
9
|
## 16.0.0
|
|
4
10
|
|
|
5
11
|
### Major Changes
|
package/dist/cjs/badge.js
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _text = _interopRequireDefault(require("@atlaskit/ds-explorations/text"));
|
|
11
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
9
|
var _primitives = require("@atlaskit/primitives");
|
|
13
10
|
var _utils = require("./internal/utils");
|
|
14
11
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
@@ -47,18 +44,10 @@ var Badge = /*#__PURE__*/(0, _react.memo)(function Badge(_ref) {
|
|
|
47
44
|
color: style === null || style === void 0 ? void 0 : style.color
|
|
48
45
|
},
|
|
49
46
|
paddingInline: "space.075"
|
|
50
|
-
},
|
|
47
|
+
}, /*#__PURE__*/_react.default.createElement(_primitives.Text, {
|
|
51
48
|
size: "UNSAFE_small",
|
|
52
49
|
align: "center",
|
|
53
50
|
color: style !== null && style !== void 0 && style.color ? 'inherit' : textColors[appearance]
|
|
54
|
-
}, typeof children === 'number' && max ? (0, _utils.formatValue)(children, max) : children) : /*#__PURE__*/_react.default.createElement(_text.default, {
|
|
55
|
-
fontSize: "size.075",
|
|
56
|
-
lineHeight: "lineHeight.100",
|
|
57
|
-
textAlign: "center",
|
|
58
|
-
color: textColorsOld[appearance],
|
|
59
|
-
UNSAFE_style: style !== null && style !== void 0 && style.color ? {
|
|
60
|
-
color: style.color
|
|
61
|
-
} : undefined
|
|
62
51
|
}, typeof children === 'number' && max ? (0, _utils.formatValue)(children, max) : children));
|
|
63
52
|
});
|
|
64
53
|
Badge.displayName = 'Badge';
|
|
@@ -71,14 +60,6 @@ var backgroundColors = {
|
|
|
71
60
|
primaryInverted: 'elevation.surface',
|
|
72
61
|
removed: 'color.background.danger'
|
|
73
62
|
};
|
|
74
|
-
var textColorsOld = {
|
|
75
|
-
added: 'success',
|
|
76
|
-
default: 'color.text',
|
|
77
|
-
important: 'inverse',
|
|
78
|
-
primary: 'inverse',
|
|
79
|
-
primaryInverted: 'brand',
|
|
80
|
-
removed: 'danger'
|
|
81
|
-
};
|
|
82
63
|
var textColors = {
|
|
83
64
|
added: 'color.text.success',
|
|
84
65
|
default: 'color.text',
|
package/dist/es2019/badge.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import React, { memo } from 'react';
|
|
2
|
-
import OldText from '@atlaskit/ds-explorations/text';
|
|
3
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
4
2
|
import { Box, Text, xcss } from '@atlaskit/primitives';
|
|
5
3
|
import { formatValue } from './internal/utils';
|
|
6
4
|
const boxStyles = xcss({
|
|
@@ -35,18 +33,10 @@ const Badge = /*#__PURE__*/memo(function Badge({
|
|
|
35
33
|
color: style === null || style === void 0 ? void 0 : style.color
|
|
36
34
|
},
|
|
37
35
|
paddingInline: "space.075"
|
|
38
|
-
},
|
|
36
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
39
37
|
size: "UNSAFE_small",
|
|
40
38
|
align: "center",
|
|
41
39
|
color: style !== null && style !== void 0 && style.color ? 'inherit' : textColors[appearance]
|
|
42
|
-
}, typeof children === 'number' && max ? formatValue(children, max) : children) : /*#__PURE__*/React.createElement(OldText, {
|
|
43
|
-
fontSize: "size.075",
|
|
44
|
-
lineHeight: "lineHeight.100",
|
|
45
|
-
textAlign: "center",
|
|
46
|
-
color: textColorsOld[appearance],
|
|
47
|
-
UNSAFE_style: style !== null && style !== void 0 && style.color ? {
|
|
48
|
-
color: style.color
|
|
49
|
-
} : undefined
|
|
50
40
|
}, typeof children === 'number' && max ? formatValue(children, max) : children));
|
|
51
41
|
});
|
|
52
42
|
Badge.displayName = 'Badge';
|
|
@@ -59,14 +49,6 @@ const backgroundColors = {
|
|
|
59
49
|
primaryInverted: 'elevation.surface',
|
|
60
50
|
removed: 'color.background.danger'
|
|
61
51
|
};
|
|
62
|
-
const textColorsOld = {
|
|
63
|
-
added: 'success',
|
|
64
|
-
default: 'color.text',
|
|
65
|
-
important: 'inverse',
|
|
66
|
-
primary: 'inverse',
|
|
67
|
-
primaryInverted: 'brand',
|
|
68
|
-
removed: 'danger'
|
|
69
|
-
};
|
|
70
52
|
const textColors = {
|
|
71
53
|
added: 'color.text.success',
|
|
72
54
|
default: 'color.text',
|
package/dist/esm/badge.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import React, { memo } from 'react';
|
|
2
|
-
import OldText from '@atlaskit/ds-explorations/text';
|
|
3
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
4
2
|
import { Box, Text, xcss } from '@atlaskit/primitives';
|
|
5
3
|
import { formatValue } from './internal/utils';
|
|
6
4
|
var boxStyles = xcss({
|
|
@@ -37,18 +35,10 @@ var Badge = /*#__PURE__*/memo(function Badge(_ref) {
|
|
|
37
35
|
color: style === null || style === void 0 ? void 0 : style.color
|
|
38
36
|
},
|
|
39
37
|
paddingInline: "space.075"
|
|
40
|
-
},
|
|
38
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
41
39
|
size: "UNSAFE_small",
|
|
42
40
|
align: "center",
|
|
43
41
|
color: style !== null && style !== void 0 && style.color ? 'inherit' : textColors[appearance]
|
|
44
|
-
}, typeof children === 'number' && max ? formatValue(children, max) : children) : /*#__PURE__*/React.createElement(OldText, {
|
|
45
|
-
fontSize: "size.075",
|
|
46
|
-
lineHeight: "lineHeight.100",
|
|
47
|
-
textAlign: "center",
|
|
48
|
-
color: textColorsOld[appearance],
|
|
49
|
-
UNSAFE_style: style !== null && style !== void 0 && style.color ? {
|
|
50
|
-
color: style.color
|
|
51
|
-
} : undefined
|
|
52
42
|
}, typeof children === 'number' && max ? formatValue(children, max) : children));
|
|
53
43
|
});
|
|
54
44
|
Badge.displayName = 'Badge';
|
|
@@ -61,14 +51,6 @@ var backgroundColors = {
|
|
|
61
51
|
primaryInverted: 'elevation.surface',
|
|
62
52
|
removed: 'color.background.danger'
|
|
63
53
|
};
|
|
64
|
-
var textColorsOld = {
|
|
65
|
-
added: 'success',
|
|
66
|
-
default: 'color.text',
|
|
67
|
-
important: 'inverse',
|
|
68
|
-
primary: 'inverse',
|
|
69
|
-
primaryInverted: 'brand',
|
|
70
|
-
removed: 'danger'
|
|
71
|
-
};
|
|
72
54
|
var textColors = {
|
|
73
55
|
added: 'color.text.success',
|
|
74
56
|
default: 'color.text',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/badge",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.1.0",
|
|
4
4
|
"description": "A badge is a visual indicator for numeric values such as tallies and scores.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -40,9 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@atlaskit/codemod-utils": "^4.2.0",
|
|
43
|
-
"@atlaskit/
|
|
44
|
-
"@atlaskit/platform-feature-flags": "^0.2.5",
|
|
45
|
-
"@atlaskit/primitives": "^5.5.0",
|
|
43
|
+
"@atlaskit/primitives": "^5.6.0",
|
|
46
44
|
"@babel/runtime": "^7.0.0"
|
|
47
45
|
},
|
|
48
46
|
"peerDependencies": {
|
|
@@ -52,7 +50,7 @@
|
|
|
52
50
|
"@af/accessibility-testing": "*",
|
|
53
51
|
"@af/integration-testing": "*",
|
|
54
52
|
"@af/visual-regression": "*",
|
|
55
|
-
"@atlaskit/ds-lib": "^2.
|
|
53
|
+
"@atlaskit/ds-lib": "^2.3.0",
|
|
56
54
|
"@atlaskit/ssr": "*",
|
|
57
55
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
58
56
|
"@emotion/react": "^11.7.1",
|
|
@@ -88,10 +86,5 @@
|
|
|
88
86
|
}
|
|
89
87
|
},
|
|
90
88
|
"homepage": "https://atlassian.design/components/badge/",
|
|
91
|
-
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
|
92
|
-
"platform-feature-flags": {
|
|
93
|
-
"platform.design-system-team.remove-badge-text-style-inheritance_add9o": {
|
|
94
|
-
"type": "boolean"
|
|
95
|
-
}
|
|
96
|
-
}
|
|
89
|
+
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
|
97
90
|
}
|