@primer/react 0.0.0-20260311175839 → 0.0.0-20260311182527

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-20260311175839
3
+ ## 0.0.0-20260311182527
4
4
 
5
5
  ### Patch Changes
6
6
 
@@ -1,2 +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 */
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);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;height:var(--actionbar-height);justify-content:flex-end;overflow:hidden;--actionbar-height:var(--control-small-size,1.75rem)}.prc-ActionBar-OverflowContainer-AkYZs[data-size=medium]{--actionbar-height:var(--control-medium-size,2rem)}.prc-ActionBar-OverflowContainer-AkYZs[data-size=large]{--actionbar-height:var(--control-large-size,2.5rem)}
2
+ /*# sourceMappingURL=ActionBar-fbb539a4.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,CAK3B,0EAAqE,CANrE,sCAOF,CAQF,kEAJE,YAAa,CACb,WAoBF,CAjBA,uCAEE,cAAe,CAGf,8BAA+B,CAC/B,wBAAyB,CAFzB,eAAgB,CAIhB,oDASF,CAPE,yDACE,kDACF,CAEA,wDACE,mDACF","file":"ActionBar-fbb539a4.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 /* 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 overflow: hidden;\n height: var(--actionbar-height);\n justify-content: flex-end;\n\n --actionbar-height: var(--control-small-size);\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"]}
@@ -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 | null;
123
+ export declare const VerticalDivider: () => React.JSX.Element;
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":"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"}
1
+ {"version":3,"file":"ActionBar.d.ts","sourceRoot":"","sources":["../../src/ActionBar/ActionBar.tsx"],"names":[],"mappings":"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"}
@@ -1,9 +1,7 @@
1
1
  import { c } from 'react-compiler-runtime';
2
- import React, { useRef, useState, forwardRef, useMemo, useCallback } from 'react';
2
+ import React, { useRef, forwardRef, useState, useMemo, useCallback, useSyncExternalStore } 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';
7
5
  import { IconButton } from '../Button/IconButton.js';
8
6
  import { useFocusZone } from '../hooks/useFocusZone.js';
9
7
  import styles from './ActionBar.module.css.js';
@@ -14,16 +12,8 @@ import { useRefObjectAsForwardedRef } from '../hooks/useRefObjectAsForwardedRef.
14
12
  import { FocusKeys } from '@primer/behaviors';
15
13
  import { ActionMenu } from '../ActionMenu/ActionMenu.js';
16
14
 
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
-
24
15
  const ActionBarContext = /*#__PURE__*/React.createContext({
25
16
  size: 'medium',
26
- isVisibleChild: () => true,
27
17
  groupId: undefined
28
18
  });
29
19
 
@@ -31,23 +21,7 @@ const ActionBarContext = /*#__PURE__*/React.createContext({
31
21
  small (28px), medium (32px), large (40px)
32
22
  */
33
23
 
34
- const MORE_BTN_WIDTH = 32;
35
24
  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
- };
51
25
  const renderMenuItem = (item, index) => {
52
26
  if (item.type === 'divider') {
53
27
  return /*#__PURE__*/jsx(ActionList.Divider, {}, index);
@@ -96,44 +70,8 @@ const renderMenuItem = (item, index) => {
96
70
  }, label);
97
71
  };
98
72
  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
- };
135
73
  const ActionBar = props => {
136
- const $ = c(38);
74
+ const $ = c(51);
137
75
  const {
138
76
  size: t0,
139
77
  children,
@@ -147,130 +85,95 @@ const ActionBar = props => {
147
85
  const flush = t1 === undefined ? false : t1;
148
86
  const gap = t2 === undefined ? "condensed" : t2;
149
87
  const listRef = useRef(null);
150
- const [computedGap, setComputedGap] = useState(ACTIONBAR_ITEM_GAP);
151
88
  const [childRegistry, setChildRegistry] = ActionBarItemsRegistry.useRegistryState();
152
- const [menuItemIds, setMenuItemIds] = useState(_temp);
153
89
  const navRef = useRef(null);
154
90
  let t3;
155
91
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
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
- }
92
+ t3 = {
93
+ containerRef: listRef,
94
+ bindKeys: FocusKeys.ArrowHorizontal | FocusKeys.HomeAndEnd,
95
+ focusOutBehavior: "wrap"
165
96
  };
166
97
  $[0] = t3;
167
98
  } else {
168
99
  t3 = $[0];
169
100
  }
101
+ useFocusZone(t3);
102
+ let T0;
103
+ let t10;
104
+ let t11;
105
+ let t12;
106
+ let t13;
107
+ let t14;
108
+ let t15;
170
109
  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);
