@activecollab/components 2.0.571 → 2.0.572

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 (45) hide show
  1. package/dist/cjs/components/MainMenu/MainMenu.js +25 -13
  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 +33 -2
  6. package/dist/cjs/components/MainMenu/hooks.js.map +1 -1
  7. package/dist/cjs/components/MainMenu/types.js +2 -1
  8. package/dist/cjs/components/MainMenu/types.js.map +1 -1
  9. package/dist/cjs/components/ViewSwitcher/Styles.js +37 -18
  10. package/dist/cjs/components/ViewSwitcher/Styles.js.map +1 -1
  11. package/dist/cjs/components/ViewSwitcher/ViewSwitcher.js +12 -1
  12. package/dist/cjs/components/ViewSwitcher/ViewSwitcher.js.map +1 -1
  13. package/dist/cjs/components/ViewSwitcher/ViewSwitcherMenu.js +12 -4
  14. package/dist/cjs/components/ViewSwitcher/ViewSwitcherMenu.js.map +1 -1
  15. package/dist/esm/components/MainMenu/MainMenu.d.ts.map +1 -1
  16. package/dist/esm/components/MainMenu/MainMenu.js +25 -12
  17. package/dist/esm/components/MainMenu/MainMenu.js.map +1 -1
  18. package/dist/esm/components/MainMenu/Styles.d.ts.map +1 -1
  19. package/dist/esm/components/MainMenu/Styles.js +1 -1
  20. package/dist/esm/components/MainMenu/Styles.js.map +1 -1
  21. package/dist/esm/components/MainMenu/hooks.d.ts +1 -0
  22. package/dist/esm/components/MainMenu/hooks.d.ts.map +1 -1
  23. package/dist/esm/components/MainMenu/hooks.js +28 -1
  24. package/dist/esm/components/MainMenu/hooks.js.map +1 -1
  25. package/dist/esm/components/MainMenu/types.d.ts +1 -0
  26. package/dist/esm/components/MainMenu/types.d.ts.map +1 -1
  27. package/dist/esm/components/MainMenu/types.js +2 -1
  28. package/dist/esm/components/MainMenu/types.js.map +1 -1
  29. package/dist/esm/components/ViewSwitcher/Styles.d.ts +2 -0
  30. package/dist/esm/components/ViewSwitcher/Styles.d.ts.map +1 -1
  31. package/dist/esm/components/ViewSwitcher/Styles.js +36 -17
  32. package/dist/esm/components/ViewSwitcher/Styles.js.map +1 -1
  33. package/dist/esm/components/ViewSwitcher/ViewSwitcher.d.ts +2 -0
  34. package/dist/esm/components/ViewSwitcher/ViewSwitcher.d.ts.map +1 -1
  35. package/dist/esm/components/ViewSwitcher/ViewSwitcher.js +12 -1
  36. package/dist/esm/components/ViewSwitcher/ViewSwitcher.js.map +1 -1
  37. package/dist/esm/components/ViewSwitcher/ViewSwitcherMenu.d.ts +4 -0
  38. package/dist/esm/components/ViewSwitcher/ViewSwitcherMenu.d.ts.map +1 -1
  39. package/dist/esm/components/ViewSwitcher/ViewSwitcherMenu.js +13 -5
  40. package/dist/esm/components/ViewSwitcher/ViewSwitcherMenu.js.map +1 -1
  41. package/dist/index.js +120 -38
  42. package/dist/index.js.map +1 -1
  43. package/dist/index.min.js +1 -1
  44. package/dist/index.min.js.map +1 -1
  45. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -23949,7 +23949,8 @@
23949
23949
 
23950
23950
  var DEFAULT_MAIN_MENU_LABELS = {
23951
23951
  customizeMenu: "Customize Menu",
23952
- collapse: "Collapse or expand the menu",
23952
+ collapse: "Collapse",
23953
+ expand: "Expand",
23953
23954
  menu: "MENU",
23954
23955
  edit: "Edit",
23955
23956
  shortcuts: "SHORTCUTS",
@@ -24060,6 +24061,12 @@
24060
24061
  // The menu sits on the left edge of the page, so the gutter on its left counts too.
24061
24062
  return event.clientX < right && event.clientY >= top && event.clientY < bottom;
24062
24063
  };
