@synerise/ds-tags 1.4.6 → 1.4.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/CHANGELOG.md CHANGED
@@ -3,6 +3,28 @@
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.4.8](https://github.com/Synerise/synerise-design/compare/@synerise/ds-tags@1.4.7...@synerise/ds-tags@1.4.8) (2025-10-22)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **tags:** add tags component fixes ([02ff302](https://github.com/Synerise/synerise-design/commit/02ff30284dc035293ff0a11a101a00658102115b))
12
+
13
+
14
+
15
+
16
+
17
+ ## [1.4.7](https://github.com/Synerise/synerise-design/compare/@synerise/ds-tags@1.4.6...@synerise/ds-tags@1.4.7) (2025-10-16)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * **tags:** adjust tags to table requirements ([fe1aa4d](https://github.com/Synerise/synerise-design/commit/fe1aa4d00f8ad95fb191f866b548af72863a8963))
23
+
24
+
25
+
26
+
27
+
6
28
  ## [1.4.6](https://github.com/Synerise/synerise-design/compare/@synerise/ds-tags@1.4.5...@synerise/ds-tags@1.4.6) (2025-10-10)
7
29
 
8
30
  **Note:** Version bump only for package @synerise/ds-tags
package/dist/Tags.js CHANGED
@@ -82,8 +82,7 @@ var Tags = function Tags(_ref) {
82
82
  tagShape: tagShape,
83
83
  removable: removable,
84
84
  onRemove: removable ? onRemove : undefined,
85
- disabled: disabled,
86
- asPill: asPill
85
+ disabled: disabled
87
86
  }), addable && /*#__PURE__*/React.createElement(AddTags, {
88
87
  data: data,
89
88
  selected: selected,
@@ -1,8 +1,7 @@
1
1
  import React from 'react';
2
2
  import { type TagTexts } from '@synerise/ds-tag';
3
3
  import { type TagsProps } from '../../Tags.types';
4
- type AddTagsProps = Pick<TagsProps, 'creatable' | 'data' | 'selected' | 'overlayPlacement' | 'overlayStyle' | 'dropdownFooter' | 'maxHeight' | 'tagShape' | 'onSelectedChange' | 'onCreate' | 'addButtonType'> & {
4
+ export type AddTagsProps = Pick<TagsProps, 'creatable' | 'data' | 'selected' | 'overlayPlacement' | 'overlayStyle' | 'dropdownFooter' | 'maxHeight' | 'tagShape' | 'onSelectedChange' | 'onCreate' | 'addButtonType'> & {
5
5
  texts: TagTexts;
6
6
  };
7
7
  export declare const AddTags: ({ creatable, data, selected, overlayPlacement, overlayStyle, texts, tagShape, maxHeight, dropdownFooter, onSelectedChange, onCreate, addButtonType, }: AddTagsProps) => React.JSX.Element;
8
- export {};
@@ -1,4 +1,4 @@
1
- import React, { useState } from 'react';
1
+ import React, { useEffect, useRef, useState } from 'react';
2
2
  import { useTheme } from '@synerise/ds-core';
3
3
  import Icon, { Add3M, SearchM } from '@synerise/ds-icon';
4
4
  import Result from '@synerise/ds-result';
@@ -19,6 +19,7 @@ export var AddTags = function AddTags(_ref) {
19
19
  onCreate = _ref.onCreate,
20
20
  addButtonType = _ref.addButtonType;
21
21
  var theme = useTheme();
22
+ var searchRef = useRef(null);
22
23
  var _useState = useState(''),
23
24
  searchQuery = _useState[0],
24
25
  setSearchQuery = _useState[1];
@@ -55,6 +56,14 @@ export var AddTags = function AddTags(_ref) {
55
56
  var isCreatable = creatable && !isExactMatchFound && searchQuery;
56
57
  var isSeparated = !emptyPool;
57
58
  var noTagsContentLabel = !!(notSelectedList != null && notSelectedList.length) && !!searchQuery ? texts == null ? void 0 : texts.noResultsLabel : texts == null ? void 0 : texts.dropdownNoTags;
59
+ useEffect(function () {
60
+ if (isTagAddDropdownOpen) {
61
+ setTimeout(function () {
62
+ var _searchRef$current;
63
+ return (_searchRef$current = searchRef.current) == null ? void 0 : _searchRef$current.focus();
64
+ }, 0);
65
+ }
66
+ }, [isTagAddDropdownOpen]);
58
67
  return /*#__PURE__*/React.createElement(TagsDropdown, {
59
68
  tags: selectablePool,
60
69
  trigger: ['click'],
@@ -82,6 +91,9 @@ export var AddTags = function AddTags(_ref) {
82
91
  description: noTagsContentLabel || 'No results'
83
92
  }),
84
93
  dropdownHeader: /*#__PURE__*/React.createElement(SearchBar, {
94
+ handleInputRef: function handleInputRef(ref) {
95
+ return searchRef.current = ref.current;
96
+ },
85
97
  value: searchQuery,
86
98
  onSearchChange: setSearchQuery,
87
99
  placeholder: texts.searchPlaceholder || '',
@@ -6,8 +6,7 @@ type LimitedTagsProps = {
6
6
  maxVisibleTags?: number;
7
7
  removable?: boolean;
8
8
  disabled?: boolean;
9
- asPill?: boolean;
10
9
  onRemove?: (tagKey: string | number) => void;
11
10
  };
12
- export declare const LimitedTags: ({ tagShape, selected, maxVisibleTags, asPill, removable, disabled, onRemove, }: LimitedTagsProps) => React.JSX.Element;
11
+ export declare const LimitedTags: ({ tagShape, selected, maxVisibleTags, removable, disabled, onRemove, }: LimitedTagsProps) => React.JSX.Element;
13
12
  export {};
@@ -6,7 +6,6 @@ export var LimitedTags = function LimitedTags(_ref) {
6
6
  var tagShape = _ref.tagShape,
7
7
  selected = _ref.selected,
8
8
  maxVisibleTags = _ref.maxVisibleTags,
9
- asPill = _ref.asPill,
10
9
  removable = _ref.removable,
11
10
  disabled = _ref.disabled,
12
11
  onRemove = _ref.onRemove;
@@ -19,7 +18,7 @@ export var LimitedTags = function LimitedTags(_ref) {
19
18
  removable: removable,
20
19
  onRemove: removable ? onRemove : undefined,
21
20
  disabled: disabled,
22
- asPill: asPill,
21
+ asPill: true,
23
22
  overlayStyle: {
24
23
  zIndex: parseInt(theme.variables['zindex-dropdown'], 10) + 1
25
24
  }
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export { default } from './Tags';
2
2
  export * as TagsStyles from './Tags.styles';
3
3
  export type { TagsProps, ActionTaken, ExtendedTagProps } from './Tags.types';
4
+ export { AddTags, type AddTagsProps } from './components/AddTags/AddTags';
4
5
  /**
5
6
  * @deprecated import directly from @synerise/ds-tag
6
7
  */
package/dist/index.js CHANGED
@@ -1,6 +1,8 @@
1
1
  export { default } from './Tags';
2
2
  import * as _TagsStyles from './Tags.styles';
3
3
  export { _TagsStyles as TagsStyles };
4
+ export { AddTags } from './components/AddTags/AddTags';
5
+
4
6
  /**
5
7
  * @deprecated import directly from @synerise/ds-tag
6
8
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-tags",
3
- "version": "1.4.6",
3
+ "version": "1.4.8",
4
4
  "description": "Tags UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -35,14 +35,14 @@
35
35
  ],
36
36
  "types": "dist/index.d.ts",
37
37
  "dependencies": {
38
- "@synerise/ds-button": "^1.4.14",
39
- "@synerise/ds-dropdown": "^1.0.31",
38
+ "@synerise/ds-button": "^1.4.16",
39
+ "@synerise/ds-dropdown": "^1.0.33",
40
40
  "@synerise/ds-icon": "^1.7.3",
41
- "@synerise/ds-information-card": "^1.2.0",
42
- "@synerise/ds-result": "^1.0.27",
41
+ "@synerise/ds-information-card": "^1.2.2",
42
+ "@synerise/ds-result": "^1.0.29",
43
43
  "@synerise/ds-scrollbar": "^1.1.9",
44
- "@synerise/ds-search-bar": "^1.3.16",
45
- "@synerise/ds-tag": "^1.3.2",
44
+ "@synerise/ds-search-bar": "^1.3.18",
45
+ "@synerise/ds-tag": "^1.3.3",
46
46
  "@synerise/ds-tooltip": "^1.2.1"
47
47
  },
48
48
  "peerDependencies": {
@@ -50,5 +50,5 @@
50
50
  "react": ">=16.9.0 <= 18.3.1",
51
51
  "styled-components": "^5.3.3"
52
52
  },
53
- "gitHead": "4e09fc37fa21ff2e27655e7bb305b136db0ca199"
53
+ "gitHead": "a40fca2cc78eda64afa96d18dc4d177538a22404"
54
54
  }