180
110
  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);
202
111
  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;
211
112
  let t7;
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();
113
+ let t8;
114
+ let t9;
115
+ if ($[1] !== ariaLabel || $[2] !== ariaLabelledBy || $[3] !== childRegistry || $[4] !== children || $[5] !== className || $[6] !== flush || $[7] !== gap || $[8] !== setChildRegistry || $[9] !== size) {
116
+ var _childRegistry$entrie;
117
+ const overflowItems = Array.from((_childRegistry$entrie = childRegistry === null || childRegistry === void 0 ? void 0 : childRegistry.entries()) !== null && _childRegistry$entrie !== void 0 ? _childRegistry$entrie : []).filter(_temp);
118
+ const groupedItemsMap = new Map();
226
119
  for (const [key, childProps] of childRegistry !== null && childRegistry !== void 0 ? childRegistry : []) {
227
- if (childProps.type === "action" && childProps.groupId) {
120
+ if ((childProps === null || childProps === void 0 ? void 0 : childProps.type) === "action" && childProps.groupId) {
228
121
  const existingGroup = groupedItemsMap.get(childProps.groupId) || [];
229
122
  existingGroup.push([key, childProps]);
230
123
  groupedItemsMap.set(childProps.groupId, existingGroup);
231
124
  }
232
125
  }
233
- $[10] = childRegistry;
234
- $[11] = groupedItemsMap;
235
- } else {
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;
248
- } else {
249
- t8 = $[14];
250
- }
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
264
- });
265
- $[17] = children;
266
- $[18] = setChildRegistry;
267
- $[19] = t10;
268
- } else {
269
- t10 = $[19];
270
- }
271
- let t11;
272
- if ($[20] !== ariaLabel || $[21] !== childRegistry || $[22] !== groupedItems || $[23] !== menuItemIds) {
273
- t11 = menuItemIds.size > 0 && /*#__PURE__*/jsxs(ActionMenu, {
126
+ const groupedItems = groupedItemsMap;
127
+ T0 = ActionBarContext.Provider;
128
+ if ($[23] !== size) {
129
+ t15 = {
130
+ size
131
+ };
132
+ $[23] = size;
133
+ $[24] = t15;
134
+ } else {
135
+ t15 = $[24];
136
+ }
137
+ t12 = navRef;
138
+ if ($[25] !== className) {
139
+ t13 = clsx(className, styles.Nav);
140
+ $[25] = className;
141
+ $[26] = t13;
142
+ } else {
143
+ t13 = $[26];
144
+ }
145
+ t14 = flush;
146
+ t4 = listRef;
147
+ t5 = "toolbar";
148
+ t6 = styles.List;
149
+ t7 = ariaLabel;
150
+ t8 = ariaLabelledBy;
151
+ t9 = gap;
152
+ let t16;
153
+ if ($[27] !== children || $[28] !== setChildRegistry) {
154
+ t16 = /*#__PURE__*/jsx(ActionBarItemsRegistry.Provider, {
155
+ setRegistry: setChildRegistry,
156
+ children: children
157
+ });
158
+ $[27] = children;
159
+ $[28] = setChildRegistry;
160
+ $[29] = t16;
161
+ } else {
162
+ t16 = $[29];
163
+ }
164
+ if ($[30] !== size || $[31] !== t16) {
165
+ t10 = /*#__PURE__*/jsx("div", {
166
+ className: styles.OverflowContainer,
167
+ "data-size": size,
168
+ children: t16
169
+ });
170
+ $[30] = size;
171
+ $[31] = t16;
172
+ $[32] = t10;
173
+ } else {
174
+ t10 = $[32];
175
+ }
176
+ t11 = overflowItems.length > 0 && /*#__PURE__*/jsxs(ActionMenu, {
274
177
  children: [/*#__PURE__*/jsx(ActionMenu.Anchor, {
275
178
  children: /*#__PURE__*/jsx(IconButton, {
276
179
  variant: "invisible",
@@ -279,31 +182,27 @@ const ActionBar = props => {
279
182
  })
280
183
  }), /*#__PURE__*/jsx(ActionMenu.Overlay, {
281
184
  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
- }
185
+ children: overflowItems.map(t17 => {
186
+ const [id, menuItem] = t17;
287
187
  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
- }
188
+ return /*#__PURE__*/jsx(ActionList.Divider, {}, id);
189
+ }
190
+ if (menuItem.type === "action") {
191
+ const {
192
+ onClick,
193
+ icon: Icon,
194
+ label,
195
+ disabled
196
+ } = menuItem;
197
+ return /*#__PURE__*/jsxs(ActionList.Item, {
198
+ onSelect: event => {
199
+ typeof onClick === "function" && onClick(event);
200
+ },
201
+ disabled: disabled,
202
+ children: [/*#__PURE__*/jsx(ActionList.LeadingVisual, {
203
+ children: /*#__PURE__*/jsx(Icon, {})
204
+ }), label]
205
+ }, label);
307
206
  }
308
207
  if (menuItem.type === "menu") {
309
208
  const menuItems = menuItem.items;
@@ -327,95 +226,139 @@ const ActionBar = props => {
327
226
  children: menuItems.map(_temp2)
328
227
  })
329
228
  })]
330
- }, id_0);
229
+ }, id);
331
230
  }
