@kaio-xyz/design-system 1.1.23 → 1.1.25

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.cjs.js CHANGED
@@ -548,10 +548,9 @@ var trimString = function (str, noOfChars) {
548
548
  return "".concat(str.slice(0, noOfChars), "...").concat(str.slice(-noOfChars));
549
549
  };
550
550
  var Clipboard = function (_a) {
551
- var value = _a.value, _b = _a.trim, trim = _b === void 0 ? false : _b, _c = _a.trimLength, trimLength = _c === void 0 ? 4 : _c;
551
+ 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;
552
552
  var _d = React.useState(false), isCopied = _d[0], setIsCopied = _d[1];
553
553
  var _e = React.useState(false), isShowingCopy = _e[0], setIsShowingCopy = _e[1];
554
- var _f = React.useState(false); _f[0]; _f[1];
555
554
  var displayValue = trim ? trimString(value, trimLength) : value;
556
555
  var handleClick = React.useCallback(function () {
557
556
  navigator.clipboard.writeText(value);
@@ -563,7 +562,7 @@ var Clipboard = function (_a) {
563
562
  }, [value]);
564
563
  var text = isShowingCopy ? 'Copied!' : displayValue;
565
564
  var icon = isShowingCopy ? jsxRuntime.jsx(SvgCheck, {}) : jsxRuntime.jsx(SvgClipboard, {});
566
- return (jsxRuntime.jsx("button", { type: "button", onClick: handleClick, className: style$f.root, "data-is-copied": isCopied, "data-is-showing-copy": isShowingCopy, children: jsxRuntime.jsxs(Stack, { position: "horizontal", children: [jsxRuntime.jsx("span", { children: text }), icon] }) }));
565
+ return (jsxRuntime.jsx("button", { type: "button", onClick: handleClick, className: style$f.root, "data-is-copied": isCopied, "data-is-showing-copy": isShowingCopy, "data-test": dataTest, children: jsxRuntime.jsxs(Stack, { position: "horizontal", children: [jsxRuntime.jsx("span", { children: text }), icon] }) }));
567
566
  };
568
567
 
569
568
  var style$e = {"root":"stepper-module__root__hgDss"};
@@ -679,8 +678,8 @@ var DropdownMenu$1 = function (_a) {
679
678
  var style$5 = {"root":"dropdown-menu-item-module__root__zs510"};
680
679
 
681
680
  var DropdownMenuItem = function (_a) {
682
- var children = _a.children, disabled = _a.disabled, rest = __rest(_a, ["children", "disabled"]);
683
- return (jsxRuntime.jsx(RDropdownMenu__namespace.Item, __assign({ className: style$5.root, disabled: disabled }, rest, { children: children })));
681
+ var children = _a.children, disabled = _a.disabled, onClick = _a.onClick, rest = __rest(_a, ["children", "disabled", "onClick"]);
682
+ return (jsxRuntime.jsx(RDropdownMenu__namespace.Item, __assign({ className: style$5.root, onClick: !disabled ? onClick : undefined, disabled: disabled }, rest, { children: children })));
684
683
  };
685
684
 
686
685
  var DropdownMenu = { Root: DropdownMenu$1, Item: DropdownMenuItem };