@atlaskit/react-select 2.7.1 → 2.7.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @atlaskit/react-select
2
2
 
3
+ ## 2.7.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#168875](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/168875)
8
+ [`b118c9669e117`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b118c9669e117) -
9
+ Clean up design-system-select-fix-placement
10
+ - Updated dependencies
11
+
3
12
  ## 2.7.1
4
13
 
5
14
  ### Patch Changes
@@ -19,7 +19,6 @@ var _react2 = require("@compiled/react");
19
19
  var _dom = require("@floating-ui/dom");
20
20
  var _reactDom = require("react-dom");
21
21
  var _useIsomorphicLayoutEffect = _interopRequireDefault(require("use-isomorphic-layout-effect"));
22
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
23
22
  var _compiled = require("@atlaskit/primitives/compiled");
24
23
  var _utils = require("../../utils");
25
24
  var _excluded = ["children", "innerProps", "xcss"],
@@ -56,8 +55,7 @@ function getMenuPlacement(_ref) {
56
55
  // we can't trust `scrollParent.scrollHeight` --> it may increase when
57
56
  // the menu is rendered
58
57
  var _scrollParent$getBoun = scrollParent.getBoundingClientRect(),
59
- scrollHeight = _scrollParent$getBoun.height,
60
- scrollParentTop = _scrollParent$getBoun.top;
58
+ scrollHeight = _scrollParent$getBoun.height;
61
59
  var _menuEl$getBoundingCl = menuEl.getBoundingClientRect(),
62
60
  menuBottom = _menuEl$getBoundingCl.bottom,
63
61
  menuHeight = _menuEl$getBoundingCl.height,
@@ -66,8 +64,7 @@ function getMenuPlacement(_ref) {
66
64
  containerTop = _menuEl$offsetParent$.top;
67
65
  var viewHeight = isFixedPosition ? window.innerHeight : (0, _utils.normalizedHeight)(scrollParent);
68
66
  var scrollTop = (0, _utils.getScrollTop)(scrollParent);
69
- // use menuTop - scrollParentTop for the actual top space of menu in the scroll container
70
- var menuTopFromParent = (0, _platformFeatureFlags.fg)('design-system-select-fix-placement') ? menuTop - scrollParentTop : menuTop;
67
+ var menuTopFromParent = menuTop;
71
68
  var marginBottom = parseInt(getComputedStyle(menuEl).marginBottom, 10);
72
69
  var marginTop = parseInt(getComputedStyle(menuEl).marginTop, 10);
73
70
  var viewSpaceAbove = containerTop - marginTop;
@@ -15,7 +15,6 @@ var _react2 = require("@emotion/react");
15
15
  var _dom = require("@floating-ui/dom");
16
16
  var _reactDom = require("react-dom");
17
17
  var _useIsomorphicLayoutEffect = _interopRequireDefault(require("use-isomorphic-layout-effect"));
18
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
19
18
  var _primitives = require("@atlaskit/primitives");
20
19
  var _utils = require("../../utils");
21
20
  var _excluded = ["children", "innerProps"],
@@ -54,8 +53,7 @@ function getMenuPlacement(_ref) {
54
53
  // we can't trust `scrollParent.scrollHeight` --> it may increase when
55
54
  // the menu is rendered
56
55
  var _scrollParent$getBoun = scrollParent.getBoundingClientRect(),
57
- scrollHeight = _scrollParent$getBoun.height,
58
- scrollParentTop = _scrollParent$getBoun.top;
56
+ scrollHeight = _scrollParent$getBoun.height;
59
57
  var _menuEl$getBoundingCl = menuEl.getBoundingClientRect(),
60
58
  menuBottom = _menuEl$getBoundingCl.bottom,
61
59
  menuHeight = _menuEl$getBoundingCl.height,
@@ -64,8 +62,7 @@ function getMenuPlacement(_ref) {
64
62
  containerTop = _menuEl$offsetParent$.top;
65
63
  var viewHeight = isFixedPosition ? window.innerHeight : (0, _utils.normalizedHeight)(scrollParent);
66
64
  var scrollTop = (0, _utils.getScrollTop)(scrollParent);
67
- // use menuTop - scrollParentTop for the actual top space of menu in the scroll container
68
- var menuTopFromParent = (0, _platformFeatureFlags.fg)('design-system-select-fix-placement') ? menuTop - scrollParentTop : menuTop;
65
+ var menuTopFromParent = menuTop;
69
66
  var marginBottom = parseInt(getComputedStyle(menuEl).marginBottom, 10);
70
67
  var marginTop = parseInt(getComputedStyle(menuEl).marginTop, 10);
71
68
  var viewSpaceAbove = containerTop - marginTop;
@@ -8,7 +8,6 @@ import { cx } from '@compiled/react';
8
8
  import { autoUpdate } from '@floating-ui/dom';
9
9
  import { createPortal } from 'react-dom';
10
10
  import useLayoutEffect from 'use-isomorphic-layout-effect';
11
- import { fg } from '@atlaskit/platform-feature-flags';
12
11
  import { Text } from '@atlaskit/primitives/compiled';
13
12
  import { animatedScrollTo, getBoundingClientObj, getScrollParent, getScrollTop, getStyleProps, normalizedHeight, scrollTo } from '../../utils';
14
13
 
@@ -42,8 +41,7 @@ function getMenuPlacement({
42
41
  // we can't trust `scrollParent.scrollHeight` --> it may increase when
43
42
  // the menu is rendered
44
43
  const {
45
- height: scrollHeight,
46
- top: scrollParentTop
44
+ height: scrollHeight
47
45
  } = scrollParent.getBoundingClientRect();
48
46
  const {
49
47
  bottom: menuBottom,
@@ -55,8 +53,7 @@ function getMenuPlacement({
55
53
  } = menuEl.offsetParent.getBoundingClientRect();
56
54
  const viewHeight = isFixedPosition ? window.innerHeight : normalizedHeight(scrollParent);
57
55
  const scrollTop = getScrollTop(scrollParent);
58
- // use menuTop - scrollParentTop for the actual top space of menu in the scroll container
59
- const menuTopFromParent = fg('design-system-select-fix-placement') ? menuTop - scrollParentTop : menuTop;
56
+ const menuTopFromParent = menuTop;
60
57
  const marginBottom = parseInt(getComputedStyle(menuEl).marginBottom, 10);
61
58
  const marginTop = parseInt(getComputedStyle(menuEl).marginTop, 10);
62
59
  const viewSpaceAbove = containerTop - marginTop;
@@ -10,7 +10,6 @@ import { jsx } from '@emotion/react';
10
10
  import { autoUpdate } from '@floating-ui/dom';
11
11
  import { createPortal } from 'react-dom';
12
12
  import useLayoutEffect from 'use-isomorphic-layout-effect';
13
- import { fg } from '@atlaskit/platform-feature-flags';
14
13
  import { Text } from '@atlaskit/primitives';
15
14
  import { animatedScrollTo, getBoundingClientObj, getScrollParent, getScrollTop, getStyleProps, normalizedHeight, scrollTo } from '../../utils';
16
15
 
@@ -44,8 +43,7 @@ function getMenuPlacement({
44
43
  // we can't trust `scrollParent.scrollHeight` --> it may increase when
45
44
  // the menu is rendered
46
45
  const {
47
- height: scrollHeight,
48
- top: scrollParentTop
46
+ height: scrollHeight
49
47
  } = scrollParent.getBoundingClientRect();
50
48
  const {
51
49
  bottom: menuBottom,
@@ -57,8 +55,7 @@ function getMenuPlacement({
57
55
  } = menuEl.offsetParent.getBoundingClientRect();
58
56
  const viewHeight = isFixedPosition ? window.innerHeight : normalizedHeight(scrollParent);
59
57
  const scrollTop = getScrollTop(scrollParent);
60
- // use menuTop - scrollParentTop for the actual top space of menu in the scroll container
61
- const menuTopFromParent = fg('design-system-select-fix-placement') ? menuTop - scrollParentTop : menuTop;
58
+ const menuTopFromParent = menuTop;
62
59
  const marginBottom = parseInt(getComputedStyle(menuEl).marginBottom, 10);
63
60
  const marginTop = parseInt(getComputedStyle(menuEl).marginTop, 10);
64
61
  const viewSpaceAbove = containerTop - marginTop;
@@ -15,7 +15,6 @@ import { cx } from '@compiled/react';
15
15
  import { autoUpdate } from '@floating-ui/dom';
16
16
  import { createPortal } from 'react-dom';
17
17
  import useLayoutEffect from 'use-isomorphic-layout-effect';
18
- import { fg } from '@atlaskit/platform-feature-flags';
19
18
  import { Text } from '@atlaskit/primitives/compiled';
20
19
  import { animatedScrollTo, getBoundingClientObj, getScrollParent, getScrollTop, getStyleProps, normalizedHeight, scrollTo } from '../../utils';
21
20
 
@@ -48,8 +47,7 @@ function getMenuPlacement(_ref) {
48
47
  // we can't trust `scrollParent.scrollHeight` --> it may increase when
49
48
  // the menu is rendered
50
49
  var _scrollParent$getBoun = scrollParent.getBoundingClientRect(),
51
- scrollHeight = _scrollParent$getBoun.height,
52
- scrollParentTop = _scrollParent$getBoun.top;
50
+ scrollHeight = _scrollParent$getBoun.height;
53
51
  var _menuEl$getBoundingCl = menuEl.getBoundingClientRect(),
54
52
  menuBottom = _menuEl$getBoundingCl.bottom,
55
53
  menuHeight = _menuEl$getBoundingCl.height,
@@ -58,8 +56,7 @@ function getMenuPlacement(_ref) {
58
56
  containerTop = _menuEl$offsetParent$.top;
59
57
  var viewHeight = isFixedPosition ? window.innerHeight : normalizedHeight(scrollParent);
60
58
  var scrollTop = getScrollTop(scrollParent);
61
- // use menuTop - scrollParentTop for the actual top space of menu in the scroll container
62
- var menuTopFromParent = fg('design-system-select-fix-placement') ? menuTop - scrollParentTop : menuTop;
59
+ var menuTopFromParent = menuTop;
63
60
  var marginBottom = parseInt(getComputedStyle(menuEl).marginBottom, 10);
64
61
  var marginTop = parseInt(getComputedStyle(menuEl).marginTop, 10);
65
62
  var viewSpaceAbove = containerTop - marginTop;
@@ -18,7 +18,6 @@ import { jsx } from '@emotion/react';
18
18
  import { autoUpdate } from '@floating-ui/dom';
19
19
  import { createPortal } from 'react-dom';
20
20
  import useLayoutEffect from 'use-isomorphic-layout-effect';
21
- import { fg } from '@atlaskit/platform-feature-flags';
22
21
  import { Text } from '@atlaskit/primitives';
23
22
  import { animatedScrollTo, getBoundingClientObj, getScrollParent, getScrollTop, getStyleProps, normalizedHeight, scrollTo } from '../../utils';
24
23
 
@@ -51,8 +50,7 @@ function getMenuPlacement(_ref) {
51
50
  // we can't trust `scrollParent.scrollHeight` --> it may increase when
52
51
  // the menu is rendered
53
52
  var _scrollParent$getBoun = scrollParent.getBoundingClientRect(),
54
- scrollHeight = _scrollParent$getBoun.height,
55
- scrollParentTop = _scrollParent$getBoun.top;
53
+ scrollHeight = _scrollParent$getBoun.height;
56
54
  var _menuEl$getBoundingCl = menuEl.getBoundingClientRect(),
57
55
  menuBottom = _menuEl$getBoundingCl.bottom,
58
56
  menuHeight = _menuEl$getBoundingCl.height,
@@ -61,8 +59,7 @@ function getMenuPlacement(_ref) {
61
59
  containerTop = _menuEl$offsetParent$.top;
62
60
  var viewHeight = isFixedPosition ? window.innerHeight : normalizedHeight(scrollParent);
63
61
  var scrollTop = getScrollTop(scrollParent);
64
- // use menuTop - scrollParentTop for the actual top space of menu in the scroll container
65
- var menuTopFromParent = fg('design-system-select-fix-placement') ? menuTop - scrollParentTop : menuTop;
62
+ var menuTopFromParent = menuTop;
66
63
  var marginBottom = parseInt(getComputedStyle(menuEl).marginBottom, 10);
67
64
  var marginTop = parseInt(getComputedStyle(menuEl).marginTop, 10);
68
65
  var viewSpaceAbove = containerTop - marginTop;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/react-select",
3
- "version": "2.7.1",
3
+ "version": "2.7.2",
4
4
  "description": "A forked version of react-select to only be used in atlaskit/select",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -66,9 +66,6 @@
66
66
  "platform_design_system_team_safari_input_fix": {
67
67
  "type": "boolean"
68
68
  },
69
- "design-system-select-fix-placement": {
70
- "type": "boolean"
71
- },
72
69
  "compiled-react-select": {
73
70
  "type": "boolean"
74
71
  }