@primer/react 0.0.0-20260831205533 → 0.0.0-20260911162708

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 (211) hide show
  1. package/CHANGELOG.md +27 -3
  2. package/dist/ActionBar/ActionBar.js +2 -2
  3. package/dist/ActionList/Description.js +3 -3
  4. package/dist/ActionList/Divider.js +2 -2
  5. package/dist/ActionList/Group.js +4 -4
  6. package/dist/ActionList/GroupHeadingTrailingAction.js +2 -2
  7. package/dist/ActionList/Heading.js +3 -3
  8. package/dist/ActionList/Item.js +4 -4
  9. package/dist/ActionList/List.js +3 -3
  10. package/dist/ActionList/Selection.js +2 -2
  11. package/dist/ActionList/TrailingAction.js +3 -3
  12. package/dist/ActionList/Visuals.js +3 -3
  13. package/dist/ActionMenu/ActionMenu.js +2 -2
  14. package/dist/AnchoredOverlay/AnchoredOverlay.js +3 -3
  15. package/dist/Autocomplete/Autocomplete.js +2 -2
  16. package/dist/Autocomplete/AutocompleteInput.js +1 -1
  17. package/dist/Autocomplete/AutocompleteMenu.js +3 -3
  18. package/dist/Autocomplete/AutocompleteOverlay.js +3 -3
  19. package/dist/Avatar/Avatar.js +3 -3
  20. package/dist/AvatarStack/AvatarStack.js +3 -3
  21. package/dist/Banner/Banner.js +3 -3
  22. package/dist/BaseStyles.js +2 -2
  23. package/dist/Blankslate/Blankslate.js +3 -3
  24. package/dist/BranchName/BranchName.js +2 -2
  25. package/dist/Breadcrumbs/Breadcrumbs.js +3 -3
  26. package/dist/Button/Button.js +2 -2
  27. package/dist/Button/ButtonBase.js +4 -4
  28. package/dist/Button/IconButton.js +3 -3
  29. package/dist/Button/LinkButton.js +2 -2
  30. package/dist/ButtonGroup/ButtonGroup.js +3 -3
  31. package/dist/Card/Card.js +3 -3
  32. package/dist/Checkbox/Checkbox.js +2 -2
  33. package/dist/CheckboxGroup/CheckboxGroup.js +2 -2
  34. package/dist/CircleBadge/CircleBadge.js +2 -2
  35. package/dist/ConfirmationDialog/ConfirmationDialog.js +2 -2
  36. package/dist/CounterLabel/CounterLabel.js +3 -3
  37. package/dist/DataTable/DataTable.js +1 -1
  38. package/dist/DataTable/ErrorDialog.js +1 -1
  39. package/dist/DataTable/Pagination.js +5 -5
  40. package/dist/DataTable/Table-50e68700.css +2 -0
  41. package/dist/DataTable/Table-50e68700.css.map +1 -0
  42. package/dist/DataTable/Table.d.ts +1 -0
  43. package/dist/DataTable/Table.js +74 -44
  44. package/dist/DataTable/Table.module.css.js +7 -2
  45. package/dist/DataTable/TableGroup.d.ts +41 -0
  46. package/dist/DataTable/TableGroup.js +155 -0
  47. package/dist/DataTable/TableGroupContext.js +5 -0
  48. package/dist/DataTable/index.d.ts +3 -1
  49. package/dist/DataTable/index.js +2 -0
  50. package/dist/DataTable/useTable.js +1 -1
  51. package/dist/Details/Details.js +3 -3
  52. package/dist/Dialog/Dialog.js +3 -3
  53. package/dist/FeatureFlags/DefaultFeatureFlags.js +1 -2
  54. package/dist/FeatureFlags/FeatureFlags.js +2 -2
  55. package/dist/FeatureFlags/useFeatureFlag.js +1 -1
  56. package/dist/FilteredActionList/FilteredActionList.js +2 -2
  57. package/dist/FilteredActionList/FilteredActionListInput.js +2 -2
  58. package/dist/FilteredActionList/FilteredActionListLoaders.js +1 -1
  59. package/dist/Flash/Flash.js +3 -3
  60. package/dist/FormControl/FormControl.js +4 -4
  61. package/dist/FormControl/FormControlCaption.js +2 -2
  62. package/dist/FormControl/FormControlLabel.js +1 -1
  63. package/dist/FormControl/FormControlLeadingVisual.js +1 -1
  64. package/dist/FormControl/_FormControlContext.js +1 -1
  65. package/dist/FormControl/_FormControlValidation.js +1 -1
  66. package/dist/Header/Header.js +3 -3
  67. package/dist/Heading/Heading.js +3 -3
  68. package/dist/Hidden/Hidden.js +2 -2
  69. package/dist/InlineMessage/InlineMessage.js +2 -2
  70. package/dist/KeybindingHint/KeybindingHint.js +3 -3
  71. package/dist/KeybindingHint/components/Chord.js +4 -4
  72. package/dist/KeybindingHint/components/Key.js +1 -1
  73. package/dist/KeybindingHint/components/Sequence.js +3 -3
  74. package/dist/Label/Label.js +3 -3
  75. package/dist/LabelGroup/LabelGroup.js +2 -2
  76. package/dist/Link/Link.js +3 -3
  77. package/dist/NavList/NavList.js +6 -6
  78. package/dist/Octicon/Octicon.js +2 -2
  79. package/dist/Overlay/Overlay.js +2 -2
  80. package/dist/PageHeader/PageHeader.js +4 -4
  81. package/dist/PageLayout/DragHandle.js +2 -2
  82. package/dist/PageLayout/PageLayout.js +3 -3
  83. package/dist/PageLayout/usePaneWidth.js +1 -1
  84. package/dist/Pagehead/Pagehead.js +2 -2
  85. package/dist/Pagination/Pagination.js +4 -4
  86. package/dist/Popover/Popover.js +3 -3
  87. package/dist/Portal/Portal.js +1 -1
  88. package/dist/ProgressBar/ProgressBar.js +3 -3
  89. package/dist/Radio/Radio.js +3 -3
  90. package/dist/RadioGroup/RadioGroup.js +1 -1
  91. package/dist/RelativeTime/RelativeTime.js +1 -1
  92. package/dist/ScrollableRegion/ScrollableRegion.js +3 -3
  93. package/dist/SegmentedControl/SegmentedControl-e68d4197.css +2 -0
  94. package/dist/SegmentedControl/SegmentedControl-e68d4197.css.map +1 -0
  95. package/dist/SegmentedControl/SegmentedControl.d.ts +5 -1
  96. package/dist/SegmentedControl/SegmentedControl.js +204 -167
  97. package/dist/SegmentedControl/SegmentedControl.module.css.js +8 -4
  98. package/dist/SegmentedControl/SegmentedControlAction.d.ts +12 -0
  99. package/dist/SegmentedControl/SegmentedControlAction.js +111 -0
  100. package/dist/SegmentedControl/SegmentedControlActionContext.js +5 -0
  101. package/dist/SegmentedControl/SegmentedControlButton.js +2 -2
  102. package/dist/SegmentedControl/SegmentedControlDivider.d.ts +9 -0
  103. package/dist/SegmentedControl/SegmentedControlDivider.js +24 -0
  104. package/dist/SegmentedControl/SegmentedControlIconButton.js +2 -2
  105. package/dist/SegmentedControl/index.d.ts +3 -1
  106. package/dist/Select/Select.js +3 -3
  107. package/dist/SelectPanel/SelectPanel.js +3 -3
  108. package/dist/SelectPanel/SelectPanelMessage.js +2 -2
  109. package/dist/SideNav.js +2 -2
  110. package/dist/Skeleton/SkeletonBox.js +3 -3
  111. package/dist/SkeletonAvatar/SkeletonAvatar.js +2 -2
  112. package/dist/SkeletonText/SkeletonText.js +2 -2
  113. package/dist/Spinner/Spinner.js +3 -3
  114. package/dist/SplitPageLayout/SplitPageLayout.js +1 -1
  115. package/dist/Stack/Stack.js +3 -3
  116. package/dist/StateLabel/StateLabel.js +3 -3
  117. package/dist/SubNav/SubNav.js +3 -3
  118. package/dist/TabNav/TabNav.js +3 -3
  119. package/dist/Text/Text.js +2 -2
  120. package/dist/TextInput/TextInput.js +5 -5
  121. package/dist/TextInputWithTokens/TextInputWithTokens.js +3 -3
  122. package/dist/Textarea/Textarea.js +4 -4
  123. package/dist/ThemeProvider.js +2 -2
  124. package/dist/Timeline/Timeline.js +3 -3
  125. package/dist/ToggleSwitch/ToggleSwitch.js +4 -4
  126. package/dist/Token/IssueLabelToken.js +3 -3
  127. package/dist/Token/Token.js +3 -3
  128. package/dist/Token/TokenBase.js +3 -3
  129. package/dist/Token/_RemoveTokenButton.js +1 -1
  130. package/dist/Token/_TokenTextContainer.js +2 -2
  131. package/dist/Tooltip/Tooltip.js +2 -2
  132. package/dist/TooltipV2/Tooltip.js +16 -9
  133. package/dist/TopicTag/TopicTag.js +2 -2
  134. package/dist/TopicTag/TopicTagGroup.js +2 -2
  135. package/dist/TreeView/TreeView.js +9 -9
  136. package/dist/TreeView/useRovingTabIndex.js +1 -1
  137. package/dist/TreeView/useTreeItemCache.js +1 -1
  138. package/dist/TreeView/useTypeahead.js +1 -1
  139. package/dist/Truncate/Truncate.js +2 -2
  140. package/dist/UnderlineNav/UnderlineNav.js +3 -3
  141. package/dist/UnderlineNav/UnderlineNavItem.js +2 -2
  142. package/dist/VisuallyHidden/VisuallyHidden.js +2 -2
  143. package/dist/_VisuallyHidden.js +2 -2
  144. package/dist/deprecated/ActionList/Divider.js +1 -1
  145. package/dist/deprecated/ActionList/Group.js +1 -1
  146. package/dist/deprecated/ActionList/Header.js +2 -2
  147. package/dist/deprecated/ActionList/Item.js +4 -4
  148. package/dist/deprecated/ActionList/List.js +3 -3
  149. package/dist/deprecated/ActionMenu.js +2 -2
  150. package/dist/deprecated/DialogV1/Dialog.js +4 -4
  151. package/dist/deprecated/FilteredSearch/FilteredSearch.js +2 -2
  152. package/dist/deprecated/UnderlineNav/UnderlineNav.js +3 -3
  153. package/dist/experimental/IssueLabel/IssueLabel.js +2 -2
  154. package/dist/experimental/SelectPanel2/SelectPanel.js +5 -5
  155. package/dist/experimental/Tabs/Tabs.js +23 -26
  156. package/dist/experimental/Tabs/useTab.js +1 -1
  157. package/dist/experimental/Tabs/useTabList.js +17 -21
  158. package/dist/experimental/Tabs/useTabPanel.js +1 -1
  159. package/dist/experimental/UnderlinePanels/UnderlinePanels.js +10 -15
  160. package/dist/experimental/index.d.ts +5 -4
  161. package/dist/experimental/index.js +1 -1
  162. package/dist/hooks/useDetails.js +1 -1
  163. package/dist/hooks/useDialog.js +1 -1
  164. package/dist/hooks/useMedia.js +1 -1
  165. package/dist/hooks/useMenuInitialFocus.js +1 -1
  166. package/dist/hooks/useMenuKeyboardNavigation.js +1 -1
  167. package/dist/hooks/useMergedRefs.js +1 -1
  168. package/dist/hooks/useMnemonics.js +1 -1
  169. package/dist/hooks/useOpenAndCloseFocus.js +1 -1
  170. package/dist/hooks/useOverflow.js +5 -5
  171. package/dist/hooks/useOverlay.js +1 -1
  172. package/dist/hooks/useProvidedStateOrCreate.js +1 -1
  173. package/dist/hooks/useRefObjectAsForwardedRef.js +1 -1
  174. package/dist/hooks/useRenderForcingRef.js +1 -1
  175. package/dist/hooks/useScrollFlash.js +1 -1
  176. package/dist/hooks/useSyncedState.js +1 -1
  177. package/dist/index.d.ts +5 -1
  178. package/dist/index.js +3 -1
  179. package/dist/internal/components/ButtonReset.js +2 -2
  180. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.js +4 -4
  181. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupCaption.js +3 -3
  182. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupLabel.js +3 -3
  183. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupValidation.js +2 -2
  184. package/dist/internal/components/ConditionalWrapper.js +1 -1
  185. package/dist/internal/components/InputLabel.js +2 -2
  186. package/dist/internal/components/InputValidation.js +2 -2
  187. package/dist/internal/components/OverflowObserverProvider.js +2 -2
  188. package/dist/internal/components/TextInputInnerAction.js +4 -4
  189. package/dist/internal/components/TextInputInnerVisualSlot.js +2 -2
  190. package/dist/internal/components/TextInputWrapper.js +3 -3
  191. package/dist/internal/components/ThemeProviderBase.js +1 -1
  192. package/dist/internal/components/UnderlineTabbedInterface.js +3 -3
  193. package/dist/internal/components/UnstyledTextInput.js +3 -3
  194. package/dist/internal/components/ValidationAnimationContainer.js +2 -2
  195. package/dist/internal/hooks/useEffectCallback.js +1 -1
  196. package/dist/internal/hooks/useEffectOnce.js +1 -1
  197. package/dist/internal/hooks/useOverflowObserver.js +1 -1
  198. package/dist/internal/hooks/useThemeProvider.js +1 -1
  199. package/dist/live-region/Announce.js +2 -2
  200. package/dist/live-region/AriaAlert.d.ts +1 -1
  201. package/dist/live-region/AriaAlert.js +1 -1
  202. package/dist/live-region/AriaStatus.js +1 -1
  203. package/dist/next/ThemeProvider.js +1 -1
  204. package/dist/utils/descendant-registry.js +2 -2
  205. package/dist/utils/react-compiler-runtime.js +32 -0
  206. package/generated/components.json +175 -8
  207. package/package.json +8 -8
  208. package/dist/DataTable/Table-7f5cb3e4.css +0 -2
  209. package/dist/DataTable/Table-7f5cb3e4.css.map +0 -1
  210. package/dist/SegmentedControl/SegmentedControl-4ef72733.css +0 -2
  211. package/dist/SegmentedControl/SegmentedControl-4ef72733.css.map +0 -1
