@kaio-xyz/design-system 1.1.21 → 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.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,20 +562,20 @@ 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"};
570
569
 
571
570
  var Stepper = function (_a) {
572
- var children = _a.children;
573
- return (jsxRuntime.jsx("ul", { className: style$e.root, children: children }));
571
+ var children = _a.children, dataTest = _a.dataTest, className = _a.className;
572
+ return (jsxRuntime.jsx("ul", { className: clsx(style$e.root, className), "data-test": dataTest, children: children }));
574
573
  };
575
574
 
576
575
  var style$d = {"root":"step-module__root__Tk1Yq","container":"step-module__container__XbQSB","label":"step-module__label__UNF3I","emptyIcon":"step-module__emptyIcon__-xNcB","checkIcon":"step-module__checkIcon__MWBUM","loadingIcon":"step-module__loadingIcon__-VoCZ"};
577
576
 
578
577
  var Step = function (_a) {
579
- var key = _a.key, label = _a.label, _b = _a.iconSize, iconSize = _b === void 0 ? 16 : _b, _c = _a.isCompleted, isCompleted = _c === void 0 ? false : _c, _d = _a.isCurrent, isCurrent = _d === void 0 ? false : _d;
578
+ var key = _a.key, label = _a.label, dataTest = _a.dataTest, _b = _a.iconSize, iconSize = _b === void 0 ? 16 : _b, _c = _a.isCompleted, isCompleted = _c === void 0 ? false : _c, _d = _a.isCurrent, isCurrent = _d === void 0 ? false : _d;
580
579
  var icon = React.useMemo(function () {
581
580
  switch (true) {
582
581
  case isCompleted: return jsxRuntime.jsx(SvgCheck, { className: style$d.checkIcon });
@@ -584,7 +583,7 @@ var Step = function (_a) {
584
583
  default: return jsxRuntime.jsx("span", { className: style$d.emptyIcon });
585
584
  }
586
585
  }, [isCompleted, isCurrent]);
587
- return (jsxRuntime.jsx("li", { className: style$d.root, "data-is-current": isCurrent, style: { '--icon-size': "".concat(iconSize, "px") }, children: jsxRuntime.jsxs(Stack, { className: style$d.container, position: "horizontal", children: [icon, jsxRuntime.jsx("span", { className: style$d.label, children: label })] }) }, key));
586
+ return (jsxRuntime.jsx("li", { className: style$d.root, "data-is-current": isCurrent, "data-test": dataTest, style: { '--icon-size': "".concat(iconSize, "px") }, children: jsxRuntime.jsxs(Stack, { className: style$d.container, position: "horizontal", children: [icon, jsxRuntime.jsx("span", { className: style$d.label, children: label })] }) }, key));
588
587
  };
589
588
 
590
589
  var style$c = {"root":"list-module__root__OXx93"};