@trackunit/react-components 1.10.7 → 1.10.12

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
@@ -254,14 +254,14 @@ const Tag = ({ className, dataTestId, children, size = "medium", onClose, color
254
254
  return false;
255
255
  }, [color]);
256
256
  const layout = react.useMemo(() => {
257
- if (onClose !== undefined && isSupportedDismissColor) {
257
+ if (onClose !== undefined && isSupportedDismissColor && !disabled) {
258
258
  return "containsDismiss";
259
259
  }
260
260
  if (icon !== null && icon !== undefined) {
261
261
  return "containsIcon";
262
262
  }
263
263
  return "default";
264
- }, [onClose, icon, isSupportedDismissColor]);
264
+ }, [onClose, isSupportedDismissColor, disabled, icon]);
265
265
  return (jsxRuntime.jsxs("div", { className: cvaTag({ className, size, color, layout, border: color === "white" ? "default" : "none" }), "data-testid": dataTestId, onMouseEnter: onMouseEnter, ref: ref, children: [icon !== null && icon !== undefined && size === "medium" ? (jsxRuntime.jsx("div", { className: cvaTagIconContainer(), children: icon })) : null, jsxRuntime.jsx("span", { className: cvaTagText(), children: children }), Boolean(onClose) && isSupportedDismissColor && size === "medium" && !disabled ? (
266
266
  // a fix for multiselect deselecting tags working together with fade out animation
267
267
  jsxRuntime.jsx("div", { className: cvaTagIconContainer(), onMouseDown: onClose, children: jsxRuntime.jsx(Icon, { className: cvaTagIcon(), dataTestId: dataTestId + "Icon", name: "XCircle", size: "small", style: { WebkitTransition: "-webkit-transform 0.150s" }, type: "solid" }) })) : null] }));
package/index.esm.js CHANGED
@@ -252,14 +252,14 @@ const Tag = ({ className, dataTestId, children, size = "medium", onClose, color
252
252
  return false;
253
253
  }, [color]);
254
254
  const layout = useMemo(() => {
255
- if (onClose !== undefined && isSupportedDismissColor) {
255
+ if (onClose !== undefined && isSupportedDismissColor && !disabled) {
256
256
  return "containsDismiss";
257
257
  }
258
258
  if (icon !== null && icon !== undefined) {
259
259
  return "containsIcon";
260
260
  }
261
261
  return "default";
262
- }, [onClose, icon, isSupportedDismissColor]);
262
+ }, [onClose, isSupportedDismissColor, disabled, icon]);
263
263
  return (jsxs("div", { className: cvaTag({ className, size, color, layout, border: color === "white" ? "default" : "none" }), "data-testid": dataTestId, onMouseEnter: onMouseEnter, ref: ref, children: [icon !== null && icon !== undefined && size === "medium" ? (jsx("div", { className: cvaTagIconContainer(), children: icon })) : null, jsx("span", { className: cvaTagText(), children: children }), Boolean(onClose) && isSupportedDismissColor && size === "medium" && !disabled ? (
264
264
  // a fix for multiselect deselecting tags working together with fade out animation
265
265
  jsx("div", { className: cvaTagIconContainer(), onMouseDown: onClose, children: jsx(Icon, { className: cvaTagIcon(), dataTestId: dataTestId + "Icon", name: "XCircle", size: "small", style: { WebkitTransition: "-webkit-transform 0.150s" }, type: "solid" }) })) : null] }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-components",
3
- "version": "1.10.7",
3
+ "version": "1.10.12",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -16,11 +16,11 @@
16
16
  "@floating-ui/react": "^0.26.25",
17
17
  "string-ts": "^2.0.0",
18
18
  "tailwind-merge": "^2.0.0",
19
- "@trackunit/ui-design-tokens": "1.7.44",
20
- "@trackunit/css-class-variance-utilities": "1.7.44",
21
- "@trackunit/shared-utils": "1.9.44",
22
- "@trackunit/ui-icons": "1.7.45",
23
- "@trackunit/react-test-setup": "1.4.44",
19
+ "@trackunit/ui-design-tokens": "1.7.47",
20
+ "@trackunit/css-class-variance-utilities": "1.7.47",
21
+ "@trackunit/shared-utils": "1.9.47",
22
+ "@trackunit/ui-icons": "1.7.48",
23
+ "@trackunit/react-test-setup": "1.4.47",
24
24
  "@tanstack/react-router": "1.114.29",
25
25
  "es-toolkit": "^1.39.10",
26
26
  "@tanstack/react-virtual": "3.13.12"