@trackunit/react-table-base-components 0.0.108 → 0.0.111

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/index.cjs.js CHANGED
@@ -236,7 +236,9 @@ const cvaTagsCell = cssClassVarianceUtilities.cvaMerge(["flex", "gap-2"]);
236
236
  * @returns {JSX.Element} TagsCell component
237
237
  */
238
238
  const TagsCell = ({ className, tags, dataTestId }) => {
239
- return (jsxRuntime.jsx("div", { className: cvaTagsCell({ className }), "data-testid": dataTestId, children: tags.map((tag, index) => (jsxRuntime.jsx(reactComponents.Tag, { color: "primary", dataTestId: `${dataTestId}-${index}`, children: tag }, index))) }));
239
+ return (jsxRuntime.jsx("div", { className: cvaTagsCell({ className }), "data-testid": dataTestId, children: tags.map((tag, index) => (jsxRuntime.jsx(reactComponents.Tag, Object.assign({ color: "primary",
240
+ key: index,
241
+ dataTestId: `${dataTestId}-${index}` }, (typeof tag === "string" ? { children: tag } : tag))))) }));
240
242
  };
241
243
 
242
244
  /**
package/index.esm.js CHANGED
@@ -232,7 +232,9 @@ const cvaTagsCell = cvaMerge(["flex", "gap-2"]);
232
232
  * @returns {JSX.Element} TagsCell component
233
233
  */
234
234
  const TagsCell = ({ className, tags, dataTestId }) => {
235
- return (jsx("div", { className: cvaTagsCell({ className }), "data-testid": dataTestId, children: tags.map((tag, index) => (jsx(Tag, { color: "primary", dataTestId: `${dataTestId}-${index}`, children: tag }, index))) }));
235
+ return (jsx("div", { className: cvaTagsCell({ className }), "data-testid": dataTestId, children: tags.map((tag, index) => (jsx(Tag, Object.assign({ color: "primary",
236
+ key: index,
237
+ dataTestId: `${dataTestId}-${index}` }, (typeof tag === "string" ? { children: tag } : tag))))) }));
236
238
  };
237
239
 
238
240
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-table-base-components",
3
- "version": "0.0.108",
3
+ "version": "0.0.111",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { CommonProps } from "@trackunit/react-components";
2
+ import { CommonProps, TagProps } from "@trackunit/react-components";
3
3
  export interface TagsCellProps extends CommonProps, React.HTMLAttributes<HTMLTableSectionElement> {
4
4
  /**
5
5
  * A id that can be used in tests to get the component
@@ -12,7 +12,7 @@ export interface TagsCellProps extends CommonProps, React.HTMLAttributes<HTMLTab
12
12
  /**
13
13
  * Array of tags that the component should show.
14
14
  */
15
- tags: string[];
15
+ tags: string[] | TagProps[];
16
16
  }
17
17
  /**
18
18
  * The TagsCell is used for render a list of tags in a table cell