@primer/react 0.0.0-20260611205125 → 0.0.0-20260611215521
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,6 +1,6 @@
|
|
|
1
1
|
# @primer/react
|
|
2
2
|
|
|
3
|
-
## 0.0.0-
|
|
3
|
+
## 0.0.0-20260611215521
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
|
|
19
19
|
- [#7918](https://github.com/primer/react/pull/7918) [`95986ce`](https://github.com/primer/react/commit/95986ce22eaca6f4cb2122a00d51ec93d72f2dfe) Thanks [@jonrohan](https://github.com/jonrohan)! - Autocomplete: Keep the typed text instead of restoring the full inline suggestion when the input loses focus, matching the behavior of pressing Escape
|
|
20
20
|
|
|
21
|
-
- [#7935](https://github.com/primer/react/pull/7935) [`2765933`](https://github.com/primer/react/commit/276593387ec84f72aeba02a940b5e0a4d0a026a9) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - ConfirmationDialog: `useConfirm`/`confirm` now removes its host element from `document.body` after the dialog is closed, and uses a fresh host element per call, so the empty container no longer lingers or leaks into other components and tests
|
|
22
|
-
|
|
23
21
|
- Fake entry to force publishing
|
|
24
22
|
|
|
23
|
+
- [#7978](https://github.com/primer/react/pull/7978) [`3ad321c`](https://github.com/primer/react/commit/3ad321cce9c704d3994c2883287c9ffc8dc2582b) 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`.
|
|
24
|
+
|
|
25
25
|
- [#7971](https://github.com/primer/react/pull/7971) [`2087e87`](https://github.com/primer/react/commit/2087e87c9fe869a59fc1dcb0546ee25a14767006) Thanks [@francinelucca](https://github.com/francinelucca)! - ThemeProvider: Skip rendering the SSR handoff script when the `primer_react_theme_provider_remove_ssr_handoff` feature flag is enabled
|
|
26
26
|
|
|
27
27
|
- [#7910](https://github.com/primer/react/pull/7910) [`0c38cfa`](https://github.com/primer/react/commit/0c38cfaeabab347e48d4e34c200739e32efa73a2) Thanks [@janmaarten-a11y](https://github.com/janmaarten-a11y)! - Timeline: Add `primer_react_timeline_list_semantics` feature flag to opt into list semantics
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmationDialog.d.ts","sourceRoot":"","sources":["../../src/ConfirmationDialog/ConfirmationDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,KAAK,EAAoB,WAAW,EAAE,YAAY,EAAC,MAAM,WAAW,CAAA;AAI3E;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,OAAO,EAAE,CAAC,OAAO,EAAE,SAAS,GAAG,cAAc,GAAG,QAAQ,GAAG,QAAQ,KAAK,IAAI,CAAA;IAE5E;;;OAGG;IACH,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IAEtB;;OAEG;IACH,mBAAmB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAErC;;OAEG;IACH,oBAAoB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAEtC;;OAEG;IACH,iBAAiB,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAA;IAEnD;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAE7B;;OAEG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAE9B;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;IAE1C;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,WAAW,CAAA;IAEnB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,YAAY,CAAA;CACtB;AAED;;;;;GAKG;AACH,eAAO,MAAM,kB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EAAE,SAAS,CAAC,GAAG;IAAC,OAAO,EAAE,KAAK,CAAC,SAAS,CAAA;CAAC,CAAA;AAyBlG;;;;GAIG;AACH,wBAAgB,UAAU,cACa,cAAc,sBAIpD"}
|
|
@@ -60,18 +60,18 @@ const ConfirmationDialog = props => {
|
|
|
60
60
|
});
|
|
61
61
|
};
|
|
62
62
|
ConfirmationDialog.displayName = "ConfirmationDialog";
|
|
63
|
+
let hostElement = null;
|
|
63
64
|
async function confirm(options) {
|
|
64
65
|
const {
|
|
65
66
|
content,
|
|
66
67
|
...confirmationDialogProps
|
|
67
68
|
} = options;
|
|
68
69
|
return new Promise(resolve => {
|
|
69
|
-
|
|
70
|
-
document.body.append(hostElement);
|
|
70
|
+
hostElement ||= document.createElement('div');
|
|
71
|
+
if (!hostElement.isConnected) document.body.append(hostElement);
|
|
71
72
|
const root = createRoot(hostElement);
|
|
72
73
|
const onClose = gesture => {
|
|
73
74
|
root.unmount();
|
|
74
|
-
hostElement.remove();
|
|
75
75
|
if (gesture === 'confirm') {
|
|
76
76
|
resolve(true);
|
|
77
77
|
} else {
|
|
@@ -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,C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K,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(
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
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 ($[
|
|
203
|
+
if ($[8] !== className) {
|
|
178
204
|
t3 = clsx(classes.ParentLink, className);
|
|
179
|
-
$[
|
|
180
|
-
$[
|
|
205
|
+
$[8] = className;
|
|
206
|
+
$[9] = t3;
|
|
181
207
|
} else {
|
|
182
|
-
t3 = $[
|
|
208
|
+
t3 = $[9];
|
|
183
209
|
}
|
|
184
210
|
let t4;
|
|
185
|
-
if ($[
|
|
211
|
+
if ($[10] !== hidden) {
|
|
186
212
|
t4 = getHiddenDataAttributes(hidden);
|
|
187
|
-
$[
|
|
188
|
-
$[
|
|
213
|
+
$[10] = hidden;
|
|
214
|
+
$[11] = t4;
|
|
189
215
|
} else {
|
|
190
|
-
t4 = $[
|
|
216
|
+
t4 = $[11];
|
|
191
217
|
}
|
|
192
218
|
let t5;
|
|
193
|
-
if ($[
|
|
219
|
+
if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
|
|
194
220
|
t5 = /*#__PURE__*/jsx(ArrowLeftIcon, {});
|
|
195
|
-
$[
|
|
221
|
+
$[12] = t5;
|
|
196
222
|
} else {
|
|
197
|
-
t5 = $[
|
|
223
|
+
t5 = $[12];
|
|
198
224
|
}
|
|
199
225
|
let t6;
|
|
200
|
-
if ($[
|
|
226
|
+
if ($[13] !== children) {
|
|
201
227
|
t6 = /*#__PURE__*/jsx("div", {
|
|
202
228
|
children: children
|
|
203
229
|
});
|
|
204
|
-
$[
|
|
205
|
-
$[
|
|
230
|
+
$[13] = children;
|
|
231
|
+
$[14] = t6;
|
|
206
232
|
} else {
|
|
207
|
-
t6 = $[
|
|
233
|
+
t6 = $[14];
|
|
208
234
|
}
|
|
209
235
|
let t7;
|
|
210
|
-
if ($[
|
|
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
|
-
$[
|
|
225
|
-
$[
|
|
226
|
-
$[
|
|
227
|
-
$[
|
|
228
|
-
$[
|
|
229
|
-
$[
|
|
230
|
-
$[
|
|
231
|
-
$[
|
|
232
|
-
|
|
233
|
-
|
|
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