24064
+
24065
+ // The pointer on the tab of a closed menu must not open the peek, because the click there changes the mode.
24066
+ var isOnTabOfClosedMenu = function isOnTabOfClosedMenu(root, event) {
24067
+ var _closest, _ref;
24068
+ return !(root !== null && root !== void 0 && root.classList.contains("main-menu-peek")) && Boolean((_closest = (_ref = event.target).closest) === null || _closest === void 0 ? void 0 : _closest.call(_ref, ".main-menu-collapse-tab"));
24069
+ };
24063
24070
  var usePointerInside = function usePointerInside(rootRef, isWatching) {
24064
24071
  var _useState7 = React.useState(false),
24065
24072
  _useState8 = _slicedToArray(_useState7, 2),
@@ -24086,7 +24093,9 @@
24086
24093
  }
24087
24094
  };
24088
24095
  var handleOver = function handleOver(event) {
24089
- return update(isPointerOverMenu(rootRef.current, event));
24096
+ if (!isOnTabOfClosedMenu(rootRef.current, event)) {
24097
+ update(isPointerOverMenu(rootRef.current, event));
24098
+ }
24090
24099
  };
24091
24100
  var handleOut = function handleOut(event) {
24092
24101
  if (!event.relatedTarget) {
@@ -24104,6 +24113,29 @@
24104
24113
  return [isInside, setPointerInside];
24105
24114
  };
24106
24115
 
24116
+ // After a collapse the pointer is still over the menu, so only a leave brings the peek back.
24117
+ var usePeekHold = function usePeekHold(rootRef) {
24118
+ var _useState9 = React.useState(false),
24119
+ _useState0 = _slicedToArray(_useState9, 2),
24120
+ isHeld = _useState0[0],
24121
+ setIsHeld = _useState0[1];
24122
+ React.useEffect(function () {
24123
+ if (!isHeld) {
24124
+ return undefined;
24125
+ }
24126
+ var release = function release(event) {
24127
+ if (!isPointerOverMenu(rootRef.current, event)) {
24128
+ setIsHeld(false);
24129
+ }
24130
+ };
24131
+ document.addEventListener("mouseover", release, true);
24132
+ return function () {
24133
+ return document.removeEventListener("mouseover", release, true);
24134
+ };
24135
+ }, [rootRef, isHeld]);
24136
+ return [isHeld, setIsHeld];
24137
+ };
24138
+
24107
24139
  // The listeners run only while the menu is fully open.
24108
24140
  // Every Dialog is a native modal <dialog>, and showModal sends no event to listen for.
24109
24141
  var useDialogOpen = function useDialogOpen(isWatching, onOpen) {
@@ -24209,7 +24241,7 @@
24209
24241
  var StyledMainMenu = styled__default["default"].div.withConfig({
24210
24242
  displayName: "Styles__StyledMainMenu",
24211
24243
  componentId: "sc-17ibzh0-0"
24212
- })(["", " &.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-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);}.collapse-expand-menu-icon{transform:rotate(180deg);}}&.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);transition:all ", ";path{fill:var(--color-secondary);}}.main-logo-long{transition:all ", ";path{fill:var(--color-secondary);}#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%);}.collapse-expand-menu{display:none;align-items:center;justify-content:center;width:0;height:100%;margin:0;padding:0;border:0;border-radius:0;background-color:var(--color-secondary);cursor:pointer;transition:all ", ";@media (min-width:", "){display:inline-flex;}.collapse-expand-menu-icon{display:none;fill:var(--page-paper-main);}}.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{opacity:1;}@media (hover:none){.main-menu-edit-button.main-menu-edit-button{opacity:1;}}&.collapsed .main-menu-edit-button.main-menu-edit-button{visibility:hidden;}@media (max-width:", "){&:not(.c-main-menu--drawer) .main-menu-edit-button.main-menu-edit-button{visibility:hidden;}}&:hover .collapse-expand-menu{width:4px;}.main-menu-header:hover{.main-logo-url{left:38px;@media (max-width:", "){left:30px;}}.collapse-expand-menu{width:16px;.collapse-expand-menu-icon{display:block;}}}.collapse-expand-menu.collapse-expand-menu:hover{width:24px;& + .main-logo-url{left:46px;@media (max-width:", "){left:30px;}}}.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,.collapse-expand-menu-icon{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{.collapse-expand-menu-icon{transform:rotate(180deg);}.main-menu-item-text{opacity:0;visibility:hidden;}.menu-section{max-height:0;opacity:0;}}@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 ", ";&.collapsed{margin:20px 12px;}@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, XL, XL, XL, TRANSITION, TRANSITION, XL, XL, TOGGLE_TRANSITION, XL, TRANSITION, TRANSITION, XL, XL, XL, TRANSITION, XL, SM, XL, SM, SM, XL, SM);
24244
+ })(["", " &.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-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);transition:all ", ";path{fill:var(--color-secondary);}}.main-logo-long{transition:all ", ";path{fill:var(--color-secondary);}#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-collapse-tab{position:absolute;top:8px;left:-10px;z-index:4;display:none;width:30px;height:48px;margin:0;padding:0;border:0;background:none;font:inherit;cursor:pointer;@media (min-width:", "){display:block;}}.main-menu-collapse-tab-face{position:absolute;top:50%;left:0;display:flex;align-items:center;gap:6px;height:27px;max-width:4px;margin-top:-0.5px;padding:0;overflow:hidden;border-radius:0 4px 4px 0;background:var(--color-theme-500);white-space:nowrap;opacity:0;transform:translateY(-50%);transition:all 180ms ease;}.main-menu-collapse-tab-icon,.main-menu-collapse-tab-label{opacity:0;transition:opacity 150ms ease,", ";}.main-menu-collapse-tab-icon{flex-shrink:0;fill:var(--color-theme-700);}.main-menu-collapse-tab.is-collapsed .main-menu-collapse-tab-icon{transform:rotate(180deg);}.main-menu-collapse-tab-label{color:var(--color-theme-900);font-size:12px;font-weight:600;line-height:16px;}&:hover .main-menu-collapse-tab-face,&:has(:focus-visible) .main-menu-collapse-tab-face,&.touch .main-menu-collapse-tab-face{opacity:1;}@media (hover:none){.main-menu-collapse-tab-face{opacity:1;}}.main-menu-collapse-tab:hover .main-menu-collapse-tab-face,.main-menu-collapse-tab:focus-visible .main-menu-collapse-tab-face{height:39px;max-width:120px;padding:0 14px 0 10px;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);opacity:1;}.main-menu-collapse-tab:hover .main-menu-collapse-tab-icon,.main-menu-collapse-tab:hover .main-menu-collapse-tab-label,.main-menu-collapse-tab:focus-visible .main-menu-collapse-tab-icon,.main-menu-collapse-tab:focus-visible .main-menu-collapse-tab-label{opacity:1;}.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{opacity:1;}@media (hover:none){.main-menu-edit-button.main-menu-edit-button{opacity:1;}}&.collapsed .main-menu-edit-button.main-menu-edit-button{visibility:hidden;}@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:0;opacity:0;}}@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 ", ";&.collapsed{margin:20px 12px;}@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, XL, TOGGLE_TRANSITION, TRANSITION, XL, TRANSITION, TRANSITION, XL, XL, TOGGLE_TRANSITION, XL, TRANSITION, TRANSITION, XL, XL, XL, TRANSITION, XL, SM, XL, SM, SM, XL, SM);
24213
24245
  StyledMainMenu.displayName = "StyledMainMenu";
24214
24246
 
24215
24247
  /* HelpAndSupportMenu.js: "tw:mt-3" on the first item, "tw:mb-3" on the last, "tw:shrink-0 tw:mr-3" on the icons */
@@ -25165,7 +25197,11 @@
25165
25197
  var socketSize = useResizeObserver$1(socketRef);
25166
25198
 
25167
25199
  // Under the xl breakpoint the styles force the compact look, so the menu peeks only above it.
25168
- var canPeek = collapsed && !isNarrowScreen && autoExpand;
25200
+ var _usePeekHold = usePeekHold(rootRef),
25201
+ _usePeekHold2 = _slicedToArray(_usePeekHold, 2),
25202
+ isPeekHeld = _usePeekHold2[0],
25203
+ setIsPeekHeld = _usePeekHold2[1];
25204
+ var canPeek = collapsed && !isNarrowScreen && autoExpand && !isPeekHeld;
25169
25205
  var _usePointerInside = usePointerInside(rootRef, canPeek),
25170
25206
  _usePointerInside2 = _slicedToArray(_usePointerInside, 2),
25171
25207
  isHovered = _usePointerInside2[0],
@@ -25258,6 +25294,10 @@
25258
25294
  setPeek(settlePeek);
25259
25295
  }
25260
25296
  }, []);
25297
+ var handleToggleCollapsed = function handleToggleCollapsed() {
25298
+ setIsPeekHeld(!collapsed);
25299
+ setCollapsed(!collapsed);
25300
+ };
25261
25301
  var shared = {
25262
25302
  collapsed: looksCollapsed,
25263
25303
  narrow: isNarrowScreen,
@@ -25287,17 +25327,7 @@
25287
25327
  onTransitionEnd: handleTransitionEnd
25288
25328
  }, /*#__PURE__*/React__default["default"].createElement("div", {
25289
25329
  className: "main-menu-header"
25290
- }, /*#__PURE__*/React__default["default"].createElement("button", {
25291
- type: "button",
25292
- className: "collapse-expand-menu",
25293
- "aria-label": labels.collapse,
25294
- "aria-expanded": !collapsed,
25295
- onClick: function onClick() {
25296
- return setCollapsed(!collapsed);
25297
- }
25298
- }, /*#__PURE__*/React__default["default"].createElement(CollapsIcon$1, {
25299
- className: "collapse-expand-menu-icon"
25300
- })), /*#__PURE__*/React__default["default"].createElement("a", {
25330
+ }, /*#__PURE__*/React__default["default"].createElement("a", {
25301
25331
  href: homeHref,
25302
25332
  className: "main-logo-url",
25303
25333
  onClick: onNavigate
@@ -25350,7 +25380,21 @@
25350
25380
  current: helpCurrent,
25351
25381
  promo: helpPromo,
25352
25382
  id: helpId
25353
- }))));
25383
+ }))), /*#__PURE__*/React__default["default"].createElement("button", {
25384
+ type: "button",
25385
+ className: classnames__default["default"]("main-menu-collapse-tab", {
25386
+ "is-collapsed": collapsed
25387
+ }),
25388
+ "aria-label": collapsed ? labels.expand : labels.collapse,
25389
+ "aria-expanded": !collapsed,
25390
+ onClick: handleToggleCollapsed
25391
+ }, /*#__PURE__*/React__default["default"].createElement("span", {
25392
+ className: "main-menu-collapse-tab-face"
25393
+ }, /*#__PURE__*/React__default["default"].createElement(CollapsIcon$1, {
25394
+ className: "main-menu-collapse-tab-icon"
25395
+ }), /*#__PURE__*/React__default["default"].createElement("span", {
25396
+ className: "main-menu-collapse-tab-label"
25397
+ }, collapsed ? labels.expand : labels.collapse))));
25354
25398
  };