@@ -1,8 +1,8 @@
1
+ import { AriaStatus } from "../live-region/AriaStatus.js";
1
2
  import { useId as useId$1 } from "../hooks/useId.js";
2
3
  import { isSlot } from "../utils/is-slot.js";
3
4
  import { useSlots } from "../hooks/useSlots.js";
4
5
  import Spinner from "../Spinner/Spinner.js";
5
- import { AriaStatus } from "../live-region/AriaStatus.js";
6
6
  import { fixedForwardRef } from "../utils/modern-polymorphic.js";
7
7
  import Text_default from "../Text/Text.js";
8
8
  import VisuallyHidden from "../_VisuallyHidden.js";
@@ -22,9 +22,9 @@ import { getFirstChildElement, useRovingTabIndex } from "./useRovingTabIndex.js"
22
22
  import { useTypeahead } from "./useTypeahead.js";
23
23
  import { SkeletonAvatar } from "../SkeletonAvatar/SkeletonAvatar.js";
24
24
  import { SkeletonText } from "../SkeletonText/SkeletonText.js";
25
- import { clsx } from "clsx";
26
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
27
25
  import React, { useCallback, useEffect } from "react";
26
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
27
+ import { clsx } from "clsx";
28
28
  import { ChevronDownIcon, ChevronRightIcon, FileDirectoryFillIcon, FileDirectoryOpenFillIcon } from "@primer/octicons-react";
