@automattic/jetpack-components 0.67.1 → 0.68.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
@@ -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.1] - 2025-03-05
6
+ ### Changed
7
+ - Update package dependencies. [#42162]
8
+
9
+ ## [0.68.0] - 2025-03-03
10
+ ### Added
11
+ - Stat Card: add hideValue prop. [#41454]
12
+
13
+ ### Changed
14
+ - Update package dependencies. [#42081] [#42163]
15
+
5
16
  ## [0.67.1] - 2025-02-24
6
17
  ### Changed
7
18
  - Update package dependencies. [#41955]
@@ -1294,6 +1305,8 @@
1294
1305
  ### Changed
1295
1306
  - Update node version requirement to 14.16.1
1296
1307
 
1308
+ [0.68.1]: https://github.com/Automattic/jetpack-components/compare/0.68.0...0.68.1
1309
+ [0.68.0]: https://github.com/Automattic/jetpack-components/compare/0.67.1...0.68.0
1297
1310
  [0.67.1]: https://github.com/Automattic/jetpack-components/compare/0.67.0...0.67.1
1298
1311
  [0.67.0]: https://github.com/Automattic/jetpack-components/compare/0.66.1...0.67.0
1299
1312
  [0.66.1]: https://github.com/Automattic/jetpack-components/compare/0.66.0...0.66.1
@@ -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 = 'info', ...props } ) => {
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 = ( { className, icon, label, value, variant = 'square' }: StatCardProps ) => {
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>
@@ -4,6 +4,11 @@ export type StatCardProps = {
4
4
  */
5
5
  className?: string;
6
6
 
7
+ /**
8
+ * Whether to hide the value.
9
+ */
10
+ hideValue?: boolean;
11
+
7
12
  /**
8
13
  * The stat card icon.
9
14
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automattic/jetpack-components",
3
- "version": "0.67.1",
3
+ "version": "0.68.1",
4
4
  "description": "Jetpack Components Package",
5
5
  "author": "Automattic",
6
6
  "license": "GPL-2.0-or-later",
@@ -15,20 +15,20 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "@automattic/format-currency": "1.0.1",
18
- "@automattic/jetpack-boost-score-api": "^0.1.57",
19
- "@automattic/jetpack-api": "^0.19.0",
20
- "@automattic/jetpack-scan": "^0.5.7",
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.17.0",
23
- "@wordpress/components": "29.3.0",
24
- "@wordpress/compose": "7.17.0",
25
- "@wordpress/data": "10.17.0",
26
- "@wordpress/dataviews": "4.13.0",
27
- "@wordpress/date": "5.17.0",
28
- "@wordpress/element": "6.17.0",
29
- "@wordpress/i18n": "5.17.0",
30
- "@wordpress/icons": "10.17.0",
31
- "@wordpress/notices": "5.17.0",
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.15.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",
@@ -38,7 +38,7 @@
38
38
  "uplot-react": "1.1.4"
39
39
  },
40
40
  "devDependencies": {
41
- "@automattic/jetpack-base-styles": "^0.6.43",
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",