@primer/react 0.0.0-20260714183333 → 0.0.0-20260714190115

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/CHANGELOG.md +3 -5
  2. package/dist/ActionList/Group.js +1 -1
  3. package/dist/ActionList/Item.js +1 -1
  4. package/dist/ActionList/List.js +1 -1
  5. package/dist/ActionMenu/ActionMenu.js +1 -1
  6. package/dist/AnchoredOverlay/AnchoredOverlay.js +2 -1
  7. package/dist/Autocomplete/AutocompleteMenu.js +3 -2
  8. package/dist/Breadcrumbs/Breadcrumbs.js +4 -1
  9. package/dist/Dialog/Dialog.js +1 -1
  10. package/dist/FilteredActionList/useAnnouncements.js +20 -14
  11. package/dist/NavList/NavList.js +1 -1
  12. package/dist/PageHeader/PageHeader.js +1 -1
  13. package/dist/PageLayout/PageLayout.js +261 -68
  14. package/dist/PageLayout/index.d.ts +1 -3
  15. package/dist/PageLayout/usePaneWidth.d.ts +1 -55
  16. package/dist/PageLayout/usePaneWidth.js +5 -10
  17. package/dist/TextInputWithTokens/TextInputWithTokens.js +1 -1
  18. package/dist/TooltipV2/Tooltip.js +2 -1
  19. package/dist/TreeView/TreeView.js +6 -3
  20. package/dist/experimental/SelectPanel2/SelectPanel.js +2 -2
  21. package/dist/experimental/UnderlinePanels/UnderlinePanels.js +1 -1
  22. package/dist/experimental/index.js +1 -1
  23. package/dist/hooks/useDialog.js +2 -1
  24. package/dist/hooks/useScrollFlash.js +2 -1
  25. package/dist/index.d.ts +1 -3
  26. package/dist/index.js +5 -7
  27. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.js +1 -1
  28. package/dist/internal/components/UnderlineTabbedInterface-9aca4eac.css +2 -0
  29. package/dist/internal/components/UnderlineTabbedInterface-9aca4eac.css.map +1 -0
  30. package/dist/internal/components/UnderlineTabbedInterface.module.css.js +1 -1
  31. package/dist/utils/warning.js +3 -2
  32. package/package.json +2 -2
  33. package/dist/PageLayout/DragHandle.d.ts +0 -38
  34. package/dist/PageLayout/DragHandle.js +0 -220
  35. package/dist/internal/components/UnderlineTabbedInterface-25587345.css +0 -2
  36. package/dist/internal/components/UnderlineTabbedInterface-25587345.css.map +0 -1
@@ -14,59 +14,5 @@ type PaneWidth = 'small' | 'medium' | 'large';
14
14
  * - `CustomWidthOptions`: Explicit min/default/max constraints
15
15
  */
16
16
  type PaneWidthValue = PaneWidth | CustomWidthOptions;
17
- type UsePaneWidthOptions = {
18
- width: PaneWidthValue;
19
- minWidth: number;
20
- resizable: boolean; /** localStorage key for persisting width. When undefined, localStorage is not used. */
21
- widthStorageKey?: string;
22
- paneRef: React.RefObject<HTMLDivElement | null>;
23
- handleRef: React.RefObject<HTMLDivElement | null>;
24
- /**
25
- * Optional ref to the content wrapper element. Only used by PageLayout for its
26
- * viewport/content math during resize. Standalone consumers can omit this.
27
- */
28
- contentWrapperRef?: React.RefObject<HTMLDivElement | null>;
29
- /**
30
- * When true, custom max width values are capped to the viewport-based max.
31
- * This prevents overflow in non-wrapping flex layouts (e.g., Sidebar).
32
- * @default false
33
- */
34
- constrainToViewport?: boolean; /** Callback fired when a resize operation ends (drag release or keyboard key up) */
35
- onResizeEnd?: (width: number) => void; /** Current/controlled width value in pixels (used instead of internal state; default from `width` is still used for reset) */
36
- currentWidth?: number;
37
- };
38
- type UsePaneWidthResult = {
39
- /** Current width for React state (used in ARIA attributes) */currentWidth: number; /** Mutable ref tracking width during drag operations */
40
- currentWidthRef: React.MutableRefObject<number>; /** Minimum allowed pane width */
41
- minPaneWidth: number; /** Maximum allowed pane width (updates on viewport resize) */
42
- maxPaneWidth: number; /** Calculate current max width constraint */
43
- getMaxPaneWidth: () => number; /** Persist width to localStorage and sync React state */
44
- saveWidth: (value: number) => void; /** Reset to default width */
45
- getDefaultWidth: () => number;
46
- };
47
- /** Default widths for preset size options */
48
- declare const defaultPaneWidth: Record<PaneWidth, number>;
49
- /**
50
- * Manages pane width state with storage persistence and viewport constraints.
51
- * Handles initialization from storage, clamping on viewport resize, and provides
52
- * functions to save and reset width.
53
- *
54
- * Storage behavior:
55
- * - When `resizable` is `true` and `onResizeEnd` is not provided: Uses localStorage
56
- * - When `onResizeEnd` is provided: Calls the callback instead of localStorage
57
- * - When `resizable` is `false` or `undefined`: Not resizable, no persistence
58
- */
59
- declare function usePaneWidth({
60
- width,
61
- minWidth,
62
- resizable,
63
- widthStorageKey,
64
- paneRef,
65
- handleRef,
66
- contentWrapperRef,
67
- constrainToViewport,
68
- onResizeEnd,
69
- currentWidth: controlledWidth
70
- }: UsePaneWidthOptions): UsePaneWidthResult;
71
17
  //#endregion
