@synerise/ds-tags 1.5.25 → 1.5.27
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 +8 -0
- package/README.md +8 -5
- package/dist/Tags.d.ts +2 -2
- package/dist/Tags.js +51 -91
- package/dist/Tags.styles.d.ts +10 -10
- package/dist/Tags.styles.js +18 -12
- package/dist/Tags.types.d.ts +3 -3
- package/dist/Tags.types.js +1 -1
- package/dist/components/AddTags/AddTags.d.ts +3 -3
- package/dist/components/AddTags/AddTags.js +57 -109
- package/dist/components/AddTags/AddTags.styles.d.ts +2 -2
- package/dist/components/AddTags/AddTags.styles.js +14 -15
- package/dist/components/LimitedTags/LimitedTags.d.ts +2 -2
- package/dist/components/LimitedTags/LimitedTags.js +21 -34
- package/dist/components/TagsDropdown/TagsDropdown.d.ts +4 -4
- package/dist/components/TagsDropdown/TagsDropdown.js +45 -68
- package/dist/components/TagsDropdown/TagsDropdown.styles.d.ts +5 -5
- package/dist/components/TagsDropdown/TagsDropdown.styles.js +14 -8
- package/dist/index.js +11 -13
- package/dist/modules.d.js +1 -1
- package/dist/modules.d.ts +0 -0
- package/package.json +14 -14
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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.5.27](https://github.com/Synerise/synerise-design/compare/@synerise/ds-tags@1.5.26...@synerise/ds-tags@1.5.27) (2026-03-24)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-tags
|
|
9
|
+
|
|
10
|
+
## [1.5.26](https://github.com/Synerise/synerise-design/compare/@synerise/ds-tags@1.5.25...@synerise/ds-tags@1.5.26) (2026-03-20)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @synerise/ds-tags
|
|
13
|
+
|
|
6
14
|
## [1.5.25](https://github.com/Synerise/synerise-design/compare/@synerise/ds-tags@1.5.24...@synerise/ds-tags@1.5.25) (2026-03-09)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @synerise/ds-tags
|
package/README.md
CHANGED
|
@@ -24,10 +24,14 @@ Tags UI Component
|
|
|
24
24
|
| style | Tag Group container styles | React.CSSProperties | - |
|
|
25
25
|
| selected | Selected tags | (Tag & {informationCardProps?: InformationCardProps})[] | [] |
|
|
26
26
|
| tagShape | Shape of tags | TagShape | - |
|
|
27
|
-
| texts | necessary texts to render tags group |
|
|
27
|
+
| texts | necessary texts to render tags group | Partial\<TagTexts\> | - |
|
|
28
28
|
| dropdownFooter | Allows adding custom content to the footer of the dropdown | ReactNode | - |
|
|
29
29
|
| maxVisibleTags | Defines the max number of selected tags that are visible by default. Additional selected tags will appear in a dropdown | number | - |
|
|
30
|
-
| addButtonType | Defines the type of button used to add more tags. 'icon-label'
|
|
30
|
+
| addButtonType | Defines the type of button used to add more tags. Defaults to `'icon-label'` when `texts.addButtonLabel` is set, otherwise `'single-icon'` | `'single-icon' \| 'icon-label'` | - |
|
|
31
|
+
| overlayPlacement | Placement of the add-tags dropdown | `'topLeft' \| 'topCenter' \| 'topRight' \| 'bottomLeft' \| 'bottomCenter' \| 'bottomRight'` | - |
|
|
32
|
+
| overlayStyle | Inline style override for the add-tags dropdown overlay | React.CSSProperties | - |
|
|
33
|
+
| maxHeight | Max height (px) of the add-tags dropdown scrollable area | number | - |
|
|
34
|
+
| asPill | Render all tags as pills | boolean | - |
|
|
31
35
|
|
|
32
36
|
## ActionTaken
|
|
33
37
|
|
|
@@ -36,7 +40,7 @@ Tags UI Component
|
|
|
36
40
|
| tag | Affected tag | Tag |
|
|
37
41
|
| type | Type of action taken that caused onSelectedChange to be called | 'ADD' / 'REMOVE' |
|
|
38
42
|
|
|
39
|
-
##
|
|
43
|
+
## TagTexts
|
|
40
44
|
|
|
41
45
|
| Property | Description | Type | Default |
|
|
42
46
|
| -------------------- | ------------------------------------------------------------- | ------------------ | ------------ |
|
|
@@ -46,6 +50,5 @@ Tags UI Component
|
|
|
46
50
|
| searchPlaceholder | Search input placeholder for add tag dropdown | string | |
|
|
47
51
|
| manageLinkLabel | Label for manage link for add tag dropdown | string / ReactNode | |
|
|
48
52
|
| createTagButtonLabel | Label for create tag button for add tag dropdown | string / ReactNode | |
|
|
49
|
-
| noResultsLabel | Label displayed when filtering tags returns an empty array | string / ReactNode | `No
|
|
53
|
+
| noResultsLabel | Label displayed when filtering tags returns an empty array | string / ReactNode | `No tags found` |
|
|
50
54
|
| dropdownNoTags | Text for a label displayed when no tags are found to be added | string / ReactNode | |
|
|
51
|
-
| title | Text for a tags group | ReactNode | |
|
package/dist/Tags.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TagsProps } from './Tags.types';
|
|
3
3
|
declare const Tags: ({ data, tagShape, onSelectedChange, disabled, removable, addable, creatable, texts, selected, style, className, onCreate, title, maxHeight, overlayStyle, overlayPlacement, asPill, dropdownFooter, addButtonType, maxVisibleTags, }: TagsProps) => React.JSX.Element;
|
|
4
4
|
export default Tags;
|
package/dist/Tags.js
CHANGED
|
@@ -1,101 +1,61 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
var areLimitedTags = isMaxVisibleTagsDefined && selected.length > maxVisibleTags;
|
|
35
|
-
var onRemove = function onRemove(tagKey) {
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import InformationCard from "@synerise/ds-information-card";
|
|
3
|
+
import Tag, { useDefaultTexts } from "@synerise/ds-tag";
|
|
4
|
+
import { Container, Title, TagsWrapper, SelectedTags, TagOverflow } from "./Tags.styles.js";
|
|
5
|
+
import { AddTags } from "./components/AddTags/AddTags.js";
|
|
6
|
+
import { LimitedTags } from "./components/LimitedTags/LimitedTags.js";
|
|
7
|
+
const Tags = ({
|
|
8
|
+
data = [],
|
|
9
|
+
tagShape,
|
|
10
|
+
onSelectedChange,
|
|
11
|
+
disabled,
|
|
12
|
+
removable,
|
|
13
|
+
addable,
|
|
14
|
+
creatable,
|
|
15
|
+
texts,
|
|
16
|
+
selected = [],
|
|
17
|
+
style,
|
|
18
|
+
className,
|
|
19
|
+
onCreate,
|
|
20
|
+
title,
|
|
21
|
+
maxHeight,
|
|
22
|
+
overlayStyle,
|
|
23
|
+
overlayPlacement,
|
|
24
|
+
asPill,
|
|
25
|
+
dropdownFooter,
|
|
26
|
+
addButtonType,
|
|
27
|
+
maxVisibleTags
|
|
28
|
+
}) => {
|
|
29
|
+
const isMaxVisibleTagsDefined = typeof maxVisibleTags === "number";
|
|
30
|
+
const allTexts = useDefaultTexts(texts);
|
|
31
|
+
const visibleSelectedTags = isMaxVisibleTagsDefined ? selected.slice(0, maxVisibleTags) : selected;
|
|
32
|
+
const areLimitedTags = isMaxVisibleTagsDefined && selected.length > maxVisibleTags;
|
|
33
|
+
const onRemove = (tagKey) => {
|
|
36
34
|
if (!onSelectedChange || !selected) {
|
|
37
35
|
return;
|
|
38
36
|
}
|
|
39
|
-
|
|
40
|
-
return tag.id === tagKey;
|
|
41
|
-
});
|
|
37
|
+
const removedTag = selected.find((tag) => tag.id === tagKey);
|
|
42
38
|
if (!removedTag) {
|
|
43
39
|
return;
|
|
44
40
|
}
|
|
45
|
-
onSelectedChange(selected.filter(
|
|
46
|
-
|
|
47
|
-
}), {
|
|
48
|
-
type: 'REMOVE',
|
|
41
|
+
onSelectedChange(selected.filter((tag) => tag.id !== tagKey), {
|
|
42
|
+
type: "REMOVE",
|
|
49
43
|
tag: removedTag
|
|
50
44
|
});
|
|
51
45
|
};
|
|
52
|
-
return
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}, tag, {
|
|
68
|
-
tooltipProps: tag.informationCardProps ? _extends({
|
|
69
|
-
render: function render() {
|
|
70
|
-
return /*#__PURE__*/React.createElement(InformationCard, _extends({
|
|
71
|
-
title: tag.name
|
|
72
|
-
}, tag.informationCardProps, {
|
|
73
|
-
asTooltip: true
|
|
74
|
-
}));
|
|
75
|
-
},
|
|
76
|
-
placement: 'bottomLeft'
|
|
77
|
-
}, tag.tooltipProps) : undefined
|
|
78
|
-
})));
|
|
79
|
-
}), areLimitedTags && /*#__PURE__*/React.createElement(LimitedTags, {
|
|
80
|
-
selected: selected,
|
|
81
|
-
maxVisibleTags: maxVisibleTags,
|
|
82
|
-
tagShape: tagShape,
|
|
83
|
-
removable: removable,
|
|
84
|
-
onRemove: removable ? onRemove : undefined,
|
|
85
|
-
disabled: disabled
|
|
86
|
-
}), addable && /*#__PURE__*/React.createElement(AddTags, {
|
|
87
|
-
data: data,
|
|
88
|
-
selected: selected,
|
|
89
|
-
creatable: creatable,
|
|
90
|
-
overlayPlacement: overlayPlacement,
|
|
91
|
-
overlayStyle: overlayStyle,
|
|
92
|
-
texts: allTexts,
|
|
93
|
-
tagShape: tagShape,
|
|
94
|
-
maxHeight: maxHeight,
|
|
95
|
-
dropdownFooter: dropdownFooter,
|
|
96
|
-
onSelectedChange: onSelectedChange,
|
|
97
|
-
onCreate: onCreate,
|
|
98
|
-
addButtonType: addButtonType
|
|
99
|
-
}))));
|
|
46
|
+
return /* @__PURE__ */ jsxs(Container, { className: `ds-tags ${className || ""}`, style, "data-testid": "tags", children: [
|
|
47
|
+
title && /* @__PURE__ */ jsx(Title, { shape: tagShape, children: title }),
|
|
48
|
+
/* @__PURE__ */ jsx(TagsWrapper, { children: /* @__PURE__ */ jsxs(SelectedTags, { children: [
|
|
49
|
+
visibleSelectedTags && visibleSelectedTags.map((tag) => /* @__PURE__ */ jsx(TagOverflow, { children: /* @__PURE__ */ jsx(Tag, { shape: tagShape, removable, onRemove: removable ? onRemove : void 0, disabled, texts: allTexts, asPill, ...tag, tooltipProps: tag.informationCardProps ? {
|
|
50
|
+
render: () => /* @__PURE__ */ jsx(InformationCard, { title: tag.name, ...tag.informationCardProps, asTooltip: true }),
|
|
51
|
+
placement: "bottomLeft",
|
|
52
|
+
...tag.tooltipProps
|
|
53
|
+
} : void 0 }, tag.id) })),
|
|
54
|
+
areLimitedTags && /* @__PURE__ */ jsx(LimitedTags, { selected, maxVisibleTags, tagShape, removable, onRemove: removable ? onRemove : void 0, disabled }),
|
|
55
|
+
addable && /* @__PURE__ */ jsx(AddTags, { data, selected, creatable, overlayPlacement, overlayStyle, texts: allTexts, tagShape, maxHeight, dropdownFooter, onSelectedChange, onCreate, addButtonType })
|
|
56
|
+
] }) })
|
|
57
|
+
] });
|
|
58
|
+
};
|
|
59
|
+
export {
|
|
60
|
+
Tags as default
|
|
100
61
|
};
|
|
101
|
-
export default Tags;
|
package/dist/Tags.styles.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const Container: import(
|
|
3
|
-
export declare const TagOverflow: import(
|
|
4
|
-
export declare const LimitedTag: import(
|
|
1
|
+
import { TagShape } from '@synerise/ds-tag';
|
|
2
|
+
export declare const Container: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
3
|
+
export declare const TagOverflow: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
4
|
+
export declare const LimitedTag: import('styled-components').StyledComponent<import('react').ForwardRefExoticComponent<{
|
|
5
5
|
id?: string | number;
|
|
6
6
|
name?: string;
|
|
7
7
|
textColor?: string;
|
|
@@ -15,13 +15,13 @@ export declare const LimitedTag: import("styled-components").StyledComponent<imp
|
|
|
15
15
|
onRemove?: (tag: string | number) => void;
|
|
16
16
|
prefixel?: React.ReactNode;
|
|
17
17
|
suffixel?: React.ReactNode;
|
|
18
|
-
texts?: import(
|
|
18
|
+
texts?: import('@synerise/ds-tag').TagTexts;
|
|
19
19
|
asPill?: boolean;
|
|
20
20
|
dashed?: boolean;
|
|
21
|
-
tooltipProps?: import(
|
|
22
|
-
} & Omit<import(
|
|
23
|
-
export declare const TagsWrapper: import(
|
|
24
|
-
export declare const Title: import(
|
|
21
|
+
tooltipProps?: import('@synerise/ds-tooltip').TooltipProps;
|
|
22
|
+
} & Omit<import('react').HTMLAttributes<HTMLDivElement>, "image" | "className" | "id" | "color" | "onClick" | "name" | "textColor" | "shape" | "removable" | "disabled" | "onRemove" | "prefixel" | "suffixel" | "texts" | "asPill" | "dashed" | "tooltipProps"> & import('@synerise/ds-utils').DataAttributes & import('react').RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
23
|
+
export declare const TagsWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
24
|
+
export declare const Title: import('styled-components').StyledComponent<"div", any, {
|
|
25
25
|
shape?: TagShape;
|
|
26
26
|
}, never>;
|
|
27
|
-
export declare const SelectedTags: import(
|
|
27
|
+
export declare const SelectedTags: import('styled-components').StyledComponent<"div", any, {}, never>;
|
package/dist/Tags.styles.js
CHANGED
|
@@ -1,28 +1,34 @@
|
|
|
1
|
-
import styled from
|
|
2
|
-
import Tag from
|
|
3
|
-
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import Tag from "@synerise/ds-tag";
|
|
3
|
+
const Container = /* @__PURE__ */ styled.div.withConfig({
|
|
4
4
|
displayName: "Tagsstyles__Container",
|
|
5
5
|
componentId: "sc-156lf0a-0"
|
|
6
6
|
})(["display:flex;margin-bottom:24px;max-width:100%;"]);
|
|
7
|
-
|
|
7
|
+
const TagOverflow = /* @__PURE__ */ styled.div.withConfig({
|
|
8
8
|
displayName: "Tagsstyles__TagOverflow",
|
|
9
9
|
componentId: "sc-156lf0a-1"
|
|
10
10
|
})(["display:flex;height:32px;align-items:center;max-width:100%;min-width:0;flex:0 1 auto;"]);
|
|
11
|
-
|
|
11
|
+
const LimitedTag = /* @__PURE__ */ styled(Tag).withConfig({
|
|
12
12
|
displayName: "Tagsstyles__LimitedTag",
|
|
13
13
|
componentId: "sc-156lf0a-2"
|
|
14
14
|
})(["flex:0 0 auto;"]);
|
|
15
|
-
|
|
15
|
+
const TagsWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
16
16
|
displayName: "Tagsstyles__TagsWrapper",
|
|
17
17
|
componentId: "sc-156lf0a-3"
|
|
18
18
|
})(["display:flex;align-items:center;flex-direction:row;flex-wrap:wrap;min-width:0;"]);
|
|
19
|
-
|
|
19
|
+
const Title = /* @__PURE__ */ styled.div.withConfig({
|
|
20
20
|
displayName: "Tagsstyles__Title",
|
|
21
21
|
componentId: "sc-156lf0a-4"
|
|
22
|
-
})(["color:", ";font-weight:500;display:block;margin:6px 4px 0 0;"],
|
|
23
|
-
|
|
24
|
-
});
|
|
25
|
-
export var SelectedTags = styled.div.withConfig({
|
|
22
|
+
})(["color:", ";font-weight:500;display:block;margin:6px 4px 0 0;"], (props) => props.theme.palette["grey-800"]);
|
|
23
|
+
const SelectedTags = /* @__PURE__ */ styled.div.withConfig({
|
|
26
24
|
displayName: "Tagsstyles__SelectedTags",
|
|
27
25
|
componentId: "sc-156lf0a-5"
|
|
28
|
-
})(["display:flex;flex-direction:row;align-items:center;flex-wrap:wrap;min-width:0;&& .ds-tag{margin:4px;}"]);
|
|
26
|
+
})(["display:flex;flex-direction:row;align-items:center;flex-wrap:wrap;min-width:0;&& .ds-tag{margin:4px;}"]);
|
|
27
|
+
export {
|
|
28
|
+
Container,
|
|
29
|
+
LimitedTag,
|
|
30
|
+
SelectedTags,
|
|
31
|
+
TagOverflow,
|
|
32
|
+
TagsWrapper,
|
|
33
|
+
Title
|
|
34
|
+
};
|
package/dist/Tags.types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { InformationCardProps } from '@synerise/ds-information-card';
|
|
3
|
+
import { TagProps, TagShape, TagTexts } from '@synerise/ds-tag';
|
|
4
4
|
export type ActionTaken = {
|
|
5
5
|
type: 'ADD' | 'REMOVE';
|
|
6
6
|
tag: TagProps;
|
package/dist/Tags.types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TagTexts } from '@synerise/ds-tag';
|
|
3
|
+
import { TagsProps } from '../../Tags.types';
|
|
4
4
|
export type AddTagsProps = Pick<TagsProps, 'creatable' | 'data' | 'selected' | 'overlayPlacement' | 'overlayStyle' | 'dropdownFooter' | 'maxHeight' | 'tagShape' | 'onSelectedChange' | 'onCreate' | 'addButtonType'> & {
|
|
5
5
|
texts: TagTexts;
|
|
6
6
|
};
|
|
@@ -1,120 +1,68 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
setIsTagAddDropdownOpen = _useState2[1];
|
|
29
|
-
var reset = function reset() {
|
|
1
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useRef, useState, useEffect } from "react";
|
|
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.js";
|
|
8
|
+
import { AddTagButton, CreateTagDropdownButton, Separator } from "./AddTags.styles.js";
|
|
9
|
+
const AddTags = ({
|
|
10
|
+
creatable,
|
|
11
|
+
data,
|
|
12
|
+
selected,
|
|
13
|
+
overlayPlacement,
|
|
14
|
+
overlayStyle,
|
|
15
|
+
texts,
|
|
16
|
+
tagShape,
|
|
17
|
+
maxHeight,
|
|
18
|
+
dropdownFooter,
|
|
19
|
+
onSelectedChange,
|
|
20
|
+
onCreate,
|
|
21
|
+
addButtonType
|
|
22
|
+
}) => {
|
|
23
|
+
const theme = useTheme();
|
|
24
|
+
const searchRef = useRef(null);
|
|
25
|
+
const [searchQuery, setSearchQuery] = useState("");
|
|
26
|
+
const [isTagAddDropdownOpen, setIsTagAddDropdownOpen] = useState(false);
|
|
27
|
+
const reset = () => {
|
|
30
28
|
setIsTagAddDropdownOpen(false);
|
|
31
|
-
setSearchQuery(
|
|
29
|
+
setSearchQuery("");
|
|
32
30
|
};
|
|
33
|
-
|
|
34
|
-
onSelectedChange && selected && onSelectedChange([
|
|
35
|
-
type:
|
|
36
|
-
tag
|
|
31
|
+
const onPoolTagSelect = (tag) => {
|
|
32
|
+
onSelectedChange && selected && onSelectedChange([...selected, tag], {
|
|
33
|
+
type: "ADD",
|
|
34
|
+
tag
|
|
37
35
|
});
|
|
38
36
|
reset();
|
|
39
37
|
};
|
|
40
|
-
|
|
38
|
+
const onCreateNewTag = () => {
|
|
41
39
|
onCreate && onCreate(searchQuery);
|
|
42
40
|
reset();
|
|
43
41
|
};
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
var isExactMatchFound = searchQuery && selectablePool && selectablePool.find(function (t) {
|
|
53
|
-
return t.name === searchQuery;
|
|
54
|
-
});
|
|
55
|
-
var emptyPool = selectablePool && selectablePool.length === 0;
|
|
56
|
-
var isCreatable = creatable && !isExactMatchFound && searchQuery;
|
|
57
|
-
var isSeparated = !emptyPool;
|
|
58
|
-
var noTagsContentLabel = !!(notSelectedList != null && notSelectedList.length) && !!searchQuery ? texts == null ? void 0 : texts.noResultsLabel : texts == null ? void 0 : texts.dropdownNoTags;
|
|
59
|
-
useEffect(function () {
|
|
42
|
+
const notSelectedList = data && selected && data.filter((t) => !selected.find((s) => s.id === t.id));
|
|
43
|
+
const selectablePool = !searchQuery ? notSelectedList : notSelectedList && notSelectedList.filter((t) => t.name && t.name.toLowerCase().includes(searchQuery.toLowerCase()));
|
|
44
|
+
const isExactMatchFound = searchQuery && selectablePool && selectablePool.find((t) => t.name === searchQuery);
|
|
45
|
+
const emptyPool = selectablePool && selectablePool.length === 0;
|
|
46
|
+
const isCreatable = creatable && !isExactMatchFound && searchQuery;
|
|
47
|
+
const isSeparated = !emptyPool;
|
|
48
|
+
const noTagsContentLabel = !!notSelectedList?.length && !!searchQuery ? texts?.noResultsLabel : texts?.dropdownNoTags;
|
|
49
|
+
useEffect(() => {
|
|
60
50
|
if (isTagAddDropdownOpen) {
|
|
61
|
-
|
|
62
|
-
setTimeout(function () {
|
|
63
|
-
var _searchRef$current;
|
|
64
|
-
return (_searchRef$current = searchRef.current) == null ? void 0 : _searchRef$current.focus();
|
|
65
|
-
}, 500);
|
|
51
|
+
setTimeout(() => searchRef.current?.focus(), 500);
|
|
66
52
|
}
|
|
67
53
|
}, [isTagAddDropdownOpen]);
|
|
68
|
-
return
|
|
69
|
-
tags:
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
mode: "icon-label",
|
|
84
|
-
onClick: onCreateNewTag,
|
|
85
|
-
marginless: !isSeparated
|
|
86
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
87
|
-
component: /*#__PURE__*/React.createElement(Add3M, null),
|
|
88
|
-
size: 24,
|
|
89
|
-
color: theme.palette['grey-500']
|
|
90
|
-
}), /*#__PURE__*/React.createElement("span", null, texts.createTagButtonLabel), /*#__PURE__*/React.createElement("strong", null, searchQuery)), isSeparated && /*#__PURE__*/React.createElement(S.Separator, null)),
|
|
91
|
-
noTagsContent: /*#__PURE__*/React.createElement(Result, {
|
|
92
|
-
type: "no-results",
|
|
93
|
-
description: noTagsContentLabel || 'No results'
|
|
94
|
-
}),
|
|
95
|
-
dropdownHeader: /*#__PURE__*/React.createElement(SearchBar, {
|
|
96
|
-
handleInputRef: function handleInputRef(ref) {
|
|
97
|
-
return searchRef.current = ref.current;
|
|
98
|
-
},
|
|
99
|
-
value: searchQuery,
|
|
100
|
-
onSearchChange: setSearchQuery,
|
|
101
|
-
placeholder: texts.searchPlaceholder || '',
|
|
102
|
-
iconLeft: /*#__PURE__*/React.createElement(Icon, {
|
|
103
|
-
component: /*#__PURE__*/React.createElement(SearchM, null),
|
|
104
|
-
color: theme.palette['grey-600']
|
|
105
|
-
}),
|
|
106
|
-
onClearInput: function onClearInput() {
|
|
107
|
-
return setSearchQuery('');
|
|
108
|
-
},
|
|
109
|
-
clearTooltip: texts.clearTooltip
|
|
110
|
-
})
|
|
111
|
-
}, /*#__PURE__*/React.createElement(S.AddTagButton, {
|
|
112
|
-
isOpen: isTagAddDropdownOpen,
|
|
113
|
-
type: "ghost",
|
|
114
|
-
mode: addButtonType || (texts != null && texts.addButtonLabel ? 'icon-label' : 'single-icon')
|
|
115
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
116
|
-
component: /*#__PURE__*/React.createElement(Add3M, null),
|
|
117
|
-
size: 24,
|
|
118
|
-
color: theme.palette['grey-500']
|
|
119
|
-
}), addButtonType !== 'single-icon' && texts.addButtonLabel));
|
|
120
|
-
};
|
|
54
|
+
return /* @__PURE__ */ jsx(TagsDropdown, { tags: selectablePool, trigger: ["click"], maxHeight, placement: overlayPlacement, open: isTagAddDropdownOpen, onOpenChange: setIsTagAddDropdownOpen, overlayStyle, tagShape, onTagClick: onPoolTagSelect, dropdownFooter, componentId: "tags-add", aboveTagsContent: isCreatable && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
55
|
+
/* @__PURE__ */ jsxs(CreateTagDropdownButton, { "data-testid": "ds-tags-create-button", type: "ghost", mode: "icon-label", onClick: onCreateNewTag, marginless: !isSeparated, children: [
|
|
56
|
+
/* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(Add3M, {}), size: 24, color: theme.palette["grey-500"] }),
|
|
57
|
+
/* @__PURE__ */ jsx("span", { children: texts.createTagButtonLabel }),
|
|
58
|
+
/* @__PURE__ */ jsx("strong", { children: searchQuery })
|
|
59
|
+
] }),
|
|
60
|
+
isSeparated && /* @__PURE__ */ jsx(Separator, {})
|
|
61
|
+
] }), noTagsContent: /* @__PURE__ */ jsx(Result, { type: "no-results", description: noTagsContentLabel || "No results" }), dropdownHeader: /* @__PURE__ */ jsx(SearchBar, { handleInputRef: (ref) => searchRef.current = ref.current, value: searchQuery, onSearchChange: setSearchQuery, placeholder: texts.searchPlaceholder || "", iconLeft: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(SearchM, {}), color: theme.palette["grey-600"] }), onClearInput: () => setSearchQuery(""), clearTooltip: texts.clearTooltip }), children: /* @__PURE__ */ jsxs(AddTagButton, { isOpen: isTagAddDropdownOpen, type: "ghost", mode: addButtonType || (texts?.addButtonLabel ? "icon-label" : "single-icon"), children: [
|
|
62
|
+
/* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(Add3M, {}), size: 24, color: theme.palette["grey-500"] }),
|
|
63
|
+
addButtonType !== "single-icon" && texts.addButtonLabel
|
|
64
|
+
] }) });
|
|
65
|
+
};
|
|
66
|
+
export {
|
|
67
|
+
AddTags
|
|
68
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StyledButton } from '@synerise/ds-button';
|
|
2
2
|
type ExtraProps = {
|
|
3
3
|
marginless: boolean;
|
|
4
4
|
};
|
|
5
5
|
export declare const CreateTagDropdownButton: StyledButton<ExtraProps>;
|
|
6
|
-
export declare const Separator: import(
|
|
6
|
+
export declare const Separator: import('styled-components').StyledComponent<"hr", any, {}, never>;
|
|
7
7
|
export declare const AddTagButton: StyledButton<{
|
|
8
8
|
isOpen?: boolean;
|
|
9
9
|
}>;
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
import styled from
|
|
2
|
-
import Button from
|
|
3
|
-
import { ButtonLabel } from
|
|
4
|
-
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import Button from "@synerise/ds-button";
|
|
3
|
+
import { ButtonLabel } from "@synerise/ds-button/dist/Button.styles";
|
|
4
|
+
const CreateTagDropdownButton = /* @__PURE__ */ styled(Button).withConfig({
|
|
5
5
|
displayName: "AddTagsstyles__CreateTagDropdownButton",
|
|
6
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;}"],
|
|
8
|
-
|
|
9
|
-
}, ButtonLabel);
|
|
10
|
-
export var Separator = styled.hr.withConfig({
|
|
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;}"], (props) => props.marginless ? "0" : "0 0 8px", ButtonLabel);
|
|
8
|
+
const Separator = /* @__PURE__ */ styled.hr.withConfig({
|
|
11
9
|
displayName: "AddTagsstyles__Separator",
|
|
12
10
|
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;"],
|
|
14
|
-
|
|
15
|
-
});
|
|
16
|
-
export var AddTagButton = styled(Button).withConfig({
|
|
11
|
+
})(["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;"], (props) => props.theme.palette["grey-300"]);
|
|
12
|
+
const AddTagButton = /* @__PURE__ */ styled(Button).withConfig({
|
|
17
13
|
displayName: "AddTagsstyles__AddTagButton",
|
|
18
14
|
componentId: "sc-1wg5ubr-2"
|
|
19
|
-
})(["flex:0 0 auto;", ""],
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
})(["flex:0 0 auto;", ""], (props) => props.isOpen && ` &&&&& { visibility: visible }`);
|
|
16
|
+
export {
|
|
17
|
+
AddTagButton,
|
|
18
|
+
CreateTagDropdownButton,
|
|
19
|
+
Separator
|
|
20
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TagProps, TagShape } from '@synerise/ds-tag';
|
|
3
3
|
type LimitedTagsProps = {
|
|
4
4
|
selected: TagProps[];
|
|
5
5
|
tagShape?: TagShape;
|
|
@@ -1,34 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useTheme } from
|
|
3
|
-
import
|
|
4
|
-
import { TagsDropdown } from
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
asPill: true,
|
|
23
|
-
overlayStyle: {
|
|
24
|
-
zIndex: parseInt(theme.variables['zindex-dropdown'], 10) + 1
|
|
25
|
-
}
|
|
26
|
-
}, /*#__PURE__*/React.createElement(S.LimitedTag, {
|
|
27
|
-
id: "limited-tags",
|
|
28
|
-
shape: tagShape,
|
|
29
|
-
color: theme.palette['grey-100'],
|
|
30
|
-
textColor: theme.palette['grey-700'],
|
|
31
|
-
name: "+" + limitedSelectedTags.length,
|
|
32
|
-
asPill: true
|
|
33
|
-
}));
|
|
34
|
-
};
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useTheme } from "@synerise/ds-core";
|
|
3
|
+
import { LimitedTag } from "../../Tags.styles.js";
|
|
4
|
+
import { TagsDropdown } from "../TagsDropdown/TagsDropdown.js";
|
|
5
|
+
const LimitedTags = ({
|
|
6
|
+
tagShape,
|
|
7
|
+
selected,
|
|
8
|
+
maxVisibleTags,
|
|
9
|
+
removable,
|
|
10
|
+
disabled,
|
|
11
|
+
onRemove
|
|
12
|
+
}) => {
|
|
13
|
+
const limitedSelectedTags = selected.slice(maxVisibleTags);
|
|
14
|
+
const theme = useTheme();
|
|
15
|
+
return /* @__PURE__ */ jsx(TagsDropdown, { tags: limitedSelectedTags, trigger: ["hover"], tagShape, removable, onRemove: removable ? onRemove : void 0, disabled, componentId: "tags-limited", asPill: true, overlayStyle: {
|
|
16
|
+
zIndex: parseInt(theme.variables["zindex-dropdown"], 10) + 1
|
|
17
|
+
}, children: /* @__PURE__ */ jsx(LimitedTag, { id: "limited-tags", shape: tagShape, color: theme.palette["grey-100"], textColor: theme.palette["grey-700"], name: `+${limitedSelectedTags.length}`, asPill: true }) });
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
LimitedTags
|
|
21
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
import { DropdownSharedProps } from '@synerise/ds-dropdown';
|
|
3
|
+
import { TagProps, TagShape, TagTexts } from '@synerise/ds-tag';
|
|
4
|
+
import { ExtendedTagProps } from '../../Tags.types';
|
|
5
5
|
type TagDropdownProps = {
|
|
6
6
|
tags?: ExtendedTagProps[];
|
|
7
7
|
texts?: TagTexts;
|
|
@@ -1,68 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
onRemove: removable ? onRemove : undefined,
|
|
47
|
-
disabled: disabled,
|
|
48
|
-
asPill: asPill,
|
|
49
|
-
onClick: function onClick() {
|
|
50
|
-
return onTagClick == null ? void 0 : onTagClick(tag);
|
|
51
|
-
},
|
|
52
|
-
texts: texts,
|
|
53
|
-
tooltipProps: tag.informationCardProps ? _extends({
|
|
54
|
-
render: function render() {
|
|
55
|
-
return /*#__PURE__*/React.createElement(InformationCard, _extends({
|
|
56
|
-
title: tag.name
|
|
57
|
-
}, tag.informationCardProps, {
|
|
58
|
-
asTooltip: true
|
|
59
|
-
}));
|
|
60
|
-
},
|
|
61
|
-
placement: 'right'
|
|
62
|
-
}, tag.tooltipProps) : undefined
|
|
63
|
-
}));
|
|
64
|
-
})) : noTagsContent), dropdownFooter && /*#__PURE__*/React.createElement(S.BottomAction, {
|
|
65
|
-
onClickAction: NOOP
|
|
66
|
-
}, dropdownFooter))
|
|
67
|
-
}));
|
|
68
|
-
};
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { createElement } from "react";
|
|
3
|
+
import Dropdown from "@synerise/ds-dropdown";
|
|
4
|
+
import InformationCard from "@synerise/ds-information-card";
|
|
5
|
+
import Tag from "@synerise/ds-tag";
|
|
6
|
+
import { NOOP } from "@synerise/ds-utils";
|
|
7
|
+
import { Overlay, DropdownContainer, DropdownTagsContainer, BottomAction } from "./TagsDropdown.styles.js";
|
|
8
|
+
const TagsDropdown = ({
|
|
9
|
+
tags,
|
|
10
|
+
tagShape,
|
|
11
|
+
texts,
|
|
12
|
+
removable,
|
|
13
|
+
disabled,
|
|
14
|
+
onRemove,
|
|
15
|
+
asPill,
|
|
16
|
+
dropdownFooter,
|
|
17
|
+
noTagsContent,
|
|
18
|
+
dropdownHeader,
|
|
19
|
+
aboveTagsContent,
|
|
20
|
+
maxHeight,
|
|
21
|
+
onTagClick,
|
|
22
|
+
componentId,
|
|
23
|
+
...dropdownProps
|
|
24
|
+
}) => {
|
|
25
|
+
const areTags = !!tags?.length;
|
|
26
|
+
return /* @__PURE__ */ jsx(Dropdown, { popoverProps: {
|
|
27
|
+
componentId,
|
|
28
|
+
testId: `${componentId}`,
|
|
29
|
+
...dropdownProps?.popoverProps
|
|
30
|
+
}, ...dropdownProps, size: "small", overlay: /* @__PURE__ */ jsxs(Overlay, { "data-testid": "ds-tags-dropdown-overlay", children: [
|
|
31
|
+
dropdownHeader,
|
|
32
|
+
/* @__PURE__ */ jsxs(DropdownContainer, { absolute: true, maxHeight, children: [
|
|
33
|
+
aboveTagsContent,
|
|
34
|
+
areTags ? /* @__PURE__ */ jsx(DropdownTagsContainer, { "data-testid": "ds-tags-available-tags", children: tags.map((tag) => /* @__PURE__ */ createElement(Tag, { ...tag, key: tag.id, shape: tagShape, removable, onRemove: removable ? onRemove : void 0, disabled, asPill, onClick: () => onTagClick?.(tag), texts, tooltipProps: tag.informationCardProps ? {
|
|
35
|
+
render: () => /* @__PURE__ */ jsx(InformationCard, { title: tag.name, ...tag.informationCardProps, asTooltip: true }),
|
|
36
|
+
placement: "right",
|
|
37
|
+
...tag.tooltipProps
|
|
38
|
+
} : void 0 })) }) : noTagsContent
|
|
39
|
+
] }),
|
|
40
|
+
dropdownFooter && /* @__PURE__ */ jsx(BottomAction, { onClickAction: NOOP, children: dropdownFooter })
|
|
41
|
+
] }) });
|
|
42
|
+
};
|
|
43
|
+
export {
|
|
44
|
+
TagsDropdown
|
|
45
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const Overlay: import(
|
|
3
|
-
export declare const DropdownContainer: import(
|
|
4
|
-
export declare const DropdownTagsContainer: import(
|
|
5
|
-
export declare const BottomAction: import(
|
|
1
|
+
import { 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>;
|
|
5
|
+
export declare const BottomAction: import('styled-components').StyledComponent<({ onClickAction, children, icon, ...rest }: import('@synerise/ds-dropdown/dist/components/BottomAction/BottomAction.types').BottomActionProps) => React.JSX.Element, any, {}, never>;
|
|
@@ -1,19 +1,25 @@
|
|
|
1
|
-
import styled from
|
|
2
|
-
import Dropdown from
|
|
3
|
-
import Scrollbar from
|
|
4
|
-
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import Dropdown from "@synerise/ds-dropdown";
|
|
3
|
+
import Scrollbar from "@synerise/ds-scrollbar";
|
|
4
|
+
const Overlay = /* @__PURE__ */ styled.div.withConfig({
|
|
5
5
|
displayName: "TagsDropdownstyles__Overlay",
|
|
6
6
|
componentId: "sc-15cr02t-0"
|
|
7
7
|
})([""]);
|
|
8
|
-
|
|
8
|
+
const DropdownContainer = /* @__PURE__ */ styled(Scrollbar).withConfig({
|
|
9
9
|
displayName: "TagsDropdownstyles__DropdownContainer",
|
|
10
10
|
componentId: "sc-15cr02t-1"
|
|
11
11
|
})(["display:flex;flex-direction:column;padding:8px 0 0 8px;"]);
|
|
12
|
-
|
|
12
|
+
const DropdownTagsContainer = /* @__PURE__ */ styled.div.withConfig({
|
|
13
13
|
displayName: "TagsDropdownstyles__DropdownTagsContainer",
|
|
14
14
|
componentId: "sc-15cr02t-2"
|
|
15
15
|
})(["display:flex;flex-direction:column;max-height:320px;> *{width:fit-content;max-width:fit-content;display:block;width:inherit;cursor:pointer;flex-shrink:0;}&:after{content:'\\00a0';flex:0 0 8px;overflow:hidden;visibility:hidden;width:10px;}"]);
|
|
16
|
-
|
|
16
|
+
const BottomAction = /* @__PURE__ */ styled(Dropdown.BottomAction).withConfig({
|
|
17
17
|
displayName: "TagsDropdownstyles__BottomAction",
|
|
18
18
|
componentId: "sc-15cr02t-3"
|
|
19
|
-
})(["margin-top:0;padding:0 8px;cursor:auto;"]);
|
|
19
|
+
})(["margin-top:0;padding:0 8px;cursor:auto;"]);
|
|
20
|
+
export {
|
|
21
|
+
BottomAction,
|
|
22
|
+
DropdownContainer,
|
|
23
|
+
DropdownTagsContainer,
|
|
24
|
+
Overlay
|
|
25
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
import * as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
*/
|
|
13
|
-
// eslint-disable-next-line no-duplicate-imports
|
|
1
|
+
import { default as default2 } from "./Tags.js";
|
|
2
|
+
import * as Tags_styles from "./Tags.styles.js";
|
|
3
|
+
import { AddTags } from "./components/AddTags/AddTags.js";
|
|
4
|
+
import { default as default3, TagShape } from "@synerise/ds-tag";
|
|
5
|
+
export {
|
|
6
|
+
AddTags,
|
|
7
|
+
default3 as Tag,
|
|
8
|
+
TagShape,
|
|
9
|
+
Tags_styles as TagsStyles,
|
|
10
|
+
default2 as default
|
|
11
|
+
};
|
package/dist/modules.d.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "@testing-library/jest-dom";
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-tags",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.27",
|
|
4
4
|
"description": "Tags UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
"access": "public"
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
|
-
"build": "
|
|
19
|
+
"build": "vite build",
|
|
20
20
|
"build:css": "node ../../../scripts/style/less.js",
|
|
21
21
|
"build:js": "babel --delete-dir-on-start --root-mode upward src --out-dir dist --extensions '.js,.ts,.tsx'",
|
|
22
|
-
"build:watch": "
|
|
22
|
+
"build:watch": "vite build --watch",
|
|
23
23
|
"defs": "tsc --declaration --outDir dist/ --emitDeclarationOnly",
|
|
24
24
|
"pack:ci": "pnpm pack --pack-destination ../../storybook/storybook-static/static",
|
|
25
25
|
"prepublish": "pnpm run build",
|
|
@@ -35,16 +35,16 @@
|
|
|
35
35
|
],
|
|
36
36
|
"types": "dist/index.d.ts",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@synerise/ds-button": "^1.5.
|
|
39
|
-
"@synerise/ds-dropdown": "^1.3.
|
|
40
|
-
"@synerise/ds-icon": "^1.
|
|
41
|
-
"@synerise/ds-information-card": "^1.6.
|
|
42
|
-
"@synerise/ds-result": "^1.0.
|
|
43
|
-
"@synerise/ds-scrollbar": "^1.2.
|
|
44
|
-
"@synerise/ds-search-bar": "^1.4.
|
|
45
|
-
"@synerise/ds-tag": "^1.4.
|
|
46
|
-
"@synerise/ds-tooltip": "^1.4.
|
|
47
|
-
"@synerise/ds-utils": "^1.
|
|
38
|
+
"@synerise/ds-button": "^1.5.18",
|
|
39
|
+
"@synerise/ds-dropdown": "^1.3.2",
|
|
40
|
+
"@synerise/ds-icon": "^1.15.1",
|
|
41
|
+
"@synerise/ds-information-card": "^1.6.5",
|
|
42
|
+
"@synerise/ds-result": "^1.0.49",
|
|
43
|
+
"@synerise/ds-scrollbar": "^1.2.17",
|
|
44
|
+
"@synerise/ds-search-bar": "^1.4.20",
|
|
45
|
+
"@synerise/ds-tag": "^1.4.18",
|
|
46
|
+
"@synerise/ds-tooltip": "^1.4.10",
|
|
47
|
+
"@synerise/ds-utils": "^1.7.1"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@testing-library/user-event": "^14"
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"react": ">=16.9.0 <= 18.3.1",
|
|
55
55
|
"styled-components": "^5.3.3"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "e4ecca8944fc9b41c1b9d59c8bcad5e5e2013225"
|
|
58
58
|
}
|