@snack-uikit/tag 0.14.2-preview-a29fd7b9.0 → 0.14.2-preview-2df7e7b5.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.
@@ -15,7 +15,6 @@ const constants_1 = require("../../constants");
15
15
  const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
16
16
  function renderTag(size, handleRemoveItem, setRef) {
17
17
  return function TagRowItem(item, index) {
18
- var _a;
19
18
  return (0, jsx_runtime_1.jsx)("div", {
20
19
  ref: setRef === null || setRef === void 0 ? void 0 : setRef(item, index),
21
20
  className: styles_module_scss_1.default.tagWrapper,
@@ -23,7 +22,7 @@ function renderTag(size, handleRemoveItem, setRef) {
23
22
  size: size,
24
23
  onDelete: handleRemoveItem === null || handleRemoveItem === void 0 ? void 0 : handleRemoveItem(item)
25
24
  }, item))
26
- }, (_a = item.id) !== null && _a !== void 0 ? _a : item.label);
25
+ }, item.label);
27
26
  };
28
27
  }
29
28
  function TagList(_ref) {
@@ -14,7 +14,6 @@ export type TagTooltipProps = {
14
14
  tooltip?: TooltipProps;
15
15
  };
16
16
  export type TagRowItem = {
17
- id?: string;
18
17
  label: string;
19
18
  appearance?: Appearance;
20
19
  } & Partial<LinkProps> & TagTooltipProps;
@@ -4,8 +4,7 @@ import { SIZE } from '../../constants';
4
4
  import styles from './styles.module.css';
5
5
  function renderTag(size, handleRemoveItem, setRef) {
6
6
  return function TagRowItem(item, index) {
7
- var _a;
8
- return (_jsx("div", { ref: setRef === null || setRef === void 0 ? void 0 : setRef(item, index), className: styles.tagWrapper, children: _jsx(Tag, Object.assign({ size: size, onDelete: handleRemoveItem === null || handleRemoveItem === void 0 ? void 0 : handleRemoveItem(item) }, item)) }, (_a = item.id) !== null && _a !== void 0 ? _a : item.label));
7
+ return (_jsx("div", { ref: setRef === null || setRef === void 0 ? void 0 : setRef(item, index), className: styles.tagWrapper, children: _jsx(Tag, Object.assign({ size: size, onDelete: handleRemoveItem === null || handleRemoveItem === void 0 ? void 0 : handleRemoveItem(item) }, item)) }, item.label));
9
8
  };
10
9
  }
11
10
  export function TagList({ items, size = SIZE.Xs, onItemRemove, setTagRef }) {
@@ -14,7 +14,6 @@ export type TagTooltipProps = {
14
14
  tooltip?: TooltipProps;
15
15
  };
16
16
  export type TagRowItem = {
17
- id?: string;
18
17
  label: string;
19
18
  appearance?: Appearance;
20
19
  } & Partial<LinkProps> & TagTooltipProps;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public"
5
5
  },
6
6
  "title": "Tag",
7
- "version": "0.14.2-preview-a29fd7b9.0",
7
+ "version": "0.14.2-preview-2df7e7b5.0",
8
8
  "sideEffects": [
9
9
  "*.css",
10
10
  "*.woff",
@@ -37,11 +37,11 @@
37
37
  "scripts": {},
38
38
  "dependencies": {
39
39
  "@snack-uikit/dropdown": "0.4.8",
40
- "@snack-uikit/icons": "0.26.3",
40
+ "@snack-uikit/icons": "0.26.4-preview-2df7e7b5.0",
41
41
  "@snack-uikit/scroll": "0.10.1",
42
- "@snack-uikit/tooltip": "0.17.2",
42
+ "@snack-uikit/tooltip": "0.17.3-preview-2df7e7b5.0",
43
43
  "@snack-uikit/utils": "3.8.2",
44
44
  "classnames": "2.5.1"
45
45
  },
46
- "gitHead": "7016ab566a5ea93a3826418392eec532fe490dde"
46
+ "gitHead": "68982219776af04aaffba2391e0dfdba8935f1b0"
47
47
  }
@@ -19,7 +19,7 @@ type OnDeleteHandler = () => void;
19
19
  function renderTag(size: Size, handleRemoveItem?: (item: TagRowItemInner) => OnDeleteHandler, setRef?: SetTagRef) {
20
20
  return function TagRowItem(item: TagRowItemInner, index: number) {
21
21
  return (
22
- <div key={item.id ?? item.label} ref={setRef?.(item, index)} className={styles.tagWrapper}>
22
+ <div key={item.label} ref={setRef?.(item, index)} className={styles.tagWrapper}>
23
23
  <Tag size={size} onDelete={handleRemoveItem?.(item)} {...item} />
24
24
  </div>
25
25
  );
package/src/types.ts CHANGED
@@ -21,7 +21,6 @@ export type TagTooltipProps = {
21
21
  };
22
22
 
23
23
  export type TagRowItem = {
24
- id?: string;
25
24
  label: string;
26
25
  appearance?: Appearance;
27
26
  } & Partial<LinkProps> &