@automattic/jetpack-components 1.12.0 → 1.12.2

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,20 @@
2
2
 
3
3
  ### This is a list detailing changes for the Jetpack RNA Components package releases.
4
4
 
5
+ ## [1.12.2] - 2026-06-02
6
+ ### Changed
7
+ - AdminPage: expand the Hello Dolly normalize rule (was a single `background-color`) to cover the full visual treatment (italic, gray text, white background, right-aligned, hidden under 660px) so individual plugins don't need their own per-page overrides. No position/offsets are set so per-page `position: absolute` overrides (e.g. My Jetpack) keep working. [#48472]
8
+
9
+ ### Fixed
10
+ - Pricing table: render feature tooltips as a portal so they are no longer hidden behind the admin sidebar [#49318]
11
+
12
+ ## [1.12.1] - 2026-06-01
13
+ ### Changed
14
+ - Update package dependencies. [#48404]
15
+
16
+ ### Fixed
17
+ - PricingCard: Render the CTA with the @wordpress/ui Button (solid variant) so it shows correct button styling instead of unstyled text. [#49197]
18
+
5
19
  ## [1.12.0] - 2026-05-25
6
20
  ### Added
7
21
  - Add subpath exports for `Button`, `PricingTable`, and `ProductPrice` so they can be imported directly from bundles that cannot import the package barrel. [#49063]
@@ -1806,6 +1820,8 @@
1806
1820
  ### Changed
1807
1821
  - Update node version requirement to 14.16.1
1808
1822
 
1823
+ [1.12.2]: https://github.com/Automattic/jetpack-components/compare/1.12.1...1.12.2
1824
+ [1.12.1]: https://github.com/Automattic/jetpack-components/compare/1.12.0...1.12.1
1809
1825
  [1.12.0]: https://github.com/Automattic/jetpack-components/compare/1.11.3...1.12.0
1810
1826
  [1.11.3]: https://github.com/Automattic/jetpack-components/compare/1.11.2...1.11.3
1811
1827
  [1.11.2]: https://github.com/Automattic/jetpack-components/compare/1.11.1...1.11.2
package/SECURITY.md CHANGED
@@ -13,7 +13,6 @@ Our HackerOne program covers the below plugin software, as well as a variety of
13
13
  * [Jetpack](https://jetpack.com/)
14
14
  * Jetpack Backup
15
15
  * Jetpack Boost
16
- * Jetpack CRM
17
16
  * Jetpack Protect
18
17
  * Jetpack Search
19
18
  * Jetpack Social
@@ -84,7 +84,33 @@
84
84
  }
85
85
  }
86
86
 
87
- // Make Hello Dolly background white for Jetpack admin pages.
87
+ // Normalize Hello Dolly across Jetpack admin pages. The plugin renders
88
+ // `<p id="dolly">` early inside `#wpbody-content`, OUTSIDE our React
89
+ // mount — so we anchor on the `jetpack-admin-page` body class added
90
+ // server-side by Jetpack's admin menu registration, not on the React
91
+ // wrapper's `.jp-admin-page` class. Any Jetpack admin page gets the
92
+ // normalized look for free. Per-page overrides can still layer on top
93
+ // via higher-specificity selectors (see e.g. My Jetpack).
94
+
95
+ // We deliberately do NOT set `position`/`top`/`left`/`right` here:
96
+ // those would become active on any per-page rule that flips Dolly to
97
+ // `position: absolute` (e.g. My Jetpack), causing it to stretch to its
98
+ // container's full width and pin to top — which covers the page title.
99
+ // `float: none` alone is enough to break out of Hello Dolly's default
100
+ // `float: right`; pages that need different positioning add their own
101
+ // position rule on top.
88
102
  :global(.jetpack-admin-page #dolly) {
89
- background-color: #fff;
103
+ // Hello Dolly already ships `padding: 5px 10px; margin: 0; font-size: 12px;
104
+ // line-height: 1.6666;` — see https://github.com/WordPress/WordPress/blob/trunk/wp-content/plugins/hello.php
105
+ // We override only the bits that need to differ from those defaults.
106
+ float: none;
107
+ text-align: right;
108
+ background: var(--wpds-color-bg-surface-neutral-strong, #fff);
109
+ font-style: italic;
110
+ color: var(--wpds-color-fg-content-neutral-weak, #87a6bc);
111
+ border-bottom: none;
112
+
113
+ @media (max-width: 659px) {
114
+ display: none;
115
+ }
90
116
  }
@@ -1,7 +1,7 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { getCurrencyObject } from '@automattic/number-formatters';
3
- import { Button } from '@wordpress/components';
4
3
  import { sprintf, __ } from '@wordpress/i18n';
4
+ import { Button } from '@wordpress/ui';
5
5
  import LoadingPlaceholder from '../loading-placeholder/index.js';
6
6
  import TermsOfService from '../terms-of-service/index.js';
7
7
  import './style.scss';
@@ -32,7 +32,7 @@ const PricingCard = ({ currencyCode = 'USD', priceDetails = __('/month, paid yea
32
32
  ] })), props.priceAfter > 0 && (_jsxs(_Fragment, { children: [
33
33
  _jsxs("div", { className: "jp-components__pricing-card__price-after", children: [
34
34
  _jsx("span", { className: "jp-components__pricing-card__currency", children: currencyObjectAfter.symbol }), _jsx("span", { className: "jp-components__pricing-card__price", children: currencyObjectAfter.integer }), showPriceDecimals(currencyObjectAfter) && (_jsx("span", { className: "jp-components__pricing-card__price-decimal", children: currencyObjectAfter.fraction }))] }), _jsx("span", { className: "jp-components__pricing-card__price-details", children: priceDetails })
35
- ] }))] }), props.children && (_jsx("div", { className: "jp-components__pricing-card__extra-content-wrapper", children: props.children })), props.tosText && _jsx("div", { className: "jp-components__pricing-card__tos", children: props.tosText }), props.ctaText && (_jsxs(_Fragment, { children: [!props.tosText && (_jsx("div", { className: "jp-components__pricing-card__tos", children: _jsx(TermsOfService, { agreeButtonLabel: props.ctaText }) })), _jsx("div", { className: "jp-components__pricing-card__cta", children: _jsx(Button, { className: "jp-components__pricing-card__button", label: props.ctaText, onClick: props.onCtaClick, children: props.ctaText }) })
35
+ ] }))] }), props.children && (_jsx("div", { className: "jp-components__pricing-card__extra-content-wrapper", children: props.children })), props.tosText && _jsx("div", { className: "jp-components__pricing-card__tos", children: props.tosText }), props.ctaText && (_jsxs(_Fragment, { children: [!props.tosText && (_jsx("div", { className: "jp-components__pricing-card__tos", children: _jsx(TermsOfService, { agreeButtonLabel: props.ctaText }) })), _jsx("div", { className: "jp-components__pricing-card__cta", children: _jsx(Button, { variant: "solid", className: "jp-components__pricing-card__button", onClick: props.onCtaClick, children: props.ctaText }) })
36
36
  ] })), props.infoText && (_jsx("div", { className: "jp-components__pricing-card__info", children: props.infoText }))] }));
