@sproutsocial/racine 23.1.0 → 23.2.1
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,24 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 23.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- dc8e3f6: Fix Badge component so that it now allows overriding the data-qa props
|
|
8
|
+
|
|
9
|
+
## 23.2.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- e3834c0: Support for negative number abbreviation in the Numeral component
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [72c52c8]
|
|
18
|
+
- Updated dependencies [9612ff1]
|
|
19
|
+
- @sproutsocial/seeds-icons@1.13.0
|
|
20
|
+
- @sproutsocial/seeds-react-theme@1.6.0
|
|
21
|
+
|
|
3
22
|
## 23.1.0
|
|
4
23
|
|
|
5
24
|
### Minor Changes
|
package/commonjs/Badge/Badge.js
CHANGED
|
@@ -36,8 +36,9 @@ var Badge = function Badge(_ref) {
|
|
|
36
36
|
if (children && text) {
|
|
37
37
|
throw new Error("can't use both `children` and `text` props. Text is deprecated, consider using children.");
|
|
38
38
|
}
|
|
39
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.default
|
|
40
|
-
|
|
39
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.default
|
|
40
|
+
// size previously included default, which currently maps to small. Once consumers have updated this can be simplified.
|
|
41
|
+
, _objectSpread(_objectSpread({
|
|
41
42
|
size: size === "default" ? "large" : size,
|
|
42
43
|
badgeColor: badgeColor,
|
|
43
44
|
"data-tip": tip,
|
|
@@ -49,7 +50,8 @@ var Badge = function Badge(_ref) {
|
|
|
49
50
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
50
51
|
// @ts-ignore
|
|
51
52
|
,
|
|
52
|
-
color: color
|
|
53
|
+
color: color
|
|
54
|
+
}, rest), {}, {
|
|
53
55
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
54
56
|
display: "flex",
|
|
55
57
|
alignItems: "center",
|
|
@@ -70,7 +70,7 @@ var _getNumberFormatters = function _getNumberFormatters(options) {
|
|
|
70
70
|
var memoizer = (0, _lruMemoize.default)(_constants2.MEMO_CACHE_SIZE, _constants2.COMPARE_OBJECTS);
|
|
71
71
|
var getNumberFormatters = memoizer(_getNumberFormatters);
|
|
72
72
|
var getThreshold = function getThreshold(abbreviate) {
|
|
73
|
-
if (typeof abbreviate === "number") return Math.max(1000, abbreviate);
|
|
73
|
+
if (typeof abbreviate === "number") return Math.max(1000, Math.abs(abbreviate));
|
|
74
74
|
if (abbreviate) return _constants2.DEFAULT_THRESHOLD;
|
|
75
75
|
return Infinity;
|
|
76
76
|
};
|
|
@@ -103,7 +103,7 @@ var normalizeArgs = function normalizeArgs(props) {
|
|
|
103
103
|
max = _getMinMaxPrecision2[1];
|
|
104
104
|
var _number = number || 0;
|
|
105
105
|
var value = _number * (format === "percent" ? 0.01 : 1);
|
|
106
|
-
var canAbbreviate = _number >= threshold;
|
|
106
|
+
var canAbbreviate = Math.abs(_number) >= threshold;
|
|
107
107
|
var options = {
|
|
108
108
|
locale: locale,
|
|
109
109
|
format: format,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Numeral.d.ts","sourceRoot":"","sources":["../../../src/Numeral/Numeral.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgB/B,OAAO,KAAK,EAAqB,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"Numeral.d.ts","sourceRoot":"","sources":["../../../src/Numeral/Numeral.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgB/B,OAAO,KAAK,EAAqB,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAsL1E,eAAO,MAAM,aAAa,UAAW,gBAAgB,KAAG,MAEvD,CAAC;AAEF,QAAA,MAAM,OAAO,UAAW,gBAAgB,oBAEvC,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
package/lib/Badge/Badge.js
CHANGED
|
@@ -28,8 +28,9 @@ var Badge = function Badge(_ref) {
|
|
|
28
28
|
if (children && text) {
|
|
29
29
|
throw new Error("can't use both `children` and `text` props. Text is deprecated, consider using children.");
|
|
30
30
|
}
|
|
31
|
-
return /*#__PURE__*/_jsx(Container
|
|
32
|
-
|
|
31
|
+
return /*#__PURE__*/_jsx(Container
|
|
32
|
+
// size previously included default, which currently maps to small. Once consumers have updated this can be simplified.
|
|
33
|
+
, _objectSpread(_objectSpread({
|
|
33
34
|
size: size === "default" ? "large" : size,
|
|
34
35
|
badgeColor: badgeColor,
|
|
35
36
|
"data-tip": tip,
|
|
@@ -41,7 +42,8 @@ var Badge = function Badge(_ref) {
|
|
|
41
42
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
42
43
|
// @ts-ignore
|
|
43
44
|
,
|
|
44
|
-
color: color
|
|
45
|
+
color: color
|
|
46
|
+
}, rest), {}, {
|
|
45
47
|
children: /*#__PURE__*/_jsxs(Box, {
|
|
46
48
|
display: "flex",
|
|
47
49
|
alignItems: "center",
|
package/lib/Numeral/Numeral.js
CHANGED
|
@@ -63,7 +63,7 @@ var _getNumberFormatters = function _getNumberFormatters(options) {
|
|
|
63
63
|
var memoizer = memoize(MEMO_CACHE_SIZE, COMPARE_OBJECTS);
|
|
64
64
|
var getNumberFormatters = memoizer(_getNumberFormatters);
|
|
65
65
|
var getThreshold = function getThreshold(abbreviate) {
|
|
66
|
-
if (typeof abbreviate === "number") return Math.max(1000, abbreviate);
|
|
66
|
+
if (typeof abbreviate === "number") return Math.max(1000, Math.abs(abbreviate));
|
|
67
67
|
if (abbreviate) return DEFAULT_THRESHOLD;
|
|
68
68
|
return Infinity;
|
|
69
69
|
};
|
|
@@ -96,7 +96,7 @@ var normalizeArgs = function normalizeArgs(props) {
|
|
|
96
96
|
max = _getMinMaxPrecision2[1];
|
|
97
97
|
var _number = number || 0;
|
|
98
98
|
var value = _number * (format === "percent" ? 0.01 : 1);
|
|
99
|
-
var canAbbreviate = _number >= threshold;
|
|
99
|
+
var canAbbreviate = Math.abs(_number) >= threshold;
|
|
100
100
|
var options = {
|
|
101
101
|
locale: locale,
|
|
102
102
|
format: format,
|