72
- export { CustomWidthOptions, PaneWidth, PaneWidthValue, UsePaneWidthOptions, UsePaneWidthResult, defaultPaneWidth, usePaneWidth };
18
+ export { CustomWidthOptions, PaneWidth, PaneWidthValue };
@@ -47,18 +47,13 @@ function getMaxWidthDiffFromViewport() {
47
47
  if (!canUseDOM) return DEFAULT_MAX_WIDTH_DIFF;
48
48
  return window.innerWidth >= DEFAULT_PANE_MAX_WIDTH_DIFF_BREAKPOINT ? WIDE_MAX_WIDTH_DIFF : DEFAULT_MAX_WIDTH_DIFF;
49
49
  }
50
- /**
51
- * Default formatter for the drag handle's `aria-valuetext`.
52
- * Kept in sync between the rendered attribute and drag-time DOM writes.
53
- */
54
- const defaultFormatValueText = (valueNow) => `Pane width ${valueNow} pixels`;
55
- const updateAriaValues = (handle, values, formatValueText = defaultFormatValueText) => {
50
+ const updateAriaValues = (handle, values) => {
56
51
  if (!handle) return;
57
52
  if (values.min !== void 0) handle.setAttribute("aria-valuemin", String(values.min));
58
53
  if (values.max !== void 0) handle.setAttribute("aria-valuemax", String(values.max));
59
54
  if (values.current !== void 0) {
60
55
  handle.setAttribute("aria-valuenow", String(values.current));
61
- handle.setAttribute("aria-valuetext", formatValueText(values.current));
56
+ handle.setAttribute("aria-valuetext", `Pane width ${values.current} pixels`);
62
57
  }
63
58
  };
64
59
  const localStoragePersister = {
@@ -279,14 +274,14 @@ function usePaneWidth(t0) {
279
274
  if (isResizing) return;
280
275
  isResizing = true;
281
276
  (_paneRef$current4 = paneRef.current) === null || _paneRef$current4 === void 0 || _paneRef$current4.setAttribute("data-dragging", "true");
282
- contentWrapperRef === null || contentWrapperRef === void 0 || (_contentWrapperRef$cu = contentWrapperRef.current) == null || _contentWrapperRef$cu.setAttribute("data-dragging", "true");
277
+ (_contentWrapperRef$cu = contentWrapperRef.current) === null || _contentWrapperRef$cu === void 0 || _contentWrapperRef$cu.setAttribute("data-dragging", "true");
283
278
  };
284
279
  const endResizeOptimizations = () => {
285
280
  var _paneRef$current5, _contentWrapperRef$cu2;
286
281
  if (!isResizing) return;
287
282
  isResizing = false;
288
283
  (_paneRef$current5 = paneRef.current) === null || _paneRef$current5 === void 0 || _paneRef$current5.removeAttribute("data-dragging");
289
- contentWrapperRef === null || contentWrapperRef === void 0 || (_contentWrapperRef$cu2 = contentWrapperRef.current) == null || _contentWrapperRef$cu2.removeAttribute("data-dragging");
284
+ (_contentWrapperRef$cu2 = contentWrapperRef.current) === null || _contentWrapperRef$cu2 === void 0 || _contentWrapperRef$cu2.removeAttribute("data-dragging");
290
285
  };
291
286
  const handleResize = () => {
292
287
  startResizeOptimizations();
@@ -362,4 +357,4 @@ function usePaneWidth(t0) {
362
357
  return t14;
363
358
  }
364
359
  //#endregion
365
- export { DEFAULT_MAX_WIDTH_DIFF, DEFAULT_SIDEBAR_MAX_WIDTH_DIFF, defaultFormatValueText, defaultPaneWidth, getDefaultPaneWidth, getMaxWidthDiffFromViewport, isCustomWidthOptions, isPaneWidth, updateAriaValues, usePaneWidth };
360
+ export { DEFAULT_MAX_WIDTH_DIFF, DEFAULT_SIDEBAR_MAX_WIDTH_DIFF, defaultPaneWidth, getDefaultPaneWidth, getMaxWidthDiffFromViewport, isCustomWidthOptions, isPaneWidth, updateAriaValues, usePaneWidth };
@@ -12,8 +12,8 @@ import { c } from "react-compiler-runtime";
12
12
  import { clsx } from "clsx";
13
13
  import { jsx, jsxs } from "react/jsx-runtime";
14
14
  import React, { useRef, useState } from "react";
15
- import { FocusKeys } from "@primer/behaviors";
16
15
  import { isFocusable } from "@primer/behaviors/utils";
16
+ import { FocusKeys } from "@primer/behaviors";
17
17
  import { isValidElementType } from "react-is";
18
18
  //#region src/TextInputWithTokens/TextInputWithTokens.tsx
19
19
  /**
@@ -184,12 +184,13 @@ const Tooltip = /*#__PURE__*/ React.forwardRef(({ direction = "s", text, type =
184
184
  (_child$props$onFocus = (_child$props3 = child.props).onFocus) === null || _child$props$onFocus === void 0 || _child$props$onFocus.call(_child$props3, event);
185
185
  },
186
186
  onMouseOverCapture: (event) => {
187
+ const delayTime = delayTimeMap[delay] || 50;
187
188
  openTimeoutRef.current = safeSetTimeout(() => {
188
189
  var _child$props$onMouseE, _child$props4;
189
190
  if (!openTimeoutRef.current) return;
190
191
  openTooltip();
191
192
  (_child$props$onMouseE = (_child$props4 = child.props).onMouseEnter) === null || _child$props$onMouseE === void 0 || _child$props$onMouseE.call(_child$props4, event);
192
- }, delayTimeMap[delay] || 50);
193
+ }, delayTime);
193
194
  },
194
195
  onMouseLeave: (event) => {
195
196
  var _child$props$onMouseL, _child$props5;
@@ -1,4 +1,6 @@
1
1
  import { useId as useId$1 } from "../hooks/useId.js";
2
+ import { isSlot } from "../utils/is-slot.js";
3
+ import { useSlots } from "../hooks/useSlots.js";
2
4
  import Spinner from "../Spinner/Spinner.js";
3
5
  import { AriaStatus } from "../live-region/AriaStatus.js";
4
6
  import { fixedForwardRef } from "../utils/modern-polymorphic.js";
@@ -10,8 +12,6 @@ import useSafeTimeout from "../hooks/useSafeTimeout.js";
10
12
  import { Tooltip } from "../TooltipV2/Tooltip.js";
11
13
  import { IconButton } from "../Button/IconButton.js";
12
14
  import { ButtonComponent } from "../Button/Button.js";
13
- import { isSlot } from "../utils/is-slot.js";
14
- import { useSlots } from "../hooks/useSlots.js";
15
15
  import { Dialog } from "../Dialog/Dialog.js";
16
16
  import { ConfirmationDialog } from "../ConfirmationDialog/ConfirmationDialog.js";
17
17
  import { ActionList } from "../ActionList/index.js";
@@ -349,7 +349,10 @@ const SubTree = ({ count, state, children, "aria-label": ariaLabel }) => {
349
349
  });
350
350
  setLoadingFocused(false);
351
351
  }
352
- } else if (state === "loading") announceUpdate(`${getAccessibleName(parentElement)} content loading`);
352
+ } else if (state === "loading") {
353
+ const parentName = getAccessibleName(parentElement);
354
+ announceUpdate(`${parentName} content loading`);
355
+ }
353
356
  }, [
354
357
  loadingFocused,
355
358
  previousState,
@@ -1,14 +1,14 @@
1
1
  import { useProvidedRefOrCreate } from "../../hooks/useProvidedRefOrCreate.js";
2
2
  import { useAnchoredPosition } from "../../hooks/useAnchoredPosition.js";
3
3
  import { useId as useId$1 } from "../../hooks/useId.js";
4
+ import { isSlot } from "../../utils/is-slot.js";
5
+ import { useSlots } from "../../hooks/useSlots.js";
4
6
  import Spinner from "../../Spinner/Spinner.js";
5
7
  import { AriaStatus } from "../../live-region/AriaStatus.js";
6
8
  import { invariant } from "../../utils/invariant.js";
7
9
  import { IconButton } from "../../Button/IconButton.js";
8
10
  import { ButtonComponent } from "../../Button/Button.js";
9
11
  import { useResponsiveValue } from "../../hooks/useResponsiveValue.js";
10
- import { isSlot } from "../../utils/is-slot.js";
11
- import { useSlots } from "../../hooks/useSlots.js";
12
12
  import { ActionListContainerContext } from "../../ActionList/ActionListContainerContext.js";
13
13
  import Heading from "../../Heading/Heading.js";
14
14
  import Link from "../../Link/Link.js";
@@ -1,8 +1,8 @@
1
1
  import useIsomorphicLayoutEffect from "../../utils/useIsomorphicLayoutEffect.js";
2
2
  import { useResizeObserver } from "../../hooks/useResizeObserver.js";
3
3
  import { useId as useId$1 } from "../../hooks/useId.js";
4
- import { invariant } from "../../utils/invariant.js";
5
4
  import { isSlot } from "../../utils/is-slot.js";
5
+ import { invariant } from "../../utils/invariant.js";
6
6
  import { createComponent } from "../../utils/create-component.js";
7
7
  import { UnderlineItem, UnderlineItemList, UnderlineWrapper } from "../../internal/components/UnderlineTabbedInterface.js";
8
8
  import UnderlinePanels_module_css_default from "./UnderlinePanels.module.css.js";
@@ -1,4 +1,5 @@
1
1
  "use client";
2
+ import { useSlots } from "../hooks/useSlots.js";
2
3
  import { Announce } from "../live-region/Announce.js";
3
4
  import { AriaAlert } from "../live-region/AriaAlert.js";
4
5
  import { AriaStatus } from "../live-region/AriaStatus.js";
@@ -6,7 +7,6 @@ import { ButtonBase } from "../Button/ButtonBase.js";
6
7
  import { KeybindingHint } from "../KeybindingHint/KeybindingHint.js";
7
8
  import { getAccessibleKeybindingHintString } from "../KeybindingHint/utils.js";
8
9
  import { Tooltip } from "../TooltipV2/Tooltip.js";
9
- import { useSlots } from "../hooks/useSlots.js";
10
10
  import { useOverflow } from "../hooks/useOverflow.js";
11
11
  import { ScrollableRegion } from "../ScrollableRegion/ScrollableRegion.js";
12
12
  import { Dialog } from "../Dialog/Dialog.js";
@@ -91,7 +91,8 @@ function useDialog(t0) {
91
91
  let t8;
92
92
  if ($[15] !== getFocusableItem) {
93
93
  t8 = (e_1) => {
94
- const focusableItem_0 = getFocusableItem(e_1, e_1.shiftKey ? -1 : 1);
94
+ const movement_0 = e_1.shiftKey ? -1 : 1;
95
+ const focusableItem_0 = getFocusableItem(e_1, movement_0);
95
96
  if (!focusableItem_0) return;
96
97
  focusableItem_0.focus();
97
98
  };
@@ -15,7 +15,8 @@ function useScrollFlash(scrollContainerRef) {
15
15
  if (!scrollContainer) return;
16
16
  const id = requestAnimationFrame(() => {
17
17
  const currentScroll = scrollContainer.scrollTop;
18
- scrollContainer.scrollTop = currentScroll < 1 ? currentScroll + 1 : currentScroll - 1;
18
+ const altScroll = currentScroll < 1 ? currentScroll + 1 : currentScroll - 1;
19
+ scrollContainer.scrollTop = altScroll;
19
20
  scrollContainer.scrollTop = currentScroll;
20
21
  });
21
22
  return () => cancelAnimationFrame(id);
package/dist/index.d.ts CHANGED
@@ -16,9 +16,7 @@ import { LinkButton, LinkButtonProps } from "./Button/LinkButton.js";
16
16
  import { ButtonComponent } from "./Button/Button.js";
17
17
  import { ButtonBase } from "./Button/ButtonBase.js";
18
18
  import { ResponsiveValue, useResponsiveValue } from "./hooks/useResponsiveValue.js";
19
- import { CustomWidthOptions, PaneWidth, PaneWidthValue, UsePaneWidthOptions, UsePaneWidthResult, defaultPaneWidth, usePaneWidth } from "./PageLayout/usePaneWidth.js";
20
19
  import { PageLayout, PageLayoutContentProps, PageLayoutFooterProps, PageLayoutHeaderProps, PageLayoutPaneProps, PageLayoutProps } from "./PageLayout/PageLayout.js";
21
- import { DragHandle, DragHandleProps } from "./PageLayout/DragHandle.js";
22
20
  import { SplitPageLayout, SplitPageLayoutContentProps, SplitPageLayoutFooterProps, SplitPageLayoutHeaderProps, SplitPageLayoutPaneProps, SplitPageLayoutProps } from "./SplitPageLayout/SplitPageLayout.js";
23
21
  import useDetails from "./hooks/useDetails.js";
24
22
  import useSafeTimeout from "./hooks/useSafeTimeout.js";
@@ -119,4 +117,4 @@ import { ActionsProps, ChildrenPropTypes, PageHeader, PageHeaderProps, TitleArea
119
117
  import { SkeletonBox, SkeletonBoxProps } from "./Skeleton/SkeletonBox.js";
120
118
  import { ActionMenu, ActionMenuAnchorProps, ActionMenuButtonProps, ActionMenuProps } from "./ActionMenu/ActionMenu.js";
121
119
  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 };
120
+ 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, Details, type DetailsProps, Dialog, type DialogButtonProps, type DialogHeaderProps, type DialogHeight, type DialogProps, type DialogWidth, 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, _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, VisuallyHidden, type VisuallyHiddenProps, type WithSlotMarker, asSlot, createComponent, isSlot, registerPortalRoot, theme, useAnchoredPosition, useColorSchemeVar, useConfirm, useDetails, useFocusTrap, useFocusZone, useFormControlForwardedProps, useId, useIsomorphicLayoutEffect, useMergedRefs, useOnEscapePress, useOnOutsideClick, useOpenAndCloseFocus, useOverlay, useProvidedRefOrCreate, useRefObjectAsForwardedRef, useResizeObserver, useResponsiveValue, useRovingTabIndex, useSafeTimeout, useSlots, useSyncedState, useTheme };
package/dist/index.js CHANGED
@@ -9,12 +9,15 @@ import { VisuallyHidden } from "./VisuallyHidden/VisuallyHidden.js";
9
9
  import { useOnOutsideClick } from "./hooks/useOnOutsideClick.js";
10
10
  import { useProvidedRefOrCreate } from "./hooks/useProvidedRefOrCreate.js";
11
11
  import { useOnEscapePress } from "./hooks/useOnEscapePress.js";
12
+ import { useOpenAndCloseFocus } from "./hooks/useOpenAndCloseFocus.js";
12
13
  import useIsomorphicLayoutEffect from "./utils/useIsomorphicLayoutEffect.js";
13
14
  import { useResizeObserver } from "./hooks/useResizeObserver.js";
14
15
  import { useAnchoredPosition } from "./hooks/useAnchoredPosition.js";
15
- import { useOpenAndCloseFocus } from "./hooks/useOpenAndCloseFocus.js";
16
16
  import { useOverlay } from "./hooks/useOverlay.js";
17
+ import { useRefObjectAsForwardedRef } from "./hooks/useRefObjectAsForwardedRef.js";
17
18
  import { useId } from "./hooks/useId.js";
19
+ import { isSlot } from "./utils/is-slot.js";
20
+ import { useSlots } from "./hooks/useSlots.js";
18
21
  import Spinner from "./Spinner/Spinner.js";
19
22
  import CounterLabel from "./CounterLabel/CounterLabel.js";
20
23
  import { ButtonBase } from "./Button/ButtonBase.js";
@@ -25,10 +28,6 @@ import { IconButton } from "./Button/IconButton.js";
25
28
  import { LinkButton } from "./Button/LinkButton.js";
26
29
  import { ButtonComponent } from "./Button/Button.js";
27
30
  import { useResponsiveValue } from "./hooks/useResponsiveValue.js";
28
- import { isSlot } from "./utils/is-slot.js";
29
- import { useSlots } from "./hooks/useSlots.js";
30
- import { defaultPaneWidth, usePaneWidth } from "./PageLayout/usePaneWidth.js";
31
- import { DragHandle } from "./PageLayout/DragHandle.js";
32
31
  import { PageLayout } from "./PageLayout/PageLayout.js";
33
32
  import { SplitPageLayout } from "./SplitPageLayout/SplitPageLayout.js";
34
33
  import useDetails from "./hooks/useDetails.js";
@@ -40,7 +39,6 @@ import Portal_default from "./Portal/index.js";
40
39
  import { Dialog } from "./Dialog/Dialog.js";
41
40
  import { ConfirmationDialog } from "./ConfirmationDialog/ConfirmationDialog.js";
42
41
  import { useConfirm } from "./ConfirmationDialog/useConfirm.js";
43
- import { useRefObjectAsForwardedRef } from "./hooks/useRefObjectAsForwardedRef.js";
44
42
  import { createComponent } from "./utils/create-component.js";
45
43
  import { asSlot } from "./utils/as-slot.js";
46
44
  import Radio from "./Radio/Radio.js";
@@ -94,4 +92,4 @@ import { TreeView } from "./TreeView/TreeView.js";
94
92
  import { UnderlineNav } from "./UnderlineNav/index.js";
95
93
  import { ActionBar } from "./ActionBar/index.js";
96
94
  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 };
95
+ 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, 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, isSlot, registerPortalRoot, theme, useAnchoredPosition, useColorSchemeVar, useConfirm, useDetails, useFocusTrap, useFocusZone, useFormControlForwardedProps, useId, useIsomorphicLayoutEffect, useMergedRefs, useOnEscapePress, useOnOutsideClick, useOpenAndCloseFocus, useOverlay, useProvidedRefOrCreate, useRefObjectAsForwardedRef, useResizeObserver, useResponsiveValue, useRovingTabIndex, useSafeTimeout, useSlots, useSyncedState, useTheme };
@@ -1,6 +1,6 @@
1
1
  import { useId as useId$1 } from "../../../hooks/useId.js";
2
- import VisuallyHidden from "../../../_VisuallyHidden.js";
3
2
  import { useSlots } from "../../../hooks/useSlots.js";
3
+ import VisuallyHidden from "../../../_VisuallyHidden.js";
4
4
  import ValidationAnimationContainer from "../ValidationAnimationContainer.js";
5
5
  import CheckboxOrRadioGroupContext from "./CheckboxOrRadioGroupContext.js";
6
6
  import CheckboxOrRadioGroup_module_css_default from "./CheckboxOrRadioGroup.module.css.js";
@@ -0,0 +1,2 @@
1
+ .prc-components-UnderlineWrapper-eT-Yj{align-items:flex-start;box-shadow:inset 0 -1px var(--borderColor-muted,#d1d9e0b3);display:flex;justify-content:flex-start;min-height:var(--control-xlarge-size,3rem);padding-top:var(--base-size-8,.5rem);padding-inline:var(--stack-padding-normal,1rem)}.prc-components-UnderlineWrapper-eT-Yj[data-variant=flush]{padding-inline:unset}.prc-components-UnderlineWrapper-eT-Yj[data-overflow-mode=wrap]{max-height:var(--control-xlarge-size,3rem);overflow:hidden}.prc-components-UnderlineWrapper-eT-Yj[data-overflow-mode=wrap] .prc-components-UnderlineItemList-xKlKC{flex-grow:1;flex-wrap:wrap;overflow:hidden}.prc-components-UnderlineItemList-xKlKC{display:flex;gap:var(--stack-gap-condensed,.5rem);list-style:none;margin:0;padding:0;white-space:nowrap}.prc-components-UnderlineItem-7fP-n,.prc-components-UnderlineItemList-xKlKC{align-items:center;position:relative}.prc-components-UnderlineItem-7fP-n{appearance:none;background-color:transparent;border:0;border-radius:var(--borderRadius-medium,.375rem);color:var(--fgColor-default,#1f2328);cursor:pointer;display:inline-flex;font:inherit;font-size:var(--text-body-size-medium,.875rem);height:32px;line-height:var(--text-body-lineHeight-medium,1.4285);margin-bottom:var(--base-size-8,.5rem);max-width:100%;padding-block:var(--base-size-6,.375rem);padding-inline:var(--base-size-8,.5rem);text-align:center;-webkit-text-decoration:none;text-decoration:none}@media (hover:hover){.prc-components-UnderlineItem-7fP-n:hover{background-color:var(--bgColor-neutral-muted,#818b981f);-webkit-text-decoration:none;text-decoration:none;transition:background-color .12s ease-out}}.prc-components-UnderlineItem-7fP-n:focus{box-shadow:inset 0 0 0 2px var(--fgColor-accent,#0969da);outline:2px solid transparent}.prc-components-UnderlineItem-7fP-n:focus:not(:focus-visible){box-shadow:none}.prc-components-UnderlineItem-7fP-n:focus-visible{box-shadow:inset 0 0 0 2px var(--fgColor-accent,#0969da);outline:2px solid transparent}.prc-components-UnderlineItem-7fP-n [data-content]:before{content:attr(data-content);display:block;font-weight:var(--base-text-weight-semibold,600);height:0;visibility:hidden;white-space:nowrap}.prc-components-UnderlineItem-7fP-n [data-component=icon]{align-items:center;color:var(--fgColor-muted,#59636e);display:inline-flex;margin-inline-end:var(--base-size-8,.5rem)}.prc-components-UnderlineItem-7fP-n [data-component=text]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.prc-components-UnderlineItem-7fP-n [data-component=counter]{align-items:center;display:flex;margin-inline-start:var(--base-size-8,.5rem)}.prc-components-UnderlineItem-7fP-n:after{background-color:transparent;content:"";height:2px;inset:auto 0 0;margin-bottom:calc(var(--base-size-8,.5rem)*-1);pointer-events:none;position:absolute}.prc-components-UnderlineItem-7fP-n[aria-current]:not([aria-current=false]) [data-component=text],.prc-components-UnderlineItem-7fP-n[aria-selected=true] [data-component=text]{font-weight:var(--base-text-weight-semibold,600)}.prc-components-UnderlineItem-7fP-n[aria-current]:not([aria-current=false]):after,.prc-components-UnderlineItem-7fP-n[aria-selected=true]:after{background-color:var(--underlineNav-borderColor-active,var(--color-primer-border-active,#fd8c73))}@media (forced-colors:active){.prc-components-UnderlineItem-7fP-n[aria-current]:not([aria-current=false]):after,.prc-components-UnderlineItem-7fP-n[aria-selected=true]:after{background-color:LinkText}}.prc-components-LoadingCounter-dBuLy{animation:prc-components-loadingCounterKeyFrames-8tMlf 1.2s ease-in-out infinite alternate;background-color:var(--bgColor-neutral-muted,#818b981f);border-color:var(--borderColor-default,#d1d9e0);border-radius:20px;display:inline-block;height:1rem;width:1.5rem}@keyframes prc-components-loadingCounterKeyFrames-8tMlf{0%{opacity:1}to{opacity:.2}}
2
+ /*# sourceMappingURL=UnderlineTabbedInterface-9aca4eac.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/internal/components/UnderlineTabbedInterface.module.css.js"],"names":[],"mappings":"AAAA,uCAME,sBAAuB,CAOvB,0DAAiD,CAZjD,YAAa,CAIb,0BAA2B,CAI3B,0CAAsC,CAPtC,oCAA+B,CAE/B,+CA2BF,CAhBE,2DAEE,oBACF,CAEA,gEAGE,0CAAsC,CADtC,eAQF,CALE,wGACE,WAAY,CACZ,cAAe,CACf,eACF,CAIJ,wCAEE,YAAa,CAMb,oCAA+B,CAF/B,eAAgB,CAFhB,QAAS,CADT,SAAU,CAEV,kBAIF,CAEA,4EAJE,kBAAmB,CANnB,iBAyCF,CA/BA,oCAmBE,eAAgB,CARhB,4BAA6B,CAC7B,QAAS,CACT,gDAAyC,CANzC,oCAA6B,CAG7B,cAAe,CAPf,mBAAoB,CACpB,YAAa,CACb,8CAAuC,CAWvC,WAAY,CAVZ,qDAAuD,CASvD,sCAAiC,CADjC,cAAe,CAOf,wCAAiC,CADjC,uCAAkC,CAZlC,iBAAkB,CAClB,4BAAqB,CAArB,oBAsBF,CAPE,qBACE,0CAEE,uDAA8C,CAD9C,4BAAqB,CAArB,oBAAqB,CAErB,yCACF,CACF,CAGF,0CAGE,wDAAiD,CAFjD,6BAQF,CAHE,8DACE,eACF,CAGF,kDAGE,wDAAiD,CAFjD,6BAGF,CAGA,0DAME,0BAA2B,CAL3B,aAAc,CAEd,gDAA6C,CAD7C,QAAS,CAGT,iBAAkB,CADlB,kBAGF,CAEA,0DAGE,kBAAmB,CADnB,kCAA2B,CAD3B,mBAAoB,CAGpB,0CACF,CAGA,0DACE,eAAgB,CAChB,sBAAuB,CACvB,kBACF,CAEA,6DAGE,kBAAmB,CADnB,YAAa,CADb,4CAGF,CAEA,0CAOE,4BAA6B,CAD7B,UAAW,CAFX,UAAW,CAFX,cAAe,CACf,+CAA4C,CAE5C,mBAAoB,CAJpB,iBAOF,CAEA,gLAEE,gDACF,CAEA,gJAGE,iGAMF,CAJE,8BALF,gJAOI,yBAEJ,CADE,CAGF,qCASE,0FAAsE,CAJtE,uDAA8C,CAC9C,+CAAwC,CAExC,kBAAmB,CAPnB,oBAAqB,CAErB,WAAY,CADZ,YAQF,CAEA,wDACE,GACE,SACF,CAEA,GACE,UACF,CACF","file":"UnderlineTabbedInterface-9aca4eac.css","sourcesContent":[".UnderlineWrapper {\n display: flex;\n padding-top: var(--base-size-8);\n /* stylelint-disable-next-line primer/spacing */\n padding-inline: var(--stack-padding-normal);\n justify-content: flex-start;\n align-items: flex-start;\n\n /* make space for the underline */\n min-height: var(--control-xlarge-size);\n\n /* using a box-shadow instead of a border to accommodate 'overflow-y: hidden' on UnderlinePanels */\n /* stylelint-disable-next-line primer/box-shadow */\n box-shadow: inset 0 -1px var(--borderColor-muted);\n\n &[data-variant='flush'] {\n /* stylelint-disable-next-line primer/spacing */\n padding-inline: unset;\n }\n\n &[data-overflow-mode='wrap'] {\n /* Wrap items onto hidden next lines */\n overflow: hidden;\n max-height: var(--control-xlarge-size);\n\n .UnderlineItemList {\n flex-grow: 1;\n flex-wrap: wrap;\n overflow: hidden;\n }\n }\n}\n\n.UnderlineItemList {\n position: relative;\n display: flex;\n padding: 0;\n margin: 0;\n white-space: nowrap;\n list-style: none;\n align-items: center;\n gap: var(--stack-gap-condensed);\n}\n\n.UnderlineItem {\n /* underline tab specific styles */\n position: relative;\n display: inline-flex;\n font: inherit;\n font-size: var(--text-body-size-medium);\n line-height: var(--text-body-lineHeight-medium, 1.4285);\n color: var(--fgColor-default);\n text-align: center;\n text-decoration: none;\n cursor: pointer;\n background-color: transparent;\n border: 0;\n border-radius: var(--borderRadius-medium);\n max-width: 100%;\n margin-bottom: var(--base-size-8);\n height: 32px;\n\n /* button resets */\n appearance: none;\n padding-inline: var(--base-size-8);\n padding-block: var(--base-size-6);\n align-items: center;\n\n @media (hover: hover) {\n &:hover {\n text-decoration: none;\n background-color: var(--bgColor-neutral-muted);\n transition: background-color 0.12s ease-out;\n }\n }\n}\n\n.UnderlineItem:focus {\n outline: 2px solid transparent;\n /* stylelint-disable-next-line primer/box-shadow */\n box-shadow: inset 0 0 0 2px var(--fgColor-accent);\n\n /* where focus-visible is supported, remove the focus box-shadow */\n &:not(:focus-visible) {\n box-shadow: none;\n }\n}\n\n.UnderlineItem:focus-visible {\n outline: 2px solid transparent;\n /* stylelint-disable-next-line primer/box-shadow */\n box-shadow: inset 0 0 0 2px var(--fgColor-accent);\n}\n\n/* renders a visibly hidden \"copy\" of the label in bold, reserving box space for when label becomes bold on selected */\n.UnderlineItem [data-content]::before {\n display: block;\n height: 0;\n font-weight: var(--base-text-weight-semibold);\n white-space: nowrap;\n visibility: hidden;\n content: attr(data-content);\n}\n\n.UnderlineItem [data-component='icon'] {\n display: inline-flex;\n color: var(--fgColor-muted);\n align-items: center;\n margin-inline-end: var(--base-size-8);\n}\n\n/* Truncate items if necessary (should only ever apply to the last item after everything else overflows) */\n.UnderlineItem [data-component='text'] {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.UnderlineItem [data-component='counter'] {\n margin-inline-start: var(--base-size-8);\n display: flex;\n align-items: center;\n}\n\n.UnderlineItem::after {\n position: absolute;\n inset: auto 0 0;\n margin-bottom: calc(-1 * var(--base-size-8));\n height: 2px;\n pointer-events: none;\n content: '';\n background-color: transparent;\n}\n\n.UnderlineItem[aria-current]:not([aria-current='false']) [data-component='text'],\n.UnderlineItem[aria-selected='true'] [data-component='text'] {\n font-weight: var(--base-text-weight-semibold);\n}\n\n.UnderlineItem[aria-current]:not([aria-current='false'])::after,\n.UnderlineItem[aria-selected='true']::after {\n /* stylelint-disable-next-line primer/colors */\n background-color: var(--underlineNav-borderColor-active, var(--color-primer-border-active, #fd8c73));\n\n @media (forced-colors: active) {\n /* Support for Window Force Color Mode https://learn.microsoft.com/en-us/fluent-ui/web-components/design-system/high-contrast */\n background-color: LinkText;\n }\n}\n\n.LoadingCounter {\n display: inline-block;\n width: 1.5rem;\n height: 1rem;\n /* 16px */\n background-color: var(--bgColor-neutral-muted);\n border-color: var(--borderColor-default);\n /* stylelint-disable-next-line primer/borders */\n border-radius: 20px;\n animation: loadingCounterKeyFrames 1.2s ease-in-out infinite alternate;\n}\n\n@keyframes loadingCounterKeyFrames {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0.2;\n }\n}\n"]}
@@ -1,4 +1,4 @@
1
- import "./UnderlineTabbedInterface-25587345.css";
1
+ import "./UnderlineTabbedInterface-9aca4eac.css";
2
2
  //#region src/internal/components/UnderlineTabbedInterface.module.css.js
3
3
  var UnderlineTabbedInterface_module_css_default = {
4
4
  "UnderlineWrapper": "prc-components-UnderlineWrapper-eT-Yj",
@@ -5,9 +5,10 @@ const warn = function warn(message) {
5
5
  const warning = function warning(condition, format, ...args) {
6
6
  if (condition) {
7
7
  let index = 0;
8
- warn(format.replace(/%s/g, () => {
8
+ const message = format.replace(/%s/g, () => {
9
9
  return args[index++];
10
- }));
10
+ });
11
+ warn(message);
11
12
  }
12
13
  };
13
14
  //#endregion
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@primer/react",
3
3
  "type": "module",
4
- "version": "0.0.0-20260714183333",
4
+ "version": "0.0.0-20260714190115",
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",
@@ -169,7 +169,7 @@
169
169
  "react-is": "18.3.1",
170
170
  "recast": "0.23.7",
171
171
  "rimraf": "5.0.5",
172
- "rolldown": "^1.1.2",
172
+ "rolldown": "^1.1.4",
173
173
  "rolldown-plugin-dts": "^0.26.0",
174
174
  "rolldown-plugin-import-css": "^0.0.0",
175
175
  "rolldown-plugin-preserve-directives": "^0.0.0",
@@ -1,38 +0,0 @@
1
- import React from "react";
2
-
3
- //#region src/PageLayout/DragHandle.d.ts
4
- type DragHandleProps = {
5
- /** Ref for imperative ARIA updates during drag */handleRef: React.RefObject<HTMLDivElement>; /** Called once when drag starts with initial cursor X position */
6
- onDragStart: (clientX: number) => void; /** Called on each drag tick with cursor position (pointer) or delta (keyboard) */
7
- onDrag: (value: number, isKeyboard: boolean) => void; /** Called when drag operation completes */
8
- onDragEnd: () => void; /** Reset width on double-click */
9
- onDoubleClick?: React.MouseEventHandler<HTMLDivElement>; /** ARIA slider min value */
10
- 'aria-valuemin'?: number; /** ARIA slider max value */
11
- 'aria-valuemax'?: number; /** ARIA slider current value */
12
- 'aria-valuenow'?: number;
13
- /**
14
- * Ref to the element that receives drag-time styling/containment optimizations
15
- * (e.g. the resizable pane). When omitted, those side effects are skipped.
16
- */
17
- dragTargetRef?: React.RefObject<HTMLElement | null>;
18
- /**
19
- * Ref to a content wrapper element that receives drag-time containment.
20
- * Only needed for layouts (like PageLayout) that optimize sibling content during drag.
21
- */
22
- contentWrapperRef?: React.RefObject<HTMLElement | null>;
23
- /**
24
- * Formats the `aria-valuetext` announced for the current width.
25
- * @default valueNow => `Pane width ${valueNow} pixels`
26
- */
27
- formatValueText?: (valueNow: number) => string; /** Value for the `data-component` attribute. */
28
- 'data-component'?: string;
29
- };
30
- /**
31
- * DragHandle - handles all pointer and keyboard interactions for resizing.
32
- * ARIA values are set in JSX for SSR accessibility, then updated via DOM
33
- * manipulation during drag for performance. The consumer owns writing the width
34
- * (via the `onDrag` callback); this component only reports interactions.
35
- */
36
- declare const DragHandle: React.NamedExoticComponent<DragHandleProps>;
37
- //#endregion
38
- export { DragHandle, DragHandleProps };