37
37
  };
38
38
  export default PricingCard;
@@ -87,13 +87,11 @@
87
87
  }
88
88
 
89
89
  &__button {
90
+ // Full-width CTA; the @wordpress/ui Button owns the rest of its chrome
91
+ // (fill, padding, radius) via its `solid` variant.
90
92
  width: 100%;
91
- height: auto;
92
- font-size: 18px;
93
- padding: 14px 24px;
94
93
  margin: 24px 0 32px;
95
- justify-content: center;
96
- align-items: center;
94
+
97
95
  }
98
96
 
99
97
  &__info,
@@ -45,7 +45,7 @@ export const PricingTableItem = ({ isIncluded = false, isComingSoon = false, ind
45
45
  return (_jsx("div", { className: clsx(styles.item, styles.value, styles.empty) }));
46
46
  }
47
47
  return (_jsxs("div", { className: clsx(styles.item, styles.value), children: [
48
- _jsx(Icon, { className: clsx(styles.icon, showTick ? styles['icon-check'] : styles['icon-cross']), size: 32, icon: showTick ? check : closeSmall }), _jsx(Text, { variant: "body-small", children: label || defaultLabel }), showTooltip && (_jsx(IconTooltip, { title: tooltipTitle ? tooltipTitle : defaultTooltipTitle, iconClassName: styles['popover-icon'], className: clsx(styles.popover, tooltipClassName), placement: 'bottom-end', iconSize: 14, offset: 4, wide: Boolean(tooltipTitle && tooltipInfo), children: _jsx(Text, { variant: "body-small", component: "div", children: tooltipInfo || defaultTooltipInfo }) }))] }));
48
+ _jsx(Icon, { className: clsx(styles.icon, showTick ? styles['icon-check'] : styles['icon-cross']), size: 32, icon: showTick ? check : closeSmall }), _jsx(Text, { variant: "body-small", children: label || defaultLabel }), showTooltip && (_jsx(IconTooltip, { title: tooltipTitle ? tooltipTitle : defaultTooltipTitle, iconClassName: styles['popover-icon'], className: clsx(styles.popover, tooltipClassName), placement: 'bottom-end', iconSize: 14, offset: 4, wide: Boolean(tooltipTitle && tooltipInfo), inline: false, shift: true, children: _jsx(Text, { variant: "body-small", component: "div", children: tooltipInfo || defaultTooltipInfo }) }))] }));
49
49
  };
