@activecollab/components 2.0.581 → 2.0.582

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.
Files changed (32) hide show
  1. package/dist/cjs/components/MainMenu/MainMenu.js +3 -1
  2. package/dist/cjs/components/MainMenu/MainMenu.js.map +1 -1
  3. package/dist/cjs/components/MainMenu/Styles.js +1 -1
  4. package/dist/cjs/components/MainMenu/Styles.js.map +1 -1
  5. package/dist/cjs/components/MainMenu/hooks.js +3 -1
  6. package/dist/cjs/components/MainMenu/hooks.js.map +1 -1
  7. package/dist/cjs/components/Menu/Menu.js +68 -43
  8. package/dist/cjs/components/Menu/Menu.js.map +1 -1
  9. package/dist/cjs/components/Popper/Popper.js +2 -3
  10. package/dist/cjs/components/Popper/Popper.js.map +1 -1
  11. package/dist/esm/components/MainMenu/MainMenu.d.ts.map +1 -1
  12. package/dist/esm/components/MainMenu/MainMenu.js +3 -1
  13. package/dist/esm/components/MainMenu/MainMenu.js.map +1 -1
  14. package/dist/esm/components/MainMenu/Styles.d.ts.map +1 -1
  15. package/dist/esm/components/MainMenu/Styles.js +1 -1
  16. package/dist/esm/components/MainMenu/Styles.js.map +1 -1
  17. package/dist/esm/components/MainMenu/hooks.d.ts.map +1 -1
  18. package/dist/esm/components/MainMenu/hooks.js +3 -1
  19. package/dist/esm/components/MainMenu/hooks.js.map +1 -1
  20. package/dist/esm/components/Menu/Menu.d.ts +6 -0
  21. package/dist/esm/components/Menu/Menu.d.ts.map +1 -1
  22. package/dist/esm/components/Menu/Menu.js +62 -43
  23. package/dist/esm/components/Menu/Menu.js.map +1 -1
  24. package/dist/esm/components/Popper/Popper.d.ts +3 -3
  25. package/dist/esm/components/Popper/Popper.d.ts.map +1 -1
  26. package/dist/esm/components/Popper/Popper.js +2 -3
  27. package/dist/esm/components/Popper/Popper.js.map +1 -1
  28. package/dist/index.js +77 -49
  29. package/dist/index.js.map +1 -1
  30. package/dist/index.min.js +1 -1
  31. package/dist/index.min.js.map +1 -1
  32. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -17360,8 +17360,7 @@
17360
17360
  enabled: true,
17361
17361
  phase: "main",
17362
17362
  fn: function fn() {
17363
- var referenceElement = anchorEl;
17364
- var currentElement = referenceElement;
17363
+ var currentElement = anchorEl instanceof Element ? anchorEl : null;
17365
17364
  var isHidden = false;
17366
17365
  while (currentElement) {
17367
17366
  var computedStyle = getComputedStyle(currentElement);
@@ -17423,7 +17422,7 @@
17423
17422
  }
17424
17423
  }, [open, transition]);
17425
17424
  React.useEffect(function () {
17426
- if (!followAnchor || !open || !anchorEl || typeof ResizeObserver === "undefined") {
17425
+ if (!followAnchor || !open || !(anchorEl instanceof Element) || typeof ResizeObserver === "undefined") {
17427
17426
  return undefined;
17428
17427
  }
17429
17428
 
@@ -18138,6 +18137,27 @@
18138
18137
  }
18139
18138
  };
18140
18139
  };
18140
+ var pointAnchorAt = function pointAnchorAt(_ref2) {
18141
+ var x = _ref2.x,
18142
+ y = _ref2.y;
18143
+ return {
18144
+ getBoundingClientRect: function getBoundingClientRect() {
18145
+ return {
18146
+ x,
18147
+ y,
18148
+ left: x,
18149
+ right: x,
18150
+ top: y,
18151
+ bottom: y,
18152
+ width: 0,
18153
+ height: 0,
18154
+ toJSON: function toJSON() {
18155
+ return {};
18156
+ }
18157
+ };
18158
+ }
18159
+ };
18160
+ };
18141
18161
  var TABBABLE = 'a[href], button, input, select, textarea, iframe, [tabindex], [contenteditable="true"]';
18142
18162
 
18143
18163
  // A menu opened with the pointer hands the focus back without a focus ring, so its trigger does not stay lit.
@@ -18205,11 +18225,11 @@
18205
18225
  };
18206
18226
 
18207
18227
  // Its layout effect runs before the popper ref is set, so it finds the menu through its own node.