25355
25399
  MainMenu.displayName = "MainMenu";
25356
25400
 
@@ -35004,7 +35048,7 @@
35004
35048
  var StyledViewSwitcherTrack = styled__default["default"].div.withConfig({
35005
35049
  displayName: "Styles__StyledViewSwitcherTrack",
35006
35050
  componentId: "sc-1cg2mte-1"
35007
- })(["", " display:inline-flex;align-items:center;height:32px;padding:3px;border-radius:var(--ac-br-rounded);background-color:var(--color-theme-300);"], BoxSizingStyle);
35051
+ })(["", " position:relative;display:inline-flex;align-items:center;height:32px;padding:3px;border-radius:var(--ac-br-rounded);background-color:var(--color-theme-300);"], BoxSizingStyle);
35008
35052
  StyledViewSwitcherTrack.displayName = "StyledViewSwitcherTrack";
35009
35053
  var StyledViewSwitcherOptions = styled__default["default"].div.withConfig({
35010
35054
  displayName: "Styles__StyledViewSwitcherOptions",
@@ -35021,69 +35065,88 @@
35021
35065
  componentId: "sc-1cg2mte-4"
35022
35066
  })(["", " display:inline-flex;align-items:center;gap:4px;height:26px;margin:0;padding:0 8px 0 12px;border:0;border-radius:var(--ac-br-rounded);background-color:var(--page-paper-main);box-shadow:var(--shadow-float);color:var(--color-theme-900);font-size:calc(13px * var(--text-scale,1));white-space:nowrap;cursor:pointer;outline:none;svg{flex-shrink:0;fill:var(--color-theme-900);}&:has(.c-view-switcher-menu__icon){padding-left:8px;}.c-view-switcher-menu__values{display:inline-grid;}.c-view-switcher-menu__value{display:inline-flex;grid-area:1 / 1;align-items:center;gap:4px;visibility:hidden;}.c-view-switcher-menu__value[data-selected=\"true\"]{visibility:visible;}.c-view-switcher-menu__icon{display:inline-flex;flex-shrink:0;}.c-view-switcher-menu__icon svg{width:20px;height:20px;}&:focus-visible{box-shadow:0 0 0 2px var(--color-primary);}"], BoxSizingStyle);
