@primer/react 38.28.0 → 38.28.1-rc.c8f1543f5

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,5 +1,11 @@
1
1
  # @primer/react
2
2
 
3
+ ## 38.28.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#7978](https://github.com/primer/react/pull/7978) [`e3f655c`](https://github.com/primer/react/commit/e3f655c6735ffd1bd105b8e7599e273bb1eee4d1) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - PageHeader.ParentLink: Forward unknown props (e.g. `to`) to the underlying element, enabling client-side routing with polymorphic `as`.
8
+
3
9
  ## 38.28.0
4
10
 
5
11
  ### Minor Changes
@@ -28,7 +34,6 @@
28
34
 
29
35
  ```tsx
30
36
  import {FeatureFlags} from '@primer/react/experimental'
31
-
32
37
  ;<FeatureFlags flags={{primer_react_timeline_list_semantics: true}}>
33
38
  <Timeline>…</Timeline>
34
39
  </FeatureFlags>
@@ -1 +1 @@
1
- {"version":3,"file":"PageHeader.d.ts","sourceRoot":"","sources":["../../src/PageHeader/PageHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,6BAA6B,CAAA;AAIhE,OAAO,KAAK,EAAC,SAAS,IAAI,aAAa,EAAC,MAAM,SAAS,CAAA;AAIvD,OAAO,KAAK,EAAC,mBAAmB,IAAI,8BAA8B,EAAC,MAAM,sBAAsB,CAAA;AAI/F,OAAO,KAAK,EAAC,QAAQ,EAAE,gBAAgB,EAAC,MAAM,gBAAgB,CAAA;AAO9D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,OAAO,GAAG,eAAe,CAAC,OAAO,CAAC,CAAA;CAC5C,CAAA;AAkBD,MAAM,MAAM,eAAe,GAAG;IAC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C,EAAE,KAAK,CAAC,cAAc,CAAC,YAAY,CAAC,CAAA;CAClD,CAAA;AACD,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,GAAG,SAAS,CAAC,CAAA;AAiEpF,MAAM,MAAM,cAAc,GAAG;IAC3B,OAAO,CAAC,EAAE,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,eAAe,CAAC,UAAU,GAAG,QAAQ,GAAG,OAAO,CAAC,CAAA;CAC7F,GAAG,iBAAiB,CAAA;AAsErB,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;CAC7C,GAAG,iBAAiB,CAAA;AAiDrB,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAA;AAuBrE,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,CAAC,EAAE,KAAK,GAAG,KAAK,CAAA;IAClB,YAAY,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,YAAY,CAAC,CAAA;IACjD,iBAAiB,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAA;CAC5D,GAAG,iBAAiB,CAAA;AAsFrB,eAAO,MAAM,UAAU;;;;;;;;;;;;+CA/GiC,YAAY;;;CA8HlE,CAAA"}
@@ -162,52 +162,78 @@ const ContextArea = t0 => {
162
162
  ContextArea.__SLOT__ = Symbol('PageHeader.ContextArea');
163
163
  // PageHeader.ParentLink : Only visible on narrow viewports by default to let users navigate up in the hierarchy.
164
164
  const ParentLink = /*#__PURE__*/React.forwardRef((t0, ref) => {
165
- const $ = c(15);
166
- const {
167
- children,
168
- className,
169
- href,
170
- "aria-label": ariaLabel,
171
- as: t1,
172
- hidden: t2
173
- } = t0;
165
+ const $ = c(24);
166
+ let ariaLabel;
167
+ let children;
168
+ let className;
169
+ let href;
170
+ let rest;
171
+ let t1;
172
+ let t2;
173
+ if ($[0] !== t0) {
174
+ ({
175
+ children,
176
+ className,
177
+ href,
178
+ "aria-label": ariaLabel,
179
+ as: t1,
180
+ hidden: t2,
181
+ ...rest
182
+ } = t0);
183
+ $[0] = t0;
184
+ $[1] = ariaLabel;
185
+ $[2] = children;
186
+ $[3] = className;
187
+ $[4] = href;
188
+ $[5] = rest;
189
+ $[6] = t1;
190
+ $[7] = t2;
191
+ } else {
192
+ ariaLabel = $[1];
193
+ children = $[2];
194
+ className = $[3];
195
+ href = $[4];
196
+ rest = $[5];
197
+ t1 = $[6];
198
+ t2 = $[7];
199
+ }
174
200
  const as = t1 === undefined ? "a" : t1;
175
201
  const hidden = t2 === undefined ? hiddenOnRegularAndWide : t2;
176
202
  let t3;
177
- if ($[0] !== className) {
203
+ if ($[8] !== className) {
178
204
  t3 = clsx(classes.ParentLink, className);
179
- $[0] = className;
180
- $[1] = t3;
205
+ $[8] = className;
206
+ $[9] = t3;
181
207
  } else {
182
- t3 = $[1];
208
+ t3 = $[9];
183
209
  }
184
210
  let t4;
185
- if ($[2] !== hidden) {
211
+ if ($[10] !== hidden) {
186
212
  t4 = getHiddenDataAttributes(hidden);
187
- $[2] = hidden;
188
- $[3] = t4;
213
+ $[10] = hidden;
214
+ $[11] = t4;
189
215
  } else {
190
- t4 = $[3];
216
+ t4 = $[11];
191
217
  }
192
218
  let t5;
193
- if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
219
+ if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
194
220
  t5 = /*#__PURE__*/jsx(ArrowLeftIcon, {});
195
- $[4] = t5;
221
+ $[12] = t5;
196
222
  } else {
197
- t5 = $[4];
223
+ t5 = $[12];
198
224
  }
199
225
  let t6;
200
- if ($[5] !== children) {
226
+ if ($[13] !== children) {
201
227
  t6 = /*#__PURE__*/jsx("div", {
202
228
  children: children
203
229
  });
204
- $[5] = children;
205
- $[6] = t6;
230
+ $[13] = children;
231
+ $[14] = t6;
206
232
  } else {
207
- t6 = $[6];
233
+ t6 = $[14];
208
234
  }
209
235
  let t7;
210
- if ($[7] !== ariaLabel || $[8] !== as || $[9] !== href || $[10] !== ref || $[11] !== t3 || $[12] !== t4 || $[13] !== t6) {
236
+ if ($[15] !== ariaLabel || $[16] !== as || $[17] !== href || $[18] !== ref || $[19] !== rest || $[20] !== t3 || $[21] !== t4 || $[22] !== t6) {
211
237
  t7 = /*#__PURE__*/jsx(Fragment, {
212
238
  children: /*#__PURE__*/jsxs(Link, {
213
239
  ref: ref,
@@ -218,19 +244,21 @@ const ParentLink = /*#__PURE__*/React.forwardRef((t0, ref) => {
218
244
  "data-component": "PageHeader.ParentLink",
219
245
  ...t4,
220
246
  href: href,
247
+ ...rest,
221
248
  children: [t5, t6]
222
249
  })
223
250
  });
224
- $[7] = ariaLabel;
225
- $[8] = as;
226
- $[9] = href;
227
- $[10] = ref;
228
- $[11] = t3;
229
- $[12] = t4;
230
- $[13] = t6;
231
- $[14] = t7;
232
- } else {
233
- t7 = $[14];
251
+ $[15] = ariaLabel;
252
+ $[16] = as;
253
+ $[17] = href;
254
+ $[18] = ref;
255
+ $[19] = rest;
256
+ $[20] = t3;
257
+ $[21] = t4;
258
+ $[22] = t6;
259
+ $[23] = t7;
260
+ } else {
261
+ t7 = $[23];
234
262
  }
235
263
  return t7;
236
264
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@primer/react",
3
3
  "type": "module",
4
- "version": "38.28.0",
4
+ "version": "38.28.1-rc.c8f1543f5",
5
5
  "description": "An implementation of GitHub's Primer Design System using React",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",