@synerise/ds-tags 1.2.0 → 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 +17 -15
- package/dist/Tags.d.ts +1 -1
- package/dist/Tags.js +29 -131
- package/dist/Tags.styles.d.ts +0 -16
- package/dist/Tags.styles.js +1 -45
- package/dist/Tags.types.d.ts +7 -8
- package/dist/components/AddTags/AddTags.d.ts +19 -0
- package/dist/components/AddTags/AddTags.js +105 -0
- package/dist/components/AddTags/AddTags.styles.d.ts +5 -0
- package/dist/components/AddTags/AddTags.styles.js +15 -0
- package/dist/components/LimitedTags/LimitedTags.d.ts +13 -0
- package/dist/components/LimitedTags/LimitedTags.js +27 -0
- package/dist/components/TagsDropdown/TagsDropdown.d.ts +21 -0
- package/dist/components/TagsDropdown/TagsDropdown.js +70 -0
- package/dist/components/TagsDropdown/TagsDropdown.styles.d.ts +4 -0
- package/dist/components/TagsDropdown/TagsDropdown.styles.js +16 -0
- package/dist/index.d.ts +1 -1
- package/package.json +5 -5
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-tags@1.2.0...@synerise/ds-tags@1.3.0) (2025-09-23)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **tags:** add dropdownFooter and maxVisibleTags ([cfb0358](https://github.com/Synerise/synerise-design/commit/cfb035830ea4fd8ec5ba800985f1bea50194f25c))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [1.2.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-tags@1.1.25...@synerise/ds-tags@1.2.0) (2025-09-19)
|
|
7
18
|
|
|
8
19
|
|
package/README.md
CHANGED
|
@@ -11,21 +11,23 @@ Tags UI Component
|
|
|
11
11
|
|
|
12
12
|
## Tags API (Group of <Tag />)
|
|
13
13
|
|
|
14
|
-
| Property | Description
|
|
15
|
-
|
|
16
|
-
| addable | Allow adding tags from `data` (which are not present in `selected`)
|
|
17
|
-
| className | Tag Group container class
|
|
18
|
-
| creatable | Allow creating new tags
|
|
19
|
-
| data | All available tags
|
|
20
|
-
| disabled | Disable entire group (all tags)
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
|
|
|
24
|
-
|
|
|
25
|
-
|
|
|
26
|
-
|
|
|
27
|
-
|
|
|
28
|
-
|
|
|
14
|
+
| Property | Description | Type | Default |
|
|
15
|
+
|------------------|-------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------|---------|
|
|
16
|
+
| addable | Allow adding tags from `data` (which are not present in `selected`) | boolean | - |
|
|
17
|
+
| className | Tag Group container class | string | - |
|
|
18
|
+
| creatable | Allow creating new tags | boolean | - |
|
|
19
|
+
| data | All available tags | (Tag & {informationCardProps?: InformationCardProps})[] | [] |
|
|
20
|
+
| disabled | Disable entire group (all tags) | boolean | - |
|
|
21
|
+
| onCreate | fired whenever a new tag has been created | (tagName: string) => void | - |
|
|
22
|
+
| onSelectedChange | fired whenever the list of selected tags changes | (tags: Tag[], actionTaken: ActionTaken) => void | - |
|
|
23
|
+
| removable | Allow removing tags from `selected` | boolean | - |
|
|
24
|
+
| style | Tag Group container styles | React.CSSProperties | - |
|
|
25
|
+
| selected | Selected tags | (Tag & {informationCardProps?: InformationCardProps})[] | [] |
|
|
26
|
+
| tagShape | Shape of tags | TagShape | - |
|
|
27
|
+
| texts | necessary texts to render tags group | TagsTexts | {} |
|
|
28
|
+
| dropdownFooter | Allows adding custom content to the footer of the dropdown | ReactNode | - |
|
|
29
|
+
| maxVisibleTags | Defines the max number of selected tags that are visible by default. Additional selected tags will appear in a dropdown | number | - |
|
|
30
|
+
|
|
29
31
|
## ActionTaken
|
|
30
32
|
|
|
31
33
|
| Property | Description | Type |
|
package/dist/Tags.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { TagsProps } from './Tags.types';
|
|
3
|
-
declare const Tags: ({ data, tagShape, onSelectedChange, disabled, removable, addable, creatable, texts, selected, style, className,
|
|
3
|
+
declare const Tags: ({ data, tagShape, onSelectedChange, disabled, removable, addable, creatable, texts, selected, style, className, onCreate, title, maxHeight, overlayStyle, overlayPlacement, asPill, dropdownFooter, maxVisibleTags, }: TagsProps) => React.JSX.Element;
|
|
4
4
|
export default Tags;
|
package/dist/Tags.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
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
|
-
import Button from '@synerise/ds-button';
|
|
4
|
-
import { useTheme } from '@synerise/ds-core';
|
|
5
|
-
import Dropdown from '@synerise/ds-dropdown';
|
|
6
|
-
import Icon, { Add3M, SearchM, SettingsM } from '@synerise/ds-icon';
|
|
7
3
|
import InformationCard from '@synerise/ds-information-card';
|
|
8
|
-
import Result from '@synerise/ds-result';
|
|
9
4
|
import Tag from '@synerise/ds-tag';
|
|
10
5
|
import * as S from './Tags.styles';
|
|
6
|
+
import { AddTags } from './components/AddTags/AddTags';
|
|
7
|
+
import { LimitedTags } from './components/LimitedTags/LimitedTags';
|
|
11
8
|
var Tags = function Tags(_ref) {
|
|
12
9
|
var _ref$data = _ref.data,
|
|
13
10
|
data = _ref$data === void 0 ? [] : _ref$data,
|
|
@@ -23,21 +20,17 @@ var Tags = function Tags(_ref) {
|
|
|
23
20
|
selected = _ref$selected === void 0 ? [] : _ref$selected,
|
|
24
21
|
style = _ref.style,
|
|
25
22
|
className = _ref.className,
|
|
26
|
-
manageLink = _ref.manageLink,
|
|
27
23
|
onCreate = _ref.onCreate,
|
|
28
24
|
title = _ref.title,
|
|
29
25
|
maxHeight = _ref.maxHeight,
|
|
30
26
|
overlayStyle = _ref.overlayStyle,
|
|
31
27
|
overlayPlacement = _ref.overlayPlacement,
|
|
32
28
|
asPill = _ref.asPill,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
var
|
|
38
|
-
searchQuery = _React$useState2[0],
|
|
39
|
-
setSearchQuery = _React$useState2[1];
|
|
40
|
-
var theme = useTheme();
|
|
29
|
+
dropdownFooter = _ref.dropdownFooter,
|
|
30
|
+
maxVisibleTags = _ref.maxVisibleTags;
|
|
31
|
+
var isMaxVisibleTagsDefined = typeof maxVisibleTags === 'number';
|
|
32
|
+
var visibleSelectedTags = isMaxVisibleTagsDefined ? selected.slice(0, maxVisibleTags) : selected;
|
|
33
|
+
var areLimitedTags = isMaxVisibleTagsDefined && selected.length > maxVisibleTags;
|
|
41
34
|
var onRemove = function onRemove(tagKey) {
|
|
42
35
|
if (!onSelectedChange || !selected) {
|
|
43
36
|
return;
|
|
@@ -55,114 +48,13 @@ var Tags = function Tags(_ref) {
|
|
|
55
48
|
tag: removedTag
|
|
56
49
|
});
|
|
57
50
|
};
|
|
58
|
-
var notSelectedList = data && selected && data.filter(function (t) {
|
|
59
|
-
return !selected.find(function (s) {
|
|
60
|
-
return s.id === t.id;
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
var selectablePool = !searchQuery ? notSelectedList : notSelectedList && notSelectedList.filter(function (t) {
|
|
64
|
-
return t.name && t.name.toLowerCase().includes(searchQuery.toLowerCase());
|
|
65
|
-
});
|
|
66
|
-
var isExactMatchFound = searchQuery && selectablePool && selectablePool.find(function (t) {
|
|
67
|
-
return t.name === searchQuery;
|
|
68
|
-
});
|
|
69
|
-
var emptyPool = selectablePool && selectablePool.length === 0;
|
|
70
|
-
var isCreatable = creatable && !isExactMatchFound && searchQuery;
|
|
71
|
-
var isSeperated = !(!manageLink && emptyPool);
|
|
72
|
-
var reset = function reset() {
|
|
73
|
-
setAddingState(false);
|
|
74
|
-
setSearchQuery('');
|
|
75
|
-
};
|
|
76
|
-
var onPoolTagSelect = function onPoolTagSelect(tag) {
|
|
77
|
-
onSelectedChange && selected && onSelectedChange([].concat(selected, [tag]), {
|
|
78
|
-
type: 'ADD',
|
|
79
|
-
tag: tag
|
|
80
|
-
});
|
|
81
|
-
reset();
|
|
82
|
-
};
|
|
83
|
-
var onCreateNewTag = function onCreateNewTag() {
|
|
84
|
-
onCreate && onCreate(searchQuery);
|
|
85
|
-
reset();
|
|
86
|
-
};
|
|
87
|
-
var dropdownOverlay = /*#__PURE__*/React.createElement(S.Overlay, {
|
|
88
|
-
"data-testid": "dropdown"
|
|
89
|
-
}, /*#__PURE__*/React.createElement(S.DropdownSearch, {
|
|
90
|
-
value: searchQuery,
|
|
91
|
-
onSearchChange: setSearchQuery,
|
|
92
|
-
placeholder: texts && texts.searchPlaceholder || '',
|
|
93
|
-
iconLeft: /*#__PURE__*/React.createElement(Icon, {
|
|
94
|
-
component: /*#__PURE__*/React.createElement(SearchM, null),
|
|
95
|
-
color: theme.palette['grey-600']
|
|
96
|
-
}),
|
|
97
|
-
onClearInput: function onClearInput() {
|
|
98
|
-
return setSearchQuery('');
|
|
99
|
-
},
|
|
100
|
-
clearTooltip: texts && texts.clearTooltip
|
|
101
|
-
}), /*#__PURE__*/React.createElement(S.DropdownContainer, {
|
|
102
|
-
maxHeight: maxHeight,
|
|
103
|
-
style: {
|
|
104
|
-
padding: '12px'
|
|
105
|
-
}
|
|
106
|
-
}, isCreatable && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(S.CreateTagDropdownButton, {
|
|
107
|
-
"data-testid": "ds-tags-create-button",
|
|
108
|
-
type: "ghost",
|
|
109
|
-
onClick: onCreateNewTag,
|
|
110
|
-
marginless: !isSeperated
|
|
111
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
112
|
-
component: /*#__PURE__*/React.createElement(Add3M, null),
|
|
113
|
-
size: 24,
|
|
114
|
-
color: theme.palette['grey-500']
|
|
115
|
-
}), /*#__PURE__*/React.createElement("span", null, texts && texts.createTagButtonLabel), /*#__PURE__*/React.createElement("strong", null, searchQuery)), isSeperated && /*#__PURE__*/React.createElement(S.Seperator, null)), !emptyPool && /*#__PURE__*/React.createElement(S.DropdownTagsContainer, {
|
|
116
|
-
"data-testid": "ds-tags-available-tags",
|
|
117
|
-
isCreatable: !!isCreatable
|
|
118
|
-
}, selectablePool && selectablePool.map(function (tag) {
|
|
119
|
-
return /*#__PURE__*/React.createElement(Tag, _extends({}, tag, {
|
|
120
|
-
key: tag.id,
|
|
121
|
-
shape: tagShape,
|
|
122
|
-
onClick: function onClick() {
|
|
123
|
-
return onPoolTagSelect(tag);
|
|
124
|
-
},
|
|
125
|
-
texts: texts,
|
|
126
|
-
tooltipProps: tag.informationCardProps ? _extends({
|
|
127
|
-
render: function render() {
|
|
128
|
-
return /*#__PURE__*/React.createElement(InformationCard, _extends({
|
|
129
|
-
title: tag.name
|
|
130
|
-
}, tag.informationCardProps, {
|
|
131
|
-
asTooltip: true
|
|
132
|
-
}));
|
|
133
|
-
},
|
|
134
|
-
placement: 'bottomLeft'
|
|
135
|
-
}, tag.tooltipProps) : undefined
|
|
136
|
-
}));
|
|
137
|
-
})), emptyPool && !isCreatable && !manageLink && /*#__PURE__*/React.createElement(S.DropdownNoTags, null, texts && texts.dropdownNoTags), emptyPool && isCreatable && /*#__PURE__*/React.createElement(Result, {
|
|
138
|
-
type: "no-results",
|
|
139
|
-
noSearchResults: true,
|
|
140
|
-
description: (texts == null ? void 0 : texts.noResultsLabel) || 'No results'
|
|
141
|
-
})), manageLink && selectablePool && !selectablePool.length && /*#__PURE__*/React.createElement(Dropdown.BottomAction, {
|
|
142
|
-
onClickAction: function onClickAction() {
|
|
143
|
-
onManageTagClick && onManageTagClick();
|
|
144
|
-
},
|
|
145
|
-
style: {
|
|
146
|
-
padding: '0 8px',
|
|
147
|
-
cursor: 'auto'
|
|
148
|
-
}
|
|
149
|
-
}, /*#__PURE__*/React.createElement(S.ManageLinkButton, {
|
|
150
|
-
type: "ghost",
|
|
151
|
-
mode: "icon-label",
|
|
152
|
-
href: manageLink,
|
|
153
|
-
onlyChild: !!(emptyPool && !isCreatable)
|
|
154
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
155
|
-
component: /*#__PURE__*/React.createElement(SettingsM, null),
|
|
156
|
-
size: 20,
|
|
157
|
-
color: theme.palette['grey-500']
|
|
158
|
-
}), ' ', texts && texts.manageLinkLabel)));
|
|
159
51
|
return /*#__PURE__*/React.createElement(S.Container, {
|
|
160
52
|
className: "ds-tags " + (className || ''),
|
|
161
53
|
style: style,
|
|
162
54
|
"data-testid": "tags"
|
|
163
55
|
}, title && /*#__PURE__*/React.createElement(S.Title, {
|
|
164
56
|
shape: tagShape
|
|
165
|
-
}, title), /*#__PURE__*/React.createElement(S.TagsWrapper, null, /*#__PURE__*/React.createElement(S.SelectedTags, null,
|
|
57
|
+
}, title), /*#__PURE__*/React.createElement(S.TagsWrapper, null, /*#__PURE__*/React.createElement(S.SelectedTags, null, visibleSelectedTags && visibleSelectedTags.map(function (tag) {
|
|
166
58
|
return /*#__PURE__*/React.createElement(S.TagOverflow, null, /*#__PURE__*/React.createElement(Tag, _extends({
|
|
167
59
|
key: tag.id,
|
|
168
60
|
shape: tagShape,
|
|
@@ -183,20 +75,26 @@ var Tags = function Tags(_ref) {
|
|
|
183
75
|
placement: 'bottomLeft'
|
|
184
76
|
}, tag.tooltipProps) : undefined
|
|
185
77
|
})));
|
|
186
|
-
}),
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
78
|
+
}), areLimitedTags && /*#__PURE__*/React.createElement(LimitedTags, {
|
|
79
|
+
selected: selected,
|
|
80
|
+
maxVisibleTags: maxVisibleTags,
|
|
81
|
+
tagShape: tagShape,
|
|
82
|
+
removable: removable,
|
|
83
|
+
onRemove: removable ? onRemove : undefined,
|
|
84
|
+
disabled: disabled,
|
|
85
|
+
asPill: asPill
|
|
86
|
+
}), addable && /*#__PURE__*/React.createElement(AddTags, {
|
|
87
|
+
data: data,
|
|
88
|
+
selected: selected,
|
|
89
|
+
creatable: creatable,
|
|
90
|
+
overlayPlacement: overlayPlacement,
|
|
91
|
+
overlayStyle: overlayStyle,
|
|
92
|
+
texts: texts,
|
|
93
|
+
tagShape: tagShape,
|
|
94
|
+
maxHeight: maxHeight,
|
|
95
|
+
dropdownFooter: dropdownFooter,
|
|
96
|
+
onSelectedChange: onSelectedChange,
|
|
97
|
+
onCreate: onCreate
|
|
98
|
+
}))));
|
|
201
99
|
};
|
|
202
100
|
export default Tags;
|
package/dist/Tags.styles.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import Button from '@synerise/ds-button';
|
|
2
|
-
import { type ScrollbarProps } from '@synerise/ds-scrollbar/dist/Scrollbar.types';
|
|
3
1
|
import { type TagShape } from '@synerise/ds-tag';
|
|
4
2
|
export declare const Container: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
3
|
export declare const TagOverflow: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -8,17 +6,3 @@ export declare const Title: import("styled-components").StyledComponent<"div", a
|
|
|
8
6
|
shape?: TagShape;
|
|
9
7
|
}, never>;
|
|
10
8
|
export declare const SelectedTags: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
11
|
-
export declare const CreateTagDropdownButton: import("styled-components").StyledComponent<typeof Button, any, {
|
|
12
|
-
marginless: boolean;
|
|
13
|
-
}, never>;
|
|
14
|
-
export declare const ManageLinkButton: import("styled-components").StyledComponent<typeof Button, any, {
|
|
15
|
-
onlyChild: boolean;
|
|
16
|
-
}, never>;
|
|
17
|
-
export declare const Seperator: import("styled-components").StyledComponent<"hr", any, {}, never>;
|
|
18
|
-
export declare const DropdownContainer: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<(ScrollbarProps | import("@synerise/ds-scrollbar").VirtualScrollbarProps) & import("react").RefAttributes<HTMLElement>>, any, ScrollbarProps, never>;
|
|
19
|
-
export declare const DropdownTagsContainer: import("styled-components").StyledComponent<"div", any, {
|
|
20
|
-
isCreatable: boolean;
|
|
21
|
-
}, never>;
|
|
22
|
-
export declare const DropdownSearch: import("styled-components").StyledComponent<({ value, className, onSearchChange, onClearInput, placeholder, iconLeft, autofocus, clearTooltip, disabled, borderRadius, handleInputRef, autofocusDelay, clearTooltipProps, valuePrefix, ...htmlAttributes }: import("@synerise/ds-search-bar/").SearchBarProps) => React.JSX.Element, any, {}, never>;
|
|
23
|
-
export declare const DropdownNoTags: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
24
|
-
export declare const Overlay: import("styled-components").StyledComponent<"div", any, {}, never>;
|
package/dist/Tags.styles.js
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
|
-
import Button from '@synerise/ds-button';
|
|
3
|
-
import { ButtonLabel } from '@synerise/ds-button/dist/Button.styles';
|
|
4
|
-
import Scrollbar from '@synerise/ds-scrollbar';
|
|
5
|
-
import SearchBar from '@synerise/ds-search-bar/';
|
|
6
2
|
export var Container = styled.div.withConfig({
|
|
7
3
|
displayName: "Tagsstyles__Container",
|
|
8
4
|
componentId: "sc-156lf0a-0"
|
|
@@ -24,44 +20,4 @@ export var Title = styled.div.withConfig({
|
|
|
24
20
|
export var SelectedTags = styled.div.withConfig({
|
|
25
21
|
displayName: "Tagsstyles__SelectedTags",
|
|
26
22
|
componentId: "sc-156lf0a-4"
|
|
27
|
-
})(["display:flex;flex-direction:row;align-items:center;flex-wrap:wrap;&& .ds-tag{margin:4px;}"]);
|
|
28
|
-
export var CreateTagDropdownButton = styled(Button).withConfig({
|
|
29
|
-
displayName: "Tagsstyles__CreateTagDropdownButton",
|
|
30
|
-
componentId: "sc-156lf0a-5"
|
|
31
|
-
})(["margin:", ";white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:flex;align-items:center;position:absolute;", "{justify-content:flex-start;}&&{font-weight:400;text-align:left;width:100%;justify-content:flex-start;}strong{font-weight:500;margin:0 0 0 3px;display:block;overflow:hidden;text-overflow:ellipsis;}"], function (props) {
|
|
32
|
-
return props.marginless ? '0' : '0 0 8px';
|
|
33
|
-
}, ButtonLabel);
|
|
34
|
-
export var ManageLinkButton = styled(Button).withConfig({
|
|
35
|
-
displayName: "Tagsstyles__ManageLinkButton",
|
|
36
|
-
componentId: "sc-156lf0a-6"
|
|
37
|
-
})(["margin:8px 0px;"]);
|
|
38
|
-
export var Seperator = styled.hr.withConfig({
|
|
39
|
-
displayName: "Tagsstyles__Seperator",
|
|
40
|
-
componentId: "sc-156lf0a-7"
|
|
41
|
-
})(["width:auto;margin:0;padding:0;border:0;height:1px;background-image:linear-gradient( to right,", " 33%,rgba(255,255,255,0) 0% );background-repeat:repeat-x;background-size:4px 1px;background-position:top;"], function (props) {
|
|
42
|
-
return props.theme.palette['grey-300'];
|
|
43
|
-
});
|
|
44
|
-
export var DropdownContainer = styled(Scrollbar).withConfig({
|
|
45
|
-
displayName: "Tagsstyles__DropdownContainer",
|
|
46
|
-
componentId: "sc-156lf0a-8"
|
|
47
|
-
})(["display:flex;flex-direction:column;"]);
|
|
48
|
-
export var DropdownTagsContainer = styled.div.withConfig({
|
|
49
|
-
displayName: "Tagsstyles__DropdownTagsContainer",
|
|
50
|
-
componentId: "sc-156lf0a-9"
|
|
51
|
-
})(["display:flex;flex-direction:column;padding:", ";max-height:320px;> *{width:fit-content;max-width:fit-content;display:block;width:inherit;cursor:pointer;flex-shrink:0;}"], function (props) {
|
|
52
|
-
return props.isCreatable ? '8px 0 0' : '0';
|
|
53
|
-
});
|
|
54
|
-
export var DropdownSearch = styled(SearchBar).withConfig({
|
|
55
|
-
displayName: "Tagsstyles__DropdownSearch",
|
|
56
|
-
componentId: "sc-156lf0a-10"
|
|
57
|
-
})(["&&{margin:0 !important;}"]);
|
|
58
|
-
export var DropdownNoTags = styled.div.withConfig({
|
|
59
|
-
displayName: "Tagsstyles__DropdownNoTags",
|
|
60
|
-
componentId: "sc-156lf0a-11"
|
|
61
|
-
})(["padding:8px 20px;"]);
|
|
62
|
-
export var Overlay = styled.div.withConfig({
|
|
63
|
-
displayName: "Tagsstyles__Overlay",
|
|
64
|
-
componentId: "sc-156lf0a-12"
|
|
65
|
-
})(["width:216px;background-color:", ";"], function (props) {
|
|
66
|
-
return props.theme.palette.white;
|
|
67
|
-
});
|
|
23
|
+
})(["display:flex;flex-direction:row;align-items:center;flex-wrap:wrap;&& .ds-tag{margin:4px;}"]);
|
package/dist/Tags.types.d.ts
CHANGED
|
@@ -5,13 +5,12 @@ export type ActionTaken = {
|
|
|
5
5
|
type: 'ADD' | 'REMOVE';
|
|
6
6
|
tag: TagProps;
|
|
7
7
|
};
|
|
8
|
+
export type ExtendedTagProps = TagProps & {
|
|
9
|
+
informationCardProps?: InformationCardProps;
|
|
10
|
+
};
|
|
8
11
|
export type TagsProps = {
|
|
9
|
-
data?:
|
|
10
|
-
|
|
11
|
-
}>;
|
|
12
|
-
selected?: Array<TagProps & {
|
|
13
|
-
informationCardProps?: InformationCardProps;
|
|
14
|
-
}>;
|
|
12
|
+
data?: ExtendedTagProps[];
|
|
13
|
+
selected?: ExtendedTagProps[];
|
|
15
14
|
tagShape?: TagShape;
|
|
16
15
|
className?: string;
|
|
17
16
|
style?: CSSProperties;
|
|
@@ -20,7 +19,6 @@ export type TagsProps = {
|
|
|
20
19
|
removable?: boolean;
|
|
21
20
|
creatable?: boolean;
|
|
22
21
|
disabled?: boolean;
|
|
23
|
-
manageLink?: string;
|
|
24
22
|
texts?: TagTexts;
|
|
25
23
|
/**
|
|
26
24
|
* @deprecated deprecated in favour of useTheme hook
|
|
@@ -34,7 +32,8 @@ export type TagsProps = {
|
|
|
34
32
|
maxHeight?: number;
|
|
35
33
|
overlayPlacement?: 'topLeft' | 'topCenter' | 'topRight' | 'bottomLeft' | 'bottomCenter' | 'bottomRight';
|
|
36
34
|
asPill?: boolean;
|
|
37
|
-
|
|
35
|
+
dropdownFooter?: ReactNode;
|
|
36
|
+
maxVisibleTags?: number;
|
|
38
37
|
};
|
|
39
38
|
/**
|
|
40
39
|
* @deprecated - use TagsProps instead
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
import { type DropdownProps } from '@synerise/ds-dropdown';
|
|
3
|
+
import { type TagProps, type TagShape, type TagTexts } from '@synerise/ds-tag';
|
|
4
|
+
import { type ActionTaken } from '../../Tags.types';
|
|
5
|
+
type AddTagsProps = {
|
|
6
|
+
creatable?: boolean;
|
|
7
|
+
data?: TagProps[];
|
|
8
|
+
selected: TagProps[];
|
|
9
|
+
overlayPlacement: DropdownProps['placement'];
|
|
10
|
+
overlayStyle: DropdownProps['overlayStyle'];
|
|
11
|
+
texts?: TagTexts;
|
|
12
|
+
maxHeight?: number;
|
|
13
|
+
dropdownFooter?: ReactNode;
|
|
14
|
+
tagShape?: TagShape;
|
|
15
|
+
onSelectedChange?: (tags: Array<TagProps>, action: ActionTaken) => void;
|
|
16
|
+
onCreate?: (name: string) => void;
|
|
17
|
+
};
|
|
18
|
+
export declare const AddTags: ({ creatable, data, selected, overlayPlacement, overlayStyle, texts, tagShape, maxHeight, dropdownFooter, onSelectedChange, onCreate, }: AddTagsProps) => React.JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import Button from '@synerise/ds-button';
|
|
3
|
+
import { useTheme } from '@synerise/ds-core';
|
|
4
|
+
import Icon, { Add3M, SearchM } from '@synerise/ds-icon';
|
|
5
|
+
import Result from '@synerise/ds-result';
|
|
6
|
+
import SearchBar from '@synerise/ds-search-bar';
|
|
7
|
+
import { TagsDropdown } from '../TagsDropdown/TagsDropdown';
|
|
8
|
+
import * as S from './AddTags.styles';
|
|
9
|
+
export var AddTags = function AddTags(_ref) {
|
|
10
|
+
var creatable = _ref.creatable,
|
|
11
|
+
data = _ref.data,
|
|
12
|
+
selected = _ref.selected,
|
|
13
|
+
overlayPlacement = _ref.overlayPlacement,
|
|
14
|
+
overlayStyle = _ref.overlayStyle,
|
|
15
|
+
texts = _ref.texts,
|
|
16
|
+
tagShape = _ref.tagShape,
|
|
17
|
+
maxHeight = _ref.maxHeight,
|
|
18
|
+
dropdownFooter = _ref.dropdownFooter,
|
|
19
|
+
onSelectedChange = _ref.onSelectedChange,
|
|
20
|
+
onCreate = _ref.onCreate;
|
|
21
|
+
var theme = useTheme();
|
|
22
|
+
var _useState = useState(''),
|
|
23
|
+
searchQuery = _useState[0],
|
|
24
|
+
setSearchQuery = _useState[1];
|
|
25
|
+
var _useState2 = useState(false),
|
|
26
|
+
isTagAddDropdownOpen = _useState2[0],
|
|
27
|
+
setIsTagAddDropdownOpen = _useState2[1];
|
|
28
|
+
var reset = function reset() {
|
|
29
|
+
setIsTagAddDropdownOpen(false);
|
|
30
|
+
setSearchQuery('');
|
|
31
|
+
};
|
|
32
|
+
var onPoolTagSelect = function onPoolTagSelect(tag) {
|
|
33
|
+
onSelectedChange && selected && onSelectedChange([].concat(selected, [tag]), {
|
|
34
|
+
type: 'ADD',
|
|
35
|
+
tag: tag
|
|
36
|
+
});
|
|
37
|
+
reset();
|
|
38
|
+
};
|
|
39
|
+
var onCreateNewTag = function onCreateNewTag() {
|
|
40
|
+
onCreate && onCreate(searchQuery);
|
|
41
|
+
reset();
|
|
42
|
+
};
|
|
43
|
+
var notSelectedList = data && selected && data.filter(function (t) {
|
|
44
|
+
return !selected.find(function (s) {
|
|
45
|
+
return s.id === t.id;
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
var selectablePool = !searchQuery ? notSelectedList : notSelectedList && notSelectedList.filter(function (t) {
|
|
49
|
+
return t.name && t.name.toLowerCase().includes(searchQuery.toLowerCase());
|
|
50
|
+
});
|
|
51
|
+
var isExactMatchFound = searchQuery && selectablePool && selectablePool.find(function (t) {
|
|
52
|
+
return t.name === searchQuery;
|
|
53
|
+
});
|
|
54
|
+
var emptyPool = selectablePool && selectablePool.length === 0;
|
|
55
|
+
var isCreatable = creatable && !isExactMatchFound && searchQuery;
|
|
56
|
+
var isSeparated = !emptyPool;
|
|
57
|
+
var noTagsContentLabel = !!(notSelectedList != null && notSelectedList.length) && !!searchQuery ? texts == null ? void 0 : texts.noResultsLabel : texts == null ? void 0 : texts.dropdownNoTags;
|
|
58
|
+
return /*#__PURE__*/React.createElement(TagsDropdown, {
|
|
59
|
+
tags: selectablePool,
|
|
60
|
+
trigger: ['click'],
|
|
61
|
+
maxHeight: maxHeight,
|
|
62
|
+
placement: overlayPlacement,
|
|
63
|
+
open: isTagAddDropdownOpen,
|
|
64
|
+
onOpenChange: setIsTagAddDropdownOpen,
|
|
65
|
+
overlayStyle: overlayStyle,
|
|
66
|
+
tagShape: tagShape,
|
|
67
|
+
onTagClick: onPoolTagSelect,
|
|
68
|
+
dropdownFooter: dropdownFooter,
|
|
69
|
+
aboveTagsContent: isCreatable && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(S.CreateTagDropdownButton, {
|
|
70
|
+
"data-testid": "ds-tags-create-button",
|
|
71
|
+
type: "ghost",
|
|
72
|
+
mode: "icon-label",
|
|
73
|
+
onClick: onCreateNewTag,
|
|
74
|
+
marginless: !isSeparated
|
|
75
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
76
|
+
component: /*#__PURE__*/React.createElement(Add3M, null),
|
|
77
|
+
size: 24,
|
|
78
|
+
color: theme.palette['grey-500']
|
|
79
|
+
}), /*#__PURE__*/React.createElement("span", null, texts && texts.createTagButtonLabel), /*#__PURE__*/React.createElement("strong", null, searchQuery)), isSeparated && /*#__PURE__*/React.createElement(S.Separator, null)),
|
|
80
|
+
noTagsContent: /*#__PURE__*/React.createElement(Result, {
|
|
81
|
+
type: "no-results",
|
|
82
|
+
description: noTagsContentLabel || 'No results'
|
|
83
|
+
}),
|
|
84
|
+
dropdownHeader: /*#__PURE__*/React.createElement(SearchBar, {
|
|
85
|
+
value: searchQuery,
|
|
86
|
+
onSearchChange: setSearchQuery,
|
|
87
|
+
placeholder: texts && texts.searchPlaceholder || '',
|
|
88
|
+
iconLeft: /*#__PURE__*/React.createElement(Icon, {
|
|
89
|
+
component: /*#__PURE__*/React.createElement(SearchM, null),
|
|
90
|
+
color: theme.palette['grey-600']
|
|
91
|
+
}),
|
|
92
|
+
onClearInput: function onClearInput() {
|
|
93
|
+
return setSearchQuery('');
|
|
94
|
+
},
|
|
95
|
+
clearTooltip: texts && texts.clearTooltip
|
|
96
|
+
})
|
|
97
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
98
|
+
type: "ghost",
|
|
99
|
+
mode: texts != null && texts.addButtonLabel ? 'icon-label' : 'single-icon'
|
|
100
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
101
|
+
component: /*#__PURE__*/React.createElement(Add3M, null),
|
|
102
|
+
size: 24,
|
|
103
|
+
color: theme.palette['grey-500']
|
|
104
|
+
}), texts && texts.addButtonLabel));
|
|
105
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import Button from '@synerise/ds-button';
|
|
2
|
+
export declare const CreateTagDropdownButton: import("styled-components").StyledComponent<typeof Button, any, {
|
|
3
|
+
marginless: boolean;
|
|
4
|
+
}, never>;
|
|
5
|
+
export declare const Separator: import("styled-components").StyledComponent<"hr", any, {}, never>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import Button from '@synerise/ds-button';
|
|
3
|
+
import { ButtonLabel } from '@synerise/ds-button/dist/Button.styles';
|
|
4
|
+
export var CreateTagDropdownButton = styled(Button).withConfig({
|
|
5
|
+
displayName: "AddTagsstyles__CreateTagDropdownButton",
|
|
6
|
+
componentId: "sc-1wg5ubr-0"
|
|
7
|
+
})(["margin:", ";white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:flex;align-items:center;position:absolute;", "{justify-content:flex-start;}&&{font-weight:400;text-align:left;width:100%;justify-content:flex-start;}strong{font-weight:500;margin:0 0 0 3px;display:block;overflow:hidden;text-overflow:ellipsis;}"], function (props) {
|
|
8
|
+
return props.marginless ? '0' : '0 0 8px';
|
|
9
|
+
}, ButtonLabel);
|
|
10
|
+
export var Separator = styled.hr.withConfig({
|
|
11
|
+
displayName: "AddTagsstyles__Separator",
|
|
12
|
+
componentId: "sc-1wg5ubr-1"
|
|
13
|
+
})(["width:auto;margin:0;padding:0;padding-bottom:8px;border:0;height:1px;background-image:linear-gradient( to right,", " 33%,rgba(255,255,255,0) 0% );background-repeat:repeat-x;background-size:4px 1px;background-position:top;"], function (props) {
|
|
14
|
+
return props.theme.palette['grey-300'];
|
|
15
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type TagProps, type TagShape } from '@synerise/ds-tag';
|
|
3
|
+
type LimitedTagsProps = {
|
|
4
|
+
selected: TagProps[];
|
|
5
|
+
tagShape?: TagShape;
|
|
6
|
+
maxVisibleTags?: number;
|
|
7
|
+
removable?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
asPill?: boolean;
|
|
10
|
+
onRemove?: (tagKey: string | number) => void;
|
|
11
|
+
};
|
|
12
|
+
export declare const LimitedTags: ({ tagShape, selected, maxVisibleTags, asPill, removable, disabled, onRemove, }: LimitedTagsProps) => React.JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Tag from '@synerise/ds-tag';
|
|
3
|
+
import { TagsDropdown } from '../TagsDropdown/TagsDropdown';
|
|
4
|
+
export var LimitedTags = function LimitedTags(_ref) {
|
|
5
|
+
var tagShape = _ref.tagShape,
|
|
6
|
+
selected = _ref.selected,
|
|
7
|
+
maxVisibleTags = _ref.maxVisibleTags,
|
|
8
|
+
asPill = _ref.asPill,
|
|
9
|
+
removable = _ref.removable,
|
|
10
|
+
disabled = _ref.disabled,
|
|
11
|
+
onRemove = _ref.onRemove;
|
|
12
|
+
var limitedSelectedTags = selected.slice(maxVisibleTags);
|
|
13
|
+
return /*#__PURE__*/React.createElement(TagsDropdown, {
|
|
14
|
+
tags: limitedSelectedTags,
|
|
15
|
+
trigger: ['hover'],
|
|
16
|
+
tagShape: tagShape,
|
|
17
|
+
removable: removable,
|
|
18
|
+
onRemove: removable ? onRemove : undefined,
|
|
19
|
+
disabled: disabled,
|
|
20
|
+
asPill: asPill
|
|
21
|
+
}, /*#__PURE__*/React.createElement(Tag, {
|
|
22
|
+
id: "limited-tags",
|
|
23
|
+
shape: tagShape,
|
|
24
|
+
name: "+" + limitedSelectedTags.length,
|
|
25
|
+
asPill: true
|
|
26
|
+
}));
|
|
27
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
import { type DropdownProps } from '@synerise/ds-dropdown';
|
|
3
|
+
import { type TagProps, type TagShape, type TagTexts } from '@synerise/ds-tag';
|
|
4
|
+
import { type ExtendedTagProps } from '../../Tags.types';
|
|
5
|
+
type TagDropdownProps = {
|
|
6
|
+
tags?: ExtendedTagProps[];
|
|
7
|
+
texts?: TagTexts;
|
|
8
|
+
removable?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
asPill?: boolean;
|
|
11
|
+
tagShape?: TagShape;
|
|
12
|
+
dropdownFooter?: ReactNode;
|
|
13
|
+
noTagsContent?: ReactNode;
|
|
14
|
+
aboveTagsContent?: ReactNode;
|
|
15
|
+
dropdownHeader?: ReactNode;
|
|
16
|
+
maxHeight?: number;
|
|
17
|
+
onRemove?: (tagKey: string | number) => void;
|
|
18
|
+
onTagClick?: (tag: TagProps) => void;
|
|
19
|
+
} & DropdownProps;
|
|
20
|
+
export declare const TagsDropdown: ({ tags, tagShape, texts, removable, disabled, onRemove, asPill, dropdownFooter, noTagsContent, dropdownHeader, aboveTagsContent, maxHeight, onTagClick, ...dropdownProps }: TagDropdownProps) => React.JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
var _excluded = ["tags", "tagShape", "texts", "removable", "disabled", "onRemove", "asPill", "dropdownFooter", "noTagsContent", "dropdownHeader", "aboveTagsContent", "maxHeight", "onTagClick"];
|
|
2
|
+
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); }
|
|
3
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import Dropdown from '@synerise/ds-dropdown';
|
|
6
|
+
import InformationCard from '@synerise/ds-information-card';
|
|
7
|
+
import Tag from '@synerise/ds-tag';
|
|
8
|
+
import { NOOP } from '@synerise/ds-utils';
|
|
9
|
+
import * as S from './TagsDropdown.styles';
|
|
10
|
+
var DROPDOWN_BOTTOM_ACTION_STYLES = {
|
|
11
|
+
padding: '0 8px',
|
|
12
|
+
cursor: 'auto'
|
|
13
|
+
};
|
|
14
|
+
var DROPDOWN_CONTAINER_STYLES = {
|
|
15
|
+
padding: '8px'
|
|
16
|
+
};
|
|
17
|
+
export var TagsDropdown = function TagsDropdown(_ref) {
|
|
18
|
+
var tags = _ref.tags,
|
|
19
|
+
tagShape = _ref.tagShape,
|
|
20
|
+
texts = _ref.texts,
|
|
21
|
+
removable = _ref.removable,
|
|
22
|
+
disabled = _ref.disabled,
|
|
23
|
+
onRemove = _ref.onRemove,
|
|
24
|
+
asPill = _ref.asPill,
|
|
25
|
+
dropdownFooter = _ref.dropdownFooter,
|
|
26
|
+
noTagsContent = _ref.noTagsContent,
|
|
27
|
+
dropdownHeader = _ref.dropdownHeader,
|
|
28
|
+
aboveTagsContent = _ref.aboveTagsContent,
|
|
29
|
+
maxHeight = _ref.maxHeight,
|
|
30
|
+
onTagClick = _ref.onTagClick,
|
|
31
|
+
dropdownProps = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
32
|
+
var areTags = !!(tags != null && tags.length);
|
|
33
|
+
return /*#__PURE__*/React.createElement(Dropdown, _extends({}, dropdownProps, {
|
|
34
|
+
overlay: /*#__PURE__*/React.createElement(S.Overlay, {
|
|
35
|
+
"data-testid": "ds-tags-dropdown-overlay"
|
|
36
|
+
}, dropdownHeader, /*#__PURE__*/React.createElement(S.DropdownContainer, {
|
|
37
|
+
absolute: true,
|
|
38
|
+
maxHeight: maxHeight,
|
|
39
|
+
style: DROPDOWN_CONTAINER_STYLES
|
|
40
|
+
}, aboveTagsContent, areTags ? /*#__PURE__*/React.createElement(S.DropdownTagsContainer, {
|
|
41
|
+
"data-testid": "ds-tags-available-tags"
|
|
42
|
+
}, tags.map(function (tag) {
|
|
43
|
+
return /*#__PURE__*/React.createElement(Tag, _extends({}, tag, {
|
|
44
|
+
key: tag.id,
|
|
45
|
+
shape: tagShape,
|
|
46
|
+
removable: removable,
|
|
47
|
+
onRemove: removable ? onRemove : undefined,
|
|
48
|
+
disabled: disabled,
|
|
49
|
+
asPill: asPill,
|
|
50
|
+
onClick: function onClick() {
|
|
51
|
+
return onTagClick == null ? void 0 : onTagClick(tag);
|
|
52
|
+
},
|
|
53
|
+
texts: texts,
|
|
54
|
+
tooltipProps: tag.informationCardProps ? _extends({
|
|
55
|
+
render: function render() {
|
|
56
|
+
return /*#__PURE__*/React.createElement(InformationCard, _extends({
|
|
57
|
+
title: tag.name
|
|
58
|
+
}, tag.informationCardProps, {
|
|
59
|
+
asTooltip: true
|
|
60
|
+
}));
|
|
61
|
+
},
|
|
62
|
+
placement: 'right'
|
|
63
|
+
}, tag.tooltipProps) : undefined
|
|
64
|
+
}));
|
|
65
|
+
})) : noTagsContent), dropdownFooter && /*#__PURE__*/React.createElement(Dropdown.BottomAction, {
|
|
66
|
+
onClickAction: NOOP,
|
|
67
|
+
style: DROPDOWN_BOTTOM_ACTION_STYLES
|
|
68
|
+
}, dropdownFooter))
|
|
69
|
+
}));
|
|
70
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type ScrollbarProps } from '@synerise/ds-scrollbar';
|
|
2
|
+
export declare const Overlay: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
+
export declare const DropdownContainer: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<(ScrollbarProps | import("@synerise/ds-scrollbar").VirtualScrollbarProps) & import("react").RefAttributes<HTMLElement>>, any, ScrollbarProps, never>;
|
|
4
|
+
export declare const DropdownTagsContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import Scrollbar from '@synerise/ds-scrollbar';
|
|
3
|
+
export var Overlay = styled.div.withConfig({
|
|
4
|
+
displayName: "TagsDropdownstyles__Overlay",
|
|
5
|
+
componentId: "sc-15cr02t-0"
|
|
6
|
+
})(["width:216px;background-color:", ";"], function (props) {
|
|
7
|
+
return props.theme.palette.white;
|
|
8
|
+
});
|
|
9
|
+
export var DropdownContainer = styled(Scrollbar).withConfig({
|
|
10
|
+
displayName: "TagsDropdownstyles__DropdownContainer",
|
|
11
|
+
componentId: "sc-15cr02t-1"
|
|
12
|
+
})(["display:flex;flex-direction:column;"]);
|
|
13
|
+
export var DropdownTagsContainer = styled.div.withConfig({
|
|
14
|
+
displayName: "TagsDropdownstyles__DropdownTagsContainer",
|
|
15
|
+
componentId: "sc-15cr02t-2"
|
|
16
|
+
})(["display:flex;flex-direction:column;max-height:320px;> *{width:fit-content;max-width:fit-content;display:block;width:inherit;cursor:pointer;flex-shrink:0;}"]);
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { default } from './Tags';
|
|
2
2
|
export * as TagsStyles from './Tags.styles';
|
|
3
|
-
export type { TagsProps, ActionTaken } from './Tags.types';
|
|
3
|
+
export type { TagsProps, ActionTaken, ExtendedTagProps } from './Tags.types';
|
|
4
4
|
/**
|
|
5
5
|
* @deprecated import directly from @synerise/ds-tag
|
|
6
6
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-tags",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Tags UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -36,12 +36,12 @@
|
|
|
36
36
|
"types": "dist/index.d.ts",
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@synerise/ds-button": "^1.4.11",
|
|
39
|
-
"@synerise/ds-dropdown": "^1.0.
|
|
39
|
+
"@synerise/ds-dropdown": "^1.0.24",
|
|
40
40
|
"@synerise/ds-icon": "^1.7.2",
|
|
41
|
-
"@synerise/ds-information-card": "^1.1.
|
|
41
|
+
"@synerise/ds-information-card": "^1.1.1",
|
|
42
42
|
"@synerise/ds-result": "^1.0.24",
|
|
43
43
|
"@synerise/ds-scrollbar": "^1.1.8",
|
|
44
|
-
"@synerise/ds-search-bar": "^1.3.
|
|
44
|
+
"@synerise/ds-search-bar": "^1.3.13",
|
|
45
45
|
"@synerise/ds-tag": "^1.2.0",
|
|
46
46
|
"@synerise/ds-tooltip": "^1.2.0",
|
|
47
47
|
"@synerise/ds-utils": "^1.4.2"
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"react": ">=16.9.0 <= 18.3.1",
|
|
52
52
|
"styled-components": "^5.3.3"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "4f56489ade5b08524578821d0c51c963002ff48c"
|
|
55
55
|
}
|