35023
35067
  StyledViewSwitcherMenuOption.displayName = "StyledViewSwitcherMenuOption";
35068
+ var VIEW_SWITCHER_MENU_REVEAL_MS = 200;
35069
+ var VIEW_SWITCHER_MENU_GAP = 8;
35070
+ var menuReveal = styled.keyframes(["from{grid-template-columns:0fr;margin-right:-", "px;}"], VIEW_SWITCHER_MENU_GAP);
35071
+ var menuConceal = styled.keyframes(["to{grid-template-columns:0fr;margin-right:-", "px;}"], VIEW_SWITCHER_MENU_GAP);
35072
+ var menuClip = styled.keyframes(["from,to{overflow:hidden;}"]);
35073
+
35074
+ // The width opens from nothing, so the controls beside the menu move aside with it.
35075
+ var StyledViewSwitcherMenuRoot = styled__default["default"](StyledViewSwitcher).withConfig({
35076
+ displayName: "Styles__StyledViewSwitcherMenuRoot",
35077
+ componentId: "sc-1cg2mte-5"
35078
+ })(["display:inline-grid;grid-template-columns:1fr;&[data-animate-in]{animation:", " ", "ms cubic-bezier(0.4,0,0.2,1);}&[data-animate-in] > .c-view-switcher-menu__clip{animation:", " ", "ms;}&[data-leaving]{pointer-events:none;animation:", " ", "ms cubic-bezier(0.4,0,0.2,1) forwards;}&[data-leaving] > .c-view-switcher-menu__clip{overflow:hidden;}@media (prefers-reduced-motion:reduce){&[data-animate-in],&[data-animate-in] > .c-view-switcher-menu__clip,&[data-leaving]{animation:none;}}"], menuReveal, VIEW_SWITCHER_MENU_REVEAL_MS, menuClip, VIEW_SWITCHER_MENU_REVEAL_MS, menuConceal, VIEW_SWITCHER_MENU_REVEAL_MS);
35079
+ StyledViewSwitcherMenuRoot.displayName = "StyledViewSwitcherMenuRoot";
35080
+ var StyledViewSwitcherMenuClip = styled__default["default"].div.withConfig({
35081
+ displayName: "Styles__StyledViewSwitcherMenuClip",
35082
+ componentId: "sc-1cg2mte-6"
35083
+ })(["display:flex;min-width:0;> *{flex-shrink:0;}"]);
35084
+ StyledViewSwitcherMenuClip.displayName = "StyledViewSwitcherMenuClip";
35024
35085
  var StyledViewSwitcherMenuIcon = styled__default["default"].span.withConfig({
35025
35086
  displayName: "Styles__StyledViewSwitcherMenuIcon",
35026
- componentId: "sc-1cg2mte-5"
35087
+ componentId: "sc-1cg2mte-7"
35027
35088
  })(["display:inline-flex;flex-shrink:0;margin-right:8px;fill:var(--color-theme-900);"]);
