@automattic/jetpack-components 1.11.2 → 1.11.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,12 @@
2
2
 
3
3
  ### This is a list detailing changes for the Jetpack RNA Components package releases.
4
4
 
5
+ ## [1.11.3] - 2026-05-21
6
+ ### Changed
7
+ - Mark ContextualUpgradeTrigger as @deprecated. Use Notice from @wordpress/ui instead. The implementation is unchanged. [#48909]
8
+ - Update package dependencies. [#48405]
9
+ - Update package dependencies. [#49012]
10
+
5
11
  ## [1.11.2] - 2026-05-19
6
12
  ### Changed
7
13
  - Deprecate Status; inline @wordpress/ui Text in consumers. [#48711]
@@ -1788,6 +1794,7 @@
1788
1794
  ### Changed
1789
1795
  - Update node version requirement to 14.16.1
1790
1796
 
1797
+ [1.11.3]: https://github.com/Automattic/jetpack-components/compare/1.11.2...1.11.3
1791
1798
  [1.11.2]: https://github.com/Automattic/jetpack-components/compare/1.11.1...1.11.2
1792
1799
  [1.11.1]: https://github.com/Automattic/jetpack-components/compare/1.11.0...1.11.1
1793
1800
  [1.11.0]: https://github.com/Automattic/jetpack-components/compare/1.10.0...1.11.0
@@ -1,4 +1,19 @@
1
1
  import { CutBaseProps } from './types.ts';
2
2
  import type { FC } from 'react';
3
+ /**
4
+ * ContextualUpgradeTrigger component.
5
+ *
6
+ * @deprecated Use `Notice` from `@wordpress/ui` instead. Compose with `Notice.Root` (`intent="info"`), `Notice.Description` for the body, and `Notice.Actions` + `Notice.ActionLink` / `Notice.ActionButton` for the CTA. See https://github.com/Automattic/jetpack/issues/48160 for migration guidance.
7
+ *
8
+ * @param props - The component properties.
9
+ * @param props.description - The body copy describing the upgrade context.
10
+ * @param props.cta - The CTA label.
11
+ * @param props.onClick - Click handler when rendered as a button.
12
+ * @param props.href - When provided, renders as an anchor instead of a button.
13
+ * @param props.openInNewTab - Whether to open the link in a new tab.
14
+ * @param props.className - Optional class for the root element.
15
+ * @param props.tooltipText - Optional tooltip body shown next to the description.
16
+ * @return The rendered upgrade trigger.
17
+ */
3
18
  declare const ContextualUpgradeTrigger: FC<CutBaseProps>;
4
19
  export default ContextualUpgradeTrigger;
@@ -4,6 +4,21 @@ import clsx from 'clsx';
4
4
  import IconTooltip from '../icon-tooltip/index.js';
5
5
  import Text from '../text/index.js';
6
6
  import styles from './style.module.scss';
7
+ /**
8
+ * ContextualUpgradeTrigger component.
9
+ *
10
+ * @deprecated Use `Notice` from `@wordpress/ui` instead. Compose with `Notice.Root` (`intent="info"`), `Notice.Description` for the body, and `Notice.Actions` + `Notice.ActionLink` / `Notice.ActionButton` for the CTA. See https://github.com/Automattic/jetpack/issues/48160 for migration guidance.
11
+ *
12
+ * @param props - The component properties.
13
+ * @param props.description - The body copy describing the upgrade context.
14
+ * @param props.cta - The CTA label.
15
+ * @param props.onClick - Click handler when rendered as a button.
16
+ * @param props.href - When provided, renders as an anchor instead of a button.
17
+ * @param props.openInNewTab - Whether to open the link in a new tab.
18
+ * @param props.className - Optional class for the root element.
19
+ * @param props.tooltipText - Optional tooltip body shown next to the description.
20
+ * @return The rendered upgrade trigger.
21
+ */
7
22
  const ContextualUpgradeTrigger = ({ description, cta, onClick, href, openInNewTab = false, className, tooltipText = '', }) => {
8
23
  const Tag = href !== undefined ? 'a' : 'button';
9
24
  const tagProps = Tag === 'a' ? { href, ...(openInNewTab && { target: '_blank' }) } : { onClick };
@@ -35,8 +35,7 @@ const JetpackFooter = ({ className, menu, ...otherProps }) => {
35
35
  _jsxs(Stack, { className: "jetpack-footer__logo", direction: "row", gap: "sm", align: "center", children: [
36
36
  _jsx(JetpackLogo, { showText: false, height: 16, "aria-hidden": "true" }), _jsx(Text, { variant: "body-md", children: "Jetpack" })
37
37
  ] }), _jsx(Stack, { render: _jsx("ul", {}), direction: "row", gap: "lg", wrap: "wrap", children: items.map(item => {
38
- const isButton = item.role === 'button';
39
- return (_jsx("li", { children: _jsx(Text, { variant: "body-md", className: "jetpack-footer__menu-item", render: isButton ? (_jsx(Link, { render: _jsx("span", {}), tone: "neutral", variant: "default", role: item.role, tabIndex: 0, onClick: item.onClick || undefined, onKeyDown: item.onKeyDown || undefined })) : (_jsx(Link, { tone: "neutral", variant: "default", href: item.href || '', title: item.title || '', role: item.role, onClick: item.onClick || undefined, onKeyDown: item.onKeyDown || undefined })), children: item.label }) }, item.label));
38
+ return (_jsx("li", { children: _jsx(Text, { variant: "body-md", className: "jetpack-footer__menu-item", render: !item.href ? (_jsx(Link, { render: _jsx("span", {}), tabIndex: 0, title: item.title || '', onClick: item.onClick || undefined, onKeyDown: item.onKeyDown || undefined, role: "button" })) : (_jsx(Link, { href: item.href, title: item.title || '', onClick: item.onClick || undefined, onKeyDown: item.onKeyDown || undefined })), children: item.label }) }, item.label));
40
39
  }) }), _jsx("a", { className: "jetpack-footer__a8c", href: getRedirectUrl('a8c-about'), rel: "noopener noreferrer", target: "_blank", children: _jsx(AutomatticBylineLogo, { height: 8 }) })
41
40
  ] }));
42
41
  };
@@ -4,7 +4,6 @@ export type JetpackFooterMenuItem = {
4
4
  onClick?: () => void;
5
5
  onKeyDown?: () => void;
6
6
  title?: string;
7
- role?: string;
8
7
  };
9
8
  export type JetpackFooterProps = {
10
9
  /**
@@ -6,6 +6,21 @@ import styles from './style.module.scss';
6
6
  import { CutBaseProps } from './types.ts';
7
7
  import type { FC } from 'react';
8
8
 
9
+ /**
10
+ * ContextualUpgradeTrigger component.
11
+ *
12
+ * @deprecated Use `Notice` from `@wordpress/ui` instead. Compose with `Notice.Root` (`intent="info"`), `Notice.Description` for the body, and `Notice.Actions` + `Notice.ActionLink` / `Notice.ActionButton` for the CTA. See https://github.com/Automattic/jetpack/issues/48160 for migration guidance.
13
+ *
14
+ * @param props - The component properties.
15
+ * @param props.description - The body copy describing the upgrade context.
16
+ * @param props.cta - The CTA label.
17
+ * @param props.onClick - Click handler when rendered as a button.
18
+ * @param props.href - When provided, renders as an anchor instead of a button.
19
+ * @param props.openInNewTab - Whether to open the link in a new tab.
20
+ * @param props.className - Optional class for the root element.
21
+ * @param props.tooltipText - Optional tooltip body shown next to the description.
22
+ * @return The rendered upgrade trigger.
23
+ */
9
24
  const ContextualUpgradeTrigger: FC< CutBaseProps > = ( {
10
25
  description,
11
26
  cta,
@@ -64,31 +64,25 @@ const JetpackFooter: FC< JetpackFooterProps > = ( { className, menu, ...otherPro
64
64
  </Stack>
65
65
  <Stack render={ <ul /> } direction="row" gap="lg" wrap="wrap">
66
66
  { items.map( item => {
67
- const isButton = item.role === 'button';
68
-
69
67
  return (
70
68
  <li key={ item.label }>
71
69
  <Text
72
70
  variant="body-md"
73
71
  className="jetpack-footer__menu-item"
74
72
  render={
75
- isButton ? (
73
+ ! item.href ? (
76
74
  <Link
77
75
  render={ <span /> }
78
- tone="neutral"
79
- variant="default"
80
- role={ item.role }
81
76
  tabIndex={ 0 }
77
+ title={ item.title || '' }
82
78
  onClick={ item.onClick || undefined }
83
79
  onKeyDown={ item.onKeyDown || undefined }
80
+ role="button"
84
81
  />
85
82
  ) : (
86
83
  <Link
87
- tone="neutral"
88
- variant="default"
89
- href={ item.href || '' }
84
+ href={ item.href }
90
85
  title={ item.title || '' }
91
- role={ item.role }
92
86
  onClick={ item.onClick || undefined }
93
87
  onKeyDown={ item.onKeyDown || undefined }
94
88
  />
@@ -4,7 +4,6 @@ export type JetpackFooterMenuItem = {
4
4
  onClick?: () => void;
5
5
  onKeyDown?: () => void;
6
6
  title?: string;
7
- role?: string;
8
7
  };
9
8
 
10
9
  export type JetpackFooterProps = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automattic/jetpack-components",
3
- "version": "1.11.2",
3
+ "version": "1.11.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": {
@@ -61,23 +61,23 @@
61
61
  ],
62
62
  "dependencies": {
63
63
  "@automattic/format-currency": "1.0.1",
64
- "@automattic/jetpack-api": "^1.0.25",
65
- "@automattic/jetpack-boost-score-api": "^1.0.42",
64
+ "@automattic/jetpack-api": "^1.0.26",
65
+ "@automattic/jetpack-boost-score-api": "^1.0.43",
66
66
  "@automattic/jetpack-script-data": "^0.6.4",
67
- "@automattic/number-formatters": "^1.1.8",
67
+ "@automattic/number-formatters": "^1.1.10",
68
68
  "@babel/runtime": "^7",
69
69
  "@gravatar-com/hovercards": "0.16.0",
70
70
  "@wordpress/admin-ui": "2.0.0",
71
- "@wordpress/browserslist-config": "6.44.0",
72
- "@wordpress/components": "32.6.0",
73
- "@wordpress/compose": "7.44.0",
74
- "@wordpress/data": "10.44.0",
75
- "@wordpress/date": "5.44.0",
76
- "@wordpress/element": "6.44.0",
77
- "@wordpress/i18n": "6.17.0",
71
+ "@wordpress/browserslist-config": "6.46.0",
72
+ "@wordpress/components": "33.1.0",
73
+ "@wordpress/compose": "7.46.0",
74
+ "@wordpress/data": "10.46.0",
75
+ "@wordpress/date": "5.46.0",
76
+ "@wordpress/element": "6.46.0",
77
+ "@wordpress/i18n": "6.19.0",
78
78
  "@wordpress/icons": "12.2.0",
79
- "@wordpress/notices": "5.44.0",
80
- "@wordpress/theme": "0.11.0",
79
+ "@wordpress/notices": "5.46.0",
80
+ "@wordpress/theme": "0.13.0",
81
81
  "@wordpress/ui": "0.11.0",
82
82
  "clsx": "2.1.1",
83
83
  "js-sha256": "0.11.1",
@@ -89,10 +89,10 @@
89
89
  "uplot-react": "1.1.4"
90
90
  },
91
91
  "devDependencies": {
92
- "@automattic/jetpack-base-styles": "^1.2.3",
92
+ "@automattic/jetpack-base-styles": "^1.2.4",
93
93
  "@babel/core": "7.29.0",
94
94
  "@babel/preset-react": "7.28.5",
95
- "@jest/globals": "30.3.0",
95
+ "@jest/globals": "30.4.1",
96
96
  "@storybook/addon-docs": "10.3.6",
97
97
  "@storybook/react": "10.3.6",
98
98
  "@testing-library/dom": "10.4.1",
@@ -103,7 +103,7 @@
103
103
  "@types/react-dom": "18.3.7",
104
104
  "@types/react-slider": "1.3.6",
105
105
  "@typescript/native-preview": "7.0.0-dev.20260225.1",
106
- "jest": "30.3.0",
106
+ "jest": "30.4.2",
107
107
  "react": "18.3.1",
108
108
  "react-dom": "18.3.1",
109
109
  "require-from-string": "2.0.2",