@automattic/jetpack-components 0.67.0 → 0.68.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 +13 -0
- package/components/badge/index.tsx +1 -1
- package/components/stat-card/index.tsx +10 -3
- package/components/stat-card/types.ts +5 -0
- package/package.json +20 -20
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
### This is a list detailing changes for the Jetpack RNA Components package releases.
|
|
4
4
|
|
|
5
|
+
## [0.68.0] - 2025-03-03
|
|
6
|
+
### Added
|
|
7
|
+
- Stat Card: add hideValue prop. [#41454]
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
- Update package dependencies. [#42081] [#42163]
|
|
11
|
+
|
|
12
|
+
## [0.67.1] - 2025-02-24
|
|
13
|
+
### Changed
|
|
14
|
+
- Update package dependencies. [#41955]
|
|
15
|
+
|
|
5
16
|
## [0.67.0] - 2025-02-17
|
|
6
17
|
### Added
|
|
7
18
|
- Use full import paths with JS extensions. [#41524]
|
|
@@ -1290,6 +1301,8 @@
|
|
|
1290
1301
|
### Changed
|
|
1291
1302
|
- Update node version requirement to 14.16.1
|
|
1292
1303
|
|
|
1304
|
+
[0.68.0]: https://github.com/Automattic/jetpack-components/compare/0.67.1...0.68.0
|
|
1305
|
+
[0.67.1]: https://github.com/Automattic/jetpack-components/compare/0.67.0...0.67.1
|
|
1293
1306
|
[0.67.0]: https://github.com/Automattic/jetpack-components/compare/0.66.1...0.67.0
|
|
1294
1307
|
[0.66.1]: https://github.com/Automattic/jetpack-components/compare/0.66.0...0.66.1
|
|
1295
1308
|
[0.66.0]: https://github.com/Automattic/jetpack-components/compare/0.65.5...0.66.0
|
|
@@ -19,7 +19,7 @@ type BadgeProps = {
|
|
|
19
19
|
*
|
|
20
20
|
* @return {React.ReactElement} The `Badge` component.
|
|
21
21
|
*/
|
|
22
|
-
const Badge: React.FC< BadgeProps > = ( { children, className, variant
|
|
22
|
+
const Badge: React.FC< BadgeProps > = ( { children, className, variant, ...props } ) => {
|
|
23
23
|
const classes = clsx(
|
|
24
24
|
styles.badge,
|
|
25
25
|
{
|
|
@@ -18,7 +18,14 @@ import type React from 'react';
|
|
|
18
18
|
* @param {StatCardProps} props - Component props.
|
|
19
19
|
* @return {React.ReactNode} - StatCard react component.
|
|
20
20
|
*/
|
|
21
|
-
const StatCard = ( {
|
|
21
|
+
const StatCard = ( {
|
|
22
|
+
className,
|
|
23
|
+
hideValue,
|
|
24
|
+
icon,
|
|
25
|
+
label,
|
|
26
|
+
value,
|
|
27
|
+
variant = 'square',
|
|
28
|
+
}: StatCardProps ) => {
|
|
22
29
|
const formattedValue = numberFormat( value );
|
|
23
30
|
const compactValue = numberFormat( value, {
|
|
24
31
|
notation: 'compact',
|
|
@@ -33,12 +40,12 @@ const StatCard = ( { className, icon, label, value, variant = 'square' }: StatCa
|
|
|
33
40
|
{ variant === 'square' ? (
|
|
34
41
|
<Tooltip text={ formattedValue } placement="top">
|
|
35
42
|
<Text variant="headline-small" className={ clsx( styles.value ) }>
|
|
36
|
-
{ compactValue }
|
|
43
|
+
{ hideValue ? '-' : compactValue }
|
|
37
44
|
</Text>
|
|
38
45
|
</Tooltip>
|
|
39
46
|
) : (
|
|
40
47
|
<Text variant="title-medium-semi-bold" className={ clsx( styles.value ) }>
|
|
41
|
-
{ formattedValue }
|
|
48
|
+
{ hideValue ? '-' : formattedValue }
|
|
42
49
|
</Text>
|
|
43
50
|
) }
|
|
44
51
|
</div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automattic/jetpack-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.68.0",
|
|
4
4
|
"description": "Jetpack Components Package",
|
|
5
5
|
"author": "Automattic",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -15,36 +15,36 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@automattic/format-currency": "1.0.1",
|
|
18
|
-
"@automattic/jetpack-boost-score-api": "^0.1.
|
|
19
|
-
"@automattic/jetpack-api": "^0.
|
|
20
|
-
"@automattic/jetpack-scan": "^0.5.
|
|
18
|
+
"@automattic/jetpack-boost-score-api": "^0.1.58",
|
|
19
|
+
"@automattic/jetpack-api": "^0.20.0",
|
|
20
|
+
"@automattic/jetpack-scan": "^0.5.8",
|
|
21
21
|
"@babel/runtime": "^7",
|
|
22
|
-
"@wordpress/browserslist-config": "6.
|
|
23
|
-
"@wordpress/components": "29.
|
|
24
|
-
"@wordpress/compose": "7.
|
|
25
|
-
"@wordpress/data": "10.
|
|
26
|
-
"@wordpress/dataviews": "4.
|
|
27
|
-
"@wordpress/date": "5.
|
|
28
|
-
"@wordpress/element": "6.
|
|
29
|
-
"@wordpress/i18n": "5.
|
|
30
|
-
"@wordpress/icons": "10.
|
|
31
|
-
"@wordpress/notices": "5.
|
|
22
|
+
"@wordpress/browserslist-config": "6.19.0",
|
|
23
|
+
"@wordpress/components": "29.5.0",
|
|
24
|
+
"@wordpress/compose": "7.19.0",
|
|
25
|
+
"@wordpress/data": "10.19.0",
|
|
26
|
+
"@wordpress/dataviews": "4.14.0",
|
|
27
|
+
"@wordpress/date": "5.19.0",
|
|
28
|
+
"@wordpress/element": "6.19.0",
|
|
29
|
+
"@wordpress/i18n": "5.19.0",
|
|
30
|
+
"@wordpress/icons": "10.19.0",
|
|
31
|
+
"@wordpress/notices": "5.19.0",
|
|
32
32
|
"clsx": "2.1.1",
|
|
33
33
|
"prop-types": "^15.7.2",
|
|
34
34
|
"qrcode.react": "4.2.0",
|
|
35
35
|
"react-slider": "2.0.5",
|
|
36
|
-
"social-logos": "^3.1.
|
|
36
|
+
"social-logos": "^3.1.18",
|
|
37
37
|
"uplot": "1.6.31",
|
|
38
38
|
"uplot-react": "1.1.4"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@automattic/jetpack-base-styles": "^0.6.
|
|
41
|
+
"@automattic/jetpack-base-styles": "^0.6.44",
|
|
42
42
|
"@babel/core": "7.26.0",
|
|
43
43
|
"@babel/preset-react": "7.26.3",
|
|
44
44
|
"@jest/globals": "29.4.3",
|
|
45
|
-
"@storybook/addon-actions": "8.
|
|
46
|
-
"@storybook/blocks": "8.
|
|
47
|
-
"@storybook/react": "8.
|
|
45
|
+
"@storybook/addon-actions": "8.5.8",
|
|
46
|
+
"@storybook/blocks": "8.5.8",
|
|
47
|
+
"@storybook/react": "8.5.8",
|
|
48
48
|
"@testing-library/dom": "10.4.0",
|
|
49
49
|
"@testing-library/react": "16.2.0",
|
|
50
50
|
"@testing-library/user-event": "14.6.1",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"react": "18.3.1",
|
|
58
58
|
"react-dom": "18.3.1",
|
|
59
59
|
"require-from-string": "2.0.2",
|
|
60
|
-
"storybook": "8.
|
|
60
|
+
"storybook": "8.5.8",
|
|
61
61
|
"ts-dedent": "2.2.0",
|
|
62
62
|
"typescript": "5.0.4",
|
|
63
63
|
"webpack": "5.94.0",
|