@primer/react 0.0.0-20260915174622 → 0.0.0-20261105032740

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 (243) hide show
  1. package/CHANGELOG.md +124 -4
  2. package/dist/ActionBar/ActionBar.js +502 -169
  3. package/dist/ActionBar/index.d.ts +2 -2
  4. package/dist/ActionList/{ActionList-1ff5220c.css → ActionList-64885d7a.css} +2 -2
  5. package/dist/ActionList/ActionList-64885d7a.css.map +1 -0
  6. package/dist/ActionList/ActionList.module.css.js +1 -1
  7. package/dist/ActionList/Description.js +3 -3
  8. package/dist/ActionList/Divider.js +1 -1
  9. package/dist/ActionList/Group.js +16 -17
  10. package/dist/ActionList/GroupHeadingTrailingAction.js +1 -10
  11. package/dist/ActionList/Heading.js +1 -1
  12. package/dist/ActionList/Item.js +123 -122
  13. package/dist/ActionList/LinkItem.js +4 -4
  14. package/dist/ActionList/List.js +2 -2
  15. package/dist/ActionList/Selection.js +6 -6
  16. package/dist/ActionList/TrailingAction.js +3 -3
  17. package/dist/ActionList/Visuals.js +9 -9
  18. package/dist/ActionList/index.d.ts +5 -18
  19. package/dist/ActionList/shared.d.ts +1 -1
  20. package/dist/ActionMenu/ActionMenu.js +20 -19
  21. package/dist/AnchoredOverlay/AnchoredOverlay.js +4 -4
  22. package/dist/Autocomplete/Autocomplete.js +3 -3
  23. package/dist/Autocomplete/AutocompleteInput.js +1 -1
  24. package/dist/Autocomplete/AutocompleteMenu.js +111 -106
  25. package/dist/Autocomplete/AutocompleteOverlay.js +2 -2
  26. package/dist/Avatar/Avatar.js +1 -1
  27. package/dist/AvatarStack/{AvatarStack-e6a99916.css → AvatarStack-937ec7c1.css} +2 -2
  28. package/dist/AvatarStack/{AvatarStack-e6a99916.css.map → AvatarStack-937ec7c1.css.map} +1 -1
  29. package/dist/AvatarStack/AvatarStack.js +3 -3
  30. package/dist/AvatarStack/AvatarStack.module.css.js +1 -1
  31. package/dist/Banner/Banner.js +24 -26
  32. package/dist/BaseStyles.js +1 -1
  33. package/dist/Blankslate/Blankslate.js +10 -11
  34. package/dist/BranchName/BranchName.d.ts +1 -1
  35. package/dist/BranchName/BranchName.js +1 -1
  36. package/dist/Breadcrumbs/{Breadcrumbs-16d81430.css → Breadcrumbs-13089350.css} +2 -2
  37. package/dist/Breadcrumbs/Breadcrumbs-13089350.css.map +1 -0
  38. package/dist/Breadcrumbs/Breadcrumbs.d.ts +2 -2
  39. package/dist/Breadcrumbs/Breadcrumbs.js +365 -407
  40. package/dist/Breadcrumbs/Breadcrumbs.module.css.js +1 -1
  41. package/dist/Button/Button.js +1 -1
  42. package/dist/Button/ButtonBase-c8dab214.css +2 -0
  43. package/dist/Button/ButtonBase-c8dab214.css.map +1 -0
  44. package/dist/Button/ButtonBase.js +14 -10
  45. package/dist/Button/ButtonBase.module.css.js +1 -1
  46. package/dist/Button/IconButton.js +6 -7
  47. package/dist/Button/LinkButton.js +1 -1
  48. package/dist/Button/types.d.ts +2 -2
  49. package/dist/ButtonGroup/ButtonGroup.js +2 -3
  50. package/dist/Card/Card.js +17 -18
  51. package/dist/Card/index.d.ts +1 -1
  52. package/dist/Checkbox/Checkbox.js +145 -41
  53. package/dist/CheckboxGroup/CheckboxGroup.js +2 -2
  54. package/dist/CircleBadge/CircleBadge.js +2 -2
  55. package/dist/ConfirmationDialog/ConfirmationDialog.js +1 -5
  56. package/dist/CounterLabel/CounterLabel.js +80 -18
  57. package/dist/DataTable/DataTable.d.ts +76 -22
  58. package/dist/DataTable/DataTable.js +239 -73
  59. package/dist/DataTable/ErrorDialog.js +1 -1
  60. package/dist/DataTable/Pagination.js +23 -23
  61. package/dist/DataTable/Table-7f0e985b.css +2 -0
  62. package/dist/DataTable/Table-7f0e985b.css.map +1 -0
  63. package/dist/DataTable/Table.d.ts +77 -1
  64. package/dist/DataTable/Table.js +269 -55
  65. package/dist/DataTable/Table.module.css.js +8 -5
  66. package/dist/DataTable/TableBulkActions-aca5618a.css +2 -0
  67. package/dist/DataTable/TableBulkActions-aca5618a.css.map +1 -0
  68. package/dist/DataTable/TableBulkActions.d.ts +15 -0
  69. package/dist/DataTable/TableBulkActions.js +217 -0
  70. package/dist/DataTable/TableBulkActions.module.css.js +12 -0
  71. package/dist/DataTable/TableGroup.d.ts +25 -1
  72. package/dist/DataTable/TableGroup.js +197 -117
  73. package/dist/DataTable/index.d.ts +8 -4
  74. package/dist/DataTable/index.js +6 -2
  75. package/dist/DataTable/row.d.ts +26 -2
  76. package/dist/DataTable/useTable.js +354 -90
  77. package/dist/DataTable/utils.d.ts +4 -2
  78. package/dist/Details/Details.js +4 -6
  79. package/dist/Dialog/Dialog.js +20 -23
  80. package/dist/FeatureFlags/DefaultFeatureFlags.js +3 -1
  81. package/dist/FeatureFlags/FeatureFlagScope.js +1 -0
  82. package/dist/FeatureFlags/FeatureFlags.js +1 -1
  83. package/dist/FilteredActionList/FilteredActionList.js +27 -22
  84. package/dist/FilteredActionList/FilteredActionListInput.d.ts +5 -1
  85. package/dist/FilteredActionList/FilteredActionListInput.js +61 -40
  86. package/dist/FilteredActionList/FilteredActionListLoaders.js +10 -11
  87. package/dist/FilteredActionList/constants.js +2 -0
  88. package/dist/FilteredActionList/useAnnouncements.js +160 -71
  89. package/dist/Flash/Flash.js +1 -4
  90. package/dist/FormControl/FormControl.js +58 -83
  91. package/dist/FormControl/FormControlCaption.js +1 -1
  92. package/dist/FormControl/FormControlLabel.js +2 -3
  93. package/dist/FormControl/FormControlLeadingVisual.js +1 -1
  94. package/dist/FormControl/_FormControlContext.js +1 -2
  95. package/dist/FormControl/_FormControlContextProvider.js +5 -0
  96. package/dist/FormControl/_FormControlValidation.js +1 -1
  97. package/dist/Header/Header.js +3 -3
  98. package/dist/Heading/Heading.js +1 -1
  99. package/dist/Hidden/Hidden.js +1 -1
  100. package/dist/InlineMessage/InlineMessage.js +12 -13
  101. package/dist/KeybindingHint/KeybindingHint.js +3 -3
  102. package/dist/KeybindingHint/components/Chord.js +3 -3
  103. package/dist/KeybindingHint/components/Key.js +3 -3
  104. package/dist/KeybindingHint/components/Sequence.js +1 -1
  105. package/dist/KeybindingHint/platform.js +0 -8
  106. package/dist/Label/Label.js +1 -1
  107. package/dist/LabelGroup/LabelGroup.js +18 -18
  108. package/dist/Link/Link.d.ts +1 -1
  109. package/dist/Link/Link.js +1 -1
  110. package/dist/NavList/NavList.d.ts +1 -1
  111. package/dist/NavList/NavList.js +27 -28
  112. package/dist/Octicon/Octicon.js +1 -4
  113. package/dist/Overlay/Overlay.d.ts +2 -0
  114. package/dist/Overlay/Overlay.js +300 -63
  115. package/dist/PageHeader/PageHeader.js +21 -21
  116. package/dist/PageLayout/DragHandle.js +1 -1
  117. package/dist/PageLayout/PageLayout.js +26 -26
  118. package/dist/PageLayout/usePaneWidth.js +2 -7
  119. package/dist/Pagehead/Pagehead.js +1 -1
  120. package/dist/Pagination/Pagination.js +9 -10
  121. package/dist/Popover/Popover.js +6 -8
  122. package/dist/ProgressBar/ProgressBar.js +4 -5
  123. package/dist/Radio/Radio.js +1 -1
  124. package/dist/RadioGroup/RadioGroup.js +2 -2
  125. package/dist/RelativeTime/RelativeTime.js +1 -1
  126. package/dist/ScrollableRegion/ScrollableRegion.js +1 -1
  127. package/dist/SegmentedControl/SegmentedControl-99b8e34e.css +2 -0
  128. package/dist/SegmentedControl/SegmentedControl-99b8e34e.css.map +1 -0
  129. package/dist/SegmentedControl/SegmentedControl.js +13 -13
  130. package/dist/SegmentedControl/SegmentedControl.module.css.js +1 -1
  131. package/dist/SegmentedControl/SegmentedControlAction.js +6 -6
  132. package/dist/SegmentedControl/SegmentedControlButton.js +9 -10
  133. package/dist/SegmentedControl/SegmentedControlDivider.js +1 -1
  134. package/dist/SegmentedControl/SegmentedControlIconButton.js +5 -5
  135. package/dist/Select/Select.js +11 -11
  136. package/dist/SelectPanel/SelectPanel.d.ts +1 -1
  137. package/dist/SelectPanel/SelectPanel.js +117 -68
  138. package/dist/SelectPanel/SelectPanelMessage.js +5 -5
  139. package/dist/SideNav.js +2 -2
  140. package/dist/Skeleton/SkeletonBox.js +1 -1
  141. package/dist/SkeletonAvatar/SkeletonAvatar.js +1 -1
  142. package/dist/SkeletonText/SkeletonText.js +3 -3
  143. package/dist/Spinner/Spinner.js +6 -7
  144. package/dist/SplitPageLayout/SplitPageLayout.js +6 -6
  145. package/dist/Stack/Stack.js +2 -2
  146. package/dist/StateLabel/StateLabel.js +2 -2
  147. package/dist/SubNav/SubNav.js +5 -5
  148. package/dist/TabNav/TabNav.js +4 -10
  149. package/dist/Text/Text.d.ts +1 -1
  150. package/dist/Text/Text.js +1 -1
  151. package/dist/TextInput/TextInput.js +246 -91
  152. package/dist/TextInputWithTokens/TextInputWithTokens.js +12 -15
  153. package/dist/Textarea/Textarea.d.ts +2 -2
  154. package/dist/Textarea/Textarea.js +7 -7
  155. package/dist/ThemeProvider.js +1 -2
  156. package/dist/Timeline/Timeline.js +11 -14
  157. package/dist/ToggleSwitch/ToggleSwitch.js +20 -21
  158. package/dist/Token/IssueLabelToken.js +3 -3
  159. package/dist/Token/Token.js +7 -7
  160. package/dist/Token/TokenBase.js +1 -1
  161. package/dist/Token/_RemoveTokenButton.js +115 -21
  162. package/dist/Token/_TokenTextContainer.js +1 -1
  163. package/dist/Tooltip/Tooltip.js +98 -20
  164. package/dist/TooltipV2/Tooltip.js +304 -137
  165. package/dist/TopicTag/TopicTag.js +2 -3
  166. package/dist/TopicTag/TopicTagGroup.js +1 -1
  167. package/dist/TreeView/TreeView.js +52 -59
  168. package/dist/TreeView/useRovingTabIndex.js +1 -0
  169. package/dist/TreeView/useTypeahead.js +4 -3
  170. package/dist/Truncate/Truncate.d.ts +9 -4
  171. package/dist/Truncate/Truncate.js +92 -16
  172. package/dist/Truncate/index.d.ts +2 -2
  173. package/dist/UnderlineNav/UnderlineNav.js +18 -18
  174. package/dist/UnderlineNav/UnderlineNavItem.js +53 -47
  175. package/dist/VisuallyHidden/VisuallyHidden.js +1 -1
  176. package/dist/_VisuallyHidden.js +1 -1
  177. package/dist/deprecated/ActionList/Divider.js +1 -1
  178. package/dist/deprecated/ActionList/Group.js +2 -5
  179. package/dist/deprecated/ActionList/Header.js +2 -5
  180. package/dist/deprecated/ActionList/Item.js +18 -21
  181. package/dist/deprecated/ActionList/List.js +5 -14
  182. package/dist/deprecated/ActionMenu.js +4 -6
  183. package/dist/deprecated/DialogV1/Dialog.js +5 -5
  184. package/dist/deprecated/FilteredSearch/FilteredSearch.js +1 -1
  185. package/dist/deprecated/UnderlineNav/UnderlineNav.js +4 -4
  186. package/dist/experimental/IssueLabel/IssueLabel.js +4 -4
  187. package/dist/experimental/SelectPanel2/SelectPanel.d.ts +1 -1
  188. package/dist/experimental/SelectPanel2/SelectPanel.js +42 -49
  189. package/dist/experimental/Tabs/Tabs.js +1 -1
  190. package/dist/experimental/UnderlinePanels/UnderlinePanels.js +417 -124
  191. package/dist/experimental/index.d.ts +5 -4
  192. package/dist/experimental/index.js +1 -1
  193. package/dist/hooks/useControllableState.js +70 -19
  194. package/dist/hooks/useMergedRefs.js +0 -12
  195. package/dist/hooks/useOnOutsideClick.js +48 -21
  196. package/dist/hooks/useOpenAndCloseFocus.d.ts +3 -1
  197. package/dist/hooks/useOpenAndCloseFocus.js +28 -16
  198. package/dist/hooks/useOverlay.d.ts +3 -1
  199. package/dist/hooks/useOverlay.js +24 -22
  200. package/dist/hooks/useResponsiveValue.js +0 -5
  201. package/dist/hooks/useSafeTimeout.js +54 -19
  202. package/dist/hooks/useSlots.js +0 -48
  203. package/dist/index.d.ts +3 -3
  204. package/dist/index.js +3 -3
  205. package/dist/internal/components/ButtonReset.js +1 -1
  206. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.js +9 -9
  207. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupCaption.js +1 -1
  208. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupLabel.js +4 -4
  209. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupValidation.js +1 -1
  210. package/dist/internal/components/ConditionalWrapper.js +2 -2
  211. package/dist/internal/components/InputLabel.js +4 -5
  212. package/dist/internal/components/InputValidation.js +4 -4
  213. package/dist/internal/components/OverflowObserverProvider.js +1 -1
  214. package/dist/internal/components/TextInputInnerAction.js +7 -8
  215. package/dist/internal/components/TextInputInnerVisualSlot.js +5 -5
  216. package/dist/internal/components/TextInputWrapper.d.ts +3 -0
  217. package/dist/internal/components/TextInputWrapper.js +2 -2
  218. package/dist/internal/components/ThemeProviderBase.js +3 -3
  219. package/dist/internal/components/UnderlineTabbedInterface.js +11 -11
  220. package/dist/internal/components/UnstyledTextInput.js +1 -1
  221. package/dist/internal/components/ValidationAnimationContainer.js +2 -2
  222. package/dist/internal/hooks/useDevOnlyEffect.js +3 -8
  223. package/dist/internal/hooks/useOverflowObserver.js +1 -2
  224. package/dist/internal/hooks/useThemeProvider.js +3 -3
  225. package/dist/live-region/Announce.js +1 -1
  226. package/dist/live-region/AriaAlert.js +1 -1
  227. package/dist/live-region/AriaStatus.js +1 -1
  228. package/dist/next/ThemeProvider.js +1 -1
  229. package/dist/utils/descendant-registry.d.ts +1 -1
  230. package/dist/utils/descendant-registry.js +94 -82
  231. package/dist/utils/modern-polymorphic.d.ts +2 -1
  232. package/dist/utils/modern-polymorphic.js +0 -10
  233. package/generated/components.json +290 -28
  234. package/generated/hooks.json +13 -1
  235. package/package.json +16 -17
  236. package/dist/ActionList/ActionList-1ff5220c.css.map +0 -1
  237. package/dist/Breadcrumbs/Breadcrumbs-16d81430.css.map +0 -1
  238. package/dist/Button/ButtonBase-b44e29d1.css +0 -2
  239. package/dist/Button/ButtonBase-b44e29d1.css.map +0 -1
  240. package/dist/DataTable/Table-50e68700.css +0 -2
  241. package/dist/DataTable/Table-50e68700.css.map +0 -1
  242. package/dist/SegmentedControl/SegmentedControl-e68d4197.css +0 -2
  243. package/dist/SegmentedControl/SegmentedControl-e68d4197.css.map +0 -1
