@snack-uikit/tag 0.8.3-preview-86dac340.0 → 0.9.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
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
|
+
# 0.9.0 (2024-04-22)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **FF-4649:** long text tags handling ([4fa20e0](https://github.com/cloud-ru-tech/snack-uikit/commit/4fa20e00aaf57483d34ab7fdbca5f6b333025c7e))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## 0.8.2 (2024-03-26)
|
|
7
18
|
|
|
8
19
|
### Only dependencies have been changed
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { Tag } from '../../components';
|
|
3
3
|
import { SIZE } from '../../constants';
|
|
4
|
+
import styles from './styles.module.css';
|
|
4
5
|
function renderTag(size, handleRemoveItem, setRef) {
|
|
5
6
|
return function TagRowItem(item, index) {
|
|
6
|
-
return (_jsx("div", { ref: setRef === null || setRef === void 0 ? void 0 : setRef(item, index),
|
|
7
|
+
return (_jsx("div", { ref: setRef === null || setRef === void 0 ? void 0 : setRef(item, index), className: styles.tagWrapper, children: _jsx(Tag, { label: item.label, appearance: item.appearance, size: size, onDelete: handleRemoveItem === null || handleRemoveItem === void 0 ? void 0 : handleRemoveItem(item) }) }, item.label));
|
|
7
8
|
};
|
|
8
9
|
}
|
|
9
10
|
export function TagList({ items, size = SIZE.Xs, onItemRemove, setTagRef }) {
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
6
|
"title": "Tag",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.9.0",
|
|
8
8
|
"sideEffects": [
|
|
9
9
|
"*.css",
|
|
10
10
|
"*.woff",
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"@snack-uikit/utils": "3.2.0",
|
|
39
39
|
"classnames": "2.3.2"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "f6b48b7373bda024626822d7c17b05d6ddbf20b2"
|
|
42
42
|
}
|
|
@@ -3,6 +3,7 @@ import { Ref } from 'react';
|
|
|
3
3
|
import { Tag } from '../../components';
|
|
4
4
|
import { SIZE } from '../../constants';
|
|
5
5
|
import { Size, TagRowItemInner } from '../../types';
|
|
6
|
+
import styles from './styles.module.scss';
|
|
6
7
|
|
|
7
8
|
type SetTagRef = (item: TagRowItemInner, index: number) => Ref<HTMLDivElement>;
|
|
8
9
|
|
|
@@ -18,7 +19,7 @@ type OnDeleteHandler = () => void;
|
|
|
18
19
|
function renderTag(size: Size, handleRemoveItem?: (item: TagRowItemInner) => OnDeleteHandler, setRef?: SetTagRef) {
|
|
19
20
|
return function TagRowItem(item: TagRowItemInner, index: number) {
|
|
20
21
|
return (
|
|
21
|
-
<div key={item.label} ref={setRef?.(item, index)}
|
|
22
|
+
<div key={item.label} ref={setRef?.(item, index)} className={styles.tagWrapper}>
|
|
22
23
|
<Tag label={item.label} appearance={item.appearance} size={size} onDelete={handleRemoveItem?.(item)} />
|
|
23
24
|
</div>
|
|
24
25
|
);
|