@primer/react 0.0.0-20260702155148 → 0.0.0-20260702173630

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 (29) hide show
  1. package/CHANGELOG.md +1 -3
  2. package/dist/ActionList/List.js +45 -46
  3. package/dist/AnchoredOverlay/AnchoredOverlay.js +4 -2
  4. package/dist/Autocomplete/AutocompleteInput.js +10 -7
  5. package/dist/ButtonGroup/ButtonGroup.js +23 -23
  6. package/dist/Checkbox/Checkbox.js +5 -4
  7. package/dist/Dialog/Dialog.js +3 -3
  8. package/dist/FilteredActionList/FilteredActionList.js +7 -5
  9. package/dist/FilteredActionList/FilteredActionListInput.d.ts +1 -1
  10. package/dist/PageHeader/PageHeader.js +30 -31
  11. package/dist/TextInput/TextInput.js +5 -4
  12. package/dist/TooltipV2/Tooltip.js +4 -3
  13. package/dist/UnderlineNav/UnderlineNav-47547980.css +2 -0
  14. package/dist/UnderlineNav/UnderlineNav-47547980.css.map +1 -0
  15. package/dist/UnderlineNav/UnderlineNav.js +110 -104
  16. package/dist/UnderlineNav/UnderlineNav.module.css.js +1 -2
  17. package/dist/experimental/Tabs/types.d.ts +2 -2
  18. package/dist/experimental/Tabs/useTabList.js +16 -15
  19. package/dist/hooks/useMergedRefs.js +4 -1
  20. package/dist/hooks/useProvidedRefOrCreate.d.ts +7 -10
  21. package/dist/hooks/useProvidedRefOrCreate.js +7 -10
  22. package/dist/internal/components/UnderlineTabbedInterface-1745a3d6.css +2 -0
  23. package/dist/internal/components/UnderlineTabbedInterface-1745a3d6.css.map +1 -0
  24. package/dist/internal/components/UnderlineTabbedInterface.module.css.js +1 -1
  25. package/package.json +1 -1
  26. package/dist/UnderlineNav/UnderlineNav-964b246d.css +0 -2
  27. package/dist/UnderlineNav/UnderlineNav-964b246d.css.map +0 -1
  28. package/dist/internal/components/UnderlineTabbedInterface-25587345.css +0 -2
  29. package/dist/internal/components/UnderlineTabbedInterface-25587345.css.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @primer/react
2
2
 
3
- ## 0.0.0-20260702155148
3
+ ## 0.0.0-20260702173630
4
4
 
5
5
  ### Minor Changes
6
6
 
@@ -14,8 +14,6 @@
14
14
 
15
15
  - Fake entry to force publishing
16
16
 