@@ -1,3 +1,4 @@
1
+ import { c } from "../utils/react-compiler-runtime.js";
1
2
  import { useMergedRefs } from "../hooks/useMergedRefs.js";
2
3
  import { IconButton } from "../Button/IconButton.js";
3
4
  import { ButtonComponent } from "../Button/Button.js";
@@ -8,237 +9,569 @@ import { useIsClipped } from "../internal/hooks/useOverflowObserver.js";
8
9
  import { OverflowObserverProvider } from "../internal/components/OverflowObserverProvider.js";
9
10
  import { createDescendantRegistry } from "../utils/descendant-registry.js";
10
11
  import ActionBar_module_css_default from "./ActionBar.module.css.js";
11
- import React, { forwardRef, useCallback, useContext, useMemo, useRef, useState } from "react";
12
+ import React, { forwardRef, useContext, useRef, useState } from "react";
12
13
  import { jsx, jsxs } from "react/jsx-runtime";
13
14
  import { clsx } from "clsx";
15
+ import { isValidElementType } from "react-is";
14
16
  import { KebabHorizontalIcon } from "@primer/octicons-react";
15
17
  //#region src/ActionBar/ActionBar.tsx
18
+ const renderIcon = (icon) => isValidElementType(icon) && typeof icon !== "string" ? /*#__PURE__*/ React.createElement(icon) : icon;
16
19
  const ActionBarContext = /*#__PURE__*/ React.createContext({ size: "medium" });
17
20
  const ActionBarItemsRegistry = createDescendantRegistry();
18
21
  const FOCUSABLE_ITEM_SELECTOR = ":is(button, a, input, [tabindex]):not(:disabled):not([data-overflowing]):not([data-more-button-inactive])";
19
22
  const renderMenuItem = (item, index) => {
20
- if (item.type === "divider") return /*#__PURE__*/ jsx(ActionList.Divider, {}, index);
23
+ if (item.type === "divider") return /* @__PURE__ */ jsx(ActionList.Divider, {}, index);
21
24
  const { label, onClick, disabled, trailingVisual: TrailingIcon, leadingVisual: LeadingIcon, items, variant } = item;
22
- if (items && items.length > 0) return /*#__PURE__*/ jsxs(ActionMenu, { children: [/*#__PURE__*/ jsx(ActionMenu.Anchor, { children: /*#__PURE__*/ jsxs(ActionList.Item, {
25
+ if (items && items.length > 0) return /* @__PURE__ */ jsxs(ActionMenu, { children: [/* @__PURE__ */ jsx(ActionMenu.Anchor, { children: /* @__PURE__ */ jsxs(ActionList.Item, {
23
26
  disabled,
24
27
  variant,
25
28
  children: [
26
- LeadingIcon ? /*#__PURE__*/ jsx(ActionList.LeadingVisual, { children: /*#__PURE__*/ jsx(LeadingIcon, {}) }) : null,
29
+ LeadingIcon !== void 0 && LeadingIcon !== null ? /* @__PURE__ */ jsx(ActionList.LeadingVisual, { children: renderIcon(LeadingIcon) }) : null,
27
30
  label,
28
- TrailingIcon ? /*#__PURE__*/ jsx(ActionList.TrailingVisual, { children: typeof TrailingIcon === "string" ? /*#__PURE__*/ jsx("span", { children: TrailingIcon }) : /*#__PURE__*/ jsx(TrailingIcon, {}) }) : null
31
+ TrailingIcon !== void 0 && TrailingIcon !== null ? /* @__PURE__ */ jsx(ActionList.TrailingVisual, { children: typeof TrailingIcon === "string" ? /* @__PURE__ */ jsx("span", { children: TrailingIcon }) : renderIcon(TrailingIcon) }) : null
29
32
  ]
30
- }) }), /*#__PURE__*/ jsx(ActionMenu.Overlay, { children: /*#__PURE__*/ jsx(ActionList, { children: items.map((subItem, subIndex) => renderMenuItem(subItem, subIndex)) }) })] }, label);
31
- return /*#__PURE__*/ jsxs(ActionList.Item, {
33
+ }) }), /* @__PURE__ */ jsx(ActionMenu.Overlay, { children: /* @__PURE__ */ jsx(ActionList, { children: items.map((subItem, subIndex) => renderMenuItem(subItem, subIndex)) }) })] }, label);
34
+ return /* @__PURE__ */ jsxs(ActionList.Item, {
32
35
  onSelect: onClick,
33
36
  disabled,
34
37
  variant,
35
38
  children: [
36
- LeadingIcon ? /*#__PURE__*/ jsx(ActionList.LeadingVisual, { children: /*#__PURE__*/ jsx(LeadingIcon, {}) }) : null,
39
+ LeadingIcon !== void 0 && LeadingIcon !== null ? /* @__PURE__ */ jsx(ActionList.LeadingVisual, { children: renderIcon(LeadingIcon) }) : null,
37
40
  label,
38
- TrailingIcon ? /*#__PURE__*/ jsx(ActionList.TrailingVisual, { children: typeof TrailingIcon === "string" ? /*#__PURE__*/ jsx("span", { children: TrailingIcon }) : /*#__PURE__*/ jsx(TrailingIcon, {}) }) : null
41
+ TrailingIcon !== void 0 && TrailingIcon !== null ? /* @__PURE__ */ jsx(ActionList.TrailingVisual, { children: typeof TrailingIcon === "string" ? /* @__PURE__ */ jsx("span", { children: TrailingIcon }) : renderIcon(TrailingIcon) }) : null
39
42
  ]
40
43
  }, label);
41
44
  };
42
- renderMenuItem.displayName = "renderMenuItem";
43
- const ActionBar = ({ size = "medium", children, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, flush = false, className, gap = "condensed" }) => {
45
+ const ActionBar = (t0) => {
46
+ const $ = c(42);
47
+ const { size: t1, children, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, flush: t2, className, gap: t3 } = t0;
48
+ const size = t1 === void 0 ? "medium" : t1;
49
+ const flush = t2 === void 0 ? false : t2;
50
+ const gap = t3 === void 0 ? "condensed" : t3;
44
51
  const [childRegistry, setChildRegistry] = ActionBarItemsRegistry.useRegistryState();
45
- const overflowItems = useMemo(() => childRegistry && Array.from(childRegistry.entries()).filter((entry) => entry[1] !== null), [childRegistry]);
46
- const { containerRef } = useFocusZone({
47
- bindKeys: FocusKeys.ArrowHorizontal | FocusKeys.HomeAndEnd,
48
- focusOutBehavior: "wrap",
49
- focusableElementFilter: (element) => element.matches(FOCUSABLE_ITEM_SELECTOR)
50
- }, [overflowItems]);
51
- return /*#__PURE__*/ jsx(ActionBarContext.Provider, {
52
- value: { size },
53
- children: /*#__PURE__*/ jsx("div", {
54
- className: clsx(className, ActionBar_module_css_default.Nav),
52
+ let t4;
53
+ if ($[0] !== childRegistry) {
54
+ t4 = childRegistry && Array.from(childRegistry.entries()).filter(_temp);
55
+ $[0] = childRegistry;
56
+ $[1] = t4;
57
+ } else t4 = $[1];
58
+ const overflowItems = t4;
59
+ let t5;
60
+ if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
61
+ t5 = {
62
+ bindKeys: FocusKeys.ArrowHorizontal | FocusKeys.HomeAndEnd,
63
+ focusOutBehavior: "wrap",
64
+ focusableElementFilter: _temp2
65
+ };
66
+ $[2] = t5;
67
+ } else t5 = $[2];
68
+ let t6;
69
+ if ($[3] !== overflowItems) {
70
+ t6 = [overflowItems];
71
+ $[3] = overflowItems;
72
+ $[4] = t6;
73
+ } else t6 = $[4];
74
+ const { containerRef } = useFocusZone(t5, t6);
75
+ let t7;
76
+ if ($[5] !== size) {
77
+ t7 = { size };
78
+ $[5] = size;
79
+ $[6] = t7;
80
+ } else t7 = $[6];
81
+ let t8;
82
+ if ($[7] !== className) {
83
+ t8 = clsx(className, ActionBar_module_css_default.Nav);
84
+ $[7] = className;
85
+ $[8] = t8;
86
+ } else t8 = $[8];
87
+ const t9 = containerRef;
88
+ const t10 = overflowItems ? overflowItems.length > 0 : void 0;
89
+ let t11;
90
+ if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
91
+ t11 = /* @__PURE__ */ jsx("div", { className: ActionBar_module_css_default.OverflowSpacer });
92
+ $[9] = t11;
93
+ } else t11 = $[9];
94
+ let t12;
95
+ if ($[10] !== children || $[11] !== setChildRegistry) {
96
+ t12 = /* @__PURE__ */ jsx(ActionBarItemsRegistry.Provider, {
97
+ setRegistry: setChildRegistry,
98
+ children
99
+ });
100
+ $[10] = children;
101
+ $[11] = setChildRegistry;
102
+ $[12] = t12;
103
+ } else t12 = $[12];
104
+ let t13;
105
+ if ($[13] !== containerRef || $[14] !== t12) {
106
+ t13 = /* @__PURE__ */ jsxs("div", {
107
+ className: ActionBar_module_css_default.OverflowContainer,
108
+ children: [t11, /* @__PURE__ */ jsx(OverflowObserverProvider, {
109
+ rootRef: containerRef,
110
+ children: t12
111
+ })]
112
+ });
113
+ $[13] = containerRef;
114
+ $[14] = t12;
115
+ $[15] = t13;
116
+ } else t13 = $[15];
117
+ const t14 = overflowItems !== null && overflowItems !== void 0 && overflowItems.length ? void 0 : true;
118
+ let t15;
119
+ if ($[16] !== size || $[17] !== t14) {
120
+ t15 = /* @__PURE__ */ jsx(ActionMenu.Anchor, { children: /* @__PURE__ */ jsx(IconButton, {
121
+ variant: "invisible",
122
+ "aria-label": "More items",
123
+ icon: KebabHorizontalIcon,
124
+ className: ActionBar_module_css_default.MoreButton,
125
+ "data-more-button-inactive": t14,
126
+ size
127
+ }) });
128
+ $[16] = size;
129
+ $[17] = t14;
130
+ $[18] = t15;
131
+ } else t15 = $[18];
132
+ let t16;
133
+ if ($[19] !== overflowItems) {
134
+ t16 = overflowItems === null || overflowItems === void 0 ? void 0 : overflowItems.map(_temp4);
135
+ $[19] = overflowItems;
136
+ $[20] = t16;
137
+ } else t16 = $[20];
138
+ let t17;
139
+ if ($[21] !== t16) {
140
+ t17 = /* @__PURE__ */ jsx(ActionMenu.Overlay, { children: /* @__PURE__ */ jsx(ActionList, { children: t16 }) });
141
+ $[21] = t16;
142
+ $[22] = t17;
143
+ } else t17 = $[22];
144
+ let t18;
145
+ if ($[23] !== t15 || $[24] !== t17) {
146
+ t18 = /* @__PURE__ */ jsxs(ActionMenu, { children: [t15, t17] });
147
+ $[23] = t15;
148
+ $[24] = t17;
149
+ $[25] = t18;
150
+ } else t18 = $[25];
151
+ let t19;
152
+ if ($[26] !== ariaLabel || $[27] !== ariaLabelledBy || $[28] !== gap || $[29] !== size || $[30] !== t10 || $[31] !== t13 || $[32] !== t18 || $[33] !== t9) {
153
+ t19 = /* @__PURE__ */ jsxs("div", {
154
+ ref: t9,
155
+ role: "toolbar",
156
+ className: ActionBar_module_css_default.List,
157
+ "aria-label": ariaLabel,
158
+ "aria-labelledby": ariaLabelledBy,
159
+ "data-gap": gap,
160
+ "data-size": size,
161
+ "data-has-overflow": t10,
162
+ children: [t13, t18]
163
+ });
164
+ $[26] = ariaLabel;
165
+ $[27] = ariaLabelledBy;
166
+ $[28] = gap;
167
+ $[29] = size;
168
+ $[30] = t10;
169
+ $[31] = t13;
170
+ $[32] = t18;
171
+ $[33] = t9;
172
+ $[34] = t19;
173
+ } else t19 = $[34];
174
+ let t20;
175
+ if ($[35] !== flush || $[36] !== t19 || $[37] !== t8) {
176
+ t20 = /* @__PURE__ */ jsx("div", {
177
+ className: t8,
55
178
  "data-component": "ActionBar",
56
179
  "data-flush": flush,
57
- children: /*#__PURE__*/ jsxs("div", {
58
- ref: containerRef,
59
- role: "toolbar",
60
- className: ActionBar_module_css_default.List,
61
- "aria-label": ariaLabel,
62
- "aria-labelledby": ariaLabelledBy,
63
- "data-gap": gap,
64
- "data-size": size,
65
- "data-has-overflow": overflowItems ? overflowItems.length > 0 : void 0,
66
- children: [/*#__PURE__*/ jsxs("div", {
67
- className: ActionBar_module_css_default.OverflowContainer,
68
- children: [/*#__PURE__*/ jsx("div", { className: ActionBar_module_css_default.OverflowSpacer }), /*#__PURE__*/ jsx(OverflowObserverProvider, {
69
- rootRef: containerRef,
70
- children: /*#__PURE__*/ jsx(ActionBarItemsRegistry.Provider, {
71
- setRegistry: setChildRegistry,
72
- children
73
- })
74
- })]
75
- }), /*#__PURE__*/ jsxs(ActionMenu, { children: [/*#__PURE__*/ jsx(ActionMenu.Anchor, { children: /*#__PURE__*/ jsx(IconButton, {
76
- variant: "invisible",
77
- "aria-label": "More items",
78
- icon: KebabHorizontalIcon,
79
- className: ActionBar_module_css_default.MoreButton,
80
- "data-more-button-inactive": overflowItems !== null && overflowItems !== void 0 && overflowItems.length ? void 0 : true,
81
- size
82
- }) }), /*#__PURE__*/ jsx(ActionMenu.Overlay, { children: /*#__PURE__*/ jsx(ActionList, { children: overflowItems === null || overflowItems === void 0 ? void 0 : overflowItems.map(([id, menuItem]) => {
83
- if (menuItem.type === "divider") return /*#__PURE__*/ jsx(ActionList.Divider, {}, id);
84
- if (menuItem.type === "action") {
85
- const { onClick, icon: Icon, label, disabled } = menuItem;
86
- return /*#__PURE__*/ jsxs(ActionList.Item, {
87
- onSelect: (event) => {
88
- typeof onClick === "function" && onClick(event);
89
- },
90
- disabled,
91
- children: [Icon ? /*#__PURE__*/ jsx(ActionList.LeadingVisual, { children: /*#__PURE__*/ jsx(Icon, {}) }) : null, label]
92
- }, id);
93
- }
94
- if (menuItem.type === "menu") {
95
- const menuItems = menuItem.items;
96
- const { icon: Icon, label, returnFocusRef } = menuItem;
97
- return /*#__PURE__*/ jsxs(ActionMenu, { children: [/*#__PURE__*/ jsx(ActionMenu.Anchor, { children: /*#__PURE__*/ jsxs(ActionList.Item, { children: [Icon !== "none" ? /*#__PURE__*/ jsx(ActionList.LeadingVisual, { children: /*#__PURE__*/ jsx(Icon, {}) }) : null, label] }) }), /*#__PURE__*/ jsx(ActionMenu.Overlay, {
98
- ...returnFocusRef && { returnFocusRef },
99
- children: /*#__PURE__*/ jsx(ActionList, { children: menuItems.map((item, index) => renderMenuItem(item, index)) })
100
- })] }, id);
101
- }
102
- }) }) })] })]
103
- })
104
- })
105
- });
180
+ children: t19
181
+ });
182
+ $[35] = flush;
183
+ $[36] = t19;
184
+ $[37] = t8;
185
+ $[38] = t20;
186
+ } else t20 = $[38];
187
+ let t21;
188
+ if ($[39] !== t20 || $[40] !== t7) {
189
+ t21 = /* @__PURE__ */ jsx(ActionBarContext.Provider, {
190
+ value: t7,
191
+ children: t20
192
+ });
193
+ $[39] = t20;
194
+ $[40] = t7;
195
+ $[41] = t21;
196
+ } else t21 = $[41];
197
+ return t21;
106
198
  };
107
- ActionBar.displayName = "ActionBar";
108
199
  function useActionBarItem(ref, registryProps) {
109
200
  var _useContext;
201
+ const $ = c(5);
110
202
  const isGroupOverflowing = (_useContext = useContext(ActionBarGroupContext)) === null || _useContext === void 0 ? void 0 : _useContext.isOverflowing;
111
- const isItemOverflowing = useIsClipped(ref, { disabled: isGroupOverflowing !== void 0 });
203
+ const isInGroup = isGroupOverflowing !== void 0;
204
+ let t0;
205
+ if ($[0] !== isInGroup) {
206
+ t0 = { disabled: isInGroup };
207
+ $[0] = isInGroup;
208
+ $[1] = t0;
209
+ } else t0 = $[1];
210
+ const isItemOverflowing = useIsClipped(ref, t0);
112
211
  const isOverflowing = isGroupOverflowing || isItemOverflowing;
113
212
  ActionBarItemsRegistry.useRegisterDescendant(isOverflowing ? registryProps : null);
114
- return {
115
- isOverflowing,
116
- dataOverflowingAttr: isOverflowing ? "" : void 0
117
- };
213
+ const t1 = isOverflowing ? "" : void 0;
214
+ let t2;
215
+ if ($[2] !== isOverflowing || $[3] !== t1) {
216
+ t2 = {
217
+ isOverflowing,
218
+ dataOverflowingAttr: t1
219
+ };
220
+ $[2] = isOverflowing;
221
+ $[3] = t1;
222
+ $[4] = t2;
223
+ } else t2 = $[4];
224
+ return t2;
118
225
  }
119
- const ActionBarIconButton = /*#__PURE__*/ forwardRef(({ disabled, onClick, ...props }, forwardedRef) => {
226
+ const ActionBarIconButton = /*#__PURE__*/ forwardRef((t0, forwardedRef) => {
227
+ const $ = c(19);
228
+ let disabled;
229
+ let onClick;
230
+ let props;
231
+ if ($[0] !== t0) {
232
+ ({disabled, onClick, ...props} = t0);
233
+ $[0] = t0;
234
+ $[1] = disabled;
235
+ $[2] = onClick;
236
+ $[3] = props;
237
+ } else {
238
+ disabled = $[1];
239
+ onClick = $[2];
240
+ props = $[3];
241
+ }
120
242
  const ref = useRef(null);
121
243
  const mergedRef = useMergedRefs(forwardedRef, ref);
122
244
  const { size } = React.useContext(ActionBarContext);
123
- const { ["aria-label"]: ariaLabel, icon } = props;
124
- const { dataOverflowingAttr } = useActionBarItem(ref, useMemo(() => ({
125
- type: "action",
126
- label: ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : "",
127
- icon,
128
- disabled: !!disabled,
129
- onClick
130
- }), [
131
- ariaLabel,
132
- icon,
133
- disabled,
134
- onClick
135
- ]));
136
- const clickHandler = useCallback((event) => {
137
- if (disabled) return;
138
- onClick === null || onClick === void 0 || onClick(event);
139
- }, [disabled, onClick]);
140
- return /*#__PURE__*/ jsx(IconButton, {
141
- "aria-disabled": disabled,
142
- ref: mergedRef,
143
- size,
144
- onClick: clickHandler,
145
- ...props,
146
- variant: "invisible",
147
- "data-overflowing": dataOverflowingAttr
148
- });
245
+ const { "aria-label": ariaLabel, icon } = props;
246
+ const t1 = ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : "";
247
+ const t2 = !!disabled;
248
+ const t3 = onClick;
249
+ let t4;
250
+ if ($[4] !== icon || $[5] !== t1 || $[6] !== t2 || $[7] !== t3) {
251
+ t4 = {
252
+ type: "action",
253
+ label: t1,
254
+ icon,
255
+ disabled: t2,
256
+ onClick: t3
257
+ };
258
+ $[4] = icon;
259
+ $[5] = t1;
260
+ $[6] = t2;
261
+ $[7] = t3;
262
+ $[8] = t4;
263
+ } else t4 = $[8];
264
+ const { dataOverflowingAttr } = useActionBarItem(ref, t4);
265
+ let t5;
266
+ if ($[9] !== disabled || $[10] !== onClick) {
267
+ t5 = (event) => {
268
+ var _onClick;
269
+ if (disabled) return;
270
+ (_onClick = onClick) === null || _onClick === void 0 || _onClick(event);
271
+ };
272
+ $[9] = disabled;
273
+ $[10] = onClick;
274
+ $[11] = t5;
275
+ } else t5 = $[11];
276
+ const clickHandler = t5;
277
+ let t6;
278
+ if ($[12] !== clickHandler || $[13] !== dataOverflowingAttr || $[14] !== disabled || $[15] !== mergedRef || $[16] !== props || $[17] !== size) {
279
+ t6 = /* @__PURE__ */ jsx(IconButton, {
280
+ "aria-disabled": disabled,
281
+ ref: mergedRef,
282
+ size,
283
+ onClick: clickHandler,
284
+ ...props,
285
+ variant: "invisible",
286
+ "data-overflowing": dataOverflowingAttr
287
+ });
288
+ $[12] = clickHandler;
289
+ $[13] = dataOverflowingAttr;
290
+ $[14] = disabled;
291
+ $[15] = mergedRef;
292
+ $[16] = props;
293
+ $[17] = size;
294
+ $[18] = t6;
295
+ } else t6 = $[18];
296
+ return t6;
149
297
  });
150
- const ActionBarButton = /*#__PURE__*/ forwardRef(({ disabled, onClick, ...props }, forwardedRef) => {
298
+ const ActionBarButton = /*#__PURE__*/ forwardRef((t0, forwardedRef) => {
299
+ const $ = c(19);
300
+ let disabled;
301
+ let onClick;
302
+ let props;
303
+ if ($[0] !== t0) {
304
+ ({disabled, onClick, ...props} = t0);
305
+ $[0] = t0;
306
+ $[1] = disabled;
307
+ $[2] = onClick;
308
+ $[3] = props;
309
+ } else {
310
+ disabled = $[1];
311
+ onClick = $[2];
312
+ props = $[3];
313
+ }
151
314
  const ref = useRef(null);
152
315
  const mergedRef = useMergedRefs(forwardedRef, ref);
153
316
  const { size } = React.useContext(ActionBarContext);
154
317
  const { children, leadingVisual } = props;
155
- const { dataOverflowingAttr } = useActionBarItem(ref, useMemo(() => ({
156
- type: "action",
157
- label: children,
158
- icon: typeof leadingVisual === "function" ? leadingVisual : void 0,
159
- disabled: !!disabled,
160
- onClick
161
- }), [
162
- children,
163
- leadingVisual,
164
- disabled,
165
- onClick
166
- ]));
167
- const clickHandler = useCallback((event) => {
168
- if (disabled) return;
169
- onClick === null || onClick === void 0 || onClick(event);
170
- }, [disabled, onClick]);
171
- return /*#__PURE__*/ jsx(ButtonComponent, {
172
- "aria-disabled": disabled,
173
- ref: mergedRef,
174
- size,
175
- onClick: clickHandler,
176
- ...props,
177
- variant: "invisible",
178
- "data-overflowing": dataOverflowingAttr
179
- });
318
+ const t1 = typeof leadingVisual === "function" ? leadingVisual : void 0;
319
+ const t2 = !!disabled;
320
+ const t3 = onClick;
321
+ let t4;
322
+ if ($[4] !== children || $[5] !== t1 || $[6] !== t2 || $[7] !== t3) {
323
+ t4 = {
324
+ type: "action",
325
+ label: children,
326
+ icon: t1,
327
+ disabled: t2,
328
+ onClick: t3
329
+ };
330
+ $[4] = children;
331
+ $[5] = t1;
332
+ $[6] = t2;
333
+ $[7] = t3;
334
+ $[8] = t4;
335
+ } else t4 = $[8];
336
+ const { dataOverflowingAttr } = useActionBarItem(ref, t4);
337
+ let t5;
338
+ if ($[9] !== disabled || $[10] !== onClick) {
339
+ t5 = (event) => {
340
+ var _onClick2;
341
+ if (disabled) return;
342
+ (_onClick2 = onClick) === null || _onClick2 === void 0 || _onClick2(event);
343
+ };
344
+ $[9] = disabled;
345
+ $[10] = onClick;
346
+ $[11] = t5;
347
+ } else t5 = $[11];
348
+ const clickHandler = t5;
349
+ let t6;
350
+ if ($[12] !== clickHandler || $[13] !== dataOverflowingAttr || $[14] !== disabled || $[15] !== mergedRef || $[16] !== props || $[17] !== size) {
351
+ t6 = /* @__PURE__ */ jsx(ButtonComponent, {
352
+ "aria-disabled": disabled,
353
+ ref: mergedRef,
354
+ size,
355
+ onClick: clickHandler,
356
+ ...props,
357
+ variant: "invisible",
358
+ "data-overflowing": dataOverflowingAttr
359
+ });
360
+ $[12] = clickHandler;
361
+ $[13] = dataOverflowingAttr;
362
+ $[14] = disabled;
363
+ $[15] = mergedRef;
364
+ $[16] = props;
365
+ $[17] = size;
366
+ $[18] = t6;
367
+ } else t6 = $[18];
368
+ return t6;
180
369
  });
181
370
  const ActionBarGroupContext = /*#__PURE__*/ React.createContext(null);
182
- const ActionBarGroup = /*#__PURE__*/ forwardRef(({ children }, forwardedRef) => {
371
+ const ActionBarGroup = /*#__PURE__*/ forwardRef((t0, forwardedRef) => {
372
+ const $ = c(10);
373
+ const { children } = t0;
183
374
  const backupRef = useRef(null);
184
375
  const ref = forwardedRef !== null && forwardedRef !== void 0 ? forwardedRef : backupRef;
185
- const { dataOverflowingAttr, isOverflowing } = useActionBarItem(ref, useMemo(() => ({ type: "group" }), []));
186
- return /*#__PURE__*/ jsx(ActionBarGroupContext.Provider, {
187
- value: { isOverflowing },
188
- children: /*#__PURE__*/ jsx("div", {
376
+ let t1;
377
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
378
+ t1 = { type: "group" };
379
+ $[0] = t1;
380
+ } else t1 = $[0];
381
+ const { dataOverflowingAttr, isOverflowing } = useActionBarItem(ref, t1);
382
+ let t2;
383
+ if ($[1] !== isOverflowing) {
384
+ t2 = { isOverflowing };
385
+ $[1] = isOverflowing;
386
+ $[2] = t2;
387
+ } else t2 = $[2];
388
+ let t3;
389
+ if ($[3] !== children || $[4] !== dataOverflowingAttr || $[5] !== ref) {
390
+ t3 = /* @__PURE__ */ jsx("div", {
189
391
  className: ActionBar_module_css_default.Group,
190
392
  "data-component": "ActionBar.Group",
191
393
  ref,
192
394
  "data-overflowing": dataOverflowingAttr,
193
395
  children
194
- })
195
- });
396
+ });
397
+ $[3] = children;
398
+ $[4] = dataOverflowingAttr;
399
+ $[5] = ref;
400
+ $[6] = t3;
401
+ } else t3 = $[6];
402
+ let t4;
403
+ if ($[7] !== t2 || $[8] !== t3) {
404
+ t4 = /* @__PURE__ */ jsx(ActionBarGroupContext.Provider, {
405
+ value: t2,
406
+ children: t3
407
+ });
408
+ $[7] = t2;
409
+ $[8] = t3;
410
+ $[9] = t4;
411
+ } else t4 = $[9];
412
+ return t4;
196
413
  });
197
- const ActionBarMenu = /*#__PURE__*/ forwardRef(({ "aria-label": ariaLabel, icon, overflowIcon, items, returnFocusRef, ...props }, forwardedRef) => {
414
+ const ActionBarMenu = /*#__PURE__*/ forwardRef((t0, forwardedRef) => {
415
+ const $ = c(31);
416
+ let ariaLabel;
417
+ let icon;
418
+ let items;
419
+ let overflowIcon;
420
+ let props;
421
+ let returnFocusRef;
422
+ if ($[0] !== t0) {
423
+ ({"aria-label": ariaLabel, icon, overflowIcon, items, returnFocusRef, ...props} = t0);
424
+ $[0] = t0;
425
+ $[1] = ariaLabel;
426
+ $[2] = icon;
427
+ $[3] = items;
428
+ $[4] = overflowIcon;
429
+ $[5] = props;
430
+ $[6] = returnFocusRef;
431
+ } else {
432
+ ariaLabel = $[1];
433
+ icon = $[2];
434
+ items = $[3];
435
+ overflowIcon = $[4];
436
+ props = $[5];
437
+ returnFocusRef = $[6];
438
+ }
198
439
  const backupRef = useRef(null);
199
440
  const ref = forwardedRef !== null && forwardedRef !== void 0 ? forwardedRef : backupRef;
200
441
  const [menuOpen, setMenuOpen] = useState(false);
201
- const { dataOverflowingAttr } = useActionBarItem(ref, useMemo(() => ({
202
- type: "menu",
203
- label: ariaLabel,
204
- icon: overflowIcon ? overflowIcon : icon,
205
- returnFocusRef,
206
- items
207
- }), [
208
- ariaLabel,
209
- overflowIcon,
210
- icon,
211
- items,
212
- returnFocusRef
213
- ]));
214
- return /*#__PURE__*/ jsxs(ActionMenu, {
215
- anchorRef: ref,
216
- open: menuOpen,
217
- onOpenChange: setMenuOpen,
218
- children: [/*#__PURE__*/ jsx(ActionMenu.Anchor, { children: /*#__PURE__*/ jsx(IconButton, {
442
+ const t1 = overflowIcon !== void 0 ? overflowIcon : icon;
443
+ let t2;
444
+ if ($[7] !== ariaLabel || $[8] !== items || $[9] !== returnFocusRef || $[10] !== t1) {
445
+ t2 = {
446
+ type: "menu",
447
+ label: ariaLabel,
448
+ icon: t1,
449
+ returnFocusRef,
450
+ items
451
+ };
452
+ $[7] = ariaLabel;
453
+ $[8] = items;
454
+ $[9] = returnFocusRef;
455
+ $[10] = t1;
456
+ $[11] = t2;
457
+ } else t2 = $[11];
458
+ const { dataOverflowingAttr } = useActionBarItem(ref, t2);
459
+ let t3;
460
+ if ($[12] !== ariaLabel || $[13] !== dataOverflowingAttr || $[14] !== icon || $[15] !== props) {
461
+ t3 = /* @__PURE__ */ jsx(ActionMenu.Anchor, { children: /* @__PURE__ */ jsx(IconButton, {
219
462
  variant: "invisible",
220
463
  "aria-label": ariaLabel,
221
464
  icon,
222
465
  ...props,
223
466
  "data-overflowing": dataOverflowingAttr,
224
467
  "data-component": "ActionBar.Menu.IconButton"
225
- }) }), /*#__PURE__*/ jsx(ActionMenu.Overlay, {
226
- ...returnFocusRef && { returnFocusRef },
227
- children: /*#__PURE__*/ jsx(ActionList, { children: items.map((item, index) => renderMenuItem(item, index)) })
228
- })]
229
- });
468
+ }) });
469
+ $[12] = ariaLabel;
470
+ $[13] = dataOverflowingAttr;
471
+ $[14] = icon;
472
+ $[15] = props;
473
+ $[16] = t3;
474
+ } else t3 = $[16];
475
+ let t4;
476
+ if ($[17] !== returnFocusRef) {
477
+ t4 = returnFocusRef && { returnFocusRef };
478
+ $[17] = returnFocusRef;
479
+ $[18] = t4;
480
+ } else t4 = $[18];
481
+ let t5;
482
+ if ($[19] !== items) {
483
+ t5 = items.map(_temp5);
484
+ $[19] = items;
485
+ $[20] = t5;
486
+ } else t5 = $[20];
487
+ let t6;
488
+ if ($[21] !== t5) {
489
+ t6 = /* @__PURE__ */ jsx(ActionList, { children: t5 });
490
+ $[21] = t5;
491
+ $[22] = t6;
492
+ } else t6 = $[22];
493
+ let t7;
494
+ if ($[23] !== t4 || $[24] !== t6) {
495
+ t7 = /* @__PURE__ */ jsx(ActionMenu.Overlay, {
496
+ ...t4,
497
+ children: t6
498
+ });
499
+ $[23] = t4;
500
+ $[24] = t6;
501
+ $[25] = t7;
502
+ } else t7 = $[25];
503
+ let t8;
504
+ if ($[26] !== menuOpen || $[27] !== ref || $[28] !== t3 || $[29] !== t7) {
505
+ t8 = /* @__PURE__ */ jsxs(ActionMenu, {
506
+ anchorRef: ref,
507
+ open: menuOpen,
508
+ onOpenChange: setMenuOpen,
509
+ children: [t3, t7]
510
+ });
511
+ $[26] = menuOpen;
512
+ $[27] = ref;
513
+ $[28] = t3;
514
+ $[29] = t7;
515
+ $[30] = t8;
516
+ } else t8 = $[30];
517
+ return t8;
230
518
  });
231
519
  const VerticalDivider = () => {
520
+ const $ = c(3);
232
521
  const ref = useRef(null);
233
- const { dataOverflowingAttr } = useActionBarItem(ref, useMemo(() => ({ type: "divider" }), []));
234
- return /*#__PURE__*/ jsx("div", {
235
- ref,
236
- "data-component": "ActionBar.VerticalDivider",
237
- "aria-hidden": "true",
238
- className: ActionBar_module_css_default.Divider,
239
- "data-overflowing": dataOverflowingAttr
240
- });
522
+ let t0;
523
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
524
+ t0 = { type: "divider" };
525
+ $[0] = t0;
526
+ } else t0 = $[0];
527
+ const { dataOverflowingAttr } = useActionBarItem(ref, t0);
528
+ let t1;
529
+ if ($[1] !== dataOverflowingAttr) {
530
+ t1 = /* @__PURE__ */ jsx("div", {
531
+ ref,
532
+ "data-component": "ActionBar.VerticalDivider",
533
+ "aria-hidden": "true",
534
+ className: ActionBar_module_css_default.Divider,
535
+ "data-overflowing": dataOverflowingAttr
536
+ });
537
+ $[1] = dataOverflowingAttr;
538
+ $[2] = t1;
539
+ } else t1 = $[2];
540
+ return t1;
241
541
  };
242
- VerticalDivider.displayName = "VerticalDivider";
542
+ function _temp(entry) {
543
+ return entry[1] !== null;
544
+ }
545
+ function _temp2(element) {
546
+ return element.matches(FOCUSABLE_ITEM_SELECTOR);
547
+ }
548
+ function _temp3(item, index) {
549
+ return renderMenuItem(item, index);
550
+ }
551
+ function _temp4(t0) {
552
+ const [id, menuItem] = t0;
553
+ if (menuItem.type === "divider") return /* @__PURE__ */ jsx(ActionList.Divider, {}, id);
554
+ if (menuItem.type === "action") {
555
+ const { onClick, icon: Icon, label, disabled } = menuItem;
556
+ return /* @__PURE__ */ jsxs(ActionList.Item, {
557
+ onSelect: (event) => {
558
+ typeof onClick === "function" && onClick(event);
559
+ },
560
+ disabled,
561
+ children: [Icon !== void 0 && Icon !== null ? /* @__PURE__ */ jsx(ActionList.LeadingVisual, { children: renderIcon(Icon) }) : null, label]
562
+ }, id);
563
+ }
564
+ if (menuItem.type === "menu") {
565
+ const menuItems = menuItem.items;
566
+ const { icon: Icon_0, label: label_0, returnFocusRef } = menuItem;
567
+ return /* @__PURE__ */ jsxs(ActionMenu, { children: [/* @__PURE__ */ jsx(ActionMenu.Anchor, { children: /* @__PURE__ */ jsxs(ActionList.Item, { children: [Icon_0 !== "none" ? /* @__PURE__ */ jsx(ActionList.LeadingVisual, { children: renderIcon(Icon_0) }) : null, label_0] }) }), /* @__PURE__ */ jsx(ActionMenu.Overlay, {
568
+ ...returnFocusRef && { returnFocusRef },
569
+ children: /* @__PURE__ */ jsx(ActionList, { children: menuItems.map(_temp3) })
570
+ })] }, id);
571
+ }
572
+ }
573
+ function _temp5(item, index) {
574
+ return renderMenuItem(item, index);
575
+ }
243
576
  //#endregion
244
577
  export { ActionBar, ActionBarButton, ActionBarGroup, ActionBarIconButton, ActionBarMenu, VerticalDivider };