@synerise/ds-subject 0.10.24 → 0.10.26

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,22 @@
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.10.26](https://github.com/Synerise/synerise-design/compare/@synerise/ds-subject@0.10.25...@synerise/ds-subject@0.10.26) (2024-11-29)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-subject
9
+
10
+
11
+
12
+
13
+
14
+ ## [0.10.25](https://github.com/Synerise/synerise-design/compare/@synerise/ds-subject@0.10.24...@synerise/ds-subject@0.10.25) (2024-11-28)
15
+
16
+ **Note:** Version bump only for package @synerise/ds-subject
17
+
18
+
19
+
20
+
21
+
6
22
  ## [0.10.24](https://github.com/Synerise/synerise-design/compare/@synerise/ds-subject@0.10.23...@synerise/ds-subject@0.10.24) (2024-11-21)
7
23
 
8
24
  **Note:** Version bump only for package @synerise/ds-subject
package/dist/Subject.js CHANGED
@@ -4,26 +4,23 @@ import Icon, { ShowM } from '@synerise/ds-icon';
4
4
  import SubjectTrigger from './SubjectTrigger/SubjectTrigger';
5
5
  import * as S from './Subject.style';
6
6
  import SubjectList from './SubjectList/SubjectList';
7
-
8
7
  var Subject = function Subject(_ref) {
9
8
  var selectedItem = _ref.selectedItem,
10
- iconPlaceholder = _ref.iconPlaceholder,
11
- items = _ref.items,
12
- placeholder = _ref.placeholder,
13
- onSelectItem = _ref.onSelectItem,
14
- onShowPreview = _ref.onShowPreview,
15
- _ref$type = _ref.type,
16
- type = _ref$type === void 0 ? 'parameter' : _ref$type,
17
- getPopupContainerOverride = _ref.getPopupContainerOverride,
18
- onActivate = _ref.onActivate,
19
- onDeactivate = _ref.onDeactivate,
20
- texts = _ref.texts,
21
- opened = _ref.opened;
22
-
9
+ iconPlaceholder = _ref.iconPlaceholder,
10
+ items = _ref.items,
11
+ placeholder = _ref.placeholder,
12
+ onSelectItem = _ref.onSelectItem,
13
+ onShowPreview = _ref.onShowPreview,
14
+ _ref$type = _ref.type,
15
+ type = _ref$type === void 0 ? 'parameter' : _ref$type,
16
+ getPopupContainerOverride = _ref.getPopupContainerOverride,
17
+ onActivate = _ref.onActivate,
18
+ onDeactivate = _ref.onDeactivate,
19
+ texts = _ref.texts,
20
+ opened = _ref.opened;
23
21
  var _React$useState = React.useState(false),
24
- dropdownVisible = _React$useState[0],
25
- setDropdownVisible = _React$useState[1];
26
-
22
+ dropdownVisible = _React$useState[0],
23
+ setDropdownVisible = _React$useState[1];
27
24
  var color = React.useMemo(function () {
28
25
  return type && ['event', 'context'].indexOf(type) >= 0 ? 'cyan' : 'green';
29
26
  }, [type]);
@@ -63,5 +60,4 @@ var Subject = function Subject(_ref) {
63
60
  component: /*#__PURE__*/React.createElement(ShowM, null)
64
61
  })));
65
62
  };
66
-
67
63
  export default Subject;
@@ -7,23 +7,18 @@ import Icon, { SearchM } from '@synerise/ds-icon';
7
7
  import { v4 as uuid } from 'uuid';
8
8
  import * as S from './SubjectList.styles';
9
9
  import SubjectListItem from './SubjectListItem';
10
-
11
10
  var SubjectList = function SubjectList(_ref) {
12
11
  var items = _ref.items,
13
- onSelectItem = _ref.onSelectItem,
14
- hideDropdown = _ref.hideDropdown,
15
- texts = _ref.texts;
16
-
12
+ onSelectItem = _ref.onSelectItem,
13
+ hideDropdown = _ref.hideDropdown,
14
+ texts = _ref.texts;
17
15
  var _React$useState = React.useState(''),
18
- searchQuery = _React$useState[0],
19
- setSearchQuery = _React$useState[1];
20
-
16
+ searchQuery = _React$useState[0],
17
+ setSearchQuery = _React$useState[1];
21
18
  var overlayRef = React.useRef(null);
22
-
23
19
  var _React$useState2 = React.useState(true),
24
- searchInputCanBeFocused = _React$useState2[0],
25
- setSearchInputFocus = _React$useState2[1];
26
-
20
+ searchInputCanBeFocused = _React$useState2[0],
21
+ setSearchInputFocus = _React$useState2[1];
27
22
  var classNames = React.useMemo(function () {
28
23
  return "ds-subject-item ds-subject-item-" + uuid();
29
24
  }, []);
@@ -53,8 +48,8 @@ var SubjectList = function SubjectList(_ref) {
53
48
  },
54
49
  ref: overlayRef,
55
50
  onKeyDown: function onKeyDown(e) {
56
- setSearchInputFocus(false); // eslint-disable-next-line @typescript-eslint/no-empty-function
57
-
51
+ setSearchInputFocus(false);
52
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
58
53
  searchQuery && focusWithArrowKeys(e, classNames.split(' ')[1], function () {
59
54
  setSearchInputFocus(true);
60
55
  });
@@ -82,5 +77,4 @@ var SubjectList = function SubjectList(_ref) {
82
77
  description: texts.noResults
83
78
  }))));
84
79
  };
85
-
86
80
  export default SubjectList;
@@ -1,14 +1,13 @@
1
1
  import React from 'react';
2
2
  import Icon from '@synerise/ds-icon';
3
3
  import ListItem from '@synerise/ds-list-item';
4
-
5
4
  var SubjectListItem = function SubjectListItem(_ref) {
6
5
  var item = _ref.item,
7
- clearSearch = _ref.clearSearch,
8
- searchQuery = _ref.searchQuery,
9
- hideDropdown = _ref.hideDropdown,
10
- select = _ref.select,
11
- className = _ref.className;
6
+ clearSearch = _ref.clearSearch,
7
+ searchQuery = _ref.searchQuery,
8
+ hideDropdown = _ref.hideDropdown,
9
+ select = _ref.select,
10
+ className = _ref.className;
12
11
  return /*#__PURE__*/React.createElement(ListItem, {
13
12
  className: className,
14
13
  highlight: searchQuery,
@@ -22,5 +21,4 @@ var SubjectListItem = function SubjectListItem(_ref) {
22
21
  })
23
22
  }, item.name);
24
23
  };
25
-
26
24
  export default SubjectListItem;
@@ -1,13 +1,12 @@
1
1
  import React from 'react';
2
2
  import Button from '@synerise/ds-button';
3
3
  import Icon, { AngleDownS } from '@synerise/ds-icon';
4
-
5
4
  var SubjectTrigger = function SubjectTrigger(_ref) {
6
5
  var iconPlaceholder = _ref.iconPlaceholder,
7
- placeholder = _ref.placeholder,
8
- selectedItem = _ref.selectedItem,
9
- color = _ref.color,
10
- onClick = _ref.onClick;
6
+ placeholder = _ref.placeholder,
7
+ selectedItem = _ref.selectedItem,
8
+ color = _ref.color,
9
+ onClick = _ref.onClick;
11
10
  var icon = React.useMemo(function () {
12
11
  return selectedItem !== undefined ? selectedItem.icon : iconPlaceholder;
13
12
  }, [selectedItem, iconPlaceholder]);
@@ -25,5 +24,4 @@ var SubjectTrigger = function SubjectTrigger(_ref) {
25
24
  component: /*#__PURE__*/React.createElement(AngleDownS, null)
26
25
  }));
27
26
  };
28
-
29
27
  export default SubjectTrigger;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-subject",
3
- "version": "0.10.24",
3
+ "version": "0.10.26",
4
4
  "description": "Subject UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -34,12 +34,12 @@
34
34
  ],
35
35
  "types": "dist/index.d.ts",
36
36
  "dependencies": {
37
- "@synerise/ds-button": "^0.21.19",
38
- "@synerise/ds-dropdown": "^0.18.24",
39
- "@synerise/ds-icon": "^0.67.0",
40
- "@synerise/ds-list-item": "^0.4.19",
41
- "@synerise/ds-result": "^0.7.14",
42
- "@synerise/ds-scrollbar": "^0.11.19",
37
+ "@synerise/ds-button": "^0.21.21",
38
+ "@synerise/ds-dropdown": "^0.18.26",
39
+ "@synerise/ds-icon": "^0.68.0",
40
+ "@synerise/ds-list-item": "^0.5.1",
41
+ "@synerise/ds-result": "^0.7.16",
42
+ "@synerise/ds-scrollbar": "^0.11.21",
43
43
  "@synerise/ds-utils": "^0.31.2",
44
44
  "uuid": "^8.3.2"
45
45
  },
@@ -48,5 +48,5 @@
48
48
  "react": ">=16.9.0 <= 17.0.2",
49
49
  "styled-components": "5.0.1"
50
50
  },
51
- "gitHead": "05f083c767e2cec3c2f91c9475aee89852a77d6c"
51
+ "gitHead": "9ebd107163650754a5f55680d62d30812d740084"
52
52
  }