17
- - [#8108](https://github.com/primer/react/pull/8108) [`302d679`](https://github.com/primer/react/commit/302d679f2a95c4254b8f6f1e625ac2a2bbf0bc70) Thanks [@iansan5653](https://github.com/iansan5653)! - `UnderlineNav`: Fix icon flickering on some screen sizes before initial render/hydration
18
-
19
17
  - [#8054](https://github.com/primer/react/pull/8054) [`1775f2e`](https://github.com/primer/react/commit/1775f2e8b968d59a1189456b14cff15e527937cb) Thanks [@joshblack](https://github.com/joshblack)! - AvatarStack: Improve rendering performance with React Compiler support
20
18
 
21
19
  - [#8053](https://github.com/primer/react/pull/8053) [`b2151ae`](https://github.com/primer/react/commit/b2151ae2d5719f09efb0b89731e52e4ca50e8bf1) Thanks [@joshblack](https://github.com/joshblack)! - Checkbox, CheckboxGroup, and RadioGroup: Improve rendering performance with React Compiler support
@@ -1,4 +1,4 @@
1
- import { useProvidedRefOrCreate } from "../hooks/useProvidedRefOrCreate.js";
1
+ import { useMergedRefs } from "../hooks/useMergedRefs.js";
2
2
  import useIsomorphicLayoutEffect from "../utils/useIsomorphicLayoutEffect.js";
3
3
  import { useId as useId$1 } from "../hooks/useId.js";
4
4
  import { fixedForwardRef } from "../utils/modern-polymorphic.js";
@@ -12,11 +12,11 @@ import { useFeatureFlag } from "../FeatureFlags/useFeatureFlag.js";
12
12
  import { c } from "react-compiler-runtime";
13
13
  import { clsx } from "clsx";
14
14
  import { jsx, jsxs } from "react/jsx-runtime";
15
- import React from "react";
15
+ import React, { useRef } from "react";
16
16
  //#region src/ActionList/List.tsx
17
17
  const UnwrappedList = (props, forwardedRef) => {
18
18
  var _slots$heading$props$;
19
- const $ = c(40);
19
+ const $ = c(38);
20
20
  let className;
21
21
  let restProps;
22
22
  let role;
@@ -60,7 +60,8 @@ const UnwrappedList = (props, forwardedRef) => {
60
60
  const { listRole: listRoleFromContainer, listLabelledBy, selectionVariant: containerSelectionVariant, enableFocusZone: enableFocusZoneFromContainer, container } = React.useContext(ActionListContainerContext);
61
61
  const ariaLabelledBy = slots.heading ? (_slots$heading$props$ = slots.heading.props.id) !== null && _slots$heading$props$ !== void 0 ? _slots$heading$props$ : headingId : listLabelledBy;
62
62
  const listRole = role || listRoleFromContainer;
63
- const listRef = useProvidedRefOrCreate(forwardedRef);
63
+ const listRef = useRef(null);
64
+ const mergedRef = useMergedRefs(forwardedRef, listRef);
64
65
  const itemGapEnabled = useFeatureFlag("primer_react_action_list_item_gap") && container === "NavList";
65
66
  let enableFocusZone = false;
66
67
  if (enableFocusZoneFromContainer !== void 0) enableFocusZone = enableFocusZoneFromContainer;
@@ -79,22 +80,21 @@ const UnwrappedList = (props, forwardedRef) => {
79
80
  const t5 = !enableFocusZone;
80
81
  const t6 = listRole === "menu" || container === "SelectPanel" || container === "FilteredActionList" ? "wrap" : void 0;
81
82
  let t7;
82
- if ($[11] !== listRef || $[12] !== t5 || $[13] !== t6) {
83
+ if ($[11] !== t5 || $[12] !== t6) {
83
84
  t7 = {
84
85
  disabled: t5,
85
86
  containerRef: listRef,
86
87
  bindKeys: FocusKeys.ArrowVertical | FocusKeys.HomeAndEnd | FocusKeys.PageUpDown,
87
88
  focusOutBehavior: t6
88
89
  };
89
- $[11] = listRef;
90
- $[12] = t5;
91
- $[13] = t6;
92
- $[14] = t7;
93
- } else t7 = $[14];
90
+ $[11] = t5;
91
+ $[12] = t6;
92
+ $[13] = t7;
93
+ } else t7 = $[13];
94
94
  useFocusZone(t7);
95
95
  const t8 = selectionVariant || containerSelectionVariant;
96
96
  let t9;
97
- if ($[15] !== headingId || $[16] !== listRole || $[17] !== showDividers || $[18] !== t8 || $[19] !== variant) {
97
+ if ($[14] !== headingId || $[15] !== listRole || $[16] !== showDividers || $[17] !== t8 || $[18] !== variant) {
98
98
  t9 = {
99
99
  variant,
100
100
  selectionVariant: t8,
@@ -102,16 +102,16 @@ const UnwrappedList = (props, forwardedRef) => {
102
102
  role: listRole,
103
103
  headingId
104
104
  };
105
- $[15] = headingId;
106
- $[16] = listRole;
107
- $[17] = showDividers;
108
- $[18] = t8;
109
- $[19] = variant;
110
- $[20] = t9;
111
- } else t9 = $[20];
105
+ $[14] = headingId;
106
+ $[15] = listRole;
107
+ $[16] = showDividers;
108
+ $[17] = t8;
109
+ $[18] = variant;
110
+ $[19] = t9;
111
+ } else t9 = $[19];
112
112
  const listContextValue = t9;
113
113
  let t10;
114
- if ($[21] !== listRef) {
114
+ if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
115
115
  t10 = () => {
116
116
  const list = listRef.current;
117
117
  if (!list) return;
@@ -120,25 +120,24 @@ const UnwrappedList = (props, forwardedRef) => {
120
120
  if (hasMixed && current !== "true") list.setAttribute("data-mixed-descriptions", "true");
121
121
  else if (!hasMixed && current !== null) list.removeAttribute("data-mixed-descriptions");
122
122
  };
123
- $[21] = listRef;
124
- $[22] = t10;
125
- } else t10 = $[22];
123
+ $[20] = t10;
124
+ } else t10 = $[20];
126
125
  useIsomorphicLayoutEffect(t10);
127
126
  const t11 = slots.heading;
128
127
  let t12;
129
- if ($[23] !== className) {
128
+ if ($[21] !== className) {
130
129
  t12 = clsx(ActionList_module_css_default.ActionList, className);
131
- $[23] = className;
132
- $[24] = t12;
133
- } else t12 = $[24];
130
+ $[21] = className;
131
+ $[22] = t12;
132
+ } else t12 = $[22];
134
133
  const t13 = itemGapEnabled ? "" : void 0;
135
134
  let t14;
136
- if ($[25] !== Component || $[26] !== ariaLabelledBy || $[27] !== childrenWithoutSlots || $[28] !== listRef || $[29] !== listRole || $[30] !== restProps || $[31] !== showDividers || $[32] !== t12 || $[33] !== t13 || $[34] !== variant) {
135
+ if ($[23] !== Component || $[24] !== ariaLabelledBy || $[25] !== childrenWithoutSlots || $[26] !== listRole || $[27] !== mergedRef || $[28] !== restProps || $[29] !== showDividers || $[30] !== t12 || $[31] !== t13 || $[32] !== variant) {
137
136
  t14 = /*#__PURE__*/ jsx(Component, {
138
137
  className: t12,
139
138
  role: listRole,
140
139
  "aria-labelledby": ariaLabelledBy,
141
- ref: listRef,
140
+ ref: mergedRef,
142
141
  "data-component": "ActionList",
143
142
  "data-dividers": showDividers,
144
143
  "data-variant": variant,
@@ -146,29 +145,29 @@ const UnwrappedList = (props, forwardedRef) => {
146
145
  ...restProps,
147
146
  children: childrenWithoutSlots
148
147
  });
149
- $[25] = Component;
150
- $[26] = ariaLabelledBy;
151
- $[27] = childrenWithoutSlots;
152
- $[28] = listRef;
153
- $[29] = listRole;
154
- $[30] = restProps;
155
- $[31] = showDividers;
156
- $[32] = t12;
157
- $[33] = t13;
158
- $[34] = variant;
159
- $[35] = t14;
160
- } else t14 = $[35];
148
+ $[23] = Component;
149
+ $[24] = ariaLabelledBy;
150
+ $[25] = childrenWithoutSlots;
151
+ $[26] = listRole;
152
+ $[27] = mergedRef;
153
+ $[28] = restProps;
154
+ $[29] = showDividers;
155
+ $[30] = t12;
156
+ $[31] = t13;
157
+ $[32] = variant;
158
+ $[33] = t14;
159
+ } else t14 = $[33];
161
160
  let t15;
162
- if ($[36] !== listContextValue || $[37] !== slots.heading || $[38] !== t14) {
161
+ if ($[34] !== listContextValue || $[35] !== slots.heading || $[36] !== t14) {
163
162
  t15 = /*#__PURE__*/ jsxs(ListContext.Provider, {
164
163
  value: listContextValue,
165
164
  children: [t11, t14]
166
165
  });
167
- $[36] = listContextValue;
168
- $[37] = slots.heading;
169
- $[38] = t14;
170
- $[39] = t15;
171
- } else t15 = $[39];
166
+ $[34] = listContextValue;
167
+ $[35] = slots.heading;
168
+ $[36] = t14;
169
+ $[37] = t15;
170
+ } else t15 = $[37];
172
171
  return t15;
173
172
  };
174
173
  const List = fixedForwardRef(UnwrappedList);
@@ -1,4 +1,5 @@
1
1
  import { reactMajorVersion } from "../utils/environment.js";
2
+ import { useMergedRefs } from "../hooks/useMergedRefs.js";
2
3
  import { useProvidedRefOrCreate } from "../hooks/useProvidedRefOrCreate.js";
3
4
  import { useAnchoredPosition } from "../hooks/useAnchoredPosition.js";
4
5
  import { useRenderForcingRef } from "../hooks/useRenderForcingRef.js";
@@ -33,6 +34,7 @@ const AnchoredOverlay = ({ renderAnchor, anchorRef: externalAnchorRef, anchorId:
33
34
  const [anchorElement, setAnchorElement] = useState(null);
34
35
  if (anchorRef.current !== anchorElement) setAnchorElement(anchorRef.current);
35
36
  const [overlayRef, updateOverlayRef] = useRenderForcingRef();
37
+ const mergedOverlayRef = useMergedRefs(updateOverlayRef, overlayProps === null || overlayProps === void 0 ? void 0 : overlayProps.ref);
36
38
  const [overlayElement, setOverlayElement] = useState(null);
37
39
  const anchorId = useId$1(externalAnchorId);
38
40
  const onClickOutside = useCallback(() => onClose === null || onClose === void 0 ? void 0 : onClose("click-outside"), [onClose]);
@@ -189,10 +191,10 @@ const AnchoredOverlay = ({ renderAnchor, anchorRef: externalAnchorRef, anchorId:
189
191
  ...shouldRenderAsPopover ? { popover: "manual" } : {},
190
192
  ...restOverlayProps,
191
193
  ...shouldRenderAsPopover ? { id: popoverId } : {},
194
+ ...cssAnchorPositioning ? { id: popoverId } : {},
192
195
  ref: (node) => {
193
- if (overlayProps !== null && overlayProps !== void 0 && overlayProps.ref) assignRef(overlayProps.ref, node);
194
- updateOverlayRef(node);
195
196
  setOverlayElement(node);
197
+ assignRef(mergedOverlayRef, node);
196
198
  },
197
199
  "data-anchor-position": cssAnchorPositioning,
198
200
  "data-side": cssAnchorPositioning ? side : position === null || position === void 0 ? void 0 : position.anchorSide,
@@ -20,9 +20,11 @@ const AutocompleteInput = /*#__PURE__*/ React.forwardRef(({ as: Component = Text
20
20
  if (openOnFocus) setShowMenu(true);
21
21
  };
22
22
  const handleInputBlur = useCallback((event) => {
23
- onBlur && onBlur(event);
23
+ onBlur === null || onBlur === void 0 || onBlur(event);
24
24
  safeSetTimeout(() => {
25
- if (document.activeElement !== inputRef.current) {
25
+ const nextFocusedElement = event.relatedTarget;
26
+ const menuElement = document.getElementById(`${id}-listbox`);
27
+ if (!nextFocusedElement || nextFocusedElement !== menuElement && !(menuElement !== null && menuElement !== void 0 && menuElement.contains(nextFocusedElement))) {
26
28
  setShowMenu(false);
27
29
  if (inputRef.current && autocompleteSuggestion && inputRef.current.value !== inputValue) inputRef.current.value = inputValue;
28
30
  }
@@ -33,16 +35,17 @@ const AutocompleteInput = /*#__PURE__*/ React.forwardRef(({ as: Component = Text
33
35
  inputRef,
34
36
  safeSetTimeout,
35
37
  autocompleteSuggestion,
36
- inputValue
38
+ inputValue,
39
+ id
37
40
  ]);
38
41
  const handleInputChange = (event) => {
39
- onChange && onChange(event);
42
+ onChange === null || onChange === void 0 || onChange(event);
40
43
  setInputValue(event.currentTarget.value);
41
44
  if (!showMenu) setShowMenu(true);
42
45
  };
43
46
  const handleInputKeyDown = useCallback((event) => {
44
47
  var _inputRef$current;
45
- onKeyDown && onKeyDown(event);
48
+ onKeyDown === null || onKeyDown === void 0 || onKeyDown(event);
46
49
  if (event.key === "Backspace") setHighlightRemainingText(false);
47
50
  if (event.key === "Escape" && (_inputRef$current = inputRef.current) !== null && _inputRef$current !== void 0 && _inputRef$current.value) {
48
51
  setInputValue("");
@@ -58,11 +61,11 @@ const AutocompleteInput = /*#__PURE__*/ React.forwardRef(({ as: Component = Text
58
61
  setShowMenu
59
62
  ]);
60
63
  const handleInputKeyUp = useCallback((event) => {
61
- onKeyUp && onKeyUp(event);
64
+ onKeyUp === null || onKeyUp === void 0 || onKeyUp(event);
62
65
  if (event.key === "Backspace") setHighlightRemainingText(true);
63
66
  }, [setHighlightRemainingText, onKeyUp]);
64
67
  const onInputKeyPress = useCallback((event) => {
65
- onKeyPress && onKeyPress(event);
68
+ onKeyPress === null || onKeyPress === void 0 || onKeyPress(event);
66
69
  if (showMenu && event.key === "Enter" && activeDescendantRef.current) {
67
70
  event.preventDefault();
68
71
  event.nativeEvent.stopImmediatePropagation();
@@ -1,13 +1,13 @@
1
- import { useProvidedRefOrCreate } from "../hooks/useProvidedRefOrCreate.js";
1
+ import { useMergedRefs } from "../hooks/useMergedRefs.js";
2
2
  import { FocusKeys, useFocusZone } from "../hooks/useFocusZone.js";
3
3
  import ButtonGroup_module_css_default from "./ButtonGroup.module.css.js";
4
4
  import { c } from "react-compiler-runtime";
5
5
  import { clsx } from "clsx";
6
6
  import { jsx } from "react/jsx-runtime";
7
- import React from "react";
7
+ import React, { useRef } from "react";
8
8
  //#region src/ButtonGroup/ButtonGroup.tsx
9
9
  const ButtonGroup = /*#__PURE__*/ React.forwardRef(function ButtonGroup(t0, forwardRef) {
10
- const $ = c(20);
10
+ const $ = c(19);
11
11
  let children;
12
12
  let className;
13
13
  let rest;
@@ -29,6 +29,8 @@ const ButtonGroup = /*#__PURE__*/ React.forwardRef(function ButtonGroup(t0, forw
29
29
  t1 = $[5];
30
30
  }
31
31
  const BaseComponent = t1 === void 0 ? "div" : t1;
32
+ const buttonRef = useRef(null);
33
+ const mergedRef = useMergedRefs(buttonRef, forwardRef);
32
34
  let t2;
33
35
  if ($[6] !== children) {
34
36
  t2 = React.Children.map(children, _temp);
@@ -36,45 +38,43 @@ const ButtonGroup = /*#__PURE__*/ React.forwardRef(function ButtonGroup(t0, forw
36
38
  $[7] = t2;
37
39
  } else t2 = $[7];
38
40
  const buttons = t2;
39
- const buttonRef = useProvidedRefOrCreate(forwardRef);
40
41
  const t3 = role !== "toolbar";
41
42
  let t4;
42
- if ($[8] !== buttonRef || $[9] !== t3) {
43
+ if ($[8] !== t3) {
43
44
  t4 = {
44
45
  containerRef: buttonRef,
45
46
  disabled: t3,
46
47
  bindKeys: FocusKeys.ArrowHorizontal,
47
48
  focusOutBehavior: "wrap"
48
49
  };
49
- $[8] = buttonRef;
50
- $[9] = t3;
51
- $[10] = t4;
52
- } else t4 = $[10];
50
+ $[8] = t3;
51
+ $[9] = t4;
52
+ } else t4 = $[9];
53
53
  useFocusZone(t4);
54
54
  let t5;
55
- if ($[11] !== className) {
55
+ if ($[10] !== className) {
56
56
  t5 = clsx(className, ButtonGroup_module_css_default.ButtonGroup);
57
- $[11] = className;
58
- $[12] = t5;
59
- } else t5 = $[12];
57
+ $[10] = className;
58
+ $[11] = t5;
59
+ } else t5 = $[11];
60
60
  let t6;
61
- if ($[13] !== BaseComponent || $[14] !== buttonRef || $[15] !== buttons || $[16] !== rest || $[17] !== role || $[18] !== t5) {
61
+ if ($[12] !== BaseComponent || $[13] !== buttons || $[14] !== mergedRef || $[15] !== rest || $[16] !== role || $[17] !== t5) {
62
62
  t6 = /*#__PURE__*/ jsx(BaseComponent, {
63
- ref: buttonRef,
63
+ ref: mergedRef,
64
64
  className: t5,
65
65
  role,
66
66
  ...rest,
67
67
  "data-component": "ButtonGroup",
68
68
  children: buttons
69
69
  });
70
- $[13] = BaseComponent;
71
- $[14] = buttonRef;
72
- $[15] = buttons;
73
- $[16] = rest;
74
- $[17] = role;
75
- $[18] = t5;
76
- $[19] = t6;
77
- } else t6 = $[19];
70
+ $[12] = BaseComponent;
71
+ $[13] = buttons;
72
+ $[14] = mergedRef;
73
+ $[15] = rest;
74
+ $[16] = role;
75
+ $[17] = t5;
76
+ $[18] = t6;
77
+ } else t6 = $[18];
78
78
  return t6;
79
79
  });
80
80
  ButtonGroup.displayName = "ButtonGroup";
@@ -1,17 +1,18 @@
1
- import { useProvidedRefOrCreate } from "../hooks/useProvidedRefOrCreate.js";
1
+ import { useMergedRefs } from "../hooks/useMergedRefs.js";
2
2
  import useIsomorphicLayoutEffect from "../utils/useIsomorphicLayoutEffect.js";
3
3
  import shared_module_css_default from "./shared.module.css.js";
4
4
  import { CheckboxGroupContext } from "../CheckboxGroup/CheckboxGroupContext.js";
5
5
  import Checkbox_module_css_default from "./Checkbox.module.css.js";
6
6
  import { clsx } from "clsx";
7
7
  import { jsx } from "react/jsx-runtime";
8
- import React, { useContext, useEffect } from "react";
8
+ import React, { useContext, useEffect, useRef } from "react";
9
9
  //#region src/Checkbox/Checkbox.tsx
10
10
  /**
11
11
  * An accessible, native checkbox component
12
12
  */
13
13
  const Checkbox = /*#__PURE__*/ React.forwardRef(({ checked, className, defaultChecked, indeterminate, disabled, onChange, required, validationStatus, value, ["data-component"]: dataComponent, ...rest }, ref) => {
14
- const checkboxRef = useProvidedRefOrCreate(ref);
14
+ const checkboxRef = useRef(null);
15
+ const mergedRef = useMergedRefs(checkboxRef, ref);
15
16
  const checkboxGroupContext = useContext(CheckboxGroupContext);
16
17
  const handleOnChange = (e) => {
17
18
  checkboxGroupContext.onChange && checkboxGroupContext.onChange(e);
@@ -24,7 +25,7 @@ const Checkbox = /*#__PURE__*/ React.forwardRef(({ checked, className, defaultCh
24
25
  const inputProps = {
25
26
  type: "checkbox",
26
27
  disabled,
27
- ref: checkboxRef,
28
+ ref: mergedRef,
28
29
  checked: indeterminate ? false : checked,
29
30
  defaultChecked,
30
31
  required,
@@ -1,5 +1,4 @@
1
1
  import { useMergedRefs } from "../hooks/useMergedRefs.js";
2
- import { useProvidedRefOrCreate } from "../hooks/useProvidedRefOrCreate.js";
3
2
  import { useOnEscapePress } from "../hooks/useOnEscapePress.js";
4
3
  import { useResizeObserver } from "../hooks/useResizeObserver.js";
5
4
  import { useId as useId$1 } from "../hooks/useId.js";
@@ -244,7 +243,8 @@ const Footer = /*#__PURE__*/ React.forwardRef(function Footer({ className, ...re
244
243
  Footer.displayName = "Dialog.Footer";
245
244
  const Buttons = ({ buttons }) => {
246
245
  var _buttons$find;
247
- const autoFocusRef = useProvidedRefOrCreate((_buttons$find = buttons.find((button) => button.autoFocus)) === null || _buttons$find === void 0 ? void 0 : _buttons$find.ref);
246
+ const autoFocusRef = useRef(null);
247
+ const mergedRef = useMergedRefs(autoFocusRef, (_buttons$find = buttons.find((button) => button.autoFocus)) === null || _buttons$find === void 0 ? void 0 : _buttons$find.ref);
248
248
  let autoFocusCount = 0;
249
249
  const [hasRendered, setHasRendered] = useState(0);
250
250
  useEffect(() => {
@@ -259,7 +259,7 @@ const Buttons = ({ buttons }) => {
259
259
  "data-component": "Dialog.FooterButton",
260
260
  ...buttonProps,
261
261
  variant: buttonType === "normal" ? "default" : buttonType,
262
- ref: autoFocus && autoFocusCount === 0 ? (autoFocusCount++, autoFocusRef) : null,
262
+ ref: autoFocus && autoFocusCount === 0 ? (autoFocusCount++, mergedRef) : null,
263
263
  children: content
264
264
  }, index);
265
265
  }) });
@@ -1,5 +1,5 @@
1
+ import { useMergedRefs } from "../hooks/useMergedRefs.js";
1
2
  import { VisuallyHidden } from "../VisuallyHidden/VisuallyHidden.js";
2
- import { useProvidedRefOrCreate } from "../hooks/useProvidedRefOrCreate.js";
3
3
  import { useProvidedStateOrCreate } from "../hooks/useProvidedStateOrCreate.js";
4
4
  import { useId as useId$1 } from "../hooks/useId.js";
5
5
  import { useFocusZone } from "../hooks/useFocusZone.js";
@@ -35,8 +35,10 @@ function FilteredActionList({ loading = false, placeholderText, filterValue: ext
35
35
  }, [onFilterChange, setInternalFilterValue]);
36
36
  const inputAndListContainerRef = useRef(null);
37
37
  const listRef = useRef(null);
38
- const scrollContainerRef = useProvidedRefOrCreate(providedScrollContainerRef);
39
- const inputRef = useProvidedRefOrCreate(providedInputRef);
38
+ const scrollContainerRef = useRef(null);
39
+ const combinedScrollContainerRef = useMergedRefs(scrollContainerRef, providedScrollContainerRef);
40
+ const inputRef = useRef(null);
41
+ const combinedInputRef = useMergedRefs(inputRef, providedInputRef);
40
42
  const usingRovingTabindex = _PrivateFocusManagement === "roving-tabindex";
41
43
  const [listContainerElement, setListContainerElement] = useState(null);
42
44
  const activeDescendantRef = useRef();
@@ -291,7 +293,7 @@ function FilteredActionList({ loading = false, placeholderText, filterValue: ext
291
293
  "data-component": "FilteredActionList",
292
294
  children: [
293
295
  /*#__PURE__*/ jsx(FilteredActionListInput, {
294
- inputRef,
296
+ inputRef: combinedInputRef,
295
297
  value: filterValue,
296
298
  onInputChange,
297
299
  onInputKeyPress,
@@ -325,7 +327,7 @@ function FilteredActionList({ loading = false, placeholderText, filterValue: ext
325
327
  })]
326
328
  }),
327
329
  /*#__PURE__*/ jsx("div", {
328
- ref: scrollContainerRef,
330
+ ref: combinedScrollContainerRef,
329
331
  className: FilteredActionList_module_css_default.Container,
330
332
  children: getBodyContent()
331
333
  })
@@ -3,7 +3,7 @@ import React from "react";
3
3
 
4
4
  //#region src/FilteredActionList/FilteredActionListInput.d.ts
5
5
  interface FilteredActionListInputProps extends Partial<Omit<TextInputProps, 'onChange' | 'onKeyDown'>> {
6
- inputRef: React.RefObject<HTMLInputElement | null>;
6
+ inputRef: React.Ref<HTMLInputElement | null>;
7
7
  onInputChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
8
8
  onInputKeyPress?: React.KeyboardEventHandler<HTMLInputElement>;
9
9
  onInputKeyDown?: React.KeyboardEventHandler<HTMLInputElement>;
@@ -1,4 +1,4 @@
1
- import { useProvidedRefOrCreate } from "../hooks/useProvidedRefOrCreate.js";
1
+ import { useMergedRefs } from "../hooks/useMergedRefs.js";
2
2
  import { warning } from "../utils/warning.js";
3
3
  import { isResponsiveValue } from "../hooks/useResponsiveValue.js";
4
4
  import { isSlot } from "../utils/is-slot.js";
@@ -10,7 +10,7 @@ import PageHeader_module_css_default from "./PageHeader.module.css.js";
10
10
  import { c } from "react-compiler-runtime";
11
11
  import { clsx } from "clsx";
12
12
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
13
- import React, { useEffect } from "react";
13
+ import React, { useEffect, useRef } from "react";
14
14
  import { ArrowLeftIcon } from "@primer/octicons-react";
15
15
  //#region src/PageHeader/PageHeader.tsx
16
16
  const hiddenOnRegularAndWide = {
@@ -24,14 +24,15 @@ const hiddenOnNarrow = {
24
24
  wide: false
25
25
  };
26
26
  const Root = /*#__PURE__*/ React.forwardRef((t0, forwardedRef) => {
27
- const $ = c(14);
27
+ const $ = c(13);
28
28
  const { children, className, as: t1, "aria-label": ariaLabel, role, hasBorder } = t0;
29
29
  const BaseComponent = t1 === void 0 ? "div" : t1;
30
- const rootRef = useProvidedRefOrCreate(forwardedRef);
30
+ const rootRef = useRef(null);
31
+ const mergedRef = useMergedRefs(rootRef, forwardedRef);
31
32
  const isInteractive = _temp;
32
33
  let t2;
33
34
  let t3;
34
- if ($[0] !== children || $[1] !== rootRef) {
35
+ if ($[0] !== children) {
35
36
  t2 = function validateInteractiveElementsInTitle() {
36
37
  let hasContextArea = false;
37
38
  let hasLeadingAction = false;
@@ -46,25 +47,24 @@ const Root = /*#__PURE__*/ React.forwardRef((t0, forwardedRef) => {
46
47
  };
47
48
  t3 = [children, rootRef];
48
49
  $[0] = children;
49
- $[1] = rootRef;
50
- $[2] = t2;
51
- $[3] = t3;
50
+ $[1] = t2;
51
+ $[2] = t3;
52
52
  } else {
53
- t2 = $[2];
54
- t3 = $[3];
53
+ t2 = $[1];
54
+ t3 = $[2];
55
55
  }
56
56
  useEffect(t2, t3);
57
57
  let t4;
58
- if ($[4] !== className) {
58
+ if ($[3] !== className) {
59
59
  t4 = clsx(PageHeader_module_css_default.PageHeader, className);
60
- $[4] = className;
61
- $[5] = t4;
62
- } else t4 = $[5];
60
+ $[3] = className;
61
+ $[4] = t4;
62
+ } else t4 = $[4];
63
63
  const t5 = hasBorder ? "true" : void 0;
64
64
  let t6;
65
- if ($[6] !== BaseComponent || $[7] !== ariaLabel || $[8] !== children || $[9] !== role || $[10] !== rootRef || $[11] !== t4 || $[12] !== t5) {
65
+ if ($[5] !== BaseComponent || $[6] !== ariaLabel || $[7] !== children || $[8] !== mergedRef || $[9] !== role || $[10] !== t4 || $[11] !== t5) {
66
66
  t6 = /*#__PURE__*/ jsx(BaseComponent, {
67
- ref: rootRef,
67
+ ref: mergedRef,
68
68
  className: t4,
69
69
  "data-component": "PageHeader",
70
70
  "data-has-border": t5,
@@ -72,15 +72,15 @@ const Root = /*#__PURE__*/ React.forwardRef((t0, forwardedRef) => {
72
72
  role,
73
73
  children
74
74
  });
75
- $[6] = BaseComponent;
76
- $[7] = ariaLabel;
77
- $[8] = children;
75
+ $[5] = BaseComponent;
76
+ $[6] = ariaLabel;
77
+ $[7] = children;
78
+ $[8] = mergedRef;
78
79
  $[9] = role;
79
- $[10] = rootRef;
80
- $[11] = t4;
81
- $[12] = t5;
82
- $[13] = t6;
83
- } else t6 = $[13];
80
+ $[10] = t4;
81
+ $[11] = t5;
82
+ $[12] = t6;
83
+ } else t6 = $[12];
84
84
  return t6;
85
85
  });
86
86
  const ContextArea = (t0) => {
@@ -262,7 +262,6 @@ const TitleArea = /*#__PURE__*/ React.forwardRef((t0, forwardedRef) => {
262
262
  const { children, className, hidden: t1, variant: t2 } = t0;
263
263
  const hidden = t1 === void 0 ? false : t1;
264
264
  const variant = t2 === void 0 ? "medium" : t2;
265
- const titleAreaRef = useProvidedRefOrCreate(forwardedRef);
266
265
  let t3;
267
266
  if ($[0] !== className) {
268
267
  t3 = clsx(PageHeader_module_css_default.TitleArea, className);
@@ -282,20 +281,20 @@ const TitleArea = /*#__PURE__*/ React.forwardRef((t0, forwardedRef) => {
282
281
  $[5] = t5;
283
282
  } else t5 = $[5];
284
283
  let t6;
285
- if ($[6] !== children || $[7] !== t3 || $[8] !== t4 || $[9] !== t5 || $[10] !== titleAreaRef) {
284
+ if ($[6] !== children || $[7] !== forwardedRef || $[8] !== t3 || $[9] !== t4 || $[10] !== t5) {
286
285
  t6 = /*#__PURE__*/ jsx("div", {
287
286
  className: t3,
288
- ref: titleAreaRef,
287
+ ref: forwardedRef,
289
288
  "data-component": "TitleArea",
290
289
  ...t4,
291
290
  ...t5,
292
291
  children
293
292
  });
294
293
  $[6] = children;
295
- $[7] = t3;
296
- $[8] = t4;
297
- $[9] = t5;
298
- $[10] = titleAreaRef;
294
+ $[7] = forwardedRef;
295
+ $[8] = t3;
296
+ $[9] = t4;
297
+ $[10] = t5;
299
298
  $[11] = t6;
300
299
  } else t6 = $[11];
301
300
  return t6;
@@ -1,4 +1,4 @@
1
- import { useProvidedRefOrCreate } from "../hooks/useProvidedRefOrCreate.js";
1
+ import { useMergedRefs } from "../hooks/useMergedRefs.js";
2
2
  import { AriaStatus } from "../live-region/AriaStatus.js";
3
3
  import Text_default from "../Text/Text.js";
4
4
  import _VisuallyHidden_module_css_default from "../_VisuallyHidden.module.css.js";
@@ -11,14 +11,15 @@ import UnstyledTextInput from "../internal/components/UnstyledTextInput.js";
11
11
  import { getCharacterCountState } from "../utils/character-counter.js";
12
12
  import { clsx } from "clsx";
13
13
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
14
- import React, { useCallback, useId, useState } from "react";
14
+ import React, { useCallback, useId, useRef, useState } from "react";
15
15
  import { isValidElementType } from "react-is";
16
16
  import { AlertFillIcon } from "@primer/octicons-react";
17
17
  //#region src/TextInput/TextInput.tsx
18
18
  const TextInput = /*#__PURE__*/ React.forwardRef(({ icon: IconComponent, leadingVisual: LeadingVisual, trailingVisual: TrailingVisual, trailingAction, block, className, contrast, disabled, loading, loaderPosition = "auto", loaderText = "Loading", monospace, validationStatus, size: sizeProp, onFocus, onBlur, variant: variantProp, width: widthProp, minWidth: minWidthProp, maxWidth: maxWidthProp, type = "text", required, characterLimit, onChange, value, defaultValue, "data-component": dataComponent, ...inputProps }, ref) => {
19
19
  var _counter$isOverLimit;
20
20
  const [isInputFocused, setIsInputFocused] = useState(false);
21
- const inputRef = useProvidedRefOrCreate(ref);
21
+ const inputRef = useRef(null);
22
+ const mergedRef = useMergedRefs(inputRef, ref);
22
23
  const isControlled = value !== void 0;
23
24
  const [uncontrolledLength, setUncontrolledLength] = useState(() => defaultValue !== void 0 ? String(defaultValue).length : 0);
24
25
  const currentLength = isControlled ? String(value).length : uncontrolledLength;
@@ -88,7 +89,7 @@ const TextInput = /*#__PURE__*/ React.forwardRef(({ icon: IconComponent, leading
88
89
  children: typeof LeadingVisual !== "string" && isValidElementType(LeadingVisual) ? /*#__PURE__*/ jsx(LeadingVisual, {}) : LeadingVisual
89
90
  }),
90
91
  /*#__PURE__*/ jsx(UnstyledTextInput, {
91
- ref: inputRef,
92
+ ref: mergedRef,
92
93
  disabled,
93
94
  onFocus: handleInputFocus,
94
95
  onBlur: handleInputBlur,
@@ -1,4 +1,4 @@
1
- import { useProvidedRefOrCreate } from "../hooks/useProvidedRefOrCreate.js";
1
+ import { useMergedRefs } from "../hooks/useMergedRefs.js";
2
2
  import { useOnEscapePress } from "../hooks/useOnEscapePress.js";
3
3
  import { useId as useId$1 } from "../hooks/useId.js";
4
4
  import { warning } from "../utils/warning.js";
@@ -80,7 +80,8 @@ const emptyKeybindingHints = [];
80
80
  const Tooltip = /*#__PURE__*/ React.forwardRef(({ direction = "s", text, type = "description", children, id, className, keybindingHint = emptyKeybindingHints, delay = "short", _privateDisableTooltip = false, ...rest }, forwardedRef) => {
81
81
  const tooltipId = useId$1(id);
82
82
  const child = Children.only(children);
83
- const triggerRef = useProvidedRefOrCreate(forwardedRef);
83
+ const triggerRef = useRef(null);
84
+ const mergedTriggerRef = useMergedRefs(triggerRef, forwardedRef);
84
85
  const tooltipElRef = useRef(null);
85
86
  const [calculatedDirection, setCalculatedDirection] = useState(direction);
86
87
  const [isPopoverOpen, setIsPopoverOpen] = useState(false);
@@ -157,7 +158,7 @@ const Tooltip = /*#__PURE__*/ React.forwardRef(({ direction = "s", text, type =
157
158
  return /*#__PURE__*/ jsx(TooltipContext.Provider, {
158
159
  value,
159
160
  children: /*#__PURE__*/ jsxs(Fragment, { children: [/*#__PURE__*/ React.isValidElement(child) && /*#__PURE__*/ React.cloneElement(child, {
160
- ref: triggerRef,
161
+ ref: mergedTriggerRef,
161
162
  "aria-describedby": (() => {
162
163
  if (type !== "description") return child.props["aria-describedby"];
163
164
  const existingDescribedBy = child.props["aria-describedby"];
@@ -0,0 +1,2 @@
1
+ .prc-UnderlineNav-UnderlineWrapper-GWONT{animation:prc-UnderlineNav-detect-overflow-6HuSH linear;animation-timeline:scroll(self block);--UnderlineNav_moreButton-visibility:hidden;--UnderlineNav_icons-display:inline}.prc-UnderlineNav-UnderlineWrapper-GWONT[data-hide-icons=true]{--UnderlineNav_icons-display:none}.prc-UnderlineNav-UnderlineWrapper-GWONT[data-has-overflow=true]{--UnderlineNav_moreButton-visibility:visible}@keyframes prc-UnderlineNav-detect-overflow-6HuSH{0%,to{--UnderlineNav_moreButton-visibility:visible;--UnderlineNav_icons-display:none}}.prc-UnderlineNav-ItemsList-oj8gN [data-component=icon]{display:var(--UnderlineNav_icons-display)}.prc-UnderlineNav-MoreButtonContainer-Dnrq6{align-items:center;display:flex;visibility:var(--UnderlineNav_moreButton-visibility)}.prc-UnderlineNav-OverflowMenuItem-7SG7M [aria-current]{position:relative}.prc-UnderlineNav-OverflowMenuItem-7SG7M [aria-current] .prc-UnderlineNav-OverflowMenuItemLabel-F80v6{font-weight:var(--base-text-weight-semibold,600)}.prc-UnderlineNav-OverflowMenuItem-7SG7M [aria-current]:after{background:var(--underlineNav-borderColor-active,#fd8c73);content:"";inset:var(--base-size-2,.125rem) auto var(--base-size-2,.125rem) 0;position:absolute;width:var(--base-size-2,.125rem)}.prc-UnderlineNav-MoreButtonDivider-dN0a-{border-left:var(--borderWidth-thin,.0625rem) solid var(--borderColor-muted,#d1d9e0b3);display:inline-block;height:var(--base-size-24,1.5rem);margin-inline:var(--base-size-4,.25rem);width:0}.prc-UnderlineNav-MoreButton-Y8soj{font-weight:var(--base-text-weight-normal,400);margin:0;position:relative}.prc-UnderlineNav-MoreButton-Y8soj>[data-component=trailingVisual]{margin-left:0}.prc-UnderlineNav-MoreButton-Y8soj[data-current=true]{font-weight:var(--base-text-weight-semibold,600)}.prc-UnderlineNav-MoreButton-Y8soj[data-current=true]:after{background-color:var(--underlineNav-borderColor-active,var(--color-primer-border-active,#fd8c73));content:"";height:2px;inset:auto 0 0;margin-bottom:calc((var(--base-size-8,.5rem) + var(--borderWidth-thin,.0625rem))*-1);pointer-events:none;position:absolute}@media (forced-colors:active){.prc-UnderlineNav-MoreButton-Y8soj[data-current=true]:after{background-color:LinkText}}
2
+ /*# sourceMappingURL=UnderlineNav-47547980.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/UnderlineNav/UnderlineNav.module.css.js"],"names":[],"mappings":"AAAA,yCAIE,uDAAiC,CACjC,qCAAsC,CAEtC,2CAA4C,CAC5C,mCASF,CAPE,+DACE,iCACF,CAEA,iEACE,4CACF,CAGF,kDACE,MAEE,4CAA6C,CAC7C,iCACF,CACF,CAEA,wDACE,yCACF,CAEA,4CAGE,kBAAmB,CAFnB,YAAa,CACb,oDAEF,CAEA,wDACE,iBAcF,CAZE,sGACE,gDACF,CAEA,8DAME,yDAAkD,CALlD,UAAW,CAGX,kEAAmD,CADnD,iBAAkB,CADlB,gCAKF,CAGF,0CAEE,qFAAmE,CADnE,oBAAqB,CAIrB,iCAA2B,CAD3B,uCAAiC,CADjC,OAGF,CAEA,mCAEE,8CAA2C,CAD3C,QAAS,CAET,iBA6BF,CA3BE,mEACE,aACF,CAIA,sDACE,gDAmBF,CAjBE,4DAUE,iGAAoG,CAFpG,UAAW,CAFX,UAAW,CAJX,cAAe,CAGf,oFAAwE,CAExE,mBAAoB,CANpB,iBAeF,CAJE,8BAZF,4DAcI,yBAEJ,CADE","file":"UnderlineNav-47547980.css","sourcesContent":[".UnderlineWrapper {\n /* Progressive enhancement: Detect overflow using scroll-based animations.\n The idiomatic way would be a scroll-state container query but browser support\n is slightly better for animations. */\n animation: detect-overflow linear;\n animation-timeline: scroll(self block);\n\n --UnderlineNav_moreButton-visibility: hidden;\n --UnderlineNav_icons-display: inline;\n\n &[data-hide-icons='true'] {\n --UnderlineNav_icons-display: none;\n }\n\n &[data-has-overflow='true'] {\n --UnderlineNav_moreButton-visibility: visible;\n }\n}\n\n@keyframes detect-overflow {\n 0%,\n 100% {\n --UnderlineNav_moreButton-visibility: visible;\n --UnderlineNav_icons-display: none;\n }\n}\n\n.ItemsList [data-component='icon'] {\n display: var(--UnderlineNav_icons-display);\n}\n\n.MoreButtonContainer {\n display: flex;\n visibility: var(--UnderlineNav_moreButton-visibility);\n align-items: center;\n}\n\n.OverflowMenuItem [aria-current] {\n position: relative;\n\n .OverflowMenuItemLabel {\n font-weight: var(--base-text-weight-semibold);\n }\n\n &::after {\n content: '';\n width: var(--base-size-2);\n position: absolute;\n inset: var(--base-size-2) auto var(--base-size-2) 0;\n /* stylelint-disable-next-line primer/colors */\n background: var(--underlineNav-borderColor-active);\n }\n}\n\n.MoreButtonDivider {\n display: inline-block;\n border-left: var(--borderWidth-thin) solid var(--borderColor-muted);\n width: 0;\n margin-inline: var(--base-size-4);\n height: var(--base-size-24);\n}\n\n.MoreButton {\n margin: 0; /* reset Safari extra margin */\n font-weight: var(--base-text-weight-normal);\n position: relative;\n\n & > [data-component='trailingVisual'] {\n margin-left: 0;\n }\n\n /* When the current item has overflowed into the menu, style the overflow\n anchor so it looks like the current item (semibold text + active underline). */\n &[data-current='true'] {\n font-weight: var(--base-text-weight-semibold);\n\n &::after {\n position: absolute;\n inset: auto 0 0;\n /* Pull down same amount as the item-level decoration, plus the border width of the button */\n /* stylelint-disable-next-line primer/spacing */\n margin-bottom: calc(-1 * (var(--base-size-8) + var(--borderWidth-thin)));\n height: 2px;\n pointer-events: none;\n content: '';\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 Windows Forced Color Mode https://learn.microsoft.com/en-us/fluent-ui/web-components/design-system/high-contrast */\n background-color: LinkText;\n }\n }\n }\n}\n"]}
@@ -16,7 +16,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
16
16
  import { forwardRef, useRef, useState } from "react";
17
17
  //#region src/UnderlineNav/UnderlineNav.tsx
18
18
  const UnderlineNav = /*#__PURE__*/ forwardRef((t0, forwardedRef) => {
19
- const $ = c(47);
19
+ const $ = c(49);
20
20
  const { as: t1, "aria-label": ariaLabel, loadingCounters: t2, variant: t3, className, children } = t0;
21
21
  const as = t1 === void 0 ? "nav" : t1;
22
22
  const loadingCounters = t2 === void 0 ? false : t2;
@@ -24,77 +24,81 @@ const UnderlineNav = /*#__PURE__*/ forwardRef((t0, forwardedRef) => {
24
24
  const backupRef = useRef(null);
25
25
  const navRef = forwardedRef !== null && forwardedRef !== void 0 ? forwardedRef : backupRef;
26
26
  const listRef = useRef(null);
27
+ const [hasEverOverflowed, setHasOverflowed] = useState(false);
27
28
  const [registeredItems, setRegisteredItems] = UnderlineNavItemsRegistry.useRegistryState();
28
29
  let isOverflowing;
29
30
  let overflowMenuItems;
30
31
  let t4;
31
- if ($[0] !== registeredItems) {
32
+ if ($[0] !== hasEverOverflowed || $[1] !== registeredItems) {
32
33
  var _registeredItems$entr;
33
34
  overflowMenuItems = Array.from((_registeredItems$entr = registeredItems === null || registeredItems === void 0 ? void 0 : registeredItems.entries()) !== null && _registeredItems$entr !== void 0 ? _registeredItems$entr : []).filter(_temp);
34
35
  isOverflowing = overflowMenuItems.length > 0;
36
+ if (isOverflowing && !hasEverOverflowed) setHasOverflowed(true);
35
37
  t4 = overflowMenuItems.some(_temp2);
36
- $[0] = registeredItems;
37
- $[1] = isOverflowing;
38
- $[2] = overflowMenuItems;
39
- $[3] = t4;
38
+ $[0] = hasEverOverflowed;
39
+ $[1] = registeredItems;
40
+ $[2] = isOverflowing;
41
+ $[3] = overflowMenuItems;
42
+ $[4] = t4;
40
43
  } else {
41
- isOverflowing = $[1];
42
- overflowMenuItems = $[2];
43
- t4 = $[3];
44
+ isOverflowing = $[2];
45
+ overflowMenuItems = $[3];
46
+ t4 = $[4];
44
47
  }
45
48
  const overflowingCurrentItem = t4;
46
49
  let t5;
47
- if ($[4] !== children) {
50
+ if ($[5] !== children) {
48
51
  t5 = getValidChildren(children);
49
- $[4] = children;
50
- $[5] = t5;
51
- } else t5 = $[5];
52
+ $[5] = children;
53
+ $[6] = t5;
54
+ } else t5 = $[6];
52
55
  const validChildren = t5;
53
56
  let t6;
54
57
  let t7;
55
- if ($[6] !== ariaLabel || $[7] !== validChildren) {
58
+ if ($[7] !== ariaLabel || $[8] !== validChildren) {
56
59
  t6 = () => {
57
60
  !(validChildren.filter(_temp3).length <= 1) && invariant(false, "Only one current element is allowed");
58
61
  !ariaLabel && invariant(false, "Use the `aria-label` prop to provide an accessible label for assistive technology");
59
62
  };
60
63
  t7 = [validChildren, ariaLabel];
61
- $[6] = ariaLabel;
62
- $[7] = validChildren;
63
- $[8] = t6;
64
- $[9] = t7;
64
+ $[7] = ariaLabel;
65
+ $[8] = validChildren;
66
+ $[9] = t6;
67
+ $[10] = t7;
65
68
  } else {
66
- t6 = $[8];
67
- t7 = $[9];
69
+ t6 = $[9];
70
+ t7 = $[10];
68
71
  }
69
72
  useDevOnlyEffect(t6, t7);
70
73
  let t8;
71
- if ($[10] !== loadingCounters) {
74
+ if ($[11] !== loadingCounters) {
72
75
  t8 = { loadingCounters };
73
- $[10] = loadingCounters;
74
- $[11] = t8;
75
- } else t8 = $[11];
76
+ $[11] = loadingCounters;
77
+ $[12] = t8;
78
+ } else t8 = $[12];
76
79
  const contextValue = t8;
77
80
  const [menuOpen, setMenuOpen] = useState(false);
78
81
  if (menuOpen && !isOverflowing) setMenuOpen(false);
79
82
  let t9;
80
- if ($[12] !== ariaLabel) {
83
+ if ($[13] !== ariaLabel) {
81
84
  t9 = ariaLabel && /*#__PURE__*/ jsx(VisuallyHidden, {
82
85
  as: "h2",
83
86
  children: `${ariaLabel} navigation`
84
87
  });
85
- $[12] = ariaLabel;
86
- $[13] = t9;
87
- } else t9 = $[13];
88
+ $[13] = ariaLabel;
89
+ $[14] = t9;
90
+ } else t9 = $[14];
88
91
  let t10;
89
- if ($[14] !== className) {
92
+ if ($[15] !== className) {
90
93
  t10 = clsx(UnderlineNav_module_css_default.UnderlineWrapper, className);
91
- $[14] = className;
92
- $[15] = t10;
93
- } else t10 = $[15];
94
- const t11 = isOverflowing ? "true" : void 0;
95
- let t12;
96
- if ($[16] !== children || $[17] !== setRegisteredItems) {
97
- t12 = /*#__PURE__*/ jsx(UnderlineItemList, {
94
+ $[15] = className;
95
+ $[16] = t10;
96
+ } else t10 = $[16];
97
+ const t11 = hasEverOverflowed ? "true" : void 0;
98
+ const t12 = isOverflowing ? "true" : void 0;
99
+ let t13;
100
+ if ($[17] !== children || $[18] !== setRegisteredItems) {
101
+ t13 = /*#__PURE__*/ jsx(UnderlineItemList, {
98
102
  ref: listRef,
99
103
  role: "list",
100
104
  className: UnderlineNav_module_css_default.ItemsList,
@@ -103,43 +107,43 @@ const UnderlineNav = /*#__PURE__*/ forwardRef((t0, forwardedRef) => {
103
107
  children
104
108
  })
105
109
  });
106
- $[16] = children;
107
- $[17] = setRegisteredItems;
108
- $[18] = t12;
109
- } else t12 = $[18];
110
- let t13;
111
- if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
112
- t13 = /*#__PURE__*/ jsx("div", { className: UnderlineNav_module_css_default.MoreButtonDivider });
110
+ $[17] = children;
111
+ $[18] = setRegisteredItems;
113
112
  $[19] = t13;
114
113
  } else t13 = $[19];
115
- const t14 = overflowingCurrentItem ? "true" : void 0;
116
- const t15 = overflowingCurrentItem ? "More items, including current item" : void 0;
117
- let t16;
114
+ let t14;
118
115
  if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
119
- t16 = /*#__PURE__*/ jsxs("span", { children: ["More", /*#__PURE__*/ jsx(VisuallyHidden, {
116
+ t14 = /*#__PURE__*/ jsx("div", { className: UnderlineNav_module_css_default.MoreButtonDivider });
117
+ $[20] = t14;
118
+ } else t14 = $[20];
119
+ const t15 = overflowingCurrentItem ? "true" : void 0;
120
+ const t16 = overflowingCurrentItem ? "More items, including current item" : void 0;
121
+ let t17;
122
+ if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
123
+ t17 = /*#__PURE__*/ jsxs("span", { children: ["More", /*#__PURE__*/ jsx(VisuallyHidden, {
120
124
  as: "span",
121
125
  children: " items"
122
126
  })] });
123
- $[20] = t16;
124
- } else t16 = $[20];
125
- let t17;
126
- if ($[21] !== t14 || $[22] !== t15) {
127
- t17 = /*#__PURE__*/ jsx(ActionMenu.Button, {
127
+ $[21] = t17;
128
+ } else t17 = $[21];
129
+ let t18;
130
+ if ($[22] !== t15 || $[23] !== t16) {
131
+ t18 = /*#__PURE__*/ jsx(ActionMenu.Button, {
128
132
  className: UnderlineNav_module_css_default.MoreButton,
129
133
  variant: "invisible",
130
134
  "data-component": "overflow-menu-button",
131
- "data-current": t14,
132
- "aria-label": t15,
133
- children: t16
135
+ "data-current": t15,
136
+ "aria-label": t16,
137
+ children: t17
134
138
  });
135
- $[21] = t14;
136
139
  $[22] = t15;
137
- $[23] = t17;
138
- } else t17 = $[23];
139
- let t18;
140
- if ($[24] !== loadingCounters || $[25] !== overflowMenuItems || $[26] !== registeredItems) {
141
- t18 = registeredItems === void 0 ? /*#__PURE__*/ jsx(ActionList.Item, { children: /*#__PURE__*/ jsx(SkeletonText, {}) }) : overflowMenuItems.map((t19) => {
142
- const [key, allProps] = t19;
140
+ $[23] = t16;
141
+ $[24] = t18;
142
+ } else t18 = $[24];
143
+ let t19;
144
+ if ($[25] !== loadingCounters || $[26] !== overflowMenuItems || $[27] !== registeredItems) {
145
+ t19 = registeredItems === void 0 ? /*#__PURE__*/ jsx(ActionList.Item, { children: /*#__PURE__*/ jsx(SkeletonText, {}) }) : overflowMenuItems.map((t20) => {
146
+ const [key, allProps] = t20;
143
147
  const { children: menuItemChildren, counter, onSelect, ...menuItemProps } = allProps;
144
148
  return /*#__PURE__*/ jsxs(ActionList.LinkItem, {
145
149
  onClick: (event) => onSelect === null || onSelect === void 0 ? void 0 : onSelect(event),
@@ -154,66 +158,68 @@ const UnderlineNav = /*#__PURE__*/ forwardRef((t0, forwardedRef) => {
154
158
  }) })]
155
159
  }, key);
156
160
  });
157
- $[24] = loadingCounters;
158
- $[25] = overflowMenuItems;
159
- $[26] = registeredItems;
160
- $[27] = t18;
161
- } else t18 = $[27];
162
- let t19;
163
- if ($[28] !== t18) {
164
- t19 = /*#__PURE__*/ jsx(ActionMenu.Overlay, { children: /*#__PURE__*/ jsx(ActionList, { children: t18 }) });
165
- $[28] = t18;
166
- $[29] = t19;
167
- } else t19 = $[29];
161
+ $[25] = loadingCounters;
162
+ $[26] = overflowMenuItems;
163
+ $[27] = registeredItems;
164
+ $[28] = t19;
165
+ } else t19 = $[28];
168
166
  let t20;
169
- if ($[30] !== menuOpen || $[31] !== t17 || $[32] !== t19) {
170
- t20 = /*#__PURE__*/ jsxs("div", {
167
+ if ($[29] !== t19) {
168
+ t20 = /*#__PURE__*/ jsx(ActionMenu.Overlay, { children: /*#__PURE__*/ jsx(ActionList, { children: t19 }) });
169
+ $[29] = t19;
170
+ $[30] = t20;
171
+ } else t20 = $[30];
172
+ let t21;
173
+ if ($[31] !== menuOpen || $[32] !== t18 || $[33] !== t20) {
174
+ t21 = /*#__PURE__*/ jsxs("div", {
171
175
  className: UnderlineNav_module_css_default.MoreButtonContainer,
172
- children: [t13, /*#__PURE__*/ jsxs(ActionMenu, {
176
+ children: [t14, /*#__PURE__*/ jsxs(ActionMenu, {
173
177
  open: menuOpen,
174
178
  onOpenChange: setMenuOpen,
175
- children: [t17, t19]
179
+ children: [t18, t20]
176
180
  })]
177
181
  });
178
- $[30] = menuOpen;
179
- $[31] = t17;
180
- $[32] = t19;
182
+ $[31] = menuOpen;
183
+ $[32] = t18;
181
184
  $[33] = t20;
182
- } else t20 = $[33];
183
- let t21;
184
- if ($[34] !== ariaLabel || $[35] !== as || $[36] !== navRef || $[37] !== t10 || $[38] !== t11 || $[39] !== t12 || $[40] !== t20 || $[41] !== variant) {
185
- t21 = /*#__PURE__*/ jsxs(UnderlineWrapper, {
185
+ $[34] = t21;
186
+ } else t21 = $[34];
187
+ let t22;
188
+ if ($[35] !== ariaLabel || $[36] !== as || $[37] !== navRef || $[38] !== t10 || $[39] !== t11 || $[40] !== t12 || $[41] !== t13 || $[42] !== t21 || $[43] !== variant) {
189
+ t22 = /*#__PURE__*/ jsxs(UnderlineWrapper, {
186
190
  as,
187
191
  "aria-label": ariaLabel,
188
192
  className: t10,
189
193
  ref: navRef,
190
194
  "data-variant": variant,
191
195
  "data-overflow-mode": "wrap",
192
- "data-has-overflow": t11,
193
- children: [t12, t20]
196
+ "data-hide-icons": t11,
197
+ "data-has-overflow": t12,
198
+ children: [t13, t21]
194
199
  });
195
- $[34] = ariaLabel;
196
- $[35] = as;
197
- $[36] = navRef;
198
- $[37] = t10;
199
- $[38] = t11;
200
- $[39] = t12;
201
- $[40] = t20;
202
- $[41] = variant;
200
+ $[35] = ariaLabel;
201
+ $[36] = as;
202
+ $[37] = navRef;
203
+ $[38] = t10;
204
+ $[39] = t11;
205
+ $[40] = t12;
206
+ $[41] = t13;
203
207
  $[42] = t21;
204
- } else t21 = $[42];
205
- let t22;
206
- if ($[43] !== contextValue || $[44] !== t21 || $[45] !== t9) {
207
- t22 = /*#__PURE__*/ jsxs(UnderlineNavContext.Provider, {
208
+ $[43] = variant;
209
+ $[44] = t22;
210
+ } else t22 = $[44];
211
+ let t23;
212
+ if ($[45] !== contextValue || $[46] !== t22 || $[47] !== t9) {
213
+ t23 = /*#__PURE__*/ jsxs(UnderlineNavContext.Provider, {
208
214
  value: contextValue,
209
- children: [t9, t21]
215
+ children: [t9, t22]
210
216
  });
211
- $[43] = contextValue;
212
- $[44] = t21;
213
- $[45] = t9;
217
+ $[45] = contextValue;
214
218
  $[46] = t22;
215
- } else t22 = $[46];
216
- return t22;
219
+ $[47] = t9;
220
+ $[48] = t23;
221
+ } else t23 = $[48];
222
+ return t23;
217
223
  });
218
224
  UnderlineNav.displayName = "UnderlineNav";
219
225
  function _temp(entry) {
@@ -1,10 +1,9 @@
1
- import "./UnderlineNav-964b246d.css";
1
+ import "./UnderlineNav-47547980.css";
2
2
  //#region src/UnderlineNav/UnderlineNav.module.css.js
3
3
  var UnderlineNav_module_css_default = {
4
4
  "UnderlineWrapper": "prc-UnderlineNav-UnderlineWrapper-GWONT",
5
5
  "detect-overflow": "prc-UnderlineNav-detect-overflow-6HuSH",
6
6
  "ItemsList": "prc-UnderlineNav-ItemsList-oj8gN",
7
- "hide-icons": "prc-UnderlineNav-hide-icons-FR8HX",
8
7
  "MoreButtonContainer": "prc-UnderlineNav-MoreButtonContainer-Dnrq6",
9
8
  "OverflowMenuItem": "prc-UnderlineNav-OverflowMenuItem-7SG7M",
10
9
  "OverflowMenuItemLabel": "prc-UnderlineNav-OverflowMenuItemLabel-F80v6",
@@ -73,7 +73,7 @@ type TabPanelProps = {
73
73
  value: string;
74
74
  };
75
75
  type TabListHookProps<T extends HTMLElement> = TabListProps & {
76
- /** Optional ref to use for the tablist. If none is provided, one will be generated automatically */ref?: React.RefObject<T>;
76
+ /** Optional ref to use for the tablist. If none is provided, one will be generated automatically */ref?: React.Ref<T | null>;
77
77
  };
78
78
  type TabListHookResult<T extends HTMLElement> = {
79
79
  /** Props to be spread onto the tablist element */tabListProps: {
@@ -81,7 +81,7 @@ type TabListHookResult<T extends HTMLElement> = {
81
81
  'aria-orientation': AriaAttributes['aria-orientation'];
82
82
  'aria-label': AriaAttributes['aria-label'];
83
83
  'aria-labelledby': AriaAttributes['aria-labelledby'];
84
- ref: React.RefObject<T | null>;
84
+ ref: React.Ref<T | null>;
85
85
  role: 'tablist';
86
86
  };
87
87
  };
@@ -1,12 +1,14 @@
1
- import { useProvidedRefOrCreate } from "../../hooks/useProvidedRefOrCreate.js";
1
+ import { useMergedRefs } from "../../hooks/useMergedRefs.js";
2
2
  import { c } from "react-compiler-runtime";
3
+ import { useRef } from "react";
3
4
  //#region src/experimental/Tabs/useTabList.ts
4
5
  function useTabList(props) {
5
- const $ = c(9);
6
+ const $ = c(8);
6
7
  const { "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-orientation": ariaOrientation } = props;
7
- const ref = useProvidedRefOrCreate(props.ref);
8
+ const ref = useRef(null);
9
+ const mergedRef = useMergedRefs(ref, props.ref);
8
10
  let t0;
9
- if ($[0] !== ariaOrientation || $[1] !== ref) {
11
+ if ($[0] !== ariaOrientation) {
10
12
  t0 = (event) => {
11
13
  const { current: tablist } = ref;
12
14
  if (tablist === null) return;
@@ -33,28 +35,27 @@ function useTabList(props) {
33
35
  }
34
36
  };
35
37
  $[0] = ariaOrientation;
36
- $[1] = ref;
37
- $[2] = t0;
38
- } else t0 = $[2];
38
+ $[1] = t0;
39
+ } else t0 = $[1];
39
40
  const onKeyDown = t0;
40
41
  const t1 = ariaOrientation !== null && ariaOrientation !== void 0 ? ariaOrientation : "horizontal";
41
42
  let t2;
42
- if ($[3] !== ariaLabel || $[4] !== ariaLabelledby || $[5] !== onKeyDown || $[6] !== ref || $[7] !== t1) {
43
+ if ($[2] !== ariaLabel || $[3] !== ariaLabelledby || $[4] !== mergedRef || $[5] !== onKeyDown || $[6] !== t1) {
43
44
  t2 = { tabListProps: {
44
- ref,
45
+ ref: mergedRef,
45
46
  "aria-label": ariaLabel,
46
47
  "aria-labelledby": ariaLabelledby,
47
48
  "aria-orientation": t1,
48
49
  role: "tablist",
49
50
  onKeyDown
50
51
  } };
51
- $[3] = ariaLabel;
52
- $[4] = ariaLabelledby;
52
+ $[2] = ariaLabel;
53
+ $[3] = ariaLabelledby;
54
+ $[4] = mergedRef;
53
55
  $[5] = onKeyDown;
54
- $[6] = ref;
55
- $[7] = t1;
56
- $[8] = t2;
57
- } else t2 = $[8];
56
+ $[6] = t1;
57
+ $[7] = t2;
58
+ } else t2 = $[7];
58
59
  return t2;
59
60
  }
60
61
  function _temp2(tab_0) {
@@ -1,7 +1,9 @@
1
1
  import { isExperimentalReactVersion, reactMajorVersion } from "../utils/environment.js";
2
2
  import { c } from "react-compiler-runtime";
3
- import "react";
3
+ import { version } from "react";
4
4
  //#region src/hooks/useMergedRefs.ts
5
+ var _version$split$;
6
+ const majorReactVersion = parseInt((_version$split$ = version.split(".")[0]) !== null && _version$split$ !== void 0 ? _version$split$ : "18", 10);
5
7
  /**
6
8
  * Cleanup functions for refs were introduced in React 19. For feature detection,
7
9
  * we look to see if current version of React is >= 19 or if it is an
@@ -48,6 +50,7 @@ function useMergedRefs(refA, refB) {
48
50
  const cleanupA = setRef(refA, value);
49
51
  const cleanupB = setRef(refB, value);
50
52
  if (!supportsRefCleanup) return;
53
+ if (majorReactVersion <= 18) return;
51
54
  return () => {
52
55
  if (cleanupA) cleanupA();
53
56
  else setRef(refA, null);
@@ -9,17 +9,14 @@ import React from "react";
9
9
  * @param providedRef The ref to use - if undefined, will use the ref from a call to React.useRef
10
10
  * @type TRef The type of the RefObject which should be created.
11
11
  *
12
- * @deprecated This hook is incompatible with forwarded callback refs. Prefer `useMergedRefs` with an internally
13
- * created ref instead.
12
+ * @note This hook is overly restrictive in that it forces the provided ref to be a ref object rather than a callback.
13
+ * In particular, it should **not** be used to merge internal refs with forwarded refs. For this, use
14
+ * {@linkcode useMergedRefs} instead.
14
15
  *
15
- * ```diff
16
- * - const ref = useProvidedRefOrCreate(forwardedRef as RefObject<...>)
17
- * + const ref = useRef(null)
18
- * + const mergedRef = useMergedRefs(forwardedRef, ref)
19
- *
20
- * - return <div ref={ref} />
21
- * + return <div ref={mergedRef} />
22
- * ```
16
+ * The primary valid use case for this hook is for when the consumer is using the provided ref to point to an external
17
+ * element, like an externally rendered anchor. This is 'backwards' from forwarded refs with respect to data flow; the
18
+ * consumer is passing a reference to an external element, rather than passing a handle to obtain a reference to an
19
+ * internal element.
23
20
  */
24
21
  declare function useProvidedRefOrCreate<TRef>(providedRef?: React.RefObject<TRef | null>): React.RefObject<TRef | null>;
25
22
  //#endregion
@@ -8,17 +8,14 @@ import React from "react";
8
8
  * @param providedRef The ref to use - if undefined, will use the ref from a call to React.useRef
9
9
  * @type TRef The type of the RefObject which should be created.
10
10
  *
11
- * @deprecated This hook is incompatible with forwarded callback refs. Prefer `useMergedRefs` with an internally
12
- * created ref instead.
11
+ * @note This hook is overly restrictive in that it forces the provided ref to be a ref object rather than a callback.
12
+ * In particular, it should **not** be used to merge internal refs with forwarded refs. For this, use
13
+ * {@linkcode useMergedRefs} instead.
13
14
  *
14
- * ```diff
15
- * - const ref = useProvidedRefOrCreate(forwardedRef as RefObject<...>)
16
- * + const ref = useRef(null)
17
- * + const mergedRef = useMergedRefs(forwardedRef, ref)
18
- *
19
- * - return <div ref={ref} />
20
- * + return <div ref={mergedRef} />
21
- * ```
15
+ * The primary valid use case for this hook is for when the consumer is using the provided ref to point to an external
16
+ * element, like an externally rendered anchor. This is 'backwards' from forwarded refs with respect to data flow; the
17
+ * consumer is passing a reference to an external element, rather than passing a handle to obtain a reference to an
18
+ * internal element.
22
19
  */
23
20
  function useProvidedRefOrCreate(providedRef) {
24
21
  const createdRef = React.useRef(null);
@@ -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-hide-icons=true] [data-component=icon]{display:none}.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-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-1745a3d6.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,+CA8BF,CAnBE,2DAEE,oBACF,CAEA,mFACE,YACF,CAEA,gEAGE,0CAAsC,CADtC,eAOF,CAJE,wGACE,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-1745a3d6.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-hide-icons='true'] [data-component='icon'] {\n display: none;\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-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-1745a3d6.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",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@primer/react",
3
3
  "type": "module",
4
- "version": "0.0.0-20260702155148",
4
+ "version": "0.0.0-20260702173630",
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",
@@ -1,2 +0,0 @@
1
- .prc-UnderlineNav-UnderlineWrapper-GWONT{animation:prc-UnderlineNav-detect-overflow-6HuSH linear;animation-timeline:scroll(self block);--UnderlineNav_moreButton-visibility:hidden}.prc-UnderlineNav-UnderlineWrapper-GWONT[data-has-overflow=true]{--UnderlineNav_moreButton-visibility:visible}@keyframes prc-UnderlineNav-detect-overflow-6HuSH{0%,to{--UnderlineNav_moreButton-visibility:visible;--UnderlineNav_hide-icons-play-state:running}}.prc-UnderlineNav-ItemsList-oj8gN [data-component=icon]{animation-duration:1ms;animation-fill-mode:forwards;animation-iteration-count:1;animation-name:prc-UnderlineNav-hide-icons-FR8HX;animation-play-state:var(--UnderlineNav_hide-icons-play-state,paused)}@keyframes prc-UnderlineNav-hide-icons-FR8HX{0%{display:inline}to{display:none}}.prc-UnderlineNav-MoreButtonContainer-Dnrq6{align-items:center;display:flex;visibility:var(--UnderlineNav_moreButton-visibility)}.prc-UnderlineNav-OverflowMenuItem-7SG7M [aria-current]{position:relative}.prc-UnderlineNav-OverflowMenuItem-7SG7M [aria-current] .prc-UnderlineNav-OverflowMenuItemLabel-F80v6{font-weight:var(--base-text-weight-semibold,600)}.prc-UnderlineNav-OverflowMenuItem-7SG7M [aria-current]:after{background:var(--underlineNav-borderColor-active,#fd8c73);content:"";inset:var(--base-size-2,.125rem) auto var(--base-size-2,.125rem) 0;position:absolute;width:var(--base-size-2,.125rem)}.prc-UnderlineNav-MoreButtonDivider-dN0a-{border-left:var(--borderWidth-thin,.0625rem) solid var(--borderColor-muted,#d1d9e0b3);display:inline-block;height:var(--base-size-24,1.5rem);margin-inline:var(--base-size-4,.25rem);width:0}.prc-UnderlineNav-MoreButton-Y8soj{font-weight:var(--base-text-weight-normal,400);margin:0;position:relative}.prc-UnderlineNav-MoreButton-Y8soj>[data-component=trailingVisual]{margin-left:0}.prc-UnderlineNav-MoreButton-Y8soj[data-current=true]{font-weight:var(--base-text-weight-semibold,600)}.prc-UnderlineNav-MoreButton-Y8soj[data-current=true]:after{background-color:var(--underlineNav-borderColor-active,var(--color-primer-border-active,#fd8c73));content:"";height:2px;inset:auto 0 0;margin-bottom:calc((var(--base-size-8,.5rem) + var(--borderWidth-thin,.0625rem))*-1);pointer-events:none;position:absolute}@media (forced-colors:active){.prc-UnderlineNav-MoreButton-Y8soj[data-current=true]:after{background-color:LinkText}}
2
- /*# sourceMappingURL=UnderlineNav-964b246d.css.map */
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/UnderlineNav/UnderlineNav.module.css.js"],"names":[],"mappings":"AAAA,yCAIE,uDAAiC,CACjC,qCAAsC,CAEtC,2CAKF,CAHE,iEACE,4CACF,CAGF,kDACE,MAEE,4CAA6C,CAC7C,4CACF,CACF,CAEA,wDAWE,sBAAuB,CADvB,4BAA6B,CAD7B,2BAA4B,CAD5B,gDAA0B,CAD1B,qEAKF,CAEA,6CACE,GACE,cACF,CAEA,GACE,YACF,CACF,CAEA,4CAGE,kBAAmB,CAFnB,YAAa,CACb,oDAEF,CAEA,wDACE,iBAcF,CAZE,sGACE,gDACF,CAEA,8DAME,yDAAkD,CALlD,UAAW,CAGX,kEAAmD,CADnD,iBAAkB,CADlB,gCAKF,CAGF,0CAEE,qFAAmE,CADnE,oBAAqB,CAIrB,iCAA2B,CAD3B,uCAAiC,CADjC,OAGF,CAEA,mCAEE,8CAA2C,CAD3C,QAAS,CAET,iBA6BF,CA3BE,mEACE,aACF,CAIA,sDACE,gDAmBF,CAjBE,4DAUE,iGAAoG,CAFpG,UAAW,CAFX,UAAW,CAJX,cAAe,CAGf,oFAAwE,CAExE,mBAAoB,CANpB,iBAeF,CAJE,8BAZF,4DAcI,yBAEJ,CADE","file":"UnderlineNav-964b246d.css","sourcesContent":[".UnderlineWrapper {\n /* Progressive enhancement: Detect overflow using scroll-based animations.\n The idiomatic way would be a scroll-state container query but browser support\n is slightly better for animations. */\n animation: detect-overflow linear;\n animation-timeline: scroll(self block);\n\n --UnderlineNav_moreButton-visibility: hidden;\n\n &[data-has-overflow='true'] {\n --UnderlineNav_moreButton-visibility: visible;\n }\n}\n\n@keyframes detect-overflow {\n 0%,\n 100% {\n --UnderlineNav_moreButton-visibility: visible;\n --UnderlineNav_hide-icons-play-state: running;\n }\n}\n\n.ItemsList [data-component='icon'] {\n /* Unlike the more button, which reserves space when hidden, the icons are removed from the layout when hidden. This\n can cause the container to no longer overflow, which would cause a flickering loop if we just drove the visibility\n directly from the scroll state. So instead, we drive an animation that can only play forwards - this way, the icons\n will remain hidden forever after being hidden for the first tiem, even if the container is no longer overflowing.\n You might think we could just do this directly with the scroll-driven animation instead of driving a second animation,\n but this approach doesn't work for scroll-driven animations because they are conditionally applied. */\n animation-play-state: var(--UnderlineNav_hide-icons-play-state, paused);\n animation-name: hide-icons;\n animation-iteration-count: 1;\n animation-fill-mode: forwards;\n animation-duration: 1ms; /* must be non-zero or the animation will finish immediately even if paused */\n}\n\n@keyframes hide-icons {\n 0% {\n display: inline;\n }\n\n 100% {\n display: none;\n }\n}\n\n.MoreButtonContainer {\n display: flex;\n visibility: var(--UnderlineNav_moreButton-visibility);\n align-items: center;\n}\n\n.OverflowMenuItem [aria-current] {\n position: relative;\n\n .OverflowMenuItemLabel {\n font-weight: var(--base-text-weight-semibold);\n }\n\n &::after {\n content: '';\n width: var(--base-size-2);\n position: absolute;\n inset: var(--base-size-2) auto var(--base-size-2) 0;\n /* stylelint-disable-next-line primer/colors */\n background: var(--underlineNav-borderColor-active);\n }\n}\n\n.MoreButtonDivider {\n display: inline-block;\n border-left: var(--borderWidth-thin) solid var(--borderColor-muted);\n width: 0;\n margin-inline: var(--base-size-4);\n height: var(--base-size-24);\n}\n\n.MoreButton {\n margin: 0; /* reset Safari extra margin */\n font-weight: var(--base-text-weight-normal);\n position: relative;\n\n & > [data-component='trailingVisual'] {\n margin-left: 0;\n }\n\n /* When the current item has overflowed into the menu, style the overflow\n anchor so it looks like the current item (semibold text + active underline). */\n &[data-current='true'] {\n font-weight: var(--base-text-weight-semibold);\n\n &::after {\n position: absolute;\n inset: auto 0 0;\n /* Pull down same amount as the item-level decoration, plus the border width of the button */\n /* stylelint-disable-next-line primer/spacing */\n margin-bottom: calc(-1 * (var(--base-size-8) + var(--borderWidth-thin)));\n height: 2px;\n pointer-events: none;\n content: '';\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 Windows Forced Color Mode https://learn.microsoft.com/en-us/fluent-ui/web-components/design-system/high-contrast */\n background-color: LinkText;\n }\n }\n }\n}\n"]}
@@ -1,2 +0,0 @@
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-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-25587345.css.map */
@@ -1 +0,0 @@
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,+CA0BF,CAfE,2DAEE,oBACF,CAEA,gEAGE,0CAAsC,CADtC,eAOF,CAJE,wGACE,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-25587345.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-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"]}