29
29
  //#region src/TreeView/TreeView.tsx
30
30
  const RootContext = /*#__PURE__*/ React.createContext({
@@ -100,7 +100,7 @@ const Root = ({ "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, chil
100
100
  expandedStateCache,
101
101
  scrollElementIntoView
102
102
  },
103
- children: /*#__PURE__*/ jsxs(Fragment, { children: [/*#__PURE__*/ jsx(VisuallyHidden, { children: /*#__PURE__*/ jsx(AriaStatus, {
103
+ children: /*#__PURE__*/ jsxs(Fragment$1, { children: [/*#__PURE__*/ jsx(VisuallyHidden, { children: /*#__PURE__*/ jsx(AriaStatus, {
104
104
  announceOnShow: true,
105
105
  children: ariaLiveMessage
106
106
  }) }), /*#__PURE__*/ jsx("ul", {
@@ -269,7 +269,7 @@ const ItemImpl = fixedForwardRef(({ id: itemId, containIntrinsicSize, current: i
269
269
  slots.trailingVisual
270
270
  ]
271
271
  }),
272
- secondaryActions ? /*#__PURE__*/ jsxs(Fragment, { children: [/*#__PURE__*/ jsx(TrailingAction, {
272
+ secondaryActions ? /*#__PURE__*/ jsxs(Fragment$1, { children: [/*#__PURE__*/ jsx(TrailingAction, {
273
273
  items: secondaryActions,
274
274
  shortcutText: trailingActionShortcutText
275
275
  }), actionCommandPressed ? /*#__PURE__*/ jsx(ActionDialog, {
@@ -469,7 +469,7 @@ function useSubTree(children) {
469
469
  const LeadingVisual = (props) => {
470
470
  const { isExpanded, leadingVisualId } = React.useContext(ItemContext);
471
471
  const children = typeof props.children === "function" ? props.children({ isExpanded }) : props.children;
472
- return /*#__PURE__*/ jsxs(Fragment, { children: [/*#__PURE__*/ jsx("div", {
472
+ return /*#__PURE__*/ jsxs(Fragment$1, { children: [/*#__PURE__*/ jsx("div", {
473
473
  className: clsx("PRIVATE_VisuallyHidden", TreeView_module_css_default.TreeViewVisuallyHidden),
474
474
  "aria-hidden": true,
475
475
  id: leadingVisualId,
@@ -484,7 +484,7 @@ LeadingVisual.displayName = "TreeView.LeadingVisual";
484
484
  const TrailingVisual = (props) => {
485
485
  const { isExpanded, trailingVisualId } = React.useContext(ItemContext);
486
486
  const children = typeof props.children === "function" ? props.children({ isExpanded }) : props.children;
487
- return /*#__PURE__*/ jsxs(Fragment, { children: [/*#__PURE__*/ jsx("div", {
487
+ return /*#__PURE__*/ jsxs(Fragment$1, { children: [/*#__PURE__*/ jsx("div", {
488
488
  className: clsx("PRIVATE_VisuallyHidden", TreeView_module_css_default.TreeViewVisuallyHidden),
489
489
  "aria-hidden": true,
490
490
  id: trailingVisualId,
@@ -499,7 +499,7 @@ TrailingVisual.displayName = "TreeView.TrailingVisual";
499
499
  const LeadingAction = (props) => {
500
500
  const { isExpanded } = React.useContext(ItemContext);
501
501
  const children = typeof props.children === "function" ? props.children({ isExpanded }) : props.children;
502
- return /*#__PURE__*/ jsxs(Fragment, { children: [/*#__PURE__*/ jsx("div", {
502
+ return /*#__PURE__*/ jsxs(Fragment$1, { children: [/*#__PURE__*/ jsx("div", {
503
503
  className: clsx("PRIVATE_VisuallyHidden", TreeView_module_css_default.TreeViewVisuallyHidden),
504
504
  "aria-hidden": true,
505
505
  children: props.label
@@ -513,7 +513,7 @@ LeadingAction.displayName = "TreeView.LeadingAction";
513
513
  const TrailingAction = (props) => {
514
514
  const { trailingActionId, itemId } = React.useContext(ItemContext);
515
515
  const { items, shortcutText } = props;
516
- return /*#__PURE__*/ jsxs(Fragment, { children: [/*#__PURE__*/ jsxs("div", {
516
+ return /*#__PURE__*/ jsxs(Fragment$1, { children: [/*#__PURE__*/ jsxs("div", {
517
517
  id: trailingActionId,
518
518
  className: clsx("PRIVATE_VisuallyHidden", TreeView_module_css_default.TreeViewVisuallyHidden),
519
519
  children: ["- ", shortcutText]
@@ -1,6 +1,6 @@
1
+ import { c } from "../utils/react-compiler-runtime.js";
1
2
  import { FocusKeys, useFocusZone } from "../hooks/useFocusZone.js";
2
3
  import { getScrollContainer } from "../utils/scroll.js";
3
- import { c } from "react-compiler-runtime";
4
4
  //#region src/TreeView/useRovingTabIndex.ts
5
5
  function useRovingTabIndex(t0, t1) {
6
6
  const $ = c(12);
@@ -1,4 +1,4 @@
1
- import { c } from "react-compiler-runtime";
1
+ import { c } from "../utils/react-compiler-runtime.js";
2
2
  import React from "react";
3
3
  //#region src/TreeView/useTreeItemCache.ts
4
4
  /**
@@ -1,7 +1,7 @@
1
+ import { c } from "../utils/react-compiler-runtime.js";
1
2
  import useSafeTimeout from "../hooks/useSafeTimeout.js";
2
3
  import { getAccessibleName } from "./shared.js";
3
4
  import { useTreeItemCache } from "./useTreeItemCache.js";
4
- import { c } from "react-compiler-runtime";
5
5
  import React from "react";
6
6
  //#region src/TreeView/useTypeahead.ts
7
7
  function useTypeahead(t0) {
@@ -1,7 +1,7 @@
1
1
  import Truncate_module_css_default from "./Truncate.module.css.js";
2
- import { clsx } from "clsx";
3
- import { jsx } from "react/jsx-runtime";
4
2
  import React from "react";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import { clsx } from "clsx";
5
5
  //#region src/Truncate/Truncate.tsx
6
6
  const Truncate = /*#__PURE__*/ React.forwardRef(function Truncate({ as: Component = "div", children, className, title, inline, expandable, maxWidth = 125, style, ...rest }, ref) {
7
7
  return /*#__PURE__*/ jsx(Component, {
@@ -1,3 +1,4 @@
1
+ import { c } from "../utils/react-compiler-runtime.js";
1
2
  import CounterLabel from "../CounterLabel/CounterLabel.js";
2
3
  import { invariant } from "../utils/invariant.js";
3
4
  import VisuallyHidden from "../_VisuallyHidden.js";
@@ -11,10 +12,9 @@ import UnderlineNav_module_css_default from "./UnderlineNav.module.css.js";
11
12
  import { UnderlineNavContext } from "./UnderlineNavContext.js";
12
13
  import { UnderlineNavItemsRegistry } from "./UnderlineNavItemsRegistry.js";
13
14
  import { getValidChildren, isCurrent } from "./utils.js";
14
- import { c } from "react-compiler-runtime";
15
- import { clsx } from "clsx";
16
- import { jsx, jsxs } from "react/jsx-runtime";
17
15
  import { forwardRef, useRef, useState } from "react";
16
+ import { jsx, jsxs } from "react/jsx-runtime";
17
+ import { clsx } from "clsx";
18
18
  //#region src/UnderlineNav/UnderlineNav.tsx
19
19
  const UnderlineNav = /*#__PURE__*/ forwardRef((t0, forwardedRef) => {
20
20
  const $ = c(52);
@@ -1,11 +1,11 @@
1
+ import { c } from "../utils/react-compiler-runtime.js";
1
2
  import { UnderlineItem } from "../internal/components/UnderlineTabbedInterface.js";
2
3
  import { useIsClipped } from "../internal/hooks/useOverflowObserver.js";
3
4
  import { UnderlineNavContext } from "./UnderlineNavContext.js";
4
5
  import { UnderlineNavItemsRegistry } from "./UnderlineNavItemsRegistry.js";
5
6
  import UnderlineNavItem_module_css_default from "./UnderlineNavItem.module.css.js";
6
- import { c } from "react-compiler-runtime";
7
- import { jsx } from "react/jsx-runtime";
8
7
  import { forwardRef, useContext, useRef } from "react";
8
+ import { jsx } from "react/jsx-runtime";
9
9
  //#region src/UnderlineNav/UnderlineNavItem.tsx
10
10
  const UnderlineNavItem = /*#__PURE__*/ forwardRef((allProps, forwardedRef) => {
11
11
  var _leadingVisual;
@@ -1,7 +1,7 @@
1
+ import { c } from "../utils/react-compiler-runtime.js";
1
2
  import VisuallyHidden_module_css_default from "./VisuallyHidden.module.css.js";
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/VisuallyHidden/VisuallyHidden.tsx
6
6
  /**
7
7
  * Provides a component that implements the "visually hidden" technique. This is
@@ -1,7 +1,7 @@
1
+ import { c } from "./utils/react-compiler-runtime.js";
1
2
  import _VisuallyHidden_module_css_default from "./_VisuallyHidden.module.css.js";
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/_VisuallyHidden.tsx
6
6
  function VisuallyHidden(t0) {
7
7
  const $ = c(14);
@@ -1,5 +1,5 @@
1
+ import { c } from "../../utils/react-compiler-runtime.js";
1
2
  import Divider_module_css_default from "./Divider.module.css.js";
2
- import { c } from "react-compiler-runtime";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  //#region src/deprecated/ActionList/Divider.tsx
5
5
  /**
@@ -1,5 +1,5 @@
1
+ import { c } from "../../utils/react-compiler-runtime.js";
1
2
  import { Header } from "./Header.js";
2
- import { c } from "react-compiler-runtime";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
4
  //#region src/deprecated/ActionList/Group.tsx
5
5
  /**
@@ -1,7 +1,7 @@
1
+ import { c } from "../../utils/react-compiler-runtime.js";
1
2
  import Header_module_css_default from "./Header.module.css.js";
2
- import { c } from "react-compiler-runtime";
3
- import { clsx } from "clsx";
4
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
+ import { clsx } from "clsx";
5
5
  //#region src/deprecated/ActionList/Header.tsx
6
6
  /**
7
7
  * Contract for props passed to the `Header` component.
@@ -1,10 +1,10 @@
1
+ import { c } from "../../utils/react-compiler-runtime.js";
1
2
  import { useId as useId$1 } from "../../hooks/useId.js";
2
3
  import Truncate from "../../Truncate/Truncate.js";
3
4
  import Item_module_css_default from "./Item.module.css.js";
4
- import { c } from "react-compiler-runtime";
5
- import { clsx } from "clsx";
6
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
5
  import React from "react";
6
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
7
+ import { clsx } from "clsx";
8
8
  import { isValidElementType } from "react-is";
9
9
  import { CheckIcon } from "@primer/octicons-react";
10
10
  //#region src/deprecated/ActionList/Item.tsx
@@ -140,7 +140,7 @@ const Item = /*#__PURE__*/ React.forwardRef((itemProps, ref) => {
140
140
  if ($[35] !== selected || $[36] !== selectionVariant) {
141
141
  t12 = !!selected === selected && /*#__PURE__*/ jsx("div", {
142
142
  className: Item_module_css_default.BaseVisualContainer,
143
- children: selectionVariant === "multiple" ? /*#__PURE__*/ jsx(Fragment, { children: /*#__PURE__*/ jsxs("svg", {
143
+ children: selectionVariant === "multiple" ? /*#__PURE__*/ jsx(Fragment$1, { children: /*#__PURE__*/ jsxs("svg", {
144
144
  className: Item_module_css_default.MultiSelectIcon,
145
145
  "data-selected": selected ? "" : void 0,
146
146
  width: "16",
@@ -1,11 +1,11 @@
1
+ import { c } from "../../utils/react-compiler-runtime.js";
1
2
  import { Group } from "./Group.js";
2
3
  import { Item } from "./Item.js";
3
4
  import { Divider } from "./Divider.js";
4
5
  import List_module_css_default from "./List.module.css.js";
5
- import { c } from "react-compiler-runtime";
6
- import { clsx } from "clsx";
7
- import { jsx, jsxs } from "react/jsx-runtime";
8
6
  import React, { createElement } from "react";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
+ import { clsx } from "clsx";
9
9
  //#region src/deprecated/ActionList/List.tsx
10
10
  /**
11
11
  * Contract for props passed to the `List` component.
@@ -1,3 +1,4 @@
1
+ import { c } from "../utils/react-compiler-runtime.js";
1
2
  import { useProvidedRefOrCreate } from "../hooks/useProvidedRefOrCreate.js";
2
3
  import { useProvidedStateOrCreate } from "../hooks/useProvidedStateOrCreate.js";
3
4
  import { ButtonComponent } from "../Button/Button.js";
@@ -5,9 +6,8 @@ import { AnchoredOverlay } from "../AnchoredOverlay/AnchoredOverlay.js";
5
6
  import { Item } from "./ActionList/Item.js";
6
7
  import { Divider } from "./ActionList/Divider.js";
7
8
  import { List } from "./ActionList/List.js";
8
- import { c } from "react-compiler-runtime";
9
- import { jsx } from "react/jsx-runtime";
10
9
  import "react";
10
+ import { jsx } from "react/jsx-runtime";
11
11
  //#region src/deprecated/ActionMenu.tsx
12
12
  const ActionMenuItem = (props) => {
13
13
  const $ = c(2);
@@ -1,11 +1,11 @@
1
+ import { c } from "../../utils/react-compiler-runtime.js";
1
2
  import { useMergedRefs } from "../../hooks/useMergedRefs.js";
2
3
  import { IconButton } from "../../Button/IconButton.js";
3
4
  import useDialog from "../../hooks/useDialog.js";
4
5
  import Dialog_module_css_default from "./Dialog.module.css.js";
5
- import { c } from "react-compiler-runtime";
6
- import { clsx } from "clsx";
7
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
8
6
  import React, { forwardRef, useRef } from "react";
7
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
8
+ import { clsx } from "clsx";
9
9
  import { XIcon } from "@primer/octicons-react";
10
10
  //#region src/deprecated/DialogV1/Dialog.tsx
11
11
  const noop = () => null;
@@ -134,7 +134,7 @@ const Dialog = /*#__PURE__*/ forwardRef((t0, forwardedRef) => {
134
134
  const { getDialogProps } = useDialog(t4);
135
135
  let t5;
136
136
  if ($[17] !== Component || $[18] !== children || $[19] !== className || $[20] !== getDialogProps || $[21] !== isOpen || $[22] !== mergedRef || $[23] !== onCloseClick || $[24] !== props) {
137
- t5 = isOpen ? /*#__PURE__*/ jsxs(Fragment, { children: [/*#__PURE__*/ jsx("span", {
137
+ t5 = isOpen ? /*#__PURE__*/ jsxs(Fragment$1, { children: [/*#__PURE__*/ jsx("span", {
138
138
  className: Dialog_module_css_default.Overlay,
139
139
  ref: overlayRef
140
140
  }), /*#__PURE__*/ jsxs(Component, {
@@ -1,7 +1,7 @@
1
+ import { c } from "../../utils/react-compiler-runtime.js";
1
2
  import FilteredSearch_module_css_default from "./FilteredSearch.module.css.js";
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/deprecated/FilteredSearch/FilteredSearch.tsx
6
6
  /**
7
7
  * @deprecated A new filter component is in progress.
@@ -1,8 +1,8 @@
1
+ import { c } from "../../utils/react-compiler-runtime.js";
1
2
  import UnderlineNav_module_css_default from "./UnderlineNav.module.css.js";
2
- import { c } from "react-compiler-runtime";
3
- import { clsx } from "clsx";
4
- import { jsx, jsxs } from "react/jsx-runtime";
5
3
  import React from "react";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { clsx } from "clsx";
6
6
  //#region src/deprecated/UnderlineNav/UnderlineNav.tsx
7
7
  function UnderlineNav(t0) {
8
8
  const $ = c(24);
@@ -1,7 +1,7 @@
1
+ import { c } from "../../utils/react-compiler-runtime.js";
1
2
  import IssueLabel_module_css_default from "./IssueLabel.module.css.js";
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
  import { readableColor } from "color2k";
6
6
  //#region src/experimental/IssueLabel/IssueLabel.tsx
7
7
  function IssueLabel(t0) {
@@ -1,10 +1,10 @@
1
+ import { AriaStatus } from "../../live-region/AriaStatus.js";
1
2
  import { useProvidedRefOrCreate } from "../../hooks/useProvidedRefOrCreate.js";
2
3
  import { useAnchoredPosition } from "../../hooks/useAnchoredPosition.js";
3
4
  import { useId as useId$1 } from "../../hooks/useId.js";
4
5
  import { isSlot } from "../../utils/is-slot.js";
5
6
  import { useSlots } from "../../hooks/useSlots.js";
6
7
  import Spinner from "../../Spinner/Spinner.js";
7
- import { AriaStatus } from "../../live-region/AriaStatus.js";
8
8
  import { invariant } from "../../utils/invariant.js";
9
9
  import { IconButton } from "../../Button/IconButton.js";
10
10
  import { ButtonComponent } from "../../Button/Button.js";
@@ -20,9 +20,9 @@ import Checkbox from "../../Checkbox/Checkbox.js";
20
20
  import Octicon from "../../Octicon/Octicon.js";
21
21
  import { InputLabel } from "../../internal/components/InputLabel.js";
22
22
  import SelectPanel_module_css_default from "./SelectPanel.module.css.js";
23
- import { clsx } from "clsx";
24
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
25
23
  import React, { useEffect, useState } from "react";
24
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
25
+ import { clsx } from "clsx";
26
26
  import { AlertIcon, ArrowLeftIcon, FilterRemoveIcon, SearchIcon, XCircleFillIcon, XIcon } from "@primer/octicons-react";
27
27
  //#region src/experimental/SelectPanel2/SelectPanel.tsx
28
28
  const SelectPanelContext = /*#__PURE__*/ React.createContext({
@@ -141,7 +141,7 @@ const Panel = ({ title, description, variant: propsVariant, selectionVariant = "
141
141
  let maxHeightValue = heightMap[maxHeight];
142
142
  if (currentVariant === "bottom-sheet") maxHeightValue = "calc(100vh - 64px)";
143
143
  else if (currentVariant === "full-screen") maxHeightValue = "100vh";
144
- return /*#__PURE__*/ jsxs(Fragment, { children: [Anchor, /*#__PURE__*/ jsx(BaseOverlay, {
144
+ return /*#__PURE__*/ jsxs(Fragment$1, { children: [Anchor, /*#__PURE__*/ jsx(BaseOverlay, {
145
145
  as: "dialog",
146
146
  ref: dialogRef,
147
147
  "aria-labelledby": `${panelId}--title`,
@@ -162,7 +162,7 @@ const Panel = ({ title, description, variant: propsVariant, selectionVariant = "
162
162
  onClick: (event) => {
163
163
  if (event.target === event.currentTarget) onClickOutside();
164
164
  },
165
- children: internalOpen && /*#__PURE__*/ jsx(Fragment, { children: /*#__PURE__*/ jsx(SelectPanelContext.Provider, {
165
+ children: internalOpen && /*#__PURE__*/ jsx(Fragment$1, { children: /*#__PURE__*/ jsx(SelectPanelContext.Provider, {
166
166
  value: {
167
167
  panelId,
168
168
  title,
@@ -1,10 +1,9 @@
1
+ import { c } from "../../utils/react-compiler-runtime.js";
1
2
  import useIsomorphicLayoutEffect from "../../utils/useIsomorphicLayoutEffect.js";
2
- import { useFeatureFlag } from "../../FeatureFlags/useFeatureFlag.js";
3
3
  import { useControllableState } from "../../hooks/useControllableState.js";
4
4
  import { TabsContext } from "./TabsContext.js";
5
- import { c } from "react-compiler-runtime";
6
- import { jsx } from "react/jsx-runtime";
7
5
  import React, { useId } from "react";
6
+ import { jsx } from "react/jsx-runtime";
8
7
  //#region src/experimental/Tabs/Tabs.tsx
9
8
  /**
10
9
  * The Tabs component provides the base structure for a tabbed interface, without providing any formal requirement on DOM structure or styling.
@@ -15,12 +14,11 @@ import React, { useId } from "react";
15
14
  */
16
15
  function Tabs(props) {
17
16
  var _props$id, _props$activationMode, _props$defaultValue;
18
- const $ = c(16);
17
+ const $ = c(15);
19
18
  const { children, onValueChange } = props;
20
19
  const generatedId = useId();
21
20
  const groupId = (_props$id = props.id) !== null && _props$id !== void 0 ? _props$id : generatedId;
22
- const controlledApiEnabled = useFeatureFlag("primer_react_underline_panels_controlled");
23
- const activationMode = controlledApiEnabled ? (_props$activationMode = props.activationMode) !== null && _props$activationMode !== void 0 ? _props$activationMode : "automatic" : "automatic";
21
+ const activationMode = (_props$activationMode = props.activationMode) !== null && _props$activationMode !== void 0 ? _props$activationMode : "automatic";
24
22
  const t0 = (_props$defaultValue = props.defaultValue) !== null && _props$defaultValue !== void 0 ? _props$defaultValue : props.value;
25
23
  let t1;
26
24
  if ($[0] !== props.value || $[1] !== t0) {
@@ -37,7 +35,7 @@ function Tabs(props) {
37
35
  const [focusedValue, setFocusedValue] = React.useState();
38
36
  const savedOnValueChange = React.useRef(onValueChange);
39
37
  let t2;
40
- if ($[3] !== activationMode || $[4] !== controlledApiEnabled || $[5] !== focusedValue || $[6] !== groupId || $[7] !== selectedValue || $[8] !== setSelectedValue) {
38
+ if ($[3] !== activationMode || $[4] !== focusedValue || $[5] !== groupId || $[6] !== selectedValue || $[7] !== setSelectedValue) {
41
39
  t2 = {
42
40
  groupId,
43
41
  selectedValue,
@@ -46,7 +44,7 @@ function Tabs(props) {
46
44
  selectTab(value) {
47
45
  var _savedOnValueChange$c;
48
46
  setFocusedValue(void 0);
49
- if (controlledApiEnabled && value === selectedValue) return;
47
+ if (value === selectedValue) return;
50
48
  setSelectedValue(value);
51
49
  (_savedOnValueChange$c = savedOnValueChange.current) === null || _savedOnValueChange$c === void 0 || _savedOnValueChange$c.call(savedOnValueChange, { value });
52
50
  },
@@ -55,39 +53,38 @@ function Tabs(props) {
55
53
  }
56
54
  };
57
55
  $[3] = activationMode;
58
- $[4] = controlledApiEnabled;
59
- $[5] = focusedValue;
60
- $[6] = groupId;
61
- $[7] = selectedValue;
62
- $[8] = setSelectedValue;
63
- $[9] = t2;
64
- } else t2 = $[9];
56
+ $[4] = focusedValue;
57
+ $[5] = groupId;
58
+ $[6] = selectedValue;
59
+ $[7] = setSelectedValue;
60
+ $[8] = t2;
61
+ } else t2 = $[8];
65
62
  const contextValue = t2;
66
63
  let t3;
67
64
  let t4;
68
- if ($[10] !== onValueChange) {
65
+ if ($[9] !== onValueChange) {
69
66
  t3 = () => {
70
67
  savedOnValueChange.current = onValueChange;
71
68
  };
72
69
  t4 = [onValueChange];
73
- $[10] = onValueChange;
74
- $[11] = t3;
75
- $[12] = t4;
70
+ $[9] = onValueChange;
71
+ $[10] = t3;
72
+ $[11] = t4;
76
73
  } else {
77
- t3 = $[11];
78
- t4 = $[12];
74
+ t3 = $[10];
75
+ t4 = $[11];
79
76
  }
80
77
  useIsomorphicLayoutEffect(t3, t4);
81
78
  let t5;
82
- if ($[13] !== children || $[14] !== contextValue) {
79
+ if ($[12] !== children || $[13] !== contextValue) {
83
80
  t5 = /*#__PURE__*/ jsx(TabsContext.Provider, {
84
81
  value: contextValue,
85
82
  children
86
83
  });
87
- $[13] = children;
88
- $[14] = contextValue;
89
- $[15] = t5;
90
- } else t5 = $[15];
84
+ $[12] = children;
85
+ $[13] = contextValue;
86
+ $[14] = t5;
87
+ } else t5 = $[14];
91
88
  return t5;
92
89
  }
93
90
  //#endregion
@@ -1,5 +1,5 @@
1
+ import { c } from "../../utils/react-compiler-runtime.js";
1
2
  import { useTabs } from "./useTabs.js";
2
- import { c } from "react-compiler-runtime";
3
3
  //#region src/experimental/Tabs/useTab.ts
4
4
  /**
5
5
  * A custom hook that provides the props needed for a tab component.
@@ -1,31 +1,28 @@
1
+ import { c } from "../../utils/react-compiler-runtime.js";
1
2
  import { useMergedRefs } from "../../hooks/useMergedRefs.js";
2
3
  import { useProvidedRefOrCreate } from "../../hooks/useProvidedRefOrCreate.js";
3
4
  import { useFeatureFlag } from "../../FeatureFlags/useFeatureFlag.js";
4
- import { c } from "react-compiler-runtime";
5
5
  import { useRef } from "react";
6
6
  //#region src/experimental/Tabs/useTabList.ts
7
7
  function useTabList(props) {
8
- const $ = c(10);
8
+ const $ = c(9);
9
9
  const { "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-orientation": ariaOrientation } = props;
10
10
  const mergedRefEnabled = useFeatureFlag("primer_react_merged_forwarded_refs");
11
- const controlledApiEnabled = useFeatureFlag("primer_react_underline_panels_controlled");
12
11
  const tabListRef = useRef(null);
13
12
  const mergedRef = useMergedRefs(tabListRef, props.ref);
14
13
  const providedOrCreatedRef = useProvidedRefOrCreate(props.ref);
15
14
  const readRef = mergedRefEnabled ? tabListRef : providedOrCreatedRef;
16
15
  const appliedRef = mergedRefEnabled ? mergedRef : providedOrCreatedRef;
17
16
  let t0;
18
- if ($[0] !== ariaOrientation || $[1] !== controlledApiEnabled || $[2] !== readRef) {
17
+ if ($[0] !== ariaOrientation || $[1] !== readRef) {
19
18
  t0 = (event) => {
20
19
  const { current: tablist } = readRef;
21
20
  if (tablist === null) return;
22
21
  const tabs = getFocusableTabs(tablist);
23
22
  const getCurrentIndex = () => {
24
- if (controlledApiEnabled) {
25
- const activeElement = tablist.ownerDocument.activeElement;
26
- const focusedIndex = activeElement instanceof HTMLElement ? tabs.indexOf(activeElement) : -1;
27
- if (focusedIndex !== -1) return focusedIndex;
28
- }
23
+ const activeElement = tablist.ownerDocument.activeElement;
24
+ const focusedIndex = activeElement instanceof HTMLElement ? tabs.indexOf(activeElement) : -1;
25
+ if (focusedIndex !== -1) return focusedIndex;
29
26
  return tabs.findIndex(_temp);
30
27
  };
31
28
  const isVertical = ariaOrientation === "vertical";
@@ -50,14 +47,13 @@ function useTabList(props) {
50
47
  }
51
48
  };
52
49
  $[0] = ariaOrientation;
53
- $[1] = controlledApiEnabled;
54
- $[2] = readRef;
55
- $[3] = t0;
56
- } else t0 = $[3];
50
+ $[1] = readRef;
51
+ $[2] = t0;
52
+ } else t0 = $[2];
57
53
  const onKeyDown = t0;
58
54
  const t1 = ariaOrientation !== null && ariaOrientation !== void 0 ? ariaOrientation : "horizontal";
59
55
  let t2;
60
- if ($[4] !== appliedRef || $[5] !== ariaLabel || $[6] !== ariaLabelledby || $[7] !== onKeyDown || $[8] !== t1) {
56
+ if ($[3] !== appliedRef || $[4] !== ariaLabel || $[5] !== ariaLabelledby || $[6] !== onKeyDown || $[7] !== t1) {
61
57
  t2 = { tabListProps: {
62
58
  ref: appliedRef,
63
59
  "aria-label": ariaLabel,
@@ -66,13 +62,13 @@ function useTabList(props) {
66
62
  role: "tablist",
67
63
  onKeyDown
68
64
  } };
69
- $[4] = appliedRef;
70
- $[5] = ariaLabel;
71
- $[6] = ariaLabelledby;
72
- $[7] = onKeyDown;
73
- $[8] = t1;
74
- $[9] = t2;
75
- } else t2 = $[9];
65
+ $[3] = appliedRef;
66
+ $[4] = ariaLabel;
67
+ $[5] = ariaLabelledby;
68
+ $[6] = onKeyDown;
69
+ $[7] = t1;
70
+ $[8] = t2;
71
+ } else t2 = $[8];
76
72
  return t2;
77
73
  }
78
74
  function _temp(tab) {
@@ -1,5 +1,5 @@
1
+ import { c } from "../../utils/react-compiler-runtime.js";
1
2
  import { useTabs } from "./useTabs.js";
2
- import { c } from "react-compiler-runtime";
3
3
  //#region src/experimental/Tabs/useTabPanel.ts
4
4
  /** Utility hook for tab panels */
5
5
  function useTabPanel(props) {
@@ -3,7 +3,6 @@ import { useResizeObserver } from "../../hooks/useResizeObserver.js";
3
3
  import { useId as useId$1 } from "../../hooks/useId.js";
4
4
  import { warning } from "../../utils/warning.js";
5
5
  import { isSlot } from "../../utils/is-slot.js";
6
- import { useFeatureFlag } from "../../FeatureFlags/useFeatureFlag.js";
7
6
  import { invariant } from "../../utils/invariant.js";
8
7
  import { UnderlineItem, UnderlineItemList, UnderlineWrapper } from "../../internal/components/UnderlineTabbedInterface.js";
9
8
  import UnderlinePanels_module_css_default from "./UnderlinePanels.module.css.js";
@@ -11,20 +10,16 @@ import { useTab } from "../Tabs/useTab.js";
11
10
  import { useTabList } from "../Tabs/useTabList.js";
12
11
  import { useTabPanel } from "../Tabs/useTabPanel.js";
13
12
  import { Tabs } from "../Tabs/Tabs.js";
14
- import { clsx } from "clsx";
15
- import { jsx, jsxs } from "react/jsx-runtime";
16
13
  import React, { Children, cloneElement, createContext, isValidElement, useContext, useMemo, useRef, useState } from "react";
14
+ import { jsx, jsxs } from "react/jsx-runtime";
15
+ import { clsx } from "clsx";
17
16
  //#region src/experimental/UnderlinePanels/UnderlinePanels.tsx
18
17
  const UnderlinePanelsContext = /*#__PURE__*/ createContext({
19
18
  iconsVisible: true,
20
19
  loadingCounters: void 0
21
20
  });
22
- const UnderlinePanels = ({ "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, children, loadingCounters, className, value: valueProp, defaultValue: defaultValueProp, onChange: onChangeProp, activationMode = "automatic", ...props }) => {
21
+ const UnderlinePanels = ({ "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, children, loadingCounters, className, value: controlledValue, defaultValue, onChange, activationMode = "automatic", ...props }) => {
23
22
  var _tabValues$;
24
- const controlledApiEnabled = useFeatureFlag("primer_react_underline_panels_controlled");
25
- const controlledValue = controlledApiEnabled ? valueProp : void 0;
26
- const defaultValue = controlledApiEnabled ? defaultValueProp : void 0;
27
- const onChange = controlledApiEnabled ? onChangeProp : void 0;
28
23
  const [iconsVisible, setIconsVisible] = useState(true);
29
24
  const wrapperRef = useRef(null);
30
25
  const listRef = useRef(null);
@@ -34,14 +29,14 @@ const UnderlinePanels = ({ "aria-label": ariaLabel, "aria-labelledby": ariaLabel
34
29
  let panelIndex = 0;
35
30
  const childrenWithProps = Children.map(children, (child) => {
36
31
  if (/*#__PURE__*/ isValidElement(child) && (child.type === Tab || isSlot(child, Tab))) {
37
- var _ref;
38
- const value = (_ref = controlledApiEnabled ? child.props.value : void 0) !== null && _ref !== void 0 ? _ref : `${tabIndex}`;
32
+ var _child$props$value;
33
+ const value = (_child$props$value = child.props.value) !== null && _child$props$value !== void 0 ? _child$props$value : `${tabIndex}`;
39
34
  tabIndex++;
40
35
  return /*#__PURE__*/ cloneElement(child, { value });
41
36
  }
42
37
  if (/*#__PURE__*/ isValidElement(child) && (child.type === Panel || isSlot(child, Panel))) {
43
- var _ref2;
44
- const value = (_ref2 = controlledApiEnabled ? child.props.value : void 0) !== null && _ref2 !== void 0 ? _ref2 : `${panelIndex}`;
38
+ var _child$props$value2;
39
+ const value = (_child$props$value2 = child.props.value) !== null && _child$props$value2 !== void 0 ? _child$props$value2 : `${panelIndex}`;
45
40
  panelIndex++;
46
41
  return /*#__PURE__*/ cloneElement(child, { value });
47
42
  }
@@ -74,11 +69,11 @@ const UnderlinePanels = ({ "aria-label": ariaLabel, "aria-labelledby": ariaLabel
74
69
  tabValues,
75
70
  panelValues
76
71
  ];
77
- }, [children, controlledApiEnabled]);
72
+ }, [children]);
78
73
  const isControlled = controlledValue !== void 0;
79
74
  const [uncontrolledValue, setUncontrolledValue] = useState(() => {
80
- var _ref3;
81
- return (_ref3 = defaultValue !== null && defaultValue !== void 0 ? defaultValue : selectedFromProps) !== null && _ref3 !== void 0 ? _ref3 : "0";
75
+ var _ref;
76
+ return (_ref = defaultValue !== null && defaultValue !== void 0 ? defaultValue : selectedFromProps) !== null && _ref !== void 0 ? _ref : "0";
82
77
  });
83
78
  const [prevSelectedFromProps, setPrevSelectedFromProps] = useState(selectedFromProps);
84
79
  if (!isControlled && selectedFromProps !== prevSelectedFromProps) {