@primer/react 38.37.1-rc.f8f4193e4 → 38.38.0-rc.8cc0fbde1

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.
Files changed (145) hide show
  1. package/CHANGELOG.md +9 -1
  2. package/dist/ActionBar/ActionBar.js +2 -2
  3. package/dist/ActionList/Description.js +2 -2
  4. package/dist/ActionList/Divider.js +1 -1
  5. package/dist/ActionList/Group.js +4 -4
  6. package/dist/ActionList/GroupHeadingTrailingAction.js +1 -1
  7. package/dist/ActionList/Heading.js +3 -3
  8. package/dist/ActionList/Item.js +3 -3
  9. package/dist/ActionList/List.js +2 -2
  10. package/dist/ActionList/Selection.js +1 -1
  11. package/dist/ActionList/TrailingAction.js +2 -2
  12. package/dist/ActionList/Visuals.js +2 -2
  13. package/dist/ActionMenu/ActionMenu.js +2 -2
  14. package/dist/AnchoredOverlay/AnchoredOverlay.js +3 -3
  15. package/dist/Autocomplete/Autocomplete.js +1 -1
  16. package/dist/Autocomplete/AutocompleteInput.js +7 -2
  17. package/dist/Autocomplete/AutocompleteMenu.js +81 -75
  18. package/dist/Autocomplete/AutocompleteOverlay.js +2 -2
  19. package/dist/Avatar/Avatar.js +2 -2
  20. package/dist/AvatarStack/AvatarStack.js +2 -2
  21. package/dist/Banner/Banner.js +2 -2
  22. package/dist/BaseStyles.js +1 -1
  23. package/dist/Blankslate/Blankslate.js +2 -2
  24. package/dist/BranchName/BranchName.js +1 -1
  25. package/dist/Breadcrumbs/Breadcrumbs.js +2 -2
  26. package/dist/Button/Button.js +1 -1
  27. package/dist/Button/ButtonBase.js +4 -4
  28. package/dist/Button/IconButton.js +2 -2
  29. package/dist/Button/LinkButton.js +1 -1
  30. package/dist/ButtonGroup/ButtonGroup.js +2 -2
  31. package/dist/Card/Card.js +2 -2
  32. package/dist/Checkbox/Checkbox.js +2 -2
  33. package/dist/CheckboxGroup/CheckboxGroup.js +1 -1
  34. package/dist/CircleBadge/CircleBadge.js +1 -1
  35. package/dist/ConfirmationDialog/ConfirmationDialog.js +1 -1
  36. package/dist/CounterLabel/CounterLabel.js +3 -3
  37. package/dist/DataTable/Pagination.js +4 -4
  38. package/dist/DataTable/Table.js +3 -3
  39. package/dist/Details/Details.js +2 -2
  40. package/dist/Dialog/Dialog.js +3 -3
  41. package/dist/FeatureFlags/FeatureFlags.js +1 -1
  42. package/dist/FilteredActionList/FilteredActionList.js +2 -2
  43. package/dist/FilteredActionList/FilteredActionListInput.js +1 -1
  44. package/dist/FilteredActionList/useAnnouncements.js +1 -1
  45. package/dist/Flash/Flash.js +2 -2
  46. package/dist/FormControl/FormControl.js +3 -3
  47. package/dist/FormControl/FormControlCaption.js +1 -1
  48. package/dist/Header/Header.js +2 -2
  49. package/dist/Heading/Heading.js +2 -2
  50. package/dist/Hidden/Hidden.js +1 -1
  51. package/dist/InlineMessage/InlineMessage.js +1 -1
  52. package/dist/KeybindingHint/KeybindingHint.js +2 -2
  53. package/dist/KeybindingHint/components/Chord.js +3 -3
  54. package/dist/KeybindingHint/components/Sequence.js +3 -3
  55. package/dist/Label/Label.js +2 -2
  56. package/dist/LabelGroup/LabelGroup.js +2 -2
  57. package/dist/Link/Link.js +2 -2
  58. package/dist/NavList/NavList.js +5 -5
  59. package/dist/Octicon/Octicon.js +1 -1
  60. package/dist/Overlay/Overlay.js +2 -2
  61. package/dist/PageHeader/PageHeader.js +3 -3
  62. package/dist/PageLayout/DragHandle.js +1 -1
  63. package/dist/PageLayout/PageLayout.js +2 -2
  64. package/dist/Pagehead/Pagehead.js +1 -1
  65. package/dist/Pagination/Pagination.js +3 -3
  66. package/dist/Popover/Popover.js +2 -2
  67. package/dist/ProgressBar/ProgressBar.js +2 -2
  68. package/dist/Radio/Radio.js +2 -2
  69. package/dist/ScrollableRegion/ScrollableRegion.js +2 -2
  70. package/dist/SegmentedControl/SegmentedControl.js +3 -3
  71. package/dist/SegmentedControl/SegmentedControlButton.js +1 -1
  72. package/dist/SegmentedControl/SegmentedControlIconButton.js +1 -1
  73. package/dist/Select/Select.js +2 -2
  74. package/dist/SelectPanel/SelectPanel.js +4 -4
  75. package/dist/SelectPanel/SelectPanelMessage.js +1 -1
  76. package/dist/SideNav.js +1 -1
  77. package/dist/Skeleton/SkeletonBox.js +2 -2
  78. package/dist/SkeletonAvatar/SkeletonAvatar.js +1 -1
  79. package/dist/SkeletonText/SkeletonText.js +1 -1
  80. package/dist/Spinner/Spinner.js +2 -2
  81. package/dist/Stack/Stack.js +2 -2
  82. package/dist/StateLabel/StateLabel.js +2 -2
  83. package/dist/SubNav/SubNav.js +2 -2
  84. package/dist/TabNav/TabNav.js +2 -2
  85. package/dist/Text/Text.js +1 -1
  86. package/dist/TextInput/TextInput.js +5 -5
  87. package/dist/TextInputWithTokens/TextInputWithTokens.js +2 -2
  88. package/dist/Textarea/Textarea.js +3 -3
  89. package/dist/ThemeProvider.js +1 -1
  90. package/dist/Timeline/Timeline.js +2 -2
  91. package/dist/ToggleSwitch/ToggleSwitch.js +3 -3
  92. package/dist/Token/IssueLabelToken.js +2 -2
  93. package/dist/Token/Token.js +2 -2
  94. package/dist/Token/TokenBase.js +2 -2
  95. package/dist/Token/_RemoveTokenButton.js +1 -1
  96. package/dist/Token/_TokenTextContainer.js +1 -1
  97. package/dist/Tooltip/Tooltip.js +2 -2
  98. package/dist/TooltipV2/Tooltip.js +4 -4
  99. package/dist/TopicTag/TopicTag.js +1 -1
  100. package/dist/TopicTag/TopicTagGroup.js +1 -1
  101. package/dist/TreeView/TreeView.js +9 -9
  102. package/dist/Truncate/Truncate.js +2 -2
  103. package/dist/UnderlineNav/UnderlineNav.js +2 -2
  104. package/dist/UnderlineNav/UnderlineNavItem.js +1 -1
  105. package/dist/VisuallyHidden/VisuallyHidden.js +1 -1
  106. package/dist/_VisuallyHidden.js +1 -1
  107. package/dist/deprecated/ActionList/Header.js +1 -1
  108. package/dist/deprecated/ActionList/Item.js +3 -3
  109. package/dist/deprecated/ActionList/List.js +2 -2
  110. package/dist/deprecated/ActionMenu.js +1 -1
  111. package/dist/deprecated/DialogV1/Dialog.js +3 -3
  112. package/dist/deprecated/FilteredSearch/FilteredSearch.js +1 -1
  113. package/dist/deprecated/UnderlineNav/UnderlineNav.js +2 -2
  114. package/dist/experimental/IssueLabel/IssueLabel.js +1 -1
  115. package/dist/experimental/SelectPanel2/SelectPanel.js +6 -6
  116. package/dist/experimental/Tabs/Tabs.js +1 -1
  117. package/dist/experimental/UnderlinePanels/UnderlinePanels.js +6 -6
  118. package/dist/experimental/index.d.ts +3 -3
  119. package/dist/experimental/index.js +1 -1
  120. package/dist/index.d.ts +3 -1
  121. package/dist/index.js +3 -1
  122. package/dist/internal/components/ButtonReset.js +1 -1
  123. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.js +3 -3
  124. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupCaption.js +2 -2
  125. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupLabel.js +2 -2
  126. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupValidation.js +1 -1
  127. package/dist/internal/components/InputLabel.js +1 -1
  128. package/dist/internal/components/InputValidation.js +1 -1
  129. package/dist/internal/components/OverflowObserverProvider.js +1 -1
  130. package/dist/internal/components/TextInputInnerAction.js +3 -3
  131. package/dist/internal/components/TextInputInnerVisualSlot.js +1 -1
  132. package/dist/internal/components/TextInputWrapper.js +2 -2
  133. package/dist/internal/components/UnderlineTabbedInterface-a5cd75c0.css +2 -0
  134. package/dist/internal/components/UnderlineTabbedInterface-a5cd75c0.css.map +1 -0
  135. package/dist/internal/components/UnderlineTabbedInterface.js +2 -2
  136. package/dist/internal/components/UnderlineTabbedInterface.module.css.js +1 -1
  137. package/dist/internal/components/UnstyledTextInput.js +2 -2
  138. package/dist/internal/components/ValidationAnimationContainer.js +1 -1
  139. package/dist/live-region/Announce.js +2 -2
  140. package/dist/live-region/AriaAlert.d.ts +1 -1
  141. package/dist/utils/descendant-registry.js +1 -1
  142. package/generated/components.json +73 -0
  143. package/package.json +2 -2
  144. package/dist/internal/components/UnderlineTabbedInterface-8a52007f.css +0 -2
  145. package/dist/internal/components/UnderlineTabbedInterface-8a52007f.css.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,11 +1,19 @@