18208
- var FocusInside = function FocusInside(_ref2) {
18209
- var onFocused = _ref2.onFocused;
18228
+ var FocusInside = function FocusInside(_ref3) {
18229
+ var onFocused = _ref3.onFocused;
18210
18230
  var ref = React.useRef(null);
18211
18231
  React.useLayoutEffect(function () {
18212
- var _ref$current, _ref3;
18232
+ var _ref$current, _ref4;
18213
18233
  var menu = (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.parentElement;
18214
18234
  if (!menu) {
18215
18235
  return;
@@ -18221,7 +18241,7 @@
18221
18241
  var first = Array.from(menu.querySelectorAll(TABBABLE)).find(function (node) {
18222
18242
  return node.tabIndex >= 0 && !node.disabled;
18223
18243
  });
18224
- (_ref3 = first !== null && first !== void 0 ? first : menu.closest("[tabindex]")) === null || _ref3 === void 0 || _ref3.focus({
18244
+ (_ref4 = first !== null && first !== void 0 ? first : menu.closest("[tabindex]")) === null || _ref4 === void 0 || _ref4.focus({
18225
18245
  preventScroll: true
18226
18246
  });
18227
18247
  onFocused();
@@ -18231,39 +18251,40 @@
18231
18251
  hidden: true
18232
18252
  });
18233
18253
  };
18234
- var Menu = function Menu(_ref4) {
18235
- var children = _ref4.children,
18236
- _ref4$disableFocusLoc = _ref4.disableFocusLock,
18237
- disableFocusLock = _ref4$disableFocusLoc === void 0 ? false : _ref4$disableFocusLoc,
18238
- onMenuClick = _ref4.onMenuClick,
18239
- _ref4$handleScroll = _ref4.handleScroll,
18240
- handleScroll = _ref4$handleScroll === void 0 ? true : _ref4$handleScroll,
18241
- _ref4$mode = _ref4.mode,
18242
- mode = _ref4$mode === void 0 ? "normal" : _ref4$mode,
18243
- width = _ref4.width,
18244
- _ref4$open = _ref4.open,
18245
- defaultOpen = _ref4$open === void 0 ? false : _ref4$open,
18246
- onOpen = _ref4.onOpen,
18247
- onClose = _ref4.onClose,
18248
- onBeforeClose = _ref4.onBeforeClose,
18249
- _ref4$position = _ref4.position,
18250
- position = _ref4$position === void 0 ? "bottom-start" : _ref4$position,
18251
- target = _ref4.target,
18252
- className = _ref4.className,
18253
- menuClassName = _ref4.menuClassName,
18254
- popperClassName = _ref4.popperClassName,
18255
- backgroundElementClass = _ref4.backgroundElementClass,
18256
- _ref4$windowAbsolutel = _ref4.windowAbsolutelyPositioned,
18257
- windowAbsolutelyPositioned = _ref4$windowAbsolutel === void 0 ? false : _ref4$windowAbsolutel,
18258
- onPopperOpen = _ref4.onPopperOpen,
18259
- _ref4$followTarget = _ref4.followTarget,
18260
- followTarget = _ref4$followTarget === void 0 ? false : _ref4$followTarget,
18261
- _ref4$closeOnTab = _ref4.closeOnTab,
18262
- closeOnTab = _ref4$closeOnTab === void 0 ? false : _ref4$closeOnTab,
18263
- _ref4$prerender = _ref4.prerender,
18264
- prerender = _ref4$prerender === void 0 ? false : _ref4$prerender,
18265
- _ref4$scopedFocus = _ref4.scopedFocus,
18266
- scopedFocus = _ref4$scopedFocus === void 0 ? false : _ref4$scopedFocus;
18254
+ var Menu = function Menu(_ref5) {
18255
+ var children = _ref5.children,
18256
+ _ref5$disableFocusLoc = _ref5.disableFocusLock,
18257
+ disableFocusLock = _ref5$disableFocusLoc === void 0 ? false : _ref5$disableFocusLoc,
18258
+ onMenuClick = _ref5.onMenuClick,
18259
+ _ref5$handleScroll = _ref5.handleScroll,
18260
+ handleScroll = _ref5$handleScroll === void 0 ? true : _ref5$handleScroll,
18261
+ _ref5$mode = _ref5.mode,
18262
+ mode = _ref5$mode === void 0 ? "normal" : _ref5$mode,
18263
+ width = _ref5.width,
18264
+ _ref5$open = _ref5.open,
18265
+ defaultOpen = _ref5$open === void 0 ? false : _ref5$open,
18266
+ onOpen = _ref5.onOpen,
18267
+ onClose = _ref5.onClose,
18268
+ onBeforeClose = _ref5.onBeforeClose,
18269
+ _ref5$position = _ref5.position,
18270
+ position = _ref5$position === void 0 ? "bottom-start" : _ref5$position,
18271
+ target = _ref5.target,
18272
+ anchorPoint = _ref5.anchorPoint,
18273
+ className = _ref5.className,
18274
+ menuClassName = _ref5.menuClassName,
18275
+ popperClassName = _ref5.popperClassName,
18276
+ backgroundElementClass = _ref5.backgroundElementClass,
18277
+ _ref5$windowAbsolutel = _ref5.windowAbsolutelyPositioned,
18278
+ windowAbsolutelyPositioned = _ref5$windowAbsolutel === void 0 ? false : _ref5$windowAbsolutel,
18279
+ onPopperOpen = _ref5.onPopperOpen,
18280
+ _ref5$followTarget = _ref5.followTarget,
18281
+ followTarget = _ref5$followTarget === void 0 ? false : _ref5$followTarget,
18282
+ _ref5$closeOnTab = _ref5.closeOnTab,
18283
+ closeOnTab = _ref5$closeOnTab === void 0 ? false : _ref5$closeOnTab,
18284
+ _ref5$prerender = _ref5.prerender,
18285
+ prerender = _ref5$prerender === void 0 ? false : _ref5$prerender,
18286
+ _ref5$scopedFocus = _ref5.scopedFocus,
18287
+ scopedFocus = _ref5$scopedFocus === void 0 ? false : _ref5$scopedFocus;
18267
18288
  var _useState = React.useState(defaultOpen),
18268
18289
  _useState2 = _slicedToArray(_useState, 2),
18269
18290
  open = _useState2[0],
@@ -18350,6 +18371,9 @@
18350
18371
  var popperModifiers = React.useMemo(function () {
18351
18372
  return childNode instanceof HTMLElement ? [offsetToVisibleBox(childNode)] : undefined;
18352
18373
  }, [childNode]);
18374
+ var pointAnchor = React.useMemo(function () {
18375
+ return anchorPoint ? pointAnchorAt(anchorPoint) : null;
18376
+ }, [anchorPoint]);
18353
18377
  var handleOpen = React.useCallback(function (event) {
18354
18378
  var _target$props;
18355
18379
  event === null || event === void 0 || event.preventDefault();
@@ -18538,19 +18562,19 @@
18538
18562
  }
18539
18563
  }) : null, /*#__PURE__*/React__default["default"].createElement(Popper, {
18540
18564
  ref: popperRef,
18541
- anchorEl: childNode,
18542
- open: childNode ? open : false,
18565
+ anchorEl: pointAnchor !== null && pointAnchor !== void 0 ? pointAnchor : childNode,
18566
+ open: pointAnchor || childNode ? open : false,
18543
18567
  placement: position,
18544
18568
  className: popperClassName,
18545
18569
  tabIndex: -1,
18546
18570
  afterWrite: onPopperOpen,
18547
18571
  followAnchor: followTarget,
18548
- modifiers: popperModifiers,
18572
+ modifiers: pointAnchor ? undefined : popperModifiers,
18549
18573
  transition: true
18550
- }, function (_ref5) {
18574
+ }, function (_ref6) {
18551
18575
  var _elementRef$current2;
18552
- var placement = _ref5.placement,
18553
- transitionProps = _ref5.transitionProps;
18576
+ var placement = _ref6.placement,
18577
+ transitionProps = _ref6.transitionProps;
18554
18578
  return /*#__PURE__*/React__default["default"].createElement(Grow, {
18555
18579
  placement: placement,
18556
18580
  in: transitionProps === null || transitionProps === void 0 ? void 0 : transitionProps.in,
@@ -24111,8 +24135,10 @@
24111
24135
  setHasOpenPopup(false);
24112
24136
  return undefined;
24113
24137
  }
24138
+
24139
+ // Show more is a disclosure, not a popup, so an open one must not hold the peek.
24114
24140
  var update = function update() {
24115
- return setHasOpenPopup(Boolean(root.querySelector('[aria-expanded="true"]')));
24141
+ return setHasOpenPopup(Boolean(root.querySelector('[aria-haspopup][aria-expanded="true"]')));
24116
24142
  };
24117
24143
  var observer = new MutationObserver(update);
24118
24144
  update();
@@ -24319,7 +24345,7 @@
24319
24345
  var StyledMainMenu = styled__default["default"].div.withConfig({
24320
24346
  displayName: "Styles__StyledMainMenu",
24321
24347
  componentId: "sc-17ibzh0-0"
24322
- })(["", " &.c-main-menu--desktop{position:relative;left:10px;display:none;flex-direction:column;flex-shrink:0;height:100%;margin-right:4px;@media (min-width:", "){display:flex;}}&.c-main-menu--drawer{height:100%;}&.expanded{width:", "px;}&.collapsed{width:", "px;}&.expanded,&.collapsed{transition:width ", ";@media (max-width:", "){width:", "px;}}&.c-main-menu--drawer.c-main-menu--drawer{width:", "px;}&.main-menu-instant-width{transition:none;}.main-menu-panel{display:flex;flex:1;flex-direction:column;min-height:0;}&.main-menu-peek{width:", "px;}&.main-menu-peek .main-menu-panel{position:absolute;top:0;bottom:0;left:0;z-index:0;width:", "px;clip-path:inset( -100px ", "px -100px -100px );transition:clip-path 200ms cubic-bezier(0.25,0.46,0.45,0.94);&::before{content:\"\";position:absolute;inset:0 0 0 -10px;z-index:-1;background-color:var(--body-bg-main);box-shadow:var(--shadow-popover);}}&.main-menu-peek-open .main-menu-panel{clip-path:inset(-100px);}&.main-menu-peek::after{content:\"\";position:absolute;top:0;bottom:0;left:-10px;z-index:-1;width:", "px;}@media (prefers-reduced-motion:reduce){&.main-menu-peek .main-menu-panel{transition-duration:1ms;}}.main-menu-header{position:relative;display:flex;align-items:center;height:68px;overflow:hidden;}&.c-main-menu--desktop .main-menu-header{left:-10px;}.main-logo-url{position:absolute;left:30px;color:var(--color-secondary);path{fill:var(--color-secondary);transition:fill ", ";}&:hover path,&:focus-visible path{fill:var(--color-theme-900);}}.main-logo-long{transition:all ", ";#logotype{opacity:1;transition:all ", ";will-change:opacity,transform;@media (max-width:", "){opacity:0;transform:translateX(-5%);}}}.main-logo-long__collapsed #logotype{opacity:0;transform:translateX(-5%);}.main-menu-edit-button.main-menu-edit-button{opacity:0;transition:opacity ", ";}.main-menu-header .main-menu-edit-button.main-menu-edit-button{position:absolute;right:6px;transform:translateY(-2px);svg{fill:var(--color-theme-500);}&:hover svg,&:focus-visible svg{fill:var(--color-theme-900);}}&:hover .main-menu-edit-button.main-menu-edit-button,&:has(:focus-visible) .main-menu-edit-button.main-menu-edit-button,&.touch .main-menu-edit-button.main-menu-edit-button,.main-menu-edit-button.main-menu-edit-button[aria-expanded=\"true\"]{opacity:1;}@media (hover:none){.main-menu-edit-button.main-menu-edit-button{opacity:1;}}&.collapsed.main-menu-can-peek .main-menu-edit-button.main-menu-edit-button{visibility:hidden;}&.collapsed:not(.main-menu-can-peek) .main-menu-header .main-menu-edit-button.main-menu-edit-button{top:18px;right:auto;left:0;z-index:1;display:flex;align-items:center;justify-content:flex-end;width:4px;min-width:0;height:27px;padding:0;overflow:visible;border:0;border-radius:0 4px 4px 0;background:var(--color-theme-500);opacity:1;transform:none;transition:top 180ms ease,width 180ms ease,height 180ms ease,border-radius 180ms ease,box-shadow 180ms ease;&::before{content:\"\";position:absolute;inset:-10px -22px -10px 0;}svg{flex-shrink:0;opacity:0;transition:opacity 150ms ease;}&:hover,&:focus-visible,&[aria-expanded=\"true\"]{top:12px;width:40px;height:39px;padding:0 9px 0 0;border:1px solid var(--popover-border);border-left:0;border-radius:0 10px 10px 0;background:linear-gradient( 180deg,var(--page-paper-main),color-mix(in srgb,var(--page-paper-main) 92%,var(--color-theme-500)) );box-shadow:0 1px 2px rgba(0,0,0,0.14),0 4px 14px rgba(0,0,0,0.145),inset 0 1px 0 rgba(255,255,255,0.07);svg{opacity:1;}}}@media (max-width:", "){&:not(.c-main-menu--drawer) .main-menu-edit-button.main-menu-edit-button{visibility:hidden;}}.main-menu-socket{display:flex;flex:1 1 0%;flex-direction:column;height:100%;overflow-y:auto;}&.c-main-menu--drawer .main-menu-socket{height:calc(100dvh - 72px);}.main-menu-items{display:flex;flex-grow:1;min-height:0;}.main-menu-items-inner{margin:12px 0;overflow-x:hidden;}.main-menu-item-icon{flex-shrink:0;fill:var(--color-theme-700);opacity:0.7;}.main-menu-item{display:flex;align-items:center;height:40px;margin:0 12px 2px;padding:0 4px 0 12px;border-radius:var(--ac-br-8);text-decoration:none;&:hover{background-color:var(--color-theme-300);transition:all ", ";.main-menu-item-icon{fill:var(--color-theme-900);opacity:1;}.main-menu-item-text{color:var(--color-theme-900);}}&.main-menu-item-current{background-color:var(--color-secondary-200);.main-menu-item-icon{fill:var(--color-secondary);opacity:1;}.main-menu-item-text{color:var(--color-secondary);}}}.main-menu-item--between{justify-content:space-between;}.main-menu-item-start{display:flex;align-items:center;}.main-menu-item-label{min-width:0;margin-left:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.main-menu-projects{position:relative;}.main-menu-subnav.main-menu-subnav{padding:2px 0;.main-menu-subnav-item{margin:0;padding-right:0;padding-left:0;&:hover{background-color:unset;}}.main-menu-subnav-item-icon{flex-shrink:0;margin-right:8px;opacity:0.5;fill:var(--color-theme-700);}.main-menu-subnav-item-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.main-menu-item{width:100%;min-width:0;height:32px;margin-right:12px;margin-left:22px;padding:8px;}.main-menu-item:hover{.main-menu-subnav-item-icon{fill:var(--color-theme-900);}.main-menu-subnav-item-text{color:var(--color-theme-900);}}.main-menu-subnav-item-active,.main-menu-subnav-item-active:hover{background-color:var(--color-secondary-200);.main-menu-subnav-item-icon{fill:var(--color-secondary);}.main-menu-subnav-item-text{color:var(--color-secondary);}}}.menu-section-text{opacity:0.7;}.main-menu-item-text,.menu-section{transition:all ", ";}.menu-section{position:relative;display:flex;align-items:center;justify-content:space-between;margin:0 12px 8px;padding:0 4px 0 12px;clip-path:inset(-4px);}&.expanded{.main-menu-item-text{opacity:1;visibility:visible;}.menu-section{max-height:32px;opacity:1;}}&.collapsed{.main-menu-item-text{opacity:0;visibility:hidden;}.menu-section{max-height:32px;opacity:0;visibility:hidden;}}@media (max-width:", "){&.collapsed .menu-section,&.expanded .menu-section{max-height:0;opacity:0;}&.collapsed .main-menu-item-text,&.expanded .main-menu-item-text{width:0;opacity:0;visibility:hidden;}&.c-main-menu--drawer.expanded{.menu-section{max-height:32px;opacity:1;}.main-menu-item-text{width:auto;opacity:1;visibility:visible;}}}.favorite-projects-menu-target{position:absolute;top:0;right:0;z-index:1;display:none;align-items:center;justify-content:center;width:10px;height:40px;border-radius:4px;cursor:pointer;&.collapsed{display:flex;}@media (max-width:", "){display:flex;}svg{transform:rotate(180deg);}}&.main-menu-can-peek:not(.main-menu-peek-open) .favorite-projects-menu-target{display:none;}&.main-menu-peek-open .favorite-projects-menu-target.collapsed{top:8px;right:16px;width:24px;height:24px;}.favorite-projects-menu-target:hover{background-color:var(--color-theme-300);svg{fill:var(--color-theme-900);}}.main-menu-item-current + .favorite-projects-menu-target:hover,.favorite-projects-menu-target.open{background-color:var(--color-secondary-200);svg{fill:var(--color-secondary);}}.main-menu-toggle{flex-shrink:0;transition:", ";&.is-closed{transform:rotate(180deg);}}.favorite-projects-list,.favorite-projects-list-target{display:flex;&.collapsed{display:none;}@media (max-width:", "){display:none;}}.favorite-projects-list-target{margin-left:auto;}&.c-main-menu--drawer{.favorite-projects-list.favorite-projects-list,.favorite-projects-list-target.is-mobile{display:flex;}}.favorite-projects-list{opacity:1;overflow:hidden;transition:all ", ";}.favorite-projects-list-collapsed{opacity:0;transition:all ", ";}.show-hidden-options-long{display:block;margin:12px 24px;cursor:pointer;&.collapsed{display:none;}@media (max-width:", "){display:none;}}.show-hidden-options-short{display:none;margin:12px 0;cursor:pointer;&.collapsed{display:block;}@media (max-width:", "){display:block;}}&.c-main-menu--drawer{.show-hidden-options-long.show-hidden-options-long{display:block;}.show-hidden-options-short.show-hidden-options-short{display:none;}}.main-menu-shortcuts{position:relative;}.shortcuts-expander{margin-left:auto;cursor:pointer;}.shortcuts-expander-collapsed{position:absolute;top:-11px;right:0;left:0;display:none;margin:0 auto;border-radius:100%;background-color:var(--body-bg-main);cursor:pointer;&.collapsed{display:block;}@media (max-width:", "){display:block;}}.shortcuts-list-separator.c-list-separator{margin:16px 12px 12px;transition:margin ", ";@media (max-width:", "){margin:20px 12px;}}.add-shortcut{cursor:pointer;.main-menu-item-text.main-menu-item-text{color:var(--color-secondary);}.main-menu-item-icon.main-menu-item-icon{fill:var(--color-secondary);opacity:1;}&:hover{background-color:var(--color-primary-200);}&:focus{background-color:var(--color-primary-300);outline:none;}}.main-menu-item.main-menu-help{position:relative;flex-shrink:0;margin-top:16px;margin-bottom:16px;&:hover{cursor:pointer;}}.main-menu-help .main-menu-toggle.is-hidden{display:none;}.main-menu-item.main-menu-help--promo,.main-menu-item.main-menu-help--promo:hover,.main-menu-item.main-menu-help--promo.main-menu-item-current{background-color:var(--color-primary);}.main-menu-help-promo{display:flex;align-items:center;gap:12px;}.main-menu-help-promo-icon{flex-shrink:0;fill:var(--page-paper-main);}.main-menu-help-promo-text{display:flex;visibility:visible;@media (min-width:", "){visibility:hidden;}@media (min-width:", "){visibility:visible;}}.main-menu-help-badge.main-menu-help-badge{position:absolute;top:16px;right:4px;margin-right:8px;margin-left:auto;@media (min-width:", "){top:0;right:auto;left:0;}&.is-promo{right:6px;@media (min-width:", "){right:auto;}}&.is-static{@media (min-width:", "){position:static;}}}.main-menu-editor{display:flex;flex-direction:column;flex-grow:1;min-height:0;outline:none;}.main-menu-editor-header{margin-top:12px;}.main-menu-editor-action{margin-right:4px;}.main-menu-editor-list{display:flex;flex-grow:1;min-height:0;}.main-menu-editor-list-inner{overflow-x:hidden;}.main-menu-editor-row.c-list-item{margin:0 0 2px;padding-right:12px;padding-left:8px;}.main-menu-editor-row-box{width:100%;border-radius:var(--ac-br-8);}.main-menu-editor-row-inner{display:flex;align-items:center;width:100%;}.main-menu-editor-handle{margin-right:4px;cursor:move;}.main-menu-edit-item{display:flex;align-items:center;justify-content:space-between;width:100%;max-width:204px;height:40px;padding-right:4px;text-decoration:none;}.main-menu-edit-item-start{display:flex;align-items:center;min-width:0;}.main-menu-edit-item.hidden{.main-menu-item-icon,.main-menu-item-text{opacity:0.4;}}.main-menu-editor-shortcuts-title{display:flex;align-items:center;height:24px;margin:0 12px 8px;padding:0 12px;}.main-menu-drawer-close{position:absolute;top:16px;right:16px;@media (min-width:", "){display:none;}}"], BoxSizingStyle, SM, EXPANDED_WIDTH, COLLAPSED_WIDTH, TRANSITION, XL, COLLAPSED_WIDTH, EXPANDED_WIDTH, COLLAPSED_WIDTH, EXPANDED_WIDTH, EXPANDED_WIDTH - COLLAPSED_WIDTH, EXPANDED_WIDTH + 10, TRANSITION, TRANSITION, TRANSITION, XL, TRANSITION, XL, TRANSITION, TRANSITION, XL, XL, TOGGLE_TRANSITION, XL, TRANSITION, TRANSITION, XL, XL, XL, TRANSITION, XL, SM, XL, SM, SM, XL, SM);
24348
+ })(["", " &.c-main-menu--desktop{position:relative;left:10px;display:none;flex-direction:column;flex-shrink:0;height:100%;margin-right:4px;@media (min-width:", "){display:flex;}}&.c-main-menu--drawer{height:100%;}&.expanded{width:", "px;}&.collapsed{width:", "px;}&.expanded,&.collapsed{transition:width ", ";@media (max-width:", "){width:", "px;}}&.c-main-menu--drawer.c-main-menu--drawer{width:", "px;}&.main-menu-instant-width{transition:none;}.main-menu-panel{display:flex;flex:1;flex-direction:column;min-height:0;}&.main-menu-peek{width:", "px;}&.main-menu-peek .main-menu-panel{position:absolute;top:0;bottom:0;left:0;z-index:0;width:", "px;clip-path:inset( -100px ", "px -100px -100px );transition:clip-path 200ms cubic-bezier(0.25,0.46,0.45,0.94);&::before{content:\"\";position:absolute;inset:0 0 0 -10px;z-index:-1;background-color:var(--body-bg-main);box-shadow:var(--shadow-popover);}}&.main-menu-peek-open .main-menu-panel{clip-path:inset(-100px);}&.main-menu-peek::after{content:\"\";position:absolute;top:0;bottom:0;left:-10px;z-index:-1;width:", "px;}@media (prefers-reduced-motion:reduce){&.main-menu-peek .main-menu-panel{transition-duration:1ms;}}.main-menu-header{position:relative;display:flex;align-items:center;height:68px;overflow:hidden;}&.c-main-menu--desktop .main-menu-header{left:-10px;}.main-logo-url{position:absolute;left:30px;color:var(--color-secondary);path{fill:var(--color-secondary);transition:fill ", ";}&:hover path,&:focus-visible path{fill:var(--color-theme-900);}}.main-logo-long{transition:all ", ";#logotype{opacity:1;transition:all ", ";will-change:opacity,transform;@media (max-width:", "){opacity:0;transform:translateX(-5%);}}}.main-logo-long__collapsed #logotype{opacity:0;transform:translateX(-5%);}.main-menu-edit-button.main-menu-edit-button{opacity:0;transition:opacity ", ";}.main-menu-header .main-menu-edit-button.main-menu-edit-button{position:absolute;right:6px;transform:translateY(-2px);svg{fill:var(--color-theme-500);}&:hover svg,&:focus-visible svg{fill:var(--color-theme-900);}}&:hover .main-menu-edit-button.main-menu-edit-button,&:has(:focus-visible) .main-menu-edit-button.main-menu-edit-button,&.touch .main-menu-edit-button.main-menu-edit-button,.main-menu-edit-button.main-menu-edit-button[aria-expanded=\"true\"]{opacity:1;}@media (hover:none){.main-menu-edit-button.main-menu-edit-button{opacity:1;}}&.collapsed.main-menu-can-peek .main-menu-edit-button.main-menu-edit-button{visibility:hidden;}&.collapsed:not(.main-menu-can-peek) .main-menu-header .main-menu-edit-button.main-menu-edit-button{top:18px;right:auto;left:0;z-index:1;display:flex;align-items:center;justify-content:flex-end;width:4px;min-width:0;height:27px;padding:0;overflow:visible;border:0;border-radius:0 4px 4px 0;background:var(--color-theme-500);opacity:1;transform:none;transition:top 180ms ease,width 180ms ease,height 180ms ease,border-radius 180ms ease,box-shadow 180ms ease;&::before{content:\"\";position:absolute;inset:-10px -22px -10px 0;}svg{flex-shrink:0;opacity:0;transition:opacity 150ms ease;}&:hover,&:focus-visible,&[aria-expanded=\"true\"]{top:12px;width:40px;height:39px;padding:0 9px 0 0;border:1px solid var(--popover-border);border-left:0;border-radius:0 10px 10px 0;background:linear-gradient( 180deg,var(--page-paper-main),color-mix(in srgb,var(--page-paper-main) 92%,var(--color-theme-500)) );box-shadow:0 1px 2px rgba(0,0,0,0.14),0 4px 14px rgba(0,0,0,0.145),inset 0 1px 0 rgba(255,255,255,0.07);svg{opacity:1;}}}@media (max-width:", "){&:not(.c-main-menu--drawer) .main-menu-edit-button.main-menu-edit-button{visibility:hidden;}}.main-menu-socket{display:flex;flex:1 1 0%;flex-direction:column;height:100%;overflow-y:auto;}&.c-main-menu--drawer .main-menu-socket{height:calc(100dvh - 72px);}.main-menu-items{display:flex;flex-grow:1;min-height:0;}.main-menu-items-inner{margin:12px 0;overflow-x:hidden;}.main-menu-item-icon{flex-shrink:0;fill:var(--color-theme-700);opacity:0.7;}.main-menu-item{display:flex;align-items:center;height:40px;margin:0 12px 2px;padding:0 4px 0 12px;border-radius:var(--ac-br-8);text-decoration:none;&:hover{background-color:var(--color-theme-300);transition:all ", ";.main-menu-item-icon{fill:var(--color-theme-900);opacity:1;}.main-menu-item-text{color:var(--color-theme-900);}}&.main-menu-item-current{background-color:var(--color-secondary-200);.main-menu-item-icon{fill:var(--color-secondary);opacity:1;}.main-menu-item-text{color:var(--color-secondary);}}}.main-menu-item--between{justify-content:space-between;}.main-menu-item-start{display:flex;align-items:center;}.main-menu-item-label{min-width:0;margin-left:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.main-menu-projects{position:relative;}.main-menu-subnav.main-menu-subnav{padding:2px 0;.main-menu-subnav-item{margin:0;padding-right:0;padding-left:0;&:hover{background-color:unset;}}.main-menu-subnav-item-icon{flex-shrink:0;margin-right:8px;opacity:0.5;fill:var(--color-theme-700);}.main-menu-subnav-item-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.main-menu-item{width:100%;min-width:0;height:32px;margin-right:12px;margin-left:22px;padding:8px;}.main-menu-item:hover{.main-menu-subnav-item-icon{fill:var(--color-theme-900);}.main-menu-subnav-item-text{color:var(--color-theme-900);}}.main-menu-subnav-item-active,.main-menu-subnav-item-active:hover{background-color:var(--color-secondary-200);.main-menu-subnav-item-icon{fill:var(--color-secondary);}.main-menu-subnav-item-text{color:var(--color-secondary);}}}.menu-section-text{opacity:0.7;}.main-menu-item-text,.menu-section{transition:all ", ";}.menu-section{position:relative;display:flex;align-items:center;justify-content:space-between;margin:0 12px 8px;padding:0 4px 0 12px;clip-path:inset(-4px);}&.expanded{.main-menu-item-text{opacity:1;visibility:visible;}.menu-section{max-height:32px;opacity:1;}}&.collapsed{.main-menu-item-text{opacity:0;visibility:hidden;}.menu-section{max-height:32px;opacity:0;visibility:hidden;}}@media (max-width:", "){&.collapsed .menu-section,&.expanded .menu-section{max-height:0;opacity:0;}&.collapsed .main-menu-item-text,&.expanded .main-menu-item-text{width:0;opacity:0;visibility:hidden;}&.c-main-menu--drawer.expanded{.menu-section{max-height:32px;opacity:1;}.main-menu-item-text{width:auto;opacity:1;visibility:visible;}}}.favorite-projects-menu-target{position:absolute;top:0;right:0;z-index:1;display:none;align-items:center;justify-content:center;width:10px;height:40px;border-radius:4px;cursor:pointer;&.collapsed{display:flex;}@media (max-width:", "){display:flex;}svg{transform:rotate(180deg);}}&.main-menu-can-peek:not(.main-menu-peek-open) .favorite-projects-menu-target{display:none;}&.main-menu-peek-open .favorite-projects-menu-target.collapsed{top:8px;right:16px;width:24px;height:24px;}.favorite-projects-menu-target:hover{background-color:var(--color-theme-300);svg{fill:var(--color-theme-900);}}.main-menu-item-current + .favorite-projects-menu-target:hover,.favorite-projects-menu-target.open{background-color:var(--color-secondary-200);svg{fill:var(--color-secondary);}}.main-menu-toggle{flex-shrink:0;transition:", ";&.is-closed{transform:rotate(180deg);}}.favorite-projects-list,.favorite-projects-list-target{display:flex;&.collapsed{display:none;}@media (max-width:", "){display:none;}}.favorite-projects-list-target{margin-left:auto;}&.c-main-menu--drawer{.favorite-projects-list.favorite-projects-list,.favorite-projects-list-target.is-mobile{display:flex;}}.favorite-projects-list{opacity:1;overflow:hidden;transition:all ", ";}.favorite-projects-list-collapsed{opacity:0;transition:all ", ";}.show-hidden-options-long{display:block;margin:12px 24px;cursor:pointer;&.collapsed{display:none;}@media (max-width:", "){display:none;}}.show-hidden-options-short{display:none;margin:12px 0;cursor:pointer;&.collapsed{display:block;}@media (max-width:", "){display:block;}}&.c-main-menu--drawer{.show-hidden-options-long.show-hidden-options-long{display:block;}.show-hidden-options-short.show-hidden-options-short{display:none;}}.main-menu-shortcuts{position:relative;}.shortcuts-expander{margin-left:auto;cursor:pointer;}.shortcuts-expander-collapsed{position:absolute;top:-11px;right:0;left:0;display:none;margin:0 auto;border-radius:100%;background-color:var(--body-bg-main);cursor:pointer;&.collapsed{display:block;}@media (max-width:", "){display:block;}}&.main-menu-peek.collapsed .shortcuts-expander-collapsed{display:none;}.shortcuts-list-separator.c-list-separator{margin:16px 12px 12px;transition:margin ", ";@media (max-width:", "){margin:20px 12px;}}.add-shortcut{cursor:pointer;.main-menu-item-text.main-menu-item-text{color:var(--color-secondary);}.main-menu-item-icon.main-menu-item-icon{fill:var(--color-secondary);opacity:1;}&:hover{background-color:var(--color-primary-200);}&:focus{background-color:var(--color-primary-300);outline:none;}}.main-menu-item.main-menu-help{position:relative;flex-shrink:0;margin-top:16px;margin-bottom:16px;&:hover{cursor:pointer;}}.main-menu-help .main-menu-toggle.is-hidden{display:none;}.main-menu-item.main-menu-help--promo,.main-menu-item.main-menu-help--promo:hover,.main-menu-item.main-menu-help--promo.main-menu-item-current{background-color:var(--color-primary);}.main-menu-help-promo{display:flex;align-items:center;gap:12px;}.main-menu-help-promo-icon{flex-shrink:0;fill:var(--page-paper-main);}.main-menu-help-promo-text{display:flex;visibility:visible;@media (min-width:", "){visibility:hidden;}@media (min-width:", "){visibility:visible;}}.main-menu-help-badge.main-menu-help-badge{position:absolute;top:16px;right:4px;margin-right:8px;margin-left:auto;@media (min-width:", "){top:0;right:auto;left:0;}&.is-promo{right:6px;@media (min-width:", "){right:auto;}}&.is-static{@media (min-width:", "){position:static;}}}.main-menu-editor{display:flex;flex-direction:column;flex-grow:1;min-height:0;outline:none;}.main-menu-editor-header{margin-top:12px;}.main-menu-editor-action{margin-right:4px;}.main-menu-editor-list{display:flex;flex-grow:1;min-height:0;}.main-menu-editor-list-inner{overflow-x:hidden;}.main-menu-editor-row.c-list-item{margin:0 0 2px;padding-right:12px;padding-left:8px;}.main-menu-editor-row-box{width:100%;border-radius:var(--ac-br-8);}.main-menu-editor-row-inner{display:flex;align-items:center;width:100%;}.main-menu-editor-handle{margin-right:4px;cursor:move;}.main-menu-edit-item{display:flex;align-items:center;justify-content:space-between;width:100%;max-width:204px;height:40px;padding-right:4px;text-decoration:none;}.main-menu-edit-item-start{display:flex;align-items:center;min-width:0;}.main-menu-edit-item.hidden{.main-menu-item-icon,.main-menu-item-text{opacity:0.4;}}.main-menu-editor-shortcuts-title{display:flex;align-items:center;height:24px;margin:0 12px 8px;padding:0 12px;}.main-menu-drawer-close{position:absolute;top:16px;right:16px;@media (min-width:", "){display:none;}}"], BoxSizingStyle, SM, EXPANDED_WIDTH, COLLAPSED_WIDTH, TRANSITION, XL, COLLAPSED_WIDTH, EXPANDED_WIDTH, COLLAPSED_WIDTH, EXPANDED_WIDTH, EXPANDED_WIDTH - COLLAPSED_WIDTH, EXPANDED_WIDTH + 10, TRANSITION, TRANSITION, TRANSITION, XL, TRANSITION, XL, TRANSITION, TRANSITION, XL, XL, TOGGLE_TRANSITION, XL, TRANSITION, TRANSITION, XL, XL, XL, TRANSITION, XL, SM, XL, SM, SM, XL, SM);
24323
24349
  StyledMainMenu.displayName = "StyledMainMenu";
24324
24350
 
24325
24351
  /* HelpAndSupportMenu.js: "tw:mt-3" on the first item, "tw:mb-3" on the last, "tw:shrink-0 tw:mr-3" on the icons */
@@ -25471,12 +25497,14 @@
25471
25497
  }, [setPointerInside]);
25472
25498
  useOpenMenuPointer(rootRef, peek === PEEK_OPEN, handleOpenMenuPointer);
25473
25499
 
25474
- // A running animation always ends first. Then this effect reads the pointer again.
25500
+ // An opening runs to its end. A closing turns back when the pointer comes back, so the menu does not close and open again.
25475
25501
  React.useEffect(function () {
25476
25502
  if (!canPeek) {
25477
25503
  setPeek(PEEK_CLOSED);
25478
25504
  } else if (wantsPeek && peek === PEEK_CLOSED) {
25479
25505
  setPeek(PEEK_OPENING);
25506
+ } else if (wantsPeek && peek === PEEK_CLOSING) {
25507
+ setPeek(PEEK_EXPANDING);
25480
25508
  } else if (!wantsPeek && peek === PEEK_OPEN) {
25481
25509
  setPeek(PEEK_CLOSING);
25482
25510
  }