@primer/react 38.40.2-rc.e319faf65 → 38.41.0-rc.27afe233f

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 (162) hide show
  1. package/CHANGELOG.md +5 -1
  2. package/dist/ActionBar/ActionBar.js +30 -33
  3. package/dist/ActionList/Description.js +2 -2
  4. package/dist/ActionList/Divider.js +1 -1
  5. package/dist/ActionList/Group.js +12 -12
  6. package/dist/ActionList/GroupHeadingTrailingAction.js +1 -10
  7. package/dist/ActionList/Heading.js +1 -1
  8. package/dist/ActionList/Item.js +19 -19
  9. package/dist/ActionList/LinkItem.js +4 -4
  10. package/dist/ActionList/List.js +2 -2
  11. package/dist/ActionList/Selection.js +6 -6
  12. package/dist/ActionList/TrailingAction.js +3 -3
  13. package/dist/ActionList/Visuals.js +9 -9
  14. package/dist/ActionMenu/ActionMenu.js +8 -11
  15. package/dist/AnchoredOverlay/AnchoredOverlay.js +4 -4
  16. package/dist/Autocomplete/Autocomplete.js +3 -3
  17. package/dist/Autocomplete/AutocompleteInput.js +1 -1
  18. package/dist/Autocomplete/AutocompleteMenu.js +111 -106
  19. package/dist/Autocomplete/AutocompleteOverlay.js +2 -2
  20. package/dist/Avatar/Avatar.js +1 -1
  21. package/dist/AvatarStack/AvatarStack.js +3 -3
  22. package/dist/Banner/Banner.js +21 -21
  23. package/dist/BaseStyles.js +1 -1
  24. package/dist/Blankslate/Blankslate.js +10 -11
  25. package/dist/BranchName/BranchName.js +1 -1
  26. package/dist/Breadcrumbs/Breadcrumbs.js +20 -29
  27. package/dist/Button/Button.js +1 -1
  28. package/dist/Button/ButtonBase.js +8 -9
  29. package/dist/Button/IconButton.js +3 -3
  30. package/dist/Button/LinkButton.js +1 -1
  31. package/dist/ButtonGroup/ButtonGroup.js +2 -3
  32. package/dist/Card/Card.js +16 -16
  33. package/dist/Checkbox/Checkbox.js +1 -1
  34. package/dist/CheckboxGroup/CheckboxGroup.js +2 -2
  35. package/dist/CircleBadge/CircleBadge.js +2 -2
  36. package/dist/ConfirmationDialog/ConfirmationDialog.js +1 -5
  37. package/dist/CounterLabel/CounterLabel.js +2 -2
  38. package/dist/DataTable/DataTable.js +7 -8
  39. package/dist/DataTable/ErrorDialog.js +1 -1
  40. package/dist/DataTable/Pagination.js +23 -23
  41. package/dist/DataTable/Table.js +25 -27
  42. package/dist/DataTable/TableGroup.js +10 -10
  43. package/dist/Details/Details.js +2 -2
  44. package/dist/Dialog/Dialog.js +20 -23
  45. package/dist/FeatureFlags/FeatureFlags.js +1 -1
  46. package/dist/FilteredActionList/FilteredActionList.js +18 -19
  47. package/dist/FilteredActionList/FilteredActionListInput.js +2 -2
  48. package/dist/FilteredActionList/FilteredActionListLoaders.js +10 -11
  49. package/dist/Flash/Flash.js +1 -4
  50. package/dist/FormControl/FormControl.js +8 -8
  51. package/dist/FormControl/FormControlCaption.js +1 -1
  52. package/dist/FormControl/FormControlLabel.js +1 -1
  53. package/dist/FormControl/FormControlLeadingVisual.js +1 -1
  54. package/dist/FormControl/_FormControlValidation.js +1 -1
  55. package/dist/Header/Header.js +3 -3
  56. package/dist/Heading/Heading.js +1 -1
  57. package/dist/Hidden/Hidden.js +1 -1
  58. package/dist/InlineMessage/InlineMessage.js +11 -11
  59. package/dist/KeybindingHint/KeybindingHint.js +3 -3
  60. package/dist/KeybindingHint/components/Chord.js +3 -3
  61. package/dist/KeybindingHint/components/Key.js +3 -3
  62. package/dist/KeybindingHint/components/Sequence.js +1 -1
  63. package/dist/KeybindingHint/platform.js +0 -8
  64. package/dist/Label/Label.js +1 -1
  65. package/dist/LabelGroup/LabelGroup.js +18 -18
  66. package/dist/Link/Link.js +1 -1
  67. package/dist/NavList/NavList.js +24 -24
  68. package/dist/Octicon/Octicon.js +1 -4
  69. package/dist/Overlay/Overlay.js +3 -3
  70. package/dist/PageHeader/PageHeader.js +21 -21
  71. package/dist/PageLayout/DragHandle.js +1 -1
  72. package/dist/PageLayout/PageLayout.js +26 -26
  73. package/dist/PageLayout/usePaneWidth.js +0 -5
  74. package/dist/Pagehead/Pagehead.js +1 -1
  75. package/dist/Pagination/Pagination.js +9 -10
  76. package/dist/Popover/Popover.js +3 -3
  77. package/dist/ProgressBar/ProgressBar.js +3 -3
  78. package/dist/Radio/Radio.js +1 -1
  79. package/dist/RadioGroup/RadioGroup.js +2 -2
  80. package/dist/RelativeTime/RelativeTime.js +1 -1
  81. package/dist/ScrollableRegion/ScrollableRegion.js +1 -1
  82. package/dist/SegmentedControl/SegmentedControl.js +13 -13
  83. package/dist/SegmentedControl/SegmentedControlAction.js +6 -6
  84. package/dist/SegmentedControl/SegmentedControlButton.js +8 -8
  85. package/dist/SegmentedControl/SegmentedControlDivider.js +1 -1
  86. package/dist/SegmentedControl/SegmentedControlIconButton.js +5 -5
  87. package/dist/Select/Select.js +9 -9
  88. package/dist/SelectPanel/SelectPanel.js +24 -27
  89. package/dist/SelectPanel/SelectPanelMessage.js +5 -5
  90. package/dist/SideNav.js +2 -2
  91. package/dist/Skeleton/SkeletonBox.js +1 -1
  92. package/dist/SkeletonAvatar/SkeletonAvatar.js +1 -1
  93. package/dist/SkeletonText/SkeletonText.js +3 -3
  94. package/dist/Spinner/Spinner.js +5 -5
  95. package/dist/SplitPageLayout/SplitPageLayout.js +6 -6
  96. package/dist/Stack/Stack.js +2 -2
  97. package/dist/StateLabel/StateLabel.js +2 -2
  98. package/dist/SubNav/SubNav.js +5 -5
  99. package/dist/TabNav/TabNav.js +4 -10
  100. package/dist/Text/Text.js +1 -1
  101. package/dist/TextInput/TextInput.js +13 -13
  102. package/dist/TextInputWithTokens/TextInputWithTokens.js +12 -15
  103. package/dist/Textarea/Textarea.js +7 -7
  104. package/dist/ThemeProvider.js +1 -2
  105. package/dist/Timeline/Timeline.js +11 -14
  106. package/dist/ToggleSwitch/ToggleSwitch.js +18 -18
  107. package/dist/Token/IssueLabelToken.js +3 -3
  108. package/dist/Token/Token.js +7 -7
  109. package/dist/Token/TokenBase.js +1 -1
  110. package/dist/Token/_RemoveTokenButton.js +4 -5
  111. package/dist/Token/_TokenTextContainer.js +1 -1
  112. package/dist/Tooltip/Tooltip.js +2 -5
  113. package/dist/TooltipV2/Tooltip.js +7 -7
  114. package/dist/TopicTag/TopicTag.js +1 -1
  115. package/dist/TopicTag/TopicTagGroup.js +1 -1
  116. package/dist/TreeView/TreeView.js +52 -59
  117. package/dist/TreeView/useTypeahead.js +3 -3
  118. package/dist/Truncate/Truncate.js +1 -2
  119. package/dist/UnderlineNav/UnderlineNav.js +18 -18
  120. package/dist/UnderlineNav/UnderlineNavItem.js +2 -2
  121. package/dist/VisuallyHidden/VisuallyHidden.js +1 -1
  122. package/dist/_VisuallyHidden.js +1 -1
  123. package/dist/deprecated/ActionList/Divider.js +1 -1
  124. package/dist/deprecated/ActionList/Group.js +2 -5
  125. package/dist/deprecated/ActionList/Header.js +2 -5
  126. package/dist/deprecated/ActionList/Item.js +17 -20
  127. package/dist/deprecated/ActionList/List.js +4 -13
  128. package/dist/deprecated/ActionMenu.js +4 -6
  129. package/dist/deprecated/DialogV1/Dialog.js +5 -5
  130. package/dist/deprecated/FilteredSearch/FilteredSearch.js +1 -1
  131. package/dist/deprecated/UnderlineNav/UnderlineNav.js +4 -4
  132. package/dist/experimental/IssueLabel/IssueLabel.js +4 -4
  133. package/dist/experimental/SelectPanel2/SelectPanel.js +42 -49
  134. package/dist/experimental/Tabs/Tabs.js +1 -1
  135. package/dist/experimental/UnderlinePanels/UnderlinePanels.js +6 -9
  136. package/dist/hooks/useMergedRefs.js +0 -12
  137. package/dist/hooks/useResponsiveValue.js +0 -5
  138. package/dist/hooks/useSlots.js +0 -48
  139. package/dist/internal/components/ButtonReset.js +1 -1
  140. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.js +9 -9
  141. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupCaption.js +1 -1
  142. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupLabel.js +4 -4
  143. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupValidation.js +1 -1
  144. package/dist/internal/components/ConditionalWrapper.js +2 -2
  145. package/dist/internal/components/InputLabel.js +3 -3
  146. package/dist/internal/components/InputValidation.js +4 -4
  147. package/dist/internal/components/OverflowObserverProvider.js +1 -1
  148. package/dist/internal/components/TextInputInnerAction.js +6 -6
  149. package/dist/internal/components/TextInputInnerVisualSlot.js +5 -5
  150. package/dist/internal/components/TextInputWrapper.js +2 -2
  151. package/dist/internal/components/ThemeProviderBase.js +3 -3
  152. package/dist/internal/components/UnderlineTabbedInterface.js +11 -11
  153. package/dist/internal/components/UnstyledTextInput.js +1 -1
  154. package/dist/internal/components/ValidationAnimationContainer.js +2 -2
  155. package/dist/internal/hooks/useOverflowObserver.js +1 -2
  156. package/dist/live-region/Announce.js +1 -1
  157. package/dist/live-region/AriaAlert.js +1 -1
  158. package/dist/live-region/AriaStatus.js +1 -1
  159. package/dist/next/ThemeProvider.js +1 -1
  160. package/dist/utils/descendant-registry.js +1 -7
  161. package/dist/utils/modern-polymorphic.js +0 -10
  162. package/package.json +3 -3
