@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.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;
@@ -254,7 +255,7 @@ declare const DropdownMenu: {
254
255
  body?: React.ReactNode;
255
256
  variant?: CommonButtonProps["variant"];
256
257
  }) => react_jsx_runtime.JSX.Element;
257
- Item: ({ children, disabled, ...rest }: {
258
+ Item: ({ children, disabled, onClick, ...rest }: {
258
259
  children?: react.ReactNode | undefined;
259
260
  } & {
260
261
  disabled?: boolean;
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"};
@@ -656,8 +655,8 @@ var DropdownMenu$1 = function (_a) {
656
655
  var style$5 = {"root":"dropdown-menu-item-module__root__zs510"};
657
656
 
658
657
  var DropdownMenuItem = function (_a) {
659
- var children = _a.children, disabled = _a.disabled, rest = __rest(_a, ["children", "disabled"]);
660
- return (jsx(RDropdownMenu.Item, __assign({ className: style$5.root, disabled: disabled }, rest, { children: children })));
658
+ var children = _a.children, disabled = _a.disabled, onClick = _a.onClick, rest = __rest(_a, ["children", "disabled", "onClick"]);
659
+ return (jsx(RDropdownMenu.Item, __assign({ className: style$5.root, onClick: !disabled ? onClick : undefined, disabled: disabled }, rest, { children: children })));
661
660
  };
662
661
 
663
662
  var DropdownMenu = { Root: DropdownMenu$1, Item: DropdownMenuItem };