35028
35089
  StyledViewSwitcherMenuIcon.displayName = "StyledViewSwitcherMenuIcon";
35029
35090
  var StyledViewSwitcherMenuList = styled__default["default"](List).withConfig({
35030
35091
  displayName: "Styles__StyledViewSwitcherMenuList",
35031
- componentId: "sc-1cg2mte-6"
35092
+ componentId: "sc-1cg2mte-8"
35032
35093
  })(["padding:8px 0;"]);
35033
35094
  StyledViewSwitcherMenuList.displayName = "StyledViewSwitcherMenuList";
35034
35095
  var StyledViewSwitcherMenuLabel = styled__default["default"].span.withConfig({
35035
35096
  displayName: "Styles__StyledViewSwitcherMenuLabel",
35036
- componentId: "sc-1cg2mte-7"
35097
+ componentId: "sc-1cg2mte-9"
35037
35098
  })(["flex:1;&[data-selected=\"true\"]{font-weight:bold;color:var(--color-primary);}"]);
35038
35099
  StyledViewSwitcherMenuLabel.displayName = "StyledViewSwitcherMenuLabel";
35039
- var promptIn = styled.keyframes(["from{grid-template-columns:0fr;opacity:0;}"]);
35040
- var promptOut = styled.keyframes(["to{grid-template-columns:0fr;opacity:0;}"]);
35100
+ var promptIn = styled.keyframes(["from{opacity:0;}"]);
35101
+ var promptOut = styled.keyframes(["to{clip-path:inset(0 0 0 100%);}"]);
35041
35102
  var appliedIn = styled.keyframes(["from{opacity:0;transform:translateY(6px);}"]);
35042
35103
  var appliedIcon = styled.keyframes(["from{opacity:0;transform:scale(0.4);}60%{transform:scale(1.2);}"]);
35043
35104
  var StyledViewSwitcherPromptTitle = styled__default["default"].span.withConfig({
35044
35105
  displayName: "Styles__StyledViewSwitcherPromptTitle",
35045
- componentId: "sc-1cg2mte-8"
35106
+ componentId: "sc-1cg2mte-10"
35046
35107
  })(["position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;"]);
