diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index d22383b48e89..30b82b42ce89 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -216,6 +216,9 @@ importers:
'@wordpress/primitives':
specifier: 4.44.0
version: 4.44.0(react@18.3.1)
+ '@wordpress/ui':
+ specifier: 0.11.0
+ version: 0.11.0(@types/react@18.3.28)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
'@wordpress/url':
specifier: 4.44.0
version: 4.44.0
@@ -723,6 +726,9 @@ importers:
'@wordpress/icons':
specifier: 12.2.0
version: 12.2.0(react@18.3.1)
+ '@wordpress/ui':
+ specifier: 0.11.0
+ version: 0.11.0(@types/react@18.3.28)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
'@wordpress/url':
specifier: 4.44.0
version: 4.44.0
@@ -1093,6 +1099,9 @@ importers:
'@wordpress/icons':
specifier: 12.2.0
version: 12.2.0(react@18.3.1)
+ '@wordpress/ui':
+ specifier: 0.11.0
+ version: 0.11.0(@types/react@18.3.28)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
clsx:
specifier: 2.1.1
version: 2.1.1
@@ -1443,6 +1452,9 @@ importers:
'@wordpress/primitives':
specifier: 4.44.0
version: 4.44.0(react@18.3.1)
+ '@wordpress/ui':
+ specifier: 0.11.0
+ version: 0.11.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
'@wordpress/url':
specifier: 4.44.0
version: 4.44.0
@@ -1869,6 +1881,9 @@ importers:
'@wordpress/icons':
specifier: 12.2.0
version: 12.2.0(react@18.3.1)
+ '@wordpress/ui':
+ specifier: 0.11.0
+ version: 0.11.0(@types/react@18.3.28)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
'@wordpress/url':
specifier: 4.44.0
version: 4.44.0
@@ -2030,6 +2045,9 @@ importers:
'@wordpress/icons':
specifier: 12.2.0
version: 12.2.0(react@18.3.1)
+ '@wordpress/ui':
+ specifier: 0.11.0
+ version: 0.11.0(@types/react@18.3.28)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
moment:
specifier: 2.30.1
version: 2.30.1
@@ -2912,6 +2930,9 @@ importers:
'@wordpress/sync':
specifier: 1.44.0
version: 1.44.0
+ '@wordpress/ui':
+ specifier: 0.11.0
+ version: 0.11.0(@types/react@18.3.28)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
'@wordpress/url':
specifier: 4.44.0
version: 4.44.0
@@ -3445,6 +3466,9 @@ importers:
'@wordpress/i18n':
specifier: 6.17.0
version: 6.17.0
+ '@wordpress/ui':
+ specifier: 0.11.0
+ version: 0.11.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
'@wordpress/widgets':
specifier: 4.44.0
version: 4.44.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
@@ -4609,6 +4633,9 @@ importers:
'@wordpress/plugins':
specifier: 7.44.0
version: 7.44.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ '@wordpress/ui':
+ specifier: 0.11.0
+ version: 0.11.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
gridicons:
specifier: 3.4.2
version: 3.4.2(react@18.3.1)
@@ -4676,6 +4703,9 @@ importers:
'@wordpress/i18n':
specifier: 6.17.0
version: 6.17.0
+ '@wordpress/ui':
+ specifier: 0.11.0
+ version: 0.11.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
clsx:
specifier: 2.1.1
version: 2.1.1
@@ -6209,8 +6239,8 @@ importers:
specifier: 7.0.0-dev.20260225.1
version: 7.0.0-dev.20260225.1
'@wordpress/eslint-plugin':
- specifier: 25.0.0
- version: 25.0.0(@babel/core@7.29.0)(eslint-config-prettier@10.1.8(eslint@9.39.4))(eslint-plugin-import@2.32.0)(eslint-plugin-jest@29.15.0(eslint@9.39.4)(jest@30.3.0)(typescript@5.9.3))(eslint-plugin-jsdoc@62.8.0(eslint@9.39.4))(eslint-plugin-jsx-a11y@6.10.2(eslint@9.39.4))(eslint-plugin-playwright@2.10.0(eslint@9.39.4))(eslint-plugin-prettier@5.5.5(eslint-config-prettier@10.1.8(eslint@9.39.4))(eslint@9.39.4)(wp-prettier@3.0.3))(eslint-plugin-react-hooks@7.0.1(eslint@9.39.4))(eslint-plugin-react@7.37.5(eslint@9.39.4))(eslint@9.39.4)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(stylelint@17.7.0(typescript@5.9.3))(typescript@5.9.3)(wp-prettier@3.0.3)
+ specifier: 25.1.0
+ version: 25.1.0(@babel/core@7.29.0)(eslint-config-prettier@10.1.8(eslint@9.39.4))(eslint-plugin-import@2.32.0)(eslint-plugin-jest@29.15.0(eslint@9.39.4)(jest@30.3.0)(typescript@5.9.3))(eslint-plugin-jsdoc@62.8.0(eslint@9.39.4))(eslint-plugin-jsx-a11y@6.10.2(eslint@9.39.4))(eslint-plugin-playwright@2.10.0(eslint@9.39.4))(eslint-plugin-prettier@5.5.5(eslint-config-prettier@10.1.8(eslint@9.39.4))(eslint@9.39.4)(wp-prettier@3.0.3))(eslint-plugin-react-hooks@7.0.1(eslint@9.39.4))(eslint-plugin-react@7.37.5(eslint@9.39.4))(eslint@9.39.4)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(stylelint@17.7.0(typescript@5.9.3))(typescript@5.9.3)(wp-prettier@3.0.3)
'@wordpress/jest-console':
specifier: 8.44.0
version: 8.44.0(jest@30.3.0)
@@ -10154,6 +10184,7 @@ packages:
'@ungap/structured-clone@1.3.0':
resolution: {integrity: sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==}
+ deprecated: Potential CWE-502 - Update to 1.3.1 or higher
'@unrs/resolver-binding-android-arm-eabi@1.11.1':
resolution: {integrity: sha512-ppLRUgHVaGRWUx0R0Ut06Mjo9gBaBkg3v/8AxusGLhsIotbBLuRk51rAzqLC8gq6NyyAojEXglNjzf6R948DNw==}
@@ -10550,8 +10581,8 @@ packages:
peerDependencies:
'@babel/core': ^7.25.7
- '@wordpress/babel-preset-default@8.44.0':
- resolution: {integrity: sha512-6EQW8ysiQkct2MolHlhyqXfZ/Vgl0Cu9dCeHfPEf7S/8575qua1GnuDSFzEqU/8TIrEG88f2e2qP/R7VRB+EwQ==}
+ '@wordpress/babel-preset-default@8.45.0':
+ resolution: {integrity: sha512-xlrFFf8bsVDpOjzDW4dwkY8w040YupOIeRSVPB1FJyHBae8ObR+p2siM6E8/DrLNuDznudYoUFRnojYQ16ImjQ==}
engines: {node: '>=18.12.0', npm: '>=8.19.2'}
'@wordpress/base-styles@6.20.0':
@@ -10597,6 +10628,10 @@ packages:
resolution: {integrity: sha512-lYtkO7U7ok9RfRBIHWvVWXhcOys6cQuLfwFr1bGuPTE6+LmVHmRyniMnImZlG8Jb3XE4pvH8gXT1ecXogpDI2Q==}
engines: {node: '>=18.12.0', npm: '>=8.19.2'}
+ '@wordpress/browserslist-config@6.45.0':
+ resolution: {integrity: sha512-iSRD/0bxD9PUHWssZN1zZa+xZ2E9FtpgNYKeceTPLKV3rd+rRPqI1h2a2iHboLzex80c1vaxe6eQ9kyZQfGtiA==}
+ engines: {node: '>=18.12.0', npm: '>=8.19.2'}
+
'@wordpress/build@0.13.0':
resolution: {integrity: sha512-a442H7Kh1hW1b9UH8DZzqLaxYAspe84/dWDRyep1R3YZFx2TcMCBs1tAF96xzvli5pN83PAN/gscv2DfNYBHyw==}
engines: {node: '>=20.10.0', npm: '>=10.2.3'}
@@ -10738,8 +10773,8 @@ packages:
resolution: {integrity: sha512-IW4mnA+65XKhABuBkwrQNAlbq97luC6ZIBfdSq0Tkq+AFPqE1lJTMlLo7iBkTpsHsBLyznViPXultq40fz8L7w==}
engines: {node: '>=18.12.0', npm: '>=8.19.2'}
- '@wordpress/eslint-plugin@25.0.0':
- resolution: {integrity: sha512-GYOPtbsibtFWmvFHm4ZBKUM16SREBcvpVHUuQLfh2s/CQtTP9kbC25XHmIdp0by77i2FDFvEtVGHo7aswoiRCA==}
+ '@wordpress/eslint-plugin@25.1.0':
+ resolution: {integrity: sha512-tZVfrpAZoUNQ2A03XA8nVgfejb5lINPZUvbZcg8ZlTB4Bf58daLx5XOw3zIH4ubdS+t4paRslgrdnbCCpqX4Zg==}
engines: {node: '>=18.12.0', npm: '>=8.19.2'}
peerDependencies:
'@babel/core': '>=7'
@@ -10934,8 +10969,8 @@ packages:
react: ^18.0.0
react-dom: ^18.0.0
- '@wordpress/prettier-config@4.44.0':
- resolution: {integrity: sha512-RT8Pc/dGOhMM9PwCsPamhkpIYx6zjTUDBIs/huVYKusByXImXQFoeZmaI3nK/UNus55woW6xyNNWdb2/nvvXgw==}
+ '@wordpress/prettier-config@4.45.0':
+ resolution: {integrity: sha512-Tj8wdH/+uwFOYbyhaQKrfe9WjtCnmGEoOi2i5zQ5KF3NgrdYgfv7ADMnd/fMW2vffxWAZvGjelvH1jybhY6XJA==}
engines: {node: '>=18.12.0', npm: '>=8.19.2'}
peerDependencies:
prettier: '>=3'
@@ -11106,6 +11141,10 @@ packages:
resolution: {integrity: sha512-avxdbIYhDuUh2qi2oiq7KeqYOVv2RubqV8UI/Q7bctZSFSXJE8RQGSR/W2YjABeyWBIjlyX/U5lOxVs2PIfy/w==}
engines: {node: '>=18.12.0', npm: '>=8.19.2'}
+ '@wordpress/warning@3.45.0':
+ resolution: {integrity: sha512-NQ9tAhPdwhfceVIzWra1rbumvgAFAEDTgZlWsX880zLiq1F8JTwBouwW6wfIhA3XLcY6Yj7cBBYLa8vnNiDZDw==}
+ engines: {node: '>=18.12.0', npm: '>=8.19.2'}
+
'@wordpress/widgets@4.44.0':
resolution: {integrity: sha512-wYTWr6/CBip7ZMNwwiV/UyB5mi7W4wR8IU8HcZKwxg/H+Nmwb8MKnVurmAKuxHZvbsmlzLVuBLDqzA5yL1XfmQ==}
engines: {node: '>=18.12.0', npm: '>=8.19.2'}
@@ -23440,7 +23479,7 @@ snapshots:
dependencies:
'@babel/core': 7.29.0
- '@wordpress/babel-preset-default@8.44.0':
+ '@wordpress/babel-preset-default@8.45.0':
dependencies:
'@babel/core': 7.29.0
'@babel/plugin-syntax-import-attributes': 7.28.6(@babel/core@7.29.0)
@@ -23448,8 +23487,8 @@ snapshots:
'@babel/plugin-transform-runtime': 7.29.0(@babel/core@7.29.0)
'@babel/preset-env': 7.29.2(@babel/core@7.29.0)
'@babel/preset-typescript': 7.28.5(@babel/core@7.29.0)
- '@wordpress/browserslist-config': 6.44.0
- '@wordpress/warning': 3.44.0
+ '@wordpress/browserslist-config': 6.45.0
+ '@wordpress/warning': 3.45.0
browserslist: 4.28.2
core-js: 3.38.1
react: 18.3.1
@@ -23919,6 +23958,8 @@ snapshots:
'@wordpress/browserslist-config@6.44.0': {}
+ '@wordpress/browserslist-config@6.45.0': {}
+
'@wordpress/build@0.13.0(@babel/core@7.29.0)(@wordpress/boot@0.11.0(@types/react-dom@18.3.7(@types/react@18.3.28))(@types/react@18.3.28)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@wordpress/route@0.10.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@wordpress/theme@0.11.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(browserslist@4.28.2)':
dependencies:
'@emotion/babel-plugin': 11.13.5
@@ -24797,15 +24838,15 @@ snapshots:
'@wordpress/escape-html@3.45.0': {}
- '@wordpress/eslint-plugin@25.0.0(@babel/core@7.29.0)(eslint-config-prettier@10.1.8(eslint@9.39.4))(eslint-plugin-import@2.32.0)(eslint-plugin-jest@29.15.0(eslint@9.39.4)(jest@30.3.0)(typescript@5.9.3))(eslint-plugin-jsdoc@62.8.0(eslint@9.39.4))(eslint-plugin-jsx-a11y@6.10.2(eslint@9.39.4))(eslint-plugin-playwright@2.10.0(eslint@9.39.4))(eslint-plugin-prettier@5.5.5(eslint-config-prettier@10.1.8(eslint@9.39.4))(eslint@9.39.4)(wp-prettier@3.0.3))(eslint-plugin-react-hooks@7.0.1(eslint@9.39.4))(eslint-plugin-react@7.37.5(eslint@9.39.4))(eslint@9.39.4)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(stylelint@17.7.0(typescript@5.9.3))(typescript@5.9.3)(wp-prettier@3.0.3)':
+ '@wordpress/eslint-plugin@25.1.0(@babel/core@7.29.0)(eslint-config-prettier@10.1.8(eslint@9.39.4))(eslint-plugin-import@2.32.0)(eslint-plugin-jest@29.15.0(eslint@9.39.4)(jest@30.3.0)(typescript@5.9.3))(eslint-plugin-jsdoc@62.8.0(eslint@9.39.4))(eslint-plugin-jsx-a11y@6.10.2(eslint@9.39.4))(eslint-plugin-playwright@2.10.0(eslint@9.39.4))(eslint-plugin-prettier@5.5.5(eslint-config-prettier@10.1.8(eslint@9.39.4))(eslint@9.39.4)(wp-prettier@3.0.3))(eslint-plugin-react-hooks@7.0.1(eslint@9.39.4))(eslint-plugin-react@7.37.5(eslint@9.39.4))(eslint@9.39.4)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(stylelint@17.7.0(typescript@5.9.3))(typescript@5.9.3)(wp-prettier@3.0.3)':
dependencies:
'@babel/core': 7.29.0
'@babel/eslint-parser': 7.28.6(@babel/core@7.29.0)(eslint@9.39.4)
'@eslint-community/eslint-plugin-eslint-comments': 4.7.1(eslint@9.39.4)
'@eslint/compat': 2.0.3(eslint@9.39.4)
- '@wordpress/babel-preset-default': 8.44.0
- '@wordpress/prettier-config': 4.44.0(wp-prettier@3.0.3)
- '@wordpress/theme': 0.11.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(stylelint@17.7.0(typescript@5.9.3))
+ '@wordpress/babel-preset-default': 8.45.0
+ '@wordpress/prettier-config': 4.45.0(wp-prettier@3.0.3)
+ '@wordpress/theme': 0.12.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(stylelint@17.7.0(typescript@5.9.3))
cosmiconfig: 7.1.0
eslint: 9.39.4
eslint-config-prettier: 10.1.8(eslint@9.39.4)
@@ -25579,7 +25620,7 @@ snapshots:
- '@emotion/is-prop-valid'
- supports-color
- '@wordpress/prettier-config@4.44.0(wp-prettier@3.0.3)':
+ '@wordpress/prettier-config@4.45.0(wp-prettier@3.0.3)':
dependencies:
prettier: wp-prettier@3.0.3
@@ -25803,6 +25844,17 @@ snapshots:
react: 18.3.1
react-dom: 18.3.1(react@18.3.1)
+ '@wordpress/theme@0.12.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(stylelint@17.7.0(typescript@5.9.3))':
+ dependencies:
+ '@wordpress/element': 6.45.0
+ '@wordpress/private-apis': 1.45.0
+ colorjs.io: 0.6.1
+ memize: 2.1.1
+ react: 18.3.1
+ react-dom: 18.3.1(react@18.3.1)
+ optionalDependencies:
+ stylelint: 17.7.0(typescript@5.9.3)
+
'@wordpress/token-list@3.44.0': {}
'@wordpress/ui@0.11.0(@types/react@18.3.28)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)':
@@ -25969,6 +26021,8 @@ snapshots:
'@wordpress/warning@3.44.0': {}
+ '@wordpress/warning@3.45.0': {}
+
'@wordpress/widgets@4.44.0(@types/react-dom@18.3.7(@types/react@18.3.28))(@types/react@18.3.28)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)':
dependencies:
'@wordpress/api-fetch': 7.44.0
diff --git a/projects/js-packages/ai-client/changelog/update-eslint-use_wp_recommended_components_link_instead_of_external_link b/projects/js-packages/ai-client/changelog/update-eslint-use_wp_recommended_components_link_instead_of_external_link
new file mode 100644
index 000000000000..948c4788767f
--- /dev/null
+++ b/projects/js-packages/ai-client/changelog/update-eslint-use_wp_recommended_components_link_instead_of_external_link
@@ -0,0 +1,4 @@
+Significance: patch
+Type: changed
+
+Components: Use Link from `@wordpress/ui` instead of ExternalLink.
diff --git a/projects/js-packages/ai-client/package.json b/projects/js-packages/ai-client/package.json
index a5cae544559e..1508d9f5a6b9 100644
--- a/projects/js-packages/ai-client/package.json
+++ b/projects/js-packages/ai-client/package.json
@@ -56,6 +56,7 @@
"@wordpress/i18n": "6.17.0",
"@wordpress/icons": "12.2.0",
"@wordpress/primitives": "4.44.0",
+ "@wordpress/ui": "0.11.0",
"@wordpress/url": "4.44.0",
"clsx": "2.1.1",
"debug": "4.4.3",
diff --git a/projects/js-packages/ai-client/src/components/message/index.tsx b/projects/js-packages/ai-client/src/components/message/index.tsx
index 88afb88bc1da..c72682ca6e3b 100644
--- a/projects/js-packages/ai-client/src/components/message/index.tsx
+++ b/projects/js-packages/ai-client/src/components/message/index.tsx
@@ -1,10 +1,11 @@
/**
* External dependencies
*/
-import { ExternalLink, Button } from '@wordpress/components';
+import { Button } from '@wordpress/components';
import { createInterpolateElement } from '@wordpress/element';
import { __, sprintf } from '@wordpress/i18n';
import { Icon, check } from '@wordpress/icons';
+import { Link } from '@wordpress/ui';
import clsx from 'clsx';
/**
* Internal dependencies
@@ -126,9 +127,9 @@ export default function Message( {
*/
function LearnMoreLink(): ReactElement {
return (
-
+
{ __( 'Learn more', 'jetpack-ai-client' ) }
-
+
);
}
@@ -169,7 +170,8 @@ export function FairUsageLimitMessage(): ReactElement {
);
const element = createInterpolateElement( message, {
link: (
-
diff --git a/projects/js-packages/components/changelog/update-eslint-use_wp_recommended_components_link_instead_of_external_link b/projects/js-packages/components/changelog/update-eslint-use_wp_recommended_components_link_instead_of_external_link
new file mode 100644
index 000000000000..948c4788767f
--- /dev/null
+++ b/projects/js-packages/components/changelog/update-eslint-use_wp_recommended_components_link_instead_of_external_link
@@ -0,0 +1,4 @@
+Significance: patch
+Type: changed
+
+Components: Use Link from `@wordpress/ui` instead of ExternalLink.
diff --git a/projects/js-packages/components/components/jetpack-footer/index.tsx b/projects/js-packages/components/components/jetpack-footer/index.tsx
index 4a849554f323..bec370f6f4e3 100644
--- a/projects/js-packages/components/components/jetpack-footer/index.tsx
+++ b/projects/js-packages/components/components/jetpack-footer/index.tsx
@@ -69,12 +69,12 @@ const JetpackFooter: FC< JetpackFooterProps > = ( { className, menu, ...otherPro
return (
{ icon &&
}
@@ -72,6 +67,15 @@ jest.mock( '@wordpress/components', () => ( {
Path: props =>
,
} ) );
+// Mock @wordpress/ui
+jest.mock( '@wordpress/ui', () => ( {
+ Link: ( { href, children } ) => (
+
+ { children }
+
+ ),
+} ) );
+
// Mock i18n
jest.mock( '@wordpress/i18n', () => ( {
__: text => text,
@@ -95,7 +99,7 @@ jest.mock( '@wordpress/element', () => {
// Replace the text with actual React elements
let result = text;
- // Replace SignupLink and LoginLink with actual ExternalLink components
+ // Replace SignupLink and LoginLink with actual Link components
if ( elements.SignupLink ) {
result = React.createElement(
React.Fragment,
@@ -103,13 +107,13 @@ jest.mock( '@wordpress/element', () => {
'1. ',
React.cloneElement(
elements.SignupLink,
- { 'data-testid': 'external-link' },
+ { 'data-testid': 'link' },
React.createElement( 'strong', null, 'Sign up' )
),
' or ',
React.cloneElement(
elements.LoginLink,
- { 'data-testid': 'external-link' },
+ { 'data-testid': 'link' },
React.createElement( 'strong', null, 'log in' )
),
' to PayPal to get your Payment Button code.'
@@ -772,7 +776,7 @@ describe( 'Edit', () => {
it( 'renders external links to PayPal signup and login pages for WordPress.org', () => {
render(
);
- const links = screen.getAllByTestId( 'external-link' );
+ const links = screen.getAllByTestId( 'link' );
expect( links ).toHaveLength( 2 );
// Check signup link
@@ -796,7 +800,7 @@ describe( 'Edit', () => {
isWpcomPlatformSite.mockReturnValue( true );
render(
);
- const links = screen.getAllByTestId( 'external-link' );
+ const links = screen.getAllByTestId( 'link' );
expect( links ).toHaveLength( 2 );
// Check signup link
diff --git a/projects/packages/paypal-payments/webpack.config.blocks.js b/projects/packages/paypal-payments/webpack.config.blocks.js
index 042d09819cd7..3b8709f089b6 100644
--- a/projects/packages/paypal-payments/webpack.config.blocks.js
+++ b/projects/packages/paypal-payments/webpack.config.blocks.js
@@ -56,6 +56,9 @@ const sharedWebpackConfig = {
],
} ),
+ // Workarounds for non-extracted `@wordpress/*` packages.
+ ...jetpackWebpackConfig.BundledWpPkgsTranspileRules(),
+
// Handle CSS.
jetpackWebpackConfig.CssRule( {
extensions: [ 'css', 'sass', 'scss' ],
diff --git a/projects/packages/publicize/_inc/components/admin-page/toggles/social-module-toggle/index.tsx b/projects/packages/publicize/_inc/components/admin-page/toggles/social-module-toggle/index.tsx
index 4a251250e835..186e89b5e69e 100644
--- a/projects/packages/publicize/_inc/components/admin-page/toggles/social-module-toggle/index.tsx
+++ b/projects/packages/publicize/_inc/components/admin-page/toggles/social-module-toggle/index.tsx
@@ -5,9 +5,9 @@ import {
useBreakpointMatch,
} from '@automattic/jetpack-components';
import { getScriptData, isWpcomPlatformSite } from '@automattic/jetpack-script-data';
-import { ExternalLink } from '@wordpress/components';
import { useSelect, useDispatch } from '@wordpress/data';
import { __, _x } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import clsx from 'clsx';
import { useCallback } from 'react';
import { store as socialStore } from '../../../../social-store';
@@ -80,7 +80,8 @@ const SocialModuleToggle: FC = () => {
'jetpack-publicize-pkg'
) }
-
{
className={ styles.learn }
>
{ __( 'Learn more', 'jetpack-publicize-pkg' ) }
-
+
{ ! isWpcomPlatformSite() && ! hasSocialPaidFeatures() ? (
= ( { disabled } ) => {
'jetpack-publicize-pkg'
) }
-
= ( { disabled } ) => {
>
{ __( 'Create a note', 'jetpack-publicize-pkg' ) }
-
{ isEnabled ? (
= ( { disabled } ) => {
'jetpack-publicize-pkg'
) }
-
+
{ __( 'Learn more', 'jetpack-publicize-pkg' ) }
-
+
}
__nextHasNoMarginBottom={ true }
diff --git a/projects/packages/publicize/_inc/components/block-editor/placeholder.tsx b/projects/packages/publicize/_inc/components/block-editor/placeholder.tsx
index 0f6b60bec616..592010cb8674 100644
--- a/projects/packages/publicize/_inc/components/block-editor/placeholder.tsx
+++ b/projects/packages/publicize/_inc/components/block-editor/placeholder.tsx
@@ -1,8 +1,9 @@
import { getRedirectUrl } from '@automattic/jetpack-components';
import { useAnalytics } from '@automattic/jetpack-shared-extension-utils';
-import { PanelBody, Button, ExternalLink } from '@wordpress/components';
+import { PanelBody, Button } from '@wordpress/components';
import { useCallback, useState } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import { getSocialAdminPageUrl } from '../../utils';
export const Placeholder = () => {
@@ -41,9 +42,9 @@ export const Placeholder = () => {
{ __( 'Activate Jetpack Social', 'jetpack-publicize-pkg' ) }
-
+
{ __( 'Learn more', 'jetpack-publicize-pkg' ) }
-
+
);
diff --git a/projects/packages/publicize/_inc/components/connection-management/connection-name.tsx b/projects/packages/publicize/_inc/components/connection-management/connection-name.tsx
index 0f2646c6a4be..4188ee85115f 100644
--- a/projects/packages/publicize/_inc/components/connection-management/connection-name.tsx
+++ b/projects/packages/publicize/_inc/components/connection-management/connection-name.tsx
@@ -1,6 +1,7 @@
-import { ExternalLink, Spinner } from '@wordpress/components';
+import { Spinner } from '@wordpress/components';
import { useSelect } from '@wordpress/data';
import { __ } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import { store as socialStore } from '../../social-store';
import { Connection } from '../../social-store/types';
import styles from './style.module.scss';
@@ -29,9 +30,9 @@ export function ConnectionName( { connection }: ConnectionNameProps ) {
{ ! connection.profile_link ? (
{ connection.display_name }
) : (
-
+
{ connection.display_name }
-
+
) }
{ isUpdating ? (
diff --git a/projects/packages/publicize/_inc/components/connection-management/connection-status.tsx b/projects/packages/publicize/_inc/components/connection-management/connection-status.tsx
index 908459899d05..fc051192ff53 100644
--- a/projects/packages/publicize/_inc/components/connection-management/connection-status.tsx
+++ b/projects/packages/publicize/_inc/components/connection-management/connection-status.tsx
@@ -1,8 +1,8 @@
import { getRedirectUrl } from '@automattic/jetpack-components';
-import { ExternalLink } from '@wordpress/components';
import { useSelect } from '@wordpress/data';
import { createInterpolateElement } from '@wordpress/element';
import { __, _x, sprintf } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import { store as socialStore } from '../../social-store';
import { Connection } from '../../social-store/types';
import { SupportedService } from '../services/types';
@@ -59,7 +59,8 @@ export function ConnectionStatus( { connection, service }: ConnectionStatusProps
),
{
link: (
-
@@ -81,7 +82,6 @@ export function ConnectionStatus( { connection, service }: ConnectionStatusProps
);
} )( isUnsupported, connection.status ) }
-
{ ! isUnsupported && service ? (
) : (
diff --git a/projects/packages/publicize/_inc/components/customize-and-preview/customization-section/per-connection-notice.tsx b/projects/packages/publicize/_inc/components/customize-and-preview/customization-section/per-connection-notice.tsx
index f24bd09b3528..9271829ac7a5 100644
--- a/projects/packages/publicize/_inc/components/customize-and-preview/customization-section/per-connection-notice.tsx
+++ b/projects/packages/publicize/_inc/components/customize-and-preview/customization-section/per-connection-notice.tsx
@@ -1,6 +1,7 @@
import { getRedirectUrl } from '@automattic/jetpack-components';
-import { ExternalLink, Notice } from '@wordpress/components';
+import { Notice } from '@wordpress/components';
import { __, sprintf } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import { useConnectionMediaValidation } from '../../../hooks/use-connection-media-validation';
import { NO_MEDIA_ERROR, getErrorLabel } from '../../../hooks/use-media-restrictions/constants';
import { Connection } from '../../../social-store/types';
@@ -45,9 +46,9 @@ export function PerConnectionNotice( { connection }: PerConnectionNoticeProps )
{ getErrorLabel( error ) }
-
+
{ __( 'Troubleshooting tips', 'jetpack-publicize-pkg' ) }
-
+
);
}
diff --git a/projects/packages/publicize/_inc/components/form/media-requirements-notice.tsx b/projects/packages/publicize/_inc/components/form/media-requirements-notice.tsx
index 4fb2343c683f..07e29a0591c4 100644
--- a/projects/packages/publicize/_inc/components/form/media-requirements-notice.tsx
+++ b/projects/packages/publicize/_inc/components/form/media-requirements-notice.tsx
@@ -1,8 +1,9 @@
import { getRedirectUrl } from '@automattic/jetpack-components';
-import { ExternalLink, Notice } from '@wordpress/components';
+import { Notice } from '@wordpress/components';
import { useSelect } from '@wordpress/data';
import { Fragment, useMemo } from '@wordpress/element';
import { __, _x } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import { getErrorLabel } from '../../hooks/use-media-restrictions/constants';
import { ValidationErrors } from '../../hooks/use-media-restrictions/types';
import { store as socialStore } from '../../social-store';
@@ -85,9 +86,9 @@ export const MediaRequirementsNotice: FC< MediaRequirementsNoticeProps > = ( {
);
} ) }
-
+
{ __( 'Troubleshooting tips', 'jetpack-publicize-pkg' ) }
-
+
);
};
diff --git a/projects/packages/publicize/_inc/components/manage-connections-modal/confirmation-form/index.tsx b/projects/packages/publicize/_inc/components/manage-connections-modal/confirmation-form/index.tsx
index 9cc78a2b032a..e4db638eb837 100644
--- a/projects/packages/publicize/_inc/components/manage-connections-modal/confirmation-form/index.tsx
+++ b/projects/packages/publicize/_inc/components/manage-connections-modal/confirmation-form/index.tsx
@@ -1,9 +1,9 @@
import { getRedirectUrl, useGlobalNotices } from '@automattic/jetpack-components';
-import { CheckboxControl, ExternalLink, Notice, Button } from '@wordpress/components';
+import { CheckboxControl, Notice, Button } from '@wordpress/components';
import { useDispatch, useSelect } from '@wordpress/data';
import { useCallback, useMemo } from '@wordpress/element';
import { __, _x } from '@wordpress/i18n';
-import { Notice as UiNotice } from '@wordpress/ui';
+import { Notice as UiNotice, Link } from '@wordpress/ui';
import { store as socialStore } from '../../../social-store';
import { KeyringResult } from '../../../social-store/types';
import { useSupportedServices } from '../../services/use-supported-services';
@@ -212,12 +212,13 @@ export function ConfirmationForm( {
'jetpack-publicize-pkg'
) }
-
{ __( 'Learn more', 'jetpack-publicize-pkg' ) }
-
+
) }
@@ -302,7 +303,6 @@ export function ConfirmationForm( {
) }
-
{ accounts.connected.length ? (
{ __( 'Already connected', 'jetpack-publicize-pkg' ) }
@@ -318,7 +318,6 @@ export function ConfirmationForm( {
) : null }
-
{ __( 'Cancel', 'jetpack-publicize-pkg' ) }
diff --git a/projects/packages/publicize/_inc/components/manage-connections-modal/index.tsx b/projects/packages/publicize/_inc/components/manage-connections-modal/index.tsx
index ab39aea94f99..582524c00db8 100644
--- a/projects/packages/publicize/_inc/components/manage-connections-modal/index.tsx
+++ b/projects/packages/publicize/_inc/components/manage-connections-modal/index.tsx
@@ -4,10 +4,11 @@ import {
ThemeProvider,
useBreakpointMatch,
} from '@automattic/jetpack-components';
-import { ExternalLink, Modal } from '@wordpress/components';
+import { Modal } from '@wordpress/components';
import { useDispatch, useSelect } from '@wordpress/data';
import { useCallback } from '@wordpress/element';
import { __, _x } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import clsx from 'clsx';
import { useUserCanShareConnection } from '../../hooks/use-user-can-share-connection';
import { store } from '../../social-store';
@@ -74,9 +75,12 @@ export const ManageConnectionsModal = () => {
'jetpack-publicize-pkg'
) }
-
+
{ __( 'Learn more', 'jetpack-publicize-pkg' ) }
-
+
diff --git a/projects/packages/publicize/_inc/components/manual-sharing/info.tsx b/projects/packages/publicize/_inc/components/manual-sharing/info.tsx
index 266de01254de..076db4aecd54 100644
--- a/projects/packages/publicize/_inc/components/manual-sharing/info.tsx
+++ b/projects/packages/publicize/_inc/components/manual-sharing/info.tsx
@@ -1,6 +1,6 @@
import { Text, getRedirectUrl } from '@automattic/jetpack-components';
-import { ExternalLink } from '@wordpress/components';
import { __ } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import type { ComponentPropsWithoutRef } from 'react';
export type ManualSharingInfoProps = Omit< ComponentPropsWithoutRef< typeof Text >, 'children' >;
@@ -19,10 +19,9 @@ export function ManualSharingInfo( { ...textProps }: ManualSharingInfoProps ) {
`Just tap the social network or "Copy to Clipboard" icon, and we'll format your content for sharing.`,
'jetpack-publicize-pkg'
) }
-
-
+
{ __( 'Learn more', 'jetpack-publicize-pkg' ) }
-
+
);
}
diff --git a/projects/packages/publicize/_inc/components/media-section-v2/index.tsx b/projects/packages/publicize/_inc/components/media-section-v2/index.tsx
index 505b32ead962..2d1218f706fb 100644
--- a/projects/packages/publicize/_inc/components/media-section-v2/index.tsx
+++ b/projects/packages/publicize/_inc/components/media-section-v2/index.tsx
@@ -7,10 +7,11 @@ import { GeneralPurposeImage } from '@automattic/jetpack-ai-client';
import { getRedirectUrl, ThemeProvider } from '@automattic/jetpack-components';
import { useAnalytics } from '@automattic/jetpack-shared-extension-utils';
import { MediaUpload } from '@wordpress/block-editor';
-import { BaseControl, Button, ExternalLink } from '@wordpress/components';
+import { BaseControl, Button } from '@wordpress/components';
import { useCallback, useMemo, useReducer, useRef } from '@wordpress/element';
import { applyFilters } from '@wordpress/hooks';
import { __ } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import useFeaturedImage from '../../hooks/use-featured-image';
import useImageGeneratorConfig from '../../hooks/use-image-generator-config';
import useMediaDetails from '../../hooks/use-media-details';
@@ -447,12 +448,13 @@ export default function MediaSectionV2( {
/>
) }
{ currentSource === 'media-library' && (
-
{ __( 'Learn photo and video best practices', 'jetpack-publicize-pkg' ) }
-
+
) }
diff --git a/projects/packages/publicize/_inc/components/services/custom-inputs.tsx b/projects/packages/publicize/_inc/components/services/custom-inputs.tsx
index 00305d79a0a4..7a081e5425bf 100644
--- a/projects/packages/publicize/_inc/components/services/custom-inputs.tsx
+++ b/projects/packages/publicize/_inc/components/services/custom-inputs.tsx
@@ -1,7 +1,8 @@
-import { ExternalLink, Notice } from '@wordpress/components';
+import { Notice } from '@wordpress/components';
import { useSelect } from '@wordpress/data';
import { createInterpolateElement, useCallback, useId, useState } from '@wordpress/element';
import { __, _x, sprintf } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import clsx from 'clsx';
import { store } from '../../social-store';
import styles from './style.module.scss';
@@ -158,7 +159,11 @@ export function CustomInputs( { service }: CustomInputsProps ) {
),
{
link: (
-
{ label }
-
{ /* Show counter + progress bar when not at limit, or when at limit and dismissed */ }
{ ( ! isAtLimit || isDismissed ) && (
<>
@@ -77,15 +76,12 @@ export function XUsageContent( {
>
) }
-
{ /* At-limit notice for free plan */ }
{ isAtLimit && ! isPaid && ! isDismissed && (
) }
-
{ /* At-limit notice for paid plan */ }
{ isAtLimit && isPaid && ! isDismissed && }
-
{ /* Near-limit warning for free plan (not at limit) */ }
{ isNearLimit && ! isAtLimit && ! isPaid && (
@@ -96,17 +92,16 @@ export function XUsageContent( {
) }
{ ! isSimpleSite() && (
-
+
{ sprintf(
/* translators: %d: paid plan share limit */
__( 'Unlock %d shares per month with a paid plan', 'jetpack-publicize-pkg' ),
PAID_PLAN_LIMIT
) }
-
+
) }
) }
-
{ /* At-limit inline text for free plan (when notice is dismissed) */ }
{ isAtLimit && ! isPaid && isDismissed && (
@@ -117,17 +112,16 @@ export function XUsageContent( {
) }
{ ! isSimpleSite() && (
-
+
{ sprintf(
/* translators: %d: paid plan share limit */
__( 'Unlock %d shares per month with a paid plan', 'jetpack-publicize-pkg' ),
PAID_PLAN_LIMIT
) }
-
+
) }
) }
-
{ /* Reset date for paid plan */ }
{ isPaid && resetDate && (
@@ -147,7 +141,6 @@ export function XUsageContent( {
) }
) }
-
{ /* Bottom text when at limit (free plan, notice shown) */ }
{ isAtLimit && ! isPaid && ! isDismissed && (
diff --git a/projects/packages/publicize/changelog/update-eslint-use_wp_recommended_components_link_instead_of_external_link b/projects/packages/publicize/changelog/update-eslint-use_wp_recommended_components_link_instead_of_external_link
new file mode 100644
index 000000000000..948c4788767f
--- /dev/null
+++ b/projects/packages/publicize/changelog/update-eslint-use_wp_recommended_components_link_instead_of_external_link
@@ -0,0 +1,4 @@
+Significance: patch
+Type: changed
+
+Components: Use Link from `@wordpress/ui` instead of ExternalLink.
diff --git a/projects/packages/search/changelog/update-eslint-use_wp_recommended_components_link_instead_of_external_link b/projects/packages/search/changelog/update-eslint-use_wp_recommended_components_link_instead_of_external_link
new file mode 100644
index 000000000000..948c4788767f
--- /dev/null
+++ b/projects/packages/search/changelog/update-eslint-use_wp_recommended_components_link_instead_of_external_link
@@ -0,0 +1,4 @@
+Significance: patch
+Type: changed
+
+Components: Use Link from `@wordpress/ui` instead of ExternalLink.
diff --git a/projects/packages/search/src/dashboard/components/pages/sections/plan-usage-section.jsx b/projects/packages/search/src/dashboard/components/pages/sections/plan-usage-section.jsx
index 5d971646e331..d6690555e4c3 100644
--- a/projects/packages/search/src/dashboard/components/pages/sections/plan-usage-section.jsx
+++ b/projects/packages/search/src/dashboard/components/pages/sections/plan-usage-section.jsx
@@ -1,7 +1,7 @@
import { ContextualUpgradeTrigger, ThemeProvider } from '@automattic/jetpack-components';
-import { ExternalLink } from '@wordpress/components';
import { createInterpolateElement } from '@wordpress/element';
import { __, sprintf } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import { useState, useCallback, useMemo } from 'react';
import DonutMeterContainer, { formatNumber } from '../../donut-meter-container';
import PlanSummary from './plan-summary';
@@ -405,7 +405,8 @@ const AboutPlanLimits = () => {
),
{
jpPlanLimits: (
-
) }
-
-
-
{ ! hasUploadedChapters && hasIncompleteChapters && (
) }
-
{ hasUploadedChapters && (
@@ -108,14 +99,16 @@ export default function DetailsPanel( {
),
{
link: (
-
+
),
}
) }
) }
-
{ !! updateError && (
{ __( 'Error updating the video details.', 'jetpack-videopress-pkg' ) }
diff --git a/projects/packages/videopress/src/client/block-editor/blocks/video/components/playback-panel/index.tsx b/projects/packages/videopress/src/client/block-editor/blocks/video/components/playback-panel/index.tsx
index 619232154aee..06f70dc9bbf6 100644
--- a/projects/packages/videopress/src/client/block-editor/blocks/video/components/playback-panel/index.tsx
+++ b/projects/packages/videopress/src/client/block-editor/blocks/video/components/playback-panel/index.tsx
@@ -1,12 +1,13 @@
/**
*External dependencies
*/
-import { ExternalLink, PanelBody, ToggleControl } from '@wordpress/components';
+import { PanelBody, ToggleControl } from '@wordpress/components';
import { createInterpolateElement, useCallback } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
/**
* Internal dependencies
*/
+import { Link } from '@wordpress/ui';
import { VideoControlProps } from '../../types';
import styles from './style.module.scss';
/**
@@ -79,7 +80,6 @@ export default function PlaybackPanel( { attributes, setAttributes }: VideoContr
help={ }
__nextHasNoMarginBottom={ true }
/>
-
-
-
-
-
-
{ createInterpolateElement(
__( 'Send us your VideoPress feedback ', 'jetpack-videopress-pkg' ),
{
- a: ,
+ a: ,
}
) }
diff --git a/projects/packages/videopress/src/client/block-editor/blocks/video/components/videopress-uploader/index.js b/projects/packages/videopress/src/client/block-editor/blocks/video/components/videopress-uploader/index.js
index 12202fbd2f58..14cc8b4b45fd 100644
--- a/projects/packages/videopress/src/client/block-editor/blocks/video/components/videopress-uploader/index.js
+++ b/projects/packages/videopress/src/client/block-editor/blocks/video/components/videopress-uploader/index.js
@@ -4,12 +4,13 @@
import { getRedirectUrl } from '@automattic/jetpack-components';
import apiFetch from '@wordpress/api-fetch';
import { BlockIcon, MediaPlaceholder } from '@wordpress/block-editor';
-import { Spinner, withNotices, Button, ExternalLink } from '@wordpress/components';
+import { Spinner, withNotices, Button } from '@wordpress/components';
import { useCallback, useState, useEffect, createInterpolateElement } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
/**
* Internal dependencies
*/
+import { Link } from '@wordpress/ui';
import useResumableUploader from '../../../../../hooks/use-resumable-uploader';
import { uploadFromLibrary } from '../../../../../hooks/use-uploader';
import { isSiteConnected } from '../../../../../lib/connection';
@@ -269,7 +270,9 @@ const VideoPressUploader = ( {
),
{
connectLink: ,
- moreAboutVideoPressLink: ,
+ moreAboutVideoPressLink: (
+
+ ),
}
);
diff --git a/projects/packages/videopress/src/client/block-editor/blocks/video/components/videopress-uploader/uploader-error.js b/projects/packages/videopress/src/client/block-editor/blocks/video/components/videopress-uploader/uploader-error.js
index 27d795ec9592..5b080a3644b6 100644
--- a/projects/packages/videopress/src/client/block-editor/blocks/video/components/videopress-uploader/uploader-error.js
+++ b/projects/packages/videopress/src/client/block-editor/blocks/video/components/videopress-uploader/uploader-error.js
@@ -2,9 +2,10 @@
* External dependencies
*/
import { getRequiredPlan, getSiteFragment } from '@automattic/jetpack-shared-extension-utils';
-import { Button, ExternalLink } from '@wordpress/components';
+import { Button } from '@wordpress/components';
import { createInterpolateElement } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import { PlaceholderWrapper } from '../../edit';
const getErrorMessage = uploadErrorData => {
@@ -27,7 +28,9 @@ const getErrorMessage = uploadErrorData => {
'jetpack-videopress-pkg'
),
{
- upgradeLink: ,
+ upgradeLink: (
+
+ ),
}
);
}
@@ -41,7 +44,10 @@ const getErrorMessage = uploadErrorData => {
),
{
settingsLink: (
-
+
),
}
);
diff --git a/projects/packages/videopress/src/client/block-editor/extend/core-embed/edit.js b/projects/packages/videopress/src/client/block-editor/extend/core-embed/edit.js
index e0d32e9427c9..df0291da2889 100644
--- a/projects/packages/videopress/src/client/block-editor/extend/core-embed/edit.js
+++ b/projects/packages/videopress/src/client/block-editor/extend/core-embed/edit.js
@@ -4,11 +4,12 @@
import { getRedirectUrl } from '@automattic/jetpack-components';
import { Warning, store as blockEditorStore } from '@wordpress/block-editor';
import { createBlock } from '@wordpress/blocks';
-import { Button, ExternalLink } from '@wordpress/components';
+import { Button } from '@wordpress/components';
import { createHigherOrderComponent } from '@wordpress/compose';
import { useDispatch } from '@wordpress/data';
import { useEffect, createInterpolateElement } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
/**
* Internal dependencies
*/
@@ -64,7 +65,9 @@ const withCoreEmbedVideoPressBlock = createHigherOrderComponent( CoreEmbedBlockE
'jetpack-videopress-pkg'
),
{
- moreAboutVideoPressLink: ,
+ moreAboutVideoPressLink: (
+
+ ),
}
);
diff --git a/projects/packages/videopress/src/client/block-editor/extend/core-video/index.js b/projects/packages/videopress/src/client/block-editor/extend/core-video/index.js
index 4379618c27a7..1c6af563a2fe 100644
--- a/projects/packages/videopress/src/client/block-editor/extend/core-video/index.js
+++ b/projects/packages/videopress/src/client/block-editor/extend/core-video/index.js
@@ -4,12 +4,14 @@
import { getRedirectUrl } from '@automattic/jetpack-components';
import { Warning, store as blockEditorStore } from '@wordpress/block-editor';
import { createBlock } from '@wordpress/blocks';
-import { Button, ExternalLink } from '@wordpress/components';
+import { Button } from '@wordpress/components';
import { createHigherOrderComponent } from '@wordpress/compose';
import { useDispatch } from '@wordpress/data';
import { useEffect, createInterpolateElement, useState } from '@wordpress/element';
import { addFilter } from '@wordpress/hooks';
import { __ } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
+
/**
* Internal dependencies
*/
@@ -112,7 +114,9 @@ function JetpackCoreVideoDeprecation( { BlockListBlock, ...props } ) {
'jetpack-videopress-pkg'
),
{
- moreAboutVideoPressLink: ,
+ moreAboutVideoPressLink: (
+
+ ),
}
);
diff --git a/projects/packages/yoast-promo/changelog/update-eslint-use_wp_recommended_components_link_instead_of_external_link b/projects/packages/yoast-promo/changelog/update-eslint-use_wp_recommended_components_link_instead_of_external_link
new file mode 100644
index 000000000000..948c4788767f
--- /dev/null
+++ b/projects/packages/yoast-promo/changelog/update-eslint-use_wp_recommended_components_link_instead_of_external_link
@@ -0,0 +1,4 @@
+Significance: patch
+Type: changed
+
+Components: Use Link from `@wordpress/ui` instead of ExternalLink.
diff --git a/projects/packages/yoast-promo/package.json b/projects/packages/yoast-promo/package.json
index 924129e2c9a5..82ae06f575af 100644
--- a/projects/packages/yoast-promo/package.json
+++ b/projects/packages/yoast-promo/package.json
@@ -35,6 +35,7 @@
"@wordpress/element": "6.44.0",
"@wordpress/i18n": "6.17.0",
"@wordpress/plugins": "7.44.0",
+ "@wordpress/ui": "0.11.0",
"gridicons": "3.4.2",
"react": "18.3.1",
"react-dom": "18.3.1"
diff --git a/projects/packages/yoast-promo/src/js/index.jsx b/projects/packages/yoast-promo/src/js/index.jsx
index c5ff1774862a..03d14b7bf41e 100644
--- a/projects/packages/yoast-promo/src/js/index.jsx
+++ b/projects/packages/yoast-promo/src/js/index.jsx
@@ -1,11 +1,12 @@
import { getRedirectUrl } from '@automattic/jetpack-components';
import { isSimpleSite } from '@automattic/jetpack-script-data';
import { getSiteFragment } from '@automattic/jetpack-shared-extension-utils';
-import { PanelRow, ExternalLink, Button } from '@wordpress/components';
+import { PanelRow, Button } from '@wordpress/components';
import { useSelect } from '@wordpress/data';
import { PluginPrePublishPanel } from '@wordpress/editor';
import { useCallback, useState } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import Gridicon from 'gridicons';
import { JetpackYoastLogos } from './JetpackYoastLogos';
import { createStore } from './utils';
@@ -85,14 +86,15 @@ export const YoastPromoContentFree = () => (
) }
-
{ __( 'Get Yoast SEO', 'jetpack-yoast-promo' ) }
-
+
>
);
@@ -112,14 +114,15 @@ const YoastPromoContentPremium = () => (
) }
-
{ __( 'Get Yoast SEO Premium', 'jetpack-yoast-promo' ) }
-
+
>
);
diff --git a/projects/packages/yoast-promo/webpack.config.js b/projects/packages/yoast-promo/webpack.config.js
index c6dc847cf852..59e7720c9965 100644
--- a/projects/packages/yoast-promo/webpack.config.js
+++ b/projects/packages/yoast-promo/webpack.config.js
@@ -28,6 +28,9 @@ module.exports = [
includeNodeModules: [ '@automattic/jetpack-' ],
} ),
+ // Workarounds for non-extracted `@wordpress/*` packages.
+ ...jetpackWebpackConfig.BundledWpPkgsTranspileRules(),
+
// Handle CSS.
jetpackWebpackConfig.CssRule( {
extensions: [ 'css', 'sass', 'scss' ],
diff --git a/projects/plugins/automattic-for-agencies-client/changelog/update-eslint-use_wp_recommended_components_link_instead_of_external_link b/projects/plugins/automattic-for-agencies-client/changelog/update-eslint-use_wp_recommended_components_link_instead_of_external_link
new file mode 100644
index 000000000000..948c4788767f
--- /dev/null
+++ b/projects/plugins/automattic-for-agencies-client/changelog/update-eslint-use_wp_recommended_components_link_instead_of_external_link
@@ -0,0 +1,4 @@
+Significance: patch
+Type: changed
+
+Components: Use Link from `@wordpress/ui` instead of ExternalLink.
diff --git a/projects/plugins/automattic-for-agencies-client/package.json b/projects/plugins/automattic-for-agencies-client/package.json
index 3fa913097323..2dc4247989ff 100644
--- a/projects/plugins/automattic-for-agencies-client/package.json
+++ b/projects/plugins/automattic-for-agencies-client/package.json
@@ -36,6 +36,7 @@
"@wordpress/date": "5.44.0",
"@wordpress/element": "6.44.0",
"@wordpress/i18n": "6.17.0",
+ "@wordpress/ui": "0.11.0",
"clsx": "2.1.1",
"react": "18.3.1",
"react-dom": "18.3.1"
diff --git a/projects/plugins/automattic-for-agencies-client/src/js/components/connection-card/index.jsx b/projects/plugins/automattic-for-agencies-client/src/js/components/connection-card/index.jsx
index 519c25f369bc..fbbbd2222b69 100644
--- a/projects/plugins/automattic-for-agencies-client/src/js/components/connection-card/index.jsx
+++ b/projects/plugins/automattic-for-agencies-client/src/js/components/connection-card/index.jsx
@@ -1,8 +1,8 @@
import { getRedirectUrl } from '@automattic/jetpack-components';
import { ConnectButton } from '@automattic/jetpack-connection';
-import { ExternalLink } from '@wordpress/components';
import { createInterpolateElement } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import clsx from 'clsx';
import { useCallback, useState } from 'react';
import BrandedCard from '../branded-card';
@@ -67,7 +67,8 @@ function ConnectionContent( { onShowSharingDetailsClick } ) {
{
strong: ,
tosLink: (
-
diff --git a/projects/plugins/automattic-for-agencies-client/webpack.config.js b/projects/plugins/automattic-for-agencies-client/webpack.config.js
index febd4b8150cf..0194c4949867 100644
--- a/projects/plugins/automattic-for-agencies-client/webpack.config.js
+++ b/projects/plugins/automattic-for-agencies-client/webpack.config.js
@@ -33,6 +33,9 @@ module.exports = [
includeNodeModules: [ '@automattic/jetpack-' ],
} ),
+ // Workarounds for non-extracted `@wordpress/*` packages.
+ ...jetpackWebpackConfig.BundledWpPkgsTranspileRules(),
+
// Handle CSS.
jetpackWebpackConfig.CssRule( {
extensions: [ 'css', 'sass', 'scss' ],
diff --git a/projects/plugins/boost/app/assets/src/js/features/cornerstone-pages/meta/meta.tsx b/projects/plugins/boost/app/assets/src/js/features/cornerstone-pages/meta/meta.tsx
index b3c714efc6dc..62c3fae62a95 100644
--- a/projects/plugins/boost/app/assets/src/js/features/cornerstone-pages/meta/meta.tsx
+++ b/projects/plugins/boost/app/assets/src/js/features/cornerstone-pages/meta/meta.tsx
@@ -10,10 +10,10 @@ import { recordBoostEvent } from '$lib/utils/analytics';
import getSupportLink from '$lib/utils/get-support-link';
import { isSameSiteUrl } from '$lib/utils/is-same-site-url';
import { Button, getRedirectUrl } from '@automattic/jetpack-components';
-import { ExternalLink, Tooltip } from '@wordpress/components';
+import { Tooltip } from '@wordpress/components';
import { createInterpolateElement } from '@wordpress/element';
import { __, _n, sprintf } from '@wordpress/i18n';
-import { Notice } from '@wordpress/ui';
+import { Notice, Link } from '@wordpress/ui';
import type { FC, ReactNode } from 'react';
import { useEffect, useMemo, useState } from 'react';
import {
@@ -34,7 +34,8 @@ export const MetaError = () => (
),
{
link: (
- {
recordBoostEvent( 'cornerstone_pages_properties_failed', {} );
@@ -139,7 +140,8 @@ const Meta = () => {
),
{
link: (
- {
recordBoostEvent( 'clicked_cornerstone_pages_learn_more', {} );
diff --git a/projects/plugins/boost/app/assets/src/js/features/cornerstone-pages/prerender/prerender.tsx b/projects/plugins/boost/app/assets/src/js/features/cornerstone-pages/prerender/prerender.tsx
index 81c5fa37ce57..82bcd0cff65c 100644
--- a/projects/plugins/boost/app/assets/src/js/features/cornerstone-pages/prerender/prerender.tsx
+++ b/projects/plugins/boost/app/assets/src/js/features/cornerstone-pages/prerender/prerender.tsx
@@ -1,8 +1,11 @@
import { __ } from '@wordpress/i18n';
-import { ExternalLink, ToggleControl } from '@wordpress/components';
+import { ToggleControl } from '@wordpress/components';
import styles from './prerender.module.scss';
import { recordBoostEvent } from '$lib/utils/analytics';
import { createInterpolateElement, useState } from '@wordpress/element';
+
+import { Link } from '@wordpress/ui';
+
import { getRedirectUrl, IconTooltip } from '@automattic/jetpack-components';
import { useSingleModuleState } from '$features/module/lib/stores';
import { useNotices } from '$features/notice/context';
@@ -92,7 +95,7 @@ const PrerenderWarningMessage = ( { children }: BypassPatternsExampleProps ) =>
) }
{ createInterpolateElement( __( ' Learn more', 'jetpack-boost' ), {
- link: ,
+ link: ,
} ) }
diff --git a/projects/plugins/boost/app/assets/src/js/features/critical-css/show-stopper-error/show-stopper-error.tsx b/projects/plugins/boost/app/assets/src/js/features/critical-css/show-stopper-error/show-stopper-error.tsx
index 1488de383de0..ddc1c47ba055 100644
--- a/projects/plugins/boost/app/assets/src/js/features/critical-css/show-stopper-error/show-stopper-error.tsx
+++ b/projects/plugins/boost/app/assets/src/js/features/critical-css/show-stopper-error/show-stopper-error.tsx
@@ -1,11 +1,10 @@
-import { ExternalLink } from '@wordpress/components';
import { __, sprintf } from '@wordpress/i18n';
-import { Notice } from '@wordpress/ui';
import FoldingElement from '../folding-element/folding-element';
import { ErrorSet, getPrimaryErrorSet } from '../lib/critical-css-errors';
import { CriticalCssState } from '../lib/stores/critical-css-state-types';
import { describeErrorSet, suggestion } from '../lib/describe-critical-css-recommendations';
import { createInterpolateElement } from '@wordpress/element';
+import { Notice, Link } from '@wordpress/ui';
import getSupportLinkCriticalCss from '$lib/utils/get-support-link-critical-css';
import NumberedList from '../numbered-list/numbered-list';
import getCriticalCssErrorSetInterpolateVars from '$lib/utils/get-critical-css-error-set-interpolate-vars';
@@ -119,7 +118,8 @@ const DocumentationSection = ( {
{ createInterpolateElement( message, {
link: (
- {
recordBoostEvent( 'critical_css_learn_more', {} );
@@ -203,7 +203,8 @@ const OtherErrors = ( { cssState, supportLink }: ShowStopperErrorTypes ) => {
{ __( 'Refresh', 'jetpack-boost' ) }
) : (
- {
@@ -211,7 +212,7 @@ const OtherErrors = ( { cssState, supportLink }: ShowStopperErrorTypes ) => {
} }
>
{ __( 'Contact Support', 'jetpack-boost' ) }
-
+
) }
>
) }
diff --git a/projects/plugins/boost/app/assets/src/js/features/lcp/status/error-details.tsx b/projects/plugins/boost/app/assets/src/js/features/lcp/status/error-details.tsx
index ee5b9356bb34..939c606cb1c0 100644
--- a/projects/plugins/boost/app/assets/src/js/features/lcp/status/error-details.tsx
+++ b/projects/plugins/boost/app/assets/src/js/features/lcp/status/error-details.tsx
@@ -1,10 +1,9 @@
import FoldingElement from '$features/critical-css/folding-element/folding-element';
import { recordBoostEvent } from '$lib/utils/analytics';
import { getRedirectUrl } from '@automattic/jetpack-components';
-import { ExternalLink } from '@wordpress/components';
import { createInterpolateElement } from '@wordpress/element';
import { __, _n, sprintf } from '@wordpress/i18n';
-import { Notice } from '@wordpress/ui';
+import { Notice, Link } from '@wordpress/ui';
import { useLcpState } from '../lib/stores/lcp-state';
import { LcpErrorDetails } from '../lib/stores/lcp-state-types';
import styles from './error-details.module.scss';
@@ -83,8 +82,9 @@ const PageError = ( { url, error }: PageErrorProps ) => {
return (
- { getErrorLabel( error ) } ({ url }){ ' ' }
- {
} }
>
{ __( 'Learn more', 'jetpack-boost' ) }
-
+
);
};
diff --git a/projects/plugins/boost/app/assets/src/js/features/module/module.tsx b/projects/plugins/boost/app/assets/src/js/features/module/module.tsx
index 4902e907b46f..b5f3a97f12c2 100644
--- a/projects/plugins/boost/app/assets/src/js/features/module/module.tsx
+++ b/projects/plugins/boost/app/assets/src/js/features/module/module.tsx
@@ -1,5 +1,4 @@
import { getRedirectUrl, ToggleControl } from '@automattic/jetpack-components';
-import { Notice } from '@wordpress/ui';
import { useEffect } from 'react';
import { useSingleModuleState } from './lib/stores';
import styles from './module.module.scss';
@@ -8,7 +7,7 @@ import { __ } from '@wordpress/i18n';
import { isWoaHosting } from '$lib/utils/hosting';
import { useNotices } from '$features/notice/context';
import { createInterpolateElement } from '@wordpress/element';
-import { ExternalLink } from '@wordpress/components';
+import { Notice, Link } from '@wordpress/ui';
import Pill from '$features/ui/pill/pill';
import type { ReactNode } from 'react';
@@ -153,7 +152,8 @@ export default ( props: ModuleProps ) => {
),
{
link: (
-
),
diff --git a/projects/plugins/boost/app/assets/src/js/features/page-cache/health/error-notices.tsx b/projects/plugins/boost/app/assets/src/js/features/page-cache/health/error-notices.tsx
index 77dc37b326c8..4923db4802f7 100644
--- a/projects/plugins/boost/app/assets/src/js/features/page-cache/health/error-notices.tsx
+++ b/projects/plugins/boost/app/assets/src/js/features/page-cache/health/error-notices.tsx
@@ -2,10 +2,9 @@ import { getRedirectUrl } from '@automattic/jetpack-components';
import { createInterpolateElement } from '@wordpress/element';
import styles from './health.module.scss';
import { __, sprintf } from '@wordpress/i18n';
+import { Notice, Link } from '@wordpress/ui';
import { PageCacheError } from '$lib/stores/page-cache';
import { ReactNode } from 'react';
-import { ExternalLink } from '@wordpress/components';
-import { Notice } from '@wordpress/ui';
type NoticeProps = {
onClose: () => void;
@@ -29,7 +28,7 @@ export const FailedSettingsWriteNotice = ( { onClose }: NoticeProps ) => {
'jetpack-boost'
),
{
- link: ,
+ link: ,
}
) }
@@ -62,7 +61,7 @@ export const WPContentNotWritableNotice = ( { onClose }: NoticeProps ) => {
),
{
code: ,
- link: ,
+ link: ,
}
) }
@@ -84,7 +83,7 @@ export const NotUsingPermalinksNotice = ( { onClose }: NoticeProps ) => {
'jetpack-boost'
),
{
- link: ,
+ link: ,
}
) }
@@ -106,7 +105,7 @@ export const AdvancedCacheIncompatibleNotice = ( { onClose }: NoticeProps ) => {
'jetpack-boost'
),
{
- link: ,
+ link: ,
}
) }
@@ -136,7 +135,9 @@ export const AdvancedCacheForSuperCacheNotice = ( {
),
{
code: ,
- link: ,
+ link: (
+
+ ),
}
) }
@@ -160,7 +161,10 @@ export const UnableToWriteToAdvancedCacheNotice = ( { onClose }: NoticeProps ) =
),
{
link: (
-
+
),
}
) }
@@ -191,7 +195,7 @@ export const WPCacheDefinedNotTrueNotice = ( { onClose }: NoticeProps ) => {
),
{
code: ,
- link: ,
+ link: ,
}
) }
@@ -248,7 +252,7 @@ export const WPConfigNotWritableNotice = ( { onClose }: NoticeProps ) => {
),
{
code: ,
- link: ,
+ link: ,
}
) }
diff --git a/projects/plugins/boost/app/assets/src/js/features/page-cache/meta/meta.tsx b/projects/plugins/boost/app/assets/src/js/features/page-cache/meta/meta.tsx
index 7e9c044087e2..b5f7ec5fc779 100644
--- a/projects/plugins/boost/app/assets/src/js/features/page-cache/meta/meta.tsx
+++ b/projects/plugins/boost/app/assets/src/js/features/page-cache/meta/meta.tsx
@@ -1,7 +1,7 @@
import { Button, IconTooltip, getRedirectUrl } from '@automattic/jetpack-components';
-import { Notice } from '@wordpress/ui';
import { createInterpolateElement } from '@wordpress/element';
import { __, _n, sprintf } from '@wordpress/i18n';
+import { Notice, Link as WPLink } from '@wordpress/ui';
import Lightning from '$svg/lightning';
import styles from './meta.module.scss';
import { useEffect, useState } from 'react';
@@ -14,7 +14,6 @@ import ErrorBoundary from '$features/error-boundary/error-boundary';
import ErrorNotice from '$features/error-notice/error-notice';
import { recordBoostEvent } from '$lib/utils/analytics';
import CollapsibleMeta from '$features/ui/collapsible-meta/collapsible-meta';
-import { ExternalLink } from '@wordpress/components';
import type { ChangeEvent, ReactNode } from 'react';
const Meta = () => {
@@ -239,7 +238,7 @@ const BypassPatterns = ( {
__( 'See an example or learn more.', 'jetpack-boost' ),
{
help: , // children are passed after the interpolation.
- link: ,
+ link: ,
}
) }
diff --git a/projects/plugins/boost/app/assets/src/js/layout/settings-page/tips/tips.tsx b/projects/plugins/boost/app/assets/src/js/layout/settings-page/tips/tips.tsx
index c899cce68318..75f588ae3f76 100644
--- a/projects/plugins/boost/app/assets/src/js/layout/settings-page/tips/tips.tsx
+++ b/projects/plugins/boost/app/assets/src/js/layout/settings-page/tips/tips.tsx
@@ -1,9 +1,9 @@
import { getRedirectUrl } from '@automattic/jetpack-components';
import { createInterpolateElement } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import styles from './tips.module.scss';
import { recordBoostEvent } from '$lib/utils/analytics';
-import { ExternalLink } from '@wordpress/components';
const Tips = () => {
const pingdomLink = getRedirectUrl( 'jetpack-boost-pingdom' );
@@ -25,7 +25,8 @@ const Tips = () => {
),
{
link: (
- recordBoostEvent( 'pingdom_link_clicked', {} ) }
href={ pingdomLink }
/>
@@ -44,7 +45,8 @@ const Tips = () => {
),
{
link: (
- recordBoostEvent( 'why_speed_link_clicked', {} ) }
href={ whySpeedLink }
/>
diff --git a/projects/plugins/boost/app/assets/src/js/lib/utils/external-link-interpolate-var.tsx b/projects/plugins/boost/app/assets/src/js/lib/utils/external-link-interpolate-var.tsx
index 8313e770ad4a..9adb2653a025 100644
--- a/projects/plugins/boost/app/assets/src/js/lib/utils/external-link-interpolate-var.tsx
+++ b/projects/plugins/boost/app/assets/src/js/lib/utils/external-link-interpolate-var.tsx
@@ -1,4 +1,4 @@
-import { ExternalLink } from '@wordpress/components';
+import { Link } from '@wordpress/ui';
/**
* Generates an Interpolate var for an external link (with target and rel
@@ -9,6 +9,6 @@ import { ExternalLink } from '@wordpress/components';
*/
export default function externalLinkInterpolateVar( href: string, elementKey = 'link' ) {
return {
- [ elementKey ]: ,
+ [ elementKey ]: ,
};
}
diff --git a/projects/plugins/boost/app/assets/src/js/lib/utils/get-critical-css-error-set-interpolate-vars.tsx b/projects/plugins/boost/app/assets/src/js/lib/utils/get-critical-css-error-set-interpolate-vars.tsx
index 43ef4ef5dd38..8a4f21951710 100644
--- a/projects/plugins/boost/app/assets/src/js/lib/utils/get-critical-css-error-set-interpolate-vars.tsx
+++ b/projects/plugins/boost/app/assets/src/js/lib/utils/get-critical-css-error-set-interpolate-vars.tsx
@@ -1,4 +1,3 @@
-import { ExternalLink } from '@wordpress/components';
import { useNavigate } from 'react-router';
import actionLinkInterpolateVar from '$lib/utils/action-link-interpolate-var';
import { InterpolateVars } from '$lib/utils/interplate-vars-types';
@@ -7,6 +6,7 @@ import { useRegenerateCriticalCssAction } from '$features/critical-css/lib/store
import { suggestion } from '$features/critical-css/lib/describe-critical-css-recommendations';
import { ErrorSet } from '$features/critical-css/lib/critical-css-errors';
import { recordBoostEvent } from './analytics';
+import { Link } from '@wordpress/ui';
function getCriticalCssErrorSetInterpolateVars( errorSet: ErrorSet ) {
const regenerateAction = useRegenerateCriticalCssAction();
@@ -31,7 +31,7 @@ function getCriticalCssErrorSetInterpolateVars( errorSet: ErrorSet ) {
};
if ( 'listLink' in suggestion( errorSet ) ) {
- interpolateVars.link = ;
+ interpolateVars.link = ;
}
return interpolateVars;
diff --git a/projects/plugins/boost/app/assets/src/js/pages/index/index.tsx b/projects/plugins/boost/app/assets/src/js/pages/index/index.tsx
index 5a4a57a4c335..ef692583fee9 100644
--- a/projects/plugins/boost/app/assets/src/js/pages/index/index.tsx
+++ b/projects/plugins/boost/app/assets/src/js/pages/index/index.tsx
@@ -16,9 +16,9 @@ import { recordBoostEvent } from '$lib/utils/analytics';
import { getRedirectUrl } from '@automattic/jetpack-components';
import { createInterpolateElement } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import styles from './index.module.scss';
import LcpModule from '$features/lcp/lcp';
-import { ExternalLink } from '@wordpress/components';
const Index = () => {
const criticalCssLink = getRedirectUrl( 'jetpack-boost-critical-css' );
@@ -55,7 +55,9 @@ const Index = () => {
'jetpack-boost'
),
{
- link: ,
+ link: (
+
+ ),
}
) }
@@ -105,7 +107,9 @@ const Index = () => {
'jetpack-boost'
),
{
- link: ,
+ link: (
+
+ ),
}
) }
@@ -139,7 +143,8 @@ const Index = () => {
),
{
link: (
- recordBoostEvent( 'defer_js_link_clicked', {} ) }
href={ deferJsLink }
/>
@@ -181,7 +186,6 @@ const Index = () => {
-
diff --git a/projects/plugins/boost/app/assets/src/js/pages/purchase-success/purchase-success.tsx b/projects/plugins/boost/app/assets/src/js/pages/purchase-success/purchase-success.tsx
index be386f16cc63..b0d9901fb0b7 100644
--- a/projects/plugins/boost/app/assets/src/js/pages/purchase-success/purchase-success.tsx
+++ b/projects/plugins/boost/app/assets/src/js/pages/purchase-success/purchase-success.tsx
@@ -1,7 +1,7 @@
import { getRedirectUrl, Button } from '@automattic/jetpack-components';
-import { ExternalLink } from '@wordpress/components';
import { createInterpolateElement, useEffect } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import { useSingleModuleState } from '$features/module/lib/stores';
import { useNavigate } from 'react-router';
import CardPage from '$layout/card-page/card-page';
@@ -86,7 +86,7 @@ const PurchaseSuccess: FC = () => {
'jetpack-boost'
),
{
- link: ,
+ link: ,
strong: ,
}
)
@@ -94,9 +94,9 @@ const PurchaseSuccess: FC = () => {
-
+
{ __( 'Learn more about Boost features and upgrades', 'jetpack-boost' ) }
-
+
-
{ __( "View your site's backups", 'jetpack' ) }
-
-
+
{ __( 'View your most recent restore points', 'jetpack' ) }
-
+
);
@@ -344,17 +346,18 @@ class DashBackups extends Component {
if ( hasRealTimeBackups ) {
message = createInterpolateElement(
__(
- 'Every change you make will be backed up, in real-time, as you edit your site. Learn More ',
+ 'Every change you make will be backed up, in real-time, as you edit your site. Learn More',
'jetpack'
),
{
- ExternalLink: (
-
+ >
),
}
);
diff --git a/projects/plugins/jetpack/_inc/client/at-a-glance/boost/index.jsx b/projects/plugins/jetpack/_inc/client/at-a-glance/boost/index.jsx
index b7afef670e1b..512dd9ecc721 100644
--- a/projects/plugins/jetpack/_inc/client/at-a-glance/boost/index.jsx
+++ b/projects/plugins/jetpack/_inc/client/at-a-glance/boost/index.jsx
@@ -5,9 +5,9 @@ import {
calculateDaysSince,
} from '@automattic/jetpack-boost-score-api';
import { BoostScoreBar, getRedirectUrl } from '@automattic/jetpack-components';
-import { ExternalLink } from '@wordpress/components';
import { createInterpolateElement } from '@wordpress/element';
import { __, sprintf } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import clsx from 'clsx';
import PropTypes from 'prop-types';
import { useCallback, useEffect, useState } from 'react';
@@ -482,14 +482,15 @@ const ConversionLossPopover = () => {
>
{ __( 'Source:', 'jetpack' ) }{ ' ' }
-
web.dev
-
+
@@ -525,12 +526,13 @@ const CriticalCssInfoPopover = () => {
{ createInterpolateElement(
__(
- 'You should regenerate Critical CSS to optimize speed whenever your site’s HTML or CSS structure changes after:',
+ 'You should regenerate Critical CSS to optimize speed whenever your site’s HTML or CSS structure changes after:',
'jetpack'
),
{
- ExternalLink: (
- Learn more ',
+ 'Sell more and get more leads with the free Jetpack CRM plugin built specifically for WordPress. Learn more',
'jetpack'
),
{
- ExternalLink: ,
+ Link: ,
br: ,
}
) }
diff --git a/projects/plugins/jetpack/_inc/client/at-a-glance/jetpack-ai.jsx b/projects/plugins/jetpack/_inc/client/at-a-glance/jetpack-ai.jsx
index d3e7c0ff0088..327eafe5c170 100644
--- a/projects/plugins/jetpack/_inc/client/at-a-glance/jetpack-ai.jsx
+++ b/projects/plugins/jetpack/_inc/client/at-a-glance/jetpack-ai.jsx
@@ -2,12 +2,12 @@
* External dependencies
*/
import { getRedirectUrl } from '@automattic/jetpack-components';
-import { ExternalLink } from '@wordpress/components';
import { createInterpolateElement } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
/**
* Internal dependencies
*/
+import { Link } from '@wordpress/ui';
import { connect } from 'react-redux';
import DashItem from 'components/dash-item';
import JetpackBanner from 'components/jetpack-banner';
@@ -37,12 +37,9 @@ function DashJetpackAi( props ) {
link: getRedirectUrl( 'org-ai' ),
};
- const learnMoreLink = createInterpolateElement(
- __( 'Learn more ', 'jetpack' ),
- {
- ExternalLink: ,
- }
- );
+ const learnMoreLink = createInterpolateElement( __( ' Learn more', 'jetpack' ), {
+ Link: ,
+ } );
// TODO: useExperiment to switch upgradeUrl between add-jetpack-ai (default from getProductDescriptionUrl) and jetpack-ai
diff --git a/projects/plugins/jetpack/_inc/client/at-a-glance/stats/dash-stats-bottom.jsx b/projects/plugins/jetpack/_inc/client/at-a-glance/stats/dash-stats-bottom.jsx
index 160f228731ca..b61db678062b 100644
--- a/projects/plugins/jetpack/_inc/client/at-a-glance/stats/dash-stats-bottom.jsx
+++ b/projects/plugins/jetpack/_inc/client/at-a-glance/stats/dash-stats-bottom.jsx
@@ -1,9 +1,9 @@
import { getRedirectUrl } from '@automattic/jetpack-components';
import { formatNumber } from '@automattic/number-formatters';
-import { ExternalLink } from '@wordpress/components';
import { dateI18n } from '@wordpress/date';
import { createInterpolateElement } from '@wordpress/element';
import { __, _x, _n, sprintf } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import clsx from 'clsx';
import PropTypes from 'prop-types';
import { Component } from 'react';
@@ -110,25 +110,23 @@ class DashStatsBottom extends Component {
}
{ this.props.isLinked &&
! this.props.isOdysseyStatsEnabled && // Only show if Odyssey Stats is disabled
- createInterpolateElement(
- __( 'View on WordPress.com ', 'jetpack' ),
- {
- ExternalLink: (
-
- ),
- }
- ) }
+ createInterpolateElement( __( ' View on WordPress.com', 'jetpack' ), {
+ Link: (
+
+ ),
+ } ) }
diff --git a/projects/plugins/jetpack/_inc/client/at-a-glance/stats/index.jsx b/projects/plugins/jetpack/_inc/client/at-a-glance/stats/index.jsx
index 600a0ef0d0f5..0bbf27ef052d 100644
--- a/projects/plugins/jetpack/_inc/client/at-a-glance/stats/index.jsx
+++ b/projects/plugins/jetpack/_inc/client/at-a-glance/stats/index.jsx
@@ -1,9 +1,10 @@
import { getRedirectUrl, JetpackLogo } from '@automattic/jetpack-components';
import { formatNumber } from '@automattic/number-formatters';
-import { ExternalLink, Spinner } from '@wordpress/components';
+import { Spinner } from '@wordpress/components';
import { gmdateI18n } from '@wordpress/date';
import { createInterpolateElement } from '@wordpress/element';
import { __, sprintf } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import { isEmpty } from 'lodash';
import PropTypes from 'prop-types';
import { Component } from 'react';
@@ -258,7 +259,8 @@ export class DashStats extends Component {
),
{
a1: (
- ,
+ a: ,
}
)
: createInterpolateElement(
@@ -36,7 +36,7 @@ export default function BlockThemeNotice( { isModuleActive, redirectSlug } ) {
'jetpack'
),
{
- a: ,
+ a: ,
}
);
diff --git a/projects/plugins/jetpack/_inc/client/components/connect-button/index.jsx b/projects/plugins/jetpack/_inc/client/components/connect-button/index.jsx
index 878378613b19..769f790faaf0 100644
--- a/projects/plugins/jetpack/_inc/client/components/connect-button/index.jsx
+++ b/projects/plugins/jetpack/_inc/client/components/connect-button/index.jsx
@@ -1,9 +1,9 @@
import { getRedirectUrl } from '@automattic/jetpack-components';
import { DisconnectDialog } from '@automattic/jetpack-connection';
import { isWoASite } from '@automattic/jetpack-script-data';
-import { ExternalLink } from '@wordpress/components';
import { createInterpolateElement } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import { getFragment } from '@wordpress/url';
import PropTypes from 'prop-types';
import { Component } from 'react';
@@ -264,9 +264,10 @@ export class ConnectButton extends Component {
'jetpack'
),
{
- tosLink: ,
+ tosLink: ,
shareDetailsLink: (
-
),
diff --git a/projects/plugins/jetpack/_inc/client/components/jetpack-benefits/index.jsx b/projects/plugins/jetpack/_inc/client/components/jetpack-benefits/index.jsx
index ce74ae8810f5..763f54aeff6e 100644
--- a/projects/plugins/jetpack/_inc/client/components/jetpack-benefits/index.jsx
+++ b/projects/plugins/jetpack/_inc/client/components/jetpack-benefits/index.jsx
@@ -1,8 +1,8 @@
import { getRedirectUrl } from '@automattic/jetpack-components';
import { DisconnectCard } from '@automattic/jetpack-connection';
-import { ExternalLink } from '@wordpress/components';
import { createInterpolateElement } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import PropTypes from 'prop-types';
import { Fragment } from 'react';
import './style.scss';
@@ -60,16 +60,17 @@ const JetpackBenefits = props => {
{ createInterpolateElement(
__(
- 'Speed up your site and provide mobile-ready images with our CDN ',
+ 'Speed up your site and provide mobile-ready images with our CDN',
'jetpack'
),
{
- ExternalLink: (
-
+ >
),
}
) }
@@ -77,16 +78,17 @@ const JetpackBenefits = props => {
{ createInterpolateElement(
__(
- 'Block brute force attacks and get immediate notifications if your site is down',
+ 'Block brute force attacks and get immediate notifications if your site is down',
'jetpack'
),
{
- ExternalLink: (
-
+ >
),
}
) }
@@ -94,16 +96,17 @@ const JetpackBenefits = props => {
{ createInterpolateElement(
__(
- 'Grow your traffic with automated social publishing and sharing ',
+ 'Grow your traffic with automated social publishing and sharing',
'jetpack'
),
{
- ExternalLink: (
-
+ >
),
}
) }
diff --git a/projects/plugins/jetpack/_inc/client/components/jetpack-notices/deprecation-notice.jsx b/projects/plugins/jetpack/_inc/client/components/jetpack-notices/deprecation-notice.jsx
index c97dddeccb4a..76e31bac2de8 100644
--- a/projects/plugins/jetpack/_inc/client/components/jetpack-notices/deprecation-notice.jsx
+++ b/projects/plugins/jetpack/_inc/client/components/jetpack-notices/deprecation-notice.jsx
@@ -1,5 +1,5 @@
-import { ExternalLink } from '@wordpress/components';
import { __ } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import PropTypes from 'prop-types';
import SimpleNotice from 'components/notice';
@@ -12,7 +12,11 @@ const DeprecationNotice = ( { dismissNotice, message, link, linkText, title } )
>
{ title && { title }
}
{ message }
- { link && { linkText } }
+ { link && (
+
+ { linkText }
+
+ ) }
);
};
diff --git a/projects/plugins/jetpack/_inc/client/components/jetpack-notices/state-notices.jsx b/projects/plugins/jetpack/_inc/client/components/jetpack-notices/state-notices.jsx
index 7ac23aee78a5..dbca28387941 100644
--- a/projects/plugins/jetpack/_inc/client/components/jetpack-notices/state-notices.jsx
+++ b/projects/plugins/jetpack/_inc/client/components/jetpack-notices/state-notices.jsx
@@ -1,8 +1,8 @@
import { getRedirectUrl } from '@automattic/jetpack-components';
import { isJetpackSelfHostedSite } from '@automattic/jetpack-script-data';
-import { ExternalLink } from '@wordpress/components';
import { createInterpolateElement } from '@wordpress/element';
import { __, sprintf } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import { Component } from 'react';
import { connect } from 'react-redux';
import SimpleNotice from 'components/notice';
@@ -86,7 +86,7 @@ class JetpackStateNotices extends Component {
'jetpack'
),
{
- a: ,
+ a: ,
}
);
break;
diff --git a/projects/plugins/jetpack/_inc/client/components/jetpack-product-card/index.jsx b/projects/plugins/jetpack/_inc/client/components/jetpack-product-card/index.jsx
index 1da2452d90ed..7fae97b126bb 100644
--- a/projects/plugins/jetpack/_inc/client/components/jetpack-product-card/index.jsx
+++ b/projects/plugins/jetpack/_inc/client/components/jetpack-product-card/index.jsx
@@ -1,6 +1,6 @@
import { ProductPrice, TermsOfService } from '@automattic/jetpack-components';
-import { ExternalLink } from '@wordpress/components';
import { __, sprintf } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import clsx from 'clsx';
import PropTypes from 'prop-types';
import { useCallback, useEffect } from 'react';
@@ -68,7 +68,6 @@ const JetpackProductCard = props => {
{ callToAction }
) }
-
{ !! icon &&
{ icon }
}
@@ -105,18 +104,18 @@ const JetpackProductCard = props => {
{ disclaimer && (
{ `${ disclaimer.text } ` }
-
{ disclaimer.link_text }
-
+
) }
-
{ hasMedia && (
-
{ /* Footer content */ }
@@ -137,7 +137,8 @@ const OwnerDisconnectDialog = ( { isOpen, onClose, apiRoot, apiNonce, onDisconne
{
strong:
,
connectionInfoLink: (
-
),
supportLink: (
-
diff --git a/projects/plugins/jetpack/_inc/client/components/plugin-dash-item/README.md b/projects/plugins/jetpack/_inc/client/components/plugin-dash-item/README.md
index d23c3c2f3ca5..2f0a9a91c811 100644
--- a/projects/plugins/jetpack/_inc/client/components/plugin-dash-item/README.md
+++ b/projects/plugins/jetpack/_inc/client/components/plugin-dash-item/README.md
@@ -15,11 +15,11 @@ export default BoostDashItem = () =>
pluginLink={ this.props.siteAdminUrl + 'admin.php?page=jetpack-boost' }
installOrActivatePrompt={ createInterpolateElement(
__(
- 'Improve your site’s performance and SEO in a few clicks with the free Jetpack Boost plugin.
Learn more ',
+ 'Improve your site’s performance and SEO in a few clicks with the free Jetpack Boost plugin.
Learn more',
'jetpack'
),
{
- ExternalLink:
,
+ Link:
,
br:
,
}
) }
@@ -75,4 +75,4 @@ Icon alt to use with custom icon for plugin ( see `iconSrc` ).
- **Type:** `String`
- **Required:** `no`
-Custom icon for dash item. Is given to `src` of img.
\ No newline at end of file
+Custom icon for dash item. Is given to `src` of img.
diff --git a/projects/plugins/jetpack/_inc/client/components/product-expiration/index.jsx b/projects/plugins/jetpack/_inc/client/components/product-expiration/index.jsx
index 638ce0943be8..24895b757867 100644
--- a/projects/plugins/jetpack/_inc/client/components/product-expiration/index.jsx
+++ b/projects/plugins/jetpack/_inc/client/components/product-expiration/index.jsx
@@ -1,8 +1,8 @@
import { getRedirectUrl } from '@automattic/jetpack-components';
-import { ExternalLink } from '@wordpress/components';
import { dateI18n } from '@wordpress/date';
import { createInterpolateElement } from '@wordpress/element';
import { __, sprintf } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import PropTypes from 'prop-types';
import { PureComponent } from 'react';
@@ -77,12 +77,13 @@ class ProductExpiration extends PureComponent {
span:
,
renewLink: (
-
{ __( 'Renew subscription', 'jetpack' ) }
-
+
),
}
diff --git a/projects/plugins/jetpack/_inc/client/components/section-nav/item.jsx b/projects/plugins/jetpack/_inc/client/components/section-nav/item.jsx
index cd6a46e3dae7..2817c991eaac 100644
--- a/projects/plugins/jetpack/_inc/client/components/section-nav/item.jsx
+++ b/projects/plugins/jetpack/_inc/client/components/section-nav/item.jsx
@@ -1,6 +1,4 @@
-/** @ssr-ready **/
-
-import { ExternalLink } from '@wordpress/components';
+import { Link } from '@wordpress/ui';
import clsx from 'clsx';
import PropTypes from 'prop-types';
import { PureComponent } from 'react';
@@ -61,9 +59,9 @@ class NavItem extends PureComponent {
) }
-
{ this.props.isExternalLink && (
-
}
-
+
) }
);
diff --git a/projects/plugins/jetpack/_inc/client/components/support-info/index.jsx b/projects/plugins/jetpack/_inc/client/components/support-info/index.jsx
index cf58812655f5..3e660c83af27 100644
--- a/projects/plugins/jetpack/_inc/client/components/support-info/index.jsx
+++ b/projects/plugins/jetpack/_inc/client/components/support-info/index.jsx
@@ -1,5 +1,5 @@
-import { ExternalLink } from '@wordpress/components';
import { __ } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import PropTypes from 'prop-types';
import { Component } from 'react';
import InfoPopover from 'components/info-popover';
@@ -74,23 +74,25 @@ export default class SupportInfo extends Component {
{ text + ' ' }
{ link && (
-
{ __( 'Learn more', 'jetpack' ) }
-
+
) }
-
{ __( 'Privacy information', 'jetpack' ) }
-
+
diff --git a/projects/plugins/jetpack/_inc/client/earn/ads.jsx b/projects/plugins/jetpack/_inc/client/earn/ads.jsx
index 12ca4750ee3a..883deedfe861 100644
--- a/projects/plugins/jetpack/_inc/client/earn/ads.jsx
+++ b/projects/plugins/jetpack/_inc/client/earn/ads.jsx
@@ -1,8 +1,9 @@
import { getRedirectUrl } from '@automattic/jetpack-components';
import { isWoASite } from '@automattic/jetpack-script-data';
-import { ExternalLink, ToggleControl } from '@wordpress/components';
+import { ToggleControl } from '@wordpress/components';
import { createInterpolateElement } from '@wordpress/element';
import { __, _x } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import { Component } from 'react';
import Card from 'components/card';
import { FormFieldset, FormLegend } from 'components/forms';
@@ -181,7 +182,8 @@ export const Ads = withModuleSettingsFormHelpers(
),
{
link: (
-
{ title }
{ description }
-
{ __( 'View your backups', 'jetpack' ) }
-
+
@@ -147,13 +148,14 @@ class MyPlanBody extends Component {
compact
rna
>
-
{ __( 'View your security activity', 'jetpack' ) }
-
+
@@ -206,9 +208,9 @@ class MyPlanBody extends Component {
compact
rna
>
-
+
{ __( 'View your security dashboard', 'jetpack' ) }
-
+
) : (
-
{ __( 'View settings', 'jetpack' ) }
-
+
) }
@@ -377,14 +380,15 @@ class MyPlanBody extends Component {
compact
rna
>
-
{ __( 'View settings', 'jetpack' ) }
-
+
) }
@@ -462,13 +466,14 @@ class MyPlanBody extends Component {
compact
rna
>
-
{ __( 'View your site activity', 'jetpack' ) }
-
+
@@ -498,13 +503,14 @@ class MyPlanBody extends Component {
compact
rna
>
-
{ __( 'View your earnings', 'jetpack' ) }
-
+
) : (
-
{ __( 'Configure Google Analytics', 'jetpack' ) }
-
+
@@ -585,13 +592,14 @@ class MyPlanBody extends Component {
compact
rna
>
-
{ __( 'Schedule posts', 'jetpack' ) }
-
+
) : (
-
{ __( 'Set up your site security', 'jetpack' ) }
-
+
@@ -710,13 +719,14 @@ class MyPlanBody extends Component {
) }
-
{ __( 'Explore themes', 'jetpack' ) }
-
+
@@ -749,13 +759,14 @@ class MyPlanBody extends Component {
compact
rna
>
-
{ __( 'Start sharing', 'jetpack' ) }
-
+
) : (
-
{ __( 'View your site activity', 'jetpack' ) }
-
+
@@ -831,9 +843,9 @@ class MyPlanBody extends Component {
compact
rna
>
-
+
{ __( 'Search support docs', 'jetpack' ) }
-
+
diff --git a/projects/plugins/jetpack/_inc/client/my-plan/my-plan-header/index.js b/projects/plugins/jetpack/_inc/client/my-plan/my-plan-header/index.js
index a77f8312ae83..dc10c16af2a1 100644
--- a/projects/plugins/jetpack/_inc/client/my-plan/my-plan-header/index.js
+++ b/projects/plugins/jetpack/_inc/client/my-plan/my-plan-header/index.js
@@ -1,7 +1,7 @@
import { getRedirectUrl } from '@automattic/jetpack-components';
-import { ExternalLink } from '@wordpress/components';
import { createInterpolateElement } from '@wordpress/element';
import { __, _n, _x, sprintf } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import clsx from 'clsx';
import { isEmpty } from 'lodash';
import PropTypes from 'prop-types';
@@ -587,9 +587,9 @@ class MyPlanHeader extends Component {
>
{ showPurchasesLink && (
-
+
{ __( 'View all purchases', 'jetpack' ) }
-
+
) }
diff --git a/projects/plugins/jetpack/_inc/client/privacy/index.jsx b/projects/plugins/jetpack/_inc/client/privacy/index.jsx
index 0d358dec5b52..37fda7e8326c 100644
--- a/projects/plugins/jetpack/_inc/client/privacy/index.jsx
+++ b/projects/plugins/jetpack/_inc/client/privacy/index.jsx
@@ -1,7 +1,7 @@
import { getRedirectUrl } from '@automattic/jetpack-components';
-import { ExternalLink } from '@wordpress/components';
import { createInterpolateElement } from '@wordpress/element';
import { __, _x } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import PropTypes from 'prop-types';
import { Component } from 'react';
import { connect } from 'react-redux';
@@ -120,7 +120,8 @@ class Privacy extends Component {
),
{
cookiePolicyLink: (
- {
{ props.isFeatureActive ? (
<>
{ configLinkIsExternal ? (
-
{ configureButtonLabel }
-
+
) : (
{ configureButtonLabel }
diff --git a/projects/plugins/jetpack/_inc/client/recommendations/feature-summary/resource.jsx b/projects/plugins/jetpack/_inc/client/recommendations/feature-summary/resource.jsx
index a1a1300259f9..335b7db2535c 100644
--- a/projects/plugins/jetpack/_inc/client/recommendations/feature-summary/resource.jsx
+++ b/projects/plugins/jetpack/_inc/client/recommendations/feature-summary/resource.jsx
@@ -1,4 +1,4 @@
-import { ExternalLink } from '@wordpress/components';
+import { Link } from '@wordpress/ui';
import { useCallback } from 'react';
import { connect } from 'react-redux';
import Button from 'components/button';
@@ -35,14 +35,15 @@ const ResourceSummaryComponent = props => {
diff --git a/projects/plugins/jetpack/_inc/client/recommendations/feature-utils.js b/projects/plugins/jetpack/_inc/client/recommendations/feature-utils.js
index 1db7ab1a3fe8..22eb61dbc052 100644
--- a/projects/plugins/jetpack/_inc/client/recommendations/feature-utils.js
+++ b/projects/plugins/jetpack/_inc/client/recommendations/feature-utils.js
@@ -305,7 +305,7 @@ export const getStepContent = ( state, stepSlug ) => {
return {
question: __( 'Get more views for your new page.', 'jetpack' ),
description: __(
- 'Fast websites mean more page visits and conversions. Even a one-second delay in loading times can reduce conversion rates by 20%. Make your site blazing fast with Jetpack Boost’s simple dashboard and acceleration tool:',
+ 'Fast websites mean more page visits and conversions. Even a one-second delay in loading times can reduce conversion rates by 20%. Make your site blazing fast with Jetpack Boost’s simple dashboard and acceleration tool:',
'jetpack'
),
descriptionList: [
@@ -321,7 +321,7 @@ export const getStepContent = ( state, stepSlug ) => {
progressValue: '76',
question: __( 'Would you like to turn site visitors into subscribers?', 'jetpack' ),
description: __(
- 'The Jetpack Newsletter Form combined with Creative Mail by Constant Contact can help automatically gather subscribers and send them beautiful emails. Learn more ',
+ 'The Jetpack Newsletter Form combined with Creative Mail by Constant Contact can help automatically gather subscribers and send them beautiful emails. Learn more',
'jetpack'
),
descriptionLink: getRedirectUrl( 'jetpack-support-jetpack-blocks-newsletter-sign-up' ),
@@ -333,7 +333,7 @@ export const getStepContent = ( state, stepSlug ) => {
progressValue: '70',
question: __( 'Send subscribers your latest blog posts via email?', 'jetpack' ),
description: __(
- 'With Jetpack Newsletter you can keep your audience engaged by automatically sending your content via email. Learn more ',
+ 'With Jetpack Newsletter you can keep your audience engaged by automatically sending your content via email. Learn more',
'jetpack'
),
descriptionLink: getRedirectUrl( 'jetpack-newsletter-landing' ),
@@ -348,7 +348,7 @@ export const getStepContent = ( state, stepSlug ) => {
'jetpack'
),
description: __(
- 'If your site ever goes down, Downtime Monitoring will send you an email or push notitification to let you know. Learn more ',
+ 'If your site ever goes down, Downtime Monitoring will send you an email or push notitification to let you know. Learn more',
'jetpack'
),
descriptionLink: getRedirectUrl( 'jetpack-support-monitor' ),
@@ -363,7 +363,7 @@ export const getStepContent = ( state, stepSlug ) => {
'jetpack'
),
description: __(
- 'Displaying Related Posts at the end of your content keeps visitors engaged and on your site. Learn more ',
+ 'Displaying Related Posts at the end of your content keeps visitors engaged and on your site. Learn more',
'jetpack'
),
descriptionLink: getRedirectUrl( 'jetpack-support-related-posts' ),
@@ -375,7 +375,7 @@ export const getStepContent = ( state, stepSlug ) => {
progressValue: '88',
question: __( 'Would you like your site to load faster?', 'jetpack' ),
description: __(
- 'Faster sites get better ranking in search engines and help keep visitors on your site longer. Jetpack will automatically optimize and load your images and files from our global Content Delivery Network (CDN). Learn more ',
+ 'Faster sites get better ranking in search engines and help keep visitors on your site longer. Jetpack will automatically optimize and load your images and files from our global Content Delivery Network (CDN). Learn more',
'jetpack'
),
descriptionLink: getRedirectUrl( 'jetpack-support-site-accelerator' ),
@@ -389,7 +389,7 @@ export const getStepContent = ( state, stepSlug ) => {
'jetpack'
),
description: __(
- 'It’s easy to share your content to a wider audience by connecting your social media accounts to Jetpack. When you publish a post, it will automatically appear on all your favorite platforms. Best of all, it’s free. Learn more ',
+ 'It’s easy to share your content to a wider audience by connecting your social media accounts to Jetpack. When you publish a post, it will automatically appear on all your favorite platforms. Best of all, it’s free. Learn more',
'jetpack'
),
descriptionLink: getRedirectUrl( 'jetpack-blog-social-sharing' ),
@@ -399,7 +399,7 @@ export const getStepContent = ( state, stepSlug ) => {
return {
question: __( 'With more plugins comes more responsibility.', 'jetpack' ),
description: __(
- 'As you add plugins to your site, you have to start thinking about vulnerabilities.Jetpack Protect is a free security solution for WordPress that runs automated scans on your site and warns you about vulnerabilities. Focus on running your business while we protect your site with Jetpack Protect. Learn More .',
+ 'As you add plugins to your site, you have to start thinking about vulnerabilities.Jetpack Protect is a free security solution for WordPress that runs automated scans on your site and warns you about vulnerabilities. Focus on running your business while we protect your site with Jetpack Protect. Learn More.',
'jetpack'
),
descriptionLink: getRedirectUrl( 'jetpack-protect-assistant-recommendation' ),
@@ -423,7 +423,7 @@ export const getStepContent = ( state, stepSlug ) => {
'jetpack'
),
description: __(
- 'No matter your business, adding videos to your site is essential for success. Jetpack VideoPress offers HD, ad-free video hosting, so you can keep the focus on your content. Try it for free or upgrade for more space. Learn more ',
+ 'No matter your business, adding videos to your site is essential for success. Jetpack VideoPress offers HD, ad-free video hosting, so you can keep the focus on your content. Try it for free or upgrade for more space. Learn more',
'jetpack'
),
descriptionLink: getRedirectUrl( 'jetpack-videopress' ),
@@ -434,7 +434,7 @@ export const getStepContent = ( state, stepSlug ) => {
progressValue: '40',
question: __( 'Would you like WooCommerce to power your store?', 'jetpack' ),
description: __(
- 'We’re partnered with WooCommerce — a customizable, open-source eCommerce platform built for WordPress. It’s everything you need to start selling products today. Learn more ',
+ 'We’re partnered with WooCommerce — a customizable, open-source eCommerce platform built for WordPress. It’s everything you need to start selling products today. Learn more',
'jetpack'
),
descriptionLink: getRedirectUrl( 'woocommerce-features-landing' ),
diff --git a/projects/plugins/jetpack/_inc/client/recommendations/prompts/feature-prompt/index.jsx b/projects/plugins/jetpack/_inc/client/recommendations/prompts/feature-prompt/index.jsx
index 18350bc163db..29ccf996865e 100644
--- a/projects/plugins/jetpack/_inc/client/recommendations/prompts/feature-prompt/index.jsx
+++ b/projects/plugins/jetpack/_inc/client/recommendations/prompts/feature-prompt/index.jsx
@@ -1,7 +1,7 @@
import { ProgressBar } from '@automattic/jetpack-components';
-import { ExternalLink } from '@wordpress/components';
import { createInterpolateElement } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import { Fragment, useCallback, useEffect, useMemo } from 'react';
import { connect } from 'react-redux';
import Button from 'components/button';
@@ -170,7 +170,7 @@ const FeaturePromptComponent = props => {
description={ createInterpolateElement( description, {
br: ,
strong: ,
- ExternalLink: ,
+ Link: ,
} ) }
content={
descriptionList || descriptionSecondary ? (
@@ -200,14 +200,15 @@ const FeaturePromptComponent = props => {
{ configLinkIsExternal ? (
-
{ configureButtonLabel }
-
+
) : (
{ configureButtonLabel }
diff --git a/projects/plugins/jetpack/_inc/client/recommendations/prompts/resource-prompt/index.jsx b/projects/plugins/jetpack/_inc/client/recommendations/prompts/resource-prompt/index.jsx
index f6bb9f568360..7c5ca567dd98 100644
--- a/projects/plugins/jetpack/_inc/client/recommendations/prompts/resource-prompt/index.jsx
+++ b/projects/plugins/jetpack/_inc/client/recommendations/prompts/resource-prompt/index.jsx
@@ -1,7 +1,7 @@
import { ProgressBar } from '@automattic/jetpack-components';
-import { ExternalLink } from '@wordpress/components';
import { createInterpolateElement } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import { Fragment, useEffect, useCallback, useMemo } from 'react';
import { connect } from 'react-redux';
import Button from 'components/button';
@@ -132,9 +132,7 @@ const ResourcePromptComponent = props => {
? createInterpolateElement( description, {
br: ,
strong: ,
- ExternalLink: (
-
- ),
+ Link: ,
} )
: null
}
@@ -159,14 +157,15 @@ const ResourcePromptComponent = props => {
{ ! hasNoAction ? (
<>
{ ctaLinkIsExternal ? (
-
{ ctaText }
-
+
) : (
{ ctaText }
diff --git a/projects/plugins/jetpack/_inc/client/recommendations/sidebar/mobile-app/index.tsx b/projects/plugins/jetpack/_inc/client/recommendations/sidebar/mobile-app/index.tsx
index 03d6f7077a32..ed5e06597ed5 100644
--- a/projects/plugins/jetpack/_inc/client/recommendations/sidebar/mobile-app/index.tsx
+++ b/projects/plugins/jetpack/_inc/client/recommendations/sidebar/mobile-app/index.tsx
@@ -1,7 +1,7 @@
import { getRedirectUrl } from '@automattic/jetpack-components';
-import { ExternalLink } from '@wordpress/components';
import { createInterpolateElement } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import clsx from 'clsx';
import { useCallback, useEffect } from 'react';
import AppsBadge from 'components/apps-badge';
@@ -10,7 +10,6 @@ import analytics from 'lib/analytics';
import detectMobileDevice from 'lib/device-detector';
import { SidebarCard } from '../sidebar-card';
import type { FC } from 'react';
-
import './style.scss';
type Props = {
@@ -77,12 +76,13 @@ const MobileApp: FC< Props > = ( { slug, underside = false } ) => {
{ createInterpolateElement(
__(
- 'Visit jetpack.com/app or scan this code to download the Jetpack mobile app.',
+ 'Visit jetpack.com/app or scan this code to download the Jetpack mobile app.',
'jetpack'
),
{
- ExternalLink: (
- {
{ productCardDisclaimer && (
{ productCardDisclaimer.text }{ ' ' }
-
+
{ productCardDisclaimer.link_text }
-
+
) }
-
{ productCardCtaText }
-
+
diff --git a/projects/plugins/jetpack/_inc/client/security/monitor.jsx b/projects/plugins/jetpack/_inc/client/security/monitor.jsx
index ed946443289f..3ddc502566f5 100644
--- a/projects/plugins/jetpack/_inc/client/security/monitor.jsx
+++ b/projects/plugins/jetpack/_inc/client/security/monitor.jsx
@@ -1,7 +1,7 @@
import { getRedirectUrl } from '@automattic/jetpack-components';
-import { ExternalLink } from '@wordpress/components';
import { createInterpolateElement } from '@wordpress/element';
import { __, _x } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import { Component } from 'react';
import { withModuleSettingsFormHelpers } from 'components/module-settings/with-module-settings-form-helpers';
import { ModuleToggle } from 'components/module-toggle';
@@ -59,7 +59,8 @@ export const Monitor = withModuleSettingsFormHelpers(
),
{
a: (
-
diff --git a/projects/plugins/jetpack/_inc/client/security/sso.jsx b/projects/plugins/jetpack/_inc/client/security/sso.jsx
index 5194d01d1165..ef9b7a68a9d0 100644
--- a/projects/plugins/jetpack/_inc/client/security/sso.jsx
+++ b/projects/plugins/jetpack/_inc/client/security/sso.jsx
@@ -1,8 +1,9 @@
import { getRedirectUrl, Gridicon } from '@automattic/jetpack-components';
import { useConnection } from '@automattic/jetpack-connection';
-import { Button, ExternalLink, ToggleControl } from '@wordpress/components';
+import { Button, ToggleControl } from '@wordpress/components';
import { createInterpolateElement } from '@wordpress/element';
import { __, _x } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import * as cookie from 'cookie';
import { useState, Component } from 'react';
import ReactDOM from 'react-dom';
@@ -231,7 +232,8 @@ export const SSO = withModuleSettingsFormHelpers(
),
{
link: (
-
),
diff --git a/projects/plugins/jetpack/_inc/client/security/waf.jsx b/projects/plugins/jetpack/_inc/client/security/waf.jsx
index 5127e6825fbc..3315ec00148a 100644
--- a/projects/plugins/jetpack/_inc/client/security/waf.jsx
+++ b/projects/plugins/jetpack/_inc/client/security/waf.jsx
@@ -1,7 +1,8 @@
import { getRedirectUrl, Status } from '@automattic/jetpack-components';
-import { ExternalLink, ToggleControl } from '@wordpress/components';
+import { ToggleControl } from '@wordpress/components';
import { createInterpolateElement } from '@wordpress/element';
import { __, _x, sprintf } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import { Component } from 'react';
import { connect } from 'react-redux';
import Button from 'components/button';
@@ -259,12 +260,13 @@ export const Waf = class extends Component {
>
{ createInterpolateElement(
__(
- 'Allow Jetpack to collect basic data from blocked requests to improve firewall protection and accuracy. Learn more Privacy Information ',
+ 'Allow Jetpack to collect basic data from blocked requests to improve firewall protection and accuracy. Learn more Privacy Information',
'jetpack'
),
{
- ExternalLink: (
-
),
@@ -297,12 +299,13 @@ export const Waf = class extends Component {
>
{ createInterpolateElement(
__(
- 'Allow Jetpack to collect detailed data from blocked requests to enhance firewall protection and accuracy. Learn more Privacy Information ',
+ 'Allow Jetpack to collect detailed data from blocked requests to enhance firewall protection and accuracy. Learn more Privacy Information',
'jetpack'
),
{
- ExternalLink: (
-
),
diff --git a/projects/plugins/jetpack/_inc/client/traffic/google-analytics.jsx b/projects/plugins/jetpack/_inc/client/traffic/google-analytics.jsx
index 491daff79a34..0fe38a725588 100644
--- a/projects/plugins/jetpack/_inc/client/traffic/google-analytics.jsx
+++ b/projects/plugins/jetpack/_inc/client/traffic/google-analytics.jsx
@@ -1,7 +1,8 @@
import { getRedirectUrl } from '@automattic/jetpack-components';
-import { ExternalLink, ToggleControl } from '@wordpress/components';
+import { ToggleControl } from '@wordpress/components';
import { createInterpolateElement } from '@wordpress/element';
import { __, _x } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import { Component } from 'react';
import { FormFieldset, FormLabel } from 'components/forms';
import { withModuleSettingsFormHelpers } from 'components/module-settings/with-module-settings-form-helpers';
@@ -137,7 +138,8 @@ export const GoogleAnalytics = withModuleSettingsFormHelpers(
__( ' Learn more to find your Measurement ID.', 'jetpack' ),
{
link: (
-
- ,
support: ,
google: (
-
),
bing: (
-
+
),
pinterest: (
-
),
yandex: (
-
),
facebook: (
-
diff --git a/projects/plugins/jetpack/_inc/client/traffic/verification-services/google.jsx b/projects/plugins/jetpack/_inc/client/traffic/verification-services/google.jsx
index 8fff9fdbbed3..7824165696ae 100644
--- a/projects/plugins/jetpack/_inc/client/traffic/verification-services/google.jsx
+++ b/projects/plugins/jetpack/_inc/client/traffic/verification-services/google.jsx
@@ -1,6 +1,6 @@
-import { ExternalLink } from '@wordpress/components';
import { createInterpolateElement } from '@wordpress/element';
import { __, sprintf } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import PropTypes from 'prop-types';
import { Component } from 'react';
import { connect } from 'react-redux';
@@ -236,7 +236,6 @@ class GoogleVerificationServiceComponent extends Component {
{ __( 'Edit', 'jetpack' ) }
-
{ this.props.isOwner && (
@@ -248,7 +247,8 @@ class GoogleVerificationServiceComponent extends Component {
),
{
a: (
-
@@ -263,13 +263,15 @@ class GoogleVerificationServiceComponent extends Component {
),
{
a1: (
-
),
a2: (
-
- { __( 'Share your feedback', 'jetpack' ) }
+
+ { __( 'Share your feedback', 'jetpack' ) }
+
);
diff --git a/projects/plugins/jetpack/extensions/blocks/ai-assistant/components/message/block-message.tsx b/projects/plugins/jetpack/extensions/blocks/ai-assistant/components/message/block-message.tsx
index 7f30e96783f6..91f314344fcc 100644
--- a/projects/plugins/jetpack/extensions/blocks/ai-assistant/components/message/block-message.tsx
+++ b/projects/plugins/jetpack/extensions/blocks/ai-assistant/components/message/block-message.tsx
@@ -1,9 +1,6 @@
-/**
- * External dependencies
- */
-import { ExternalLink } from '@wordpress/components';
import { createInterpolateElement } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
/**
* Internal dependencies
*/
@@ -74,7 +71,8 @@ export default function BlockMessage( props: BlockMessageProps ): ReactElement {
),
{
link: (
-
diff --git a/projects/plugins/jetpack/extensions/blocks/ai-assistant/edit.js b/projects/plugins/jetpack/extensions/blocks/ai-assistant/edit.js
index 04f7cf193934..aac82211edb6 100644
--- a/projects/plugins/jetpack/extensions/blocks/ai-assistant/edit.js
+++ b/projects/plugins/jetpack/extensions/blocks/ai-assistant/edit.js
@@ -21,17 +21,12 @@ import {
} from '@automattic/jetpack-shared-extension-utils';
import { useBlockProps, InspectorControls } from '@wordpress/block-editor';
import { rawHandler } from '@wordpress/blocks';
-import {
- Notice,
- PanelBody,
- PanelRow,
- KeyboardShortcuts,
- ExternalLink,
-} from '@wordpress/components';
+import { Notice, PanelBody, PanelRow, KeyboardShortcuts } from '@wordpress/components';
import { useViewportMatch } from '@wordpress/compose';
import { useSelect, useDispatch } from '@wordpress/data';
import { RawHTML, useState, useCallback, useEffect, useRef } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import clsx from 'clsx';
/**
* Internal dependencies
@@ -384,9 +379,9 @@ export default function AIAssistantEdit( { attributes, setAttributes, clientId,
{ /* Mock BlockCard component styles to keep alignment */ }
-
+
{ __( 'Discover all features', 'jetpack' ) }
-
+
{ ( planType === PLAN_TYPE_FREE ||
( tierPlansEnabled && planType !== PLAN_TYPE_UNLIMITED ) ) && (
diff --git a/projects/plugins/jetpack/extensions/blocks/ai-chat/question-answer.js b/projects/plugins/jetpack/extensions/blocks/ai-chat/question-answer.js
index cf0ca5374fa2..3b77c28ae1d5 100644
--- a/projects/plugins/jetpack/extensions/blocks/ai-chat/question-answer.js
+++ b/projects/plugins/jetpack/extensions/blocks/ai-chat/question-answer.js
@@ -1,18 +1,9 @@
/**
* WordPress dependencies
*/
-import {
- Button,
- TextControl,
- Spinner,
- KeyboardShortcuts,
- ExternalLink,
-} from '@wordpress/components';
+import { Button, TextControl, Spinner, KeyboardShortcuts } from '@wordpress/components';
import { RawHTML, useEffect, useState } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
-/**
- * Internal dependencies
- */
import CopyButton from './components/copy-button';
import DisplayError from './components/display-error';
import Feedback from './components/feedback';
@@ -171,7 +162,9 @@ export default function QuestionAnswer( {
diff --git a/projects/plugins/jetpack/extensions/blocks/blog-stats/inactive-placeholder.js b/projects/plugins/jetpack/extensions/blocks/blog-stats/inactive-placeholder.js
index 05b5ade52063..9e5cb90a0d6f 100644
--- a/projects/plugins/jetpack/extensions/blocks/blog-stats/inactive-placeholder.js
+++ b/projects/plugins/jetpack/extensions/blocks/blog-stats/inactive-placeholder.js
@@ -1,7 +1,8 @@
import { isWoASite } from '@automattic/jetpack-script-data';
import { getBlockIconComponent } from '@automattic/jetpack-shared-extension-utils';
-import { Button, ExternalLink, Placeholder } from '@wordpress/components';
+import { Button, Placeholder } from '@wordpress/components';
import { __ } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import metadata from './block.json';
export const InactiveStatsPlaceholder = ( { className, isLoading, changeStatus } ) => {
@@ -33,9 +34,9 @@ export const InactiveStatsPlaceholder = ( { className, isLoading, changeStatus }
{ isLoading ? __( 'Activating Stats', 'jetpack' ) : __( 'Activate Stats', 'jetpack', 0 ) }
-
+
{ __( 'Learn more about the Stats module.', 'jetpack' ) }
-
+
diff --git a/projects/plugins/jetpack/extensions/blocks/calendly/controls.js b/projects/plugins/jetpack/extensions/blocks/calendly/controls.js
index ccf23a28724f..c13acd0a32b1 100644
--- a/projects/plugins/jetpack/extensions/blocks/calendly/controls.js
+++ b/projects/plugins/jetpack/extensions/blocks/calendly/controls.js
@@ -2,7 +2,6 @@ import { isWpcomPlatformSite } from '@automattic/jetpack-script-data';
import { BlockControls, InspectorControls } from '@wordpress/block-editor';
import {
Button,
- ExternalLink,
Notice,
PanelBody,
ToggleControl,
@@ -10,6 +9,7 @@ import {
ToolbarGroup,
} from '@wordpress/components';
import { __, _x } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import BlockStylesSelector from '../../shared/components/block-styles-selector';
export const CalendlyBlockControls = ( { onEditClick } ) => {
@@ -68,9 +68,9 @@ export const CalendlyInspectorControls = props => {
{ externalDocLink && (
-
+
{ __( 'Explore more customization options.', 'jetpack' ) }
-
+
) }
>
diff --git a/projects/plugins/jetpack/extensions/blocks/calendly/edit.js b/projects/plugins/jetpack/extensions/blocks/calendly/edit.js
index a3bdd861fbee..dc755d9d7133 100644
--- a/projects/plugins/jetpack/extensions/blocks/calendly/edit.js
+++ b/projects/plugins/jetpack/extensions/blocks/calendly/edit.js
@@ -1,10 +1,11 @@
import { getBlockIconComponent } from '@automattic/jetpack-shared-extension-utils';
import { InnerBlocks, useBlockProps } from '@wordpress/block-editor';
import { getBlockDefaultClassName } from '@wordpress/blocks';
-import { Button, ExternalLink, Placeholder, Spinner, withNotices } from '@wordpress/components';
+import { Button, Placeholder, Spinner, withNotices } from '@wordpress/components';
import { select, dispatch } from '@wordpress/data';
import { useEffect, useState } from '@wordpress/element';
import { __, _x } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import clsx from 'clsx';
import { isEqual } from 'lodash';
import { getValidatedAttributes } from '../../shared/get-validated-attributes';
@@ -134,9 +135,12 @@ export function CalendlyEdit( props ) {
-
+
{ __( 'Need help finding your embed code?', 'jetpack' ) }
-
+
);
diff --git a/projects/plugins/jetpack/extensions/blocks/donations/controls.js b/projects/plugins/jetpack/extensions/blocks/donations/controls.js
index 6a223167a92d..05436cfcf1d5 100644
--- a/projects/plugins/jetpack/extensions/blocks/donations/controls.js
+++ b/projects/plugins/jetpack/extensions/blocks/donations/controls.js
@@ -4,7 +4,6 @@ import { BlockControls, InspectorControls } from '@wordpress/block-editor';
import {
Dashicon,
Dropdown,
- ExternalLink,
MenuGroup,
MenuItem,
PanelBody,
@@ -15,6 +14,7 @@ import {
} from '@wordpress/components';
import { __ } from '@wordpress/i18n';
import { DOWN } from '@wordpress/keycodes';
+import { Link } from '@wordpress/ui';
import {
getDefaultDonationAmountsForCurrency,
SUPPORTED_CURRENCIES,
@@ -126,9 +126,9 @@ const Controls = props => {
label={ __( 'Show custom amount option', 'jetpack' ) }
__nextHasNoMarginBottom={ true }
/>
-
+
{ __( 'View donation earnings', 'jetpack' ) }
-
+
>
diff --git a/projects/plugins/jetpack/extensions/blocks/donations/first-time-modal.js b/projects/plugins/jetpack/extensions/blocks/donations/first-time-modal.js
index 7b15ac8a9027..e76b3b914224 100644
--- a/projects/plugins/jetpack/extensions/blocks/donations/first-time-modal.js
+++ b/projects/plugins/jetpack/extensions/blocks/donations/first-time-modal.js
@@ -1,8 +1,9 @@
import { getRedirectUrl } from '@automattic/jetpack-components';
import { isWpcomPlatformSite } from '@automattic/jetpack-script-data';
-import { Modal, Button, ExternalLink } from '@wordpress/components';
+import { Modal, Button } from '@wordpress/components';
import { createInterpolateElement } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
const FirstTimeModal = ( { onClose } ) => {
// Configure the redirect URLs in the Jetpack Redirects service (see the README in jetpack-redirects).
@@ -23,7 +24,7 @@ const FirstTimeModal = ( { onClose } ) => {
'jetpack'
),
{
- docLink: ,
+ docLink: ,
}
) }
@@ -46,7 +47,8 @@ const FirstTimeModal = ( { onClose } ) => {
),
{
requirementsLink: (
-
),
diff --git a/projects/plugins/jetpack/extensions/blocks/eventbrite/form.js b/projects/plugins/jetpack/extensions/blocks/eventbrite/form.js
index 4ae2c56bcc0f..edb65ff459c4 100644
--- a/projects/plugins/jetpack/extensions/blocks/eventbrite/form.js
+++ b/projects/plugins/jetpack/extensions/blocks/eventbrite/form.js
@@ -1,8 +1,10 @@
import { isWpcomPlatformSite } from '@automattic/jetpack-script-data';
import { getBlockIconComponent } from '@automattic/jetpack-shared-extension-utils';
-import { Placeholder, Button, ExternalLink } from '@wordpress/components';
+import { Placeholder, Button } from '@wordpress/components';
import { __, _x } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import metadata from './block.json';
+
import {} from './utils';
const icon = getBlockIconComponent( metadata );
@@ -38,9 +40,9 @@ const EmbedForm = ( { className, noticeUI, editedUrl, onChange, onSubmit } ) =>
-
+
{ __( 'Learn more about Eventbrite embeds', 'jetpack' ) }
-
+
diff --git a/projects/plugins/jetpack/extensions/blocks/google-calendar/edit.js b/projects/plugins/jetpack/extensions/blocks/google-calendar/edit.js
index a834293af707..efbe2d91862d 100644
--- a/projects/plugins/jetpack/extensions/blocks/google-calendar/edit.js
+++ b/projects/plugins/jetpack/extensions/blocks/google-calendar/edit.js
@@ -2,10 +2,11 @@ import { isWpcomPlatformSite } from '@automattic/jetpack-script-data';
import { getBlockIconComponent } from '@automattic/jetpack-shared-extension-utils';
import { InspectorControls, useBlockProps } from '@wordpress/block-editor';
import { getBlockDefaultClassName } from '@wordpress/blocks';
-import { Placeholder, SandBox, Button, ExternalLink, withNotices } from '@wordpress/components';
+import { Placeholder, SandBox, Button, withNotices } from '@wordpress/components';
import { compose } from '@wordpress/compose';
import { useEffect, useState } from '@wordpress/element';
import { __, _x } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import { withViewportMatch } from '@wordpress/viewport';
import metadata from './block.json';
import GoogleCalendarInspectorControls from './controls';
@@ -97,9 +98,9 @@ export function GoogleCalendarEdit( props ) {
const html = ``;
const permissionsLink = (
-
+
{ __( 'Enable Permissions for the calendar you want to share', 'jetpack' ) }
-
+
);
const controls = (
@@ -136,7 +137,9 @@ export function GoogleCalendarEdit( props ) {
{ getEditForm( `${ defaultClassName }-embed-form-editor` ) }
- { __( 'Learn more', 'jetpack' ) }
+
+ { __( 'Learn more', 'jetpack' ) }
+
>
diff --git a/projects/plugins/jetpack/extensions/blocks/google-docs-embed/preview.js b/projects/plugins/jetpack/extensions/blocks/google-docs-embed/preview.js
index 72eebf309d82..1dad7d07da19 100644
--- a/projects/plugins/jetpack/extensions/blocks/google-docs-embed/preview.js
+++ b/projects/plugins/jetpack/extensions/blocks/google-docs-embed/preview.js
@@ -1,5 +1,5 @@
-import { ExternalLink } from '@wordpress/components';
import { __ } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
const Preview = props => {
const {
@@ -20,9 +20,9 @@ const Preview = props => {
{ __( 'This Google Document is private.', 'jetpack' ) }
-
+
{ __( 'Click here to open this document.', 'jetpack' ) }
-
+
) : (
diff --git a/projects/plugins/jetpack/extensions/blocks/instagram-gallery/controls.js b/projects/plugins/jetpack/extensions/blocks/instagram-gallery/controls.js
index 939d8e297ab2..3f797dce5331 100644
--- a/projects/plugins/jetpack/extensions/blocks/instagram-gallery/controls.js
+++ b/projects/plugins/jetpack/extensions/blocks/instagram-gallery/controls.js
@@ -1,6 +1,5 @@
import {
Button,
- ExternalLink,
Notice,
PanelBody,
PanelRow,
@@ -8,6 +7,7 @@ import {
ToggleControl,
} from '@wordpress/components';
import { __, sprintf, _n } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import { MAX_IMAGE_COUNT } from './constants';
export default function InstagramGalleryInspectorControls( {
@@ -47,9 +47,9 @@ export default function InstagramGalleryInspectorControls( {
{ __( 'Account', 'jetpack' ) }
-
+
@{ instagramUser }
-
+
{ currentUserConnected && (
diff --git a/projects/plugins/jetpack/extensions/blocks/like/edit.js b/projects/plugins/jetpack/extensions/blocks/like/edit.js
index dba6e2b21a7e..961df675eb2b 100644
--- a/projects/plugins/jetpack/extensions/blocks/like/edit.js
+++ b/projects/plugins/jetpack/extensions/blocks/like/edit.js
@@ -1,8 +1,9 @@
import { isWpcomPlatformSite, isSimpleSite } from '@automattic/jetpack-script-data';
import { useBlockProps, InspectorControls } from '@wordpress/block-editor';
-import { ExternalLink, ToggleControl, PanelBody } from '@wordpress/components';
+import { ToggleControl, PanelBody } from '@wordpress/components';
import { createInterpolateElement } from '@wordpress/element';
import { __, sprintf } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import { getValidatedAttributes } from '../../shared/get-validated-attributes';
import avatar1 from '../blogging-prompt/example-avatars/avatar1.jpg';
import avatar2 from '../blogging-prompt/example-avatars/avatar2.jpg';
@@ -23,9 +24,9 @@ function LikeEdit( { attributes, setAttributes } ) {
{ isJetpackSite && (
-
+
{ __( 'Learn more', 'jetpack' ) }
-
+
) }
diff --git a/projects/plugins/jetpack/extensions/blocks/mailchimp/controls.js b/projects/plugins/jetpack/extensions/blocks/mailchimp/controls.js
index aaa0b3019111..ba754530ef53 100644
--- a/projects/plugins/jetpack/extensions/blocks/mailchimp/controls.js
+++ b/projects/plugins/jetpack/extensions/blocks/mailchimp/controls.js
@@ -1,7 +1,8 @@
import { InspectorControls } from '@wordpress/block-editor';
-import { ExternalLink, PanelBody, TextControl } from '@wordpress/components';
+import { PanelBody, TextControl } from '@wordpress/components';
import { useRef } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import {
NOTIFICATION_PROCESSING,
NOTIFICATION_SUCCESS,
@@ -95,9 +96,9 @@ export const MailChimpBlockControls = ( {
} );
} }
/>
-
+
{ __( 'Learn about groups', 'jetpack' ) }
-
+
setAttributes( { signupFieldValue: value } ) }
/>
-
+
{ __( 'Learn about signup location tracking', 'jetpack' ) }
-
+
- { __( 'Manage Connection', 'jetpack' ) }
+
+ { __( 'Manage Connection', 'jetpack' ) }
+
>
);
diff --git a/projects/plugins/jetpack/extensions/blocks/map/controls.js b/projects/plugins/jetpack/extensions/blocks/map/controls.js
index 75be94413065..bdf5d74ae5f9 100644
--- a/projects/plugins/jetpack/extensions/blocks/map/controls.js
+++ b/projects/plugins/jetpack/extensions/blocks/map/controls.js
@@ -1,6 +1,5 @@
import { BlockAlignmentToolbar, PanelColorSettings } from '@wordpress/block-editor';
import {
- ExternalLink,
PanelBody,
TextControl,
ToggleControl,
@@ -19,6 +18,7 @@ import {
__experimentalToggleGroupControlOption as ToggleGroupControlOption,
} from '@wordpress/components';
import { __ } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import Locations from './locations';
const markerIcon = (
@@ -173,9 +173,9 @@ export default ( {
'wpcom' === apiKeySource && (
<>
{ __( 'You can optionally enter your own access token.', 'jetpack' ) }{ ' ' }
-
+
{ __( 'Find it on Mapbox', 'jetpack' ) }
-
+
>
)
}
diff --git a/projects/plugins/jetpack/extensions/blocks/map/edit.js b/projects/plugins/jetpack/extensions/blocks/map/edit.js
index bcc8279239ac..18fe1c1f58e2 100644
--- a/projects/plugins/jetpack/extensions/blocks/map/edit.js
+++ b/projects/plugins/jetpack/extensions/blocks/map/edit.js
@@ -6,18 +6,12 @@ import {
useBlockProps,
store as blockEditorStore,
} from '@wordpress/block-editor';
-import {
- Button,
- ExternalLink,
- Placeholder,
- Spinner,
- withNotices,
- ResizableBox,
-} from '@wordpress/components';
+import { Button, Placeholder, Spinner, withNotices, ResizableBox } from '@wordpress/components';
import { compose } from '@wordpress/compose';
import { useDispatch, useSelect } from '@wordpress/data';
import { useEffect, useRef, useState } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import { getActiveStyleName } from '../../shared/block-styles';
import AddPoint from './add-point';
import metadata from './block.json';
@@ -258,9 +252,9 @@ const MapEdit = ( {
{ __( 'To use the map block, you need an Access Token.', 'jetpack' ) }
-
+
{ __( 'Create an account or log in to Mapbox.', 'jetpack' ) }
-
+
{ __(
'Locate and copy the default access token. Then, paste it into the field below.',
diff --git a/projects/plugins/jetpack/extensions/blocks/opentable/edit.js b/projects/plugins/jetpack/extensions/blocks/opentable/edit.js
index 501a9bf7168a..3142e89a5ecf 100644
--- a/projects/plugins/jetpack/extensions/blocks/opentable/edit.js
+++ b/projects/plugins/jetpack/extensions/blocks/opentable/edit.js
@@ -11,7 +11,6 @@ import {
unregisterBlockStyle,
} from '@wordpress/blocks';
import {
- ExternalLink,
PanelBody,
Placeholder,
SelectControl,
@@ -20,6 +19,7 @@ import {
} from '@wordpress/components';
import { useEffect } from '@wordpress/element';
import { __, sprintf } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import clsx from 'clsx';
import { isEmpty, isEqual } from 'lodash';
import { getActiveStyleName } from '../../shared/block-styles';
@@ -238,10 +238,12 @@ function OpenTableEdit( {
>
-
+
{ __( 'Sign up for OpenTable', 'jetpack' ) }
-
- { __( 'Learn more', 'jetpack' ) }
+
+
+ { __( 'Learn more', 'jetpack' ) }
+
);
diff --git a/projects/plugins/jetpack/extensions/blocks/podcast-player/edit.js b/projects/plugins/jetpack/extensions/blocks/podcast-player/edit.js
index 6e9966b940de..507dbf264776 100644
--- a/projects/plugins/jetpack/extensions/blocks/podcast-player/edit.js
+++ b/projects/plugins/jetpack/extensions/blocks/podcast-player/edit.js
@@ -10,7 +10,6 @@ import {
import { createBlock } from '@wordpress/blocks';
import {
Button,
- ExternalLink,
PanelBody,
Placeholder,
RangeControl,
@@ -26,6 +25,7 @@ import { compose, withInstanceId } from '@wordpress/compose';
import { withDispatch } from '@wordpress/data';
import { useCallback, useEffect, useState, useRef, useReducer, useMemo } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import { isURL, prependHTTP } from '@wordpress/url';
import debugFactory from 'debug';
import { debounce } from 'lodash';
@@ -284,9 +284,9 @@ const PodcastPlayerEdit = ( {
-
+
{ __( 'Learn more about embeds', 'jetpack' ) }
-
+
);
diff --git a/projects/plugins/jetpack/extensions/blocks/related-posts/inactive-placeholder.js b/projects/plugins/jetpack/extensions/blocks/related-posts/inactive-placeholder.js
index 57110b489870..ddb65abbc833 100644
--- a/projects/plugins/jetpack/extensions/blocks/related-posts/inactive-placeholder.js
+++ b/projects/plugins/jetpack/extensions/blocks/related-posts/inactive-placeholder.js
@@ -1,9 +1,10 @@
import { getRedirectUrl } from '@automattic/jetpack-components';
import { isWpcomPlatformSite, isSimpleSite } from '@automattic/jetpack-script-data';
import { useAnalytics, getBlockIconComponent } from '@automattic/jetpack-shared-extension-utils';
-import { Button, ExternalLink, Placeholder } from '@wordpress/components';
+import { Button, Placeholder } from '@wordpress/components';
import { useEffect } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import metadata from './block.json';
const icon = getBlockIconComponent( metadata );
@@ -65,9 +66,9 @@ export const InactiveRelatedPostsPlaceholder = ( {
) }
-
+
{ __( 'Learn more about the Related Posts feature.', 'jetpack' ) }
-
+
diff --git a/projects/plugins/jetpack/extensions/blocks/subscriptions/email-preview.js b/projects/plugins/jetpack/extensions/blocks/subscriptions/email-preview.js
index c7ff6066f93d..f56ed9e8164b 100644
--- a/projects/plugins/jetpack/extensions/blocks/subscriptions/email-preview.js
+++ b/projects/plugins/jetpack/extensions/blocks/subscriptions/email-preview.js
@@ -13,7 +13,6 @@ import {
__experimentalToggleGroupControlOption as ToggleGroupControlOption, // eslint-disable-line @wordpress/no-unsafe-wp-apis
__experimentalToggleGroupControlOptionIcon as ToggleGroupControlOptionIcon, // eslint-disable-line @wordpress/no-unsafe-wp-apis
Spinner,
- ExternalLink,
} from '@wordpress/components';
import { useSelect, useDispatch } from '@wordpress/data';
import { store as editorStore } from '@wordpress/editor';
@@ -28,6 +27,7 @@ import {
currencyDollar,
cautionFilled as warning,
} from '@wordpress/icons';
+import { Link } from '@wordpress/ui';
import './email-preview.scss';
import { accessOptions } from '../../shared/memberships/constants';
import { useAccessLevel } from '../../shared/memberships/edit';
@@ -353,7 +353,9 @@ export function NewsletterPreviewModal( { isOpen, onClose, postId } ) {
'jetpack'
),
{
- supportLink: ,
+ supportLink: (
+
+ ),
}
) }
diff --git a/projects/plugins/jetpack/extensions/blocks/top-posts/inactive-placeholder.js b/projects/plugins/jetpack/extensions/blocks/top-posts/inactive-placeholder.js
index 995c59183c60..058b1a966f0e 100644
--- a/projects/plugins/jetpack/extensions/blocks/top-posts/inactive-placeholder.js
+++ b/projects/plugins/jetpack/extensions/blocks/top-posts/inactive-placeholder.js
@@ -1,7 +1,8 @@
import { isWoASite } from '@automattic/jetpack-script-data';
import { getBlockIconComponent } from '@automattic/jetpack-shared-extension-utils';
-import { Button, ExternalLink, Placeholder } from '@wordpress/components';
+import { Button, Placeholder } from '@wordpress/components';
import { __ } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import metadata from './block.json';
export const InactiveStatsPlaceholder = ( { className, isLoading, changeStatus } ) => {
@@ -33,9 +34,9 @@ export const InactiveStatsPlaceholder = ( { className, isLoading, changeStatus }
{ isLoading ? __( 'Activating Stats', 'jetpack' ) : __( 'Activate Stats', 'jetpack', 0 ) }
-
+
{ __( 'Learn more about the Stats module.', 'jetpack' ) }
-
+
diff --git a/projects/plugins/jetpack/extensions/blocks/videopress/edit.js b/projects/plugins/jetpack/extensions/blocks/videopress/edit.js
index 3c72c721685d..20d83d8e96b5 100644
--- a/projects/plugins/jetpack/extensions/blocks/videopress/edit.js
+++ b/projects/plugins/jetpack/extensions/blocks/videopress/edit.js
@@ -12,7 +12,6 @@ import {
import {
BaseControl,
Button,
- ExternalLink,
PanelBody,
ResizableBox,
SandBox,
@@ -40,6 +39,7 @@ import {
import { escapeHTML } from '@wordpress/escape-html';
import { __, _x, sprintf } from '@wordpress/i18n';
import { Icon } from '@wordpress/icons';
+import { Link } from '@wordpress/ui';
import clsx from 'clsx';
import { VideoPressBlockProvider } from './components';
import { VIDEO_PRIVACY } from './constants';
@@ -620,7 +620,7 @@ const VideoPressEdit = CoreVideoEdit =>
{ createInterpolateElement(
__( 'Send us your VideoPress feedback ', 'jetpack' ),
{
- a: ,
+ a: ,
}
) }
diff --git a/projects/plugins/jetpack/extensions/blocks/videopress/resumable-upload/index.js b/projects/plugins/jetpack/extensions/blocks/videopress/resumable-upload/index.js
index 194ff3a136d4..1cc1802557bd 100644
--- a/projects/plugins/jetpack/extensions/blocks/videopress/resumable-upload/index.js
+++ b/projects/plugins/jetpack/extensions/blocks/videopress/resumable-upload/index.js
@@ -1,15 +1,17 @@
/**
* WordPress dependencies
*/
-import { Button, ExternalLink } from '@wordpress/components';
+import { Button } from '@wordpress/components';
import { useCallback, useContext, useEffect, useRef, useState } from '@wordpress/element';
import { __, sprintf } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import { filesize } from 'filesize';
/**
* Internal Dependencies
*/
import { VideoPressBlockContext } from '../components';
import { getJWT, resumableUploader } from './use-uploader';
+
import './style.scss';
export default function ResumableUpload( { file } ) {
@@ -111,13 +113,14 @@ export default function ResumableUpload( { file } ) {
<>
{ __( 'The format of the video you uploaded is not supported.', 'jetpack' ) }
-
{ __( 'Check the recommended video settings.', 'jetpack' ) }
-
+
>
);
} else {
diff --git a/projects/plugins/jetpack/extensions/blocks/wordads/components/jetpack-wordads-placeholder.js b/projects/plugins/jetpack/extensions/blocks/wordads/components/jetpack-wordads-placeholder.js
index 6f4f11b3c3de..e75c1e328b68 100644
--- a/projects/plugins/jetpack/extensions/blocks/wordads/components/jetpack-wordads-placeholder.js
+++ b/projects/plugins/jetpack/extensions/blocks/wordads/components/jetpack-wordads-placeholder.js
@@ -1,6 +1,7 @@
import { getBlockIconComponent } from '@automattic/jetpack-shared-extension-utils';
-import { Button, Placeholder, ExternalLink } from '@wordpress/components';
+import { Button, Placeholder } from '@wordpress/components';
import { __ } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import metadata from '../block.json';
const icon = getBlockIconComponent( metadata );
@@ -26,9 +27,9 @@ export const WordAdsPlaceholder = ( { changeStatus, isLoading, isModuleActive }
: __( 'Activate WordAds', 'jetpack', 0 ) }
-
+
{ __( 'Learn more about the WordAds feature.', 'jetpack' ) }
-
+
);
diff --git a/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/ai-assistant-plugin-sidebar/index.tsx b/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/ai-assistant-plugin-sidebar/index.tsx
index db778f47b414..83c4f3ff1bfe 100644
--- a/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/ai-assistant-plugin-sidebar/index.tsx
+++ b/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/ai-assistant-plugin-sidebar/index.tsx
@@ -14,14 +14,7 @@ import {
usePlanType,
} from '@automattic/jetpack-shared-extension-utils';
import { JetpackEditorPanelLogo } from '@automattic/jetpack-shared-extension-utils/components';
-import {
- PanelBody,
- PanelRow,
- BaseControl,
- Button,
- ExternalLink,
- Notice,
-} from '@wordpress/components';
+import { PanelBody, PanelRow, BaseControl, Button, Notice } from '@wordpress/components';
import { store as coreStore } from '@wordpress/core-data';
import { useSelect, useDispatch } from '@wordpress/data';
import {
@@ -31,6 +24,7 @@ import {
} from '@wordpress/editor';
import { applyFilters } from '@wordpress/hooks';
import { __ } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import debugFactory from 'debug';
import { ComponentType, useCallback, useMemo } from 'react';
/**
@@ -148,7 +142,6 @@ const JetpackAndSettingsContent = ( {
) }
-
{ isPostEmpty && (
@@ -156,7 +149,6 @@ const JetpackAndSettingsContent = ( {
) }
-
{ canWriteBriefBeEnabled() && isBreveAvailable && (
@@ -167,7 +159,6 @@ const JetpackAndSettingsContent = ( {
) }
-
{ isAITitleOptimizationAvailable && (
@@ -176,7 +167,6 @@ const JetpackAndSettingsContent = ( {
) }
-
{ ( imageGenerationHandler || isAIFeaturedImageAvailable ) && (
@@ -197,14 +187,12 @@ const JetpackAndSettingsContent = ( {
) }
-
{ __( 'Get Feedback', 'jetpack' ) }
-
{ requireUpgrade && ! isUsagePanelAvailable && (
@@ -215,30 +203,29 @@ const JetpackAndSettingsContent = ( {
) }
-
-
+
{ __( 'Learn more about Jetpack AI', 'jetpack' ) }
-
+
-
-
+
{ __( 'Give us feedback', 'jetpack' ) }
-
+
-
-
+
{ __( 'AI guidelines', 'jetpack' ) }
-
+
-
{ canWriteBriefBeEnabled() && ! isBreveAvailable && (
-
+
{ __( 'Update on Write Brief (Beta)', 'jetpack' ) }
-
+
) }
>
diff --git a/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/ai-assistant-plugin-sidebar/test/index.test.tsx b/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/ai-assistant-plugin-sidebar/test/index.test.tsx
index 5eb665946cc4..d7d300025e34 100644
--- a/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/ai-assistant-plugin-sidebar/test/index.test.tsx
+++ b/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/ai-assistant-plugin-sidebar/test/index.test.tsx
@@ -112,10 +112,13 @@ jest.mock( '@wordpress/components', () => ( {
{ children }
),
- ExternalLink: ( { children, href }: { children: React.ReactNode; href: string } ) => (
+ Notice: ( { children }: { children: React.ReactNode } ) => { children }
,
+} ) );
+
+jest.mock( '@wordpress/ui', () => ( {
+ Link: ( { children, href }: { children: React.ReactNode; href: string } ) => (
{ children }
),
- Notice: ( { children }: { children: React.ReactNode } ) => { children }
,
} ) );
jest.mock( '@wordpress/core-data', () => {
diff --git a/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/title-optimization/index.tsx b/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/title-optimization/index.tsx
index b354d3553e66..422c65de3550 100644
--- a/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/title-optimization/index.tsx
+++ b/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/title-optimization/index.tsx
@@ -13,13 +13,14 @@ import {
AiAssistantModal,
} from '@automattic/jetpack-ai-client';
import { useAnalytics, useAutosaveAndRedirect } from '@automattic/jetpack-shared-extension-utils';
-import { Button, Spinner, ExternalLink, Notice } from '@wordpress/components';
+import { Button, Spinner, Notice } from '@wordpress/components';
import { useDispatch } from '@wordpress/data';
import { useState, useCallback } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
/**
* Internal dependencies
*/
+import { Link } from '@wordpress/ui';
import { getFeatureAvailability } from '../../../../blocks/ai-assistant/lib/utils/get-feature-availability';
import TitleOptimizationKeywords from './title-optimization-keywords';
import TitleOptimizationOptions from './title-optimization-options';
@@ -301,9 +302,9 @@ export default function TitleOptimization( {
>
) }
-
+
{ __( 'Provide feedback', 'jetpack' ) }
-
+
) }
diff --git a/projects/plugins/jetpack/extensions/plugins/ai-content-lens/extend/ai-post-excerpt/index.tsx b/projects/plugins/jetpack/extensions/plugins/ai-content-lens/extend/ai-post-excerpt/index.tsx
index 65914bd6c2ee..b31cea3adae9 100644
--- a/projects/plugins/jetpack/extensions/plugins/ai-content-lens/extend/ai-post-excerpt/index.tsx
+++ b/projects/plugins/jetpack/extensions/plugins/ai-content-lens/extend/ai-post-excerpt/index.tsx
@@ -9,7 +9,7 @@ import {
import { isWpcomPlatformSite } from '@automattic/jetpack-script-data';
import { useAnalytics } from '@automattic/jetpack-shared-extension-utils';
import { WpcomSupportLink } from '@automattic/jetpack-shared-extension-utils/components';
-import { TextareaControl, ExternalLink, Button, Notice, BaseControl } from '@wordpress/components';
+import { TextareaControl, Button, Notice, BaseControl } from '@wordpress/components';
import { useDispatch, useSelect } from '@wordpress/data';
import {
store as editorStore,
@@ -18,6 +18,7 @@ import {
} from '@wordpress/editor';
import { useState, useEffect, useCallback, useRef } from '@wordpress/element';
import { __, sprintf, _n } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import { count } from '@wordpress/wordcount';
/**
* Internal dependencies
@@ -228,7 +229,6 @@ ${ postContent }
value={ currentExcerpt }
disabled={ isTextAreaDisabled }
/>
-
{ isWpcomPlatformSite() ? (
) : (
-
{ __( 'Learn more about manual excerpts', 'jetpack' ) }
-
+
) }
-
{ error?.code && error.code !== 'error_quota_exceeded' && (
-
-
+
{ __( 'Learn more about Jetpack Likes.', 'jetpack' ) }
-
+
>
);
diff --git a/projects/plugins/jetpack/extensions/plugins/payments/index.js b/projects/plugins/jetpack/extensions/plugins/payments/index.js
index d808499fddbe..ea00b361e3ca 100644
--- a/projects/plugins/jetpack/extensions/plugins/payments/index.js
+++ b/projects/plugins/jetpack/extensions/plugins/payments/index.js
@@ -1,10 +1,10 @@
import { getRedirectUrl } from '@automattic/jetpack-components';
import { useAnalytics } from '@automattic/jetpack-shared-extension-utils';
-import { ExternalLink } from '@wordpress/components';
import { useSelect } from '@wordpress/data';
import { PluginPostPublishPanel, store as editorStore } from '@wordpress/editor';
import { __ } from '@wordpress/i18n';
import { currencyDollar } from '@wordpress/icons';
+import { Link } from '@wordpress/ui';
const PaymentsPostPublish = () => {
const { tracks } = useAnalytics();
@@ -30,9 +30,9 @@ const PaymentsPostPublish = () => {
{ __( 'Insert the Payment Button or the Donations Form — no plugin required.', 'jetpack' ) }
-
+
{ __( 'Learn more about these blocks', 'jetpack' ) }
-
+
);
diff --git a/projects/plugins/jetpack/extensions/plugins/seo/components/placeholder.js b/projects/plugins/jetpack/extensions/plugins/seo/components/placeholder.js
index 738f7e85dec5..68e4e22a4c4e 100644
--- a/projects/plugins/jetpack/extensions/plugins/seo/components/placeholder.js
+++ b/projects/plugins/jetpack/extensions/plugins/seo/components/placeholder.js
@@ -1,7 +1,8 @@
import { getRedirectUrl } from '@automattic/jetpack-components';
import { useAnalytics } from '@automattic/jetpack-shared-extension-utils';
-import { Button, ExternalLink } from '@wordpress/components';
+import { Button } from '@wordpress/components';
import { __ } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import './placeholder.scss';
@@ -31,11 +32,10 @@ export const SeoPlaceholder = ( { changeStatus, isLoading, isModuleActive } ) =>
? __( 'Activating Jetpack SEO', 'jetpack' )
: __( 'Activate Jetpack SEO', 'jetpack', 0 ) }
-
-
+
{ __( 'Learn more about Jetpack SEO.', 'jetpack' ) }
-
+
>
);
diff --git a/projects/plugins/jetpack/extensions/plugins/sharing/components/placeholder.js b/projects/plugins/jetpack/extensions/plugins/sharing/components/placeholder.js
index d680bdf61f5c..e44d40e35065 100644
--- a/projects/plugins/jetpack/extensions/plugins/sharing/components/placeholder.js
+++ b/projects/plugins/jetpack/extensions/plugins/sharing/components/placeholder.js
@@ -1,7 +1,8 @@
import { getRedirectUrl } from '@automattic/jetpack-components';
import { useAnalytics } from '@automattic/jetpack-shared-extension-utils';
-import { Button, ExternalLink } from '@wordpress/components';
+import { Button } from '@wordpress/components';
import { __ } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import './placeholder.scss';
@@ -28,11 +29,10 @@ export const SharingPlaceholder = ( { changeStatus, isLoading, isModuleActive }
? __( 'Activating Sharing', 'jetpack' )
: __( 'Activate Sharing', 'jetpack', /* dummy arg to avoid bad minification */ 0 ) }
-
-
+
{ __( 'Learn more about Jetpack Sharing.', 'jetpack' ) }
-
+
>
);
diff --git a/projects/plugins/jetpack/extensions/shared/components/block-nudge/index.jsx b/projects/plugins/jetpack/extensions/shared/components/block-nudge/index.jsx
index d0344f6c170d..27d203f9b6d1 100644
--- a/projects/plugins/jetpack/extensions/shared/components/block-nudge/index.jsx
+++ b/projects/plugins/jetpack/extensions/shared/components/block-nudge/index.jsx
@@ -1,7 +1,8 @@
import { useAutosaveAndRedirect } from '@automattic/jetpack-shared-extension-utils';
import { Warning } from '@wordpress/block-editor';
-import { Button, ExternalLink } from '@wordpress/components';
+import { Button } from '@wordpress/components';
import { __ } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import clsx from 'clsx';
import './style.scss';
@@ -54,9 +55,9 @@ export default function BlockNudge( {
{ readMoreUrl && (
<>
-
+
{ __( 'Learn more about the block and fees', 'jetpack' ) }
-
+
>
) }
diff --git a/projects/plugins/jetpack/extensions/shared/components/product-management-controls/inspector-control.js b/projects/plugins/jetpack/extensions/shared/components/product-management-controls/inspector-control.js
index 7ee100e87ed6..461d55828143 100644
--- a/projects/plugins/jetpack/extensions/shared/components/product-management-controls/inspector-control.js
+++ b/projects/plugins/jetpack/extensions/shared/components/product-management-controls/inspector-control.js
@@ -5,7 +5,6 @@ import {
PanelRow,
SelectControl,
TextControl,
- ExternalLink,
Placeholder,
Spinner,
ToggleControl,
@@ -14,6 +13,7 @@ import { useDispatch, useSelect } from '@wordpress/data';
import { useState } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
import { lock } from '@wordpress/icons';
+import { Link } from '@wordpress/ui';
import { useEffect } from 'react';
import { store as membershipProductsStore } from '../../../store/membership-products';
import { CURRENCY_OPTIONS } from '../../currencies';
@@ -90,9 +90,9 @@ export default function ProductManagementInspectorControl() {
{ siteSlug && (
-
+
{ getMessageByProductType( 'manage your products', productType ) }
-
+
) }
-
+
{ __( 'Read more about Payments and related fees.', 'jetpack' ) }
-
+
diff --git a/projects/plugins/jetpack/extensions/shared/components/product-management-controls/toolbar-control.js b/projects/plugins/jetpack/extensions/shared/components/product-management-controls/toolbar-control.js
index c616fc4c62f5..1470934e8e13 100644
--- a/projects/plugins/jetpack/extensions/shared/components/product-management-controls/toolbar-control.js
+++ b/projects/plugins/jetpack/extensions/shared/components/product-management-controls/toolbar-control.js
@@ -1,9 +1,10 @@
import { formatCurrency } from '@automattic/number-formatters';
import { BlockControls } from '@wordpress/block-editor';
-import { ExternalLink, MenuGroup, MenuItem, ToolbarDropdownMenu } from '@wordpress/components';
+import { MenuGroup, MenuItem, ToolbarDropdownMenu } from '@wordpress/components';
import { useSelect } from '@wordpress/data';
import { __, sprintf } from '@wordpress/i18n';
import { check, update, cautionFilled as warning } from '@wordpress/icons';
+import { Link } from '@wordpress/ui';
import { store as membershipProductsStore } from '../../../store/membership-products';
import { CUSTOMIZER_EDITOR, getEditorType } from '../../get-editor-type';
import { useProductManagementContext } from './context';
@@ -70,11 +71,12 @@ function NewProduct( { onClose } ) {
return (
{ siteSlug && (
-
{ getMessageByProductType( 'add a new product', productType ) }
-
+
) }
);
diff --git a/projects/plugins/jetpack/modules/subscriptions/newsletter-widget/src/components/dashboard-link.tsx b/projects/plugins/jetpack/modules/subscriptions/newsletter-widget/src/components/dashboard-link.tsx
index 65233a8222af..dd5956d4dd34 100644
--- a/projects/plugins/jetpack/modules/subscriptions/newsletter-widget/src/components/dashboard-link.tsx
+++ b/projects/plugins/jetpack/modules/subscriptions/newsletter-widget/src/components/dashboard-link.tsx
@@ -1,6 +1,6 @@
import { useAnalytics } from '@automattic/jetpack-shared-extension-utils';
-import { ExternalLink } from '@wordpress/components';
import { createElement, useEffect } from '@wordpress/element';
+import { Link } from '@wordpress/ui';
import { TRACKS_EVENT_NAME_PREFIX } from '../constants';
import { createTracksEventHandler } from '../helpers';
import type { ReactElement } from 'react';
@@ -26,14 +26,15 @@ export const DashboardLink = (
tracks.recordEvent( `${ TRACKS_EVENT_NAME_PREFIX }_view` );
}, [ tracks ] );
- let elementType = ExternalLink;
- if ( internal ) {
- elementType = 'a';
+ const isExternal = ! internal;
+ const elementType = isExternal ? Link : 'a';
+ const props: Record< string, unknown > = {
+ href,
+ onClick: createTracksEventHandler( tracks, eventName ),
+ };
+ if ( isExternal ) {
+ props.openInNewTab = true;
}
- return createElement(
- elementType,
- { href, onClick: createTracksEventHandler( tracks, eventName ) },
- text ? text : undefined
- );
+ return createElement( elementType, props, text ? text : undefined );
};
diff --git a/projects/plugins/jetpack/modules/subscriptions/newsletter-widget/test/dashboard-link.test.tsx b/projects/plugins/jetpack/modules/subscriptions/newsletter-widget/test/dashboard-link.test.tsx
index 8cf23996b05b..2eb9b8d755ce 100644
--- a/projects/plugins/jetpack/modules/subscriptions/newsletter-widget/test/dashboard-link.test.tsx
+++ b/projects/plugins/jetpack/modules/subscriptions/newsletter-widget/test/dashboard-link.test.tsx
@@ -1,5 +1,5 @@
import { useAnalytics } from '@automattic/jetpack-shared-extension-utils';
-import { ExternalLink } from '@wordpress/components';
+import { Link } from '@wordpress/ui';
import { DashboardLink } from '../src/components/dashboard-link';
import { TRACKS_EVENT_NAME_PREFIX } from '../src/constants';
@@ -34,10 +34,11 @@ describe( 'DashboardLink', () => {
expect( link.props.children ).toBe( testText );
} );
- it( 'renders as ExternalLink for links that point to external resources', () => {
+ it( 'renders as Link for links that point to external resources', () => {
const link = DashboardLink( false, testHref, testEventName, testText );
- expect( link.type ).toBe( ExternalLink );
+ expect( link.type ).toBe( Link );
expect( link.props.href ).toBe( testHref );
+ expect( link.props.openInNewTab ).toBe( true );
expect( link.props.children ).toBe( testText );
} );
diff --git a/projects/plugins/jetpack/modules/subscriptions/newsletter-widget/test/newsletter-widget.test.tsx b/projects/plugins/jetpack/modules/subscriptions/newsletter-widget/test/newsletter-widget.test.tsx
index 0351d4d13f6d..785283e8af28 100644
--- a/projects/plugins/jetpack/modules/subscriptions/newsletter-widget/test/newsletter-widget.test.tsx
+++ b/projects/plugins/jetpack/modules/subscriptions/newsletter-widget/test/newsletter-widget.test.tsx
@@ -6,7 +6,6 @@ jest.mock( '@wordpress/components', () => {
const actualModule = jest.requireActual( '@wordpress/components' );
const mockModule = {
Icon: jest.fn( () => null ),
- ExternalLink: jest.fn( ( { href, children } ) => { children } ),
};
return new Proxy( actualModule, {
@@ -14,6 +13,10 @@ jest.mock( '@wordpress/components', () => {
} );
} );
+jest.mock( '@wordpress/ui', () => ( {
+ Link: jest.fn( ( { href, children } ) => { children } ),
+} ) );
+
jest.mock( '@wordpress/icons', () => ( {
envelope: 'envelope-icon-mock',
payment: 'payment-icon-mock',
diff --git a/projects/plugins/jetpack/tools/webpack.config.extensions.js b/projects/plugins/jetpack/tools/webpack.config.extensions.js
index d4b45931176e..1631556fe755 100644
--- a/projects/plugins/jetpack/tools/webpack.config.extensions.js
+++ b/projects/plugins/jetpack/tools/webpack.config.extensions.js
@@ -173,6 +173,9 @@ const sharedWebpackConfig = {
],
} ),
+ // Workarounds for non-extracted `@wordpress/*` packages.
+ ...jetpackWebpackConfig.BundledWpPkgsTranspileRules(),
+
// Handle CSS.
jetpackWebpackConfig.CssRule( {
extensions: [ 'css', 'sass', 'scss' ],
diff --git a/projects/plugins/protect/changelog/update-eslint-use_wp_recommended_components_link_instead_of_external_link b/projects/plugins/protect/changelog/update-eslint-use_wp_recommended_components_link_instead_of_external_link
new file mode 100644
index 000000000000..948c4788767f
--- /dev/null
+++ b/projects/plugins/protect/changelog/update-eslint-use_wp_recommended_components_link_instead_of_external_link
@@ -0,0 +1,4 @@
+Significance: patch
+Type: changed
+
+Components: Use Link from `@wordpress/ui` instead of ExternalLink.
diff --git a/projects/plugins/protect/src/js/components/paid-accordion/index.jsx b/projects/plugins/protect/src/js/components/paid-accordion/index.jsx
index 4c18823bdf3d..a7da1d5106eb 100644
--- a/projects/plugins/protect/src/js/components/paid-accordion/index.jsx
+++ b/projects/plugins/protect/src/js/components/paid-accordion/index.jsx
@@ -1,10 +1,11 @@
import { IconTooltip, Text, useBreakpointMatch } from '@automattic/jetpack-components';
import { ThreatSeverityBadge } from '@automattic/jetpack-scan';
-import { ExternalLink, Spinner } from '@wordpress/components';
+import { Spinner } from '@wordpress/components';
import { dateI18n } from '@wordpress/date';
import { createInterpolateElement } from '@wordpress/element';
import { sprintf, __ } from '@wordpress/i18n';
import { Icon, check, chevronDown, chevronUp } from '@wordpress/icons';
+import { Link } from '@wordpress/ui';
import clsx from 'clsx';
import { createContext, useState, useCallback, useContext, useMemo } from 'react';
import { PAID_PLUGIN_SUPPORT_URL } from '../../constants';
@@ -79,7 +80,8 @@ const renderFixerStatus = ( isActiveFixInProgress, isStaleFixInProgress ) => {
),
{
supportLink: (
-
diff --git a/projects/plugins/protect/src/js/hooks/use-notices.tsx b/projects/plugins/protect/src/js/hooks/use-notices.tsx
index 34a3245a3480..28dbed49ba10 100644
--- a/projects/plugins/protect/src/js/hooks/use-notices.tsx
+++ b/projects/plugins/protect/src/js/hooks/use-notices.tsx
@@ -1,6 +1,6 @@
-import { ExternalLink } from '@wordpress/components';
import { createInterpolateElement } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
+import { Link } from '@wordpress/ui';
import { createContext, useCallback, useContext, useState } from 'react';
import { FREE_PLUGIN_SUPPORT_URL, PAID_PLUGIN_SUPPORT_URL } from '../constants';
import usePlan from './use-plan';
@@ -79,7 +79,8 @@ export default function useNotices() {
),
{
supportLink: (
-
diff --git a/projects/plugins/protect/src/js/routes/settings/index.jsx b/projects/plugins/protect/src/js/routes/settings/index.jsx
index 9bc25f862dd7..e918ca69c389 100644
--- a/projects/plugins/protect/src/js/routes/settings/index.jsx
+++ b/projects/plugins/protect/src/js/routes/settings/index.jsx
@@ -6,11 +6,10 @@ import {
AdminSectionHero,
getRedirectUrl,
} from '@automattic/jetpack-components';
-import { ExternalLink } from '@wordpress/components';
import { createInterpolateElement } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
import { Icon, info } from '@wordpress/icons';
-import { Notice } from '@wordpress/ui';
+import { Notice, Link } from '@wordpress/ui';
import { useCallback } from 'react';
import useAccountProtectionQuery from '../../data/account-protection/use-account-protection-query';
import useToggleAccountProtectionMutation from '../../data/account-protection/use-toggle-account-protection-module-mutation';
@@ -106,7 +105,7 @@ const SettingsPage = () => {
'jetpack-protect'
),
{
- link: ,
+ link: ,
}
) }
@@ -126,7 +125,10 @@ const SettingsPage = () => {
),
{
link: (
-
+
),
}
) }
diff --git a/tools/js-tools/package.json b/tools/js-tools/package.json
index 76276cc63e70..ec8a04803054 100644
--- a/tools/js-tools/package.json
+++ b/tools/js-tools/package.json
@@ -26,7 +26,7 @@
"@testing-library/dom": "^10.4.1",
"@testing-library/jest-dom": "6.9.1",
"@typescript/native-preview": "7.0.0-dev.20260225.1",
- "@wordpress/eslint-plugin": "25.0.0",
+ "@wordpress/eslint-plugin": "25.1.0",
"@wordpress/jest-console": "8.44.0",
"@wordpress/stylelint-config": "23.36.0",
"babel-jest": "30.3.0",