@activecollab/components 2.0.574 → 2.0.576
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/dist/cjs/components/MainMenu/MainMenu.js +44 -40
- package/dist/cjs/components/MainMenu/MainMenu.js.map +1 -1
- package/dist/cjs/components/MainMenu/MainMenuSettings.js +112 -0
- package/dist/cjs/components/MainMenu/MainMenuSettings.js.map +1 -0
- package/dist/cjs/components/MainMenu/Styles.js +8 -3
- package/dist/cjs/components/MainMenu/Styles.js.map +1 -1
- package/dist/cjs/components/MainMenu/hooks.js +1 -9
- package/dist/cjs/components/MainMenu/hooks.js.map +1 -1
- package/dist/cjs/components/MainMenu/types.js +4 -2
- package/dist/cjs/components/MainMenu/types.js.map +1 -1
- package/dist/cjs/components/Popper/Popper.js +14 -0
- package/dist/cjs/components/Popper/Popper.js.map +1 -1
- package/dist/cjs/components/Popper/anchorMove.js +42 -0
- package/dist/cjs/components/Popper/anchorMove.js.map +1 -0
- package/dist/cjs/components/ScrollArea/ScrollArea.js +5 -3
- package/dist/cjs/components/ScrollArea/ScrollArea.js.map +1 -1
- package/dist/cjs/components/ViewSettings/Styles.js +26 -0
- package/dist/cjs/components/ViewSettings/Styles.js.map +1 -0
- package/dist/cjs/components/ViewSettings/ViewSettings.js +96 -0
- package/dist/cjs/components/ViewSettings/ViewSettings.js.map +1 -0
- package/dist/cjs/components/ViewSettings/index.js +17 -0
- package/dist/cjs/components/ViewSettings/index.js.map +1 -0
- package/dist/cjs/components/ViewSwitcher/ApplyToAllTab.js +199 -0
- package/dist/cjs/components/ViewSwitcher/ApplyToAllTab.js.map +1 -0
- package/dist/cjs/components/ViewSwitcher/Styles.js +73 -61
- package/dist/cjs/components/ViewSwitcher/Styles.js.map +1 -1
- package/dist/cjs/components/ViewSwitcher/{ViewSwitcherMenu.js → SubViewSwitcher.js} +70 -22
- package/dist/cjs/components/ViewSwitcher/SubViewSwitcher.js.map +1 -0
- package/dist/cjs/components/ViewSwitcher/ViewSwitcher.js +46 -184
- package/dist/cjs/components/ViewSwitcher/ViewSwitcher.js.map +1 -1
- package/dist/cjs/components/ViewSwitcher/index.js +4 -4
- package/dist/cjs/components/ViewSwitcher/index.js.map +1 -1
- package/dist/cjs/components/ViewSwitcher/useApplyToAllOffer.js +179 -0
- package/dist/cjs/components/ViewSwitcher/useApplyToAllOffer.js.map +1 -0
- package/dist/cjs/components/index.js +12 -0
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/presentation/shared/ActivityFeed.js +1 -2
- package/dist/cjs/presentation/shared/ActivityFeed.js.map +1 -1
- package/dist/esm/components/MainMenu/MainMenu.d.ts +6 -4
- package/dist/esm/components/MainMenu/MainMenu.d.ts.map +1 -1
- package/dist/esm/components/MainMenu/MainMenu.js +39 -40
- package/dist/esm/components/MainMenu/MainMenu.js.map +1 -1
- package/dist/esm/components/MainMenu/MainMenuSettings.d.ts +14 -0
- package/dist/esm/components/MainMenu/MainMenuSettings.d.ts.map +1 -0
- package/dist/esm/components/MainMenu/MainMenuSettings.js +84 -0
- package/dist/esm/components/MainMenu/MainMenuSettings.js.map +1 -0
- package/dist/esm/components/MainMenu/Styles.d.ts +11 -0
- package/dist/esm/components/MainMenu/Styles.d.ts.map +1 -1
- package/dist/esm/components/MainMenu/Styles.js +7 -2
- package/dist/esm/components/MainMenu/Styles.js.map +1 -1
- package/dist/esm/components/MainMenu/hooks.d.ts.map +1 -1
- package/dist/esm/components/MainMenu/hooks.js +1 -8
- package/dist/esm/components/MainMenu/hooks.js.map +1 -1
- package/dist/esm/components/MainMenu/types.d.ts +4 -2
- package/dist/esm/components/MainMenu/types.d.ts.map +1 -1
- package/dist/esm/components/MainMenu/types.js +4 -2
- package/dist/esm/components/MainMenu/types.js.map +1 -1
- package/dist/esm/components/Popper/Popper.d.ts.map +1 -1
- package/dist/esm/components/Popper/Popper.js +12 -0
- package/dist/esm/components/Popper/Popper.js.map +1 -1
- package/dist/esm/components/Popper/anchorMove.d.ts +4 -0
- package/dist/esm/components/Popper/anchorMove.d.ts.map +1 -0
- package/dist/esm/components/Popper/anchorMove.js +33 -0
- package/dist/esm/components/Popper/anchorMove.js.map +1 -0
- package/dist/esm/components/ScrollArea/ScrollArea.d.ts +2 -0
- package/dist/esm/components/ScrollArea/ScrollArea.d.ts.map +1 -1
- package/dist/esm/components/ScrollArea/ScrollArea.js +5 -3
- package/dist/esm/components/ScrollArea/ScrollArea.js.map +1 -1
- package/dist/esm/components/ViewSettings/Styles.d.ts +4 -0
- package/dist/esm/components/ViewSettings/Styles.d.ts.map +1 -0
- package/dist/esm/components/ViewSettings/Styles.js +20 -0
- package/dist/esm/components/ViewSettings/Styles.js.map +1 -0
- package/dist/esm/components/ViewSettings/ViewSettings.d.ts +20 -0
- package/dist/esm/components/ViewSettings/ViewSettings.d.ts.map +1 -0
- package/dist/esm/components/ViewSettings/ViewSettings.js +87 -0
- package/dist/esm/components/ViewSettings/ViewSettings.js.map +1 -0
- package/dist/esm/components/ViewSettings/index.d.ts +2 -0
- package/dist/esm/components/ViewSettings/index.d.ts.map +1 -0
- package/dist/esm/components/ViewSettings/index.js +2 -0
- package/dist/esm/components/ViewSettings/index.js.map +1 -0
- package/dist/esm/components/ViewSwitcher/ApplyToAllTab.d.ts +24 -0
- package/dist/esm/components/ViewSwitcher/ApplyToAllTab.d.ts.map +1 -0
- package/dist/esm/components/ViewSwitcher/ApplyToAllTab.js +179 -0
- package/dist/esm/components/ViewSwitcher/ApplyToAllTab.js.map +1 -0
- package/dist/esm/components/ViewSwitcher/Styles.d.ts +15 -15
- package/dist/esm/components/ViewSwitcher/Styles.d.ts.map +1 -1
- package/dist/esm/components/ViewSwitcher/Styles.js +72 -60
- package/dist/esm/components/ViewSwitcher/Styles.js.map +1 -1
- package/dist/esm/components/ViewSwitcher/SubViewSwitcher.d.ts +50 -0
- package/dist/esm/components/ViewSwitcher/SubViewSwitcher.d.ts.map +1 -0
- package/dist/esm/components/ViewSwitcher/SubViewSwitcher.js +149 -0
- package/dist/esm/components/ViewSwitcher/SubViewSwitcher.js.map +1 -0
- package/dist/esm/components/ViewSwitcher/ViewSwitcher.d.ts +8 -8
- package/dist/esm/components/ViewSwitcher/ViewSwitcher.d.ts.map +1 -1
- package/dist/esm/components/ViewSwitcher/ViewSwitcher.js +48 -163
- package/dist/esm/components/ViewSwitcher/ViewSwitcher.js.map +1 -1
- package/dist/esm/components/ViewSwitcher/index.d.ts +1 -1
- package/dist/esm/components/ViewSwitcher/index.d.ts.map +1 -1
- package/dist/esm/components/ViewSwitcher/index.js +1 -1
- package/dist/esm/components/ViewSwitcher/index.js.map +1 -1
- package/dist/esm/components/ViewSwitcher/useApplyToAllOffer.d.ts +27 -0
- package/dist/esm/components/ViewSwitcher/useApplyToAllOffer.d.ts.map +1 -0
- package/dist/esm/components/ViewSwitcher/useApplyToAllOffer.js +159 -0
- package/dist/esm/components/ViewSwitcher/useApplyToAllOffer.js.map +1 -0
- package/dist/esm/components/index.d.ts +1 -0
- package/dist/esm/components/index.d.ts.map +1 -1
- package/dist/esm/components/index.js +1 -0
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/presentation/shared/ActivityFeed.d.ts.map +1 -1
- package/dist/esm/presentation/shared/ActivityFeed.js +1 -2
- package/dist/esm/presentation/shared/ActivityFeed.js.map +1 -1
- package/dist/index.js +1679 -1174
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +1 -1
- package/dist/cjs/components/ViewSwitcher/ViewSwitcherMenu.js.map +0 -1
- package/dist/esm/components/ViewSwitcher/ViewSwitcherMenu.d.ts +0 -39
- package/dist/esm/components/ViewSwitcher/ViewSwitcherMenu.d.ts.map +0 -1
- package/dist/esm/components/ViewSwitcher/ViewSwitcherMenu.js +0 -101
- package/dist/esm/components/ViewSwitcher/ViewSwitcherMenu.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MainMenu.js","names":["React","useCallback","useEffect","useRef","useState","classnames","useControllable","useDialogOpen","useHasOpenPopup","useMainMenuData","useMediaQuery","useOpenMenuPointer","usePeekHold","usePointerInside","MainMenuEditor","MainMenuHelp","MainMenuItems","MainMenuLogo","COLLAPSED_WIDTH","MainMenuGlobalStyle","NARROW_SCREEN","StyledMainMenu","layers","useResizeObserver","IconButton","CollapsIcon","SettingsIcon","Tooltip","PEEK_CLOSED","PEEK_OPENING","PEEK_EXPANDING","PEEK_OPEN","PEEK_CLOSING","PEEK_ANIMATION_FALLBACK_MS","settlePeek","current","MainMenu","_ref","items","_ref$hiddenItems","hiddenItems","currentItem","_ref$favorites","favorites","currentFavorite","_favoritesExpanded","favoritesExpanded","_defaultFavoritesExpanded","defaultFavoritesExpanded","_onFavoritesExpandedChange","onFavoritesExpandedChange","shortcuts","_shortcutsExpanded","shortcutsExpanded","_defaultShortcutsExpanded","defaultShortcutsExpanded","_onShortcutsExpandedChange","onShortcutsExpandedChange","onAddShortcut","_ref$helpEntries","helpEntries","helpBadge","helpCurrent","helpPromo","helpId","beforeHelp","showMoreId","renderEditor","_editMode","editMode","_defaultEditMode","defaultEditMode","_onEditModeChange","onEditModeChange","onSaveEdit","_ref$homeHref","homeHref","onNavigate","_ref$touch","touch","_labels","labels","collapsedProp","collapsed","_ref$defaultCollapsed","defaultCollapsed","onCollapsedChange","_ref$autoExpand","autoExpand","navigationKey","className","style","rest","_objectWithoutPropertiesLoose","_excluded","data","_useControllable","setCollapsed","rootRef","socketRef","_useState","hasKeyboardFocus","setHasKeyboardFocus","_useState2","peek","setPeek","_useState3","isDismissed","setIsDismissed","isNarrowScreen","socketSize","_usePeekHold","isPeekHeld","setIsPeekHeld","canPeek","_usePointerInside","isHovered","setPointerInside","hasOpenPopup","wantsPeek","dismissPeek","lastNavigationKey","handleOpenMenuPointer","inside","undefined","frame","requestAnimationFrame","cancelAnimationFrame","timer","setTimeout","clearTimeout","isPeeking","isPeekOpen","looksCollapsed","showEditor","width","handleFocus","event","target","matches","handleBlur","currentTarget","contains","relatedTarget","handleTransitionEnd","propertyName","handleToggleCollapsed","shared","narrow","mobile","createElement","_extends","ref","expanded","zIndex","skyscraper","onFocus","onBlur","onTransitionEnd","href","onClick","title","customizeMenu","editButtonRef","variant","enterEditMode","size","height","exitEditMode","onSave","onExit","favoritesInPopover","setFavoritesExpanded","setShortcutsExpanded","showSectionHeader","label","helpAndSupport","entries","badge","promo","id","type","expand","collapse","displayName"],"sources":["../../../../src/components/MainMenu/MainMenu.tsx"],"sourcesContent":["import React, {\n FocusEvent,\n HTMLAttributes,\n ReactElement,\n TransitionEvent,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from \"react\";\n\nimport classnames from \"classnames\";\n\nimport {\n useControllable,\n useDialogOpen,\n useHasOpenPopup,\n useMainMenuData,\n useMediaQuery,\n useOpenMenuPointer,\n usePeekHold,\n usePointerInside,\n} from \"./hooks\";\nimport { MainMenuEditor } from \"./MainMenuEditor\";\nimport { MainMenuHelp } from \"./MainMenuHelp\";\nimport { MainMenuItems } from \"./MainMenuItems\";\nimport { MainMenuLogo } from \"./MainMenuLogo\";\nimport {\n COLLAPSED_WIDTH,\n MainMenuGlobalStyle,\n NARROW_SCREEN,\n StyledMainMenu,\n} from \"./Styles\";\nimport { IMainMenuDataProps } from \"./types\";\nimport { layers, useResizeObserver } from \"../../utils\";\nimport { IconButton } from \"../IconButton\";\nimport { CollapsIcon, SettingsIcon } from \"../Icons\";\nimport { Tooltip } from \"../Tooltip\";\n\nconst PEEK_CLOSED = \"closed\";\nconst PEEK_OPENING = \"opening\";\nconst PEEK_EXPANDING = \"expanding\";\nconst PEEK_OPEN = \"open\";\nconst PEEK_CLOSING = \"closing\";\nconst PEEK_ANIMATION_FALLBACK_MS = 400;\n\ntype Peek =\n | typeof PEEK_CLOSED\n | typeof PEEK_OPENING\n | typeof PEEK_EXPANDING\n | typeof PEEK_OPEN\n | typeof PEEK_CLOSING;\n\nconst settlePeek = (current: Peek): Peek => {\n if (current === PEEK_EXPANDING) {\n return PEEK_OPEN;\n }\n\n return current === PEEK_CLOSING ? PEEK_CLOSED : current;\n};\n\nexport interface IMainMenuProps\n extends IMainMenuDataProps,\n Omit<HTMLAttributes<HTMLDivElement>, \"onChange\"> {\n /** The compact menu, 72px wide. Uncontrolled when not set. */\n collapsed?: boolean;\n defaultCollapsed?: boolean;\n /** The collapse handle on the left edge of the header. */\n onCollapsedChange?: (collapsed: boolean) => void;\n /** Auto-Expand Compact Main Menu: a hover over the compact menu opens it over the page. */\n autoExpand?: boolean;\n /** A new value tells that the app navigated, and the auto-expanded menu closes. */\n navigationKey?: string;\n}\n\n/**\n * The main menu at the left edge of the app (the frontend `MainMenu.js`): the logo with the collapse handle and\n * Customize Menu, the items with the favorite projects and the shortcuts, the editor in place of the items, and\n * Help & Support at the bottom. Under 1280px it is compact, and under 640px it hides, so the app shows\n * `MainMenuDrawer` instead.\n */\nexport const MainMenu = ({\n items,\n hiddenItems = [],\n currentItem,\n favorites = [],\n currentFavorite,\n favoritesExpanded: _favoritesExpanded,\n defaultFavoritesExpanded: _defaultFavoritesExpanded,\n onFavoritesExpandedChange: _onFavoritesExpandedChange,\n shortcuts,\n shortcutsExpanded: _shortcutsExpanded,\n defaultShortcutsExpanded: _defaultShortcutsExpanded,\n onShortcutsExpandedChange: _onShortcutsExpandedChange,\n onAddShortcut,\n helpEntries = [],\n helpBadge,\n helpCurrent,\n helpPromo,\n helpId,\n beforeHelp,\n showMoreId,\n renderEditor,\n editMode: _editMode,\n defaultEditMode: _defaultEditMode,\n onEditModeChange: _onEditModeChange,\n onSaveEdit,\n homeHref = \"#\",\n onNavigate,\n touch = false,\n labels: _labels,\n collapsed: collapsedProp,\n defaultCollapsed = false,\n onCollapsedChange,\n autoExpand = false,\n navigationKey,\n className,\n style,\n ...rest\n}: IMainMenuProps): ReactElement => {\n const data = useMainMenuData({\n items,\n favoritesExpanded: _favoritesExpanded,\n defaultFavoritesExpanded: _defaultFavoritesExpanded,\n onFavoritesExpandedChange: _onFavoritesExpandedChange,\n shortcutsExpanded: _shortcutsExpanded,\n defaultShortcutsExpanded: _defaultShortcutsExpanded,\n onShortcutsExpandedChange: _onShortcutsExpandedChange,\n editMode: _editMode,\n defaultEditMode: _defaultEditMode,\n onEditModeChange: _onEditModeChange,\n labels: _labels,\n });\n const { labels, editMode } = data;\n const [collapsed, setCollapsed] = useControllable(\n collapsedProp,\n defaultCollapsed,\n onCollapsedChange\n );\n const rootRef = useRef<HTMLDivElement>(null);\n const socketRef = useRef<HTMLDivElement>(null);\n const [hasKeyboardFocus, setHasKeyboardFocus] = useState(false);\n const [peek, setPeek] = useState<Peek>(PEEK_CLOSED);\n const [isDismissed, setIsDismissed] = useState(false);\n const isNarrowScreen = useMediaQuery(NARROW_SCREEN);\n const socketSize = useResizeObserver(socketRef);\n\n // Under the xl breakpoint the styles force the compact look, so the menu peeks only above it.\n const [isPeekHeld, setIsPeekHeld] = usePeekHold(rootRef);\n const canPeek = collapsed && !isNarrowScreen && autoExpand && !isPeekHeld;\n const [isHovered, setPointerInside] = usePointerInside(rootRef, canPeek);\n const hasOpenPopup = useHasOpenPopup(\n rootRef,\n canPeek && peek !== PEEK_CLOSED\n );\n const wantsPeek =\n canPeek &&\n (editMode ||\n (!isDismissed && (isHovered || hasKeyboardFocus || hasOpenPopup)));\n\n const dismissPeek = useCallback(() => {\n setIsDismissed(true);\n setHasKeyboardFocus(false);\n }, []);\n\n // The pointer is still over the menu after a click, so only a leave brings the peek back.\n useEffect(() => {\n if (!isHovered && isDismissed) {\n setIsDismissed(false);\n }\n }, [isHovered, isDismissed]);\n\n useDialogOpen(canPeek && peek !== PEEK_CLOSED, dismissPeek);\n\n const lastNavigationKey = useRef(navigationKey);\n\n useEffect(() => {\n if (navigationKey !== lastNavigationKey.current) {\n lastNavigationKey.current = navigationKey;\n dismissPeek();\n }\n }, [navigationKey, dismissPeek]);\n\n const handleOpenMenuPointer = useCallback(\n (inside: boolean) => {\n setPointerInside(inside);\n\n if (!inside) {\n setHasKeyboardFocus(false);\n }\n },\n [setPointerInside]\n );\n\n useOpenMenuPointer(rootRef, peek === PEEK_OPEN, handleOpenMenuPointer);\n\n // A running animation always ends first. Then this effect reads the pointer again.\n useEffect(() => {\n if (!canPeek) {\n setPeek(PEEK_CLOSED);\n } else if (wantsPeek && peek === PEEK_CLOSED) {\n setPeek(PEEK_OPENING);\n } else if (!wantsPeek && peek === PEEK_OPEN) {\n setPeek(PEEK_CLOSING);\n }\n }, [canPeek, wantsPeek, peek]);\n\n // The panel first lays out with its closed clip, so the clip transition has a start to run from.\n useEffect(() => {\n if (peek !== PEEK_OPENING) {\n return undefined;\n }\n\n const frame = requestAnimationFrame(() =>\n setPeek((current) =>\n current === PEEK_OPENING ? PEEK_EXPANDING : current\n )\n );\n\n return () => cancelAnimationFrame(frame);\n }, [peek]);\n\n // A transition that does not run sends no transitionend, so the animation also ends on a timer.\n useEffect(() => {\n if (peek !== PEEK_EXPANDING && peek !== PEEK_CLOSING) {\n return undefined;\n }\n\n const timer = setTimeout(\n () => setPeek(settlePeek),\n PEEK_ANIMATION_FALLBACK_MS\n );\n\n return () => clearTimeout(timer);\n }, [peek]);\n\n const isPeeking = peek !== PEEK_CLOSED;\n const isPeekOpen = peek === PEEK_EXPANDING || peek === PEEK_OPEN;\n const looksCollapsed = collapsed && !isPeekOpen;\n // The editor needs the width of the expanded menu.\n const showEditor =\n editMode && (socketSize ? socketSize.width > COLLAPSED_WIDTH : true);\n\n const handleFocus = useCallback((event: FocusEvent<HTMLDivElement>) => {\n if (event.target.matches?.(\":focus-visible\")) {\n setHasKeyboardFocus(true);\n }\n }, []);\n\n const handleBlur = useCallback((event: FocusEvent<HTMLDivElement>) => {\n if (!event.currentTarget.contains(event.relatedTarget as Node)) {\n setHasKeyboardFocus(false);\n }\n }, []);\n\n const handleTransitionEnd = useCallback(\n (event: TransitionEvent<HTMLDivElement>) => {\n if (\n event.target === event.currentTarget &&\n event.propertyName === \"clip-path\"\n ) {\n setPeek(settlePeek);\n }\n },\n []\n );\n\n const handleToggleCollapsed = () => {\n setIsPeekHeld(!collapsed);\n setCollapsed(!collapsed);\n };\n\n const shared = {\n collapsed: looksCollapsed,\n narrow: isNarrowScreen,\n mobile: false,\n onNavigate,\n };\n\n return (\n <StyledMainMenu\n ref={rootRef}\n {...rest}\n className={classnames(\"c-main-menu c-main-menu--desktop\", className, {\n collapsed: looksCollapsed,\n expanded: !looksCollapsed,\n touch,\n \"main-menu-can-peek\": canPeek,\n \"main-menu-peek\": isPeeking,\n \"main-menu-peek-open\": isPeekOpen,\n })}\n style={{ zIndex: layers.skyscraper, ...style }}\n data-testid=\"main-menu\"\n onFocus={canPeek ? handleFocus : undefined}\n onBlur={canPeek ? handleBlur : undefined}\n >\n <MainMenuGlobalStyle />\n <div\n className=\"main-menu-panel\"\n data-testid=\"main-menu-panel\"\n onTransitionEnd={handleTransitionEnd}\n >\n <div className=\"main-menu-header\">\n <a href={homeHref} className=\"main-logo-url\" onClick={onNavigate}>\n <MainMenuLogo\n className={classnames(\"main-logo-long\", {\n \"main-logo-long__collapsed\": looksCollapsed,\n })}\n />\n </a>\n {!looksCollapsed && !editMode ? (\n <Tooltip title={labels.customizeMenu}>\n <IconButton\n ref={data.editButtonRef}\n variant=\"text gray\"\n onClick={data.enterEditMode}\n aria-label={labels.customizeMenu}\n className=\"main-menu-edit-button\"\n size=\"small\"\n >\n <SettingsIcon width={20} height={20} />\n </IconButton>\n </Tooltip>\n ) : null}\n </div>\n <div ref={socketRef} className=\"main-menu-socket\">\n {showEditor && renderEditor ? (\n renderEditor(data.exitEditMode)\n ) : showEditor ? (\n <MainMenuEditor\n items={items}\n hiddenItems={hiddenItems}\n shortcuts={shortcuts}\n labels={labels}\n onSave={onSaveEdit}\n onExit={data.exitEditMode}\n />\n ) : (\n <MainMenuItems\n {...shared}\n items={items}\n hiddenItems={hiddenItems}\n currentItem={currentItem}\n favorites={favorites}\n currentFavorite={currentFavorite}\n favoritesExpanded={data.favoritesExpanded}\n favoritesInPopover={collapsed}\n onFavoritesExpandedChange={data.setFavoritesExpanded}\n shortcuts={shortcuts}\n shortcutsExpanded={data.shortcutsExpanded}\n onShortcutsExpandedChange={data.setShortcutsExpanded}\n onAddShortcut={onAddShortcut}\n showSectionHeader={false}\n showMoreId={showMoreId}\n labels={labels}\n />\n )}\n </div>\n {beforeHelp}\n <MainMenuHelp\n {...shared}\n label={labels.helpAndSupport}\n entries={helpEntries}\n badge={helpBadge}\n current={helpCurrent}\n promo={helpPromo}\n id={helpId}\n />\n </div>\n <button\n type=\"button\"\n className={classnames(\"main-menu-collapse-tab\", {\n \"is-collapsed\": collapsed,\n })}\n aria-label={collapsed ? labels.expand : labels.collapse}\n aria-expanded={!collapsed}\n onClick={handleToggleCollapsed}\n >\n <span className=\"main-menu-collapse-tab-face\">\n <CollapsIcon className=\"main-menu-collapse-tab-icon\" />\n <span className=\"main-menu-collapse-tab-label\">\n {collapsed ? labels.expand : labels.collapse}\n </span>\n </span>\n </button>\n </StyledMainMenu>\n );\n};\n\nMainMenu.displayName = \"MainMenu\";\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAKVC,WAAW,EACXC,SAAS,EACTC,MAAM,EACNC,QAAQ,QACH,OAAO;AAEd,OAAOC,UAAU,MAAM,YAAY;AAEnC,SACEC,eAAe,EACfC,aAAa,EACbC,eAAe,EACfC,eAAe,EACfC,aAAa,EACbC,kBAAkB,EAClBC,WAAW,EACXC,gBAAgB,QACX,SAAS;AAChB,SAASC,cAAc,QAAQ,kBAAkB;AACjD,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,aAAa,QAAQ,iBAAiB;AAC/C,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SACEC,eAAe,EACfC,mBAAmB,EACnBC,aAAa,EACbC,cAAc,QACT,UAAU;AAEjB,SAASC,MAAM,EAAEC,iBAAiB,QAAQ,aAAa;AACvD,SAASC,UAAU,QAAQ,eAAe;AAC1C,SAASC,WAAW,EAAEC,YAAY,QAAQ,UAAU;AACpD,SAAS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ACXjE,KAAA,CAAAsJ,aAAA,CAACvI,YAAY,EAAAwI,QAAA,KACPJ,MAAM;IACV4B,KAAK,EAAE9F,MAAM,CAAC+F,cAAe;IAC7BC,OAAO,EAAErH,WAAY;IACrBsH,KAAK,EAAErH,SAAU;IACjB1B,OAAO,EAAE2B,WAAY;IACrBqH,KAAK,EAAEpH,SAAU;IACjBqH,EAAE,EAAEpH;EAAO,EACZ,CACE,CAAC,eACNhE,KAAA,CAAAsJ,aAAA;IACE+B,IAAI,EAAC,QAAQ;IACb3F,SAAS,EAAErF,UAAU,CAAC,wBAAwB,EAAE;MAC9C,cAAc,EAAE8E;IAClB,CAAC,CAAE;IACH,cAAYA,SAAS,GAAGF,MAAM,CAACqG,MAAM,GAAGrG,MAAM,CAACsG,QAAS;IACxD,iBAAe,CAACpG,SAAU;IAC1B6E,OAAO,EAAEd;EAAsB,gBAE/BlJ,KAAA,CAAAsJ,aAAA;IAAM5D,SAAS,EAAC;EAA6B,gBAC3C1F,KAAA,CAAAsJ,aAAA,CAAC7H,WAAW;IAACiE,SAAS,EAAC;EAA6B,CAAE,CAAC,eACvD1F,KAAA,CAAAsJ,aAAA;IAAM5D,SAAS,EAAC;EAA8B,GAC3CP,SAAS,GAAGF,MAAM,CAACqG,MAAM,GAAGrG,MAAM,CAACsG,QAChC,CACF,CACA,CACM,CAAC;AAErB,CAAC;AAEDnJ,QAAQ,CAACoJ,WAAW,GAAG,UAAU","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"MainMenu.js","names":["React","useCallback","useEffect","useRef","useState","classnames","useControllable","useDialogOpen","useHasOpenPopup","useMainMenuData","useMediaQuery","useOpenMenuPointer","usePeekHold","usePointerInside","MainMenuEditor","MainMenuHelp","MainMenuItems","MainMenuLogo","MainMenuSettings","COLLAPSED_WIDTH","MainMenuGlobalStyle","NARROW_SCREEN","StyledMainMenu","layers","useResizeObserver","PEEK_CLOSED","PEEK_OPENING","PEEK_EXPANDING","PEEK_OPEN","PEEK_CLOSING","PEEK_ANIMATION_FALLBACK_MS","settlePeek","current","MainMenu","_ref","items","_ref$hiddenItems","hiddenItems","currentItem","_ref$favorites","favorites","currentFavorite","_favoritesExpanded","favoritesExpanded","_defaultFavoritesExpanded","defaultFavoritesExpanded","_onFavoritesExpandedChange","onFavoritesExpandedChange","shortcuts","_shortcutsExpanded","shortcutsExpanded","_defaultShortcutsExpanded","defaultShortcutsExpanded","_onShortcutsExpandedChange","onShortcutsExpandedChange","onAddShortcut","_ref$helpEntries","helpEntries","helpBadge","helpCurrent","helpPromo","helpId","beforeHelp","showMoreId","renderEditor","_editMode","editMode","_defaultEditMode","defaultEditMode","_onEditModeChange","onEditModeChange","onSaveEdit","_ref$homeHref","homeHref","onNavigate","_ref$touch","touch","_labels","labels","collapsedProp","collapsed","_ref$defaultCollapsed","defaultCollapsed","onCollapsedChange","_ref$autoExpand","autoExpand","onAutoExpandChange","navigationKey","className","style","rest","_objectWithoutPropertiesLoose","_excluded","data","_useControllable","setCollapsed","rootRef","socketRef","_useState","hasKeyboardFocus","setHasKeyboardFocus","_useState2","peek","setPeek","_useState3","isDismissed","setIsDismissed","_useState4","isWidening","setIsWidening","isNarrowScreen","socketSize","_usePeekHold","isPeekHeld","setIsPeekHeld","canPeek","_usePointerInside","isHovered","setPointerInside","hasOpenPopup","wantsPeek","dismissPeek","lastNavigationKey","handleOpenMenuPointer","inside","undefined","frame","requestAnimationFrame","cancelAnimationFrame","timer","setTimeout","clearTimeout","isPeeking","isPeekOpen","looksCollapsed","showEditor","width","handleFocus","event","target","matches","handleBlur","currentTarget","contains","relatedTarget","handleTransitionEnd","propertyName","handleCollapsedChange","next","shared","narrow","mobile","createElement","_extends","ref","expanded","zIndex","skyscraper","onFocus","onBlur","onTransitionEnd","href","onClick","onCustomize","enterEditMode","buttonRef","editButtonRef","exitEditMode","onSave","onExit","favoritesInPopover","setFavoritesExpanded","setShortcutsExpanded","showSectionHeader","label","helpAndSupport","entries","badge","promo","id","displayName"],"sources":["../../../../src/components/MainMenu/MainMenu.tsx"],"sourcesContent":["import React, {\n FocusEvent,\n HTMLAttributes,\n ReactElement,\n TransitionEvent,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from \"react\";\n\nimport classnames from \"classnames\";\n\nimport {\n useControllable,\n useDialogOpen,\n useHasOpenPopup,\n useMainMenuData,\n useMediaQuery,\n useOpenMenuPointer,\n usePeekHold,\n usePointerInside,\n} from \"./hooks\";\nimport { MainMenuEditor } from \"./MainMenuEditor\";\nimport { MainMenuHelp } from \"./MainMenuHelp\";\nimport { MainMenuItems } from \"./MainMenuItems\";\nimport { MainMenuLogo } from \"./MainMenuLogo\";\nimport { MainMenuSettings } from \"./MainMenuSettings\";\nimport {\n COLLAPSED_WIDTH,\n MainMenuGlobalStyle,\n NARROW_SCREEN,\n StyledMainMenu,\n} from \"./Styles\";\nimport { IMainMenuDataProps } from \"./types\";\nimport { layers, useResizeObserver } from \"../../utils\";\n\nconst PEEK_CLOSED = \"closed\";\nconst PEEK_OPENING = \"opening\";\nconst PEEK_EXPANDING = \"expanding\";\nconst PEEK_OPEN = \"open\";\nconst PEEK_CLOSING = \"closing\";\nconst PEEK_ANIMATION_FALLBACK_MS = 400;\n\ntype Peek =\n | typeof PEEK_CLOSED\n | typeof PEEK_OPENING\n | typeof PEEK_EXPANDING\n | typeof PEEK_OPEN\n | typeof PEEK_CLOSING;\n\nconst settlePeek = (current: Peek): Peek => {\n if (current === PEEK_EXPANDING) {\n return PEEK_OPEN;\n }\n\n return current === PEEK_CLOSING ? PEEK_CLOSED : current;\n};\n\nexport interface IMainMenuProps\n extends IMainMenuDataProps,\n Omit<HTMLAttributes<HTMLDivElement>, \"onChange\"> {\n /** The compact menu, 72px wide. Uncontrolled when not set. */\n collapsed?: boolean;\n defaultCollapsed?: boolean;\n /** The width choice in the Settings menu of the header. */\n onCollapsedChange?: (collapsed: boolean) => void;\n /** Auto-Expand Compact Main Menu: a hover over the compact menu opens it over the page. */\n autoExpand?: boolean;\n /** The Auto-Expand checkbox in the Settings menu of the compact menu. Not set, the menu has no checkbox. */\n onAutoExpandChange?: (autoExpand: boolean) => void;\n /** A new value tells that the app navigated, and the auto-expanded menu closes. */\n navigationKey?: string;\n}\n\n/**\n * The main menu at the left edge of the app (the frontend `MainMenu.js`): the logo with the Settings menu (the menu\n * width, Auto-Expand and Customize Menu), the items with the favorite projects and the shortcuts, the editor in place of the items, and\n * Help & Support at the bottom. Under 1280px it is compact, and under 640px it hides, so the app shows\n * `MainMenuDrawer` instead.\n */\nexport const MainMenu = ({\n items,\n hiddenItems = [],\n currentItem,\n favorites = [],\n currentFavorite,\n favoritesExpanded: _favoritesExpanded,\n defaultFavoritesExpanded: _defaultFavoritesExpanded,\n onFavoritesExpandedChange: _onFavoritesExpandedChange,\n shortcuts,\n shortcutsExpanded: _shortcutsExpanded,\n defaultShortcutsExpanded: _defaultShortcutsExpanded,\n onShortcutsExpandedChange: _onShortcutsExpandedChange,\n onAddShortcut,\n helpEntries = [],\n helpBadge,\n helpCurrent,\n helpPromo,\n helpId,\n beforeHelp,\n showMoreId,\n renderEditor,\n editMode: _editMode,\n defaultEditMode: _defaultEditMode,\n onEditModeChange: _onEditModeChange,\n onSaveEdit,\n homeHref = \"#\",\n onNavigate,\n touch = false,\n labels: _labels,\n collapsed: collapsedProp,\n defaultCollapsed = false,\n onCollapsedChange,\n autoExpand = false,\n onAutoExpandChange,\n navigationKey,\n className,\n style,\n ...rest\n}: IMainMenuProps): ReactElement => {\n const data = useMainMenuData({\n items,\n favoritesExpanded: _favoritesExpanded,\n defaultFavoritesExpanded: _defaultFavoritesExpanded,\n onFavoritesExpandedChange: _onFavoritesExpandedChange,\n shortcutsExpanded: _shortcutsExpanded,\n defaultShortcutsExpanded: _defaultShortcutsExpanded,\n onShortcutsExpandedChange: _onShortcutsExpandedChange,\n editMode: _editMode,\n defaultEditMode: _defaultEditMode,\n onEditModeChange: _onEditModeChange,\n labels: _labels,\n });\n const { labels, editMode } = data;\n const [collapsed, setCollapsed] = useControllable(\n collapsedProp,\n defaultCollapsed,\n onCollapsedChange\n );\n const rootRef = useRef<HTMLDivElement>(null);\n const socketRef = useRef<HTMLDivElement>(null);\n const [hasKeyboardFocus, setHasKeyboardFocus] = useState(false);\n const [peek, setPeek] = useState<Peek>(PEEK_CLOSED);\n const [isDismissed, setIsDismissed] = useState(false);\n // Wide chosen from the open peek: the peek stays open until the app sends the wide menu, which then takes its width at once.\n const [isWidening, setIsWidening] = useState(false);\n const isNarrowScreen = useMediaQuery(NARROW_SCREEN);\n const socketSize = useResizeObserver(socketRef);\n\n // Under the xl breakpoint the styles force the compact look, so the menu peeks only above it.\n const [isPeekHeld, setIsPeekHeld] = usePeekHold(rootRef);\n // Customize Menu of the compact menu opens the editor over the page, also without Auto-Expand.\n const canPeek =\n collapsed && !isNarrowScreen && (autoExpand || editMode) && !isPeekHeld;\n const [isHovered, setPointerInside] = usePointerInside(rootRef, canPeek);\n const hasOpenPopup = useHasOpenPopup(\n rootRef,\n canPeek && peek !== PEEK_CLOSED\n );\n const wantsPeek =\n canPeek &&\n (isWidening ||\n editMode ||\n (!isDismissed && (isHovered || hasKeyboardFocus || hasOpenPopup)));\n\n const dismissPeek = useCallback(() => {\n setIsDismissed(true);\n setHasKeyboardFocus(false);\n }, []);\n\n // The pointer is still over the menu after a click, so only a leave brings the peek back.\n useEffect(() => {\n if (!isHovered && isDismissed) {\n setIsDismissed(false);\n }\n }, [isHovered, isDismissed]);\n\n useDialogOpen(canPeek && peek !== PEEK_CLOSED, dismissPeek);\n\n const lastNavigationKey = useRef(navigationKey);\n\n useEffect(() => {\n if (navigationKey !== lastNavigationKey.current) {\n lastNavigationKey.current = navigationKey;\n dismissPeek();\n }\n }, [navigationKey, dismissPeek]);\n\n const handleOpenMenuPointer = useCallback(\n (inside: boolean) => {\n setPointerInside(inside);\n\n if (!inside) {\n setHasKeyboardFocus(false);\n }\n },\n [setPointerInside]\n );\n\n useOpenMenuPointer(rootRef, peek === PEEK_OPEN, handleOpenMenuPointer);\n\n // A running animation always ends first. Then this effect reads the pointer again.\n useEffect(() => {\n if (!canPeek) {\n setPeek(PEEK_CLOSED);\n } else if (wantsPeek && peek === PEEK_CLOSED) {\n setPeek(PEEK_OPENING);\n } else if (!wantsPeek && peek === PEEK_OPEN) {\n setPeek(PEEK_CLOSING);\n }\n }, [canPeek, wantsPeek, peek]);\n\n // The panel first lays out with its closed clip, so the clip transition has a start to run from.\n useEffect(() => {\n if (peek !== PEEK_OPENING) {\n return undefined;\n }\n\n const frame = requestAnimationFrame(() =>\n setPeek((current) =>\n current === PEEK_OPENING ? PEEK_EXPANDING : current\n )\n );\n\n return () => cancelAnimationFrame(frame);\n }, [peek]);\n\n // A transition that does not run sends no transitionend, so the animation also ends on a timer.\n useEffect(() => {\n if (peek !== PEEK_EXPANDING && peek !== PEEK_CLOSING) {\n return undefined;\n }\n\n const timer = setTimeout(\n () => setPeek(settlePeek),\n PEEK_ANIMATION_FALLBACK_MS\n );\n\n return () => clearTimeout(timer);\n }, [peek]);\n\n // Two frames after the wide menu is drawn, its width animates again.\n useEffect(() => {\n if (!isWidening || collapsed) {\n return undefined;\n }\n\n let frame = requestAnimationFrame(() => {\n frame = requestAnimationFrame(() => setIsWidening(false));\n });\n\n return () => cancelAnimationFrame(frame);\n }, [isWidening, collapsed]);\n\n const isPeeking = peek !== PEEK_CLOSED;\n const isPeekOpen = peek === PEEK_EXPANDING || peek === PEEK_OPEN;\n const looksCollapsed = collapsed && !isPeekOpen;\n // The editor needs the width of the expanded menu.\n const showEditor =\n editMode && (socketSize ? socketSize.width > COLLAPSED_WIDTH : true);\n\n const handleFocus = useCallback((event: FocusEvent<HTMLDivElement>) => {\n if (event.target.matches?.(\":focus-visible\")) {\n setHasKeyboardFocus(true);\n }\n }, []);\n\n const handleBlur = useCallback((event: FocusEvent<HTMLDivElement>) => {\n if (!event.currentTarget.contains(event.relatedTarget as Node)) {\n setHasKeyboardFocus(false);\n }\n }, []);\n\n const handleTransitionEnd = useCallback(\n (event: TransitionEvent<HTMLDivElement>) => {\n if (\n event.target === event.currentTarget &&\n event.propertyName === \"clip-path\"\n ) {\n setPeek(settlePeek);\n }\n },\n []\n );\n\n const handleCollapsedChange = (next: boolean) => {\n setIsPeekHeld(next);\n setIsWidening(!next && isPeekOpen);\n setCollapsed(next);\n };\n\n const shared = {\n collapsed: looksCollapsed,\n narrow: isNarrowScreen,\n mobile: false,\n onNavigate,\n };\n\n return (\n <StyledMainMenu\n ref={rootRef}\n {...rest}\n className={classnames(\"c-main-menu c-main-menu--desktop\", className, {\n collapsed: looksCollapsed,\n expanded: !looksCollapsed,\n touch,\n \"main-menu-can-peek\": canPeek,\n \"main-menu-peek\": isPeeking,\n \"main-menu-peek-open\": isPeekOpen,\n \"main-menu-instant-width\": isWidening,\n })}\n style={{ zIndex: layers.skyscraper, ...style }}\n data-testid=\"main-menu\"\n onFocus={canPeek ? handleFocus : undefined}\n onBlur={canPeek ? handleBlur : undefined}\n >\n <MainMenuGlobalStyle />\n <div\n className=\"main-menu-panel\"\n data-testid=\"main-menu-panel\"\n onTransitionEnd={handleTransitionEnd}\n >\n <div className=\"main-menu-header\">\n <a href={homeHref} className=\"main-logo-url\" onClick={onNavigate}>\n <MainMenuLogo\n className={classnames(\"main-logo-long\", {\n \"main-logo-long__collapsed\": looksCollapsed,\n })}\n />\n </a>\n {!editMode ? (\n <MainMenuSettings\n collapsed={collapsed}\n autoExpand={autoExpand}\n onCollapsedChange={handleCollapsedChange}\n onAutoExpandChange={onAutoExpandChange}\n onCustomize={data.enterEditMode}\n labels={labels}\n buttonRef={data.editButtonRef}\n />\n ) : null}\n </div>\n <div ref={socketRef} className=\"main-menu-socket\">\n {showEditor && renderEditor ? (\n renderEditor(data.exitEditMode)\n ) : showEditor ? (\n <MainMenuEditor\n items={items}\n hiddenItems={hiddenItems}\n shortcuts={shortcuts}\n labels={labels}\n onSave={onSaveEdit}\n onExit={data.exitEditMode}\n />\n ) : (\n <MainMenuItems\n {...shared}\n items={items}\n hiddenItems={hiddenItems}\n currentItem={currentItem}\n favorites={favorites}\n currentFavorite={currentFavorite}\n favoritesExpanded={data.favoritesExpanded}\n favoritesInPopover={collapsed}\n onFavoritesExpandedChange={data.setFavoritesExpanded}\n shortcuts={shortcuts}\n shortcutsExpanded={data.shortcutsExpanded}\n onShortcutsExpandedChange={data.setShortcutsExpanded}\n onAddShortcut={onAddShortcut}\n showSectionHeader={false}\n showMoreId={showMoreId}\n labels={labels}\n />\n )}\n </div>\n {beforeHelp}\n <MainMenuHelp\n {...shared}\n label={labels.helpAndSupport}\n entries={helpEntries}\n badge={helpBadge}\n current={helpCurrent}\n promo={helpPromo}\n id={helpId}\n />\n </div>\n </StyledMainMenu>\n );\n};\n\nMainMenu.displayName = \"MainMenu\";\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAKVC,WAAW,EACXC,SAAS,EACTC,MAAM,EACNC,QAAQ,QACH,OAAO;AAEd,OAAOC,UAAU,MAAM,YAAY;AAEnC,SACEC,eAAe,EACfC,aAAa,EACbC,eAAe,EACfC,eAAe,EACfC,aAAa,EACbC,kBAAkB,EAClBC,WAAW,EACXC,gBAAgB,QACX,SAAS;AAChB,SAASC,cAAc,QAAQ,kBAAkB;AACjD,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,aAAa,QAAQ,iBAAiB;AAC/C,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SACEC,eAAe,EACfC,mBAAmB,EACnBC,aAAa,EACbC,cAAc,QACT,UAAU;AAEjB,SAASC,MAAM,EAAEC,iBAAiB,QAAQ,aAAa;AAEvD,MAAMC,WAAW,GAAG,QAAQ;AAC5B,MAAMC,YAAY,GAAG,SAAS;AAC9B,MAAMC,cAAc,GAAG,WAAW;AAClC,MAAMC,SAAS,GAAG,MAAM;AACxB,MAAMC,YAAY,GAAG,SAAS;AAC9B,MAAMC,0BAA0B,GAAG,GAAG;AAStC,MAAMC,UAAU,GAAIC,OAAa,IAA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3C,iBAAkB;IAC1CI,yBAAyB,EAAEuC,IAAI,CAAC+E,oBAAqB;IACrDrH,aAAa,EAAEA,aAAc;IAC7BsH,iBAAiB,EAAE,KAAM;IACzB9G,UAAU,EAAEA,UAAW;IACvBe,MAAM,EAAEA;EAAO,EAChB,CAEA,CAAC,EACLhB,UAAU,eACX9D,KAAA,CAAAwJ,aAAA,CAACzI,YAAY,EAAA0I,QAAA,KACPJ,MAAM;IACVyB,KAAK,EAAEhG,MAAM,CAACiG,cAAe;IAC7BC,OAAO,EAAEvH,WAAY;IACrBwH,KAAK,EAAEvH,SAAU;IACjB1B,OAAO,EAAE2B,WAAY;IACrBuH,KAAK,EAAEtH,SAAU;IACjBuH,EAAE,EAAEtH;EAAO,EACZ,CACE,CACS,CAAC;AAErB,CAAC;AAED5B,QAAQ,CAACmJ,WAAW,GAAG,UAAU","ignoreList":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactElement, Ref } from "react";
|
|
2
|
+
import { IMainMenuLabels } from "./types";
|
|
3
|
+
export interface IMainMenuSettingsProps {
|
|
4
|
+
collapsed: boolean;
|
|
5
|
+
autoExpand: boolean;
|
|
6
|
+
onCollapsedChange: (collapsed: boolean) => void;
|
|
7
|
+
onAutoExpandChange?: (autoExpand: boolean) => void;
|
|
8
|
+
onCustomize: () => void;
|
|
9
|
+
labels: IMainMenuLabels;
|
|
10
|
+
buttonRef?: Ref<HTMLButtonElement>;
|
|
11
|
+
}
|
|
12
|
+
/** The Settings button of the menu header: the menu width, Auto-Expand of the compact menu, and Customize Menu. */
|
|
13
|
+
export declare const MainMenuSettings: ({ collapsed, autoExpand, onCollapsedChange, onAutoExpandChange, onCustomize, labels, buttonRef, }: IMainMenuSettingsProps) => ReactElement;
|
|
14
|
+
//# sourceMappingURL=MainMenuSettings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MainMenuSettings.d.ts","sourceRoot":"","sources":["../../../../src/components/MainMenu/MainMenuSettings.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,YAAY,EAAE,GAAG,EAAyB,MAAM,OAAO,CAAC;AAGxE,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAW1C,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,iBAAiB,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,kBAAkB,CAAC,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;IACnD,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,MAAM,EAAE,eAAe,CAAC;IACxB,SAAS,CAAC,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAC;CACpC;AAED,mHAAmH;AACnH,eAAO,MAAM,gBAAgB,GAAI,mGAQ9B,sBAAsB,KAAG,YAqG3B,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import React, { useCallback, useState } from "react";
|
|
2
|
+
import { StyledSettingsList } from "./Styles";
|
|
3
|
+
import { Checkbox } from "../Checkbox";
|
|
4
|
+
import { IconButton } from "../IconButton";
|
|
5
|
+
import { SettingsIcon } from "../Icons";
|
|
6
|
+
import { ListItem, ListSeparator } from "../List";
|
|
7
|
+
import { Menu } from "../Menu";
|
|
8
|
+
import { RadioButton } from "../RadioButton";
|
|
9
|
+
import { Tooltip } from "../Tooltip";
|
|
10
|
+
const SETTINGS_MENU_WIDTH = 216;
|
|
11
|
+
/** The Settings button of the menu header: the menu width, Auto-Expand of the compact menu, and Customize Menu. */
|
|
12
|
+
export const MainMenuSettings = _ref => {
|
|
13
|
+
let collapsed = _ref.collapsed,
|
|
14
|
+
autoExpand = _ref.autoExpand,
|
|
15
|
+
onCollapsedChange = _ref.onCollapsedChange,
|
|
16
|
+
onAutoExpandChange = _ref.onAutoExpandChange,
|
|
17
|
+
onCustomize = _ref.onCustomize,
|
|
18
|
+
labels = _ref.labels,
|
|
19
|
+
buttonRef = _ref.buttonRef;
|
|
20
|
+
const _useState = useState(false),
|
|
21
|
+
open = _useState[0],
|
|
22
|
+
setOpen = _useState[1];
|
|
23
|
+
const handleOpen = useCallback(() => setOpen(true), []);
|
|
24
|
+
const handleClose = useCallback(() => setOpen(false), []);
|
|
25
|
+
const select = action => () => {
|
|
26
|
+
setOpen(false);
|
|
27
|
+
action();
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
// The row takes the click, and the control only shows the state, so one press changes it once.
|
|
31
|
+
const row = (id, label, control, onSelect) => /*#__PURE__*/React.createElement(ListItem, {
|
|
32
|
+
key: id,
|
|
33
|
+
className: "main-menu-settings-row",
|
|
34
|
+
"data-testid": "main-menu-settings-" + id,
|
|
35
|
+
onClick: select(onSelect),
|
|
36
|
+
onKeyDown: event => {
|
|
37
|
+
if (event.key === "Enter") {
|
|
38
|
+
event.currentTarget.click();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
42
|
+
className: "main-menu-settings-text"
|
|
43
|
+
}, label), control);
|
|
44
|
+
return /*#__PURE__*/React.createElement(Menu, {
|
|
45
|
+
open: open,
|
|
46
|
+
onOpen: handleOpen,
|
|
47
|
+
onClose: handleClose,
|
|
48
|
+
width: SETTINGS_MENU_WIDTH,
|
|
49
|
+
target: /*#__PURE__*/React.createElement(Tooltip, {
|
|
50
|
+
title: labels.settings
|
|
51
|
+
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
52
|
+
ref: buttonRef,
|
|
53
|
+
variant: "text gray",
|
|
54
|
+
onClick: handleOpen,
|
|
55
|
+
"aria-label": labels.settings,
|
|
56
|
+
"aria-haspopup": "menu",
|
|
57
|
+
"aria-expanded": open,
|
|
58
|
+
className: "main-menu-edit-button",
|
|
59
|
+
size: "small"
|
|
60
|
+
}, /*#__PURE__*/React.createElement(SettingsIcon, {
|
|
61
|
+
width: 20,
|
|
62
|
+
height: 20
|
|
63
|
+
})))
|
|
64
|
+
}, /*#__PURE__*/React.createElement(StyledSettingsList, {
|
|
65
|
+
"data-autofocus": true,
|
|
66
|
+
tabIndex: -1
|
|
67
|
+
}, row("wide", labels.wideMenu, /*#__PURE__*/React.createElement(RadioButton, {
|
|
68
|
+
checked: !collapsed,
|
|
69
|
+
readOnly: true,
|
|
70
|
+
tabIndex: -1,
|
|
71
|
+
className: "main-menu-settings-control"
|
|
72
|
+
}), () => onCollapsedChange(false)), row("compact", labels.compactMenu, /*#__PURE__*/React.createElement(RadioButton, {
|
|
73
|
+
checked: collapsed,
|
|
74
|
+
readOnly: true,
|
|
75
|
+
tabIndex: -1,
|
|
76
|
+
className: "main-menu-settings-control"
|
|
77
|
+
}), () => onCollapsedChange(true)), collapsed && onAutoExpandChange ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ListSeparator, null), row("auto-expand", labels.autoExpand, /*#__PURE__*/React.createElement(Checkbox, {
|
|
78
|
+
checked: autoExpand,
|
|
79
|
+
readOnly: true,
|
|
80
|
+
tabIndex: -1,
|
|
81
|
+
className: "main-menu-settings-control"
|
|
82
|
+
}), () => onAutoExpandChange(!autoExpand))) : null, /*#__PURE__*/React.createElement(ListSeparator, null), row("customize", labels.customizeMenu, null, onCustomize)));
|
|
83
|
+
};
|
|
84
|
+
//# sourceMappingURL=MainMenuSettings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MainMenuSettings.js","names":["React","useCallback","useState","StyledSettingsList","Checkbox","IconButton","SettingsIcon","ListItem","ListSeparator","Menu","RadioButton","Tooltip","SETTINGS_MENU_WIDTH","MainMenuSettings","_ref","collapsed","autoExpand","onCollapsedChange","onAutoExpandChange","onCustomize","labels","buttonRef","_useState","open","setOpen","handleOpen","handleClose","select","action","row","id","label","control","onSelect","createElement","key","className","onClick","onKeyDown","event","currentTarget","click","onOpen","onClose","width","target","title","settings","ref","variant","size","height","tabIndex","wideMenu","checked","readOnly","compactMenu","Fragment","customizeMenu"],"sources":["../../../../src/components/MainMenu/MainMenuSettings.tsx"],"sourcesContent":["import React, { ReactElement, Ref, useCallback, useState } from \"react\";\n\nimport { StyledSettingsList } from \"./Styles\";\nimport { IMainMenuLabels } from \"./types\";\nimport { Checkbox } from \"../Checkbox\";\nimport { IconButton } from \"../IconButton\";\nimport { SettingsIcon } from \"../Icons\";\nimport { ListItem, ListSeparator } from \"../List\";\nimport { Menu } from \"../Menu\";\nimport { RadioButton } from \"../RadioButton\";\nimport { Tooltip } from \"../Tooltip\";\n\nconst SETTINGS_MENU_WIDTH = 216;\n\nexport interface IMainMenuSettingsProps {\n collapsed: boolean;\n autoExpand: boolean;\n onCollapsedChange: (collapsed: boolean) => void;\n onAutoExpandChange?: (autoExpand: boolean) => void;\n onCustomize: () => void;\n labels: IMainMenuLabels;\n buttonRef?: Ref<HTMLButtonElement>;\n}\n\n/** The Settings button of the menu header: the menu width, Auto-Expand of the compact menu, and Customize Menu. */\nexport const MainMenuSettings = ({\n collapsed,\n autoExpand,\n onCollapsedChange,\n onAutoExpandChange,\n onCustomize,\n labels,\n buttonRef,\n}: IMainMenuSettingsProps): ReactElement => {\n const [open, setOpen] = useState(false);\n const handleOpen = useCallback(() => setOpen(true), []);\n const handleClose = useCallback(() => setOpen(false), []);\n\n const select = (action: () => void) => () => {\n setOpen(false);\n action();\n };\n\n // The row takes the click, and the control only shows the state, so one press changes it once.\n const row = (\n id: string,\n label: string,\n control: ReactElement | null,\n onSelect: () => void\n ) => (\n <ListItem\n key={id}\n className=\"main-menu-settings-row\"\n data-testid={`main-menu-settings-${id}`}\n onClick={select(onSelect)}\n onKeyDown={(event) => {\n if (event.key === \"Enter\") {\n event.currentTarget.click();\n }\n }}\n >\n <span className=\"main-menu-settings-text\">{label}</span>\n {control}\n </ListItem>\n );\n\n return (\n <Menu\n open={open}\n onOpen={handleOpen}\n onClose={handleClose}\n width={SETTINGS_MENU_WIDTH}\n target={\n <Tooltip title={labels.settings}>\n <IconButton\n ref={buttonRef}\n variant=\"text gray\"\n onClick={handleOpen}\n aria-label={labels.settings}\n aria-haspopup=\"menu\"\n aria-expanded={open}\n className=\"main-menu-edit-button\"\n size=\"small\"\n >\n <SettingsIcon width={20} height={20} />\n </IconButton>\n </Tooltip>\n }\n >\n {/* A focused first row looks hovered, so the focus lock starts on the list. */}\n <StyledSettingsList data-autofocus tabIndex={-1}>\n {row(\n \"wide\",\n labels.wideMenu,\n <RadioButton\n checked={!collapsed}\n readOnly\n tabIndex={-1}\n className=\"main-menu-settings-control\"\n />,\n () => onCollapsedChange(false)\n )}\n {row(\n \"compact\",\n labels.compactMenu,\n <RadioButton\n checked={collapsed}\n readOnly\n tabIndex={-1}\n className=\"main-menu-settings-control\"\n />,\n () => onCollapsedChange(true)\n )}\n {collapsed && onAutoExpandChange ? (\n <>\n <ListSeparator />\n {row(\n \"auto-expand\",\n labels.autoExpand,\n <Checkbox\n checked={autoExpand}\n readOnly\n tabIndex={-1}\n className=\"main-menu-settings-control\"\n />,\n () => onAutoExpandChange(!autoExpand)\n )}\n </>\n ) : null}\n <ListSeparator />\n {row(\"customize\", labels.customizeMenu, null, onCustomize)}\n </StyledSettingsList>\n </Menu>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAuBC,WAAW,EAAEC,QAAQ,QAAQ,OAAO;AAEvE,SAASC,kBAAkB,QAAQ,UAAU;AAE7C,SAASC,QAAQ,QAAQ,aAAa;AACtC,SAASC,UAAU,QAAQ,eAAe;AAC1C,SAASC,YAAY,QAAQ,UAAU;AACvC,SAASC,QAAQ,EAAEC,aAAa,QAAQ,SAAS;AACjD,SAASC,IAAI,QAAQ,SAAS;AAC9B,SAASC,WAAW,QAAQ,gBAAgB;AAC5C,SAASC,OAAO,QAAQ,YAAY;AAEpC,MAAMC,mBAAmB,GAAG,GAAG;AAY/B;AACA,OAAO,MAAMC,gBAAgB,GAAGC,IAAA,IAQY;EAAA,IAP1CC,SAAS,GAAAD,IAAA,CAATC,SAAS;IACTC,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,KAAA,CAAAkC,aAAA,CAAC1B,aAAa,MAAE,CAAC,EAChBqB,GAAG,CACF,aAAa,EACbT,MAAM,CAACJ,UAAU,eACjBhB,KAAA,CAAAkC,aAAA,CAAC9B,QAAQ;IACPkD,OAAO,EAAEtC,UAAW;IACpBuC,QAAQ;IACRH,QAAQ,EAAE,CAAC,CAAE;IACbhB,SAAS,EAAC;EAA4B,CACvC,CAAC,EACF,MAAMlB,kBAAkB,CAAC,CAACF,UAAU,CACtC,CACA,CAAC,GACD,IAAI,eACRhB,KAAA,CAAAkC,aAAA,CAAC1B,aAAa,MAAE,CAAC,EAChBqB,GAAG,CAAC,WAAW,EAAET,MAAM,CAACsC,aAAa,EAAE,IAAI,EAAEvC,WAAW,CACvC,CAChB,CAAC;AAEX,CAAC","ignoreList":[]}
|
|
@@ -16,6 +16,17 @@ export declare const StyledHelpList: import("styled-components").StyledComponent
|
|
|
16
16
|
displayName: string;
|
|
17
17
|
};
|
|
18
18
|
}, any, {}, never>;
|
|
19
|
+
export declare const StyledSettingsList: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("..").ListProps & {
|
|
20
|
+
children?: import("react").ReactNode | undefined;
|
|
21
|
+
} & import("react").HTMLAttributes<HTMLUListElement> & import("react").RefAttributes<HTMLUListElement>> & {
|
|
22
|
+
Item: import("react").ForwardRefExoticComponent<import("..").ListItemProps & {
|
|
23
|
+
children?: import("react").ReactNode | undefined;
|
|
24
|
+
} & import("react").HTMLAttributes<HTMLLIElement> & import("react").RefAttributes<HTMLLIElement>>;
|
|
25
|
+
Separator: {
|
|
26
|
+
({ className, ...props }: import("react").HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
27
|
+
displayName: string;
|
|
28
|
+
};
|
|
29
|
+
}, any, {}, never>;
|
|
19
30
|
export declare const StyledFavoritesMenuList: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("..").ListProps & {
|
|
20
31
|
children?: import("react").ReactNode | undefined;
|
|
21
32
|
} & import("react").HTMLAttributes<HTMLUListElement> & import("react").RefAttributes<HTMLUListElement>> & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Styles.d.ts","sourceRoot":"","sources":["../../../../src/components/MainMenu/Styles.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,EAAE,UAAU,CAAC;AAC1B,eAAO,MAAM,EAAE,WAAW,CAAC;AAC3B,eAAO,MAAM,aAAa,wBAAuB,CAAC;AAClD,eAAO,MAAM,eAAe,KAAK,CAAC;AAClC,eAAO,MAAM,cAAc,MAAM,CAAC;AAMlC,eAAO,MAAM,mBAAmB,gGAI/B,CAAC;AAEF,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"Styles.d.ts","sourceRoot":"","sources":["../../../../src/components/MainMenu/Styles.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,EAAE,UAAU,CAAC;AAC1B,eAAO,MAAM,EAAE,WAAW,CAAC;AAC3B,eAAO,MAAM,aAAa,wBAAuB,CAAC;AAClD,eAAO,MAAM,eAAe,KAAK,CAAC;AAClC,eAAO,MAAM,cAAc,MAAM,CAAC;AAMlC,eAAO,MAAM,mBAAmB,gGAI/B,CAAC;AAEF,eAAO,MAAM,cAAc,oEAg2B1B,CAAC;AAKF,eAAO,MAAM,cAAc;;;;;;;;;;kBAiD1B,CAAC;AAIF,eAAO,MAAM,kBAAkB;;;;;;;;;;kBA4B9B,CAAC;AAKF,eAAO,MAAM,uBAAuB;;;;;;;;;;kBA4CnC,CAAC"}
|
|
@@ -14,7 +14,7 @@ export const MainMenuGlobalStyle = createGlobalStyle([".c-main-menu-favorites-po
|
|
|
14
14
|
export const StyledMainMenu = styled.div.withConfig({
|
|
15
15
|
displayName: "Styles__StyledMainMenu",
|
|
16
16
|
componentId: "sc-17ibzh0-0"
|
|
17
|
-
})(["", " &.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);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-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);
|
|
17
|
+
})(["", " &.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);
|
|
18
18
|
StyledMainMenu.displayName = "StyledMainMenu";
|
|
19
19
|
|
|
20
20
|
/* HelpAndSupportMenu.js: "tw:mt-3" on the first item, "tw:mb-3" on the last, "tw:shrink-0 tw:mr-3" on the icons */
|
|
@@ -23,11 +23,16 @@ export const StyledHelpList = styled(List).withConfig({
|
|
|
23
23
|
componentId: "sc-17ibzh0-1"
|
|
24
24
|
})(["outline:2px solid transparent;outline-offset:2px;.c-list-item > svg:first-child{flex-shrink:0;margin-right:12px;}.c-list-item:first-child{margin-top:12px;}.c-list-item:last-child{margin-bottom:12px;}.main-menu-help-entry-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.main-menu-help-entry-badge{margin-left:auto;}a.c-list-item{text-decoration:none;}.main-menu-help-entry.is-primary{color:var(--color-primary);> svg:first-child{fill:var(--color-primary);}}.main-menu-help-entry-text.has-end{margin-right:12px;}.main-menu-help-entry-end{flex-shrink:0;margin-left:auto;}"]);
|
|
25
25
|
StyledHelpList.displayName = "StyledHelpList";
|
|
26
|
+
export const StyledSettingsList = styled(List).withConfig({
|
|
27
|
+
displayName: "Styles__StyledSettingsList",
|
|
28
|
+
componentId: "sc-17ibzh0-2"
|
|
29
|
+
})(["outline:2px solid transparent;outline-offset:2px;.c-list-item:first-child{margin-top:12px;}.c-list-item:last-child{margin-bottom:12px;}.main-menu-settings-row{justify-content:space-between;gap:12px;}.main-menu-settings-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.main-menu-settings-control{flex-shrink:0;pointer-events:none;}"]);
|
|
30
|
+
StyledSettingsList.displayName = "StyledSettingsList";
|
|
26
31
|
|
|
27
32
|
/* FavoriteProjectsMenu.js "tw:py-2", FavoriteProjectMenuOption.js */
|
|
28
33
|
export const StyledFavoritesMenuList = styled(List).withConfig({
|
|
29
34
|
displayName: "Styles__StyledFavoritesMenuList",
|
|
30
|
-
componentId: "sc-17ibzh0-
|
|
35
|
+
componentId: "sc-17ibzh0-3"
|
|
31
36
|
})(["padding:8px 0;.c-list-item{padding-right:0;padding-left:0;}.favorite-project-menu-option{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;width:100%;padding:0 16px;color:var(--color-theme-900);text-decoration:none;svg{flex-shrink:0;margin-right:8px;opacity:0.5;}&.favorite-project-menu-option-active{background-color:var(--color-secondary-200);svg{fill:var(--color-secondary);}.favorite-project-menu-option-text{color:var(--color-secondary);}}}.favorite-project-menu-option-text{flex:1;padding-right:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}"]);
|
|
32
37
|
StyledFavoritesMenuList.displayName = "StyledFavoritesMenuList";
|
|
33
38
|
//# sourceMappingURL=Styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Styles.js","names":["styled","createGlobalStyle","BoxSizingStyle","List","SM","XL","NARROW_SCREEN","COLLAPSED_WIDTH","EXPANDED_WIDTH","TRANSITION","TOGGLE_TRANSITION","MainMenuGlobalStyle","StyledMainMenu","div","withConfig","displayName","componentId","StyledHelpList","StyledFavoritesMenuList"],"sources":["../../../../src/components/MainMenu/Styles.ts"],"sourcesContent":["import styled, { createGlobalStyle } from \"styled-components\";\n\nimport { BoxSizingStyle } from \"../BoxSizingStyle\";\nimport { List } from \"../List\";\n\nexport const SM = \"640px\";\nexport const XL = \"1280px\";\nexport const NARROW_SCREEN = `(max-width: ${XL})`;\nexport const COLLAPSED_WIDTH = 72;\nexport const EXPANDED_WIDTH = 240;\n\nconst TRANSITION = \"200ms ease\";\nconst TOGGLE_TRANSITION = \"transform 200ms cubic-bezier(0.4, 0, 0.2, 1)\";\n\n// The popper of a menu sits in a portal, out of reach of the menu styles.\nexport const MainMenuGlobalStyle = createGlobalStyle`\n .c-main-menu-favorites-popper {\n padding: 4px;\n }\n`;\n\nexport const StyledMainMenu = styled.div`\n ${BoxSizingStyle}\n\n /* MainMenu.js \"tw:relative tw:left-2.5 tw:hidden tw:sm:flex tw:flex-col tw:h-full tw:mr-1 tw:shrink-0\" */\n &.c-main-menu--desktop {\n position: relative;\n left: 10px;\n display: none;\n flex-direction: column;\n flex-shrink: 0;\n height: 100%;\n margin-right: 4px;\n\n @media (min-width: ${SM}) {\n display: flex;\n }\n }\n\n /* MainMenuMobile.js \"tw:flex-col tw:h-full tw:w-60\": a block, as wide as the drawer */\n &.c-main-menu--drawer {\n height: 100%;\n }\n\n &.expanded {\n width: ${EXPANDED_WIDTH}px;\n }\n\n &.collapsed {\n width: ${COLLAPSED_WIDTH}px;\n }\n\n &.expanded,\n &.collapsed {\n transition: width ${TRANSITION};\n\n @media (max-width: ${XL}) {\n width: ${COLLAPSED_WIDTH}px;\n }\n }\n\n &.c-main-menu--drawer.c-main-menu--drawer {\n width: ${EXPANDED_WIDTH}px;\n }\n\n .main-menu-panel {\n display: flex;\n flex: 1;\n flex-direction: column;\n min-height: 0;\n }\n\n &.main-menu-peek {\n width: ${COLLAPSED_WIDTH}px;\n }\n\n /* The menu sits 10px from the edge, so the backdrop reaches back to cover that strip too. */\n &.main-menu-peek .main-menu-panel {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n z-index: 0;\n width: ${EXPANDED_WIDTH}px;\n clip-path: inset(\n -100px ${EXPANDED_WIDTH - COLLAPSED_WIDTH}px -100px -100px\n );\n transition: clip-path 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);\n\n &::before {\n content: \"\";\n position: absolute;\n inset: 0 0 0 -10px;\n z-index: -1;\n background-color: var(--body-bg-main);\n box-shadow: var(--shadow-popover);\n }\n }\n\n &.main-menu-peek-open .main-menu-panel {\n clip-path: inset(-100px);\n }\n\n /* A clipped part of the panel takes no pointer, so this strip holds the hover while the clip opens. */\n &.main-menu-peek::after {\n content: \"\";\n position: absolute;\n top: 0;\n bottom: 0;\n left: -10px;\n z-index: -1;\n width: ${EXPANDED_WIDTH + 10}px;\n }\n\n @media (prefers-reduced-motion: reduce) {\n &.main-menu-peek .main-menu-panel {\n transition-duration: 1ms;\n }\n }\n\n /* \"main-menu-header tw:-left-2.5 tw:flex tw:items-center tw:overflow-hidden\" */\n .main-menu-header {\n position: relative;\n display: flex;\n align-items: center;\n height: 68px;\n overflow: hidden;\n }\n\n &.c-main-menu--desktop .main-menu-header {\n left: -10px;\n }\n\n /* On hover the logo takes the hover color of the menu items. */\n .main-logo-url {\n position: absolute;\n left: 30px;\n color: var(--color-secondary);\n\n path {\n fill: var(--color-secondary);\n transition: fill ${TRANSITION};\n }\n\n &:hover path,\n &:focus-visible path {\n fill: var(--color-theme-900);\n }\n }\n\n .main-logo-long {\n transition: all ${TRANSITION};\n\n #logotype {\n opacity: 1;\n transition: all ${TRANSITION};\n will-change: opacity, transform;\n\n @media (max-width: ${XL}) {\n opacity: 0;\n transform: translateX(-5%);\n }\n }\n }\n\n .main-logo-long__collapsed #logotype {\n opacity: 0;\n transform: translateX(-5%);\n }\n\n /* The tab sits in the free strip left of the logo. It floats, so the menu keeps its layout. */\n .main-menu-collapse-tab {\n position: absolute;\n top: 8px;\n left: -10px;\n z-index: 4;\n display: none;\n width: 30px;\n height: 48px;\n margin: 0;\n padding: 0;\n border: 0;\n background: none;\n font: inherit;\n cursor: pointer;\n\n @media (min-width: ${XL}) {\n display: block;\n }\n }\n\n .main-menu-collapse-tab-face {\n position: absolute;\n top: 50%;\n left: 0;\n display: flex;\n align-items: center;\n gap: 6px;\n height: 27px;\n max-width: 4px;\n margin-top: -0.5px;\n padding: 0;\n overflow: hidden;\n border-radius: 0 4px 4px 0;\n background: var(--color-theme-500);\n white-space: nowrap;\n opacity: 0;\n transform: translateY(-50%);\n transition: all 180ms ease;\n }\n\n .main-menu-collapse-tab-icon,\n .main-menu-collapse-tab-label {\n opacity: 0;\n transition: opacity 150ms ease, ${TOGGLE_TRANSITION};\n }\n\n .main-menu-collapse-tab-icon {\n flex-shrink: 0;\n fill: var(--color-theme-700);\n }\n\n .main-menu-collapse-tab.is-collapsed .main-menu-collapse-tab-icon {\n transform: rotate(180deg);\n }\n\n .main-menu-collapse-tab-label {\n color: var(--color-theme-900);\n font-size: 12px;\n font-weight: 600;\n line-height: 16px;\n }\n\n &:hover .main-menu-collapse-tab-face,\n &:has(:focus-visible) .main-menu-collapse-tab-face,\n &.touch .main-menu-collapse-tab-face {\n opacity: 1;\n }\n\n @media (hover: none) {\n .main-menu-collapse-tab-face {\n opacity: 1;\n }\n }\n\n .main-menu-collapse-tab:hover .main-menu-collapse-tab-face,\n .main-menu-collapse-tab:focus-visible .main-menu-collapse-tab-face {\n height: 39px;\n max-width: 120px;\n padding: 0 14px 0 10px;\n border: 1px solid var(--popover-border);\n border-left: 0;\n border-radius: 0 10px 10px 0;\n background: linear-gradient(\n 180deg,\n var(--page-paper-main),\n color-mix(in srgb, var(--page-paper-main) 92%, var(--color-theme-500))\n );\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.14), 0 4px 14px rgba(0, 0, 0, 0.145),\n inset 0 1px 0 rgba(255, 255, 255, 0.07);\n opacity: 1;\n }\n\n .main-menu-collapse-tab:hover .main-menu-collapse-tab-icon,\n .main-menu-collapse-tab:hover .main-menu-collapse-tab-label,\n .main-menu-collapse-tab:focus-visible .main-menu-collapse-tab-icon,\n .main-menu-collapse-tab:focus-visible .main-menu-collapse-tab-label {\n opacity: 1;\n }\n\n /* Opacity, not visibility: a hidden button cannot take the focus, so Tab would skip it. */\n .main-menu-edit-button.main-menu-edit-button {\n opacity: 0;\n transition: opacity ${TRANSITION};\n }\n\n /* MainMenu.js \"tw:absolute tw:right-1.5 tw:-translate-y-0.5\" and the theme-500 icon */\n .main-menu-header .main-menu-edit-button.main-menu-edit-button {\n position: absolute;\n right: 6px;\n transform: translateY(-2px);\n\n svg {\n fill: var(--color-theme-500);\n }\n\n &:hover svg,\n &:focus-visible svg {\n fill: var(--color-theme-900);\n }\n }\n\n &:hover .main-menu-edit-button.main-menu-edit-button,\n &:has(:focus-visible) .main-menu-edit-button.main-menu-edit-button,\n &.touch .main-menu-edit-button.main-menu-edit-button {\n opacity: 1;\n }\n\n @media (hover: none) {\n .main-menu-edit-button.main-menu-edit-button {\n opacity: 1;\n }\n }\n\n /* Where its section is collapsed the button cannot open the editor, so it stays out of the tab order. */\n &.collapsed .main-menu-edit-button.main-menu-edit-button {\n visibility: hidden;\n }\n\n @media (max-width: ${XL}) {\n &:not(.c-main-menu--drawer) .main-menu-edit-button.main-menu-edit-button {\n visibility: hidden;\n }\n }\n\n /* \"tw:flex tw:flex-col tw:grow tw:flex-1 tw:h-full tw:overflow-y-auto\" */\n .main-menu-socket {\n display: flex;\n flex: 1 1 0%;\n flex-direction: column;\n height: 100%;\n overflow-y: auto;\n }\n\n /* MainMenuMobile.js \"tw:h-[calc(100dvh-72px)]\" */\n &.c-main-menu--drawer .main-menu-socket {\n height: calc(100dvh - 72px);\n }\n\n /* MainMenuItems.js \"tw:flex tw:min-h-0 tw:grow\" around the scrollbars, and \"tw:my-3 tw:overflow-x-hidden\" */\n .main-menu-items {\n display: flex;\n flex-grow: 1;\n min-height: 0;\n }\n\n .main-menu-items-inner {\n margin: 12px 0;\n overflow-x: hidden;\n }\n\n .main-menu-item-icon {\n flex-shrink: 0;\n fill: var(--color-theme-700);\n opacity: 0.7;\n }\n\n /* MainMenuItemWrapper.js \"main-menu-item tw:flex tw:items-center tw:no-underline tw:h-10 tw:pl-3 tw:pr-1 tw:mx-3\" */\n .main-menu-item {\n display: flex;\n align-items: center;\n height: 40px;\n margin: 0 12px 2px;\n padding: 0 4px 0 12px;\n border-radius: var(--ac-br-8);\n text-decoration: none;\n\n &:hover {\n background-color: var(--color-theme-300);\n transition: all ${TRANSITION};\n\n .main-menu-item-icon {\n fill: var(--color-theme-900);\n opacity: 1;\n }\n\n .main-menu-item-text {\n color: var(--color-theme-900);\n }\n }\n\n &.main-menu-item-current {\n background-color: var(--color-secondary-200);\n\n .main-menu-item-icon {\n fill: var(--color-secondary);\n opacity: 1;\n }\n\n .main-menu-item-text {\n color: var(--color-secondary);\n }\n }\n }\n\n .main-menu-item--between {\n justify-content: space-between;\n }\n\n .main-menu-item-start {\n display: flex;\n align-items: center;\n }\n\n /* MainMenuItemInner.js \"tw:ml-3 tw:truncate tw:min-w-0\" */\n .main-menu-item-label {\n min-width: 0;\n margin-left: 12px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .main-menu-projects {\n position: relative;\n }\n\n /* FavoriteProjectOption.js */\n .main-menu-subnav.main-menu-subnav {\n padding: 2px 0;\n\n .main-menu-subnav-item {\n margin: 0;\n padding-right: 0;\n padding-left: 0;\n\n &:hover {\n background-color: unset;\n }\n }\n\n .main-menu-subnav-item-icon {\n flex-shrink: 0;\n margin-right: 8px;\n opacity: 0.5;\n fill: var(--color-theme-700);\n }\n\n .main-menu-subnav-item-text {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .main-menu-item {\n width: 100%;\n min-width: 0;\n height: 32px;\n margin-right: 12px;\n margin-left: 22px;\n padding: 8px;\n }\n\n .main-menu-item:hover {\n .main-menu-subnav-item-icon {\n fill: var(--color-theme-900);\n }\n\n .main-menu-subnav-item-text {\n color: var(--color-theme-900);\n }\n }\n\n .main-menu-subnav-item-active,\n .main-menu-subnav-item-active:hover {\n background-color: var(--color-secondary-200);\n\n .main-menu-subnav-item-icon {\n fill: var(--color-secondary);\n }\n\n .main-menu-subnav-item-text {\n color: var(--color-secondary);\n }\n }\n }\n\n .menu-section-text {\n opacity: 0.7;\n }\n\n .main-menu-item-text,\n .menu-section {\n transition: all ${TRANSITION};\n }\n\n /* \"tw:mb-2 tw:mx-3 tw:pl-3 tw:pr-1 tw:flex tw:justify-between tw:items-center menu-section\" */\n .menu-section {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin: 0 12px 8px;\n padding: 0 4px 0 12px;\n /* The height clips the heading as it opens and closes, so its text is never squeezed. The 4px keep a focus ring. */\n clip-path: inset(-4px);\n }\n\n &.expanded {\n .main-menu-item-text {\n opacity: 1;\n visibility: visible;\n }\n\n .menu-section {\n max-height: 32px;\n opacity: 1;\n }\n }\n\n &.collapsed {\n .main-menu-item-text {\n opacity: 0;\n visibility: hidden;\n }\n\n .menu-section {\n max-height: 0;\n opacity: 0;\n }\n }\n\n @media (max-width: ${XL}) {\n &.collapsed .menu-section,\n &.expanded .menu-section {\n max-height: 0;\n opacity: 0;\n }\n\n &.collapsed .main-menu-item-text,\n &.expanded .main-menu-item-text {\n width: 0;\n opacity: 0;\n visibility: hidden;\n }\n\n /* The narrow screen collapses the sidebar, never the drawer. */\n &.c-main-menu--drawer.expanded {\n .menu-section {\n max-height: 32px;\n opacity: 1;\n }\n\n .main-menu-item-text {\n width: auto;\n opacity: 1;\n visibility: visible;\n }\n }\n }\n\n /* FavoriteProjectsMenu.js target */\n .favorite-projects-menu-target {\n position: absolute;\n top: 0;\n right: 0;\n z-index: 1;\n display: none;\n align-items: center;\n justify-content: center;\n width: 10px;\n height: 40px;\n border-radius: 4px;\n cursor: pointer;\n\n &.collapsed {\n display: flex;\n }\n\n @media (max-width: ${XL}) {\n display: flex;\n }\n\n svg {\n transform: rotate(180deg);\n }\n }\n\n &.main-menu-can-peek:not(.main-menu-peek-open)\n .favorite-projects-menu-target {\n display: none;\n }\n\n /* Where the drawer toggle sits in the expanded menu. */\n &.main-menu-peek-open .favorite-projects-menu-target.collapsed {\n top: 8px;\n right: 16px;\n width: 24px;\n height: 24px;\n }\n\n .favorite-projects-menu-target:hover {\n background-color: var(--color-theme-300);\n\n svg {\n fill: var(--color-theme-900);\n }\n }\n\n .main-menu-item-current + .favorite-projects-menu-target:hover,\n .favorite-projects-menu-target.open {\n background-color: var(--color-secondary-200);\n\n svg {\n fill: var(--color-secondary);\n }\n }\n\n /* ExpandToggle.jsx \"tw:transition-transform tw:duration-200\", up when expanded */\n .main-menu-toggle {\n flex-shrink: 0;\n transition: ${TOGGLE_TRANSITION};\n\n &.is-closed {\n transform: rotate(180deg);\n }\n }\n\n .favorite-projects-list,\n .favorite-projects-list-target {\n display: flex;\n\n &.collapsed {\n display: none;\n }\n\n @media (max-width: ${XL}) {\n display: none;\n }\n }\n\n .favorite-projects-list-target {\n margin-left: auto;\n }\n\n &.c-main-menu--drawer {\n .favorite-projects-list.favorite-projects-list,\n .favorite-projects-list-target.is-mobile {\n display: flex;\n }\n }\n\n .favorite-projects-list {\n opacity: 1;\n overflow: hidden;\n transition: all ${TRANSITION};\n }\n\n .favorite-projects-list-collapsed {\n opacity: 0;\n transition: all ${TRANSITION};\n }\n\n /* HiddenOptionList.js */\n .show-hidden-options-long {\n display: block;\n margin: 12px 24px;\n cursor: pointer;\n\n &.collapsed {\n display: none;\n }\n\n @media (max-width: ${XL}) {\n display: none;\n }\n }\n\n .show-hidden-options-short {\n display: none;\n margin: 12px 0;\n cursor: pointer;\n\n &.collapsed {\n display: block;\n }\n\n @media (max-width: ${XL}) {\n display: block;\n }\n }\n\n &.c-main-menu--drawer {\n .show-hidden-options-long.show-hidden-options-long {\n display: block;\n }\n\n .show-hidden-options-short.show-hidden-options-short {\n display: none;\n }\n }\n\n /* Shortcuts/List.js */\n .main-menu-shortcuts {\n position: relative;\n }\n\n .shortcuts-expander {\n margin-left: auto;\n cursor: pointer;\n }\n\n .shortcuts-expander-collapsed {\n position: absolute;\n top: -11px;\n right: 0;\n left: 0;\n display: none;\n margin: 0 auto;\n border-radius: 100%;\n background-color: var(--body-bg-main);\n cursor: pointer;\n\n &.collapsed {\n display: block;\n }\n\n @media (max-width: ${XL}) {\n display: block;\n }\n }\n\n .shortcuts-list-separator.c-list-separator {\n margin: 16px 12px 12px;\n transition: margin ${TRANSITION};\n\n &.collapsed {\n margin: 20px 12px;\n }\n\n @media (max-width: ${XL}) {\n margin: 20px 12px;\n }\n }\n\n .add-shortcut {\n cursor: pointer;\n\n .main-menu-item-text.main-menu-item-text {\n color: var(--color-secondary);\n }\n\n .main-menu-item-icon.main-menu-item-icon {\n fill: var(--color-secondary);\n opacity: 1;\n }\n\n &:hover {\n background-color: var(--color-primary-200);\n }\n\n &:focus {\n background-color: var(--color-primary-300);\n outline: none;\n }\n }\n\n /* HelpAndSupportMenu.js target \"tw:relative main-menu-item tw:shrink-0 tw:my-4 tw:hover:cursor-pointer\" */\n .main-menu-item.main-menu-help {\n position: relative;\n flex-shrink: 0;\n margin-top: 16px;\n margin-bottom: 16px;\n\n &:hover {\n cursor: pointer;\n }\n }\n\n .main-menu-help .main-menu-toggle.is-hidden {\n display: none;\n }\n\n /* HelpAndSupportMenu.js \"tw:bg-primary\": a promotion in place of Help & Support */\n .main-menu-item.main-menu-help--promo,\n .main-menu-item.main-menu-help--promo:hover,\n .main-menu-item.main-menu-help--promo.main-menu-item-current {\n background-color: var(--color-primary);\n }\n\n .main-menu-help-promo {\n display: flex;\n align-items: center;\n gap: 12px;\n }\n\n .main-menu-help-promo-icon {\n flex-shrink: 0;\n fill: var(--page-paper-main);\n }\n\n /* \"tw:flex tw:visible tw:sm:invisible tw:xl:visible\" */\n .main-menu-help-promo-text {\n display: flex;\n visibility: visible;\n\n @media (min-width: ${SM}) {\n visibility: hidden;\n }\n\n @media (min-width: ${XL}) {\n visibility: visible;\n }\n }\n\n /* \"new-features-badge tw:absolute tw:right-1 tw:top-4 tw:sm:top-0 tw:sm:left-0 tw:sm:right-auto tw:ml-auto tw:mr-2\" */\n .main-menu-help-badge.main-menu-help-badge {\n position: absolute;\n top: 16px;\n right: 4px;\n margin-right: 8px;\n margin-left: auto;\n\n @media (min-width: ${SM}) {\n top: 0;\n right: auto;\n left: 0;\n }\n\n &.is-promo {\n right: 6px;\n\n @media (min-width: ${SM}) {\n right: auto;\n }\n }\n\n &.is-static {\n @media (min-width: ${XL}) {\n position: static;\n }\n }\n }\n\n /* MainMenuItemsEditor.js \"tw:flex tw:flex-col tw:min-h-0 tw:grow tw:outline-none\" */\n .main-menu-editor {\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n min-height: 0;\n outline: none;\n }\n\n /* Editor/Header.js \"tw:mt-3\" */\n .main-menu-editor-header {\n margin-top: 12px;\n }\n\n .main-menu-editor-action {\n margin-right: 4px;\n }\n\n .main-menu-editor-list {\n display: flex;\n flex-grow: 1;\n min-height: 0;\n }\n\n .main-menu-editor-list-inner {\n overflow-x: hidden;\n }\n\n /* DraggableListItem.js \"tw:pr-3 tw:pl-2 tw:mt-0\" with marginBottom 2px */\n .main-menu-editor-row.c-list-item {\n margin: 0 0 2px;\n padding-right: 12px;\n padding-left: 8px;\n }\n\n .main-menu-editor-row-box {\n width: 100%;\n border-radius: var(--ac-br-8);\n }\n\n .main-menu-editor-row-inner {\n display: flex;\n align-items: center;\n width: 100%;\n }\n\n .main-menu-editor-handle {\n margin-right: 4px;\n cursor: move;\n }\n\n /* Editor/MainMenuItem.js \"main-menu-edit-item tw:h-10 tw:w-full tw:pr-1\" with maxWidth 204px */\n .main-menu-edit-item {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n max-width: 204px;\n height: 40px;\n padding-right: 4px;\n text-decoration: none;\n }\n\n .main-menu-edit-item-start {\n display: flex;\n align-items: center;\n min-width: 0;\n }\n\n .main-menu-edit-item.hidden {\n .main-menu-item-icon,\n .main-menu-item-text {\n opacity: 0.4;\n }\n }\n\n /* \"tw:flex tw:items-center tw:h-6 tw:mb-2 tw:mx-3 tw:px-3 menu-section-text\" */\n .main-menu-editor-shortcuts-title {\n display: flex;\n align-items: center;\n height: 24px;\n margin: 0 12px 8px;\n padding: 0 12px;\n }\n\n /* MainMenuMobile.js \"tw:absolute tw:right-4 tw:top-4 tw:sm:hidden\" */\n .main-menu-drawer-close {\n position: absolute;\n top: 16px;\n right: 16px;\n\n @media (min-width: ${SM}) {\n display: none;\n }\n }\n`;\n\nStyledMainMenu.displayName = \"StyledMainMenu\";\n\n/* HelpAndSupportMenu.js: \"tw:mt-3\" on the first item, \"tw:mb-3\" on the last, \"tw:shrink-0 tw:mr-3\" on the icons */\nexport const StyledHelpList = styled(List)`\n outline: 2px solid transparent;\n outline-offset: 2px;\n\n .c-list-item > svg:first-child {\n flex-shrink: 0;\n margin-right: 12px;\n }\n\n .c-list-item:first-child {\n margin-top: 12px;\n }\n\n .c-list-item:last-child {\n margin-bottom: 12px;\n }\n\n .main-menu-help-entry-text {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .main-menu-help-entry-badge {\n margin-left: auto;\n }\n\n /* an entry with a link: \"tw:no-underline\" */\n a.c-list-item {\n text-decoration: none;\n }\n\n .main-menu-help-entry.is-primary {\n color: var(--color-primary);\n\n > svg:first-child {\n fill: var(--color-primary);\n }\n }\n\n /* \"tw:justify-between tw:gap-3\" */\n .main-menu-help-entry-text.has-end {\n margin-right: 12px;\n }\n\n .main-menu-help-entry-end {\n flex-shrink: 0;\n margin-left: auto;\n }\n`;\n\nStyledHelpList.displayName = \"StyledHelpList\";\n\n/* FavoriteProjectsMenu.js \"tw:py-2\", FavoriteProjectMenuOption.js */\nexport const StyledFavoritesMenuList = styled(List)`\n padding: 8px 0;\n\n .c-list-item {\n padding-right: 0;\n padding-left: 0;\n }\n\n .favorite-project-menu-option {\n display: flex;\n align-items: center;\n justify-content: space-between;\n box-sizing: border-box;\n width: 100%;\n padding: 0 16px;\n color: var(--color-theme-900);\n text-decoration: none;\n\n svg {\n flex-shrink: 0;\n margin-right: 8px;\n opacity: 0.5;\n }\n\n &.favorite-project-menu-option-active {\n background-color: var(--color-secondary-200);\n\n svg {\n fill: var(--color-secondary);\n }\n\n .favorite-project-menu-option-text {\n color: var(--color-secondary);\n }\n }\n }\n\n .favorite-project-menu-option-text {\n flex: 1;\n padding-right: 8px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n`;\n\nStyledFavoritesMenuList.displayName = \"StyledFavoritesMenuList\";\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,iBAAiB,QAAQ,mBAAmB;AAE7D,SAASC,cAAc,QAAQ,mBAAmB;AAClD,SAASC,IAAI,QAAQ,SAAS;AAE9B,OAAO,MAAMC,EAAE,GAAG,OAAO;AACzB,OAAO,MAAMC,EAAE,GAAG,QAAQ;AAC1B,OAAO,MAAMC,aAAa,oBAAkBD,EAAE,MAAG;AACjD,OAAO,MAAME,eAAe,GAAG,EAAE;AACjC,OAAO,MAAMC,cAAc,GAAG,GAAG;AAEjC,MAAMC,UAAU,GAAG,YAAY;AAC/B,MAAMC,iBAAiB,GAAG,8CAA8C;;AAExE;AACA,OAAO,MAAMC,mBAAmB,GAAGV,iBAAiB,iDAInD;AAED,OAAO,MAAMW,cAAc,GAAGZ,MAAM,CAACa,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,8yWACpCd,cAAc,EAYOE,EAAE,EAWdI,cAAc,EAIdD,eAAe,EAKJE,UAAU,EAETJ,EAAE,EACZE,eAAe,EAKjBC,cAAc,EAWdD,eAAe,EAUfC,cAAc,EAEZA,cAAc,GAAGD,eAAe,EA0BlCC,cAAc,GAAG,EAAE,EA8BPC,UAAU,EAUbA,UAAU,EAIRA,UAAU,EAGPJ,EAAE,EA4BJA,EAAE,EA4BWK,iBAAiB,EA2D7BD,UAAU,EAoCbJ,EAAE,EAkDDI,UAAU,EAkHZA,UAAU,EAuCTJ,EAAE,EA+CAA,EAAE,EA0CTK,iBAAiB,EAeVL,EAAE,EAmBLI,UAAU,EAKVA,UAAU,EAaPJ,EAAE,EAcFA,EAAE,EAwCFA,EAAE,EAOFI,UAAU,EAMVJ,EAAE,EAkEFD,EAAE,EAIFC,EAAE,EAaFD,EAAE,EASAA,EAAE,EAMFC,EAAE,EAiGJD,EAAE,CAI1B;AAEDQ,cAAc,CAACG,WAAW,GAAG,gBAAgB;;AAE7C;AACA,OAAO,MAAME,cAAc,GAAGjB,MAAM,CAACG,IAAI,CAAC,CAAAW,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,ilBAiDzC;AAEDC,cAAc,CAACF,WAAW,GAAG,gBAAgB;;AAE7C;AACA,OAAO,MAAMG,uBAAuB,GAAGlB,MAAM,CAACG,IAAI,CAAC,CAAAW,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,8lBA4ClD;AAEDE,uBAAuB,CAACH,WAAW,GAAG,yBAAyB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"Styles.js","names":["styled","createGlobalStyle","BoxSizingStyle","List","SM","XL","NARROW_SCREEN","COLLAPSED_WIDTH","EXPANDED_WIDTH","TRANSITION","TOGGLE_TRANSITION","MainMenuGlobalStyle","StyledMainMenu","div","withConfig","displayName","componentId","StyledHelpList","StyledSettingsList","StyledFavoritesMenuList"],"sources":["../../../../src/components/MainMenu/Styles.ts"],"sourcesContent":["import styled, { createGlobalStyle } from \"styled-components\";\n\nimport { BoxSizingStyle } from \"../BoxSizingStyle\";\nimport { List } from \"../List\";\n\nexport const SM = \"640px\";\nexport const XL = \"1280px\";\nexport const NARROW_SCREEN = `(max-width: ${XL})`;\nexport const COLLAPSED_WIDTH = 72;\nexport const EXPANDED_WIDTH = 240;\n\nconst TRANSITION = \"200ms ease\";\nconst TOGGLE_TRANSITION = \"transform 200ms cubic-bezier(0.4, 0, 0.2, 1)\";\n\n// The popper of a menu sits in a portal, out of reach of the menu styles.\nexport const MainMenuGlobalStyle = createGlobalStyle`\n .c-main-menu-favorites-popper {\n padding: 4px;\n }\n`;\n\nexport const StyledMainMenu = styled.div`\n ${BoxSizingStyle}\n\n /* MainMenu.js \"tw:relative tw:left-2.5 tw:hidden tw:sm:flex tw:flex-col tw:h-full tw:mr-1 tw:shrink-0\" */\n &.c-main-menu--desktop {\n position: relative;\n left: 10px;\n display: none;\n flex-direction: column;\n flex-shrink: 0;\n height: 100%;\n margin-right: 4px;\n\n @media (min-width: ${SM}) {\n display: flex;\n }\n }\n\n /* MainMenuMobile.js \"tw:flex-col tw:h-full tw:w-60\": a block, as wide as the drawer */\n &.c-main-menu--drawer {\n height: 100%;\n }\n\n &.expanded {\n width: ${EXPANDED_WIDTH}px;\n }\n\n &.collapsed {\n width: ${COLLAPSED_WIDTH}px;\n }\n\n &.expanded,\n &.collapsed {\n transition: width ${TRANSITION};\n\n @media (max-width: ${XL}) {\n width: ${COLLAPSED_WIDTH}px;\n }\n }\n\n &.c-main-menu--drawer.c-main-menu--drawer {\n width: ${EXPANDED_WIDTH}px;\n }\n\n &.main-menu-instant-width {\n transition: none;\n }\n\n .main-menu-panel {\n display: flex;\n flex: 1;\n flex-direction: column;\n min-height: 0;\n }\n\n &.main-menu-peek {\n width: ${COLLAPSED_WIDTH}px;\n }\n\n /* The menu sits 10px from the edge, so the backdrop reaches back to cover that strip too. */\n &.main-menu-peek .main-menu-panel {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n z-index: 0;\n width: ${EXPANDED_WIDTH}px;\n clip-path: inset(\n -100px ${EXPANDED_WIDTH - COLLAPSED_WIDTH}px -100px -100px\n );\n transition: clip-path 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);\n\n &::before {\n content: \"\";\n position: absolute;\n inset: 0 0 0 -10px;\n z-index: -1;\n background-color: var(--body-bg-main);\n box-shadow: var(--shadow-popover);\n }\n }\n\n &.main-menu-peek-open .main-menu-panel {\n clip-path: inset(-100px);\n }\n\n /* A clipped part of the panel takes no pointer, so this strip holds the hover while the clip opens. */\n &.main-menu-peek::after {\n content: \"\";\n position: absolute;\n top: 0;\n bottom: 0;\n left: -10px;\n z-index: -1;\n width: ${EXPANDED_WIDTH + 10}px;\n }\n\n @media (prefers-reduced-motion: reduce) {\n &.main-menu-peek .main-menu-panel {\n transition-duration: 1ms;\n }\n }\n\n /* \"main-menu-header tw:-left-2.5 tw:flex tw:items-center tw:overflow-hidden\" */\n .main-menu-header {\n position: relative;\n display: flex;\n align-items: center;\n height: 68px;\n overflow: hidden;\n }\n\n &.c-main-menu--desktop .main-menu-header {\n left: -10px;\n }\n\n /* On hover the logo takes the hover color of the menu items. */\n .main-logo-url {\n position: absolute;\n left: 30px;\n color: var(--color-secondary);\n\n path {\n fill: var(--color-secondary);\n transition: fill ${TRANSITION};\n }\n\n &:hover path,\n &:focus-visible path {\n fill: var(--color-theme-900);\n }\n }\n\n .main-logo-long {\n transition: all ${TRANSITION};\n\n #logotype {\n opacity: 1;\n transition: all ${TRANSITION};\n will-change: opacity, transform;\n\n @media (max-width: ${XL}) {\n opacity: 0;\n transform: translateX(-5%);\n }\n }\n }\n\n .main-logo-long__collapsed #logotype {\n opacity: 0;\n transform: translateX(-5%);\n }\n\n /* Opacity, not visibility: a hidden button cannot take the focus, so Tab would skip it. */\n .main-menu-edit-button.main-menu-edit-button {\n opacity: 0;\n transition: opacity ${TRANSITION};\n }\n\n /* MainMenu.js \"tw:absolute tw:right-1.5 tw:-translate-y-0.5\" and the theme-500 icon */\n .main-menu-header .main-menu-edit-button.main-menu-edit-button {\n position: absolute;\n right: 6px;\n transform: translateY(-2px);\n\n svg {\n fill: var(--color-theme-500);\n }\n\n &:hover svg,\n &:focus-visible svg {\n fill: var(--color-theme-900);\n }\n }\n\n /* An open popover sits outside the menu, so the button stays visible while the pointer is on the popover. */\n &:hover .main-menu-edit-button.main-menu-edit-button,\n &:has(:focus-visible) .main-menu-edit-button.main-menu-edit-button,\n &.touch .main-menu-edit-button.main-menu-edit-button,\n .main-menu-edit-button.main-menu-edit-button[aria-expanded=\"true\"] {\n opacity: 1;\n }\n\n @media (hover: none) {\n .main-menu-edit-button.main-menu-edit-button {\n opacity: 1;\n }\n }\n\n /* With Auto-Expand the compact menu shows Settings in the header of the open peek, so here it stays out of the tab order. */\n &.collapsed.main-menu-can-peek .main-menu-edit-button.main-menu-edit-button {\n visibility: hidden;\n }\n\n /* Without Auto-Expand the compact menu shows Settings as a tab on its left edge, which opens on hover, so the logo keeps its place. */\n &.collapsed:not(.main-menu-can-peek)\n .main-menu-header\n .main-menu-edit-button.main-menu-edit-button {\n top: 18px;\n right: auto;\n left: 0;\n z-index: 1;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n width: 4px;\n min-width: 0;\n height: 27px;\n padding: 0;\n overflow: visible;\n border: 0;\n border-radius: 0 4px 4px 0;\n background: var(--color-theme-500);\n opacity: 1;\n transform: none;\n transition: top 180ms ease, width 180ms ease, height 180ms ease,\n border-radius 180ms ease, box-shadow 180ms ease;\n\n /* The hover zone is wider than the strip, as the old 30px tab was. */\n &::before {\n content: \"\";\n position: absolute;\n inset: -10px -22px -10px 0;\n }\n\n svg {\n flex-shrink: 0;\n opacity: 0;\n transition: opacity 150ms ease;\n }\n\n &:hover,\n &:focus-visible,\n &[aria-expanded=\"true\"] {\n top: 12px;\n width: 40px;\n height: 39px;\n padding: 0 9px 0 0;\n border: 1px solid var(--popover-border);\n border-left: 0;\n border-radius: 0 10px 10px 0;\n background: linear-gradient(\n 180deg,\n var(--page-paper-main),\n color-mix(in srgb, var(--page-paper-main) 92%, var(--color-theme-500))\n );\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.14), 0 4px 14px rgba(0, 0, 0, 0.145),\n inset 0 1px 0 rgba(255, 255, 255, 0.07);\n\n svg {\n opacity: 1;\n }\n }\n }\n\n @media (max-width: ${XL}) {\n &:not(.c-main-menu--drawer) .main-menu-edit-button.main-menu-edit-button {\n visibility: hidden;\n }\n }\n\n /* \"tw:flex tw:flex-col tw:grow tw:flex-1 tw:h-full tw:overflow-y-auto\" */\n .main-menu-socket {\n display: flex;\n flex: 1 1 0%;\n flex-direction: column;\n height: 100%;\n overflow-y: auto;\n }\n\n /* MainMenuMobile.js \"tw:h-[calc(100dvh-72px)]\" */\n &.c-main-menu--drawer .main-menu-socket {\n height: calc(100dvh - 72px);\n }\n\n /* MainMenuItems.js \"tw:flex tw:min-h-0 tw:grow\" around the scrollbars, and \"tw:my-3 tw:overflow-x-hidden\" */\n .main-menu-items {\n display: flex;\n flex-grow: 1;\n min-height: 0;\n }\n\n .main-menu-items-inner {\n margin: 12px 0;\n overflow-x: hidden;\n }\n\n .main-menu-item-icon {\n flex-shrink: 0;\n fill: var(--color-theme-700);\n opacity: 0.7;\n }\n\n /* MainMenuItemWrapper.js \"main-menu-item tw:flex tw:items-center tw:no-underline tw:h-10 tw:pl-3 tw:pr-1 tw:mx-3\" */\n .main-menu-item {\n display: flex;\n align-items: center;\n height: 40px;\n margin: 0 12px 2px;\n padding: 0 4px 0 12px;\n border-radius: var(--ac-br-8);\n text-decoration: none;\n\n &:hover {\n background-color: var(--color-theme-300);\n transition: all ${TRANSITION};\n\n .main-menu-item-icon {\n fill: var(--color-theme-900);\n opacity: 1;\n }\n\n .main-menu-item-text {\n color: var(--color-theme-900);\n }\n }\n\n &.main-menu-item-current {\n background-color: var(--color-secondary-200);\n\n .main-menu-item-icon {\n fill: var(--color-secondary);\n opacity: 1;\n }\n\n .main-menu-item-text {\n color: var(--color-secondary);\n }\n }\n }\n\n .main-menu-item--between {\n justify-content: space-between;\n }\n\n .main-menu-item-start {\n display: flex;\n align-items: center;\n }\n\n /* MainMenuItemInner.js \"tw:ml-3 tw:truncate tw:min-w-0\" */\n .main-menu-item-label {\n min-width: 0;\n margin-left: 12px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .main-menu-projects {\n position: relative;\n }\n\n /* FavoriteProjectOption.js */\n .main-menu-subnav.main-menu-subnav {\n padding: 2px 0;\n\n .main-menu-subnav-item {\n margin: 0;\n padding-right: 0;\n padding-left: 0;\n\n &:hover {\n background-color: unset;\n }\n }\n\n .main-menu-subnav-item-icon {\n flex-shrink: 0;\n margin-right: 8px;\n opacity: 0.5;\n fill: var(--color-theme-700);\n }\n\n .main-menu-subnav-item-text {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .main-menu-item {\n width: 100%;\n min-width: 0;\n height: 32px;\n margin-right: 12px;\n margin-left: 22px;\n padding: 8px;\n }\n\n .main-menu-item:hover {\n .main-menu-subnav-item-icon {\n fill: var(--color-theme-900);\n }\n\n .main-menu-subnav-item-text {\n color: var(--color-theme-900);\n }\n }\n\n .main-menu-subnav-item-active,\n .main-menu-subnav-item-active:hover {\n background-color: var(--color-secondary-200);\n\n .main-menu-subnav-item-icon {\n fill: var(--color-secondary);\n }\n\n .main-menu-subnav-item-text {\n color: var(--color-secondary);\n }\n }\n }\n\n .menu-section-text {\n opacity: 0.7;\n }\n\n .main-menu-item-text,\n .menu-section {\n transition: all ${TRANSITION};\n }\n\n /* \"tw:mb-2 tw:mx-3 tw:pl-3 tw:pr-1 tw:flex tw:justify-between tw:items-center menu-section\" */\n .menu-section {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin: 0 12px 8px;\n padding: 0 4px 0 12px;\n /* The height clips the heading as it opens and closes, so its text is never squeezed. The 4px keep a focus ring. */\n clip-path: inset(-4px);\n }\n\n &.expanded {\n .main-menu-item-text {\n opacity: 1;\n visibility: visible;\n }\n\n .menu-section {\n max-height: 32px;\n opacity: 1;\n }\n }\n\n &.collapsed {\n .main-menu-item-text {\n opacity: 0;\n visibility: hidden;\n }\n\n /* The heading keeps its height, so the items under it stay in place when the compact menu opens on hover. */\n .menu-section {\n max-height: 32px;\n opacity: 0;\n visibility: hidden;\n }\n }\n\n @media (max-width: ${XL}) {\n &.collapsed .menu-section,\n &.expanded .menu-section {\n max-height: 0;\n opacity: 0;\n }\n\n &.collapsed .main-menu-item-text,\n &.expanded .main-menu-item-text {\n width: 0;\n opacity: 0;\n visibility: hidden;\n }\n\n /* The narrow screen collapses the sidebar, never the drawer. */\n &.c-main-menu--drawer.expanded {\n .menu-section {\n max-height: 32px;\n opacity: 1;\n }\n\n .main-menu-item-text {\n width: auto;\n opacity: 1;\n visibility: visible;\n }\n }\n }\n\n /* FavoriteProjectsMenu.js target */\n .favorite-projects-menu-target {\n position: absolute;\n top: 0;\n right: 0;\n z-index: 1;\n display: none;\n align-items: center;\n justify-content: center;\n width: 10px;\n height: 40px;\n border-radius: 4px;\n cursor: pointer;\n\n &.collapsed {\n display: flex;\n }\n\n @media (max-width: ${XL}) {\n display: flex;\n }\n\n svg {\n transform: rotate(180deg);\n }\n }\n\n &.main-menu-can-peek:not(.main-menu-peek-open)\n .favorite-projects-menu-target {\n display: none;\n }\n\n /* Where the drawer toggle sits in the expanded menu. */\n &.main-menu-peek-open .favorite-projects-menu-target.collapsed {\n top: 8px;\n right: 16px;\n width: 24px;\n height: 24px;\n }\n\n .favorite-projects-menu-target:hover {\n background-color: var(--color-theme-300);\n\n svg {\n fill: var(--color-theme-900);\n }\n }\n\n .main-menu-item-current + .favorite-projects-menu-target:hover,\n .favorite-projects-menu-target.open {\n background-color: var(--color-secondary-200);\n\n svg {\n fill: var(--color-secondary);\n }\n }\n\n /* ExpandToggle.jsx \"tw:transition-transform tw:duration-200\", up when expanded */\n .main-menu-toggle {\n flex-shrink: 0;\n transition: ${TOGGLE_TRANSITION};\n\n &.is-closed {\n transform: rotate(180deg);\n }\n }\n\n .favorite-projects-list,\n .favorite-projects-list-target {\n display: flex;\n\n &.collapsed {\n display: none;\n }\n\n @media (max-width: ${XL}) {\n display: none;\n }\n }\n\n .favorite-projects-list-target {\n margin-left: auto;\n }\n\n &.c-main-menu--drawer {\n .favorite-projects-list.favorite-projects-list,\n .favorite-projects-list-target.is-mobile {\n display: flex;\n }\n }\n\n .favorite-projects-list {\n opacity: 1;\n overflow: hidden;\n transition: all ${TRANSITION};\n }\n\n .favorite-projects-list-collapsed {\n opacity: 0;\n transition: all ${TRANSITION};\n }\n\n /* HiddenOptionList.js */\n .show-hidden-options-long {\n display: block;\n margin: 12px 24px;\n cursor: pointer;\n\n &.collapsed {\n display: none;\n }\n\n @media (max-width: ${XL}) {\n display: none;\n }\n }\n\n .show-hidden-options-short {\n display: none;\n margin: 12px 0;\n cursor: pointer;\n\n &.collapsed {\n display: block;\n }\n\n @media (max-width: ${XL}) {\n display: block;\n }\n }\n\n &.c-main-menu--drawer {\n .show-hidden-options-long.show-hidden-options-long {\n display: block;\n }\n\n .show-hidden-options-short.show-hidden-options-short {\n display: none;\n }\n }\n\n /* Shortcuts/List.js */\n .main-menu-shortcuts {\n position: relative;\n }\n\n .shortcuts-expander {\n margin-left: auto;\n cursor: pointer;\n }\n\n .shortcuts-expander-collapsed {\n position: absolute;\n top: -11px;\n right: 0;\n left: 0;\n display: none;\n margin: 0 auto;\n border-radius: 100%;\n background-color: var(--body-bg-main);\n cursor: pointer;\n\n &.collapsed {\n display: block;\n }\n\n @media (max-width: ${XL}) {\n display: block;\n }\n }\n\n /* The same margins in both widths, so the shortcuts do not move when the compact menu opens on hover. */\n .shortcuts-list-separator.c-list-separator {\n margin: 16px 12px 12px;\n transition: margin ${TRANSITION};\n\n @media (max-width: ${XL}) {\n margin: 20px 12px;\n }\n }\n\n .add-shortcut {\n cursor: pointer;\n\n .main-menu-item-text.main-menu-item-text {\n color: var(--color-secondary);\n }\n\n .main-menu-item-icon.main-menu-item-icon {\n fill: var(--color-secondary);\n opacity: 1;\n }\n\n &:hover {\n background-color: var(--color-primary-200);\n }\n\n &:focus {\n background-color: var(--color-primary-300);\n outline: none;\n }\n }\n\n /* HelpAndSupportMenu.js target \"tw:relative main-menu-item tw:shrink-0 tw:my-4 tw:hover:cursor-pointer\" */\n .main-menu-item.main-menu-help {\n position: relative;\n flex-shrink: 0;\n margin-top: 16px;\n margin-bottom: 16px;\n\n &:hover {\n cursor: pointer;\n }\n }\n\n .main-menu-help .main-menu-toggle.is-hidden {\n display: none;\n }\n\n /* HelpAndSupportMenu.js \"tw:bg-primary\": a promotion in place of Help & Support */\n .main-menu-item.main-menu-help--promo,\n .main-menu-item.main-menu-help--promo:hover,\n .main-menu-item.main-menu-help--promo.main-menu-item-current {\n background-color: var(--color-primary);\n }\n\n .main-menu-help-promo {\n display: flex;\n align-items: center;\n gap: 12px;\n }\n\n .main-menu-help-promo-icon {\n flex-shrink: 0;\n fill: var(--page-paper-main);\n }\n\n /* \"tw:flex tw:visible tw:sm:invisible tw:xl:visible\" */\n .main-menu-help-promo-text {\n display: flex;\n visibility: visible;\n\n @media (min-width: ${SM}) {\n visibility: hidden;\n }\n\n @media (min-width: ${XL}) {\n visibility: visible;\n }\n }\n\n /* \"new-features-badge tw:absolute tw:right-1 tw:top-4 tw:sm:top-0 tw:sm:left-0 tw:sm:right-auto tw:ml-auto tw:mr-2\" */\n .main-menu-help-badge.main-menu-help-badge {\n position: absolute;\n top: 16px;\n right: 4px;\n margin-right: 8px;\n margin-left: auto;\n\n @media (min-width: ${SM}) {\n top: 0;\n right: auto;\n left: 0;\n }\n\n &.is-promo {\n right: 6px;\n\n @media (min-width: ${SM}) {\n right: auto;\n }\n }\n\n &.is-static {\n @media (min-width: ${XL}) {\n position: static;\n }\n }\n }\n\n /* MainMenuItemsEditor.js \"tw:flex tw:flex-col tw:min-h-0 tw:grow tw:outline-none\" */\n .main-menu-editor {\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n min-height: 0;\n outline: none;\n }\n\n /* Editor/Header.js \"tw:mt-3\" */\n .main-menu-editor-header {\n margin-top: 12px;\n }\n\n .main-menu-editor-action {\n margin-right: 4px;\n }\n\n .main-menu-editor-list {\n display: flex;\n flex-grow: 1;\n min-height: 0;\n }\n\n .main-menu-editor-list-inner {\n overflow-x: hidden;\n }\n\n /* DraggableListItem.js \"tw:pr-3 tw:pl-2 tw:mt-0\" with marginBottom 2px */\n .main-menu-editor-row.c-list-item {\n margin: 0 0 2px;\n padding-right: 12px;\n padding-left: 8px;\n }\n\n .main-menu-editor-row-box {\n width: 100%;\n border-radius: var(--ac-br-8);\n }\n\n .main-menu-editor-row-inner {\n display: flex;\n align-items: center;\n width: 100%;\n }\n\n .main-menu-editor-handle {\n margin-right: 4px;\n cursor: move;\n }\n\n /* Editor/MainMenuItem.js \"main-menu-edit-item tw:h-10 tw:w-full tw:pr-1\" with maxWidth 204px */\n .main-menu-edit-item {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n max-width: 204px;\n height: 40px;\n padding-right: 4px;\n text-decoration: none;\n }\n\n .main-menu-edit-item-start {\n display: flex;\n align-items: center;\n min-width: 0;\n }\n\n .main-menu-edit-item.hidden {\n .main-menu-item-icon,\n .main-menu-item-text {\n opacity: 0.4;\n }\n }\n\n /* \"tw:flex tw:items-center tw:h-6 tw:mb-2 tw:mx-3 tw:px-3 menu-section-text\" */\n .main-menu-editor-shortcuts-title {\n display: flex;\n align-items: center;\n height: 24px;\n margin: 0 12px 8px;\n padding: 0 12px;\n }\n\n /* MainMenuMobile.js \"tw:absolute tw:right-4 tw:top-4 tw:sm:hidden\" */\n .main-menu-drawer-close {\n position: absolute;\n top: 16px;\n right: 16px;\n\n @media (min-width: ${SM}) {\n display: none;\n }\n }\n`;\n\nStyledMainMenu.displayName = \"StyledMainMenu\";\n\n/* HelpAndSupportMenu.js: \"tw:mt-3\" on the first item, \"tw:mb-3\" on the last, \"tw:shrink-0 tw:mr-3\" on the icons */\nexport const StyledHelpList = styled(List)`\n outline: 2px solid transparent;\n outline-offset: 2px;\n\n .c-list-item > svg:first-child {\n flex-shrink: 0;\n margin-right: 12px;\n }\n\n .c-list-item:first-child {\n margin-top: 12px;\n }\n\n .c-list-item:last-child {\n margin-bottom: 12px;\n }\n\n .main-menu-help-entry-text {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .main-menu-help-entry-badge {\n margin-left: auto;\n }\n\n /* an entry with a link: \"tw:no-underline\" */\n a.c-list-item {\n text-decoration: none;\n }\n\n .main-menu-help-entry.is-primary {\n color: var(--color-primary);\n\n > svg:first-child {\n fill: var(--color-primary);\n }\n }\n\n /* \"tw:justify-between tw:gap-3\" */\n .main-menu-help-entry-text.has-end {\n margin-right: 12px;\n }\n\n .main-menu-help-entry-end {\n flex-shrink: 0;\n margin-left: auto;\n }\n`;\n\nStyledHelpList.displayName = \"StyledHelpList\";\n\nexport const StyledSettingsList = styled(List)`\n outline: 2px solid transparent;\n outline-offset: 2px;\n\n .c-list-item:first-child {\n margin-top: 12px;\n }\n\n .c-list-item:last-child {\n margin-bottom: 12px;\n }\n\n .main-menu-settings-row {\n justify-content: space-between;\n gap: 12px;\n }\n\n .main-menu-settings-text {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n /* The row takes the click, so the control only shows the state. */\n .main-menu-settings-control {\n flex-shrink: 0;\n pointer-events: none;\n }\n`;\n\nStyledSettingsList.displayName = \"StyledSettingsList\";\n\n/* FavoriteProjectsMenu.js \"tw:py-2\", FavoriteProjectMenuOption.js */\nexport const StyledFavoritesMenuList = styled(List)`\n padding: 8px 0;\n\n .c-list-item {\n padding-right: 0;\n padding-left: 0;\n }\n\n .favorite-project-menu-option {\n display: flex;\n align-items: center;\n justify-content: space-between;\n box-sizing: border-box;\n width: 100%;\n padding: 0 16px;\n color: var(--color-theme-900);\n text-decoration: none;\n\n svg {\n flex-shrink: 0;\n margin-right: 8px;\n opacity: 0.5;\n }\n\n &.favorite-project-menu-option-active {\n background-color: var(--color-secondary-200);\n\n svg {\n fill: var(--color-secondary);\n }\n\n .favorite-project-menu-option-text {\n color: var(--color-secondary);\n }\n }\n }\n\n .favorite-project-menu-option-text {\n flex: 1;\n padding-right: 8px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n`;\n\nStyledFavoritesMenuList.displayName = \"StyledFavoritesMenuList\";\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,iBAAiB,QAAQ,mBAAmB;AAE7D,SAASC,cAAc,QAAQ,mBAAmB;AAClD,SAASC,IAAI,QAAQ,SAAS;AAE9B,OAAO,MAAMC,EAAE,GAAG,OAAO;AACzB,OAAO,MAAMC,EAAE,GAAG,QAAQ;AAC1B,OAAO,MAAMC,aAAa,oBAAkBD,EAAE,MAAG;AACjD,OAAO,MAAME,eAAe,GAAG,EAAE;AACjC,OAAO,MAAMC,cAAc,GAAG,GAAG;AAEjC,MAAMC,UAAU,GAAG,YAAY;AAC/B,MAAMC,iBAAiB,GAAG,8CAA8C;;AAExE;AACA,OAAO,MAAMC,mBAAmB,GAAGV,iBAAiB,iDAInD;AAED,OAAO,MAAMW,cAAc,GAAGZ,MAAM,CAACa,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,6kVACpCd,cAAc,EAYOE,EAAE,EAWdI,cAAc,EAIdD,eAAe,EAKJE,UAAU,EAETJ,EAAE,EACZE,eAAe,EAKjBC,cAAc,EAedD,eAAe,EAUfC,cAAc,EAEZA,cAAc,GAAGD,eAAe,EA0BlCC,cAAc,GAAG,EAAE,EA8BPC,UAAU,EAUbA,UAAU,EAIRA,UAAU,EAGPJ,EAAE,EAeHI,UAAU,EAmGbJ,EAAE,EAkDDI,UAAU,EAkHZA,UAAU,EAyCTJ,EAAE,EA+C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
@@ -74,9 +74,6 @@ const isPointerOverMenu = (root, event) => {
|
|
|
74
74
|
// The menu sits on the left edge of the page, so the gutter on its left counts too.
|
|
75
75
|
return event.clientX < right && event.clientY >= top && event.clientY < bottom;
|
|
76
76
|
};
|
|
77
|
-
|
|
78
|
-
// The pointer on the tab of a closed menu must not open the peek, because the click there changes the mode.
|
|
79
|
-
const isOnTabOfClosedMenu = (root, event) => !(root != null && root.classList.contains("main-menu-peek")) && Boolean(event.target.closest == null ? void 0 : event.target.closest(".main-menu-collapse-tab"));
|
|
80
77
|
export const usePointerInside = (rootRef, isWatching) => {
|
|
81
78
|
const _useState4 = useState(false),
|
|
82
79
|
isInside = _useState4[0],
|
|
@@ -99,11 +96,7 @@ export const usePointerInside = (rootRef, isWatching) => {
|
|
|
99
96
|
leaveTimer.current = setTimeout(() => setIsInside(false), LEAVE_DELAY_MS);
|
|
100
97
|
}
|
|
101
98
|
};
|
|
102
|
-
const handleOver = event =>
|
|
103
|
-
if (!isOnTabOfClosedMenu(rootRef.current, event)) {
|
|
104
|
-
update(isPointerOverMenu(rootRef.current, event));
|
|
105
|
-
}
|
|
106
|
-
};
|
|
99
|
+
const handleOver = event => update(isPointerOverMenu(rootRef.current, event));
|
|
107
100
|
const handleOut = event => {
|
|
108
101
|
if (!event.relatedTarget) {
|
|
109
102
|
update(false);
|