@synerise/ds-dropdown 0.17.16 → 0.17.17

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
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.17.17](https://github.com/synerise/synerise-design/compare/@synerise/ds-dropdown@0.17.16...@synerise/ds-dropdown@0.17.17) (2022-04-29)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **dropdown:** fixes vertical position of dropdown for 'top' placements ([2a22c6e](https://github.com/synerise/synerise-design/commit/2a22c6eb5453b568a3df3153f3993e0f045dafdf))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [0.17.16](https://github.com/synerise/synerise-design/compare/@synerise/ds-dropdown@0.17.15...@synerise/ds-dropdown@0.17.16) (2022-04-05)
7
18
 
8
19
  **Note:** Version bump only for package @synerise/ds-dropdown
package/dist/Dropdown.js CHANGED
@@ -14,6 +14,7 @@ import BottomAction from './elements/BottomAction/BottomAction';
14
14
  import BackAction from './elements/BackAction/BackAction';
15
15
  import { Wrapper } from './Dropdown.styles';
16
16
  import TextTrigger from './elements/TextTrigger/TextTrigger';
17
+ var topPlacements = ['topLeft', 'topRight', 'topCenter'];
17
18
 
18
19
  var Dropdown = /*#__PURE__*/function (_React$Component) {
19
20
  _inheritsLoose(Dropdown, _React$Component);
@@ -25,18 +26,17 @@ var Dropdown = /*#__PURE__*/function (_React$Component) {
25
26
  var _proto = Dropdown.prototype;
26
27
 
27
28
  _proto.render = function render() {
28
- return (
29
- /*#__PURE__*/
30
- // eslint-disable-next-line react/jsx-props-no-spreading
31
- React.createElement(AntdDropdown, _extends({
32
- getPopupContainer: getPopupContainer,
33
- align: {
34
- offset: [0, 8]
35
- } // STOR-588
36
- ,
37
- trigger: ['click']
38
- }, this.props))
39
- );
29
+ var placement = this.props.placement;
30
+ var offsetVertical = topPlacements.find(function (topPlacement) {
31
+ return topPlacement === placement;
32
+ }) !== undefined ? -8 : 8;
33
+ return /*#__PURE__*/React.createElement(AntdDropdown, _extends({
34
+ getPopupContainer: getPopupContainer,
35
+ align: {
36
+ offset: [0, offsetVertical]
37
+ },
38
+ trigger: ['click']
39
+ }, this.props));
40
40
  };
41
41
 
42
42
  return Dropdown;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-dropdown",
3
- "version": "0.17.16",
3
+ "version": "0.17.17",
4
4
  "description": "Dropdown UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "synerise/synerise-design",
@@ -32,7 +32,7 @@
32
32
  ],
33
33
  "types": "dist/index.d.ts",
34
34
  "dependencies": {
35
- "@synerise/ds-divider": "^0.5.9",
35
+ "@synerise/ds-divider": "^0.5.10",
36
36
  "@synerise/ds-icon": "^0.49.0",
37
37
  "@synerise/ds-input": "^0.18.10",
38
38
  "@synerise/ds-search-bar": "^0.5.11"
@@ -46,5 +46,5 @@
46
46
  "devDependencies": {
47
47
  "@synerise/ds-utils": "^0.19.0"
48
48
  },
49
- "gitHead": "5793ce09feb88b36cc8ca1923ddfcb272b889cb0"
49
+ "gitHead": "4a658911645846d1e329609ba9db06a7bc64962b"
50
50
  }