@trackunit/react-components 3.1.6 → 3.1.7

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
@@ -4010,16 +4010,17 @@ const CopyButton = ({ value, copyLabel, copiedLabel, size = "small", label, vari
4010
4010
  onCopy?.();
4011
4011
  }, () => undefined);
4012
4012
  };
4013
- const icon = (jsxRuntime.jsx(Icon, { ariaHidden: true, name: showCopied ? "Check" : "Square2Stack", size: size === "large" ? "medium" : "small" }));
4013
+ const buttonSize = toButtonSize(size);
4014
+ const icon = (jsxRuntime.jsx(Icon, { ariaHidden: true, name: showCopied ? "Check" : "Square2Stack", size: buttonSize === "large" ? "medium" : "small" }));
4014
4015
  if (label) {
4015
4016
  // Labelled mode: a regular (non-square) button whose prefix icon carries
4016
4017
  // the copied confirmation. `extraSmall` is icon-only, so it collapses to small.
4017
4018
  // The visible label stays the accessible name (WCAG 2.5.3 Label in Name);
4018
4019
  // since the copied feedback is otherwise visual-only, it is announced
4019
4020
  // through the polite live region rendered next to the button.
4020
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Tooltip, { delayed: !showCopied, label: showCopied ? resolvedCopiedLabel : resolvedCopyLabel, placement: "top", children: jsxRuntime.jsx(Button, { className: className, "data-testid": dataTestId, onClick: handleCopy, prefix: icon, ref: ref, size: toButtonSize(size), style: style, variant: variant, children: label }) }), jsxRuntime.jsx("span", { className: "sr-only", role: "status", children: showCopied ? resolvedCopiedLabel : undefined })] }));
4021
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Tooltip, { delayed: !showCopied, label: showCopied ? resolvedCopiedLabel : resolvedCopyLabel, placement: "top", children: jsxRuntime.jsx(Button, { className: className, "data-testid": dataTestId, onClick: handleCopy, prefix: icon, ref: ref, size: buttonSize, style: style, variant: variant, children: label }) }), jsxRuntime.jsx("span", { className: "sr-only", role: "status", children: showCopied ? resolvedCopiedLabel : undefined })] }));
4021
4022
  }
4022
- return (jsxRuntime.jsx(Tooltip, { delayed: !showCopied, label: showCopied ? resolvedCopiedLabel : resolvedCopyLabel, placement: "top", children: jsxRuntime.jsx(Button, { ariaLabel: showCopied ? resolvedCopiedLabel : resolvedCopyLabel, className: cvaIconButton({ size, className }), "data-testid": dataTestId, onClick: handleCopy, prefix: icon, ref: ref, size: toButtonSize(size), square: true, style: style, variant: variant }) }));
4023
+ return (jsxRuntime.jsx(Tooltip, { delayed: !showCopied, label: showCopied ? resolvedCopiedLabel : resolvedCopyLabel, placement: "top", children: jsxRuntime.jsx(Button, { ariaLabel: showCopied ? resolvedCopiedLabel : resolvedCopyLabel, className: cvaIconButton({ size, className }), "data-testid": dataTestId, onClick: handleCopy, prefix: icon, ref: ref, size: buttonSize, square: true, style: style, variant: variant }) }));
4023
4024
  };
4024
4025
  CopyButton.displayName = "CopyButton";
4025
4026
  const COPIED_FEEDBACK_DURATION_MS = 2000;
package/index.esm.js CHANGED
@@ -4009,16 +4009,17 @@ const CopyButton = ({ value, copyLabel, copiedLabel, size = "small", label, vari
4009
4009
  onCopy?.();
4010
4010
  }, () => undefined);
4011
4011
  };
