@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.cjs.js +2 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.esm.js +2 -3
- package/dist/index.esm.js.map +1 -1
- package/package.json +2 -1
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"};
|