332
- const groupedMenuItems = groupedItems.get(id_0) || [];
231
+ const groupedMenuItems = groupedItems.get(id) || [];
333
232
  if (menuItem.type === "group") {
334
233
  return /*#__PURE__*/jsx(React.Fragment, {
335
234
  children: groupedMenuItems.map(_temp3)
336
- }, id_0);
235
+ }, id);
337
236
  }
338
237
  })
339
238
  })
340
239
  })]
341
240
  });
342
- $[20] = ariaLabel;
343
- $[21] = childRegistry;
344
- $[22] = groupedItems;
345
- $[23] = menuItemIds;
346
- $[24] = t11;
241
+ $[1] = ariaLabel;
242
+ $[2] = ariaLabelledBy;
243
+ $[3] = childRegistry;
244
+ $[4] = children;
245
+ $[5] = className;
246
+ $[6] = flush;
247
+ $[7] = gap;
248
+ $[8] = setChildRegistry;
249
+ $[9] = size;
250
+ $[10] = T0;
251
+ $[11] = t10;
252
+ $[12] = t11;
253
+ $[13] = t12;
254
+ $[14] = t13;
255
+ $[15] = t14;
256
+ $[16] = t15;
257
+ $[17] = t4;
258
+ $[18] = t5;
259
+ $[19] = t6;
260
+ $[20] = t7;
261
+ $[21] = t8;
262
+ $[22] = t9;
347
263
  } else {
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,
264
+ T0 = $[10];
265
+ t10 = $[11];
266
+ t11 = $[12];
267
+ t12 = $[13];
268
+ t13 = $[14];
269
+ t14 = $[15];
270
+ t15 = $[16];
271
+ t4 = $[17];
272
+ t5 = $[18];
273
+ t6 = $[19];
274
+ t7 = $[20];
275
+ t8 = $[21];
276
+ t9 = $[22];
277
+ }
278
+ let t16;
279
+ if ($[33] !== t10 || $[34] !== t11 || $[35] !== t4 || $[36] !== t5 || $[37] !== t6 || $[38] !== t7 || $[39] !== t8 || $[40] !== t9) {
280
+ t16 = /*#__PURE__*/jsxs("div", {
281
+ ref: t4,
282
+ role: t5,
283
+ className: t6,
284
+ "aria-label": t7,
285
+ "aria-labelledby": t8,
286
+ "data-gap": t9,
359
287
  children: [t10, t11]
360
288
  });
361
- $[25] = ariaLabel;
362
- $[26] = ariaLabelledBy;
363
- $[27] = gap;
364
- $[28] = t10;
365
- $[29] = t11;
366
- $[30] = t12;
289
+ $[33] = t10;
290
+ $[34] = t11;
291
+ $[35] = t4;
292
+ $[36] = t5;
293
+ $[37] = t6;
294
+ $[38] = t7;
295
+ $[39] = t8;
296
+ $[40] = t9;
297
+ $[41] = t16;
367
298
  } else {
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
299
+ t16 = $[41];
300
+ }
301
+ let t17;
302
+ if ($[42] !== t12 || $[43] !== t13 || $[44] !== t14 || $[45] !== t16) {
303
+ t17 = /*#__PURE__*/jsx("div", {
304
+ ref: t12,
305
+ className: t13,
306
+ "data-flush": t14,
307
+ children: t16
377
308
  });
378
- $[31] = flush;
379
- $[32] = t12;
380
- $[33] = t9;
381
- $[34] = t13;
309
+ $[42] = t12;
310
+ $[43] = t13;
311
+ $[44] = t14;
312
+ $[45] = t16;
313
+ $[46] = t17;
382
314
  } else {
383
- t13 = $[34];
315
+ t17 = $[46];
384
316
  }
