@automattic/jetpack-components 1.9.0 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,18 @@
2
2
 
3
3
  ### This is a list detailing changes for the Jetpack RNA Components package releases.
4
4
 
5
+ ## [1.10.0] - 2026-05-04
6
+ ### Added
7
+ - AdminPage: Add `unwrapped` prop to render children directly inside the admin-ui Page, skipping the default Container/Col grid wrap. Use for full-bleed pages (DataViews-based admin surfaces) that own their own scroll/layout model. [#48244]
8
+ - ToggleControl: Forward the `aria-label` prop to the underlying checkbox so consumers can label toggles that have no visible label. [#48277]
9
+
10
+ ### Changed
11
+ - Internal: No longer require automattic/jetpack-changelogger as a per-project dev dependency. [#48225]
12
+ - Remove "new" style variant from the Chip component. [#48174]
13
+
14
+ ### Deprecated
15
+ - Mark the Spinner component as deprecated in favor of the WordPress Core Spinner from @wordpress/components. [#47451]
16
+
5
17
  ## [1.9.0] - 2026-04-27
6
18
  ### Deprecated
7
19
  - Componentry: Deprecate the Chip component. Use Badge from @wordpress/ui instead — map type="new" to intent="stable". [#48162]
@@ -1752,6 +1764,7 @@
1752
1764
  ### Changed
1753
1765
  - Update node version requirement to 14.16.1
1754
1766
 
1767
+ [1.10.0]: https://github.com/Automattic/jetpack-components/compare/1.9.0...1.10.0
1755
1768
  [1.9.0]: https://github.com/Automattic/jetpack-components/compare/1.8.3...1.9.0
1756
1769
  [1.8.3]: https://github.com/Automattic/jetpack-components/compare/1.8.2...1.8.3
1757
1770
  [1.8.2]: https://github.com/Automattic/jetpack-components/compare/1.8.1...1.8.2
@@ -20,7 +20,7 @@ import styles from './style.module.scss';
20
20
  * @param {AdminPageProps} props - Component properties.
21
21
  * @return {ReactNode} AdminPage component.
22
22
  */
23
- const AdminPage = ({ children, className, showHeader = true, showFooter = true, showBackground = true, sandboxedDomain = '', apiRoot = '', apiNonce = '', optionalMenuItems, header, title, subTitle, logo, actions, breadcrumbs, tabs, showBottomBorder = true, }) => {
23
+ const AdminPage = ({ children, className, showHeader = true, showFooter = true, showBackground = true, sandboxedDomain = '', apiRoot = '', apiNonce = '', optionalMenuItems, header, title, subTitle, logo, actions, breadcrumbs, tabs, showBottomBorder = true, unwrapped = false, }) => {
24
24
  useEffect(() => {
25
25
  restApi.setApiRoot(apiRoot);
26
26
  restApi.setApiNonce(apiNonce);
@@ -51,7 +51,7 @@ const AdminPage = ({ children, className, showHeader = true, showFooter = true,
51
51
  ] })) : undefined;
52
52
  // When title or breadcrumbs are provided, use admin-ui Page for the full page layout.
53
53
  if (showHeader && (composedTitle || breadcrumbs)) {
54
- return (_jsx("div", { className: rootClassName, children: _jsxs(Page, { ariaLabel: title, breadcrumbs: breadcrumbs, title: composedTitle, subTitle: subTitle, actions: actions, showSidebarToggle: false, children: [tabs, _jsx(Container, { fluid: true, horizontalSpacing: 0, children: _jsx(Col, { children: children }) }), showFooter && _jsx(JetpackFooter, { menu: optionalMenuItems })] }) }));
54
+ return (_jsx("div", { className: rootClassName, children: _jsxs(Page, { ariaLabel: title, breadcrumbs: breadcrumbs, title: composedTitle, subTitle: subTitle, actions: actions, showSidebarToggle: false, children: [tabs, unwrapped ? (children) : (_jsx(Container, { fluid: true, horizontalSpacing: 0, children: _jsx(Col, { children: children }) })), showFooter && _jsx(JetpackFooter, { menu: optionalMenuItems })] }) }));
55
55
  }
56
56
  // Legacy path: no title provided, render the classic header.
57
57
  return (_jsxs("div", { className: rootClassName, children: [showHeader && (_jsx(Container, { horizontalSpacing: 5, children: _jsxs(Col, { className: clsx(styles['admin-page-header'], 'jp-admin-page-header'), children: [header ? header : _jsx(JetpackLogo, {}), sandboxedDomain && (_jsx("code", { className: styles['sandbox-domain-badge'], onClick: testConnection, onKeyDown: testConnection,
@@ -76,4 +76,12 @@ export type AdminPageProps = {
76
76
  * Hidden when `tabs` is used.
77
77
  */
78
78
  showBottomBorder?: boolean;
79
+ /**
80
+ * Render `children` directly inside the admin-ui Page, skipping the
81
+ * default `<Container fluid horizontalSpacing={0}><Col>{children}</Col></Container>`
82
+ * wrap. Use for full-bleed pages (DataViews-based admin surfaces, full-app
83
+ * dashboards) that own their own scroll/layout model and don't want the
84
+ * outer Container's grid to break their flex chain. Defaults to `false`.
85
+ */
86
+ unwrapped?: boolean;
79
87
  };
@@ -11,8 +11,4 @@
11
11
  line-height: 20px;
12
12
  font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
13
13
 
14
- &.is-new {
15
- background-color: var(--jp-green-5);
16
- color: var(--jp-green-50);
17
- }
18
14
  }
@@ -12,6 +12,8 @@ export interface ToggleControlProps {
12
12
  toggling?: boolean;
13
13
  /** The label for the toggle. */
14
14
  label?: ReactNode;
15
+ /** Accessible name for the underlying checkbox. Use when no visible `label` is rendered. */
16
+ 'aria-label'?: string;
15
17
  /** The size of the toggle. */
16
18
  size?: 'small' | 'normal';
17
19
  /** A callback function invoked when the toggle is clicked. */
@@ -3,7 +3,7 @@ import { ToggleControl as WPToggleControl } from '@wordpress/components';
3
3
  import clsx from 'clsx';
4
4
  import { useCallback } from 'react';
5
5
  import styles from './styles.module.scss';
6
- const ToggleControl = ({ checked, className, disabled, help, toggling, label, size = 'normal', onChange, }) => {
6
+ const ToggleControl = ({ checked, className, disabled, help, toggling, label, 'aria-label': ariaLabel, size = 'normal', onChange, }) => {
7
7
  const showChecked = toggling !== undefined ? (checked && !toggling) || (!checked && toggling) : checked;
8
8
  const handleOnChange = useCallback((value) => {
9
9
  // Don't toggle if the toggle is already toggling.
@@ -16,6 +16,6 @@ const ToggleControl = ({ checked, className, disabled, help, toggling, label, si
16
16
  [styles['is-toggling']]: toggling,
17
17
  [styles['is-small']]: size === 'small',
18
18
  [styles['no-label']]: !label,
19
- }), disabled: disabled, help: help, label: label, onChange: handleOnChange }));
19
+ }), disabled: disabled, help: help, label: label, "aria-label": ariaLabel, onChange: handleOnChange }));
20
20
  };
21
21
  export default ToggleControl;
package/build/index.d.ts CHANGED
@@ -10,6 +10,7 @@ export { default as AutomatticBylineLogo } from './components/automattic-byline-
10
10
  export { default as AutomatticIconLogo } from './components/automattic-icon-logo/index.tsx';
11
11
  export { default as AutomatticForAgenciesLogo } from './components/automattic-for-agencies-logo/index.tsx';
12
12
  export { default as JetpackFooter } from './components/jetpack-footer/index.tsx';
13
+ /** @deprecated Use `Spinner` from `@wordpress/components` instead. */
13
14
  export { default as Spinner } from './components/spinner/index.tsx';
14
15
  export { default as Gridicon } from './components/gridicon/index.tsx';
15
16
  export { default as IconTooltip } from './components/icon-tooltip/index.tsx';
package/build/index.js CHANGED
@@ -24,6 +24,7 @@ export { default as AutomatticBylineLogo } from './components/automattic-byline-
24
24
  export { default as AutomatticIconLogo } from './components/automattic-icon-logo/index.js';
25
25
  export { default as AutomatticForAgenciesLogo } from './components/automattic-for-agencies-logo/index.js';
26
26
  export { default as JetpackFooter } from './components/jetpack-footer/index.js';
27
+ /** @deprecated Use `Spinner` from `@wordpress/components` instead. */
27
28
  export { default as Spinner } from './components/spinner/index.js';
28
29
  export { default as Gridicon } from './components/gridicon/index.js';
29
30
  export { default as IconTooltip } from './components/icon-tooltip/index.js';
@@ -41,6 +41,7 @@ const AdminPage: FC< AdminPageProps > = ( {
41
41
  breadcrumbs,
42
42
  tabs,
43
43
  showBottomBorder = true,
44
+ unwrapped = false,
44
45
  } ) => {
45
46
  useEffect( () => {
46
47
  restApi.setApiRoot( apiRoot );
@@ -95,9 +96,13 @@ const AdminPage: FC< AdminPageProps > = ( {
95
96
  showSidebarToggle={ false }
96
97
  >
97
98
  { tabs }
98
- <Container fluid horizontalSpacing={ 0 }>
99
- <Col>{ children }</Col>
100
- </Container>
99
+ { unwrapped ? (
100
+ children
101
+ ) : (
102
+ <Container fluid horizontalSpacing={ 0 }>
103
+ <Col>{ children }</Col>
104
+ </Container>
105
+ ) }
101
106
  { showFooter && <JetpackFooter menu={ optionalMenuItems } /> }
102
107
  </Page>
103
108
  </div>
@@ -94,4 +94,13 @@ export type AdminPageProps = {
94
94
  * Hidden when `tabs` is used.
95
95
  */
96
96
  showBottomBorder?: boolean;
97
+
98
+ /**
99
+ * Render `children` directly inside the admin-ui Page, skipping the
100
+ * default `<Container fluid horizontalSpacing={0}><Col>{children}</Col></Container>`
101
+ * wrap. Use for full-bleed pages (DataViews-based admin surfaces, full-app
102
+ * dashboards) that own their own scroll/layout model and don't want the
103
+ * outer Container's grid to break their flex chain. Defaults to `false`.
104
+ */
105
+ unwrapped?: boolean;
97
106
  };
@@ -11,8 +11,4 @@
11
11
  line-height: 20px;
12
12
  font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
13
13
 
14
- &.is-new {
15
- background-color: var(--jp-green-5);
16
- color: var(--jp-green-50);
17
- }
18
14
  }
@@ -23,6 +23,9 @@ export interface ToggleControlProps {
23
23
  /** The label for the toggle. */
24
24
  label?: ReactNode;
25
25
 
26
+ /** Accessible name for the underlying checkbox. Use when no visible `label` is rendered. */
27
+ 'aria-label'?: string;
28
+
26
29
  /** The size of the toggle. */
27
30
  size?: 'small' | 'normal';
28
31
 
@@ -37,6 +40,7 @@ const ToggleControl: FC< ToggleControlProps > = ( {
37
40
  help,
38
41
  toggling,
39
42
  label,
43
+ 'aria-label': ariaLabel,
40
44
  size = 'normal',
41
45
  onChange,
42
46
  } ) => {
@@ -67,6 +71,7 @@ const ToggleControl: FC< ToggleControlProps > = ( {
67
71
  disabled={ disabled }
68
72
  help={ help }
69
73
  label={ label }
74
+ aria-label={ ariaLabel }
70
75
  onChange={ handleOnChange }
71
76
  />
72
77
  );
package/index.ts CHANGED
@@ -25,6 +25,7 @@ export { default as AutomatticBylineLogo } from './components/automattic-byline-
25
25
  export { default as AutomatticIconLogo } from './components/automattic-icon-logo/index.tsx';
26
26
  export { default as AutomatticForAgenciesLogo } from './components/automattic-for-agencies-logo/index.tsx';
27
27
  export { default as JetpackFooter } from './components/jetpack-footer/index.tsx';
28
+ /** @deprecated Use `Spinner` from `@wordpress/components` instead. */
28
29
  export { default as Spinner } from './components/spinner/index.tsx';
29
30
  export { default as Gridicon } from './components/gridicon/index.tsx';
30
31
  export { default as IconTooltip } from './components/icon-tooltip/index.tsx';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automattic/jetpack-components",
3
- "version": "1.9.0",
3
+ "version": "1.10.0",
4
4
  "description": "Jetpack Components Package",
5
5
  "homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/components/#readme",
6
6
  "bugs": {
@@ -45,10 +45,10 @@
45
45
  ],
46
46
  "dependencies": {
47
47
  "@automattic/format-currency": "1.0.1",
48
- "@automattic/jetpack-api": "^1.0.23",
49
- "@automattic/jetpack-boost-score-api": "^1.0.38",
50
- "@automattic/jetpack-script-data": "^0.6.2",
51
- "@automattic/number-formatters": "^1.1.6",
48
+ "@automattic/jetpack-api": "^1.0.24",
49
+ "@automattic/jetpack-boost-score-api": "^1.0.39",
50
+ "@automattic/jetpack-script-data": "^0.6.3",
51
+ "@automattic/number-formatters": "^1.1.7",
52
52
  "@babel/runtime": "^7",
53
53
  "@wordpress/admin-ui": "1.12.0",
54
54
  "@wordpress/browserslist-config": "6.44.0",
@@ -66,12 +66,12 @@
66
66
  "prop-types": "^15.7.2",
67
67
  "qrcode.react": "4.2.0",
68
68
  "react-slider": "2.0.5",
69
- "social-logos": "^3.3.13",
69
+ "social-logos": "^3.3.14",
70
70
  "uplot": "1.6.31",
71
71
  "uplot-react": "1.1.4"
72
72
  },
73
73
  "devDependencies": {
74
- "@automattic/jetpack-base-styles": "^1.1.0",
74
+ "@automattic/jetpack-base-styles": "^1.2.0",
75
75
  "@babel/core": "7.29.0",
76
76
  "@babel/preset-react": "7.28.5",
77
77
  "@jest/globals": "30.3.0",