@cloud-ru/ds-tag 1.2.7-preview-2df639a4.0 → 1.2.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloud-ru/ds-tag",
3
- "version": "1.2.7-preview-2df639a4.0",
3
+ "version": "1.2.8",
4
4
  "description": "Пакет компактных меток — компонент Tag (опционально удаляемый или ссылочный) и контейнер TagRow для групп меток с обрезанием по строкам.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -34,13 +34,13 @@
34
34
  ],
35
35
  "dependencies": {
36
36
  "classnames": "^2.5.1",
37
- "@cloud-ru/ds-dropdown": "1.2.7-preview-2df639a4.0",
38
- "@cloud-ru/ds-materials": "2.0.6-preview-2df639a4.0",
39
- "@cloud-ru/ds-icons": "1.8.1-preview-2df639a4.0",
40
- "@cloud-ru/ds-tooltip": "1.0.23-preview-2df639a4.0",
41
- "@cloud-ru/ds-scroll": "1.0.10-preview-2df639a4.0",
42
- "@cloud-ru/ds-truncate-string": "1.0.24-preview-2df639a4.0",
43
- "@cloud-ru/ds-utils": "1.4.3-preview-2df639a4.0"
37
+ "@cloud-ru/ds-dropdown": "^1.2.8",
38
+ "@cloud-ru/ds-icons": "^1.8.0",
39
+ "@cloud-ru/ds-tooltip": "^1.0.22",
40
+ "@cloud-ru/ds-materials": "^2.0.5",
41
+ "@cloud-ru/ds-scroll": "^1.0.9",
42
+ "@cloud-ru/ds-utils": "^1.4.2",
43
+ "@cloud-ru/ds-truncate-string": "^1.0.23"
44
44
  },
45
45
  "publishConfig": {
46
46
  "access": "public"
@@ -34,7 +34,6 @@ export function TagBase({
34
34
  >
35
35
  <span className={styles.textWrapper}>
36
36
  <TruncateString
37
- data-test-id={TEST_IDS.tagBaseTruncateString}
38
37
  className={styles.label}
39
38
  text={label}
40
39
  variant={truncateVariant}
package/src/constants.ts CHANGED
@@ -23,10 +23,6 @@ export const APPEARANCE = {
23
23
  * источника.
24
24
  */
25
25
  export const TEST_IDS = {
26
- tagBaseTruncateString: 'tag-base__truncate-string',
27
- tagListTag: 'tag-list__tag',
28
- tagMoreDropdown: 'tag-more__dropdown',
29
- tagMoreTagRowDroplistScroll: 'tag-more__tag-row-droplist-scroll',
30
26
  tag: {
31
27
  removeButton: 'tag-remove-button',
32
28
  },
@@ -1,7 +1,7 @@
1
1
  import { Ref } from 'react';
2
2
 
3
3
  import { Tag } from '../../components/Tag';
4
- import { SIZE, TEST_IDS } from '../../constants';
4
+ import { SIZE } from '../../constants';
5
5
  import { Size, TagRowItemInner } from '../../types';
6
6
  import styles from './styles.module.scss';
7
7
 
@@ -20,12 +20,7 @@ function renderTag(size: Size, handleRemoveItem?: (item: TagRowItemInner) => OnD
20
20
  return function TagRowItem(item: TagRowItemInner) {
21
21
  return (
22
22
  <div key={item.id ?? item.label} ref={setRef?.(item)} className={styles.tagWrapper}>
23
- <Tag
24
- data-test-id={TEST_IDS.tagListTag}
25
- size={size}
26
- {...(item.href ? {} : { onDelete: handleRemoveItem?.(item) })}
27
- {...item}
28
- />
23
+ <Tag size={size} {...(item.href ? {} : { onDelete: handleRemoveItem?.(item) })} {...item} />
29
24
  </div>
30
25
  );
31
26
  };
@@ -19,18 +19,12 @@ export function TagMore({ items, text = '', size = SIZE.S, buttonRef, onItemRemo
19
19
  return (
20
20
  // TODO: replace with Popover
21
21
  <Dropdown
22
- data-test-id={TEST_IDS.tagMoreDropdown}
23
22
  placement='bottom-end'
24
23
  trigger='hoverAndFocusVisible'
25
24
  triggerClassName={styles.moreTrigger}
26
25
  content={
27
26
  <div className={styles.tagRowDroplistContainer} data-size={size}>
28
- <Scroll
29
- data-test-id={TEST_IDS.tagMoreTagRowDroplistScroll}
30
- className={styles.tagRowDroplistScroll}
31
- size='s'
32
- barHideStrategy='move'
33
- >
27
+ <Scroll className={styles.tagRowDroplistScroll} size='s' barHideStrategy='move'>
34
28
  <TagRowSimple
35
29
  items={items}
36
30
  size={size}
@@ -1,4 +1,4 @@
1
- import { extractSupportProps, WithSupportProps } from '@cloud-ru/ds-utils';
1
+ import { extractSupportProps } from '@cloud-ru/ds-utils';
2
2
  import cn from 'classnames';
3
3
  import { Ref } from 'react';
4
4
 
@@ -6,13 +6,13 @@ import { Size, TagRowItemInner } from '../../types';
6
6
  import { TagList } from '../TagList';
7
7
  import styles from './styles.module.scss';
8
8
 
9
- type TagRowSimpleProps = WithSupportProps<{
9
+ type TagRowSimpleProps = {
10
10
  items: TagRowItemInner[];
11
11
  size: Size;
12
12
  onItemRemove?(item: string): void;
13
13
  setTagRef?: (item: TagRowItemInner) => Ref<HTMLDivElement>;
14
14
  className?: string;
15
- }>;
15
+ };
16
16
 
17
17
  export function TagRowSimple({ items, size, onItemRemove, setTagRef, className, ...rest }: TagRowSimpleProps) {
18
18
  return (