@contentful/f36-menu 4.12.0 → 4.15.0
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 +33 -0
- package/dist/main.js +181 -188
- package/dist/main.js.map +1 -1
- package/dist/module.js +181 -188
- package/dist/module.js.map +1 -1
- package/package.json +6 -6
package/dist/main.js
CHANGED
|
@@ -26,26 +26,24 @@ $parcel$export(module.exports, "SubmenuTrigger", () => $68e427819b978177$export$
|
|
|
26
26
|
|
|
27
27
|
const $9abfe5cafeb7e9d3$var$ARROW_KEY_TYPES = {
|
|
28
28
|
vertical: {
|
|
29
|
-
prev:
|
|
30
|
-
next:
|
|
29
|
+
prev: "ArrowUp",
|
|
30
|
+
next: "ArrowDown"
|
|
31
31
|
},
|
|
32
32
|
horizontal: {
|
|
33
|
-
prev:
|
|
34
|
-
next:
|
|
33
|
+
prev: "ArrowLeft",
|
|
34
|
+
next: "ArrowRight"
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
|
-
const $9abfe5cafeb7e9d3$export$e8d01079a7f85a7 = ({ itemsContainerRef: itemsContainerRef , itemsSelector: itemsSelector , keyType: keyType =
|
|
38
|
-
const [focusedIndex, setFocusedIndex] = $6ZrLO$react.useState(0);
|
|
39
|
-
const handleArrowsKeyDown = $6ZrLO$react.useCallback((event)=>{
|
|
37
|
+
const $9abfe5cafeb7e9d3$export$e8d01079a7f85a7 = ({ itemsContainerRef: itemsContainerRef , itemsSelector: itemsSelector , keyType: keyType = "vertical" })=>{
|
|
38
|
+
const [focusedIndex, setFocusedIndex] = (0, $6ZrLO$react.useState)(0);
|
|
39
|
+
const handleArrowsKeyDown = (0, $6ZrLO$react.useCallback)((event)=>{
|
|
40
40
|
const container = itemsContainerRef.current;
|
|
41
41
|
if (!container) return;
|
|
42
42
|
const items = container.querySelectorAll(itemsSelector);
|
|
43
43
|
if (items.length === 0) return;
|
|
44
44
|
const lastItemIndex = items.length - 1;
|
|
45
|
-
const focusFirstItem = ()=>setFocusedIndex(0)
|
|
46
|
-
;
|
|
47
|
-
const focusLastItem = ()=>setFocusedIndex(lastItemIndex)
|
|
48
|
-
;
|
|
45
|
+
const focusFirstItem = ()=>setFocusedIndex(0);
|
|
46
|
+
const focusLastItem = ()=>setFocusedIndex(lastItemIndex);
|
|
49
47
|
const focusNextItem = ()=>{
|
|
50
48
|
if (focusedIndex === lastItemIndex) focusFirstItem();
|
|
51
49
|
else setFocusedIndex(focusedIndex + 1);
|
|
@@ -79,10 +77,10 @@ const $9abfe5cafeb7e9d3$export$e8d01079a7f85a7 = ({ itemsContainerRef: itemsCont
|
|
|
79
77
|
|
|
80
78
|
|
|
81
79
|
|
|
82
|
-
const $31bc1b2a74a830dc$var$MenuContext = ($parcel$interopDefault($6ZrLO$react)).createContext(undefined);
|
|
80
|
+
const $31bc1b2a74a830dc$var$MenuContext = (0, ($parcel$interopDefault($6ZrLO$react))).createContext(undefined);
|
|
83
81
|
const $31bc1b2a74a830dc$export$21c7ab35b39f78ec = ()=>{
|
|
84
|
-
const context = ($parcel$interopDefault($6ZrLO$react)).useContext($31bc1b2a74a830dc$var$MenuContext);
|
|
85
|
-
if (context === undefined) throw new Error(
|
|
82
|
+
const context = (0, ($parcel$interopDefault($6ZrLO$react))).useContext($31bc1b2a74a830dc$var$MenuContext);
|
|
83
|
+
if (context === undefined) throw new Error("useMenuContext must be used within a MenuContextProvider");
|
|
86
84
|
return context;
|
|
87
85
|
};
|
|
88
86
|
const $31bc1b2a74a830dc$export$2cad3fd48ac06579 = $31bc1b2a74a830dc$var$MenuContext.Provider;
|
|
@@ -91,20 +89,20 @@ const $31bc1b2a74a830dc$export$2cad3fd48ac06579 = $31bc1b2a74a830dc$var$MenuCont
|
|
|
91
89
|
const $453ff7c40e833219$var$MENU_ITEMS_SELECTOR = '[role="menuitem"]:not(:disabled)';
|
|
92
90
|
function $453ff7c40e833219$export$d9b273488cd8ce6f(props) {
|
|
93
91
|
const { closeOnSelect: closeOnSelect = true , closeOnBlur: closeOnBlur = true , closeOnEsc: closeOnEsc = true , children: children , onOpen: onOpen , ...otherProps } = props;
|
|
94
|
-
const { isOpen: isOpen , handleOpen: handleOpen , handleClose: handleClose , isControlled: isControlled } = $6ZrLO$contentfulf36core.useControllableState({
|
|
92
|
+
const { isOpen: isOpen , handleOpen: handleOpen , handleClose: handleClose , isControlled: isControlled } = (0, $6ZrLO$contentfulf36core.useControllableState)({
|
|
95
93
|
isOpen: props.isOpen,
|
|
96
94
|
defaultIsOpen: props.defaultIsOpen,
|
|
97
95
|
onOpen: onOpen,
|
|
98
96
|
onClose: props.onClose
|
|
99
97
|
});
|
|
100
|
-
const triggerRef = $6ZrLO$react.useRef(null);
|
|
101
|
-
const menuListRef = $6ZrLO$react.useRef(null);
|
|
102
|
-
const menuId = $6ZrLO$contentfulf36core.useId(null,
|
|
103
|
-
const { focusedIndex: focusedIndex , handleArrowsKeyDown: handleArrowsKeyDown , setFocusedIndex: setFocusedIndex } = $9abfe5cafeb7e9d3$export$e8d01079a7f85a7({
|
|
98
|
+
const triggerRef = (0, $6ZrLO$react.useRef)(null);
|
|
99
|
+
const menuListRef = (0, $6ZrLO$react.useRef)(null);
|
|
100
|
+
const menuId = (0, $6ZrLO$contentfulf36core.useId)(null, "menu");
|
|
101
|
+
const { focusedIndex: focusedIndex , handleArrowsKeyDown: handleArrowsKeyDown , setFocusedIndex: setFocusedIndex } = (0, $9abfe5cafeb7e9d3$export$e8d01079a7f85a7)({
|
|
104
102
|
itemsContainerRef: menuListRef,
|
|
105
103
|
itemsSelector: $453ff7c40e833219$var$MENU_ITEMS_SELECTOR
|
|
106
104
|
});
|
|
107
|
-
$6ZrLO$react.useEffect(()=>{
|
|
105
|
+
(0, $6ZrLO$react.useEffect)(()=>{
|
|
108
106
|
if (isOpen && menuListRef.current) {
|
|
109
107
|
const menuItems = menuListRef.current.querySelectorAll($453ff7c40e833219$var$MENU_ITEMS_SELECTOR);
|
|
110
108
|
if (menuItems.length > 0 && focusedIndex < menuItems.length) // timeout trick to prevent scroll from jumping
|
|
@@ -119,17 +117,16 @@ function $453ff7c40e833219$export$d9b273488cd8ce6f(props) {
|
|
|
119
117
|
isOpen,
|
|
120
118
|
focusedIndex
|
|
121
119
|
]);
|
|
122
|
-
const focusMenuItem = $6ZrLO$react.useCallback((item)=>{
|
|
120
|
+
const focusMenuItem = (0, $6ZrLO$react.useCallback)((item)=>{
|
|
123
121
|
const menuItems = menuListRef.current.querySelectorAll($453ff7c40e833219$var$MENU_ITEMS_SELECTOR);
|
|
124
122
|
const itemIndex = [
|
|
125
123
|
...menuItems
|
|
126
|
-
].findIndex((menuItem)=>item === menuItem
|
|
127
|
-
);
|
|
124
|
+
].findIndex((menuItem)=>item === menuItem);
|
|
128
125
|
if (itemIndex !== -1) setFocusedIndex(itemIndex);
|
|
129
126
|
}, [
|
|
130
127
|
setFocusedIndex
|
|
131
128
|
]);
|
|
132
|
-
const closeAndFocusTrigger = $6ZrLO$react.useCallback(()=>{
|
|
129
|
+
const closeAndFocusTrigger = (0, $6ZrLO$react.useCallback)(()=>{
|
|
133
130
|
var ref;
|
|
134
131
|
handleClose();
|
|
135
132
|
(ref = triggerRef.current) === null || ref === void 0 ? void 0 : ref.focus({
|
|
@@ -138,14 +135,14 @@ function $453ff7c40e833219$export$d9b273488cd8ce6f(props) {
|
|
|
138
135
|
}, [
|
|
139
136
|
handleClose
|
|
140
137
|
]);
|
|
141
|
-
const handleMenuListKeyDown = $6ZrLO$react.useCallback((event)=>{
|
|
142
|
-
if (event.key ===
|
|
138
|
+
const handleMenuListKeyDown = (0, $6ZrLO$react.useCallback)((event)=>{
|
|
139
|
+
if (event.key === "Tab") {
|
|
143
140
|
event.preventDefault();
|
|
144
141
|
closeAndFocusTrigger();
|
|
145
142
|
return;
|
|
146
143
|
} // we don't want to propagate other keydown events except `Tab`
|
|
147
144
|
event.stopPropagation();
|
|
148
|
-
if (event.key ===
|
|
145
|
+
if (event.key === "ArrowLeft") {
|
|
149
146
|
event.preventDefault();
|
|
150
147
|
closeAndFocusTrigger();
|
|
151
148
|
return;
|
|
@@ -155,7 +152,7 @@ function $453ff7c40e833219$export$d9b273488cd8ce6f(props) {
|
|
|
155
152
|
closeAndFocusTrigger,
|
|
156
153
|
handleArrowsKeyDown
|
|
157
154
|
]);
|
|
158
|
-
const contextValue = $6ZrLO$react.useMemo(()=>{
|
|
155
|
+
const contextValue = (0, $6ZrLO$react.useMemo)(()=>{
|
|
159
156
|
return {
|
|
160
157
|
isOpen: isOpen,
|
|
161
158
|
menuId: menuId,
|
|
@@ -174,12 +171,12 @@ function $453ff7c40e833219$export$d9b273488cd8ce6f(props) {
|
|
|
174
171
|
}
|
|
175
172
|
(ref = _props.onClick) === null || ref === void 0 ? void 0 : ref.call(_props, event);
|
|
176
173
|
},
|
|
177
|
-
ref: $6ZrLO$contentfulf36core.mergeRefs(triggerRef, _ref)
|
|
174
|
+
ref: (0, $6ZrLO$contentfulf36core.mergeRefs)(triggerRef, _ref)
|
|
178
175
|
};
|
|
179
176
|
},
|
|
180
177
|
getMenuListProps: (_props = {}, _ref = null)=>{
|
|
181
178
|
return {
|
|
182
|
-
ref: $6ZrLO$contentfulf36core.mergeRefs(menuListRef, _ref),
|
|
179
|
+
ref: (0, $6ZrLO$contentfulf36core.mergeRefs)(menuListRef, _ref),
|
|
183
180
|
onKeyDown: (event)=>{
|
|
184
181
|
var ref;
|
|
185
182
|
handleMenuListKeyDown(event);
|
|
@@ -206,7 +203,7 @@ function $453ff7c40e833219$export$d9b273488cd8ce6f(props) {
|
|
|
206
203
|
onClick: (event)=>{
|
|
207
204
|
var ref;
|
|
208
205
|
(ref = _props.onClick) === null || ref === void 0 ? void 0 : ref.call(_props, event);
|
|
209
|
-
const isSubmenuTrigger = Boolean(event.target.getAttribute(
|
|
206
|
+
const isSubmenuTrigger = Boolean(event.target.getAttribute("aria-haspopup"));
|
|
210
207
|
if (closeOnSelect && !isSubmenuTrigger) closeAndFocusTrigger();
|
|
211
208
|
}
|
|
212
209
|
};
|
|
@@ -231,9 +228,9 @@ function $453ff7c40e833219$export$d9b273488cd8ce6f(props) {
|
|
|
231
228
|
isControlled,
|
|
232
229
|
onOpen
|
|
233
230
|
]);
|
|
234
|
-
return /*#__PURE__*/ ($parcel$interopDefault($6ZrLO$react)).createElement($31bc1b2a74a830dc$export$2cad3fd48ac06579, {
|
|
231
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($6ZrLO$react))).createElement((0, $31bc1b2a74a830dc$export$2cad3fd48ac06579), {
|
|
235
232
|
value: contextValue
|
|
236
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($6ZrLO$react)).createElement($6ZrLO$contentfulf36popover.Popover, {
|
|
233
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($6ZrLO$react))).createElement((0, $6ZrLO$contentfulf36popover.Popover), {
|
|
237
234
|
...otherProps,
|
|
238
235
|
isOpen: isOpen,
|
|
239
236
|
onClose: handleClose,
|
|
@@ -249,9 +246,9 @@ function $453ff7c40e833219$export$d9b273488cd8ce6f(props) {
|
|
|
249
246
|
|
|
250
247
|
|
|
251
248
|
|
|
252
|
-
const $62b35dc82bb7def8$var$SubmenuContext = ($parcel$interopDefault($6ZrLO$react)).createContext(undefined);
|
|
249
|
+
const $62b35dc82bb7def8$var$SubmenuContext = (0, ($parcel$interopDefault($6ZrLO$react))).createContext(undefined);
|
|
253
250
|
const $62b35dc82bb7def8$export$958673a266cbe049 = ()=>{
|
|
254
|
-
const context = ($parcel$interopDefault($6ZrLO$react)).useContext($62b35dc82bb7def8$var$SubmenuContext);
|
|
251
|
+
const context = (0, ($parcel$interopDefault($6ZrLO$react))).useContext($62b35dc82bb7def8$var$SubmenuContext);
|
|
255
252
|
return context;
|
|
256
253
|
};
|
|
257
254
|
const $62b35dc82bb7def8$export$81b3dbd1f003f0c7 = $62b35dc82bb7def8$var$SubmenuContext.Provider;
|
|
@@ -261,67 +258,66 @@ const $62b35dc82bb7def8$export$81b3dbd1f003f0c7 = $62b35dc82bb7def8$var$SubmenuC
|
|
|
261
258
|
|
|
262
259
|
|
|
263
260
|
const $ce9788dc1cd48a1b$export$396ce14bde1b7929 = ()=>{
|
|
264
|
-
return /*#__PURE__*/ $6ZrLO$emotion.css({
|
|
265
|
-
position:
|
|
261
|
+
return /*#__PURE__*/ (0, $6ZrLO$emotion.css)({
|
|
262
|
+
position: "sticky",
|
|
266
263
|
top: 0,
|
|
267
264
|
left: 0,
|
|
268
|
-
backgroundColor: ($parcel$interopDefault($6ZrLO$contentfulf36tokens)).colorWhite,
|
|
269
|
-
borderBottom: `1px solid ${($parcel$interopDefault($6ZrLO$contentfulf36tokens)).gray300}`,
|
|
270
|
-
padding: `${($parcel$interopDefault($6ZrLO$contentfulf36tokens)).spacingXs} 0`,
|
|
265
|
+
backgroundColor: (0, ($parcel$interopDefault($6ZrLO$contentfulf36tokens))).colorWhite,
|
|
266
|
+
borderBottom: `1px solid ${(0, ($parcel$interopDefault($6ZrLO$contentfulf36tokens))).gray300}`,
|
|
267
|
+
padding: `${(0, ($parcel$interopDefault($6ZrLO$contentfulf36tokens))).spacingXs} 0`,
|
|
271
268
|
zIndex: 1001
|
|
272
269
|
});
|
|
273
270
|
};
|
|
274
271
|
const $ce9788dc1cd48a1b$export$fd3dbc8a890448f = ()=>{
|
|
275
|
-
return /*#__PURE__*/ $6ZrLO$emotion.css({
|
|
276
|
-
position:
|
|
272
|
+
return /*#__PURE__*/ (0, $6ZrLO$emotion.css)({
|
|
273
|
+
position: "sticky",
|
|
277
274
|
bottom: 0,
|
|
278
275
|
left: 0,
|
|
279
|
-
backgroundColor: ($parcel$interopDefault($6ZrLO$contentfulf36tokens)).colorWhite,
|
|
280
|
-
borderTop: `1px solid ${($parcel$interopDefault($6ZrLO$contentfulf36tokens)).gray300}`,
|
|
281
|
-
padding: `${($parcel$interopDefault($6ZrLO$contentfulf36tokens)).spacingXs} 0`,
|
|
276
|
+
backgroundColor: (0, ($parcel$interopDefault($6ZrLO$contentfulf36tokens))).colorWhite,
|
|
277
|
+
borderTop: `1px solid ${(0, ($parcel$interopDefault($6ZrLO$contentfulf36tokens))).gray300}`,
|
|
278
|
+
padding: `${(0, ($parcel$interopDefault($6ZrLO$contentfulf36tokens))).spacingXs} 0`,
|
|
282
279
|
zIndex: 1001
|
|
283
280
|
});
|
|
284
281
|
};
|
|
285
282
|
const $ce9788dc1cd48a1b$export$10ce7613b0465b57 = (props)=>({
|
|
286
|
-
container: /*#__PURE__*/ $6ZrLO$emotion.css({
|
|
287
|
-
overflowY:
|
|
288
|
-
position:
|
|
283
|
+
container: /*#__PURE__*/ (0, $6ZrLO$emotion.css)({
|
|
284
|
+
overflowY: "auto",
|
|
285
|
+
position: "relative",
|
|
289
286
|
padding: 0,
|
|
290
|
-
paddingTop: props.hasStickyHeader ? 0 : ($parcel$interopDefault($6ZrLO$contentfulf36tokens)).spacingXs,
|
|
291
|
-
paddingBottom: props.hasStickyFooter ? 0 : ($parcel$interopDefault($6ZrLO$contentfulf36tokens)).spacingXs
|
|
287
|
+
paddingTop: props.hasStickyHeader ? 0 : (0, ($parcel$interopDefault($6ZrLO$contentfulf36tokens))).spacingXs,
|
|
288
|
+
paddingBottom: props.hasStickyFooter ? 0 : (0, ($parcel$interopDefault($6ZrLO$contentfulf36tokens))).spacingXs
|
|
292
289
|
})
|
|
293
|
-
})
|
|
294
|
-
;
|
|
290
|
+
});
|
|
295
291
|
|
|
296
292
|
|
|
297
293
|
|
|
298
294
|
|
|
299
295
|
|
|
300
296
|
const $77fa76994469c42b$export$77451990ddb9d17c = (props)=>{
|
|
301
|
-
const { children: children , testId: testId =
|
|
302
|
-
const styles = $ce9788dc1cd48a1b$export$396ce14bde1b7929();
|
|
303
|
-
return /*#__PURE__*/ ($parcel$interopDefault($6ZrLO$react)).createElement("div", {
|
|
297
|
+
const { children: children , testId: testId = "cf-ui-menu-list-header" , className: className , ...otherProps } = props;
|
|
298
|
+
const styles = (0, $ce9788dc1cd48a1b$export$396ce14bde1b7929)();
|
|
299
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($6ZrLO$react))).createElement("div", {
|
|
304
300
|
"data-test-id": testId,
|
|
305
|
-
className: $6ZrLO$emotion.cx(styles, className),
|
|
301
|
+
className: (0, $6ZrLO$emotion.cx)(styles, className),
|
|
306
302
|
...otherProps
|
|
307
303
|
}, children);
|
|
308
304
|
};
|
|
309
|
-
$77fa76994469c42b$export$77451990ddb9d17c.displayName =
|
|
305
|
+
$77fa76994469c42b$export$77451990ddb9d17c.displayName = "MenuListHeader";
|
|
310
306
|
|
|
311
307
|
|
|
312
308
|
|
|
313
309
|
|
|
314
310
|
|
|
315
311
|
const $56409107038e75ac$export$3e8a81e7ad0650f4 = (props)=>{
|
|
316
|
-
const { children: children , testId: testId =
|
|
317
|
-
const styles = $ce9788dc1cd48a1b$export$fd3dbc8a890448f();
|
|
318
|
-
return /*#__PURE__*/ ($parcel$interopDefault($6ZrLO$react)).createElement("div", {
|
|
312
|
+
const { children: children , testId: testId = "cf-ui-menu-list-footer" , className: className , ...otherProps } = props;
|
|
313
|
+
const styles = (0, $ce9788dc1cd48a1b$export$fd3dbc8a890448f)();
|
|
314
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($6ZrLO$react))).createElement("div", {
|
|
319
315
|
"data-test-id": testId,
|
|
320
|
-
className: $6ZrLO$emotion.cx(styles, className),
|
|
316
|
+
className: (0, $6ZrLO$emotion.cx)(styles, className),
|
|
321
317
|
...otherProps
|
|
322
318
|
}, children);
|
|
323
319
|
};
|
|
324
|
-
$56409107038e75ac$export$3e8a81e7ad0650f4.displayName =
|
|
320
|
+
$56409107038e75ac$export$3e8a81e7ad0650f4.displayName = "MenuListFooter";
|
|
325
321
|
|
|
326
322
|
|
|
327
323
|
function $c5bfee6901fd5b47$var$assertChild(child) {
|
|
@@ -329,39 +325,39 @@ function $c5bfee6901fd5b47$var$assertChild(child) {
|
|
|
329
325
|
return Boolean(child === null || child === void 0 ? void 0 : (ref = child.type) === null || ref === void 0 ? void 0 : ref.displayName);
|
|
330
326
|
}
|
|
331
327
|
const $c5bfee6901fd5b47$var$_MenuList = (props, ref)=>{
|
|
332
|
-
const { children: children , testId: testId =
|
|
333
|
-
const { getMenuListProps: getMenuListProps } = $31bc1b2a74a830dc$export$21c7ab35b39f78ec();
|
|
334
|
-
const submenuContext = $62b35dc82bb7def8$export$958673a266cbe049();
|
|
328
|
+
const { children: children , testId: testId = "cf-ui-menu-list" , className: className , ...otherProps } = props;
|
|
329
|
+
const { getMenuListProps: getMenuListProps } = (0, $31bc1b2a74a830dc$export$21c7ab35b39f78ec)();
|
|
330
|
+
const submenuContext = (0, $62b35dc82bb7def8$export$958673a266cbe049)();
|
|
335
331
|
let header = null;
|
|
336
332
|
let footer = null;
|
|
337
333
|
const items = [];
|
|
338
|
-
($parcel$interopDefault($6ZrLO$react)).Children.forEach(children, (child)=>{
|
|
334
|
+
(0, ($parcel$interopDefault($6ZrLO$react))).Children.forEach(children, (child)=>{
|
|
339
335
|
let appendChild = true;
|
|
340
336
|
if ($c5bfee6901fd5b47$var$assertChild(child)) {
|
|
341
|
-
if (child.type.displayName === $77fa76994469c42b$export$77451990ddb9d17c.displayName) {
|
|
337
|
+
if (child.type.displayName === (0, $77fa76994469c42b$export$77451990ddb9d17c).displayName) {
|
|
342
338
|
header = child;
|
|
343
339
|
appendChild = false;
|
|
344
|
-
} else if (child.type.displayName === $56409107038e75ac$export$3e8a81e7ad0650f4.displayName) {
|
|
340
|
+
} else if (child.type.displayName === (0, $56409107038e75ac$export$3e8a81e7ad0650f4).displayName) {
|
|
345
341
|
footer = child;
|
|
346
342
|
appendChild = false;
|
|
347
343
|
}
|
|
348
344
|
}
|
|
349
345
|
if (appendChild) items.push(child);
|
|
350
346
|
});
|
|
351
|
-
const styles = $ce9788dc1cd48a1b$export$10ce7613b0465b57({
|
|
347
|
+
const styles = (0, $ce9788dc1cd48a1b$export$10ce7613b0465b57)({
|
|
352
348
|
hasStickyHeader: Boolean(header),
|
|
353
349
|
hasStickyFooter: Boolean(footer)
|
|
354
350
|
});
|
|
355
351
|
const extendedOtherProps = submenuContext ? submenuContext.getSubmenuListProps(otherProps) : otherProps;
|
|
356
|
-
return /*#__PURE__*/ ($parcel$interopDefault($6ZrLO$react)).createElement($6ZrLO$contentfulf36popover.Popover.Content, {
|
|
352
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($6ZrLO$react))).createElement((0, $6ZrLO$contentfulf36popover.Popover).Content, {
|
|
357
353
|
role: "menu",
|
|
358
354
|
...extendedOtherProps,
|
|
359
355
|
...getMenuListProps(extendedOtherProps, ref),
|
|
360
|
-
className: $6ZrLO$emotion.cx(styles.container, className),
|
|
356
|
+
className: (0, $6ZrLO$emotion.cx)(styles.container, className),
|
|
361
357
|
testId: testId
|
|
362
358
|
}, header, items, footer);
|
|
363
359
|
};
|
|
364
|
-
const $c5bfee6901fd5b47$export$d4c4e98c5044dc8 = /*#__PURE__*/ ($parcel$interopDefault($6ZrLO$react)).forwardRef($c5bfee6901fd5b47$var$_MenuList);
|
|
360
|
+
const $c5bfee6901fd5b47$export$d4c4e98c5044dc8 = /*#__PURE__*/ (0, ($parcel$interopDefault($6ZrLO$react))).forwardRef($c5bfee6901fd5b47$var$_MenuList);
|
|
365
361
|
|
|
366
362
|
|
|
367
363
|
|
|
@@ -375,92 +371,92 @@ const $c5bfee6901fd5b47$export$d4c4e98c5044dc8 = /*#__PURE__*/ ($parcel$interopD
|
|
|
375
371
|
|
|
376
372
|
const $f099c69f76c1082f$export$adaad53e003c74d0 = ()=>{
|
|
377
373
|
return {
|
|
378
|
-
root: /*#__PURE__*/ $6ZrLO$emotion.css({
|
|
379
|
-
display:
|
|
380
|
-
width:
|
|
381
|
-
background:
|
|
374
|
+
root: /*#__PURE__*/ (0, $6ZrLO$emotion.css)({
|
|
375
|
+
display: "block",
|
|
376
|
+
width: "100%",
|
|
377
|
+
background: "none",
|
|
382
378
|
border: 0,
|
|
383
379
|
margin: 0,
|
|
384
|
-
outline:
|
|
385
|
-
fontSize: ($parcel$interopDefault($6ZrLO$contentfulf36tokens)).fontSizeM,
|
|
386
|
-
lineHeight: ($parcel$interopDefault($6ZrLO$contentfulf36tokens)).lineHeightM,
|
|
387
|
-
fontWeight: ($parcel$interopDefault($6ZrLO$contentfulf36tokens)).fontWeightNormal,
|
|
388
|
-
position:
|
|
389
|
-
textAlign:
|
|
390
|
-
padding: `${($parcel$interopDefault($6ZrLO$contentfulf36tokens)).spacingXs} ${($parcel$interopDefault($6ZrLO$contentfulf36tokens)).spacingM}`,
|
|
391
|
-
wordBreak:
|
|
392
|
-
whiteSpace:
|
|
393
|
-
cursor:
|
|
394
|
-
hyphens:
|
|
395
|
-
minWidth:
|
|
396
|
-
textDecoration:
|
|
397
|
-
color: ($parcel$interopDefault($6ZrLO$contentfulf36tokens)).gray800,
|
|
398
|
-
|
|
399
|
-
backgroundColor: ($parcel$interopDefault($6ZrLO$contentfulf36tokens)).gray100
|
|
380
|
+
outline: "none",
|
|
381
|
+
fontSize: (0, ($parcel$interopDefault($6ZrLO$contentfulf36tokens))).fontSizeM,
|
|
382
|
+
lineHeight: (0, ($parcel$interopDefault($6ZrLO$contentfulf36tokens))).lineHeightM,
|
|
383
|
+
fontWeight: (0, ($parcel$interopDefault($6ZrLO$contentfulf36tokens))).fontWeightNormal,
|
|
384
|
+
position: "relative",
|
|
385
|
+
textAlign: "left",
|
|
386
|
+
padding: `${(0, ($parcel$interopDefault($6ZrLO$contentfulf36tokens))).spacingXs} ${(0, ($parcel$interopDefault($6ZrLO$contentfulf36tokens))).spacingM}`,
|
|
387
|
+
wordBreak: "break-word",
|
|
388
|
+
whiteSpace: "break-spaces",
|
|
389
|
+
cursor: "pointer",
|
|
390
|
+
hyphens: "auto",
|
|
391
|
+
minWidth: "150px",
|
|
392
|
+
textDecoration: "none",
|
|
393
|
+
color: (0, ($parcel$interopDefault($6ZrLO$contentfulf36tokens))).gray800,
|
|
394
|
+
"&:hover": {
|
|
395
|
+
backgroundColor: (0, ($parcel$interopDefault($6ZrLO$contentfulf36tokens))).gray100
|
|
400
396
|
},
|
|
401
|
-
|
|
402
|
-
boxShadow: `inset ${($parcel$interopDefault($6ZrLO$contentfulf36tokens)).glowPrimary}`,
|
|
397
|
+
"&:focus": {
|
|
398
|
+
boxShadow: `inset ${(0, ($parcel$interopDefault($6ZrLO$contentfulf36tokens))).glowPrimary}`,
|
|
403
399
|
// just to make boxShadow with rounded corners
|
|
404
|
-
borderRadius: ($parcel$interopDefault($6ZrLO$contentfulf36tokens)).borderRadiusMedium
|
|
400
|
+
borderRadius: (0, ($parcel$interopDefault($6ZrLO$contentfulf36tokens))).borderRadiusMedium
|
|
405
401
|
},
|
|
406
|
-
|
|
407
|
-
boxShadow:
|
|
408
|
-
borderRadius:
|
|
402
|
+
"&:focus:not(:focus-visible)": {
|
|
403
|
+
boxShadow: "unset",
|
|
404
|
+
borderRadius: "unset"
|
|
409
405
|
},
|
|
410
|
-
|
|
411
|
-
boxShadow: `inset ${($parcel$interopDefault($6ZrLO$contentfulf36tokens)).glowPrimary}`,
|
|
412
|
-
borderRadius: ($parcel$interopDefault($6ZrLO$contentfulf36tokens)).borderRadiusMedium
|
|
406
|
+
"&:focus-visible": {
|
|
407
|
+
boxShadow: `inset ${(0, ($parcel$interopDefault($6ZrLO$contentfulf36tokens))).glowPrimary}`,
|
|
408
|
+
borderRadius: (0, ($parcel$interopDefault($6ZrLO$contentfulf36tokens))).borderRadiusMedium
|
|
413
409
|
},
|
|
414
|
-
|
|
415
|
-
backgroundColor: ($parcel$interopDefault($6ZrLO$contentfulf36tokens)).gray200
|
|
410
|
+
"&:active": {
|
|
411
|
+
backgroundColor: (0, ($parcel$interopDefault($6ZrLO$contentfulf36tokens))).gray200
|
|
416
412
|
},
|
|
417
|
-
|
|
413
|
+
"&:disabled": {
|
|
418
414
|
opacity: 0.5,
|
|
419
|
-
cursor:
|
|
415
|
+
cursor: "auto"
|
|
420
416
|
}
|
|
421
417
|
})
|
|
422
418
|
};
|
|
423
419
|
};
|
|
424
420
|
|
|
425
421
|
|
|
426
|
-
const $01d29448a29c05b3$var$MENU_ITEM_DEFAULT_TAG =
|
|
422
|
+
const $01d29448a29c05b3$var$MENU_ITEM_DEFAULT_TAG = "button";
|
|
427
423
|
function $01d29448a29c05b3$var$_MenuItem(props, ref) {
|
|
428
424
|
const { testId: testId , className: className , as: as , isInitiallyFocused: isInitiallyFocused , ...otherProps } = props;
|
|
429
|
-
const id = $6ZrLO$contentfulf36core.useId(undefined,
|
|
425
|
+
const id = (0, $6ZrLO$contentfulf36core.useId)(undefined, "menu-item");
|
|
430
426
|
const itemTestId = testId || `cf-ui-${id}`;
|
|
431
|
-
const styles = $f099c69f76c1082f$export$adaad53e003c74d0();
|
|
432
|
-
const { getMenuItemProps: getMenuItemProps , focusMenuItem: focusMenuItem } = $31bc1b2a74a830dc$export$21c7ab35b39f78ec();
|
|
433
|
-
const itemRef = $6ZrLO$react.useRef(null);
|
|
434
|
-
$6ZrLO$react.useEffect(()=>{
|
|
427
|
+
const styles = (0, $f099c69f76c1082f$export$adaad53e003c74d0)();
|
|
428
|
+
const { getMenuItemProps: getMenuItemProps , focusMenuItem: focusMenuItem } = (0, $31bc1b2a74a830dc$export$21c7ab35b39f78ec)();
|
|
429
|
+
const itemRef = (0, $6ZrLO$react.useRef)(null);
|
|
430
|
+
(0, $6ZrLO$react.useEffect)(()=>{
|
|
435
431
|
if (isInitiallyFocused && itemRef.current) focusMenuItem(itemRef.current);
|
|
436
432
|
}, [
|
|
437
433
|
isInitiallyFocused,
|
|
438
434
|
focusMenuItem
|
|
439
435
|
]);
|
|
440
436
|
const Element = as !== null && as !== void 0 ? as : $01d29448a29c05b3$var$MENU_ITEM_DEFAULT_TAG;
|
|
441
|
-
return /*#__PURE__*/ ($parcel$interopDefault($6ZrLO$react)).createElement(Element, {
|
|
437
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($6ZrLO$react))).createElement(Element, {
|
|
442
438
|
role: "menuitem",
|
|
443
439
|
...otherProps,
|
|
444
440
|
...getMenuItemProps(otherProps),
|
|
445
|
-
className: $6ZrLO$emotion.cx(styles.root, className),
|
|
441
|
+
className: (0, $6ZrLO$emotion.cx)(styles.root, className),
|
|
446
442
|
"data-test-id": itemTestId,
|
|
447
|
-
ref: $6ZrLO$contentfulf36core.mergeRefs(itemRef, ref),
|
|
443
|
+
ref: (0, $6ZrLO$contentfulf36core.mergeRefs)(itemRef, ref),
|
|
448
444
|
tabIndex: -1
|
|
449
445
|
}, props.children);
|
|
450
446
|
}
|
|
451
|
-
$01d29448a29c05b3$var$_MenuItem.displayName =
|
|
452
|
-
const $01d29448a29c05b3$export$2ce376c2cc3355c8 = /*#__PURE__*/ ($parcel$interopDefault($6ZrLO$react)).forwardRef($01d29448a29c05b3$var$_MenuItem);
|
|
447
|
+
$01d29448a29c05b3$var$_MenuItem.displayName = "MenuItem";
|
|
448
|
+
const $01d29448a29c05b3$export$2ce376c2cc3355c8 = /*#__PURE__*/ (0, ($parcel$interopDefault($6ZrLO$react))).forwardRef($01d29448a29c05b3$var$_MenuItem);
|
|
453
449
|
|
|
454
450
|
|
|
455
451
|
|
|
456
452
|
|
|
457
453
|
|
|
458
454
|
const $57a0b88402c05a1e$export$27d2ad3c5815583e = (props)=>{
|
|
459
|
-
const child = ($parcel$interopDefault($6ZrLO$react)).Children.only(props.children);
|
|
460
|
-
const { getTriggerProps: getTriggerProps } = $31bc1b2a74a830dc$export$21c7ab35b39f78ec();
|
|
461
|
-
return /*#__PURE__*/ ($parcel$interopDefault($6ZrLO$react)).createElement($6ZrLO$contentfulf36popover.Popover.Trigger, null, /*#__PURE__*/ ($parcel$interopDefault($6ZrLO$react)).cloneElement(child, {
|
|
455
|
+
const child = (0, ($parcel$interopDefault($6ZrLO$react))).Children.only(props.children);
|
|
456
|
+
const { getTriggerProps: getTriggerProps } = (0, $31bc1b2a74a830dc$export$21c7ab35b39f78ec)();
|
|
457
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($6ZrLO$react))).createElement((0, $6ZrLO$contentfulf36popover.Popover).Trigger, null, /*#__PURE__*/ (0, ($parcel$interopDefault($6ZrLO$react))).cloneElement(child, {
|
|
462
458
|
...getTriggerProps(child.props, child.ref),
|
|
463
|
-
[
|
|
459
|
+
["aria-haspopup"]: "menu"
|
|
464
460
|
}));
|
|
465
461
|
};
|
|
466
462
|
|
|
@@ -469,23 +465,22 @@ const $57a0b88402c05a1e$export$27d2ad3c5815583e = (props)=>{
|
|
|
469
465
|
|
|
470
466
|
|
|
471
467
|
|
|
472
|
-
const $f85a558bae23a8bd$export$4605da6f9a8ef405 = ()=>/*#__PURE__*/ $6ZrLO$emotion.css({
|
|
473
|
-
border:
|
|
474
|
-
width:
|
|
475
|
-
height:
|
|
476
|
-
background: ($parcel$interopDefault($6ZrLO$contentfulf36tokens)).gray300,
|
|
477
|
-
margin: `${($parcel$interopDefault($6ZrLO$contentfulf36tokens)).spacingXs} 0`
|
|
478
|
-
})
|
|
479
|
-
;
|
|
468
|
+
const $f85a558bae23a8bd$export$4605da6f9a8ef405 = ()=>/*#__PURE__*/ (0, $6ZrLO$emotion.css)({
|
|
469
|
+
border: "none",
|
|
470
|
+
width: "100%",
|
|
471
|
+
height: "1px",
|
|
472
|
+
background: (0, ($parcel$interopDefault($6ZrLO$contentfulf36tokens))).gray300,
|
|
473
|
+
margin: `${(0, ($parcel$interopDefault($6ZrLO$contentfulf36tokens))).spacingXs} 0`
|
|
474
|
+
});
|
|
480
475
|
|
|
481
476
|
|
|
482
477
|
const $a8d7f8a94ad9b120$export$acb07b4664ac227c = (props)=>{
|
|
483
|
-
const { children: children , testId: testId =
|
|
484
|
-
const styles = $f85a558bae23a8bd$export$4605da6f9a8ef405();
|
|
485
|
-
return /*#__PURE__*/ ($parcel$interopDefault($6ZrLO$react)).createElement("hr", {
|
|
478
|
+
const { children: children , testId: testId = "cf-ui-menu-divider" , className: className , ...otherProps } = props;
|
|
479
|
+
const styles = (0, $f85a558bae23a8bd$export$4605da6f9a8ef405)();
|
|
480
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($6ZrLO$react))).createElement("hr", {
|
|
486
481
|
"aria-orientation": "horizontal",
|
|
487
482
|
"data-test-id": testId,
|
|
488
|
-
className: $6ZrLO$emotion.cx(styles, className),
|
|
483
|
+
className: (0, $6ZrLO$emotion.cx)(styles, className),
|
|
489
484
|
...otherProps
|
|
490
485
|
});
|
|
491
486
|
};
|
|
@@ -495,28 +490,27 @@ const $a8d7f8a94ad9b120$export$acb07b4664ac227c = (props)=>{
|
|
|
495
490
|
|
|
496
491
|
|
|
497
492
|
|
|
498
|
-
const $80d81cb0da14b65a$export$2698fa8b3a0a79e6 = ()=>/*#__PURE__*/ $6ZrLO$emotion.css({
|
|
499
|
-
textAlign:
|
|
500
|
-
padding: `${($parcel$interopDefault($6ZrLO$contentfulf36tokens)).spacingXs} ${($parcel$interopDefault($6ZrLO$contentfulf36tokens)).spacingM}`,
|
|
501
|
-
lineHeight: ($parcel$interopDefault($6ZrLO$contentfulf36tokens)).lineHeightM,
|
|
502
|
-
|
|
503
|
-
marginTop:
|
|
493
|
+
const $80d81cb0da14b65a$export$2698fa8b3a0a79e6 = ()=>/*#__PURE__*/ (0, $6ZrLO$emotion.css)({
|
|
494
|
+
textAlign: "left",
|
|
495
|
+
padding: `${(0, ($parcel$interopDefault($6ZrLO$contentfulf36tokens))).spacingXs} ${(0, ($parcel$interopDefault($6ZrLO$contentfulf36tokens))).spacingM}`,
|
|
496
|
+
lineHeight: (0, ($parcel$interopDefault($6ZrLO$contentfulf36tokens))).lineHeightM,
|
|
497
|
+
"hr + &": {
|
|
498
|
+
marginTop: "-8px"
|
|
504
499
|
}
|
|
505
|
-
})
|
|
506
|
-
;
|
|
500
|
+
});
|
|
507
501
|
|
|
508
502
|
|
|
509
503
|
|
|
510
504
|
const $a9e47e1a6fcc6dbc$export$5d1e6c648985631e = (props)=>{
|
|
511
|
-
const { children: children , testId: testId =
|
|
512
|
-
const styles = $80d81cb0da14b65a$export$2698fa8b3a0a79e6();
|
|
513
|
-
return /*#__PURE__*/ ($parcel$interopDefault($6ZrLO$react)).createElement($6ZrLO$contentfulf36typography.SectionHeading // Techincally, menus cannot contain headings according to ARIA.
|
|
514
|
-
, {
|
|
505
|
+
const { children: children , testId: testId = "cf-ui-menu-section-title" , className: className , ...otherProps } = props;
|
|
506
|
+
const styles = (0, $80d81cb0da14b65a$export$2698fa8b3a0a79e6)();
|
|
507
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($6ZrLO$react))).createElement((0, $6ZrLO$contentfulf36typography.SectionHeading // Techincally, menus cannot contain headings according to ARIA.
|
|
508
|
+
), {
|
|
515
509
|
// We hide the heading from assistive technology, and only use it
|
|
516
510
|
// as a label
|
|
517
511
|
"aria-hidden": "true",
|
|
518
512
|
testId: testId,
|
|
519
|
-
className: $6ZrLO$emotion.cx(styles, className),
|
|
513
|
+
className: (0, $6ZrLO$emotion.cx)(styles, className),
|
|
520
514
|
marginBottom: "none",
|
|
521
515
|
...otherProps
|
|
522
516
|
}, children);
|
|
@@ -534,25 +528,25 @@ const $d1c454a08dd2b04a$var$SUBMENU_OFFSET = [
|
|
|
534
528
|
];
|
|
535
529
|
const $d1c454a08dd2b04a$export$49229ebf838c159b = (props)=>{
|
|
536
530
|
const { onClose: onClose , onOpen: onOpen , ...otherProps } = props;
|
|
537
|
-
const { isOpen: isParentMenuOpen , menuId: menuId , propsToPropagateToSubmenus: propsToPropagateToSubmenus } = $31bc1b2a74a830dc$export$21c7ab35b39f78ec();
|
|
538
|
-
const triggerRef = $6ZrLO$react.useRef(null);
|
|
539
|
-
const mouseLeaveTimerRef = $6ZrLO$react.useRef(null);
|
|
540
|
-
const [isOpen, setIsOpen] = $6ZrLO$react.useState(false);
|
|
541
|
-
const handleOpen = $6ZrLO$react.useCallback(()=>{
|
|
531
|
+
const { isOpen: isParentMenuOpen , menuId: menuId , propsToPropagateToSubmenus: propsToPropagateToSubmenus } = (0, $31bc1b2a74a830dc$export$21c7ab35b39f78ec)();
|
|
532
|
+
const triggerRef = (0, $6ZrLO$react.useRef)(null);
|
|
533
|
+
const mouseLeaveTimerRef = (0, $6ZrLO$react.useRef)(null);
|
|
534
|
+
const [isOpen, setIsOpen] = (0, $6ZrLO$react.useState)(false);
|
|
535
|
+
const handleOpen = (0, $6ZrLO$react.useCallback)(()=>{
|
|
542
536
|
setIsOpen(true);
|
|
543
537
|
window.clearTimeout(mouseLeaveTimerRef.current);
|
|
544
538
|
onOpen === null || onOpen === void 0 ? void 0 : onOpen();
|
|
545
539
|
}, [
|
|
546
540
|
onOpen
|
|
547
541
|
]);
|
|
548
|
-
const handleClose = $6ZrLO$react.useCallback(()=>{
|
|
542
|
+
const handleClose = (0, $6ZrLO$react.useCallback)(()=>{
|
|
549
543
|
setIsOpen(false);
|
|
550
544
|
window.clearTimeout(mouseLeaveTimerRef.current);
|
|
551
545
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
552
546
|
}, [
|
|
553
547
|
onClose
|
|
554
548
|
]);
|
|
555
|
-
const closeAndFocusTrigger = $6ZrLO$react.useCallback(()=>{
|
|
549
|
+
const closeAndFocusTrigger = (0, $6ZrLO$react.useCallback)(()=>{
|
|
556
550
|
var ref;
|
|
557
551
|
handleClose();
|
|
558
552
|
(ref = triggerRef.current) === null || ref === void 0 ? void 0 : ref.focus({
|
|
@@ -561,18 +555,18 @@ const $d1c454a08dd2b04a$export$49229ebf838c159b = (props)=>{
|
|
|
561
555
|
}, [
|
|
562
556
|
handleClose
|
|
563
557
|
]);
|
|
564
|
-
$6ZrLO$react.useEffect(()=>{
|
|
558
|
+
(0, $6ZrLO$react.useEffect)(()=>{
|
|
565
559
|
// close when parent menu closed
|
|
566
560
|
if (isParentMenuOpen === false) setIsOpen(false);
|
|
567
561
|
}, [
|
|
568
562
|
isParentMenuOpen
|
|
569
563
|
]);
|
|
570
|
-
const contextValue = $6ZrLO$react.useMemo(()=>{
|
|
564
|
+
const contextValue = (0, $6ZrLO$react.useMemo)(()=>{
|
|
571
565
|
return {
|
|
572
566
|
isOpen: isOpen,
|
|
573
567
|
getSubmenuListProps: (_props)=>{
|
|
574
568
|
return {
|
|
575
|
-
|
|
569
|
+
"data-parent-menu": menuId,
|
|
576
570
|
onMouseOver: (event)=>{
|
|
577
571
|
var ref;
|
|
578
572
|
handleOpen();
|
|
@@ -587,10 +581,10 @@ const $d1c454a08dd2b04a$export$49229ebf838c159b = (props)=>{
|
|
|
587
581
|
},
|
|
588
582
|
getSubmenuTriggerProps: (_props, _ref)=>{
|
|
589
583
|
return {
|
|
590
|
-
ref: $6ZrLO$contentfulf36core.mergeRefs(triggerRef, _ref),
|
|
584
|
+
ref: (0, $6ZrLO$contentfulf36core.mergeRefs)(triggerRef, _ref),
|
|
591
585
|
onKeyDown: (event)=>{
|
|
592
586
|
var ref;
|
|
593
|
-
if (event.key ===
|
|
587
|
+
if (event.key === "ArrowRight") {
|
|
594
588
|
event.preventDefault();
|
|
595
589
|
handleOpen();
|
|
596
590
|
}
|
|
@@ -615,9 +609,9 @@ const $d1c454a08dd2b04a$export$49229ebf838c159b = (props)=>{
|
|
|
615
609
|
handleOpen,
|
|
616
610
|
closeAndFocusTrigger
|
|
617
611
|
]);
|
|
618
|
-
return /*#__PURE__*/ ($parcel$interopDefault($6ZrLO$react)).createElement($62b35dc82bb7def8$export$81b3dbd1f003f0c7, {
|
|
612
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($6ZrLO$react))).createElement((0, $62b35dc82bb7def8$export$81b3dbd1f003f0c7), {
|
|
619
613
|
value: contextValue
|
|
620
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($6ZrLO$react)).createElement($453ff7c40e833219$export$d9b273488cd8ce6f, {
|
|
614
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($6ZrLO$react))).createElement((0, $453ff7c40e833219$export$d9b273488cd8ce6f), {
|
|
621
615
|
...propsToPropagateToSubmenus,
|
|
622
616
|
...otherProps,
|
|
623
617
|
isOpen: isOpen,
|
|
@@ -640,19 +634,18 @@ const $d1c454a08dd2b04a$export$49229ebf838c159b = (props)=>{
|
|
|
640
634
|
|
|
641
635
|
const $440a5860c5fbe4e7$export$ce276565acbba1c9 = ()=>{
|
|
642
636
|
return {
|
|
643
|
-
root: ({ isActive: isActive })=>/*#__PURE__*/ $6ZrLO$emotion.css({
|
|
644
|
-
display:
|
|
645
|
-
alignItems:
|
|
646
|
-
paddingRight: ($parcel$interopDefault($6ZrLO$contentfulf36tokens)).spacingXs,
|
|
637
|
+
root: ({ isActive: isActive })=>/*#__PURE__*/ (0, $6ZrLO$emotion.css)({
|
|
638
|
+
display: "flex",
|
|
639
|
+
alignItems: "center",
|
|
640
|
+
paddingRight: (0, ($parcel$interopDefault($6ZrLO$contentfulf36tokens))).spacingXs,
|
|
647
641
|
...isActive ? {
|
|
648
|
-
backgroundColor: ($parcel$interopDefault($6ZrLO$contentfulf36tokens)).gray100
|
|
642
|
+
backgroundColor: (0, ($parcel$interopDefault($6ZrLO$contentfulf36tokens))).gray100
|
|
649
643
|
} : {}
|
|
650
|
-
})
|
|
651
|
-
,
|
|
652
|
-
|
|
653
|
-
marginRight: ($parcel$interopDefault($6ZrLO$contentfulf36tokens)).spacingM
|
|
644
|
+
}),
|
|
645
|
+
content: /*#__PURE__*/ (0, $6ZrLO$emotion.css)({
|
|
646
|
+
marginRight: (0, ($parcel$interopDefault($6ZrLO$contentfulf36tokens))).spacingM
|
|
654
647
|
}),
|
|
655
|
-
icon: /*#__PURE__*/ $6ZrLO$emotion.css({
|
|
648
|
+
icon: /*#__PURE__*/ (0, $6ZrLO$emotion.css)({
|
|
656
649
|
name: "1hapt0s",
|
|
657
650
|
styles: "margin-left:auto;fill:currentColor;"
|
|
658
651
|
})
|
|
@@ -662,33 +655,33 @@ const $440a5860c5fbe4e7$export$ce276565acbba1c9 = ()=>{
|
|
|
662
655
|
|
|
663
656
|
const $68e427819b978177$var$_SubmenuTrigger = (props, ref)=>{
|
|
664
657
|
const { className: className , children: children } = props;
|
|
665
|
-
const { getSubmenuTriggerProps: getSubmenuTriggerProps , isOpen: isOpen } = $62b35dc82bb7def8$export$958673a266cbe049();
|
|
666
|
-
const styles = $440a5860c5fbe4e7$export$ce276565acbba1c9();
|
|
667
|
-
return /*#__PURE__*/ ($parcel$interopDefault($6ZrLO$react)).createElement($57a0b88402c05a1e$export$27d2ad3c5815583e, null, /*#__PURE__*/ ($parcel$interopDefault($6ZrLO$react)).createElement($01d29448a29c05b3$export$2ce376c2cc3355c8, {
|
|
658
|
+
const { getSubmenuTriggerProps: getSubmenuTriggerProps , isOpen: isOpen } = (0, $62b35dc82bb7def8$export$958673a266cbe049)();
|
|
659
|
+
const styles = (0, $440a5860c5fbe4e7$export$ce276565acbba1c9)();
|
|
660
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($6ZrLO$react))).createElement((0, $57a0b88402c05a1e$export$27d2ad3c5815583e), null, /*#__PURE__*/ (0, ($parcel$interopDefault($6ZrLO$react))).createElement((0, $01d29448a29c05b3$export$2ce376c2cc3355c8), {
|
|
668
661
|
...props,
|
|
669
662
|
...getSubmenuTriggerProps(props, ref),
|
|
670
|
-
className: $6ZrLO$emotion.cx(styles.root({
|
|
663
|
+
className: (0, $6ZrLO$emotion.cx)(styles.root({
|
|
671
664
|
isActive: isOpen
|
|
672
665
|
}), className)
|
|
673
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($6ZrLO$react)).createElement("span", {
|
|
666
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($6ZrLO$react))).createElement("span", {
|
|
674
667
|
className: styles.content
|
|
675
|
-
}, children), /*#__PURE__*/ ($parcel$interopDefault($6ZrLO$react)).createElement($6ZrLO$contentfulf36icons.ChevronRightIcon, {
|
|
668
|
+
}, children), /*#__PURE__*/ (0, ($parcel$interopDefault($6ZrLO$react))).createElement((0, $6ZrLO$contentfulf36icons.ChevronRightIcon), {
|
|
676
669
|
className: styles.icon
|
|
677
670
|
})));
|
|
678
671
|
};
|
|
679
|
-
const $68e427819b978177$export$ecabc99eeffab7ca = /*#__PURE__*/ ($parcel$interopDefault($6ZrLO$react)).forwardRef($68e427819b978177$var$_SubmenuTrigger);
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
const $c2cdaffe72abf66f$export$d9b273488cd8ce6f = $453ff7c40e833219$export$d9b273488cd8ce6f;
|
|
683
|
-
$c2cdaffe72abf66f$export$d9b273488cd8ce6f.List = $c5bfee6901fd5b47$export$d4c4e98c5044dc8;
|
|
684
|
-
$c2cdaffe72abf66f$export$d9b273488cd8ce6f.ListHeader = $77fa76994469c42b$export$77451990ddb9d17c;
|
|
685
|
-
$c2cdaffe72abf66f$export$d9b273488cd8ce6f.ListFooter = $56409107038e75ac$export$3e8a81e7ad0650f4;
|
|
686
|
-
$c2cdaffe72abf66f$export$d9b273488cd8ce6f.Item = $01d29448a29c05b3$export$2ce376c2cc3355c8;
|
|
687
|
-
$c2cdaffe72abf66f$export$d9b273488cd8ce6f.Trigger = $57a0b88402c05a1e$export$27d2ad3c5815583e;
|
|
688
|
-
$c2cdaffe72abf66f$export$d9b273488cd8ce6f.Divider = $a8d7f8a94ad9b120$export$acb07b4664ac227c;
|
|
689
|
-
$c2cdaffe72abf66f$export$d9b273488cd8ce6f.SectionTitle = $a9e47e1a6fcc6dbc$export$5d1e6c648985631e;
|
|
690
|
-
$c2cdaffe72abf66f$export$d9b273488cd8ce6f.Submenu = $d1c454a08dd2b04a$export$49229ebf838c159b;
|
|
691
|
-
$c2cdaffe72abf66f$export$d9b273488cd8ce6f.SubmenuTrigger = $68e427819b978177$export$ecabc99eeffab7ca;
|
|
672
|
+
const $68e427819b978177$export$ecabc99eeffab7ca = /*#__PURE__*/ (0, ($parcel$interopDefault($6ZrLO$react))).forwardRef($68e427819b978177$var$_SubmenuTrigger);
|
|
673
|
+
|
|
674
|
+
|
|
675
|
+
const $c2cdaffe72abf66f$export$d9b273488cd8ce6f = (0, $453ff7c40e833219$export$d9b273488cd8ce6f);
|
|
676
|
+
$c2cdaffe72abf66f$export$d9b273488cd8ce6f.List = (0, $c5bfee6901fd5b47$export$d4c4e98c5044dc8);
|
|
677
|
+
$c2cdaffe72abf66f$export$d9b273488cd8ce6f.ListHeader = (0, $77fa76994469c42b$export$77451990ddb9d17c);
|
|
678
|
+
$c2cdaffe72abf66f$export$d9b273488cd8ce6f.ListFooter = (0, $56409107038e75ac$export$3e8a81e7ad0650f4);
|
|
679
|
+
$c2cdaffe72abf66f$export$d9b273488cd8ce6f.Item = (0, $01d29448a29c05b3$export$2ce376c2cc3355c8);
|
|
680
|
+
$c2cdaffe72abf66f$export$d9b273488cd8ce6f.Trigger = (0, $57a0b88402c05a1e$export$27d2ad3c5815583e);
|
|
681
|
+
$c2cdaffe72abf66f$export$d9b273488cd8ce6f.Divider = (0, $a8d7f8a94ad9b120$export$acb07b4664ac227c);
|
|
682
|
+
$c2cdaffe72abf66f$export$d9b273488cd8ce6f.SectionTitle = (0, $a9e47e1a6fcc6dbc$export$5d1e6c648985631e);
|
|
683
|
+
$c2cdaffe72abf66f$export$d9b273488cd8ce6f.Submenu = (0, $d1c454a08dd2b04a$export$49229ebf838c159b);
|
|
684
|
+
$c2cdaffe72abf66f$export$d9b273488cd8ce6f.SubmenuTrigger = (0, $68e427819b978177$export$ecabc99eeffab7ca);
|
|
692
685
|
|
|
693
686
|
|
|
694
687
|
|