@synerise/ds-collector 1.2.2 → 1.3.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 +11 -0
- package/README.md +1 -0
- package/dist/Collector.d.ts +2 -2
- package/dist/Collector.js +3 -1
- package/dist/Collector.styles.js +1 -1
- package/dist/Collector.types.d.ts +1 -0
- package/dist/Elements/ButtonPanel/ButtonPanel.d.ts +1 -1
- package/dist/Elements/ButtonPanel/ButtonPanel.js +8 -2
- package/dist/Elements/ButtonPanel/ButtonPanel.styles.d.ts +1 -0
- package/dist/Elements/ButtonPanel/ButtonPanel.styles.js +5 -0
- package/dist/Elements/ButtonPanel/ButtonPanel.types.d.ts +3 -1
- package/package.json +2 -2
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
|
+
# [1.3.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-collector@1.2.2...@synerise/ds-collector@1.3.0) (2025-07-04)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **collector:** added buttonPanelPrefix prop ([9919904](https://github.com/Synerise/synerise-design/commit/99199040df9365a991cf82ce985d25b1770ea6e1))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [1.2.2](https://github.com/Synerise/synerise-design/compare/@synerise/ds-collector@1.2.1...@synerise/ds-collector@1.2.2) (2025-07-01)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @synerise/ds-collector
|
package/README.md
CHANGED
|
@@ -41,6 +41,7 @@ import Collector from '@synerise/ds-collector'
|
|
|
41
41
|
| addButtonProps | Props object applied to primary button | ButtonProps | - |
|
|
42
42
|
| cancelButtonProps | Props object applied to secondary button | ButtonProps | - |
|
|
43
43
|
| allowCustomValue | Enables an option to add value not included in the suggestions array | boolean | `false` |
|
|
44
|
+
| buttonPanelPrefix | content to render to the left of the add / cancel buttons | ReactNode | --- |
|
|
44
45
|
| className | Class added to the parent container | string | --- |
|
|
45
46
|
| description | Description rendered below the main component | string / React.ReactNode | --- |
|
|
46
47
|
| disabled | Whether the component is disabled. | boolean | `false` |
|
package/dist/Collector.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type CollectorProps } from './Collector.types';
|
|
3
3
|
declare const Collector: {
|
|
4
|
-
({ allowCustomValue, allowMultipleValues, addButtonProps, cancelButtonProps, keepSearchQueryOnSelect, error, className, description, enableCustomFilteringSuggestions, selected, suggestions, showNavigationHints, onConfirm, onCancel, label, errorText, disabled, fixedHeight, texts: defaultTexts, lookupConfig, onItemAdd, onItemDeselect, onItemSelect, onMultipleItemsSelect, dropdownContent, disableButtonPanel, disableSearch, dropdownItemHeight, searchValue, renderItem, onSearchValueChange, allowPaste, showCount, listHeader, hideDropdownOnClickOutside, valuesSeparator, }: CollectorProps): React.JSX.Element;
|
|
4
|
+
({ allowCustomValue, allowMultipleValues, addButtonProps, buttonPanelPrefix, cancelButtonProps, keepSearchQueryOnSelect, error, className, description, enableCustomFilteringSuggestions, selected, suggestions, showNavigationHints, onConfirm, onCancel, label, errorText, disabled, fixedHeight, texts: defaultTexts, lookupConfig, onItemAdd, onItemDeselect, onItemSelect, onMultipleItemsSelect, dropdownContent, disableButtonPanel, disableSearch, dropdownItemHeight, searchValue, renderItem, onSearchValueChange, allowPaste, showCount, listHeader, hideDropdownOnClickOutside, valuesSeparator, }: CollectorProps): React.JSX.Element;
|
|
5
5
|
Container: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
6
|
ContentBelow: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
7
7
|
Description: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -50,7 +50,7 @@ declare const Collector: {
|
|
|
50
50
|
Counter: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
51
51
|
Label: import("styled-components").StyledComponent<"label", any, {}, never>;
|
|
52
52
|
Values: ({ values, onDeselect, disabled, focused, displayLookupKey, }: import("./Elements/Values/Values.types").ValuesProps) => React.JSX.Element;
|
|
53
|
-
ButtonPanel:
|
|
53
|
+
ButtonPanel: ({ onConfirm, onCancel, disabled, showCancel, texts, addButtonProps, cancelButtonProps, buttonPanelPrefix, }: import("./Elements/ButtonPanel/ButtonPanel.types").ButtonPanelProps) => React.JSX.Element;
|
|
54
54
|
OptionsDropdown: ({ showAddButton, options, visible, value, onSelect, onClick, width, onItemAdd, showNavigationHints, lookupKey, texts, customContent, renderItem, dropdownItemHeight, scrollbarProps, listHeader, }: import("./Elements/OptionsDropdown/OptionsDropdown.types").OptionsDropdownProps) => React.JSX.Element;
|
|
55
55
|
NavigationHint: React.FC<import("./Elements/NavigationHint/NavigationHint.types").NavigationHintProps>;
|
|
56
56
|
};
|
package/dist/Collector.js
CHANGED
|
@@ -18,6 +18,7 @@ var Collector = function Collector(_ref) {
|
|
|
18
18
|
var allowCustomValue = _ref.allowCustomValue,
|
|
19
19
|
allowMultipleValues = _ref.allowMultipleValues,
|
|
20
20
|
addButtonProps = _ref.addButtonProps,
|
|
21
|
+
buttonPanelPrefix = _ref.buttonPanelPrefix,
|
|
21
22
|
cancelButtonProps = _ref.cancelButtonProps,
|
|
22
23
|
keepSearchQueryOnSelect = _ref.keepSearchQueryOnSelect,
|
|
23
24
|
error = _ref.error,
|
|
@@ -347,7 +348,8 @@ var Collector = function Collector(_ref) {
|
|
|
347
348
|
addButtonProps: _extends({
|
|
348
349
|
disabled: !isAddActive
|
|
349
350
|
}, addButtonProps),
|
|
350
|
-
cancelButtonProps: cancelButtonProps
|
|
351
|
+
cancelButtonProps: cancelButtonProps,
|
|
352
|
+
buttonPanelPrefix: buttonPanelPrefix
|
|
351
353
|
}))), /*#__PURE__*/React.createElement(OptionsDropdown, {
|
|
352
354
|
options: filteredSuggestions,
|
|
353
355
|
onItemAdd: addItem,
|
package/dist/Collector.styles.js
CHANGED
|
@@ -41,7 +41,7 @@ export var MainContent = styled.div.withConfig({
|
|
|
41
41
|
export var RightSide = styled.div.withConfig({
|
|
42
42
|
displayName: "Collectorstyles__RightSide",
|
|
43
43
|
componentId: "sc-14aly5p-4"
|
|
44
|
-
})(["display:flex;margin:0 4px;position:relative
|
|
44
|
+
})(["display:flex;margin:0 4px;gap:8px;position:relative;&::before{content:", ";", " background-image:", ";position:absolute;left:-102px;}"], function (props) {
|
|
45
45
|
return props.gradientOverlap ? "''" : 'none';
|
|
46
46
|
}, gradientOverlayStyles(), function (props) {
|
|
47
47
|
return "-webkit-linear-gradient( right,\n " + (props.focus ? props.theme.palette['blue-050'] : props.theme.palette.white) + " 0%,\n rgba(255,255,255,0) 100%\n )";
|
|
@@ -4,6 +4,7 @@ import type { ScrollbarAdditionalProps } from '@synerise/ds-scrollbar';
|
|
|
4
4
|
import type { DataAttributes } from '@synerise/ds-utils';
|
|
5
5
|
export type CollectorProps = {
|
|
6
6
|
addButtonProps?: Partial<ButtonProps & DataAttributes>;
|
|
7
|
+
buttonPanelPrefix?: ReactNode;
|
|
7
8
|
allowCustomValue?: boolean;
|
|
8
9
|
allowMultipleValues?: boolean;
|
|
9
10
|
cancelButtonProps?: Partial<ButtonProps & DataAttributes>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type ButtonPanelProps } from './ButtonPanel.types';
|
|
3
|
-
declare const ButtonPanel: React.
|
|
3
|
+
declare const ButtonPanel: ({ onConfirm, onCancel, disabled, showCancel, texts, addButtonProps, cancelButtonProps, buttonPanelPrefix, }: ButtonPanelProps) => React.JSX.Element;
|
|
4
4
|
export default ButtonPanel;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import Button from '@synerise/ds-button';
|
|
4
|
+
import * as S from './ButtonPanel.styles';
|
|
4
5
|
var ButtonPanel = function ButtonPanel(_ref) {
|
|
5
6
|
var onConfirm = _ref.onConfirm,
|
|
6
7
|
onCancel = _ref.onCancel,
|
|
@@ -8,8 +9,13 @@ var ButtonPanel = function ButtonPanel(_ref) {
|
|
|
8
9
|
showCancel = _ref.showCancel,
|
|
9
10
|
texts = _ref.texts,
|
|
10
11
|
addButtonProps = _ref.addButtonProps,
|
|
11
|
-
cancelButtonProps = _ref.cancelButtonProps
|
|
12
|
-
|
|
12
|
+
cancelButtonProps = _ref.cancelButtonProps,
|
|
13
|
+
buttonPanelPrefix = _ref.buttonPanelPrefix;
|
|
14
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, buttonPanelPrefix && /*#__PURE__*/React.createElement(S.ButtonPanelPrefix, {
|
|
15
|
+
onFocus: function onFocus(event) {
|
|
16
|
+
return event.stopPropagation();
|
|
17
|
+
}
|
|
18
|
+
}, buttonPanelPrefix), showCancel && /*#__PURE__*/React.createElement(Button, _extends({
|
|
13
19
|
type: "ghost",
|
|
14
20
|
disabled: disabled,
|
|
15
21
|
onClick: onCancel,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ButtonPanelPrefix: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { CollectorProps, CollectorTexts } from '../../Collector.types';
|
|
2
3
|
export type ButtonPanelProps = {
|
|
3
4
|
onCancel: () => void;
|
|
4
5
|
onConfirm: () => void;
|
|
5
6
|
disabled: boolean;
|
|
6
7
|
showCancel: boolean;
|
|
7
8
|
texts: CollectorTexts;
|
|
9
|
+
buttonPanelPrefix?: ReactNode;
|
|
8
10
|
} & Pick<CollectorProps, 'addButtonProps' | 'cancelButtonProps'>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-collector",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Collector UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@types/lodash.isequal": "^4.5.8"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "2161bdb04f3db0f79b7d0465ce6b41121f1543ef"
|
|
59
59
|
}
|