35047
35108
  StyledViewSwitcherPromptTitle.displayName = "StyledViewSwitcherPromptTitle";
35048
35109
  var PROMPT_EASE = "cubic-bezier(0.4, 0, 0.2, 1)";
35049
35110
  var APPLIED_SWAP_MS = 160;
35111
+
35112
+ // The offer covers the buttons and keeps the width of the switcher, so nothing beside it moves.
35050
35113
  var StyledViewSwitcherPrompt = styled__default["default"].div.withConfig({
35051
35114
  displayName: "Styles__StyledViewSwitcherPrompt",
35052
- componentId: "sc-1cg2mte-9"
35053
- })(["", " display:grid;flex-shrink:0;grid-template-columns:1fr;animation:", " ", "ms ", ";&[data-phase=\"applying\"],&[data-phase=\"applied\"]{pointer-events:none;}&[data-phase=\"applying\"] .c-view-switcher__prompt-pill{opacity:0.7;}.c-view-switcher__action,.c-view-switcher__line,.c-view-switcher__dismiss{transition:opacity ", "ms ", ",transform ", "ms ", ",visibility 0s linear ", "ms,background-color 150ms ease;}&[data-confirmed] .c-view-switcher__action,&[data-confirmed] .c-view-switcher__line,&[data-confirmed] .c-view-switcher__dismiss{visibility:hidden;opacity:0;transform:translateY(-6px);}&[data-phase=\"leaving\"]{pointer-events:none;animation:", " ", "ms ", " forwards;}@media (prefers-reduced-motion:reduce){animation:none;&[data-phase=\"leaving\"]{animation:none;}.c-view-switcher__action,.c-view-switcher__line,.c-view-switcher__dismiss,.c-view-switcher__prompt-pill{transition:none;}}"], BoxSizingStyle, promptIn, VIEW_SWITCHER_LEAVE_MS, PROMPT_EASE, APPLIED_SWAP_MS, PROMPT_EASE, APPLIED_SWAP_MS, PROMPT_EASE, APPLIED_SWAP_MS, promptOut, VIEW_SWITCHER_LEAVE_MS, PROMPT_EASE);
35115
+ componentId: "sc-1cg2mte-11"
35116
+ })(["", " position:absolute;top:3px;right:3px;bottom:3px;z-index:1;display:flex;min-width:calc(100% - 6px);animation:", " ", "ms ", ";&[data-phase=\"applying\"],&[data-phase=\"applied\"]{pointer-events:none;}&[data-phase=\"applying\"] .c-view-switcher__prompt-pill{opacity:0.7;}.c-view-switcher__action,.c-view-switcher__line,.c-view-switcher__dismiss{transition:opacity ", "ms ", ",transform ", "ms ", ",visibility 0s linear ", "ms,background-color 150ms ease;}&[data-confirmed] .c-view-switcher__action,&[data-confirmed] .c-view-switcher__line,&[data-confirmed] .c-view-switcher__dismiss{visibility:hidden;opacity:0;transform:translateY(-6px);}&[data-phase=\"leaving\"]{pointer-events:none;animation:", " ", "ms ", " forwards;}@media (prefers-reduced-motion:reduce){animation:none;&[data-phase=\"leaving\"]{animation:none;}.c-view-switcher__action,.c-view-switcher__line,.c-view-switcher__dismiss,.c-view-switcher__prompt-pill{transition:none;}}"], BoxSizingStyle, promptIn, VIEW_SWITCHER_LEAVE_MS, PROMPT_EASE, APPLIED_SWAP_MS, PROMPT_EASE, APPLIED_SWAP_MS, PROMPT_EASE, APPLIED_SWAP_MS, promptOut, VIEW_SWITCHER_LEAVE_MS, PROMPT_EASE);
35054
35117
  StyledViewSwitcherPrompt.displayName = "StyledViewSwitcherPrompt";
35055
35118
  var StyledViewSwitcherPromptClip = styled__default["default"].div.withConfig({
35056
35119
  displayName: "Styles__StyledViewSwitcherPromptClip",
35057
- componentId: "sc-1cg2mte-10"
35058
- })(["display:flex;min-width:0;overflow:hidden;"]);
35120
+ componentId: "sc-1cg2mte-12"
35121
+ })(["display:flex;flex:1;min-width:0;"]);
35059
35122
  StyledViewSwitcherPromptClip.displayName = "StyledViewSwitcherPromptClip";
