@lumx/react 3.17.3-alpha.0 → 3.18.0

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.17.3-alpha.0",
10
- "@lumx/icons": "^3.17.3-alpha.0",
9
+ "@lumx/core": "^3.18.0",
10
+ "@lumx/icons": "^3.18.0",
11
11
  "@popperjs/core": "^2.5.4",
12
12
  "body-scroll-lock": "^3.1.5",
13
13
  "classnames": "^2.3.2",
@@ -105,5 +105,5 @@
105
105
  "build:storybook": "storybook build"
106
106
  },
107
107
  "sideEffects": false,
108
- "version": "3.17.3-alpha.0"
108
+ "version": "3.18.0"
109
109
  }
@@ -1,11 +1,10 @@
1
1
  /* eslint-disable react-hooks/rules-of-hooks */
2
2
  /* eslint-disable @typescript-eslint/no-use-before-define */
3
3
  import React, { useCallback, useRef, useState } from 'react';
4
- import { Button, Popover } from '@lumx/react';
4
+ import { Button } from '@lumx/react';
5
5
  import { ClickAwayProvider } from '@lumx/react/utils/ClickAwayProvider';
6
6
  import { initDemoShadowDOMPortal } from '@lumx/react/stories/utils/initDemoShadowDOMPortal';
7
7
  import { PortalProvider, Portal } from '@lumx/react/utils/Portal';
8
- import { useBooleanState } from '@lumx/react/hooks/useBooleanState';
9
8
 
10
9
  export default {
11
10
  title: 'LumX components/ClickAwayProvider',
@@ -63,16 +62,9 @@ export const NestedClickAway = () => (
63
62
  * Testing close on click away for a popover rendered in a shadow DOM
64
63
  */
65
64
  export const InShadowDOM = () => {
66
- const [isOpen, close, , toggle] = useBooleanState(false);
67
- const anchorRef = React.useRef();
68
65
  return (
69
66
  <PortalProvider value={initDemoShadowDOMPortal}>
70
- <Button ref={anchorRef} onClick={toggle}>
71
- Toggle popover
72
- </Button>
73
- <Popover isOpen={isOpen} anchorRef={anchorRef} onClose={close} closeOnClickAway>
74
- <p style={{ padding: 16, border: '1px solid gray' }}>Popover in shadow DOM</p>
75
- </Popover>
67
+ <NestedClickAway />
76
68
  </PortalProvider>
77
69
  );
78
70
  };