@automattic/jetpack-components 1.11.1 → 1.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/build/components/contextual-upgrade-trigger/index.d.ts +15 -0
- package/build/components/contextual-upgrade-trigger/index.js +15 -0
- package/build/components/jetpack-footer/index.js +1 -2
- package/build/components/jetpack-footer/types.d.ts +0 -1
- package/build/components/status/index.d.ts +11 -0
- package/build/components/status/index.js +11 -0
- package/components/contextual-upgrade-trigger/index.tsx +15 -0
- package/components/jetpack-footer/index.tsx +4 -10
- package/components/jetpack-footer/types.ts +0 -1
- package/components/status/index.tsx +11 -0
- package/package.json +18 -18
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
### This is a list detailing changes for the Jetpack RNA Components package releases.
|
|
4
4
|
|
|
5
|
+
## [1.11.3] - 2026-05-21
|
|
6
|
+
### Changed
|
|
7
|
+
- Mark ContextualUpgradeTrigger as @deprecated. Use Notice from @wordpress/ui instead. The implementation is unchanged. [#48909]
|
|
8
|
+
- Update package dependencies. [#48405]
|
|
9
|
+
- Update package dependencies. [#49012]
|
|
10
|
+
|
|
11
|
+
## [1.11.2] - 2026-05-19
|
|
12
|
+
### Changed
|
|
13
|
+
- Deprecate Status; inline @wordpress/ui Text in consumers. [#48711]
|
|
14
|
+
|
|
5
15
|
## [1.11.1] - 2026-05-14
|
|
6
16
|
### Changed
|
|
7
17
|
- Update package dependencies. [#48696]
|
|
@@ -1784,6 +1794,8 @@
|
|
|
1784
1794
|
### Changed
|
|
1785
1795
|
- Update node version requirement to 14.16.1
|
|
1786
1796
|
|
|
1797
|
+
[1.11.3]: https://github.com/Automattic/jetpack-components/compare/1.11.2...1.11.3
|
|
1798
|
+
[1.11.2]: https://github.com/Automattic/jetpack-components/compare/1.11.1...1.11.2
|
|
1787
1799
|
[1.11.1]: https://github.com/Automattic/jetpack-components/compare/1.11.0...1.11.1
|
|
1788
1800
|
[1.11.0]: https://github.com/Automattic/jetpack-components/compare/1.10.0...1.11.0
|
|
1789
1801
|
[1.10.0]: https://github.com/Automattic/jetpack-components/compare/1.9.0...1.10.0
|
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
import { CutBaseProps } from './types.ts';
|
|
2
2
|
import type { FC } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* ContextualUpgradeTrigger component.
|
|
5
|
+
*
|
|
6
|
+
* @deprecated Use `Notice` from `@wordpress/ui` instead. Compose with `Notice.Root` (`intent="info"`), `Notice.Description` for the body, and `Notice.Actions` + `Notice.ActionLink` / `Notice.ActionButton` for the CTA. See https://github.com/Automattic/jetpack/issues/48160 for migration guidance.
|
|
7
|
+
*
|
|
8
|
+
* @param props - The component properties.
|
|
9
|
+
* @param props.description - The body copy describing the upgrade context.
|
|
10
|
+
* @param props.cta - The CTA label.
|
|
11
|
+
* @param props.onClick - Click handler when rendered as a button.
|
|
12
|
+
* @param props.href - When provided, renders as an anchor instead of a button.
|
|
13
|
+
* @param props.openInNewTab - Whether to open the link in a new tab.
|
|
14
|
+
* @param props.className - Optional class for the root element.
|
|
15
|
+
* @param props.tooltipText - Optional tooltip body shown next to the description.
|
|
16
|
+
* @return The rendered upgrade trigger.
|
|
17
|
+
*/
|
|
3
18
|
declare const ContextualUpgradeTrigger: FC<CutBaseProps>;
|
|
4
19
|
export default ContextualUpgradeTrigger;
|
|
@@ -4,6 +4,21 @@ import clsx from 'clsx';
|
|
|
4
4
|
import IconTooltip from '../icon-tooltip/index.js';
|
|
5
5
|
import Text from '../text/index.js';
|
|
6
6
|
import styles from './style.module.scss';
|
|
7
|
+
/**
|
|
8
|
+
* ContextualUpgradeTrigger component.
|
|
9
|
+
*
|
|
10
|
+
* @deprecated Use `Notice` from `@wordpress/ui` instead. Compose with `Notice.Root` (`intent="info"`), `Notice.Description` for the body, and `Notice.Actions` + `Notice.ActionLink` / `Notice.ActionButton` for the CTA. See https://github.com/Automattic/jetpack/issues/48160 for migration guidance.
|
|
11
|
+
*
|
|
12
|
+
* @param props - The component properties.
|
|
13
|
+
* @param props.description - The body copy describing the upgrade context.
|
|
14
|
+
* @param props.cta - The CTA label.
|
|
15
|
+
* @param props.onClick - Click handler when rendered as a button.
|
|
16
|
+
* @param props.href - When provided, renders as an anchor instead of a button.
|
|
17
|
+
* @param props.openInNewTab - Whether to open the link in a new tab.
|
|
18
|
+
* @param props.className - Optional class for the root element.
|
|
19
|
+
* @param props.tooltipText - Optional tooltip body shown next to the description.
|
|
20
|
+
* @return The rendered upgrade trigger.
|
|
21
|
+
*/
|
|
7
22
|
const ContextualUpgradeTrigger = ({ description, cta, onClick, href, openInNewTab = false, className, tooltipText = '', }) => {
|
|
8
23
|
const Tag = href !== undefined ? 'a' : 'button';
|
|
9
24
|
const tagProps = Tag === 'a' ? { href, ...(openInNewTab && { target: '_blank' }) } : { onClick };
|
|
@@ -35,8 +35,7 @@ const JetpackFooter = ({ className, menu, ...otherProps }) => {
|
|
|
35
35
|
_jsxs(Stack, { className: "jetpack-footer__logo", direction: "row", gap: "sm", align: "center", children: [
|
|
36
36
|
_jsx(JetpackLogo, { showText: false, height: 16, "aria-hidden": "true" }), _jsx(Text, { variant: "body-md", children: "Jetpack" })
|
|
37
37
|
] }), _jsx(Stack, { render: _jsx("ul", {}), direction: "row", gap: "lg", wrap: "wrap", children: items.map(item => {
|
|
38
|
-
|
|
39
|
-
return (_jsx("li", { children: _jsx(Text, { variant: "body-md", className: "jetpack-footer__menu-item", render: isButton ? (_jsx(Link, { render: _jsx("span", {}), tone: "neutral", variant: "default", role: item.role, tabIndex: 0, onClick: item.onClick || undefined, onKeyDown: item.onKeyDown || undefined })) : (_jsx(Link, { tone: "neutral", variant: "default", href: item.href || '', title: item.title || '', role: item.role, onClick: item.onClick || undefined, onKeyDown: item.onKeyDown || undefined })), children: item.label }) }, item.label));
|
|
38
|
+
return (_jsx("li", { children: _jsx(Text, { variant: "body-md", className: "jetpack-footer__menu-item", render: !item.href ? (_jsx(Link, { render: _jsx("span", {}), tabIndex: 0, title: item.title || '', onClick: item.onClick || undefined, onKeyDown: item.onKeyDown || undefined, role: "button" })) : (_jsx(Link, { href: item.href, title: item.title || '', onClick: item.onClick || undefined, onKeyDown: item.onKeyDown || undefined })), children: item.label }) }, item.label));
|
|
40
39
|
}) }), _jsx("a", { className: "jetpack-footer__a8c", href: getRedirectUrl('a8c-about'), rel: "noopener noreferrer", target: "_blank", children: _jsx(AutomatticBylineLogo, { height: 8 }) })
|
|
41
40
|
] }));
|
|
42
41
|
};
|
|
@@ -4,5 +4,16 @@ export interface StatusProps {
|
|
|
4
4
|
label?: string;
|
|
5
5
|
className?: string;
|
|
6
6
|
}
|
|
7
|
+
/**
|
|
8
|
+
* Status component.
|
|
9
|
+
*
|
|
10
|
+
* @deprecated Inline the equivalent JSX using `Text` from `@wordpress/ui` and a small color-coded indicator span. The wrapper renders a flex container at `body-sm` size with `font-weight: 600` and a `0.666em` round indicator coloured by status using WPDS design tokens (`var(--wpds-color-fg-content-success-weak)` for `active`, `--wpds-color-fg-content-error-weak` for `error`, `--wpds-color-fg-content-neutral-weak` for `inactive`, `--wpds-color-fg-content-warning-weak` for `action`, `--wpds-color-fg-content-info-weak` for `initializing`). Include a fallback hex for surfaces that don't load `@wordpress/theme/design-tokens.css` (e.g. the legacy Jetpack settings dashboard).
|
|
11
|
+
*
|
|
12
|
+
* @param {StatusProps} props - The component properties.
|
|
13
|
+
* @param {string} props.className - Optional className forwarded to the outer element.
|
|
14
|
+
* @param {string} props.label - Status label. Defaults to a status-derived string.
|
|
15
|
+
* @param {string} props.status - Status key: `active | error | inactive | action | initializing`.
|
|
16
|
+
* @return {JSX.Element} The `Status` component.
|
|
17
|
+
*/
|
|
7
18
|
declare const Status: ({ className, label, status }: StatusProps) => JSX.Element;
|
|
8
19
|
export default Status;
|
|
@@ -3,6 +3,17 @@ import { __ } from '@wordpress/i18n';
|
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import Text from '../text/index.js';
|
|
5
5
|
import styles from './style.module.scss';
|
|
6
|
+
/**
|
|
7
|
+
* Status component.
|
|
8
|
+
*
|
|
9
|
+
* @deprecated Inline the equivalent JSX using `Text` from `@wordpress/ui` and a small color-coded indicator span. The wrapper renders a flex container at `body-sm` size with `font-weight: 600` and a `0.666em` round indicator coloured by status using WPDS design tokens (`var(--wpds-color-fg-content-success-weak)` for `active`, `--wpds-color-fg-content-error-weak` for `error`, `--wpds-color-fg-content-neutral-weak` for `inactive`, `--wpds-color-fg-content-warning-weak` for `action`, `--wpds-color-fg-content-info-weak` for `initializing`). Include a fallback hex for surfaces that don't load `@wordpress/theme/design-tokens.css` (e.g. the legacy Jetpack settings dashboard).
|
|
10
|
+
*
|
|
11
|
+
* @param {StatusProps} props - The component properties.
|
|
12
|
+
* @param {string} props.className - Optional className forwarded to the outer element.
|
|
13
|
+
* @param {string} props.label - Status label. Defaults to a status-derived string.
|
|
14
|
+
* @param {string} props.status - Status key: `active | error | inactive | action | initializing`.
|
|
15
|
+
* @return {JSX.Element} The `Status` component.
|
|
16
|
+
*/
|
|
6
17
|
const Status = ({ className, label, status = 'inactive' }) => {
|
|
7
18
|
const defaultLabels = {
|
|
8
19
|
active: __('Active', 'jetpack-components'),
|
|
@@ -6,6 +6,21 @@ import styles from './style.module.scss';
|
|
|
6
6
|
import { CutBaseProps } from './types.ts';
|
|
7
7
|
import type { FC } from 'react';
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* ContextualUpgradeTrigger component.
|
|
11
|
+
*
|
|
12
|
+
* @deprecated Use `Notice` from `@wordpress/ui` instead. Compose with `Notice.Root` (`intent="info"`), `Notice.Description` for the body, and `Notice.Actions` + `Notice.ActionLink` / `Notice.ActionButton` for the CTA. See https://github.com/Automattic/jetpack/issues/48160 for migration guidance.
|
|
13
|
+
*
|
|
14
|
+
* @param props - The component properties.
|
|
15
|
+
* @param props.description - The body copy describing the upgrade context.
|
|
16
|
+
* @param props.cta - The CTA label.
|
|
17
|
+
* @param props.onClick - Click handler when rendered as a button.
|
|
18
|
+
* @param props.href - When provided, renders as an anchor instead of a button.
|
|
19
|
+
* @param props.openInNewTab - Whether to open the link in a new tab.
|
|
20
|
+
* @param props.className - Optional class for the root element.
|
|
21
|
+
* @param props.tooltipText - Optional tooltip body shown next to the description.
|
|
22
|
+
* @return The rendered upgrade trigger.
|
|
23
|
+
*/
|
|
9
24
|
const ContextualUpgradeTrigger: FC< CutBaseProps > = ( {
|
|
10
25
|
description,
|
|
11
26
|
cta,
|
|
@@ -64,31 +64,25 @@ const JetpackFooter: FC< JetpackFooterProps > = ( { className, menu, ...otherPro
|
|
|
64
64
|
</Stack>
|
|
65
65
|
<Stack render={ <ul /> } direction="row" gap="lg" wrap="wrap">
|
|
66
66
|
{ items.map( item => {
|
|
67
|
-
const isButton = item.role === 'button';
|
|
68
|
-
|
|
69
67
|
return (
|
|
70
68
|
<li key={ item.label }>
|
|
71
69
|
<Text
|
|
72
70
|
variant="body-md"
|
|
73
71
|
className="jetpack-footer__menu-item"
|
|
74
72
|
render={
|
|
75
|
-
|
|
73
|
+
! item.href ? (
|
|
76
74
|
<Link
|
|
77
75
|
render={ <span /> }
|
|
78
|
-
tone="neutral"
|
|
79
|
-
variant="default"
|
|
80
|
-
role={ item.role }
|
|
81
76
|
tabIndex={ 0 }
|
|
77
|
+
title={ item.title || '' }
|
|
82
78
|
onClick={ item.onClick || undefined }
|
|
83
79
|
onKeyDown={ item.onKeyDown || undefined }
|
|
80
|
+
role="button"
|
|
84
81
|
/>
|
|
85
82
|
) : (
|
|
86
83
|
<Link
|
|
87
|
-
|
|
88
|
-
variant="default"
|
|
89
|
-
href={ item.href || '' }
|
|
84
|
+
href={ item.href }
|
|
90
85
|
title={ item.title || '' }
|
|
91
|
-
role={ item.role }
|
|
92
86
|
onClick={ item.onClick || undefined }
|
|
93
87
|
onKeyDown={ item.onKeyDown || undefined }
|
|
94
88
|
/>
|
|
@@ -10,6 +10,17 @@ export interface StatusProps {
|
|
|
10
10
|
className?: string;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Status component.
|
|
15
|
+
*
|
|
16
|
+
* @deprecated Inline the equivalent JSX using `Text` from `@wordpress/ui` and a small color-coded indicator span. The wrapper renders a flex container at `body-sm` size with `font-weight: 600` and a `0.666em` round indicator coloured by status using WPDS design tokens (`var(--wpds-color-fg-content-success-weak)` for `active`, `--wpds-color-fg-content-error-weak` for `error`, `--wpds-color-fg-content-neutral-weak` for `inactive`, `--wpds-color-fg-content-warning-weak` for `action`, `--wpds-color-fg-content-info-weak` for `initializing`). Include a fallback hex for surfaces that don't load `@wordpress/theme/design-tokens.css` (e.g. the legacy Jetpack settings dashboard).
|
|
17
|
+
*
|
|
18
|
+
* @param {StatusProps} props - The component properties.
|
|
19
|
+
* @param {string} props.className - Optional className forwarded to the outer element.
|
|
20
|
+
* @param {string} props.label - Status label. Defaults to a status-derived string.
|
|
21
|
+
* @param {string} props.status - Status key: `active | error | inactive | action | initializing`.
|
|
22
|
+
* @return {JSX.Element} The `Status` component.
|
|
23
|
+
*/
|
|
13
24
|
const Status = ( { className, label, status = 'inactive' }: StatusProps ): JSX.Element => {
|
|
14
25
|
const defaultLabels: Record< string, string > = {
|
|
15
26
|
active: __( 'Active', 'jetpack-components' ),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automattic/jetpack-components",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.3",
|
|
4
4
|
"description": "Jetpack Components Package",
|
|
5
5
|
"homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/components/#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -61,38 +61,38 @@
|
|
|
61
61
|
],
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@automattic/format-currency": "1.0.1",
|
|
64
|
-
"@automattic/jetpack-api": "^1.0.
|
|
65
|
-
"@automattic/jetpack-boost-score-api": "^1.0.
|
|
66
|
-
"@automattic/jetpack-script-data": "^0.6.
|
|
67
|
-
"@automattic/number-formatters": "^1.1.
|
|
64
|
+
"@automattic/jetpack-api": "^1.0.26",
|
|
65
|
+
"@automattic/jetpack-boost-score-api": "^1.0.43",
|
|
66
|
+
"@automattic/jetpack-script-data": "^0.6.4",
|
|
67
|
+
"@automattic/number-formatters": "^1.1.10",
|
|
68
68
|
"@babel/runtime": "^7",
|
|
69
69
|
"@gravatar-com/hovercards": "0.16.0",
|
|
70
70
|
"@wordpress/admin-ui": "2.0.0",
|
|
71
|
-
"@wordpress/browserslist-config": "6.
|
|
72
|
-
"@wordpress/components": "
|
|
73
|
-
"@wordpress/compose": "7.
|
|
74
|
-
"@wordpress/data": "10.
|
|
75
|
-
"@wordpress/date": "5.
|
|
76
|
-
"@wordpress/element": "6.
|
|
77
|
-
"@wordpress/i18n": "6.
|
|
71
|
+
"@wordpress/browserslist-config": "6.46.0",
|
|
72
|
+
"@wordpress/components": "33.1.0",
|
|
73
|
+
"@wordpress/compose": "7.46.0",
|
|
74
|
+
"@wordpress/data": "10.46.0",
|
|
75
|
+
"@wordpress/date": "5.46.0",
|
|
76
|
+
"@wordpress/element": "6.46.0",
|
|
77
|
+
"@wordpress/i18n": "6.19.0",
|
|
78
78
|
"@wordpress/icons": "12.2.0",
|
|
79
|
-
"@wordpress/notices": "5.
|
|
80
|
-
"@wordpress/theme": "0.
|
|
79
|
+
"@wordpress/notices": "5.46.0",
|
|
80
|
+
"@wordpress/theme": "0.13.0",
|
|
81
81
|
"@wordpress/ui": "0.11.0",
|
|
82
82
|
"clsx": "2.1.1",
|
|
83
83
|
"js-sha256": "0.11.1",
|
|
84
84
|
"prop-types": "^15.7.2",
|
|
85
85
|
"qrcode.react": "4.2.0",
|
|
86
86
|
"react-slider": "2.0.5",
|
|
87
|
-
"social-logos": "^3.3.
|
|
87
|
+
"social-logos": "^3.3.15",
|
|
88
88
|
"uplot": "1.6.31",
|
|
89
89
|
"uplot-react": "1.1.4"
|
|
90
90
|
},
|
|
91
91
|
"devDependencies": {
|
|
92
|
-
"@automattic/jetpack-base-styles": "^1.2.
|
|
92
|
+
"@automattic/jetpack-base-styles": "^1.2.4",
|
|
93
93
|
"@babel/core": "7.29.0",
|
|
94
94
|
"@babel/preset-react": "7.28.5",
|
|
95
|
-
"@jest/globals": "30.
|
|
95
|
+
"@jest/globals": "30.4.1",
|
|
96
96
|
"@storybook/addon-docs": "10.3.6",
|
|
97
97
|
"@storybook/react": "10.3.6",
|
|
98
98
|
"@testing-library/dom": "10.4.1",
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"@types/react-dom": "18.3.7",
|
|
104
104
|
"@types/react-slider": "1.3.6",
|
|
105
105
|
"@typescript/native-preview": "7.0.0-dev.20260225.1",
|
|
106
|
-
"jest": "30.
|
|
106
|
+
"jest": "30.4.2",
|
|
107
107
|
"react": "18.3.1",
|
|
108
108
|
"react-dom": "18.3.1",
|
|
109
109
|
"require-from-string": "2.0.2",
|