Skip to content

Commit

Permalink
➖Remove popperjs dependency (#2463)
Browse files Browse the repository at this point in the history
* ➖removed popperjs dependency from core-react

* ➖removed popperjs dependency from lab-react

* 📝Marked usePopper as deprecated in eds-utils
  • Loading branch information
oddvernes authored Sep 5, 2022
1 parent 6817fb6 commit af85454
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion packages/eds-core-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@
"@equinor/eds-tokens": "workspace:*",
"@equinor/eds-utils": "workspace:*",
"@floating-ui/react-dom-interactions": "^0.6.6",
"@popperjs/core": "2.9.2",
"downshift": "^6.1.7",
"react-fast-compare": "3.2.0"
},
Expand Down
3 changes: 1 addition & 2 deletions packages/eds-core-react/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/eds-core-react/stories/utils/Utils.docs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function useOutsideClick(
```

### usePopper

#### ⚠️ DEPRECATED - this hook is no longer used internally and will be removed in a future version. Eds now uses [floating-ui](https://floating-ui.com/).
A hook that wraps [react-popper](https://www.npmjs.com/package/react-popper).
Used for positioning popup elements such as `Popover`, `Menu` and `Tooltip`.

Expand Down
1 change: 0 additions & 1 deletion packages/eds-lab-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@
"@equinor/eds-icons": "workspace:*",
"@equinor/eds-tokens": "workspace:*",
"@equinor/eds-utils": "workspace:*",
"@popperjs/core": "2.9.2",
"date-fns": "^2.28.0",
"downshift": "^6.1.7",
"react-datepicker": "^4.7.0",
Expand Down
5 changes: 3 additions & 2 deletions packages/eds-lab-react/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/eds-utils/src/hooks/usePopper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ const autoWidthModifier = {
},
} as PopperModifier

/** @deprecated This hook is no longer used internally and will be removed in a future version. */
export const usePopper = ({
anchorEl = null,
popperEl = null,
Expand Down

0 comments on commit af85454

Please sign in to comment.