@kaio-xyz/design-system 1.1.23 → 1.1.24

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/dist/index.d.ts CHANGED
@@ -160,10 +160,11 @@ declare const Checkbox: {
160
160
 
161
161
  type ClipboardProps = {
162
162
  value: string;
163
+ dataTest: string;
163
164
  trim?: boolean;
164
165
  trimLength?: number;
165
166
  };
166
- declare const Clipboard: ({ value, trim, trimLength }: ClipboardProps) => react_jsx_runtime.JSX.Element;
167
+ declare const Clipboard: ({ value, dataTest, trim, trimLength }: ClipboardProps) => react_jsx_runtime.JSX.Element;
167
168
 
168
169
  type StepperProps = {
169
170
  children: ReactNode;
package/dist/index.esm.js CHANGED
@@ -525,10 +525,9 @@ var trimString = function (str, noOfChars) {
525
525
  return "".concat(str.slice(0, noOfChars), "...").concat(str.slice(-noOfChars));
526
526
  };
527
527
  var Clipboard = function (_a) {
528
- var value = _a.value, _b = _a.trim, trim = _b === void 0 ? false : _b, _c = _a.trimLength, trimLength = _c === void 0 ? 4 : _c;
528
+ var value = _a.value, dataTest = _a.dataTest, _b = _a.trim, trim = _b === void 0 ? false : _b, _c = _a.trimLength, trimLength = _c === void 0 ? 4 : _c;
529
529
  var _d = useState(false), isCopied = _d[0], setIsCopied = _d[1];
530
530
  var _e = useState(false), isShowingCopy = _e[0], setIsShowingCopy = _e[1];
531
- var _f = useState(false); _f[0]; _f[1];
532
531
  var displayValue = trim ? trimString(value, trimLength) : value;
533
532
  var handleClick = useCallback(function () {
534
533
  navigator.clipboard.writeText(value);
@@ -540,7 +539,7 @@ var Clipboard = function (_a) {
540
539
  }, [value]);
541
540
  var text = isShowingCopy ? 'Copied!' : displayValue;
542
541
  var icon = isShowingCopy ? jsx(SvgCheck, {}) : jsx(SvgClipboard, {});
543
- return (jsx("button", { type: "button", onClick: handleClick, className: style$f.root, "data-is-copied": isCopied, "data-is-showing-copy": isShowingCopy, children: jsxs(Stack, { position: "horizontal", children: [jsx("span", { children: text }), icon] }) }));
542
+ return (jsx("button", { type: "button", onClick: handleClick, className: style$f.root, "data-is-copied": isCopied, "data-is-showing-copy": isShowingCopy, "data-test": dataTest, children: jsxs(Stack, { position: "horizontal", children: [jsx("span", { children: text }), icon] }) }));
544
543
  };
545
544
 
546
545
  var style$e = {"root":"stepper-module__root__hgDss"};