Commit 4b253109 by Jack Westbrook Committed by GitHub

Chore: grafana-toolkit uses grafana-ui and grafana-data workspaces (#30701)

* chore(grafana-toolkit): use workspace versions of grafana/ui and grafana/data

* chore: replace references to popperjs 1 typings with popperjs 2 typings
parent 85e186cf
......@@ -28,10 +28,10 @@
"dependencies": {
"@babel/core": "7.9.0",
"@babel/preset-env": "7.9.0",
"@grafana/data": "next",
"@grafana/data": "7.5.0-pre.0",
"@grafana/eslint-config": "2.2.0",
"@grafana/tsconfig": "^1.0.0-rc1",
"@grafana/ui": "next",
"@grafana/ui": "7.5.0-pre.0",
"@types/command-exists": "^1.2.0",
"@types/execa": "^0.9.0",
"@types/expect-puppeteer": "3.3.1",
......
import React, { PureComponent } from 'react';
import uniqueId from 'lodash/uniqueId';
import { Placement } from '@popperjs/core';
import { Tooltip } from '../../../Tooltip/Tooltip';
import * as PopperJS from 'popper.js';
import { Icon } from '../../..';
export interface Props {
......@@ -11,7 +11,7 @@ export interface Props {
labelClass?: string;
switchClass?: string;
tooltip?: string;
tooltipPlacement?: PopperJS.Placement;
tooltipPlacement?: Placement;
transparent?: boolean;
onChange: (event: React.SyntheticEvent<HTMLInputElement>) => void;
}
......
import React, { PureComponent } from 'react';
import * as PopperJS from 'popper.js';
import { Placement, VirtualElement } from '@popperjs/core';
import { Manager, Popper as ReactPopper, PopperArrowProps } from 'react-popper';
import { Portal } from '../Portal/Portal';
import Transition from 'react-transition-group/Transition';
......@@ -23,9 +23,9 @@ export type RenderPopperArrowFn = (props: { arrowProps: PopperArrowProps; placem
interface Props extends React.HTMLAttributes<HTMLDivElement> {
show: boolean;
placement?: PopperJS.Placement;
placement?: Placement;
content: PopoverContent;
referenceElement: PopperJS.ReferenceObject;
referenceElement: HTMLElement | VirtualElement;
wrapperClassName?: string;
renderArrow?: RenderPopperArrowFn;
}
......
import React from 'react';
import * as PopperJS from 'popper.js';
import { Placement } from '@popperjs/core';
import { PopoverContent } from './Tooltip';
// This API allows popovers to update Popper's position when e.g. popover content changes
......@@ -34,13 +34,13 @@ type PopperControllerRenderProp = (
hidePopper: () => void,
popperProps: {
show: boolean;
placement: PopperJS.Placement;
placement: Placement;
content: PopoverContent;
}
) => JSX.Element;
interface Props {
placement?: PopperJS.Placement;
placement?: Placement;
content: PopoverContent;
className?: string;
children: PopperControllerRenderProp;
......
import React, { createRef, FC } from 'react';
import * as PopperJS from 'popper.js';
import { VirtualElement } from '@popperjs/core';
import { Popover } from './Popover';
import { PopoverController, UsingPopperProps } from './PopoverController';
......@@ -14,7 +14,7 @@ export interface PopoverContentProps {
export type PopoverContent = string | React.ReactElement<any> | ((props: PopoverContentProps) => JSX.Element);
export const Tooltip: FC<TooltipProps> = React.memo(({ children, theme, ...controllerProps }: TooltipProps) => {
const tooltipTriggerRef = createRef<PopperJS.ReferenceObject>();
const tooltipTriggerRef = createRef<HTMLElement | VirtualElement>();
const popperBackgroundClassName = 'popper__background' + (theme ? ' popper__background--' + theme : '');
return (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment