Skip to content

Commit

Permalink
website: fix a build error
Browse files Browse the repository at this point in the history
  • Loading branch information
alirezamirian committed Oct 25, 2024
1 parent 6fa9e58 commit 6de51ab
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 15 deletions.
3 changes: 2 additions & 1 deletion packages/example-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"@intellij-platform/core/utils/array-utils": "@intellij-platform/core/src/utils/array-utils",
"@intellij-platform/core/utils/useEventCallback": "@intellij-platform/core/src/utils/useEventCallback",
"@intellij-platform/core/StyledSeparator": "@intellij-platform/core/src/StyledSeparator",
"@intellij-platform/core/List/StyledListItem": "@intellij-platform/core/src/List/StyledListItem"
"@intellij-platform/core/List/StyledListItem": "@intellij-platform/core/src/List/StyledListItem",
"@intellij-platform/core/Popup/StyledPopupContainer": "@intellij-platform/core/src/Popup/StyledPopupContainer"
},
"dependencies": {
"@intellij-platform/core": "workspace:^",
Expand Down
2 changes: 1 addition & 1 deletion packages/example-app/src/ProjectInitializer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
ProgressBar,
styled,
} from "@intellij-platform/core";
import { StyledPopupContainer } from "@intellij-platform/core/Popup/Popup";
import { StyledPopupContainer } from "@intellij-platform/core/Popup/StyledPopupContainer";

const defaultWorkspaceFiles = {
".idea/vcs.xml": `<?xml version="1.0" encoding="UTF-8"?>
Expand Down
15 changes: 3 additions & 12 deletions packages/jui/src/Popup/Popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ import { filterDOMProps, useObjectRef } from "@react-aria/utils";
import { pipe } from "ramda";

import {
areInNestedOverlays,
ensureInViewport,
Overlay,
OverlayInteractionHandler,
OverlayResizeHandles,
position,
ResizableMovableOverlayOptions,
useResizableMovableOverlay,
} from "@intellij-platform/core/Overlay";
import { styled } from "@intellij-platform/core/styled";
import { WINDOW_SHADOW } from "@intellij-platform/core/style-constants";
import { areInNestedOverlays, Overlay } from "@intellij-platform/core/Overlay";
import { mergeNonNullProps } from "@intellij-platform/core/utils/mergeNonNullProps";
import { useFocusForwarder } from "@intellij-platform/core/utils/useFocusForwarder";

Expand All @@ -25,16 +25,7 @@ import { PopupHeader } from "./PopupHeader";
import { PopupContext, PopupControllerContext } from "./PopupContext";
import { PopupLayout } from "./PopupLayout";
import { StyledPopupHint } from "./StyledPopupHint";

export const StyledPopupContainer = styled.div`
position: fixed;
box-sizing: border-box;
// not checked if there should be a better substitute for * in the following colors. Maybe "Component"?
background-color: ${({ theme }) => theme.color("*.background")};
color: ${({ theme }) => theme.color("*.foreground")};
outline: none; // Focus will be reflected in header. No need for outline or any other focus style on the container
${WINDOW_SHADOW}; // FIXME: OS-dependant style?
`;
import { StyledPopupContainer } from "@intellij-platform/core/Popup/StyledPopupContainer";

/**
* only needed for setting overflow to hidden to make sure nothing will overflow a window under any circumstances.
Expand Down
12 changes: 12 additions & 0 deletions packages/jui/src/Popup/StyledPopupContainer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { WINDOW_SHADOW } from "@intellij-platform/core/style-constants";
import { styled } from "@intellij-platform/core/styled";

export const StyledPopupContainer = styled.div`
position: fixed;
box-sizing: border-box;
// not checked if there should be a better substitute for * in the following colors. Maybe "Component"?
background-color: ${({ theme }) => theme.color("*.background")};
color: ${({ theme }) => theme.color("*.foreground")};
outline: none; // Focus will be reflected in header. No need for outline or any other focus style on the container
${WINDOW_SHADOW}; // FIXME: OS-dependant style?
`;
2 changes: 1 addition & 1 deletion packages/jui/src/Toolbar/Toolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import {
import { useOverflowObserver } from "@intellij-platform/core/utils/overflow-utils/useOverflowObserver";
import { PlatformIcon } from "@intellij-platform/core/Icon";
import { Overlay, useOverlayPosition } from "@react-aria/overlays";
import { StyledPopupContainer } from "@intellij-platform/core/Popup/Popup";
import { mergeProps } from "@react-aria/utils";
import { StyledPopupContainer } from "@intellij-platform/core/Popup/StyledPopupContainer";

type ToolbarBorderProp =
| true
Expand Down

0 comments on commit 6de51ab

Please sign in to comment.