@@ -29,14 +29,9 @@ function createDescendantRegistry() {
29
29
  updateValue: () => {},
30
30
  key: -1
31
31
  });
32
- /**
33
- * Instantiate descendant registry state. The initial value will be `undefined`, indicating that the registry hasn't
34
- * been built yet.
35
- */
36
32
  function useRegistryState() {
37
33
  return useState();
38
34
  }
39
- /** Register a descendant component with the registry. */
40
35
  function useRegisterDescendant(value) {
41
36
  const $ = c(16);
42
37
  const { register, updateValue, key } = useContext(Context);
@@ -87,7 +82,6 @@ function createDescendantRegistry() {
87
82
  return id;
88
83
  }
89
84
  const unsetValue = Symbol("unset");
90
- /** Provide context for registering descendant components. This only needs to wrap `children`. */
91
85
  function Provider(t0) {
92
86
  const $ = c(17);
93
87
  const { children, setRegistry } = t0;
@@ -192,7 +186,7 @@ function createDescendantRegistry() {
192
186
  const contextValue = t8;
193
187
  let t9;
194
188
  if ($[14] !== children || $[15] !== contextValue) {
195
- t9 = /*#__PURE__*/ jsx(Context.Provider, {
189
+ t9 = /* @__PURE__ */ jsx(Context.Provider, {
196
190
  value: contextValue,
197
191
  children
198
192
  });
@@ -1,18 +1,8 @@
1
1
  import { forwardRef } from "react";
2
2
  //#region src/utils/modern-polymorphic.ts
3
3
  /**
4
- * Distributive Omit utility type that works correctly with union types
5
- */
6
- /**
7
- * Fixed version of forwardRef that provides better type inference for polymorphic components
8
- */
9
- /**
10
4
  * Cast forwardRef to the fixed version with better type inference
11
5
  */
12
6
  const fixedForwardRef = forwardRef;
13
- /**
14
- * Simplified polymorphic props type that handles the common pattern of
15
- * `DistributiveOmit<ComponentPropsWithRef<ElementType extends As ? DefaultElement : As>, 'as'>`
16
- */
17
7
  //#endregion
18
8
  export { fixedForwardRef };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@primer/react",
3
3
  "type": "module",
4
- "version": "38.40.2-rc.e319faf65",
4
+ "version": "38.41.0-rc.27afe233f",
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",
@@ -127,7 +127,7 @@
127
127
  "@types/react": "18.3.11",
128
128
  "@types/react-dom": "18.3.1",
129
129
  "@types/react-is": "18.3.1",
130
- "@vitejs/plugin-react": "^6.0.2",
130
+ "@vitejs/plugin-react": "^6.1.1",
131
131
  "afterframe": "^1.0.2",
132
132
  "ajv": "8.18.0",
133
133
  "axe-core": "4.9.1",
@@ -136,7 +136,6 @@
136
136
  "babel-plugin-dev-expression": "0.2.3",
137
137
  "babel-plugin-macros": "3.1.0",
138
138
  "babel-plugin-open-source": "1.3.4",
139
- "babel-plugin-react-compiler": "^1.0.0",
140
139
  "babel-plugin-transform-replace-expressions": "0.2.0",
141
140
  "babel-polyfill": "6.26.0",
142
141
  "chalk": "^5.4.1",
@@ -158,6 +157,7 @@
158
157
  "mdast-util-to-string": "4.0.0",
159
158
  "micromark-extension-frontmatter": "2.0.0",
160
159
  "micromark-extension-mdxjs": "3.0.0",
160
+ "oxc-transform-react": "^0.152.0",
161
161
  "postcss-preset-primer": "^0.0.0",
162
162
  "publint": "^0.3.15",
163
163
  "react": "18.3.1",