@atlaskit/badge 15.0.15 → 15.0.18

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 CHANGED
@@ -1,5 +1,25 @@
1
1
  # @atlaskit/badge
2
2
 
3
+ ## 15.0.18
4
+
5
+ ### Patch Changes
6
+
7
+ - [`57adb9bb931`](https://bitbucket.org/atlassian/atlassian-frontend/commits/57adb9bb931) - Fixes an issue with '@atlaskit/badge' text color for certain appearances.
8
+
9
+ ## 15.0.17
10
+
11
+ ### Patch Changes
12
+
13
+ - [`fe54d8f1aec`](https://bitbucket.org/atlassian/atlassian-frontend/commits/fe54d8f1aec) - Update ds-explorations dependency. No change in behaviour.
14
+
15
+ ## 15.0.16
16
+
17
+ ### Patch Changes
18
+
19
+ - [`06fd023cd85`](https://bitbucket.org/atlassian/atlassian-frontend/commits/06fd023cd85) - Minor internal change to how text is displayed. No change to consumers.
20
+ - [`52809e4839b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/52809e4839b) - Allow makers to disable max value formatting in the Badge component
21
+ - Updated dependencies
22
+
3
23
  ## 15.0.15
4
24
 
5
25
  ### Patch Changes
package/dist/cjs/badge.js CHANGED
@@ -59,10 +59,10 @@ var Badge = /*#__PURE__*/(0, _react.memo)(function Badge(_ref) {
59
59
  color: textColor
60
60
  }
61
61
  }, /*#__PURE__*/_react.default.createElement(_dsExplorations.UNSAFE_Text, {
62
- fontSize: "12",
62
+ fontSize: "12px",
63
63
  lineHeight: "12px",
64
64
  textAlign: "center"
65
- }, typeof children === 'number' ? (0, _utils.formatValue)(children, max) : children));
65
+ }, typeof children === 'number' && max ? (0, _utils.formatValue)(children, max) : children));
66
66
  });
67
67
  Badge.displayName = 'Badge';
68
68
  var _default = Badge;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/badge",
3
- "version": "15.0.15",
3
+ "version": "15.0.18",
4
4
  "sideEffects": false
5
5
  }
@@ -39,10 +39,10 @@ const Badge = /*#__PURE__*/memo(function Badge({
39
39
  color: textColor
40
40
  }
41
41
  }, /*#__PURE__*/React.createElement(Text, {
42
- fontSize: "12",
42
+ fontSize: "12px",
43
43
  lineHeight: "12px",
44
44
  textAlign: "center"
45
- }, typeof children === 'number' ? formatValue(children, max) : children));
45
+ }, typeof children === 'number' && max ? formatValue(children, max) : children));
46
46
  });
47
47
  Badge.displayName = 'Badge';
48
48
  export default Badge;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/badge",
3
- "version": "15.0.15",
3
+ "version": "15.0.18",
4
4
  "sideEffects": false
5
5
  }
package/dist/esm/badge.js CHANGED
@@ -42,10 +42,10 @@ var Badge = /*#__PURE__*/memo(function Badge(_ref) {
42
42
  color: textColor
43
43
  }
44
44
  }, /*#__PURE__*/React.createElement(Text, {
45
- fontSize: "12",
45
+ fontSize: "12px",
46
46
  lineHeight: "12px",
47
47
  textAlign: "center"
48
- }, typeof children === 'number' ? formatValue(children, max) : children));
48
+ }, typeof children === 'number' && max ? formatValue(children, max) : children));
49
49
  });
50
50
  Badge.displayName = 'Badge';
51
51
  export default Badge;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/badge",
3
- "version": "15.0.15",
3
+ "version": "15.0.18",
4
4
  "sideEffects": false
5
5
  }
@@ -1 +1 @@
1
- export declare function formatValue(value?: string | number, max?: string | number): string;
1
+ export declare function formatValue(value?: string | number, max?: number): string;
@@ -14,9 +14,10 @@ export interface BadgeProps {
14
14
  children?: number | ReactNode;
15
15
  /**
16
16
  * The maximum value to display. Defaults to `99`. If the value is 100, and max is 50, "50+" will be displayed.
17
- * This value should be greater than 0.
17
+ * This value should be greater than 0. If set to `false` the original value will be displayed regardless of
18
+ * whether it is larger than the default maximum value.
18
19
  */
19
- max?: number;
20
+ max?: number | false;
20
21
  /**
21
22
  * Style customization to apply to the badge. Only `backgroundColor` and `color` are supported.
22
23
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/badge",
3
- "version": "15.0.15",
3
+ "version": "15.0.18",
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/"
@@ -28,8 +28,8 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@atlaskit/codemod-utils": "^4.1.0",
31
- "@atlaskit/ds-explorations": "^0.1.0",
32
- "@atlaskit/theme": "^12.1.0",
31
+ "@atlaskit/ds-explorations": "^0.1.2",
32
+ "@atlaskit/theme": "^12.2.0",
33
33
  "@atlaskit/tokens": "^0.10.0",
34
34
  "@babel/runtime": "^7.0.0"
35
35
  },
@@ -39,13 +39,13 @@
39
39
  "devDependencies": {
40
40
  "@atlaskit/button": "^16.3.0",
41
41
  "@atlaskit/docs": "*",
42
- "@atlaskit/section-message": "^6.1.0",
42
+ "@atlaskit/section-message": "^6.2.0",
43
43
  "@atlaskit/ssr": "*",
44
44
  "@atlaskit/visual-regression": "*",
45
45
  "@atlaskit/webdriver-runner": "*",
46
46
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
47
47
  "@emotion/core": "^10.0.9",
48
- "@testing-library/react": "^8.0.1",
48
+ "@testing-library/react": "^12.1.5",
49
49
  "jscodeshift": "^0.13.0",
50
50
  "react-dom": "^16.8.0",
51
51
  "react-test-renderer": "^16.8.0",