@synerise/ds-context-selector 0.12.20 → 0.13.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/CHANGELOG.md +19 -0
- package/dist/ContextSelector.js +37 -15
- package/package.json +6 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
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.13.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-context-selector@0.12.21...@synerise/ds-context-selector@0.13.0) (2022-09-21)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **menu:** add information card tooltip ([ded0bf1](https://github.com/Synerise/synerise-design/commit/ded0bf1b58e68f7061630810925669cb0fdad560))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [0.12.21](https://github.com/Synerise/synerise-design/compare/@synerise/ds-context-selector@0.12.20...@synerise/ds-context-selector@0.12.21) (2022-09-07)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @synerise/ds-context-selector
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [0.12.20](https://github.com/Synerise/synerise-design/compare/@synerise/ds-context-selector@0.12.19...@synerise/ds-context-selector@0.12.20) (2022-09-07)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @synerise/ds-context-selector
|
package/dist/ContextSelector.js
CHANGED
|
@@ -2,9 +2,10 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import Button from '@synerise/ds-button';
|
|
5
|
-
import Icon, {
|
|
5
|
+
import Icon, { Add3M, AngleDownS } from '@synerise/ds-icon';
|
|
6
|
+
import Menu from '@synerise/ds-menu';
|
|
6
7
|
import Dropdown from '@synerise/ds-dropdown';
|
|
7
|
-
import
|
|
8
|
+
import InformationCard from '@synerise/ds-information-card';
|
|
8
9
|
import { getPopupContainer } from '@synerise/ds-utils';
|
|
9
10
|
import ContextSelectorDropdown from './ContextSelectorDropdown/ContextSelectorDropdown';
|
|
10
11
|
import { ItemWrapper } from './ContextSelector.styles';
|
|
@@ -75,19 +76,40 @@ var ContextSelector = function ContextSelector(_ref) {
|
|
|
75
76
|
onClick: handleClick
|
|
76
77
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
77
78
|
component: /*#__PURE__*/React.createElement(Add3M, null)
|
|
78
|
-
}), buttonLabel) : /*#__PURE__*/React.createElement(
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
79
|
+
}), buttonLabel) : /*#__PURE__*/React.createElement(Menu, {
|
|
80
|
+
asDropdownMenu: true,
|
|
81
|
+
showTextTooltip: true,
|
|
82
|
+
asInfoCardContainer: true,
|
|
83
|
+
dataSource: [{
|
|
84
|
+
text: /*#__PURE__*/React.createElement(Button, {
|
|
85
|
+
type: "custom-color",
|
|
86
|
+
color: triggerColor,
|
|
87
|
+
mode: triggerMode,
|
|
88
|
+
onClick: handleClick
|
|
89
|
+
}, selectedItem ? /*#__PURE__*/React.createElement(Icon, {
|
|
90
|
+
component: selectedItem.icon
|
|
91
|
+
}) : null, /*#__PURE__*/React.createElement(ItemWrapper, null, selectedItem ? selectedItem.name : buttonLabel), /*#__PURE__*/React.createElement(Icon, {
|
|
92
|
+
component: /*#__PURE__*/React.createElement(AngleDownS, null)
|
|
93
|
+
})),
|
|
94
|
+
hoverTooltipProps: {
|
|
95
|
+
popupPlacement: 'top',
|
|
96
|
+
getPopupContainer: getPopupContainerOverride || getPopupContainer
|
|
97
|
+
},
|
|
98
|
+
renderHoverTooltip: selectedItem ? function () {
|
|
99
|
+
return /*#__PURE__*/React.createElement(InformationCard, {
|
|
100
|
+
icon: selectedItem.icon,
|
|
101
|
+
subtitle: selectedItem.name,
|
|
102
|
+
title: selectedItem.name.replace('_', ' '),
|
|
103
|
+
descriptionConfig: selectedItem.description ? {
|
|
104
|
+
value: selectedItem.description,
|
|
105
|
+
disabled: true,
|
|
106
|
+
label: undefined
|
|
107
|
+
} : undefined
|
|
108
|
+
});
|
|
109
|
+
} : undefined
|
|
110
|
+
}]
|
|
111
|
+
});
|
|
112
|
+
}, [addMode, handleClick, texts, triggerColor, triggerMode, selectedItem, getPopupContainerOverride]);
|
|
91
113
|
var onDropdownVisibilityChange = React.useCallback(function (value) {
|
|
92
114
|
if (value) {
|
|
93
115
|
onActivate && onActivate('');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-context-selector",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "ContextSelector UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"test:watch": "npm run test -- --watchAll",
|
|
27
27
|
"types": "tsc --noEmit"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "aef9ed09c6b307baccd74eb6a15d3134a6c7defe",
|
|
30
30
|
"sideEffects": [
|
|
31
31
|
"dist/style/*",
|
|
32
32
|
"*.less"
|
|
@@ -34,12 +34,13 @@
|
|
|
34
34
|
"types": "dist/index.d.ts",
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@synerise/ds-button": "^0.17.9",
|
|
37
|
-
"@synerise/ds-dropdown": "^0.17.
|
|
37
|
+
"@synerise/ds-dropdown": "^0.17.37",
|
|
38
38
|
"@synerise/ds-icon": "^0.51.0",
|
|
39
|
-
"@synerise/ds-
|
|
39
|
+
"@synerise/ds-information-card": "^0.1.22",
|
|
40
|
+
"@synerise/ds-menu": "^0.16.0",
|
|
40
41
|
"@synerise/ds-result": "^0.6.16",
|
|
41
42
|
"@synerise/ds-scrollbar": "^0.5.2",
|
|
42
|
-
"@synerise/ds-tabs": "^0.13.
|
|
43
|
+
"@synerise/ds-tabs": "^0.13.32",
|
|
43
44
|
"@synerise/ds-utils": "^0.19.0",
|
|
44
45
|
"classnames": "^2.2.6",
|
|
45
46
|
"react-window": "1.8.5"
|