50
50
  export const PricingTableHeader = ({ title, children }) => (_jsxs("div", { className: styles.headerContainer, children: [title && (_jsx(Text, { variant: "headline-small", className: styles.title, children: title })), _jsx("div", { className: styles.header, children: children })
51
51
  ] }));
@@ -77,7 +77,7 @@ const PricingTable = ({ title, headerLogo, items, children, showIntroOfferDiscla
77
77
  return (_jsxs("div", { className: clsx(styles.item, styles.feature, {
78
78
  [styles['last-feature']]: i === items.length - 1,
79
79
  }), children: [
80
- _jsx(Text, { variant: "body-small", children: _jsx("strong", { children: item.name }) }), item.tooltipInfo && (_jsx(IconTooltip, { title: item.tooltipTitle, iconClassName: styles['popover-icon'], className: styles.popover, placement: item.tooltipPlacement ? item.tooltipPlacement : 'bottom-end', iconSize: 14, offset: 4, wide: Boolean(item.tooltipTitle && item.tooltipInfo), children: _jsx(Text, { variant: "body-small", children: item.tooltipInfo }) }))] }, i));
80
+ _jsx(Text, { variant: "body-small", children: _jsx("strong", { children: item.name }) }), item.tooltipInfo && (_jsx(IconTooltip, { title: item.tooltipTitle, iconClassName: styles['popover-icon'], className: styles.popover, placement: item.tooltipPlacement ? item.tooltipPlacement : 'bottom-end', iconSize: 14, offset: 4, wide: Boolean(item.tooltipTitle && item.tooltipInfo), inline: false, shift: true, children: _jsx(Text, { variant: "body-small", children: item.tooltipInfo }) }))] }, i));
81
81
  }), children] }) }), _jsx("div", { className: styles['tos-container'], children: _jsxs("div", { className: styles.tos, children: [showIntroOfferDisclaimer && (_jsx(Text, { variant: "body-small", children: __('Reduced pricing is a limited offer for the first year and renews at regular price.', 'jetpack-components') })), _jsx(TermsOfService, { multipleButtons: true })
82
82
  ] }) })
83
83
  ] }));
@@ -84,7 +84,33 @@
84
84
  }
85
85
  }
86
86
 