1
1
  # @primer/react
2
2
 
3
- ## 38.37.1
3
+ ## 38.38.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#8300](https://github.com/primer/react/pull/8300) [`3a32d6f`](https://github.com/primer/react/commit/3a32d6ff015b11dd2ac9bf299f8f558bb1e46ef5) Thanks [@joshblack](https://github.com/joshblack)! - Promote AriaStatus and AriaAlert from experimental to stable
4
8
 
5
9
  ### Patch Changes
6
10
 
11
+ - [#8343](https://github.com/primer/react/pull/8343) [`7034e1f`](https://github.com/primer/react/commit/7034e1fbb754883b29a05fdf75eea8704359e7bb) Thanks [@llastflowers](https://github.com/llastflowers)! - Don't focus Autocomplete menu items while menu is closed: fix SR announcement bug and menu item skipping bug
12
+
7
13
  - [#8339](https://github.com/primer/react/pull/8339) [`1f5b99e`](https://github.com/primer/react/commit/1f5b99edc63e3989eb470d258c4d7b8703540f6b) Thanks [@ShiyunXu](https://github.com/ShiyunXu)! - Pin `box-sizing` with `!important` on the underline tabbed interface wrapper in wrap mode so external overrides can no longer offset its height budget and incorrectly trigger the overflow "more" menu
8
14
 
15
+ - [#8340](https://github.com/primer/react/pull/8340) [`a79d6c6`](https://github.com/primer/react/commit/a79d6c60ca23abce6f85502e1db78458f5fc3e90) Thanks [@ShiyunXu](https://github.com/ShiyunXu)! - UnderlineNav: Prevent external borders from incorrectly triggering the overflow menu
16
+
9
17
  ## 38.37.0
10
18
 
11
19
  ### Minor Changes
@@ -8,9 +8,9 @@ import { useIsClipped } from "../internal/hooks/useOverflowObserver.js";
8
8
  import { OverflowObserverProvider } from "../internal/components/OverflowObserverProvider.js";
9
9
  import { createDescendantRegistry } from "../utils/descendant-registry.js";
10
10
  import ActionBar_module_css_default from "./ActionBar.module.css.js";
11
- import { clsx } from "clsx";
12
- import { jsx, jsxs } from "react/jsx-runtime";
13
11
  import React, { forwardRef, useCallback, useContext, useMemo, useRef, useState } from "react";
12
+ import { jsx, jsxs } from "react/jsx-runtime";
13
+ import { clsx } from "clsx";
14
14
  import { KebabHorizontalIcon } from "@primer/octicons-react";
15
15
  //#region src/ActionBar/ActionBar.tsx
16
16
  const ActionBarContext = /*#__PURE__*/ React.createContext({ size: "medium" });
@@ -2,9 +2,9 @@ import { ItemContext } from "./shared.js";
2
2
  import ActionList_module_css_default from "./ActionList.module.css.js";
3
3
  import Truncate from "../Truncate/Truncate.js";
4
4
  import { c } from "react-compiler-runtime";
5
- import { clsx } from "clsx";
6
- import { jsx } from "react/jsx-runtime";
7
5
  import React from "react";
6
+ import { jsx } from "react/jsx-runtime";
7
+ import { clsx } from "clsx";
8
8
  //#region src/ActionList/Description.tsx
9
9
  const Description = (t0) => {
10
10
  const $ = c(26);
@@ -1,7 +1,7 @@
1
1
  import ActionList_module_css_default from "./ActionList.module.css.js";
2
2
  import { c } from "react-compiler-runtime";
3
- import { clsx } from "clsx";
4
3
  import { jsx } from "react/jsx-runtime";
4
+ import { clsx } from "clsx";
5
5
  //#region src/ActionList/Divider.tsx
6
6
  /**
7
7
  * Visually separates `Items` or `Groups` in an `ActionList`.
@@ -8,9 +8,9 @@ import Group_module_css_default from "./Group.module.css.js";
8
8
  import { GroupHeadingTrailingAction } from "./GroupHeadingTrailingAction.js";
9
9
  import { GroupContext } from "./GroupContext.js";
10
10
  import { c } from "react-compiler-runtime";
11
- import { clsx } from "clsx";
12
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
13
11
  import React from "react";
12
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
13
+ import { clsx } from "clsx";
14
14
  //#region src/ActionList/Group.tsx
15
15
  const GROUP_HEADING_TRAILING_ACTION_FEATURE_FLAG = "primer_react_action_list_group_heading_trailing_action";
16
16
  const Heading = (t0) => {
@@ -247,7 +247,7 @@ const GroupHeadingImpl = (t0) => {
247
247
  const [slots, childrenWithoutSlots] = useSlots(children, t3);
248
248
  const trailingAction = trailingActionEnabled ? slots.trailingAction : null;
249
249
  const headingChildren = trailingActionEnabled ? childrenWithoutSlots : children;
250
- if (trailingAction) !(listRole === void 0 || listRole === "list") && invariant(false, `ActionList.GroupHeading.TrailingAction can not be used inside an ActionList with an ARIA role of "${listRole}". Trailing actions on group headings are only supported in lists with the default "list" role.`);
250
+ if (trailingAction) listRole !== void 0 && listRole !== "list" && invariant(false, `ActionList.GroupHeading.TrailingAction can not be used inside an ActionList with an ARIA role of "${listRole}". Trailing actions on group headings are only supported in lists with the default "list" role.`);
251
251
  const missingAsForList = (listRole === void 0 || listRole === "list") && children !== void 0 && as === void 0;
252
252
  const unnecessaryAsForListboxOrMenu = listRole !== void 0 && listRole !== "list" && children !== void 0 && as !== void 0;
253
253
  missingAsForList && invariant(false, "You are setting a heading for a list, that requires a heading level. Please use 'as' prop to set a proper heading level.");
@@ -255,7 +255,7 @@ const GroupHeadingImpl = (t0) => {
255
255
  let t4;
256
256
  if ($[10] !== _internalBackwardCompatibleTitle || $[11] !== as || $[12] !== auxiliaryText || $[13] !== className || $[14] !== groupHeadingId || $[15] !== headingChildren || $[16] !== headingWrapElement || $[17] !== listRole || $[18] !== props || $[19] !== trailingAction || $[20] !== variant) {
257
257
  var _internalBackwardComp, _internalBackwardComp2;
258
- t4 = /*#__PURE__*/ jsx(Fragment, { children: listRole && listRole !== "list" ? /*#__PURE__*/ jsxs(HeadingWrap, {
258
+ t4 = /*#__PURE__*/ jsx(Fragment$1, { children: listRole && listRole !== "list" ? /*#__PURE__*/ jsxs(HeadingWrap, {
259
259
  role: "presentation",
260
260
  className: Group_module_css_default.GroupHeadingWrap,
261
261
  "aria-hidden": "true",
@@ -1,7 +1,7 @@
1
1
  import { IconButton } from "../Button/IconButton.js";
2
2
  import { c } from "react-compiler-runtime";
3
- import { jsx } from "react/jsx-runtime";
4
3
  import { forwardRef } from "react";
4
+ import { jsx } from "react/jsx-runtime";
5
5
  //#region src/ActionList/GroupHeadingTrailingAction.tsx
6
6
  /**
7
7
  * Props for `ActionList.GroupHeading.TrailingAction`.
@@ -6,9 +6,9 @@ import Heading$1 from "../Heading/Heading.js";
6
6
  import { ListContext } from "./shared.js";
7
7
  import Heading_module_css_default from "./Heading.module.css.js";
8
8
  import { c } from "react-compiler-runtime";
9
- import { clsx } from "clsx";
10
- import { jsx } from "react/jsx-runtime";
11
9
  import React, { forwardRef } from "react";
10
+ import { jsx } from "react/jsx-runtime";
11
+ import { clsx } from "clsx";
12
12
  //#region src/ActionList/Heading.tsx
13
13
  const Heading = /*#__PURE__*/ forwardRef((t0, forwardedRef) => {
14
14
  var _props$id;
@@ -41,7 +41,7 @@ const Heading = /*#__PURE__*/ forwardRef((t0, forwardedRef) => {
41
41
  const mergedRef = useMergedRefs(forwardedRef, innerRef);
42
42
  const { headingId, variant: listVariant } = React.useContext(ListContext);
43
43
  const { container } = React.useContext(ActionListContainerContext);
44
- !(container !== "ActionMenu") && invariant(false, "ActionList.Heading shouldn't be used within an ActionMenu container. Menus are labelled by the menu button's name.");
44
+ container === "ActionMenu" && invariant(false, "ActionList.Heading shouldn't be used within an ActionMenu container. Menus are labelled by the menu button's name.");
45
45
  const t2 = (_props$id = props.id) !== null && _props$id !== void 0 ? _props$id : headingId;
46
46
  let t3;
47
47
  if ($[7] !== className || $[8] !== visuallyHidden) {
@@ -15,9 +15,9 @@ import { LeadingVisual, TrailingVisual, VisualOrIndicator } from "./Visuals.js";
15
15
  import { Selection } from "./Selection.js";
16
16
  import { TrailingAction } from "./TrailingAction.js";
17
17
  import { c } from "react-compiler-runtime";
18
- import { clsx } from "clsx";
19
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
20
18
  import React from "react";
19
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
20
+ import { clsx } from "clsx";
21
21
  //#region src/ActionList/Item.tsx
22
22
  /**
23
23
  * Wraps button-semantic items with Tooltip, disabled when not truncated
@@ -49,7 +49,7 @@ const SubItem = (t0) => {
49
49
  const { children } = t0;
50
50
  let t1;
51
51
  if ($[0] !== children) {
52
- t1 = /*#__PURE__*/ jsx(Fragment, { children });
52
+ t1 = /*#__PURE__*/ jsx(Fragment$1, { children });
53
53
  $[0] = children;
54
54
  $[1] = t1;
55
55
  } else t1 = $[1];
@@ -11,9 +11,9 @@ import { ListContext } from "./shared.js";
11
11
  import { Heading } from "./Heading.js";
12
12
  import ActionList_module_css_default from "./ActionList.module.css.js";
13
13
  import { c } from "react-compiler-runtime";
14
- import { clsx } from "clsx";
15
- import { jsx, jsxs } from "react/jsx-runtime";
16
14
  import React, { useRef } from "react";
15
+ import { jsx, jsxs } from "react/jsx-runtime";
16
+ import { clsx } from "clsx";
17
17
  //#region src/ActionList/List.tsx
18
18
  const UnwrappedList = (props, forwardedRef) => {
19
19
  var _slots$heading$props$;
@@ -5,8 +5,8 @@ import ActionList_module_css_default from "./ActionList.module.css.js";
5
5
  import { GroupContext } from "./GroupContext.js";
6
6
  import { VisualContainer } from "./Visuals.js";
7
7
  import { c } from "react-compiler-runtime";
8
- import { jsx } from "react/jsx-runtime";
9
8
  import React from "react";
9
+ import { jsx } from "react/jsx-runtime";
10
10
  import { CheckIcon } from "@primer/octicons-react";
11
11
  //#region src/ActionList/Selection.tsx
12
12
  const Selection = (t0) => {
@@ -2,9 +2,9 @@ import { IconButton } from "../Button/IconButton.js";
2
2
  import { ButtonComponent } from "../Button/Button.js";
3
3
  import ActionList_module_css_default from "./ActionList.module.css.js";
4
4
  import { c } from "react-compiler-runtime";
5
- import { clsx } from "clsx";
6
- import { jsx } from "react/jsx-runtime";
7
5
  import { forwardRef } from "react";
6
+ import { jsx } from "react/jsx-runtime";
7
+ import { clsx } from "clsx";
8
8
  //#region src/ActionList/TrailingAction.tsx
9
9
  const TrailingAction = /*#__PURE__*/ forwardRef((t0, forwardedRef) => {
10
10
  const $ = c(25);
@@ -3,9 +3,9 @@ import { Tooltip } from "../TooltipV2/Tooltip.js";
3
3
  import { ItemContext } from "./shared.js";
4
4
  import ActionList_module_css_default from "./ActionList.module.css.js";
5
5
  import { c } from "react-compiler-runtime";
6
- import { clsx } from "clsx";
7
- import { jsx } from "react/jsx-runtime";
8
6
  import React from "react";
7
+ import { jsx } from "react/jsx-runtime";
8
+ import { clsx } from "clsx";
9
9
  import { AlertIcon } from "@primer/octicons-react";
10
10
  //#region src/ActionList/Visuals.tsx
11
11
  const VisualContainer = (t0) => {
@@ -11,9 +11,9 @@ import { ActionListContainerContext } from "../ActionList/ActionListContainerCon
11
11
  import { Divider } from "../ActionList/Divider.js";
12
12
  import { AnchoredOverlay } from "../AnchoredOverlay/AnchoredOverlay.js";
13
13
  import ActionMenu_module_css_default from "./ActionMenu.module.css.js";
14
- import { clsx } from "clsx";
15
- import { jsx } from "react/jsx-runtime";
16
14
  import React, { useCallback, useContext, useEffect, useMemo, useState } from "react";
15
+ import { jsx } from "react/jsx-runtime";
16
+ import { clsx } from "clsx";
17
17
  import { ChevronRightIcon, TriangleDownIcon } from "@primer/octicons-react";
18
18
  //#region src/ActionMenu/ActionMenu.tsx
19
19
  const MenuContext = /*#__PURE__*/ React.createContext({
@@ -11,9 +11,9 @@ import { useFocusZone } from "../hooks/useFocusZone.js";
11
11
  import Overlay from "../Overlay/Overlay.js";
12
12
  import AnchoredOverlay_module_css_default from "./AnchoredOverlay.module.css.js";
13
13
  import { widthMap } from "../Overlay/constants.js";
14
- import { clsx } from "clsx";
15
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
16
14
  import { useCallback, useEffect, useState } from "react";
15
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
16
+ import { clsx } from "clsx";
17
17
  import { XIcon } from "@primer/octicons-react";
18
18
  //#region src/AnchoredOverlay/AnchoredOverlay.tsx
19
19
  const defaultVariant = {
@@ -164,7 +164,7 @@ const AnchoredOverlay = ({ renderAnchor, anchorRef: externalAnchorRef, anchorId:
164
164
  const XButtonAriaLabelledBy = closeButtonProps["aria-labelledby"];
165
165
  const XButtonAriaLabel = closeButtonProps["aria-label"];
166
166
  const { className: overlayClassName, _PrivateDisablePortal, ...restOverlayProps } = overlayProps || {};
167
- return /*#__PURE__*/ jsxs(Fragment, { children: [renderAnchor && renderAnchor({
167
+ return /*#__PURE__*/ jsxs(Fragment$1, { children: [renderAnchor && renderAnchor({
168
168
  ref: anchorRef,
169
169
  id: anchorId,
170
170
  "aria-haspopup": "true",
@@ -4,8 +4,8 @@ import AutocompleteInput from "./AutocompleteInput.js";
4
4
  import AutocompleteMenu from "./AutocompleteMenu.js";
5
5
  import AutocompleteOverlay from "./AutocompleteOverlay.js";
6
6
  import { c } from "react-compiler-runtime";
7
- import { jsx } from "react/jsx-runtime";
8
7
  import { useDeferredValue, useReducer, useRef } from "react";
8
+ import { jsx } from "react/jsx-runtime";
9
9
  //#region src/Autocomplete/Autocomplete.tsx
10
10
  const initialState = {
11
11
  inputValue: "",
@@ -2,11 +2,11 @@ import { useMergedRefs } from "../hooks/useMergedRefs.js";
2
2
  import useSafeTimeout from "../hooks/useSafeTimeout.js";
3
3
  import { AutocompleteContext, AutocompleteInputContext } from "./AutocompleteContext.js";
4
4
  import TextInput_default from "../TextInput/TextInput.js";
5
- import { jsx } from "react/jsx-runtime";
6
5
  import React, { useCallback, useContext, useEffect, useState } from "react";
6
+ import { jsx } from "react/jsx-runtime";
7
7
  //#region src/Autocomplete/AutocompleteInput.tsx
8
8
  const ARROW_KEYS_NAV = /* @__PURE__ */ new Set(["ArrowUp", "ArrowDown"]);
9
- const AutocompleteInput = /*#__PURE__*/ React.forwardRef(({ as: Component = TextInput_default, onFocus, onBlur, onChange, onKeyDown, onKeyUp, onKeyPress, value, openOnFocus = false, ...props }, forwardedRef) => {
9
+ const AutocompleteInput = /*#__PURE__*/ React.forwardRef(({ as: Component = TextInput_default, onFocus, onBlur, onChange, onKeyDown, onKeyDownCapture, onKeyUp, onKeyPress, value, openOnFocus = false, ...props }, forwardedRef) => {
10
10
  const autocompleteContext = useContext(AutocompleteContext);
11
11
  const inputContext = useContext(AutocompleteInputContext);
12
12
  if (autocompleteContext === null || inputContext === null) throw new Error("AutocompleteContext returned null values");
@@ -60,6 +60,10 @@ const AutocompleteInput = /*#__PURE__*/ React.forwardRef(({ as: Component = Text
60
60
  showMenu,
61
61
  setShowMenu
62
62
  ]);
63
+ const handleInputKeyDownCapture = (event) => {
64
+ onKeyDownCapture === null || onKeyDownCapture === void 0 || onKeyDownCapture(event);
65
+ if (!showMenu && ARROW_KEYS_NAV.has(event.key) && !event.altKey) event.preventDefault();
66
+ };
63
67
  const handleInputKeyUp = useCallback((event) => {
64
68
  onKeyUp === null || onKeyUp === void 0 || onKeyUp(event);
65
69
  if (event.key === "Backspace") setHighlightRemainingText(true);
@@ -98,6 +102,7 @@ const AutocompleteInput = /*#__PURE__*/ React.forwardRef(({ as: Component = Text
98
102
  onBlur: handleInputBlur,
99
103
  onChange: handleInputChange,
100
104
  onKeyDown: handleInputKeyDown,
105
+ onKeyDownCapture: handleInputKeyDownCapture,
101
106
  onKeyPress: onInputKeyPress,
102
107
  onKeyUp: handleInputKeyUp,
103
108
  ref: mergedRef,
@@ -6,10 +6,10 @@ import { ActionList } from "../ActionList/index.js";
6
6
  import { AutocompleteContext, AutocompleteDeferredInputContext } from "./AutocompleteContext.js";
7
7
  import AutocompleteMenu_module_css_default from "./AutocompleteMenu.module.css.js";
8
8
  import { c } from "react-compiler-runtime";
9
- import { jsx, jsxs } from "react/jsx-runtime";
9
+ import { announce } from "@primer/live-region-element";
10
10
  import React, { useContext, useEffect, useRef, useState } from "react";
11
+ import { jsx, jsxs } from "react/jsx-runtime";
11
12
  import { scrollIntoView } from "@primer/behaviors";
12
- import { announce } from "@primer/live-region-element";
13
13
  import { isElement } from "react-is";
14
14
  import { PlusIcon } from "@primer/octicons-react";
15
15
  import { debounce } from "@github/mini-throttle";
@@ -43,7 +43,7 @@ const debounceAnnouncement = debounce((announcement) => {
43
43
  announce(announcement);
44
44
  }, 250);
45
45
  function AutocompleteMenu(props) {
46
- const $ = c(78);
46
+ const $ = c(80);
47
47
  const autocompleteContext = useContext(AutocompleteContext);
48
48
  const deferredInputContext = useContext(AutocompleteDeferredInputContext);
49
49
  if (autocompleteContext === null || deferredInputContext === null) throw new Error("AutocompleteContext returned null values");
@@ -188,9 +188,10 @@ function AutocompleteMenu(props) {
188
188
  t11 = $[38];
189
189
  }
190
190
  React.useEffect(t10, t11);
191
- let t12;
191
+ const t12 = !showMenu;
192
+ let t13;
192
193
  if ($[39] !== activeDescendantRef || $[40] !== customScrollContainerRef || $[41] !== scrollContainerRef || $[42] !== setIsMenuDirectlyActivated) {
193
- t12 = (current, _previous, directlyActivated) => {
194
+ t13 = (current, _previous, directlyActivated) => {
194
195
  activeDescendantRef.current = current || null;
195
196
  if (current) {
196
197
  const selectedItem = allItemsToRenderRef.current.find((item_1) => {
@@ -207,102 +208,105 @@ function AutocompleteMenu(props) {
207
208
  $[40] = customScrollContainerRef;
208
209
  $[41] = scrollContainerRef;
209
210
  $[42] = setIsMenuDirectlyActivated;
210
- $[43] = t12;
211
- } else t12 = $[43];
212
- let t13;
213
- if ($[44] !== inputRef || $[45] !== t12) {
214
- t13 = {
211
+ $[43] = t13;
212
+ } else t13 = $[43];
213
+ let t14;
214
+ if ($[44] !== inputRef || $[45] !== t12 || $[46] !== t13) {
215
+ t14 = {
215
216
  containerRef: listContainerRef,
217
+ disabled: t12,
216
218
  focusOutBehavior: "wrap",
217
219
  focusableElementFilter: _temp4,
218
220
  activeDescendantFocus: inputRef,
219
- onActiveDescendantChanged: t12
221
+ onActiveDescendantChanged: t13
220
222
  };
221
223
  $[44] = inputRef;
222
224
  $[45] = t12;
223
225
  $[46] = t13;
224
- } else t13 = $[46];
225
- let t14;
226
- if ($[47] !== loading) {
227
- t14 = [loading];
228
- $[47] = loading;
229
- $[48] = t14;
230
- } else t14 = $[48];
231
- useFocusZone(t13, t14);
226
+ $[47] = t14;
227
+ } else t14 = $[47];
232
228
  let t15;
229
+ if ($[48] !== loading) {
230
+ t15 = [loading];
231
+ $[48] = loading;
232
+ $[49] = t15;
233
+ } else t15 = $[49];
234
+ useFocusZone(t14, t15);
233
235
  let t16;
234
- if ($[49] !== deferredInputValue || $[50] !== highlightedItem || $[51] !== selectedItemIds || $[52] !== setAutocompleteSuggestion) {
235
- t15 = () => {
236
+ let t17;
237
+ if ($[50] !== deferredInputValue || $[51] !== highlightedItem || $[52] !== selectedItemIds || $[53] !== setAutocompleteSuggestion) {
238
+ t16 = () => {
236
239
  var _highlightedItem$text;
237
240
  if (highlightedItem !== null && highlightedItem !== void 0 && (_highlightedItem$text = highlightedItem.text) !== null && _highlightedItem$text !== void 0 && _highlightedItem$text.startsWith(deferredInputValue) && !selectedItemIds.includes(highlightedItem.id)) setAutocompleteSuggestion(highlightedItem.text);
238
241
  else setAutocompleteSuggestion("");
239
242
  };
240
- t16 = [
243
+ t17 = [
241
244
  highlightedItem,
242
245
  deferredInputValue,
243
246
  selectedItemIds,
244
247
  setAutocompleteSuggestion
245
248
  ];
246
- $[49] = deferredInputValue;
247
- $[50] = highlightedItem;
248
- $[51] = selectedItemIds;
249
- $[52] = setAutocompleteSuggestion;
250
- $[53] = t15;
249
+ $[50] = deferredInputValue;
250
+ $[51] = highlightedItem;
251
+ $[52] = selectedItemIds;
252
+ $[53] = setAutocompleteSuggestion;
251
253
  $[54] = t16;
254
+ $[55] = t17;
252
255
  } else {
253
- t15 = $[53];
254
256
  t16 = $[54];
257
+ t17 = $[55];
255
258
  }
256
- useEffect(t15, t16);
257
- let t17;
259
+ useEffect(t16, t17);
258
260
  let t18;
259
- if ($[55] !== onOpenChange || $[56] !== selectedItemIds || $[57] !== showMenu || $[58] !== sortOnCloseFn || $[59] !== sortedItemIds) {
260
- t17 = () => {
261
+ let t19;
262
+ if ($[56] !== onOpenChange || $[57] !== selectedItemIds || $[58] !== showMenu || $[59] !== sortOnCloseFn || $[60] !== sortedItemIds) {
263
+ t18 = () => {
261
264
  const itemIdSortResult = [...sortedItemIds].sort(sortOnCloseFn ? sortOnCloseFn : getDefaultSortFn((itemId_0) => isItemSelected(itemId_0, selectedItemIds)));
262
265
  const sortResultMatchesState = itemIdSortResult.length === sortedItemIds.length && itemIdSortResult.every((element_0, index) => element_0 === sortedItemIds[index]);
263
266
  if (showMenu === false && !sortResultMatchesState) setSortedItemIds(itemIdSortResult);
264
267
  onOpenChange && onOpenChange(Boolean(showMenu));
265
268
  };
266
- t18 = [
269
+ t19 = [
267
270
  showMenu,
268
271
  onOpenChange,
269
272
  selectedItemIds,
270
273
  sortOnCloseFn,
271
274
  sortedItemIds
272
275
  ];
273
- $[55] = onOpenChange;
274
- $[56] = selectedItemIds;
275
- $[57] = showMenu;
276
- $[58] = sortOnCloseFn;
277
- $[59] = sortedItemIds;
278
- $[60] = t17;
276
+ $[56] = onOpenChange;
277
+ $[57] = selectedItemIds;
278
+ $[58] = showMenu;
279
+ $[59] = sortOnCloseFn;
280
+ $[60] = sortedItemIds;
279
281
  $[61] = t18;
282
+ $[62] = t19;
280
283
  } else {
281
- t17 = $[60];
282
284
  t18 = $[61];
285
+ t19 = $[62];
283
286
  }
284
- useEffect(t17, t18);
285
- let t19;
286
- if ($[62] !== selectedItemIds.length || $[63] !== setSelectedItemLength) {
287
- t19 = () => {
287
+ useEffect(t18, t19);
288
+ let t20;
289
+ if ($[63] !== selectedItemIds.length || $[64] !== setSelectedItemLength) {
290
+ t20 = () => {
288
291
  if (selectedItemIds.length) setSelectedItemLength(selectedItemIds.length);
289
292
  };
290
- $[62] = selectedItemIds.length;
291
- $[63] = setSelectedItemLength;
292
- $[64] = t19;
293
- } else t19 = $[64];
294
- let t20;
295
- if ($[65] !== selectedItemIds || $[66] !== setSelectedItemLength) {
296
- t20 = [selectedItemIds, setSelectedItemLength];
297
- $[65] = selectedItemIds;
298
- $[66] = setSelectedItemLength;
299
- $[67] = t20;
300
- } else t20 = $[67];
301
- useEffect(t19, t20);
302
- if (selectionVariant === "single" && selectedItemIds.length > 1) throw new Error("Autocomplete: selectionVariant \"single\" cannot be used with multiple selected items");
293
+ $[63] = selectedItemIds.length;
294
+ $[64] = setSelectedItemLength;
295
+ $[65] = t20;
296
+ } else t20 = $[65];
303
297
  let t21;
304
- if ($[68] !== allItemsToRender || $[69] !== ariaLabelledBy || $[70] !== emptyStateText || $[71] !== id || $[72] !== loading || $[73] !== selectionVariant) {
305
- t21 = loading ? /*#__PURE__*/ jsx("div", {
298
+ if ($[66] !== selectedItemIds || $[67] !== setSelectedItemLength) {
299
+ t21 = [selectedItemIds, setSelectedItemLength];
300
+ $[66] = selectedItemIds;
301
+ $[67] = setSelectedItemLength;
302
+ $[68] = t21;
303
+ } else t21 = $[68];
304
+ useEffect(t20, t21);
305
+ if (selectionVariant === "single" && selectedItemIds.length > 1) throw new Error("Autocomplete: selectionVariant \"single\" cannot be used with multiple selected items");
306
+ const t22 = !showMenu;
307
+ let t23;
308
+ if ($[69] !== allItemsToRender || $[70] !== ariaLabelledBy || $[71] !== emptyStateText || $[72] !== id || $[73] !== loading || $[74] !== selectionVariant) {
309
+ t23 = loading ? /*#__PURE__*/ jsx("div", {
306
310
  className: AutocompleteMenu_module_css_default.SpinnerWrapper,
307
311
  children: /*#__PURE__*/ jsx(Spinner, {})
308
312
  }) : /*#__PURE__*/ jsx("div", {
@@ -319,25 +323,27 @@ function AutocompleteMenu(props) {
319
323
  children: emptyStateText
320
324
  }) : null
321
325
  });
322
- $[68] = allItemsToRender;
323
- $[69] = ariaLabelledBy;
324
- $[70] = emptyStateText;
325
- $[71] = id;
326
- $[72] = loading;
327
- $[73] = selectionVariant;
328
- $[74] = t21;
329
- } else t21 = $[74];
330
- let t22;
331
- if ($[75] !== showMenu || $[76] !== t21) {
332
- t22 = /*#__PURE__*/ jsx(VisuallyHidden, {
326
+ $[69] = allItemsToRender;
327
+ $[70] = ariaLabelledBy;
328
+ $[71] = emptyStateText;
329
+ $[72] = id;
330
+ $[73] = loading;
331
+ $[74] = selectionVariant;
332
+ $[75] = t23;
333
+ } else t23 = $[75];
334
+ let t24;
335
+ if ($[76] !== showMenu || $[77] !== t22 || $[78] !== t23) {
336
+ t24 = /*#__PURE__*/ jsx(VisuallyHidden, {
333
337
  isVisible: showMenu,
334
- children: t21
338
+ hidden: t22,
339
+ children: t23
335
340
  });
336
- $[75] = showMenu;
337
- $[76] = t21;
341
+ $[76] = showMenu;
338
342
  $[77] = t22;
339
- } else t22 = $[77];
340
- return t22;
343
+ $[78] = t23;
344
+ $[79] = t24;
345
+ } else t24 = $[79];
346
+ return t24;
341
347
  }
342
348
  function _temp5(item_2) {
343
349
  const { id: id_0, onAction, children, text, leadingVisual: LeadingVisual, trailingVisual: TrailingVisual, key, role, ...itemProps } = item_2;
@@ -5,9 +5,9 @@ import Overlay from "../Overlay/Overlay.js";
5
5
  import { AutocompleteContext } from "./AutocompleteContext.js";
6
6
  import AutocompleteOverlay_module_css_default from "./AutocompleteOverlay.module.css.js";
7
7
  import { c } from "react-compiler-runtime";
8
- import { clsx } from "clsx";
9
- import { jsx } from "react/jsx-runtime";
10
8
  import { useContext, useEffect, useRef } from "react";
9
+ import { jsx } from "react/jsx-runtime";
10
+ import { clsx } from "clsx";
11
11
  //#region src/Autocomplete/AutocompleteOverlay.tsx
12
12
  function AutocompleteOverlay(t0) {
13
13
  const $ = c(29);
@@ -1,9 +1,9 @@
1
1
  import { isResponsiveValue } from "../hooks/useResponsiveValue.js";
2
2
  import Avatar_module_css_default from "./Avatar.module.css.js";
3
3
  import { c } from "react-compiler-runtime";
4
- import { clsx } from "clsx";
5
- import { jsx } from "react/jsx-runtime";
6
4
  import React from "react";
5
+ import { jsx } from "react/jsx-runtime";
6
+ import { clsx } from "clsx";
7
7
  const Avatar = /*#__PURE__*/ React.forwardRef(function Avatar(t0, ref) {
8
8
  const $ = c(29);
9
9
  let className;
@@ -2,9 +2,9 @@ import { isResponsiveValue } from "../hooks/useResponsiveValue.js";
2
2
  import AvatarStack_module_css_default from "./AvatarStack.module.css.js";
3
3
  import { hasInteractiveNodes } from "../internal/utils/hasInteractiveNodes.js";
4
4
  import { c } from "react-compiler-runtime";
5
- import { clsx } from "clsx";
6
- import { jsx, jsxs } from "react/jsx-runtime";
7
5
  import React, { useEffect, useRef, useState } from "react";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ import { clsx } from "clsx";
8
8
  //#region src/AvatarStack/AvatarStack.tsx
9
9
  const transformChildren = (children, shape) => {
10
10
  return React.Children.map(children, (child) => {
@@ -6,9 +6,9 @@ import { ButtonComponent } from "../Button/Button.js";
6
6
  import { useDevOnlyEffect } from "../internal/hooks/useDevOnlyEffect.js";
7
7
  import Banner_module_css_default from "./Banner.module.css.js";
8
8
  import { c } from "react-compiler-runtime";
9
- import { clsx } from "clsx";
10
- import { jsx, jsxs } from "react/jsx-runtime";
11
9
  import React, { forwardRef } from "react";
10
+ import { jsx, jsxs } from "react/jsx-runtime";
11
+ import { clsx } from "clsx";
12
12
  import { AlertIcon, CheckCircleIcon, InfoIcon, StopIcon, XIcon } from "@primer/octicons-react";
13
13
  //#region src/Banner/Banner.tsx
14
14
  const BannerContext = /*#__PURE__*/ React.createContext(void 0);
@@ -1,8 +1,8 @@
1
1
  import BaseStyles_module_css_default from "./BaseStyles.module.css.js";
2
2
  import { c } from "react-compiler-runtime";
3
+ import { jsx } from "react/jsx-runtime";
3
4
  import { clsx } from "clsx";
4
5
  import "focus-visible";
5
- import { jsx } from "react/jsx-runtime";
6
6
  //#region src/BaseStyles.tsx
7
7
  function BaseStyles(t0) {
8
8
  const $ = c(20);
@@ -3,9 +3,9 @@ import Link from "../Link/Link.js";
3
3
  import { Provider, useBlankslate } from "./BlankslateContext.js";
4
4
  import Blankslate_module_css_default from "./Blankslate.module.css.js";
5
5
  import { c } from "react-compiler-runtime";
6
- import { clsx } from "clsx";
7
- import { jsx } from "react/jsx-runtime";
8
6
  import "react";
7
+ import { jsx } from "react/jsx-runtime";
8
+ import { clsx } from "clsx";
9
9
  //#region src/Blankslate/Blankslate.tsx
10
10
  function Blankslate(t0) {
11
11
  const $ = c(25);
@@ -1,8 +1,8 @@
1
1
  import { fixedForwardRef } from "../utils/modern-polymorphic.js";
2
2
  import BranchName_module_css_default from "./BranchName.module.css.js";
3
3
  import { c } from "react-compiler-runtime";
4
- import { clsx } from "clsx";
5
4
  import { jsx } from "react/jsx-runtime";
5
+ import { clsx } from "clsx";
6
6
  //#region src/BranchName/BranchName.tsx
7
7
  function BranchName(props, ref) {
8
8
  const $ = c(13);
@@ -8,9 +8,9 @@ import { ActionList } from "../ActionList/index.js";
8
8
  import Breadcrumbs_module_css_default from "./Breadcrumbs.module.css.js";
9
9
  import Details from "../Details/Details.js";
10
10
  import { c } from "react-compiler-runtime";
11
- import { clsx } from "clsx";
12
- import { jsx, jsxs } from "react/jsx-runtime";
13
11
  import React, { useRef, useState } from "react";
12
+ import { jsx, jsxs } from "react/jsx-runtime";
13
+ import { clsx } from "clsx";
14
14
  import { KebabHorizontalIcon } from "@primer/octicons-react";
15
15
  //#region src/Breadcrumbs/Breadcrumbs.tsx
16
16
  const BreadcrumbsList = (t0) => {
@@ -1,7 +1,7 @@
1
1
  import { ButtonBase } from "./ButtonBase.js";
2
2
  import { c } from "react-compiler-runtime";
3
- import { jsx } from "react/jsx-runtime";
4
3
  import { forwardRef } from "react";
4
+ import { jsx } from "react/jsx-runtime";
5
5
  //#region src/Button/Button.tsx
6
6
  const ButtonComponent = /*#__PURE__*/ forwardRef((t0, forwardedRef) => {
7
7
  const $ = c(7);