4012
- const icon = (jsx(Icon, { ariaHidden: true, name: showCopied ? "Check" : "Square2Stack", size: size === "large" ? "medium" : "small" }));
4012
+ const buttonSize = toButtonSize(size);
4013
+ const icon = (jsx(Icon, { ariaHidden: true, name: showCopied ? "Check" : "Square2Stack", size: buttonSize === "large" ? "medium" : "small" }));
4013
4014
  if (label) {
4014
4015
  // Labelled mode: a regular (non-square) button whose prefix icon carries
4015
4016
  // the copied confirmation. `extraSmall` is icon-only, so it collapses to small.
4016
4017
  // The visible label stays the accessible name (WCAG 2.5.3 Label in Name);
4017
4018
  // since the copied feedback is otherwise visual-only, it is announced
4018
4019
  // through the polite live region rendered next to the button.
4019
- return (jsxs(Fragment, { children: [jsx(Tooltip, { delayed: !showCopied, label: showCopied ? resolvedCopiedLabel : resolvedCopyLabel, placement: "top", children: jsx(Button, { className: className, "data-testid": dataTestId, onClick: handleCopy, prefix: icon, ref: ref, size: toButtonSize(size), style: style, variant: variant, children: label }) }), jsx("span", { className: "sr-only", role: "status", children: showCopied ? resolvedCopiedLabel : undefined })] }));
4020
+ return (jsxs(Fragment, { children: [jsx(Tooltip, { delayed: !showCopied, label: showCopied ? resolvedCopiedLabel : resolvedCopyLabel, placement: "top", children: jsx(Button, { className: className, "data-testid": dataTestId, onClick: handleCopy, prefix: icon, ref: ref, size: buttonSize, style: style, variant: variant, children: label }) }), jsx("span", { className: "sr-only", role: "status", children: showCopied ? resolvedCopiedLabel : undefined })] }));
4020
4021
  }
4021
- return (jsx(Tooltip, { delayed: !showCopied, label: showCopied ? resolvedCopiedLabel : resolvedCopyLabel, placement: "top", children: jsx(Button, { ariaLabel: showCopied ? resolvedCopiedLabel : resolvedCopyLabel, className: cvaIconButton({ size, className }), "data-testid": dataTestId, onClick: handleCopy, prefix: icon, ref: ref, size: toButtonSize(size), square: true, style: style, variant: variant }) }));
4022
+ return (jsx(Tooltip, { delayed: !showCopied, label: showCopied ? resolvedCopiedLabel : resolvedCopyLabel, placement: "top", children: jsx(Button, { ariaLabel: showCopied ? resolvedCopiedLabel : resolvedCopyLabel, className: cvaIconButton({ size, className }), "data-testid": dataTestId, onClick: handleCopy, prefix: icon, ref: ref, size: buttonSize, square: true, style: style, variant: variant }) }));
4022
4023
  };
4023
4024
  CopyButton.displayName = "CopyButton";
4024
4025
  const COPIED_FEEDBACK_DURATION_MS = 2000;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-components",
3
- "version": "3.1.6",
3
+ "version": "3.1.7",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "migrations": "./migrations.json",
@@ -14,16 +14,16 @@
14
14
  "@floating-ui/react": "^0.26.25",
15
15
  "string-ts": "^2.0.0",
16
16
  "tailwind-merge": "^2.0.0",
17
- "@trackunit/ui-design-tokens": "1.15.39",
18
- "@trackunit/css-class-variance-utilities": "2.0.18",
19
- "@trackunit/shared-utils": "1.16.53",
20
- "@trackunit/ui-icons": "1.14.47",
17
+ "@trackunit/ui-design-tokens": "1.15.40",
18
+ "@trackunit/css-class-variance-utilities": "2.0.19",
19
+ "@trackunit/shared-utils": "1.16.54",
20
+ "@trackunit/ui-icons": "1.14.48",
21
21
  "es-toolkit": "^1.39.10",
22
22
  "@tanstack/react-virtual": "^3.14.3",
23
23
  "dequal": "^2.0.3",
24
24
  "fflate": "^0.8.2",
25
25
  "zod": "^3.25.76",
26
- "@trackunit/i18n-library-translation": "2.5.3"
26
+ "@trackunit/i18n-library-translation": "2.5.4"
27
27
  },
28
28
  "peerDependencies": {
29
29
  "react": "^19.0.0",