87
- // Make Hello Dolly background white for Jetpack admin pages.
87
+ // Normalize Hello Dolly across Jetpack admin pages. The plugin renders
88
+ // `<p id="dolly">` early inside `#wpbody-content`, OUTSIDE our React
89
+ // mount — so we anchor on the `jetpack-admin-page` body class added
90
+ // server-side by Jetpack's admin menu registration, not on the React
91
+ // wrapper's `.jp-admin-page` class. Any Jetpack admin page gets the
92
+ // normalized look for free. Per-page overrides can still layer on top
93
+ // via higher-specificity selectors (see e.g. My Jetpack).
94
+
95
+ // We deliberately do NOT set `position`/`top`/`left`/`right` here:
96
+ // those would become active on any per-page rule that flips Dolly to
97
+ // `position: absolute` (e.g. My Jetpack), causing it to stretch to its
98
+ // container's full width and pin to top — which covers the page title.
99
+ // `float: none` alone is enough to break out of Hello Dolly's default
100
+ // `float: right`; pages that need different positioning add their own
101
+ // position rule on top.
88
102
  :global(.jetpack-admin-page #dolly) {
89
- background-color: #fff;
103
+ // Hello Dolly already ships `padding: 5px 10px; margin: 0; font-size: 12px;
104
+ // line-height: 1.6666;` — see https://github.com/WordPress/WordPress/blob/trunk/wp-content/plugins/hello.php
105
+ // We override only the bits that need to differ from those defaults.
106
+ float: none;
107
+ text-align: right;
108
+ background: var(--wpds-color-bg-surface-neutral-strong, #fff);
109
+ font-style: italic;
110
+ color: var(--wpds-color-fg-content-neutral-weak, #87a6bc);
111
+ border-bottom: none;
112
+
113
+ @media (max-width: 659px) {
114
+ display: none;
115
+ }
90
116
  }
@@ -1,6 +1,6 @@
1
1
  import { getCurrencyObject } from '@automattic/number-formatters';
2
- import { Button } from '@wordpress/components';
3
2
  import { sprintf, __ } from '@wordpress/i18n';
3
+ import { Button } from '@wordpress/ui';
4
4
  import LoadingPlaceholder from '../loading-placeholder/index.tsx';
5
5
  import TermsOfService from '../terms-of-service/index.tsx';
6
6
  import type { PricingCardProps } from './types.ts';
@@ -113,8 +113,8 @@ const PricingCard: FC< PricingCardProps > = ( {
113
113
  ) }
114
114
  <div className="jp-components__pricing-card__cta">
115
115
  <Button
116
+ variant="solid"
116
117
  className="jp-components__pricing-card__button"
117
- label={ props.ctaText }
118
118
  onClick={ props.onCtaClick }
119
119
  >
120
120
  { props.ctaText }
@@ -87,13 +87,11 @@
87
87
  }
88
88
 
89
89
  &__button {
90
+ // Full-width CTA; the @wordpress/ui Button owns the rest of its chrome
91
+ // (fill, padding, radius) via its `solid` variant.
90
92
  width: 100%;
91
- height: auto;
92
- font-size: 18px;
93
- padding: 14px 24px;
94
93
  margin: 24px 0 32px;
95
- justify-content: center;
96
- align-items: center;
94
+
97
95
  }
98
96
 
99
97
  &__info,
@@ -103,6 +103,8 @@ export const PricingTableItem: FC< PricingTableItemProps > = ( {
103
103
  iconSize={ 14 }
104
104
  offset={ 4 }
105
105
  wide={ Boolean( tooltipTitle && tooltipInfo ) }
106
+ inline={ false }
107
+ shift
106
108
  >
107
109
  <Text variant="body-small" component="div">
108
110
  { tooltipInfo || defaultTooltipInfo }
@@ -204,6 +206,8 @@ const PricingTable: FC< PricingTableProps > = ( {
204
206
  iconSize={ 14 }
205
207
  offset={ 4 }
206
208
  wide={ Boolean( item.tooltipTitle && item.tooltipInfo ) }
209
+ inline={ false }
210
+ shift
207
211
  >
208
212
  <Text variant="body-small">{ item.tooltipInfo }</Text>
209
213
  </IconTooltip>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automattic/jetpack-components",
3
- "version": "1.12.0",
3
+ "version": "1.12.2",
4
4
  "description": "Jetpack Components Package",
5
5
  "homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/components/#readme",
6
6
  "bugs": {
@@ -74,7 +74,7 @@
74
74
  "dependencies": {
75
75
  "@automattic/format-currency": "1.0.1",
76
76
  "@automattic/jetpack-api": "^1.0.26",
77
- "@automattic/jetpack-boost-score-api": "^1.0.43",
77
+ "@automattic/jetpack-boost-score-api": "^1.0.44",
78
78
  "@automattic/jetpack-script-data": "^0.6.4",
79
79
  "@automattic/number-formatters": "^1.2.0",
80
80
  "@babel/runtime": "^7",
@@ -87,10 +87,10 @@
87
87
  "@wordpress/date": "5.46.0",
88
88
  "@wordpress/element": "6.46.0",
89
89
  "@wordpress/i18n": "6.19.0",
90
- "@wordpress/icons": "12.2.0",
90
+ "@wordpress/icons": "13.1.0",
91
91
  "@wordpress/notices": "5.46.0",
92
92
  "@wordpress/theme": "0.13.0",
93
- "@wordpress/ui": "0.11.0",
93
+ "@wordpress/ui": "0.13.0",
94
94
  "clsx": "2.1.1",
95
95
  "js-sha256": "0.11.1",
96
96
  "prop-types": "^15.7.2",
@@ -101,7 +101,7 @@
101
101
  "uplot-react": "1.1.4"
102
102
  },
103
103
  "devDependencies": {
104
- "@automattic/jetpack-base-styles": "^1.2.4",
104
+ "@automattic/jetpack-base-styles": "^1.2.5",
105
105
  "@babel/core": "7.29.0",
106
106
  "@babel/preset-react": "7.28.5",
107
107
  "@jest/globals": "30.4.1",