@automattic/jetpack-components 4.0.1 → 4.0.3

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,14 @@
2
2
 
3
3
  ### This is a list detailing changes for the Jetpack RNA Components package releases.
4
4
 
5
+ ## [4.0.3] - 2026-10-14
6
+ ### Changed
7
+ - Update dependencies.
8
+
9
+ ## [4.0.2] - 2026-10-12
10
+ ### Changed
11
+ - Internal updates.
12
+
5
13
  ## [4.0.1] - 2026-10-06
6
14
  ### Changed
7
15
  - Jetpack Footer: Link to the My Jetpack Features tab instead of the retired Products tab. [#52778]
@@ -1991,6 +1999,8 @@
1991
1999
  ### Changed
1992
2000
  - Update node version requirement to 14.16.1
1993
2001
 
2002
+ [4.0.3]: https://github.com/Automattic/jetpack-components/compare/4.0.2...4.0.3
2003
+ [4.0.2]: https://github.com/Automattic/jetpack-components/compare/4.0.1...4.0.2
1994
2004
  [4.0.1]: https://github.com/Automattic/jetpack-components/compare/4.0.0...4.0.1
1995
2005
  [4.0.0]: https://github.com/Automattic/jetpack-components/compare/3.3.0...4.0.0
1996
2006
  [3.3.0]: https://github.com/Automattic/jetpack-components/compare/3.2.0...3.3.0
@@ -1,3 +1,5 @@
1
+ @use "@automattic/jetpack-base-styles/admin-page-layout" as *;
2
+
1
3
  .admin-page {
2
4
  margin-inline-start: -20px; // to neutralize the padding of #wpcontent.
3
5
 
@@ -35,28 +37,9 @@
35
37
  clear: both;
36
38
  }
37
39
 
38
- // admin-ui's header `visual` slot is a 24px grid box but does not center
39
- // its contents. Our JetpackLogo is 20px tall, so without this it pins to
40
- // the top-left of the cell and looks misaligned vs. the title. admin-ui
41
- // ships the slot as `<div aria-hidden="true">` in the header.
42
- // TODO: remove once upstream centers contents in `.header-visual`.
43
- :global(.jp-admin-page__page > :first-child [aria-hidden="true"]) {
44
- place-items: center;
45
- }
40
+ :global(.jp-admin-page__page) {
46
41
 
47
- // Keep the header a constant height across tabs. The content row's height
48
- // is driven by its tallest child (the `actions` slot), so tabs with
49
- // differently-sized action controls — or none at all — render headers of
50
- // different heights, which shifts the tab strip below them vertically.
51
- // Reserve the standard 40px WP control height as a floor and center the
52
- // row's items so a shorter control neither stretches nor collapses it.
53
- // The content row is identified by the visual logo slot it contains
54
- // (`aria-hidden="true"`), so a breadcrumbs-only header isn't affected.
55
- // `> :first-child` targets the page header positionally (a `<div>` in
56
- // admin-ui ≥ 2.1, a `<header>` in 2.0) — matching the sibling rules above.
57
- :global(.jp-admin-page__page > :first-child > div:has([aria-hidden="true"])) {
58
- min-height: 40px;
59
- align-items: center;
42
+ @include jetpack-admin-page-header;
60
43
  }
61
44
 
62
45
  .admin-page-header {
@@ -29,8 +29,7 @@ const DonutMeter = ({ className = '', description = '', donutWidth = '64px', seg
29
29
  return (_jsx("div", { className: finalClassName, "aria-hidden": isHidden, "data-testid": "donut-meter", children: _jsxs("svg", { width: donutWidth, height: donutWidth, viewBox: "0 0 40 40", className: "donut-meter_svg", role: "img", children: [_jsx("title", { id: "donut-meter-title", children: title }), _jsx("desc", { id: "donut-meter-description", children: description }), _jsx("circle", { className: "donut-meter-hole", cx: "20" // center x value of circle
30
30
  , cy: "20" // center y value of circle
31
31
  , r: "15.91549430918954" // radius based on the circumference r = 100/(2π)
32
- , fill: "transparent" }), _jsx("circle", { className: "donut-meter-ring", cx: "20", cy: "20", r: "15.91549430918954", fill: "transparent", strokeWidth: thickness, stroke: "#ebebeb" }), _jsx("circle", { className: "donut-meter-segment", cx: "20", cy: "20", r: "15.91549430918954", fill: "transparent", "transform-origin": "center" // eslint-disable-line react/no-unknown-property -- @todo Switch to transformOrigin when we use React 19.
33
- , strokeWidth: thickness, strokeDasharray: `${percentage} ${100 - percentage}`, strokeDashoffset: "-25" // this ensures the segment begins at the bottom of the donut instead of the top
32
+ , fill: "transparent" }), _jsx("circle", { className: "donut-meter-ring", cx: "20", cy: "20", r: "15.91549430918954", fill: "transparent", strokeWidth: thickness, stroke: "#ebebeb" }), _jsx("circle", { className: "donut-meter-segment", cx: "20", cy: "20", r: "15.91549430918954", fill: "transparent", strokeWidth: thickness, strokeDasharray: `${percentage} ${100 - percentage}`, strokeDashoffset: "-25" // this ensures the segment begins at the bottom of the donut instead of the top
34
33
  })] }) }));
35
34
  };
36
35
  export default DonutMeter;
@@ -1,3 +1,5 @@
1
+ @use "@automattic/jetpack-base-styles/admin-page-layout" as *;
2
+
1
3
  .admin-page {
2
4
  margin-inline-start: -20px; // to neutralize the padding of #wpcontent.
3
5
 
@@ -35,28 +37,9 @@
35
37
  clear: both;
36
38
  }
37
39
 
38
- // admin-ui's header `visual` slot is a 24px grid box but does not center
39
- // its contents. Our JetpackLogo is 20px tall, so without this it pins to
40
- // the top-left of the cell and looks misaligned vs. the title. admin-ui
41
- // ships the slot as `<div aria-hidden="true">` in the header.
42
- // TODO: remove once upstream centers contents in `.header-visual`.
43
- :global(.jp-admin-page__page > :first-child [aria-hidden="true"]) {
44
- place-items: center;
45
- }
40
+ :global(.jp-admin-page__page) {
46
41
 
47
- // Keep the header a constant height across tabs. The content row's height
48
- // is driven by its tallest child (the `actions` slot), so tabs with
49
- // differently-sized action controls — or none at all — render headers of
50
- // different heights, which shifts the tab strip below them vertically.
51
- // Reserve the standard 40px WP control height as a floor and center the
52
- // row's items so a shorter control neither stretches nor collapses it.
53
- // The content row is identified by the visual logo slot it contains
54
- // (`aria-hidden="true"`), so a breadcrumbs-only header isn't affected.
55
- // `> :first-child` targets the page header positionally (a `<div>` in
56
- // admin-ui ≥ 2.1, a `<header>` in 2.0) — matching the sibling rules above.
57
- :global(.jp-admin-page__page > :first-child > div:has([aria-hidden="true"])) {
58
- min-height: 40px;
59
- align-items: center;
42
+ @include jetpack-admin-page-header;
60
43
  }
61
44
 
62
45
  .admin-page-header {
@@ -134,7 +134,6 @@ const DonutMeter: FC< DonutMeterProps > = ( {
134
134
  cy="20"
135
135
  r="15.91549430918954"
136
136
  fill="transparent"
137
- transform-origin="center" // eslint-disable-line react/no-unknown-property -- @todo Switch to transformOrigin when we use React 19.
138
137
  strokeWidth={ thickness }
139
138
  strokeDasharray={ `${ percentage } ${ 100 - percentage }` }
140
139
  strokeDashoffset="-25" // this ensures the segment begins at the bottom of the donut instead of the top
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automattic/jetpack-components",
3
- "version": "4.0.1",
3
+ "version": "4.0.3",
4
4
  "description": "Jetpack Components Package",
5
5
  "homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/components/#readme",
6
6
  "bugs": {
@@ -76,9 +76,9 @@
76
76
  "extends @wordpress/browserslist-config"
77
77
  ],
78
78
  "dependencies": {
79
- "@automattic/jetpack-api": "^2.1.0",
79
+ "@automattic/jetpack-api": "^2.2.0",
80
80
  "@automattic/jetpack-boost-score-api": "^1.2.0",
81
- "@automattic/jetpack-script-data": "^0.6.9",
81
+ "@automattic/jetpack-script-data": "^0.6.10",
82
82
  "@automattic/number-formatters": "^1.2.10",
83
83
  "@babel/runtime": "^7",
84
84
  "@gravatar-com/hovercards": "0.16.0",
@@ -105,7 +105,7 @@
105
105
  "uplot-react": "1.1.4"
106
106
  },
107
107
  "devDependencies": {
108
- "@automattic/jetpack-base-styles": "^1.2.16",
108
+ "@automattic/jetpack-base-styles": "^1.2.17",
109
109
  "@babel/core": "7.29.7",
110
110
  "@jest/globals": "30.5.1",
111
111
  "@storybook/addon-docs": "10.4.6",