newspack-components 4.6.0 → 4.6.1-alpha.1

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
@@ -1,3 +1,16 @@
1
+ ## newspack-components [4.6.1-alpha.1](https://github.com/Automattic/newspack-workspace/compare/newspack-components@4.6.0...newspack-components@4.6.1-alpha.1) (2026-08-06)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **content-gate:** surface the Institutions entry point when institutions exist (NPPD-1492, [#708](https://github.com/Automattic/newspack-workspace/issues/708)) ([6ebb8c4](https://github.com/Automattic/newspack-workspace/commit/6ebb8c40f43b3f6d890900b683514eb9e6d65f2f))
7
+
8
+
9
+ ### Dependencies
10
+
11
+ * **newspack-icons:** upgraded to 1.1.1-alpha.1
12
+ * **newspack-scripts:** upgraded to 5.11.0-alpha.1
13
+
1
14
  # newspack-components [4.6.0](https://github.com/Automattic/newspack-workspace/compare/newspack-components@4.5.0...newspack-components@4.6.0) (2026-08-03)
2
15
 
3
16
 
@@ -120,6 +120,14 @@ var _jsxRuntime = require("react/jsx-runtime");
120
120
  level: badge.level || 'default'
121
121
  }, i);
122
122
  }) : null]
123
+ }), secondaryAction && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
124
+ className: "newspack-section-header__secondary-action",
125
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_.Button, {
126
+ variant: "link",
127
+ href: secondaryAction.href,
128
+ onClick: secondaryAction.action,
129
+ children: secondaryAction.label
130
+ })
123
131
  }), (menu === null || menu === void 0 ? void 0 : menu.length) > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.DropdownMenu, {
124
132
  className: "newspack-section-header__menu",
125
133
  icon: _icons.moreVertical,
@@ -136,14 +144,6 @@ var _jsxRuntime = require("react/jsx-runtime");
136
144
  }, index);
137
145
  });
138
146
  }
139
- }), secondaryAction && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
140
- className: "newspack-section-header__secondary-action",
141
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_.Button, {
142
- variant: "link",
143
- href: secondaryAction.href,
144
- onClick: secondaryAction.action,
145
- children: secondaryAction.label
146
- })
147
147
  })]
148
148
  });
149
149
  } else if (typeof title === 'function') {
@@ -112,6 +112,14 @@ var SectionHeader = function SectionHeader(_ref) {
112
112
  level: badge.level || 'default'
113
113
  }, i);
114
114
  }) : null]
115
+ }), secondaryAction && /*#__PURE__*/_jsx("div", {
116
+ className: "newspack-section-header__secondary-action",
117
+ children: /*#__PURE__*/_jsx(Button, {
118
+ variant: "link",
119
+ href: secondaryAction.href,
120
+ onClick: secondaryAction.action,
121
+ children: secondaryAction.label
122
+ })
115
123
  }), (menu === null || menu === void 0 ? void 0 : menu.length) > 0 && /*#__PURE__*/_jsx(DropdownMenu, {
116
124
  className: "newspack-section-header__menu",
117
125
  icon: moreVertical,
@@ -128,14 +136,6 @@ var SectionHeader = function SectionHeader(_ref) {
128
136
  }, index);
129
137
  });
130
138
  }
131
- }), secondaryAction && /*#__PURE__*/_jsx("div", {
132
- className: "newspack-section-header__secondary-action",
133
- children: /*#__PURE__*/_jsx(Button, {
134
- variant: "link",
135
- href: secondaryAction.href,
136
- onClick: secondaryAction.action,
137
- children: secondaryAction.label
138
- })
139
139
  })]
140
140
  });
141
141
  } else if (typeof title === 'function') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "newspack-components",
3
- "version": "4.6.0",
3
+ "version": "4.6.1-alpha.1",
4
4
  "description": "Newspack design system components",
5
5
  "author": "Automattic",
6
6
  "license": "GPL-2.0-or-later",
@@ -30,7 +30,7 @@
30
30
  "classnames": "^2.3.1",
31
31
  "lodash": "^4.17.21",
32
32
  "moment-range": "^3.1.1",
33
- "newspack-icons": "1.1.0",
33
+ "newspack-icons": "1.1.1-alpha.1",
34
34
  "qs": "^6.15.2",
35
35
  "react-router-dom": "^5.3.4",
36
36
  "@babel/runtime": "^7.29.7",
@@ -58,7 +58,7 @@
58
58
  "@babel/preset-env": "^7.29.7",
59
59
  "@babel/preset-react": "^7.29.7",
60
60
  "@babel/preset-typescript": "^7.29.7",
61
- "newspack-scripts": "5.10.0",
61
+ "newspack-scripts": "5.11.0-alpha.1",
62
62
  "recursive-copy": "^2.0.0"
63
63
  },
64
64
  "babel": {
@@ -102,6 +102,14 @@ const SectionHeader = ( {
102
102
  ? badges.map( ( badge, i ) => <Badge key={ i } text={ badge.label } level={ badge.level || 'default' } /> )
103
103
  : null }
104
104
  </HeadingTag>
105
+ { /* Secondary action before the overflow menu, so a promoted link reads as an action rather than sitting to the right of the kebab. */ }
106
+ { secondaryAction && (
107
+ <div className="newspack-section-header__secondary-action">
108
+ <Button variant="link" href={ secondaryAction.href } onClick={ secondaryAction.action }>
109
+ { secondaryAction.label }
110
+ </Button>
111
+ </div>
112
+ ) }
105
113
  { menu?.length > 0 && (
106
114
  <DropdownMenu className="newspack-section-header__menu" icon={ moreVertical } label={ __( 'More options', 'newspack-plugin' ) }>
107
115
  { () =>
@@ -120,13 +128,6 @@ const SectionHeader = ( {
120
128
  }
121
129
  </DropdownMenu>
122
130
  ) }
123
- { secondaryAction && (
124
- <div className="newspack-section-header__secondary-action">
125
- <Button variant="link" href={ secondaryAction.href } onClick={ secondaryAction.action }>
126
- { secondaryAction.label }
127
- </Button>
128
- </div>
129
- ) }
130
131
  </div>
131
132
  );
132
133
  } else if ( typeof title === 'function' ) {