@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 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 = '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.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.56",
19
- "@automattic/jetpack-api": "^0.18.0",
20
- "@automattic/jetpack-scan": "^0.5.6",
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.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.17",
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.42",
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.4.7",
46
- "@storybook/blocks": "8.4.7",
47
- "@storybook/react": "8.4.7",
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.4.7",
60
+ "storybook": "8.5.8",
61
61
  "ts-dedent": "2.2.0",
62
62
  "typescript": "5.0.4",
63
63
  "webpack": "5.94.0",