-
- )
- }
-
- );
-
- return (
-
- {reference}
- {usePortal ? {popper} : popper}
-
- );
- }
-}
-
-/**
- * @component
- */
-export default Popover;
diff --git a/packages/circuit-ui/components/Popover/Popover.spec.js b/packages/circuit-ui/components/Popover/Popover.spec.js
deleted file mode 100644
index d77831d7d3..0000000000
--- a/packages/circuit-ui/components/Popover/Popover.spec.js
+++ /dev/null
@@ -1,116 +0,0 @@
-/**
- * Copyright 2019, SumUp Ltd.
- * 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 React from 'react';
-
-import Popover from '.';
-
-const positions = ['top', 'bottom', 'left', 'right'];
-const alignments = ['start', 'end', 'center'];
-
-const defaultProps = {
- // eslint-disable-next-line react/display-name
- renderReference: () => ,
- // eslint-disable-next-line react/display-name
- renderPopover: () =>
,
- onReferenceClickClose: () => {},
- onOutsideClickClose: () => {},
-};
-
-// FMI: https://github.com/FezVrasta/popper.js/issues/478
-jest.mock('popper.js', () => {
- const PopperJS = jest.requireActual('popper.js');
-
- return class Popper {
- static placements = PopperJS.placements;
-
- constructor() {
- return {
- destroy: () => {},
- scheduleUpdate: () => {},
- };
- }
- };
-});
-
-describe('Popover', () => {
- beforeEach(() => {
- jest.resetAllMocks();
- });
-
- /**
- * Style tests.
- */
- it('should render with default styles', () => {
- const actual = create();
- expect(actual).toMatchSnapshot();
- });
-
- positions.forEach((position) => {
- alignments.forEach((alignment) => {
- it(`should render with position ${position} and alignment ${alignment}`, () => {
- const actual = create(
- ,
- );
- expect(actual).toMatchSnapshot();
- });
- });
- });
-
- it('should render nothing without isOpen=false', () => {
- const { queryByTestId } = render(
- ,
- );
- expect(queryByTestId('popover-child')).toBeNull();
- });
-
- it('should call onReferenceClickClose on clicked reference when isOpen=true', () => {
- const onReferenceClickClose = jest.fn();
- const { getByTestId } = render(
- ,
- );
-
- act(() => {
- fireEvent.click(getByTestId('popover-reference'));
- });
-
- expect(onReferenceClickClose).toHaveBeenCalledTimes(1);
- });
-
- it('should not render component when referenceElement is passed', () => {
- const { queryByTestId } = render(
- } />,
- );
- expect(queryByTestId('popover-reference')).toBeNull();
- });
-
- /**
- * Accessibility tests.
- */
- it('should meet accessibility guidelines', async () => {
- const wrapper = renderToHtml();
- const actual = await axe(wrapper);
- expect(actual).toHaveNoViolations();
- });
-});
diff --git a/packages/circuit-ui/components/Popover/Popover.spec.tsx b/packages/circuit-ui/components/Popover/Popover.spec.tsx
new file mode 100644
index 0000000000..aff17dad74
--- /dev/null
+++ b/packages/circuit-ui/components/Popover/Popover.spec.tsx
@@ -0,0 +1,167 @@
+/**
+ * Copyright 2020, SumUp Ltd.
+ * 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 { CirclePlus, Zap } from '@sumup/icons';
+import React, { useRef } from 'react';
+import { Placement } from '@popperjs/core';
+
+import {
+ create,
+ renderToHtml,
+ axe,
+ RenderFn,
+ render,
+ userEvent,
+} from '../../util/test-utils';
+
+import {
+ PopoverItem,
+ PopoverItemProps,
+ Popover,
+ PopoverProps,
+} from './Popover';
+
+const placements: Placement[] = ['auto', 'top', 'bottom', 'left', 'right'];
+
+describe('PopoverItem', () => {
+ function renderPopoverItem(
+ renderFn: RenderFn,
+ props: PopoverItemProps,
+ ) {
+ return renderFn();
+ }
+
+ const baseProps = { children: 'PopoverItem' };
+
+ describe('styles', () => {
+ it('should render as Link when an href (and onClick) is passed', () => {
+ const props = {
+ ...baseProps,
+ href: 'https://sumup.com',
+ onClick: jest.fn(),
+ icon: Zap,
+ };
+ const { container } = renderPopoverItem(render, props);
+ const anchorEl = container.querySelector('a');
+ expect(anchorEl).toBeVisible();
+ });
+
+ it('should render as a `button` when an onClick is passed', () => {
+ const props = { ...baseProps, onClick: jest.fn(), icon: Zap };
+ const { container } = renderPopoverItem(render, props);
+ const buttonEl = container.querySelector('button');
+ expect(buttonEl).toBeVisible();
+ });
+ });
+
+ describe('accessibility', () => {
+ it('should meet accessibility guidelines', async () => {
+ const props = {
+ ...baseProps,
+ href: 'https://sumup.com',
+ onClick: jest.fn(),
+ icon: Zap,
+ };
+ const wrapper = renderPopoverItem(renderToHtml, props);
+ const actual = await axe(wrapper);
+ expect(actual).toHaveNoViolations();
+ });
+ });
+
+ describe('business logic', () => {
+ it('should call onClick when rendered as Link', () => {
+ const props = {
+ ...baseProps,
+ href: 'https://sumup.com',
+ onClick: jest.fn(),
+ icon: Zap,
+ };
+ const { container } = renderPopoverItem(render, props);
+ const anchorEl = container.querySelector('a');
+ if (anchorEl) {
+ userEvent.click(anchorEl);
+ }
+ expect(props.onClick).toHaveBeenCalledTimes(1);
+ });
+ });
+});
+
+describe('Popover', () => {
+ const Default = (props: Omit) => {
+ const triggerRef = useRef(null);
+
+ return (
+ <>
+
+
+ >
+ );
+ };
+
+ const baseProps = {
+ actions: [
+ {
+ onClick: () => alert('Hello'),
+ children: 'Add',
+ icon: CirclePlus,
+ },
+ ],
+ isOpen: true,
+ onClose: jest.fn(),
+ };
+
+ describe('styles', () => {
+ it('should render with default styles', () => {
+ const actual = create();
+ expect(actual).toMatchSnapshot();
+ });
+
+ placements.forEach((placement) => {
+ it(`should render popover on ${placement}`, () => {
+ const actual = create();
+ expect(actual).toMatchSnapshot();
+ });
+ });
+ });
+
+ describe('business logic', () => {
+ it('should close popover when passing a click outside', () => {
+ const { queryByText } = render();
+ expect(queryByText('Add')).not.toBeNull();
+
+ userEvent.click(document.body);
+
+ expect(baseProps.onClose).toHaveBeenCalledTimes(1);
+ });
+
+ it('should close popover when passing a click to a reference element', () => {
+ const { queryByText, getAllByRole } = render();
+ expect(queryByText('Add')).not.toBeNull();
+
+ userEvent.click(getAllByRole('button')[0]);
+
+ expect(baseProps.onClose).toHaveBeenCalledTimes(1);
+ });
+ });
+
+ /**
+ * Accessibility tests.
+ */
+ it('should meet accessibility guidelines', async () => {
+ const wrapper = renderToHtml();
+ const actual = await axe(wrapper);
+ expect(actual).toHaveNoViolations();
+ });
+});
diff --git a/packages/circuit-ui/components/Popover/Popover.stories.js b/packages/circuit-ui/components/Popover/Popover.stories.js
deleted file mode 100644
index 2526b0f5ff..0000000000
--- a/packages/circuit-ui/components/Popover/Popover.stories.js
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * Copyright 2019, SumUp Ltd.
- * 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 React, { useState } from 'react';
-import { findByText } from '@testing-library/dom';
-import userEvent from '@testing-library/user-event';
-
-import Button from '../Button';
-import Card from '../Card';
-
-import Popover from './Popover';
-
-const interactionTasks = [
- {
- name: 'Open popover',
- description:
- 'Click the popover and wait until the popover content is shown.',
- run: async ({ container }) => {
- const button = container.querySelector('[data-testid=button]');
- userEvent.click(button);
- await findByText(container, 'Popover Content');
- },
- },
-];
-
-export default {
- title: 'Components/Popover',
- component: Popover,
- parameters: {
- performance: {
- interactions: interactionTasks,
- },
- },
-};
-
-export const Base = (args) => {
- const [open, setOpen] = useState(false);
-
- const { closeOnButtonClick, ...props } = args;
-
- return (
- Popover Content}
- renderReference={() => (
-
- )}
- onReferenceClickClose={() => {
- if (closeOnButtonClick) {
- setOpen(false);
- }
- }}
- onOutsideClickClose={() => setOpen(false)}
- />
- );
-};
-
-Base.args = {
- position: 'bottom',
- align: 'start',
- closeOnButtonClick: false,
-};
diff --git a/packages/circuit-ui/components/Popover/Popover.stories.tsx b/packages/circuit-ui/components/Popover/Popover.stories.tsx
new file mode 100644
index 0000000000..2ed8261161
--- /dev/null
+++ b/packages/circuit-ui/components/Popover/Popover.stories.tsx
@@ -0,0 +1,150 @@
+/**
+ * Copyright 2019, SumUp Ltd.
+ * 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 React, { useState, useRef } from 'react';
+import { action } from '@storybook/addon-actions';
+import {
+ More,
+ ThumbUp,
+ Zap,
+ CirclePlus,
+ PenStroke,
+ Share,
+ Bin,
+} from '@sumup/icons';
+
+import Button from '../Button';
+import IconButton from '../IconButton';
+
+import { Popover, PopoverItem } from './Popover';
+import docs from './Popover.docs.mdx';
+
+export default {
+ title: 'Components/Popover',
+ component: Popover,
+ parameters: {
+ docs: { page: docs },
+ },
+ argTypes: {
+ children: { control: 'text' },
+ },
+};
+export const PopoverBase = (args) => {
+ const triggerRef = useRef(null);
+
+ return (
+ <>
+
+
+ >
+ );
+};
+
+PopoverBase.args = {
+ actions: [
+ {
+ onClick: action('Button Click'),
+ href: '',
+ children: 'Label',
+ icon: Zap,
+ },
+ {
+ onClick: action('Button Click'),
+ href: 'https://sumup.com/',
+ children: 'Label',
+ icon: Zap,
+ },
+ { type: 'divider' },
+ {
+ onClick: action('Button Click'),
+ children: 'Label',
+ icon: Zap,
+ destructive: true,
+ },
+ ],
+};
+
+export const PopoverInteractive = (args) => {
+ const [isOpen, setOpen] = useState(false);
+ const triggerRef = useRef(null);
+
+ const handleClick = () => {
+ setOpen((prev) => !prev);
+ };
+
+ const onClose = () => {
+ setOpen(false);
+ };
+
+ return (
+ <>
+
+
+
+
+ >
+ );
+};
+
+PopoverInteractive.args = {
+ actions: [
+ {
+ onClick: action('Button Click'),
+ href: '',
+ children: 'Add',
+ icon: CirclePlus,
+ },
+ {
+ onClick: action('Button Click'),
+ href: 'https://sumup.com/',
+ children: 'Edit',
+ icon: PenStroke,
+ },
+ {
+ onClick: action('Button Click'),
+ href: 'https://sumup.com/',
+ children: 'Upload',
+ icon: Share,
+ },
+ { type: 'divider' },
+ {
+ onClick: action('Button Click'),
+ children: 'Delete',
+ icon: Bin,
+ destructive: true,
+ },
+ ],
+};
+
+export const PopoverItemBase = (args) => ;
+
+PopoverItemBase.args = {
+ onClick: action('Button Click'),
+ href: 'https://sumup.com/',
+ children: 'Label',
+ icon: Zap,
+};
diff --git a/packages/circuit-ui/components/Popover/Popover.tsx b/packages/circuit-ui/components/Popover/Popover.tsx
new file mode 100644
index 0000000000..ebb0765cbc
--- /dev/null
+++ b/packages/circuit-ui/components/Popover/Popover.tsx
@@ -0,0 +1,294 @@
+/**
+ * Copyright 2021, SumUp Ltd.
+ * 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.
+ */
+
+/** @jsx jsx */
+import { css, jsx } from '@emotion/core';
+import { Theme } from '@sumup/design-tokens';
+import React, {
+ useState,
+ FC,
+ HTMLProps,
+ SVGProps,
+ MouseEvent,
+ Fragment,
+ useMemo,
+ RefObject,
+} from 'react';
+import { useClickAway, useLatest } from 'react-use';
+import { Dispatch as TrackingProps } from '@sumup/collector';
+import { usePopper } from 'react-popper';
+import { Placement, State, Modifier } from '@popperjs/core';
+import { useTheme } from 'emotion-theming';
+
+import styled, { StyleProps } from '../../styles/styled';
+import { listItem, shadow, typography } from '../../styles/style-mixins';
+import { useComponents } from '../ComponentsContext';
+import useClickHandler from '../../hooks/use-click-handler';
+import Hr from '../Hr';
+
+export interface BaseProps {
+ /**
+ * The Popover item label.
+ */
+ children: string;
+ /**
+ * Function that's called when the item is clicked.
+ */
+ onClick?: (event: MouseEvent | KeyboardEvent) => void;
+ /**
+ * Display an icon in addition to the label.
+ */
+ icon?: FC>;
+ /**
+ * Destructive variant, changes the color of label and icon from blue to red to signal to the user that the action
+ * is irreversible or otherwise dangerous. Interactive states are the same for destructive variant.
+ */
+ destructive?: boolean;
+ /**
+ * Additional data that is dispatched with the tracking event.
+ */
+ tracking?: TrackingProps;
+ /**
+ * The ref to the HTML DOM element, can be a button or an anchor.
+ */
+ ref?: React.Ref;
+}
+
+type LinkElProps = Omit<
+ HTMLProps,
+ 'size' | 'type' | 'onClick'
+>;
+type ButtonElProps = Omit<
+ HTMLProps,
+ 'size' | 'type' | 'onClick'
+>;
+
+export type PopoverItemProps = BaseProps & LinkElProps & ButtonElProps;
+type PopoverItemWrapperProps = LinkElProps & ButtonElProps;
+
+const itemWrapperStyles = () => css`
+ label: popover-item;
+ display: flex;
+ justify-content: flex-start;
+ align-items: center;
+ width: 100%;
+`;
+
+const PopoverItemWrapper = styled('button')(
+ listItem,
+ itemWrapperStyles,
+ typography('one'),
+);
+
+const iconStyles = (theme: Theme) => css`
+ label: popover__icon;
+ margin-right: ${theme.spacings.byte};
+`;
+
+export const PopoverItem = ({
+ children,
+ icon: Icon,
+ onClick,
+ tracking,
+ ...props
+}: PopoverItemProps): JSX.Element => {
+ const components = useComponents();
+
+ // Need to typecast here because the PopoverItemWrapper expects a button-like
+ // component for its `as` prop. It's safe to ignore that constraint here.
+ /* eslint-disable @typescript-eslint/no-unsafe-assignment */
+ const Link = components.Link as any;
+
+ const handleClick = useClickHandler(
+ onClick,
+ tracking,
+ 'popover-item',
+ );
+
+ return (
+
+ {Icon && }
+ {children}
+
+ );
+};
+
+const wrapperStyles = ({ theme }: StyleProps) => css`
+ label: popover;
+ padding: ${theme.spacings.byte} 0px;
+ border: 1px solid ${theme.colors.n200};
+ box-sizing: border-box;
+ border-radius: ${theme.borderRadius.byte};
+ background-color: ${theme.colors.white};
+
+ ${theme.mq.untilKilo} {
+ border-bottom-right-radius: 0;
+ border-bottom-left-radius: 0;
+ }
+`;
+
+const PopoverWrapper = styled('div')(wrapperStyles, shadow);
+
+const dividerStyles = (theme: Theme) => css`
+ margin: ${theme.spacings.byte} ${theme.spacings.mega};
+ width: calc(100% - ${theme.spacings.mega}*2);
+`;
+
+const Overlay = styled.div(
+ ({ theme }: StyleProps) => css`
+ ${theme.mq.untilKilo} {
+ position: fixed;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ background-color: ${theme.colors.overlay};
+ pointer-events: none;
+ }
+ `,
+);
+
+type Divider = { type: 'divider' };
+type Action = PopoverItemProps | Divider;
+
+function isDivider(action: Action): action is Divider {
+ return 'type' in action && action.type === 'divider';
+}
+
+export interface PopoverProps {
+ /**
+ * Determine whether the Popover is opened or closed.
+ */
+ isOpen: boolean;
+ /**
+ * An array of PopoverItem or Divider.
+ */
+ actions: Action[];
+ /**
+ * The reference to the element that toggles the Popover.
+ */
+ triggerRef: RefObject;
+ /**
+ * One of the accepted placement values. Defaults to bottom.
+ */
+ placement?: Placement;
+ /**
+ * The placements to fallback to when there is not enough space for the Popover. Defaults to ['top', 'right', 'left'].
+ */
+ fallbackPlacements?: Placement[];
+ /**
+ * Function that is called when closing the Popover.
+ */
+ onClose: (event: Event) => void;
+}
+
+export const Popover = ({
+ isOpen,
+ onClose,
+ actions,
+ triggerRef,
+ placement = 'bottom',
+ fallbackPlacements = ['top', 'right', 'left'],
+ ...props
+}: PopoverProps): JSX.Element | null => {
+ const theme: Theme = useTheme();
+
+ // Popper custom modifier to apply bottom sheet for mobile.
+ // The window.matchMedia() is a useful API for this, it allows you to change the styles based on a condition.
+ // useMemo hook is used in order to prevent the render loop, more https://popper.js.org/react-popper/v2/faq/#why-i-get-render-loop-whenever-i-put-a-function-inside-the-popper-configuration
+ const mobilePosition: Modifier<'mobilePosition', { state: State }> = useMemo(
+ () => ({
+ name: 'mobilePosition',
+ enabled: true,
+ phase: 'write',
+ fn({ state }) {
+ if (window.matchMedia(`${theme.breakpoints.untilKilo}`).matches) {
+ // eslint-disable-next-line no-param-reassign
+ state.styles.popper = {
+ width: '100%',
+ left: '0px',
+ right: '0px',
+ bottom: '0px',
+ position: 'fixed',
+ };
+ } else {
+ // eslint-disable-next-line no-param-reassign
+ state.styles.popper.width = 'auto';
+ }
+ },
+ }),
+ [theme],
+ );
+
+ // The flip modifier is used if the popper has placement set to bottom, but there isn't enough space to position the popper in that direction.
+ // By default, it will change the popper placement to top. More at https://popper.js.org/docs/v2/modifiers/flip/
+ const flip = {
+ name: 'flip',
+ options: {
+ fallbackPlacements,
+ },
+ };
+
+ // Note: the usePopper hook intentionally takes the DOM node, not refs, in order to be able to update when the nodes change.
+ // A callback ref is used here to permit this behaviour, and useState is an appropriate way to implement this.
+ const [popperElement, setPopperElement] = useState(null);
+ const { styles, attributes } = usePopper(triggerRef.current, popperElement, {
+ placement,
+ modifiers: [mobilePosition, flip],
+ });
+
+ // This is a performance optimization to prevent event listeners from being
+ // re-attached on every render.
+ const popperRef = useLatest(popperElement);
+
+ useClickAway(popperRef, (event) => {
+ // The reference element has its own click handler to toggle the popover.
+ if (
+ !triggerRef.current ||
+ triggerRef.current.contains(event.target as Node)
+ ) {
+ return;
+ }
+ onClose(event);
+ });
+
+ if (!isOpen) {
+ return null;
+ }
+
+ return (
+
+
+
+ {actions.map((action, index) =>
+ isDivider(action) ? (
+
+ ) : (
+
+ ),
+ )}
+
+
+ );
+};
diff --git a/packages/circuit-ui/components/Popover/PopoverService.js b/packages/circuit-ui/components/Popover/PopoverService.js
deleted file mode 100644
index 6d4831cbf0..0000000000
--- a/packages/circuit-ui/components/Popover/PopoverService.js
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Copyright 2019, SumUp Ltd.
- * 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.
- */
-
-// popper.js modifiers
-// read more: https://popper.js.org/popper-documentation.html#modifiers
-export const popperModifiers = {
- offset: { enabled: true, offset: '0,10' },
- flip: { enabled: true },
-};
-
-export function toPopperPlacement(placement, align) {
- return placement + (align !== 'center' ? `-${align}` : '');
-}
diff --git a/packages/circuit-ui/components/Popover/__snapshots__/Popover.spec.js.snap b/packages/circuit-ui/components/Popover/__snapshots__/Popover.spec.js.snap
deleted file mode 100644
index b3835fdb0e..0000000000
--- a/packages/circuit-ui/components/Popover/__snapshots__/Popover.spec.js.snap
+++ /dev/null
@@ -1,443 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`Popover should render with default styles 1`] = `
-HTMLCollection [
- .circuit-0 {
- display: inline-block;
-}
-
-.circuit-0:focus {
- outline: none;
-}
-
-
-
-
-
-
,
- .circuit-0 {
- z-index: 30;
-}
-
-
-
-
-
-
,
-]
-`;
-
-exports[`Popover should render with position bottom and alignment center 1`] = `
-HTMLCollection [
- .circuit-0 {
- display: inline-block;
-}
-
-.circuit-0:focus {
- outline: none;
-}
-
-
-
-
-
-
,
- .circuit-0 {
- z-index: 30;
-}
-
-
-
-
-
-
,
-]
-`;
-
-exports[`Popover should render with position bottom and alignment end 1`] = `
-HTMLCollection [
- .circuit-0 {
- display: inline-block;
-}
-
-.circuit-0:focus {
- outline: none;
-}
-
-
-
-
-
-
,
- .circuit-0 {
- z-index: 30;
-}
-
-
-
-
-
-
,
-]
-`;
-
-exports[`Popover should render with position bottom and alignment start 1`] = `
-HTMLCollection [
- .circuit-0 {
- display: inline-block;
-}
-
-.circuit-0:focus {
- outline: none;
-}
-
-
-
-
-
-
,
- .circuit-0 {
- z-index: 30;
-}
-
-
-
-
-
-
,
-]
-`;
-
-exports[`Popover should render with position left and alignment center 1`] = `
-HTMLCollection [
- .circuit-0 {
- display: inline-block;
-}
-
-.circuit-0:focus {
- outline: none;
-}
-
-
-
-
-
-
,
- .circuit-0 {
- z-index: 30;
-}
-
-
-
-
-
-
,
-]
-`;
-
-exports[`Popover should render with position left and alignment end 1`] = `
-HTMLCollection [
- .circuit-0 {
- display: inline-block;
-}
-
-.circuit-0:focus {
- outline: none;
-}
-
-
-
-
-
-
,
- .circuit-0 {
- z-index: 30;
-}
-
-
-
-
-
-
,
-]
-`;
-
-exports[`Popover should render with position left and alignment start 1`] = `
-HTMLCollection [
- .circuit-0 {
- display: inline-block;
-}
-
-.circuit-0:focus {
- outline: none;
-}
-
-
-
-
-
-
,
- .circuit-0 {
- z-index: 30;
-}
-
-
-
-
-
-
,
-]
-`;
-
-exports[`Popover should render with position right and alignment center 1`] = `
-HTMLCollection [
- .circuit-0 {
- display: inline-block;
-}
-
-.circuit-0:focus {
- outline: none;
-}
-
-
-
-
-
-
,
- .circuit-0 {
- z-index: 30;
-}
-
-
-
-
-
-
,
-]
-`;
-
-exports[`Popover should render with position right and alignment end 1`] = `
-HTMLCollection [
- .circuit-0 {
- display: inline-block;
-}
-
-.circuit-0:focus {
- outline: none;
-}
-
-
-
-
-
-
,
- .circuit-0 {
- z-index: 30;
-}
-
-
-
-
-
-
,
-]
-`;
-
-exports[`Popover should render with position right and alignment start 1`] = `
-HTMLCollection [
- .circuit-0 {
- display: inline-block;
-}
-
-.circuit-0:focus {
- outline: none;
-}
-
-
-
-
-
-
,
- .circuit-0 {
- z-index: 30;
-}
-
-
-
-
-
-
,
-]
-`;
-
-exports[`Popover should render with position top and alignment center 1`] = `
-HTMLCollection [
- .circuit-0 {
- display: inline-block;
-}
-
-.circuit-0:focus {
- outline: none;
-}
-
-
-
-
-
-
,
- .circuit-0 {
- z-index: 30;
-}
-
-
-
-
-
-
,
-]
-`;
-
-exports[`Popover should render with position top and alignment end 1`] = `
-HTMLCollection [
- .circuit-0 {
- display: inline-block;
-}
-
-.circuit-0:focus {
- outline: none;
-}
-
-
-
-
-
-
,
- .circuit-0 {
- z-index: 30;
-}
-
-
-
-
-
-
,
-]
-`;
-
-exports[`Popover should render with position top and alignment start 1`] = `
-HTMLCollection [
- .circuit-0 {
- display: inline-block;
-}
-
-.circuit-0:focus {
- outline: none;
-}
-
-