@primer/react 0.0.0-20260311183958 → 0.0.0-20260311184347

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @primer/react
2
2
 
3
- ## 0.0.0-20260311183958
3
+ ## 0.0.0-20260311184347
4
4
 
5
5
  ### Patch Changes
6
6
 
@@ -8,6 +8,8 @@
8
8
 
9
9
  - [#7625](https://github.com/primer/react/pull/7625) [`2e8c707`](https://github.com/primer/react/commit/2e8c70702d5096551049c29c8e79749bf63a919f) Thanks [@liuliu-dev](https://github.com/liuliu-dev)! - Banner: stack inline actions vertically on narrow viewports.
10
10
 
11
+ - [#7654](https://github.com/primer/react/pull/7654) [`274a76d`](https://github.com/primer/react/commit/274a76d385456178ea2a95d98cd1fa2b30ff137a) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - SelectPanel: use `100dvh` and `env(safe-area-inset-bottom)` in fullscreen-on-narrow mode to prevent content from being obscured by iOS Safari's browser chrome.
12
+
11
13
  ## 38.15.0
12
14
 
13
15
  ### Minor Changes
@@ -0,0 +1,2 @@
1
+ .prc-ActionBar-List-9uz46{align-items:center;display:flex;gap:var(--actionbar-gap,var(--stack-gap-condensed,.5rem));list-style:none;margin-bottom:-1px;min-width:0;position:relative;white-space:nowrap}.prc-ActionBar-List-9uz46:where([data-gap=none]){--actionbar-gap:0}.prc-ActionBar-List-9uz46:where([data-gap=none]) .prc-ActionBar-Divider-6V8yH{padding:0 var(--base-size-8,.5rem)}.prc-ActionBar-List-9uz46:where([data-gap=condensed]){--actionbar-gap:var(--stack-gap-condensed,0.5rem)}.prc-ActionBar-Nav-9spON{align-items:center;display:flex;justify-content:flex-end;padding-inline:var(--base-size-16,1rem)}.prc-ActionBar-Nav-9spON:where([data-flush=true]){padding-inline:0}.prc-ActionBar-Divider-6V8yH:before{background:var(--borderColor-muted,var(--color-border-muted));content:"";display:block;height:var(--base-size-20,1.25rem);width:var(--borderWidth-thin,.0625rem)}.prc-ActionBar-Group-peNCk{display:flex;gap:inherit}
2
+ /*# sourceMappingURL=ActionBar-a41224b2.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ActionBar/ActionBar.module.css.js"],"names":[],"mappings":"AAAA,0BAUE,kBAAmB,CARnB,YAAa,CASb,yDAAqD,CAFrD,eAAgB,CAFhB,kBAAmB,CAJnB,WAAY,CAFZ,iBAAkB,CAOlB,kBAiBF,CAXE,iDACE,iBAKF,CAHE,8EACE,kCACF,CAGF,sDACE,iDACF,CAGF,yBAIE,kBAAmB,CAHnB,YAAa,CAEb,wBAAyB,CADzB,uCAOF,CAHE,kDACE,gBACF,CAIA,oCAME,6DAAoC,CAFpC,UAAW,CAHX,aAAc,CAEd,kCAA2B,CAD3B,sCAKF,CAGF,2BACE,YAAa,CACb,WACF","file":"ActionBar-a41224b2.css","sourcesContent":[".List {\n position: relative;\n display: flex;\n min-width: 0;\n\n /* wonder why this is here */\n /* stylelint-disable-next-line primer/spacing */\n margin-bottom: -1px;\n white-space: nowrap;\n list-style: none;\n align-items: center;\n gap: var(--actionbar-gap, var(--stack-gap-condensed));\n\n /* Gap scale (mirrors Stack) */\n &:where([data-gap='none']) {\n --actionbar-gap: 0;\n\n .Divider {\n padding: 0 var(--base-size-8);\n }\n }\n\n &:where([data-gap='condensed']) {\n --actionbar-gap: var(--stack-gap-condensed);\n }\n}\n\n.Nav {\n display: flex;\n padding-inline: var(--base-size-16);\n justify-content: flex-end;\n align-items: center;\n\n &:where([data-flush='true']) {\n padding-inline: 0;\n }\n}\n\n.Divider {\n &::before {\n display: block;\n width: var(--borderWidth-thin);\n height: var(--base-size-20);\n content: '';\n /* stylelint-disable-next-line primer/colors */\n background: var(--borderColor-muted);\n }\n}\n\n.Group {\n display: flex;\n gap: inherit;\n}\n"]}
@@ -120,6 +120,6 @@ export declare const ActionBarMenu: React.ForwardRefExoticComponent<{
120
120
  keyshortcuts?: string;
121
121
  keybindingHint?: string;
122
122
  } & Omit<import("..").ButtonBaseProps, "aria-label" | "aria-labelledby"> & React.RefAttributes<unknown>>;
123
- export declare const VerticalDivider: () => React.JSX.Element;
123
+ export declare const VerticalDivider: () => React.JSX.Element | null;
124
124
  export {};
125
125
  //# sourceMappingURL=ActionBar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ActionBar.d.ts","sourceRoot":"","sources":["../../src/ActionBar/ActionBar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAiF,MAAM,OAAO,CAAA;AAErG,OAAO,EAAa,KAAK,mBAAmB,EAAC,MAAM,eAAe,CAAA;AAElE,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,WAAW,CAAA;AAsC9C,KAAK,IAAI,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;AAExC,KAAK,SAAS,GACV;IACE,wDAAwD;IACxD,YAAY,EAAE,KAAK,CAAC,cAAc,CAAC,YAAY,CAAC,CAAA;IAChD,iBAAiB,CAAC,EAAE,SAAS,CAAA;CAC9B,GACD;IACE,YAAY,CAAC,EAAE,SAAS,CAAA;IACxB;;OAEG;IACH,iBAAiB,EAAE,KAAK,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAA;CAC3D,CAAA;AAEL,KAAK,QAAQ,GAAG,MAAM,GAAG,WAAW,CAAA;AAEpC,MAAM,MAAM,cAAc,GAAG;IAC3B;;;SAGK;IACL,IAAI,CAAC,EAAE,IAAI,CAAA;IAEX,gCAAgC;IAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IAEzB;;;SAGK;IACL,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf,uBAAuB;IACvB,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;OAGG;IACH,GAAG,CAAC,EAAE,QAAQ,CAAA;CACf,GAAG,SAAS,CAAA;AAEb,MAAM,MAAM,wBAAwB,GAAG;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAC,GAAG,eAAe,CAAA;AAE7E,MAAM,MAAM,sBAAsB,GAC9B,CAAC;IACC;;;OAGG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,aAAa,CAAC,EAAE,wBAAwB,CAAC,MAAM,CAAC,CAAA;IAChD;;OAEG;IACH,cAAc,CAAC,EAAE,wBAAwB,CAAC,MAAM,CAAC,GAAG,MAAM,CAAA;IAC1D;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,OAAO,CAAC,EAAE,mBAAmB,CAAC,UAAU,CAAC,CAAA;IACzC;;;OAGG;IACH,KAAK,CAAC,EAAE,sBAAsB,EAAE,CAAA;CACjC,GAAG,IAAI,CAAC,mBAAmB,EAAE,SAAS,CAAC,CAAC,GACzC;IACE,IAAI,EAAE,SAAS,CAAA;CAChB,CAAA;AAEL,MAAM,MAAM,kBAAkB,GAAG;IAC/B,2CAA2C;IAC3C,YAAY,EAAE,MAAM,CAAA;IACpB,+BAA+B;IAC/B,IAAI,EAAE,wBAAwB,CAAC,MAAM,CAAC,CAAA;IACtC,KAAK,EAAE,sBAAsB,EAAE,CAAA;IAC/B;;;OAGG;IACH,YAAY,CAAC,EAAE,wBAAwB,CAAC,MAAM,CAAC,GAAG,MAAM,CAAA;IACxD;;OAEG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAA;CAC9C,GAAG,eAAe,CAAA;AAqDnB,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAyJvE,CAAA;AA2BD,eAAO,MAAM,mBAAmB,0FA8C/B,CAAA;AAMD,eAAO,MAAM,cAAc;;iCAezB,CAAA;AAEF,eAAO,MAAM,aAAa;IA5TxB,2CAA2C;kBAC7B,MAAM;IACpB,+BAA+B;UACzB,wBAAwB,CAAC,MAAM,CAAC;WAC/B,sBAAsB,EAAE;IAC/B;;;OAGG;mBACY,wBAAwB,CAAC,MAAM,CAAC,GAAG,MAAM;IACxD;;OAEG;qBACc,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC;;;;;;;;;;;wGAyV9C,CAAA;AAED,eAAO,MAAM,eAAe,yBAgB3B,CAAA"}
1
+ {"version":3,"file":"ActionBar.d.ts","sourceRoot":"","sources":["../../src/ActionBar/ActionBar.tsx"],"names":[],"mappings":"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"}
@@ -1,19 +1,29 @@
1
1
  import { c } from 'react-compiler-runtime';
2
- import React, { useRef, forwardRef, useState, useMemo, useCallback, useSyncExternalStore } from 'react';
2
+ import React, { useRef, useState, forwardRef, useMemo, useCallback } from 'react';
3
3
  import { KebabHorizontalIcon } from '@primer/octicons-react';
4
4
  import { ActionList } from '../ActionList/index.js';
5
+ import useIsomorphicLayoutEffect from '../utils/useIsomorphicLayoutEffect.js';
6
+ import { useResizeObserver } from '../hooks/useResizeObserver.js';
5
7
  import { IconButton } from '../Button/IconButton.js';
6
8
  import { useFocusZone } from '../hooks/useFocusZone.js';
7
9
  import styles from './ActionBar.module.css.js';
8
10
  import { clsx } from 'clsx';
9
11
  import { createDescendantRegistry } from '../utils/descendant-registry.js';
10
- import { jsx, jsxs } from 'react/jsx-runtime';
12
+ import { jsxs, jsx } from 'react/jsx-runtime';
11
13
  import { useRefObjectAsForwardedRef } from '../hooks/useRefObjectAsForwardedRef.js';
12
14
  import { FocusKeys } from '@primer/behaviors';
13
15
  import { ActionMenu } from '../ActionMenu/ActionMenu.js';
14
16
 
17
+ const ACTIONBAR_ITEM_GAP = 8;
18
+
19
+ /**
20
+ * Registry of descendants to render in the list or menu. To preserve insertion order across updates, children are
21
+ * set to `null` when unregistered rather than fully dropped from the map.
22
+ */
23
+
15
24
  const ActionBarContext = /*#__PURE__*/React.createContext({
16
25
  size: 'medium',
26
+ isVisibleChild: () => true,
17
27
  groupId: undefined
18
28
  });
19
29
 
@@ -21,7 +31,23 @@ const ActionBarContext = /*#__PURE__*/React.createContext({
21
31
  small (28px), medium (32px), large (40px)
22
32
  */
23
33
 
34
+ const MORE_BTN_WIDTH = 32;
24
35
  const ActionBarItemsRegistry = createDescendantRegistry();
36
+ const calculatePossibleItems = (registryEntries, navWidth, gap, moreMenuWidth = 0) => {
37
+ const widthToFit = navWidth - moreMenuWidth;
38
+ let breakpoint = registryEntries.length; // assume all items will fit
39
+ let sumsOfChildWidth = 0;
40
+ for (const [index, [, child]] of registryEntries.entries()) {
41
+ sumsOfChildWidth += index > 0 ? child.width + gap : child.width;
42
+ if (sumsOfChildWidth > widthToFit) {
43
+ breakpoint = index;
44
+ break;
45
+ } else {
46
+ continue;
47
+ }
48
+ }
49
+ return breakpoint;
50
+ };
25
51
  const renderMenuItem = (item, index) => {
26
52
  if (item.type === 'divider') {
27
53
  return /*#__PURE__*/jsx(ActionList.Divider, {}, index);
@@ -70,8 +96,44 @@ const renderMenuItem = (item, index) => {
70
96
  }, label);
71
97
  };
72
98
  renderMenuItem.displayName = "renderMenuItem";
99
+ const getMenuItems = (navWidth, moreMenuWidth, childRegistry, hasActiveMenu, gap) => {
100
+ var _childRegistry$entrie;
101
+ const registryEntries = Array.from((_childRegistry$entrie = childRegistry === null || childRegistry === void 0 ? void 0 : childRegistry.entries()) !== null && _childRegistry$entrie !== void 0 ? _childRegistry$entrie : []).filter(entry => entry[1] !== null && (entry[1].type !== 'action' || entry[1].groupId === undefined));
102
+ if (registryEntries.length === 0) return new Set();
103
+ const numberOfItemsPossible = calculatePossibleItems(registryEntries, navWidth, gap);
104
+ const numberOfItemsPossibleWithMoreMenu = calculatePossibleItems(registryEntries, navWidth, gap, moreMenuWidth || MORE_BTN_WIDTH);
105
+ const menuItems = new Set();
106
+
107
+ // First, we check if we can fit all the items with their icons
108
+ if (registryEntries.length >= numberOfItemsPossible) {
109
+ /* Below is an accessibility requirement. Never show only one item in the overflow menu.
110
+ * If there is only one item left to display in the overflow menu according to the calculation,
111
+ * we need to pull another item from the list into the overflow menu.
112
+ */
113
+ const numberOfItemsInMenu = registryEntries.length - numberOfItemsPossibleWithMoreMenu;
114
+ const numberOfListItems = numberOfItemsInMenu === 1 ? numberOfItemsPossibleWithMoreMenu - 1 : numberOfItemsPossibleWithMoreMenu;
115
+ for (const [index, [id, child]] of registryEntries.entries()) {
116
+ if (index < numberOfListItems) {
117
+ continue;
118
+ //if the last item is a divider
119
+ } else if (child.type === 'divider') {
120
+ if (index === numberOfListItems - 1 || index === numberOfListItems) {
121
+ continue;
122
+ } else {
123
+ menuItems.add(id);
124
+ }
125
+ } else {
126
+ menuItems.add(id);
127
+ }
128
+ }
129
+ return menuItems;
130
+ } else if (numberOfItemsPossible > registryEntries.length && hasActiveMenu) {
131
+ /* If the items fit in the list and there are items in the overflow menu, we need to move them back to the list */
132
+ return new Set();
133
+ }
134
+ };
73
135
  const ActionBar = props => {
74
- const $ = c(68);
136
+ const $ = c(38);
75
137
  const {
76
138
  size: t0,
77
139
  children,
@@ -85,348 +147,275 @@ const ActionBar = props => {
85
147
  const flush = t1 === undefined ? false : t1;
86
148
  const gap = t2 === undefined ? "condensed" : t2;
87
149
  const listRef = useRef(null);
150
+ const [computedGap, setComputedGap] = useState(ACTIONBAR_ITEM_GAP);
88
151
  const [childRegistry, setChildRegistry] = ActionBarItemsRegistry.useRegistryState();
152
+ const [menuItemIds, setMenuItemIds] = useState(_temp);
89
153
  const navRef = useRef(null);
90
154
  let t3;
91
155
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
92
- t3 = {
93
- containerRef: listRef,
94
- bindKeys: FocusKeys.ArrowHorizontal | FocusKeys.HomeAndEnd,
95
- focusOutBehavior: "wrap"
156
+ t3 = () => {
157
+ if (!listRef.current) {
158
+ return;
159
+ }
160
+ const g = window.getComputedStyle(listRef.current).gap;
161
+ const parsed = parseFloat(g);
162
+ if (!Number.isNaN(parsed)) {
163
+ setComputedGap(parsed);
164
+ }
96
165
  };
97
166
  $[0] = t3;
98
167
  } else {
99
168
  t3 = $[0];
100
169
  }
101
- useFocusZone(t3);
102
- let T0;
103
- let T1;
104
- let T2;
105
- let T3;
106
- let t10;
107
- let t11;
108
- let t12;
109
- let t13;
110
- let t14;
111
- let t15;
112
- let t16;
113
- let t17;
114
- let t18;
115
170
  let t4;
171
+ if ($[1] !== gap) {
172
+ t4 = [gap];
173
+ $[1] = gap;
174
+ $[2] = t4;
175
+ } else {
176
+ t4 = $[2];
177
+ }
178
+ useIsomorphicLayoutEffect(t3, t4);
179
+ const moreMenuRef = useRef(null);
116
180
  let t5;
181
+ if ($[3] !== childRegistry || $[4] !== computedGap || $[5] !== menuItemIds.size) {
182
+ t5 = resizeObserverEntries => {
183
+ var _moreMenuRef$current$, _moreMenuRef$current;
184
+ const navWidth = resizeObserverEntries[0].contentRect.width;
185
+ const moreMenuWidth = (_moreMenuRef$current$ = (_moreMenuRef$current = moreMenuRef.current) === null || _moreMenuRef$current === void 0 ? void 0 : _moreMenuRef$current.getBoundingClientRect().width) !== null && _moreMenuRef$current$ !== void 0 ? _moreMenuRef$current$ : 0;
186
+ const hasActiveMenu = menuItemIds.size > 0;
187
+ if (navWidth > 0) {
188
+ const newMenuItemIds = getMenuItems(navWidth, moreMenuWidth, childRegistry, hasActiveMenu, computedGap);
189
+ if (newMenuItemIds) {
190
+ setMenuItemIds(newMenuItemIds);
191
+ }
192
+ }
193
+ };
194
+ $[3] = childRegistry;
195
+ $[4] = computedGap;
196
+ $[5] = menuItemIds.size;
197
+ $[6] = t5;
198
+ } else {
199
+ t5 = $[6];
200
+ }
201
+ useResizeObserver(t5, navRef);
117
202
  let t6;
203
+ if ($[7] !== menuItemIds) {
204
+ t6 = id => !menuItemIds.has(id);
205
+ $[7] = menuItemIds;
206
+ $[8] = t6;
207
+ } else {
208
+ t6 = $[8];
209
+ }
210
+ const isVisibleChild = t6;
118
211
  let t7;
119
- let t8;
120
- let t9;
121
- if ($[1] !== ariaLabel || $[2] !== ariaLabelledBy || $[3] !== childRegistry || $[4] !== children || $[5] !== className || $[6] !== flush || $[7] !== gap || $[8] !== setChildRegistry || $[9] !== size) {
122
- var _childRegistry$entrie;
123
- const overflowItems = Array.from((_childRegistry$entrie = childRegistry === null || childRegistry === void 0 ? void 0 : childRegistry.entries()) !== null && _childRegistry$entrie !== void 0 ? _childRegistry$entrie : []).filter(_temp);
124
- const groupedItemsMap = new Map();
212
+ if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
213
+ t7 = {
214
+ containerRef: listRef,
215
+ bindKeys: FocusKeys.ArrowHorizontal | FocusKeys.HomeAndEnd,
216
+ focusOutBehavior: "wrap"
217
+ };
218
+ $[9] = t7;
219
+ } else {
220
+ t7 = $[9];
221
+ }
222
+ useFocusZone(t7);
223
+ let groupedItemsMap;
224
+ if ($[10] !== childRegistry) {
225
+ groupedItemsMap = new Map();
125
226
  for (const [key, childProps] of childRegistry !== null && childRegistry !== void 0 ? childRegistry : []) {
126
- if ((childProps === null || childProps === void 0 ? void 0 : childProps.type) === "action" && childProps.groupId) {
227
+ if (childProps.type === "action" && childProps.groupId) {
127
228
  const existingGroup = groupedItemsMap.get(childProps.groupId) || [];
128
229
  existingGroup.push([key, childProps]);
129
230
  groupedItemsMap.set(childProps.groupId, existingGroup);
130
231
  }
131
232
  }
132
- const groupedItems = groupedItemsMap;
133
- T3 = ActionBarContext.Provider;
134
- if ($[29] !== size) {
135
- t18 = {
136
- size
137
- };
138
- $[29] = size;
139
- $[30] = t18;
140
- } else {
141
- t18 = $[30];
142
- }
143
- t15 = navRef;
144
- if ($[31] !== className) {
145
- t16 = clsx(className, styles.Nav);
146
- $[31] = className;
147
- $[32] = t16;
148
- } else {
149
- t16 = $[32];
150
- }
151
- t17 = flush;
152
- t6 = listRef;
153
- t7 = "toolbar";
154
- t8 = styles.List;
155
- t9 = ariaLabel;
156
- t10 = ariaLabelledBy;
157
- t11 = gap;
158
- t12 = size;
159
- t13 = overflowItems.length > 0;
160
- if ($[33] !== children || $[34] !== setChildRegistry) {
161
- t14 = /*#__PURE__*/jsx("div", {
162
- className: styles.OverflowContainer,
163
- children: /*#__PURE__*/jsx(ActionBarItemsRegistry.Provider, {
164
- setRegistry: setChildRegistry,
165
- children: children
166
- })
167
- });
168
- $[33] = children;
169
- $[34] = setChildRegistry;
170
- $[35] = t14;
171
- } else {
172
- t14 = $[35];
173
- }
174
- T2 = ActionMenu;
175
- const t19 = `More ${ariaLabel} items`;
176
- if ($[36] !== t19) {
177
- t5 = /*#__PURE__*/jsx(ActionMenu.Anchor, {
178
- children: /*#__PURE__*/jsx(IconButton, {
179
- variant: "invisible",
180
- "aria-label": t19,
181
- icon: KebabHorizontalIcon,
182
- className: styles.MoreButton
183
- })
184
- });
185
- $[36] = t19;
186
- $[37] = t5;
187
- } else {
188
- t5 = $[37];
189
- }
190
- T1 = ActionMenu.Overlay;
191
- T0 = ActionList;
192
- t4 = overflowItems.map(t20 => {
193
- const [id, menuItem] = t20;
194
- if (menuItem.type === "divider") {
195
- return /*#__PURE__*/jsx(ActionList.Divider, {}, id);
196
- }
197
- if (menuItem.type === "action") {
198
- const {
199
- onClick,
200
- icon: Icon,
201
- label,
202
- disabled
203
- } = menuItem;
204
- return /*#__PURE__*/jsxs(ActionList.Item, {
205
- onSelect: event => {
206
- typeof onClick === "function" && onClick(event);
207
- },
208
- disabled: disabled,
209
- children: [/*#__PURE__*/jsx(ActionList.LeadingVisual, {
210
- children: /*#__PURE__*/jsx(Icon, {})
211
- }), label]
212
- }, label);
213
- }
214
- if (menuItem.type === "menu") {
215
- const menuItems = menuItem.items;
216
- const {
217
- icon: Icon_0,
218
- label: label_0,
219
- returnFocusRef
220
- } = menuItem;
221
- return /*#__PURE__*/jsxs(ActionMenu, {
222
- children: [/*#__PURE__*/jsx(ActionMenu.Anchor, {
223
- children: /*#__PURE__*/jsxs(ActionList.Item, {
224
- children: [Icon_0 !== "none" ? /*#__PURE__*/jsx(ActionList.LeadingVisual, {
225
- children: /*#__PURE__*/jsx(Icon_0, {})
226
- }) : null, label_0]
227
- })
228
- }), /*#__PURE__*/jsx(ActionMenu.Overlay, {
229
- ...(returnFocusRef && {
230
- returnFocusRef
231
- }),
232
- children: /*#__PURE__*/jsx(ActionList, {
233
- children: menuItems.map(_temp2)
234
- })
235
- })]
236
- }, id);
237
- }
238
- const groupedMenuItems = groupedItems.get(id) || [];
239
- if (menuItem.type === "group") {
240
- return /*#__PURE__*/jsx(React.Fragment, {
241
- children: groupedMenuItems.map(_temp3)
242
- }, id);
243
- }
244
- });
245
- $[1] = ariaLabel;
246
- $[2] = ariaLabelledBy;
247
- $[3] = childRegistry;
248
- $[4] = children;
249
- $[5] = className;
250
- $[6] = flush;
251
- $[7] = gap;
252
- $[8] = setChildRegistry;
253
- $[9] = size;
254
- $[10] = T0;
255
- $[11] = T1;
256
- $[12] = T2;
257
- $[13] = T3;
258
- $[14] = t10;
259
- $[15] = t11;
260
- $[16] = t12;
261
- $[17] = t13;
262
- $[18] = t14;
263
- $[19] = t15;
264
- $[20] = t16;
265
- $[21] = t17;
266
- $[22] = t18;
267
- $[23] = t4;
268
- $[24] = t5;
269
- $[25] = t6;
270
- $[26] = t7;
271
- $[27] = t8;
272
- $[28] = t9;
233
+ $[10] = childRegistry;
234
+ $[11] = groupedItemsMap;
273
235
  } else {
274
- T0 = $[10];
275
- T1 = $[11];
276
- T2 = $[12];
277
- T3 = $[13];
278
- t10 = $[14];
279
- t11 = $[15];
280
- t12 = $[16];
281
- t13 = $[17];
282
- t14 = $[18];
283
- t15 = $[19];
284
- t16 = $[20];
285
- t17 = $[21];
286
- t18 = $[22];
287
- t4 = $[23];
288
- t5 = $[24];
289
- t6 = $[25];
290
- t7 = $[26];
291
- t8 = $[27];
292
- t9 = $[28];
293
- }
294
- let t19;
295
- if ($[38] !== T0 || $[39] !== t4) {
296
- t19 = /*#__PURE__*/jsx(T0, {
297
- children: t4
298
- });
299
- $[38] = T0;
300
- $[39] = t4;
301
- $[40] = t19;
236
+ groupedItemsMap = $[11];
237
+ }
238
+ const groupedItems = groupedItemsMap;
239
+ let t8;
240
+ if ($[12] !== isVisibleChild || $[13] !== size) {
241
+ t8 = {
242
+ size,
243
+ isVisibleChild
244
+ };
245
+ $[12] = isVisibleChild;
246
+ $[13] = size;
247
+ $[14] = t8;
302
248
  } else {
303
- t19 = $[40];
249
+ t8 = $[14];
304
250
  }
305
- let t20;
306
- if ($[41] !== T1 || $[42] !== t19) {
307
- t20 = /*#__PURE__*/jsx(T1, {
308
- children: t19
251
+ let t9;
252
+ if ($[15] !== className) {
253
+ t9 = clsx(className, styles.Nav);
254
+ $[15] = className;
255
+ $[16] = t9;
256
+ } else {
257
+ t9 = $[16];
258
+ }
259
+ let t10;
260
+ if ($[17] !== children || $[18] !== setChildRegistry) {
261
+ t10 = /*#__PURE__*/jsx(ActionBarItemsRegistry.Provider, {
262
+ setRegistry: setChildRegistry,
263
+ children: children
309
264
  });
310
- $[41] = T1;
311
- $[42] = t19;
312
- $[43] = t20;
265
+ $[17] = children;
266
+ $[18] = setChildRegistry;
267
+ $[19] = t10;
313
268
  } else {
314
- t20 = $[43];
269
+ t10 = $[19];
315
270
  }
316
- let t21;
317
- if ($[44] !== T2 || $[45] !== t20 || $[46] !== t5) {
318
- t21 = /*#__PURE__*/jsxs(T2, {
319
- children: [t5, t20]
271
+ let t11;
272
+ if ($[20] !== ariaLabel || $[21] !== childRegistry || $[22] !== groupedItems || $[23] !== menuItemIds) {
273
+ t11 = menuItemIds.size > 0 && /*#__PURE__*/jsxs(ActionMenu, {
274
+ children: [/*#__PURE__*/jsx(ActionMenu.Anchor, {
275
+ children: /*#__PURE__*/jsx(IconButton, {
276
+ variant: "invisible",
277
+ "aria-label": `More ${ariaLabel} items`,
278
+ icon: KebabHorizontalIcon
279
+ })
280
+ }), /*#__PURE__*/jsx(ActionMenu.Overlay, {
281
+ children: /*#__PURE__*/jsx(ActionList, {
282
+ children: Array.from(menuItemIds).map(id_0 => {
283
+ const menuItem = childRegistry === null || childRegistry === void 0 ? void 0 : childRegistry.get(id_0);
284
+ if (!menuItem) {
285
+ return null;
286
+ }
287
+ if (menuItem.type === "divider") {
288
+ return /*#__PURE__*/jsx(ActionList.Divider, {}, id_0);
289
+ } else {
290
+ if (menuItem.type === "action") {
291
+ const {
292
+ onClick,
293
+ icon: Icon,
294
+ label,
295
+ disabled
296
+ } = menuItem;
297
+ return /*#__PURE__*/jsxs(ActionList.Item, {
298
+ onSelect: event => {
299
+ typeof onClick === "function" && onClick(event);
300
+ },
301
+ disabled: disabled,
302
+ children: [/*#__PURE__*/jsx(ActionList.LeadingVisual, {
303
+ children: /*#__PURE__*/jsx(Icon, {})
304
+ }), label]
305
+ }, label);
306
+ }
307
+ }
308
+ if (menuItem.type === "menu") {
309
+ const menuItems = menuItem.items;
310
+ const {
311
+ icon: Icon_0,
312
+ label: label_0,
313
+ returnFocusRef
314
+ } = menuItem;
315
+ return /*#__PURE__*/jsxs(ActionMenu, {
316
+ children: [/*#__PURE__*/jsx(ActionMenu.Anchor, {
317
+ children: /*#__PURE__*/jsxs(ActionList.Item, {
318
+ children: [Icon_0 !== "none" ? /*#__PURE__*/jsx(ActionList.LeadingVisual, {
319
+ children: /*#__PURE__*/jsx(Icon_0, {})
320
+ }) : null, label_0]
321
+ })
322
+ }), /*#__PURE__*/jsx(ActionMenu.Overlay, {
323
+ ...(returnFocusRef && {
324
+ returnFocusRef
325
+ }),
326
+ children: /*#__PURE__*/jsx(ActionList, {
327
+ children: menuItems.map(_temp2)
328
+ })
329
+ })]
330
+ }, id_0);
331
+ }
332
+ const groupedMenuItems = groupedItems.get(id_0) || [];
333
+ if (menuItem.type === "group") {
334
+ return /*#__PURE__*/jsx(React.Fragment, {
335
+ children: groupedMenuItems.map(_temp3)
336
+ }, id_0);
337
+ }
338
+ })
339
+ })
340
+ })]
320
341
  });
321
- $[44] = T2;
322
- $[45] = t20;
323
- $[46] = t5;
324
- $[47] = t21;
342
+ $[20] = ariaLabel;
343
+ $[21] = childRegistry;
344
+ $[22] = groupedItems;
345
+ $[23] = menuItemIds;
346
+ $[24] = t11;
325
347
  } else {
326
- t21 = $[47];
327
- }
328
- let t22;
329
- if ($[48] !== t10 || $[49] !== t11 || $[50] !== t12 || $[51] !== t13 || $[52] !== t14 || $[53] !== t21 || $[54] !== t6 || $[55] !== t7 || $[56] !== t8 || $[57] !== t9) {
330
- t22 = /*#__PURE__*/jsxs("div", {
331
- ref: t6,
332
- role: t7,
333
- className: t8,
334
- "aria-label": t9,
335
- "aria-labelledby": t10,
336
- "data-gap": t11,
337
- "data-size": t12,
338
- "data-has-overflow": t13,
339
- children: [t14, t21]
348
+ t11 = $[24];
349
+ }
350
+ let t12;
351
+ if ($[25] !== ariaLabel || $[26] !== ariaLabelledBy || $[27] !== gap || $[28] !== t10 || $[29] !== t11) {
352
+ t12 = /*#__PURE__*/jsxs("div", {
353
+ ref: listRef,
354
+ role: "toolbar",
355
+ className: styles.List,
356
+ "aria-label": ariaLabel,
357
+ "aria-labelledby": ariaLabelledBy,
358
+ "data-gap": gap,
359
+ children: [t10, t11]
340
360
  });
341
- $[48] = t10;
342
- $[49] = t11;
343
- $[50] = t12;
344
- $[51] = t13;
345
- $[52] = t14;
346
- $[53] = t21;
347
- $[54] = t6;
348
- $[55] = t7;
349
- $[56] = t8;
350
- $[57] = t9;
351
- $[58] = t22;
361
+ $[25] = ariaLabel;
362
+ $[26] = ariaLabelledBy;
363
+ $[27] = gap;
364
+ $[28] = t10;
365
+ $[29] = t11;
366
+ $[30] = t12;
352
367
  } else {
353
- t22 = $[58];
354
- }
355
- let t23;
356
- if ($[59] !== t15 || $[60] !== t16 || $[61] !== t17 || $[62] !== t22) {
357
- t23 = /*#__PURE__*/jsx("div", {
358
- ref: t15,
359
- className: t16,
360
- "data-flush": t17,
361
- children: t22
368
+ t12 = $[30];
369
+ }
370
+ let t13;
371
+ if ($[31] !== flush || $[32] !== t12 || $[33] !== t9) {
372
+ t13 = /*#__PURE__*/jsx("div", {
373
+ ref: navRef,
374
+ className: t9,
375
+ "data-flush": flush,
376
+ children: t12
362
377
  });
363
- $[59] = t15;
364
- $[60] = t16;
365
- $[61] = t17;
366
- $[62] = t22;
367
- $[63] = t23;
378
+ $[31] = flush;
379
+ $[32] = t12;
380
+ $[33] = t9;
381
+ $[34] = t13;
368
382
  } else {
369
- t23 = $[63];
383
+ t13 = $[34];
370
384
  }
371
- let t24;
372
- if ($[64] !== T3 || $[65] !== t18 || $[66] !== t23) {
373
- t24 = /*#__PURE__*/jsx(T3, {
374
- value: t18,
375
- children: t23
385
+ let t14;
386
+ if ($[35] !== t13 || $[36] !== t8) {
387
+ t14 = /*#__PURE__*/jsx(ActionBarContext.Provider, {
388
+ value: t8,
389
+ children: t13
376
390
  });
377
- $[64] = T3;
378
- $[65] = t18;
379
- $[66] = t23;
380
- $[67] = t24;
391
+ $[35] = t13;
392
+ $[36] = t8;
393
+ $[37] = t14;
381
394
  } else {
382
- t24 = $[67];
395
+ t14 = $[37];
383
396
  }
384
- return t24;
397
+ return t14;
385
398
  };
386
- function useActionBarItem(ref, registryProps) {
387
- const $ = c(7);
399
+ function useWidth(ref) {
400
+ const $ = c(3);
401
+ const [width, setWidth] = useState(-1);
388
402
  let t0;
403
+ let t1;
389
404
  if ($[0] !== ref) {
390
- t0 = onChange => {
391
- const observer = new IntersectionObserver(() => onChange(), {
392
- threshold: 1
393
- });
394
- if (ref.current) {
395
- observer.observe(ref.current);
396
- }
397
- return () => observer.disconnect();
405
+ t0 = () => {
406
+ var _ref$current$getBound, _ref$current;
407
+ return setWidth((_ref$current$getBound = (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.getBoundingClientRect().width) !== null && _ref$current$getBound !== void 0 ? _ref$current$getBound : -1);
398
408
  };
409
+ t1 = [ref];
399
410
  $[0] = ref;
400
411
  $[1] = t0;
412
+ $[2] = t1;
401
413
  } else {
402
414
  t0 = $[1];
415
+ t1 = $[2];
403
416
  }
404
- let t1;
405
- if ($[2] !== ref) {
406
- t1 = () => ref.current ? ref.current.offsetTop > 0 : false;
407
- $[2] = ref;
408
- $[3] = t1;
409
- } else {
410
- t1 = $[3];
411
- }
412
- const isOverflowing = useSyncExternalStore(t0, t1, _temp4);
413
- const id = ActionBarItemsRegistry.useRegisterDescendant(isOverflowing ? registryProps : null);
414
- let t2;
415
- if ($[4] !== id || $[5] !== isOverflowing) {
416
- t2 = {
417
- id,
418
- isOverflowing
419
- };
420
- $[4] = id;
421
- $[5] = isOverflowing;
422
- $[6] = t2;
423
- } else {
424
- t2 = $[6];
425
- }
426
- return t2;
427
- }
428
- function _temp4() {
429
- return false;
417
+ useIsomorphicLayoutEffect(t0, t1);
418
+ return width;
430
419
  }
431
420
  const ActionBarIconButton = /*#__PURE__*/forwardRef(({
432
421
  disabled,
@@ -436,38 +425,39 @@ const ActionBarIconButton = /*#__PURE__*/forwardRef(({
436
425
  const ref = useRef(null);
437
426
  useRefObjectAsForwardedRef(forwardedRef, ref);
438
427
  const {
439
- size
428
+ size,
429
+ isVisibleChild
440
430
  } = React.useContext(ActionBarContext);
441
431
  const {
442
432
  groupId
443
433
  } = React.useContext(ActionBarGroupContext);
434
+ const width = useWidth(ref);
444
435
  const {
445
436
  ['aria-label']: ariaLabel,
446
437
  icon
447
438
  } = props;
448
- const {
449
- isOverflowing
450
- } = useActionBarItem(ref, useMemo(() => ({
439
+ const registryProps = useMemo(() => ({
451
440
  type: 'action',
452
441
  label: ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : '',
453
442
  icon,
454
443
  disabled: !!disabled,
455
444
  onClick: onClick,
445
+ width,
456
446
  groupId: groupId !== null && groupId !== void 0 ? groupId : undefined
457
- }), [ariaLabel, icon, disabled, onClick, groupId]));
447
+ }), [ariaLabel, icon, disabled, onClick, groupId, width]);
448
+ const id = ActionBarItemsRegistry.useRegisterDescendant(registryProps);
458
449
  const clickHandler = useCallback(event => {
459
450
  if (disabled) return;
460
451
  onClick === null || onClick === void 0 ? void 0 : onClick(event);
461
452
  }, [disabled, onClick]);
453
+ if (!isVisibleChild(id) || groupId && !isVisibleChild(groupId)) return null;
462
454
  return /*#__PURE__*/jsx(IconButton, {
463
455
  "aria-disabled": disabled,
464
456
  ref: ref,
465
457
  size: size,
466
458
  onClick: clickHandler,
467
459
  ...props,
468
- variant: "invisible",
469
- "data-overflowing": isOverflowing,
470
- "aria-hidden": isOverflowing || props['aria-hidden']
460
+ variant: "invisible"
471
461
  });
472
462
  });
473
463
  const ActionBarGroupContext = /*#__PURE__*/React.createContext({
@@ -480,40 +470,38 @@ const ActionBarGroup = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
480
470
  } = t0;
481
471
  const backupRef = useRef(null);
482
472
  const ref = forwardedRef !== null && forwardedRef !== void 0 ? forwardedRef : backupRef;
473
+ const width = useWidth(ref);
483
474
  let t1;
484
- if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
475
+ if ($[0] !== width) {
485
476
  t1 = {
486
- type: "group"
477
+ type: "group",
478
+ width
487
479
  };
488
- $[0] = t1;
480
+ $[0] = width;
481
+ $[1] = t1;
489
482
  } else {
490
- t1 = $[0];
483
+ t1 = $[1];
491
484
  }
492
- const {
493
- id,
494
- isOverflowing
495
- } = useActionBarItem(ref, t1);
485
+ const registryProps = t1;
486
+ const id = ActionBarItemsRegistry.useRegisterDescendant(registryProps);
496
487
  let t2;
497
- if ($[1] !== id) {
488
+ if ($[2] !== id) {
498
489
  t2 = {
499
490
  groupId: id
500
491
  };
501
- $[1] = id;
502
- $[2] = t2;
492
+ $[2] = id;
493
+ $[3] = t2;
503
494
  } else {
504
- t2 = $[2];
495
+ t2 = $[3];
505
496
  }
506
497
  let t3;
507
- if ($[3] !== children || $[4] !== isOverflowing || $[5] !== ref) {
498
+ if ($[4] !== children || $[5] !== ref) {
508
499
  t3 = /*#__PURE__*/jsx("div", {
509
500
  className: styles.Group,
510
501
  ref: ref,
511
- "data-overflowing": isOverflowing,
512
- "aria-hidden": isOverflowing,
513
502
  children: children
514
503
  });
515
- $[3] = children;
516
- $[4] = isOverflowing;
504
+ $[4] = children;
517
505
  $[5] = ref;
518
506
  $[6] = t3;
519
507
  } else {
@@ -534,7 +522,7 @@ const ActionBarGroup = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
534
522
  return t4;
535
523
  });
536
524
  const ActionBarMenu = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
537
- const $ = c(32);
525
+ const $ = c(31);
538
526
  let ariaLabel;
539
527
  let icon;
540
528
  let items;
@@ -567,12 +555,17 @@ const ActionBarMenu = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
567
555
  }
568
556
  const backupRef = useRef(null);
569
557
  const ref = forwardedRef !== null && forwardedRef !== void 0 ? forwardedRef : backupRef;
558
+ const {
559
+ isVisibleChild
560
+ } = React.useContext(ActionBarContext);
570
561
  const [menuOpen, setMenuOpen] = useState(false);
562
+ const width = useWidth(ref);
571
563
  const t1 = overflowIcon ? overflowIcon : icon;
572
564
  let t2;
573
- if ($[7] !== ariaLabel || $[8] !== items || $[9] !== returnFocusRef || $[10] !== t1) {
565
+ if ($[7] !== ariaLabel || $[8] !== items || $[9] !== returnFocusRef || $[10] !== t1 || $[11] !== width) {
574
566
  t2 = {
575
567
  type: "menu",
568
+ width,
576
569
  label: ariaLabel,
577
570
  icon: t1,
578
571
  returnFocusRef,
@@ -582,126 +575,130 @@ const ActionBarMenu = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
582
575
  $[8] = items;
583
576
  $[9] = returnFocusRef;
584
577
  $[10] = t1;
585
- $[11] = t2;
578
+ $[11] = width;
579
+ $[12] = t2;
586
580
  } else {
587
- t2 = $[11];
581
+ t2 = $[12];
588
582
  }
589
- const {
590
- isOverflowing
591
- } = useActionBarItem(ref, t2);
592
- const t3 = isOverflowing || props["aria-hidden"];
593
- let t4;
594
- if ($[12] !== ariaLabel || $[13] !== icon || $[14] !== isOverflowing || $[15] !== props || $[16] !== t3) {
595
- t4 = /*#__PURE__*/jsx(ActionMenu.Anchor, {
583
+ const registryProps = t2;
584
+ const id = ActionBarItemsRegistry.useRegisterDescendant(registryProps);
585
+ if (!isVisibleChild(id)) {
586
+ return null;
587
+ }
588
+ let t3;
589
+ if ($[13] !== ariaLabel || $[14] !== icon || $[15] !== props) {
590
+ t3 = /*#__PURE__*/jsx(ActionMenu.Anchor, {
596
591
  children: /*#__PURE__*/jsx(IconButton, {
597
592
  variant: "invisible",
598
593
  "aria-label": ariaLabel,
599
594
  icon: icon,
600
- ...props,
601
- "data-overflowing": isOverflowing,
602
- "aria-hidden": t3
595
+ ...props
603
596
  })
604
597
  });
605
- $[12] = ariaLabel;
606
- $[13] = icon;
607
- $[14] = isOverflowing;
598
+ $[13] = ariaLabel;
599
+ $[14] = icon;
608
600
  $[15] = props;
609
601
  $[16] = t3;
610
- $[17] = t4;
611
602
  } else {
612
- t4 = $[17];
603
+ t3 = $[16];
613
604
  }
614
- let t5;
615
- if ($[18] !== returnFocusRef) {
616
- t5 = returnFocusRef && {
605
+ let t4;
606
+ if ($[17] !== returnFocusRef) {
607
+ t4 = returnFocusRef && {
617
608
  returnFocusRef
618
609
  };
619
- $[18] = returnFocusRef;
620
- $[19] = t5;
610
+ $[17] = returnFocusRef;
611
+ $[18] = t4;
621
612
  } else {
622
- t5 = $[19];
613
+ t4 = $[18];
623
614
  }
624
- let t6;
625
- if ($[20] !== items) {
626
- t6 = items.map(_temp5);
627
- $[20] = items;
628
- $[21] = t6;
615
+ let t5;
616
+ if ($[19] !== items) {
617
+ t5 = items.map(_temp4);
618
+ $[19] = items;
619
+ $[20] = t5;
629
620
  } else {
630
- t6 = $[21];
621
+ t5 = $[20];
631
622
  }
632
- let t7;
633
- if ($[22] !== t6) {
634
- t7 = /*#__PURE__*/jsx(ActionList, {
635
- children: t6
623
+ let t6;
624
+ if ($[21] !== t5) {
625
+ t6 = /*#__PURE__*/jsx(ActionList, {
626
+ children: t5
636
627
  });
628
+ $[21] = t5;
637
629
  $[22] = t6;
638
- $[23] = t7;
639
630
  } else {
640
- t7 = $[23];
631
+ t6 = $[22];
641
632
  }
642
- let t8;
643
- if ($[24] !== t5 || $[25] !== t7) {
644
- t8 = /*#__PURE__*/jsx(ActionMenu.Overlay, {
645
- ...t5,
646
- children: t7
633
+ let t7;
634
+ if ($[23] !== t4 || $[24] !== t6) {
635
+ t7 = /*#__PURE__*/jsx(ActionMenu.Overlay, {
636
+ ...t4,
637
+ children: t6
647
638
  });
648
- $[24] = t5;
639
+ $[23] = t4;
640
+ $[24] = t6;
649
641
  $[25] = t7;
650
- $[26] = t8;
651
642
  } else {
652
- t8 = $[26];
643
+ t7 = $[25];
653
644
  }
654
- let t9;
655
- if ($[27] !== menuOpen || $[28] !== ref || $[29] !== t4 || $[30] !== t8) {
656
- t9 = /*#__PURE__*/jsxs(ActionMenu, {
645
+ let t8;
646
+ if ($[26] !== menuOpen || $[27] !== ref || $[28] !== t3 || $[29] !== t7) {
647
+ t8 = /*#__PURE__*/jsxs(ActionMenu, {
657
648
  anchorRef: ref,
658
649
  open: menuOpen,
659
650
  onOpenChange: setMenuOpen,
660
- children: [t4, t8]
651
+ children: [t3, t7]
661
652
  });
662
- $[27] = menuOpen;
663
- $[28] = ref;
664
- $[29] = t4;
653
+ $[26] = menuOpen;
654
+ $[27] = ref;
655
+ $[28] = t3;
656
+ $[29] = t7;
665
657
  $[30] = t8;
666
- $[31] = t9;
667
658
  } else {
668
- t9 = $[31];
659
+ t8 = $[30];
669
660
  }
670
- return t9;
661
+ return t8;
671
662
  });
672
663
  const VerticalDivider = () => {
673
664
  const $ = c(3);
674
665
  const ref = useRef(null);
666
+ const {
667
+ isVisibleChild
668
+ } = React.useContext(ActionBarContext);
669
+ const width = useWidth(ref);
675
670
  let t0;
676
- if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
671
+ if ($[0] !== width) {
677
672
  t0 = {
678
- type: "divider"
673
+ type: "divider",
674
+ width
679
675
  };
680
- $[0] = t0;
676
+ $[0] = width;
677
+ $[1] = t0;
681
678
  } else {
682
- t0 = $[0];
679
+ t0 = $[1];
680
+ }
681
+ const registryProps = t0;
682
+ const id = ActionBarItemsRegistry.useRegisterDescendant(registryProps);
683
+ if (!isVisibleChild(id)) {
684
+ return null;
683
685
  }
684
- const {
685
- isOverflowing
686
- } = useActionBarItem(ref, t0);
687
686
  let t1;
688
- if ($[1] !== isOverflowing) {
687
+ if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
689
688
  t1 = /*#__PURE__*/jsx("div", {
690
689
  ref: ref,
691
690
  "data-component": "ActionBar.VerticalDivider",
692
691
  "aria-hidden": "true",
693
- className: styles.Divider,
694
- "data-overflowing": isOverflowing
692
+ className: styles.Divider
695
693
  });
696
- $[1] = isOverflowing;
697
694
  $[2] = t1;
698
695
  } else {
699
696
  t1 = $[2];
700
697
  }
701
698
  return t1;
702
699
  };
703
- function _temp(entry) {
704
- return entry[1] !== null;
700
+ function _temp() {
701
+ return new Set();
705
702
  }
706
703
  function _temp2(item, index) {
707
704
  return renderMenuItem(item, index);
@@ -727,7 +724,7 @@ function _temp3(t0) {
727
724
  }
728
725
  return null;
729
726
  }
730
- function _temp5(item, index) {
727
+ function _temp4(item, index) {
731
728
  return renderMenuItem(item, index);
732
729
  }
733
730
 
@@ -1,5 +1,5 @@
1
- import './ActionBar-544d3fab.css';
1
+ import './ActionBar-a41224b2.css';
2
2
 
3
- var styles = {"List":"prc-ActionBar-List-9uz46","detect-overflow":"prc-ActionBar-detect-overflow-mAuJu","Divider":"prc-ActionBar-Divider-6V8yH","Nav":"prc-ActionBar-Nav-9spON","Group":"prc-ActionBar-Group-peNCk","OverflowContainer":"prc-ActionBar-OverflowContainer-AkYZs","MoreButton":"prc-ActionBar-MoreButton-RHqpx"};
3
+ var styles = {"List":"prc-ActionBar-List-9uz46","Divider":"prc-ActionBar-Divider-6V8yH","Nav":"prc-ActionBar-Nav-9spON","Group":"prc-ActionBar-Group-peNCk"};
4
4
 
5
5
  export { styles as default };
@@ -1,7 +1,7 @@
1
1
  export type { ActionBarProps, ActionBarMenuProps, ActionBarMenuItemProps } from './ActionBar';
2
2
  declare const ActionBar: import("react").FC<import("react").PropsWithChildren<import("./ActionBar").ActionBarProps>> & {
3
3
  IconButton: import("react").ForwardRefExoticComponent<import("./ActionBar").ActionBarIconButtonProps & import("react").RefAttributes<unknown>>;
4
- Divider: () => import("react").JSX.Element;
4
+ Divider: () => import("react").JSX.Element | null;
5
5
  Group: import("react").ForwardRefExoticComponent<{
6
6
  children?: import("react").ReactNode | undefined;
7
7
  } & import("react").RefAttributes<unknown>>;
@@ -1,2 +1,2 @@
1
- @keyframes prc-Overlay-overlay-appear-JpFey{0%{opacity:0}to{opacity:1}}.prc-Overlay-Overlay-jfs-T{background-color:var(--overlay-bgColor,var(--color-canvas-overlay));border-radius:var(--borderRadius-large,.75rem);bottom:var(--bottom,auto);box-shadow:var(--shadow-floating-small,var(--color-overlay-shadow));height:auto;left:var(--left,auto);max-height:100vh;max-width:calc(100vw - 2rem);min-width:192px;overflow:auto;position:absolute;right:var(--right,auto);top:var(--top,auto);width:auto}.prc-Overlay-Overlay-jfs-T:focus{outline:none}@media (forced-colors:active){.prc-Overlay-Overlay-jfs-T{outline:1px solid transparent}}.prc-Overlay-Overlay-jfs-T:where([data-reflow-container=true]){max-width:calc(100vw - 2rem)}.prc-Overlay-Overlay-jfs-T:where([data-overflow-auto]){overflow:auto}.prc-Overlay-Overlay-jfs-T:where([data-overflow-hidden]){overflow:hidden}.prc-Overlay-Overlay-jfs-T:where([data-overflow-scroll]){overflow:scroll}.prc-Overlay-Overlay-jfs-T:where([data-overflow-visible]){overflow:visible}.prc-Overlay-Overlay-jfs-T:where([data-height-xsmall]){height:192px}.prc-Overlay-Overlay-jfs-T:where([data-height-small]){height:256px}.prc-Overlay-Overlay-jfs-T:where([data-height-medium]){height:320px}.prc-Overlay-Overlay-jfs-T:where([data-height-large]){height:432px}.prc-Overlay-Overlay-jfs-T:where([data-height-xlarge]){height:600px}.prc-Overlay-Overlay-jfs-T:where([data-height-auto]),.prc-Overlay-Overlay-jfs-T:where([data-height-initial]){height:auto}.prc-Overlay-Overlay-jfs-T:where([data-height-fit-content]){height:-moz-fit-content;height:fit-content}.prc-Overlay-Overlay-jfs-T:where([data-max-height-xsmall]){max-height:192px}.prc-Overlay-Overlay-jfs-T:where([data-max-height-small]){max-height:256px}.prc-Overlay-Overlay-jfs-T:where([data-max-height-medium]){max-height:320px}.prc-Overlay-Overlay-jfs-T:where([data-max-height-large]){max-height:432px}.prc-Overlay-Overlay-jfs-T:where([data-max-height-xlarge]){max-height:600px}.prc-Overlay-Overlay-jfs-T:where([data-max-height-fit-content]){max-height:-moz-fit-content;max-height:fit-content}.prc-Overlay-Overlay-jfs-T:where([data-width-small]){width:256px}.prc-Overlay-Overlay-jfs-T:where([data-width-medium]){width:320px}.prc-Overlay-Overlay-jfs-T:where([data-width-large]){width:480px}.prc-Overlay-Overlay-jfs-T:where([data-width-xlarge]){width:640px}.prc-Overlay-Overlay-jfs-T:where([data-width-xxlarge]){width:960px}.prc-Overlay-Overlay-jfs-T:where([data-width-auto]){width:auto}.prc-Overlay-Overlay-jfs-T:where([data-max-width-small]){max-width:256px}.prc-Overlay-Overlay-jfs-T:where([data-max-width-medium]){max-width:320px}.prc-Overlay-Overlay-jfs-T:where([data-max-width-large]){max-width:480px}.prc-Overlay-Overlay-jfs-T:where([data-max-width-xlarge]){max-width:640px}.prc-Overlay-Overlay-jfs-T:where([data-max-width-xxlarge]){max-width:960px}.prc-Overlay-Overlay-jfs-T:where([data-visibility-visible]){visibility:visible}.prc-Overlay-Overlay-jfs-T:where([data-visibility-hidden]){visibility:hidden}@media screen and (max-width:calc(48rem - 0.02px)){.prc-Overlay-Overlay-jfs-T:where([data-responsive=fullscreen]){border-radius:unset;height:100vh;left:0;margin:0;max-height:none;max-width:none;position:fixed;top:0;width:100vw}}@supports (height:100dvh){.prc-Overlay-Overlay-jfs-T:where([data-variant=fullscreen]){height:100dvh}}@media (prefers-reduced-motion:no-preference){.prc-Overlay-Overlay-jfs-T{animation:prc-Overlay-overlay-appear-JpFey .2s cubic-bezier(.33,1,.68,1)}}
2
- /*# sourceMappingURL=Overlay-15519c09.css.map */
1
+ @keyframes prc-Overlay-overlay-appear-JpFey{0%{opacity:0}to{opacity:1}}.prc-Overlay-Overlay-jfs-T{background-color:var(--overlay-bgColor,var(--color-canvas-overlay));border-radius:var(--borderRadius-large,.75rem);bottom:var(--bottom,auto);box-shadow:var(--shadow-floating-small,var(--color-overlay-shadow));height:auto;left:var(--left,auto);max-height:100vh;max-width:calc(100vw - 2rem);min-width:192px;overflow:auto;position:absolute;right:var(--right,auto);top:var(--top,auto);width:auto}.prc-Overlay-Overlay-jfs-T:focus{outline:none}@media (forced-colors:active){.prc-Overlay-Overlay-jfs-T{outline:1px solid transparent}}.prc-Overlay-Overlay-jfs-T:where([data-reflow-container=true]){max-width:calc(100vw - 2rem)}.prc-Overlay-Overlay-jfs-T:where([data-overflow-auto]){overflow:auto}.prc-Overlay-Overlay-jfs-T:where([data-overflow-hidden]){overflow:hidden}.prc-Overlay-Overlay-jfs-T:where([data-overflow-scroll]){overflow:scroll}.prc-Overlay-Overlay-jfs-T:where([data-overflow-visible]){overflow:visible}.prc-Overlay-Overlay-jfs-T:where([data-height-xsmall]){height:192px}.prc-Overlay-Overlay-jfs-T:where([data-height-small]){height:256px}.prc-Overlay-Overlay-jfs-T:where([data-height-medium]){height:320px}.prc-Overlay-Overlay-jfs-T:where([data-height-large]){height:432px}.prc-Overlay-Overlay-jfs-T:where([data-height-xlarge]){height:600px}.prc-Overlay-Overlay-jfs-T:where([data-height-auto]),.prc-Overlay-Overlay-jfs-T:where([data-height-initial]){height:auto}.prc-Overlay-Overlay-jfs-T:where([data-height-fit-content]){height:-moz-fit-content;height:fit-content}.prc-Overlay-Overlay-jfs-T:where([data-max-height-xsmall]){max-height:192px}.prc-Overlay-Overlay-jfs-T:where([data-max-height-small]){max-height:256px}.prc-Overlay-Overlay-jfs-T:where([data-max-height-medium]){max-height:320px}.prc-Overlay-Overlay-jfs-T:where([data-max-height-large]){max-height:432px}.prc-Overlay-Overlay-jfs-T:where([data-max-height-xlarge]){max-height:600px}.prc-Overlay-Overlay-jfs-T:where([data-max-height-fit-content]){max-height:-moz-fit-content;max-height:fit-content}.prc-Overlay-Overlay-jfs-T:where([data-width-small]){width:256px}.prc-Overlay-Overlay-jfs-T:where([data-width-medium]){width:320px}.prc-Overlay-Overlay-jfs-T:where([data-width-large]){width:480px}.prc-Overlay-Overlay-jfs-T:where([data-width-xlarge]){width:640px}.prc-Overlay-Overlay-jfs-T:where([data-width-xxlarge]){width:960px}.prc-Overlay-Overlay-jfs-T:where([data-width-auto]){width:auto}.prc-Overlay-Overlay-jfs-T:where([data-max-width-small]){max-width:256px}.prc-Overlay-Overlay-jfs-T:where([data-max-width-medium]){max-width:320px}.prc-Overlay-Overlay-jfs-T:where([data-max-width-large]){max-width:480px}.prc-Overlay-Overlay-jfs-T:where([data-max-width-xlarge]){max-width:640px}.prc-Overlay-Overlay-jfs-T:where([data-max-width-xxlarge]){max-width:960px}.prc-Overlay-Overlay-jfs-T:where([data-visibility-visible]){visibility:visible}.prc-Overlay-Overlay-jfs-T:where([data-visibility-hidden]){visibility:hidden}@media screen and (max-width:calc(48rem - 0.02px)){.prc-Overlay-Overlay-jfs-T:where([data-responsive=fullscreen]){border-radius:unset;height:100vh;left:0;margin:0;max-height:none;max-width:none;padding-bottom:env(safe-area-inset-bottom);position:fixed;top:0;width:100vw}@supports (height:100dvh){.prc-Overlay-Overlay-jfs-T:where([data-responsive=fullscreen]){height:100dvh}}}@supports (height:100dvh){.prc-Overlay-Overlay-jfs-T:where([data-variant=fullscreen]){height:100dvh}}@media (prefers-reduced-motion:no-preference){.prc-Overlay-Overlay-jfs-T{animation:prc-Overlay-overlay-appear-JpFey .2s cubic-bezier(.33,1,.68,1)}}
2
+ /*# sourceMappingURL=Overlay-dbaa6b8c.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/Overlay/Overlay.module.css.js"],"names":[],"mappings":"AAAA,4CACE,GACE,SACF,CAEA,GACE,SACF,CACF,CAEA,2BAQE,mEAAwC,CACxC,8CAAwC,CASxC,yBAA2B,CAR3B,mEAAwC,CALxC,WAAY,CASZ,qBAAuB,CARvB,gBAAiB,CAJjB,4BAA6B,CAE7B,eAAgB,CAGhB,aAAc,CANd,iBAAkB,CAelB,uBAAyB,CAJzB,mBAAqB,CATrB,UAqLF,CApKE,iCACE,YACF,CAEA,8BAxBF,2BA0BI,6BA8JJ,CA7JE,CAEA,+DACE,4BACF,CAEA,uDACE,aACF,CAEA,yDACE,eACF,CAEA,yDACE,eACF,CAEA,0DACE,gBACF,CAEA,uDACE,YACF,CAEA,sDACE,YACF,CAEA,uDACE,YACF,CAEA,sDACE,YACF,CAEA,uDACE,YACF,CAEA,6GAEE,WACF,CAEA,4DACE,uBAAmB,CAAnB,kBACF,CAEA,2DACE,gBACF,CAEA,0DACE,gBACF,CAEA,2DACE,gBACF,CAEA,0DACE,gBACF,CAEA,2DACE,gBACF,CAEA,gEACE,2BAAuB,CAAvB,sBACF,CAEA,qDACE,WACF,CAEA,sDACE,WACF,CAEA,qDAEE,WACF,CAEA,sDAEE,WACF,CAEA,uDAEE,WACF,CAEA,oDACE,UACF,CAEA,yDACE,eACF,CAEA,0DACE,eACF,CAEA,yDACE,eACF,CAEA,0DACE,eACF,CAEA,2DACE,eACF,CAEA,4DACE,kBACF,CAEA,2DACE,iBACF,CAGE,mDADF,+DAUI,mBAAoB,CAHpB,YAAa,CAHb,MAAO,CAKP,QAAS,CADT,eAAgB,CAFhB,cAAe,CAMf,0CAA2C,CAV3C,cAAe,CACf,KAAM,CAEN,WAcJ,CALI,0BAdJ,+DAgBM,aAGN,CAFI,CACF,CAGF,0BAEE,4DACE,aACF,CACF,CAGF,8CACE,2BACE,wEACF,CACF","file":"Overlay-dbaa6b8c.css","sourcesContent":["@keyframes overlay-appear {\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n}\n\n.Overlay {\n position: absolute;\n max-width: calc(100vw - 2rem);\n width: auto;\n min-width: 192px;\n height: auto;\n max-height: 100vh;\n overflow: auto;\n background-color: var(--overlay-bgColor);\n border-radius: var(--borderRadius-large);\n box-shadow: var(--shadow-floating-small);\n /* stylelint-disable-next-line primer/spacing */\n top: var(--top, auto);\n /* stylelint-disable-next-line primer/spacing */\n left: var(--left, auto);\n /* stylelint-disable-next-line primer/spacing */\n right: var(--right, auto);\n /* stylelint-disable-next-line primer/spacing */\n bottom: var(--bottom, auto);\n\n &:focus {\n outline: none;\n }\n\n @media (forced-colors: active) {\n /* Support for Windows high contrast https://sarahmhigley.com/writing/whcm-quick-tips */\n outline: solid 1px transparent;\n }\n\n &:where([data-reflow-container='true']) {\n max-width: calc(100vw - 2rem);\n }\n\n &:where([data-overflow-auto]) {\n overflow: auto;\n }\n\n &:where([data-overflow-hidden]) {\n overflow: hidden;\n }\n\n &:where([data-overflow-scroll]) {\n overflow: scroll;\n }\n\n &:where([data-overflow-visible]) {\n overflow: visible;\n }\n\n &:where([data-height-xsmall]) {\n height: 192px;\n }\n\n &:where([data-height-small]) {\n height: 256px;\n }\n\n &:where([data-height-medium]) {\n height: 320px;\n }\n\n &:where([data-height-large]) {\n height: 432px;\n }\n\n &:where([data-height-xlarge]) {\n height: 600px;\n }\n\n &:where([data-height-auto]),\n &:where([data-height-initial]) {\n height: auto;\n }\n\n &:where([data-height-fit-content]) {\n height: fit-content;\n }\n\n &:where([data-max-height-xsmall]) {\n max-height: 192px;\n }\n\n &:where([data-max-height-small]) {\n max-height: 256px;\n }\n\n &:where([data-max-height-medium]) {\n max-height: 320px;\n }\n\n &:where([data-max-height-large]) {\n max-height: 432px;\n }\n\n &:where([data-max-height-xlarge]) {\n max-height: 600px;\n }\n\n &:where([data-max-height-fit-content]) {\n max-height: fit-content;\n }\n\n &:where([data-width-small]) {\n width: 256px;\n }\n\n &:where([data-width-medium]) {\n width: 320px;\n }\n\n &:where([data-width-large]) {\n /* stylelint-disable-next-line primer/responsive-widths */\n width: 480px;\n }\n\n &:where([data-width-xlarge]) {\n /* stylelint-disable-next-line primer/responsive-widths */\n width: 640px;\n }\n\n &:where([data-width-xxlarge]) {\n /* stylelint-disable-next-line primer/responsive-widths */\n width: 960px;\n }\n\n &:where([data-width-auto]) {\n width: auto;\n }\n\n &:where([data-max-width-small]) {\n max-width: 256px;\n }\n\n &:where([data-max-width-medium]) {\n max-width: 320px;\n }\n\n &:where([data-max-width-large]) {\n max-width: 480px;\n }\n\n &:where([data-max-width-xlarge]) {\n max-width: 640px;\n }\n\n &:where([data-max-width-xxlarge]) {\n max-width: 960px;\n }\n\n &:where([data-visibility-visible]) {\n visibility: visible;\n }\n\n &:where([data-visibility-hidden]) {\n visibility: hidden;\n }\n\n &:where([data-responsive='fullscreen']) {\n @media screen and (--viewportRange-narrow) {\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n max-width: none;\n height: 100vh;\n max-height: none;\n margin: 0;\n border-radius: unset;\n /* stylelint-disable-next-line primer/spacing */\n padding-bottom: env(safe-area-inset-bottom);\n\n @supports (height: 100dvh) {\n /* fix for mobile safari (100vh clips the screen with the toolbar) */\n height: 100dvh;\n }\n }\n }\n\n @supports (height: 100dvh) {\n /* fix for mobile safari (100vh clips the screen with the toolbar) */\n &:where([data-variant='fullscreen']) {\n height: 100dvh;\n }\n }\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .Overlay {\n animation: overlay-appear 200ms cubic-bezier(0.33, 1, 0.68, 1);\n }\n}\n"]}
@@ -1,4 +1,4 @@
1
- import './Overlay-15519c09.css';
1
+ import './Overlay-dbaa6b8c.css';
2
2
 
3
3
  var classes = {"Overlay":"prc-Overlay-Overlay-jfs-T","overlay-appear":"prc-Overlay-overlay-appear-JpFey"};
4
4
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@primer/react",
3
3
  "type": "module",
4
- "version": "0.0.0-20260311183958",
4
+ "version": "0.0.0-20260311184347",
5
5
  "description": "An implementation of GitHub's Primer Design System using React",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",
@@ -1,2 +0,0 @@
1
- .prc-ActionBar-List-9uz46{align-items:flex-start;animation:prc-ActionBar-detect-overflow-mAuJu linear;display:flex;gap:var(--actionbar-gap,var(--stack-gap-condensed,.5rem));height:var(--actionbar-height);list-style:none;margin-bottom:-1px;min-width:0;overflow:hidden;position:relative;white-space:nowrap;animation-timeline:scroll(self block);--actionbar-height:var(--control-small-size,1.75rem);--morebutton-display:none}.prc-ActionBar-List-9uz46[data-has-overflow=true]{--morebutton-display:block}.prc-ActionBar-List-9uz46[data-size=medium]{--actionbar-height:var(--control-medium-size,2rem)}.prc-ActionBar-List-9uz46[data-size=large]{--actionbar-height:var(--control-large-size,2.5rem)}.prc-ActionBar-List-9uz46:where([data-gap=none]){--actionbar-gap:0}.prc-ActionBar-List-9uz46:where([data-gap=none]) .prc-ActionBar-Divider-6V8yH{padding:0 var(--base-size-8,.5rem)}.prc-ActionBar-List-9uz46:where([data-gap=condensed]){--actionbar-gap:var(--stack-gap-condensed,0.5rem)}@keyframes prc-ActionBar-detect-overflow-mAuJu{0%,to{--morebutton-display:block}}.prc-ActionBar-Nav-9spON{align-items:center;display:flex;justify-content:flex-end;padding-inline:var(--base-size-16,1rem)}.prc-ActionBar-Nav-9spON:where([data-flush=true]){padding-inline:0}.prc-ActionBar-Divider-6V8yH:before{background:var(--borderColor-muted,var(--color-border-muted));content:"";display:block;height:var(--base-size-20,1.25rem);margin-top:calc((var(--actionbar-height) - var(--base-size-20,1.25rem))/2);width:var(--borderWidth-thin,.0625rem)}.prc-ActionBar-Group-peNCk,.prc-ActionBar-OverflowContainer-AkYZs{display:flex;gap:inherit}.prc-ActionBar-OverflowContainer-AkYZs{flex-wrap:wrap;justify-content:flex-end}.prc-ActionBar-MoreButton-RHqpx{display:var(--morebutton-display)}
2
- /*# sourceMappingURL=ActionBar-544d3fab.css.map */
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/ActionBar/ActionBar.module.css.js"],"names":[],"mappings":"AAAA,0BAUE,sBAAuB,CAIvB,oDAAiC,CAZjC,YAAa,CASb,yDAAqD,CAErD,8BAA+B,CAJ/B,eAAgB,CAFhB,kBAAmB,CAJnB,WAAY,CASZ,eAAgB,CAXhB,iBAAkB,CAOlB,kBAAmB,CAOnB,qCAAsC,CAEtC,oDAA6C,CAC7C,yBA2BF,CAzBE,kDAEE,0BACF,CAEA,4CACE,kDACF,CAEA,2CACE,mDACF,CAGA,iDACE,iBAKF,CAHE,8EACE,kCACF,CAGF,sDACE,iDACF,CAGF,+CACE,MAEE,0BACF,CACF,CAEA,yBAIE,kBAAmB,CAHnB,YAAa,CAEb,wBAAyB,CADzB,uCAOF,CAHE,kDACE,gBACF,CAIA,oCAME,6DAAoC,CAFpC,UAAW,CAHX,aAAc,CAEd,kCAA2B,CAK3B,0EAAqE,CANrE,sCAOF,CAQF,kEAJE,YAAa,CACb,WAQF,CALA,uCAEE,cAAe,CAEf,wBACF,CAEA,gCACE,iCACF","file":"ActionBar-544d3fab.css","sourcesContent":[".List {\n position: relative;\n display: flex;\n min-width: 0;\n\n /* wonder why this is here */\n /* stylelint-disable-next-line primer/spacing */\n margin-bottom: -1px;\n white-space: nowrap;\n list-style: none;\n align-items: flex-start;\n gap: var(--actionbar-gap, var(--stack-gap-condensed));\n overflow: hidden;\n height: var(--actionbar-height);\n animation: detect-overflow linear;\n animation-timeline: scroll(self block);\n\n --actionbar-height: var(--control-small-size);\n --morebutton-display: none;\n\n &[data-has-overflow='true'] {\n /* Progressive enhancement: show overflow button on browsers that don't support scroll-driven animations */\n --morebutton-display: block;\n }\n\n &[data-size='medium'] {\n --actionbar-height: var(--control-medium-size);\n }\n\n &[data-size='large'] {\n --actionbar-height: var(--control-large-size);\n }\n\n /* Gap scale (mirrors Stack) */\n &:where([data-gap='none']) {\n --actionbar-gap: 0;\n\n .Divider {\n padding: 0 var(--base-size-8);\n }\n }\n\n &:where([data-gap='condensed']) {\n --actionbar-gap: var(--stack-gap-condensed);\n }\n}\n\n@keyframes detect-overflow {\n 0%,\n 100% {\n --morebutton-display: block;\n }\n}\n\n.Nav {\n display: flex;\n padding-inline: var(--base-size-16);\n justify-content: flex-end;\n align-items: center;\n\n &:where([data-flush='true']) {\n padding-inline: 0;\n }\n}\n\n.Divider {\n &::before {\n display: block;\n width: var(--borderWidth-thin);\n height: var(--base-size-20);\n content: '';\n /* stylelint-disable-next-line primer/colors */\n background: var(--borderColor-muted);\n /* stylelint-disable-next-line primer/spacing */\n margin-top: calc((var(--actionbar-height) - var(--base-size-20)) / 2);\n }\n}\n\n.Group {\n display: flex;\n gap: inherit;\n}\n\n.OverflowContainer {\n display: flex;\n flex-wrap: wrap;\n gap: inherit;\n justify-content: flex-end;\n}\n\n.MoreButton {\n display: var(--morebutton-display);\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/Overlay/Overlay.module.css.js"],"names":[],"mappings":"AAAA,4CACE,GACE,SACF,CAEA,GACE,SACF,CACF,CAEA,2BAQE,mEAAwC,CACxC,8CAAwC,CASxC,yBAA2B,CAR3B,mEAAwC,CALxC,WAAY,CASZ,qBAAuB,CARvB,gBAAiB,CAJjB,4BAA6B,CAE7B,eAAgB,CAGhB,aAAc,CANd,iBAAkB,CAelB,uBAAyB,CAJzB,mBAAqB,CATrB,UA8KF,CA7JE,iCACE,YACF,CAEA,8BAxBF,2BA0BI,6BAuJJ,CAtJE,CAEA,+DACE,4BACF,CAEA,uDACE,aACF,CAEA,yDACE,eACF,CAEA,yDACE,eACF,CAEA,0DACE,gBACF,CAEA,uDACE,YACF,CAEA,sDACE,YACF,CAEA,uDACE,YACF,CAEA,sDACE,YACF,CAEA,uDACE,YACF,CAEA,6GAEE,WACF,CAEA,4DACE,uBAAmB,CAAnB,kBACF,CAEA,2DACE,gBACF,CAEA,0DACE,gBACF,CAEA,2DACE,gBACF,CAEA,0DACE,gBACF,CAEA,2DACE,gBACF,CAEA,gEACE,2BAAuB,CAAvB,sBACF,CAEA,qDACE,WACF,CAEA,sDACE,WACF,CAEA,qDAEE,WACF,CAEA,sDAEE,WACF,CAEA,uDAEE,WACF,CAEA,oDACE,UACF,CAEA,yDACE,eACF,CAEA,0DACE,eACF,CAEA,yDACE,eACF,CAEA,0DACE,eACF,CAEA,2DACE,eACF,CAEA,4DACE,kBACF,CAEA,2DACE,iBACF,CAGE,mDADF,+DAUI,mBAAoB,CAHpB,YAAa,CAHb,MAAO,CAKP,QAAS,CADT,eAAgB,CAFhB,cAAe,CAJf,cAAe,CACf,KAAM,CAEN,WAOJ,CADE,CAGF,0BAEE,4DACE,aACF,CACF,CAGF,8CACE,2BACE,wEACF,CACF","file":"Overlay-15519c09.css","sourcesContent":["@keyframes overlay-appear {\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n}\n\n.Overlay {\n position: absolute;\n max-width: calc(100vw - 2rem);\n width: auto;\n min-width: 192px;\n height: auto;\n max-height: 100vh;\n overflow: auto;\n background-color: var(--overlay-bgColor);\n border-radius: var(--borderRadius-large);\n box-shadow: var(--shadow-floating-small);\n /* stylelint-disable-next-line primer/spacing */\n top: var(--top, auto);\n /* stylelint-disable-next-line primer/spacing */\n left: var(--left, auto);\n /* stylelint-disable-next-line primer/spacing */\n right: var(--right, auto);\n /* stylelint-disable-next-line primer/spacing */\n bottom: var(--bottom, auto);\n\n &:focus {\n outline: none;\n }\n\n @media (forced-colors: active) {\n /* Support for Windows high contrast https://sarahmhigley.com/writing/whcm-quick-tips */\n outline: solid 1px transparent;\n }\n\n &:where([data-reflow-container='true']) {\n max-width: calc(100vw - 2rem);\n }\n\n &:where([data-overflow-auto]) {\n overflow: auto;\n }\n\n &:where([data-overflow-hidden]) {\n overflow: hidden;\n }\n\n &:where([data-overflow-scroll]) {\n overflow: scroll;\n }\n\n &:where([data-overflow-visible]) {\n overflow: visible;\n }\n\n &:where([data-height-xsmall]) {\n height: 192px;\n }\n\n &:where([data-height-small]) {\n height: 256px;\n }\n\n &:where([data-height-medium]) {\n height: 320px;\n }\n\n &:where([data-height-large]) {\n height: 432px;\n }\n\n &:where([data-height-xlarge]) {\n height: 600px;\n }\n\n &:where([data-height-auto]),\n &:where([data-height-initial]) {\n height: auto;\n }\n\n &:where([data-height-fit-content]) {\n height: fit-content;\n }\n\n &:where([data-max-height-xsmall]) {\n max-height: 192px;\n }\n\n &:where([data-max-height-small]) {\n max-height: 256px;\n }\n\n &:where([data-max-height-medium]) {\n max-height: 320px;\n }\n\n &:where([data-max-height-large]) {\n max-height: 432px;\n }\n\n &:where([data-max-height-xlarge]) {\n max-height: 600px;\n }\n\n &:where([data-max-height-fit-content]) {\n max-height: fit-content;\n }\n\n &:where([data-width-small]) {\n width: 256px;\n }\n\n &:where([data-width-medium]) {\n width: 320px;\n }\n\n &:where([data-width-large]) {\n /* stylelint-disable-next-line primer/responsive-widths */\n width: 480px;\n }\n\n &:where([data-width-xlarge]) {\n /* stylelint-disable-next-line primer/responsive-widths */\n width: 640px;\n }\n\n &:where([data-width-xxlarge]) {\n /* stylelint-disable-next-line primer/responsive-widths */\n width: 960px;\n }\n\n &:where([data-width-auto]) {\n width: auto;\n }\n\n &:where([data-max-width-small]) {\n max-width: 256px;\n }\n\n &:where([data-max-width-medium]) {\n max-width: 320px;\n }\n\n &:where([data-max-width-large]) {\n max-width: 480px;\n }\n\n &:where([data-max-width-xlarge]) {\n max-width: 640px;\n }\n\n &:where([data-max-width-xxlarge]) {\n max-width: 960px;\n }\n\n &:where([data-visibility-visible]) {\n visibility: visible;\n }\n\n &:where([data-visibility-hidden]) {\n visibility: hidden;\n }\n\n &:where([data-responsive='fullscreen']) {\n @media screen and (--viewportRange-narrow) {\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n max-width: none;\n height: 100vh;\n max-height: none;\n margin: 0;\n border-radius: unset;\n }\n }\n\n @supports (height: 100dvh) {\n /* fix for mobile safari (100vh clips the screen with the toolbar) */\n &:where([data-variant='fullscreen']) {\n height: 100dvh;\n }\n }\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .Overlay {\n animation: overlay-appear 200ms cubic-bezier(0.33, 1, 0.68, 1);\n }\n}\n"]}