35060
35123
  var StyledViewSwitcherPromptPill = styled__default["default"].div.withConfig({
35061
35124
  displayName: "Styles__StyledViewSwitcherPromptPill",
35062
- componentId: "sc-1cg2mte-11"
35063
- })(["", " position:relative;display:inline-flex;flex-shrink:0;align-items:center;height:26px;margin-right:2px;border-radius:var(--ac-br-rounded);background-color:var(--color-primary-opaque-300);color:var(--color-primary);font-size:calc(0.75rem * var(--text-scale,1));font-weight:500;white-space:nowrap;transition:opacity 150ms ease;"], BoxSizingStyle);
35125
+ componentId: "sc-1cg2mte-13"
35126
+ })(["", " position:relative;display:inline-flex;flex:1;align-items:center;justify-content:center;height:26px;border-radius:var(--ac-br-rounded);background-color:var(--color-primary-opaque-300);color:var(--color-primary);font-size:calc(0.75rem * var(--text-scale,1));font-weight:500;white-space:nowrap;transition:opacity 150ms ease;"], BoxSizingStyle);
35064
35127
  StyledViewSwitcherPromptPill.displayName = "StyledViewSwitcherPromptPill";
35065
35128
  var StyledViewSwitcherAction = styled__default["default"].button.withConfig({
35066
35129
  displayName: "Styles__StyledViewSwitcherAction",
35067
- componentId: "sc-1cg2mte-12"
35130
+ componentId: "sc-1cg2mte-14"
35068
35131
  })(["", " display:inline-flex;align-items:center;gap:4px;height:26px;margin:0;padding:0 2px 0 6px;border:0;border-radius:var(--ac-br-rounded);background-color:transparent;color:inherit;font:inherit;cursor:pointer;outline:none;svg{flex-shrink:0;width:16px;height:16px;fill:currentColor;}&:hover{color:var(--color-theme-900);}&:focus-visible{box-shadow:inset 0 0 0 2px var(--color-primary);}"], BoxSizingStyle);
35069
35132
  StyledViewSwitcherAction.displayName = "StyledViewSwitcherAction";
35070
35133
  var StyledViewSwitcherLine = styled__default["default"].i.withConfig({
35071
35134
  displayName: "Styles__StyledViewSwitcherLine",
35072
- componentId: "sc-1cg2mte-13"
35135
+ componentId: "sc-1cg2mte-15"
35073
35136
  })(["flex-shrink:0;width:1px;height:14px;margin:0 1px 0 6px;background-color:color-mix(in srgb,var(--color-primary) 35%,transparent);"]);
35074
35137
  StyledViewSwitcherLine.displayName = "StyledViewSwitcherLine";
35075
35138
  var StyledViewSwitcherDismiss = styled__default["default"].button.withConfig({
35076
35139
  displayName: "Styles__StyledViewSwitcherDismiss",
35077
- componentId: "sc-1cg2mte-14"
35140
+ componentId: "sc-1cg2mte-16"
35078
35141
  })(["", " display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:22px;height:22px;margin:0 2px 0 0;padding:0;border:0;border-radius:50%;background-color:transparent;cursor:pointer;outline:none;transition:background-color 150ms ease;svg{width:16px;height:16px;margin-left:-1px;fill:var(--color-theme-700);}&:hover{background-color:color-mix( in srgb,var(--color-theme-900) 16%,transparent );}&:focus-visible{box-shadow:inset 0 0 0 2px var(--color-primary);}"], BoxSizingStyle);
35079
35142
  StyledViewSwitcherDismiss.displayName = "StyledViewSwitcherDismiss";
35080
35143
  var StyledViewSwitcherApplied = styled__default["default"].span.withConfig({
35081
35144
  displayName: "Styles__StyledViewSwitcherApplied",
35082
- componentId: "sc-1cg2mte-15"
35145
+ componentId: "sc-1cg2mte-17"
35083
35146
  })(["position:absolute;inset:0;display:inline-flex;align-items:center;justify-content:center;gap:4px;animation:", " ", "ms ", " 60ms backwards;svg{width:16px;height:16px;fill:currentColor;animation:", " 250ms ease-out 60ms backwards;}@media (prefers-reduced-motion:reduce){animation:none;svg{animation:none;}}"], appliedIn, APPLIED_SWAP_MS, PROMPT_EASE, appliedIcon);
35084
35147
  StyledViewSwitcherApplied.displayName = "StyledViewSwitcherApplied";
35085
35148
 
