Skip to content

Commit

Permalink
[core] fix: restore PopoverPosition value export (#6467)
Browse files Browse the repository at this point in the history
  • Loading branch information
adidahiya authored Oct 16, 2023
1 parent 8724417 commit 543891e
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 79 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ export type { IPanel, IPanelProps } from "./panel-stack/panelProps";
export { PanelStack2, type PanelStack2Props } from "./panel-stack2/panelStack2";
export type { Panel, PanelProps } from "./panel-stack2/panelTypes";
export { type PopoverProps, Popover, PopoverInteractionKind } from "./popover/popover";
export { PopoverPosition } from "./popover/popoverPosition";
export type {
DefaultPopoverTargetHTMLProps,
PopoverPosition,
PopoverSharedProps,
PopoverTargetProps,
PopoverClickTargetHandlers,
Expand Down
67 changes: 0 additions & 67 deletions packages/core/src/components/popover/popoverMigrationUtils.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import type { Placement } from "@popperjs/core";

import { PopoverPosition } from "./popoverSharedProps";
import { PopoverPosition } from "./popoverPosition";

/**
* Convert a position to a placement.
Expand Down
26 changes: 26 additions & 0 deletions packages/core/src/components/popover/popoverPosition.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Copyright 2023 Palantir Technologies, Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import { Position } from "../../common";

export const PopoverPosition = {
...Position,
AUTO: "auto" as "auto",
AUTO_END: "auto-end" as "auto-end",
AUTO_START: "auto-start" as "auto-start",
};
// eslint-disable-next-line @typescript-eslint/no-redeclare
export type PopoverPosition = (typeof PopoverPosition)[keyof typeof PopoverPosition];
12 changes: 2 additions & 10 deletions packages/core/src/components/popover/popoverSharedProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,9 @@ import type { Boundary, Modifier, Placement, RootBoundary, StrictModifiers } fro
import type * as React from "react";
import type { StrictModifier } from "react-popper";

import { Position, Props } from "../../common";
import type { Props } from "../../common";
import type { OverlayableProps } from "../overlay/overlay";

export const PopoverPosition = {
...Position,
AUTO: "auto" as "auto",
AUTO_END: "auto-end" as "auto-end",
AUTO_START: "auto-start" as "auto-start",
};
// eslint-disable-next-line @typescript-eslint/no-redeclare
export type PopoverPosition = (typeof PopoverPosition)[keyof typeof PopoverPosition];
import type { PopoverPosition } from "./popoverPosition";

export { Boundary as PopperBoundary, Placement };
// copied from @popperjs/core, where it is not exported as public
Expand Down

1 comment on commit 543891e

@adidahiya
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[core] fix: restore PopoverPosition value export (#6467)

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

Please sign in to comment.