385
- let t14;
386
- if ($[35] !== t13 || $[36] !== t8) {
387
- t14 = /*#__PURE__*/jsx(ActionBarContext.Provider, {
388
- value: t8,
389
- children: t13
317
+ let t18;
318
+ if ($[47] !== T0 || $[48] !== t15 || $[49] !== t17) {
319
+ t18 = /*#__PURE__*/jsx(T0, {
320
+ value: t15,
321
+ children: t17
390
322
  });
391
- $[35] = t13;
392
- $[36] = t8;
393
- $[37] = t14;
323
+ $[47] = T0;
324
+ $[48] = t15;
325
+ $[49] = t17;
326
+ $[50] = t18;
394
327
  } else {
395
- t14 = $[37];
328
+ t18 = $[50];
396
329
  }
397
- return t14;
330
+ return t18;
398
331
  };
399
- function useWidth(ref) {
400
- const $ = c(3);
401
- const [width, setWidth] = useState(-1);
332
+ function useIsOverflowing(ref) {
333
+ const $ = c(4);
402
334
  let t0;
403
- let t1;
404
335
  if ($[0] !== ref) {
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);
336
+ t0 = onChange => {
337
+ const observer = new IntersectionObserver(() => onChange(), {
338
+ threshold: 1
339
+ });
340
+ if (ref.current) {
341
+ observer.observe(ref.current);
342
+ }
343
+ return () => observer.disconnect();
408
344
  };
409
- t1 = [ref];
410
345
  $[0] = ref;
411
346
  $[1] = t0;
412
- $[2] = t1;
413
347
  } else {
414
348
  t0 = $[1];
415
- t1 = $[2];
416
349
  }
417
- useIsomorphicLayoutEffect(t0, t1);
418
- return width;
350
+ let t1;
351
+ if ($[2] !== ref) {
352
+ t1 = () => ref.current ? ref.current.offsetTop > 0 : false;
353
+ $[2] = ref;
354
+ $[3] = t1;
355
+ } else {
356
+ t1 = $[3];
357
+ }
358
+ return useSyncExternalStore(t0, t1, _temp4);
359
+ }
360
+ function _temp4() {
361
+ return false;
419
362
  }
420
363
  const ActionBarIconButton = /*#__PURE__*/forwardRef(({
421
364
  disabled,
@@ -425,13 +368,12 @@ const ActionBarIconButton = /*#__PURE__*/forwardRef(({
425
368
  const ref = useRef(null);
426
369
  useRefObjectAsForwardedRef(forwardedRef, ref);
427
370
  const {
428
- size,
429
- isVisibleChild
371
+ size
430
372
  } = React.useContext(ActionBarContext);
431
373
  const {
432
374
  groupId
433
375
  } = React.useContext(ActionBarGroupContext);
434
- const width = useWidth(ref);
376
+ const isOverflowing = useIsOverflowing(ref);
435
377
  const {
436
378
  ['aria-label']: ariaLabel,
437
379
  icon
@@ -442,22 +384,22 @@ const ActionBarIconButton = /*#__PURE__*/forwardRef(({
442
384
  icon,
443
385
  disabled: !!disabled,
444
386
  onClick: onClick,
445
- width,
446
387
  groupId: groupId !== null && groupId !== void 0 ? groupId : undefined
447
- }), [ariaLabel, icon, disabled, onClick, groupId, width]);
448
- const id = ActionBarItemsRegistry.useRegisterDescendant(registryProps);
388
+ }), [ariaLabel, icon, disabled, onClick, groupId]);
389
+ ActionBarItemsRegistry.useRegisterDescendant(isOverflowing ? registryProps : null);
449
390
  const clickHandler = useCallback(event => {
450
391
  if (disabled) return;
451
392
  onClick === null || onClick === void 0 ? void 0 : onClick(event);
452
393
  }, [disabled, onClick]);
453
- if (!isVisibleChild(id) || groupId && !isVisibleChild(groupId)) return null;
454
394
  return /*#__PURE__*/jsx(IconButton, {
455
395
  "aria-disabled": disabled,
456
396
  ref: ref,
457
397
  size: size,
458
398
  onClick: clickHandler,
459
399
  ...props,
460
- variant: "invisible"
400
+ variant: "invisible",
401
+ "data-overflowing": isOverflowing,
402
+ "aria-hidden": isOverflowing || props['aria-hidden']
461
403
  });
462
404
  });
463
405
  const ActionBarGroupContext = /*#__PURE__*/React.createContext({
@@ -470,38 +412,39 @@ const ActionBarGroup = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
470
412
  } = t0;
471
413
  const backupRef = useRef(null);
472
414
  const ref = forwardedRef !== null && forwardedRef !== void 0 ? forwardedRef : backupRef;
473
- const width = useWidth(ref);
415
+ const isOverflowing = useIsOverflowing(ref);
474
416
  let t1;
475
- if ($[0] !== width) {
417
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
476
418
  t1 = {
477
- type: "group",
478
- width
419
+ type: "group"
479
420
  };
480
- $[0] = width;
481
- $[1] = t1;
421
+ $[0] = t1;
482
422
  } else {
483
- t1 = $[1];
423
+ t1 = $[0];
484
424
  }
485
425
  const registryProps = t1;
486
- const id = ActionBarItemsRegistry.useRegisterDescendant(registryProps);
426
+ const id = ActionBarItemsRegistry.useRegisterDescendant(isOverflowing ? registryProps : null);
487
427
  let t2;
488
- if ($[2] !== id) {
428
+ if ($[1] !== id) {
489
429
  t2 = {
490
430
  groupId: id
491
431
  };
492
- $[2] = id;
493
- $[3] = t2;
432
+ $[1] = id;
433
+ $[2] = t2;
494
434
  } else {
495
- t2 = $[3];
435
+ t2 = $[2];
496
436
  }
497
437
  let t3;
498
- if ($[4] !== children || $[5] !== ref) {
438
+ if ($[3] !== children || $[4] !== isOverflowing || $[5] !== ref) {
499
439
  t3 = /*#__PURE__*/jsx("div", {
500
440
  className: styles.Group,
501
441
  ref: ref,
442
+ "data-overflowing": isOverflowing,
443
+ "aria-hidden": isOverflowing,
502
444
  children: children
503
445
  });
504
- $[4] = children;
446
+ $[3] = children;
447
+ $[4] = isOverflowing;
505
448
  $[5] = ref;
506
449
  $[6] = t3;
507
450
  } else {
@@ -522,7 +465,7 @@ const ActionBarGroup = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
522
465
  return t4;
523
466
  });
524
467
  const ActionBarMenu = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
525
- const $ = c(31);
468
+ const $ = c(32);
526
469
  let ariaLabel;
527
470
  let icon;
528
471
  let items;
@@ -555,17 +498,13 @@ const ActionBarMenu = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
555
498
  }
556
499
  const backupRef = useRef(null);
557
500
  const ref = forwardedRef !== null && forwardedRef !== void 0 ? forwardedRef : backupRef;
558
- const {
559
- isVisibleChild
560
- } = React.useContext(ActionBarContext);
561
501
  const [menuOpen, setMenuOpen] = useState(false);
562
- const width = useWidth(ref);
502
+ const isOverflowing = useIsOverflowing(ref);
563
503
  const t1 = overflowIcon ? overflowIcon : icon;
564
504
  let t2;
565
- if ($[7] !== ariaLabel || $[8] !== items || $[9] !== returnFocusRef || $[10] !== t1 || $[11] !== width) {
505
+ if ($[7] !== ariaLabel || $[8] !== items || $[9] !== returnFocusRef || $[10] !== t1) {
566
506
  t2 = {
567
507
  type: "menu",
568
- width,
569
508
  label: ariaLabel,
570
509
  icon: t1,
571
510
  returnFocusRef,
@@ -575,130 +514,125 @@ const ActionBarMenu = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
575
514
  $[8] = items;
576
515
  $[9] = returnFocusRef;
577
516
  $[10] = t1;
578
- $[11] = width;
579
- $[12] = t2;
517
+ $[11] = t2;
580
518
  } else {
581
- t2 = $[12];
519
+ t2 = $[11];
582
520
  }
583
521
  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, {
522
+ ActionBarItemsRegistry.useRegisterDescendant(isOverflowing ? registryProps : null);
523
+ const t3 = isOverflowing || props["aria-hidden"];
524
+ let t4;
525
+ if ($[12] !== ariaLabel || $[13] !== icon || $[14] !== isOverflowing || $[15] !== props || $[16] !== t3) {
526
+ t4 = /*#__PURE__*/jsx(ActionMenu.Anchor, {
591
527
  children: /*#__PURE__*/jsx(IconButton, {
592
528
  variant: "invisible",
593
529
  "aria-label": ariaLabel,
594
530
  icon: icon,
595
- ...props
531
+ ...props,
532
+ "data-overflowing": isOverflowing,
533
+ "aria-hidden": t3
596
534
  })
597
535
  });
598
- $[13] = ariaLabel;
599
- $[14] = icon;
536
+ $[12] = ariaLabel;
537
+ $[13] = icon;
538
+ $[14] = isOverflowing;
600
539
  $[15] = props;
601
540
  $[16] = t3;
541
+ $[17] = t4;
602
542
  } else {
603
- t3 = $[16];
543
+ t4 = $[17];
604
544
  }
605
- let t4;
606
- if ($[17] !== returnFocusRef) {
607
- t4 = returnFocusRef && {
545
+ let t5;
546
+ if ($[18] !== returnFocusRef) {
547
+ t5 = returnFocusRef && {
608
548
  returnFocusRef
609
549
  };
610
- $[17] = returnFocusRef;
611
- $[18] = t4;
550
+ $[18] = returnFocusRef;
551
+ $[19] = t5;
612
552
  } else {
613
- t4 = $[18];
553
+ t5 = $[19];
614
554
  }
615
- let t5;
616
- if ($[19] !== items) {
617
- t5 = items.map(_temp4);
618
- $[19] = items;
619
- $[20] = t5;
555
+ let t6;
556
+ if ($[20] !== items) {
557
+ t6 = items.map(_temp5);
558
+ $[20] = items;
559
+ $[21] = t6;
620
560
  } else {
621
- t5 = $[20];
561
+ t6 = $[21];
622
562
  }
623
- let t6;
624
- if ($[21] !== t5) {
625
- t6 = /*#__PURE__*/jsx(ActionList, {
626
- children: t5
563
+ let t7;
564
+ if ($[22] !== t6) {
565
+ t7 = /*#__PURE__*/jsx(ActionList, {
566
+ children: t6
627
567
  });
628
- $[21] = t5;
629
568
  $[22] = t6;
569
+ $[23] = t7;
630
570
  } else {
631
- t6 = $[22];
571
+ t7 = $[23];
632
572
  }
633
- let t7;
634
- if ($[23] !== t4 || $[24] !== t6) {
635
- t7 = /*#__PURE__*/jsx(ActionMenu.Overlay, {
636
- ...t4,
637
- children: t6
573
+ let t8;
574
+ if ($[24] !== t5 || $[25] !== t7) {
575
+ t8 = /*#__PURE__*/jsx(ActionMenu.Overlay, {
576
+ ...t5,
577
+ children: t7
638
578
  });
639
- $[23] = t4;
640
- $[24] = t6;
579
+ $[24] = t5;
641
580
  $[25] = t7;
581
+ $[26] = t8;
642
582
  } else {
643
- t7 = $[25];
583
+ t8 = $[26];
644
584
  }
645
- let t8;
646
- if ($[26] !== menuOpen || $[27] !== ref || $[28] !== t3 || $[29] !== t7) {
647
- t8 = /*#__PURE__*/jsxs(ActionMenu, {
585
+ let t9;
586
+ if ($[27] !== menuOpen || $[28] !== ref || $[29] !== t4 || $[30] !== t8) {
587
+ t9 = /*#__PURE__*/jsxs(ActionMenu, {
648
588
  anchorRef: ref,
649
589
  open: menuOpen,
650
590
  onOpenChange: setMenuOpen,
651
- children: [t3, t7]
591
+ children: [t4, t8]
652
592
  });
653
- $[26] = menuOpen;
654
- $[27] = ref;
655
- $[28] = t3;
656
- $[29] = t7;
593
+ $[27] = menuOpen;
594
+ $[28] = ref;
595
+ $[29] = t4;
657
596
  $[30] = t8;
597
+ $[31] = t9;
658
598
  } else {
659
- t8 = $[30];
599
+ t9 = $[31];
660
600
  }
661
- return t8;
601
+ return t9;
662
602
  });
663
603
  const VerticalDivider = () => {
664
604
  const $ = c(3);
665
605
  const ref = useRef(null);
666
- const {
667
- isVisibleChild
668
- } = React.useContext(ActionBarContext);
669
- const width = useWidth(ref);
606
+ const isOverflowing = useIsOverflowing(ref);
670
607
  let t0;
671
- if ($[0] !== width) {
608
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
672
609
  t0 = {
673
- type: "divider",
674
- width
610
+ type: "divider"
675
611
  };
676
- $[0] = width;
677
- $[1] = t0;
612
+ $[0] = t0;
678
613
  } else {
679
- t0 = $[1];
614
+ t0 = $[0];
680
615
  }
681
616
  const registryProps = t0;
682
- const id = ActionBarItemsRegistry.useRegisterDescendant(registryProps);
683
- if (!isVisibleChild(id)) {
684
- return null;
685
- }
617
+ ActionBarItemsRegistry.useRegisterDescendant(isOverflowing ? registryProps : null);
686
618
  let t1;
687
- if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
619
+ if ($[1] !== isOverflowing) {
688
620
  t1 = /*#__PURE__*/jsx("div", {
689
621
  ref: ref,
690
622
  "data-component": "ActionBar.VerticalDivider",
691
623
  "aria-hidden": "true",
692
- className: styles.Divider
624
+ className: styles.Divider,
625
+ "data-overflowing": isOverflowing
693
626
  });
627
+ $[1] = isOverflowing;
694
628
  $[2] = t1;
695
629
  } else {
696
630
  t1 = $[2];
697
631
  }
698
632
  return t1;
699
633
  };
700
- function _temp() {
701
- return new Set();
634
+ function _temp(entry) {
635
+ return entry[1] !== null;
702
636
  }
703
637
  function _temp2(item, index) {
704
638
  return renderMenuItem(item, index);
@@ -724,7 +658,7 @@ function _temp3(t0) {
724
658
  }
725
659
  return null;
726
660
  }
727
- function _temp4(item, index) {
661
+ function _temp5(item, index) {
728
662
  return renderMenuItem(item, index);
729
663
  }
730
664
 
@@ -1,5 +1,5 @@
1
- import './ActionBar-a41224b2.css';
1
+ import './ActionBar-fbb539a4.css';
2
2
 
3
- var styles = {"List":"prc-ActionBar-List-9uz46","Divider":"prc-ActionBar-Divider-6V8yH","Nav":"prc-ActionBar-Nav-9spON","Group":"prc-ActionBar-Group-peNCk"};
3
+ var styles = {"List":"prc-ActionBar-List-9uz46","Divider":"prc-ActionBar-Divider-6V8yH","Nav":"prc-ActionBar-Nav-9spON","Group":"prc-ActionBar-Group-peNCk","OverflowContainer":"prc-ActionBar-OverflowContainer-AkYZs"};
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 | null;
4
+ Divider: () => import("react").JSX.Element;
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;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 */
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 */
@@ -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,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"]}
@@ -1,4 +1,4 @@
1
- import './Overlay-dbaa6b8c.css';
1
+ import './Overlay-15519c09.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-20260311175839",
4
+ "version": "0.0.0-20260311182527",
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 +0,0 @@
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"]}
@@ -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,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"]}