35086
- var _excluded$13 = ["views", "value", "onChange", "aria-label", "onApplyToAll", "applyToAllLabel", "applyToAllTitle", "offerTitle", "dismissLabel", "appliedLabel", "className", "onKeyDown", "onBlur"];
35149
+ var _excluded$13 = ["views", "value", "onChange", "aria-label", "onApplyToAll", "applyToAllLabel", "applyToAllTitle", "offerTitle", "dismissLabel", "appliedLabel", "offerKey", "className", "onKeyDown", "onBlur"];
35087
35150
  /**
35088
35151
  * @component ViewSwitcher
35089
35152
  * @description
@@ -35120,6 +35183,7 @@
35120
35183
  dismissLabel = _ref$dismissLabel === void 0 ? "Dismiss" : _ref$dismissLabel,
35121
35184
  _ref$appliedLabel = _ref.appliedLabel,
35122
35185
  appliedLabel = _ref$appliedLabel === void 0 ? "Applied" : _ref$appliedLabel,
35186
+ offerKey = _ref.offerKey,
35123
35187
  className = _ref.className,
35124
35188
  onKeyDown = _ref.onKeyDown,
35125
35189
  onBlur = _ref.onBlur,
@@ -35176,6 +35240,16 @@
35176
35240
  setOfferId(id);
35177
35241
  }
35178
35242
  }, [onApplyToAll, onChange, value]);
35243
+ var seenOfferKeyRef = React.useRef(offerKey);
35244
+ React.useEffect(function () {
35245
+ if (seenOfferKeyRef.current === offerKey) {
35246
+ return;
35247
+ }
35248
+ seenOfferKeyRef.current = offerKey;
35249
+ if (value) {
35250
+ select(value);
35251
+ }
35252
+ }, [offerKey, select, value]);
35179
35253
  var isInside = function isInside(node) {
35180
35254
  var _rootRef$current;
35181
35255
  return Boolean(node && ((_rootRef$current = rootRef.current) === null || _rootRef$current === void 0 ? void 0 : _rootRef$current.contains(node)));
@@ -35371,7 +35445,7 @@
35371
35445
  });
35372
35446
  ViewSwitcher.displayName = "ViewSwitcher";
35373
35447
 
35374
- var _excluded$12 = ["options", "value", "onChange", "aria-label", "className"];
35448
+ var _excluded$12 = ["options", "value", "onChange", "aria-label", "animateIn", "leaving", "className"];
35375
35449
  /**
35376
35450
  * @component ViewSwitcherMenu
35377
35451
  * @description
@@ -35396,6 +35470,10 @@
35396
35470
  value = _ref.value,
35397
35471
  onChange = _ref.onChange,
35398
35472
  ariaLabel = _ref["aria-label"],
35473
+ _ref$animateIn = _ref.animateIn,
35474
+ animateIn = _ref$animateIn === void 0 ? false : _ref$animateIn,
35475
+ _ref$leaving = _ref.leaving,
35476
+ leaving = _ref$leaving === void 0 ? false : _ref$leaving,
35399
35477
  className = _ref.className,
35400
35478
  rest = _objectWithoutProperties(_ref, _excluded$12);
35401
35479
  var _useState = React.useState(false),
@@ -35406,10 +35484,14 @@
35406
35484
  var id = _ref2.id;
35407
35485
  return id === value;
35408
35486
  })) !== null && _options$find !== void 0 ? _options$find : options[0];
35409
- return /*#__PURE__*/React__default["default"].createElement(StyledViewSwitcher, _extends({
35487
+ return /*#__PURE__*/React__default["default"].createElement(StyledViewSwitcherMenuRoot, _extends({
35410
35488
  ref: ref,
35489
+ "data-animate-in": animateIn || undefined,
35490
+ "data-leaving": leaving || undefined,
35411
35491
  className: classnames__default["default"]("c-view-switcher-menu", className)
35412
- }, rest), /*#__PURE__*/React__default["default"].createElement(Menu, {
35492
+ }, rest), /*#__PURE__*/React__default["default"].createElement(StyledViewSwitcherMenuClip, {
35493
+ className: "c-view-switcher-menu__clip"
35494
+ }, /*#__PURE__*/React__default["default"].createElement(Menu, {
35413
35495
  open: open,
35414
35496
  onOpen: function onOpen() {
35415
35497
  return setOpen(true);
@@ -35457,7 +35539,7 @@
35457
35539
  }, icon ? /*#__PURE__*/React__default["default"].createElement(StyledViewSwitcherMenuIcon, null, icon) : null, /*#__PURE__*/React__default["default"].createElement(StyledViewSwitcherMenuLabel, {
35458
35540
  "data-selected": id === (selected === null || selected === void 0 ? void 0 : selected.id)
35459
35541
  }, label));
35460
- }))));
35542
+ })))));
35461
35543
  });
35462
35544
  ViewSwitcherMenu.displayName = "ViewSwitcherMenu";
35463
35545