@lumx/react 3.11.2 → 3.11.3-alpha.1

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/package.json CHANGED
@@ -6,8 +6,8 @@
6
6
  "url": "https://github.com/lumapps/design-system/issues"
7
7
  },
8
8
  "dependencies": {
9
- "@lumx/core": "^3.11.2",
10
- "@lumx/icons": "^3.11.2",
9
+ "@lumx/core": "^3.11.3-alpha.1",
10
+ "@lumx/icons": "^3.11.3-alpha.1",
11
11
  "@popperjs/core": "^2.5.4",
12
12
  "body-scroll-lock": "^3.1.5",
13
13
  "classnames": "^2.3.2",
@@ -110,5 +110,5 @@
110
110
  "build:storybook": "storybook build"
111
111
  },
112
112
  "sideEffects": false,
113
- "version": "3.11.2"
113
+ "version": "3.11.3-alpha.1"
114
114
  }
@@ -144,6 +144,8 @@ describe(`<${Tooltip.displayName}>`, () => {
144
144
  });
145
145
  expect(tooltip).toBeInTheDocument();
146
146
  expect(tooltip).toHaveClass(VISUALLY_HIDDEN);
147
+ // Popper styles should not be applied when closed.
148
+ expect(tooltip?.style?.transform).toBe('');
147
149
 
148
150
  const anchor = screen.getByRole('button', { name: 'Anchor' });
149
151
  await userEvent.hover(anchor);
@@ -145,7 +145,7 @@ export const Tooltip = forwardRef<TooltipProps, HTMLDivElement>((props, ref) =>
145
145
  }),
146
146
  isHidden && VISUALLY_HIDDEN,
147
147
  )}
148
- style={{ ...styles.popper, zIndex }}
148
+ style={{ ...(isHidden ? undefined : styles.popper), zIndex }}
149
149
  {...attributes.popper}
150
150
  >
151
151
  <div className={`${CLASSNAME}__arrow`} />
@@ -3,7 +3,10 @@ import { IS_BROWSER } from '@lumx/react/constants';
3
3
 
4
4
  /** Stub usePopper for use outside of browsers */
5
5
  const useStubPopper: typeof usePopperHook = (_a, _p, { placement }: any) =>
6
- ({ attributes: { popper: { 'data-popper-placement': placement } }, styles: {} }) as any;
6
+ ({
7
+ attributes: { popper: { 'data-popper-placement': placement } },
8
+ styles: { popper: { transform: 'translate(1, 1)' } },
9
+ }) as any;
7
10
 
8
11
  /** Switch hook implementation between environment */
9
12
  export const usePopper: typeof usePopperHook = IS_BROWSER ? usePopperHook : useStubPopper;