@primer/react 38.46.0-rc.4db999d82 → 38.46.0-rc.648c4ab09

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
@@ -8,6 +8,8 @@
8
8
 
9
9
  ### Patch Changes
10
10
 
11
+ - [#8679](https://github.com/primer/react/pull/8679) [`dbf2ac1`](https://github.com/primer/react/commit/dbf2ac1d758a0aae69f37ad1bd789480ce58ff4c) Thanks [@llastflowers](https://github.com/llastflowers)! - Breadcrumbs: Close the overflow menu when Escape is pressed while its tooltip is open.
12
+
11
13
  - [#8628](https://github.com/primer/react/pull/8628) [`41f29c8`](https://github.com/primer/react/commit/41f29c845663936043618af29dcb71de4c9384b2) Thanks [@joshblack](https://github.com/joshblack)! - SkeletonAvatar, SkeletonText: Preserve the requested size and shape regardless of stylesheet load order
12
14
 
13
15
  - [#8562](https://github.com/primer/react/pull/8562) [`ee46232`](https://github.com/primer/react/commit/ee46232fafa24701415b21eed60cca68e589cf1c) Thanks [@joshblack](https://github.com/joshblack)! - useOnEscapePress, useOnOutsideClick: Improve performance when callbacks change between renders.
@@ -128,6 +128,7 @@ const BreadcrumbsMenuItem = /*#__PURE__*/ React.forwardRef((t0, menuRefCallback)
128
128
  role: "button",
129
129
  ref: menuButtonRef,
130
130
  "aria-label": t8,
131
+ "aria-haspopup": "true",
131
132
  "aria-expanded": t9,
132
133
  onClick: handleSummaryClick,
133
134
  variant: "invisible",
@@ -82,7 +82,7 @@ const isInteractive = (element) => {
82
82
  };
83
83
  const emptyKeybindingHints = [];
84
84
  const Tooltip = /*#__PURE__*/ React.forwardRef((t0, forwardedRef) => {
85
- const $ = c(58);
85
+ const $ = c(60);
86
86
  let children;
87
87
  let className;
88
88
  let id;
@@ -240,33 +240,37 @@ const Tooltip = /*#__PURE__*/ React.forwardRef((t0, forwardedRef) => {
240
240
  } else t10 = $[26];
241
241
  useEffect(t9, t10);
242
242
  let t11;
243
- if ($[27] !== closeTooltip || $[28] !== isPopoverOpen) {
243
+ if ($[27] !== _privateDisableTooltip || $[28] !== closeTooltip || $[29] !== isPopoverOpen) {
244
244
  t11 = (event) => {
245
245
  if (isPopoverOpen) {
246
- event.stopImmediatePropagation();
247
- event.preventDefault();
246
+ if (!_privateDisableTooltip) {
247
+ event.stopImmediatePropagation();
248
+ event.preventDefault();
249
+ }
248
250
  closeTooltip();
249
251
  }
250
252
  };
251
- $[27] = closeTooltip;
252
- $[28] = isPopoverOpen;
253
- $[29] = t11;
254
- } else t11 = $[29];
253
+ $[27] = _privateDisableTooltip;
254
+ $[28] = closeTooltip;
255
+ $[29] = isPopoverOpen;
256
+ $[30] = t11;
257
+ } else t11 = $[30];
255
258
  let t12;
256
- if ($[30] !== isPopoverOpen) {
257
- t12 = [isPopoverOpen];
258
- $[30] = isPopoverOpen;
259
- $[31] = t12;
260
- } else t12 = $[31];
259
+ if ($[31] !== _privateDisableTooltip || $[32] !== isPopoverOpen) {
260
+ t12 = [isPopoverOpen, _privateDisableTooltip];
261
+ $[31] = _privateDisableTooltip;
262
+ $[32] = isPopoverOpen;
263
+ $[33] = t12;
264
+ } else t12 = $[33];
261
265
  useOnEscapePress(t11, t12);
262
266
  const platform = usePlatform();
263
267
  const hasAriaLabel_0 = "aria-label" in rest;
264
268
  let t13;
265
- if ($[32] !== keybindingHint) {
269
+ if ($[34] !== keybindingHint) {
266
270
  t13 = Array.isArray(keybindingHint) ? keybindingHint : [keybindingHint];
267
- $[32] = keybindingHint;
268
- $[33] = t13;
269
- } else t13 = $[33];
271
+ $[34] = keybindingHint;
272
+ $[35] = t13;
273
+ } else t13 = $[35];
270
274
  const keybindingHints = t13;
271
275
  if (isFragmentTrigger) return child;
272
276
  const t14 = TooltipContext;
@@ -313,15 +317,15 @@ const Tooltip = /*#__PURE__*/ React.forwardRef((t0, forwardedRef) => {
313
317
  }
314
318
  });
315
319
  let t17;
316
- if ($[34] !== className) {
320
+ if ($[36] !== className) {
317
321
  t17 = clsx(className, Tooltip_module_css_default.Tooltip);
318
- $[34] = className;
319
- $[35] = t17;
320
- } else t17 = $[35];
322
+ $[36] = className;
323
+ $[37] = t17;
324
+ } else t17 = $[37];
321
325
  const t18 = type === "description" ? "tooltip" : void 0;
322
326
  const t19 = hasAriaLabel_0 || keybindingHints.length === 0 ? tooltipId : void 0;
323
327
  let t20;
324
- if ($[36] !== hasAriaLabel_0 || $[37] !== keybindingHints || $[38] !== platform || $[39] !== text || $[40] !== tooltipId) {
328
+ if ($[38] !== hasAriaLabel_0 || $[39] !== keybindingHints || $[40] !== platform || $[41] !== text || $[42] !== tooltipId) {
325
329
  t20 = keybindingHints.length > 0 ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("span", {
326
330
  id: hasAriaLabel_0 ? void 0 : tooltipId,
327
331
  children: [text, /* @__PURE__ */ jsxs(VisuallyHidden, { children: [
@@ -335,15 +339,15 @@ const Tooltip = /*#__PURE__*/ React.forwardRef((t0, forwardedRef) => {
335
339
  "data-component": "Tooltip.KeybindingHintContainer",
336
340
  children: keybindingHints.map(_temp4)
337
341
  })] }) : text;
338
- $[36] = hasAriaLabel_0;
339
- $[37] = keybindingHints;
340
- $[38] = platform;
341
- $[39] = text;
342
- $[40] = tooltipId;
343
- $[41] = t20;
344
- } else t20 = $[41];
342
+ $[38] = hasAriaLabel_0;
343
+ $[39] = keybindingHints;
344
+ $[40] = platform;
345
+ $[41] = text;
346
+ $[42] = tooltipId;
347
+ $[43] = t20;
348
+ } else t20 = $[43];
345
349
  let t21;
346
- if ($[42] !== calculatedDirection || $[43] !== closeTooltip || $[44] !== openTooltip || $[45] !== rest || $[46] !== t17 || $[47] !== t18 || $[48] !== t19 || $[49] !== t20) {
350
+ if ($[44] !== calculatedDirection || $[45] !== closeTooltip || $[46] !== openTooltip || $[47] !== rest || $[48] !== t17 || $[49] !== t18 || $[50] !== t19 || $[51] !== t20) {
347
351
  t21 = /* @__PURE__ */ jsx("span", {
348
352
  className: t17,
349
353
  ref: tooltipElRef,
@@ -357,34 +361,34 @@ const Tooltip = /*#__PURE__*/ React.forwardRef((t0, forwardedRef) => {
357
361
  id: t19,
358
362
  children: t20
359
363
  });
360
- $[42] = calculatedDirection;
361
- $[43] = closeTooltip;
362
- $[44] = openTooltip;
363
- $[45] = rest;
364
- $[46] = t17;
365
- $[47] = t18;
366
- $[48] = t19;
367
- $[49] = t20;
368
- $[50] = t21;
369
- } else t21 = $[50];
364
+ $[44] = calculatedDirection;
365
+ $[45] = closeTooltip;
366
+ $[46] = openTooltip;
367
+ $[47] = rest;
368
+ $[48] = t17;
369
+ $[49] = t18;
370
+ $[50] = t19;
371
+ $[51] = t20;
372
+ $[52] = t21;
373
+ } else t21 = $[52];
370
374
  let t22;
371
- if ($[51] !== t15 || $[52] !== t21) {
375
+ if ($[53] !== t15 || $[54] !== t21) {
372
376
  t22 = /* @__PURE__ */ jsxs(Fragment$1, { children: [t15, t21] });
373
- $[51] = t15;
374
- $[52] = t21;
375
- $[53] = t22;
376
- } else t22 = $[53];
377
+ $[53] = t15;
378
+ $[54] = t21;
379
+ $[55] = t22;
380
+ } else t22 = $[55];
377
381
  let t23;
378
- if ($[54] !== t14.Provider || $[55] !== t22 || $[56] !== value) {
382
+ if ($[56] !== t14.Provider || $[57] !== t22 || $[58] !== value) {
379
383
  t23 = /* @__PURE__ */ jsx(t14.Provider, {
380
384
  value,
381
385
  children: t22
382
386
  });
383
- $[54] = t14.Provider;
384
- $[55] = t22;
385
- $[56] = value;
386
- $[57] = t23;
387
- } else t23 = $[57];
387
+ $[56] = t14.Provider;
388
+ $[57] = t22;
389
+ $[58] = value;
390
+ $[59] = t23;
391
+ } else t23 = $[59];
388
392
  return t23;
389
393
  });
390
394
  Tooltip.__SLOT__ = Symbol("Tooltip");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@primer/react",
3
3
  "type": "module",
4
- "version": "38.46.0-rc.4db999d82",
4
+ "version": "38.46.0-rc.648c4ab09",
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",
@@ -109,12 +109,12 @@
109
109
  "@primer/doc-gen": "^0.0.1",
110
110
  "@primer/react-compiler-check": "^0.0.0",
111
111
  "@rolldown/plugin-babel": "^0.2.4",
112
- "@storybook/addon-a11y": "10.5.10",
113
- "@storybook/addon-docs": "10.5.10",
114
- "@storybook/addon-links": "10.5.10",
115
- "@storybook/addon-mcp": "^0.7.0",
116
- "@storybook/icons": "^2.1.0",
117
- "@storybook/react-vite": "10.5.10",
112
+ "@storybook/addon-a11y": "10.6.2",
113
+ "@storybook/addon-docs": "10.6.2",
114
+ "@storybook/addon-links": "10.6.2",
115
+ "@storybook/addon-mcp": "^10.6.2",
116
+ "@storybook/icons": "^2.2.0",
117
+ "@storybook/react-vite": "10.6.2",
118
118
  "@testing-library/dom": "^10.4.0",
119
119
  "@testing-library/jest-dom": "^6.4.5",
120
120
  "@testing-library/react": "^16.3.0",
@@ -169,7 +169,7 @@
169
169
  "rolldown-plugin-dts": "^0.26.0",
170
170
  "rolldown-plugin-import-css": "^0.0.0",
171
171
  "rolldown-plugin-preserve-directives": "^0.0.0",
172
- "storybook": "10.5.10",
172
+ "storybook": "10.6.6",
173
173
  "terser": "5.36.0",
174
174
  "ts-toolbelt": "9.6.0",
175
175
  "tsx": "4.20.3",