@primer/react 0.0.0-20260722112739 → 0.0.0-20260722195949

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 (69) hide show
  1. package/CHANGELOG.md +13 -9
  2. package/dist/ActionBar/ActionBar.js +4 -0
  3. package/dist/ActionBar/index.d.ts +4 -1
  4. package/dist/ActionList/Description.js +1 -0
  5. package/dist/ActionList/Divider.js +1 -0
  6. package/dist/ActionList/Group.js +1 -1
  7. package/dist/ActionList/List.js +20 -14
  8. package/dist/ActionList/TrailingAction.js +1 -0
  9. package/dist/AnchoredOverlay/AnchoredOverlay.js +6 -3
  10. package/dist/Autocomplete/AutocompleteInput.js +10 -7
  11. package/dist/Banner/Banner.js +2 -2
  12. package/dist/Blankslate/Blankslate.d.ts +15 -0
  13. package/dist/Blankslate/Blankslate.js +5 -0
  14. package/dist/ButtonGroup/ButtonGroup.js +15 -8
  15. package/dist/Checkbox/Checkbox.js +16 -9
  16. package/dist/DataTable/ErrorDialog.d.ts +3 -0
  17. package/dist/DataTable/ErrorDialog.js +1 -0
  18. package/dist/DataTable/Pagination.d.ts +3 -0
  19. package/dist/DataTable/Pagination.js +1 -0
  20. package/dist/DataTable/Table.d.ts +33 -0
  21. package/dist/DataTable/Table.js +13 -0
  22. package/dist/Details/Details.js +1 -1
  23. package/dist/Dialog/Dialog.js +12 -5
  24. package/dist/FeatureFlags/DefaultFeatureFlags.js +2 -1
  25. package/dist/FilteredActionList/FilteredActionList.js +31 -20
  26. package/dist/FilteredActionList/FilteredActionListInput.d.ts +4 -1
  27. package/dist/FilteredActionList/FilteredActionListInput.js +1 -0
  28. package/dist/FilteredActionList/FilteredActionListLoaders.d.ts +3 -0
  29. package/dist/FilteredActionList/FilteredActionListLoaders.js +1 -0
  30. package/dist/FormControl/FormControlCaption.d.ts +1 -0
  31. package/dist/FormControl/FormControlCaption.js +1 -0
  32. package/dist/FormControl/FormControlLabel.js +1 -0
  33. package/dist/FormControl/FormControlLeadingVisual.js +1 -0
  34. package/dist/Overlay/Overlay.js +1 -1
  35. package/dist/PageHeader/PageHeader.js +32 -23
  36. package/dist/PageLayout/PageLayout.js +2 -2
  37. package/dist/SegmentedControl/{SegmentedControl-a004561f.css → SegmentedControl-de65527b.css} +2 -2
  38. package/dist/SegmentedControl/{SegmentedControl-a004561f.css.map → SegmentedControl-de65527b.css.map} +1 -1
  39. package/dist/SegmentedControl/SegmentedControl.module.css.js +1 -1
  40. package/dist/SegmentedControl/SegmentedControlButton.js +2 -1
  41. package/dist/SegmentedControl/SegmentedControlIconButton.js +2 -1
  42. package/dist/SelectPanel/SelectPanel.d.ts +3 -0
  43. package/dist/SelectPanel/SelectPanel.js +2 -1
  44. package/dist/SelectPanel/SelectPanelMessage.js +1 -0
  45. package/dist/Stack/Stack.js +1 -0
  46. package/dist/TextInput/TextInput.js +13 -6
  47. package/dist/ThemeProvider.d.ts +4 -1
  48. package/dist/ThemeProvider.js +76 -43
  49. package/dist/Timeline/Timeline.js +3 -3
  50. package/dist/TooltipV2/Tooltip.js +19 -11
  51. package/dist/TopicTag/TopicTagGroup.d.ts +3 -0
  52. package/dist/TopicTag/TopicTagGroup.js +1 -0
  53. package/dist/experimental/Tabs/Tabs.js +3 -2
  54. package/dist/experimental/Tabs/types.d.ts +10 -3
  55. package/dist/experimental/Tabs/useTabList.js +18 -10
  56. package/dist/experimental/UnderlinePanels/UnderlinePanels.js +69 -42
  57. package/dist/experimental/index.js +5 -5
  58. package/dist/hooks/useMergedRefs.d.ts +4 -4
  59. package/dist/hooks/useMergedRefs.js +8 -5
  60. package/dist/hooks/useProvidedRefOrCreate.d.ts +7 -10
  61. package/dist/hooks/useProvidedRefOrCreate.js +7 -10
  62. package/dist/index.d.ts +2 -2
  63. package/dist/legacy-theme/ts/color-schemes.js +4252 -0
  64. package/dist/theme.d.ts +1142 -1
  65. package/dist/theme.js +3 -1
  66. package/dist/useTheme.d.ts +3 -1
  67. package/dist/utils/types/KeyPaths.d.ts +4 -0
  68. package/generated/hooks.json +15 -0
  69. package/package.json +4 -2
@@ -105,7 +105,7 @@ function Summary(t0) {
105
105
  } else t2 = $[8];
106
106
  return t2;
107
107
  }
108
- Summary.displayName = "Summary";
108
+ Summary.displayName = "Details.Summary";
109
109
  const Details = Object.assign(Root, { Summary });
110
110
  //#endregion
111
111
  export { Summary, Details as default };
@@ -4,6 +4,7 @@ import { useOnEscapePress } from "../hooks/useOnEscapePress.js";
4
4
  import { useResizeObserver } from "../hooks/useResizeObserver.js";
5
5
  import { useId as useId$1 } from "../hooks/useId.js";
6
6
  import { useSlots } from "../hooks/useSlots.js";
7
+ import { useFeatureFlag } from "../FeatureFlags/useFeatureFlag.js";
7
8
  import { IconButton } from "../Button/IconButton.js";
8
9
  import { ButtonComponent } from "../Button/Button.js";
9
10
  import { useFocusTrap } from "../hooks/useFocusTrap.js";
@@ -244,22 +245,28 @@ const Footer = /*#__PURE__*/ React.forwardRef(function Footer({ className, ...re
244
245
  Footer.displayName = "Dialog.Footer";
245
246
  const Buttons = ({ buttons }) => {
246
247
  var _buttons$find;
247
- const autoFocusRef = useProvidedRefOrCreate((_buttons$find = buttons.find((button) => button.autoFocus)) === null || _buttons$find === void 0 ? void 0 : _buttons$find.ref);
248
+ const mergedRefEnabled = useFeatureFlag("primer_react_merged_forwarded_refs");
249
+ const providedButtonRef = (_buttons$find = buttons.find((button) => button.autoFocus)) === null || _buttons$find === void 0 ? void 0 : _buttons$find.ref;
250
+ const autoFocusRef = useRef(null);
251
+ const mergedRef = useMergedRefs(autoFocusRef, providedButtonRef);
252
+ const providedOrCreatedRef = useProvidedRefOrCreate(providedButtonRef);
253
+ const readRef = mergedRefEnabled ? autoFocusRef : providedOrCreatedRef;
254
+ const appliedRef = mergedRefEnabled ? mergedRef : providedOrCreatedRef;
248
255
  let autoFocusCount = 0;
249
256
  const [hasRendered, setHasRendered] = useState(0);
250
257
  useEffect(() => {
251
258
  if (hasRendered === 1) {
252
- var _autoFocusRef$current;
253
- (_autoFocusRef$current = autoFocusRef.current) === null || _autoFocusRef$current === void 0 || _autoFocusRef$current.focus();
259
+ var _readRef$current;
260
+ (_readRef$current = readRef.current) === null || _readRef$current === void 0 || _readRef$current.focus();
254
261
  } else setHasRendered(hasRendered + 1);
255
- }, [autoFocusRef, hasRendered]);
262
+ }, [readRef, hasRendered]);
256
263
  return /*#__PURE__*/ jsx(Fragment, { children: buttons.map((dialogButtonProps, index) => {
257
264
  const { content, buttonType = "default", autoFocus = false, ...buttonProps } = dialogButtonProps;
258
265
  return /*#__PURE__*/ jsx(ButtonComponent, {
259
266
  "data-component": "Dialog.FooterButton",
260
267
  ...buttonProps,
261
268
  variant: buttonType === "normal" ? "default" : buttonType,
262
- ref: autoFocus && autoFocusCount === 0 ? (autoFocusCount++, autoFocusRef) : null,
269
+ ref: autoFocus && autoFocusCount === 0 ? (autoFocusCount++, appliedRef) : null,
263
270
  children: content
264
271
  }, index);
265
272
  }) });
@@ -7,7 +7,8 @@ const DefaultFeatureFlags = FeatureFlagScope.create({
7
7
  primer_react_styled_react_use_primer_theme_providers: false,
8
8
  primer_react_action_list_group_heading_trailing_action: false,
9
9
  primer_react_action_list_item_gap: false,
10
- primer_react_timeline_list_semantics: false
10
+ primer_react_timeline_list_semantics: false,
11
+ primer_react_merged_forwarded_refs: false
11
12
  });
12
13
  //#endregion
13
14
  export { DefaultFeatureFlags };
@@ -1,7 +1,9 @@
1
+ import { useMergedRefs } from "../hooks/useMergedRefs.js";
1
2
  import { VisuallyHidden } from "../VisuallyHidden/VisuallyHidden.js";
2
3
  import { useProvidedRefOrCreate } from "../hooks/useProvidedRefOrCreate.js";
3
4
  import { useProvidedStateOrCreate } from "../hooks/useProvidedStateOrCreate.js";
4
5
  import { useId as useId$1 } from "../hooks/useId.js";
6
+ import { useFeatureFlag } from "../FeatureFlags/useFeatureFlag.js";
5
7
  import { useFocusZone } from "../hooks/useFocusZone.js";
6
8
  import { ActionListContainerContext } from "../ActionList/ActionListContainerContext.js";
7
9
  import { ActionList } from "../ActionList/index.js";
@@ -34,8 +36,17 @@ function FilteredActionList({ loading = false, placeholderText, filterValue: ext
34
36
  }, [onFilterChange, setInternalFilterValue]);
35
37
  const inputAndListContainerRef = useRef(null);
36
38
  const listRef = useRef(null);
37
- const scrollContainerRef = useProvidedRefOrCreate(providedScrollContainerRef);
38
- const inputRef = useProvidedRefOrCreate(providedInputRef);
39
+ const mergedRefEnabled = useFeatureFlag("primer_react_merged_forwarded_refs");
40
+ const scrollContainerRef = useRef(null);
41
+ const mergedScrollContainerRef = useMergedRefs(scrollContainerRef, providedScrollContainerRef);
42
+ const providedOrCreatedScrollContainerRef = useProvidedRefOrCreate(providedScrollContainerRef);
43
+ const readScrollContainerRef = mergedRefEnabled ? scrollContainerRef : providedOrCreatedScrollContainerRef;
44
+ const appliedScrollContainerRef = mergedRefEnabled ? mergedScrollContainerRef : providedOrCreatedScrollContainerRef;
45
+ const inputRef = useRef(null);
46
+ const mergedInputRef = useMergedRefs(inputRef, providedInputRef);
47
+ const providedOrCreatedInputRef = useProvidedRefOrCreate(providedInputRef);
48
+ const readInputRef = mergedRefEnabled ? inputRef : providedOrCreatedInputRef;
49
+ const appliedInputRef = mergedRefEnabled ? mergedInputRef : providedOrCreatedInputRef;
39
50
  const usingRovingTabindex = _PrivateFocusManagement === "roving-tabindex";
40
51
  const [listContainerElement, setListContainerElement] = useState(null);
41
52
  const activeDescendantRef = useRef();
@@ -89,12 +100,12 @@ function FilteredActionList({ loading = false, placeholderText, filterValue: ext
89
100
  onListContainerRefChanged === null || onListContainerRefChanged === void 0 || onListContainerRefChanged(node);
90
101
  }, [onListContainerRefChanged]);
91
102
  useEffect(() => {
92
- onInputRefChanged === null || onInputRefChanged === void 0 || onInputRefChanged(inputRef);
93
- }, [inputRef, onInputRefChanged]);
103
+ onInputRefChanged === null || onInputRefChanged === void 0 || onInputRefChanged(readInputRef);
104
+ }, [readInputRef, onInputRefChanged]);
94
105
  const DEFAULT_VIRTUAL_ITEM_HEIGHT = 32;
