@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.
- package/CHANGELOG.md +27 -3
- package/dist/ActionBar/ActionBar.js +2 -2
- package/dist/ActionList/Description.js +3 -3
- package/dist/ActionList/Divider.js +2 -2
- package/dist/ActionList/Group.js +4 -4
- package/dist/ActionList/GroupHeadingTrailingAction.js +2 -2
- package/dist/ActionList/Heading.js +3 -3
- package/dist/ActionList/Item.js +4 -4
- package/dist/ActionList/List.js +3 -3
- package/dist/ActionList/Selection.js +2 -2
- package/dist/ActionList/TrailingAction.js +3 -3
- package/dist/ActionList/Visuals.js +3 -3
- package/dist/ActionMenu/ActionMenu.js +2 -2
- package/dist/AnchoredOverlay/AnchoredOverlay.js +3 -3
- package/dist/Autocomplete/Autocomplete.js +2 -2
- package/dist/Autocomplete/AutocompleteInput.js +1 -1
- package/dist/Autocomplete/AutocompleteMenu.js +3 -3
- package/dist/Autocomplete/AutocompleteOverlay.js +3 -3
- package/dist/Avatar/Avatar.js +3 -3
- package/dist/AvatarStack/AvatarStack.js +3 -3
- package/dist/Banner/Banner.js +3 -3
- package/dist/BaseStyles.js +2 -2
- package/dist/Blankslate/Blankslate.js +3 -3
- package/dist/BranchName/BranchName.js +2 -2
- package/dist/Breadcrumbs/Breadcrumbs.js +3 -3
- package/dist/Button/Button.js +2 -2
- package/dist/Button/ButtonBase.js +4 -4
- package/dist/Button/IconButton.js +3 -3
- package/dist/Button/LinkButton.js +2 -2
- package/dist/ButtonGroup/ButtonGroup.js +3 -3
- package/dist/Card/Card.js +3 -3
- package/dist/Checkbox/Checkbox.js +2 -2
- package/dist/CheckboxGroup/CheckboxGroup.js +2 -2
- package/dist/CircleBadge/CircleBadge.js +2 -2
- package/dist/ConfirmationDialog/ConfirmationDialog.js +2 -2
- package/dist/CounterLabel/CounterLabel.js +3 -3
- package/dist/DataTable/DataTable.js +1 -1
- package/dist/DataTable/ErrorDialog.js +1 -1
- package/dist/DataTable/Pagination.js +5 -5
- package/dist/DataTable/Table-50e68700.css +2 -0
- package/dist/DataTable/Table-50e68700.css.map +1 -0
- package/dist/DataTable/Table.d.ts +1 -0
- package/dist/DataTable/Table.js +74 -44
- package/dist/DataTable/Table.module.css.js +7 -2
- package/dist/DataTable/TableGroup.d.ts +41 -0
- package/dist/DataTable/TableGroup.js +155 -0
- package/dist/DataTable/TableGroupContext.js +5 -0
- package/dist/DataTable/index.d.ts +3 -1
- package/dist/DataTable/index.js +2 -0
- package/dist/DataTable/useTable.js +1 -1
- package/dist/Details/Details.js +3 -3
- package/dist/Dialog/Dialog.js +3 -3
- package/dist/FeatureFlags/DefaultFeatureFlags.js +1 -2
- package/dist/FeatureFlags/FeatureFlags.js +2 -2
- package/dist/FeatureFlags/useFeatureFlag.js +1 -1
- package/dist/FilteredActionList/FilteredActionList.js +2 -2
- package/dist/FilteredActionList/FilteredActionListInput.js +2 -2
- package/dist/FilteredActionList/FilteredActionListLoaders.js +1 -1
- package/dist/Flash/Flash.js +3 -3
- package/dist/FormControl/FormControl.js +4 -4
- package/dist/FormControl/FormControlCaption.js +2 -2
- package/dist/FormControl/FormControlLabel.js +1 -1
- package/dist/FormControl/FormControlLeadingVisual.js +1 -1
- package/dist/FormControl/_FormControlContext.js +1 -1
- package/dist/FormControl/_FormControlValidation.js +1 -1
- package/dist/Header/Header.js +3 -3
- package/dist/Heading/Heading.js +3 -3
- package/dist/Hidden/Hidden.js +2 -2
- package/dist/InlineMessage/InlineMessage.js +2 -2
- package/dist/KeybindingHint/KeybindingHint.js +3 -3
- package/dist/KeybindingHint/components/Chord.js +4 -4
- package/dist/KeybindingHint/components/Key.js +1 -1
- package/dist/KeybindingHint/components/Sequence.js +3 -3
- package/dist/Label/Label.js +3 -3
- package/dist/LabelGroup/LabelGroup.js +2 -2
- package/dist/Link/Link.js +3 -3
- package/dist/NavList/NavList.js +6 -6
- package/dist/Octicon/Octicon.js +2 -2
- package/dist/Overlay/Overlay.js +2 -2
- package/dist/PageHeader/PageHeader.js +4 -4
- package/dist/PageLayout/DragHandle.js +2 -2
- package/dist/PageLayout/PageLayout.js +3 -3
- package/dist/PageLayout/usePaneWidth.js +1 -1
- package/dist/Pagehead/Pagehead.js +2 -2
- package/dist/Pagination/Pagination.js +4 -4
- package/dist/Popover/Popover.js +3 -3
- package/dist/Portal/Portal.js +1 -1
- package/dist/ProgressBar/ProgressBar.js +3 -3
- package/dist/Radio/Radio.js +3 -3
- package/dist/RadioGroup/RadioGroup.js +1 -1
- package/dist/RelativeTime/RelativeTime.js +1 -1
- package/dist/ScrollableRegion/ScrollableRegion.js +3 -3
- package/dist/SegmentedControl/SegmentedControl-e68d4197.css +2 -0
- package/dist/SegmentedControl/SegmentedControl-e68d4197.css.map +1 -0
- package/dist/SegmentedControl/SegmentedControl.d.ts +5 -1
- package/dist/SegmentedControl/SegmentedControl.js +204 -167
- package/dist/SegmentedControl/SegmentedControl.module.css.js +8 -4
- package/dist/SegmentedControl/SegmentedControlAction.d.ts +12 -0
- package/dist/SegmentedControl/SegmentedControlAction.js +111 -0
- package/dist/SegmentedControl/SegmentedControlActionContext.js +5 -0
- package/dist/SegmentedControl/SegmentedControlButton.js +2 -2
- package/dist/SegmentedControl/SegmentedControlDivider.d.ts +9 -0
- package/dist/SegmentedControl/SegmentedControlDivider.js +24 -0
- package/dist/SegmentedControl/SegmentedControlIconButton.js +2 -2
- package/dist/SegmentedControl/index.d.ts +3 -1
- package/dist/Select/Select.js +3 -3
- package/dist/SelectPanel/SelectPanel.js +3 -3
- package/dist/SelectPanel/SelectPanelMessage.js +2 -2
- package/dist/SideNav.js +2 -2
- package/dist/Skeleton/SkeletonBox.js +3 -3
- package/dist/SkeletonAvatar/SkeletonAvatar.js +2 -2
- package/dist/SkeletonText/SkeletonText.js +2 -2
- package/dist/Spinner/Spinner.js +3 -3
- package/dist/SplitPageLayout/SplitPageLayout.js +1 -1
- package/dist/Stack/Stack.js +3 -3
- package/dist/StateLabel/StateLabel.js +3 -3
- package/dist/SubNav/SubNav.js +3 -3
- package/dist/TabNav/TabNav.js +3 -3
- package/dist/Text/Text.js +2 -2
- package/dist/TextInput/TextInput.js +5 -5
- package/dist/TextInputWithTokens/TextInputWithTokens.js +3 -3
- package/dist/Textarea/Textarea.js +4 -4
- package/dist/ThemeProvider.js +2 -2
- package/dist/Timeline/Timeline.js +3 -3
- package/dist/ToggleSwitch/ToggleSwitch.js +4 -4
- package/dist/Token/IssueLabelToken.js +3 -3
- package/dist/Token/Token.js +3 -3
- package/dist/Token/TokenBase.js +3 -3
- package/dist/Token/_RemoveTokenButton.js +1 -1
- package/dist/Token/_TokenTextContainer.js +2 -2
- package/dist/Tooltip/Tooltip.js +2 -2
- package/dist/TooltipV2/Tooltip.js +16 -9
- package/dist/TopicTag/TopicTag.js +2 -2
- package/dist/TopicTag/TopicTagGroup.js +2 -2
- package/dist/TreeView/TreeView.js +9 -9
- package/dist/TreeView/useRovingTabIndex.js +1 -1
- package/dist/TreeView/useTreeItemCache.js +1 -1
- package/dist/TreeView/useTypeahead.js +1 -1
- package/dist/Truncate/Truncate.js +2 -2
- package/dist/UnderlineNav/UnderlineNav.js +3 -3
- package/dist/UnderlineNav/UnderlineNavItem.js +2 -2
- package/dist/VisuallyHidden/VisuallyHidden.js +2 -2
- package/dist/_VisuallyHidden.js +2 -2
- package/dist/deprecated/ActionList/Divider.js +1 -1
- package/dist/deprecated/ActionList/Group.js +1 -1
- package/dist/deprecated/ActionList/Header.js +2 -2
- package/dist/deprecated/ActionList/Item.js +4 -4
- package/dist/deprecated/ActionList/List.js +3 -3
- package/dist/deprecated/ActionMenu.js +2 -2
- package/dist/deprecated/DialogV1/Dialog.js +4 -4
- package/dist/deprecated/FilteredSearch/FilteredSearch.js +2 -2
- package/dist/deprecated/UnderlineNav/UnderlineNav.js +3 -3
- package/dist/experimental/IssueLabel/IssueLabel.js +2 -2
- package/dist/experimental/SelectPanel2/SelectPanel.js +5 -5
- package/dist/experimental/Tabs/Tabs.js +23 -26
- package/dist/experimental/Tabs/useTab.js +1 -1
- package/dist/experimental/Tabs/useTabList.js +17 -21
- package/dist/experimental/Tabs/useTabPanel.js +1 -1
- package/dist/experimental/UnderlinePanels/UnderlinePanels.js +10 -15
- package/dist/experimental/index.d.ts +5 -4
- package/dist/experimental/index.js +1 -1
- package/dist/hooks/useDetails.js +1 -1
- package/dist/hooks/useDialog.js +1 -1
- package/dist/hooks/useMedia.js +1 -1
- package/dist/hooks/useMenuInitialFocus.js +1 -1
- package/dist/hooks/useMenuKeyboardNavigation.js +1 -1
- package/dist/hooks/useMergedRefs.js +1 -1
- package/dist/hooks/useMnemonics.js +1 -1
- package/dist/hooks/useOpenAndCloseFocus.js +1 -1
- package/dist/hooks/useOverflow.js +5 -5
- package/dist/hooks/useOverlay.js +1 -1
- package/dist/hooks/useProvidedStateOrCreate.js +1 -1
- package/dist/hooks/useRefObjectAsForwardedRef.js +1 -1
- package/dist/hooks/useRenderForcingRef.js +1 -1
- package/dist/hooks/useScrollFlash.js +1 -1
- package/dist/hooks/useSyncedState.js +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +3 -1
- package/dist/internal/components/ButtonReset.js +2 -2
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.js +4 -4
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupCaption.js +3 -3
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupLabel.js +3 -3
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupValidation.js +2 -2
- package/dist/internal/components/ConditionalWrapper.js +1 -1
- package/dist/internal/components/InputLabel.js +2 -2
- package/dist/internal/components/InputValidation.js +2 -2
- package/dist/internal/components/OverflowObserverProvider.js +2 -2
- package/dist/internal/components/TextInputInnerAction.js +4 -4
- package/dist/internal/components/TextInputInnerVisualSlot.js +2 -2
- package/dist/internal/components/TextInputWrapper.js +3 -3
- package/dist/internal/components/ThemeProviderBase.js +1 -1
- package/dist/internal/components/UnderlineTabbedInterface.js +3 -3
- package/dist/internal/components/UnstyledTextInput.js +3 -3
- package/dist/internal/components/ValidationAnimationContainer.js +2 -2
- package/dist/internal/hooks/useEffectCallback.js +1 -1
- package/dist/internal/hooks/useEffectOnce.js +1 -1
- package/dist/internal/hooks/useOverflowObserver.js +1 -1
- package/dist/internal/hooks/useThemeProvider.js +1 -1
- package/dist/live-region/Announce.js +2 -2
- package/dist/live-region/AriaAlert.d.ts +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 +2 -2
- package/dist/utils/react-compiler-runtime.js +32 -0
- package/generated/components.json +175 -8
- package/package.json +8 -8
- package/dist/DataTable/Table-7f5cb3e4.css +0 -2
- package/dist/DataTable/Table-7f5cb3e4.css.map +0 -1
- package/dist/SegmentedControl/SegmentedControl-4ef72733.css +0 -2
- package/dist/SegmentedControl/SegmentedControl-4ef72733.css.map +0 -1
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { Announce, AnnounceProps } from "../live-region/Announce.js";
|
|
2
|
+
import { AriaAlert, AriaAlertProps } from "../live-region/AriaAlert.js";
|
|
3
|
+
import { AriaStatus, AriaStatusProps } from "../live-region/AriaStatus.js";
|
|
1
4
|
import { KeybindingHintProps } from "../KeybindingHint/props.js";
|
|
2
5
|
import { KeybindingHint } from "../KeybindingHint/KeybindingHint.js";
|
|
3
6
|
import { getAccessibleKeybindingHintString } from "../KeybindingHint/utils.js";
|
|
@@ -26,15 +29,13 @@ import { CardActionProps as ActionProps, CardDescriptionProps as DescriptionProp
|
|
|
26
29
|
import { Card } from "../Card/index.js";
|
|
27
30
|
import { DataTable, DataTableProps } from "../DataTable/DataTable.js";
|
|
28
31
|
import { TableActionsProps, TableBodyProps, TableCellProps, TableContainerProps, TableHeadProps, TableHeaderProps, TableProps, TableRowProps, TableSubtitleProps, TableTitleProps } from "../DataTable/Table.js";
|
|
32
|
+
import { TableGroupProps } from "../DataTable/TableGroup.js";
|
|
29
33
|
import { Table } from "../DataTable/index.js";
|
|
30
34
|
import { InlineMessage, InlineMessageProps } from "../InlineMessage/InlineMessage.js";
|
|
31
35
|
import { Hidden, HiddenProps } from "../Hidden/Hidden.js";
|
|
32
36
|
import { useOverflow } from "../hooks/useOverflow.js";
|
|
33
37
|
import { SelectPanel, SelectPanelMessageProps, SelectPanelProps, SelectPanelSecondaryActionProps } from "./SelectPanel2/SelectPanel.js";
|
|
34
38
|
import { ScrollableRegion, ScrollableRegionProps } from "../ScrollableRegion/ScrollableRegion.js";
|
|
35
|
-
import { Announce, AnnounceProps } from "../live-region/Announce.js";
|
|
36
|
-
import { AriaAlert, AriaAlertProps } from "../live-region/AriaAlert.js";
|
|
37
|
-
import { AriaStatus, AriaStatusProps } from "../live-region/AriaStatus.js";
|
|
38
39
|
import _default, { PanelProps, TabProps as TabProps$1, UnderlinePanelsProps } from "./UnderlinePanels/UnderlinePanels.js";
|
|
39
40
|
import { SkeletonText, SkeletonTextProps } from "../SkeletonText/SkeletonText.js";
|
|
40
41
|
import { SkeletonAvatar, SkeletonAvatarProps } from "../SkeletonAvatar/SkeletonAvatar.js";
|
|
@@ -50,4 +51,4 @@ import { useTabPanel } from "./Tabs/useTabPanel.js";
|
|
|
50
51
|
import { TopicTagProps } from "../TopicTag/TopicTag.js";
|
|
51
52
|
import { TopicTagGroupProps } from "../TopicTag/TopicTagGroup.js";
|
|
52
53
|
import { TopicTag } from "../TopicTag/index.js";
|
|
53
|
-
export { ActionBar, type ActionBarButtonProps, type ActionBarMenuItemProps, type ActionBarMenuProps, type ActionBarProps, Announce, type AnnounceProps, AriaAlert, type AriaAlertProps, AriaStatus, type AriaStatusProps, BlankslateContainer as Blankslate, type BlankslateProps, ButtonBase, type ButtonBaseProps, Card, type ActionProps as CardActionProps, type DescriptionProps as CardDescriptionProps, type HeadingProps as CardHeadingProps, type IconProps as CardIconProps, type ImageProps as CardImageProps, type MetadataProps as CardMetadataProps, type CardProps, type CellAlignment, type Column, type ColumnWidth, DataTable, type DataTableProps, DefaultFeatureFlags, Dialog, type DialogButtonProps, type DialogHeaderProps, type DialogHeight, type DialogProps, type DialogWidth, FeatureFlags, type FeatureFlagsProps, FilteredActionList, type FilteredActionListInputProps, FilteredActionListLoadingTypes, type FilteredActionListProps, Hidden, type HiddenProps, InlineMessage, type InlineMessageProps, IssueLabel, type IssueLabelProps, KeybindingHint, type KeybindingHintProps, NavList, type NavListDividerProps, type NavListGroupProps, type NavListItemProps, type NavListLeadingVisualProps, type NavListProps, type NavListSubNavProps, type NavListTrailingVisualProps, type ObjectPaths, PageHeader, type ActionsProps as PageHeaderActionsProps, type PageHeaderProps, type TitleProps as PageHeaderTitleProps, ScrollableRegion, type ScrollableRegionProps, SelectPanel, type SelectPanelMessageProps, type SelectPanelProps, type SelectPanelSecondaryActionProps, SkeletonAvatar, type SkeletonAvatarProps, SkeletonBox, type SkeletonBoxProps, SkeletonText, type SkeletonTextProps, SlotConfig, Stack, type StackItemProps, type StackProps, type TabListProps, type TabPanelProps, type TabProps, Table, type TableActionsProps, type TableBodyProps, type TableCellProps, type TableContainerProps, type TableHeadProps, type TableHeaderProps, type TableProps, type TableRowProps, type TableSubtitleProps, type TableTitleProps, Tabs, type TabsProps, type TitleProps, Tooltip, type TooltipProps, TopicTag, type TopicTagGroupProps, type TopicTagProps, _default as UnderlinePanels, type PanelProps as UnderlinePanelsPanelProps, type UnderlinePanelsProps, type TabProps$1 as UnderlinePanelsTabProps, type UniqueRow, createColumnHelper, getAccessibleKeybindingHintString, useFeatureFlag, useOverflow, useSlots, useTab, useTabList, useTabPanel };
|
|
54
|
+
export { ActionBar, type ActionBarButtonProps, type ActionBarMenuItemProps, type ActionBarMenuProps, type ActionBarProps, Announce, type AnnounceProps, AriaAlert, type AriaAlertProps, AriaStatus, type AriaStatusProps, BlankslateContainer as Blankslate, type BlankslateProps, ButtonBase, type ButtonBaseProps, Card, type ActionProps as CardActionProps, type DescriptionProps as CardDescriptionProps, type HeadingProps as CardHeadingProps, type IconProps as CardIconProps, type ImageProps as CardImageProps, type MetadataProps as CardMetadataProps, type CardProps, type CellAlignment, type Column, type ColumnWidth, DataTable, type DataTableProps, DefaultFeatureFlags, Dialog, type DialogButtonProps, type DialogHeaderProps, type DialogHeight, type DialogProps, type DialogWidth, FeatureFlags, type FeatureFlagsProps, FilteredActionList, type FilteredActionListInputProps, FilteredActionListLoadingTypes, type FilteredActionListProps, Hidden, type HiddenProps, InlineMessage, type InlineMessageProps, IssueLabel, type IssueLabelProps, KeybindingHint, type KeybindingHintProps, NavList, type NavListDividerProps, type NavListGroupProps, type NavListItemProps, type NavListLeadingVisualProps, type NavListProps, type NavListSubNavProps, type NavListTrailingVisualProps, type ObjectPaths, PageHeader, type ActionsProps as PageHeaderActionsProps, type PageHeaderProps, type TitleProps as PageHeaderTitleProps, ScrollableRegion, type ScrollableRegionProps, SelectPanel, type SelectPanelMessageProps, type SelectPanelProps, type SelectPanelSecondaryActionProps, SkeletonAvatar, type SkeletonAvatarProps, SkeletonBox, type SkeletonBoxProps, SkeletonText, type SkeletonTextProps, SlotConfig, Stack, type StackItemProps, type StackProps, type TabListProps, type TabPanelProps, type TabProps, Table, type TableActionsProps, type TableBodyProps, type TableCellProps, type TableContainerProps, type TableGroupProps, type TableHeadProps, type TableHeaderProps, type TableProps, type TableRowProps, type TableSubtitleProps, type TableTitleProps, Tabs, type TabsProps, type TitleProps, Tooltip, type TooltipProps, TopicTag, type TopicTagGroupProps, type TopicTagProps, _default as UnderlinePanels, type PanelProps as UnderlinePanelsPanelProps, type UnderlinePanelsProps, type TabProps$1 as UnderlinePanelsTabProps, type UniqueRow, createColumnHelper, getAccessibleKeybindingHintString, useFeatureFlag, useOverflow, useSlots, useTab, useTabList, useTabPanel };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useSlots } from "../hooks/useSlots.js";
|
|
3
2
|
import { Announce } from "../live-region/Announce.js";
|
|
4
3
|
import { AriaAlert } from "../live-region/AriaAlert.js";
|
|
5
4
|
import { AriaStatus } from "../live-region/AriaStatus.js";
|
|
5
|
+
import { useSlots } from "../hooks/useSlots.js";
|
|
6
6
|
import { ButtonBase } from "../Button/ButtonBase.js";
|
|
7
7
|
import { DefaultFeatureFlags } from "../FeatureFlags/DefaultFeatureFlags.js";
|
|
8
8
|
import { FeatureFlags } from "../FeatureFlags/FeatureFlags.js";
|
package/dist/hooks/useDetails.js
CHANGED
package/dist/hooks/useDialog.js
CHANGED
package/dist/hooks/useMedia.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { c } from "../utils/react-compiler-runtime.js";
|
|
1
2
|
import { warning } from "../utils/warning.js";
|
|
2
3
|
import { MatchMediaContext } from "./MatchMediaContext.js";
|
|
3
|
-
import { c } from "react-compiler-runtime";
|
|
4
4
|
import { useContext, useSyncExternalStore } from "react";
|
|
5
5
|
//#region src/hooks/useMedia.ts
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { c } from "../utils/react-compiler-runtime.js";
|
|
1
2
|
import { useMenuInitialFocus } from "./useMenuInitialFocus.js";
|
|
2
3
|
import { useMnemonics } from "./useMnemonics.js";
|
|
3
|
-
import { c } from "react-compiler-runtime";
|
|
4
4
|
import React from "react";
|
|
5
5
|
import { iterateFocusableElements } from "@primer/behaviors/utils";
|
|
6
6
|
//#region src/hooks/useMenuKeyboardNavigation.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { c } from "../utils/react-compiler-runtime.js";
|
|
1
2
|
import { isExperimentalReactVersion, reactMajorVersion } from "../utils/environment.js";
|
|
2
|
-
import { c } from "react-compiler-runtime";
|
|
3
3
|
import { version } from "react";
|
|
4
4
|
//#region src/hooks/useMergedRefs.ts
|
|
5
5
|
var _version$split$;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { c } from "../utils/react-compiler-runtime.js";
|
|
1
2
|
import { useProvidedRefOrCreate } from "./useProvidedRefOrCreate.js";
|
|
2
|
-
import { c } from "react-compiler-runtime";
|
|
3
3
|
import React from "react";
|
|
4
4
|
import { iterateFocusableElements } from "@primer/behaviors/utils";
|
|
5
5
|
//#region src/hooks/useMnemonics.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c } from "react-compiler-runtime";
|
|
1
|
+
import { c } from "../utils/react-compiler-runtime.js";
|
|
2
2
|
import { useEffect, useState } from "react";
|
|
3
3
|
//#region src/hooks/useOverflow.ts
|
|
4
4
|
function useOverflow(ref) {
|
|
@@ -10,10 +10,7 @@ function useOverflow(ref) {
|
|
|
10
10
|
t0 = () => {
|
|
11
11
|
if (ref.current === null) return;
|
|
12
12
|
const observer = new ResizeObserver((entries) => {
|
|
13
|
-
|
|
14
|
-
setHasOverflow(true);
|
|
15
|
-
break;
|
|
16
|
-
}
|
|
13
|
+
setHasOverflow(entries.some(_temp));
|
|
17
14
|
});
|
|
18
15
|
observer.observe(ref.current);
|
|
19
16
|
return () => {
|
|
@@ -31,5 +28,8 @@ function useOverflow(ref) {
|
|
|
31
28
|
useEffect(t0, t1);
|
|
32
29
|
return hasOverflow;
|
|
33
30
|
}
|
|
31
|
+
function _temp(entry) {
|
|
32
|
+
return entry.target.scrollHeight > entry.target.clientHeight || entry.target.scrollWidth > entry.target.clientWidth;
|
|
33
|
+
}
|
|
34
34
|
//#endregion
|
|
35
35
|
export { useOverflow };
|
package/dist/hooks/useOverlay.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { c } from "../utils/react-compiler-runtime.js";
|
|
1
2
|
import { useOnOutsideClick } from "./useOnOutsideClick.js";
|
|
2
3
|
import { useProvidedRefOrCreate } from "./useProvidedRefOrCreate.js";
|
|
3
4
|
import { useOnEscapePress } from "./useOnEscapePress.js";
|
|
4
5
|
import { useOpenAndCloseFocus } from "./useOpenAndCloseFocus.js";
|
|
5
|
-
import { c } from "react-compiler-runtime";
|
|
6
6
|
//#region src/hooks/useOverlay.tsx
|
|
7
7
|
const useOverlay = (t0) => {
|
|
8
8
|
const $ = c(13);
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ import { useOpenAndCloseFocus } from "./hooks/useOpenAndCloseFocus.js";
|
|
|
6
6
|
import { AnchoredPositionHookSettings, useAnchoredPosition } from "./hooks/useAnchoredPosition.js";
|
|
7
7
|
import { useOverlay } from "./hooks/useOverlay.js";
|
|
8
8
|
import theme, { ThemeColorPaths, ThemeShadowPaths } from "./theme.js";
|
|
9
|
+
import { AriaAlert, AriaAlertProps } from "./live-region/AriaAlert.js";
|
|
10
|
+
import { AriaStatus, AriaStatusProps } from "./live-region/AriaStatus.js";
|
|
9
11
|
import BaseStyles, { BaseStylesProps } from "./BaseStyles.js";
|
|
10
12
|
import { ThemeProvider, ThemeProviderProps } from "./ThemeProvider.js";
|
|
11
13
|
import { useColorSchemeVar, useTheme } from "./useTheme.js";
|
|
@@ -86,6 +88,8 @@ import { ProgressBarItemProps, ProgressBarProps } from "./ProgressBar/ProgressBa
|
|
|
86
88
|
import { ProgressBar } from "./ProgressBar/index.js";
|
|
87
89
|
import _default$10, { RadioGroupProps } from "./RadioGroup/RadioGroup.js";
|
|
88
90
|
import RelativeTime, { RelativeTimeProps } from "./RelativeTime/RelativeTime.js";
|
|
91
|
+
import { SegmentedControlDividerProps } from "./SegmentedControl/SegmentedControlDivider.js";
|
|
92
|
+
import { SegmentedControlActionProps } from "./SegmentedControl/SegmentedControlAction.js";
|
|
89
93
|
import { SegmentedControlButtonProps } from "./SegmentedControl/SegmentedControlButton.js";
|
|
90
94
|
import { SegmentedControlIconButtonProps } from "./SegmentedControl/SegmentedControlIconButton.js";
|
|
91
95
|
import { SegmentedControl, SegmentedControlProps } from "./SegmentedControl/SegmentedControl.js";
|
|
@@ -119,4 +123,4 @@ import { ActionsProps, ChildrenPropTypes, PageHeader, PageHeaderProps, TitleArea
|
|
|
119
123
|
import { SkeletonBox, SkeletonBoxProps } from "./Skeleton/SkeletonBox.js";
|
|
120
124
|
import { ActionMenu, ActionMenuAnchorProps, ActionMenuButtonProps, ActionMenuProps } from "./ActionMenu/ActionMenu.js";
|
|
121
125
|
import Overlay, { OverlayProps } from "./Overlay/Overlay.js";
|
|
122
|
-
export { ActionBar, type ActionBarProps, ActionList, type ActionListDescriptionProps, type ActionListDividerProps, type ActionListGroupHeadingProps, type ActionListGroupHeadingTrailingActionProps, type ActionListGroupProps, type ActionListItemProps, type ActionListLeadingVisualProps, type ActionListLinkItemProps, type ActionListProps, type ActionListTrailingActionProps, type ActionListTrailingVisualProps, ActionMenu, type ActionMenuAnchorProps, type ActionMenuButtonProps, type ActionMenuProps, AnchoredOverlay, type AnchoredOverlayProps, type AnchoredPositionHookSettings, _default as Autocomplete, type AutocompleteInputProps, type AutocompleteMenuProps, type AutocompleteOverlayProps, Avatar, type AvatarProps, AvatarStack, type AvatarStackProps, Banner, type BannerProps, BaseStyles, type BaseStylesProps, _default$1 as BranchName, type BranchNameProps, Breadcrumb, type BreadcrumbItemProps, type BreadcrumbProps, _default$2 as Breadcrumbs, type BreadcrumbsItemProps, type BreadcrumbsProps, ButtonComponent as Button, ButtonBase, type ButtonBaseProps, ButtonGroup, type ButtonGroupProps, type ButtonProps, _default$3 as Checkbox, _default$4 as CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, _default$5 as CircleBadge, type CircleBadgeIconProps, type CircleBadgeProps, ConfirmationDialog, type ConfirmationDialogProps, CounterLabel, type CounterLabelProps, type CustomWidthOptions, Details, type DetailsProps, Dialog, type DialogButtonProps, type DialogHeaderProps, type DialogHeight, type DialogProps, type DialogWidth, DragHandle, type DragHandleProps, type FCWithSlotMarker, Flash, type FlashProps, FocusKeys, type FocusTrapHookSettings, type FocusZoneHookSettings, _default$6 as FormControl, type FormControlCaptionProps, type Props as FormControlLabelProps, type FormControlProps, type FormControlValidationProps, _default$7 as Header, type HeaderItemProps, type HeaderLinkProps, type HeaderProps, Heading, type HeadingProps, IconButton, type IconButtonProps, IssueLabelToken, type IssueLabelTokenProps, Label, type LabelColorOptions, LabelGroup, type LabelGroupProps, type LabelProps, Link, LinkButton, type LinkButtonProps, type LinkProps, NavList, type NavListDividerProps, type NavListGroupHeadingProps, type NavListGroupProps, type NavListItemProps, type NavListLeadingVisualProps, type NavListProps, type NavListSubNavProps, type NavListTrailingVisualProps, Overlay, type OverlayProps, PageHeader, type ActionsProps as PageHeaderActionsProps, type ChildrenPropTypes as PageHeaderChildrenPropTypes, type PageHeaderProps, type TitleAreaProps as PageHeaderTitleAreaProps, type TitleProps as PageHeaderTitleProps, PageLayout, type PageLayoutContentProps, type PageLayoutFooterProps, type PageLayoutHeaderProps, type PageLayoutPaneProps, type PageLayoutProps, Pagination, type PaginationProps, type PaneWidth, type PaneWidthValue, _default$8 as Popover, type PopoverContentProps, type PopoverProps, Portal, PortalContext, type PortalProps, ProgressBar, type ProgressBarItemProps, type ProgressBarProps, _default$9 as Radio, _default$10 as RadioGroup, type RadioGroupProps, type RadioProps, RelativeTime, type RelativeTimeProps, type ResponsiveValue, SegmentedControl, type SegmentedControlButtonProps, type SegmentedControlIconButtonProps, type SegmentedControlProps, _default$11 as Select, SelectPanel, type GroupedListProps as SelectPanelGroupedListProps, type ItemInput as SelectPanelItemInput, type FilteredActionListItemProps as SelectPanelItemProps, type SelectPanelProps, type SelectProps, _default$12 as SideNav, type SideNavLinkProps, type SideNavProps, SkeletonBox, type SkeletonBoxProps, type SlotMarker, Spinner, type SpinnerProps, SplitPageLayout, type SplitPageLayoutContentProps, type SplitPageLayoutFooterProps, type SplitPageLayoutHeaderProps, type SplitPageLayoutPaneProps, type SplitPageLayoutProps, Stack, type StackItemProps, type StackProps, StateLabel, type StateLabelProps, _default$13 as SubNav, type SubNavLinkProps, type SubNavLinksProps, type SubNavProps, _default$14 as Text, _default$15 as TextInput, type TextInputActionProps, type TextInputProps, _default$16 as TextInputWithTokens, type TextInputWithTokensProps, type TextProps, _default$17 as Textarea, type TextareaProps, type ThemeColorPaths, ThemeProvider, type ThemeProviderProps, type ThemeShadowPaths, _default$18 as Timeline, type TimelineActionsProps, type TimelineAvatarProps, type TimelineBadgeProps, type TimelineBadgeVariant, type TimelineBodyProps, type TimelineBreakProps, type TimelineItemProps, type TimelineItemsProps, type TimelineProps, ToggleSwitch, type ToggleSwitchProps, Token, type TokenProps, Tooltip, type TooltipProps, type TouchOrMouseEvent, TreeView, type TreeViewErrorDialogProps, type TreeViewItemProps, type TreeViewProps, type TreeViewSubTreeProps, type TreeViewVisualProps, Truncate, type TruncateProps, UnderlineNav, type UnderlineNavItemProps, type UnderlineNavProps, type UsePaneWidthOptions, type UsePaneWidthResult, VisuallyHidden, type VisuallyHiddenProps, type WithSlotMarker, asSlot, createComponent, defaultPaneWidth, isSlot, registerPortalRoot, theme, useAnchoredPosition, useColorSchemeVar, useConfirm, useDetails, useFocusTrap, useFocusZone, useFormControlForwardedProps, useId, useIsomorphicLayoutEffect, useMergedRefs, useOnEscapePress, useOnOutsideClick, useOpenAndCloseFocus, useOverlay, usePaneWidth, useProvidedRefOrCreate, useRefObjectAsForwardedRef, useResizeObserver, useResponsiveValue, useRovingTabIndex, useSafeTimeout, useSlots, useSyncedState, useTheme };
|
|
126
|
+
export { ActionBar, type ActionBarProps, ActionList, type ActionListDescriptionProps, type ActionListDividerProps, type ActionListGroupHeadingProps, type ActionListGroupHeadingTrailingActionProps, type ActionListGroupProps, type ActionListItemProps, type ActionListLeadingVisualProps, type ActionListLinkItemProps, type ActionListProps, type ActionListTrailingActionProps, type ActionListTrailingVisualProps, ActionMenu, type ActionMenuAnchorProps, type ActionMenuButtonProps, type ActionMenuProps, AnchoredOverlay, type AnchoredOverlayProps, type AnchoredPositionHookSettings, AriaAlert, type AriaAlertProps, AriaStatus, type AriaStatusProps, _default as Autocomplete, type AutocompleteInputProps, type AutocompleteMenuProps, type AutocompleteOverlayProps, Avatar, type AvatarProps, AvatarStack, type AvatarStackProps, Banner, type BannerProps, BaseStyles, type BaseStylesProps, _default$1 as BranchName, type BranchNameProps, Breadcrumb, type BreadcrumbItemProps, type BreadcrumbProps, _default$2 as Breadcrumbs, type BreadcrumbsItemProps, type BreadcrumbsProps, ButtonComponent as Button, ButtonBase, type ButtonBaseProps, ButtonGroup, type ButtonGroupProps, type ButtonProps, _default$3 as Checkbox, _default$4 as CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, _default$5 as CircleBadge, type CircleBadgeIconProps, type CircleBadgeProps, ConfirmationDialog, type ConfirmationDialogProps, CounterLabel, type CounterLabelProps, type CustomWidthOptions, Details, type DetailsProps, Dialog, type DialogButtonProps, type DialogHeaderProps, type DialogHeight, type DialogProps, type DialogWidth, DragHandle, type DragHandleProps, type FCWithSlotMarker, Flash, type FlashProps, FocusKeys, type FocusTrapHookSettings, type FocusZoneHookSettings, _default$6 as FormControl, type FormControlCaptionProps, type Props as FormControlLabelProps, type FormControlProps, type FormControlValidationProps, _default$7 as Header, type HeaderItemProps, type HeaderLinkProps, type HeaderProps, Heading, type HeadingProps, IconButton, type IconButtonProps, IssueLabelToken, type IssueLabelTokenProps, Label, type LabelColorOptions, LabelGroup, type LabelGroupProps, type LabelProps, Link, LinkButton, type LinkButtonProps, type LinkProps, NavList, type NavListDividerProps, type NavListGroupHeadingProps, type NavListGroupProps, type NavListItemProps, type NavListLeadingVisualProps, type NavListProps, type NavListSubNavProps, type NavListTrailingVisualProps, Overlay, type OverlayProps, PageHeader, type ActionsProps as PageHeaderActionsProps, type ChildrenPropTypes as PageHeaderChildrenPropTypes, type PageHeaderProps, type TitleAreaProps as PageHeaderTitleAreaProps, type TitleProps as PageHeaderTitleProps, PageLayout, type PageLayoutContentProps, type PageLayoutFooterProps, type PageLayoutHeaderProps, type PageLayoutPaneProps, type PageLayoutProps, Pagination, type PaginationProps, type PaneWidth, type PaneWidthValue, _default$8 as Popover, type PopoverContentProps, type PopoverProps, Portal, PortalContext, type PortalProps, ProgressBar, type ProgressBarItemProps, type ProgressBarProps, _default$9 as Radio, _default$10 as RadioGroup, type RadioGroupProps, type RadioProps, RelativeTime, type RelativeTimeProps, type ResponsiveValue, SegmentedControl, type SegmentedControlActionProps, type SegmentedControlButtonProps, type SegmentedControlDividerProps, type SegmentedControlIconButtonProps, type SegmentedControlProps, _default$11 as Select, SelectPanel, type GroupedListProps as SelectPanelGroupedListProps, type ItemInput as SelectPanelItemInput, type FilteredActionListItemProps as SelectPanelItemProps, type SelectPanelProps, type SelectProps, _default$12 as SideNav, type SideNavLinkProps, type SideNavProps, SkeletonBox, type SkeletonBoxProps, type SlotMarker, Spinner, type SpinnerProps, SplitPageLayout, type SplitPageLayoutContentProps, type SplitPageLayoutFooterProps, type SplitPageLayoutHeaderProps, type SplitPageLayoutPaneProps, type SplitPageLayoutProps, Stack, type StackItemProps, type StackProps, StateLabel, type StateLabelProps, _default$13 as SubNav, type SubNavLinkProps, type SubNavLinksProps, type SubNavProps, _default$14 as Text, _default$15 as TextInput, type TextInputActionProps, type TextInputProps, _default$16 as TextInputWithTokens, type TextInputWithTokensProps, type TextProps, _default$17 as Textarea, type TextareaProps, type ThemeColorPaths, ThemeProvider, type ThemeProviderProps, type ThemeShadowPaths, _default$18 as Timeline, type TimelineActionsProps, type TimelineAvatarProps, type TimelineBadgeProps, type TimelineBadgeVariant, type TimelineBodyProps, type TimelineBreakProps, type TimelineItemProps, type TimelineItemsProps, type TimelineProps, ToggleSwitch, type ToggleSwitchProps, Token, type TokenProps, Tooltip, type TooltipProps, type TouchOrMouseEvent, TreeView, type TreeViewErrorDialogProps, type TreeViewItemProps, type TreeViewProps, type TreeViewSubTreeProps, type TreeViewVisualProps, Truncate, type TruncateProps, UnderlineNav, type UnderlineNavItemProps, type UnderlineNavProps, type UsePaneWidthOptions, type UsePaneWidthResult, VisuallyHidden, type VisuallyHiddenProps, type WithSlotMarker, asSlot, createComponent, defaultPaneWidth, isSlot, registerPortalRoot, theme, useAnchoredPosition, useColorSchemeVar, useConfirm, useDetails, useFocusTrap, useFocusZone, useFormControlForwardedProps, useId, useIsomorphicLayoutEffect, useMergedRefs, useOnEscapePress, useOnOutsideClick, useOpenAndCloseFocus, useOverlay, usePaneWidth, useProvidedRefOrCreate, useRefObjectAsForwardedRef, useResizeObserver, useResponsiveValue, useRovingTabIndex, useSafeTimeout, useSlots, useSyncedState, useTheme };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import theme from "./theme.js";
|
|
3
|
+
import { AriaAlert } from "./live-region/AriaAlert.js";
|
|
4
|
+
import { AriaStatus } from "./live-region/AriaStatus.js";
|
|
3
5
|
import BaseStyles from "./BaseStyles.js";
|
|
4
6
|
import { useSyncedState } from "./hooks/useSyncedState.js";
|
|
5
7
|
import { useColorSchemeVar, useTheme } from "./useTheme.js";
|
|
@@ -94,4 +96,4 @@ import { TreeView } from "./TreeView/TreeView.js";
|
|
|
94
96
|
import { UnderlineNav } from "./UnderlineNav/index.js";
|
|
95
97
|
import { ActionBar } from "./ActionBar/index.js";
|
|
96
98
|
import { PageHeader } from "./PageHeader/PageHeader.js";
|
|
97
|
-
export { ActionBar, ActionList, ActionMenu, AnchoredOverlay, Autocomplete_default as Autocomplete, Avatar, AvatarStack, Banner, BaseStyles, BranchName_default as BranchName, Breadcrumb, Breadcrumbs_default as Breadcrumbs, ButtonComponent as Button, ButtonBase, ButtonGroup, Checkbox, CheckboxGroup_default as CheckboxGroup, CircleBadge_default as CircleBadge, ConfirmationDialog, CounterLabel, Details, Dialog, DragHandle, Flash, FocusKeys, FormControl_default as FormControl, Header_default as Header, Heading, IconButton, IssueLabelToken, Label_default as Label, LabelGroup, Link, LinkButton, NavList, Overlay, PageHeader, PageLayout, Pagination_default as Pagination, Popover_default as Popover, Portal_default as Portal, PortalContext, ProgressBar, Radio, RadioGroup_default as RadioGroup, RelativeTime, SegmentedControl, Select_default as Select, SelectPanel, SideNav_default as SideNav, SkeletonBox, Spinner, SplitPageLayout, Stack, StateLabel, SubNav_default as SubNav, Text_default as Text, TextInput_default as TextInput, TextInputWithTokens, Textarea, ThemeProvider, Timeline_default as Timeline, ToggleSwitch, Token, Tooltip, TreeView, Truncate, UnderlineNav, VisuallyHidden, asSlot, createComponent, defaultPaneWidth, isSlot, registerPortalRoot, theme, useAnchoredPosition, useColorSchemeVar, useConfirm, useDetails, useFocusTrap, useFocusZone, useFormControlForwardedProps, useId, useIsomorphicLayoutEffect, useMergedRefs, useOnEscapePress, useOnOutsideClick, useOpenAndCloseFocus, useOverlay, usePaneWidth, useProvidedRefOrCreate, useRefObjectAsForwardedRef, useResizeObserver, useResponsiveValue, useRovingTabIndex, useSafeTimeout, useSlots, useSyncedState, useTheme };
|
|
99
|
+
export { ActionBar, ActionList, ActionMenu, AnchoredOverlay, AriaAlert, AriaStatus, Autocomplete_default as Autocomplete, Avatar, AvatarStack, Banner, BaseStyles, BranchName_default as BranchName, Breadcrumb, Breadcrumbs_default as Breadcrumbs, ButtonComponent as Button, ButtonBase, ButtonGroup, Checkbox, CheckboxGroup_default as CheckboxGroup, CircleBadge_default as CircleBadge, ConfirmationDialog, CounterLabel, Details, Dialog, DragHandle, Flash, FocusKeys, FormControl_default as FormControl, Header_default as Header, Heading, IconButton, IssueLabelToken, Label_default as Label, LabelGroup, Link, LinkButton, NavList, Overlay, PageHeader, PageLayout, Pagination_default as Pagination, Popover_default as Popover, Portal_default as Portal, PortalContext, ProgressBar, Radio, RadioGroup_default as RadioGroup, RelativeTime, SegmentedControl, Select_default as Select, SelectPanel, SideNav_default as SideNav, SkeletonBox, Spinner, SplitPageLayout, Stack, StateLabel, SubNav_default as SubNav, Text_default as Text, TextInput_default as TextInput, TextInputWithTokens, Textarea, ThemeProvider, Timeline_default as Timeline, ToggleSwitch, Token, Tooltip, TreeView, Truncate, UnderlineNav, VisuallyHidden, asSlot, createComponent, defaultPaneWidth, isSlot, registerPortalRoot, theme, useAnchoredPosition, useColorSchemeVar, useConfirm, useDetails, useFocusTrap, useFocusZone, useFormControlForwardedProps, useId, useIsomorphicLayoutEffect, useMergedRefs, useOnEscapePress, useOnOutsideClick, useOpenAndCloseFocus, useOverlay, usePaneWidth, useProvidedRefOrCreate, useRefObjectAsForwardedRef, useResizeObserver, useResponsiveValue, useRovingTabIndex, useSafeTimeout, useSlots, useSyncedState, useTheme };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { c } from "../../utils/react-compiler-runtime.js";
|
|
1
2
|
import ButtonReset_module_css_default from "./ButtonReset.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/internal/components/ButtonReset.tsx
|
|
6
6
|
/**
|
|
7
7
|
* Provides an unstyled button that can be styled as-needed for components
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { c } from "../../../utils/react-compiler-runtime.js";
|
|
1
2
|
import { useId as useId$1 } from "../../../hooks/useId.js";
|
|
2
3
|
import { useSlots } from "../../../hooks/useSlots.js";
|
|
3
4
|
import VisuallyHidden from "../../../_VisuallyHidden.js";
|
|
@@ -7,10 +8,9 @@ import CheckboxOrRadioGroup_module_css_default from "./CheckboxOrRadioGroup.modu
|
|
|
7
8
|
import CheckboxOrRadioGroupCaption from "./CheckboxOrRadioGroupCaption.js";
|
|
8
9
|
import CheckboxOrRadioGroupLabel from "./CheckboxOrRadioGroupLabel.js";
|
|
9
10
|
import CheckboxOrRadioGroupValidation from "./CheckboxOrRadioGroupValidation.js";
|
|
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/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.tsx
|
|
15
15
|
const CheckboxOrRadioGroup = (t0) => {
|
|
16
16
|
const $ = c(51);
|
|
@@ -84,7 +84,7 @@ const CheckboxOrRadioGroup = (t0) => {
|
|
|
84
84
|
slots.caption,
|
|
85
85
|
/*#__PURE__*/ React.isValidElement(slots.validation) && slots.validation.props.children && /*#__PURE__*/ jsx(VisuallyHidden, { children: slots.validation.props.children })
|
|
86
86
|
]
|
|
87
|
-
}) : /*#__PURE__*/ jsxs(Fragment, { children: [slots.caption, required && requiredMessageId && /*#__PURE__*/ jsx(VisuallyHidden, {
|
|
87
|
+
}) : /*#__PURE__*/ jsxs(Fragment$1, { children: [slots.caption, required && requiredMessageId && /*#__PURE__*/ jsx(VisuallyHidden, {
|
|
88
88
|
id: requiredMessageId,
|
|
89
89
|
children: "Required"
|
|
90
90
|
})] });
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { c } from "../../../utils/react-compiler-runtime.js";
|
|
1
2
|
import Text_default from "../../../Text/Text.js";
|
|
2
3
|
import CheckboxOrRadioGroupContext from "./CheckboxOrRadioGroupContext.js";
|
|
3
4
|
import CheckboxOrRadioGroup_module_css_default from "./CheckboxOrRadioGroup.module.css.js";
|
|
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/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupCaption.tsx
|
|
9
9
|
const CheckboxOrRadioGroupCaption = (t0) => {
|
|
10
10
|
const $ = c(7);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { c } from "../../../utils/react-compiler-runtime.js";
|
|
1
2
|
import VisuallyHidden from "../../../_VisuallyHidden.js";
|
|
2
3
|
import CheckboxOrRadioGroupContext from "./CheckboxOrRadioGroupContext.js";
|
|
3
4
|
import CheckboxOrRadioGroup_module_css_default from "./CheckboxOrRadioGroup.module.css.js";
|
|
4
5
|
import { Stack } from "../../../Stack/index.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 from "react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { clsx } from "clsx";
|
|
9
9
|
//#region src/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupLabel.tsx
|
|
10
10
|
const CheckboxOrRadioGroupLabel = (t0) => {
|
|
11
11
|
const $ = c(12);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { c } from "../../../utils/react-compiler-runtime.js";
|
|
1
2
|
import CheckboxOrRadioGroupContext from "./CheckboxOrRadioGroupContext.js";
|
|
2
3
|
import InputValidation from "../InputValidation.js";
|
|
3
|
-
import { c } from "react-compiler-runtime";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
4
|
import React from "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region src/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupValidation.tsx
|
|
7
7
|
const CheckboxOrRadioGroupValidation = (t0) => {
|
|
8
8
|
const $ = c(5);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { c } from "../../utils/react-compiler-runtime.js";
|
|
1
2
|
import InputLabel_module_css_default from "./InputLabel.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/internal/components/InputLabel.tsx
|
|
6
6
|
function InputLabel(t0) {
|
|
7
7
|
const $ = c(28);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { c } from "../../utils/react-compiler-runtime.js";
|
|
1
2
|
import Text_default from "../../Text/Text.js";
|
|
2
3
|
import InputValidation_module_css_default from "./InputValidation.module.css.js";
|
|
3
|
-
import { c } from "react-compiler-runtime";
|
|
4
|
-
import { clsx } from "clsx";
|
|
5
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { clsx } from "clsx";
|
|
6
6
|
import { AlertFillIcon, CheckCircleFillIcon } from "@primer/octicons-react";
|
|
7
7
|
//#region src/internal/components/InputValidation.tsx
|
|
8
8
|
const validationIconMap = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { c } from "../../utils/react-compiler-runtime.js";
|
|
1
2
|
import useIsomorphicLayoutEffect from "../../utils/useIsomorphicLayoutEffect.js";
|
|
2
3
|
import { OverflowObserverContext } from "../hooks/useOverflowObserver.js";
|
|
3
|
-
import { c } from "react-compiler-runtime";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
4
|
import { useEffect, useRef } from "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region src/internal/components/OverflowObserverProvider.tsx
|
|
7
7
|
/**
|
|
8
8
|
* Owns a single `IntersectionObserver` shared by every descendant that calls `useIsClipped`, instead of each item
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { c } from "../../utils/react-compiler-runtime.js";
|
|
1
2
|
import { Tooltip } from "../../TooltipV2/Tooltip.js";
|
|
2
3
|
import { IconButton } from "../../Button/IconButton.js";
|
|
3
4
|
import { ButtonComponent } from "../../Button/Button.js";
|
|
4
5
|
import TextInputInnerAction_module_css_default from "./TextInputInnerAction.module.css.js";
|
|
5
|
-
import { c } from "react-compiler-runtime";
|
|
6
|
-
import { clsx } from "clsx";
|
|
7
|
-
import { Fragment, jsx } from "react/jsx-runtime";
|
|
8
6
|
import { forwardRef } from "react";
|
|
7
|
+
import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
|
|
8
|
+
import { clsx } from "clsx";
|
|
9
9
|
//#region src/internal/components/TextInputInnerAction.tsx
|
|
10
10
|
const ConditionalTooltip = (t0) => {
|
|
11
11
|
const $ = c(6);
|
|
@@ -25,7 +25,7 @@ const ConditionalTooltip = (t0) => {
|
|
|
25
25
|
} else t1 = $[3];
|
|
26
26
|
let t2;
|
|
27
27
|
if ($[4] !== t1) {
|
|
28
|
-
t2 = /*#__PURE__*/ jsx(Fragment, { children: t1 });
|
|
28
|
+
t2 = /*#__PURE__*/ jsx(Fragment$1, { children: t1 });
|
|
29
29
|
$[4] = t1;
|
|
30
30
|
$[5] = t2;
|
|
31
31
|
} else t2 = $[5];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { c } from "../../utils/react-compiler-runtime.js";
|
|
1
2
|
import Spinner from "../../Spinner/Spinner.js";
|
|
2
3
|
import TextInputInnerVisualSlot_module_css_default from "./TextInputInnerVisualSlot.module.css.js";
|
|
3
|
-
import { c } from "react-compiler-runtime";
|
|
4
|
-
import { clsx } from "clsx";
|
|
5
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { clsx } from "clsx";
|
|
6
6
|
//#region src/internal/components/TextInputInnerVisualSlot.tsx
|
|
7
7
|
const TextInputInnerVisualSlot = (t0) => {
|
|
8
8
|
const $ = c(21);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { c } from "../../utils/react-compiler-runtime.js";
|
|
1
2
|
import TextInputWrapper_module_css_default from "./TextInputWrapper.module.css.js";
|
|
2
|
-
import { c } from "react-compiler-runtime";
|
|
3
|
-
import { clsx } from "clsx";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
3
|
import React from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { clsx } from "clsx";
|
|
6
6
|
//#region src/internal/components/TextInputWrapper.tsx
|
|
7
7
|
const TextInputBaseWrapper = /*#__PURE__*/ React.forwardRef(function TextInputBaseWrapper(t0, forwardRef) {
|
|
8
8
|
const $ = c(44);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { c } from "../../utils/react-compiler-runtime.js";
|
|
1
2
|
import { ThemeContext } from "../../ThemeContext.js";
|
|
2
|
-
import { c } from "react-compiler-runtime";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
//#region src/internal/components/ThemeProviderBase.tsx
|
|
5
5
|
const ThemeProviderBase = (t0) => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { c } from "../../utils/react-compiler-runtime.js";
|
|
1
2
|
import CounterLabel from "../../CounterLabel/CounterLabel.js";
|
|
2
3
|
import UnderlineTabbedInterface_module_css_default from "./UnderlineTabbedInterface.module.css.js";
|
|
3
|
-
import { c } from "react-compiler-runtime";
|
|
4
|
-
import { clsx } from "clsx";
|
|
5
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
4
|
import React, { forwardRef } from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { clsx } from "clsx";
|
|
7
7
|
import { isElement } from "react-is";
|
|
8
8
|
//#region src/internal/components/UnderlineTabbedInterface.tsx
|
|
9
9
|
function getTextContent(children) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { c } from "../../utils/react-compiler-runtime.js";
|
|
1
2
|
import UnstyledTextInput_module_css_default from "./UnstyledTextInput.module.css.js";
|
|
2
|
-
import { c } from "react-compiler-runtime";
|
|
3
|
-
import { clsx } from "clsx";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
3
|
import React from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { clsx } from "clsx";
|
|
6
6
|
//#region src/internal/components/UnstyledTextInput.tsx
|
|
7
7
|
const UnstyledTextInput = /*#__PURE__*/ React.forwardRef(function UnstyledTextInput(t0, forwardRef) {
|
|
8
8
|
const $ = c(9);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { c } from "../../utils/react-compiler-runtime.js";
|
|
1
2
|
import ValidationAnimationContainer_module_css_default from "./ValidationAnimationContainer.module.css.js";
|
|
2
|
-
import { c } from "react-compiler-runtime";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
3
|
import { useState } from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region src/internal/components/ValidationAnimationContainer.tsx
|
|
6
6
|
const ValidationAnimationContainer = (t0) => {
|
|
7
7
|
const $ = c(14);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c } from "react-compiler-runtime";
|
|
1
|
+
import { c } from "../../utils/react-compiler-runtime.js";
|
|
2
2
|
import { createContext, useContext, useRef, useSyncExternalStore } from "react";
|
|
3
3
|
//#region src/internal/hooks/useOverflowObserver.ts
|
|
4
4
|
/** Subscribe a single observed element to the shared `IntersectionObserver`. Returns an unsubscribe function. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { c } from "../../utils/react-compiler-runtime.js";
|
|
1
2
|
import { useSyncedState } from "../../hooks/useSyncedState.js";
|
|
2
3
|
import { useTheme } from "../../useTheme.js";
|
|
3
|
-
import { c } from "react-compiler-runtime";
|
|
4
4
|
import React from "react";
|
|
5
5
|
//#region src/internal/hooks/useThemeProvider.ts
|
|
6
6
|
const defaultColorMode = "day";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { c } from "../utils/react-compiler-runtime.js";
|
|
1
2
|
import { useEffectOnce } from "../internal/hooks/useEffectOnce.js";
|
|
2
3
|
import { useEffectCallback } from "../internal/hooks/useEffectCallback.js";
|
|
3
|
-
import { c } from "react-compiler-runtime";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
4
|
import { useEffect, useRef } from "react";
|
|
6
5
|
import { announceFromElement } from "@primer/live-region-element";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
//#region src/live-region/Announce.tsx
|
|
8
8
|
/**
|
|
9
9
|
* `Announce` is a component that will announce the text content of the
|
|
@@ -2,7 +2,7 @@ import { PolymorphicProps } from "../utils/modern-polymorphic.js";
|
|
|
2
2
|
import React, { ElementType } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/live-region/AriaAlert.d.ts
|
|
5
|
-
type AriaAlertProps<As extends ElementType> = PolymorphicProps<As, 'div', {
|
|
5
|
+
type AriaAlertProps<As extends ElementType = 'div'> = PolymorphicProps<As, 'div', {
|
|
6
6
|
/**
|
|
7
7
|
* Specify if the content of the element should be announced when this
|
|
8
8
|
* component is rendered and is not hidden
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { c } from "../utils/react-compiler-runtime.js";
|
|
1
2
|
import { ThemeProviderBase } from "../internal/components/ThemeProviderBase.js";
|
|
2
3
|
import { useThemeProvider } from "../internal/hooks/useThemeProvider.js";
|
|
3
|
-
import { c } from "react-compiler-runtime";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region src/next/ThemeProvider.tsx
|
|
6
6
|
const ThemeProvider = (t0) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { c } from "./react-compiler-runtime.js";
|
|
1
2
|
import useIsomorphicLayoutEffect from "./useIsomorphicLayoutEffect.js";
|
|
2
|
-
import { c } from "react-compiler-runtime";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
3
|
import { createContext, useContext, useEffect, useId, useReducer, useRef, useState } from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region src/utils/descendant-registry.tsx
|
|
6
6
|
/**
|
|
7
7
|
* Create a "descendant registry" for a component. This allows a parent to store and track an ordered registry of
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React, { useMemo } from "react";
|
|
2
|
+
//#region src/utils/react-compiler-runtime.ts
|
|
3
|
+
/**
|
|
4
|
+
* Local, bundled replacement for the `c` helper exported by
|
|
5
|
+
* `react-compiler-runtime`.
|
|
6
|
+
*
|
|
7
|
+
* The React Compiler emits `import {c} from 'react-compiler-runtime'`. The build
|
|
8
|
+
* aliases that import to this module so the helper is bundled into
|
|
9
|
+
* `@primer/react` as plain ES modules instead of being resolved as an external
|
|
10
|
+
* CommonJS dependency. Leaving it external ships a bare cross-chunk import that
|
|
11
|
+
* can crash (`TypeError: (0, t.c) is not a function`) when a consumer's bundle
|
|
12
|
+
* graph resolves a skewed or duplicate copy across independently-cached chunks.
|
|
13
|
+
*
|
|
14
|
+
* The behavior mirrors `react-compiler-runtime`: prefer React's built-in
|
|
15
|
+
* compiler runtime when it is available (React 19+), otherwise fall back to a
|
|
16
|
+
* `useMemo`-backed cache. This module is excluded from the React Compiler (see
|
|
17
|
+
* `script/react-compiler.mjs`) so it does not attempt to compile the helper that
|
|
18
|
+
* backs the compiler's own runtime.
|
|
19
|
+
*/
|
|
20
|
+
const MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel");
|
|
21
|
+
function useMemoCache(size) {
|
|
22
|
+
return useMemo(() => {
|
|
23
|
+
const cache = new Array(size);
|
|
24
|
+
for (let index = 0; index < size; index++) cache[index] = MEMO_CACHE_SENTINEL;
|
|
25
|
+
cache[MEMO_CACHE_SENTINEL] = true;
|
|
26
|
+
return cache;
|
|
27
|
+
}, []);
|
|
28
|
+
}
|
|
29
|
+
const builtinRuntime = React.__COMPILER_RUNTIME;
|
|
30
|
+
const c = typeof (builtinRuntime === null || builtinRuntime === void 0 ? void 0 : builtinRuntime.c) === "function" ? builtinRuntime.c : useMemoCache;
|
|
31
|
+
//#endregion
|
|
32
|
+
export { c, useMemoCache };
|