@primer/react 0.0.0-20260407174851 → 0.0.0-20260407180202
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 +2 -4
- package/dist/ActionBar/ActionBar-3f7b52a3.css +2 -0
- package/dist/ActionBar/ActionBar-3f7b52a3.css.map +1 -0
- package/dist/ActionBar/ActionBar.d.ts +1 -1
- package/dist/ActionBar/ActionBar.d.ts.map +1 -1
- package/dist/ActionBar/ActionBar.js +312 -367
- package/dist/ActionBar/ActionBar.module.css.js +2 -2
- package/dist/ActionBar/index.d.ts +1 -1
- package/dist/ActionMenu/ActionMenu-58362ca7.css +2 -0
- package/dist/ActionMenu/ActionMenu-58362ca7.css.map +1 -0
- package/dist/ActionMenu/ActionMenu.d.ts.map +1 -1
- package/dist/ActionMenu/ActionMenu.js +5 -0
- package/dist/ActionMenu/ActionMenu.module.css.js +1 -1
- package/dist/FeatureFlags/DefaultFeatureFlags.d.ts.map +1 -1
- package/dist/FeatureFlags/DefaultFeatureFlags.js +2 -1
- package/dist/Overlay/Overlay-f81a131d.css +2 -0
- package/dist/Overlay/Overlay-f81a131d.css.map +1 -0
- package/dist/Overlay/Overlay.d.ts.map +1 -1
- package/dist/Overlay/Overlay.js +36 -23
- package/dist/Overlay/Overlay.module.css.js +1 -1
- package/package.json +1 -1
- package/dist/ActionBar/ActionBar-a41224b2.css +0 -2
- package/dist/ActionBar/ActionBar-a41224b2.css.map +0 -1
- package/dist/ActionMenu/ActionMenu-c4e2a589.css +0 -2
- package/dist/ActionMenu/ActionMenu-c4e2a589.css.map +0 -1
- package/dist/Overlay/Overlay-30b84506.css +0 -2
- package/dist/Overlay/Overlay-30b84506.css.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
# @primer/react
|
|
2
2
|
|
|
3
|
-
## 0.0.0-
|
|
3
|
+
## 0.0.0-20260407180202
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
7
|
-
- [#
|
|
8
|
-
|
|
9
|
-
The max-height of overlays is now clamped to the viewport height by default using `min(size, 100dvh)`. This prevents overlays from extending beyond the viewport on smaller screens.
|
|
7
|
+
- [#7655](https://github.com/primer/react/pull/7655) [`8f1f205`](https://github.com/primer/react/commit/8f1f205a637939eb167095b4ac766cf6524ac558) Thanks [@iansan5653](https://github.com/iansan5653)! - Replace `ActionBar` overflow calculations with CSS wrapping approach to improve performance and stability
|
|
10
8
|
|
|
11
9
|
- [#7677](https://github.com/primer/react/pull/7677) [`c1a81b1`](https://github.com/primer/react/commit/c1a81b178742ba547b85a3df3ed3c27bcff6b7c5) Thanks [@TylerJDev](https://github.com/TylerJDev)! - AnchoredOverlay: Add Popover API to AnchoredOverlay (behind `primer_react_css_anchor_positioning` feature flag)
|
|
12
10
|
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
.prc-ActionBar-List-9uz46{align-items:flex-start;display:flex;gap:var(--actionbar-gap,var(--stack-gap-condensed,.5rem));height:var(--actionbar-height,var(--control-small-size,1.75rem));list-style:none;margin-bottom:-1px;min-width:0;overflow:hidden;position:relative}.prc-ActionBar-List-9uz46:not([data-has-overflow]){animation:prc-ActionBar-detect-overflow-mAuJu linear;animation-timeline:scroll(self block)}.prc-ActionBar-List-9uz46[data-has-overflow=true]{--morebutton-display:flex}.prc-ActionBar-List-9uz46:where([data-size=small]){--actionbar-height:var(--control-small-size,1.75rem)}.prc-ActionBar-List-9uz46:where([data-size=medium]){--actionbar-height:var(--control-medium-size,2rem)}.prc-ActionBar-List-9uz46:where([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)}.prc-ActionBar-List-9uz46 [data-overflowing]{visibility:hidden!important}@keyframes prc-ActionBar-detect-overflow-mAuJu{0%,to{--morebutton-display:flex}}.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;overflow:hidden}.prc-ActionBar-MoreButton-RHqpx{display:var(--morebutton-display,none)}
|
|
2
|
+
/*# sourceMappingURL=ActionBar-3f7b52a3.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/ActionBar/ActionBar.module.css.js"],"names":[],"mappings":"AAAA,0BASE,sBAAuB,CAPvB,YAAa,CAQb,yDAAqD,CAGrD,gEAA0D,CAL1D,eAAgB,CADhB,kBAAmB,CAJnB,WAAY,CAQZ,eAAgB,CAVhB,iBA2DF,CA5CE,mDAIE,oDAAiC,CACjC,qCACF,CAGA,kDACE,yBACF,CAEA,mDACE,oDACF,CAEA,oDACE,kDACF,CAEA,mDACE,mDACF,CAGA,iDACE,iBAKF,CAHE,8EACE,kCACF,CAGF,sDACE,iDACF,CAEA,6CAIE,2BACF,CAGF,+CACE,MAEE,yBACF,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,WASF,CANA,uCAEE,cAAe,CAEf,wBAAyB,CACzB,eACF,CAEA,gCACE,sCACF","file":"ActionBar-3f7b52a3.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 list-style: none;\n align-items: flex-start;\n gap: var(--actionbar-gap, var(--stack-gap-condensed));\n overflow: hidden;\n /* Explicit height is required to clip wrapped items */\n height: var(--actionbar-height, var(--control-small-size));\n\n /* Only apply scroll animation before overflow is calculated (for SSR/initial render) */\n &:not([data-has-overflow]) {\n /* Scroll-based animations have no effect unless the container is scrollable (has overflow, even with overflow:hidden)\n so we can use them to detect overflow. It would be cleaner to use scroll-state container queries for this, but\n browser support for scroll-driven animations is slightly better. */\n animation: detect-overflow linear;\n animation-timeline: scroll(self block);\n }\n\n /* After initial render, JS is used to control visibility which provides progressive enhancement for unsupported browsers */\n &[data-has-overflow='true'] {\n --morebutton-display: flex;\n }\n\n &:where([data-size='small']) {\n --actionbar-height: var(--control-small-size);\n }\n\n &:where([data-size='medium']) {\n --actionbar-height: var(--control-medium-size);\n }\n\n &:where([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 & [data-overflowing] {\n /* Hide overflowing items. Even though they are clipped by `overflow: hidden`, setting `visibility: hidden` ensures\n they can't accidentally be shown and also hides them from screen readers / keyboard nav. `!important` prevents\n consumers from unintentionally overriding this and breaking accessibility. */\n visibility: hidden !important;\n }\n}\n\n@keyframes detect-overflow {\n 0%,\n 100% {\n --morebutton-display: flex;\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 overflow: hidden;\n}\n\n.MoreButton {\n display: var(--morebutton-display, none);\n}\n"]}
|
|
@@ -120,6 +120,6 @@ export declare const ActionBarMenu: React.ForwardRefExoticComponent<{
|
|
|
120
120
|
keyshortcuts?: string;
|
|
121
121
|
keybindingHint?: string | 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;
|
|
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,
|
|
1
|
+
{"version":3,"file":"ActionBar.d.ts","sourceRoot":"","sources":["../../src/ActionBar/ActionBar.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1,29 +1,19 @@
|
|
|
1
1
|
import { c } from 'react-compiler-runtime';
|
|
2
|
-
import React, { useRef,
|
|
2
|
+
import React, { useRef, forwardRef, useState, useMemo, useCallback, useContext, 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';
|
|
10
8
|
import { clsx } from 'clsx';
|
|
11
9
|
import { createDescendantRegistry } from '../utils/descendant-registry.js';
|
|
12
|
-
import {
|
|
10
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
13
11
|
import { useMergedRefs } from '../hooks/useMergedRefs.js';
|
|
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(
|
|
74
|
+
const $ = c(41);
|
|
137
75
|
const {
|
|
138
76
|
size: t0,
|
|
139
77
|
children,
|
|
@@ -147,276 +85,273 @@ 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
|
-
if ($[0]
|
|
156
|
-
t3 = ()
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
}
|
|
160
|
-
const g = window.getComputedStyle(listRef.current).gap;
|
|
161
|
-
const parsed = parseFloat(g);
|
|
162
|
-
if (!Number.isNaN(parsed)) {
|
|
163
|
-
setComputedGap(parsed);
|
|
164
|
-
}
|
|
165
|
-
};
|
|
166
|
-
$[0] = t3;
|
|
91
|
+
if ($[0] !== childRegistry) {
|
|
92
|
+
t3 = childRegistry === null || childRegistry === void 0 ? void 0 : childRegistry.values().every(_temp);
|
|
93
|
+
$[0] = childRegistry;
|
|
94
|
+
$[1] = t3;
|
|
167
95
|
} else {
|
|
168
|
-
t3 = $[
|
|
96
|
+
t3 = $[1];
|
|
169
97
|
}
|
|
170
98
|
let t4;
|
|
171
|
-
if ($[
|
|
172
|
-
t4 =
|
|
173
|
-
|
|
99
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
100
|
+
t4 = (direction, from) => {
|
|
101
|
+
var _listRef$current$quer, _listRef$current;
|
|
102
|
+
const items = Array.from((_listRef$current$quer = (_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.querySelectorAll(":is(button, a, input, [tabindex]):not(:disabled):not([data-overflowing]):not([data-more-button-inactive])")) !== null && _listRef$current$quer !== void 0 ? _listRef$current$quer : []);
|
|
103
|
+
const fromIndex = from ? items.indexOf(from) : -1;
|
|
104
|
+
switch (direction) {
|
|
105
|
+
case "start":
|
|
106
|
+
{
|
|
107
|
+
return items[0];
|
|
108
|
+
}
|
|
109
|
+
case "end":
|
|
110
|
+
{
|
|
111
|
+
return items.at(-1);
|
|
112
|
+
}
|
|
113
|
+
case "next":
|
|
114
|
+
{
|
|
115
|
+
var _items;
|
|
116
|
+
return (_items = items[fromIndex + 1]) !== null && _items !== void 0 ? _items : items[0];
|
|
117
|
+
}
|
|
118
|
+
case "previous":
|
|
119
|
+
{
|
|
120
|
+
var _items2;
|
|
121
|
+
return (_items2 = items[fromIndex - 1]) !== null && _items2 !== void 0 ? _items2 : items.at(-1);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
};
|
|
174
125
|
$[2] = t4;
|
|
175
126
|
} else {
|
|
176
127
|
t4 = $[2];
|
|
177
128
|
}
|
|
178
|
-
useIsomorphicLayoutEffect(t3, t4);
|
|
179
|
-
const moreMenuRef = useRef(null);
|
|
180
129
|
let t5;
|
|
181
|
-
if ($[3] !==
|
|
182
|
-
t5 =
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
const newMenuItemIds = getMenuItems(navWidth, moreMenuWidth, childRegistry, hasActiveMenu, computedGap);
|
|
189
|
-
if (newMenuItemIds) {
|
|
190
|
-
setMenuItemIds(newMenuItemIds);
|
|
191
|
-
}
|
|
192
|
-
}
|
|
130
|
+
if ($[3] !== t3) {
|
|
131
|
+
t5 = {
|
|
132
|
+
containerRef: listRef,
|
|
133
|
+
bindKeys: FocusKeys.ArrowHorizontal | FocusKeys.HomeAndEnd,
|
|
134
|
+
focusOutBehavior: "wrap",
|
|
135
|
+
disabled: t3,
|
|
136
|
+
getNextFocusable: t4
|
|
193
137
|
};
|
|
194
|
-
$[3] =
|
|
195
|
-
$[4] =
|
|
196
|
-
$[5] = menuItemIds.size;
|
|
197
|
-
$[6] = t5;
|
|
138
|
+
$[3] = t3;
|
|
139
|
+
$[4] = t5;
|
|
198
140
|
} else {
|
|
199
|
-
t5 = $[
|
|
141
|
+
t5 = $[4];
|
|
200
142
|
}
|
|
201
|
-
|
|
143
|
+
useFocusZone(t5);
|
|
202
144
|
let t6;
|
|
203
|
-
if ($[
|
|
204
|
-
t6 =
|
|
205
|
-
$[
|
|
206
|
-
$[
|
|
145
|
+
if ($[5] !== childRegistry) {
|
|
146
|
+
t6 = childRegistry && Array.from(childRegistry.entries()).filter(_temp2);
|
|
147
|
+
$[5] = childRegistry;
|
|
148
|
+
$[6] = t6;
|
|
207
149
|
} else {
|
|
208
|
-
t6 = $[
|
|
150
|
+
t6 = $[6];
|
|
209
151
|
}
|
|
210
|
-
const
|
|
152
|
+
const overflowItems = t6;
|
|
211
153
|
let t7;
|
|
212
|
-
if ($[
|
|
154
|
+
if ($[7] !== size) {
|
|
213
155
|
t7 = {
|
|
214
|
-
|
|
215
|
-
bindKeys: FocusKeys.ArrowHorizontal | FocusKeys.HomeAndEnd,
|
|
216
|
-
focusOutBehavior: "wrap"
|
|
156
|
+
size
|
|
217
157
|
};
|
|
218
|
-
$[
|
|
219
|
-
|
|
220
|
-
t7 = $[9];
|
|
221
|
-
}
|
|
222
|
-
useFocusZone(t7);
|
|
223
|
-
let groupedItemsMap;
|
|
224
|
-
if ($[10] !== childRegistry) {
|
|
225
|
-
groupedItemsMap = new Map();
|
|
226
|
-
for (const [key, childProps] of childRegistry !== null && childRegistry !== void 0 ? childRegistry : []) {
|
|
227
|
-
if (childProps.type === "action" && childProps.groupId) {
|
|
228
|
-
const existingGroup = groupedItemsMap.get(childProps.groupId) || [];
|
|
229
|
-
existingGroup.push([key, childProps]);
|
|
230
|
-
groupedItemsMap.set(childProps.groupId, existingGroup);
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
$[10] = childRegistry;
|
|
234
|
-
$[11] = groupedItemsMap;
|
|
158
|
+
$[7] = size;
|
|
159
|
+
$[8] = t7;
|
|
235
160
|
} else {
|
|
236
|
-
|
|
161
|
+
t7 = $[8];
|
|
237
162
|
}
|
|
238
|
-
const groupedItems = groupedItemsMap;
|
|
239
163
|
let t8;
|
|
240
|
-
if ($[
|
|
241
|
-
t8 =
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
};
|
|
245
|
-
$[12] = isVisibleChild;
|
|
246
|
-
$[13] = size;
|
|
247
|
-
$[14] = t8;
|
|
164
|
+
if ($[9] !== className) {
|
|
165
|
+
t8 = clsx(className, styles.Nav);
|
|
166
|
+
$[9] = className;
|
|
167
|
+
$[10] = t8;
|
|
248
168
|
} else {
|
|
249
|
-
t8 = $[
|
|
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];
|
|
169
|
+
t8 = $[10];
|
|
258
170
|
}
|
|
171
|
+
const t9 = overflowItems ? overflowItems.length > 0 : undefined;
|
|
259
172
|
let t10;
|
|
260
|
-
if ($[
|
|
261
|
-
t10 = /*#__PURE__*/jsx(
|
|
262
|
-
|
|
263
|
-
children: children
|
|
264
|
-
});
|
|
265
|
-
$[17] = children;
|
|
266
|
-
$[18] = setChildRegistry;
|
|
267
|
-
$[19] = t10;
|
|
173
|
+
if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
|
|
174
|
+
t10 = /*#__PURE__*/jsx("div", {});
|
|
175
|
+
$[11] = t10;
|
|
268
176
|
} else {
|
|
269
|
-
t10 = $[
|
|
177
|
+
t10 = $[11];
|
|
270
178
|
}
|
|
271
179
|
let t11;
|
|
272
|
-
if ($[
|
|
273
|
-
t11 =
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
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
|
-
})
|
|
180
|
+
if ($[12] !== children || $[13] !== setChildRegistry) {
|
|
181
|
+
t11 = /*#__PURE__*/jsxs("div", {
|
|
182
|
+
className: styles.OverflowContainer,
|
|
183
|
+
children: [t10, /*#__PURE__*/jsx(ActionBarItemsRegistry.Provider, {
|
|
184
|
+
setRegistry: setChildRegistry,
|
|
185
|
+
children: children
|
|
340
186
|
})]
|
|
341
187
|
});
|
|
342
|
-
$[
|
|
343
|
-
$[
|
|
344
|
-
$[
|
|
345
|
-
$[23] = menuItemIds;
|
|
346
|
-
$[24] = t11;
|
|
188
|
+
$[12] = children;
|
|
189
|
+
$[13] = setChildRegistry;
|
|
190
|
+
$[14] = t11;
|
|
347
191
|
} else {
|
|
348
|
-
t11 = $[
|
|
192
|
+
t11 = $[14];
|
|
349
193
|
}
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
194
|
+
const t12 = `More ${ariaLabel} items ${overflowItems === null || overflowItems === void 0 ? void 0 : overflowItems.length}`;
|
|
195
|
+
const t13 = overflowItems !== null && overflowItems !== void 0 && overflowItems.length ? undefined : true;
|
|
196
|
+
let t14;
|
|
197
|
+
if ($[15] !== size || $[16] !== t12 || $[17] !== t13) {
|
|
198
|
+
t14 = /*#__PURE__*/jsx(ActionMenu.Anchor, {
|
|
199
|
+
children: /*#__PURE__*/jsx(IconButton, {
|
|
200
|
+
variant: "invisible",
|
|
201
|
+
"aria-label": t12,
|
|
202
|
+
icon: KebabHorizontalIcon,
|
|
203
|
+
className: styles.MoreButton,
|
|
204
|
+
"data-more-button-inactive": t13,
|
|
205
|
+
size: size
|
|
206
|
+
})
|
|
207
|
+
});
|
|
208
|
+
$[15] = size;
|
|
209
|
+
$[16] = t12;
|
|
210
|
+
$[17] = t13;
|
|
211
|
+
$[18] = t14;
|
|
212
|
+
} else {
|
|
213
|
+
t14 = $[18];
|
|
214
|
+
}
|
|
215
|
+
let t15;
|
|
216
|
+
if ($[19] !== overflowItems) {
|
|
217
|
+
t15 = overflowItems === null || overflowItems === void 0 ? void 0 : overflowItems.map(_temp4);
|
|
218
|
+
$[19] = overflowItems;
|
|
219
|
+
$[20] = t15;
|
|
220
|
+
} else {
|
|
221
|
+
t15 = $[20];
|
|
222
|
+
}
|
|
223
|
+
let t16;
|
|
224
|
+
if ($[21] !== t15) {
|
|
225
|
+
t16 = /*#__PURE__*/jsx(ActionMenu.Overlay, {
|
|
226
|
+
children: /*#__PURE__*/jsx(ActionList, {
|
|
227
|
+
children: t15
|
|
228
|
+
})
|
|
229
|
+
});
|
|
230
|
+
$[21] = t15;
|
|
231
|
+
$[22] = t16;
|
|
232
|
+
} else {
|
|
233
|
+
t16 = $[22];
|
|
234
|
+
}
|
|
235
|
+
let t17;
|
|
236
|
+
if ($[23] !== t14 || $[24] !== t16) {
|
|
237
|
+
t17 = /*#__PURE__*/jsxs(ActionMenu, {
|
|
238
|
+
children: [t14, t16]
|
|
239
|
+
});
|
|
240
|
+
$[23] = t14;
|
|
241
|
+
$[24] = t16;
|
|
242
|
+
$[25] = t17;
|
|
243
|
+
} else {
|
|
244
|
+
t17 = $[25];
|
|
245
|
+
}
|
|
246
|
+
let t18;
|
|
247
|
+
if ($[26] !== ariaLabel || $[27] !== ariaLabelledBy || $[28] !== gap || $[29] !== size || $[30] !== t11 || $[31] !== t17 || $[32] !== t9) {
|
|
248
|
+
t18 = /*#__PURE__*/jsxs("div", {
|
|
353
249
|
ref: listRef,
|
|
354
250
|
role: "toolbar",
|
|
355
251
|
className: styles.List,
|
|
356
252
|
"aria-label": ariaLabel,
|
|
357
253
|
"aria-labelledby": ariaLabelledBy,
|
|
358
254
|
"data-gap": gap,
|
|
359
|
-
|
|
255
|
+
"data-size": size,
|
|
256
|
+
"data-has-overflow": t9,
|
|
257
|
+
children: [t11, t17]
|
|
360
258
|
});
|
|
361
|
-
$[
|
|
362
|
-
$[
|
|
363
|
-
$[
|
|
364
|
-
$[
|
|
365
|
-
$[
|
|
366
|
-
$[
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
259
|
+
$[26] = ariaLabel;
|
|
260
|
+
$[27] = ariaLabelledBy;
|
|
261
|
+
$[28] = gap;
|
|
262
|
+
$[29] = size;
|
|
263
|
+
$[30] = t11;
|
|
264
|
+
$[31] = t17;
|
|
265
|
+
$[32] = t9;
|
|
266
|
+
$[33] = t18;
|
|
267
|
+
} else {
|
|
268
|
+
t18 = $[33];
|
|
269
|
+
}
|
|
270
|
+
let t19;
|
|
271
|
+
if ($[34] !== flush || $[35] !== t18 || $[36] !== t8) {
|
|
272
|
+
t19 = /*#__PURE__*/jsx("div", {
|
|
373
273
|
ref: navRef,
|
|
374
|
-
className:
|
|
274
|
+
className: t8,
|
|
375
275
|
"data-flush": flush,
|
|
376
|
-
children:
|
|
276
|
+
children: t18
|
|
377
277
|
});
|
|
378
|
-
$[
|
|
379
|
-
$[
|
|
380
|
-
$[
|
|
381
|
-
$[
|
|
278
|
+
$[34] = flush;
|
|
279
|
+
$[35] = t18;
|
|
280
|
+
$[36] = t8;
|
|
281
|
+
$[37] = t19;
|
|
382
282
|
} else {
|
|
383
|
-
|
|
283
|
+
t19 = $[37];
|
|
384
284
|
}
|
|
385
|
-
let
|
|
386
|
-
if ($[
|
|
387
|
-
|
|
388
|
-
value:
|
|
389
|
-
children:
|
|
285
|
+
let t20;
|
|
286
|
+
if ($[38] !== t19 || $[39] !== t7) {
|
|
287
|
+
t20 = /*#__PURE__*/jsx(ActionBarContext.Provider, {
|
|
288
|
+
value: t7,
|
|
289
|
+
children: t19
|
|
390
290
|
});
|
|
391
|
-
$[
|
|
392
|
-
$[
|
|
393
|
-
$[
|
|
291
|
+
$[38] = t19;
|
|
292
|
+
$[39] = t7;
|
|
293
|
+
$[40] = t20;
|
|
394
294
|
} else {
|
|
395
|
-
|
|
295
|
+
t20 = $[40];
|
|
396
296
|
}
|
|
397
|
-
return
|
|
297
|
+
return t20;
|
|
398
298
|
};
|
|
399
|
-
function
|
|
400
|
-
|
|
401
|
-
const
|
|
299
|
+
function useActionBarItem(ref, registryProps) {
|
|
300
|
+
var _useContext;
|
|
301
|
+
const $ = c(8);
|
|
302
|
+
const isGroupOverflowing = (_useContext = useContext(ActionBarGroupContext)) === null || _useContext === void 0 ? void 0 : _useContext.isOverflowing;
|
|
303
|
+
const isInGroup = isGroupOverflowing !== undefined;
|
|
402
304
|
let t0;
|
|
305
|
+
if ($[0] !== isInGroup || $[1] !== ref) {
|
|
306
|
+
t0 = onChange => {
|
|
307
|
+
if (isInGroup) {
|
|
308
|
+
return _temp5;
|
|
309
|
+
}
|
|
310
|
+
const observer = new IntersectionObserver(() => onChange(), {
|
|
311
|
+
threshold: 1
|
|
312
|
+
});
|
|
313
|
+
if (ref.current) {
|
|
314
|
+
observer.observe(ref.current);
|
|
315
|
+
}
|
|
316
|
+
return () => observer.disconnect();
|
|
317
|
+
};
|
|
318
|
+
$[0] = isInGroup;
|
|
319
|
+
$[1] = ref;
|
|
320
|
+
$[2] = t0;
|
|
321
|
+
} else {
|
|
322
|
+
t0 = $[2];
|
|
323
|
+
}
|
|
324
|
+
const subscribeIntersectionObserver = t0;
|
|
403
325
|
let t1;
|
|
404
|
-
if ($[
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
326
|
+
if ($[3] !== ref) {
|
|
327
|
+
t1 = () => ref.current ? ref.current.offsetTop > 0 : false;
|
|
328
|
+
$[3] = ref;
|
|
329
|
+
$[4] = t1;
|
|
330
|
+
} else {
|
|
331
|
+
t1 = $[4];
|
|
332
|
+
}
|
|
333
|
+
const isItemOverflowing = useSyncExternalStore(subscribeIntersectionObserver, t1, _temp6);
|
|
334
|
+
const isOverflowing = isGroupOverflowing || isItemOverflowing;
|
|
335
|
+
ActionBarItemsRegistry.useRegisterDescendant(isOverflowing ? registryProps : null);
|
|
336
|
+
const t2 = isOverflowing ? "" : undefined;
|
|
337
|
+
let t3;
|
|
338
|
+
if ($[5] !== isOverflowing || $[6] !== t2) {
|
|
339
|
+
t3 = {
|
|
340
|
+
isOverflowing,
|
|
341
|
+
dataOverflowingAttr: t2
|
|
408
342
|
};
|
|
409
|
-
|
|
410
|
-
$[
|
|
411
|
-
$[
|
|
412
|
-
$[2] = t1;
|
|
343
|
+
$[5] = isOverflowing;
|
|
344
|
+
$[6] = t2;
|
|
345
|
+
$[7] = t3;
|
|
413
346
|
} else {
|
|
414
|
-
|
|
415
|
-
t1 = $[2];
|
|
347
|
+
t3 = $[7];
|
|
416
348
|
}
|
|
417
|
-
|
|
418
|
-
return width;
|
|
349
|
+
return t3;
|
|
419
350
|
}
|
|
351
|
+
function _temp6() {
|
|
352
|
+
return false;
|
|
353
|
+
}
|
|
354
|
+
function _temp5() {}
|
|
420
355
|
const ActionBarIconButton = /*#__PURE__*/forwardRef(({
|
|
421
356
|
disabled,
|
|
422
357
|
onClick,
|
|
@@ -425,44 +360,36 @@ const ActionBarIconButton = /*#__PURE__*/forwardRef(({
|
|
|
425
360
|
const ref = useRef(null);
|
|
426
361
|
const mergedRef = useMergedRefs(ref, forwardedRef);
|
|
427
362
|
const {
|
|
428
|
-
size
|
|
429
|
-
isVisibleChild
|
|
363
|
+
size
|
|
430
364
|
} = React.useContext(ActionBarContext);
|
|
431
|
-
const {
|
|
432
|
-
groupId
|
|
433
|
-
} = React.useContext(ActionBarGroupContext);
|
|
434
|
-
const width = useWidth(ref);
|
|
435
365
|
const {
|
|
436
366
|
['aria-label']: ariaLabel,
|
|
437
367
|
icon
|
|
438
368
|
} = props;
|
|
439
|
-
const
|
|
369
|
+
const {
|
|
370
|
+
dataOverflowingAttr
|
|
371
|
+
} = useActionBarItem(ref, useMemo(() => ({
|
|
440
372
|
type: 'action',
|
|
441
373
|
label: ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : '',
|
|
442
374
|
icon,
|
|
443
375
|
disabled: !!disabled,
|
|
444
|
-
onClick: onClick
|
|
445
|
-
|
|
446
|
-
groupId: groupId !== null && groupId !== void 0 ? groupId : undefined
|
|
447
|
-
}), [ariaLabel, icon, disabled, onClick, groupId, width]);
|
|
448
|
-
const id = ActionBarItemsRegistry.useRegisterDescendant(registryProps);
|
|
376
|
+
onClick: onClick
|
|
377
|
+
}), [ariaLabel, icon, disabled, onClick]));
|
|
449
378
|
const clickHandler = useCallback(event => {
|
|
450
379
|
if (disabled) return;
|
|
451
380
|
onClick === null || onClick === void 0 ? void 0 : onClick(event);
|
|
452
381
|
}, [disabled, onClick]);
|
|
453
|
-
if (!isVisibleChild(id) || groupId && !isVisibleChild(groupId)) return null;
|
|
454
382
|
return /*#__PURE__*/jsx(IconButton, {
|
|
455
383
|
"aria-disabled": disabled,
|
|
456
384
|
ref: mergedRef,
|
|
457
385
|
size: size,
|
|
458
386
|
onClick: clickHandler,
|
|
459
387
|
...props,
|
|
460
|
-
variant: "invisible"
|
|
388
|
+
variant: "invisible",
|
|
389
|
+
"data-overflowing": dataOverflowingAttr
|
|
461
390
|
});
|
|
462
391
|
});
|
|
463
|
-
const ActionBarGroupContext = /*#__PURE__*/React.createContext(
|
|
464
|
-
groupId: null
|
|
465
|
-
});
|
|
392
|
+
const ActionBarGroupContext = /*#__PURE__*/React.createContext(null);
|
|
466
393
|
const ActionBarGroup = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
467
394
|
const $ = c(10);
|
|
468
395
|
const {
|
|
@@ -470,38 +397,39 @@ const ActionBarGroup = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
|
470
397
|
} = t0;
|
|
471
398
|
const backupRef = useRef(null);
|
|
472
399
|
const ref = forwardedRef !== null && forwardedRef !== void 0 ? forwardedRef : backupRef;
|
|
473
|
-
const width = useWidth(ref);
|
|
474
400
|
let t1;
|
|
475
|
-
if ($[0]
|
|
401
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
476
402
|
t1 = {
|
|
477
|
-
type: "group"
|
|
478
|
-
width
|
|
403
|
+
type: "group"
|
|
479
404
|
};
|
|
480
|
-
$[0] =
|
|
481
|
-
$[1] = t1;
|
|
405
|
+
$[0] = t1;
|
|
482
406
|
} else {
|
|
483
|
-
t1 = $[
|
|
407
|
+
t1 = $[0];
|
|
484
408
|
}
|
|
485
|
-
const
|
|
486
|
-
|
|
409
|
+
const {
|
|
410
|
+
dataOverflowingAttr,
|
|
411
|
+
isOverflowing
|
|
412
|
+
} = useActionBarItem(ref, t1);
|
|
487
413
|
let t2;
|
|
488
|
-
if ($[
|
|
414
|
+
if ($[1] !== isOverflowing) {
|
|
489
415
|
t2 = {
|
|
490
|
-
|
|
416
|
+
isOverflowing
|
|
491
417
|
};
|
|
492
|
-
$[
|
|
493
|
-
$[
|
|
418
|
+
$[1] = isOverflowing;
|
|
419
|
+
$[2] = t2;
|
|
494
420
|
} else {
|
|
495
|
-
t2 = $[
|
|
421
|
+
t2 = $[2];
|
|
496
422
|
}
|
|
497
423
|
let t3;
|
|
498
|
-
if ($[
|
|
424
|
+
if ($[3] !== children || $[4] !== dataOverflowingAttr || $[5] !== ref) {
|
|
499
425
|
t3 = /*#__PURE__*/jsx("div", {
|
|
500
426
|
className: styles.Group,
|
|
501
427
|
ref: ref,
|
|
428
|
+
"data-overflowing": dataOverflowingAttr,
|
|
502
429
|
children: children
|
|
503
430
|
});
|
|
504
|
-
$[
|
|
431
|
+
$[3] = children;
|
|
432
|
+
$[4] = dataOverflowingAttr;
|
|
505
433
|
$[5] = ref;
|
|
506
434
|
$[6] = t3;
|
|
507
435
|
} else {
|
|
@@ -555,17 +483,12 @@ const ActionBarMenu = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
|
555
483
|
}
|
|
556
484
|
const backupRef = useRef(null);
|
|
557
485
|
const ref = forwardedRef !== null && forwardedRef !== void 0 ? forwardedRef : backupRef;
|
|
558
|
-
const {
|
|
559
|
-
isVisibleChild
|
|
560
|
-
} = React.useContext(ActionBarContext);
|
|
561
486
|
const [menuOpen, setMenuOpen] = useState(false);
|
|
562
|
-
const width = useWidth(ref);
|
|
563
487
|
const t1 = overflowIcon ? overflowIcon : icon;
|
|
564
488
|
let t2;
|
|
565
|
-
if ($[7] !== ariaLabel || $[8] !== items || $[9] !== returnFocusRef || $[10] !== t1
|
|
489
|
+
if ($[7] !== ariaLabel || $[8] !== items || $[9] !== returnFocusRef || $[10] !== t1) {
|
|
566
490
|
t2 = {
|
|
567
491
|
type: "menu",
|
|
568
|
-
width,
|
|
569
492
|
label: ariaLabel,
|
|
570
493
|
icon: t1,
|
|
571
494
|
returnFocusRef,
|
|
@@ -575,27 +498,26 @@ const ActionBarMenu = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
|
575
498
|
$[8] = items;
|
|
576
499
|
$[9] = returnFocusRef;
|
|
577
500
|
$[10] = t1;
|
|
578
|
-
$[11] =
|
|
579
|
-
$[12] = t2;
|
|
501
|
+
$[11] = t2;
|
|
580
502
|
} else {
|
|
581
|
-
t2 = $[
|
|
582
|
-
}
|
|
583
|
-
const registryProps = t2;
|
|
584
|
-
const id = ActionBarItemsRegistry.useRegisterDescendant(registryProps);
|
|
585
|
-
if (!isVisibleChild(id)) {
|
|
586
|
-
return null;
|
|
503
|
+
t2 = $[11];
|
|
587
504
|
}
|
|
505
|
+
const {
|
|
506
|
+
dataOverflowingAttr
|
|
507
|
+
} = useActionBarItem(ref, t2);
|
|
588
508
|
let t3;
|
|
589
|
-
if ($[
|
|
509
|
+
if ($[12] !== ariaLabel || $[13] !== dataOverflowingAttr || $[14] !== icon || $[15] !== props) {
|
|
590
510
|
t3 = /*#__PURE__*/jsx(ActionMenu.Anchor, {
|
|
591
511
|
children: /*#__PURE__*/jsx(IconButton, {
|
|
592
512
|
variant: "invisible",
|
|
593
513
|
"aria-label": ariaLabel,
|
|
594
514
|
icon: icon,
|
|
595
|
-
...props
|
|
515
|
+
...props,
|
|
516
|
+
"data-overflowing": dataOverflowingAttr
|
|
596
517
|
})
|
|
597
518
|
});
|
|
598
|
-
$[
|
|
519
|
+
$[12] = ariaLabel;
|
|
520
|
+
$[13] = dataOverflowingAttr;
|
|
599
521
|
$[14] = icon;
|
|
600
522
|
$[15] = props;
|
|
601
523
|
$[16] = t3;
|
|
@@ -614,7 +536,7 @@ const ActionBarMenu = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
|
614
536
|
}
|
|
615
537
|
let t5;
|
|
616
538
|
if ($[19] !== items) {
|
|
617
|
-
t5 = items.map(
|
|
539
|
+
t5 = items.map(_temp7);
|
|
618
540
|
$[19] = items;
|
|
619
541
|
$[20] = t5;
|
|
620
542
|
} else {
|
|
@@ -663,68 +585,91 @@ const ActionBarMenu = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
|
663
585
|
const VerticalDivider = () => {
|
|
664
586
|
const $ = c(3);
|
|
665
587
|
const ref = useRef(null);
|
|
666
|
-
const {
|
|
667
|
-
isVisibleChild
|
|
668
|
-
} = React.useContext(ActionBarContext);
|
|
669
|
-
const width = useWidth(ref);
|
|
670
588
|
let t0;
|
|
671
|
-
if ($[0]
|
|
589
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
672
590
|
t0 = {
|
|
673
|
-
type: "divider"
|
|
674
|
-
width
|
|
591
|
+
type: "divider"
|
|
675
592
|
};
|
|
676
|
-
$[0] =
|
|
677
|
-
$[1] = t0;
|
|
593
|
+
$[0] = t0;
|
|
678
594
|
} else {
|
|
679
|
-
t0 = $[
|
|
680
|
-
}
|
|
681
|
-
const registryProps = t0;
|
|
682
|
-
const id = ActionBarItemsRegistry.useRegisterDescendant(registryProps);
|
|
683
|
-
if (!isVisibleChild(id)) {
|
|
684
|
-
return null;
|
|
595
|
+
t0 = $[0];
|
|
685
596
|
}
|
|
597
|
+
const {
|
|
598
|
+
dataOverflowingAttr
|
|
599
|
+
} = useActionBarItem(ref, t0);
|
|
686
600
|
let t1;
|
|
687
|
-
if ($[
|
|
601
|
+
if ($[1] !== dataOverflowingAttr) {
|
|
688
602
|
t1 = /*#__PURE__*/jsx("div", {
|
|
689
603
|
ref: ref,
|
|
690
604
|
"data-component": "ActionBar.VerticalDivider",
|
|
691
605
|
"aria-hidden": "true",
|
|
692
|
-
className: styles.Divider
|
|
606
|
+
className: styles.Divider,
|
|
607
|
+
"data-overflowing": dataOverflowingAttr
|
|
693
608
|
});
|
|
609
|
+
$[1] = dataOverflowingAttr;
|
|
694
610
|
$[2] = t1;
|
|
695
611
|
} else {
|
|
696
612
|
t1 = $[2];
|
|
697
613
|
}
|
|
698
614
|
return t1;
|
|
699
615
|
};
|
|
700
|
-
function _temp() {
|
|
701
|
-
return
|
|
616
|
+
function _temp(v) {
|
|
617
|
+
return v !== null;
|
|
702
618
|
}
|
|
703
|
-
function _temp2(
|
|
619
|
+
function _temp2(entry) {
|
|
620
|
+
return entry[1] !== null;
|
|
621
|
+
}
|
|
622
|
+
function _temp3(item, index) {
|
|
704
623
|
return renderMenuItem(item, index);
|
|
705
624
|
}
|
|
706
|
-
function
|
|
707
|
-
const [
|
|
708
|
-
if (
|
|
625
|
+
function _temp4(t0) {
|
|
626
|
+
const [id, menuItem] = t0;
|
|
627
|
+
if (menuItem.type === "divider") {
|
|
628
|
+
return /*#__PURE__*/jsx(ActionList.Divider, {}, id);
|
|
629
|
+
}
|
|
630
|
+
if (menuItem.type === "action") {
|
|
709
631
|
const {
|
|
710
|
-
onClick
|
|
711
|
-
icon:
|
|
712
|
-
label
|
|
713
|
-
disabled
|
|
714
|
-
} =
|
|
632
|
+
onClick,
|
|
633
|
+
icon: Icon,
|
|
634
|
+
label,
|
|
635
|
+
disabled
|
|
636
|
+
} = menuItem;
|
|
715
637
|
return /*#__PURE__*/jsxs(ActionList.Item, {
|
|
716
|
-
onSelect:
|
|
717
|
-
typeof
|
|
638
|
+
onSelect: event => {
|
|
639
|
+
typeof onClick === "function" && onClick(event);
|
|
718
640
|
},
|
|
719
|
-
disabled:
|
|
641
|
+
disabled: disabled,
|
|
720
642
|
children: [/*#__PURE__*/jsx(ActionList.LeadingVisual, {
|
|
721
|
-
children: /*#__PURE__*/jsx(
|
|
722
|
-
}),
|
|
723
|
-
},
|
|
643
|
+
children: /*#__PURE__*/jsx(Icon, {})
|
|
644
|
+
}), label]
|
|
645
|
+
}, label);
|
|
646
|
+
}
|
|
647
|
+
if (menuItem.type === "menu") {
|
|
648
|
+
const menuItems = menuItem.items;
|
|
649
|
+
const {
|
|
650
|
+
icon: Icon_0,
|
|
651
|
+
label: label_0,
|
|
652
|
+
returnFocusRef
|
|
653
|
+
} = menuItem;
|
|
654
|
+
return /*#__PURE__*/jsxs(ActionMenu, {
|
|
655
|
+
children: [/*#__PURE__*/jsx(ActionMenu.Anchor, {
|
|
656
|
+
children: /*#__PURE__*/jsxs(ActionList.Item, {
|
|
657
|
+
children: [Icon_0 !== "none" ? /*#__PURE__*/jsx(ActionList.LeadingVisual, {
|
|
658
|
+
children: /*#__PURE__*/jsx(Icon_0, {})
|
|
659
|
+
}) : null, label_0]
|
|
660
|
+
})
|
|
661
|
+
}), /*#__PURE__*/jsx(ActionMenu.Overlay, {
|
|
662
|
+
...(returnFocusRef && {
|
|
663
|
+
returnFocusRef
|
|
664
|
+
}),
|
|
665
|
+
children: /*#__PURE__*/jsx(ActionList, {
|
|
666
|
+
children: menuItems.map(_temp3)
|
|
667
|
+
})
|
|
668
|
+
})]
|
|
669
|
+
}, id);
|
|
724
670
|
}
|
|
725
|
-
return null;
|
|
726
671
|
}
|
|
727
|
-
function
|
|
672
|
+
function _temp7(item, index) {
|
|
728
673
|
return renderMenuItem(item, index);
|
|
729
674
|
}
|
|
730
675
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import './ActionBar-
|
|
1
|
+
import './ActionBar-3f7b52a3.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","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"};
|
|
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;
|
|
5
5
|
Group: import("react").ForwardRefExoticComponent<{
|
|
6
6
|
children?: import("react").ReactNode | undefined;
|
|
7
7
|
} & import("react").RefAttributes<unknown>>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
.prc-ActionMenu-ActionMenuContainer-Om1Qz{max-height:100vh}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-variant=fullscreen]){padding-top:var(--base-size-36,2.25rem)}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-overflow-auto]){overflow:auto}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-overflow-hidden]){overflow:hidden}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-overflow-scroll]){overflow:scroll}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-overflow-visible]){overflow:visible}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-xsmall]){max-height:192px}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-small]){max-height:256px}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-medium]){max-height:320px}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-large]){max-height:432px}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-xlarge]){max-height:600px}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-clamp-to-viewport][data-max-height-xsmall]){max-height:min(192px,100dvh)}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-clamp-to-viewport][data-max-height-small]){max-height:min(256px,100dvh)}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-clamp-to-viewport][data-max-height-medium]){max-height:min(320px,100dvh)}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-clamp-to-viewport][data-max-height-large]){max-height:min(432px,100dvh)}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-clamp-to-viewport][data-max-height-xlarge]){max-height:min(600px,100dvh)}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-fit-content]){max-height:-moz-fit-content;max-height:fit-content}
|
|
2
|
+
/*# sourceMappingURL=ActionMenu-58362ca7.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/ActionMenu/ActionMenu.module.css.js"],"names":[],"mappings":"AAAA,0CAEE,gBAoEF,CAlEE,2EACE,uCACF,CAGA,sEACE,aACF,CAEA,wEACE,eACF,CAEA,wEACE,eACF,CAEA,yEACE,gBACF,CAGA,0EACE,gBACF,CAEA,yEACE,gBACF,CAEA,0EACE,gBACF,CAEA,yEACE,gBACF,CAEA,0EACE,gBACF,CAGA,6GACE,4BACF,CAEA,4GACE,4BACF,CAEA,6GACE,4BACF,CAEA,4GACE,4BACF,CAEA,6GACE,4BACF,CAEA,+EACE,2BAAuB,CAAvB,sBACF","file":"ActionMenu-58362ca7.css","sourcesContent":[".ActionMenuContainer {\n /* add default max height */\n max-height: 100vh;\n\n &:where([data-variant='fullscreen']) {\n padding-top: var(--base-size-36);\n }\n\n /* Overflow variants */\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 /* Max-height size tokens (mirror Overlay sizes) */\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 /* Max-height size tokens clamped to viewport (enabled via feature flag) */\n &:where([data-max-height-clamp-to-viewport][data-max-height-xsmall]) {\n max-height: min(192px, 100dvh);\n }\n\n &:where([data-max-height-clamp-to-viewport][data-max-height-small]) {\n max-height: min(256px, 100dvh);\n }\n\n &:where([data-max-height-clamp-to-viewport][data-max-height-medium]) {\n max-height: min(320px, 100dvh);\n }\n\n &:where([data-max-height-clamp-to-viewport][data-max-height-large]) {\n max-height: min(432px, 100dvh);\n }\n\n &:where([data-max-height-clamp-to-viewport][data-max-height-xlarge]) {\n max-height: min(600px, 100dvh);\n }\n\n &:where([data-max-height-fit-content]) {\n max-height: fit-content;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionMenu.d.ts","sourceRoot":"","sources":["../../src/ActionMenu/ActionMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8D,MAAM,OAAO,CAAA;AAGlF,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,oBAAoB,CAAA;AAE5D,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,YAAY,CAAA;AAI5C,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,WAAW,CAAA;AAC1C,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,mBAAmB,CAAA;AAIrD,OAAO,KAAK,EAAC,mBAAmB,IAAI,8BAA8B,EAAC,MAAM,sBAAsB,CAAA;AAK/F,OAAO,KAAK,EAAC,gBAAgB,EAAE,cAAc,EAAC,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"ActionMenu.d.ts","sourceRoot":"","sources":["../../src/ActionMenu/ActionMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8D,MAAM,OAAO,CAAA;AAGlF,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,oBAAoB,CAAA;AAE5D,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,YAAY,CAAA;AAI5C,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,WAAW,CAAA;AAC1C,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,mBAAmB,CAAA;AAIrD,OAAO,KAAK,EAAC,mBAAmB,IAAI,8BAA8B,EAAC,MAAM,sBAAsB,CAAA;AAK/F,OAAO,KAAK,EAAC,gBAAgB,EAAE,cAAc,EAAC,MAAM,sBAAsB,CAAA;AAI1E,MAAM,MAAM,gBAAgB,GAAG,CAC7B,OAAO,EAAE,cAAc,GAAG,eAAe,GAAG,QAAQ,GAAG,KAAK,GAAG,aAAa,GAAG,YAAY,GAAG,OAAO,KAClG,IAAI,CAAA;AAET,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,oBAAoB,EACpB,WAAW,GAAG,cAAc,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,CAC9D,GAAG;IACF,OAAO,CAAC,EAAE,gBAAgB,CAAA;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAGD,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IAEH,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,GAAG,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAA;IAE7D;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IAEd;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAA;CACpC,GAAG,IAAI,CAAC,oBAAoB,EAAE,WAAW,CAAC,CAAA;AA8I3C,MAAM,MAAM,qBAAqB,GAAG;IAAC,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IAAC,EAAE,CAAC,EAAE,MAAM,CAAA;CAAC,GAAG,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,CAAA;AA2DxH,6CAA6C;AAC7C,MAAM,MAAM,qBAAqB,GAAG,WAAW,CAAA;AAe/C,KAAK,gBAAgB,GAAG,OAAO,CAAC,YAAY,CAAC,GAC3C,IAAI,CAAC,oBAAoB,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,mBAAmB,CAAC,GAAG;IAC/E;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,gBAAgB,CAAC,EAAE,CAAC,EAAC,QAAQ,EAAC,EAAE;QAAC,QAAQ,EAAE,cAAc,CAAA;KAAC,KAAK,IAAI,CAAA;CACpE,CAAA;AA6GH,eAAO,MAAM,UAAU;;;kBA1LP,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC;aAC5B,MAAM;;;;CAyL4E,CAAA"}
|
|
@@ -13,6 +13,7 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
13
13
|
import { useProvidedStateOrCreate } from '../hooks/useProvidedStateOrCreate.js';
|
|
14
14
|
import { useProvidedRefOrCreate } from '../hooks/useProvidedRefOrCreate.js';
|
|
15
15
|
import { useMenuKeyboardNavigation } from '../hooks/useMenuKeyboardNavigation.js';
|
|
16
|
+
import { useFeatureFlag } from '../FeatureFlags/useFeatureFlag.js';
|
|
16
17
|
import { AnchoredOverlay } from '../AnchoredOverlay/AnchoredOverlay.js';
|
|
17
18
|
import { ButtonComponent } from '../Button/Button.js';
|
|
18
19
|
|
|
@@ -263,6 +264,7 @@ const Overlay = ({
|
|
|
263
264
|
}
|
|
264
265
|
}
|
|
265
266
|
}, [anchorRef]);
|
|
267
|
+
const featureFlagMaxHeightClampToViewport = useFeatureFlag('primer_react_overlay_max_height_clamp_to_viewport');
|
|
266
268
|
const isInsideDialog = useContext(DialogContext) !== undefined;
|
|
267
269
|
return /*#__PURE__*/jsx(AnchoredOverlay, {
|
|
268
270
|
anchorRef: anchorRef,
|
|
@@ -286,6 +288,9 @@ const Overlay = ({
|
|
|
286
288
|
ref: containerRef,
|
|
287
289
|
className: styles.ActionMenuContainer,
|
|
288
290
|
"data-variant": responsiveVariant,
|
|
291
|
+
...(featureFlagMaxHeightClampToViewport ? {
|
|
292
|
+
'data-max-height-clamp-to-viewport': ''
|
|
293
|
+
} : {}),
|
|
289
294
|
...(overlayProps.overflow ? {
|
|
290
295
|
[`data-overflow-${overlayProps.overflow}`]: ''
|
|
291
296
|
} : {}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultFeatureFlags.d.ts","sourceRoot":"","sources":["../../src/FeatureFlags/DefaultFeatureFlags.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAA;AAEnD,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"DefaultFeatureFlags.d.ts","sourceRoot":"","sources":["../../src/FeatureFlags/DefaultFeatureFlags.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAA;AAEnD,eAAO,MAAM,mBAAmB,kBAQ9B,CAAA"}
|
|
@@ -6,7 +6,8 @@ const DefaultFeatureFlags = FeatureFlagScope.create({
|
|
|
6
6
|
primer_react_select_panel_fullscreen_on_narrow: false,
|
|
7
7
|
primer_react_select_panel_order_selected_at_top: false,
|
|
8
8
|
primer_react_select_panel_remove_active_descendant: false,
|
|
9
|
-
primer_react_spinner_synchronize_animations: false
|
|
9
|
+
primer_react_spinner_synchronize_animations: false,
|
|
10
|
+
primer_react_overlay_max_height_clamp_to_viewport: false
|
|
10
11
|
});
|
|
11
12
|
|
|
12
13
|
export { DefaultFeatureFlags };
|
|
@@ -0,0 +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);box-shadow:var(--shadow-floating-small,var(--color-overlay-shadow));height:auto;max-height:100vh;max-width:calc(100vw - 2rem);min-width:192px;overflow:auto;position:absolute;width:auto}.prc-Overlay-Overlay-jfs-T:not([data-anchor-position]):not([data-variant=modal]),.prc-Overlay-Overlay-jfs-T[data-anchor-position=false]{bottom:var(--bottom,auto);right:var(--right,auto)}@media screen and (max-width:calc(48rem - 0.02px)){[data-responsive=fullscreen]:is(.prc-Overlay-Overlay-jfs-T[data-anchor-position=false],.prc-Overlay-Overlay-jfs-T:not([data-anchor-position]):not([data-variant=modal])):not([data-variant]){left:0;top:0}}:is(.prc-Overlay-Overlay-jfs-T[data-anchor-position=false],.prc-Overlay-Overlay-jfs-T:not([data-anchor-position]):not([data-variant=modal])):not([data-variant]){left:var(--left,auto);top:var(--top,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-clamp-to-viewport][data-max-height-xsmall]){max-height:min(192px,100dvh)}.prc-Overlay-Overlay-jfs-T:where([data-max-height-clamp-to-viewport][data-max-height-small]){max-height:min(256px,100dvh)}.prc-Overlay-Overlay-jfs-T:where([data-max-height-clamp-to-viewport][data-max-height-medium]){max-height:min(320px,100dvh)}.prc-Overlay-Overlay-jfs-T:where([data-max-height-clamp-to-viewport][data-max-height-large]){max-height:min(432px,100dvh)}.prc-Overlay-Overlay-jfs-T:where([data-max-height-clamp-to-viewport][data-max-height-xlarge]){max-height:min(600px,100dvh)}.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-f81a131d.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,CACxC,mEAAwC,CALxC,WAAY,CACZ,gBAAiB,CAJjB,4BAA6B,CAE7B,eAAgB,CAGhB,aAAc,CANd,iBAAkB,CAElB,UAyNF,CAhNE,wIAKE,yBAA2B,CAF3B,uBAkBF,CAZI,mDADF,6LAGI,MAAO,CADP,KAGJ,CADE,CAGF,iKAIE,qBAAuB,CAFvB,mBAGF,CAGF,iCACE,YACF,CAEA,8BAvCF,2BAyCI,6BAmLJ,CAlLE,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,CAGA,8FACE,4BACF,CAEA,6FACE,4BACF,CAEA,8FACE,4BACF,CAEA,6FACE,4BACF,CAEA,8FACE,4BACF,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-f81a131d.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\n &[data-anchor-position='false'],\n &:not([data-anchor-position]):not([data-variant='modal']) {\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 /* stylelint-disable-next-line selector-max-specificity */\n &[data-responsive='fullscreen']:not([data-variant]) {\n @media screen and (--viewportRange-narrow) {\n top: 0;\n left: 0;\n }\n }\n\n &:not([data-variant]) {\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 }\n }\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 /* Max-height size tokens clamped to viewport (enabled via feature flag) */\n &:where([data-max-height-clamp-to-viewport][data-max-height-xsmall]) {\n max-height: min(192px, 100dvh);\n }\n\n &:where([data-max-height-clamp-to-viewport][data-max-height-small]) {\n max-height: min(256px, 100dvh);\n }\n\n &:where([data-max-height-clamp-to-viewport][data-max-height-medium]) {\n max-height: min(320px, 100dvh);\n }\n\n &:where([data-max-height-clamp-to-viewport][data-max-height-large]) {\n max-height: min(432px, 100dvh);\n }\n\n &:where([data-max-height-clamp-to-viewport][data-max-height-xlarge]) {\n max-height: min(600px, 100dvh);\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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Overlay.d.ts","sourceRoot":"","sources":["../../src/Overlay/Overlay.tsx"],"names":[],"mappings":"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
|
|
1
|
+
{"version":3,"file":"Overlay.d.ts","sourceRoot":"","sources":["../../src/Overlay/Overlay.tsx"],"names":[],"mappings":"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"}
|
package/dist/Overlay/Overlay.js
CHANGED
|
@@ -116,7 +116,7 @@ const BaseOverlay = /*#__PURE__*/React.forwardRef(({
|
|
|
116
116
|
|
|
117
117
|
*/
|
|
118
118
|
const Overlay = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
|
|
119
|
-
const $ = c(
|
|
119
|
+
const $ = c(50);
|
|
120
120
|
let _PrivateDisablePortal;
|
|
121
121
|
let anchorSide;
|
|
122
122
|
let ignoreClickRefs;
|
|
@@ -200,6 +200,7 @@ const Overlay = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
|
|
|
200
200
|
const role = t3 === undefined ? "none" : t3;
|
|
201
201
|
const visibility = t4 === undefined ? "visible" : t4;
|
|
202
202
|
const width = t5 === undefined ? "auto" : t5;
|
|
203
|
+
const featureFlagMaxHeightClampToViewport = useFeatureFlag("primer_react_overlay_max_height_clamp_to_viewport");
|
|
203
204
|
const overlayRef = useRef(null);
|
|
204
205
|
const mergedRef = useMergedRefs(forwardedRef, overlayRef);
|
|
205
206
|
const cssAnchorPositioning = useFeatureFlag("primer_react_css_anchor_positioning");
|
|
@@ -275,8 +276,18 @@ const Overlay = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
|
|
|
275
276
|
const leftPosition = left === undefined && right === undefined ? 0 : left;
|
|
276
277
|
const t11 = !preventOverflow ? true : undefined;
|
|
277
278
|
let t12;
|
|
278
|
-
if ($[33] !==
|
|
279
|
-
t12 =
|
|
279
|
+
if ($[33] !== featureFlagMaxHeightClampToViewport) {
|
|
280
|
+
t12 = featureFlagMaxHeightClampToViewport ? {
|
|
281
|
+
"data-max-height-clamp-to-viewport": ""
|
|
282
|
+
} : {};
|
|
283
|
+
$[33] = featureFlagMaxHeightClampToViewport;
|
|
284
|
+
$[34] = t12;
|
|
285
|
+
} else {
|
|
286
|
+
t12 = $[34];
|
|
287
|
+
}
|
|
288
|
+
let t13;
|
|
289
|
+
if ($[35] !== height || $[36] !== leftPosition || $[37] !== mergedRef || $[38] !== props || $[39] !== responsiveVariant || $[40] !== right || $[41] !== role || $[42] !== t11 || $[43] !== t12 || $[44] !== visibility || $[45] !== width) {
|
|
290
|
+
t13 = /*#__PURE__*/jsx(BaseOverlay, {
|
|
280
291
|
role: role,
|
|
281
292
|
width: width,
|
|
282
293
|
"data-reflow-container": t11,
|
|
@@ -286,39 +297,41 @@ const Overlay = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
|
|
|
286
297
|
height: height,
|
|
287
298
|
visibility: visibility,
|
|
288
299
|
"data-responsive": responsiveVariant,
|
|
300
|
+
...t12,
|
|
289
301
|
...props
|
|
290
302
|
});
|
|
291
|
-
$[
|
|
292
|
-
$[
|
|
293
|
-
$[
|
|
294
|
-
$[
|
|
295
|
-
$[
|
|
296
|
-
$[
|
|
297
|
-
$[
|
|
298
|
-
$[
|
|
299
|
-
$[41] = visibility;
|
|
300
|
-
$[42] = width;
|
|
303
|
+
$[35] = height;
|
|
304
|
+
$[36] = leftPosition;
|
|
305
|
+
$[37] = mergedRef;
|
|
306
|
+
$[38] = props;
|
|
307
|
+
$[39] = responsiveVariant;
|
|
308
|
+
$[40] = right;
|
|
309
|
+
$[41] = role;
|
|
310
|
+
$[42] = t11;
|
|
301
311
|
$[43] = t12;
|
|
312
|
+
$[44] = visibility;
|
|
313
|
+
$[45] = width;
|
|
314
|
+
$[46] = t13;
|
|
302
315
|
} else {
|
|
303
|
-
|
|
316
|
+
t13 = $[46];
|
|
304
317
|
}
|
|
305
|
-
const overlayContent =
|
|
318
|
+
const overlayContent = t13;
|
|
306
319
|
if (_PrivateDisablePortal && cssAnchorPositioning) {
|
|
307
320
|
return overlayContent;
|
|
308
321
|
}
|
|
309
|
-
let
|
|
310
|
-
if ($[
|
|
311
|
-
|
|
322
|
+
let t14;
|
|
323
|
+
if ($[47] !== overlayContent || $[48] !== portalContainerName) {
|
|
324
|
+
t14 = /*#__PURE__*/jsx(Portal, {
|
|
312
325
|
containerName: portalContainerName,
|
|
313
326
|
children: overlayContent
|
|
314
327
|
});
|
|
315
|
-
$[
|
|
316
|
-
$[
|
|
317
|
-
$[
|
|
328
|
+
$[47] = overlayContent;
|
|
329
|
+
$[48] = portalContainerName;
|
|
330
|
+
$[49] = t14;
|
|
318
331
|
} else {
|
|
319
|
-
|
|
332
|
+
t14 = $[49];
|
|
320
333
|
}
|
|
321
|
-
return
|
|
334
|
+
return t14;
|
|
322
335
|
});
|
|
323
336
|
|
|
324
337
|
export { BaseOverlay, Overlay as default, heightMap };
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
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 +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,2 +0,0 @@
|
|
|
1
|
-
.prc-ActionMenu-ActionMenuContainer-Om1Qz{max-height:100vh}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-variant=fullscreen]){padding-top:var(--base-size-36,2.25rem)}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-overflow-auto]){overflow:auto}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-overflow-hidden]){overflow:hidden}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-overflow-scroll]){overflow:scroll}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-overflow-visible]){overflow:visible}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-xsmall]){max-height:min(192px,100vh)}@supports (height:100dvh){.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-xsmall]){max-height:min(192px,100dvh)}}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-small]){max-height:min(256px,100vh)}@supports (height:100dvh){.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-small]){max-height:min(256px,100dvh)}}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-medium]){max-height:min(320px,100vh)}@supports (height:100dvh){.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-medium]){max-height:min(320px,100dvh)}}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-large]){max-height:min(432px,100vh)}@supports (height:100dvh){.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-large]){max-height:min(432px,100dvh)}}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-xlarge]){max-height:min(600px,100vh)}@supports (height:100dvh){.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-xlarge]){max-height:min(600px,100dvh)}}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-fit-content]){max-height:-moz-fit-content;max-height:fit-content}
|
|
2
|
-
/*# sourceMappingURL=ActionMenu-c4e2a589.css.map */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/ActionMenu/ActionMenu.module.css.js"],"names":[],"mappings":"AAAA,0CAEE,gBAmEF,CAjEE,2EACE,uCACF,CAGA,sEACE,aACF,CAEA,wEACE,eACF,CAEA,wEACE,eACF,CAEA,yEACE,gBACF,CAGA,0EACE,2BAKF,CAHE,0BAHF,0EAII,4BAEJ,CADE,CAGF,yEACE,2BAKF,CAHE,0BAHF,yEAII,4BAEJ,CADE,CAGF,0EACE,2BAKF,CAHE,0BAHF,0EAII,4BAEJ,CADE,CAGF,yEACE,2BAKF,CAHE,0BAHF,yEAII,4BAEJ,CADE,CAGF,0EACE,2BAKF,CAHE,0BAHF,0EAII,4BAEJ,CADE,CAGF,+EACE,2BAAuB,CAAvB,sBACF","file":"ActionMenu-c4e2a589.css","sourcesContent":[".ActionMenuContainer {\n /* add default max height */\n max-height: 100vh;\n\n &:where([data-variant='fullscreen']) {\n padding-top: var(--base-size-36);\n }\n\n /* Overflow variants */\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 /* Max-height size tokens (mirror Overlay sizes) */\n &:where([data-max-height-xsmall]) {\n max-height: min(192px, 100vh);\n\n @supports (height: 100dvh) {\n max-height: min(192px, 100dvh);\n }\n }\n\n &:where([data-max-height-small]) {\n max-height: min(256px, 100vh);\n\n @supports (height: 100dvh) {\n max-height: min(256px, 100dvh);\n }\n }\n\n &:where([data-max-height-medium]) {\n max-height: min(320px, 100vh);\n\n @supports (height: 100dvh) {\n max-height: min(320px, 100dvh);\n }\n }\n\n &:where([data-max-height-large]) {\n max-height: min(432px, 100vh);\n\n @supports (height: 100dvh) {\n max-height: min(432px, 100dvh);\n }\n }\n\n &:where([data-max-height-xlarge]) {\n max-height: min(600px, 100vh);\n\n @supports (height: 100dvh) {\n max-height: min(600px, 100dvh);\n }\n }\n\n &:where([data-max-height-fit-content]) {\n max-height: fit-content;\n }\n}\n"]}
|
|
@@ -1,2 +0,0 @@
|
|
|
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);box-shadow:var(--shadow-floating-small,var(--color-overlay-shadow));height:auto;max-height:100vh;max-width:calc(100vw - 2rem);min-width:192px;overflow:auto;position:absolute;width:auto}.prc-Overlay-Overlay-jfs-T:not([data-anchor-position]):not([data-variant=modal]),.prc-Overlay-Overlay-jfs-T[data-anchor-position=false]{bottom:var(--bottom,auto);right:var(--right,auto)}@media screen and (max-width:calc(48rem - 0.02px)){[data-responsive=fullscreen]:is(.prc-Overlay-Overlay-jfs-T[data-anchor-position=false],.prc-Overlay-Overlay-jfs-T:not([data-anchor-position]):not([data-variant=modal])):not([data-variant]){left:0;top:0}}:is(.prc-Overlay-Overlay-jfs-T[data-anchor-position=false],.prc-Overlay-Overlay-jfs-T:not([data-anchor-position]):not([data-variant=modal])):not([data-variant]){left:var(--left,auto);top:var(--top,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:min(192px,100vh)}@supports (height:100dvh){.prc-Overlay-Overlay-jfs-T:where([data-max-height-xsmall]){max-height:min(192px,100dvh)}}.prc-Overlay-Overlay-jfs-T:where([data-max-height-small]){max-height:min(256px,100vh)}@supports (height:100dvh){.prc-Overlay-Overlay-jfs-T:where([data-max-height-small]){max-height:min(256px,100dvh)}}.prc-Overlay-Overlay-jfs-T:where([data-max-height-medium]){max-height:min(320px,100vh)}@supports (height:100dvh){.prc-Overlay-Overlay-jfs-T:where([data-max-height-medium]){max-height:min(320px,100dvh)}}.prc-Overlay-Overlay-jfs-T:where([data-max-height-large]){max-height:min(432px,100vh)}@supports (height:100dvh){.prc-Overlay-Overlay-jfs-T:where([data-max-height-large]){max-height:min(432px,100dvh)}}.prc-Overlay-Overlay-jfs-T:where([data-max-height-xlarge]){max-height:min(600px,100vh)}@supports (height:100dvh){.prc-Overlay-Overlay-jfs-T:where([data-max-height-xlarge]){max-height:min(600px,100dvh)}}.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-30b84506.css.map */
|
|
@@ -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,CACxC,mEAAwC,CALxC,WAAY,CACZ,gBAAiB,CAJjB,4BAA6B,CAE7B,eAAgB,CAGhB,aAAc,CANd,iBAAkB,CAElB,UAwNF,CA/ME,wIAKE,yBAA2B,CAF3B,uBAkBF,CAZI,mDADF,6LAGI,MAAO,CADP,KAGJ,CADE,CAGF,iKAIE,qBAAuB,CAFvB,mBAGF,CAGF,iCACE,YACF,CAEA,8BAvCF,2BAyCI,6BAkLJ,CAjLE,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,2BAKF,CAHE,0BAHF,2DAII,4BAEJ,CADE,CAGF,0DACE,2BAKF,CAHE,0BAHF,0DAII,4BAEJ,CADE,CAGF,2DACE,2BAKF,CAHE,0BAHF,2DAII,4BAEJ,CADE,CAGF,0DACE,2BAKF,CAHE,0BAHF,0DAII,4BAEJ,CADE,CAGF,2DACE,2BAKF,CAHE,0BAHF,2DAII,4BAEJ,CADE,CAGF,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-30b84506.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\n &[data-anchor-position='false'],\n &:not([data-anchor-position]):not([data-variant='modal']) {\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 /* stylelint-disable-next-line selector-max-specificity */\n &[data-responsive='fullscreen']:not([data-variant]) {\n @media screen and (--viewportRange-narrow) {\n top: 0;\n left: 0;\n }\n }\n\n &:not([data-variant]) {\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 }\n }\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: min(192px, 100vh);\n\n @supports (height: 100dvh) {\n max-height: min(192px, 100dvh);\n }\n }\n\n &:where([data-max-height-small]) {\n max-height: min(256px, 100vh);\n\n @supports (height: 100dvh) {\n max-height: min(256px, 100dvh);\n }\n }\n\n &:where([data-max-height-medium]) {\n max-height: min(320px, 100vh);\n\n @supports (height: 100dvh) {\n max-height: min(320px, 100dvh);\n }\n }\n\n &:where([data-max-height-large]) {\n max-height: min(432px, 100vh);\n\n @supports (height: 100dvh) {\n max-height: min(432px, 100dvh);\n }\n }\n\n &:where([data-max-height-xlarge]) {\n max-height: min(600px, 100vh);\n\n @supports (height: 100dvh) {\n max-height: min(600px, 100dvh);\n }\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"]}
|