@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.
- package/CHANGELOG.md +5 -1
- package/dist/ActionBar/ActionBar.js +30 -33
- package/dist/ActionList/Description.js +2 -2
- package/dist/ActionList/Divider.js +1 -1
- package/dist/ActionList/Group.js +12 -12
- package/dist/ActionList/GroupHeadingTrailingAction.js +1 -10
- package/dist/ActionList/Heading.js +1 -1
- package/dist/ActionList/Item.js +19 -19
- package/dist/ActionList/LinkItem.js +4 -4
- package/dist/ActionList/List.js +2 -2
- package/dist/ActionList/Selection.js +6 -6
- package/dist/ActionList/TrailingAction.js +3 -3
- package/dist/ActionList/Visuals.js +9 -9
- package/dist/ActionMenu/ActionMenu.js +8 -11
- package/dist/AnchoredOverlay/AnchoredOverlay.js +4 -4
- package/dist/Autocomplete/Autocomplete.js +3 -3
- package/dist/Autocomplete/AutocompleteInput.js +1 -1
- package/dist/Autocomplete/AutocompleteMenu.js +111 -106
- package/dist/Autocomplete/AutocompleteOverlay.js +2 -2
- package/dist/Avatar/Avatar.js +1 -1
- package/dist/AvatarStack/AvatarStack.js +3 -3
- package/dist/Banner/Banner.js +21 -21
- package/dist/BaseStyles.js +1 -1
- package/dist/Blankslate/Blankslate.js +10 -11
- package/dist/BranchName/BranchName.js +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.js +20 -29
- package/dist/Button/Button.js +1 -1
- package/dist/Button/ButtonBase.js +8 -9
- package/dist/Button/IconButton.js +3 -3
- package/dist/Button/LinkButton.js +1 -1
- package/dist/ButtonGroup/ButtonGroup.js +2 -3
- package/dist/Card/Card.js +16 -16
- package/dist/Checkbox/Checkbox.js +1 -1
- package/dist/CheckboxGroup/CheckboxGroup.js +2 -2
- package/dist/CircleBadge/CircleBadge.js +2 -2
- package/dist/ConfirmationDialog/ConfirmationDialog.js +1 -5
- package/dist/CounterLabel/CounterLabel.js +2 -2
- package/dist/DataTable/DataTable.js +7 -8
- package/dist/DataTable/ErrorDialog.js +1 -1
- package/dist/DataTable/Pagination.js +23 -23
- package/dist/DataTable/Table.js +25 -27
- package/dist/DataTable/TableGroup.js +10 -10
- package/dist/Details/Details.js +2 -2
- package/dist/Dialog/Dialog.js +20 -23
- package/dist/FeatureFlags/FeatureFlags.js +1 -1
- package/dist/FilteredActionList/FilteredActionList.js +18 -19
- package/dist/FilteredActionList/FilteredActionListInput.js +2 -2
- package/dist/FilteredActionList/FilteredActionListLoaders.js +10 -11
- package/dist/Flash/Flash.js +1 -4
- package/dist/FormControl/FormControl.js +8 -8
- package/dist/FormControl/FormControlCaption.js +1 -1
- package/dist/FormControl/FormControlLabel.js +1 -1
- package/dist/FormControl/FormControlLeadingVisual.js +1 -1
- package/dist/FormControl/_FormControlValidation.js +1 -1
- package/dist/Header/Header.js +3 -3
- package/dist/Heading/Heading.js +1 -1
- package/dist/Hidden/Hidden.js +1 -1
- package/dist/InlineMessage/InlineMessage.js +11 -11
- package/dist/KeybindingHint/KeybindingHint.js +3 -3
- package/dist/KeybindingHint/components/Chord.js +3 -3
- package/dist/KeybindingHint/components/Key.js +3 -3
- package/dist/KeybindingHint/components/Sequence.js +1 -1
- package/dist/KeybindingHint/platform.js +0 -8
- package/dist/Label/Label.js +1 -1
- package/dist/LabelGroup/LabelGroup.js +18 -18
- package/dist/Link/Link.js +1 -1
- package/dist/NavList/NavList.js +24 -24
- package/dist/Octicon/Octicon.js +1 -4
- package/dist/Overlay/Overlay.js +3 -3
- package/dist/PageHeader/PageHeader.js +21 -21
- package/dist/PageLayout/DragHandle.js +1 -1
- package/dist/PageLayout/PageLayout.js +26 -26
- package/dist/PageLayout/usePaneWidth.js +0 -5
- package/dist/Pagehead/Pagehead.js +1 -1
- package/dist/Pagination/Pagination.js +9 -10
- package/dist/Popover/Popover.js +3 -3
- package/dist/ProgressBar/ProgressBar.js +3 -3
- package/dist/Radio/Radio.js +1 -1
- package/dist/RadioGroup/RadioGroup.js +2 -2
- package/dist/RelativeTime/RelativeTime.js +1 -1
- package/dist/ScrollableRegion/ScrollableRegion.js +1 -1
- package/dist/SegmentedControl/SegmentedControl.js +13 -13
- package/dist/SegmentedControl/SegmentedControlAction.js +6 -6
- package/dist/SegmentedControl/SegmentedControlButton.js +8 -8
- package/dist/SegmentedControl/SegmentedControlDivider.js +1 -1
- package/dist/SegmentedControl/SegmentedControlIconButton.js +5 -5
- package/dist/Select/Select.js +9 -9
- package/dist/SelectPanel/SelectPanel.js +24 -27
- package/dist/SelectPanel/SelectPanelMessage.js +5 -5
- package/dist/SideNav.js +2 -2
- package/dist/Skeleton/SkeletonBox.js +1 -1
- package/dist/SkeletonAvatar/SkeletonAvatar.js +1 -1
- package/dist/SkeletonText/SkeletonText.js +3 -3
- package/dist/Spinner/Spinner.js +5 -5
- package/dist/SplitPageLayout/SplitPageLayout.js +6 -6
- package/dist/Stack/Stack.js +2 -2
- package/dist/StateLabel/StateLabel.js +2 -2
- package/dist/SubNav/SubNav.js +5 -5
- package/dist/TabNav/TabNav.js +4 -10
- package/dist/Text/Text.js +1 -1
- package/dist/TextInput/TextInput.js +13 -13
- package/dist/TextInputWithTokens/TextInputWithTokens.js +12 -15
- package/dist/Textarea/Textarea.js +7 -7
- package/dist/ThemeProvider.js +1 -2
- package/dist/Timeline/Timeline.js +11 -14
- package/dist/ToggleSwitch/ToggleSwitch.js +18 -18
- package/dist/Token/IssueLabelToken.js +3 -3
- package/dist/Token/Token.js +7 -7
- package/dist/Token/TokenBase.js +1 -1
- package/dist/Token/_RemoveTokenButton.js +4 -5
- package/dist/Token/_TokenTextContainer.js +1 -1
- package/dist/Tooltip/Tooltip.js +2 -5
- package/dist/TooltipV2/Tooltip.js +7 -7
- package/dist/TopicTag/TopicTag.js +1 -1
- package/dist/TopicTag/TopicTagGroup.js +1 -1
- package/dist/TreeView/TreeView.js +52 -59
- package/dist/TreeView/useTypeahead.js +3 -3
- package/dist/Truncate/Truncate.js +1 -2
- package/dist/UnderlineNav/UnderlineNav.js +18 -18
- package/dist/UnderlineNav/UnderlineNavItem.js +2 -2
- package/dist/VisuallyHidden/VisuallyHidden.js +1 -1
- package/dist/_VisuallyHidden.js +1 -1
- package/dist/deprecated/ActionList/Divider.js +1 -1
- package/dist/deprecated/ActionList/Group.js +2 -5
- package/dist/deprecated/ActionList/Header.js +2 -5
- package/dist/deprecated/ActionList/Item.js +17 -20
- package/dist/deprecated/ActionList/List.js +4 -13
- package/dist/deprecated/ActionMenu.js +4 -6
- package/dist/deprecated/DialogV1/Dialog.js +5 -5
- package/dist/deprecated/FilteredSearch/FilteredSearch.js +1 -1
- package/dist/deprecated/UnderlineNav/UnderlineNav.js +4 -4
- package/dist/experimental/IssueLabel/IssueLabel.js +4 -4
- package/dist/experimental/SelectPanel2/SelectPanel.js +42 -49
- package/dist/experimental/Tabs/Tabs.js +1 -1
- package/dist/experimental/UnderlinePanels/UnderlinePanels.js +6 -9
- package/dist/hooks/useMergedRefs.js +0 -12
- package/dist/hooks/useResponsiveValue.js +0 -5
- package/dist/hooks/useSlots.js +0 -48
- package/dist/internal/components/ButtonReset.js +1 -1
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.js +9 -9
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupCaption.js +1 -1
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupLabel.js +4 -4
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupValidation.js +1 -1
- package/dist/internal/components/ConditionalWrapper.js +2 -2
- package/dist/internal/components/InputLabel.js +3 -3
- package/dist/internal/components/InputValidation.js +4 -4
- package/dist/internal/components/OverflowObserverProvider.js +1 -1
- package/dist/internal/components/TextInputInnerAction.js +6 -6
- package/dist/internal/components/TextInputInnerVisualSlot.js +5 -5
- package/dist/internal/components/TextInputWrapper.js +2 -2
- package/dist/internal/components/ThemeProviderBase.js +3 -3
- package/dist/internal/components/UnderlineTabbedInterface.js +11 -11
- package/dist/internal/components/UnstyledTextInput.js +1 -1
- package/dist/internal/components/ValidationAnimationContainer.js +2 -2
- package/dist/internal/hooks/useOverflowObserver.js +1 -2
- package/dist/live-region/Announce.js +1 -1
- package/dist/live-region/AriaAlert.js +1 -1
- package/dist/live-region/AriaStatus.js +1 -1
- package/dist/next/ThemeProvider.js +1 -1
- package/dist/utils/descendant-registry.js +1 -7
- package/dist/utils/modern-polymorphic.js +0 -10
- 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 =
|
|
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.
|
|
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.
|
|
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",
|