@primer/react 38.40.1 → 38.40.2-rc.65cb96bb3

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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # @primer/react
2
2
 
3
+ ## 38.40.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#8473](https://github.com/primer/react/pull/8473) [`53ed545`](https://github.com/primer/react/commit/53ed54524aac9c3e829c239afdb4f63de160f873) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - LiveRegion: Upgrade `@primer/live-region-element` to 0.8.1
8
+
9
+ - [#8463](https://github.com/primer/react/pull/8463) [`f710336`](https://github.com/primer/react/commit/f7103363ce5c916b8aa27a3fd5d4c9d564d3a13f) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - Truncate: Infer accepted props from the `as` prop and forward `inline` to custom `as` components (e.g. `Link`).
10
+
3
11
  ## 38.40.1
4
12
 
5
13
  ### Patch Changes
@@ -1,7 +1,7 @@
1
1
  import { c } from "../utils/react-compiler-runtime.js";
2
2
  import { ItemContext } from "./shared.js";
3
3
  import ActionList_module_css_default from "./ActionList.module.css.js";
4
- import Truncate from "../Truncate/Truncate.js";
4
+ import Truncate_default from "../Truncate/Truncate.js";
5
5
  import React from "react";
6
6
  import { jsx } from "react/jsx-runtime";
7
7
  import { clsx } from "clsx";
@@ -93,7 +93,7 @@ const Description = (t0) => {
93
93
  const t5 = setTruncatedText ? "" : effectiveTitle;
94
94
  let t6;
95
95
  if ($[20] !== inlineDescriptionId || $[21] !== props.children || $[22] !== style || $[23] !== t4 || $[24] !== t5) {
96
- t6 = /*#__PURE__*/ jsx(Truncate, {
96
+ t6 = /*#__PURE__*/ jsx(Truncate_default, {
97
97
  ref: containerRef,
98
98
  id: inlineDescriptionId,
99
99
  className: t4,
@@ -8,7 +8,6 @@ import TextInput_default from "../TextInput/TextInput.js";
8
8
  import Autocomplete_default from "../Autocomplete/Autocomplete.js";
9
9
  import ValidationAnimationContainer from "../internal/components/ValidationAnimationContainer.js";
10
10
  import CheckboxOrRadioGroupContext from "../internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupContext.js";
11
- import { FormControlContextProvider } from "./_FormControlContext.js";
12
11
  import Checkbox from "../Checkbox/Checkbox.js";
13
12
  import Select_default from "../Select/Select.js";
14
13
  import { SelectPanel } from "../SelectPanel/SelectPanel.js";
@@ -18,6 +17,7 @@ import { FormControlCaption } from "./FormControlCaption.js";
18
17
  import FormControlLabel from "./FormControlLabel.js";
19
18
  import FormControlLeadingVisual from "./FormControlLeadingVisual.js";
20
19
  import FormControlValidation from "./_FormControlValidation.js";
20
+ import { FormControlContextProvider } from "./_FormControlContextProvider.js";
21
21
  import FormControl_module_css_default from "./FormControl.module.css.js";
22
22
  import React, { useContext } from "react";
23
23
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -2,7 +2,6 @@ import { c } from "../utils/react-compiler-runtime.js";
2
2
  import { createContext, useContext } from "react";
3
3
  //#region src/FormControl/_FormControlContext.tsx
4
4
  const FormControlContext = /*#__PURE__*/ createContext(null);
5
- const FormControlContextProvider = FormControlContext.Provider;
6
5
  /** This is the private/internal interface for subcomponents of `FormControl`. */
7
6
  function useFormControlContext() {
8
7
  var _useContext;
@@ -46,4 +45,4 @@ function useFormControlForwardedProps(externalProps) {
46
45
  return t1;
47
46
  }
48
47
  //#endregion
49
- export { FormControlContextProvider, useFormControlContext, useFormControlForwardedProps };
48
+ export { FormControlContext, useFormControlContext, useFormControlForwardedProps };
@@ -0,0 +1,5 @@
1
+ import { FormControlContext } from "./_FormControlContext.js";
2
+ //#region src/FormControl/_FormControlContextProvider.tsx
3
+ const FormControlContextProvider = FormControlContext.Provider;
4
+ //#endregion
5
+ export { FormControlContextProvider };
@@ -1,13 +1,18 @@
1
- import { ForwardRefComponent } from "../utils/polymorphic.js";
1
+ import { DistributiveOmit, PolymorphicProps } from "../utils/modern-polymorphic.js";
2
2
  import React from "react";
3
3
 
4
4
  //#region src/Truncate/Truncate.d.ts
5
- type TruncateProps = React.HTMLAttributes<HTMLElement> & {
5
+ type TruncateOwnProps = {
6
6
  title: string;
7
7
  inline?: boolean;
8
8
  expandable?: boolean;
9
9
  maxWidth?: number | string;
10
+ className?: string;
11
+ style?: React.CSSProperties;
10
12
  };
11
- declare const Truncate: ForwardRefComponent<"div", TruncateProps>;
13
+ type TruncateProps<As extends React.ElementType = 'div'> = PolymorphicProps<As, 'div', TruncateOwnProps>;
14
+ declare const _default: <As extends React.ElementType = "div">(props: DistributiveOmit<React.ComponentPropsWithRef<React.ElementType extends As ? "div" : As> & TruncateOwnProps, "as"> & {
15
+ as?: As | undefined;
16
+ } & React.RefAttributes<any>) => React.ReactNode;
12
17
  //#endregion
13
- export { type TruncateProps, Truncate as default };
18
+ export { TruncateProps, _default as default };
@@ -1,10 +1,12 @@
1
+ import { fixedForwardRef } from "../utils/modern-polymorphic.js";
1
2
  import Truncate_module_css_default from "./Truncate.module.css.js";
2
- import React from "react";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  import { clsx } from "clsx";
5
5
  //#region src/Truncate/Truncate.tsx
6
- const Truncate = /*#__PURE__*/ React.forwardRef(function Truncate({ as: Component = "div", children, className, title, inline, expandable, maxWidth = 125, style, ...rest }, ref) {
6
+ function Truncate(props, ref) {
7
+ const { as: Component = "div", children, className, title, inline, expandable, maxWidth = 125, style, ...rest } = props;
7
8
  return /*#__PURE__*/ jsx(Component, {
9
+ ...typeof Component === "string" ? {} : { inline },
8
10
  ...rest,
9
11
  ref,
10
12
  className: clsx(className, Truncate_module_css_default.Truncate),
@@ -17,7 +19,9 @@ const Truncate = /*#__PURE__*/ React.forwardRef(function Truncate({ as: Componen
17
19
  },
18
20
  children
19
21
  });
20
- });
22
+ }
21
23
  Truncate.displayName = "Truncate";
24
+ Truncate.displayName = "Truncate";
25
+ var Truncate_default = fixedForwardRef(Truncate);
22
26
  //#endregion
23
- export { Truncate as default };
27
+ export { Truncate_default as default };
@@ -1,2 +1,2 @@
1
- import Truncate, { TruncateProps } from "./Truncate.js";
2
- export { type TruncateProps, Truncate as default };
1
+ import _default, { TruncateProps } from "./Truncate.js";
2
+ export { type TruncateProps, _default as default };
@@ -1,6 +1,6 @@
1
1
  import { c } from "../../utils/react-compiler-runtime.js";
2
2
  import { useId as useId$1 } from "../../hooks/useId.js";
3
- import Truncate from "../../Truncate/Truncate.js";
3
+ import Truncate_default from "../../Truncate/Truncate.js";
4
4
  import Item_module_css_default from "./Item.module.css.js";
5
5
  import React from "react";
6
6
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -205,7 +205,7 @@ const Item = /*#__PURE__*/ React.forwardRef((itemProps, ref) => {
205
205
  "--description-container-flex-basis": descriptionVariant === "inline" ? 0 : "auto"
206
206
  },
207
207
  className: Item_module_css_default.DescriptionContainer,
208
- children: descriptionVariant === "block" ? description : /*#__PURE__*/ jsx(Truncate, {
208
+ children: descriptionVariant === "block" ? description : /*#__PURE__*/ jsx(Truncate_default, {
209
209
  title: description,
210
210
  inline: true,
211
211
  maxWidth: "100%",
package/dist/index.d.ts CHANGED
@@ -106,7 +106,7 @@ import _default$16, { TextInputWithTokensProps } from "./TextInputWithTokens/Tex
106
106
  import _default$14, { TextProps } from "./Text/Text.js";
107
107
  import _default$18, { TimelineActionsProps, TimelineAvatarProps, TimelineBadgeProps, TimelineBadgeVariant, TimelineBodyProps, TimelineBreakProps, TimelineItemProps, TimelineItemsProps, TimelineProps } from "./Timeline/Timeline.js";
108
108
  import IssueLabelToken, { IssueLabelTokenProps } from "./Token/IssueLabelToken.js";
109
- import Truncate, { TruncateProps } from "./Truncate/Truncate.js";
109
+ import _default$19, { TruncateProps } from "./Truncate/Truncate.js";
110
110
  import _default$3, { CheckboxProps } from "./Checkbox/Checkbox.js";
111
111
  import _default$17, { TextareaProps } from "./Textarea/Textarea.js";
112
112
  import { TreeView, TreeViewErrorDialogProps, TreeViewItemProps, TreeViewProps, TreeViewSubTreeProps, TreeViewVisualProps } from "./TreeView/TreeView.js";
@@ -123,4 +123,4 @@ import { ActionsProps, ChildrenPropTypes, PageHeader, PageHeaderProps, TitleArea
123
123
  import { SkeletonBox, SkeletonBoxProps } from "./Skeleton/SkeletonBox.js";
124
124
  import { ActionMenu, ActionMenuAnchorProps, ActionMenuButtonProps, ActionMenuProps } from "./ActionMenu/ActionMenu.js";
125
125
  import Overlay, { OverlayProps } from "./Overlay/Overlay.js";
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 };
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, _default$19 as 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
@@ -47,7 +47,7 @@ import { createComponent } from "./utils/create-component.js";
47
47
  import { asSlot } from "./utils/as-slot.js";
48
48
  import Radio from "./Radio/Radio.js";
49
49
  import Heading from "./Heading/Heading.js";
50
- import Truncate from "./Truncate/Truncate.js";
50
+ import Truncate_default from "./Truncate/Truncate.js";
51
51
  import Link from "./Link/Link.js";
52
52
  import { ActionList } from "./ActionList/index.js";
53
53
  import Overlay from "./Overlay/Overlay.js";
@@ -96,4 +96,4 @@ import { TreeView } from "./TreeView/TreeView.js";
96
96
  import { UnderlineNav } from "./UnderlineNav/index.js";
97
97
  import { ActionBar } from "./ActionBar/index.js";
98
98
  import { PageHeader } from "./PageHeader/PageHeader.js";
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 };
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_default as 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 };
@@ -9115,6 +9115,10 @@
9115
9115
  {
9116
9116
  "id": "components-truncate-features--max-width",
9117
9117
  "code": "() => (\n <Truncate title=\"Some example text with a max width\" maxWidth={200}>\n Some example text with a max width\n </Truncate>\n)"
9118
+ },
9119
+ {
9120
+ "id": "components-truncate-features--as-link",
9121
+ "code": "() => {\n const url =\n 'https://github.com/primer/react/blob/main/packages/react/src/Truncate/Truncate.tsx'\n return (\n <p>\n Mirror:{' '}\n <Truncate as={Link} href={url} title={url} maxWidth={300} inline>\n {url}\n </Truncate>{' '}\n (inline link inside text)\n </p>\n )\n}"
9118
9122
  }
9119
9123
  ],
9120
9124
  "importPath": "@primer/react",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@primer/react",
3
3
  "type": "module",
4
- "version": "38.40.1",
4
+ "version": "38.40.2-rc.65cb96bb3",
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",
@@ -78,7 +78,7 @@
78
78
  "@lit-labs/react": "1.2.1",
79
79
  "@oddbird/popover-polyfill": "^0.5.2",
80
80
  "@primer/behaviors": "^1.10.3",
81
- "@primer/live-region-element": "^0.8.0",
81
+ "@primer/live-region-element": "^0.8.1",
82
82
  "@primer/octicons-react": "^19.28.1",
83
83
  "@primer/primitives": "10.x || 11.x",
84
84
  "@tanstack/react-virtual": "^3.13.18",