@trackunit/react-components 0.1.136 → 0.1.137

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 CHANGED
@@ -37134,8 +37134,8 @@ const cvaTagIcon = cssClassVarianceUtilities.cvaMerge(["cursor-pointer", "transi
37134
37134
  * @returns {JSX.Element} tag component
37135
37135
  */
37136
37136
  const Tag = React__namespace.forwardRef((_a, ref) => {
37137
- var { className, dataTestId, children, size = "medium", onClose, color = "primary" } = _a; __rest$1(_a, ["className", "dataTestId", "children", "size", "onClose", "color"]);
37138
- return (jsxRuntime.jsxs("span", { className: cvaTag({ className, size, color, layout: Boolean(onClose) ? "withIcon" : "default" }), "data-testid": dataTestId && `${dataTestId}-tag`, ref: ref, children: [children, Boolean(onClose) && (
37137
+ var { className, dataTestId, children, size = "medium", onClose, color = "primary", disabled = false } = _a; __rest$1(_a, ["className", "dataTestId", "children", "size", "onClose", "color", "disabled"]);
37138
+ return (jsxRuntime.jsxs("span", { className: cvaTag({ className, size, color, layout: Boolean(onClose) ? "withIcon" : "default" }), "data-testid": dataTestId && `${dataTestId}-tag`, ref: ref, children: [children, Boolean(onClose) && !disabled && (
37139
37139
  // a fix for multiselect deselecting tags working together with fade out animation
37140
37140
  jsxRuntime.jsx("div", { className: cvaTagIconContainer(), onMouseDown: onClose, children: jsxRuntime.jsx(Icon, { name: "XCircleIcon", dataTestId: dataTestId + "Icon", type: "solid", size: size, style: { WebkitTransition: "-webkit-transform 0.150s" }, className: cvaTagIcon() }) }))] }));
37141
37141
  });
package/index.js CHANGED
@@ -37107,8 +37107,8 @@ const cvaTagIcon = cvaMerge(["cursor-pointer", "transition-opacity", "hover:opac
37107
37107
  * @returns {JSX.Element} tag component
37108
37108
  */
37109
37109
  const Tag = React.forwardRef((_a, ref) => {
37110
- var { className, dataTestId, children, size = "medium", onClose, color = "primary" } = _a; __rest$1(_a, ["className", "dataTestId", "children", "size", "onClose", "color"]);
37111
- return (jsxs("span", { className: cvaTag({ className, size, color, layout: Boolean(onClose) ? "withIcon" : "default" }), "data-testid": dataTestId && `${dataTestId}-tag`, ref: ref, children: [children, Boolean(onClose) && (
37110
+ var { className, dataTestId, children, size = "medium", onClose, color = "primary", disabled = false } = _a; __rest$1(_a, ["className", "dataTestId", "children", "size", "onClose", "color", "disabled"]);
37111
+ return (jsxs("span", { className: cvaTag({ className, size, color, layout: Boolean(onClose) ? "withIcon" : "default" }), "data-testid": dataTestId && `${dataTestId}-tag`, ref: ref, children: [children, Boolean(onClose) && !disabled && (
37112
37112
  // a fix for multiselect deselecting tags working together with fade out animation
37113
37113
  jsx("div", { className: cvaTagIconContainer(), onMouseDown: onClose, children: jsx(Icon, { name: "XCircleIcon", dataTestId: dataTestId + "Icon", type: "solid", size: size, style: { WebkitTransition: "-webkit-transform 0.150s" }, className: cvaTagIcon() }) }))] }));
37114
37114
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-components",
3
- "version": "0.1.136",
3
+ "version": "0.1.137",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -24,6 +24,10 @@ export interface TagProps extends CommonProps {
24
24
  * Size of the tag.
25
25
  */
26
26
  size?: TagSize;
27
+ /**
28
+ * Is the tag disabled.
29
+ */
30
+ disabled?: boolean;
27
31
  }
28
32
  /**
29
33
  * The tag component is used to categorize elements in the ui.