@primer/react 0.0.0-20260312134924 → 0.0.0-20260312141631
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 +6 -2
- package/dist/ActionBar/ActionBar-64aee131.css +2 -0
- package/dist/ActionBar/ActionBar-64aee131.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 +351 -353
- package/dist/ActionBar/ActionBar.module.css.js +2 -2
- package/dist/ActionBar/index.d.ts +1 -1
- package/dist/Banner/Banner-b3871000.css +2 -0
- package/dist/Banner/Banner-b3871000.css.map +1 -0
- package/dist/Banner/Banner.module.css.js +1 -1
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +1 -2
- package/generated/components.json +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/Banner/Banner-f672cdf9.css +0 -2
- package/dist/Banner/Banner-f672cdf9.css.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
# @primer/react
|
|
2
2
|
|
|
3
|
-
## 0.0.0-
|
|
3
|
+
## 0.0.0-20260312141631
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
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
|
|
4
8
|
|
|
5
9
|
### Patch Changes
|
|
6
10
|
|
|
7
11
|
- Fake entry to force publishing
|
|
8
12
|
|
|
9
|
-
- [#
|
|
13
|
+
- [#7625](https://github.com/primer/react/pull/7625) [`2e8c707`](https://github.com/primer/react/commit/2e8c70702d5096551049c29c8e79749bf63a919f) Thanks [@liuliu-dev](https://github.com/liuliu-dev)! - Banner: stack inline actions vertically on narrow viewports.
|
|
10
14
|
|
|
11
15
|
## 38.15.0
|
|
12
16
|
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
.prc-ActionBar-List-9uz46{align-items:flex-start;animation:prc-ActionBar-detect-overflow-mAuJu linear;display:flex;gap:var(--actionbar-gap,var(--stack-gap-condensed,.5rem));height:var(--actionbar-height);list-style:none;margin-bottom:-1px;min-width:0;overflow:hidden;position:relative;white-space:nowrap;animation-timeline:scroll(self block);--actionbar-height:var(--control-small-size,1.75rem);--morebutton-display:none}.prc-ActionBar-List-9uz46[data-has-overflow=true]{--morebutton-display:block}.prc-ActionBar-List-9uz46: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=true]{visibility:hidden!important}@keyframes prc-ActionBar-detect-overflow-mAuJu{0%,to{--morebutton-display:block}}.prc-ActionBar-Nav-9spON{align-items:center;display:flex;justify-content:flex-end;padding-inline:var(--base-size-16,1rem)}.prc-ActionBar-Nav-9spON:where([data-flush=true]){padding-inline:0}.prc-ActionBar-Divider-6V8yH:before{background:var(--borderColor-muted,var(--color-border-muted));content:"";display:block;height:var(--base-size-20,1.25rem);margin-top:calc((var(--actionbar-height) - var(--base-size-20,1.25rem))/2);width:var(--borderWidth-thin,.0625rem)}.prc-ActionBar-Group-peNCk,.prc-ActionBar-OverflowContainer-AkYZs{display:flex;gap:inherit}.prc-ActionBar-OverflowContainer-AkYZs{flex-wrap:wrap;justify-content:flex-end}.prc-ActionBar-MoreButton-RHqpx{display:var(--morebutton-display)}
|
|
2
|
+
/*# sourceMappingURL=ActionBar-64aee131.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/ActionBar/ActionBar.module.css.js"],"names":[],"mappings":"AAAA,0BAUE,sBAAuB,CAIvB,oDAAiC,CAZjC,YAAa,CASb,yDAAqD,CAErD,8BAA+B,CAJ/B,eAAgB,CAFhB,kBAAmB,CAJnB,WAAY,CASZ,eAAgB,CAXhB,iBAAkB,CAOlB,kBAAmB,CAOnB,qCAAsC,CAEtC,oDAA6C,CAC7C,yBAkCF,CAhCE,kDAEE,0BACF,CAEA,oDACE,kDACF,CAEA,mDACE,mDACF,CAGA,iDACE,iBAKF,CAHE,8EACE,kCACF,CAGF,sDACE,iDACF,CAEA,kDAIE,2BACF,CAGF,+CACE,MAEE,0BACF,CACF,CAEA,yBAIE,kBAAmB,CAHnB,YAAa,CAEb,wBAAyB,CADzB,uCAOF,CAHE,kDACE,gBACF,CAIA,oCAME,6DAAoC,CAFpC,UAAW,CAHX,aAAc,CAEd,kCAA2B,CAK3B,0EAAqE,CANrE,sCAOF,CAQF,kEAJE,YAAa,CACb,WAQF,CALA,uCAEE,cAAe,CAEf,wBACF,CAEA,gCACE,iCACF","file":"ActionBar-64aee131.css","sourcesContent":[".List {\n position: relative;\n display: flex;\n min-width: 0;\n\n /* wonder why this is here */\n /* stylelint-disable-next-line primer/spacing */\n margin-bottom: -1px;\n white-space: nowrap;\n list-style: none;\n align-items: flex-start;\n gap: var(--actionbar-gap, var(--stack-gap-condensed));\n overflow: hidden;\n height: var(--actionbar-height);\n animation: detect-overflow linear;\n animation-timeline: scroll(self block);\n\n --actionbar-height: var(--control-small-size);\n --morebutton-display: none;\n\n &[data-has-overflow='true'] {\n /* Progressive enhancement: show overflow button on browsers that don't support scroll-driven animations */\n --morebutton-display: block;\n }\n\n &: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='true'] {\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: block;\n }\n}\n\n.Nav {\n display: flex;\n padding-inline: var(--base-size-16);\n justify-content: flex-end;\n align-items: center;\n\n &:where([data-flush='true']) {\n padding-inline: 0;\n }\n}\n\n.Divider {\n &::before {\n display: block;\n width: var(--borderWidth-thin);\n height: var(--base-size-20);\n content: '';\n /* stylelint-disable-next-line primer/colors */\n background: var(--borderColor-muted);\n /* stylelint-disable-next-line primer/spacing */\n margin-top: calc((var(--actionbar-height) - var(--base-size-20)) / 2);\n }\n}\n\n.Group {\n display: flex;\n gap: inherit;\n}\n\n.OverflowContainer {\n display: flex;\n flex-wrap: wrap;\n gap: inherit;\n justify-content: flex-end;\n}\n\n.MoreButton {\n display: var(--morebutton-display);\n}\n"]}
|
|
@@ -120,6 +120,6 @@ export declare const ActionBarMenu: React.ForwardRefExoticComponent<{
|
|
|
120
120
|
keyshortcuts?: string;
|
|
121
121
|
keybindingHint?: string;
|
|
122
122
|
} & Omit<import("..").ButtonBaseProps, "aria-label" | "aria-labelledby"> & React.RefAttributes<unknown>>;
|
|
123
|
-
export declare const VerticalDivider: () => React.JSX.Element
|
|
123
|
+
export declare const VerticalDivider: () => React.JSX.Element;
|
|
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, 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 { useRefObjectAsForwardedRef } from '../hooks/useRefObjectAsForwardedRef.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(68);
|
|
137
75
|
const {
|
|
138
76
|
size: t0,
|
|
139
77
|
children,
|
|
@@ -147,275 +85,348 @@ 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
|
-
|
|
158
|
-
|
|
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 T1;
|
|
104
|
+
let T2;
|
|
105
|
+
let T3;
|
|
106
|
+
let t10;
|
|
107
|
+
let t11;
|
|
108
|
+
let t12;
|
|
109
|
+
let t13;
|
|
110
|
+
let t14;
|
|
111
|
+
let t15;
|
|
112
|
+
let t16;
|
|
113
|
+
let t17;
|
|
114
|
+
let t18;
|
|
170
115
|
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
116
|
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
117
|
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
118
|
let t7;
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
$[9] = t7;
|
|
219
|
-
} else {
|
|
220
|
-
t7 = $[9];
|
|
221
|
-
}
|
|
222
|
-
useFocusZone(t7);
|
|
223
|
-
let groupedItemsMap;
|
|
224
|
-
if ($[10] !== childRegistry) {
|
|
225
|
-
groupedItemsMap = new Map();
|
|
119
|
+
let t8;
|
|
120
|
+
let t9;
|
|
121
|
+
if ($[1] !== ariaLabel || $[2] !== ariaLabelledBy || $[3] !== childRegistry || $[4] !== children || $[5] !== className || $[6] !== flush || $[7] !== gap || $[8] !== setChildRegistry || $[9] !== size) {
|
|
122
|
+
var _childRegistry$entrie;
|
|
123
|
+
const overflowItems = Array.from((_childRegistry$entrie = childRegistry === null || childRegistry === void 0 ? void 0 : childRegistry.entries()) !== null && _childRegistry$entrie !== void 0 ? _childRegistry$entrie : []).filter(_temp);
|
|
124
|
+
const groupedItemsMap = new Map();
|
|
226
125
|
for (const [key, childProps] of childRegistry !== null && childRegistry !== void 0 ? childRegistry : []) {
|
|
227
|
-
if (childProps.type === "action" && childProps.groupId) {
|
|
126
|
+
if ((childProps === null || childProps === void 0 ? void 0 : childProps.type) === "action" && childProps.groupId) {
|
|
228
127
|
const existingGroup = groupedItemsMap.get(childProps.groupId) || [];
|
|
229
128
|
existingGroup.push([key, childProps]);
|
|
230
129
|
groupedItemsMap.set(childProps.groupId, existingGroup);
|
|
231
130
|
}
|
|
232
131
|
}
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
$[
|
|
246
|
-
|
|
247
|
-
|
|
132
|
+
const groupedItems = groupedItemsMap;
|
|
133
|
+
T3 = ActionBarContext.Provider;
|
|
134
|
+
if ($[29] !== size) {
|
|
135
|
+
t18 = {
|
|
136
|
+
size
|
|
137
|
+
};
|
|
138
|
+
$[29] = size;
|
|
139
|
+
$[30] = t18;
|
|
140
|
+
} else {
|
|
141
|
+
t18 = $[30];
|
|
142
|
+
}
|
|
143
|
+
t15 = navRef;
|
|
144
|
+
if ($[31] !== className) {
|
|
145
|
+
t16 = clsx(className, styles.Nav);
|
|
146
|
+
$[31] = className;
|
|
147
|
+
$[32] = t16;
|
|
148
|
+
} else {
|
|
149
|
+
t16 = $[32];
|
|
150
|
+
}
|
|
151
|
+
t17 = flush;
|
|
152
|
+
t6 = listRef;
|
|
153
|
+
t7 = "toolbar";
|
|
154
|
+
t8 = styles.List;
|
|
155
|
+
t9 = ariaLabel;
|
|
156
|
+
t10 = ariaLabelledBy;
|
|
157
|
+
t11 = gap;
|
|
158
|
+
t12 = size;
|
|
159
|
+
t13 = overflowItems.length > 0;
|
|
160
|
+
if ($[33] !== children || $[34] !== setChildRegistry) {
|
|
161
|
+
t14 = /*#__PURE__*/jsx("div", {
|
|
162
|
+
className: styles.OverflowContainer,
|
|
163
|
+
children: /*#__PURE__*/jsx(ActionBarItemsRegistry.Provider, {
|
|
164
|
+
setRegistry: setChildRegistry,
|
|
165
|
+
children: children
|
|
166
|
+
})
|
|
167
|
+
});
|
|
168
|
+
$[33] = children;
|
|
169
|
+
$[34] = setChildRegistry;
|
|
170
|
+
$[35] = t14;
|
|
171
|
+
} else {
|
|
172
|
+
t14 = $[35];
|
|
173
|
+
}
|
|
174
|
+
T2 = ActionMenu;
|
|
175
|
+
const t19 = `More ${ariaLabel} items`;
|
|
176
|
+
if ($[36] !== t19) {
|
|
177
|
+
t5 = /*#__PURE__*/jsx(ActionMenu.Anchor, {
|
|
178
|
+
children: /*#__PURE__*/jsx(IconButton, {
|
|
179
|
+
variant: "invisible",
|
|
180
|
+
"aria-label": t19,
|
|
181
|
+
icon: KebabHorizontalIcon,
|
|
182
|
+
className: styles.MoreButton
|
|
183
|
+
})
|
|
184
|
+
});
|
|
185
|
+
$[36] = t19;
|
|
186
|
+
$[37] = t5;
|
|
187
|
+
} else {
|
|
188
|
+
t5 = $[37];
|
|
189
|
+
}
|
|
190
|
+
T1 = ActionMenu.Overlay;
|
|
191
|
+
T0 = ActionList;
|
|
192
|
+
t4 = overflowItems.map(t20 => {
|
|
193
|
+
const [id, menuItem] = t20;
|
|
194
|
+
if (menuItem.type === "divider") {
|
|
195
|
+
return /*#__PURE__*/jsx(ActionList.Divider, {}, id);
|
|
196
|
+
}
|
|
197
|
+
if (menuItem.type === "action") {
|
|
198
|
+
const {
|
|
199
|
+
onClick,
|
|
200
|
+
icon: Icon,
|
|
201
|
+
label,
|
|
202
|
+
disabled
|
|
203
|
+
} = menuItem;
|
|
204
|
+
return /*#__PURE__*/jsxs(ActionList.Item, {
|
|
205
|
+
onSelect: event => {
|
|
206
|
+
typeof onClick === "function" && onClick(event);
|
|
207
|
+
},
|
|
208
|
+
disabled: disabled,
|
|
209
|
+
children: [/*#__PURE__*/jsx(ActionList.LeadingVisual, {
|
|
210
|
+
children: /*#__PURE__*/jsx(Icon, {})
|
|
211
|
+
}), label]
|
|
212
|
+
}, label);
|
|
213
|
+
}
|
|
214
|
+
if (menuItem.type === "menu") {
|
|
215
|
+
const menuItems = menuItem.items;
|
|
216
|
+
const {
|
|
217
|
+
icon: Icon_0,
|
|
218
|
+
label: label_0,
|
|
219
|
+
returnFocusRef
|
|
220
|
+
} = menuItem;
|
|
221
|
+
return /*#__PURE__*/jsxs(ActionMenu, {
|
|
222
|
+
children: [/*#__PURE__*/jsx(ActionMenu.Anchor, {
|
|
223
|
+
children: /*#__PURE__*/jsxs(ActionList.Item, {
|
|
224
|
+
children: [Icon_0 !== "none" ? /*#__PURE__*/jsx(ActionList.LeadingVisual, {
|
|
225
|
+
children: /*#__PURE__*/jsx(Icon_0, {})
|
|
226
|
+
}) : null, label_0]
|
|
227
|
+
})
|
|
228
|
+
}), /*#__PURE__*/jsx(ActionMenu.Overlay, {
|
|
229
|
+
...(returnFocusRef && {
|
|
230
|
+
returnFocusRef
|
|
231
|
+
}),
|
|
232
|
+
children: /*#__PURE__*/jsx(ActionList, {
|
|
233
|
+
children: menuItems.map(_temp2)
|
|
234
|
+
})
|
|
235
|
+
})]
|
|
236
|
+
}, id);
|
|
237
|
+
}
|
|
238
|
+
const groupedMenuItems = groupedItems.get(id) || [];
|
|
239
|
+
if (menuItem.type === "group") {
|
|
240
|
+
return /*#__PURE__*/jsx(React.Fragment, {
|
|
241
|
+
children: groupedMenuItems.map(_temp3)
|
|
242
|
+
}, id);
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
$[1] = ariaLabel;
|
|
246
|
+
$[2] = ariaLabelledBy;
|
|
247
|
+
$[3] = childRegistry;
|
|
248
|
+
$[4] = children;
|
|
249
|
+
$[5] = className;
|
|
250
|
+
$[6] = flush;
|
|
251
|
+
$[7] = gap;
|
|
252
|
+
$[8] = setChildRegistry;
|
|
253
|
+
$[9] = size;
|
|
254
|
+
$[10] = T0;
|
|
255
|
+
$[11] = T1;
|
|
256
|
+
$[12] = T2;
|
|
257
|
+
$[13] = T3;
|
|
258
|
+
$[14] = t10;
|
|
259
|
+
$[15] = t11;
|
|
260
|
+
$[16] = t12;
|
|
261
|
+
$[17] = t13;
|
|
262
|
+
$[18] = t14;
|
|
263
|
+
$[19] = t15;
|
|
264
|
+
$[20] = t16;
|
|
265
|
+
$[21] = t17;
|
|
266
|
+
$[22] = t18;
|
|
267
|
+
$[23] = t4;
|
|
268
|
+
$[24] = t5;
|
|
269
|
+
$[25] = t6;
|
|
270
|
+
$[26] = t7;
|
|
271
|
+
$[27] = t8;
|
|
272
|
+
$[28] = t9;
|
|
248
273
|
} else {
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
$[15]
|
|
255
|
-
$[16]
|
|
274
|
+
T0 = $[10];
|
|
275
|
+
T1 = $[11];
|
|
276
|
+
T2 = $[12];
|
|
277
|
+
T3 = $[13];
|
|
278
|
+
t10 = $[14];
|
|
279
|
+
t11 = $[15];
|
|
280
|
+
t12 = $[16];
|
|
281
|
+
t13 = $[17];
|
|
282
|
+
t14 = $[18];
|
|
283
|
+
t15 = $[19];
|
|
284
|
+
t16 = $[20];
|
|
285
|
+
t17 = $[21];
|
|
286
|
+
t18 = $[22];
|
|
287
|
+
t4 = $[23];
|
|
288
|
+
t5 = $[24];
|
|
289
|
+
t6 = $[25];
|
|
290
|
+
t7 = $[26];
|
|
291
|
+
t8 = $[27];
|
|
292
|
+
t9 = $[28];
|
|
293
|
+
}
|
|
294
|
+
let t19;
|
|
295
|
+
if ($[38] !== T0 || $[39] !== t4) {
|
|
296
|
+
t19 = /*#__PURE__*/jsx(T0, {
|
|
297
|
+
children: t4
|
|
298
|
+
});
|
|
299
|
+
$[38] = T0;
|
|
300
|
+
$[39] = t4;
|
|
301
|
+
$[40] = t19;
|
|
256
302
|
} else {
|
|
257
|
-
|
|
303
|
+
t19 = $[40];
|
|
258
304
|
}
|
|
259
|
-
let
|
|
260
|
-
if ($[
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
children: children
|
|
305
|
+
let t20;
|
|
306
|
+
if ($[41] !== T1 || $[42] !== t19) {
|
|
307
|
+
t20 = /*#__PURE__*/jsx(T1, {
|
|
308
|
+
children: t19
|
|
264
309
|
});
|
|
265
|
-
$[
|
|
266
|
-
$[
|
|
267
|
-
$[
|
|
310
|
+
$[41] = T1;
|
|
311
|
+
$[42] = t19;
|
|
312
|
+
$[43] = t20;
|
|
268
313
|
} else {
|
|
269
|
-
|
|
314
|
+
t20 = $[43];
|
|
270
315
|
}
|
|
271
|
-
let
|
|
272
|
-
if ($[
|
|
273
|
-
|
|
274
|
-
children: [
|
|
275
|
-
children: /*#__PURE__*/jsx(IconButton, {
|
|
276
|
-
variant: "invisible",
|
|
277
|
-
"aria-label": `More ${ariaLabel} items`,
|
|
278
|
-
icon: KebabHorizontalIcon
|
|
279
|
-
})
|
|
280
|
-
}), /*#__PURE__*/jsx(ActionMenu.Overlay, {
|
|
281
|
-
children: /*#__PURE__*/jsx(ActionList, {
|
|
282
|
-
children: Array.from(menuItemIds).map(id_0 => {
|
|
283
|
-
const menuItem = childRegistry === null || childRegistry === void 0 ? void 0 : childRegistry.get(id_0);
|
|
284
|
-
if (!menuItem) {
|
|
285
|
-
return null;
|
|
286
|
-
}
|
|
287
|
-
if (menuItem.type === "divider") {
|
|
288
|
-
return /*#__PURE__*/jsx(ActionList.Divider, {}, id_0);
|
|
289
|
-
} else {
|
|
290
|
-
if (menuItem.type === "action") {
|
|
291
|
-
const {
|
|
292
|
-
onClick,
|
|
293
|
-
icon: Icon,
|
|
294
|
-
label,
|
|
295
|
-
disabled
|
|
296
|
-
} = menuItem;
|
|
297
|
-
return /*#__PURE__*/jsxs(ActionList.Item, {
|
|
298
|
-
onSelect: event => {
|
|
299
|
-
typeof onClick === "function" && onClick(event);
|
|
300
|
-
},
|
|
301
|
-
disabled: disabled,
|
|
302
|
-
children: [/*#__PURE__*/jsx(ActionList.LeadingVisual, {
|
|
303
|
-
children: /*#__PURE__*/jsx(Icon, {})
|
|
304
|
-
}), label]
|
|
305
|
-
}, label);
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
if (menuItem.type === "menu") {
|
|
309
|
-
const menuItems = menuItem.items;
|
|
310
|
-
const {
|
|
311
|
-
icon: Icon_0,
|
|
312
|
-
label: label_0,
|
|
313
|
-
returnFocusRef
|
|
314
|
-
} = menuItem;
|
|
315
|
-
return /*#__PURE__*/jsxs(ActionMenu, {
|
|
316
|
-
children: [/*#__PURE__*/jsx(ActionMenu.Anchor, {
|
|
317
|
-
children: /*#__PURE__*/jsxs(ActionList.Item, {
|
|
318
|
-
children: [Icon_0 !== "none" ? /*#__PURE__*/jsx(ActionList.LeadingVisual, {
|
|
319
|
-
children: /*#__PURE__*/jsx(Icon_0, {})
|
|
320
|
-
}) : null, label_0]
|
|
321
|
-
})
|
|
322
|
-
}), /*#__PURE__*/jsx(ActionMenu.Overlay, {
|
|
323
|
-
...(returnFocusRef && {
|
|
324
|
-
returnFocusRef
|
|
325
|
-
}),
|
|
326
|
-
children: /*#__PURE__*/jsx(ActionList, {
|
|
327
|
-
children: menuItems.map(_temp2)
|
|
328
|
-
})
|
|
329
|
-
})]
|
|
330
|
-
}, id_0);
|
|
331
|
-
}
|
|
332
|
-
const groupedMenuItems = groupedItems.get(id_0) || [];
|
|
333
|
-
if (menuItem.type === "group") {
|
|
334
|
-
return /*#__PURE__*/jsx(React.Fragment, {
|
|
335
|
-
children: groupedMenuItems.map(_temp3)
|
|
336
|
-
}, id_0);
|
|
337
|
-
}
|
|
338
|
-
})
|
|
339
|
-
})
|
|
340
|
-
})]
|
|
316
|
+
let t21;
|
|
317
|
+
if ($[44] !== T2 || $[45] !== t20 || $[46] !== t5) {
|
|
318
|
+
t21 = /*#__PURE__*/jsxs(T2, {
|
|
319
|
+
children: [t5, t20]
|
|
341
320
|
});
|
|
342
|
-
$[
|
|
343
|
-
$[
|
|
344
|
-
$[
|
|
345
|
-
$[
|
|
346
|
-
$[24] = t11;
|
|
321
|
+
$[44] = T2;
|
|
322
|
+
$[45] = t20;
|
|
323
|
+
$[46] = t5;
|
|
324
|
+
$[47] = t21;
|
|
347
325
|
} else {
|
|
348
|
-
|
|
349
|
-
}
|
|
350
|
-
let
|
|
351
|
-
if ($[
|
|
352
|
-
|
|
353
|
-
ref:
|
|
354
|
-
role:
|
|
355
|
-
className:
|
|
356
|
-
"aria-label":
|
|
357
|
-
"aria-labelledby":
|
|
358
|
-
"data-gap":
|
|
359
|
-
|
|
326
|
+
t21 = $[47];
|
|
327
|
+
}
|
|
328
|
+
let t22;
|
|
329
|
+
if ($[48] !== t10 || $[49] !== t11 || $[50] !== t12 || $[51] !== t13 || $[52] !== t14 || $[53] !== t21 || $[54] !== t6 || $[55] !== t7 || $[56] !== t8 || $[57] !== t9) {
|
|
330
|
+
t22 = /*#__PURE__*/jsxs("div", {
|
|
331
|
+
ref: t6,
|
|
332
|
+
role: t7,
|
|
333
|
+
className: t8,
|
|
334
|
+
"aria-label": t9,
|
|
335
|
+
"aria-labelledby": t10,
|
|
336
|
+
"data-gap": t11,
|
|
337
|
+
"data-size": t12,
|
|
338
|
+
"data-has-overflow": t13,
|
|
339
|
+
children: [t14, t21]
|
|
360
340
|
});
|
|
361
|
-
$[
|
|
362
|
-
$[
|
|
363
|
-
$[
|
|
364
|
-
$[
|
|
365
|
-
$[
|
|
366
|
-
$[
|
|
341
|
+
$[48] = t10;
|
|
342
|
+
$[49] = t11;
|
|
343
|
+
$[50] = t12;
|
|
344
|
+
$[51] = t13;
|
|
345
|
+
$[52] = t14;
|
|
346
|
+
$[53] = t21;
|
|
347
|
+
$[54] = t6;
|
|
348
|
+
$[55] = t7;
|
|
349
|
+
$[56] = t8;
|
|
350
|
+
$[57] = t9;
|
|
351
|
+
$[58] = t22;
|
|
367
352
|
} else {
|
|
368
|
-
|
|
369
|
-
}
|
|
370
|
-
let
|
|
371
|
-
if ($[
|
|
372
|
-
|
|
373
|
-
ref:
|
|
374
|
-
className:
|
|
375
|
-
"data-flush":
|
|
376
|
-
children:
|
|
353
|
+
t22 = $[58];
|
|
354
|
+
}
|
|
355
|
+
let t23;
|
|
356
|
+
if ($[59] !== t15 || $[60] !== t16 || $[61] !== t17 || $[62] !== t22) {
|
|
357
|
+
t23 = /*#__PURE__*/jsx("div", {
|
|
358
|
+
ref: t15,
|
|
359
|
+
className: t16,
|
|
360
|
+
"data-flush": t17,
|
|
361
|
+
children: t22
|
|
377
362
|
});
|
|
378
|
-
$[
|
|
379
|
-
$[
|
|
380
|
-
$[
|
|
381
|
-
$[
|
|
363
|
+
$[59] = t15;
|
|
364
|
+
$[60] = t16;
|
|
365
|
+
$[61] = t17;
|
|
366
|
+
$[62] = t22;
|
|
367
|
+
$[63] = t23;
|
|
382
368
|
} else {
|
|
383
|
-
|
|
369
|
+
t23 = $[63];
|
|
384
370
|
}
|
|
385
|
-
let
|
|
386
|
-
if ($[
|
|
387
|
-
|
|
388
|
-
value:
|
|
389
|
-
children:
|
|
371
|
+
let t24;
|
|
372
|
+
if ($[64] !== T3 || $[65] !== t18 || $[66] !== t23) {
|
|
373
|
+
t24 = /*#__PURE__*/jsx(T3, {
|
|
374
|
+
value: t18,
|
|
375
|
+
children: t23
|
|
390
376
|
});
|
|
391
|
-
$[
|
|
392
|
-
$[
|
|
393
|
-
$[
|
|
377
|
+
$[64] = T3;
|
|
378
|
+
$[65] = t18;
|
|
379
|
+
$[66] = t23;
|
|
380
|
+
$[67] = t24;
|
|
394
381
|
} else {
|
|
395
|
-
|
|
382
|
+
t24 = $[67];
|
|
396
383
|
}
|
|
397
|
-
return
|
|
384
|
+
return t24;
|
|
398
385
|
};
|
|
399
|
-
function
|
|
400
|
-
const $ = c(
|
|
401
|
-
const [width, setWidth] = useState(-1);
|
|
386
|
+
function useActionBarItem(ref, registryProps) {
|
|
387
|
+
const $ = c(7);
|
|
402
388
|
let t0;
|
|
403
|
-
let t1;
|
|
404
389
|
if ($[0] !== ref) {
|
|
405
|
-
t0 =
|
|
406
|
-
|
|
407
|
-
|
|
390
|
+
t0 = onChange => {
|
|
391
|
+
const observer = new IntersectionObserver(() => onChange(), {
|
|
392
|
+
threshold: 1
|
|
393
|
+
});
|
|
394
|
+
if (ref.current) {
|
|
395
|
+
observer.observe(ref.current);
|
|
396
|
+
}
|
|
397
|
+
return () => observer.disconnect();
|
|
408
398
|
};
|
|
409
|
-
t1 = [ref];
|
|
410
399
|
$[0] = ref;
|
|
411
400
|
$[1] = t0;
|
|
412
|
-
$[2] = t1;
|
|
413
401
|
} else {
|
|
414
402
|
t0 = $[1];
|
|
415
|
-
t1 = $[2];
|
|
416
403
|
}
|
|
417
|
-
|
|
418
|
-
|
|
404
|
+
let t1;
|
|
405
|
+
if ($[2] !== ref) {
|
|
406
|
+
t1 = () => ref.current ? ref.current.offsetTop > 0 : false;
|
|
407
|
+
$[2] = ref;
|
|
408
|
+
$[3] = t1;
|
|
409
|
+
} else {
|
|
410
|
+
t1 = $[3];
|
|
411
|
+
}
|
|
412
|
+
const isOverflowing = useSyncExternalStore(t0, t1, _temp4);
|
|
413
|
+
const id = ActionBarItemsRegistry.useRegisterDescendant(isOverflowing ? registryProps : null);
|
|
414
|
+
let t2;
|
|
415
|
+
if ($[4] !== id || $[5] !== isOverflowing) {
|
|
416
|
+
t2 = {
|
|
417
|
+
id,
|
|
418
|
+
isOverflowing
|
|
419
|
+
};
|
|
420
|
+
$[4] = id;
|
|
421
|
+
$[5] = isOverflowing;
|
|
422
|
+
$[6] = t2;
|
|
423
|
+
} else {
|
|
424
|
+
t2 = $[6];
|
|
425
|
+
}
|
|
426
|
+
return t2;
|
|
427
|
+
}
|
|
428
|
+
function _temp4() {
|
|
429
|
+
return false;
|
|
419
430
|
}
|
|
420
431
|
const ActionBarIconButton = /*#__PURE__*/forwardRef(({
|
|
421
432
|
disabled,
|
|
@@ -425,39 +436,37 @@ const ActionBarIconButton = /*#__PURE__*/forwardRef(({
|
|
|
425
436
|
const ref = useRef(null);
|
|
426
437
|
useRefObjectAsForwardedRef(forwardedRef, ref);
|
|
427
438
|
const {
|
|
428
|
-
size
|
|
429
|
-
isVisibleChild
|
|
439
|
+
size
|
|
430
440
|
} = React.useContext(ActionBarContext);
|
|
431
441
|
const {
|
|
432
442
|
groupId
|
|
433
443
|
} = React.useContext(ActionBarGroupContext);
|
|
434
|
-
const width = useWidth(ref);
|
|
435
444
|
const {
|
|
436
445
|
['aria-label']: ariaLabel,
|
|
437
446
|
icon
|
|
438
447
|
} = props;
|
|
439
|
-
const
|
|
448
|
+
const {
|
|
449
|
+
isOverflowing
|
|
450
|
+
} = useActionBarItem(ref, useMemo(() => ({
|
|
440
451
|
type: 'action',
|
|
441
452
|
label: ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : '',
|
|
442
453
|
icon,
|
|
443
454
|
disabled: !!disabled,
|
|
444
455
|
onClick: onClick,
|
|
445
|
-
width,
|
|
446
456
|
groupId: groupId !== null && groupId !== void 0 ? groupId : undefined
|
|
447
|
-
}), [ariaLabel, icon, disabled, onClick, groupId
|
|
448
|
-
const id = ActionBarItemsRegistry.useRegisterDescendant(registryProps);
|
|
457
|
+
}), [ariaLabel, icon, disabled, onClick, groupId]));
|
|
449
458
|
const clickHandler = useCallback(event => {
|
|
450
459
|
if (disabled) return;
|
|
451
460
|
onClick === null || onClick === void 0 ? void 0 : onClick(event);
|
|
452
461
|
}, [disabled, onClick]);
|
|
453
|
-
if (!isVisibleChild(id) || groupId && !isVisibleChild(groupId)) return null;
|
|
454
462
|
return /*#__PURE__*/jsx(IconButton, {
|
|
455
463
|
"aria-disabled": disabled,
|
|
456
464
|
ref: ref,
|
|
457
465
|
size: size,
|
|
458
466
|
onClick: clickHandler,
|
|
459
467
|
...props,
|
|
460
|
-
variant: "invisible"
|
|
468
|
+
variant: "invisible",
|
|
469
|
+
"data-overflowing": isOverflowing
|
|
461
470
|
});
|
|
462
471
|
});
|
|
463
472
|
const ActionBarGroupContext = /*#__PURE__*/React.createContext({
|
|
@@ -470,38 +479,39 @@ const ActionBarGroup = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
|
470
479
|
} = t0;
|
|
471
480
|
const backupRef = useRef(null);
|
|
472
481
|
const ref = forwardedRef !== null && forwardedRef !== void 0 ? forwardedRef : backupRef;
|
|
473
|
-
const width = useWidth(ref);
|
|
474
482
|
let t1;
|
|
475
|
-
if ($[0]
|
|
483
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
476
484
|
t1 = {
|
|
477
|
-
type: "group"
|
|
478
|
-
width
|
|
485
|
+
type: "group"
|
|
479
486
|
};
|
|
480
|
-
$[0] =
|
|
481
|
-
$[1] = t1;
|
|
487
|
+
$[0] = t1;
|
|
482
488
|
} else {
|
|
483
|
-
t1 = $[
|
|
489
|
+
t1 = $[0];
|
|
484
490
|
}
|
|
485
|
-
const
|
|
486
|
-
|
|
491
|
+
const {
|
|
492
|
+
id,
|
|
493
|
+
isOverflowing
|
|
494
|
+
} = useActionBarItem(ref, t1);
|
|
487
495
|
let t2;
|
|
488
|
-
if ($[
|
|
496
|
+
if ($[1] !== id) {
|
|
489
497
|
t2 = {
|
|
490
498
|
groupId: id
|
|
491
499
|
};
|
|
492
|
-
$[
|
|
493
|
-
$[
|
|
500
|
+
$[1] = id;
|
|
501
|
+
$[2] = t2;
|
|
494
502
|
} else {
|
|
495
|
-
t2 = $[
|
|
503
|
+
t2 = $[2];
|
|
496
504
|
}
|
|
497
505
|
let t3;
|
|
498
|
-
if ($[
|
|
506
|
+
if ($[3] !== children || $[4] !== isOverflowing || $[5] !== ref) {
|
|
499
507
|
t3 = /*#__PURE__*/jsx("div", {
|
|
500
508
|
className: styles.Group,
|
|
501
509
|
ref: ref,
|
|
510
|
+
"data-overflowing": isOverflowing,
|
|
502
511
|
children: children
|
|
503
512
|
});
|
|
504
|
-
$[
|
|
513
|
+
$[3] = children;
|
|
514
|
+
$[4] = isOverflowing;
|
|
505
515
|
$[5] = ref;
|
|
506
516
|
$[6] = t3;
|
|
507
517
|
} else {
|
|
@@ -555,17 +565,12 @@ const ActionBarMenu = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
|
555
565
|
}
|
|
556
566
|
const backupRef = useRef(null);
|
|
557
567
|
const ref = forwardedRef !== null && forwardedRef !== void 0 ? forwardedRef : backupRef;
|
|
558
|
-
const {
|
|
559
|
-
isVisibleChild
|
|
560
|
-
} = React.useContext(ActionBarContext);
|
|
561
568
|
const [menuOpen, setMenuOpen] = useState(false);
|
|
562
|
-
const width = useWidth(ref);
|
|
563
569
|
const t1 = overflowIcon ? overflowIcon : icon;
|
|
564
570
|
let t2;
|
|
565
|
-
if ($[7] !== ariaLabel || $[8] !== items || $[9] !== returnFocusRef || $[10] !== t1
|
|
571
|
+
if ($[7] !== ariaLabel || $[8] !== items || $[9] !== returnFocusRef || $[10] !== t1) {
|
|
566
572
|
t2 = {
|
|
567
573
|
type: "menu",
|
|
568
|
-
width,
|
|
569
574
|
label: ariaLabel,
|
|
570
575
|
icon: t1,
|
|
571
576
|
returnFocusRef,
|
|
@@ -575,28 +580,27 @@ const ActionBarMenu = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
|
575
580
|
$[8] = items;
|
|
576
581
|
$[9] = returnFocusRef;
|
|
577
582
|
$[10] = t1;
|
|
578
|
-
$[11] =
|
|
579
|
-
$[12] = t2;
|
|
583
|
+
$[11] = t2;
|
|
580
584
|
} else {
|
|
581
|
-
t2 = $[
|
|
582
|
-
}
|
|
583
|
-
const registryProps = t2;
|
|
584
|
-
const id = ActionBarItemsRegistry.useRegisterDescendant(registryProps);
|
|
585
|
-
if (!isVisibleChild(id)) {
|
|
586
|
-
return null;
|
|
585
|
+
t2 = $[11];
|
|
587
586
|
}
|
|
587
|
+
const {
|
|
588
|
+
isOverflowing
|
|
589
|
+
} = useActionBarItem(ref, t2);
|
|
588
590
|
let t3;
|
|
589
|
-
if ($[
|
|
591
|
+
if ($[12] !== ariaLabel || $[13] !== icon || $[14] !== isOverflowing || $[15] !== props) {
|
|
590
592
|
t3 = /*#__PURE__*/jsx(ActionMenu.Anchor, {
|
|
591
593
|
children: /*#__PURE__*/jsx(IconButton, {
|
|
592
594
|
variant: "invisible",
|
|
593
595
|
"aria-label": ariaLabel,
|
|
594
596
|
icon: icon,
|
|
595
|
-
...props
|
|
597
|
+
...props,
|
|
598
|
+
"data-overflowing": isOverflowing
|
|
596
599
|
})
|
|
597
600
|
});
|
|
598
|
-
$[
|
|
599
|
-
$[
|
|
601
|
+
$[12] = ariaLabel;
|
|
602
|
+
$[13] = icon;
|
|
603
|
+
$[14] = isOverflowing;
|
|
600
604
|
$[15] = props;
|
|
601
605
|
$[16] = t3;
|
|
602
606
|
} else {
|
|
@@ -614,7 +618,7 @@ const ActionBarMenu = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
|
614
618
|
}
|
|
615
619
|
let t5;
|
|
616
620
|
if ($[19] !== items) {
|
|
617
|
-
t5 = items.map(
|
|
621
|
+
t5 = items.map(_temp5);
|
|
618
622
|
$[19] = items;
|
|
619
623
|
$[20] = t5;
|
|
620
624
|
} else {
|
|
@@ -663,42 +667,36 @@ const ActionBarMenu = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
|
663
667
|
const VerticalDivider = () => {
|
|
664
668
|
const $ = c(3);
|
|
665
669
|
const ref = useRef(null);
|
|
666
|
-
const {
|
|
667
|
-
isVisibleChild
|
|
668
|
-
} = React.useContext(ActionBarContext);
|
|
669
|
-
const width = useWidth(ref);
|
|
670
670
|
let t0;
|
|
671
|
-
if ($[0]
|
|
671
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
672
672
|
t0 = {
|
|
673
|
-
type: "divider"
|
|
674
|
-
width
|
|
673
|
+
type: "divider"
|
|
675
674
|
};
|
|
676
|
-
$[0] =
|
|
677
|
-
$[1] = t0;
|
|
675
|
+
$[0] = t0;
|
|
678
676
|
} else {
|
|
679
|
-
t0 = $[
|
|
680
|
-
}
|
|
681
|
-
const registryProps = t0;
|
|
682
|
-
const id = ActionBarItemsRegistry.useRegisterDescendant(registryProps);
|
|
683
|
-
if (!isVisibleChild(id)) {
|
|
684
|
-
return null;
|
|
677
|
+
t0 = $[0];
|
|
685
678
|
}
|
|
679
|
+
const {
|
|
680
|
+
isOverflowing
|
|
681
|
+
} = useActionBarItem(ref, t0);
|
|
686
682
|
let t1;
|
|
687
|
-
if ($[
|
|
683
|
+
if ($[1] !== isOverflowing) {
|
|
688
684
|
t1 = /*#__PURE__*/jsx("div", {
|
|
689
685
|
ref: ref,
|
|
690
686
|
"data-component": "ActionBar.VerticalDivider",
|
|
691
687
|
"aria-hidden": "true",
|
|
692
|
-
className: styles.Divider
|
|
688
|
+
className: styles.Divider,
|
|
689
|
+
"data-overflowing": isOverflowing
|
|
693
690
|
});
|
|
691
|
+
$[1] = isOverflowing;
|
|
694
692
|
$[2] = t1;
|
|
695
693
|
} else {
|
|
696
694
|
t1 = $[2];
|
|
697
695
|
}
|
|
698
696
|
return t1;
|
|
699
697
|
};
|
|
700
|
-
function _temp() {
|
|
701
|
-
return
|
|
698
|
+
function _temp(entry) {
|
|
699
|
+
return entry[1] !== null;
|
|
702
700
|
}
|
|
703
701
|
function _temp2(item, index) {
|
|
704
702
|
return renderMenuItem(item, index);
|
|
@@ -724,7 +722,7 @@ function _temp3(t0) {
|
|
|
724
722
|
}
|
|
725
723
|
return null;
|
|
726
724
|
}
|
|
727
|
-
function
|
|
725
|
+
function _temp5(item, index) {
|
|
728
726
|
return renderMenuItem(item, index);
|
|
729
727
|
}
|
|
730
728
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import './ActionBar-
|
|
1
|
+
import './ActionBar-64aee131.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-Banner-Banner-IPLJ2{align-items:start;background-color:var(--banner-bgColor);border:var(--borderWidth-thin,.0625rem) solid var(--banner-borderColor);border-radius:var(--borderRadius-medium,.375rem);display:grid;grid-template-columns:auto minmax(0,1fr) auto;padding:var(--base-size-8,.5rem)}@supports (container-type:inline-size){.prc-Banner-Banner-IPLJ2[data-actions-layout=default]{container:banner/inline-size}}.prc-Banner-Banner-IPLJ2[data-actions-layout=stacked] .prc-Banner-BannerContainer-T-Siu{flex-direction:column}.prc-Banner-Banner-IPLJ2[data-actions-layout=stacked] .prc-Banner-BannerActions-gvCLf :where([data-primary-action=trailing]){display:none}.prc-Banner-Banner-IPLJ2[data-actions-layout=stacked] .prc-Banner-BannerActions-gvCLf :where([data-primary-action=leading]){display:flex}.prc-Banner-Banner-IPLJ2[data-actions-layout=inline] .prc-Banner-BannerContainer-T-Siu{flex-wrap:nowrap}.prc-Banner-Banner-IPLJ2[data-actions-layout=inline] .prc-Banner-BannerActions-gvCLf{flex:0 0 auto}.prc-Banner-Banner-IPLJ2[data-actions-layout=inline] .prc-Banner-BannerActions-gvCLf :where([data-primary-action=trailing]){display:flex}.prc-Banner-Banner-IPLJ2[data-actions-layout=inline] .prc-Banner-BannerActions-gvCLf :where([data-primary-action=leading]){display:none}@media screen and (max-width:calc(48rem - 0.02px)){.prc-Banner-Banner-IPLJ2[data-actions-layout=inline] .prc-Banner-BannerContainer-T-Siu{flex-direction:column}.prc-Banner-Banner-IPLJ2[data-actions-layout=inline] .prc-Banner-BannerActions-gvCLf :where([data-primary-action=trailing]){display:none}.prc-Banner-Banner-IPLJ2[data-actions-layout=inline] .prc-Banner-BannerActions-gvCLf :where([data-primary-action=leading]){display:flex}}.prc-Banner-Banner-IPLJ2[data-layout=compact]{padding:var(--base-size-4,.25rem)}.prc-Banner-Banner-IPLJ2[data-flush]{border-left:none;border-radius:0;border-right:none}.prc-Banner-Banner-IPLJ2[data-variant=critical]{--banner-bgColor:var(--bgColor-danger-muted,var(--color-danger-subtle));--banner-borderColor:var(--borderColor-danger-muted,var(--color-danger-muted));--banner-icon-fgColor:var(--fgColor-danger,var(--color-danger-fg))}.prc-Banner-Banner-IPLJ2[data-variant=info]{--banner-bgColor:var(--bgColor-accent-muted,var(--color-accent-subtle));--banner-borderColor:var(--borderColor-accent-muted,var(--color-accent-muted));--banner-icon-fgColor:var(--fgColor-accent,var(--color-accent-fg))}.prc-Banner-Banner-IPLJ2[data-variant=success]{--banner-bgColor:var(--bgColor-success-muted,var(--color-success-subtle));--banner-borderColor:var(--borderColor-success-muted,var(--color-success-muted));--banner-icon-fgColor:var(--fgColor-success,var(--color-success-fg))}.prc-Banner-Banner-IPLJ2[data-variant=upsell]{--banner-bgColor:var(--bgColor-upsell-muted,#fbefff);--banner-borderColor:var(--borderColor-upsell-muted,#c297ff66);--banner-icon-fgColor:var(--fgColor-upsell,#8250df)}.prc-Banner-Banner-IPLJ2[data-variant=warning]{--banner-bgColor:var(--bgColor-attention-muted,var(--color-attention-subtle));--banner-borderColor:var(--borderColor-attention-muted,var(--color-attention-muted));--banner-icon-fgColor:var(--fgColor-attention,var(--color-attention-fg))}.prc-Banner-BannerContainer-T-Siu{align-items:start;column-gap:var(--base-size-4,.25rem);font-size:var(--text-body-size-medium,.875rem);line-height:var(--text-body-lineHeight-medium,1.5);row-gap:var(--base-size-4,.25rem)}.prc-Banner-Banner-IPLJ2 :where(.prc-Banner-BannerContainer-T-Siu){display:flex;flex-wrap:wrap;justify-content:space-between}.prc-Banner-Banner-IPLJ2[data-dismissible]:not([data-title-hidden],[data-actions-layout=inline]) .prc-Banner-BannerContainer-T-Siu{display:grid;grid-template-columns:auto;grid-template-rows:auto}.prc-Banner-BannerContent-LraS2{display:grid;grid-column-start:1;margin-block:var(--base-size-8,.5rem);row-gap:var(--base-size-4,.25rem)}.prc-Banner-Banner-IPLJ2[data-title-hidden]:not(:has(.prc-Banner-BannerActions-gvCLf)) .prc-Banner-BannerContent-LraS2{margin-block:var(--base-size-6,.375rem)}@media screen and (min-width:544px){.prc-Banner-BannerContent-LraS2{flex:1 1 0%}}.prc-Banner-BannerTitle-T4z0L{font-size:inherit;font-weight:var(--base-text-weight-semibold,600);margin:0}.prc-Banner-BannerIcon-o4ayx{display:grid;padding:var(--base-size-8,.5rem);place-items:center}.prc-Banner-BannerIcon-o4ayx svg{color:var(--banner-icon-fgColor);height:var(--base-size-20,1.25rem);fill:var(--banner-icon-fgColor)}.prc-Banner-Banner-IPLJ2[data-title-hidden]:not(:has(.prc-Banner-BannerActions-gvCLf)) .prc-Banner-BannerIcon-o4ayx svg{height:var(--base-size-16,1rem)}.prc-Banner-BannerDismiss-b12FL{display:grid;margin-inline-start:var(--base-size-4,.25rem);padding:var(--base-size-8,.5rem);place-items:center}:where(.prc-Banner-Banner-IPLJ2):has(.prc-Banner-BannerActions-gvCLf) .prc-Banner-BannerDismiss-b12FL{margin-block:var(--base-size-2,.125rem)}.prc-Banner-BannerDismiss-b12FL svg{color:var(--banner-icon-fgColor)}.prc-Banner-BannerActionsContainer-PdBu1{align-items:center;column-gap:var(--base-size-12,.75rem);display:flex;margin-block:var(--base-size-2,.125rem)}.prc-Banner-BannerActions-gvCLf :where([data-primary-action=trailing]){display:none}.prc-Banner-Banner-IPLJ2[data-dismissible]:not([data-title-hidden],[data-actions-layout=inline]) .prc-Banner-BannerActions-gvCLf{margin-block-end:var(--base-size-6,.375rem)}.prc-Banner-Banner-IPLJ2[data-dismissible]:not([data-title-hidden],[data-actions-layout=inline]) .prc-Banner-BannerActionsContainer-PdBu1[data-primary-action=trailing]{display:none}.prc-Banner-Banner-IPLJ2[data-dismissible]:not([data-title-hidden],[data-actions-layout=inline]) .prc-Banner-BannerActionsContainer-PdBu1[data-primary-action=leading]{display:flex}@container banner (max-width: 500px){.prc-Banner-BannerContainer-T-Siu{display:grid}.prc-Banner-BannerContainer-T-Siu:has(.prc-Banner-BannerActionsContainer-PdBu1){grid-template-rows:auto auto}.prc-Banner-BannerActions-gvCLf{margin-block-end:var(--base-size-6,.375rem)}.prc-Banner-BannerActions-gvCLf [data-primary-action=trailing]{display:none}.prc-Banner-BannerActions-gvCLf [data-primary-action=leading]{display:flex}}@container banner (min-width: 500px){.prc-Banner-BannerContainer-T-Siu{display:grid;grid-template-columns:auto auto}:where(.prc-Banner-Banner-IPLJ2):not([data-dismissible]) :where(.prc-Banner-BannerActionsContainer-PdBu1[data-primary-action=trailing]) :where([data-variant=link]:only-child){padding-inline:0 var(--base-size-12,.75rem)}.prc-Banner-BannerActions-gvCLf [data-primary-action=trailing]{display:flex;min-height:var(--base-size-32,2rem)}.prc-Banner-BannerActions-gvCLf [data-primary-action=leading]{display:none}}
|
|
2
|
+
/*# sourceMappingURL=Banner-b3871000.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/Banner/Banner.module.css.js"],"names":[],"mappings":"AAAA,yBASE,iBAAkB,CALlB,sCAAuC,CAEvC,uEAA+D,CAC/D,gDAAyC,CANzC,YAAa,CAOb,6CAA+C,CAN/C,gCAoGF,CA1FI,uCADF,sDAEI,4BAEJ,CADE,CAIA,wFACE,qBACF,CAEA,6HACE,YACF,CAEA,4HACE,YACF,CAIA,uFACE,gBACF,CAEA,qFACE,aACF,CAEA,4HACE,YACF,CAEA,2HACE,YACF,CAEA,mDACE,uFACE,qBACF,CAEA,4HACE,YACF,CAEA,2HACE,YACF,CACF,CAGF,8CACE,iCACF,CAEA,qCACE,gBAAiB,CAEjB,eAAgB,CADhB,iBAEF,CAEA,gDACE,uEAA6C,CAC7C,8EAAqD,CACrD,kEACF,CAEA,4CACE,uEAA6C,CAC7C,8EAAqD,CACrD,kEACF,CAEA,+CACE,yEAA8C,CAC9C,gFAAsD,CACtD,oEACF,CAEA,8CACE,oDAA6C,CAC7C,8DAAqD,CACrD,mDACF,CAEA,+CACE,6EAAgD,CAChD,oFAAwD,CACxD,wEACF,CAKF,kCAEE,iBAAkB,CAGlB,oCAA8B,CAJ9B,8CAAuC,CAEvC,kDAA+C,CAC/C,iCAEF,CAEA,mEACE,YAAa,CACb,cAAe,CACf,6BACF,CAEA,mIACE,YAAa,CACb,0BAA2B,CAC3B,uBACF,CAIA,gCACE,YAAa,CAEb,mBAAoB,CACpB,qCAAgC,CAFhC,iCAGF,CAEA,uHACE,uCACF,CAEA,oCACE,gCACE,WACF,CACF,CAEA,8BAEE,iBAAkB,CAClB,gDAA6C,CAF7C,QAGF,CAIA,6BACE,YAAa,CAEb,gCAA2B,CAD3B,kBAEF,CAEA,iCAIE,gCAAiC,CAFjC,kCAA2B,CAI3B,+BACF,CAGA,wHACE,+BACF,CAIA,gCACE,YAAa,CAGb,6CAAuC,CADvC,gCAA2B,CAD3B,kBAGF,CAEA,sGACE,uCACF,CAEA,oCAEE,gCACF,CAIA,yCAGE,kBAAmB,CADnB,qCAA+B,CAD/B,YAAa,CAGb,uCACF,CAEA,uEACE,YACF,CAEA,iIACE,2CACF,CAGA,wKAEE,YACF,CAGA,uKAEE,YACF,CAIA,qCACE,kCACE,YACF,CAEA,gFACE,4BACF,CAEA,gCACE,2CACF,CAEA,+DACE,YACF,CAEA,8DACE,YACF,CACF,CAEA,qCACE,kCACE,YAAa,CACb,+BACF,CAEA,+KAGE,2CACF,CAEA,+DACE,YAAa,CACb,mCACF,CAEA,8DACE,YACF,CACF","file":"Banner-b3871000.css","sourcesContent":[".Banner {\n display: grid;\n padding: var(--base-size-8);\n /* stylelint-disable-next-line primer/colors */\n background-color: var(--banner-bgColor);\n /* stylelint-disable-next-line primer/colors */\n border: var(--borderWidth-thin) solid var(--banner-borderColor);\n border-radius: var(--borderRadius-medium);\n grid-template-columns: auto minmax(0, 1fr) auto;\n align-items: start;\n\n &[data-actions-layout='default'] {\n @supports (container-type: inline-size) {\n container: banner / inline-size;\n }\n }\n\n &[data-actions-layout='stacked'] {\n & .BannerContainer {\n flex-direction: column;\n }\n\n & .BannerActions :where([data-primary-action='trailing']) {\n display: none;\n }\n\n & .BannerActions :where([data-primary-action='leading']) {\n display: flex;\n }\n }\n\n &[data-actions-layout='inline'] {\n & .BannerContainer {\n flex-wrap: nowrap;\n }\n\n & .BannerActions {\n flex: 0 0 auto;\n }\n\n & .BannerActions :where([data-primary-action='trailing']) {\n display: flex;\n }\n\n & .BannerActions :where([data-primary-action='leading']) {\n display: none;\n }\n\n @media screen and (--viewportRange-narrow) {\n & .BannerContainer {\n flex-direction: column;\n }\n\n & .BannerActions :where([data-primary-action='trailing']) {\n display: none;\n }\n\n & .BannerActions :where([data-primary-action='leading']) {\n display: flex;\n }\n }\n }\n\n &[data-layout='compact'] {\n padding: var(--base-size-4);\n }\n\n &[data-flush] {\n border-left: none;\n border-right: none;\n border-radius: 0;\n }\n\n &[data-variant='critical'] {\n --banner-bgColor: var(--bgColor-danger-muted);\n --banner-borderColor: var(--borderColor-danger-muted);\n --banner-icon-fgColor: var(--fgColor-danger);\n }\n\n &[data-variant='info'] {\n --banner-bgColor: var(--bgColor-accent-muted);\n --banner-borderColor: var(--borderColor-accent-muted);\n --banner-icon-fgColor: var(--fgColor-accent);\n }\n\n &[data-variant='success'] {\n --banner-bgColor: var(--bgColor-success-muted);\n --banner-borderColor: var(--borderColor-success-muted);\n --banner-icon-fgColor: var(--fgColor-success);\n }\n\n &[data-variant='upsell'] {\n --banner-bgColor: var(--bgColor-upsell-muted);\n --banner-borderColor: var(--borderColor-upsell-muted);\n --banner-icon-fgColor: var(--fgColor-upsell);\n }\n\n &[data-variant='warning'] {\n --banner-bgColor: var(--bgColor-attention-muted);\n --banner-borderColor: var(--borderColor-attention-muted);\n --banner-icon-fgColor: var(--fgColor-attention);\n }\n}\n\n/* BannerContainer -------------------------------------------------------- */\n\n.BannerContainer {\n font-size: var(--text-body-size-medium);\n align-items: start;\n line-height: var(--text-body-lineHeight-medium);\n row-gap: var(--base-size-4);\n column-gap: var(--base-size-4);\n}\n\n.Banner :where(.BannerContainer) {\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n}\n\n.Banner[data-dismissible]:not([data-title-hidden], [data-actions-layout='inline']) .BannerContainer {\n display: grid;\n grid-template-columns: auto;\n grid-template-rows: auto;\n}\n\n/* BannerContent ---------------------------------------------------------- */\n\n.BannerContent {\n display: grid;\n row-gap: var(--base-size-4);\n grid-column-start: 1;\n margin-block: var(--base-size-8);\n}\n\n.Banner[data-title-hidden]:not(:has(.BannerActions)) .BannerContent {\n margin-block: var(--base-size-6);\n}\n\n@media screen and (min-width: 544px) {\n .BannerContent {\n flex: 1 1 0%;\n }\n}\n\n.BannerTitle {\n margin: 0;\n font-size: inherit;\n font-weight: var(--base-text-weight-semibold);\n}\n\n/* BannerIcon ------------------------------------------------------------- */\n\n.BannerIcon {\n display: grid;\n place-items: center;\n padding: var(--base-size-8);\n}\n\n.BannerIcon svg {\n /* 20px is the line box height of the trailing action buttons */\n height: var(--base-size-20);\n /* stylelint-disable-next-line primer/colors */\n color: var(--banner-icon-fgColor);\n /* stylelint-disable-next-line primer/colors */\n fill: var(--banner-icon-fgColor);\n}\n\n/* stylelint-disable-next-line selector-max-specificity */\n.Banner[data-title-hidden]:not(:has(.BannerActions)) .BannerIcon svg {\n height: var(--base-size-16);\n}\n\n/* BannerDismiss ---------------------------------------------------------- */\n\n.BannerDismiss {\n display: grid;\n place-items: center;\n padding: var(--base-size-8);\n margin-inline-start: var(--base-size-4);\n}\n\n:where(.Banner):has(.BannerActions) .BannerDismiss {\n margin-block: var(--base-size-2);\n}\n\n.BannerDismiss svg {\n /* stylelint-disable-next-line primer/colors */\n color: var(--banner-icon-fgColor);\n}\n\n/* BannerActions ---------------------------------------------------------- */\n\n.BannerActionsContainer {\n display: flex;\n column-gap: var(--base-size-12);\n align-items: center;\n margin-block: var(--base-size-2);\n}\n\n.BannerActions :where([data-primary-action='trailing']) {\n display: none;\n}\n\n.Banner[data-dismissible]:not([data-title-hidden], [data-actions-layout='inline']) .BannerActions {\n margin-block-end: var(--base-size-6);\n}\n\n/* stylelint-disable-next-line selector-max-specificity */\n.Banner[data-dismissible]:not([data-title-hidden], [data-actions-layout='inline'])\n .BannerActionsContainer[data-primary-action='trailing'] {\n display: none;\n}\n\n/* stylelint-disable-next-line selector-max-specificity */\n.Banner[data-dismissible]:not([data-title-hidden], [data-actions-layout='inline'])\n .BannerActionsContainer[data-primary-action='leading'] {\n display: flex;\n}\n\n/* Layout ------------------------------------------------------------------- */\n\n@container banner (max-width: 500px) {\n .BannerContainer {\n display: grid;\n }\n\n .BannerContainer:has(.BannerActionsContainer) {\n grid-template-rows: auto auto;\n }\n\n .BannerActions {\n margin-block-end: var(--base-size-6);\n }\n\n .BannerActions [data-primary-action='trailing'] {\n display: none;\n }\n\n .BannerActions [data-primary-action='leading'] {\n display: flex;\n }\n}\n\n@container banner (min-width: 500px) {\n .BannerContainer {\n display: grid;\n grid-template-columns: auto auto;\n }\n\n :where(.Banner):not([data-dismissible])\n :where(.BannerActionsContainer[data-primary-action='trailing'])\n :where([data-variant='link']:only-child) {\n padding-inline: 0 var(--base-size-12);\n }\n\n .BannerActions [data-primary-action='trailing'] {\n display: flex;\n min-height: var(--base-size-32, 2rem);\n }\n\n .BannerActions [data-primary-action='leading'] {\n display: none;\n }\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './Banner-
|
|
1
|
+
import './Banner-b3871000.css';
|
|
2
2
|
|
|
3
3
|
var classes = {"Banner":"prc-Banner-Banner-IPLJ2","BannerContainer":"prc-Banner-BannerContainer-T-Siu","BannerActions":"prc-Banner-BannerActions-gvCLf","BannerContent":"prc-Banner-BannerContent-LraS2","BannerTitle":"prc-Banner-BannerTitle-T4z0L","BannerIcon":"prc-Banner-BannerIcon-o4ayx","BannerDismiss":"prc-Banner-BannerDismiss-b12FL","BannerActionsContainer":"prc-Banner-BannerActionsContainer-PdBu1"};
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../src/Dialog/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsE,MAAM,OAAO,CAAA;AAC1F,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,WAAW,CAAA;AAW1C,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,6BAA6B,CAAA;AAChE,OAAO,KAAK,EAAC,mBAAmB,IAAI,8BAA8B,EAAC,MAAM,sBAAsB,CAAA;AAQ/F;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,GAAG;IAC7D;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAA;IAExD;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,SAAS,CAAA;IAExB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB;;;OAGG;IACH,GAAG,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAA;CAChD,CAAA;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAEvB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAE1B;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC,CAAA;IAElF;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC,CAAA;IAE1E;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC,CAAA;IAE5E;;OAEG;IACH,aAAa,CAAC,EAAE,iBAAiB,EAAE,CAAA;IAEnC;;;;;OAKG;IACH,OAAO,EAAE,CAAC,OAAO,EAAE,cAAc,GAAG,QAAQ,KAAK,IAAI,CAAA;IAErD;;;;OAIG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,aAAa,CAAA;IAE/B;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,WAAW,CAAA;IAEnB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,YAAY,CAAA;IAErB;;OAEG;IACH,QAAQ,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,eAAe,CAAC,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,YAAY,GAAG,QAAQ,CAAC,CAAA;IAE/G;;;;;OAKG;IACH,KAAK,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAA;IAEnC;;;OAGG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;IAEpD;;OAEG;IACH,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;IAErD;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,WAAW;IACpD;;;OAGG;IACH,aAAa,EAAE,MAAM,CAAA;IAErB;;;OAGG;IACH,mBAAmB,EAAE,MAAM,CAAA;CAC5B;AAGD,QAAA,MAAM,SAAS;;;;CAIL,CAAA;AAGV,QAAA,MAAM,QAAQ;;;;;CAKJ,CAAA;AAEV,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,QAAQ,CAAA;AAC/C,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,SAAS,CAAA;AA+CjD,eAAO,MAAM,aAAa,mCAAqD,CAAA;
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../src/Dialog/Dialog.tsx"],"names":[],"mappings":"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"}
|
package/dist/Dialog/Dialog.js
CHANGED
|
@@ -77,7 +77,6 @@ const defaultFooterButtons = [];
|
|
|
77
77
|
|
|
78
78
|
// useful to determine whether we're inside a Dialog from a nested component
|
|
79
79
|
const DialogContext = /*#__PURE__*/React.createContext(undefined);
|
|
80
|
-
const DIALOG_CONTEXT_VALUE = Object.freeze({});
|
|
81
80
|
const _Dialog = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {
|
|
82
81
|
var _slots$header, _slots$body, _slots$footer;
|
|
83
82
|
const {
|
|
@@ -176,7 +175,7 @@ const _Dialog = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {
|
|
|
176
175
|
return [`data-position-${key}`, value];
|
|
177
176
|
}));
|
|
178
177
|
return /*#__PURE__*/jsx(DialogContext.Provider, {
|
|
179
|
-
value:
|
|
178
|
+
value: {},
|
|
180
179
|
children: /*#__PURE__*/jsx(Portal, {
|
|
181
180
|
children: /*#__PURE__*/jsx("div", {
|
|
182
181
|
ref: backdropRef,
|
|
@@ -1759,7 +1759,7 @@
|
|
|
1759
1759
|
},
|
|
1760
1760
|
{
|
|
1761
1761
|
"id": "components-button-features--inactive",
|
|
1762
|
-
"code": "() => (\n <div\n style={{\n display: 'flex',\n flexDirection: 'row',\n gap: '1rem',\n }}\n >\n <VisuallyHidden id=\"inactive-state\">Inactive</VisuallyHidden>\n <Button inactive aria-describedby=\"inactive-state\">\n Default\n </Button>\n <Button variant=\"primary\" inactive aria-describedby=\"inactive-state\">\n Primary\n </Button>\n <Button variant=\"danger\" inactive aria-describedby=\"inactive-state\">\n Danger\n </Button>\n <Button variant=\"invisible\" inactive aria-describedby=\"inactive-state\">\n Invisible\n </Button>\n </div>\n)"
|
|
1762
|
+
"code": "() => (\n <div\n style={{\n display: 'flex',\n flexWrap: 'wrap',\n flexDirection: 'row',\n gap: '1rem',\n }}\n >\n <VisuallyHidden id=\"inactive-state\">Inactive</VisuallyHidden>\n <Button inactive aria-describedby=\"inactive-state\">\n Default\n </Button>\n <Button variant=\"primary\" inactive aria-describedby=\"inactive-state\">\n Primary\n </Button>\n <Button variant=\"danger\" inactive aria-describedby=\"inactive-state\">\n Danger\n </Button>\n <Button variant=\"invisible\" inactive aria-describedby=\"inactive-state\">\n Invisible\n </Button>\n </div>\n)"
|
|
1763
1763
|
},
|
|
1764
1764
|
{
|
|
1765
1765
|
"id": "components-button-features--small",
|
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-Banner-Banner-IPLJ2{align-items:start;background-color:var(--banner-bgColor);border:var(--borderWidth-thin,.0625rem) solid var(--banner-borderColor);border-radius:var(--borderRadius-medium,.375rem);display:grid;grid-template-columns:auto minmax(0,1fr) auto;padding:var(--base-size-8,.5rem)}@supports (container-type:inline-size){.prc-Banner-Banner-IPLJ2[data-actions-layout=default]{container:banner/inline-size}}.prc-Banner-Banner-IPLJ2[data-actions-layout=stacked] .prc-Banner-BannerContainer-T-Siu{flex-direction:column}.prc-Banner-Banner-IPLJ2[data-actions-layout=stacked] .prc-Banner-BannerActions-gvCLf :where([data-primary-action=trailing]){display:none}.prc-Banner-Banner-IPLJ2[data-actions-layout=stacked] .prc-Banner-BannerActions-gvCLf :where([data-primary-action=leading]){display:flex}.prc-Banner-Banner-IPLJ2[data-actions-layout=inline] .prc-Banner-BannerContainer-T-Siu{flex-wrap:nowrap}.prc-Banner-Banner-IPLJ2[data-actions-layout=inline] .prc-Banner-BannerActions-gvCLf{flex:0 0 auto}.prc-Banner-Banner-IPLJ2[data-actions-layout=inline] .prc-Banner-BannerActions-gvCLf :where([data-primary-action=trailing]){display:flex}.prc-Banner-Banner-IPLJ2[data-actions-layout=inline] .prc-Banner-BannerActions-gvCLf :where([data-primary-action=leading]){display:none}.prc-Banner-Banner-IPLJ2[data-layout=compact]{padding:var(--base-size-4,.25rem)}.prc-Banner-Banner-IPLJ2[data-flush]{border-left:none;border-radius:0;border-right:none}.prc-Banner-Banner-IPLJ2[data-variant=critical]{--banner-bgColor:var(--bgColor-danger-muted,var(--color-danger-subtle));--banner-borderColor:var(--borderColor-danger-muted,var(--color-danger-muted));--banner-icon-fgColor:var(--fgColor-danger,var(--color-danger-fg))}.prc-Banner-Banner-IPLJ2[data-variant=info]{--banner-bgColor:var(--bgColor-accent-muted,var(--color-accent-subtle));--banner-borderColor:var(--borderColor-accent-muted,var(--color-accent-muted));--banner-icon-fgColor:var(--fgColor-accent,var(--color-accent-fg))}.prc-Banner-Banner-IPLJ2[data-variant=success]{--banner-bgColor:var(--bgColor-success-muted,var(--color-success-subtle));--banner-borderColor:var(--borderColor-success-muted,var(--color-success-muted));--banner-icon-fgColor:var(--fgColor-success,var(--color-success-fg))}.prc-Banner-Banner-IPLJ2[data-variant=upsell]{--banner-bgColor:var(--bgColor-upsell-muted,#fbefff);--banner-borderColor:var(--borderColor-upsell-muted,#c297ff66);--banner-icon-fgColor:var(--fgColor-upsell,#8250df)}.prc-Banner-Banner-IPLJ2[data-variant=warning]{--banner-bgColor:var(--bgColor-attention-muted,var(--color-attention-subtle));--banner-borderColor:var(--borderColor-attention-muted,var(--color-attention-muted));--banner-icon-fgColor:var(--fgColor-attention,var(--color-attention-fg))}.prc-Banner-BannerContainer-T-Siu{align-items:start;column-gap:var(--base-size-4,.25rem);font-size:var(--text-body-size-medium,.875rem);line-height:var(--text-body-lineHeight-medium,1.5);row-gap:var(--base-size-4,.25rem)}.prc-Banner-Banner-IPLJ2 :where(.prc-Banner-BannerContainer-T-Siu){display:flex;flex-wrap:wrap;justify-content:space-between}.prc-Banner-Banner-IPLJ2[data-dismissible]:not([data-title-hidden],[data-actions-layout=inline]) .prc-Banner-BannerContainer-T-Siu{display:grid;grid-template-columns:auto;grid-template-rows:auto}.prc-Banner-BannerContent-LraS2{display:grid;grid-column-start:1;margin-block:var(--base-size-8,.5rem);row-gap:var(--base-size-4,.25rem)}.prc-Banner-Banner-IPLJ2[data-title-hidden]:not(:has(.prc-Banner-BannerActions-gvCLf)) .prc-Banner-BannerContent-LraS2{margin-block:var(--base-size-6,.375rem)}@media screen and (min-width:544px){.prc-Banner-BannerContent-LraS2{flex:1 1 0%}}.prc-Banner-BannerTitle-T4z0L{font-size:inherit;font-weight:var(--base-text-weight-semibold,600);margin:0}.prc-Banner-BannerIcon-o4ayx{display:grid;padding:var(--base-size-8,.5rem);place-items:center}.prc-Banner-BannerIcon-o4ayx svg{color:var(--banner-icon-fgColor);height:var(--base-size-20,1.25rem);fill:var(--banner-icon-fgColor)}.prc-Banner-Banner-IPLJ2[data-title-hidden]:not(:has(.prc-Banner-BannerActions-gvCLf)) .prc-Banner-BannerIcon-o4ayx svg{height:var(--base-size-16,1rem)}.prc-Banner-BannerDismiss-b12FL{display:grid;margin-inline-start:var(--base-size-4,.25rem);padding:var(--base-size-8,.5rem);place-items:center}:where(.prc-Banner-Banner-IPLJ2):has(.prc-Banner-BannerActions-gvCLf) .prc-Banner-BannerDismiss-b12FL{margin-block:var(--base-size-2,.125rem)}.prc-Banner-BannerDismiss-b12FL svg{color:var(--banner-icon-fgColor)}.prc-Banner-BannerActionsContainer-PdBu1{align-items:center;column-gap:var(--base-size-12,.75rem);display:flex;margin-block:var(--base-size-2,.125rem)}.prc-Banner-BannerActions-gvCLf :where([data-primary-action=trailing]){display:none}.prc-Banner-Banner-IPLJ2[data-dismissible]:not([data-title-hidden],[data-actions-layout=inline]) .prc-Banner-BannerActions-gvCLf{margin-block-end:var(--base-size-6,.375rem)}.prc-Banner-Banner-IPLJ2[data-dismissible]:not([data-title-hidden],[data-actions-layout=inline]) .prc-Banner-BannerActionsContainer-PdBu1[data-primary-action=trailing]{display:none}.prc-Banner-Banner-IPLJ2[data-dismissible]:not([data-title-hidden],[data-actions-layout=inline]) .prc-Banner-BannerActionsContainer-PdBu1[data-primary-action=leading]{display:flex}@container banner (max-width: 500px){.prc-Banner-BannerContainer-T-Siu{display:grid}.prc-Banner-BannerContainer-T-Siu:has(.prc-Banner-BannerActionsContainer-PdBu1){grid-template-rows:auto auto}.prc-Banner-BannerActions-gvCLf{margin-block-end:var(--base-size-6,.375rem)}.prc-Banner-BannerActions-gvCLf [data-primary-action=trailing]{display:none}.prc-Banner-BannerActions-gvCLf [data-primary-action=leading]{display:flex}}@container banner (min-width: 500px){.prc-Banner-BannerContainer-T-Siu{display:grid;grid-template-columns:auto auto}:where(.prc-Banner-Banner-IPLJ2):not([data-dismissible]) :where(.prc-Banner-BannerActionsContainer-PdBu1[data-primary-action=trailing]) :where([data-variant=link]:only-child){padding-inline:0 var(--base-size-12,.75rem)}.prc-Banner-BannerActions-gvCLf [data-primary-action=trailing]{display:flex;min-height:var(--base-size-32,2rem)}.prc-Banner-BannerActions-gvCLf [data-primary-action=leading]{display:none}}
|
|
2
|
-
/*# sourceMappingURL=Banner-f672cdf9.css.map */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Banner/Banner.module.css.js"],"names":[],"mappings":"AAAA,yBASE,iBAAkB,CALlB,sCAAuC,CAEvC,uEAA+D,CAC/D,gDAAyC,CANzC,YAAa,CAOb,6CAA+C,CAN/C,gCAsFF,CA5EI,uCADF,sDAEI,4BAEJ,CADE,CAIA,wFACE,qBACF,CAEA,6HACE,YACF,CAEA,4HACE,YACF,CAIA,uFACE,gBACF,CAEA,qFACE,aACF,CAEA,4HACE,YACF,CAEA,2HACE,YACF,CAGF,8CACE,iCACF,CAEA,qCACE,gBAAiB,CAEjB,eAAgB,CADhB,iBAEF,CAEA,gDACE,uEAA6C,CAC7C,8EAAqD,CACrD,kEACF,CAEA,4CACE,uEAA6C,CAC7C,8EAAqD,CACrD,kEACF,CAEA,+CACE,yEAA8C,CAC9C,gFAAsD,CACtD,oEACF,CAEA,8CACE,oDAA6C,CAC7C,8DAAqD,CACrD,mDACF,CAEA,+CACE,6EAAgD,CAChD,oFAAwD,CACxD,wEACF,CAKF,kCAEE,iBAAkB,CAGlB,oCAA8B,CAJ9B,8CAAuC,CAEvC,kDAA+C,CAC/C,iCAEF,CAEA,mEACE,YAAa,CACb,cAAe,CACf,6BACF,CAEA,mIACE,YAAa,CACb,0BAA2B,CAC3B,uBACF,CAIA,gCACE,YAAa,CAEb,mBAAoB,CACpB,qCAAgC,CAFhC,iCAGF,CAEA,uHACE,uCACF,CAEA,oCACE,gCACE,WACF,CACF,CAEA,8BAEE,iBAAkB,CAClB,gDAA6C,CAF7C,QAGF,CAIA,6BACE,YAAa,CAEb,gCAA2B,CAD3B,kBAEF,CAEA,iCAIE,gCAAiC,CAFjC,kCAA2B,CAI3B,+BACF,CAGA,wHACE,+BACF,CAIA,gCACE,YAAa,CAGb,6CAAuC,CADvC,gCAA2B,CAD3B,kBAGF,CAEA,sGACE,uCACF,CAEA,oCAEE,gCACF,CAIA,yCAGE,kBAAmB,CADnB,qCAA+B,CAD/B,YAAa,CAGb,uCACF,CAEA,uEACE,YACF,CAEA,iIACE,2CACF,CAGA,wKAEE,YACF,CAGA,uKAEE,YACF,CAIA,qCACE,kCACE,YACF,CAEA,gFACE,4BACF,CAEA,gCACE,2CACF,CAEA,+DACE,YACF,CAEA,8DACE,YACF,CACF,CAEA,qCACE,kCACE,YAAa,CACb,+BACF,CAEA,+KAGE,2CACF,CAEA,+DACE,YAAa,CACb,mCACF,CAEA,8DACE,YACF,CACF","file":"Banner-f672cdf9.css","sourcesContent":[".Banner {\n display: grid;\n padding: var(--base-size-8);\n /* stylelint-disable-next-line primer/colors */\n background-color: var(--banner-bgColor);\n /* stylelint-disable-next-line primer/colors */\n border: var(--borderWidth-thin) solid var(--banner-borderColor);\n border-radius: var(--borderRadius-medium);\n grid-template-columns: auto minmax(0, 1fr) auto;\n align-items: start;\n\n &[data-actions-layout='default'] {\n @supports (container-type: inline-size) {\n container: banner / inline-size;\n }\n }\n\n &[data-actions-layout='stacked'] {\n & .BannerContainer {\n flex-direction: column;\n }\n\n & .BannerActions :where([data-primary-action='trailing']) {\n display: none;\n }\n\n & .BannerActions :where([data-primary-action='leading']) {\n display: flex;\n }\n }\n\n &[data-actions-layout='inline'] {\n & .BannerContainer {\n flex-wrap: nowrap;\n }\n\n & .BannerActions {\n flex: 0 0 auto;\n }\n\n & .BannerActions :where([data-primary-action='trailing']) {\n display: flex;\n }\n\n & .BannerActions :where([data-primary-action='leading']) {\n display: none;\n }\n }\n\n &[data-layout='compact'] {\n padding: var(--base-size-4);\n }\n\n &[data-flush] {\n border-left: none;\n border-right: none;\n border-radius: 0;\n }\n\n &[data-variant='critical'] {\n --banner-bgColor: var(--bgColor-danger-muted);\n --banner-borderColor: var(--borderColor-danger-muted);\n --banner-icon-fgColor: var(--fgColor-danger);\n }\n\n &[data-variant='info'] {\n --banner-bgColor: var(--bgColor-accent-muted);\n --banner-borderColor: var(--borderColor-accent-muted);\n --banner-icon-fgColor: var(--fgColor-accent);\n }\n\n &[data-variant='success'] {\n --banner-bgColor: var(--bgColor-success-muted);\n --banner-borderColor: var(--borderColor-success-muted);\n --banner-icon-fgColor: var(--fgColor-success);\n }\n\n &[data-variant='upsell'] {\n --banner-bgColor: var(--bgColor-upsell-muted);\n --banner-borderColor: var(--borderColor-upsell-muted);\n --banner-icon-fgColor: var(--fgColor-upsell);\n }\n\n &[data-variant='warning'] {\n --banner-bgColor: var(--bgColor-attention-muted);\n --banner-borderColor: var(--borderColor-attention-muted);\n --banner-icon-fgColor: var(--fgColor-attention);\n }\n}\n\n/* BannerContainer -------------------------------------------------------- */\n\n.BannerContainer {\n font-size: var(--text-body-size-medium);\n align-items: start;\n line-height: var(--text-body-lineHeight-medium);\n row-gap: var(--base-size-4);\n column-gap: var(--base-size-4);\n}\n\n.Banner :where(.BannerContainer) {\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n}\n\n.Banner[data-dismissible]:not([data-title-hidden], [data-actions-layout='inline']) .BannerContainer {\n display: grid;\n grid-template-columns: auto;\n grid-template-rows: auto;\n}\n\n/* BannerContent ---------------------------------------------------------- */\n\n.BannerContent {\n display: grid;\n row-gap: var(--base-size-4);\n grid-column-start: 1;\n margin-block: var(--base-size-8);\n}\n\n.Banner[data-title-hidden]:not(:has(.BannerActions)) .BannerContent {\n margin-block: var(--base-size-6);\n}\n\n@media screen and (min-width: 544px) {\n .BannerContent {\n flex: 1 1 0%;\n }\n}\n\n.BannerTitle {\n margin: 0;\n font-size: inherit;\n font-weight: var(--base-text-weight-semibold);\n}\n\n/* BannerIcon ------------------------------------------------------------- */\n\n.BannerIcon {\n display: grid;\n place-items: center;\n padding: var(--base-size-8);\n}\n\n.BannerIcon svg {\n /* 20px is the line box height of the trailing action buttons */\n height: var(--base-size-20);\n /* stylelint-disable-next-line primer/colors */\n color: var(--banner-icon-fgColor);\n /* stylelint-disable-next-line primer/colors */\n fill: var(--banner-icon-fgColor);\n}\n\n/* stylelint-disable-next-line selector-max-specificity */\n.Banner[data-title-hidden]:not(:has(.BannerActions)) .BannerIcon svg {\n height: var(--base-size-16);\n}\n\n/* BannerDismiss ---------------------------------------------------------- */\n\n.BannerDismiss {\n display: grid;\n place-items: center;\n padding: var(--base-size-8);\n margin-inline-start: var(--base-size-4);\n}\n\n:where(.Banner):has(.BannerActions) .BannerDismiss {\n margin-block: var(--base-size-2);\n}\n\n.BannerDismiss svg {\n /* stylelint-disable-next-line primer/colors */\n color: var(--banner-icon-fgColor);\n}\n\n/* BannerActions ---------------------------------------------------------- */\n\n.BannerActionsContainer {\n display: flex;\n column-gap: var(--base-size-12);\n align-items: center;\n margin-block: var(--base-size-2);\n}\n\n.BannerActions :where([data-primary-action='trailing']) {\n display: none;\n}\n\n.Banner[data-dismissible]:not([data-title-hidden], [data-actions-layout='inline']) .BannerActions {\n margin-block-end: var(--base-size-6);\n}\n\n/* stylelint-disable-next-line selector-max-specificity */\n.Banner[data-dismissible]:not([data-title-hidden], [data-actions-layout='inline'])\n .BannerActionsContainer[data-primary-action='trailing'] {\n display: none;\n}\n\n/* stylelint-disable-next-line selector-max-specificity */\n.Banner[data-dismissible]:not([data-title-hidden], [data-actions-layout='inline'])\n .BannerActionsContainer[data-primary-action='leading'] {\n display: flex;\n}\n\n/* Layout ------------------------------------------------------------------- */\n\n@container banner (max-width: 500px) {\n .BannerContainer {\n display: grid;\n }\n\n .BannerContainer:has(.BannerActionsContainer) {\n grid-template-rows: auto auto;\n }\n\n .BannerActions {\n margin-block-end: var(--base-size-6);\n }\n\n .BannerActions [data-primary-action='trailing'] {\n display: none;\n }\n\n .BannerActions [data-primary-action='leading'] {\n display: flex;\n }\n}\n\n@container banner (min-width: 500px) {\n .BannerContainer {\n display: grid;\n grid-template-columns: auto auto;\n }\n\n :where(.Banner):not([data-dismissible])\n :where(.BannerActionsContainer[data-primary-action='trailing'])\n :where([data-variant='link']:only-child) {\n padding-inline: 0 var(--base-size-12);\n }\n\n .BannerActions [data-primary-action='trailing'] {\n display: flex;\n min-height: var(--base-size-32, 2rem);\n }\n\n .BannerActions [data-primary-action='leading'] {\n display: none;\n }\n}\n"]}
|