95
106
  const virtualizer = useVirtualizer({
96
107
  count: items.length,
97
- getScrollElement: () => scrollContainerRef.current,
108
+ getScrollElement: () => readScrollContainerRef.current,
98
109
  estimateSize: () => DEFAULT_VIRTUAL_ITEM_HEIGHT,
99
110
  overscan: 10,
100
111
  enabled: isVirtualized,
@@ -128,7 +139,7 @@ function FilteredActionList({ loading = false, placeholderText, filterValue: ext
128
139
  focusableElementFilter: (element) => {
129
140
  return !(element instanceof HTMLInputElement);
130
141
  },
131
- activeDescendantFocus: inputRef,
142
+ activeDescendantFocus: readInputRef,
132
143
  onActiveDescendantChanged: (current, previous, directlyActivated) => {
133
144
  activeDescendantRef.current = current;
134
145
  if (isVirtualized && current) {
@@ -136,7 +147,7 @@ function FilteredActionList({ loading = false, placeholderText, filterValue: ext
136
147
  const range = virtualizer.range;
137
148
  if (index !== null && range && (Number(index) < range.startIndex || Number(index) >= range.endIndex)) virtualizer.scrollToIndex(Number(index), { align: "auto" });
138
149
  }
139
- if (current && scrollContainerRef.current && (directlyActivated || focusPrependedElements)) scrollIntoView(current, scrollContainerRef.current, {
150
+ if (current && readScrollContainerRef.current && (directlyActivated || focusPrependedElements)) scrollIntoView(current, readScrollContainerRef.current, {
140
151
  ...menuScrollMargins,
141
152
  behavior: scrollBehavior
142
153
  });
@@ -153,14 +164,14 @@ function FilteredActionList({ loading = false, placeholderText, filterValue: ext
153
164
  isVirtualized
154
165
  ]);
155
166
  useEffect(() => {
156
- if (activeDescendantRef.current && scrollContainerRef.current) scrollIntoView(activeDescendantRef.current, scrollContainerRef.current, {
167
+ if (activeDescendantRef.current && readScrollContainerRef.current) scrollIntoView(activeDescendantRef.current, readScrollContainerRef.current, {
157
168
  ...menuScrollMargins,
158
169
  behavior: scrollBehavior
159
170
  });
160
171
  }, [
161
172
  items,
162
- inputRef,
163
- scrollContainerRef,
173
+ readInputRef,
174
+ readScrollContainerRef,
164
175
  scrollBehavior
165
176
  ]);
166
177
  useEffect(() => {
@@ -170,7 +181,7 @@ function FilteredActionList({ loading = false, placeholderText, filterValue: ext
170
181
  const list = listRef.current;
171
182
  if (!list) return;
172
183
  const handleFocusIn = (event) => {
173
- if (event.target === inputRef.current || list.contains(event.target)) setIsInputFocused(inputRef.current && inputRef.current === document.activeElement ? true : false);
184
+ if (event.target === readInputRef.current || list.contains(event.target)) setIsInputFocused(readInputRef.current && readInputRef.current === document.activeElement ? true : false);
174
185
  };
175
186
  inputAndListContainerElement.addEventListener("focusin", handleFocusIn);
176
187
  return () => {
@@ -179,26 +190,26 @@ function FilteredActionList({ loading = false, placeholderText, filterValue: ext
179
190
  }
180
191
  }, [
181
192
  items,
182
- inputRef,
193
+ readInputRef,
183
194
  listContainerElement,
184
195
  usingRovingTabindex
185
196
  ]);
186
197
  useEffect(() => {
187
- if (usingRovingTabindex && !loading) setIsInputFocused(inputRef.current && inputRef.current === document.activeElement ? true : false);
198
+ if (usingRovingTabindex && !loading) setIsInputFocused(readInputRef.current && readInputRef.current === document.activeElement ? true : false);
188
199
  }, [
189
200
  loading,
190
- inputRef,
201
+ readInputRef,
191
202
  usingRovingTabindex
192
203
  ]);
193
- useAnnouncements(items, usingRovingTabindex ? listRef : { current: listContainerElement }, inputRef, announcementsEnabled, loading, messageText, _PrivateFocusManagement);
194
- useScrollFlash(scrollContainerRef);
204
+ useAnnouncements(items, usingRovingTabindex ? listRef : { current: listContainerElement }, readInputRef, announcementsEnabled, loading, messageText, _PrivateFocusManagement);
205
+ useScrollFlash(readScrollContainerRef);
195
206
  const handleSelectAllChange = useCallback((e) => {
196
207
  if (onSelectAllChange) onSelectAllChange(e.target.checked);
197
208
  }, [onSelectAllChange]);
198
209
  function getBodyContent() {
199
- if (loading && scrollContainerRef.current && loadingType.appearsInBody) return /*#__PURE__*/ jsx(FilteredActionListBodyLoader, {
210
+ if (loading && readScrollContainerRef.current && loadingType.appearsInBody) return /*#__PURE__*/ jsx(FilteredActionListBodyLoader, {
200
211
  loadingType,
201
- height: scrollContainerRef.current.clientHeight
212
+ height: readScrollContainerRef.current.clientHeight
202
213
  });
203
214
  if (message) return message;
204
215
  let firstGroupIndex = 0;
@@ -290,7 +301,7 @@ function FilteredActionList({ loading = false, placeholderText, filterValue: ext
290
301
  "data-component": "FilteredActionList",
291
302
  children: [
292
303
  /*#__PURE__*/ jsx(FilteredActionListInput, {
293
- inputRef,
304
+ inputRef: appliedInputRef,
294
305
  value: filterValue,
295
306
  onInputChange,
296
307
  onInputKeyPress,
@@ -324,7 +335,7 @@ function FilteredActionList({ loading = false, placeholderText, filterValue: ext
324
335
  })]
325
336
  }),
326
337
  /*#__PURE__*/ jsx("div", {
327
- ref: scrollContainerRef,
338
+ ref: appliedScrollContainerRef,
328
339
  className: FilteredActionList_module_css_default.Container,
329
340
  children: getBodyContent()
330
341
  })
@@ -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>;
@@ -27,5 +27,8 @@ declare function FilteredActionListInput({
27
27
  className,
28
28
  ...restTextInputProps
29
29
  }: FilteredActionListInputProps): React.JSX.Element;
30
+ declare namespace FilteredActionListInput {
31
+ var displayName: string;
32
+ }
30
33
  //#endregion
31
34
  export { FilteredActionListInput, FilteredActionListInputProps };
@@ -96,5 +96,6 @@ function FilteredActionListInput(t0) {
96
96
  } else t2 = $[27];
97
97
  return t2;
98
98
  }
99
+ FilteredActionListInput.displayName = "FilteredActionList.Input";
99
100
  //#endregion
100
101
  export { FilteredActionListInput };
@@ -9,5 +9,8 @@ declare function FilteredActionListBodyLoader({
9
9
  loadingType: FilteredActionListLoadingType;
10
10
  height: number;
11
11
  }): JSX.Element;
12
+ declare namespace FilteredActionListBodyLoader {
13
+ var displayName: string;
14
+ }
12
15
  //#endregion
13
16
  export { FilteredActionListBodyLoader, FilteredActionListLoadingType, FilteredActionListLoadingTypes };
@@ -118,5 +118,6 @@ function _temp(_, i) {
118
118
  }, i);
119
119
  }
120
120
  _temp.displayName = "_temp";
121
+ FilteredActionListBodyLoader.displayName = "FilteredActionList.BodyLoader";
121
122
  //#endregion
122
123
  export { FilteredActionListBodyLoader, FilteredActionListLoadingTypes };
@@ -13,6 +13,7 @@ declare function FormControlCaption({
13
13
  style
14
14
  }: FormControlCaptionProps): React.JSX.Element;
15
15
  declare namespace FormControlCaption {
16
+ var displayName: string;
16
17
  var __SLOT__: symbol;
17
18
  }
18
19
  //#endregion
@@ -36,6 +36,7 @@ function FormControlCaption(t0) {
36
36
  } else t4 = $[7];
37
37
  return t4;
38
38
  }
39
+ FormControlCaption.displayName = "FormControl.Caption";
39
40
  FormControlCaption.__SLOT__ = Symbol("FormControl.Caption");
40
41
  //#endregion
41
42
  export { FormControlCaption };
@@ -93,6 +93,7 @@ const FormControlLabel = (t0) => {
93
93
  } else t3 = $[25];
94
94
  return t3;
95
95
  };
96
+ FormControlLabel.displayName = "FormControl.Label";
96
97
  FormControlLabel.__SLOT__ = Symbol("FormControl.Label");
97
98
  //#endregion
98
99
  export { FormControlLabel as default };
@@ -27,6 +27,7 @@ const FormControlLeadingVisual = (t0) => {
27
27
  } else t3 = $[4];
28
28
  return t3;
29
29
  };
30
+ FormControlLeadingVisual.displayName = "FormControl.LeadingVisual";
30
31
  FormControlLeadingVisual.__SLOT__ = Symbol("FormControl.LeadingVisual");
31
32
  //#endregion
32
33
  export { FormControlLeadingVisual as default };
@@ -1,8 +1,8 @@
1
1
  import { useMergedRefs } from "../hooks/useMergedRefs.js";
2
2
  import useIsomorphicLayoutEffect from "../utils/useIsomorphicLayoutEffect.js";
3
3
  import { useOverlay } from "../hooks/useOverlay.js";
4
- import Portal_default from "../Portal/index.js";
5
4
  import { useFeatureFlag } from "../FeatureFlags/useFeatureFlag.js";
5
+ import Portal_default from "../Portal/index.js";
6
6
  import Overlay_module_css_default from "./Overlay.module.css.js";
7
7
  import { clsx } from "clsx";
8
8
  import { jsx } from "react/jsx-runtime";
@@ -1,6 +1,8 @@
1
+ import { useMergedRefs } from "../hooks/useMergedRefs.js";
1
2
  import { useProvidedRefOrCreate } from "../hooks/useProvidedRefOrCreate.js";
2
3
  import { warning } from "../utils/warning.js";
3
4
  import { isSlot } from "../utils/is-slot.js";
5
+ import { useFeatureFlag } from "../FeatureFlags/useFeatureFlag.js";
4
6
  import { isResponsiveValue } from "../hooks/useResponsiveValue.js";
5
7
  import { getResponsiveAttributes } from "../internal/utils/getResponsiveAttributes.js";
6
8
  import Heading from "../Heading/Heading.js";
@@ -10,7 +12,7 @@ import PageHeader_module_css_default from "./PageHeader.module.css.js";
10
12
  import { c } from "react-compiler-runtime";
11
13
  import { clsx } from "clsx";
12
14
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
13
- import React, { useEffect } from "react";
15
+ import React, { useEffect, useRef } from "react";
14
16
  import { ArrowLeftIcon } from "@primer/octicons-react";
15
17
  //#region src/PageHeader/PageHeader.tsx
16
18
  const hiddenOnRegularAndWide = {
@@ -27,7 +29,12 @@ const Root = /*#__PURE__*/ React.forwardRef((t0, forwardedRef) => {
27
29
  const $ = c(17);
28
30
  const { children, className, as: t1, "aria-label": ariaLabel, role, hasBorder } = t0;
29
31
  const BaseComponent = t1 === void 0 ? "div" : t1;
30
- const rootRef = useProvidedRefOrCreate(forwardedRef);
32
+ const mergedRefEnabled = useFeatureFlag("primer_react_merged_forwarded_refs");
33
+ const rootRef = useRef(null);
34
+ const mergedRef = useMergedRefs(rootRef, forwardedRef);
35
+ const providedOrCreatedRef = useProvidedRefOrCreate(forwardedRef);
36
+ const readRef = mergedRefEnabled ? rootRef : providedOrCreatedRef;
37
+ const appliedRef = mergedRefEnabled ? mergedRef : providedOrCreatedRef;
31
38
  const hoistChildState = (nodes) => {
32
39
  const result = { hasNavigation: false };
33
40
  for (const child of React.Children.toArray(nodes)) {
@@ -54,12 +61,12 @@ const Root = /*#__PURE__*/ React.forwardRef((t0, forwardedRef) => {
54
61
  const isInteractive = _temp;
55
62
  let t2;
56
63
  let t3;
57
- if ($[0] !== children || $[1] !== rootRef) {
64
+ if ($[0] !== children || $[1] !== readRef) {
58
65
  t2 = function validateInteractiveElementsInTitle() {
59
66
  let hasContextArea = false;
60
67
  let hasLeadingAction = false;
61
- if (!rootRef.current || rootRef.current.children.length <= 0) return;
62
- const titleArea = Array.from(rootRef.current.children).find(_temp2);
68
+ if (!readRef.current || readRef.current.children.length <= 0) return;
69
+ const titleArea = Array.from(readRef.current.children).find(_temp2);
63
70
  if (!titleArea) return;
64
71
  for (const child_1 of React.Children.toArray(children)) {
65
72
  if (/*#__PURE__*/ React.isValidElement(child_1) && (child_1.type === ContextArea || isSlot(child_1, ContextArea))) hasContextArea = true;
@@ -67,9 +74,9 @@ const Root = /*#__PURE__*/ React.forwardRef((t0, forwardedRef) => {
67
74
  }
68
75
  warning(Array.from(titleArea.childNodes).some((child_2) => child_2 instanceof HTMLElement && isInteractive(child_2) || Array.from(child_2.childNodes).some((child_3) => child_3 instanceof HTMLElement && isInteractive(child_3))) && (hasContextArea || hasLeadingAction), "When PageHeader.ContextArea or PageHeader.LeadingAction is present, we recommended not to include any interactive items in the PageHeader.TitleArea to make sure the focus order is logical.");
69
76
  };
70
- t3 = [children, rootRef];
77
+ t3 = [children, readRef];
71
78
  $[0] = children;
72
- $[1] = rootRef;
79
+ $[1] = readRef;
73
80
  $[2] = t2;
74
81
  $[3] = t3;
75
82
  } else {
@@ -89,9 +96,9 @@ const Root = /*#__PURE__*/ React.forwardRef((t0, forwardedRef) => {
89
96
  const t8 = getResponsiveAttributes("title-size-variant", titleVariant);
90
97
  const t9 = getNavHiddenDataAttributes(navigationHidden);
91
98
  let t10;
92
- if ($[6] !== BaseComponent || $[7] !== ariaLabel || $[8] !== children || $[9] !== role || $[10] !== rootRef || $[11] !== t4 || $[12] !== t6 || $[13] !== t7 || $[14] !== t8 || $[15] !== t9) {
99
+ if ($[6] !== BaseComponent || $[7] !== appliedRef || $[8] !== ariaLabel || $[9] !== children || $[10] !== role || $[11] !== t4 || $[12] !== t6 || $[13] !== t7 || $[14] !== t8 || $[15] !== t9) {
93
100
  t10 = /*#__PURE__*/ jsx(BaseComponent, {
94
- ref: rootRef,
101
+ ref: appliedRef,
95
102
  className: t4,
96
103
  "data-component": t5,
97
104
  "data-has-border": t6,
@@ -103,10 +110,10 @@ const Root = /*#__PURE__*/ React.forwardRef((t0, forwardedRef) => {
103
110
  children
104
111
  });
105
112
  $[6] = BaseComponent;
106
- $[7] = ariaLabel;
107
- $[8] = children;
108
- $[9] = role;
109
- $[10] = rootRef;
113
+ $[7] = appliedRef;
114
+ $[8] = ariaLabel;
115
+ $[9] = children;
116
+ $[10] = role;
110
117
  $[11] = t4;
111
118
  $[12] = t6;
112
119
  $[13] = t7;
@@ -227,7 +234,7 @@ const ParentLink = /*#__PURE__*/ React.forwardRef((t0, ref) => {
227
234
  } else t7 = $[23];
228
235
  return t7;
229
236
  });
230
- ParentLink.displayName = "ParentLink";
237
+ ParentLink.displayName = "PageHeader.ParentLink";
231
238
  const ContextBar = (t0) => {
232
239
  const $ = c(8);
233
240
  const { children, className, hidden: t1 } = t0;
@@ -295,7 +302,9 @@ const TitleArea = /*#__PURE__*/ React.forwardRef((t0, forwardedRef) => {
295
302
  const { children, className, hidden: t1, variant: t2 } = t0;
296
303
  const hidden = t1 === void 0 ? false : t1;
297
304
  const variant = t2 === void 0 ? "medium" : t2;
298
- const titleAreaRef = useProvidedRefOrCreate(forwardedRef);
305
+ const mergedRefEnabled = useFeatureFlag("primer_react_merged_forwarded_refs");
306
+ const providedOrCreatedRef = useProvidedRefOrCreate(forwardedRef);
307
+ const appliedRef = mergedRefEnabled ? forwardedRef : providedOrCreatedRef;
299
308
  let t3;
300
309
  if ($[0] !== className) {
301
310
  t3 = clsx(PageHeader_module_css_default.TitleArea, className);
@@ -315,25 +324,25 @@ const TitleArea = /*#__PURE__*/ React.forwardRef((t0, forwardedRef) => {
315
324
  $[5] = t5;
316
325
  } else t5 = $[5];
317
326
  let t6;
318
- if ($[6] !== children || $[7] !== t3 || $[8] !== t4 || $[9] !== t5 || $[10] !== titleAreaRef) {
327
+ if ($[6] !== appliedRef || $[7] !== children || $[8] !== t3 || $[9] !== t4 || $[10] !== t5) {
319
328
  t6 = /*#__PURE__*/ jsx("div", {
320
329
  className: t3,
321
- ref: titleAreaRef,
330
+ ref: appliedRef,
322
331
  "data-component": "TitleArea",
323
332
  ...t4,
324
333
  ...t5,
325
334
  children
326
335
  });
327
- $[6] = children;
328
- $[7] = t3;
329
- $[8] = t4;
330
- $[9] = t5;
331
- $[10] = titleAreaRef;
336
+ $[6] = appliedRef;
337
+ $[7] = children;
338
+ $[8] = t3;
339
+ $[9] = t4;
340
+ $[10] = t5;
332
341
  $[11] = t6;
333
342
  } else t6 = $[11];
334
343
  return t6;
335
344
  });
336
- TitleArea.displayName = "TitleArea";
345
+ TitleArea.displayName = "PageHeader.TitleArea";
337
346
  const LeadingAction = (t0) => {
338
347
  const $ = c(8);
339
348
  const { children, className, hidden: t1 } = t0;
@@ -221,7 +221,7 @@ const HorizontalDivider = /*#__PURE__*/ memo((t0) => {
221
221
  } else t8 = $[13];
222
222
  return t8;
223
223
  });
224
- HorizontalDivider.displayName = "HorizontalDivider";
224
+ HorizontalDivider.displayName = "PageLayout.HorizontalDivider";
225
225
  const VerticalDivider = /*#__PURE__*/ memo((t0) => {
226
226
  const $ = c(12);
227
227
  const { variant: t1, position, className, style, children } = t0;
@@ -263,7 +263,7 @@ const VerticalDivider = /*#__PURE__*/ memo((t0) => {
263
263
  } else t5 = $[11];
264
264
  return t5;
265
265
  });
266
- VerticalDivider.displayName = "VerticalDivider";
266
+ VerticalDivider.displayName = "PageLayout.VerticalDivider";
267
267
  const SidebarDivider = /*#__PURE__*/ memo(function SidebarDivider(t0) {
268
268
  const $ = c(23);
269
269
  const { position, divider, resizable, minPaneWidth, maxPaneWidth, currentWidth, currentWidthRef, handleRef, sidebarRef, dragStartClientXRef, dragStartWidthRef, dragMaxWidthRef, getMaxPaneWidth, getDefaultWidth, saveWidth } = t0;
@@ -1,2 +1,2 @@
1
- .prc-SegmentedControl-SegmentedControl-lqIXp{--segmented-control-icon-width:32px;background-color:var(--controlTrack-bgColor-rest,#e6eaef);border:var(--borderWidth-thin,.0625rem) solid var(--controlTrack-borderColor-rest,transparent);border-radius:var(--borderRadius-medium,.375rem);display:inline-flex;font-size:var(--text-body-size-medium,.875rem);height:32px;margin:0;padding:0}.prc-SegmentedControl-SegmentedControl-lqIXp[data-full-width=true]{display:flex;width:100%;--segmented-control-icon-width:100%}.prc-SegmentedControl-SegmentedControl-lqIXp[data-full-width=false]{display:inline-flex;width:auto;--segmented-control-icon-width:32px}@media (max-width:calc(48rem - 0.02px)){.prc-SegmentedControl-SegmentedControl-lqIXp[data-full-width-narrow=true]{display:flex;width:100%;--segmented-control-icon-width:100%}.prc-SegmentedControl-SegmentedControl-lqIXp[data-full-width-narrow=false]{display:inline-flex;width:auto;--segmented-control-icon-width:32px}}@media (min-width:48rem){.prc-SegmentedControl-SegmentedControl-lqIXp[data-full-width-regular=true]{display:flex;width:100%;--segmented-control-icon-width:100%}.prc-SegmentedControl-SegmentedControl-lqIXp[data-full-width-regular=false]{display:inline-flex;width:auto;--segmented-control-icon-width:32px}}@media (min-width:87.5rem){.prc-SegmentedControl-SegmentedControl-lqIXp[data-full-width-wide=true]{display:flex;width:100%;--segmented-control-icon-width:100%}.prc-SegmentedControl-SegmentedControl-lqIXp[data-full-width-regular=true]:not([data-full-width-wide=true]),.prc-SegmentedControl-SegmentedControl-lqIXp[data-full-width-wide=false]{display:inline-flex;width:auto;--segmented-control-icon-width:32px}}.prc-SegmentedControl-SegmentedControl-lqIXp[data-variant=dropdown],.prc-SegmentedControl-SegmentedControl-lqIXp[data-variant=hideLabels] .prc-SegmentedControl-Text-7S2y2{display:none}@media (max-width:calc(48rem - 0.02px)){.prc-SegmentedControl-SegmentedControl-lqIXp[data-variant-narrow=dropdown],.prc-SegmentedControl-SegmentedControl-lqIXp[data-variant-narrow=hideLabels] .prc-SegmentedControl-Text-7S2y2{display:none}}@media (min-width:48rem){.prc-SegmentedControl-SegmentedControl-lqIXp[data-variant-regular=dropdown],.prc-SegmentedControl-SegmentedControl-lqIXp[data-variant-regular=hideLabels] .prc-SegmentedControl-Text-7S2y2{display:none}}@media (min-width:87.5rem){.prc-SegmentedControl-SegmentedControl-lqIXp[data-variant-wide=dropdown],.prc-SegmentedControl-SegmentedControl-lqIXp[data-variant-wide=hideLabels] .prc-SegmentedControl-Text-7S2y2{display:none}}.prc-SegmentedControl-SegmentedControl-lqIXp:where([data-size=small]){font-size:var(--text-body-size-small,.75rem);height:28px}.prc-SegmentedControl-DropdownContainer-ZaPMn{display:none}.prc-SegmentedControl-DropdownContainer-ZaPMn[data-variant=dropdown]{display:block}@media (max-width:calc(48rem - 0.02px)){.prc-SegmentedControl-DropdownContainer-ZaPMn[data-variant-narrow=dropdown]{display:block}}@media (min-width:48rem){.prc-SegmentedControl-DropdownContainer-ZaPMn[data-variant-regular=dropdown]{display:block}}@media (min-width:87.5rem){.prc-SegmentedControl-DropdownContainer-ZaPMn[data-variant-wide=dropdown]{display:block}}.prc-SegmentedControl-Item-tSCQh{display:block;flex-grow:1;margin-bottom:-1px;margin-top:-1px;position:relative}.prc-SegmentedControl-Item-tSCQh:not(:last-child){margin-right:1px}.prc-SegmentedControl-Item-tSCQh:not(:last-child):after{background-color:var(--borderColor-default,#d1d9e0);bottom:var(--base-size-8,.5rem);content:"";position:absolute;right:calc(var(--base-size-2,.125rem)*-1);top:var(--base-size-8,.5rem);width:1px}.prc-SegmentedControl-Item-tSCQh:not(:last-child):has(+[data-selected]):after,.prc-SegmentedControl-Item-tSCQh:not(:last-child):where([data-selected]):after{background-color:transparent}.prc-SegmentedControl-Item-tSCQh:first-child{margin-left:-1px}.prc-SegmentedControl-Item-tSCQh:last-child{margin-right:-1px}.prc-SegmentedControl-Item-tSCQh .prc-SegmentedControl-Counter-GmZOI{align-items:center;display:flex;margin-inline-start:var(--base-size-8,.5rem)}.prc-SegmentedControl-Button-E48xz{--segmented-control-button-inner-padding:12px;--segmented-control-button-bg-inset:4px;--segmented-control-outer-radius:var(--borderRadius-medium,0.375rem);background-color:transparent;border-color:transparent;border-radius:var(--segmented-control-outer-radius);border-width:0;color:currentColor;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:var(--base-text-weight-normal,400);height:100%;padding:var(--segmented-control-button-bg-inset);width:100%}.prc-SegmentedControl-Button-E48xz svg{fill:var(--fgColor-muted,#59636e);color:var(--fgColor-muted,#59636e)}.prc-SegmentedControl-Button-E48xz:focus:not(:disabled){box-shadow:none;outline:var(--base-size-2,.125rem) solid var(--fgColor-accent,#0969da);outline-offset:-1px}.prc-SegmentedControl-Button-E48xz:focus:not(:disabled):not(:focus-visible){outline:1px solid transparent}.prc-SegmentedControl-Button-E48xz:focus-visible:not(:disabled){box-shadow:none;outline:var(--base-size-2,.125rem) solid var(--fgColor-accent,#0969da);outline-offset:-1px}.prc-SegmentedControl-Button-E48xz:focus:focus-visible:not(:last-child):after{width:0}.prc-SegmentedControl-Button-E48xz[aria-disabled=true]:not([aria-current=true]){background-color:transparent;color:var(--fgColor-disabled,#818b98);cursor:not-allowed}.prc-SegmentedControl-Button-E48xz[aria-disabled=true]:not([aria-current=true]) svg{fill:var(--fgColor-disabled,#818b98);color:var(--fgColor-disabled,#818b98)}@media (pointer:coarse){.prc-SegmentedControl-Button-E48xz:before{content:"";left:0;min-height:44px;position:absolute;right:0;top:50%;transform:translateY(-50%)}}.prc-SegmentedControl-IconButton-tlzDE{width:var(--segmented-control-icon-width,32px)}.prc-SegmentedControl-Content-1COlk{align-items:center;border-color:transparent;border-radius:calc(var(--segmented-control-outer-radius) - var(--segmented-control-button-bg-inset)/2);border-style:solid;border-width:var(--borderWidth-thin,.0625rem);display:flex;height:100%;justify-content:center;padding-left:calc(var(--segmented-control-button-inner-padding) - var(--segmented-control-button-bg-inset));padding-right:calc(var(--segmented-control-button-inner-padding) - var(--segmented-control-button-bg-inset))}.prc-SegmentedControl-Button-E48xz[aria-current=true]{font-weight:var(--base-text-weight-semibold,600);padding:0}.prc-SegmentedControl-Button-E48xz[aria-current=true] .prc-SegmentedControl-Content-1COlk{background-color:var(--controlKnob-bgColor-rest,#fff);border-color:var(--controlKnob-borderColor-rest,#d1d9e0);border-radius:var(--segmented-control-outer-radius);padding-left:var(--segmented-control-button-inner-padding);padding-right:var(--segmented-control-button-inner-padding)}.prc-SegmentedControl-Button-E48xz:not([aria-current=true],[aria-disabled=true]):hover .prc-SegmentedControl-Content-1COlk{background-color:var(--controlTrack-bgColor-hover,#e0e6eb)}.prc-SegmentedControl-Button-E48xz:not([aria-current=true],[aria-disabled=true]):active .prc-SegmentedControl-Content-1COlk{background-color:var(--controlTrack-bgColor-active,#dae0e7)}.prc-SegmentedControl-Text-7S2y2:after{content:attr(data-text);display:block;font-weight:var(--base-text-weight-semibold,600);height:0;overflow:hidden;pointer-events:none;-webkit-user-select:none;user-select:none;visibility:hidden}.prc-SegmentedControl-LeadingIcon-74n5s{margin-right:var(--base-size-4,.25rem)}
2
- /*# sourceMappingURL=SegmentedControl-a004561f.css.map */
1
+ .prc-SegmentedControl-SegmentedControl-lqIXp{--segmented-control-icon-width:32px;background-color:var(--controlTrack-bgColor-rest,#e6eaef);border:var(--borderWidth-thin,.0625rem) solid var(--controlTrack-borderColor-rest,transparent);border-radius:var(--borderRadius-medium,.375rem);display:inline-flex;font-size:var(--text-body-size-medium,.875rem);height:32px;margin:0;padding:0}.prc-SegmentedControl-SegmentedControl-lqIXp[data-full-width=true]{display:flex;width:100%;--segmented-control-icon-width:100%}.prc-SegmentedControl-SegmentedControl-lqIXp[data-full-width=false]{display:inline-flex;width:auto;--segmented-control-icon-width:32px}@media (max-width:calc(48rem - 0.02px)){.prc-SegmentedControl-SegmentedControl-lqIXp[data-full-width-narrow=true]{display:flex;width:100%;--segmented-control-icon-width:100%}.prc-SegmentedControl-SegmentedControl-lqIXp[data-full-width-narrow=false]{display:inline-flex;width:auto;--segmented-control-icon-width:32px}}@media (min-width:48rem){.prc-SegmentedControl-SegmentedControl-lqIXp[data-full-width-regular=true]{display:flex;width:100%;--segmented-control-icon-width:100%}.prc-SegmentedControl-SegmentedControl-lqIXp[data-full-width-regular=false]{display:inline-flex;width:auto;--segmented-control-icon-width:32px}}@media (min-width:87.5rem){.prc-SegmentedControl-SegmentedControl-lqIXp[data-full-width-wide=true]{display:flex;width:100%;--segmented-control-icon-width:100%}.prc-SegmentedControl-SegmentedControl-lqIXp[data-full-width-regular=true]:not([data-full-width-wide=true]),.prc-SegmentedControl-SegmentedControl-lqIXp[data-full-width-wide=false]{display:inline-flex;width:auto;--segmented-control-icon-width:32px}}.prc-SegmentedControl-SegmentedControl-lqIXp[data-variant=dropdown],.prc-SegmentedControl-SegmentedControl-lqIXp[data-variant=hideLabels] .prc-SegmentedControl-Text-7S2y2{display:none}@media (max-width:calc(48rem - 0.02px)){.prc-SegmentedControl-SegmentedControl-lqIXp[data-variant-narrow=dropdown],.prc-SegmentedControl-SegmentedControl-lqIXp[data-variant-narrow=hideLabels] .prc-SegmentedControl-Text-7S2y2{display:none}}@media (min-width:48rem){.prc-SegmentedControl-SegmentedControl-lqIXp[data-variant-regular=dropdown],.prc-SegmentedControl-SegmentedControl-lqIXp[data-variant-regular=hideLabels] .prc-SegmentedControl-Text-7S2y2{display:none}}@media (min-width:87.5rem){.prc-SegmentedControl-SegmentedControl-lqIXp[data-variant-wide=dropdown],.prc-SegmentedControl-SegmentedControl-lqIXp[data-variant-wide=hideLabels] .prc-SegmentedControl-Text-7S2y2{display:none}}.prc-SegmentedControl-SegmentedControl-lqIXp:where([data-size=small]){font-size:var(--text-body-size-small,.75rem);height:28px}.prc-SegmentedControl-DropdownContainer-ZaPMn{display:none}.prc-SegmentedControl-DropdownContainer-ZaPMn[data-variant=dropdown]{display:block}@media (max-width:calc(48rem - 0.02px)){.prc-SegmentedControl-DropdownContainer-ZaPMn[data-variant-narrow=dropdown]{display:block}}@media (min-width:48rem){.prc-SegmentedControl-DropdownContainer-ZaPMn[data-variant-regular=dropdown]{display:block}}@media (min-width:87.5rem){.prc-SegmentedControl-DropdownContainer-ZaPMn[data-variant-wide=dropdown]{display:block}}.prc-SegmentedControl-Item-tSCQh{display:block;flex-grow:1;margin-bottom:-1px;margin-top:-1px;position:relative}.prc-SegmentedControl-Item-tSCQh:not(:last-child){margin-right:1px}.prc-SegmentedControl-Item-tSCQh:not(:last-child):after{background-color:var(--borderColor-default,#d1d9e0);bottom:var(--base-size-8,.5rem);content:"";position:absolute;right:calc(var(--base-size-2,.125rem)*-1);top:var(--base-size-8,.5rem);width:1px}.prc-SegmentedControl-Item-tSCQh:not(:last-child):has(+[data-selected]):after,.prc-SegmentedControl-Item-tSCQh:not(:last-child):where([data-selected]):after{background-color:transparent}.prc-SegmentedControl-Item-tSCQh:first-child{margin-left:-1px}.prc-SegmentedControl-Item-tSCQh:last-child{margin-right:-1px}.prc-SegmentedControl-Item-tSCQh .prc-SegmentedControl-Counter-GmZOI{align-items:center;display:flex;margin-inline-start:var(--base-size-8,.5rem)}.prc-SegmentedControl-Button-E48xz{--segmented-control-button-inner-padding:12px;--segmented-control-button-bg-inset:4px;--segmented-control-outer-radius:var(--borderRadius-medium,0.375rem);background-color:transparent;border-color:transparent;border-radius:var(--segmented-control-outer-radius);border-width:0;color:currentColor;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:var(--base-text-weight-normal,400);height:100%;padding:var(--segmented-control-button-bg-inset);width:100%}.prc-SegmentedControl-Button-E48xz svg{fill:var(--fgColor-muted,#59636e);color:var(--fgColor-muted,#59636e)}.prc-SegmentedControl-Button-E48xz:focus:not(:disabled){box-shadow:none;outline:var(--base-size-2,.125rem) solid var(--fgColor-accent,#0969da);outline-offset:-1px}.prc-SegmentedControl-Button-E48xz:focus:not(:disabled):not(:focus-visible){outline:1px solid transparent}.prc-SegmentedControl-Button-E48xz:focus-visible:not(:disabled){box-shadow:none;outline:var(--base-size-2,.125rem) solid var(--fgColor-accent,#0969da);outline-offset:-1px}.prc-SegmentedControl-Button-E48xz:focus:focus-visible:not(:last-child):after{width:0}.prc-SegmentedControl-Button-E48xz[aria-disabled=true]:not([aria-pressed=true]){background-color:transparent;color:var(--fgColor-disabled,#818b98);cursor:not-allowed}.prc-SegmentedControl-Button-E48xz[aria-disabled=true]:not([aria-pressed=true]) svg{fill:var(--fgColor-disabled,#818b98);color:var(--fgColor-disabled,#818b98)}@media (pointer:coarse){.prc-SegmentedControl-Button-E48xz:before{content:"";left:0;min-height:44px;position:absolute;right:0;top:50%;transform:translateY(-50%)}}.prc-SegmentedControl-IconButton-tlzDE{width:var(--segmented-control-icon-width,32px)}.prc-SegmentedControl-Content-1COlk{align-items:center;border-color:transparent;border-radius:calc(var(--segmented-control-outer-radius) - var(--segmented-control-button-bg-inset)/2);border-style:solid;border-width:var(--borderWidth-thin,.0625rem);display:flex;height:100%;justify-content:center;padding-left:calc(var(--segmented-control-button-inner-padding) - var(--segmented-control-button-bg-inset));padding-right:calc(var(--segmented-control-button-inner-padding) - var(--segmented-control-button-bg-inset))}.prc-SegmentedControl-Button-E48xz[aria-pressed=true]{font-weight:var(--base-text-weight-semibold,600);padding:0}.prc-SegmentedControl-Button-E48xz[aria-pressed=true] .prc-SegmentedControl-Content-1COlk{background-color:var(--controlKnob-bgColor-rest,#fff);border-color:var(--controlKnob-borderColor-rest,#d1d9e0);border-radius:var(--segmented-control-outer-radius);padding-left:var(--segmented-control-button-inner-padding);padding-right:var(--segmented-control-button-inner-padding)}.prc-SegmentedControl-Button-E48xz:not([aria-pressed=true],[aria-disabled=true]):hover .prc-SegmentedControl-Content-1COlk{background-color:var(--controlTrack-bgColor-hover,#e0e6eb)}.prc-SegmentedControl-Button-E48xz:not([aria-pressed=true],[aria-disabled=true]):active .prc-SegmentedControl-Content-1COlk{background-color:var(--controlTrack-bgColor-active,#dae0e7)}.prc-SegmentedControl-Text-7S2y2:after{content:attr(data-text);display:block;font-weight:var(--base-text-weight-semibold,600);height:0;overflow:hidden;pointer-events:none;-webkit-user-select:none;user-select:none;visibility:hidden}.prc-SegmentedControl-LeadingIcon-74n5s{margin-right:var(--base-size-4,.25rem)}
2
+ /*# sourceMappingURL=SegmentedControl-de65527b.css.map */
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/SegmentedControl/SegmentedControl.module.css.js"],"names":[],"mappings":"AAAA,6CAEE,mCAAoC,CASpC,yDAAkD,CAClD,8FAAuF,CACvF,gDAAyC,CATzC,mBAAoB,CAMpB,8CAAuC,CAHvC,WAAY,CAEZ,QAAS,CADT,SA0HF,CAlHE,mEACE,YAAa,CACb,UAAW,CAEX,mCACF,CAEA,oEACE,mBAAoB,CACpB,UAAW,CAEX,mCACF,CAEA,wCACE,0EACE,YAAa,CACb,UAAW,CAEX,mCACF,CAEA,2EACE,mBAAoB,CACpB,UAAW,CAEX,mCACF,CACF,CAEA,yBACE,2EACE,YAAa,CACb,UAAW,CAEX,mCACF,CAEA,4EACE,mBAAoB,CACpB,UAAW,CAEX,mCACF,CACF,CAEA,2BACE,wEACE,YAAa,CACb,UAAW,CAEX,mCACF,CASA,qLACE,mBAAoB,CACpB,UAAW,CAEX,mCACF,CACF,CAQA,2KACE,YACF,CAEA,wCAKE,yLACE,YACF,CACF,CAEA,yBAKE,2LACE,YACF,CACF,CAEA,2BAKE,qLACE,YACF,CACF,CAEA,sEAGE,4CAAsC,CADtC,WAEF,CAGF,8CACE,YAwBF,CArBE,qEACE,aACF,CAEA,wCACE,4EACE,aACF,CACF,CAEA,yBACE,6EACE,aACF,CACF,CAEA,2BACE,0EACE,aACF,CACF,CAGF,iCAEE,aAAc,CAKd,WAAY,CADZ,kBAAmB,CAFnB,eAAgB,CAHhB,iBA6CF,CArCE,kDAEE,gBAkBF,CAhBE,wDAQE,mDAA4C,CAJ5C,+BAA0B,CAE1B,UAAW,CALX,iBAAkB,CAElB,yCAAoC,CADpC,4BAAuB,CAGvB,SAIF,CAGA,6JAEE,4BACF,CAGF,6CAEE,gBACF,CAEA,4CAEE,iBACF,CAEA,qEAGE,kBAAmB,CADnB,YAAa,CADb,4CAGF,CAGF,mCAEE,6CAA8C,CAC9C,uCAAwC,CACxC,oEAA4D,CAW5D,4BAA6B,CAC7B,wBAAyB,CAGzB,mDAAoD,CAFpD,cAAe,CAJf,kBAAmB,CACnB,cAAe,CAJf,mBAAoB,CACpB,iBAAkB,CAClB,8CAA2C,CAL3C,WAAY,CAEZ,gDAAiD,CAHjD,UAmEF,CApDE,uCACE,iCAA0B,CAC1B,kCACF,CAGA,wDAGE,eAAgB,CAFhB,sEAAuD,CACvD,mBAOF,CAHE,4EACE,6BACF,CAIF,gEAGE,eAAgB,CAFhB,sEAAuD,CACvD,mBAEF,CAGA,8EAEE,OACF,CAEA,gFAGE,4BAA6B,CAD7B,qCAA8B,CAD9B,kBAQF,CAJE,oFACE,oCAA6B,CAC7B,qCACF,CAGF,wBACE,0CAME,UAAW,CAFX,MAAO,CACP,eAAgB,CAJhB,iBAAkB,CAElB,OAAQ,CADR,OAAQ,CAKR,0BACF,CACF,CAGF,uCACE,8CACF,CAEA,oCAiBE,kBAAmB,CAVnB,wBAAyB,CASzB,sGAAyG,CARzG,kBAAmB,CACnB,6CAAqC,CARrC,YAAa,CACb,WAAY,CAgBZ,sBAAuB,CAZvB,2GAA4G,CAF5G,4GAeF,CAEA,sDAEE,gDAA6C,CAD7C,SAaF,CAVE,0FAKE,qDAAiD,CACjD,wDAAiD,CAEjD,mDAAoD,CAJpD,0DAA2D,CAF3D,2DAOF,CAIA,2HACE,0DACF,CAEA,4HACE,2DACF,CAGF,uCAOE,uBAAwB,CANxB,aAAc,CAGd,gDAA6C,CAF7C,QAAS,CACT,eAAgB,CAEhB,mBAAoB,CAGpB,wBAAiB,CAAjB,gBAAiB,CAFjB,iBAGF,CAEA,wCACE,sCACF","file":"SegmentedControl-a004561f.css","sourcesContent":[".SegmentedControl {\n /* TODO: use primitive `control.medium.size` when it is available instead of '32px' */\n --segmented-control-icon-width: 32px;\n\n display: inline-flex;\n\n /* TODO: use primitive `control.{small|medium}.size` when it is available */\n height: 32px;\n padding: 0;\n margin: 0;\n font-size: var(--text-body-size-medium);\n background-color: var(--controlTrack-bgColor-rest);\n border: var(--borderWidth-thin) solid var(--controlTrack-borderColor-rest, transparent);\n border-radius: var(--borderRadius-medium);\n\n /* Responsive full-width */\n &[data-full-width='true'] {\n display: flex;\n width: 100%;\n\n --segmented-control-icon-width: 100%;\n }\n\n &[data-full-width='false'] {\n display: inline-flex;\n width: auto;\n\n --segmented-control-icon-width: 32px;\n }\n\n @media (--viewportRange-narrow) {\n &[data-full-width-narrow='true'] {\n display: flex;\n width: 100%;\n\n --segmented-control-icon-width: 100%;\n }\n\n &[data-full-width-narrow='false'] {\n display: inline-flex;\n width: auto;\n\n --segmented-control-icon-width: 32px;\n }\n }\n\n @media (--viewportRange-regular) {\n &[data-full-width-regular='true'] {\n display: flex;\n width: 100%;\n\n --segmented-control-icon-width: 100%;\n }\n\n &[data-full-width-regular='false'] {\n display: inline-flex;\n width: auto;\n\n --segmented-control-icon-width: 32px;\n }\n }\n\n @media (--viewportRange-wide) {\n &[data-full-width-wide='true'] {\n display: flex;\n width: 100%;\n\n --segmented-control-icon-width: 100%;\n }\n\n &[data-full-width-wide='false'] {\n display: inline-flex;\n width: auto;\n\n --segmented-control-icon-width: 32px;\n }\n\n &[data-full-width-regular='true']:not([data-full-width-wide='true']) {\n display: inline-flex;\n width: auto;\n\n --segmented-control-icon-width: 32px;\n }\n }\n\n /* Hide when dropdown variant is active */\n &[data-variant='dropdown'] {\n display: none;\n }\n\n /* Handle hideLabels variant - hide button text */\n &[data-variant='hideLabels'] .Text {\n display: none;\n }\n\n @media (--viewportRange-narrow) {\n &[data-variant-narrow='dropdown'] {\n display: none;\n }\n\n &[data-variant-narrow='hideLabels'] .Text {\n display: none;\n }\n }\n\n @media (--viewportRange-regular) {\n &[data-variant-regular='dropdown'] {\n display: none;\n }\n\n &[data-variant-regular='hideLabels'] .Text {\n display: none;\n }\n }\n\n @media (--viewportRange-wide) {\n &[data-variant-wide='dropdown'] {\n display: none;\n }\n\n &[data-variant-wide='hideLabels'] .Text {\n display: none;\n }\n }\n\n &:where([data-size='small']) {\n /* TODO: use primitive `control.{small|medium}.size` when it is available */\n height: 28px;\n font-size: var(--text-body-size-small);\n }\n}\n\n.DropdownContainer {\n display: none;\n\n /* Show when dropdown variant is active */\n &[data-variant='dropdown'] {\n display: block;\n }\n\n @media (--viewportRange-narrow) {\n &[data-variant-narrow='dropdown'] {\n display: block;\n }\n }\n\n @media (--viewportRange-regular) {\n &[data-variant-regular='dropdown'] {\n display: block;\n }\n }\n\n @media (--viewportRange-wide) {\n &[data-variant-wide='dropdown'] {\n display: block;\n }\n }\n}\n\n.Item {\n position: relative;\n display: block;\n /* stylelint-disable-next-line primer/spacing */\n margin-top: -1px;\n /* stylelint-disable-next-line primer/spacing */\n margin-bottom: -1px;\n flex-grow: 1;\n\n &:not(:last-child) {\n /* stylelint-disable-next-line primer/spacing */\n margin-right: 1px;\n\n &::after {\n position: absolute;\n top: var(--base-size-8);\n right: calc(-1 * var(--base-size-2));\n bottom: var(--base-size-8);\n width: 1px;\n content: '';\n /* stylelint-disable-next-line primer/colors */\n background-color: var(--borderColor-default);\n }\n\n /* stylelint-disable-next-line selector-pseudo-class-disallowed-list -- scoped to CSS Module, audited (github/github-ui#17224) */\n &:has(+ [data-selected])::after,\n &:where([data-selected])::after {\n background-color: transparent;\n }\n }\n\n &:first-child {\n /* stylelint-disable-next-line primer/spacing */\n margin-left: -1px;\n }\n\n &:last-child {\n /* stylelint-disable-next-line primer/spacing */\n margin-right: -1px;\n }\n\n .Counter {\n margin-inline-start: var(--base-size-8);\n display: flex;\n align-items: center;\n }\n}\n\n.Button {\n /* TODO: use primitive `primer.control.medium.paddingInline.normal` when it is available */\n --segmented-control-button-inner-padding: 12px;\n --segmented-control-button-bg-inset: 4px;\n --segmented-control-outer-radius: var(--borderRadius-medium);\n\n width: 100%;\n height: 100%;\n /* stylelint-disable-next-line primer/spacing */\n padding: var(--segmented-control-button-bg-inset);\n font-family: inherit;\n font-size: inherit;\n font-weight: var(--base-text-weight-normal);\n color: currentColor;\n cursor: pointer;\n background-color: transparent;\n border-color: transparent;\n border-width: 0;\n /* stylelint-disable-next-line primer/borders */\n border-radius: var(--segmented-control-outer-radius);\n\n & svg {\n fill: var(--fgColor-muted);\n color: var(--fgColor-muted);\n }\n\n /* fallback :focus state */\n &:focus:not(:disabled) {\n outline: var(--base-size-2) solid var(--fgColor-accent);\n outline-offset: -1px;\n box-shadow: none;\n\n /* remove fallback :focus if :focus-visible is supported */\n &:not(:focus-visible) {\n outline: solid 1px transparent;\n }\n }\n\n /* default focus state */\n &:focus-visible:not(:disabled) {\n outline: var(--base-size-2) solid var(--fgColor-accent);\n outline-offset: -1px;\n box-shadow: none;\n }\n\n /* stylelint-disable-next-line selector-max-specificity */\n &:focus:focus-visible:not(:last-child)::after {\n /* fixes an issue where the focus outline shows over the pseudo-element */\n width: 0;\n }\n\n &[aria-disabled='true']:not([aria-current='true']) {\n cursor: not-allowed;\n color: var(--fgColor-disabled);\n background-color: transparent;\n\n & svg {\n fill: var(--fgColor-disabled);\n color: var(--fgColor-disabled);\n }\n }\n\n @media (pointer: coarse) {\n &::before {\n position: absolute;\n top: 50%;\n right: 0;\n left: 0;\n min-height: 44px;\n content: '';\n transform: translateY(-50%);\n }\n }\n}\n\n.IconButton {\n width: var(--segmented-control-icon-width, 32px);\n}\n\n.Content {\n display: flex;\n height: 100%;\n /* stylelint-disable-next-line primer/spacing */\n padding-right: calc(var(--segmented-control-button-inner-padding) - var(--segmented-control-button-bg-inset));\n /* stylelint-disable-next-line primer/spacing */\n padding-left: calc(var(--segmented-control-button-inner-padding) - var(--segmented-control-button-bg-inset));\n border-color: transparent;\n border-style: solid;\n border-width: var(--borderWidth-thin);\n\n /*\n innerRadius = outerRadius - distance/2\n https://stackoverflow.com/questions/2932146/math-problem-determine-the-corner-radius-of-an-inner-border-based-on-outer-corn\n */\n /* stylelint-disable-next-line primer/borders */\n border-radius: calc(var(--segmented-control-outer-radius) - var(--segmented-control-button-bg-inset) / 2);\n align-items: center;\n justify-content: center;\n}\n\n.Button[aria-current='true'] {\n padding: 0;\n font-weight: var(--base-text-weight-semibold);\n\n .Content {\n /* stylelint-disable-next-line primer/spacing */\n padding-right: var(--segmented-control-button-inner-padding);\n /* stylelint-disable-next-line primer/spacing */\n padding-left: var(--segmented-control-button-inner-padding);\n background-color: var(--controlKnob-bgColor-rest);\n border-color: var(--controlKnob-borderColor-rest);\n /* stylelint-disable-next-line primer/borders */\n border-radius: var(--segmented-control-outer-radius);\n }\n}\n\n.Button:not([aria-current='true'], [aria-disabled='true']) {\n &:hover .Content {\n background-color: var(--controlTrack-bgColor-hover);\n }\n\n &:active .Content {\n background-color: var(--controlTrack-bgColor-active);\n }\n}\n\n.Text::after {\n display: block;\n height: 0;\n overflow: hidden;\n font-weight: var(--base-text-weight-semibold);\n pointer-events: none;\n visibility: hidden;\n content: attr(data-text);\n user-select: none;\n}\n\n.LeadingIcon {\n margin-right: var(--base-size-4);\n}\n"]}
1
+ {"version":3,"sources":["../src/SegmentedControl/SegmentedControl.module.css.js"],"names":[],"mappings":"AAAA,6CAEE,mCAAoC,CASpC,yDAAkD,CAClD,8FAAuF,CACvF,gDAAyC,CATzC,mBAAoB,CAMpB,8CAAuC,CAHvC,WAAY,CAEZ,QAAS,CADT,SA0HF,CAlHE,mEACE,YAAa,CACb,UAAW,CAEX,mCACF,CAEA,oEACE,mBAAoB,CACpB,UAAW,CAEX,mCACF,CAEA,wCACE,0EACE,YAAa,CACb,UAAW,CAEX,mCACF,CAEA,2EACE,mBAAoB,CACpB,UAAW,CAEX,mCACF,CACF,CAEA,yBACE,2EACE,YAAa,CACb,UAAW,CAEX,mCACF,CAEA,4EACE,mBAAoB,CACpB,UAAW,CAEX,mCACF,CACF,CAEA,2BACE,wEACE,YAAa,CACb,UAAW,CAEX,mCACF,CASA,qLACE,mBAAoB,CACpB,UAAW,CAEX,mCACF,CACF,CAQA,2KACE,YACF,CAEA,wCAKE,yLACE,YACF,CACF,CAEA,yBAKE,2LACE,YACF,CACF,CAEA,2BAKE,qLACE,YACF,CACF,CAEA,sEAGE,4CAAsC,CADtC,WAEF,CAGF,8CACE,YAwBF,CArBE,qEACE,aACF,CAEA,wCACE,4EACE,aACF,CACF,CAEA,yBACE,6EACE,aACF,CACF,CAEA,2BACE,0EACE,aACF,CACF,CAGF,iCAEE,aAAc,CAKd,WAAY,CADZ,kBAAmB,CAFnB,eAAgB,CAHhB,iBA6CF,CArCE,kDAEE,gBAkBF,CAhBE,wDAQE,mDAA4C,CAJ5C,+BAA0B,CAE1B,UAAW,CALX,iBAAkB,CAElB,yCAAoC,CADpC,4BAAuB,CAGvB,SAIF,CAGA,6JAEE,4BACF,CAGF,6CAEE,gBACF,CAEA,4CAEE,iBACF,CAEA,qEAGE,kBAAmB,CADnB,YAAa,CADb,4CAGF,CAGF,mCAEE,6CAA8C,CAC9C,uCAAwC,CACxC,oEAA4D,CAW5D,4BAA6B,CAC7B,wBAAyB,CAGzB,mDAAoD,CAFpD,cAAe,CAJf,kBAAmB,CACnB,cAAe,CAJf,mBAAoB,CACpB,iBAAkB,CAClB,8CAA2C,CAL3C,WAAY,CAEZ,gDAAiD,CAHjD,UAmEF,CApDE,uCACE,iCAA0B,CAC1B,kCACF,CAGA,wDAGE,eAAgB,CAFhB,sEAAuD,CACvD,mBAOF,CAHE,4EACE,6BACF,CAIF,gEAGE,eAAgB,CAFhB,sEAAuD,CACvD,mBAEF,CAGA,8EAEE,OACF,CAEA,gFAGE,4BAA6B,CAD7B,qCAA8B,CAD9B,kBAQF,CAJE,oFACE,oCAA6B,CAC7B,qCACF,CAGF,wBACE,0CAME,UAAW,CAFX,MAAO,CACP,eAAgB,CAJhB,iBAAkB,CAElB,OAAQ,CADR,OAAQ,CAKR,0BACF,CACF,CAGF,uCACE,8CACF,CAEA,oCAiBE,kBAAmB,CAVnB,wBAAyB,CASzB,sGAAyG,CARzG,kBAAmB,CACnB,6CAAqC,CARrC,YAAa,CACb,WAAY,CAgBZ,sBAAuB,CAZvB,2GAA4G,CAF5G,4GAeF,CAEA,sDAEE,gDAA6C,CAD7C,SAaF,CAVE,0FAKE,qDAAiD,CACjD,wDAAiD,CAEjD,mDAAoD,CAJpD,0DAA2D,CAF3D,2DAOF,CAIA,2HACE,0DACF,CAEA,4HACE,2DACF,CAGF,uCAOE,uBAAwB,CANxB,aAAc,CAGd,gDAA6C,CAF7C,QAAS,CACT,eAAgB,CAEhB,mBAAoB,CAGpB,wBAAiB,CAAjB,gBAAiB,CAFjB,iBAGF,CAEA,wCACE,sCACF","file":"SegmentedControl-de65527b.css","sourcesContent":[".SegmentedControl {\n /* TODO: use primitive `control.medium.size` when it is available instead of '32px' */\n --segmented-control-icon-width: 32px;\n\n display: inline-flex;\n\n /* TODO: use primitive `control.{small|medium}.size` when it is available */\n height: 32px;\n padding: 0;\n margin: 0;\n font-size: var(--text-body-size-medium);\n background-color: var(--controlTrack-bgColor-rest);\n border: var(--borderWidth-thin) solid var(--controlTrack-borderColor-rest, transparent);\n border-radius: var(--borderRadius-medium);\n\n /* Responsive full-width */\n &[data-full-width='true'] {\n display: flex;\n width: 100%;\n\n --segmented-control-icon-width: 100%;\n }\n\n &[data-full-width='false'] {\n display: inline-flex;\n width: auto;\n\n --segmented-control-icon-width: 32px;\n }\n\n @media (--viewportRange-narrow) {\n &[data-full-width-narrow='true'] {\n display: flex;\n width: 100%;\n\n --segmented-control-icon-width: 100%;\n }\n\n &[data-full-width-narrow='false'] {\n display: inline-flex;\n width: auto;\n\n --segmented-control-icon-width: 32px;\n }\n }\n\n @media (--viewportRange-regular) {\n &[data-full-width-regular='true'] {\n display: flex;\n width: 100%;\n\n --segmented-control-icon-width: 100%;\n }\n\n &[data-full-width-regular='false'] {\n display: inline-flex;\n width: auto;\n\n --segmented-control-icon-width: 32px;\n }\n }\n\n @media (--viewportRange-wide) {\n &[data-full-width-wide='true'] {\n display: flex;\n width: 100%;\n\n --segmented-control-icon-width: 100%;\n }\n\n &[data-full-width-wide='false'] {\n display: inline-flex;\n width: auto;\n\n --segmented-control-icon-width: 32px;\n }\n\n &[data-full-width-regular='true']:not([data-full-width-wide='true']) {\n display: inline-flex;\n width: auto;\n\n --segmented-control-icon-width: 32px;\n }\n }\n\n /* Hide when dropdown variant is active */\n &[data-variant='dropdown'] {\n display: none;\n }\n\n /* Handle hideLabels variant - hide button text */\n &[data-variant='hideLabels'] .Text {\n display: none;\n }\n\n @media (--viewportRange-narrow) {\n &[data-variant-narrow='dropdown'] {\n display: none;\n }\n\n &[data-variant-narrow='hideLabels'] .Text {\n display: none;\n }\n }\n\n @media (--viewportRange-regular) {\n &[data-variant-regular='dropdown'] {\n display: none;\n }\n\n &[data-variant-regular='hideLabels'] .Text {\n display: none;\n }\n }\n\n @media (--viewportRange-wide) {\n &[data-variant-wide='dropdown'] {\n display: none;\n }\n\n &[data-variant-wide='hideLabels'] .Text {\n display: none;\n }\n }\n\n &:where([data-size='small']) {\n /* TODO: use primitive `control.{small|medium}.size` when it is available */\n height: 28px;\n font-size: var(--text-body-size-small);\n }\n}\n\n.DropdownContainer {\n display: none;\n\n /* Show when dropdown variant is active */\n &[data-variant='dropdown'] {\n display: block;\n }\n\n @media (--viewportRange-narrow) {\n &[data-variant-narrow='dropdown'] {\n display: block;\n }\n }\n\n @media (--viewportRange-regular) {\n &[data-variant-regular='dropdown'] {\n display: block;\n }\n }\n\n @media (--viewportRange-wide) {\n &[data-variant-wide='dropdown'] {\n display: block;\n }\n }\n}\n\n.Item {\n position: relative;\n display: block;\n /* stylelint-disable-next-line primer/spacing */\n margin-top: -1px;\n /* stylelint-disable-next-line primer/spacing */\n margin-bottom: -1px;\n flex-grow: 1;\n\n &:not(:last-child) {\n /* stylelint-disable-next-line primer/spacing */\n margin-right: 1px;\n\n &::after {\n position: absolute;\n top: var(--base-size-8);\n right: calc(-1 * var(--base-size-2));\n bottom: var(--base-size-8);\n width: 1px;\n content: '';\n /* stylelint-disable-next-line primer/colors */\n background-color: var(--borderColor-default);\n }\n\n /* stylelint-disable-next-line selector-pseudo-class-disallowed-list -- scoped to CSS Module, audited (github/github-ui#17224) */\n &:has(+ [data-selected])::after,\n &:where([data-selected])::after {\n background-color: transparent;\n }\n }\n\n &:first-child {\n /* stylelint-disable-next-line primer/spacing */\n margin-left: -1px;\n }\n\n &:last-child {\n /* stylelint-disable-next-line primer/spacing */\n margin-right: -1px;\n }\n\n .Counter {\n margin-inline-start: var(--base-size-8);\n display: flex;\n align-items: center;\n }\n}\n\n.Button {\n /* TODO: use primitive `primer.control.medium.paddingInline.normal` when it is available */\n --segmented-control-button-inner-padding: 12px;\n --segmented-control-button-bg-inset: 4px;\n --segmented-control-outer-radius: var(--borderRadius-medium);\n\n width: 100%;\n height: 100%;\n /* stylelint-disable-next-line primer/spacing */\n padding: var(--segmented-control-button-bg-inset);\n font-family: inherit;\n font-size: inherit;\n font-weight: var(--base-text-weight-normal);\n color: currentColor;\n cursor: pointer;\n background-color: transparent;\n border-color: transparent;\n border-width: 0;\n /* stylelint-disable-next-line primer/borders */\n border-radius: var(--segmented-control-outer-radius);\n\n & svg {\n fill: var(--fgColor-muted);\n color: var(--fgColor-muted);\n }\n\n /* fallback :focus state */\n &:focus:not(:disabled) {\n outline: var(--base-size-2) solid var(--fgColor-accent);\n outline-offset: -1px;\n box-shadow: none;\n\n /* remove fallback :focus if :focus-visible is supported */\n &:not(:focus-visible) {\n outline: solid 1px transparent;\n }\n }\n\n /* default focus state */\n &:focus-visible:not(:disabled) {\n outline: var(--base-size-2) solid var(--fgColor-accent);\n outline-offset: -1px;\n box-shadow: none;\n }\n\n /* stylelint-disable-next-line selector-max-specificity */\n &:focus:focus-visible:not(:last-child)::after {\n /* fixes an issue where the focus outline shows over the pseudo-element */\n width: 0;\n }\n\n &[aria-disabled='true']:not([aria-pressed='true']) {\n cursor: not-allowed;\n color: var(--fgColor-disabled);\n background-color: transparent;\n\n & svg {\n fill: var(--fgColor-disabled);\n color: var(--fgColor-disabled);\n }\n }\n\n @media (pointer: coarse) {\n &::before {\n position: absolute;\n top: 50%;\n right: 0;\n left: 0;\n min-height: 44px;\n content: '';\n transform: translateY(-50%);\n }\n }\n}\n\n.IconButton {\n width: var(--segmented-control-icon-width, 32px);\n}\n\n.Content {\n display: flex;\n height: 100%;\n /* stylelint-disable-next-line primer/spacing */\n padding-right: calc(var(--segmented-control-button-inner-padding) - var(--segmented-control-button-bg-inset));\n /* stylelint-disable-next-line primer/spacing */\n padding-left: calc(var(--segmented-control-button-inner-padding) - var(--segmented-control-button-bg-inset));\n border-color: transparent;\n border-style: solid;\n border-width: var(--borderWidth-thin);\n\n /*\n innerRadius = outerRadius - distance/2\n https://stackoverflow.com/questions/2932146/math-problem-determine-the-corner-radius-of-an-inner-border-based-on-outer-corn\n */\n /* stylelint-disable-next-line primer/borders */\n border-radius: calc(var(--segmented-control-outer-radius) - var(--segmented-control-button-bg-inset) / 2);\n align-items: center;\n justify-content: center;\n}\n\n.Button[aria-pressed='true'] {\n padding: 0;\n font-weight: var(--base-text-weight-semibold);\n\n .Content {\n /* stylelint-disable-next-line primer/spacing */\n padding-right: var(--segmented-control-button-inner-padding);\n /* stylelint-disable-next-line primer/spacing */\n padding-left: var(--segmented-control-button-inner-padding);\n background-color: var(--controlKnob-bgColor-rest);\n border-color: var(--controlKnob-borderColor-rest);\n /* stylelint-disable-next-line primer/borders */\n border-radius: var(--segmented-control-outer-radius);\n }\n}\n\n.Button:not([aria-pressed='true'], [aria-disabled='true']) {\n &:hover .Content {\n background-color: var(--controlTrack-bgColor-hover);\n }\n\n &:active .Content {\n background-color: var(--controlTrack-bgColor-active);\n }\n}\n\n.Text::after {\n display: block;\n height: 0;\n overflow: hidden;\n font-weight: var(--base-text-weight-semibold);\n pointer-events: none;\n visibility: hidden;\n content: attr(data-text);\n user-select: none;\n}\n\n.LeadingIcon {\n margin-right: var(--base-size-4);\n}\n"]}
@@ -1,4 +1,4 @@
1
- import "./SegmentedControl-a004561f.css";
1
+ import "./SegmentedControl-de65527b.css";
2
2
  //#region src/SegmentedControl/SegmentedControl.module.css.js
3
3
  var SegmentedControl_module_css_default = {
4
4
  "SegmentedControl": "prc-SegmentedControl-SegmentedControl-lqIXp",
@@ -126,7 +126,7 @@ const SegmentedControlButton = (t0) => {
126
126
  let t11;
127
127
  if ($[27] !== rest || $[28] !== selected || $[29] !== t10 || $[30] !== t3 || $[31] !== t4) {
128
128
  t11 = /*#__PURE__*/ jsx("button", {
129
- "aria-current": selected,
129
+ "aria-pressed": selected,
130
130
  "aria-disabled": t3,
131
131
  className: t4,
132
132
  type: "button",
@@ -154,6 +154,7 @@ const SegmentedControlButton = (t0) => {
154
154
  } else t12 = $[35];
155
155
  return t12;
156
156
  };
157
+ SegmentedControlButton.displayName = "SegmentedControl.Button";
157
158
  SegmentedControlButton.__SLOT__ = Symbol("SegmentedControl.Button");
158
159
  //#endregion
159
160
  export { SegmentedControlButton as default };
@@ -87,7 +87,7 @@ const SegmentedControlIconButton = (t0) => {
87
87
  if ($[20] !== rest || $[21] !== selected || $[22] !== t10 || $[23] !== t5 || $[24] !== t6) {
88
88
  t11 = /*#__PURE__*/ jsx("button", {
89
89
  type: "button",
90
- "aria-current": selected,
90
+ "aria-pressed": selected,
91
91
  "aria-label": t5,
92
92
  "aria-disabled": t6,
93
93
  className: t7,
@@ -130,6 +130,7 @@ const SegmentedControlIconButton = (t0) => {
130
130
  } else t13 = $[34];
131
131
  return t13;
132
132
  };
133
+ SegmentedControlIconButton.displayName = "SegmentedControl.IconButton";
133
134
  SegmentedControlIconButton.__SLOT__ = Symbol("SegmentedControl.IconButton");
134
135
  //#endregion
135
136
  export { SegmentedControlIconButton, SegmentedControlIconButton as default };
@@ -105,6 +105,9 @@ declare function Panel({
105
105
  cssAnchorPositioningSettings,
106
106
  ...listProps
107
107
  }: SelectPanelProps): JSX.Element;
108
+ declare namespace Panel {
109
+ var displayName: string;
110
+ }
108
111
  declare const SecondaryButton: React.FC<ButtonProps>;
109
112
  declare const SecondaryLink: React.FC<LinkButtonProps & ButtonProps>;
110
113
  declare const SelectPanel: typeof Panel & {
@@ -2,13 +2,13 @@ import { useProvidedRefOrCreate } from "../hooks/useProvidedRefOrCreate.js";
2
2
  import { useProvidedStateOrCreate } from "../hooks/useProvidedStateOrCreate.js";
3
3
  import { isAlphabetKey } from "../hooks/useMnemonics.js";
4
4
  import { useId as useId$1 } from "../hooks/useId.js";
5
+ import { useFeatureFlag } from "../FeatureFlags/useFeatureFlag.js";
5
6
  import useSafeTimeout from "../hooks/useSafeTimeout.js";
6
7
  import { IconButton } from "../Button/IconButton.js";
7
8
  import { LinkButton } from "../Button/LinkButton.js";
8
9
  import { ButtonComponent } from "../Button/Button.js";
9
10
  import { useResponsiveValue } from "../hooks/useResponsiveValue.js";
10
11
  import Heading from "../Heading/Heading.js";
11
- import { useFeatureFlag } from "../FeatureFlags/useFeatureFlag.js";
12
12
  import { AnchoredOverlay } from "../AnchoredOverlay/AnchoredOverlay.js";
13
13
  import { Banner } from "../Banner/index.js";
14
14
  import { useFormControlContext } from "../FormControl/_FormControlContext.js";
@@ -639,6 +639,7 @@ const SecondaryLink = (props) => {
639
639
  });
640
640
  };
641
641
  SecondaryLink.displayName = "SecondaryLink";
642
+ Panel.displayName = "SelectPanel";
642
643
  const SelectPanel = Object.assign(Panel, {
643
644
  __SLOT__: Symbol("SelectPanel"),
644
645
  SecondaryActionButton: SecondaryButton,
@@ -79,5 +79,6 @@ const SelectPanelMessage = (t0) => {
79
79
  } else t6 = $[16];
80
80
  return t6;
81
81
  };
82
+ SelectPanelMessage.displayName = "SelectPanel.Message";
82
83
  //#endregion
83
84
  export { SelectPanelMessage };